@cldemo/ui-kit 1.1.3 → 1.1.4

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 (165) hide show
  1. package/buildLibs/all/index.cjs +8 -8
  2. package/buildLibs/all/index.js +12157 -12048
  3. package/buildLibs/common/globalConfig.cjs +1 -1
  4. package/buildLibs/common/globalConfig.js +29 -15
  5. package/buildLibs/common/i18n/en.cjs +1 -1
  6. package/buildLibs/common/i18n/en.js +3 -1
  7. package/buildLibs/common/i18n/zh_CN.cjs +1 -1
  8. package/buildLibs/common/i18n/zh_CN.js +3 -1
  9. package/buildLibs/common/index.cjs +1 -1
  10. package/buildLibs/common/index.js +26 -24
  11. package/buildLibs/mobile/index.cjs +5 -5
  12. package/buildLibs/mobile/index.js +5902 -5852
  13. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js} +2 -2
  14. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js +254 -0
  15. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js} +3 -3
  16. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js} +153 -145
  17. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js} +67 -59
  18. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js +2536 -0
  19. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js} +386 -375
  20. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js +310 -0
  21. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js} +53 -47
  22. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js} +1 -1
  23. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
  24. package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js} +66 -60
  25. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
  26. package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js} +63 -55
  27. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D_73B6av.js +1533 -0
  28. package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js} +102 -92
  29. package/buildLibs/types/All/index.d.ts +1 -1
  30. package/buildLibs/types/Common/globalConfig.d.ts +29 -0
  31. package/buildLibs/types/Common/globalTypes.d.ts +11 -0
  32. package/buildLibs/types/Common/i18n/en.d.ts +2 -0
  33. package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
  34. package/buildLibs/types/Common/index.d.ts +1 -1
  35. package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
  36. package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
  37. package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
  38. package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
  39. package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
  40. package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
  41. package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
  42. package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
  43. package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
  44. package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
  45. package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
  46. package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
  47. package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
  48. package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
  49. package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
  50. package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
  51. package/buildLibs/utils/Element/ClCheckbox.js +1 -1
  52. package/buildLibs/utils/Element/ClInput.cjs +1 -1
  53. package/buildLibs/utils/Element/ClInput.js +1 -1
  54. package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
  55. package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
  56. package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
  57. package/buildLibs/utils/Element/ClInputNumber.js +1 -1
  58. package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
  59. package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
  60. package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
  61. package/buildLibs/utils/Element/ClInputPassword.js +1 -1
  62. package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
  63. package/buildLibs/utils/Element/ClInputSearch.js +1 -1
  64. package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
  65. package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
  66. package/buildLibs/utils/Element/ClRadio.cjs +1 -1
  67. package/buildLibs/utils/Element/ClRadio.js +1 -1
  68. package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
  69. package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
  70. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
  71. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
  72. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-2THK822S.js +254 -0
  73. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js} +386 -375
  74. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
  75. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js} +2 -2
  76. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js +1 -0
  77. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
  78. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js +1 -0
  79. package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CATwJnes.js} +66 -60
  80. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js +1 -0
  81. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js} +3 -3
  82. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CsCn637u.js +2 -0
  83. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js} +153 -145
  84. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js +1 -0
  85. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js +1 -0
  86. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js +1533 -0
  87. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js +2536 -0
  88. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js +1 -0
  89. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js} +53 -47
  90. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js +1 -0
  91. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DwBf338f.js +1 -0
  92. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js} +63 -55
  93. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js +310 -0
  94. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js} +1 -1
  95. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js +1 -0
  96. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js} +67 -59
  97. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js} +1 -1
  98. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-oovIcT38.js} +1 -1
  99. package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js} +1 -1
  100. package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
  101. package/buildLibs/utils/Web/ClColorPicker.js +1 -1
  102. package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
  103. package/buildLibs/utils/Web/ClCropperPreview.js +1 -1
  104. package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
  105. package/buildLibs/utils/Web/ClDateTime.js +1 -1
  106. package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
  107. package/buildLibs/utils/Web/ClFileUpload.js +1 -1
  108. package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
  109. package/buildLibs/utils/Web/ClInputTag.js +1 -1
  110. package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
  111. package/buildLibs/utils/Web/ClPaginate.js +1 -1
  112. package/buildLibs/utils/Web/ClSelect.cjs +1 -1
  113. package/buildLibs/utils/Web/ClSelect.js +1 -1
  114. package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
  115. package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
  116. package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
  117. package/buildLibs/utils/Web/ClSelectMove.js +655 -647
  118. package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
  119. package/buildLibs/utils/Web/ClSelectTag.js +1 -1
  120. package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
  121. package/buildLibs/utils/Web/ClSelectTree.js +71 -63
  122. package/buildLibs/utils/Web/ClTable.cjs +1 -1
  123. package/buildLibs/utils/Web/ClTable.js +1 -1
  124. package/buildLibs/utils/Web/ClTree.cjs +1 -1
  125. package/buildLibs/utils/Web/ClTree.js +1 -1
  126. package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
  127. package/buildLibs/utils/Web/ClXEditable.js +10 -10
  128. package/buildLibs/web/index.cjs +7 -7
  129. package/buildLibs/web/index.js +10792 -10685
  130. package/docs/components/Element/Checkbox.md +2 -1
  131. package/docs/components/Element/Form.md +15 -0
  132. package/docs/components/Element/Input.md +2 -1
  133. package/docs/components/Element/InputNumber.md +2 -1
  134. package/docs/components/Element/InputNumberStepper.md +2 -1
  135. package/docs/components/Element/InputTextarea.md +2 -1
  136. package/docs/components/Element/Radio.md +2 -1
  137. package/docs/components/Web/DateTime.md +2 -1
  138. package/docs/components/Web/FileUpload.md +2 -1
  139. package/docs/components/Web/Select.md +2 -1
  140. package/docs/components/Web/SelectCascade.md +1 -0
  141. package/docs/components/Web/SelectMove.md +2 -1
  142. package/docs/components/Web/SelectTag.md +1 -0
  143. package/docs/components/Web/SelectTree.md +2 -1
  144. package/docs/components/Web/Tree.md +2 -1
  145. package/package.json +1 -1
  146. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
  147. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
  148. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
  149. package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
  150. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
  151. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
  152. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
  153. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
  154. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
  155. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
  156. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
  157. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
  158. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
  159. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
  160. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
  161. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
  162. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
  163. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
  164. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
  165. package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
@@ -1,11 +1,11 @@
1
- "use strict";var Vi=Object.create;var wa=Object.defineProperty;var Mi=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var _i=Object.getPrototypeOf,Ai=Object.prototype.hasOwnProperty;var Li=(n,l,a,t)=>{if(l&&typeof l=="object"||typeof l=="function")for(let i of Oi(l))!Ai.call(n,i)&&i!==a&&wa(n,i,{get:()=>l[i],enumerable:!(t=Mi(l,i))||t.enumerable});return n};var en=(n,l,a)=>(a=n!=null?Vi(_i(n)):{},Li(l||!n||!n.__esModule?wa(a,"default",{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Se=require("@cldemo/ui-kit/common/log"),o=require("@cldemo/ui-kit/common/base"),de=require("@cldemo/ui-kit/common/Element"),ot=require("@cldemo/ui-kit/common/i18n"),$i=require("@cldemo/ui-kit/common/i18n/a11y"),wt=require("@cldemo/ui-kit/common/globalConfig"),je=require("@cldemo/ui-kit/common/Element/Event"),Fi=require("@cldemo/ui-kit/common/tooltip"),Pi=require("@cldemo/ui-kit/common/promise"),Za=require("@cldemo/ui-kit/common/Tools"),Ye=require("@cldemo/ui-kit/common/day"),Me=require("dayjs"),Ri=require("@cldemo/ui-kit/common/echart"),Hi=["id"],qt=e.defineComponent({name:"ClBadge",__name:"Index",props:{id:String,className:String,num:[String,Number],color:{type:String,default:"default"},colorSty:String,maxNum:{type:Number,default:-1},isHideZero:{type:Boolean,default:!0},isDot:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=()=>{let u="";if(!o.isEmpty(l.num)){const s=Number(l.num);o.isFinite(s)?s===0&&l.isHideZero?u="":s>l.maxNum&&l.maxNum>0?u=`${l.maxNum}+`:u=s.toString():u=""}return u},i=e.computed(()=>t()),r=e.computed(()=>{let u={badge:!0};return!o.isEmpty(l.color)&&o.isEmpty(l.colorSty)&&(u[`bg-${l.color}`]=!0),u=o.getJsonMerge(u,de.getClassNameJson(l.className)),l.isDot&&o.isEmpty(t())&&(u["badge-dot"]=!0),u}),d=e.computed(()=>{const u={};return l.colorSty&&!o.isEmpty(l.colorSty)&&(u["background-color"]=l.colorSty),u});return(u,s)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(a),class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value),role:"status"},e.toDisplayString(i.value),15,Hi))}});ot.initMerge({packageData:$i});const Ui="locale",zi="zh_cn";function Ca(){const n=wt.getGlobalConfig(Ui);if(typeof n=="string"&&n.length>0)return n;const l=ot.getType();if(typeof l=="string"&&l.length>0)return l;if(l&&typeof l=="object"&&"type"in l){const a=l.type;if(typeof a=="string"&&a.length>0)return a}return zi}function el(){const n=e.ref(Ca());return e.watch(Ca,l=>{n.value=l}),{optLocale:n}}function Uo(){const{optLocale:n}=el(),l=e.ref({}),a=()=>{const t=ot.getCommon()||{},i={};Object.keys(t).forEach(r=>{const d=t[r];typeof d=="string"&&(i[r]=d)}),l.value=i};return a(),e.watch(n,a),{optA11yText:l}}const Le=()=>{const n=e.ref({}),{optLocale:l}=el(),a=s=>{n.value=ot.getPage(s)};let t="";const i=s=>{t=s,a(s)};return e.watch(l,()=>{t&&a(t)}),{optPageLanguage:n,optLocale:l,getPageLanguage:i,getLanguageValue:s=>ot.getValue(s),getLanguageType:()=>ot.getType(),getCommonText:(s,c)=>{const m=ot.getValue(`common.${s}`);return typeof m=="string"&&m.length>0?m:c}}},Ji=["id","aria-label"],Ki=["onClick"],Wi={key:1},ji={class:"breadcrumb-item"},tl=e.defineComponent({name:"ClBreadcrumb",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:{onClickUrl:(n,l)=>!0},setup(n,{emit:l}){const{optA11yText:a}=Uo(),t=n,i=l,r=`breadcrumb-${o.getRandom(5)}`,d=t.id,u=e.computed(()=>{const g={"panel-breadcrumb":!0};return o.getJsonMerge(g,de.getClassNameJson(t.className))}),s=e.computed(()=>!Array.isArray(t.list)||o.isEmpty(t.list)?[]:t.list.slice(0,-1).filter(Boolean)),c=e.computed(()=>{if(!Array.isArray(t.list)||o.isEmpty(t.list))return"";const g=t.list[t.list.length-1];return o.isEmpty(t.title)?g?.name??"":t.title}),m=g=>!o.isEmpty(g),p=(g,v)=>{i("onClickUrl",g,v)};return(g,v)=>{const y=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("ol",{id:e.unref(d),class:e.normalizeClass(u.value),"aria-label":e.unref(a).breadcrumb||"面包屑导航"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,F)=>(e.openBlock(),e.createElementBlock("li",{class:"breadcrumb-item",key:`${r}-${F}`},[m(k.href)?(e.openBlock(),e.createBlock(y,{key:0,to:k.href},{default:e.withCtx(()=>[e.createElementVNode("span",{onClick:B=>p(k,B)},e.toDisplayString(k.name??""),9,Ki)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",Wi,e.toDisplayString(k.name??""),1))]))),128)),e.createElementVNode("li",ji,[e.createElementVNode("span",null,e.toDisplayString(c.value),1)])],10,Ji)}}}),Yi=["id","aria-label"],rt=e.defineComponent({name:"ClLoad",__name:"Index",props:{id:String,className:String,theme:{type:String,default:"rotaryLine",validator:n=>["rotaryLine","circleNotch","circleBubble","ballColor4","dotTyping","dotWave","dotBounce","dotPulse","dotOrbit","dotFlow","dotSlide","dotSlider","dotFold","dotSquare","barEqualizer","barWave","barPulse","barStretch","barMeter","barBounce","barRamp","ringRotate","ringDot","ringPulse","ringClip","ringFan","circleSpinner","dotRipple","dotRipple3","ringCross","squareTrace","squareTrace2","crossMove","snakePath","squareMirror","dotPulse5","diamondShuttle","barStream","newtonCradle","dotSpin","orbitSwap","typingBounce","ringGlow","toastRing"].indexOf(n)!==-1},size:{type:String,default:"small",validator:n=>["xxl","xl","large","small","xs"].indexOf(n)!==-1},color:{type:String,default:""}},setup(n){const{optA11yText:l}=Uo(),a=n,t=a.id,i={rotaryLine:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RotaryLine-Cy2T8bHV.cjs"))),circleNotch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleNotch-CAU_ywNn.cjs"))),circleBubble:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleBubble-C0rZgQXq.cjs"))),ballColor4:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BallColor4-CYX2eI-j.cjs"))),dotTyping:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotTyping-ByFKmTv5.cjs"))),dotWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotWave-CagHEG1I.cjs"))),dotBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotBounce-C7LYp77Z.cjs"))),dotPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse-C4V4OIco.cjs"))),dotOrbit:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotOrbit-B7NaedQS.cjs"))),dotFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFlow-Dtn_yDPy.cjs"))),dotSlide:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlide-DN4VEjQJ.cjs"))),dotSlider:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlider-CBORUo56.cjs"))),dotFold:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFold-eCvY26nk.cjs"))),dotSquare:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSquare-BLU64iXy.cjs"))),barEqualizer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarEqualizer-CSmPfckO.cjs"))),barWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarWave-RhfBvsx_.cjs"))),barPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarPulse-CGTRpoDg.cjs"))),barStretch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStretch-x5XcsNjn.cjs"))),barMeter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarMeter-DOYYJBe3.cjs"))),barBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarBounce-BU0gnsJy.cjs"))),barRamp:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarRamp-j0BcyAi0.cjs"))),ringRotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingRotate-BPvmZEbJ.cjs"))),ringDot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingDot-D95FkF10.cjs"))),ringPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingPulse-BanyDtHv.cjs"))),ringClip:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingClip-Bk97t-3A.cjs"))),ringFan:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingFan-D8Co3b0E.cjs"))),dotRipple:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple-Br1zlAt1.cjs"))),circleSpinner:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleSpinner-Y54L_MEc.cjs"))),dotRipple3:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple3-DIDhH-NZ.cjs"))),ringCross:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingCross-BX9sj6um.cjs"))),squareTrace:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace-D1LY0duS.cjs"))),squareTrace2:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace2-CXnO0uiD.cjs"))),crossMove:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CrossMove-BVaKs_SF.cjs"))),snakePath:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SnakePath-DGXHMRVN.cjs"))),squareMirror:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareMirror-DGJtQUJk.cjs"))),dotPulse5:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse5-Dh-Ce1VK.cjs"))),diamondShuttle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DiamondShuttle-Dnoe79T3.cjs"))),barStream:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStream-ImPjB2Xq.cjs"))),newtonCradle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./NewtonCradle-b4EnbPSk.cjs"))),dotSpin:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSpin-Bb7nsZf4.cjs"))),orbitSwap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./OrbitSwap-3g265TzL.cjs"))),typingBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TypingBounce-BHeUrBAT.cjs"))),ringGlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingGlow-DgaBYZgf.cjs"))),toastRing:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ToastRing-BtQqdv7a.cjs")))},r=new Set(["ballColor4","diamondShuttle","orbitSwap","ringGlow"]),d=e.computed(()=>a.theme||"rotaryLine"),u=e.computed(()=>i[d.value]||null),s=e.computed(()=>a.size==="large"),c=e.computed(()=>a.size==="xl"),m=e.computed(()=>a.size==="xxl"),p=e.computed(()=>a.size==="xs"),g=e.computed(()=>{const y=a.color||"";return y?r.has(d.value)?y:o.isString(y)?y.split("|")[0].trim():"":""}),v=e.computed(()=>o.getJsonMerge({"panel-load":!0,"size-large":s.value,"size-xl":c.value,"size-xxl":m.value,"size-xs":p.value},de.getClassNameJson(a.className)));return(y,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(v.value),id:e.unref(t),role:"status","aria-label":e.unref(l).loading||"加载中"},[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,color:g.value,size:n.size},null,8,["color","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Yi))}}),Pn=new Map;function qi(n){if(!n)return;const l=Pn.get(n);if(l){l.count+=1;return}Pn.set(n,{count:1,overflow:n.style.overflow,className:n.className}),n.style.overflow="hidden",/\bmodal-open\b/.test(n.className)||(n.className=`${n.className} modal-open`.trim())}function Xi(n){if(!n)return;const l=Pn.get(n);if(l){if(l.count>1){l.count-=1;return}Pn.delete(n),n.isConnected&&(n.style.overflow=l.overflow,n.className=l.className)}}const Gi=["id"],At=e.defineComponent({name:"ClOverlay",__name:"Index",props:{id:String,className:String,show:Boolean,zIndex:{type:Number,default:2e3},duration:{type:Number,default:300},isLockScroll:{type:Boolean,default:!0},background:{type:String,default:"var(--cl-overlay, rgba(0, 0, 0, 0.7))"},teleportTarget:{type:String,default:""}},emits:["update:show","onClick"],setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.ref(a.show);let d=null;const u=e.useTemplateRef("refElOverlay"),s=e.computed(()=>o.isNonEmptyString(a.teleportTarget)?A(a.teleportTarget):"body"),c=e.computed(()=>a.teleportTarget==="self"),m=e.computed(()=>c.value),p=e.computed(()=>{const V=a.duration;return o.isNumber(V)&&o.isFinite(V)&&V>=0&&V<=1e4?V:300}),g=e.computed(()=>{const V=a.zIndex;return o.isNumber(V)&&o.isFinite(V)&&V>=0?V:2e3}),v=e.computed(()=>{const V={"panel-overlay":!0};return c.value&&(V["panel-overlay-self"]=!0),o.getJsonMerge(V,de.getClassNameJson(a.className))}),y=e.computed(()=>({zIndex:g.value,background:o.isNonEmptyString(a.background)?a.background:"var(--cl-overlay, rgba(0, 0, 0, 0.7))","--overlay-duration":`${p.value}ms`})),k=V=>{qi(V)},F=V=>{Xi(V)},B=()=>{if(c.value){const M=u.value?u.value.parentElement:null;if(!M)return null;let C=M;for(;C&&C!==document.body;){if(window.getComputedStyle(C).position!=="static")return C;C=C.parentElement}return document.body}const V=s.value;if(V==="body")return document.body;const w=document.querySelector(V);return w===document.body?document.body:w??document.body},I=()=>{if(a.isLockScroll&&a.show){const V=B();V&&d!==V&&(d&&F(d),d=V,k(V))}else d&&(F(d),d=null)},A=V=>{if(V==="self")return V;try{return document.querySelector(V)?V:(Se.warn("Overlay",`teleportTarget「${V}」未匹配到元素,已回退到 body`),"body")}catch{return Se.warn("Overlay",`teleportTarget「${V}」不是合法的 CSS 选择器,已回退到 body`),"body"}};e.onBeforeUnmount(()=>{d&&(F(d),d=null)}),e.watch(()=>[a.show,a.isLockScroll],()=>{a.show&&(r.value=!0),e.nextTick(()=>{I()})},{immediate:!0}),e.onMounted(()=>{I()});const N=()=>{t("onClick"),t("update:show",!1)},x=()=>{a.show||(r.value=!1)};return(V,w)=>r.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:s.value,disabled:m.value},[e.createVNode(e.Transition,{name:"panel-overlay-fade",duration:p.value,appear:"",onAfterLeave:x},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"refElOverlay",ref:u,id:e.unref(i),class:e.normalizeClass(v.value),style:e.normalizeStyle(y.value),onClick:e.withModifiers(N,["self"])},[e.renderSlot(V.$slots,"default")],14,Gi),[[e.vShow,n.show]])]),_:3},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),Qi=["PPT","activity","address-book","aixin","aixin1","album","album-baby","all-circle","all-circle-fill","all-square","android","android1","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-line-down","angle-line-left","angle-line-right","angle-line-up","angle-linelong-down","angle-linelong-down-left","angle-linelong-down-right","angle-linelong-left","angle-linelong-right","angle-linelong-up","angle-linelong-up-left","angle-linelong-up-right","angle-right","angle-up","arrow-circle-down","arrow-circle-down-line","arrow-circle-down-line-fill","arrow-circle-left","arrow-circle-right","arrow-circle-up","back-bottom","back-top","back-up1","banshixinxingxing","baseInfo","basicdata","bell","bitian","book","calendar","calendar1","camera","camera1","caret-down","caret-left","caret-right","caret-up","check","check-circle","check-circle-fill","check-square","check-square-fill","check1","check2","chemicals","chose-image","clear","clock","close","close-circle","close-circle-fill","close1","clothes","column-show","config","contract","cooperation","copy","cropper","customer","dashboard","dashboard1","dazhongdianping","delete","diqiu","dollar","douyin","douyin1","download","download-cloud","download-cloud-1","download-cloud-2","earth","edit","edit1","edit2","email","empty","equipment","excel","exclamation","exclamation-circle","exclamation-circle-fill","eye","eye-no","file","file-excel","file-gif","file-image","file-pdf","file-ppt","file-search","file-text","file-word","file-zip","film","filter","finance","gesture-enlarge","gesture-narrow","gif","goumai","guanliyuan","guidance","home","home1","image","image-multiple","image-rmb","image1","info","info-circle","info-circle-fill","ios","ios1","jiaoxue","jin","jingxiupian","kebiao","kefu","kefunan","kefunv","language","language1","layout-left","layout-top","layout-top-left","liebiao","liebiao-1","liebiao-image","liebiao-pubuliu","like","list-empty5","lock","lock-un","look","looklove","luxian","marker","marker-qidian","marker-qidian1","meiyuan","minus","minus-circle","minus-circle-fill","minus-square","minus-square-fill","mobanpeizhi","more","more1","move","music","new","new-triangle-left-2","new-triangle-left-4","new-triangle-right","new-triangle-right-2","new2","order","orderPre","paixu","pdf","phone","phone-code","photoFrame1","pile","pile-fill","pintu","pintu1","pintu2","play","plus","plus-circle","plus-circle-fill","plus-square","plus-square-fill","purchase","qrcode","question","question-circle","question-circle-fill","refresh","remove","renminbi","reply","report","restore","rmb","rmb-circle","rmb-circle-fill","rotate-left","rotate-left1","rotate-right","rotate-right1","save","scenery","schedule","screen-full","screen-narrow","search","search-minus","search-plus","security","security-accidents","security-check","security-education","share","sheji","shezhi","shiyanshiyuyue1","shopcart","shouji1","shouru","sign-out","sign-out-2","sign-out1","sort-down","sort-up","sorting","square","systemSet","taiyang","taocan","tel","test","text","time","tool","total-circle-fill","touxiang","tuijian","tupianyulan","tupianyulan1","upload","upload-cloud","upload-cloud-1","upload-cloud-2","use-registration","user","user-account","user-info1","video","wangzhan","warn","warn-fill","weixin","weixin1","weixin2","word","xiangji","xin","xin1","xing","xing-fill","xingxing-banshixin","xinshenger","yanzhengma","yanzhengma1","yanzhengma2","yinger-nan","yinger-nv","yinger-unknown","yuexing","yulan","yulan1","yunfu","yunfu1","yuyue","yuyuedan","zhichu","zhongyao","zhuti","zhutice","zip","zuhu","zuhu1","zuopin"],Zi=["id"],ye=e.defineComponent({name:"ClIconFont",__name:"Index",props:{id:{},name:{},className:{},size:{},color:{}},setup(n){const l=new Set(Qi),a=n,t=a.id,i=e.computed(()=>{let d={"panel-icon-font":!0};const u=a.name;return o.isNonEmptyString(u)&&(l.has(u)?(d.clIconFont=!0,d[`clIcon-${u}`]=!0):d=o.getJsonMerge(d,de.getClassNameJson(u))),d=o.getJsonMerge(d,de.getClassNameJson(a.className)),d}),r=e.computed(()=>{const d={};return a.size!==void 0&&a.size!==null&&(d["font-size"]=o.isFinite(a.size)?`${a.size}px`:String(a.size)),a.color&&(d.color=a.color),d});return(d,u)=>(e.openBlock(),e.createElementBlock("i",{id:e.unref(t),class:e.normalizeClass(i.value),style:e.normalizeStyle(r.value)},null,14,Zi))}});let nl=500;const Oo=new WeakMap;function es(n,l,a){const t=n.getElementsByClassName("cl-waves-ripple");if(t.length>1)for(let p=0;p<t.length-1;p++){const g=t[p];parseFloat(g.style.opacity||"1")<.3&&g.remove()}const i=document.createElement("span");i.className="cl-waves-ripple";const r=n.getBoundingClientRect(),d=l.clientX-r.left,u=l.clientY-r.top,s=o.isObject(a.value)?a.value:{},c=s.color==="white";i.style.top=`${u}px`,i.style.left=`${d}px`,c&&i.classList.add("waves-light");const m=o.isNumber(s.duration)?s.duration:nl;i.style.transitionDuration=`${m}ms`,n.appendChild(i),requestAnimationFrame(()=>{const p=(r.width/100*3).toFixed(2);i.style.transform=`scale(${p}) translate(0, 0)`,i.style.opacity="1";const g=()=>{i.removeEventListener("transitionend",g),i.parentNode&&i.parentNode.removeChild(i)};i.addEventListener("transitionend",g)})}const _o={mounted(n,l){l.value&&ts(n,l)},unmounted(n){const l=Oo.get(n);l&&(n.removeEventListener("click",l),Oo.delete(n))}};function ts(n,l){n.style.position=n.style.position||"relative",n.style.overflow="hidden";const a=t=>es(n,t,l);Oo.set(n,a),n.addEventListener("click",a)}function ns(n){n?.duration&&(nl=n.duration)}const os="clwaves",as=n=>(ns(n),{deep:!0,mounted:_o.mounted,unmounted:_o.unmounted}),ol={mounted:_o.mounted},al=Object.freeze(Object.defineProperty({__proto__:null,directive:as,name:os,wavesBind:ol},Symbol.toStringTag,{value:"Module"})),ls=["id"],is=["disabled","aria-label"],ss={key:2,class:"btn-label"},rs={key:0,class:"btn-loading"},cs={class:"btn-body-backdrop-container"},us={class:"btn-body-backdrop-text"},Ze=e.defineComponent({name:"ClButton",directives:{clwaves:ol},__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},classBtn:String,label:String,icon:String,iconName:String,color:{type:String,default:"default"},size:{type:String,validator:n=>n===void 0||["large","small","xl"].indexOf(n)!==-1},isShowLoad:{type:Boolean,default:!1},loadPos:{type:String,default:"right",validator:n=>["right","zoom-out","fixedCenter"].indexOf(n)!==-1},loadTheme:{type:String,default:"rotaryLine"},loadColor:String,loadDrift:{type:Boolean,default:!0},loadText:{type:String,default:"加载中"},isShowBackDrop:{type:Boolean,default:!1},teleportTarget:{type:String,default:""},backdropOpacity:{type:Number,default:.02,validator:n=>n>=0&&n<=1},isShowWaves:{type:Boolean,default:!0},wavesColor:{type:String,default:"white"},loadStatusIsIng:{type:[Boolean,null],default:null}},emits:{onClick:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useSlots(),u=e.ref(!1),s=e.ref(!1),c=e.ref(!1),m=e.useTemplateRef("refElBtn"),p=e.useTemplateRef("refElContent"),g=e.ref(!1),v=e.ref("");let y=null,k=!1,F=null;typeof window<"u"&&o.isEmpty(t.label)&&o.isEmpty(t.icon)&&o.isEmpty(t.iconName)&&!d.default&&Se.warn("ClButton","警告:label、icon、iconName 或默认插槽必须传一个值");const B=e.computed(()=>!o.isEmpty(t.label)||!!d.default),I=e.computed(()=>{const X=t.icon||t.iconName;return o.isNonEmptyString(X)?X:""}),A=e.computed(()=>B.value&&t.label||"按钮"),N=e.computed(()=>t.disabled?!0:u.value),x=e.computed(()=>t.loadPos==="fixedCenter"),V=e.computed(()=>t.loadColor||"var(--cl-bg, #ffffff)"),w=e.computed(()=>t.loadColor||v.value),M=e.computed(()=>`rgba(0, 0, 0, ${t.backdropOpacity})`),C=e.computed(()=>{let X=t.wavesColor||"white";return(o.isExistValue(t.color,"white")||o.isExistValue(t.color,"grayLight")||o.isExistValue(t.color,"text"))&&(X="black"),X}),T=e.computed(()=>t.isShowWaves?{color:C.value}:!1),U=e.computed(()=>{let X=t.loadPos||"right";return o.isExistValue(t.classBtn,"btn-circle")&&o.isExistValue(X,"right")&&(X="zoom-out"),X}),Z=e.computed(()=>{let X="";switch(t.loadTheme){case"rotaryLine":X=o.isExistValue(t.classBtn,"btn-circle")?"":"large";break;case"circleNotch":default:X="large";break;case"circleBubble":X="";break}return X}),z=e.computed(()=>{const X={"panel-button":!0};return o.getJsonMerge(X,de.getClassNameJson(t.className))}),H=e.computed(()=>{let X={"btn-parent":!0,btn:!0};return o.isEmpty(t.color)||(X[`btn-${t.color}`]=!0),X=o.getJsonMerge(X,de.getClassNameJson(t.classBtn)),o.isEmpty(t.size)||(X[`btn-${t.size}`]=!0),X["btn-load-ing"]=u.value,u.value&&(X[`btn-load-${U.value}`]=!0,X[`btn-load-${t.loadTheme}`]=!0,X["btn-load-nodrift"]=!t.loadDrift||U.value==="right"&&g.value),X}),S=e.computed(()=>{const X=u.value&&x.value;return{"btn-body-backdrop-main":!0,animated:!0,zoomIn:X,zoomOut:!X}}),E=e.computed(()=>{const X={};return(B.value||I.value)&&U.value==="zoom-out"&&u.value&&!x.value&&(X.opacity=0),X}),f=()=>{i("onClick")},D=()=>{if(o.isExistValue(t.classBtn,"btn-circle"))return 20;switch(t.loadTheme){case"circleNotch":return 24;case"circleBubble":return 30;case"rotaryLine":default:return t.size==="small"?20:30}},h=()=>{if(typeof window>"u"||!m.value)return;const X=m.value.querySelector(".btn-label")||m.value.querySelector(".btn-icon")||m.value,Q=window.getComputedStyle(X).color;o.isEmpty(Q)||(v.value=Q)},b=()=>{if(typeof window>"u"||!m.value||!p.value||u.value)return;const X=m.value,le=p.value.children;if(!le.length){g.value=!0;return}const K=X.getBoundingClientRect(),W=le[le.length-1].getBoundingClientRect(),R=W.right-le[0].getBoundingClientRect().left,ae=K.right-W.right,q=D()+6+5;g.value=ae>=q&&R>0},_=()=>{O(),!(typeof window>"u"||!m.value||!window.ResizeObserver)&&(F=new window.ResizeObserver(()=>{b()}),F.observe(m.value))},O=()=>{F&&(F.disconnect(),F=null)},P=()=>{u.value||(y&&(clearTimeout(y),y=null),t.isShowBackDrop&&(s.value=!0,c.value=!0),u.value=!0)},J=()=>{t.isShowBackDrop&&(x.value?e.nextTick(()=>{k||(y=setTimeout(()=>{k||(s.value=!1,c.value=!1,y=null)},200))}):s.value=!1),u.value=!1};e.onMounted(()=>{e.nextTick(()=>{h(),b(),_()})}),e.onBeforeUnmount(()=>{k=!0,O(),y&&(clearTimeout(y),y=null)}),e.watch(()=>[t.label,t.icon,t.iconName,t.size,t.loadTheme,t.classBtn,t.loadDrift,t.color],()=>{e.nextTick(()=>{h(),b()})}),e.watch(()=>t.loadStatusIsIng,X=>{o.isBoolean(X)&&(X?P():J())},{immediate:!0});const Y=()=>{t.disabled||(t.isShowLoad&&P(),f())};return l({loadStart:()=>{P()},loadStop:()=>{J()}}),(X,Q)=>{const le=e.resolveDirective("clwaves");return e.openBlock(),e.createElementBlock("span",{id:e.unref(r),class:e.normalizeClass(z.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(H.value),disabled:N.value,"aria-label":A.value,ref_key:"refElBtn",ref:m,onClick:Y},[e.createElementVNode("span",{style:e.normalizeStyle(E.value),ref_key:"refElContent",ref:p},[I.value?(e.openBlock(),e.createBlock(ye,{key:0,name:I.value,className:"btn-icon"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),B.value?(e.openBlock(),e.createElementBlock("span",ss,[e.renderSlot(X.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),u.value&&!x.value?(e.openBlock(),e.createElementBlock("span",rs,[e.createVNode(rt,{theme:n.loadTheme,size:Z.value,color:w.value},null,8,["theme","size","color"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,is)),[[le,T.value]]),s.value?(e.openBlock(),e.createBlock(At,{key:0,show:s.value,zIndex:1000001,duration:0,isLockScroll:!1,background:M.value,teleportTarget:n.teleportTarget},{default:e.withCtx(()=>[x.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(S.value)},[e.createElementVNode("div",cs,[e.createVNode(rt,{theme:n.loadTheme,size:Z.value,color:V.value},null,8,["theme","size","color"]),e.createElementVNode("div",us,e.toDisplayString(n.loadText||"加载中"),1)])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["show","background","teleportTarget"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,ls)}}}),ds=["id"],ms={key:0,class:"callout-title"},ps={class:"callout-content"},ll=e.defineComponent({name:"ClCallout",__name:"Index",props:{id:String,className:String,type:{type:String,default:"info"},title:String},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-callout":!0,[`callout-${l.type||"info"}`]:!0},de.getClassNameJson(l.className)));return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(a),role:"note"},[n.title?(e.openBlock(),e.createElementBlock("div",ms,e.toDisplayString(n.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",ps,[e.renderSlot(i.$slots,"default")])],10,ds))}}),fs=["id"],hs={key:0,class:"card-head"},gs={key:0,class:"card-head-flex"},vs={class:"card-title"},ys={key:1,class:"card-title"},ks={key:2,class:"card-explain"},Ss={key:2,class:"card-footer"},zo=e.defineComponent({name:"ClCard",__name:"Index",props:{id:String,className:String,classBody:String,theme:{type:String,default:"default"},isInnerPadZero:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>({"panel-card":!0,"card-box":!0,...de.getClassNameJson(l.className),[`card-${l.theme||"default"}`]:!0})),i=e.computed(()=>({"card-body":!0,"card-body-padding-0":l.isInnerPadZero,...de.getClassNameJson(l.classBody)}));return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(a)},[r.$slots.headTitle||r.$slots.headExplain||r.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",hs,[r.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("div",vs,[e.renderSlot(r.$slots,"headTitle")]),e.renderSlot(r.$slots,"headFlex")])):(e.openBlock(),e.createElementBlock("div",ys,[e.renderSlot(r.$slots,"headTitle")])),r.$slots.headExplain?(e.openBlock(),e.createElementBlock("div",ks,[e.renderSlot(r.$slots,"headExplain")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.renderSlot(r.$slots,"default")],2),r.$slots.foot?(e.openBlock(),e.createElementBlock("div",Ss,[e.renderSlot(r.$slots,"foot")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,fs))}}),ws=["id"],il=e.defineComponent({name:"ClCardColor",__name:"Index",props:{id:String,className:String,classBody:String,color:{type:String,default:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"},isInnerPadZero:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const d={"card-color":!0};return o.getJsonMerge(d,de.getClassNameJson(l.className))}),i=e.computed(()=>({"card-color-body":!0,"card-color-body--pad-zero":l.isInnerPadZero,...de.getClassNameJson(l.classBody)})),r=e.computed(()=>({backgroundColor:o.isNonEmptyString(l.color)?l.color:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"}));return(d,u)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value),style:e.normalizeStyle(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.renderSlot(d.$slots,"default")],2)],14,ws))}}),Ve={positions:{top:"top",topLeft:"top-start",topRight:"top-end",right:"right",rightTop:"right-start",rightBottom:"right-end",bottom:"bottom",bottomLeft:"bottom-start",bottomRight:"bottom-end",left:"left",leftTop:"left-start",leftBottom:"left-end"},triggers:["hover","click","focus"],themes:["white","black"],options:{position:"top",trigger:"hover",theme:"white",template:"<div class='tooltip'><div class='tooltip-inner'></div><div class='arrow' data-popper-arrow></div></div>",selectorBody:".tooltip-inner",selectorArrow:".arrow",isHtml:!0,isRunTrigger:!0,isFixedVisible:!1,isStopPropagation:!0,className:""},bind:(n,l)=>{Ve.create(n,l)},create:(n,l)=>{if(o.isObject(l)&&!o.isUndefined(l.value)&&Ve.getIsInit(l)){const t=Ve._getValueHtml(l.value);if(!o.isEmpty(t)){const i=Ve.getOptions();i.contentBody=t,i.placement=Ve.getPosition(l),i.trigger=Ve.getTrigger(l),i.theme=Ve.getTheme(l),i.isHtml=Ve.getIsHtml(l),i.isFixedVisible=Ve.getFixedVisible(l),i.isStopPropagation=Ve.getStopPropagation(l),i.className=Ve.getClassName(l);try{const r=new Fi(n,i);r._vueEl=n,n._tooltip=r}catch{}}}},getIsInit:n=>o.isObject(n.value)&&o.isBoolean(n.value.init)?n.value.init:!0,getOptions:()=>o.getJsonClone(Ve.options),_getValueHtml:n=>{let l="";switch(o.getTypeof(n)){case"string":case"number":l=n.toString();break;case"object":o.isEmpty(n.html)||(l=n.html);break;default:l=""}return l},getPosition:n=>{let l=o.isObject(n.value)?n.value.position:"";if(o.isEmpty(l))for(const[a,t]of Object.entries(Ve.positions))n.modifiers[a]&&(l=t);else o.isExistJsonKey(Ve.positions,l)&&(l=Ve.positions[l]);return o.isEmpty(l)?Ve.options.position:l},getTrigger:n=>{let l=o.isObject(n.value)?n.value.trigger:"";return o.isEmpty(l)&&Ve.triggers.forEach(a=>{n.modifiers[a]&&(l=a)}),o.isEmpty(l)?Ve.options.trigger:l},getTheme:n=>{let l=o.isObject(n.value)?n.value.theme:"";return o.isEmpty(l)&&Ve.themes.forEach(a=>{n.modifiers[a]&&(l=a)}),o.isEmpty(l)?Ve.options.theme:l},getIsHtml:n=>{const l=o.isObject(n.value)?n.value.isHtml:!0;return o.isBoolean(l)?l:Ve.options.isHtml},getIsRunTrigger:n=>o.isObject(n)&&o.isBoolean(n.isRunTrigger)?n.isRunTrigger:!0,getFixedVisible:n=>{const l=o.isObject(n.value)?n.value.isFixedVisible:!1;return o.isBoolean(l)?l:Ve.options.isFixedVisible},getStopPropagation:n=>{const l=o.isObject(n.value)?n.value.isStopPropagation:!1;return o.isBoolean(l)?l:Ve.options.isStopPropagation},getClassName:n=>{const l=o.isObject(n.value)?n.value.className:"";return o.isEmpty(l)?Ve.options.className:l},update:(n,l)=>{const a=Ve.getIsInit(l);if(a){!n._tooltip&&a&&Ve.create(n,l);const t=Ve._getValueHtml(l.value),i=Ve._getValueHtml(l.oldValue),r=o.isObject(l.value);let d=!1;if(t!==i)d=!0;else if(r&&!o.isUndefined(l.value.updRefreshInx)){const u=l.value.updRefreshInx,s=l.oldValue.updRefreshInx;u!==s&&(d=!0)}if(n._tooltip){d&&n._tooltip.clSetContentBody(t),n._tooltip.clSetInitShow(a);const u=Ve.getIsRunTrigger(l.value),s=Ve.getIsRunTrigger(l.oldValue);(!u||!a)&&n._tooltip.clHide(),u!==s&&n._tooltip.clSetRunTrigger(u)}}else Ve.destroy(n)},destroy:n=>{n._tooltip&&(n._tooltip.clDispose(),delete n._tooltip)},show:n=>{n._tooltip&&n._tooltip.clShow()},hide:n=>{n._tooltip&&n._tooltip.clHide()}},Cs="clTooltip",Es=()=>({deep:!0,mounted:Ve.bind,updated:Ve.update,unmounted:Ve.destroy}),ut={mounted:Ve.bind,updated:Ve.update},Ao={show:Ve.show,hide:Ve.hide},sl=Object.freeze(Object.defineProperty({__proto__:null,directive:Es,name:Cs,tooltipCommon:Ao,tooltipDirectives:ut},Symbol.toStringTag,{value:"Module"})),bs=["id"],xs={key:0,class:"cl-plaintext-value"},Bs=["id","name","value","disabled","checked","onClick"],Is=["for"],Ds={key:0},Jo=e.defineComponent({name:"ClCheckbox",directives:{cltooltip:ut},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:String,required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},circle:{type:Boolean,default:!1},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`checkbox-${o.getRandom(5)}`,d=o.isEmpty(t.name)?r+"_name":t.name,u=t.id,s=e.ref(o.split(t.value)),c=e.ref(!1);let m={};const p=e.ref(0),g={isProcessing:!1,_initEmitted:!1},v=e.computed(()=>{if(t.isPlaintext)return[];const E=t.list;return o.isArray(E)?E.filter(f=>!o.isEmpty(f)):[]}),y=e.computed(()=>{const E=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,p.value;const f=[];return s.value.forEach(D=>{const h=o.isExistJsonKey(m,D)?m[D]:void 0;h&&o.isNonEmptyString(h.name)&&f.push(h.name)}),f.join(E)}),k=e.computed(()=>o.getJsonMerge({"panel-checkbox":!0},de.getClassNameJson(t.className))),F=e.computed(()=>{const E={checkbox:!0,"checkbox-default":!0};return E["checkbox-inline"]=t.isInline,E["checkbox-circle"]=t.circle,E}),B=E=>{const f={},{width:D}=t;return E&&!o.isEmpty(E.width)?f.width=E.width:o.isEmpty(D)||(f.width=t.width),f},I=E=>{i("update:value",E),i("update:modelValue",E)},A=E=>{const f=[];o.isEmpty(E)||o.split(E).forEach(h=>{o.isExistJsonKey(m,h)&&f.push(o.getJsonClone(m[h]))});const D=f.length>0&&f.length===(t.list?.length??0);I(E),i("onChange",E,f,D)},N=()=>{g._initEmitted||(g._initEmitted=!0,e.nextTick(()=>{i("onInit")}))},x=()=>{const E=[];return s.value.forEach(f=>{o.isExistJsonKey(m,f)&&E.push(f)}),E},V=E=>{m=o.isEmpty(E)?{}:o.getJsonByList(E),p.value+=1},w=()=>{if(c.value&&!o.isEmpty(s.value)){const E=x();o.isEqualArr(s.value,E)||(s.value=E,I(E.join(",")))}},M=E=>{const f=o.split(E);let D=o.isEqualArr(s.value,f);D&&(D=E===s.value.join(",")),D||(s.value=f)},C=()=>{c.value=(t.list?.length??0)!==0,V(t.list),w()};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.watch(c,E=>{E&&N()}),e.watch(()=>t.list,E=>{c.value||(c.value=!0,E.length===0&&w(),N())}),e.watch([()=>t.value,()=>t.list],([E,f])=>{const D=f;!c.value&&D.length>0&&(c.value=!0,N()),V(D),M(E),w()});const T=E=>{i("onTipClick",E)},U=async E=>{if(!(!E||E.isDisabled||t.disabled||g.isProcessing)&&!o.isEmpty(E.id)){g.isProcessing=!0;try{const f=String(E.id??"");let D=o.getArrClone(s.value);o.isExistValue(s.value,f)?D=o.getArrRemoveById(D,f):D.push(f);const h=D.join(",");let b=!0;if(t.checkChangeBefore)try{b=await t.checkChangeBefore(h),b=o.isBoolean(b)?b:!0}catch{b=!1}if(t.disabled||E.isDisabled)return;b&&(s.value=D,A(h))}catch(f){i("onError",f)}finally{g.isProcessing=!1}}};return l({getValue:()=>x().join(","),getValueData:()=>{const E=[];return s.value.forEach(f=>{o.isExistJsonKey(m,f)&&E.push(o.getJsonClone(m[f]))}),E},setValue:E=>{g.isProcessing||(M(E),w())},runInitComplete:()=>{c.value||(c.value=!0,V(t.list),M(t.value),w(),N())}}),(E,f)=>{const D=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",xs,e.toDisplayString(y.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${r}-${h.id??""}-${b}`},[h.isShow||h.isShow===void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(F.value),style:e.normalizeStyle(B(h))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:`${r}_${e.unref(d)}_${h.id??""}`,name:e.unref(d),value:h.id??"",disabled:h.isDisabled||n.disabled,checked:s.value.includes(String(h.id??"")),onClick:_=>U(h)},null,8,Bs),e.createElementVNode("label",{for:`${r}_${e.unref(d)}_${h.id??""}`},[e.renderSlot(E.$slots,"default",{data:h},()=>[h.icon&&h.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Ds,[e.createVNode(ye,{name:h.icon},null,8,["name"])])),[[D,{html:h.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(h.name),1)],64))])],8,Is)]),h.tipMsg&&h.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:e.unref(o).isNonEmptyString(h.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(h.tipIcon)?h.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[D,{html:h.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ye,{key:1,name:e.unref(o).isNonEmptyString(h.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(h.tipIcon)?h.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(_=>T(h),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,bs)}}}),Ts=["id"],Ns=["id","name","checked","disabled"],Vs=["for"],Ms={key:0},mt=e.defineComponent({name:"ClCheckboxOne",directives:{cltooltip:ut},__name:"One",props:{id:{},name:{},value:{type:Boolean},className:{},forId:{},label:{},disabled:{type:Boolean},circle:{type:Boolean},indeterminate:{type:Boolean},icon:{},tipMsg:{},tipIcon:{},tipMode:{}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onTipClick:()=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=o.isEmpty(a.forId)?`cb_${a.name||""}_${o.getRandom(8)}`:a.forId,d=e.computed(()=>{const p={checkbox:!0,"checkbox-default":!0,"checkbox-inline":!0};return a.circle&&(p["checkbox-circle"]=!0),o.getJsonMerge(p,de.getClassNameJson(a.className))}),u=e.computed(()=>({indeterminate:a.indeterminate})),s=(p,g)=>{t("update:value",g),t("update:modelValue",g),t("onChange",{event:p,value:g})},c=()=>{t("onTipClick")},m=p=>{s(p,p.currentTarget.checked)};return(p,g)=>{const v=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),id:e.unref(i)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:e.unref(r),name:n.name,class:e.normalizeClass(u.value),checked:n.value,disabled:n.disabled,onClick:m},null,10,Ns),e.createElementVNode("label",{for:e.unref(r)},[n.icon?e.withDirectives((e.openBlock(),e.createElementBlock("span",Ms,[e.createVNode(ye,{name:n.icon},null,8,["name"])])),[[v,{html:n.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.label),1)],64))],8,Vs)]),n.tipMsg?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[v,{html:n.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ye,{key:1,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(c,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,Ts)}}}),Os=()=>typeof window<"u";let kt=null;const _s=()=>(kt||(kt=document.createElement("textarea"),kt.setAttribute("readonly",""),kt.style.position="fixed",kt.style.left="-9999px",kt.style.top="-9999px",kt.style.opacity="0",document.body.appendChild(kt)),kt),As=n=>typeof n=="function"?n():n,Ea=(n,l)=>{try{const a=_s();a.value=n,a.select(),a.setSelectionRange(0,99999),document.execCommand("copy")?l.successCallback?.():l.errorCallback?.(n)}catch{l.errorCallback?.(n)}finally{window.getSelection()?.removeAllRanges()}},Ls=n=>{const l=typeof n=="string"?{text:n}:n;if(!Os()){l.errorCallback?.();return}let a;try{a=As(l.text)}catch{l.errorCallback?.();return}if(!a){l.errorCallback?.();return}if(navigator.clipboard?.writeText){navigator.clipboard.writeText(a).then(()=>l.successCallback?.()).catch(()=>Ea(a,l));return}Ea(a,l)},Ko=()=>({copy:Ls}),$s=["id","onKeydown"],Fs={class:"clipboard-btn"},Ps={key:0,class:"clipboard-operate-result"},hn=e.defineComponent({name:"ClClipboard",__name:"Index",props:{id:String,className:String,iconColorClass:String,isUseSuccess:{type:Boolean,default:!0},textLabel:{type:[String,Function],required:!0}},emits:{onCopySuccess:()=>!0,onCopyError:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.reactive({isHover:!1,isShowSuccess:!1});let d=null,u=!1;const s=e.computed(()=>{let v={"panel-clipboard":!0};return v=o.getJsonMerge(v,de.getClassNameJson(a.className)),v}),c=()=>{d=Ko()};e.onMounted(()=>{e.nextTick(()=>{c()})});const m=()=>{if(u)return;let v="";const{textLabel:y}=a;if(y)switch(typeof y){case"function":try{v=y()}catch{v="",t("onCopyError","复制失败 textLabel()")}break;case"string":v=y;break;default:v="";break}o.isEmpty(v)||!d||(u=!0,d.copy({text:v,successCallback:()=>{r.isShowSuccess=!0,t("onCopySuccess"),u=!1},errorCallback:()=>{r.isShowSuccess=!1,t("onCopyError",v),u=!1}}))},p=()=>{r.isHover=!0},g=()=>{r.isShowSuccess=!1,r.isHover=!1};return(v,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),id:e.unref(i),tabindex:"0",role:"button","aria-label":"复制",onMouseenter:p,onMouseleave:g,onClick:e.withModifiers(m,["stop"]),onKeydown:[e.withKeys(e.withModifiers(m,["prevent"]),["enter"]),e.withKeys(e.withModifiers(m,["prevent"]),["space"])]},[e.createElementVNode("div",Fs,[e.renderSlot(v.$slots,"default",{},()=>[e.createVNode(ye,{name:"copy",className:a.iconColorClass},null,8,["className"])])]),n.isUseSuccess&&r.isHover&&r.isShowSuccess?(e.openBlock(),e.createElementBlock("div",Ps,[e.createVNode(ye,{name:"check1"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],42,$s))}}),gn=e.defineComponent({name:"ClTransitionSlideUpDown",__name:"SlideUpDown",setup(n){const l=e.reactive({oldPaddingTop:"",oldPaddingBottom:"",oldOverflow:""}),a=(c,m)=>{const p=function(){m(),c.removeEventListener("transitionend",p,!1),c.removeEventListener("transitioncancel",p,!1)};c.addEventListener("transitionend",p,!1),c.addEventListener("transitioncancel",p,!1)},t=c=>{const m=c;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.paddingTop="0",m.style.paddingBottom="0",m.style.maxHeight="0"},i=(c,m)=>{const p=c,g=p.scrollHeight;if(g>0?p.style.maxHeight=g+"px":p.style.maxHeight="0",p.style.paddingTop=l.oldPaddingTop,p.style.paddingBottom=l.oldPaddingBottom,g===0&&!l.oldPaddingTop&&!l.oldPaddingBottom){m();return}p.style.overflow="hidden",a(c,m)},r=c=>{const m=c;m.style.maxHeight="",m.style.overflow=l.oldOverflow},d=c=>{const m=c;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.maxHeight=m.scrollHeight+"px",m.style.overflow="hidden"},u=(c,m)=>{const p=c;if(p.scrollHeight!==0)p.style.maxHeight="0",p.style.paddingBottom="0",p.style.paddingTop="0";else{m();return}a(c,m)},s=c=>{const m=c;m.style.maxHeight="",m.style.overflow=l.oldOverflow,m.style.paddingBottom=l.oldPaddingBottom,m.style.paddingTop=l.oldPaddingTop,l.oldOverflow=l.oldPaddingBottom=l.oldPaddingTop=""};return(c,m)=>(e.openBlock(),e.createBlock(e.Transition,{name:"clSlideUpDown",onBeforeEnter:t,onEnter:i,onAfterEnter:r,onBeforeLeave:d,onLeave:u,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3}))}}),Rs=["id"],Hs=["tabindex","role","aria-expanded"],Us={class:"collapse-title"},zs=["tabindex","role","aria-expanded","aria-label","onKeydown"],Js={key:0,class:"collapse-body"},Ks=300,Ws=50,rl=e.defineComponent({name:"ClCollapse",__name:"Index",props:{id:String,className:String,isOperate:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!0},isCollapseOnTitle:{type:Boolean,default:!1},isDestroyOnCollapse:{type:Boolean,default:!1}},emits:{onCollapse:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`collapse-${o.getRandom(8)}`,r=e.reactive({isExpanded:o.isBoolean(a.isExpanded)?a.isExpanded:!0,isAnimating:!1});let d=null;const u=Ks+Ws,s=e.computed(()=>o.isBoolean(a.isCollapseOnTitle)?a.isCollapseOnTitle:!1),c=e.computed(()=>o.isNonEmptyString(a.id)?a.id:i),m=e.computed(()=>o.getJsonMerge({"panel-collapse":!0},de.getClassNameJson(a.className))),p=e.computed(()=>({"collapse-operate":!0,"icon-rotate":!0,"rotate-180":!r.isExpanded})),g=e.computed(()=>({"collapse-head":!0,"collapse-head-clickable":s.value})),v=()=>{d!==null&&(clearTimeout(d),d=null)};e.onUnmounted(()=>{v()}),e.watch(()=>a.isExpanded,B=>{const I=o.isBoolean(B)?B:!0;r.isExpanded!==I&&(v(),r.isAnimating=!1,r.isExpanded=I)});const y=()=>{r.isAnimating||(r.isAnimating=!0,r.isExpanded=!r.isExpanded,v(),d=setTimeout(()=>{d=null,r.isAnimating=!1},u),t("onCollapse",r.isExpanded))},k=B=>{if(!s.value)return;const I=B.target;I instanceof Element&&(I.closest(".collapse-operate")||(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),y()))},F=B=>{if(!s.value)return;const I=B.target;I instanceof Element&&(I.closest(".collapse-operate")||y())};return(B,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(m.value),id:c.value},[e.createElementVNode("div",{class:e.normalizeClass(g.value),tabindex:s.value?0:void 0,role:s.value?"button":void 0,"aria-expanded":s.value?r.isExpanded:void 0,onClick:F,onKeydown:k},[e.createElementVNode("div",Us,[e.renderSlot(B.$slots,"title")]),e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(p.value),tabindex:s.value?-1:0,role:s.value?void 0:"button","aria-expanded":s.value?void 0:r.isExpanded,"aria-label":s.value?void 0:r.isExpanded?"折叠":"展开",onClick:y,onKeydown:[e.withKeys(e.withModifiers(y,["prevent"]),["enter"]),e.withKeys(e.withModifiers(y,["prevent"]),["space"])]},[e.createVNode(ye,{name:"angle-down"})],42,zs),[[e.vShow,e.unref(o).isBoolean(n.isOperate)?n.isOperate:!0]])],42,Hs),e.createVNode(gn,null,{default:e.withCtx(()=>[!n.isDestroyOnCollapse||r.isExpanded?e.withDirectives((e.openBlock(),e.createElementBlock("div",Js,[e.renderSlot(B.$slots,"default")],512)),[[e.vShow,r.isExpanded]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3})],10,Rs))}}),js=["id"],Ys={key:1,class:"countdown-num"},ba=864e5,xa=36e5,Ba=6e4,qs=100,Xs=1e3,cl=e.defineComponent({name:"ClCountDown",__name:"Index",props:{id:String,className:String,time:{type:Number,default:0},format:{type:String,default:"HH:mm:ss"},isAutoStart:{type:Boolean,default:!0},isMillisecond:{type:Boolean,default:!1}},emits:["onChange","onFinish"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`countdown-${o.getRandom(5)}`,d=t.id,u=e.ref(0);let s=null,c=0,m=!1;const p=e.computed(()=>t.isMillisecond?qs:Xs),g=e.computed(()=>{const M=Math.max(0,u.value),C=Math.floor(M/ba),T=Math.floor(M%ba/xa),U=Math.floor(M%xa/Ba),Z=Math.floor(M%Ba/1e3),z=M%1e3,H={DD:String(C).padStart(2,"0"),HH:String(T).padStart(2,"0"),mm:String(U).padStart(2,"0"),ss:String(Z).padStart(2,"0"),SSS:String(z).padStart(3,"0")},S=[],E=t.isMillisecond?/(DD|HH|mm|ss|SSS)/g:/(DD|HH|mm|ss)/g;let f=0,D;for(;(D=E.exec(t.format))!==null;){if(D.index>f){const h=t.format.slice(f,D.index);S.push({type:y(h)?"sep":"text",value:h})}S.push({type:"num",value:H[D[0]]||D[0]}),f=D.index+D[0].length}if(f<t.format.length){const h=t.format.slice(f);S.push({type:y(h)?"sep":"text",value:h})}return S}),v=e.computed(()=>{const M={"panel-count-down":!0};return o.getJsonMerge(M,de.getClassNameJson(t.className))}),y=M=>{const C=M.trim();return C?/^[\p{P}\p{S}]+$/u.test(C):!1},k=()=>{const M=Number(t.time);return o.isFinite(M)&&M>0?M:0},F=M=>{u.value=Math.max(0,M),c=Date.now()+Math.max(0,M),m=!0,A(),s=setInterval(A,p.value)},B=()=>{if(m)return;const M=k();if(M<=0){u.value=0,i("onFinish");return}F(M)},I=()=>{if(!m){if(u.value<=0){B();return}F(u.value)}},A=()=>{const M=Math.max(0,c-Date.now());u.value=M,i("onChange",M),M<=0&&(N(),i("onFinish"))},N=()=>{s&&(clearInterval(s),s=null),m=!1};return e.onMounted(()=>{t.isAutoStart?B():u.value=k()}),e.onBeforeUnmount(()=>{N()}),e.watch(()=>t.time,()=>{N(),u.value=k(),t.isAutoStart&&u.value>0&&F(u.value)}),e.watch(()=>t.isAutoStart,M=>{M&&!m&&u.value>0&&F(u.value)}),e.watch(p,()=>{m&&(s&&clearInterval(s),s=setInterval(A,p.value))}),l({start:()=>{I()},pause:()=>{N()},reset:()=>{N(),u.value=k()}}),(M,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(v.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(T,U)=>(e.openBlock(),e.createElementBlock("span",{key:`${r}-${U}`,class:e.normalizeClass(["countdown-part",{"countdown-sep":T.type==="sep"}])},[T.type!=="num"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(T.value),1)],64)):(e.openBlock(),e.createElementBlock("span",Ys,e.toDisplayString(T.value),1))],2))),128))],10,js))}});/**!
1
+ "use strict";var Vi=Object.create;var wa=Object.defineProperty;var Mi=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var _i=Object.getPrototypeOf,Ai=Object.prototype.hasOwnProperty;var Li=(n,l,a,t)=>{if(l&&typeof l=="object"||typeof l=="function")for(let i of Oi(l))!Ai.call(n,i)&&i!==a&&wa(n,i,{get:()=>l[i],enumerable:!(t=Mi(l,i))||t.enumerable});return n};var en=(n,l,a)=>(a=n!=null?Vi(_i(n)):{},Li(l||!n||!n.__esModule?wa(a,"default",{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),we=require("@cldemo/ui-kit/common/log"),o=require("@cldemo/ui-kit/common/base"),me=require("@cldemo/ui-kit/common/Element"),Je=require("@cldemo/ui-kit/common/globalConfig"),at=require("@cldemo/ui-kit/common/i18n"),$i=require("@cldemo/ui-kit/common/i18n/a11y"),Ye=require("@cldemo/ui-kit/common/Element/Event"),Fi=require("@cldemo/ui-kit/common/tooltip"),Pi=require("@cldemo/ui-kit/common/promise"),Za=require("@cldemo/ui-kit/common/Tools"),qe=require("@cldemo/ui-kit/common/day"),Me=require("dayjs"),Ri=require("@cldemo/ui-kit/common/echart"),Hi=["id"],qt=e.defineComponent({name:"ClBadge",__name:"Index",props:{id:String,className:String,num:[String,Number],color:{type:String,default:"default"},colorSty:String,maxNum:{type:Number,default:-1},isHideZero:{type:Boolean,default:!0},isDot:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=()=>{let u="";if(!o.isEmpty(l.num)){const s=Number(l.num);o.isFinite(s)?s===0&&l.isHideZero?u="":s>l.maxNum&&l.maxNum>0?u=`${l.maxNum}+`:u=s.toString():u=""}return u},i=e.computed(()=>t()),r=e.computed(()=>{let u={badge:!0};return!o.isEmpty(l.color)&&o.isEmpty(l.colorSty)&&(u[`bg-${l.color}`]=!0),u=o.getJsonMerge(u,me.getClassNameJson(l.className)),l.isDot&&o.isEmpty(t())&&(u["badge-dot"]=!0),u}),d=e.computed(()=>{const u={};return l.colorSty&&!o.isEmpty(l.colorSty)&&(u["background-color"]=l.colorSty),u});return(u,s)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(a),class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value),role:"status"},e.toDisplayString(i.value),15,Hi))}});at.initMerge({packageData:$i});const Ui="locale",zi="zh_cn";function Ea(){const n=Je.getGlobalConfig(Ui);if(typeof n=="string"&&n.length>0)return n;const l=at.getType();if(typeof l=="string"&&l.length>0)return l;if(l&&typeof l=="object"&&"type"in l){const a=l.type;if(typeof a=="string"&&a.length>0)return a}return zi}function el(){const n=e.ref(Ea());return e.watch(Ea,l=>{n.value=l}),{optLocale:n}}function Uo(){const{optLocale:n}=el(),l=e.ref({}),a=()=>{const t=at.getCommon()||{},i={};Object.keys(t).forEach(r=>{const d=t[r];typeof d=="string"&&(i[r]=d)}),l.value=i};return a(),e.watch(n,a),{optA11yText:l}}const Le=()=>{const n=e.ref({}),{optLocale:l}=el(),a=s=>{n.value=at.getPage(s)};let t="";const i=s=>{t=s,a(s)};return e.watch(l,()=>{t&&a(t)}),{optPageLanguage:n,optLocale:l,getPageLanguage:i,getLanguageValue:s=>at.getValue(s),getLanguageType:()=>at.getType(),getCommonText:(s,c)=>{const m=at.getValue(`common.${s}`);return typeof m=="string"&&m.length>0?m:c}}},Ji=["id","aria-label"],Ki=["onClick"],Wi={key:1},ji={class:"breadcrumb-item"},tl=e.defineComponent({name:"ClBreadcrumb",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:{onClickUrl:(n,l)=>!0},setup(n,{emit:l}){const{optA11yText:a}=Uo(),t=n,i=l,r=`breadcrumb-${o.getRandom(5)}`,d=t.id,u=e.computed(()=>{const g={"panel-breadcrumb":!0};return o.getJsonMerge(g,me.getClassNameJson(t.className))}),s=e.computed(()=>!Array.isArray(t.list)||o.isEmpty(t.list)?[]:t.list.slice(0,-1).filter(Boolean)),c=e.computed(()=>{if(!Array.isArray(t.list)||o.isEmpty(t.list))return"";const g=t.list[t.list.length-1];return o.isEmpty(t.title)?g?.name??"":t.title}),m=g=>!o.isEmpty(g),p=(g,h)=>{i("onClickUrl",g,h)};return(g,h)=>{const y=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("ol",{id:e.unref(d),class:e.normalizeClass(u.value),"aria-label":e.unref(a).breadcrumb||"面包屑导航"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(E,L)=>(e.openBlock(),e.createElementBlock("li",{class:"breadcrumb-item",key:`${r}-${L}`},[m(E.href)?(e.openBlock(),e.createBlock(y,{key:0,to:E.href},{default:e.withCtx(()=>[e.createElementVNode("span",{onClick:B=>p(E,B)},e.toDisplayString(E.name??""),9,Ki)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",Wi,e.toDisplayString(E.name??""),1))]))),128)),e.createElementVNode("li",ji,[e.createElementVNode("span",null,e.toDisplayString(c.value),1)])],10,Ji)}}}),Yi=["id","aria-label"],ct=e.defineComponent({name:"ClLoad",__name:"Index",props:{id:String,className:String,theme:{type:String,default:"rotaryLine",validator:n=>["rotaryLine","circleNotch","circleBubble","ballColor4","dotTyping","dotWave","dotBounce","dotPulse","dotOrbit","dotFlow","dotSlide","dotSlider","dotFold","dotSquare","barEqualizer","barWave","barPulse","barStretch","barMeter","barBounce","barRamp","ringRotate","ringDot","ringPulse","ringClip","ringFan","circleSpinner","dotRipple","dotRipple3","ringCross","squareTrace","squareTrace2","crossMove","snakePath","squareMirror","dotPulse5","diamondShuttle","barStream","newtonCradle","dotSpin","orbitSwap","typingBounce","ringGlow","toastRing"].indexOf(n)!==-1},size:{type:String,default:"small",validator:n=>["xxl","xl","large","small","xs"].indexOf(n)!==-1},color:{type:String,default:""}},setup(n){const{optA11yText:l}=Uo(),a=n,t=a.id,i={rotaryLine:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RotaryLine-Cy2T8bHV.cjs"))),circleNotch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleNotch-CAU_ywNn.cjs"))),circleBubble:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleBubble-C0rZgQXq.cjs"))),ballColor4:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BallColor4-CYX2eI-j.cjs"))),dotTyping:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotTyping-ByFKmTv5.cjs"))),dotWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotWave-CagHEG1I.cjs"))),dotBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotBounce-C7LYp77Z.cjs"))),dotPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse-C4V4OIco.cjs"))),dotOrbit:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotOrbit-B7NaedQS.cjs"))),dotFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFlow-Dtn_yDPy.cjs"))),dotSlide:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlide-DN4VEjQJ.cjs"))),dotSlider:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSlider-CBORUo56.cjs"))),dotFold:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotFold-eCvY26nk.cjs"))),dotSquare:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSquare-BLU64iXy.cjs"))),barEqualizer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarEqualizer-CSmPfckO.cjs"))),barWave:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarWave-RhfBvsx_.cjs"))),barPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarPulse-CGTRpoDg.cjs"))),barStretch:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStretch-x5XcsNjn.cjs"))),barMeter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarMeter-DOYYJBe3.cjs"))),barBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarBounce-BU0gnsJy.cjs"))),barRamp:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarRamp-j0BcyAi0.cjs"))),ringRotate:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingRotate-BPvmZEbJ.cjs"))),ringDot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingDot-D95FkF10.cjs"))),ringPulse:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingPulse-BanyDtHv.cjs"))),ringClip:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingClip-Bk97t-3A.cjs"))),ringFan:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingFan-D8Co3b0E.cjs"))),dotRipple:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple-Br1zlAt1.cjs"))),circleSpinner:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CircleSpinner-Y54L_MEc.cjs"))),dotRipple3:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotRipple3-DIDhH-NZ.cjs"))),ringCross:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingCross-BX9sj6um.cjs"))),squareTrace:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace-D1LY0duS.cjs"))),squareTrace2:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareTrace2-CXnO0uiD.cjs"))),crossMove:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./CrossMove-BVaKs_SF.cjs"))),snakePath:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SnakePath-DGXHMRVN.cjs"))),squareMirror:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SquareMirror-DGJtQUJk.cjs"))),dotPulse5:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotPulse5-Dh-Ce1VK.cjs"))),diamondShuttle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DiamondShuttle-Dnoe79T3.cjs"))),barStream:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BarStream-ImPjB2Xq.cjs"))),newtonCradle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./NewtonCradle-b4EnbPSk.cjs"))),dotSpin:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DotSpin-Bb7nsZf4.cjs"))),orbitSwap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./OrbitSwap-3g265TzL.cjs"))),typingBounce:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TypingBounce-BHeUrBAT.cjs"))),ringGlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./RingGlow-DgaBYZgf.cjs"))),toastRing:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ToastRing-BtQqdv7a.cjs")))},r=new Set(["ballColor4","diamondShuttle","orbitSwap","ringGlow"]),d=e.computed(()=>a.theme||"rotaryLine"),u=e.computed(()=>i[d.value]||null),s=e.computed(()=>a.size==="large"),c=e.computed(()=>a.size==="xl"),m=e.computed(()=>a.size==="xxl"),p=e.computed(()=>a.size==="xs"),g=e.computed(()=>{const y=a.color||"";return y?r.has(d.value)?y:o.isString(y)?y.split("|")[0].trim():"":""}),h=e.computed(()=>o.getJsonMerge({"panel-load":!0,"size-large":s.value,"size-xl":c.value,"size-xxl":m.value,"size-xs":p.value},me.getClassNameJson(a.className)));return(y,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(h.value),id:e.unref(t),role:"status","aria-label":e.unref(l).loading||"加载中"},[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,color:g.value,size:n.size},null,8,["color","size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Yi))}}),Pn=new Map;function qi(n){if(!n)return;const l=Pn.get(n);if(l){l.count+=1;return}Pn.set(n,{count:1,overflow:n.style.overflow,className:n.className}),n.style.overflow="hidden",/\bmodal-open\b/.test(n.className)||(n.className=`${n.className} modal-open`.trim())}function Xi(n){if(!n)return;const l=Pn.get(n);if(l){if(l.count>1){l.count-=1;return}Pn.delete(n),n.isConnected&&(n.style.overflow=l.overflow,n.className=l.className)}}const Gi=["id"],At=e.defineComponent({name:"ClOverlay",__name:"Index",props:{id:String,className:String,show:Boolean,zIndex:{type:Number,default:2e3},duration:{type:Number,default:300},isLockScroll:{type:Boolean,default:!0},background:{type:String,default:"var(--cl-overlay, rgba(0, 0, 0, 0.7))"},teleportTarget:{type:String,default:""}},emits:["update:show","onClick"],setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.ref(a.show);let d=null;const u=e.useTemplateRef("refElOverlay"),s=e.computed(()=>o.isNonEmptyString(a.teleportTarget)?M(a.teleportTarget):"body"),c=e.computed(()=>a.teleportTarget==="self"),m=e.computed(()=>c.value),p=e.computed(()=>{const V=a.duration;return o.isNumber(V)&&o.isFinite(V)&&V>=0&&V<=1e4?V:300}),g=e.computed(()=>{const V=a.zIndex;return o.isNumber(V)&&o.isFinite(V)&&V>=0?V:2e3}),h=e.computed(()=>{const V={"panel-overlay":!0};return c.value&&(V["panel-overlay-self"]=!0),o.getJsonMerge(V,me.getClassNameJson(a.className))}),y=e.computed(()=>({zIndex:g.value,background:o.isNonEmptyString(a.background)?a.background:"var(--cl-overlay, rgba(0, 0, 0, 0.7))","--overlay-duration":`${p.value}ms`})),E=V=>{qi(V)},L=V=>{Xi(V)},B=()=>{if(c.value){const T=u.value?u.value.parentElement:null;if(!T)return null;let C=T;for(;C&&C!==document.body;){if(window.getComputedStyle(C).position!=="static")return C;C=C.parentElement}return document.body}const V=s.value;if(V==="body")return document.body;const w=document.querySelector(V);return w===document.body?document.body:w??document.body},I=()=>{if(a.isLockScroll&&a.show){const V=B();V&&d!==V&&(d&&L(d),d=V,E(V))}else d&&(L(d),d=null)},M=V=>{if(V==="self")return V;try{return document.querySelector(V)?V:(we.warn("Overlay",`teleportTarget「${V}」未匹配到元素,已回退到 body`),"body")}catch{return we.warn("Overlay",`teleportTarget「${V}」不是合法的 CSS 选择器,已回退到 body`),"body"}};e.onBeforeUnmount(()=>{d&&(L(d),d=null)}),e.watch(()=>[a.show,a.isLockScroll],()=>{a.show&&(r.value=!0),e.nextTick(()=>{I()})},{immediate:!0}),e.onMounted(()=>{I()});const N=()=>{t("onClick"),t("update:show",!1)},b=()=>{a.show||(r.value=!1)};return(V,w)=>r.value?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:s.value,disabled:m.value},[e.createVNode(e.Transition,{name:"panel-overlay-fade",duration:p.value,appear:"",onAfterLeave:b},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"refElOverlay",ref:u,id:e.unref(i),class:e.normalizeClass(h.value),style:e.normalizeStyle(y.value),onClick:e.withModifiers(N,["self"])},[e.renderSlot(V.$slots,"default")],14,Gi),[[e.vShow,n.show]])]),_:3},8,["duration"])],8,["to","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),Qi=["PPT","activity","address-book","aixin","aixin1","album","album-baby","all-circle","all-circle-fill","all-square","android","android1","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-line-down","angle-line-left","angle-line-right","angle-line-up","angle-linelong-down","angle-linelong-down-left","angle-linelong-down-right","angle-linelong-left","angle-linelong-right","angle-linelong-up","angle-linelong-up-left","angle-linelong-up-right","angle-right","angle-up","arrow-circle-down","arrow-circle-down-line","arrow-circle-down-line-fill","arrow-circle-left","arrow-circle-right","arrow-circle-up","back-bottom","back-top","back-up1","banshixinxingxing","baseInfo","basicdata","bell","bitian","book","calendar","calendar1","camera","camera1","caret-down","caret-left","caret-right","caret-up","check","check-circle","check-circle-fill","check-square","check-square-fill","check1","check2","chemicals","chose-image","clear","clock","close","close-circle","close-circle-fill","close1","clothes","column-show","config","contract","cooperation","copy","cropper","customer","dashboard","dashboard1","dazhongdianping","delete","diqiu","dollar","douyin","douyin1","download","download-cloud","download-cloud-1","download-cloud-2","earth","edit","edit1","edit2","email","empty","equipment","excel","exclamation","exclamation-circle","exclamation-circle-fill","eye","eye-no","file","file-excel","file-gif","file-image","file-pdf","file-ppt","file-search","file-text","file-word","file-zip","film","filter","finance","gesture-enlarge","gesture-narrow","gif","goumai","guanliyuan","guidance","home","home1","image","image-multiple","image-rmb","image1","info","info-circle","info-circle-fill","ios","ios1","jiaoxue","jin","jingxiupian","kebiao","kefu","kefunan","kefunv","language","language1","layout-left","layout-top","layout-top-left","liebiao","liebiao-1","liebiao-image","liebiao-pubuliu","like","list-empty5","lock","lock-un","look","looklove","luxian","marker","marker-qidian","marker-qidian1","meiyuan","minus","minus-circle","minus-circle-fill","minus-square","minus-square-fill","mobanpeizhi","more","more1","move","music","new","new-triangle-left-2","new-triangle-left-4","new-triangle-right","new-triangle-right-2","new2","order","orderPre","paixu","pdf","phone","phone-code","photoFrame1","pile","pile-fill","pintu","pintu1","pintu2","play","plus","plus-circle","plus-circle-fill","plus-square","plus-square-fill","purchase","qrcode","question","question-circle","question-circle-fill","refresh","remove","renminbi","reply","report","restore","rmb","rmb-circle","rmb-circle-fill","rotate-left","rotate-left1","rotate-right","rotate-right1","save","scenery","schedule","screen-full","screen-narrow","search","search-minus","search-plus","security","security-accidents","security-check","security-education","share","sheji","shezhi","shiyanshiyuyue1","shopcart","shouji1","shouru","sign-out","sign-out-2","sign-out1","sort-down","sort-up","sorting","square","systemSet","taiyang","taocan","tel","test","text","time","tool","total-circle-fill","touxiang","tuijian","tupianyulan","tupianyulan1","upload","upload-cloud","upload-cloud-1","upload-cloud-2","use-registration","user","user-account","user-info1","video","wangzhan","warn","warn-fill","weixin","weixin1","weixin2","word","xiangji","xin","xin1","xing","xing-fill","xingxing-banshixin","xinshenger","yanzhengma","yanzhengma1","yanzhengma2","yinger-nan","yinger-nv","yinger-unknown","yuexing","yulan","yulan1","yunfu","yunfu1","yuyue","yuyuedan","zhichu","zhongyao","zhuti","zhutice","zip","zuhu","zuhu1","zuopin"],Zi=["id"],ke=e.defineComponent({name:"ClIconFont",__name:"Index",props:{id:{},name:{},className:{},size:{},color:{}},setup(n){const l=new Set(Qi),a=n,t=a.id,i=e.computed(()=>{let d={"panel-icon-font":!0};const u=a.name;return o.isNonEmptyString(u)&&(l.has(u)?(d.clIconFont=!0,d[`clIcon-${u}`]=!0):d=o.getJsonMerge(d,me.getClassNameJson(u))),d=o.getJsonMerge(d,me.getClassNameJson(a.className)),d}),r=e.computed(()=>{const d={};return a.size!==void 0&&a.size!==null&&(d["font-size"]=o.isFinite(a.size)?`${a.size}px`:String(a.size)),a.color&&(d.color=a.color),d});return(d,u)=>(e.openBlock(),e.createElementBlock("i",{id:e.unref(t),class:e.normalizeClass(i.value),style:e.normalizeStyle(r.value)},null,14,Zi))}});let nl=500;const Oo=new WeakMap;function es(n,l,a){const t=n.getElementsByClassName("cl-waves-ripple");if(t.length>1)for(let p=0;p<t.length-1;p++){const g=t[p];parseFloat(g.style.opacity||"1")<.3&&g.remove()}const i=document.createElement("span");i.className="cl-waves-ripple";const r=n.getBoundingClientRect(),d=l.clientX-r.left,u=l.clientY-r.top,s=o.isObject(a.value)?a.value:{},c=s.color==="white";i.style.top=`${u}px`,i.style.left=`${d}px`,c&&i.classList.add("waves-light");const m=o.isNumber(s.duration)?s.duration:nl;i.style.transitionDuration=`${m}ms`,n.appendChild(i),requestAnimationFrame(()=>{const p=(r.width/100*3).toFixed(2);i.style.transform=`scale(${p}) translate(0, 0)`,i.style.opacity="1";const g=()=>{i.removeEventListener("transitionend",g),i.parentNode&&i.parentNode.removeChild(i)};i.addEventListener("transitionend",g)})}const _o={mounted(n,l){l.value&&ts(n,l)},unmounted(n){const l=Oo.get(n);l&&(n.removeEventListener("click",l),Oo.delete(n))}};function ts(n,l){n.style.position=n.style.position||"relative",n.style.overflow="hidden";const a=t=>es(n,t,l);Oo.set(n,a),n.addEventListener("click",a)}function ns(n){n?.duration&&(nl=n.duration)}const os="clwaves",as=n=>(ns(n),{deep:!0,mounted:_o.mounted,unmounted:_o.unmounted}),ol={mounted:_o.mounted},al=Object.freeze(Object.defineProperty({__proto__:null,directive:as,name:os,wavesBind:ol},Symbol.toStringTag,{value:"Module"})),ls=["id"],is=["disabled","aria-label"],ss={key:2,class:"btn-label"},rs={key:0,class:"btn-loading"},cs={class:"btn-body-backdrop-container"},us={class:"btn-body-backdrop-text"},et=e.defineComponent({name:"ClButton",directives:{clwaves:ol},__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},classBtn:String,label:String,icon:String,iconName:String,color:{type:String,default:"default"},size:{type:String,validator:n=>n===void 0||["large","small","xl"].indexOf(n)!==-1},isShowLoad:{type:Boolean,default:!1},loadPos:{type:String,default:"right",validator:n=>["right","zoom-out","fixedCenter"].indexOf(n)!==-1},loadTheme:{type:String,default:"rotaryLine"},loadColor:String,loadDrift:{type:Boolean,default:!0},loadText:{type:String,default:"加载中"},isShowBackDrop:{type:Boolean,default:!1},teleportTarget:{type:String,default:""},backdropOpacity:{type:Number,default:.02,validator:n=>n>=0&&n<=1},isShowWaves:{type:Boolean,default:!0},wavesColor:{type:String,default:"white"},loadStatusIsIng:{type:[Boolean,null],default:null}},emits:{onClick:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useSlots(),u=e.ref(!1),s=e.ref(!1),c=e.ref(!1),m=e.useTemplateRef("refElBtn"),p=e.useTemplateRef("refElContent"),g=e.ref(!1),h=e.ref("");let y=null,E=!1,L=null;typeof window<"u"&&o.isEmpty(t.label)&&o.isEmpty(t.icon)&&o.isEmpty(t.iconName)&&!d.default&&we.warn("ClButton","警告:label、icon、iconName 或默认插槽必须传一个值");const B=e.computed(()=>!o.isEmpty(t.label)||!!d.default),I=e.computed(()=>{const le=t.icon||t.iconName;return o.isNonEmptyString(le)?le:""}),M=e.computed(()=>B.value&&t.label||"按钮"),N=e.computed(()=>t.disabled?!0:u.value),b=e.computed(()=>t.loadPos==="fixedCenter"),V=e.computed(()=>t.loadColor||"var(--cl-bg, #ffffff)"),w=e.computed(()=>t.loadColor||h.value),T=e.computed(()=>`rgba(0, 0, 0, ${t.backdropOpacity})`),C=e.computed(()=>{let le=t.wavesColor||"white";return(o.isExistValue(t.color,"white")||o.isExistValue(t.color,"grayLight")||o.isExistValue(t.color,"text"))&&(le="black"),le}),D=e.computed(()=>t.isShowWaves?{color:C.value}:!1),J=e.computed(()=>{let le=t.loadPos||"right";return o.isExistValue(t.classBtn,"btn-circle")&&o.isExistValue(le,"right")&&(le="zoom-out"),le}),ne=e.computed(()=>{let le="";switch(t.loadTheme){case"rotaryLine":le=o.isExistValue(t.classBtn,"btn-circle")?"":"large";break;case"circleNotch":default:le="large";break;case"circleBubble":le="";break}return le}),K=e.computed(()=>{const le={"panel-button":!0};return o.getJsonMerge(le,me.getClassNameJson(t.className))}),P=e.computed(()=>{let le={"btn-parent":!0,btn:!0};return o.isEmpty(t.color)||(le[`btn-${t.color}`]=!0),le=o.getJsonMerge(le,me.getClassNameJson(t.classBtn)),o.isEmpty(t.size)||(le[`btn-${t.size}`]=!0),le["btn-load-ing"]=u.value,u.value&&(le[`btn-load-${J.value}`]=!0,le[`btn-load-${t.loadTheme}`]=!0,le["btn-load-nodrift"]=!t.loadDrift||J.value==="right"&&g.value),le}),x=e.computed(()=>{const le=u.value&&b.value;return{"btn-body-backdrop-main":!0,animated:!0,zoomIn:le,zoomOut:!le}}),A=e.computed(()=>{const le={};return(B.value||I.value)&&J.value==="zoom-out"&&u.value&&!b.value&&(le.opacity=0),le}),f=()=>{i("onClick")},S=()=>{if(o.isExistValue(t.classBtn,"btn-circle"))return 20;switch(t.loadTheme){case"circleNotch":return 24;case"circleBubble":return 30;case"rotaryLine":default:return t.size==="small"?20:30}},k=()=>{if(typeof window>"u"||!m.value)return;const le=m.value.querySelector(".btn-label")||m.value.querySelector(".btn-icon")||m.value,G=window.getComputedStyle(le).color;o.isEmpty(G)||(h.value=G)},v=()=>{if(typeof window>"u"||!m.value||!p.value||u.value)return;const le=m.value,oe=p.value.children;if(!oe.length){g.value=!0;return}const R=le.getBoundingClientRect(),U=oe[oe.length-1].getBoundingClientRect(),Q=U.right-oe[0].getBoundingClientRect().left,ee=R.right-U.right,H=S()+6+5;g.value=ee>=H&&Q>0},F=()=>{_(),!(typeof window>"u"||!m.value||!window.ResizeObserver)&&(L=new window.ResizeObserver(()=>{v()}),L.observe(m.value))},_=()=>{L&&(L.disconnect(),L=null)},O=()=>{u.value||(y&&(clearTimeout(y),y=null),t.isShowBackDrop&&(s.value=!0,c.value=!0),u.value=!0)},q=()=>{t.isShowBackDrop&&(b.value?e.nextTick(()=>{E||(y=setTimeout(()=>{E||(s.value=!1,c.value=!1,y=null)},200))}):s.value=!1),u.value=!1};e.onMounted(()=>{e.nextTick(()=>{k(),v(),F()})}),e.onBeforeUnmount(()=>{E=!0,_(),y&&(clearTimeout(y),y=null)}),e.watch(()=>[t.label,t.icon,t.iconName,t.size,t.loadTheme,t.classBtn,t.loadDrift,t.color],()=>{e.nextTick(()=>{k(),v()})}),e.watch(()=>t.loadStatusIsIng,le=>{o.isBoolean(le)&&(le?O():q())},{immediate:!0});const X=()=>{t.disabled||(t.isShowLoad&&O(),f())};return l({loadStart:()=>{O()},loadStop:()=>{q()}}),(le,G)=>{const oe=e.resolveDirective("clwaves");return e.openBlock(),e.createElementBlock("span",{id:e.unref(r),class:e.normalizeClass(K.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("button",{type:"button",class:e.normalizeClass(P.value),disabled:N.value,"aria-label":M.value,ref_key:"refElBtn",ref:m,onClick:X},[e.createElementVNode("span",{style:e.normalizeStyle(A.value),ref_key:"refElContent",ref:p},[I.value?(e.openBlock(),e.createBlock(ke,{key:0,name:I.value,className:"btn-icon"},null,8,["name"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),B.value?(e.openBlock(),e.createElementBlock("span",ss,[e.renderSlot(le.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),u.value&&!b.value?(e.openBlock(),e.createElementBlock("span",rs,[e.createVNode(ct,{theme:n.loadTheme,size:ne.value,color:w.value},null,8,["theme","size","color"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,is)),[[oe,D.value]]),s.value?(e.openBlock(),e.createBlock(At,{key:0,show:s.value,zIndex:1000001,duration:0,isLockScroll:!1,background:T.value,teleportTarget:n.teleportTarget},{default:e.withCtx(()=>[b.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(x.value)},[e.createElementVNode("div",cs,[e.createVNode(ct,{theme:n.loadTheme,size:ne.value,color:V.value},null,8,["theme","size","color"]),e.createElementVNode("div",us,e.toDisplayString(n.loadText||"加载中"),1)])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:1},8,["show","background","teleportTarget"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,ls)}}}),ds=["id"],ms={key:0,class:"callout-title"},ps={class:"callout-content"},ll=e.defineComponent({name:"ClCallout",__name:"Index",props:{id:String,className:String,type:{type:String,default:"info"},title:String},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-callout":!0,[`callout-${l.type||"info"}`]:!0},me.getClassNameJson(l.className)));return(i,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(a),role:"note"},[n.title?(e.openBlock(),e.createElementBlock("div",ms,e.toDisplayString(n.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",ps,[e.renderSlot(i.$slots,"default")])],10,ds))}}),fs=["id"],hs={key:0,class:"card-head"},gs={key:0,class:"card-head-flex"},vs={class:"card-title"},ys={key:1,class:"card-title"},ks={key:2,class:"card-explain"},Ss={key:2,class:"card-footer"},zo=e.defineComponent({name:"ClCard",__name:"Index",props:{id:String,className:String,classBody:String,theme:{type:String,default:"default"},isInnerPadZero:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>({"panel-card":!0,"card-box":!0,...me.getClassNameJson(l.className),[`card-${l.theme||"default"}`]:!0})),i=e.computed(()=>({"card-body":!0,"card-body-padding-0":l.isInnerPadZero,...me.getClassNameJson(l.classBody)}));return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),id:e.unref(a)},[r.$slots.headTitle||r.$slots.headExplain||r.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",hs,[r.$slots.headFlex?(e.openBlock(),e.createElementBlock("div",gs,[e.createElementVNode("div",vs,[e.renderSlot(r.$slots,"headTitle")]),e.renderSlot(r.$slots,"headFlex")])):(e.openBlock(),e.createElementBlock("div",ys,[e.renderSlot(r.$slots,"headTitle")])),r.$slots.headExplain?(e.openBlock(),e.createElementBlock("div",ks,[e.renderSlot(r.$slots,"headExplain")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.renderSlot(r.$slots,"default")],2),r.$slots.foot?(e.openBlock(),e.createElementBlock("div",Ss,[e.renderSlot(r.$slots,"foot")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,fs))}}),ws=["id"],il=e.defineComponent({name:"ClCardColor",__name:"Index",props:{id:String,className:String,classBody:String,color:{type:String,default:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"},isInnerPadZero:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const d={"card-color":!0};return o.getJsonMerge(d,me.getClassNameJson(l.className))}),i=e.computed(()=>({"card-color-body":!0,"card-color-body--pad-zero":l.isInnerPadZero,...me.getClassNameJson(l.classBody)})),r=e.computed(()=>({backgroundColor:o.isNonEmptyString(l.color)?l.color:"var(--cl-shadow-sm, rgba(0, 0, 0, 0.04))"}));return(d,u)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value),style:e.normalizeStyle(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(i.value)},[e.renderSlot(d.$slots,"default")],2)],14,ws))}}),Ve={positions:{top:"top",topLeft:"top-start",topRight:"top-end",right:"right",rightTop:"right-start",rightBottom:"right-end",bottom:"bottom",bottomLeft:"bottom-start",bottomRight:"bottom-end",left:"left",leftTop:"left-start",leftBottom:"left-end"},triggers:["hover","click","focus"],themes:["white","black"],options:{position:"top",trigger:"hover",theme:"white",template:"<div class='tooltip'><div class='tooltip-inner'></div><div class='arrow' data-popper-arrow></div></div>",selectorBody:".tooltip-inner",selectorArrow:".arrow",isHtml:!0,isRunTrigger:!0,isFixedVisible:!1,isStopPropagation:!0,className:""},bind:(n,l)=>{Ve.create(n,l)},create:(n,l)=>{if(o.isObject(l)&&!o.isUndefined(l.value)&&Ve.getIsInit(l)){const t=Ve._getValueHtml(l.value);if(!o.isEmpty(t)){const i=Ve.getOptions();i.contentBody=t,i.placement=Ve.getPosition(l),i.trigger=Ve.getTrigger(l),i.theme=Ve.getTheme(l),i.isHtml=Ve.getIsHtml(l),i.isFixedVisible=Ve.getFixedVisible(l),i.isStopPropagation=Ve.getStopPropagation(l),i.className=Ve.getClassName(l);try{const r=new Fi(n,i);r._vueEl=n,n._tooltip=r}catch{}}}},getIsInit:n=>o.isObject(n.value)&&o.isBoolean(n.value.init)?n.value.init:!0,getOptions:()=>o.getJsonClone(Ve.options),_getValueHtml:n=>{let l="";switch(o.getTypeof(n)){case"string":case"number":l=n.toString();break;case"object":o.isEmpty(n.html)||(l=n.html);break;default:l=""}return l},getPosition:n=>{let l=o.isObject(n.value)?n.value.position:"";if(o.isEmpty(l))for(const[a,t]of Object.entries(Ve.positions))n.modifiers[a]&&(l=t);else o.isExistJsonKey(Ve.positions,l)&&(l=Ve.positions[l]);return o.isEmpty(l)?Ve.options.position:l},getTrigger:n=>{let l=o.isObject(n.value)?n.value.trigger:"";return o.isEmpty(l)&&Ve.triggers.forEach(a=>{n.modifiers[a]&&(l=a)}),o.isEmpty(l)?Ve.options.trigger:l},getTheme:n=>{let l=o.isObject(n.value)?n.value.theme:"";return o.isEmpty(l)&&Ve.themes.forEach(a=>{n.modifiers[a]&&(l=a)}),o.isEmpty(l)?Ve.options.theme:l},getIsHtml:n=>{const l=o.isObject(n.value)?n.value.isHtml:!0;return o.isBoolean(l)?l:Ve.options.isHtml},getIsRunTrigger:n=>o.isObject(n)&&o.isBoolean(n.isRunTrigger)?n.isRunTrigger:!0,getFixedVisible:n=>{const l=o.isObject(n.value)?n.value.isFixedVisible:!1;return o.isBoolean(l)?l:Ve.options.isFixedVisible},getStopPropagation:n=>{const l=o.isObject(n.value)?n.value.isStopPropagation:!1;return o.isBoolean(l)?l:Ve.options.isStopPropagation},getClassName:n=>{const l=o.isObject(n.value)?n.value.className:"";return o.isEmpty(l)?Ve.options.className:l},update:(n,l)=>{const a=Ve.getIsInit(l);if(a){!n._tooltip&&a&&Ve.create(n,l);const t=Ve._getValueHtml(l.value),i=Ve._getValueHtml(l.oldValue),r=o.isObject(l.value);let d=!1;if(t!==i)d=!0;else if(r&&!o.isUndefined(l.value.updRefreshInx)){const u=l.value.updRefreshInx,s=l.oldValue.updRefreshInx;u!==s&&(d=!0)}if(n._tooltip){d&&n._tooltip.clSetContentBody(t),n._tooltip.clSetInitShow(a);const u=Ve.getIsRunTrigger(l.value),s=Ve.getIsRunTrigger(l.oldValue);(!u||!a)&&n._tooltip.clHide(),u!==s&&n._tooltip.clSetRunTrigger(u)}}else Ve.destroy(n)},destroy:n=>{n._tooltip&&(n._tooltip.clDispose(),delete n._tooltip)},show:n=>{n._tooltip&&n._tooltip.clShow()},hide:n=>{n._tooltip&&n._tooltip.clHide()}},Es="clTooltip",Cs=()=>({deep:!0,mounted:Ve.bind,updated:Ve.update,unmounted:Ve.destroy}),dt={mounted:Ve.bind,updated:Ve.update},Ao={show:Ve.show,hide:Ve.hide},sl=Object.freeze(Object.defineProperty({__proto__:null,directive:Cs,name:Es,tooltipCommon:Ao,tooltipDirectives:dt},Symbol.toStringTag,{value:"Module"})),bs=["id"],xs={key:0,class:"cl-plaintext-value"},Bs=["id","name","value","disabled","checked","onClick"],Is=["for"],Ds={key:0},Jo=e.defineComponent({name:"ClCheckbox",directives:{cltooltip:dt},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:String,required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},circle:{type:Boolean,default:!1},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`checkbox-${o.getRandom(5)}`,d=o.isEmpty(t.name)?r+"_name":t.name,u=t.id,s=e.ref(o.split(t.value)),c=e.ref(!1);let m={};const p=e.ref(0),g={isProcessing:!1,_initEmitted:!1},h=e.computed(()=>{if(t.isPlaintext)return[];const f=t.list;return o.isArray(f)?f.filter(S=>!o.isEmpty(S)):[]}),y=e.computed(()=>{const f=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,p.value;const S=[];return s.value.forEach(k=>{const v=o.isExistJsonKey(m,k)?m[k]:void 0;S.push(v&&o.isNonEmptyString(v.name)?v.name:k)}),S.filter(k=>o.isNonEmptyString(k)).join(f)}),E=e.computed(()=>Je.getPlaintextOutText("checkbox",t.plaintextEmptyText,y.value,t.value)),L=e.computed(()=>o.getJsonMerge({"panel-checkbox":!0},me.getClassNameJson(t.className))),B=e.computed(()=>{const f={checkbox:!0,"checkbox-default":!0};return f["checkbox-inline"]=t.isInline,f["checkbox-circle"]=t.circle,f}),I=f=>{const S={},{width:k}=t;return f&&!o.isEmpty(f.width)?S.width=f.width:o.isEmpty(k)||(S.width=t.width),S},M=f=>{i("update:value",f),i("update:modelValue",f)},N=f=>{const S=[];o.isEmpty(f)||o.split(f).forEach(v=>{o.isExistJsonKey(m,v)&&S.push(o.getJsonClone(m[v]))});const k=S.length>0&&S.length===(t.list?.length??0);M(f),i("onChange",f,S,k)},b=()=>{g._initEmitted||(g._initEmitted=!0,e.nextTick(()=>{i("onInit")}))},V=()=>{const f=[];return s.value.forEach(S=>{o.isExistJsonKey(m,S)&&f.push(S)}),f},w=f=>{m=o.isEmpty(f)?{}:o.getJsonByList(f),p.value+=1},T=()=>{if(c.value&&!o.isEmpty(s.value)){const f=V();o.isEqualArr(s.value,f)||(s.value=f,M(f.join(",")))}},C=f=>{const S=o.split(f);let k=o.isEqualArr(s.value,S);k&&(k=f===s.value.join(",")),k||(s.value=S)},D=()=>{c.value=(t.list?.length??0)!==0,w(t.list),T()};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.watch(c,f=>{f&&b()}),e.watch(()=>t.list,f=>{c.value||(c.value=!0,f.length===0&&T(),b())}),e.watch([()=>t.value,()=>t.list],([f,S])=>{const k=S;!c.value&&k.length>0&&(c.value=!0,b()),w(k),C(f),T()});const J=f=>{i("onTipClick",f)},ne=async f=>{if(!(!f||f.isDisabled||t.disabled||g.isProcessing)&&!o.isEmpty(f.id)){g.isProcessing=!0;try{const S=String(f.id??"");let k=o.getArrClone(s.value);o.isExistValue(s.value,S)?k=o.getArrRemoveById(k,S):k.push(S);const v=k.join(",");let F=!0;if(t.checkChangeBefore)try{F=await t.checkChangeBefore(v),F=o.isBoolean(F)?F:!0}catch{F=!1}if(t.disabled||f.isDisabled)return;F&&(s.value=k,N(v))}catch(S){i("onError",S)}finally{g.isProcessing=!1}}};return l({getValue:()=>V().join(","),getValueData:()=>{const f=[];return s.value.forEach(S=>{o.isExistJsonKey(m,S)&&f.push(o.getJsonClone(m[S]))}),f},setValue:f=>{g.isProcessing||(C(f),T())},runInitComplete:()=>{c.value||(c.value=!0,w(t.list),C(t.value),T(),b())}}),(f,S)=>{const k=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",xs,e.toDisplayString(E.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(v,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${r}-${v.id??""}-${F}`},[v.isShow||v.isShow===void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(B.value),style:e.normalizeStyle(I(v))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:`${r}_${e.unref(d)}_${v.id??""}`,name:e.unref(d),value:v.id??"",disabled:v.isDisabled||n.disabled,checked:s.value.includes(String(v.id??"")),onClick:_=>ne(v)},null,8,Bs),e.createElementVNode("label",{for:`${r}_${e.unref(d)}_${v.id??""}`},[e.renderSlot(f.$slots,"default",{data:v},()=>[v.icon&&v.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Ds,[e.createVNode(ke,{name:v.icon},null,8,["name"])])),[[k,{html:v.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(v.name),1)],64))])],8,Is)]),v.tipMsg&&v.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:e.unref(o).isNonEmptyString(v.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(v.tipIcon)?v.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[k,{html:v.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ke,{key:1,name:e.unref(o).isNonEmptyString(v.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(v.tipIcon)?v.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(_=>J(v),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,bs)}}}),Ts=["id"],Ns=["id","name","checked","disabled"],Vs=["for"],Ms={key:0},pt=e.defineComponent({name:"ClCheckboxOne",directives:{cltooltip:dt},__name:"One",props:{id:{},name:{},value:{type:Boolean},className:{},forId:{},label:{},disabled:{type:Boolean},circle:{type:Boolean},indeterminate:{type:Boolean},icon:{},tipMsg:{},tipIcon:{},tipMode:{}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onTipClick:()=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=o.isEmpty(a.forId)?`cb_${a.name||""}_${o.getRandom(8)}`:a.forId,d=e.computed(()=>{const p={checkbox:!0,"checkbox-default":!0,"checkbox-inline":!0};return a.circle&&(p["checkbox-circle"]=!0),o.getJsonMerge(p,me.getClassNameJson(a.className))}),u=e.computed(()=>({indeterminate:a.indeterminate})),s=(p,g)=>{t("update:value",g),t("update:modelValue",g),t("onChange",{event:p,value:g})},c=()=>{t("onTipClick")},m=p=>{s(p,p.currentTarget.checked)};return(p,g)=>{const h=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),id:e.unref(i)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"checkbox",id:e.unref(r),name:n.name,class:e.normalizeClass(u.value),checked:n.value,disabled:n.disabled,onClick:m},null,10,Ns),e.createElementVNode("label",{for:e.unref(r)},[n.icon?e.withDirectives((e.openBlock(),e.createElementBlock("span",Ms,[e.createVNode(ke,{name:n.icon},null,8,["name"])])),[[h,{html:n.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.label),1)],64))],8,Vs)]),n.tipMsg?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"checkbox-icon-tip"},null,8,["name","className"])),[[h,{html:n.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ke,{key:1,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"checkbox-icon-tip",onClick:e.withModifiers(c,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,Ts)}}}),Os=()=>typeof window<"u";let St=null;const _s=()=>(St||(St=document.createElement("textarea"),St.setAttribute("readonly",""),St.style.position="fixed",St.style.left="-9999px",St.style.top="-9999px",St.style.opacity="0",document.body.appendChild(St)),St),As=n=>typeof n=="function"?n():n,Ca=(n,l)=>{try{const a=_s();a.value=n,a.select(),a.setSelectionRange(0,99999),document.execCommand("copy")?l.successCallback?.():l.errorCallback?.(n)}catch{l.errorCallback?.(n)}finally{window.getSelection()?.removeAllRanges()}},Ls=n=>{const l=typeof n=="string"?{text:n}:n;if(!Os()){l.errorCallback?.();return}let a;try{a=As(l.text)}catch{l.errorCallback?.();return}if(!a){l.errorCallback?.();return}if(navigator.clipboard?.writeText){navigator.clipboard.writeText(a).then(()=>l.successCallback?.()).catch(()=>Ca(a,l));return}Ca(a,l)},Ko=()=>({copy:Ls}),$s=["id","onKeydown"],Fs={class:"clipboard-btn"},Ps={key:0,class:"clipboard-operate-result"},hn=e.defineComponent({name:"ClClipboard",__name:"Index",props:{id:String,className:String,iconColorClass:String,isUseSuccess:{type:Boolean,default:!0},textLabel:{type:[String,Function],required:!0}},emits:{onCopySuccess:()=>!0,onCopyError:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.reactive({isHover:!1,isShowSuccess:!1});let d=null,u=!1;const s=e.computed(()=>{let h={"panel-clipboard":!0};return h=o.getJsonMerge(h,me.getClassNameJson(a.className)),h}),c=()=>{d=Ko()};e.onMounted(()=>{e.nextTick(()=>{c()})});const m=()=>{if(u)return;let h="";const{textLabel:y}=a;if(y)switch(typeof y){case"function":try{h=y()}catch{h="",t("onCopyError","复制失败 textLabel()")}break;case"string":h=y;break;default:h="";break}o.isEmpty(h)||!d||(u=!0,d.copy({text:h,successCallback:()=>{r.isShowSuccess=!0,t("onCopySuccess"),u=!1},errorCallback:()=>{r.isShowSuccess=!1,t("onCopyError",h),u=!1}}))},p=()=>{r.isHover=!0},g=()=>{r.isShowSuccess=!1,r.isHover=!1};return(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),id:e.unref(i),tabindex:"0",role:"button","aria-label":"复制",onMouseenter:p,onMouseleave:g,onClick:e.withModifiers(m,["stop"]),onKeydown:[e.withKeys(e.withModifiers(m,["prevent"]),["enter"]),e.withKeys(e.withModifiers(m,["prevent"]),["space"])]},[e.createElementVNode("div",Fs,[e.renderSlot(h.$slots,"default",{},()=>[e.createVNode(ke,{name:"copy",className:a.iconColorClass},null,8,["className"])])]),n.isUseSuccess&&r.isHover&&r.isShowSuccess?(e.openBlock(),e.createElementBlock("div",Ps,[e.createVNode(ke,{name:"check1"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],42,$s))}}),gn=e.defineComponent({name:"ClTransitionSlideUpDown",__name:"SlideUpDown",setup(n){const l=e.reactive({oldPaddingTop:"",oldPaddingBottom:"",oldOverflow:""}),a=(c,m)=>{const p=function(){m(),c.removeEventListener("transitionend",p,!1),c.removeEventListener("transitioncancel",p,!1)};c.addEventListener("transitionend",p,!1),c.addEventListener("transitioncancel",p,!1)},t=c=>{const m=c;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.paddingTop="0",m.style.paddingBottom="0",m.style.maxHeight="0"},i=(c,m)=>{const p=c,g=p.scrollHeight;if(g>0?p.style.maxHeight=g+"px":p.style.maxHeight="0",p.style.paddingTop=l.oldPaddingTop,p.style.paddingBottom=l.oldPaddingBottom,g===0&&!l.oldPaddingTop&&!l.oldPaddingBottom){m();return}p.style.overflow="hidden",a(c,m)},r=c=>{const m=c;m.style.maxHeight="",m.style.overflow=l.oldOverflow},d=c=>{const m=c;l.oldPaddingBottom=m.style.paddingBottom,l.oldPaddingTop=m.style.paddingTop,l.oldOverflow=m.style.overflow,m.style.maxHeight=m.scrollHeight+"px",m.style.overflow="hidden"},u=(c,m)=>{const p=c;if(p.scrollHeight!==0)p.style.maxHeight="0",p.style.paddingBottom="0",p.style.paddingTop="0";else{m();return}a(c,m)},s=c=>{const m=c;m.style.maxHeight="",m.style.overflow=l.oldOverflow,m.style.paddingBottom=l.oldPaddingBottom,m.style.paddingTop=l.oldPaddingTop,l.oldOverflow=l.oldPaddingBottom=l.oldPaddingTop=""};return(c,m)=>(e.openBlock(),e.createBlock(e.Transition,{name:"clSlideUpDown",onBeforeEnter:t,onEnter:i,onAfterEnter:r,onBeforeLeave:d,onLeave:u,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3}))}}),Rs=["id"],Hs=["tabindex","role","aria-expanded"],Us={class:"collapse-title"},zs=["tabindex","role","aria-expanded","aria-label","onKeydown"],Js={key:0,class:"collapse-body"},Ks=300,Ws=50,rl=e.defineComponent({name:"ClCollapse",__name:"Index",props:{id:String,className:String,isOperate:{type:Boolean,default:!0},isExpanded:{type:Boolean,default:!0},isCollapseOnTitle:{type:Boolean,default:!1},isDestroyOnCollapse:{type:Boolean,default:!1}},emits:{onCollapse:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`collapse-${o.getRandom(8)}`,r=e.reactive({isExpanded:o.isBoolean(a.isExpanded)?a.isExpanded:!0,isAnimating:!1});let d=null;const u=Ks+Ws,s=e.computed(()=>o.isBoolean(a.isCollapseOnTitle)?a.isCollapseOnTitle:!1),c=e.computed(()=>o.isNonEmptyString(a.id)?a.id:i),m=e.computed(()=>o.getJsonMerge({"panel-collapse":!0},me.getClassNameJson(a.className))),p=e.computed(()=>({"collapse-operate":!0,"icon-rotate":!0,"rotate-180":!r.isExpanded})),g=e.computed(()=>({"collapse-head":!0,"collapse-head-clickable":s.value})),h=()=>{d!==null&&(clearTimeout(d),d=null)};e.onUnmounted(()=>{h()}),e.watch(()=>a.isExpanded,B=>{const I=o.isBoolean(B)?B:!0;r.isExpanded!==I&&(h(),r.isAnimating=!1,r.isExpanded=I)});const y=()=>{r.isAnimating||(r.isAnimating=!0,r.isExpanded=!r.isExpanded,h(),d=setTimeout(()=>{d=null,r.isAnimating=!1},u),t("onCollapse",r.isExpanded))},E=B=>{if(!s.value)return;const I=B.target;I instanceof Element&&(I.closest(".collapse-operate")||(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),y()))},L=B=>{if(!s.value)return;const I=B.target;I instanceof Element&&(I.closest(".collapse-operate")||y())};return(B,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(m.value),id:c.value},[e.createElementVNode("div",{class:e.normalizeClass(g.value),tabindex:s.value?0:void 0,role:s.value?"button":void 0,"aria-expanded":s.value?r.isExpanded:void 0,onClick:L,onKeydown:E},[e.createElementVNode("div",Us,[e.renderSlot(B.$slots,"title")]),e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(p.value),tabindex:s.value?-1:0,role:s.value?void 0:"button","aria-expanded":s.value?void 0:r.isExpanded,"aria-label":s.value?void 0:r.isExpanded?"折叠":"展开",onClick:y,onKeydown:[e.withKeys(e.withModifiers(y,["prevent"]),["enter"]),e.withKeys(e.withModifiers(y,["prevent"]),["space"])]},[e.createVNode(ke,{name:"angle-down"})],42,zs),[[e.vShow,e.unref(o).isBoolean(n.isOperate)?n.isOperate:!0]])],42,Hs),e.createVNode(gn,null,{default:e.withCtx(()=>[!n.isDestroyOnCollapse||r.isExpanded?e.withDirectives((e.openBlock(),e.createElementBlock("div",Js,[e.renderSlot(B.$slots,"default")],512)),[[e.vShow,r.isExpanded]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3})],10,Rs))}}),js=["id"],Ys={key:1,class:"countdown-num"},ba=864e5,xa=36e5,Ba=6e4,qs=100,Xs=1e3,cl=e.defineComponent({name:"ClCountDown",__name:"Index",props:{id:String,className:String,time:{type:Number,default:0},format:{type:String,default:"HH:mm:ss"},isAutoStart:{type:Boolean,default:!0},isMillisecond:{type:Boolean,default:!1}},emits:["onChange","onFinish"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`countdown-${o.getRandom(5)}`,d=t.id,u=e.ref(0);let s=null,c=0,m=!1;const p=e.computed(()=>t.isMillisecond?qs:Xs),g=e.computed(()=>{const T=Math.max(0,u.value),C=Math.floor(T/ba),D=Math.floor(T%ba/xa),J=Math.floor(T%xa/Ba),ne=Math.floor(T%Ba/1e3),K=T%1e3,P={DD:String(C).padStart(2,"0"),HH:String(D).padStart(2,"0"),mm:String(J).padStart(2,"0"),ss:String(ne).padStart(2,"0"),SSS:String(K).padStart(3,"0")},x=[],A=t.isMillisecond?/(DD|HH|mm|ss|SSS)/g:/(DD|HH|mm|ss)/g;let f=0,S;for(;(S=A.exec(t.format))!==null;){if(S.index>f){const k=t.format.slice(f,S.index);x.push({type:y(k)?"sep":"text",value:k})}x.push({type:"num",value:P[S[0]]||S[0]}),f=S.index+S[0].length}if(f<t.format.length){const k=t.format.slice(f);x.push({type:y(k)?"sep":"text",value:k})}return x}),h=e.computed(()=>{const T={"panel-count-down":!0};return o.getJsonMerge(T,me.getClassNameJson(t.className))}),y=T=>{const C=T.trim();return C?/^[\p{P}\p{S}]+$/u.test(C):!1},E=()=>{const T=Number(t.time);return o.isFinite(T)&&T>0?T:0},L=T=>{u.value=Math.max(0,T),c=Date.now()+Math.max(0,T),m=!0,M(),s=setInterval(M,p.value)},B=()=>{if(m)return;const T=E();if(T<=0){u.value=0,i("onFinish");return}L(T)},I=()=>{if(!m){if(u.value<=0){B();return}L(u.value)}},M=()=>{const T=Math.max(0,c-Date.now());u.value=T,i("onChange",T),T<=0&&(N(),i("onFinish"))},N=()=>{s&&(clearInterval(s),s=null),m=!1};return e.onMounted(()=>{t.isAutoStart?B():u.value=E()}),e.onBeforeUnmount(()=>{N()}),e.watch(()=>t.time,()=>{N(),u.value=E(),t.isAutoStart&&u.value>0&&L(u.value)}),e.watch(()=>t.isAutoStart,T=>{T&&!m&&u.value>0&&L(u.value)}),e.watch(p,()=>{m&&(s&&clearInterval(s),s=setInterval(M,p.value))}),l({start:()=>{I()},pause:()=>{N()},reset:()=>{N(),u.value=E()}}),(T,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(h.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(D,J)=>(e.openBlock(),e.createElementBlock("span",{key:`${r}-${J}`,class:e.normalizeClass(["countdown-part",{"countdown-sep":D.type==="sep"}])},[D.type!=="num"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(D.value),1)],64)):(e.openBlock(),e.createElementBlock("span",Ys,e.toDisplayString(D.value),1))],2))),128))],10,js))}});/**!
2
2
  * Sortable 1.15.0
3
3
  * @author RubaXa <trash@rubaxa.org>
4
4
  * @author owenm <owen23355@gmail.com>
5
5
  * @license MIT
6
- */function Ia(n,l){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);l&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),a.push.apply(a,t)}return a}function gt(n){for(var l=1;l<arguments.length;l++){var a=arguments[l]!=null?arguments[l]:{};l%2?Ia(Object(a),!0).forEach(function(t){Gs(n,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):Ia(Object(a)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(a,t))})}return n}function On(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(l){return typeof l}:On=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},On(n)}function Gs(n,l,a){return l in n?Object.defineProperty(n,l,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[l]=a,n}function Et(){return Et=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var a=arguments[l];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(n[t]=a[t])}return n},Et.apply(this,arguments)}function Qs(n,l){if(n==null)return{};var a={},t=Object.keys(n),i,r;for(r=0;r<t.length;r++)i=t[r],!(l.indexOf(i)>=0)&&(a[i]=n[i]);return a}function Zs(n,l){if(n==null)return{};var a=Qs(n,l),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(i=0;i<r.length;i++)t=r[i],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(a[t]=n[t])}return a}var er="1.15.0";function Ct(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var bt=Ct(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),vn=Ct(/Edge/i),Da=Ct(/firefox/i),rn=Ct(/safari/i)&&!Ct(/chrome/i)&&!Ct(/android/i),ul=Ct(/iP(ad|od|hone)/i),dl=Ct(/chrome/i)&&Ct(/android/i),ml={capture:!1,passive:!1};function Ae(n,l,a){n.addEventListener(l,a,!bt&&ml)}function Oe(n,l,a){n.removeEventListener(l,a,!bt&&ml)}function Rn(n,l){if(l){if(l[0]===">"&&(l=l.substring(1)),n)try{if(n.matches)return n.matches(l);if(n.msMatchesSelector)return n.msMatchesSelector(l);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(l)}catch{return!1}return!1}}function tr(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function ht(n,l,a,t){if(n){a=a||document;do{if(l!=null&&(l[0]===">"?n.parentNode===a&&Rn(n,l):Rn(n,l))||t&&n===a)return n;if(n===a)break}while(n=tr(n))}return null}var Ta=/\s+/g;function at(n,l,a){if(n&&l)if(n.classList)n.classList[a?"add":"remove"](l);else{var t=(" "+n.className+" ").replace(Ta," ").replace(" "+l+" "," ");n.className=(t+(a?" "+l:"")).replace(Ta," ")}}function Ne(n,l,a){var t=n&&n.style;if(t){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(a=n.currentStyle),l===void 0?a:a[l];!(l in t)&&l.indexOf("webkit")===-1&&(l="-webkit-"+l),t[l]=a+(typeof a=="string"?"":"px")}}function Wt(n,l){var a="";if(typeof n=="string")a=n;else do{var t=Ne(n,"transform");t&&t!=="none"&&(a=t+" "+a)}while(!l&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(a)}function pl(n,l,a){if(n){var t=n.getElementsByTagName(l),i=0,r=t.length;if(a)for(;i<r;i++)a(t[i],i);return t}return[]}function st(){var n=document.scrollingElement;return n||document.documentElement}function We(n,l,a,t,i){if(!(!n.getBoundingClientRect&&n!==window)){var r,d,u,s,c,m,p;if(n!==window&&n.parentNode&&n!==st())r=n.getBoundingClientRect(),d=r.top,u=r.left,s=r.bottom,c=r.right,m=r.height,p=r.width;else{var g=document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth,v=document.documentElement.clientHeight||document.body.clientHeight||window.innerHeight;d=0,u=0,s=v,c=g,m=v,p=g}if((l||a)&&n!==window&&(i=i||n.parentNode,!bt))do if(i&&i.getBoundingClientRect&&(Ne(i,"transform")!=="none"||a&&Ne(i,"position")!=="static")){var y=i.getBoundingClientRect();d-=y.top+parseInt(Ne(i,"border-top-width")),u-=y.left+parseInt(Ne(i,"border-left-width")),s=d+r.height,c=u+r.width;break}while(i=i.parentNode);if(t&&n!==window){var k=Wt(i||n),F=k&&k.a,B=k&&k.d;k&&(d/=B,u/=F,p/=F,m/=B,s=d+m,c=u+p)}return{top:d,left:u,bottom:s,right:c,width:p,height:m}}}function Na(n,l,a){for(var t=Tt(n,!0),i=We(n)[l];t;){var r=We(t)[a],d=void 0;if(d=i>=r,!d)return t;if(t===st())break;t=Tt(t,!1)}return!1}function Yt(n,l,a,t){for(var i=0,r=0,d=n.children;r<d.length;){if(d[r].style.display!=="none"&&d[r]!==De.ghostClone&&(t||d[r]!==De.dragged)&&ht(d[r],a.draggable,n,!1)){if(i===l)return d[r];i++}r++}return null}function Wo(n,l){for(var a=n.lastElementChild;a&&(a===De.ghostClone||Ne(a,"display")==="none"||l&&!Rn(a,l));)a=a.previousElementSibling;return a||null}function it(n,l){var a=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==De.clone&&(!l||Rn(n,l))&&a++;return a}function Va(n){var l=0,a=0,t=st();if(n)do{var i=Wt(n),r=i.a,d=i.d;l+=n.scrollLeft*r,a+=n.scrollTop*d}while(n!==t&&(n=n.parentNode));return[l,a]}function nr(n,l){for(var a in n)if(n.hasOwnProperty(a)){for(var t in l)if(l.hasOwnProperty(t)&&l[t]===n[a][t])return Number(a)}return-1}function Tt(n,l){if(!n||!n.getBoundingClientRect)return st();var a=n,t=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var i=Ne(a);if(a.clientWidth<a.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return st();if(t||l)return a;t=!0}}while(a=a.parentNode);return st()}function or(n,l){if(n&&l)for(var a in l)l.hasOwnProperty(a)&&(n[a]=l[a]);return n}function mo(n,l){return Math.round(n.top)===Math.round(l.top)&&Math.round(n.left)===Math.round(l.left)&&Math.round(n.height)===Math.round(l.height)&&Math.round(n.width)===Math.round(l.width)}var cn;function fl(n,l){return function(){if(!cn){var a=arguments,t=this;a.length===1?n.call(t,a[0]):n.apply(t,a),cn=setTimeout(function(){cn=void 0},l)}}}function ar(){clearTimeout(cn),cn=void 0}function hl(n,l,a){n.scrollLeft+=l,n.scrollTop+=a}function gl(n){var l=window.Polymer,a=window.jQuery||window.Zepto;return l&&l.dom?l.dom(n).cloneNode(!0):a?a(n).clone(!0)[0]:n.cloneNode(!0)}var Qe="Sortable"+new Date().getTime();function lr(){var n=[],l;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(i){if(!(Ne(i,"display")==="none"||i===De.ghostClone)){n.push({target:i,rect:We(i)});var r=gt({},n[n.length-1].rect);if(i.thisAnimationDuration){var d=Wt(i,!0);d&&(r.top-=d.f,r.left-=d.e)}i.fromRect=r}})}},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(nr(n,{target:t}),1)},animateAll:function(t){var i=this;if(!this.options.animation){clearTimeout(l),typeof t=="function"&&t();return}var r=!1,d=0;n.forEach(function(u){var s=0,c=u.target,m=c.fromRect,p=We(c),g=c.prevFromRect,v=c.prevToRect,y=u.rect,k=Wt(c,!0);k&&(p.top-=k.f,p.left-=k.e),c.toRect=p,c.thisAnimationDuration&&mo(g,p)&&!mo(m,p)&&(y.top-p.top)/(y.left-p.left)===(m.top-p.top)/(m.left-p.left)&&(s=sr(y,g,v,i.options)),mo(p,m)||(c.prevFromRect=m,c.prevToRect=p,s||(s=i.options.animation),i.animate(c,y,p,s)),s&&(r=!0,d=Math.max(d,s),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},s),c.thisAnimationDuration=s)}),clearTimeout(l),r?l=setTimeout(function(){typeof t=="function"&&t()},d):typeof t=="function"&&t(),n=[]},animate:function(t,i,r,d){if(d){Ne(t,"transition",""),Ne(t,"transform","");var u=Wt(this.el),s=u&&u.a,c=u&&u.d,m=(i.left-r.left)/(s||1),p=(i.top-r.top)/(c||1);t.animatingX=!!m,t.animatingY=!!p,Ne(t,"transform","translate3d("+m+"px,"+p+"px,0)"),this.forRepaintDummy=ir(t),Ne(t,"transition","transform "+d+"ms"+(this.options.easing?" "+this.options.easing:"")),Ne(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){Ne(t,"transition",""),Ne(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},d)}}}}function ir(n){return n.offsetWidth}function sr(n,l,a,t){return Math.sqrt(Math.pow(l.top-n.top,2)+Math.pow(l.left-n.left,2))/Math.sqrt(Math.pow(l.top-a.top,2)+Math.pow(l.left-a.left,2))*t.animation}var Pt=[],po={initializeByDefault:!0},yn={mount:function(l){for(var a in po)po.hasOwnProperty(a)&&!(a in l)&&(l[a]=po[a]);Pt.forEach(function(t){if(t.pluginName===l.pluginName)throw"Sortable: Cannot mount plugin ".concat(l.pluginName," more than once")}),Pt.push(l)},pluginEvent:function(l,a,t){var i=this;this.eventCanceled=!1,t.cancel=function(){i.eventCanceled=!0};var r=l+"Global";Pt.forEach(function(d){a[d.pluginName]&&(a[d.pluginName][r]&&a[d.pluginName][r](gt({sortable:a},t)),a.options[d.pluginName]&&a[d.pluginName][l]&&a[d.pluginName][l](gt({sortable:a},t)))})},initializePlugins:function(l,a,t,i){Pt.forEach(function(u){var s=u.pluginName;if(!(!l.options[s]&&!u.initializeByDefault)){var c=new u(l,a,l.options);c.sortable=l,c.options=l.options,l[s]=c,Et(t,c.defaults)}});for(var r in l.options)if(l.options.hasOwnProperty(r)){var d=this.modifyOption(l,r,l.options[r]);typeof d<"u"&&(l.options[r]=d)}},getEventProperties:function(l,a){var t={};return Pt.forEach(function(i){typeof i.eventProperties=="function"&&Et(t,i.eventProperties.call(a[i.pluginName],l))}),t},modifyOption:function(l,a,t){var i;return Pt.forEach(function(r){l[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[a]=="function"&&(i=r.optionListeners[a].call(l[r.pluginName],t))}),i}};function rr(n){var l=n.sortable,a=n.rootEl,t=n.name,i=n.targetEl,r=n.cloneEl,d=n.toEl,u=n.fromEl,s=n.oldIndex,c=n.newIndex,m=n.oldDraggableIndex,p=n.newDraggableIndex,g=n.originalEvent,v=n.putSortable,y=n.extraEventProperties;if(l=l||a&&a[Qe],!!l){var k,F=l.options,B="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!bt&&!vn?k=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(k=document.createEvent("Event"),k.initEvent(t,!0,!0)),k.to=d||a,k.from=u||a,k.item=i||a,k.clone=r,k.oldIndex=s,k.newIndex=c,k.oldDraggableIndex=m,k.newDraggableIndex=p,k.originalEvent=g,k.pullMode=v?v.lastPutMode:void 0;var I=gt(gt({},y),yn.getEventProperties(t,l));for(var A in I)k[A]=I[A];a&&a.dispatchEvent(k),F[B]&&F[B].call(l,k)}}var cr=["evt"],nt=function(l,a){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=Zs(t,cr);yn.pluginEvent.bind(De)(l,a,gt({dragEl:ve,parentEl:ze,ghostEl:Te,rootEl:$e,nextEl:_t,lastDownEl:_n,cloneEl:Ue,cloneHidden:Dt,dragStarted:an,putSortable:Ge,activeSortable:De.active,originalEvent:i,oldIndex:Kt,oldDraggableIndex:un,newIndex:lt,newDraggableIndex:It,hideGhostForTarget:Sl,unhideGhostForTarget:wl,cloneNowHidden:function(){Dt=!0},cloneNowShown:function(){Dt=!1},dispatchSortableEvent:function(u){tt({sortable:a,name:u,originalEvent:i})}},r))};function tt(n){rr(gt({putSortable:Ge,cloneEl:Ue,targetEl:ve,rootEl:$e,oldIndex:Kt,oldDraggableIndex:un,newIndex:lt,newDraggableIndex:It},n))}var ve,zt,ze,Te,on,tn,$e,_t,_n,Ue,Dt,Kt,lt,un,It,Rt,Ge,Jt=!1,Hn=!1,Un=[],ct,dt,fo,ho,Ma,Oa,an,Ht,dn,mn=!1,In=!1,An,He,go=[],Lo=!1,zn=[],nn=null,ft=null,vo=null,St=null,jn=typeof document<"u",Ut=ul,_a=vn||bt?"cssFloat":"float",ur=jn&&!dl&&!ul&&"draggable"in document.createElement("div"),vl=(function(){if(jn){if(bt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),yl=function(l,a){var t=Ne(l),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Yt(l,0,a),d=Yt(l,1,a),u=r&&Ne(r),s=d&&Ne(d),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+We(r).width,m=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+We(d).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&u.float&&u.float!=="none"){var p=u.float==="left"?"left":"right";return d&&(s.clear==="both"||s.clear===p)?"vertical":"horizontal"}return r&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||c>=i&&t[_a]==="none"||d&&t[_a]==="none"&&c+m>i)?"vertical":"horizontal"},dr=function(l,a,t){var i=t?l.left:l.top,r=t?l.right:l.bottom,d=t?l.width:l.height,u=t?a.left:a.top,s=t?a.right:a.bottom,c=t?a.width:a.height;return i===u||r===s||i+d/2===u+c/2},mr=function(l,a){var t;return Un.some(function(i){var r=i[Qe].options.emptyInsertThreshold;if(!(!r||Wo(i))){var d=We(i),u=l>=d.left-r&&l<=d.right+r,s=a>=d.top-r&&a<=d.bottom+r;if(u&&s)return t=i}}),t},kl=function(l){function a(r,d){return function(u,s,c,m){var p=u.options.group.name&&s.options.group.name&&u.options.group.name===s.options.group.name;if(r==null&&(d||p))return!0;if(r==null||r===!1)return!1;if(d&&r==="clone")return r;if(typeof r=="function")return a(r(u,s,c,m),d)(u,s,c,m);var g=(d?u:s).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var t={},i=l.group;(!i||On(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=a(i.pull,!0),t.checkPut=a(i.put),t.revertClone=i.revertClone,l.group=t},Sl=function(){!vl&&Te&&Ne(Te,"display","none")},wl=function(){!vl&&Te&&Ne(Te,"display","")};jn&&!dl&&document.addEventListener("click",function(n){if(Hn)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Hn=!1,!1},!0);var Mt=function(l){if(ve){l=l.touches?l.touches[0]:l;var a=mr(l.clientX,l.clientY);if(a){var t={};for(var i in l)l.hasOwnProperty(i)&&(t[i]=l[i]);t.clientX=l.clientX,t.clientY=l.clientY,t.pageX=l.pageX!==void 0?l.pageX:l.clientX,t.pageY=l.pageY!==void 0?l.pageY:l.clientY,t.target=t.rootEl=a,t.preventDefault=void 0,t.stopPropagation=void 0,a[Qe]._onDragOver(t)}}},pr=function(l){if(ve){var a=ke._findOwnerSortable(ve.parentNode);a&&a._isOutsideThisEl(l.target)}};function De(n,l){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=l=Et({},l),n[Qe]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yl(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(d,u){d.setData("Text",u.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:De.supportPointer!==!1&&"PointerEvent"in window&&!rn,emptyInsertThreshold:5,extOption:{boundary:{isOut:!1,element:"",x:0,y:0},wrapBody:{isWrap:!1,element:""},cross:{isCross:!1,isSameStruct:!0,dropEndBeforeCallback:null},tree:{isTree:!1,maxDepth:3,indentThreshold:20,isOnlyInnerMove:!1,isDragToChild:!0,isDragToParent:!0,rootId:"",regionCls:".darg-region"}}};yn.initializePlugins(this,n,a);for(var t in a)!(t in l)&&(l[t]=a[t]);kl(l);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=l.forceFallback?!1:ur,this.nativeDraggable&&(this.options.touchStartThreshold=1),l.supportPointer?Ae(n,"pointerdown",this._onTapStart):(Ae(n,"mousedown",this._onTapStart),Ae(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(n,"dragover",this),Ae(n,"dragenter",this)),Un.push(this.el),l.store&&l.store.get&&this.sort(l.store.get(this)||[]),Et(this,lr())}De.prototype={constructor:De,_isOutsideThisEl:function(l){!this.el.contains(l)&&l!==this.el&&(Ht=null)},_getDirection:function(l,a){return typeof this.options.direction=="function"?this.options.direction.call(this,l,a,ve):this.options.direction},_onTapStart:function(l){if(l.cancelable){var a=this,t=this.el,i=this.options,r=i.preventOnFilter,d=l.type,u=l.touches&&l.touches[0]||l.pointerType&&l.pointerType==="touch"&&l,s=(u||l).target,c=l.target.shadowRoot&&(l.path&&l.path[0]||l.composedPath&&l.composedPath()[0])||s,m=i.filter;if(wr(t),!ve&&!(/mousedown|pointerdown/.test(d)&&l.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&rn&&s&&s.tagName.toUpperCase()==="SELECT")){var p=t;if(ke.isTreeMode(i)){var g=ke._treeRegionCls(i),v=ke.getOwnerRegion(s,g);v&&(p=v)}if(s=ht(s,i.draggable,p,!1),!(s&&s.animated)&&_n!==s){if(Kt=it(s),un=it(s,i.draggable),typeof m=="function"){if(m.call(this,l,s,this)){tt({sortable:a,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),nt("filter",a,{evt:l}),r&&l.cancelable&&l.preventDefault();return}}else if(m&&(m=m.split(",").some(function(y){if(y=ht(c,y.trim(),t,!1),y)return tt({sortable:a,rootEl:y,name:"filter",targetEl:s,fromEl:t,toEl:t}),nt("filter",a,{evt:l}),!0}),m)){r&&l.cancelable&&l.preventDefault();return}i.handle&&!ht(c,i.handle,t,!1)||this._prepareDragStart(l,u,s)}}}},_prepareDragStart:function(l,a,t){var i=this,r=i.el,d=i.options,u=r.ownerDocument,s,c=!!(d.extOption&&d.extOption.tree&&d.extOption.tree.isTree),m=!1;if(t&&!ve){if(t.parentNode===r)m=!0;else if(c&&r.contains(t)){var p=ke.findNearestTreeRoot(t,r);m=p===r}}if(m){var g=We(t);if($e=r,ve=t,ze=ve.parentNode,_t=ve.nextSibling,_n=t,Rt=d.group,De.dragged=ve,ct={target:ve,clientX:(a||l).clientX,clientY:(a||l).clientY},Ma=ct.clientX-g.left,Oa=ct.clientY-g.top,this._lastX=(a||l).clientX,this._lastY=(a||l).clientY,ke.isTreeMode(d)){var v=a||l;ke._tree.startPageX=v.pageX!==void 0?v.pageX:v.clientX,ke._tree.dropInfo=null,ke._tree.startDragDepth=ke.getNodeDepth(ve,ke._treeRegionCls(d));var y=window.pageXOffset||document.documentElement.scrollLeft||0;ke._tree.startLeftPage=ve.getBoundingClientRect().left+y}if(ve.style["will-change"]="transform",s=function(){if(nt("delayEnded",i,{evt:l}),De.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Da&&i.nativeDraggable&&(ve.draggable=!0),i._triggerDragStart(l,a),tt({sortable:i,name:"choose",originalEvent:l}),at(ve,d.chosenClass,!0)},d.ignore.split(",").forEach(function(k){pl(ve,k.trim(),yo)}),Ae(u,"dragover",Mt),Ae(u,"mousemove",Mt),Ae(u,"touchmove",Mt),Ae(u,"mouseup",i._onDrop),Ae(u,"touchend",i._onDrop),Ae(u,"touchcancel",i._onDrop),Da&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ve.draggable=!0),nt("delayStart",this,{evt:l}),d.delay&&(!d.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(vn||bt))){if(De.eventCanceled){this._onDrop();return}Ae(u,"mouseup",i._disableDelayedDrag),Ae(u,"touchend",i._disableDelayedDrag),Ae(u,"touchcancel",i._disableDelayedDrag),Ae(u,"mousemove",i._delayedDragTouchMoveHandler),Ae(u,"touchmove",i._delayedDragTouchMoveHandler),d.supportPointer&&Ae(u,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,d.delay)}else s()}},_delayedDragTouchMoveHandler:function(l){var a=l.touches?l.touches[0]:l;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ve&&yo(ve),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._disableDelayedDrag),Oe(l,"touchend",this._disableDelayedDrag),Oe(l,"touchcancel",this._disableDelayedDrag),Oe(l,"mousemove",this._delayedDragTouchMoveHandler),Oe(l,"touchmove",this._delayedDragTouchMoveHandler),Oe(l,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(l,a){a=a||l.pointerType=="touch"&&l,!this.nativeDraggable||a?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):a?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(ve,"dragend",this),Ae($e,"dragstart",this._onDragStart));try{document.selection?Ln(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(l,a){if(Jt=!1,$e&&ve){nt("dragStarted",this,{evt:a}),this.nativeDraggable&&Ae(document,"dragover",pr);var t=this.options;!l&&at(ve,t.dragClass,!1),at(ve,t.ghostClass,!0),De.active=this,l&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,Sl();for(var l=document.elementFromPoint(dt.clientX,dt.clientY),a=l;l&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(dt.clientX,dt.clientY),l!==a);)a=l;var t=ke._findOwnerSortable(ve.parentNode);if(t&&t._isOutsideThisEl(l),a)do{if(a[Qe]){var i=void 0;if(i=a[Qe]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:l,rootEl:a}),i&&!this.options.dragoverBubble)break}l=a}while(a=a.parentNode);wl()}},_onTouchMove:function(l){if(ct){var a=this.options,t=a.fallbackTolerance,i=a.fallbackOffset,r=l.touches?l.touches[0]:l,d=Te&&(vo||(vo=Wt(Te,!0))),u=Te&&d&&d.a,s=Te&&d&&d.d,c,m=Ut&&He?st():null,p,g;if(Ut&&He&&(St&&St.el===He&&St.scrollLeft===He.scrollLeft&&St.scrollTop===He.scrollTop&&St.winTop===m.scrollTop&&St.winLeft===m.scrollLeft?c=St.offset:(c=Va(He),St={el:He,scrollLeft:He.scrollLeft,scrollTop:He.scrollTop,winTop:m.scrollTop,winLeft:m.scrollLeft,offset:c})),p=(r.clientX-ct.clientX+i.x)/(u||1)+(c?c[0]-go[0]:0)/(u||1),g=(r.clientY-ct.clientY+i.y)/(s||1)+(c?c[1]-go[1]:0)/(s||1),!De.active&&!Jt){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(l,!0)}if(Te){d?(d.e+=p-(fo||0),d.f+=g-(ho||0)):d={a:1,b:0,c:0,d:1,e:p,f:g};var v="matrix(".concat(d.a,",").concat(d.b,",").concat(d.c,",").concat(d.d,",").concat(d.e,",").concat(d.f,")");Ne(Te,"transform",v),fo=p,ho=g,dt=r;const F=ke.checkMoveOutBoundary(Te,this.el,this.options);if(F.isOut){var y=0;Ut||(nn==null&&(nn=st().scrollTop),y=st().scrollTop-nn),tn?(d.e=tn.e,d.f=tn.f-y):(F.top&&(d.f=F.x*-1-y),F.right&&(d.e=F.y),F.bottom&&(d.f=F.x-y),F.left&&(d.e=F.y*-1));var k="matrix(".concat(d.a,",").concat(d.b,",").concat(d.c,",").concat(d.d,",").concat(d.e,",").concat(d.f,")");Ne(Te,"transform",k)}else nn=null,tn={a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}}l.cancelable&&l.preventDefault()}},_appendGhost:function(){if(!Te){var l=this.options.fallbackOnBody?document.body:$e,a=We(ve,!0,Ut,!0,l),t=this.options;if(Ut){for(He=l;Ne(He,"position")==="static"&&Ne(He,"transform")==="none"&&He!==document;)He=He.parentNode;He!==document.body&&He!==document.documentElement?(He===document&&(He=st()),a.top+=He.scrollTop,a.left+=He.scrollLeft):He=st(),go=Va(He)}on=ve.cloneNode(!0),Te=ve.cloneNode(!0),Te=ke.setWrapBody(Te,this.el,this.options),at(Te,t.ghostClass,!1),at(Te,t.fallbackClass,!0),at(Te,t.dragClass,!0),Ne(Te,"transition",""),Ne(Te,"transform",""),Ne(Te,"box-sizing","border-box"),Ne(Te,"margin",0),Ne(Te,"top",a.top),Ne(Te,"left",a.left),Ne(Te,"width",a.width),Ne(Te,"height",a.height),Ne(Te,"opacity","0.8"),Ne(Te,"position",Ut?"absolute":"fixed"),Ne(Te,"zIndex","100000"),Ne(Te,"pointerEvents","none"),De.ghost=Te,De.ghostClone=on,l.appendChild(Te),Ne(Te,"transform-origin",Ma/parseInt(Te.style.width)*100+"% "+Oa/parseInt(Te.style.height)*100+"%")}},_onDragStart:function(l,a){var t=this,i=l.dataTransfer,r=t.options;if(nt("dragStart",this,{evt:l}),De.eventCanceled){this._onDrop();return}nt("setupClone",this),De.eventCanceled||(Ue=gl(ve),Ue.removeAttribute("id"),Ue.draggable=!1,Ue.style["will-change"]="",this._hideClone(),at(Ue,this.options.chosenClass,!1),De.clone=Ue),t.cloneId=Ln(function(){nt("clone",t),!De.eventCanceled&&(t.options.removeCloneOnHide||$e.insertBefore(Ue,ve),t._hideClone(),tt({sortable:t,name:"clone"}))}),!a&&at(ve,r.dragClass,!0),a?(Hn=!0,t._loopId=setInterval(t._emulateDragOver,50)):(Oe(document,"mouseup",t._onDrop),Oe(document,"touchend",t._onDrop),Oe(document,"touchcancel",t._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(t,i,ve)),Ae(document,"drop",t),Ne(ve,"transform","translateZ(0)")),Jt=!0,t._dragStartId=Ln(t._dragStarted.bind(t,a,l)),Ae(document,"selectstart",t),an=!0,rn&&Ne(document.body,"user-select","none")},_onDragOver:function(l){var a=this.el,t=l.target,i,r,d,u=this.options,s=u.group,c=De.active,m=Rt===s,p=u.sort,g=Ge||c,v,y=this,k=!1;if(Lo)return;if(ke.isTreeMode(u)){var F=m;if(!F&&s&&Rt){var B=!!s.name&&s.name===Rt.name;B&&(F=typeof s.checkPut=="function"?!!s.checkPut(this,c,ve,l):!0)}if(!F){ke._tree.dropInfo={isReject:!0,reason:"out-of-group"},ke.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}ke.treeDragOver(this,l,t),ke.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}function I(b,_){nt(b,y,gt({evt:l,isOwner:m,axis:v?"vertical":"horizontal",revert:d,dragRect:i,targetRect:r,canSort:p,fromSortable:g,target:t,completed:N,onMove:function(P,J){return Dn($e,a,ve,i,P,We(P),l,J)},changed:x},_))}function A(){I("dragOverAnimationCapture"),y.captureAnimationState(),y!==g&&g.captureAnimationState()}function N(b){if(I("dragOverCompleted",{insertion:b}),b&&(m?c._hideClone():c._showClone(y),y!==g&&(at(ve,Ge?Ge.options.ghostClass:c.options.ghostClass,!1),at(ve,u.ghostClass,!0)),Ge!==y&&y!==De.active?Ge=y:y===De.active&&Ge&&(Ge=null),g===y&&(y._ignoreWhileAnimating=t),y.animateAll(function(){I("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(t===ve&&!ve.animated||t===a&&!t.animated)&&(Ht=null),!u.dragoverBubble&&!l.rootEl&&t!==document){var _=ke._findOwnerSortable(ve.parentNode);_&&_._isOutsideThisEl(l.target),!b&&Mt(l)}return!u.dragoverBubble&&l.stopPropagation&&l.stopPropagation(),k=!0}function x(){lt=it(ve),It=it(ve,u.draggable),tt({sortable:y,name:"change",toEl:a,newIndex:lt,newDraggableIndex:It,originalEvent:l})}if(l.preventDefault!==void 0&&l.cancelable&&l.preventDefault(),t=ht(t,u.draggable,a,!0),I("dragOver"),De.eventCanceled)return k;if(ve.contains(l.target)||t.animated&&t.animatingX&&t.animatingY||y._ignoreWhileAnimating===t)return N(!1);if(Hn=!1,c&&!u.disabled&&(m?p||(d=ze!==$e):Ge===this||(this.lastPutMode=Rt.checkPull(this,c,ve,l))&&s.checkPut(this,c,ve,l))){if(v=this._getDirection(l,t)==="vertical",i=We(ve),I("dragOverValid"),De.eventCanceled)return k;if(d)return ze=$e,A(),this._hideClone(),I("revert"),De.eventCanceled||(ke.setCrossEl(t,this.options),_t?$e.insertBefore(ve,_t):$e.appendChild(ve)),N(!0);var V=Wo(a,u.draggable);if(!V||vr(l,v,this)&&!V.animated){if(V===ve)return N(!1);if(V&&a===l.target&&(t=V),t&&(r=We(t)),Dn($e,a,ve,i,t,r,l,!!t)!==!1)return A(),ke.setCrossEl(t,this.options),V&&V.nextSibling?a.insertBefore(ve,V.nextSibling):a.appendChild(ve),ze=a,x(),N(!0)}else if(V&&gr(l,v,this)){var w=Yt(a,0,u,!0);if(w===ve)return N(!1);if(t=w,r=We(t),Dn($e,a,ve,i,t,r,l,!1)!==!1)return A(),ke.setCrossEl(t,this.options),a.insertBefore(ve,w),ze=a,x(),N(!0)}else if(t.parentNode===a){r=We(t);var M=0,C,T=ve.parentNode!==a,U=!dr(ve.animated&&ve.toRect||i,t.animated&&t.toRect||r,v),Z=v?"top":"left",z=Na(t,"top","top")||Na(ve,"top","top"),H=z?z.scrollTop:void 0;Ht!==t&&(C=r[Z],mn=!1,In=!U&&u.invertSwap||T),M=yr(l,t,r,v,U?1:u.swapThreshold,u.invertedSwapThreshold==null?u.swapThreshold:u.invertedSwapThreshold,In,Ht===t);var S;if(M!==0){var E=it(ve);do E-=M,S=ze.children[E];while(S&&(Ne(S,"display")==="none"||S===on))}if(M===0||S===t)return N(!1);Ht=t,dn=M;var f=t.nextElementSibling,D=!1;D=M===1;var h=Dn($e,a,ve,i,t,r,l,D);if(h!==!1)return(h===1||h===-1)&&(D=h===1),Lo=!0,setTimeout(hr,30),A(),ke.setCrossEl(t,this.options),D&&!f?a.appendChild(ve):t.parentNode.insertBefore(ve,D?f:t),z&&hl(z,0,H-z.scrollTop),ze=ve.parentNode,C!==void 0&&!In&&(An=Math.abs(C-We(t)[Z])),x(),N(!0)}if(a.contains(ve))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Oe(document,"mousemove",this._onTouchMove),Oe(document,"touchmove",this._onTouchMove),Oe(document,"pointermove",this._onTouchMove),Oe(document,"dragover",Mt),Oe(document,"mousemove",Mt),Oe(document,"touchmove",Mt)},_offUpEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._onDrop),Oe(l,"touchend",this._onDrop),Oe(l,"pointerup",this._onDrop),Oe(l,"touchcancel",this._onDrop),Oe(document,"selectstart",this)},_onDrop:function(l){ke.crossDropEnd(this.options,this.el).then(a=>{if(!this.el){this._nulling();return}if(a){var t=this.el,i=this.options;if(lt=it(ve),It=it(ve,i.draggable),nt("drop",this,{evt:l}),ze=ve&&ve.parentNode,lt=it(ve),It=it(ve,i.draggable),ke.isTreeMode(i)&&typeof i.onUpdate=="function"&&i.onUpdate(),De.eventCanceled){this._nulling();return}Jt=!1,In=!1,mn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$o(this.cloneId),$o(this._dragStartId),this.nativeDraggable&&(Oe(document,"drop",this),Oe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rn&&Ne(document.body,"user-select",""),Ne(ve,"transform",""),l&&(an&&(l.cancelable&&l.preventDefault(),!i.dropBubble&&l.stopPropagation()),Te&&Te.parentNode&&Te.parentNode.removeChild(Te),($e===ze||Ge&&Ge.lastPutMode!=="clone")&&Ue&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),ve&&(this.nativeDraggable&&Oe(ve,"dragend",this),yo(ve),ve.style["will-change"]="",an&&!Jt&&at(ve,Ge?Ge.options.ghostClass:this.options.ghostClass,!1),at(ve,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:ze,newIndex:null,newDraggableIndex:null,originalEvent:l}),$e!==ze?(lt>=0&&(tt({rootEl:ze,name:"add",toEl:ze,fromEl:$e,originalEvent:l}),tt({sortable:this,name:"remove",toEl:ze,originalEvent:l}),tt({rootEl:ze,name:"sort",toEl:ze,fromEl:$e,originalEvent:l}),tt({sortable:this,name:"sort",toEl:ze,originalEvent:l})),Ge&&Ge.save()):lt!==Kt&&lt>=0&&(tt({sortable:this,name:"update",toEl:ze,originalEvent:l}),tt({sortable:this,name:"sort",toEl:ze,originalEvent:l})),De.active&&((lt==null||lt===-1)&&(lt=Kt,It=un),tt({sortable:this,name:"end",toEl:ze,originalEvent:l}),this.save()))),this._nulling()}})},_nulling:function(){nt("nulling",this),$e=ve=zt=ze=Te=on=_t=Ue=_n=Dt=ct=dt=an=lt=It=Kt=un=Ht=dn=Ge=Rt=De.dragged=De.ghost=De.ghostClone=De.clone=De.active=tn=nn=vo=St=null,ke._clearHiddenBox(),ke.resetTreeState(),zn.forEach(function(l){l.checked=!0}),zn.length=fo=ho=0},handleEvent:function(l){switch(l.type){case"drop":case"dragend":this._onDrop(l);break;case"dragenter":case"dragover":ve&&(this._onDragOver(l),fr(l));break;case"selectstart":l.preventDefault();break}},toArray:function(l){for(var a=[],t,i=this.el.children,r=0,d=i.length,u=this.options;r<d;r++)t=i[r],ht(t,u.draggable,this.el,!1)&&a.push(t.getAttribute(u.dataIdAttr)||Sr(t));return a},sort:function(l,a){var t={},i=this.el;this.toArray().forEach(function(r,d){var u=i.children[d];ht(u,this.options.draggable,i,!1)&&(t[r]=u)},this),a&&this.captureAnimationState(),l.forEach(function(r){t[r]&&(i.removeChild(t[r]),i.appendChild(t[r]))}),a&&this.animateAll()},save:function(){var l=this.options.store;l&&l.set&&l.set(this)},closest:function(l,a){return ht(l,a||this.options.draggable,this.el,!1)},option:function(l,a){var t=this.options;if(a===void 0)return t[l];var i=yn.modifyOption(this,l,a);typeof i<"u"?t[l]=i:t[l]=a,l==="group"&&kl(t)},destroy:function(){nt("destroy",this);var l=this.el;l[Qe]=null,Oe(l,"mousedown",this._onTapStart),Oe(l,"touchstart",this._onTapStart),Oe(l,"pointerdown",this._onTapStart),this.nativeDraggable&&(Oe(l,"dragover",this),Oe(l,"dragenter",this)),Array.prototype.forEach.call(l.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._offMoveEvents(),this._offUpEvents(),this._onDrop(),Te&&Te.parentNode&&(Te.parentNode.removeChild(Te),Te=null),this._disableDelayedDragEvents(),Un.splice(Un.indexOf(this.el),1),this.el=l=null},_hideClone:function(){if(!Dt){if(nt("hideClone",this),De.eventCanceled)return;Ne(Ue,"display","none"),this.options.removeCloneOnHide&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),Dt=!0}},_showClone:function(l){if(l.lastPutMode!=="clone"){this._hideClone();return}if(Dt){if(nt("showClone",this),De.eventCanceled)return;ve.parentNode==$e&&!this.options.group.revertClone?$e.insertBefore(Ue,ve):_t?$e.insertBefore(Ue,_t):$e.appendChild(Ue),this.options.group.revertClone&&this.animate(ve,Ue),Ne(Ue,"display",""),Dt=!1}}};function fr(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Dn(n,l,a,t,i,r,d,u){var s,c=n[Qe],m=c.options.onMove,p;return window.CustomEvent&&!bt&&!vn?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=l,s.from=n,s.dragged=a,s.draggedRect=t,s.related=i||l,s.relatedRect=r||We(l),s.willInsertAfter=u,s.originalEvent=d,n.dispatchEvent(s),m&&(p=m.call(c,s,d)),p}function yo(n){n.draggable=!1}function hr(){Lo=!1}function gr(n,l,a){var t=We(Yt(a.el,0,a.options,!0)),i=10;return l?n.clientX<t.left-i||n.clientY<t.top&&n.clientX<t.right:n.clientY<t.top-i||n.clientY<t.bottom&&n.clientX<t.left}function vr(n,l,a){var t=We(Wo(a.el,a.options.draggable)),i=10;return l?n.clientX>t.right+i||n.clientX<=t.right&&n.clientY>t.bottom&&n.clientX>=t.left:n.clientX>t.right&&n.clientY>t.top||n.clientX<=t.right&&n.clientY>t.bottom+i}function yr(n,l,a,t,i,r,d,u){var s=t?n.clientY:n.clientX,c=t?a.height:a.width,m=t?a.top:a.left,p=t?a.bottom:a.right,g=!1;if(!d){if(u&&An<c*i){if(!mn&&(dn===1?s>m+c*r/2:s<p-c*r/2)&&(mn=!0),mn)g=!0;else if(dn===1?s<m+An:s>p-An)return-dn}else if(s>m+c*(1-i)/2&&s<p-c*(1-i)/2)return kr(l)}return g=g||d,g&&(s<m+c*r/2||s>p-c*r/2)?s>m+c/2?1:-1:0}function kr(n){return it(ve)<it(n)?1:-1}function Sr(n){for(var l=n.tagName+n.className+n.src+n.href+n.textContent,a=l.length,t=0;a--;)t+=l.charCodeAt(a);return t.toString(36)}function wr(n){zn.length=0;for(var l=n.getElementsByTagName("input"),a=l.length;a--;){var t=l[a];t.checked&&zn.push(t)}}function Ln(n){return setTimeout(n,0)}function $o(n){return clearTimeout(n)}jn&&Ae(document,"touchmove",function(n){(De.active||Jt)&&n.cancelable&&n.preventDefault()});De.utils={on:Ae,off:Oe,css:Ne,find:pl,is:function(l,a){return!!ht(l,a,l,!1)},extend:or,throttle:fl,closest:ht,toggleClass:at,clone:gl,index:it,nextTick:Ln,cancelNextTick:$o,detectDirection:yl,getChild:Yt};De.get=function(n){return n[Qe]};De.mount=function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];l[0].constructor===Array&&(l=l[0]),l.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(De.utils=gt(gt({},De.utils),t.utils)),yn.mount(t)})};De.create=function(n,l){return new De(n,l)};De.version=er;var Ke=[],ln,Fo,Po=!1,ko,So,Jn,sn;function Cr(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this))}return n.prototype={dragStarted:function(a){var t=a.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var t=a.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Oe(document,"dragover",this._handleAutoScroll):(Oe(document,"pointermove",this._handleFallbackAutoScroll),Oe(document,"touchmove",this._handleFallbackAutoScroll),Oe(document,"mousemove",this._handleFallbackAutoScroll)),Aa(),$n(),ar()},nulling:function(){Jn=Fo=ln=Po=sn=ko=So=null,Ke.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,t){var i=this,r=(a.touches?a.touches[0]:a).clientX,d=(a.touches?a.touches[0]:a).clientY,u=document.elementFromPoint(r,d);if(Jn=a,t||this.options.forceAutoScrollFallback||vn||bt||rn){wo(a,this.options,u,t);var s=Tt(u,!0);Po&&(!sn||r!==ko||d!==So)&&(sn&&Aa(),sn=setInterval(function(){var c=Tt(document.elementFromPoint(r,d),!0);c!==s&&(s=c,$n()),wo(a,i.options,c,t)},10),ko=r,So=d)}else{if(!this.options.bubbleScroll||Tt(u,!0)===st()){$n();return}wo(a,this.options,Tt(u,!1),!1)}}},Et(n,{pluginName:"scroll",initializeByDefault:!0})}function $n(){Ke.forEach(function(n){clearInterval(n.pid)}),Ke=[]}function Aa(){clearInterval(sn)}var wo=fl(function(n,l,a,t){if(l.scroll){var i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,d=l.scrollSensitivity,u=l.scrollSpeed,s=st(),c=!1,m;Fo!==a&&(Fo=a,$n(),ln=l.scroll,m=l.scrollFn,ln===!0&&(ln=Tt(a,!0)));var p=0,g=ln;do{var v=g,y=We(v),k=y.top,F=y.bottom,B=y.left,I=y.right,A=y.width,N=y.height,x=void 0,V=void 0,w=v.scrollWidth,M=v.scrollHeight,C=Ne(v),T=v.scrollLeft,U=v.scrollTop;v===s?(x=A<w&&(C.overflowX==="auto"||C.overflowX==="scroll"||C.overflowX==="visible"),V=N<M&&(C.overflowY==="auto"||C.overflowY==="scroll"||C.overflowY==="visible")):(x=A<w&&(C.overflowX==="auto"||C.overflowX==="scroll"),V=N<M&&(C.overflowY==="auto"||C.overflowY==="scroll"));var Z=x&&(Math.abs(I-i)<=d&&T+A<w)-(Math.abs(B-i)<=d&&!!T),z=V&&(Math.abs(F-r)<=d&&U+N<M)-(Math.abs(k-r)<=d&&!!U);if(!Ke[p])for(var H=0;H<=p;H++)Ke[H]||(Ke[H]={});(Ke[p].vx!=Z||Ke[p].vy!=z||Ke[p].el!==v)&&(Ke[p].el=v,Ke[p].vx=Z,Ke[p].vy=z,clearInterval(Ke[p].pid),(Z!=0||z!=0)&&(c=!0,Ke[p].pid=setInterval(function(){t&&this.layer===0&&De.active._onTouchMove(Jn);var S=Ke[this.layer].vy?Ke[this.layer].vy*u:0,E=Ke[this.layer].vx?Ke[this.layer].vx*u:0;typeof m=="function"&&m.call(De.dragged.parentNode[Qe],E,S,n,Jn,Ke[this.layer].el)!=="continue"||hl(Ke[this.layer].el,E,S)}.bind({layer:p}),24))),p++}while(l.bubbleScroll&&g!==s&&(g=Tt(g,!1)));Po=c}},30),Cl=function(l){var a=l.originalEvent,t=l.putSortable,i=l.dragEl,r=l.activeSortable,d=l.dispatchSortableEvent,u=l.hideGhostForTarget,s=l.unhideGhostForTarget;if(a){var c=t||r;u();var m=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,p=document.elementFromPoint(m.clientX,m.clientY);s(),c&&!c.el.contains(p)&&(d("spill"),this.onSpill({dragEl:i,putSortable:t}))}};function jo(){}jo.prototype={startIndex:null,dragStart:function(l){var a=l.oldDraggableIndex;this.startIndex=a},onSpill:function(l){var a=l.dragEl,t=l.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var i=Yt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(a,i):this.sortable.el.appendChild(a),this.sortable.animateAll(),t&&t.animateAll()},drop:Cl};Et(jo,{pluginName:"revertOnSpill"});function Yo(){}Yo.prototype={onSpill:function(l){var a=l.dragEl,t=l.putSortable,i=t||this.sortable;i.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),i.animateAll()},drop:Cl};Et(Yo,{pluginName:"removeOnSpill"});const ke={isBoolean:n=>typeof n=="boolean",isFunction:n=>typeof n=="function",isUndefined:n=>typeof n>"u"||n===null,isFiniteNumber:n=>typeof n=="number"&&isFinite(n),getOffset:n=>{const l=n.getBoundingClientRect(),t=(n&&n.ownerDocument).documentElement;let i;if(t.toString()!=="[object Window]"){const r=n.ownerDocument;i=r&&r.defaultView||window}else i=t;return{top:l.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:l.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:l.width,height:l.height}},createElement:n=>{if(n.substring(0,1)==="<"){const a=document.createElement("div");return a.innerHTML=n,a.children[0]}else return document.createElement(n)},getElementData:(n,l)=>{const a=[],t=n.children,i=t.length;let r;for(let d=0;d<i;d++){r=t[d];const u=r.getAttribute(l.dataIdAttr);u&&u.length>0&&a.push(u)}return a},_getHiddenBox:()=>(ft||(ft=document.createElement("div"),ft.style.cssText="position:fixed;left:-99999px;top:0;width:1px;height:1px;overflow:hidden;pointer-events:none;",document.body.appendChild(ft)),ft),_moveToHiddenBox:n=>{n&&n.parentNode&&ke._getHiddenBox().appendChild(n)},_clearHiddenBox:()=>{ft&&ft.parentNode&&(ft.parentNode.removeChild(ft),ft=null)},checkMoveOutBoundary:(n,l,a)=>{let t=!0,i={};const r=a.extOption.boundary;if(r){let d=r.isOut;if(d=ke.isBoolean(d)?d:!0,!d){let u;if(r.element&&r.element.length>0){const s=window.document.querySelector(r.element);s&&(u=ke.getOffset(s))}else u=ke.getOffset(l);if(u){const s=ke.getOffset(n);let c=Number(r.x);isNaN(c)&&(c=0);let m=Number(r.y);isNaN(m)&&(m=0);const p=u.top-c>s.top,g=u.left+u.width+m<s.left+s.width,v=u.top+u.height+c<s.top+s.height,y=u.left-m>s.left;t=!(p||g||v||y),t||(i={top:p,right:g,bottom:v,left:y,x:c,y:m})}}}return i.isOut=!t,i},setWrapBody:(n,l,a)=>{let t=n,i=a.extOption.wrapBody;if(a.fallbackOnBody&&(i?a.extOption.wrapBody.isWrap=!0:a.extOption.wrapBody={isWrap:!0},i=a.extOption.wrapBody),i){let r=i.isWrap;if(r=ke.isBoolean(r)?r:!1,r)if(i.element&&i.element.length>0)t=ke.createElement(i.element),t.appendChild(n);else switch(t=l.cloneNode(),t.appendChild(n),t.tagName.toLocaleLowerCase()){case"tbody":const d=l.parentNode.cloneNode();d.appendChild(t),t=d;break}}return t},checkCross:(n,l,a)=>{const t=a.extOption.cross;let i={newEl:null,isSameStruct:!0};if(t){let r=t.isCross;if(r=ke.isBoolean(r)?r:!1,n.parentNode===l.parentNode&&(r=!1),r){let d=t.isSameStruct;if(d=ke.isBoolean(d)?d:!0,!d){const u=l.tagName.toLocaleLowerCase(),s=ke.createElement(u),c=[],m=["darg-select","darg-placeholder"];switch(l.className.split(" ").forEach(p=>{m.indexOf(p)===-1&&c.push(p)}),c.push(...m),s.className=c.join(" "),Ne(s,"height",l.clientHeight),u){case"tr":let p=0;for(let v=0;v<l.children.length;v++){const y=l.children[v].getAttribute("colspan");p+=ke.isUndefined(y)?1:Number(y)}const g=ke.createElement("td");g.setAttribute("colspan",p),s.appendChild(g);break}i.isSameStruct=!1,i.newEl=s}}}return i},setCrossEl:(n,l)=>{var a=ke.checkCross(ve,n,l);if(!a.isSameStruct){const t=ve.cloneNode(!0);ke._moveToHiddenBox(ve),zt?(ve=zt,zt=null):ve=a.newEl,zt||(zt=t)}},crossDropEnd:(n,l)=>new Promise((a,t)=>{const i=n.extOption.cross;let r=!1;const d=ve&&ve.parentNode;if(i){let s=i.isCross;if(s=ke.isBoolean(s)?s:!1,s){let c=!1;if(d)if(ke.isTreeMode(n)){var u=l||De.active&&De.active.el||n.el;c=!!u&&!u.contains(ve)}else c=$e!==d;c&&i.dropEndBeforeCallback&&(r=!0)}}if(r){const s=on||ve,c=s&&s.getAttribute?s.getAttribute(n.dataIdAttr):null,m=ke.getElementData(d,n),p=i.dropEndBeforeCallback({data:c,inx:it(ve),arrSortId:m});if(p&&p.then&&ke.isFunction(p.then))ke._crossDropLoad(!0),p.then(g=>{ke._crossDropLoad(!1);const v=ke._crossDropEndCb(g);a({success:v})});else{const g=ke._crossDropEndCb(p);a({success:g})}}else a({success:!0})}),_crossDropLoad:n=>{let l;const a=ve.tagName.toLocaleLowerCase();if(ve.children.length===0)l=ve;else switch(a){case"tr":l=ve.children[0];break}if(n){const t=ke.createElement("div");t.className="panel-darg-loading",t.innerHTML='<div class="darg-add-loading"></div>',l.appendChild(t)}else{const t=ve.querySelector(".panel-darg-loading");t&&t.parentNode&&t.parentNode.removeChild(t)}},_crossDropEndCb:n=>{var l=ke.isBoolean(n)?n:!0;return l&&ve&&ve.parentNode&&ve.parentNode.removeChild(ve),l},_tree:{startPageX:0,startDragDepth:null,startLeftPage:null,depthCache:null,dropInfo:null},_findOwnerSortable:n=>{for(var l=n;l;){var a=l[Qe];if(a&&ke.isFunction(a._isOutsideThisEl))return a;l=l.parentNode}return null},_treeRegionCls:n=>n&&n.extOption&&n.extOption.tree&&n.extOption.tree.regionCls||".darg-region",isTreeMode:n=>!!(n&&n.extOption&&n.extOption.tree&&n.extOption.tree.isTree),findNearestTreeRoot:(n,l)=>{for(var a=n;a;){if(a[Qe]&&a[Qe].options&&ke.isTreeMode(a[Qe].options))return a;a=a.parentNode}return l},getNodeDepth:(n,l)=>{for(var a=0,t=n;t&&(t.matches&&t.matches(l)&&a++,!(t.matches&&t[Qe]&&t[Qe].options));)t=t.parentNode;return a},getOwnerRegion:(n,l)=>{for(var a=n.parentNode;a;){if(a.matches&&a.matches(l))return a;a=a.parentNode}return null},getChildRegion:(n,l)=>{for(var a=n.children||[],t=0;t<a.length;t++)if(a[t].matches&&a[t].matches(l))return a[t];return null},findSiblingFallback:(n,l)=>{var a="data-id",t=v=>!!v&&v.getAttribute&&v.getAttribute(a)!==null,i=n&&n.parentNode;if(i){var r=Array.from(i.children).filter(v=>t(v)&&v!==n&&!n.contains(v));if(r.length){var d=l&&l.getBoundingClientRect?l.getBoundingClientRect():null;if(d)for(var u=d.top+d.height/2,s=0;s<r.length;s++){var c=r[s].getBoundingClientRect();if(u>=c.top&&u<=c.bottom)return r[s]}return r[0]}}for(var m=i,p=0;m&&p++<20;){var g=m.parentNode;if(t(g)&&g!==n&&!n.contains(g))return g;m=g?g.parentNode:null}return null},resolveTreeDrop:(n,l,a,t,i)=>{for(var r=t.extOption.tree||{},d=ke._treeRegionCls(t),u={isReject:!1,reason:"",targetDepth:0,hoverNode:null,intent:"same"},s=t.dataIdAttr||"data-id",c=l;c&&c!==t.el&&!(c.getAttribute&&c.getAttribute(s)!==null);)c=c.parentNode;if(!c||c===t.el)return u.isReject=!0,u.reason="no-node",u;if(c===n||n.contains(c)){var m=ke.findSiblingFallback(n,l);m&&(c=m)}if(u.hoverNode=c,n.contains(c))return u.isReject=!0,u.reason="cycle",u;if(r.isOnlyInnerMove){var p=ke.findNearestTreeRoot(n,null),g=ke.findNearestTreeRoot(c,null);if(p!==g)return u.isReject=!0,u.reason="out-of-group",u}var v=ke.getOwnerRegion(c,d),y=v?ke.getNodeDepth(c,d):1;y<1&&(y=1);var k=Number(r.indentThreshold);(isNaN(k)||k<=0)&&(k=20);var F=window.pageXOffset||document.documentElement.scrollLeft||0,B=c.getBoundingClientRect().left+F,I=B-(y-1)*k,A=1+Math.round((i-I)/k);A<1&&(A=1);var N=Number(r.maxDepth);isNaN(N)&&(N=3);var x=ke._tree.startDragDepth!==null&&ke._tree.startDragDepth!==void 0?ke._tree.startDragDepth:ke.getNodeDepth(n,d),V=A,w=!1;return V>x&&!r.isDragToChild&&(V=x,w=!0),V<x&&!r.isDragToParent&&(V=x,w=!0),N>0&&V>N&&(V=N,V<x&&(V=x)),u.targetDepth=V,u.isDepthForced=w,V>x?u.intent="child":V<x?u.intent="parent":u.intent="same",u.dragDepth=x,u.hoverDepth=y,u},resolveTreeInsert:(n,l,a,t)=>{var i=ke._treeRegionCls(a),r={container:null,refNode:null};if(!l)return r;if(n.intent==="child"){var d=ke.getChildRegion(l,i);return d||(d=ke.createChildRegion(l,a)),r.container=d,r.refNode=ke.findInsertRef(d,t,a),r}for(var u=n.targetDepth!==void 0?n.targetDepth:n.hoverDepth,s=l,c=n.hoverDepth;s&&c>u;){var m=ke.getOwnerRegion(s,i);if(!m||!m.parentNode)break;var p=m.parentNode;if(!p.getAttribute||p.getAttribute(a.dataIdAttr||"data-id")===null)break;s=p,c--}for(;s&&c<u;){var g=ke.getChildRegion(s,i);if(!g)break;if(s=g,c++,c<u){for(var v=null,y=g.children||[],k=0;k<y.length;k++)y[k].getAttribute&&y[k].getAttribute(a.dataIdAttr||"data-id")!==null&&y[k]!==ve&&(v=y[k]);if(!v){c--;break}s=v}}var F;s&&s.matches&&s.matches(i)?F=s:F=ke.getOwnerRegion(s,i);var B=n.isDepthForced===!0;if(B&&c!==u){var I=ke.getOwnerRegion(ve,i);if(I)return r.container=I,r.refNode=ke.findInsertRef(I,t,a),r}return F&&(r.container=F,r.refNode=ke.findInsertRef(F,t,a)),r},findInsertRef:(n,l,a)=>{for(var t=a.dataIdAttr||"data-id",i=[],r=n.children||[],d=0;d<r.length;d++){var u=r[d];u.getAttribute&&u.getAttribute(t)!==null&&u!==ve&&i.push(u)}for(var s=0;s<i.length;s++){var c=i[s].getBoundingClientRect(),m=c.top+c.height/2;if(l<m)return i[s]}return null},createChildRegion:(n,l)=>{var a=ke._treeRegionCls(l),t=ke.getOwnerRegion(n,a),i=t?t.tagName.toLocaleLowerCase():"ul",r=ke.createElement(i),d=a.charAt(0)==="."?a.slice(1):a;return r.className=d+" "+ke.TREE_AUTO_REGION_CLS,n.appendChild(r),r},TREE_AUTO_REGION_CLS:"darg-region-auto",cleanupEmptyAutoRegions:n=>{var l=n||document;if(!(!l||!l.querySelectorAll))for(var a=l.querySelectorAll("."+ke.TREE_AUTO_REGION_CLS),t=a.length-1;t>=0;t--){for(var i=a[t],r=!1,d=i.children||[],u=0;u<d.length;u++)if(d[u].getAttribute&&d[u].getAttribute("data-id")!==null){r=!0;break}r||ve&&(i===ve.parentNode||i.contains(ve))||i.parentNode&&i.parentNode.removeChild(i)}},treeDragOver:(n,l,a)=>{var t=n.options,i=l.clientX,r=l.clientY;if(!ke.isFiniteNumber(i)||!ke.isFiniteNumber(r))if(ct&&ke.isFiniteNumber(ct.clientX)&&ke.isFiniteNumber(ct.clientY))i=ct.clientX,r=ct.clientY;else return!1;var d=l.pageX!==void 0&&ke.isFiniteNumber(l.pageX)?l.pageX:i,u=document.elementFromPoint(i,r),s=u||a;s&&(s===ve||s.closest(".sortable-fallback"))&&(s=a);var c=ke.resolveTreeDrop(ve,s,l,t,d);if(ke._tree.dropInfo=c,c.isReject)return!1;var m=ke.resolveTreeInsert(c,c.hoverNode,t,r);if(!m.container)return!1;if(ve.contains(m.container))return ke._tree.dropInfo={isReject:!0,reason:"cycle-container"},!1;if(m.container===ve.parentNode&&(m.refNode===ve||m.refNode===ve.nextSibling))return!1;var p=m.refNode;return p?m.container.insertBefore(ve,p):m.container.appendChild(ve),ke.cleanupEmptyAutoRegions(n.el||document),!0},renderTreeIndicator:(n,l)=>{var a=n.options,t=ke._tree.dropInfo,i=document.body,r=i.querySelector(".darg-tree-indicator");if(!t||t.isReject||!t.hoverNode){r&&r.parentNode&&r.parentNode.removeChild(r);return}r||(r=ke.createElement("div"),r.className="darg-tree-indicator",i.appendChild(r)),ke._treeRegionCls(a);var d=t.hoverNode.getBoundingClientRect(),u=Number(a.extOption.tree.indentThreshold)||20,s=(t.targetDepth-t.hoverDepth)*u,c=d.left+s,m=d.width-s;m<20&&(m=20);var p=t.intent==="child"?d.bottom-1:d.top;r.style.cssText="position:fixed;pointer-events:none;z-index:100001;height:2px;background:#409eff;left:"+c+"px;top:"+p+"px;width:"+m+"px;border-radius:1px;"},clearTreeIndicator:()=>{var n=document.querySelector(".darg-tree-indicator");n&&n.parentNode&&n.parentNode.removeChild(n),ke._tree.dropInfo=null},resetTreeState:()=>{ke._tree.startPageX=0,ke._tree.startDragDepth=null,ke._tree.startLeftPage=null,ke._tree.depthCache=null,ke._tree.dropInfo=null,ke.clearTreeIndicator(),ke.cleanupEmptyAutoRegions(document)}};De.mount(new Cr);De.mount(Yo,jo);const Er=["id"],El=e.defineComponent({name:"ClDarg",__name:"Index",props:{id:String,className:String,group:[String,Object],dargRegionCls:{type:String,default:".darg-region"},handleCls:{type:String,default:".darg-handle"},selectCls:{type:String,default:"darg-select"},placeholderCls:{type:String,default:"darg-placeholder"},isBoundaryOut:{type:Boolean,default:!0},boundaryElement:String,isWrapBody:{type:Boolean,default:!0},wrapBodyElement:String,isDisabledInner:{type:Boolean,default:!1},isDisabledOutsideInto:{type:Boolean,default:!1},isGroupSameStruct:{type:Boolean,default:!0},keyAttrId:{type:String,default:"data-id"},animation:{type:Number,default:150},groupDropEndBeforeCallback:Function,isTree:{type:Boolean,default:!1},maxDepth:{type:Number,default:3},indentThreshold:{type:Number,default:20},isOnlyInnerMove:{type:Boolean,default:!1},isDragToChild:{type:Boolean,default:!0},isDragToParent:{type:Boolean,default:!0}},emits:{onChangeSort:n=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTop"),u={sortableObj:null},s=e.computed(()=>{let v={"panel-darg":!0};return v=o.getJsonMerge(v,de.getClassNameJson(t.className)),v}),c=()=>{const v=d.value;if(!v)return[];const y=t.keyAttrId||"data-id",k=t.dargRegionCls||".darg-region",F=A=>{const N={id:A.getAttribute(y)||"",children:[]};return Array.from(A.children).filter(V=>V.matches&&V.matches(k)).forEach(V=>{Array.from(V.children).forEach(w=>{w.matches&&w.matches("li,[data-id]")&&N.children.push(F(w))})}),N},B=[];return Array.from(v.querySelectorAll(k)).filter(A=>{let N=A.parentElement;for(;N&&N!==v;){if(N.matches&&N.matches(k))return!1;N=N.parentElement}return!0}).forEach(A=>{Array.from(A.children).forEach(N=>{N.matches&&N.matches("li,[data-id]")&&B.push(F(N))})}),B},m=()=>{if(t.isTree){i("onChangeSort",c());return}const v=u.sortableObj?.toArray?.()||[];i("onChangeSort",v)},p=()=>{e.nextTick(()=>{let v=null;try{if(v=d.value?.querySelector(t.dargRegionCls||".darg-region"),!v){Se.warn("ClDarg","未找到拖拽区域元素:",t.dargRegionCls||".darg-region"),i("onError","未找到拖拽区域元素");return}const{group:y,placeholderCls:k,handleCls:F,selectCls:B,isBoundaryOut:I,boundaryElement:A,isWrapBody:N,wrapBodyElement:x,isDisabledInner:V,isDisabledOutsideInto:w,isGroupSameStruct:M,groupDropEndBeforeCallback:C,keyAttrId:T,isTree:U,maxDepth:Z,indentThreshold:z,isOnlyInnerMove:H,isDragToChild:S,isDragToParent:E}=t;let f=M;U&&!M&&(f=!0,Se.warn("ClDarg","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true(原值 false 被忽略)"),i("onError","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true"));const D={sort:!V,forceFallback:!0,fallbackOnBody:N,fallbackTolerance:0,handle:F,ghostClass:k,chosenClass:B,dragClass:"darg-moveing",animation:t.animation,dataIdAttr:T,extOption:{boundary:{isOut:I,element:A,x:5,y:20},wrapBody:{isWrap:N,element:x},cross:{isCross:!1,isSameStruct:f,dropEndBeforeCallback:C||null},tree:{isTree:U,maxDepth:Z,indentThreshold:z,isOnlyInnerMove:H,isDragToChild:S,isDragToParent:E,rootId:r||""}},onUpdate:()=>{m()}};if(y&&!o.isEmpty(y))if(D.extOption.cross.isCross=!0,w){const h=o.isObject(y)?y.name:y;D.group={name:h,pull:"clone",put:!1},D.animation=0}else D.group=y;u.sortableObj=new De(v,D)}catch(y){Se.warn("ClDarg","Sortable 初始化失败:",y),i("onError","拖拽组件初始化失败")}})};return e.onMounted(()=>{p()}),e.onUpdated(()=>{if(!u.sortableObj)return;const v=d.value?.querySelector(t.dargRegionCls||".darg-region");if(v&&u.sortableObj.el!==v){try{u.sortableObj.destroy()}catch(y){Se.warn("ClDarg","重建前销毁旧实例失败:",y)}u.sortableObj=null,p()}}),e.onBeforeUnmount(()=>{if(u.sortableObj){try{u.sortableObj.destroy()}catch(v){Se.warn("ClDarg","销毁拖拽实例失败:",v)}u.sortableObj=null}}),l({getArrSort:()=>t.isTree?c():u.sortableObj?.toArray?u.sortableObj.toArray():[]}),(v,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTop",ref:d,id:e.unref(r),class:e.normalizeClass(s.value)},[e.renderSlot(v.$slots,"default")],10,Er))}}),br=["id"],xr={key:0,class:"divider-text"},bl=e.defineComponent({name:"ClDivider",__name:"Index",props:{id:String,className:String,dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center",validator:n=>["center","left","right"].indexOf(n)!==-1},margin:{type:[Number,String],default:16},theme:{type:String,default:"default"},lineColor:String,textColor:String},emits:["onClick"],setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.useSlots(),d=e.computed(()=>{const m=r.default?.();return Array.isArray(m)&&m.length>0}),u=e.computed(()=>{const m={"panel-divider":!0,"panel-divider--dashed":a.dashed,"panel-divider--hairline":a.hairline,"panel-divider--left":a.contentPosition==="left","panel-divider--right":a.contentPosition==="right","panel-divider--text":d.value,"panel-divider--gold":a.theme==="gold"};return o.getJsonMerge(m,de.getClassNameJson(a.className))}),s=e.computed(()=>{const m=a.margin,p=o.isFinite(m)?`${m}px`:String(m??""),g={marginLeft:p,marginRight:p};return o.isNonEmptyString(a.lineColor)&&(g["--divider-line-color"]=a.lineColor),o.isNonEmptyString(a.textColor)&&(g["--divider-text-color"]=a.textColor),g}),c=()=>{t("onClick")};return(m,p)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(u.value),style:e.normalizeStyle(s.value),onClick:c},[d.value?(e.openBlock(),e.createElementBlock("span",xr,[e.renderSlot(m.$slots,"default")])):e.createCommentVNode("",!0)],14,br))}}),Br=["id"],Ir=["title"],qo=e.defineComponent({name:"ClEllipsis",directives:{cltooltip:ut},__name:"Index",props:{id:String,className:String,text:String,lines:{type:Number,default:1},isUseTooltipAuto:{type:Boolean,default:!1},tooltipTheme:String,tooltipPosition:String,tooltipTrigger:String,tooltipIsHtml:{type:Boolean,default:!1},tooltipHtml:String,isShowNativeTitle:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElParent"),i=e.useTemplateRef("refElSpan"),r=e.reactive({isPosParent:!1,isPosSpan:!1,isUseTooltip:!1,isUseTooltipAuto:l.isUseTooltipAuto}),d=e.computed(()=>r.isUseTooltip?"":l.isShowNativeTitle&&l.text||""),u=e.computed(()=>{if(!o.isFinite(l.lines))return 1;const p=Number(l.lines);return p===1||p===2||p===3?p:1}),s=e.computed(()=>{let p={"panel-ellipsis":!0,"ellipsis-txt-title":!0};return p[`ellipsis-txt-lines-${u.value}`]=!0,l.tooltipTrigger==="click"&&(p["ellipsis-txt-click"]=!0),p=o.getJsonMerge(p,de.getClassNameJson(l.className)),p}),c=()=>{const p=wt.getGlobalConfig("ellipsis");p&&o.isExistJsonKey(p,"isUseTooltipAuto")&&(r.isUseTooltipAuto=p.isUseTooltipAuto)},m=()=>{if(r.isUseTooltipAuto&&l.text&&l.text.length>0&&t.value&&i.value)if(u.value>1){const p=i.value,g=p.clientHeight;p.style.webkitLineClamp="unset";const v=p.offsetHeight;p.style.webkitLineClamp="";const y=v>g;r.isUseTooltip=y,r.isPosSpan=!0,r.isPosParent=!1}else{const p=t.value.clientWidth,g=i.value.offsetWidth;if(p>0&&g>0){const v=p>=g,y=p<g;r.isUseTooltip=y,r.isPosSpan=v,r.isPosParent=y}}};return e.onMounted(()=>{e.nextTick(()=>{c(),m()})}),e.watch(()=>l.text,()=>{e.nextTick(()=>{m()})}),e.watch(()=>l.isUseTooltipAuto,p=>{r.isUseTooltipAuto=p,p||(r.isUseTooltip=!1),e.nextTick(()=>{m()})}),e.watch(()=>l.lines,()=>{e.nextTick(()=>{m()})}),(p,g)=>{const v=e.resolveDirective("cltooltip");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElParent",ref:t,id:e.unref(a),class:e.normalizeClass(s.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("span",{ref_key:"refElSpan",ref:i,class:e.normalizeClass(`ellipsis-txt-lines-${u.value}`),title:d.value},[e.createTextVNode(e.toDisplayString(n.text),1)],10,Ir)),[[v,{init:r.isUseTooltip&&r.isPosSpan,html:n.tooltipHtml||n.text,theme:n.tooltipTheme,position:n.tooltipPosition,trigger:n.tooltipTrigger,isHtml:n.tooltipIsHtml}]])],10,Br)),[[v,{init:r.isUseTooltip&&r.isPosParent,html:n.tooltipHtml||n.text,theme:n.tooltipTheme,position:n.tooltipPosition,trigger:n.tooltipTrigger,isHtml:n.tooltipIsHtml}]])}}}),Dr=["id"],Tr={key:0,class:"empty-description"},Nr={key:1,class:"empty-footer"},Vr=80,xl=e.defineComponent({name:"ClEmpty",__name:"Index",props:{id:String,className:String,description:String,imageSize:{type:Number,default:80}},setup(n){const l=n,a=l.id,t=e.useSlots(),i=e.computed(()=>o.isNonEmptyString(l.description)?l.description:""),r=e.computed(()=>{const s=t.default?.();return Array.isArray(s)&&s.length>0}),d=e.computed(()=>{const s={"panel-empty":!0};return o.getJsonMerge(s,de.getClassNameJson(l.className))}),u=e.computed(()=>{const s=o.isFinite(l.imageSize)&&l.imageSize>0?l.imageSize:Vr;return{width:`${s}px`,height:`${s}px`}});return(s,c)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(d.value)},[e.createElementVNode("div",{class:"empty-image",style:e.normalizeStyle(u.value)},[e.renderSlot(s.$slots,"image",{},()=>[c[0]||(c[0]=e.createElementVNode("i",{class:"empty-image-default clIconFont clIcon-empty"},null,-1))])],4),i.value?(e.openBlock(),e.createElementBlock("div",Tr,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",Nr,[e.renderSlot(s.$slots,"default")])):e.createCommentVNode("",!0)],10,Dr))}}),Mr=["id"],Xo=e.defineComponent({name:"ClForm",__name:"Index",props:{id:String,theme:String,className:String,isAwaitRun:{type:Boolean,default:!0},preScroll:Number,pElError:String,isScrollToErr:{type:Boolean,default:!0}},emits:["submit"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTop"),u=e.reactive({isRun:!t.isAwaitRun}),s={_scrollUpAnimate:null,parentScroll:null,isScrollWindow:!0,tabindexEls:new Set},c=e.computed(()=>{const I={"data-cl-validate":""};return u.isRun&&(I["data-run"]=""),o.isNonEmptyString(t.theme)&&(I["data-theme"]=t.theme),I}),m=e.computed(()=>{let I={"panel-form":!0,"form-validate":!0};return I=o.getJsonMerge(I,de.getClassNameJson(t.className)),I}),p=()=>{i("submit")},g=I=>{const A=I.querySelector('input:not([type="hidden"]), select, textarea');return A instanceof HTMLElement?A:I},v=I=>{let A=!0;u.isRun&&I instanceof HTMLElement&&d.value?.contains(I)&&I.runValidate&&(A=!!I.runValidate());const N=g(I);return A?N.removeAttribute("aria-invalid"):N.setAttribute("aria-invalid","true"),A},y=()=>{const I=d.value?.querySelectorAll("[data-validate-error]");if(!o.isUndefined(I)&&I.length>0){let A=I[0];const{preScroll:N,pElError:x}=t,V=!o.isEmpty(A.pElError),w=!o.isEmpty(x);if(V||w){const Z=de.getParent(A,V?A.pElError:x,d.value);o.isUndefined(Z)||(A=Z)}const C=de.getOffset(A,s.isScrollWindow?null:s.parentScroll).top-10-(N??0),T=s._scrollUpAnimate,U=s.parentScroll;T&&U&&(T.stop(),T.start(U.scrollTop,C,200)),A.tabIndex<0&&(A.setAttribute("tabindex","-1"),s.tabindexEls.add(A)),A.focus({preventScroll:!0})}},k=()=>{const I=de.getParentScrollList(d.value,null,!1);s.isScrollWindow=I.length===0;const A=s.isScrollWindow?document.documentElement:I[0];s.parentScroll=o.isUndefined(A)?document.documentElement:A,s._scrollUpAnimate=new Za.AnimateEasing({runIngCallback:N=>{const x=s.parentScroll;x&&(x.scrollTop=N)}})};return e.onMounted(()=>{e.nextTick(()=>{k()})}),e.onBeforeUnmount(()=>{s._scrollUpAnimate?.stop()}),l({validate:I=>Pi.promiseFun(A=>{let N=!0;try{if(o.isUndefined(I))u.isRun=!0,e.nextTick(()=>{u.isRun=!0;try{const x=d.value?.querySelectorAll("[data-validate-el]");!o.isUndefined(x)&&x.length>0&&x.forEach(V=>{v(V)||(N=!1)}),N||t.isScrollToErr&&e.nextTick(()=>{try{y()}catch{}}),A(N)}catch{A(!1)}});else{u.isRun=!0;const x=I;e.nextTick(()=>{try{N=v(x),!N&&t.isScrollToErr&&e.nextTick(()=>{try{y()}catch{}}),A(N)}catch{A(!1)}})}}catch{A(!1)}}),reset:()=>{u.isRun=!1,s._scrollUpAnimate?.stop(),d.value?.removeAttribute("data-run");const I=d.value?.querySelectorAll("[data-validate-el]");!o.isUndefined(I)&&I.length>0&&I.forEach(A=>{if(g(A).removeAttribute("aria-invalid"),A.runReset)try{A.runReset()}catch{}}),s.tabindexEls.forEach(A=>{A.removeAttribute("tabindex")}),s.tabindexEls.clear()}}),(I,A)=>(e.openBlock(),e.createElementBlock("form",e.mergeProps({ref_key:"refElTop",ref:d,autocomplete:"off",novalidate:"",onSubmit:e.withModifiers(p,["prevent"]),id:e.unref(r),class:m.value},c.value),[e.renderSlot(I.$slots,"default")],16,Mr))}}),Or=["id","aria-labelledby"],_r={key:0,class:"tip-must"},Ar=["id"],Kn=e.defineComponent({name:"ClFormGroupHorizontal",__name:"Index",props:{id:String,className:{type:String,default:""},colRatio:{type:String,default:"2:10"},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id;let t;l.id&&(t=`${a}-label`);const i=e.computed(()=>{let c={"panel-form-group-horizontal":!0,"form-group":!0,"form-group-plaintext":l.isPlaintext,row:!0};return c=o.getJsonMerge(c,de.getClassNameJson(l.className)),c}),r=e.computed(()=>l.colRatio.split(":")),d=e.computed(()=>{const c=r.value,m=s(c[0],2),p={"control-label":!0};return p[`col-sm-${m}`]=!0,p[`col-${m}`]=!0,p}),u=e.computed(()=>{const c=r.value,m=s(c[1],10),p={"form-group-content":!0};return p[`col-sm-${m}`]=!0,p[`col-${m}`]=!0,p}),s=(c,m)=>{if(!o.isNonEmptyString(c))return m;const p=parseInt(c,10);return isNaN(p)||p<1||p>12?m:p};return e.watch(r,([c,m])=>{if(!o.isNonEmptyString(c)||!o.isNonEmptyString(m))return;const p=parseInt(c,10),g=parseInt(m,10);if(isNaN(p)||isNaN(g)||p<1||p>12||g<1||g>12){Se.warn("ClFormGroupHorizontal",`colRatio 值 "${c}:${m}" 不在 1-12 有效范围内,已使用默认值 2:10`);return}p+g!==12&&Se.warn("ClFormGroupHorizontal",`colRatio 两值之和需为 12(当前 ${p}+${g}=${p+g}),布局可能出现异常`)},{immediate:!0}),(c,m)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(i.value),role:"group","aria-labelledby":e.unref(t)},[e.createElementVNode("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("span",null,[n.isTipMust?(e.openBlock(),e.createElementBlock("span",_r,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"control-label-text",id:e.unref(t)},e.toDisplayString(n.label),9,Ar),e.renderSlot(c.$slots,"labelExtend")])],2),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.renderSlot(c.$slots,"default")],2)],10,Or))}}),Lr={key:0,class:"form-group-btns-fixed"},$r=["id"],Fr=["id"],Bl=e.defineComponent({name:"ClFormGroupBtns",__name:"Index",props:{id:String,className:{type:String,default:""},isFixed:{type:Boolean,default:!1},isHorizontal:{type:Boolean,default:!1},colRatioHorizontal:String},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"form-group-btns":!0};return o.getStringByJson(o.getJsonMerge(i,de.getClassNameJson(l.className))," ")});return(i,r)=>n.isHorizontal?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isFixed?(e.openBlock(),e.createElementBlock("div",Lr,[e.createElementVNode("div",null,[e.createVNode(Kn,{id:e.unref(a),className:t.value,colRatio:n.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["id","className","colRatio"])])])):(e.openBlock(),e.createBlock(Kn,{key:1,id:e.unref(a),className:t.value,colRatio:n.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["id","className","colRatio"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isFixed?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(a),class:"form-group-btns-fixed"},[e.createElementVNode("div",{class:e.normalizeClass(t.value)},[e.renderSlot(i.$slots,"default")],2)],8,$r)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(a),class:e.normalizeClass(t.value)},[e.renderSlot(i.$slots,"default")],10,Fr))],64))}}),Pr=["id","aria-labelledby"],Rr={class:"form-group-title"},Hr={key:0,class:"tip-must"},Ur=["id"],zr={class:"form-group-content"},Il=e.defineComponent({name:"ClFormGroupVertical",__name:"Index",props:{id:String,className:{type:String,default:""},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"form-group":!0,"form-group-vertical":!0,"form-group-plaintext":l.isPlaintext};return o.getJsonMerge(i,de.getClassNameJson(l.className))});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value),role:"group","aria-labelledby":`${e.unref(a)}-label`},[e.createElementVNode("div",Rr,[n.isTipMust?(e.openBlock(),e.createElementBlock("span",Hr,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"form-group-title-label",id:`${e.unref(a)}-label`},e.toDisplayString(n.label)+":",9,Ur),e.renderSlot(i.$slots,"labelExtend")]),e.createElementVNode("div",zr,[e.renderSlot(i.$slots,"default")])],10,Pr))}}),Jr={required:n=>!o.isEmpty(n),number:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i.test(a)}return l},integer:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^-?\d+$/.test(a)}return l},integerPositive:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^[1-9]\d*$/.test(a)}return l},alphanum:n=>{let l=!0;return o.isEmpty(n)||(l=/^\w+$/i.test(n)),l},email:n=>{let l=!0;return o.isEmpty(n)||(l=/^((([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)),l},minLen:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=n.length>=parseInt(l,10)),a},maxLen:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=n.length<=parseInt(l,10)),a},minByte:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=o.getByteLen(n)>=parseInt(l,10)),a},maxByte:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=o.getByteLen(n)<=parseInt(l,10)),a},minGreater:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)>parseFloat(l)}return a},maxGreater:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)<parseFloat(l)}return a},minGreaterEqual:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)>=parseFloat(l)}return a},maxGreaterEqual:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)<=parseFloat(l)}return a},phone:n=>{let l=!0;return o.isEmpty(n)||(l=/^1[3-9]\d{9}$/.test(n)),l},equalto:(n,l)=>!o.isEmpty(n)&&!o.isEmpty(l)?n===l:!0,regular:(n,l)=>{let a=!0;return!o.isEmpty(n)&&!o.isEmpty(l)&&(a=new RegExp(l,"g").test(n)),a},urlHttp:n=>{let l=!0;return o.isEmpty(n)||(l=/^(http|https):\/\/[^\s]+$/.test(n)),l}},Dl=(n={})=>({type:o.isEmpty(n.type)?"tip":n.type,rules:o.getJsonMerge(Jr,n.rules),messages:o.getJsonMergeDeep({},n.messages)}),Kr={key:1,class:"error-text-el"},Yn=e.defineComponent({name:"ClFormValidate",directives:{cltooltip:ut},__name:"Validate",props:{className:String,checkValue:[String,Number],rules:{type:Array,default:()=>[]},isCheck:{type:Boolean,default:!0},msgElementId:String,msgType:{type:String,validator:n=>["tip","text"].includes(n)},pElError:String,isShowMsg:{type:Boolean,default:!0}},setup(n,{expose:l}){const a=n,{optPageLanguage:t,getPageLanguage:i,getLanguageType:r}=Le();i("validate");const d=e.inject("$ClGlobals",null),u=e.useTemplateRef("refElTop"),s=e.useTemplateRef("refElMsg"),c=e.reactive({type:"",msgHtml:"",check:0}),m={form:null},p={rules:{},messages:{}};let g=null;const v=()=>{if(o.isUndefined(g)){let h=Dl();const b=d?.validate;b&&(o.isEmpty(b.rules)&&o.isEmpty(b.messages)?(o.isNonEmptyString(b.type)&&(h={...h,type:b.type}),Se.warn("ClFormValidate","[cl-form-validate] 全局校验规则表($ClGlobals.validate)缺少 rules/messages,已回退内置默认规则")):h={...h,type:b.type??h.type,rules:b.rules??h.rules,messages:b.messages??h.messages});const _=wt.getGlobalConfig("formValidate"),O=_?.rules||{},P=_?.messages||{};g={...h,type:_?.type??h.type,rules:o.getJsonMerge(h.rules,O),messages:o.getJsonMergeDeep(h.messages,P)},!b&&o.isEmpty(O)&&o.isEmpty(P)&&!o.isNonEmptyString(_?.type)&&Se.warn("ClFormValidate","[cl-form-validate] 未检测到全局校验规则表($ClGlobals.validate / setGlobalConfig({ formValidate })),已回退内置默认规则")}return g},y=e.computed(()=>{const D={"data-validate-el":""};if(a.isCheck){switch(c.check){case 1:D["data-validate-success"]="";break;case 2:D["data-validate-error"]="";break}D["aria-invalid"]=c.check===2?"true":"false"}return D}),k=e.computed(()=>{const D={};return a.isCheck&&(D["panel-form-validate"]=!0),o.getJsonMerge(D,de.getClassNameJson(a.className))}),F=e.computed(()=>{const D={"panel-validate-errors":!0};return D[`validate-errors-${c.type}`]=!0,D}),B=e.computed(()=>c.msgHtml.replace(/<[^>]*>/g," ").trim()),I=D=>{if(!o.isArray(D)){Se.warn("ClFormValidate","[cl-form-validate] rules 应为数组,已忽略");return}const h={},b={};D.forEach(_=>{if(typeof _=="string"){if(!o.isEmpty(_))if(o.isExistValue(_,"|")){const O=_.split("|");h[O[0]]=O[1],O.length>2&&Se.warn("ClFormValidate",'[cl-form-validate] 字符串规则 "'+_+'" 含多个参数段,仅取前两段,建议改用对象形式')}else h[_]=""}else if(typeof _=="object"&&!o.isUndefined(_)){let O=!0;o.isBoolean(_.isCheck)?O=_.isCheck===!0:(_.isCheck==="false"||_.isCheck==="0")&&(O=!1),!o.isEmpty(_.r)&&O&&(h[_.r]=String(_.p??""),o.isEmpty(_.m)||(b[_.r]=_.m??""))}}),p.rules=h,p.messages=b},A=()=>{const D=[],h={},b={};if(u.value&&!o.isEmpty(u.value.dataset)&&Object.keys(u.value.dataset).forEach(_=>{if(_.indexOf("validate")===0){const P=_.replace(/[A-Z]/g,J=>`-${J.toLowerCase()}`).split("-");if(P.length===3){const J=P[2].toLowerCase(),Y=u.value.dataset[_];switch(P[1]){case"check":!o.isEmpty(Y)&&Y.toLowerCase()==="false"&&D.push(J);break;case"param":h[J]=Y;break;case"message":b[J]=Y;break}}}}),!o.isEmpty(p.rules)&&(!o.isEmpty(D)||!o.isEmpty(h))){const _={};for(const[O,P]of Object.entries(p.rules)){const J=O.toLowerCase();o.isExistValue(D,J)||(_[O]=o.isExistJsonKey(h,J)?h[J]:P)}p.rules=_}if(!o.isEmpty(p.messages)&&!o.isEmpty(b)){const _={};for(const[O,P]of Object.entries(p.messages)){const J=O.toLowerCase();_[O]=o.isExistJsonKey(b,J)?b[J]:P}p.messages=_}},N=D=>{const h={},b=v().rules??{};if(!o.isEmpty(p.rules)){const _=o.isEmpty(D)||o.getTypeof(D)==="number"&&o.isNaN(D),O=_?"":o.trim(D);for(const[P,J]of Object.entries(p.rules))if(o.isExistJsonKey(b,P)&&o.isFunction(b[P])){let Y=!0;P==="required"?Y=b.required(O):_||(Y=b[P](O,J)),Y||(h[P]=J)}else Se.warn("ClFormValidate",'[cl-form-validate] 校验规则 "'+P+'" 未注册或非函数,已跳过')}return h},x=()=>{i("validate");const D=e.toRaw(t.value),h=e.toRaw(v().messages??{}),b=r(),_=o.isExistJsonKey(h,b.type)||o.isExistJsonKey(h,b.def)?o.getJsonMerge({},h[b.def]||{},h[b.type]||{}):h;return o.getJsonMerge({},D,_)},V=D=>{const h=x(),b=[];return Object.keys(D).forEach(_=>{let O="";if(o.isNonEmptyString(p.messages[_])?O=p.messages[_]:o.isNonEmptyString(h[_])&&(O=h[_]),!o.isEmpty(O)){const P=D[_],J=o.isExistValue(O,"%s")?O.replace(/%s/g,o.isEmpty(P)?"":String(P)):O;b.push(J)}}),b},w=()=>(m.form&&!m.form.isConnected&&(m.form=null),o.isUndefined(m.form)&&u.value&&(m.form=de.getParent(u.value,"form")),m.form),M=()=>{w();let D=v().type;m.form&&!o.isEmpty(m.form.dataset.theme)&&(D=m.form.dataset.theme),o.isNonEmptyString(a.msgType)&&(D=a.msgType),D!=="tip"&&D!=="text"&&(D="tip"),c.type=D},C=()=>{let D=!0;return w(),!o.isUndefined(m.form)&&m.form&&(o.isUndefined(m.form.dataset.clValidate)||(D=!o.isUndefined(m.form.dataset.run))),D},T=D=>{const h=o.isNonEmptyString(D)?D:"";if(o.isEmpty(h))c.msgHtml="",c.check=1;else if(c.msgHtml=h,c.check=2,o.isNonEmptyString(a.msgElementId))try{const b=window.document.querySelector(a.msgElementId);b?e.nextTick(()=>{s.value&&b.isConnected?b.appendChild(s.value):s.value&&Se.warn("ClFormValidate","[cl-form-validate] msgElementId 目标已脱离文档:"+a.msgElementId+",消息展示在组件内部")}):Se.warn("ClFormValidate","[cl-form-validate] 未找到 msgElementId 目标元素:"+a.msgElementId+",消息展示在组件内部")}catch{Se.warn("ClFormValidate","[cl-form-validate] msgElementId 选择器无效:"+a.msgElementId)}},U=()=>{c.msgHtml="",c.check=0},Z=(D,h)=>{let b="";if(!o.isEmpty(D))switch(h){case"tip":b=D.map(_=>`<div>${_}</div>`).join("");break;case"text":b=D.join(",");break}return b},z=()=>{let D=!0;try{if(a.isCheck&&C()){M(),A();const h=N(a.checkValue);if(D=o.isEmpty(h),D)T("");else{let b=Z(V(h),c.type);if(o.isEmpty(b)){const _=Object.keys(h)[0];b=o.isNonEmptyString(_)?_:"校验未通过"}T(b)}}else U()}catch{Se.warn("ClFormValidate","[cl-form-validate] 校验执行异常,已按未通过处理"),U(),D=!1}return D},H=()=>{if(I(a.rules||[]),w(),u.value){const D=u.value;D.pElError=a.pElError,D.runValidate=z,D.runErrMsg=E,D.runReset=f}};e.onMounted(()=>{e.nextTick(()=>{H()})}),e.onBeforeUnmount(()=>{s.value?.remove()}),e.watch(()=>a.checkValue,()=>{z()}),e.watch([()=>a.rules,()=>a.isCheck],([D])=>{I(D||[]),z()},{deep:!0});const S=()=>z(),E=D=>{M(),T(D)},f=()=>{M(),U()};return l({runValidate:S,runErrMsg:E,runReset:f}),(D,h)=>{const b=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"refElTop",ref:u,class:k.value},y.value),[e.renderSlot(D.$slots,"default"),c.msgHtml.length>0&&n.isShowMsg?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElMsg",ref:s,class:e.normalizeClass(F.value),role:"alert"},[c.type==="tip"?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:"exclamation-circle-fill",class:"error-tip-el",role:"img","aria-label":B.value},null,8,["aria-label"])),[[b,c.msgHtml]]):c.type==="text"?(e.openBlock(),e.createElementBlock("span",Kr,e.toDisplayString(c.msgHtml),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],16)}}}),et={loading:"data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==",error:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABbFJREFUaEPtWV1sFFUUPufOLmjpD7G0nXtm11igD0Q0CpqImsiDEcGoIVEReeBBNGgkEQSjwUR4MQZ/MBr/MeFFFIkxYAR9MGr84cFijBJ9UFPD7r3TqtWWLsVuO3PM3ew20+3uzizTxpDsTSa7e+ec75zvnPtz7l2E87zhee4/NAj83xlsZKCRgZgRaAyhmAGMrV4zA5lM5sJEItGcz+dbhBDN5gGAZkRsQcTCd/Mwc0vpu+k3v5l5yHGcDUEPtdY7AeAsIp4t/5yYmCj0myefz//LzGfNY/p7enrGqjGtSEAp9ZgQYgsz07mGiJk3OY7zVklfKbULEZ88FzxE1L7vv+Q4ztPl+tMIZLPZFUKIb87FUFBHCLHQtu2+Up/WmuNi+r5/bSqVOh7EmUZAa70VAJ6PYwwRJ6SUyRKG67odzPxHHMyi7jYi2luTgOu6O5h5T1xjiLhDSvlsIAOfAcDKOLiI+KiU8pmwDGwGgFfjGCrqDhLRgkAWHmTml2PiPkBEr4URuAcA3o5pqKR+PxG9aX7M0DDaQEQHahJQSt2KiEdmiMA7RGQCUmha61jDiJlvcxznw7A5cAMzfz4TBHzfvzGVSn1qsDKZzErLsgyBac0skwBwwvf9HCKuBoD5VeRWSim/CMvAMkQ8MQME+ohoYZToE9HkapjNZq9AxFcQcUW5D8y83HGc72oSyGQyiy3L+qUeAsx8yMgj4p0BvZ1E9FRY9Jl5t+M4u4L2tNaPA0BBN9g8z+tJp9O/1iTQ39/f6fv+QB0ExoQQS4aGhv5qa2s7zsyXGl0hRJdt24W1P2TsbyWiF4L2lFL3IuK+ch+CmKV30zYyU/9YljVaB4EDRFSoeUrj3CwCUsrbw6JftPE9EV1ZloFhAGitkIGmdDpt6qjJVrEWcl03z8yTO2kImTuI6P2STDabfUQIsYqIbjJ91aJZhjkCANuZeSkArEbExeU2EXFcSjlnWn8l55RSg4h4UVgWELHPtu1FiDilzlFKmaxsNEa11ksA4KcwrLD3zPy34zjtkQhorU0RdkkYqJloRGRK5ClNKXUxIposFDax8kIOEfczcxsArI1goyTyOxF1RyKglPoBES+LAH4VEVVccrXWa4nogyKBXgBYXnR8DxH9XOz/EgCuj2AHmPlHx3Euj0RAa/0VAFwXAvw1EdU03tfXN7+7u3tIa73X87zD6XR6ygaZzWavEUJMKY9r2Kxor9okPsrMZkes1TYT0etRoldLxnXdF5l5SxgOIh6TUq6JlAGl1EFEvKsWqO/7C1Kp1GCY4bD3zDzHdd2TANBTS5aZ33McZ10kAlprM/k2VQNExENSypoEwxwPvndddyMz7w/R2UdE90UlYE5k5mRWsVWqCutxuJKs1tqUyetr4Owlom2RCLiuu4uZqx3A/yGi0D2iXkKnTp1amkgkTKVZERsRd0spp9RMxkbFSVzcTSePg2XOFNbjwcFBs9W35vP5Vs/z2oQQrYjY6vt+4dOs86ZI01o/AQA5Zs5ZljUyMTGRE0KMmN/JZHJkdHQ019TUNNLZ2ZmrVTP5vr89lUo9FykDWmsz1t6oN4pBeSHE+vHx8cN11lW1TE6e7oJCFTPQ39+/zvf9d+MQYOZlxc2rsBvHbUKIu23bPhgpA67rrmHmj2IY/bNYihiMWDcRJR8Q8RYp5dFIBAYGBhZ5njfl4FAvGSnlBUqph4QQ1eZSXZCWZS3u6ur6LRIBI6S1/hgAVkW0wsx8GhFPA8AIIuYA4OTw8PDDLS0txxBxXukutXiPOi8ibknsEyK6uZJO1ctds8qMjY2Zc+nVAFBwzjjJzCOJRCKXz+fPJJNJ46h5zti2fSaqU729vcmOjo5my7LmBS6MDSlzcdzseV7w8vjbuXPnHm9vbzfBmdYa/w9EjfpsyTUyMFuRjYrbyEDUSM2WXCMDsxXZqLjnfQb+A8eWU0/QfZYsAAAAAElFTkSuQmCC",attr:{timeOutId:"data-lazy-timeout-id"}};class Tl{options={loading:et.loading,error:et.error,observerOptions:{rootMargin:"0px",threshold:0},log:!1,callback:{}};_images=new WeakMap;constructor(l){this.config(l)}config(l={}){this.options=o.getJsonMergeDeep(this.options,l)}_initValue(l,a){let t="",i=this.options.loading,r=this.options.error,d=this.options.callback,u=this.options.delay;return o.isObject(l)?(t=l.src,i=o.isUndefined(l.loading)?this.options.loading:l.loading,r=o.isUndefined(l.error)?this.options.error:l.error,d=o.isUndefined(l.callback)?this.options.callback:l.callback,u=o.isUndefined(l.delay)?this.options.delay:l.delay):o.isString(l)?t=l:o.isUndefined(l)&&(t=a&&a.src||""),{src:t,loading:i,error:r,callback:d,delay:u}}mount(l,a){if(o.isUndefined(l))return;const t=o.isString(a)?a:a.value,{src:i,loading:r,error:d,callback:u,delay:s}=this._initValue(t,l);if(this._setCallback(l,"loading",u),l.setAttribute("src",r||et.loading),!this._checkIntersectionObserver()){this._setImageSrc(l,i,d,u),this._log(()=>{throw new Error("Not support IntersectionObserver!")});return}this._initIntersectionObserver(l,i,d,u,s)}update(l,a){if(o.isUndefined(l))return;this._realObserver(l)?.unobserve(l),l.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(et.attr.timeOutId))),l.removeAttribute(et.attr.timeOutId));const t=o.isString(a)?a:a.value,{src:i,error:r,callback:d,delay:u}=this._initValue(t,l);this._initIntersectionObserver(l,i,r,d,u)}unmount(l){if(!o.isUndefined(l)){if(this._realObserver(l)?.unobserve(l),l.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(et.attr.timeOutId))),l.removeAttribute(et.attr.timeOutId)),l.tagName.toLowerCase()==="img"){const a=l;a.onload=null,a.onerror=null}this._images.delete(l)}}_setImageSrc(l,a,t,i){if(l.tagName.toLowerCase()==="img"){const r=l;o.isEmpty(a)?(r.onload=null,this._setCallback(r,"error",i),this._realObserver(r)?.disconnect(),t?r.setAttribute("src",t):r.removeAttribute("src")):(this.options.isCrossOrigin&&(r.crossOrigin="Anonymous"),a&&r.getAttribute("src")!==a&&r.setAttribute("src",a),r.onload=()=>{a&&this._setCallback(r,"loaded",i)},r.onerror=()=>{r.onload=null,this._setCallback(r,"error",i),this._realObserver(r)?.disconnect(),t&&r.getAttribute("src")!==t&&r.setAttribute("src",t),this._log(()=>{throw new Error(`Image failed to load!And failed src was: ${a} `)})})}else l.style.backgroundImage=`url('${a}')`}_setCallback(l,a,t){switch(l?.setAttribute("lazy",a),a){case"loading":t?.loading&&t.loading(l);break;case"loaded":t?.loaded&&t.loaded(l);break;case"error":t?.error&&t.error(l);break}}_realObserver(l){return this._images.get(l)}_checkIntersectionObserver(){if(typeof window<"u"&&window!==null&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype))try{Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}})}catch{return!1}return!0}return!1}_initIntersectionObserver(l,a,t,i,r){const d=this.options.observerOptions;this._images.set(l,new IntersectionObserver(u=>{Array.prototype.forEach.call(u,s=>{r&&r>0?this._delayedIntersectionCallback(l,s,r,a,t,i):this._intersectionCallback(l,s,a,t,i)})},d)),this._realObserver(l)?.observe(l)}_intersectionCallback(l,a,t,i,r){a.isIntersecting&&(this._realObserver(l)?.unobserve(a.target),this._setImageSrc(l,t,i,r))}_delayedIntersectionCallback(l,a,t,i,r,d){if(a.isIntersecting){if(a.target.hasAttribute(et.attr.timeOutId))return;const u=setTimeout(()=>{this._intersectionCallback(l,a,i,r,d),a.target.removeAttribute(et.attr.timeOutId)},t);a.target.setAttribute(et.attr.timeOutId,String(u))}else a.target.hasAttribute(et.attr.timeOutId)&&(clearTimeout(Number(a.target.getAttribute(et.attr.timeOutId))),a.target.removeAttribute(et.attr.timeOutId))}_log(l){this.options.log&&l()}}const Nl=(n,l,a)=>{const t=new Tl(a);e.onMounted(()=>{e.nextTick(()=>{n.value&&t.mount(n.value,l)})}),e.onUnmounted(()=>{n.value&&t.unmount(n.value)}),e.watch(l,i=>{n.value&&t.update(n.value,i)})},Wr=["id"],jr=["alt"],Wn=e.defineComponent({name:"ClImage",__name:"Index",props:{id:{},className:{},src:{},alt:{},height:{},width:{},isCircle:{type:Boolean},fit:{},isCrossOrigin:{type:Boolean}},emits:["onInit"],setup(n,{emit:l}){const a=n,t=l,i=e.ref(o.isNonEmptyString(a.src)?a.src:""),r=e.useTemplateRef("refElImage"),d=e.computed(()=>o.isNonEmptyString(a.alt)?a.alt:""),u=a.id;Nl(r,i,{callback:{loaded:()=>{p()},error:()=>{p()}},isCrossOrigin:a.isCrossOrigin});const s=e.computed(()=>{let g={"panel-image":!0,"imageBox-circle":a.isCircle};return g=o.getJsonMerge(g,de.getClassNameJson(a.className)),g}),c=e.computed(()=>{const{width:g,height:v}=a,y={};return o.isNonEmptyString(g)&&(y.width=g),o.isNonEmptyString(v)&&(y.height=v),y}),m=e.computed(()=>{const{width:g,height:v,fit:y}=a,k={};return o.isNonEmptyString(y)&&(k["object-fit"]=y,o.isNonEmptyString(g)&&(k.width=g),o.isNonEmptyString(v)&&(k.height=v)),k});function p(){t("onInit")}return e.watch(()=>a.src,g=>{i.value=o.isNonEmptyString(g)?g:""}),(g,v)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(s.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("img",{ref_key:"refElImage",ref:r,alt:d.value,style:e.normalizeStyle(m.value)},null,12,jr)],14,Wr))}}),Yr=["id"],qr=["type","inputmode","name","value","placeholder","disabled","readonly"],Xr={key:0,class:"input-floating-label"},Gr={key:3,class:"input-suffix"},Co=e.defineComponent({name:"ClInputContainer",components:{ClIconFont:ye},__name:"Container",props:{id:String,name:String,value:[String,Number],inputType:{type:String,default:"text"},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},placeholder:String,label:String,isFloating:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isShowSuffix:{type:Boolean,default:!1}},emits:["onInputText","onKeydown","onKeyup","onFocus","onBlur","onClear"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.computed(()=>{let V=t.name;return o.isEmpty(V)&&(V=`input_${o.getRandom(8)}`),V}),s=e.computed(()=>o.isEmpty(t.inputmode)?void 0:t.inputmode),c=e.computed(()=>{const V={};return o.isNonEmptyString(t.autocomplete)&&(V.autocomplete=t.autocomplete),V}),m=e.computed(()=>t.isClean&&!t.disabled&&!t.isReadonly),p=e.computed(()=>m.value&&!o.isEmpty(t.value)),g=e.computed(()=>t.isFloating?t.label||t.placeholder:""),v=e.computed(()=>({"input-container":!0,"input-clean":t.isClean,"input-suffix":t.isShowSuffix,"input-floating":t.isFloating})),y=V=>{const w=V.target;w&&i("onInputText",w.value)},k=V=>{i("onKeydown",V)},F=V=>{i("onKeyup",V)},B=()=>{i("onFocus")},I=()=>{i("onBlur")},A=()=>{i("onClear")};return l({getInputElement:()=>d.value,focus:()=>{d.value?.focus()}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(v.value)},[e.createElementVNode("input",e.mergeProps({ref_key:"refElInput",ref:d,type:n.inputType,inputmode:s.value,name:u.value},c.value,{class:"form-control",value:n.value,placeholder:n.placeholder,disabled:n.disabled,readonly:n.isReadonly,onInput:y,onKeydown:k,onKeyup:F,onFocus:B,onBlur:I}),null,16,qr),g.value?(e.openBlock(),e.createElementBlock("label",Xr,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(ye,{key:1,name:"close-circle-fill",class:"input-clear-icon","aria-label":"清除输入内容",role:"button",tabindex:"-1",onClick:e.withModifiers(A,["stop"]),onKeydown:[e.withKeys(e.withModifiers(A,["stop"]),["enter"]),e.withKeys(e.withModifiers(A,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.isShowSuffix?(e.openBlock(),e.createElementBlock("div",Gr,[e.renderSlot(V.$slots,"suffix")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,Yr))}}),Qr=["id"],Zr={key:0,class:"cl-plaintext-value"},ec={key:0,class:"input-group-prepend"},tc={class:"input-group-text"},nc={key:2,class:"input-group-append"},oc={class:"input-group-text"},Pe=e.defineComponent({name:"ClInput",components:{ClInputContainer:Co},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:String,inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},changeDelayTime:{type:Number,default:200}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElContainer"),u=e.ref(!1),s=o.isString(t.value)?t.value:t.value!==void 0&&o.isNumber(t.value)&&o.isFinite(t.value)?t.value.toString():"",c=e.ref(s),m=e.ref(s),p=e.ref(s),g={prevDelayValue:s,valueDelayRun:!1};let v=null;const y=e.computed(()=>{let J={"panel-input":!0,"input-disabled":t.disabled,"input-readonly":t.isReadonly};return J=o.getJsonMerge(J,de.getClassNameJson(t.className)),o.isEmpty(t.theme,"default")||(J[`input-${t.theme}`]=!0),J}),k=e.computed(()=>{const J={};return o.isNonEmptyString(t.width)&&(J.width=t.width),J}),F=J=>{B(),g.valueDelayRun=!0,v=setTimeout(()=>{v=null,m.value===J&&(g.valueDelayRun=!1,g.prevDelayValue!==J&&(g.prevDelayValue=J,i("onChangeDelay",J)))},t.changeDelayTime)},B=()=>{v&&(clearTimeout(v),v=null),g.valueDelayRun=!1},I=J=>{if(J!==m.value){m.value=J;const Y=T(J);i("update:value",Y),i("update:modelValue",Y),i("onChange",Y),F(Y)}},A=J=>{u.value=!0,p.value=J,i("onFocus",J)},N=J=>{u.value=!1,i("onBlur",J),J!==p.value&&(p.value=J,i("onChangeBlur",J))},x=J=>{i("onKeyupEnter",J)},V=J=>{i("onKeydown",J)},w=J=>{i("onKeyup",J)},M=()=>{i("onClear")},C=()=>{e.nextTick(()=>{i("onInit")})},T=J=>o.isString(J)||o.isNumber(J)&&o.isFinite(J)?J.toString():"",U=()=>{d.value?.focus()},Z=()=>{const J=T(t.value);o.isEmpty(J)||(c.value=J,m.value=J),C()};e.onMounted(()=>{Z()}),e.onBeforeUnmount(()=>{B()}),e.watch(()=>t.value,J=>{const Y=T(J);Y!==c.value&&(c.value=Y,m.value=Y,g.prevDelayValue=Y,g.valueDelayRun&&B())});const z=J=>{c.value=J,I(J)},H=J=>{V(J)},S=J=>{const Y=J.key,ne=J.keyCode;if(Y==="Enter"||ne===13){const ce=J.target,X=T(ce.value);x(X)}else w(J)},E=()=>{const J=T(c.value);A(J)},f=()=>{const J=T(c.value);N(J)},D=()=>{c.value="",I(""),M(),U()},h=()=>{const J=d.value;return J?J.getInputElement():null},b=()=>T(c.value);return l({getValue:b,getValueData:()=>({value:b(),show:c.value}),setValue:(J,Y)=>{const ne=T(J);c.value=ne,m.value=ne,g.prevDelayValue=ne,g.valueDelayRun&&B(),Y&&(i("update:value",ne),i("update:modelValue",ne))},focus:()=>{U()},getInputElement:h}),(J,Y)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(y.value),style:e.normalizeStyle(k.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Zr,e.toDisplayString(c.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[J.$slots.prepend||J.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"input-group":!0,"input-group-focus":u.value})},[J.$slots.prepend?(e.openBlock(),e.createElementBlock("div",ec,[e.createElementVNode("span",tc,[e.renderSlot(J.$slots,"prepend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(Co,{ref_key:"refElContainer",ref:d,value:c.value,inputType:n.inputType,inputmode:n.inputmode,autocomplete:n.autocomplete,name:n.name,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,isShowSuffix:!!J.$slots.suffix,label:n.label,isFloating:n.isFloating,onOnInputText:z,onOnKeydown:H,onOnKeyup:S,onOnFocus:E,onOnBlur:f,onOnClear:D},e.createSlots({_:2},[J.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(J.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]),J.$slots.append?(e.openBlock(),e.createElementBlock("div",nc,[e.createElementVNode("span",oc,[e.renderSlot(J.$slots,"append")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)):(e.openBlock(),e.createBlock(Co,{key:1,ref_key:"refElContainer",ref:d,value:c.value,inputType:n.inputType,inputmode:n.inputmode,autocomplete:n.autocomplete,name:n.name,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,isShowSuffix:!!J.$slots.suffix,label:n.label,isFloating:n.isFloating,onOnInputText:z,onOnKeydown:H,onOnKeyup:S,onOnFocus:E,onOnBlur:f,onOnClear:D},e.createSlots({_:2},[J.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(J.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]))],64))],14,Qr))}}),Vt=e.defineComponent({name:"ClInputNumber",components:{ClInput:Pe},__name:"Index",props:{id:String,name:{type:String,default:""},value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:{type:String,default:""},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:{type:String,default:""},placeholder:{type:String,default:""},label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isNumber:{type:Boolean,default:!0},decimal:{type:Number,default:0,validator:n=>n>=-1&&n<=100&&n%1===0},isThousand:{type:Boolean,default:!0},isImmediateThousand:{type:Boolean,default:!0},changeDelayTime:{type:Number,default:200,validator:n=>o.isFinite(n)&&n>=0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.ref(t.value),s=e.ref(t.value),c=e.computed(()=>{let h={"panel-input-number":!0};return h=o.getJsonMerge(h,de.getClassNameJson(t.className)),o.getStringByJson(h," ")}),m=e.computed(()=>o.isNonEmptyString(t.inputmode)?t.inputmode:t.decimal===0?"numeric":"decimal"),p=h=>{if(h!==s.value){s.value=h;const b=B(h);i("update:value",b),i("update:modelValue",b),i("onChange",b)}},g=h=>{let b=o.isNumber(h);if(!b)if(o.isNaN(+h))h==="-"&&(b=!0);else{const _=h.split(".");_.length===2&&(b=(o.isNumber(_[0])||o.isEmpty(_[0]))&&(o.isEmpty(_[1])||o.isNumber(_[1])))}return b},v=(h,b,_=!0,O=!0)=>{let P=h;if(t.isNumber){let J=o.removeReplace(h);if(J.length>0)if(g(J)){if(J!=="-"){const{decimal:ne}=t;if(_&&ne!==0&&(ne===-1||ne>=0&&ne<=100)&&ne!==-1){const ce=parseFloat(J);if(o.isFinite(ce)){const X=ce.toFixed(ne);J=X.indexOf("e")>-1?J:X}}if(O){const ce=J.split("."),X=o.isEmpty(ce[0])?"0":ce[0];if(J=t.isThousand?o.getFormatThousands(X):X,ce.length===2&&ne!==0){const Q=ne===-1?ce[1]:ce[1].slice(0,ne);J+=`.${Q}`}}}}else J=b;else J="";P=J}return P},y=(h,b)=>{const _=b.split(""),O=new RegExp("^"+_.map(Y=>Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*?")),P=h.match(O);let J;return P&&(J=P[0].length),J},k=(h,b,_)=>{const O=de.getFocusSelection(h);let P=b.substring(0,O.start);P=o.removeReplace(P);const J=b.substring(O.start);let Y=g(P);P.indexOf(".")>-1&&J.indexOf(".")>-1&&(Y=!1);let ne=O.start;Y?ne=y(_,P):ne=_.lastIndexOf(J),(o.isUndefined(ne)||ne>_.length||ne<0)&&(ne=_.length),e.nextTick(()=>{de.setFocusSelection(h,ne,ne)})},F=()=>{const h=u.value;if(o.isEmpty(h))return h;{let b=h.toString();if(t.isNumber){const{decimal:_}=t;if(b=o.removeReplace(b),b==="-")return b;if(_!==0&&_!==-1){const J=parseFloat(b);if(o.isFinite(J)&&_>=0&&_<=100){const Y=J.toFixed(_);b=Y.indexOf("e")>-1?b:Y}}const O=b.split("."),P=o.isEmpty(O[0])?"0":O[0];O[0]=t.isThousand?o.getFormatThousands(P):P,_===0?b=O[0]:O.length===2?(O[1]=_===-1?O[1]:o.getFillZero(O[1],_,"r"),b=O.join(".")):b=O[0]}return b}},B=h=>{let b="";if(!o.isEmpty(h)&&(b=h.toString(),t.isNumber&&b!=="-")){const{decimal:_}=t,O=b.split(".");let P=o.removeReplace(O[0]);if(O.length===2&&_!==0){let J="";_===-1?J=O[1]:J=o.getFillZero(O[1],_,"r"),P+=`.${J}`}b=P}return b},I=()=>{d.value?.focus()},A=()=>{if(!o.isEmpty(t.value)){const h=v(t.value,"");u.value=h,s.value=h}};e.onMounted(()=>{A()}),e.watch(()=>t.value,(h,b)=>{if(h!==b&&h!==u.value){let _=!0;if(t.isNumber){const O=o.removeReplace(h),P=o.removeReplace(u.value),J=o.isEmpty(O),Y=o.isEmpty(P);J&&Y?_=!1:!J&&!Y&&(_=Number(O)!==Number(P))}if(_){const O=v(h,b);u.value=O,s.value=O}}}),e.watch([()=>t.isNumber,()=>t.decimal,()=>t.isThousand],()=>{const h=v(u.value,"");u.value=h,p(h)});const N=h=>{const b=v(h,s.value,!1,t.isImmediateThousand);u.value=b,d.value?.setValue(b),t.isNumber&&e.nextTick(()=>{const _=d.value?.getInputElement();_&&u.value===b&&k(_,h,String(b))}),p(b)},x=()=>{const h=F();u.value=h,s.value=h;const b=B(h);i("onFocus",b)},V=()=>{const h=F();u.value=h,s.value=h;const b=B(h);i("onBlur",b)},w=h=>{i("onChangeBlur",B(h))},M=h=>{i("onKeyupEnter",B(h))},C=h=>{i("onKeydown",h)},T=h=>{i("onKeyup",h)},U=()=>{i("onClear")},Z=()=>{i("onInit")},z=h=>{i("onChangeDelay",B(h))},H=()=>B(u.value);return l({getValue:H,getValueData:()=>({value:H(),show:o.isEmpty(u.value)?"":u.value.toString()}),setValue:(h,b)=>{const _=o.isEmpty(h)?"":v(h,"");if(u.value=_,s.value=_,d.value?.setValue(_),b){const O=B(_);i("update:value",O),i("update:modelValue",O),i("onChange",O)}},focus:()=>{I()},getInputElement:()=>d.value?.getInputElement()??null}),(h,b)=>(e.openBlock(),e.createBlock(Pe,{ref_key:"refElInput",ref:d,id:e.unref(r),value:u.value,name:n.name,className:c.value,inputType:n.inputType,inputmode:m.value,autocomplete:n.autocomplete,placeholder:n.placeholder,label:n.label,isFloating:n.isFloating,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,width:n.width,theme:n.theme,isPlaintext:n.isPlaintext,changeDelayTime:n.changeDelayTime,onOnChange:N,onOnFocus:x,onOnBlur:V,onOnChangeBlur:w,onOnKeyupEnter:M,onOnKeydown:C,onOnKeyup:T,onOnClear:U,onOnInit:Z,onOnChangeDelay:z},e.createSlots({_:2},[h.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"prepend")]),key:"0"}:void 0,h.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"append")]),key:"1"}:void 0,h.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(h.$slots,"suffix")]),key:"2"}:void 0]),1032,["id","value","name","className","inputType","inputmode","autocomplete","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme","isPlaintext","changeDelayTime"]))}}),ac=["id"],lc={key:0,class:"inputCaptcha-count"},Eo=120,bo=1e3,Vl=e.defineComponent({name:"ClInputCaptcha",components:{ClInputNumber:Vt},__name:"Index",props:{id:{},value:{default:""},className:{},theme:{default:"default"},placeholder:{},autocomplete:{default:"one-time-code"},countdownMax:{default:Eo},onSendBefore:{}},emits:["update:value","update:modelValue","onChange","onKeyupEnter","onSend","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.reactive({value:o.isString(t.value)?t.value:"",isSend:!1,isCountdown:!1,countdown:Eo}),u={intervalCountdownId:null,isSending:!1,isUnmounted:!1},s=e.computed(()=>{let A={"panel-input-captcha":!0};return A=o.getJsonMerge(A,de.getClassNameJson(t.className)),A[`inputCaptcha-theme-${t.theme}`]=!0,A}),c=e.computed(()=>({"inputCaptcha-send":!0,"inputCaptcha-send-ing":d.isCountdown})),m=A=>{i("update:value",A),i("update:modelValue",A),i("onChange",A)},p=()=>{i("onKeyupEnter",d.value)},g=()=>{i("onSend")},v=()=>{const{countdownMax:A}=t;return o.isNumber(A)&&o.isFinite(A)&&A>0?Math.floor(A):Eo},y=A=>o.isNonEmptyString(A)?A:"";e.onBeforeUnmount(()=>{u.isUnmounted=!0,u.intervalCountdownId&&(clearInterval(u.intervalCountdownId),u.intervalCountdownId=null)}),e.watch(()=>t.value,A=>{const N=y(A);d.value!==N&&(d.value=N)});const k=A=>{m(A)},F=()=>{p()},B=async()=>{if(d.isCountdown||u.isSending)return;u.isSending=!0;let A=!1;if(t.onSendBefore)if(!o.isFunction(t.onSendBefore))Se.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需为函数"),i("onError","onSendBefore 需为函数");else try{const N=await t.onSendBefore(d.value);o.isBoolean(N)?A=N:(Se.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需返回 boolean,本次按校验失败处理"),i("onError","onSendBefore 返回值需为 boolean"))}catch{A=!1,i("onError","发送前校验异常")}else A=!0;if(u.isSending=!1,!(u.isUnmounted||d.isCountdown)&&(d.isSend=A,A)){g(),d.isCountdown=!0,d.countdown=v();const N=Date.now()+d.countdown*bo,x=setInterval(()=>{const V=Math.ceil((N-Date.now())/bo);V<=0?(clearInterval(x),u.intervalCountdownId=null,d.countdown=v(),d.isCountdown=!1):d.countdown=V},bo);u.intervalCountdownId=x}};return l({getValue:()=>d.value}),(A,N)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(s.value)},[e.createVNode(Vt,{theme:n.theme,isNumber:!0,decimal:0,isThousand:!1,value:d.value,"onUpdate:value":N[0]||(N[0]=x=>d.value=x),placeholder:n.placeholder,autocomplete:n.autocomplete,isClean:!0,onOnKeyupEnter:F,onOnChange:k},null,8,["theme","value","placeholder","autocomplete"]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[d.isSend?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d.isCountdown?(e.openBlock(),e.createElementBlock("span",lc,e.toDisplayString(d.countdown)+"秒后重发",1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(B,["stop"])}," 重新发送 "))],64)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(B,["stop"])}," 发送验证码 "))],2)],10,ac))}}),ic=["aria-disabled"],xo=e.defineComponent({name:"ClInputnumberstepperButton",__name:"Button",props:{className:{},disabled:{type:Boolean},checkDownBeforeCallback:{type:Function}},emits:["onLongDownStart","onLongDownEnd"],setup(n,{emit:l}){const a=n,t=l,i=e.useTemplateRef("refElButton"),r={longDownInterval:null,isMoveBoundary:!1,isLongDownActive:!1,isKeyDown:!1,dragEvent:null,sessionSource:null},d=e.computed(()=>{const I=o.getJsonMerge({"inputNumberStepper-controls":!0},de.getClassNameJson(a.className));return I["inputNumberStepper-controls-disabled"]=!!a.disabled,I}),u=()=>{t("onLongDownStart")},s=I=>{t("onLongDownEnd",I)},c=()=>{let I=!0;if(a.checkDownBeforeCallback){try{I=a.checkDownBeforeCallback()}catch(A){Se.warn("ClInputnumberstepperButton","长按开始回调执行失败,按允许处理",A),I=!0}I=o.isBoolean(I)?I:!0}return I},m=()=>{r.longDownInterval&&(clearInterval(r.longDownInterval),r.longDownInterval=null)},p=I=>{r.isLongDownActive&&r.sessionSource!==I||(r.isLongDownActive=!0,r.sessionSource=I,u(),m(),r.longDownInterval=setInterval(()=>{a.disabled?v():u()},200))},g=I=>{if(r.sessionSource!=="mouse")return;const A=I.target;i.value===I.target||i.value?.contains(A)?r.isMoveBoundary&&(r.isMoveBoundary=!1,!a.disabled&&c()&&p("mouse")):(m(),r.isMoveBoundary=!0)},v=(I,A)=>{if(r.isLongDownActive){if(I&&r.sessionSource&&I!==r.sessionSource)return;m(),r.isLongDownActive=!1,r.sessionSource=null,r.isKeyDown=!1,s(A)}},y=()=>{const I={start(A){if(a.disabled)return!1;const N=A,x=A;let V=!1;return(N.buttons===1||A.type==="touchstart"||(x.touches?.length??0)>0)&&(V=c(),V&&(r.isMoveBoundary=!1,p("mouse"))),V},ing:A=>{g(A)},end:()=>{v("mouse")}};i.value&&(r.dragEvent=new je.Drag(i.value,I))};e.onMounted(()=>{e.nextTick(()=>{y()})}),e.onBeforeUnmount(()=>{v(),r.dragEvent&&(r.dragEvent.end(),r.dragEvent=null)});const k=I=>{const A=I.key;if(A==="Enter"||A===" "){if(a.disabled)return;I.preventDefault(),!r.isKeyDown&&!r.isLongDownActive&&c()&&(r.isKeyDown=!0,p("keyboard"))}},F=I=>{const A=I.key;(A==="Enter"||A===" ")&&r.isKeyDown&&v("keyboard")},B=()=>{(r.isKeyDown||r.isLongDownActive)&&v(void 0,!0)};return(I,A)=>(e.openBlock(),e.createElementBlock("span",{ref_key:"refElButton",ref:i,class:e.normalizeClass(d.value),role:"button",tabindex:"0","aria-disabled":a.disabled,onKeydown:k,onKeyup:F,onBlur:B},[e.renderSlot(I.$slots,"icon")],42,ic))}}),sc=["id"],pn=e.defineComponent({name:"ClInputNumberStepper",components:{ClInputNumber:Vt,ClInputnumberstepperButton:xo,ClIconFont:ye},__name:"Index",props:{id:String,value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:"large"},btnShowType:{type:String,default:"fixed"},btnTheme:{type:String,default:"leftRight",validator:n=>["leftRight","upDown"].indexOf(n)!==-1},btnShape:{type:String,default:"square",validator:n=>["square","circle"].indexOf(n)!==-1},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!0},isTextRead:{type:Boolean,default:!1},min:Number,max:Number,isLoop:{type:Boolean,default:!1},decimal:{type:Number,default:0},fillZeroCount:{type:Number,default:0},btnStep:{type:Number,default:1},btnClsIconSub:{type:String,default:""},btnClsIconAdd:{type:String,default:""},operateBtnDownBeforeCallback:{type:Function,default:void 0},calculationOperateValueCallback:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onError"],setup(n,{emit:l}){const a=n,t=l,i=e.useTemplateRef("refElInput"),r=e.reactive({isFocus:!1}),d=e.ref(""),u=e.reactive({subtractDisabled:!1,addDisabled:!1}),s=a.id,c={upDown:{subtract:"angle-up",add:"angle-down"},leftRight:{subtract:"minus",add:"plus"}};let m=null;const p=()=>{const z=a.btnStep;return o.isFinite(z)&&z>0?z:1},g=e.computed(()=>{const z=a.decimal,H=p().toString();let S=z;if(H.indexOf(".")>-1){const E=H.split(".")[1].length;z<E&&(S=E)}return S===-1?-1:Math.max(0,Math.min(100,Math.round(S)))}),v=e.computed(()=>a.fillZeroCount>0&&o.isFinite(a.fillZeroCount)),y=e.computed(()=>{if(o.isNonEmptyString(a.btnClsIconSub))return"";const z=a.btnTheme||"leftRight";return c[z]?c[z].subtract:""}),k=e.computed(()=>{if(o.isNonEmptyString(a.btnClsIconAdd))return"";const z=a.btnTheme||"leftRight";return c[z]?c[z].add:""}),F=e.computed(()=>{if(a.isPlaintext){let H={"cl-plaintext-stepper":!0};return H=o.getJsonMerge(H,de.getClassNameJson(a.className)),H}let z={"panel-input-number-stepper":!0,"inputNumberStepper-disabled":a.disabled||!1};return z=o.getJsonMerge(z,de.getClassNameJson(a.className)),z[`inputNumberStepper-btn-${a.btnTheme||"leftRight"}`]=!0,z[`inputNumberStepper-btn-${a.btnShowType||"fixed"}`]=!0,(a.btnTheme||"leftRight")==="leftRight"&&a.btnShape==="circle"&&(z["inputNumberStepper-btnShape-circle"]=!0),z["inputNumberStepper-focus"]=r.isFocus,z[`inputNumberStepper-${a.size||"large"}`]=!0,z}),B=()=>{const z=d.value;t("update:value",z),t("update:modelValue",z),t("onChange",z)},I=z=>{o.isEmpty(z)||i.value?.setValue(z),d.value=z},A=(z,H)=>{o.isUndefined(z)&&(z=""),o.isString(z)&&(z=o.removeReplace(z));const S=z.toString();let E=z,f=!1,D=!1,h=!1;if(a.calculationOperateValueCallback){let b=null;try{const _=a.calculationOperateValueCallback({value:z,type:H});_&&(b=_)}catch{t("onError","数值计算回调执行失败")}b&&(o.isString(b.value)||typeof b.value=="number"&&o.isFinite(b.value))&&(E=b.value,f=b.subtractDisabled||!1,D=b.addDisabled||!1)}else{const b=H&&!o.isEmpty(H);if(b||!o.isEmpty(z)){const _=o.isEmpty(z)?0:Number(z);if(o.isFinite(_)){const O=a.min,P=a.max,{isLoop:J=!1}=a,Y=o.isUndefined(O),ne=o.isUndefined(P),ce=p();let X=_;if(b){X+=ce*(H==="subtract"?-1:1);const Q=X.toString();if(Q.indexOf(".")>-1){const le=Q.split(".")[1].length,K=g.value;K>=0&&le>K&&(X=Number(X.toFixed(K)))}}!Y&&X<=O?(J||(f=!0),E=X<O&&J&&!ne?P:O,h=X!==E):!ne&&X>=P?(J||(D=!0),E=X>P&&J&&!Y?O:P,h=X!==E):E=X}}}if(typeof E=="number"&&g.value>0&&(E.toString().indexOf(".")>-1||S.indexOf(".")>-1)&&(E=E.toFixed(g.value)),!o.isString(E)&&!(typeof E=="number"&&o.isFinite(E))&&(E=""),v.value&&!o.isEmpty(E)&&o.isFinite(E)){const b=a.fillZeroCount;b>10&&Se.warn("ClInputNumberStepper","fillZeroCount 超过 10,按 10 处理",b);const _=E.toString(),O=_.charAt(0)==="-",P=O?_.slice(1):_,J=P.indexOf("."),Y=J>-1?P.slice(0,J):P,ne=J>-1?P.slice(J):"",X=!/[eE]/.test(P)&&Y.length<b?o.getFillZero(Y,Math.min(b,10)):Y;E=(O?"-":"")+X+ne}return I(E.toString()),u.subtractDisabled=f,u.addDisabled=D,h},N=z=>{r.isFocus=z,z&&i.value?.focus()},x=z=>["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].indexOf(z.key)!==-1;e.onBeforeUnmount(()=>{m&&(clearTimeout(m),m=null)}),e.watch(()=>a.value,(z,H)=>{z!==H&&z!==d.value&&A(z)&&B()},{immediate:!0});const V=z=>{a.disabled||(z=o.removeReplace(z),I(z),m&&(clearTimeout(m),m=null),m=setTimeout(()=>{o.isEmpty(d.value)?(u.subtractDisabled=!1,u.addDisabled=!1):A(d.value),B()},100))},w=z=>{if(!a.disabled&&!a.isTextRead&&x(z)){z.preventDefault(),m&&(clearTimeout(m),m=null);const H=z.key;H==="ArrowLeft"||H==="ArrowDown"?A(d.value,"subtract"):A(d.value,"add"),B(),N(!0)}},M=z=>{!a.disabled&&!a.isTextRead&&x(z)&&(m&&(clearTimeout(m),m=null),N(!0))},C=()=>{N(!0)},T=z=>{N(!1),a.disabled||I(z)},U=z=>{m&&(clearTimeout(m),m=null),A(d.value,z)},Z=z=>{m&&(clearTimeout(m),m=null),B(),z||N(!0)};return(z,H)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(F.value)},[e.createVNode(Vt,{ref_key:"refElInput",ref:i,value:d.value,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isTextRead,isClean:n.isClean,isNumber:!v.value,decimal:g.value,isPlaintext:n.isPlaintext,theme:"icon",onOnChange:V,onOnKeydown:w,onOnKeyup:M,onOnFocus:C,onOnBlur:T},e.createSlots({_:2},[z.$slots.textPrepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(z.$slots,"textPrepend")]),key:"0"}:void 0]),1032,["value","placeholder","disabled","isReadonly","isClean","isNumber","decimal","isPlaintext"]),n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(xo,{className:"inputNumberStepper-subtract","aria-label":"减少",disabled:n.disabled||u.subtractDisabled,checkDownBeforeCallback:n.operateBtnDownBeforeCallback,onOnLongDownStart:H[0]||(H[0]=S=>U("subtract")),onOnLongDownEnd:Z},{icon:e.withCtx(()=>[e.createVNode(ye,{name:y.value,className:n.btnClsIconSub},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"]),e.createVNode(xo,{className:"inputNumberStepper-add","aria-label":"增加",disabled:n.disabled||u.addDisabled,checkDownBeforeCallback:n.operateBtnDownBeforeCallback,onOnLongDownStart:H[1]||(H[1]=S=>U("add")),onOnLongDownEnd:Z},{icon:e.withCtx(()=>[e.createVNode(ye,{name:k.value,className:n.btnClsIconAdd},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"])],64))],10,sc))}}),Ml=e.defineComponent({name:"ClInputPassword",components:{ClIconFont:ye,ClInput:Pe},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:Boolean,theme:{type:String,default:"default"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:Boolean,isClean:{type:Boolean,default:!0}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.ref(!1),s=e.computed(()=>u.value?"text":"password"),c=e.computed(()=>{let C={"panel-input-password":!0};return C=o.getJsonMerge(C,de.getClassNameJson(t.className)),o.getStringByJson(C," ")}),m=C=>{i("update:value",C),i("update:modelValue",C),i("onChange",C)},p=C=>{m(C)},g=C=>{i("onFocus",C)},v=C=>{i("onBlur",C)},y=C=>{i("onChangeBlur",C)},k=C=>{i("onKeyupEnter",C)},F=C=>{i("onKeydown",C)},B=C=>{i("onKeyup",C)},I=()=>{i("onClear")},A=()=>{i("onInit")},N=()=>{t.disabled||(u.value=!u.value)};return l({getValue:()=>d.value?.getValue(),getValueData:()=>d.value?.getValueData(),setValue:(C,T)=>{d.value?.setValue(C,T)},focus:()=>{d.value?.focus()}}),(C,T)=>(e.openBlock(),e.createBlock(Pe,{ref_key:"refElInput",ref:d,id:e.unref(r),name:n.name,value:n.value,inputType:s.value,className:c.value,placeholder:n.placeholder,label:n.label,isFloating:n.isFloating,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,width:n.width,theme:n.theme,onOnChange:p,onOnFocus:g,onOnBlur:v,onOnChangeBlur:y,onOnKeyupEnter:k,onOnKeydown:F,onOnKeyup:B,onOnClear:I,onOnInit:A},e.createSlots({suffix:e.withCtx(()=>[e.createVNode(ye,{class:"input-password-icon",name:u.value?"eye":"eye-no",role:"button","aria-label":u.value?"隐藏密码":"显示密码","aria-disabled":n.disabled,tabindex:n.disabled?-1:0,onClick:N,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},null,8,["name","aria-label","aria-disabled","tabindex","onKeydown"])]),_:2},[C.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"prepend")]),key:"0"}:void 0,C.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"append")]),key:"1"}:void 0]),1032,["id","name","value","inputType","className","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme"]))}}),rc=["id"],cc=["aria-label","tabindex","onKeydown"],Xt=e.defineComponent({name:"ClInputSearch",components:{ClInput:Pe,ClIconFont:ye},__name:"Index",props:{id:String,value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},textLabel:{type:String,default:""},changeDelayTime:{type:Number,default:200},theme:{type:String,default:"icon",validator:n=>["icon","text"].indexOf(n)!==-1},location:{type:String,default:"right",validator:n=>["left","right"].indexOf(n)!==-1}},emits:["update:value","update:modelValue","onChange","onSearch","onFocus","onBlur"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput");let u=o.isNonEmptyString(t.value)?t.value:"";const s=e.ref(o.isNonEmptyString(t.value)?t.value:"");let c=null,m=null;const p=e.computed(()=>o.isFinite(t.changeDelayTime)&&t.changeDelayTime>=0?t.changeDelayTime:200),g=e.computed(()=>{let H="append";return o.isEmpty(t.location)||(H=t.location==="left"?"prepend":"append"),H}),v=e.computed(()=>{let H={"panel-input-search":!0,"input-search-disabled":t.disabled};const S=o.isEmpty(t.theme)?"icon":t.theme;return H[`input-search-${S}`]=!0,o.getJsonMerge(H,de.getClassNameJson(t.className))}),y=H=>{i("update:value",H),i("update:modelValue",H),i("onChange",H)},k=H=>{i("onSearch",H)},F=H=>{i("onFocus",H)},B=H=>{i("onBlur",H)},I=()=>{c&&(clearTimeout(c),c=null)},A=()=>{m&&(clearTimeout(m),m=null)},N=()=>{I(),A(),u!==s.value&&(u=s.value,y(s.value)),k(s.value)};e.onBeforeUnmount(()=>{I(),A()}),e.watch(()=>t.value,H=>{s.value=o.isNonEmptyString(H)?H:"",u=s.value});const x=H=>{t.disabled||(I(),c=setTimeout(()=>{!t.disabled&&s.value===H&&u!==H&&(u=H,y(H)),c=null},p.value))},V=()=>{t.disabled||(A(),m=setTimeout(()=>{t.disabled||N()},p.value))},w=H=>{t.disabled||F(H)},M=H=>{t.disabled||B(H)},C=()=>{t.disabled||N()},T=()=>{t.disabled||(I(),A(),u="",y(""),k(""))};return l({getValue:()=>s.value,setValue:(H,S)=>{const E=o.isNonEmptyString(H)?H:"";I(),A(),u=E,s.value=E,S&&(i("update:value",E),i("update:modelValue",E))},focus:()=>{d.value?.focus()}}),(H,S)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(v.value)},[e.createVNode(Pe,{ref_key:"refElInput",ref:d,value:s.value,"onUpdate:value":S[0]||(S[0]=E=>s.value=E),theme:"icon",placeholder:n.placeholder,isClean:!0,disabled:n.disabled,onOnChange:x,onOnKeyupEnter:V,onOnFocus:w,onOnBlur:M,onOnClear:T},{[g.value]:e.withCtx(()=>[n.theme==="text"&&!e.unref(o).isEmpty(n.textLabel)?(e.openBlock(),e.createElementBlock("span",{key:0,role:"button","aria-label":n.textLabel,tabindex:n.disabled?-1:0,onClick:C,onKeydown:[e.withKeys(e.withModifiers(C,["prevent"]),["enter"]),e.withKeys(e.withModifiers(C,["prevent"]),["space"])]},e.toDisplayString(n.textLabel),41,cc)):(e.openBlock(),e.createBlock(ye,{key:1,name:"search",role:"button","aria-label":"搜索",tabindex:n.disabled?-1:0,onClick:C,onKeydown:[e.withKeys(e.withModifiers(C,["prevent"]),["enter"]),e.withKeys(e.withModifiers(C,["prevent"]),["space"])]},null,8,["tabindex","onKeydown"]))]),_:2},1032,["value","placeholder","disabled"])],10,rc))}}),uc=["id"],dc=["name","placeholder","disabled","aria-label"],Tn="100px",qn=e.defineComponent({name:"ClInputTextarea",__name:"Index",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:String,default:""},height:{type:String,default:"100px"},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!1},isAutoHeight:{type:Boolean,default:!1},changeDelayTime:{type:Number,default:200},heightMax:{type:String,default:""},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onInit","onKeydownEnter","onKeyupEnter","onFocus","onBlur","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTextarea"),u=e.reactive({height:t.height||Tn}),s=e.ref(o.isString(t.value)?t.value:""),c={lastValue:o.isString(t.value)?t.value:"",prevDelayValue:o.isString(t.value)?t.value:"",valueDelayRun:!1},m=e.computed(()=>{let f=t.name;return o.isEmpty(f)&&(f=`textarea_${o.getRandom(8)}`),f}),p=e.computed(()=>t.isClean&&!t.disabled&&!o.isEmpty(s.value)),g=e.computed(()=>{let f={"panel-input-textarea":!0,"textarea-clean":t.isClean&&!t.isPlaintext};return t.isPlaintext&&(f["cl-plaintext-value"]=!0,f["cl-plaintext-value-pre"]=!0),f=o.getJsonMerge(f,de.getClassNameJson(t.className)),f}),v=e.computed(()=>{const f=s.value;return o.isString(f)?f.replace(/<\/?br\s*\/?>/gi,`
7
- `):""}),y=e.computed(()=>{const{width:f,heightMax:D}=t,h={};return o.isNonEmptyString(f)&&(h.width=f),t.isPlaintext||(o.isEmpty(u.height)||(h.height=u.height),o.isNonEmptyString(D)&&(h["max-height"]=D)),h});let k;const F=f=>{k&&(clearTimeout(k),k=null),c.valueDelayRun=!0,k=setTimeout(()=>{c.valueDelayRun=!1,c.prevDelayValue!==f&&(c.prevDelayValue=f,i("onChangeDelay",f))},Math.max(t.changeDelayTime,0))},B=f=>{f!==c.lastValue&&(c.lastValue=f,i("update:value",f),i("update:modelValue",f),i("onChange",f),F(f))},I=()=>{if(t.isAutoHeight){const f=d.value;if(f){f.style.height=t.height||Tn;const D=f.scrollHeight+f.scrollTop+(f.offsetHeight-f.clientHeight);f.style.height="100%",u.height=D>0?`${D}px`:t.height||Tn}}},A=()=>{d.value?.focus()},N=()=>{e.nextTick(()=>{i("onInit")})};e.onMounted(()=>{N()}),e.onBeforeUnmount(()=>{k&&(clearTimeout(k),k=null)}),e.watch(()=>t.value,(f,D)=>{f!==D&&(s.value=o.isString(f)?f:"",c.lastValue=o.isString(f)?f:"",requestAnimationFrame(()=>I()),c.valueDelayRun||(c.prevDelayValue=f||""))});const x=f=>{const D=f.target;if(!D)return;const h=D.value;requestAnimationFrame(()=>I()),B(h)},V=f=>{f.key==="Enter"&&i("onKeydownEnter",f)},w=f=>{f.key==="Enter"&&i("onKeyupEnter",f)},M=()=>{s.value="",B(""),A()},C=()=>{i("onFocus")},T=()=>{i("onBlur")},U=()=>o.trim(s.value);return l({getValue:U,getValueData:()=>({value:U(),show:s.value}),setValue:f=>{k&&(clearTimeout(k),k=null,c.valueDelayRun=!1);const D=o.isEmpty(f)?"":f;c.lastValue=D,c.prevDelayValue=D,s.value=D,I()},initHeight:()=>{u.height=t.height||Tn,t.isAutoHeight&&I()},focus:()=>{A()},getParentElement:()=>d.value?.parentElement||null}),(f,D)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(g.value),style:e.normalizeStyle(y.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(v.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.withDirectives(e.createElementVNode("textarea",{ref_key:"refElTextarea",ref:d,class:"form-control text-area","onUpdate:modelValue":D[0]||(D[0]=h=>s.value=h),name:m.value,placeholder:n.placeholder,disabled:n.disabled,"aria-label":n.placeholder||"文本输入区域",onInput:x,onKeydown:V,onKeyup:w,onFocus:C,onBlur:T},null,40,dc),[[e.vModelText,s.value]]),p.value?(e.openBlock(),e.createBlock(ye,{key:0,name:"close-circle-fill",class:"textarea-clear-icon","aria-label":"清除输入内容",onClick:e.withModifiers(M,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],14,uc))}}),mc=["id"],pc=["id","href","target","rel"],fc=["id","href"],hc=["id"],Nt=e.defineComponent({name:"ClLink",__name:"Index",props:{id:String,className:{type:String,default:""},disabled:{type:Boolean,default:!1},url:{type:[String,Object],default:""},isHideUnderline:{type:Boolean,default:!1},isLight:{type:Boolean,default:!1},isTargetBlank:{type:Boolean,default:!1},isOutside:{type:Boolean,default:!1},isStopPropagation:{type:Boolean,default:!1},theme:{type:String,default:"link",validator:n=>["link","button"].indexOf(n)!==-1}},emits:{onClick:n=>!0,onHoverIn:n=>!0,onHoverOut:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.computed(()=>!o.isEmpty(a.url)),d=e.computed(()=>o.isString(a.url)?a.url:(o.isEmpty(a.url)||Se.warn("ClLink","Link 组件:url 为 Router 对象时不应同时使用 isOutside 或 isTargetBlank,请传入 String 类型 url"),"")),u=e.computed(()=>{if(a.theme==="button"){let F={btn:!0,"btn-disabled":a.disabled};const B=["btn-green","btn-red","btn-yellow","btn-white","btn-grayLight","btn-transparent","btn-text"],I=de.getClassNameJson(a.className);return B.some(N=>!!I[N])||(F["btn-default"]=!0),o.getJsonMerge(F,I)}let k={"panel-link":!0,"btn-link":!0,"btn-link-disabled":a.disabled,"always-light":a.isLight,"underline-none":a.isHideUnderline};return k=o.getJsonMerge(k,de.getClassNameJson(a.className)),k}),s=y=>{t("onClick",y)},c=y=>{t("onHoverIn",y)},m=y=>{t("onHoverOut",y)},p=y=>{a.disabled||(s(y),a.isStopPropagation&&(y?.preventDefault(),y?.stopPropagation()))},g=y=>{a.disabled||c(y)},v=y=>{a.disabled||m(y)};return(y,k)=>{const F=e.resolveComponent("router-link");return n.url&&r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),role:"link","aria-disabled":"true"},[e.renderSlot(y.$slots,"default")],10,mc)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isOutside?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),href:d.value,target:n.isTargetBlank?"_blank":void 0,rel:n.isTargetBlank?"noopener noreferrer":void 0,onClick:p,onMouseenter:g,onMouseleave:v},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,pc)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isTargetBlank?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),href:d.value,target:"_blank",rel:"noopener noreferrer",onClick:e.withModifiers(p,["stop"]),onMouseenter:g,onMouseleave:v},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,fc)):(e.openBlock(),e.createBlock(F,{key:1,id:e.unref(i),class:e.normalizeClass(u.value),to:n.url,onClick:e.withModifiers(p,["stop"])},{default:e.withCtx(()=>[e.createElementVNode("span",{onMouseenter:g,onMouseleave:v},[e.renderSlot(y.$slots,"default")],32)]),_:3},8,["id","class","to"]))],64))],64))],64)):(e.openBlock(),e.createElementBlock("a",{key:1,id:e.unref(i),class:e.normalizeClass(u.value),href:"javascript:",onClick:p,onMouseenter:g,onMouseleave:v},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,hc))}}}),gc={class:"loading-content"},Ol=e.defineComponent({name:"ClLoadFullCenter",__name:"FullCenter",props:{id:{},className:{},show:{type:Boolean,default:!0},teleportTarget:{},zIndex:{},background:{},theme:{},size:{},color:{}},setup(n){return(l,a)=>(e.openBlock(),e.createBlock(At,{show:n.show,id:n.id,zIndex:n.zIndex,teleportTarget:n.teleportTarget||"self",background:n.background||"var(--cl-overlay, rgba(0, 0, 0, 0.5))",duration:0,className:n.className,isLockScroll:!1},{default:e.withCtx(()=>[e.createElementVNode("div",gc,[e.createVNode(rt,{theme:n.theme,size:n.size,color:n.color},null,8,["theme","size","color"])])]),_:1},8,["show","id","zIndex","teleportTarget","background","className"]))}}),vc=["id"],yc={key:0,class:"loading-content"},kc={key:1,class:"loading-nothing"},Gt=e.defineComponent({name:"ClLoadIng",__name:"Ing",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},noDataText:{},color:{}},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-load-ing":!0},de.getClassNameJson(l.className)));return(i,r)=>n.isLoadIng||n.isEmpty?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.value),id:e.unref(a)},[n.isLoadIng?(e.openBlock(),e.createElementBlock("div",yc,[e.createVNode(rt,{theme:n.theme,size:n.size,color:n.color},null,8,["theme","size","color"])])):n.isEmpty?(e.openBlock(),e.createElementBlock("div",kc,[e.createElementVNode("div",null,[e.renderSlot(i.$slots,"nothingData",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.noDataText||"暂无数据"),1)])])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,vc)):e.createCommentVNode("",!0)}}),Sc=["aria-label"],wc={class:"loadScreen-main"},Cc={key:0,class:"loadScreen-text"},Go=e.defineComponent({name:"ClLoadScreen",__name:"Index",props:{id:String,className:String,teleportTarget:{type:String,default:"body"}},setup(n,{expose:l}){const{optA11yText:a}=Uo(),i=n.id||`loadscreen-${o.getRandom(5)}`,r=e.ref(!1),d=e.reactive({id:i,text:""});let u=null;const s=p=>{u&&(clearTimeout(u),u=null),u=setTimeout(()=>{r.value=!1,u=null},p)};return e.onBeforeUnmount(()=>{u&&(clearTimeout(u),u=null),r.value=!1}),l({show:(p,g)=>{u&&(clearTimeout(u),u=null),d.id=o.isNonEmptyString(g?.id)?g.id:i,d.text=o.isNonEmptyString(p)?p:"",r.value=!0},hide:(p=0)=>{p>0?s(p):(u&&(clearTimeout(u),u=null),r.value=!1)}}),(p,g)=>(e.openBlock(),e.createBlock(At,{id:d.id,show:r.value,teleportTarget:n.teleportTarget,zIndex:1000002,duration:0,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.4))",className:n.className},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"loadScreen-container",role:"alert","aria-label":e.unref(a).loading||"加载中"},[e.createElementVNode("div",wc,[d.text.length>0?(e.openBlock(),e.createElementBlock("span",Cc,e.toDisplayString(d.text),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(rt,{color:"white",size:"large"})])],8,Sc)]),_:1},8,["id","show","teleportTarget","className"]))}}),Ec=["id"],_l=e.defineComponent({name:"ClLoadWarp",__name:"Warp",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},height:{},minHeight:{},noDataText:{},color:{}},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-load-warp":!0},de.getClassNameJson(l.className))),i=e.computed(()=>{const r={},{height:d,minHeight:u,isLoadIng:s}=l;return s&&(r["min-height"]="100px"),o.isNonEmptyString(d)?r.height=d:o.isNonEmptyString(u)&&(r["min-height"]=u),r});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),style:e.normalizeStyle(i.value),id:e.unref(a)},[e.renderSlot(r.$slots,"default"),e.createVNode(Gt,{isLoadIng:n.isLoadIng,isEmpty:n.isEmpty,theme:n.theme,size:n.size,color:n.color,noDataText:n.noDataText},{nothingData:e.withCtx(()=>[e.renderSlot(r.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty","theme","size","color","noDataText"])],14,Ec))}}),bc=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function La(n){return Array.from(n.querySelectorAll(bc)).filter(l=>!(l.hasAttribute("disabled")||l.getAttribute("aria-hidden")==="true"||l.offsetParent===null&&getComputedStyle(l).position!=="fixed"))}function xc(n,l={}){const a=t=>{n.value&&t.key==="Escape"&&(l.isEscapeClose&&!l.isEscapeClose()||l.onEscape&&(t.stopPropagation(),l.onEscape()))};e.watch(n,t=>{t?document.addEventListener("keydown",a,!0):document.removeEventListener("keydown",a,!0)},{immediate:!0}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",a,!0)})}function Bc(n,l,a={}){let t=null;const i=()=>n.value??null,r=s=>{if(!l.value)return;const c=i();if(!c)return;if(s.key==="Escape"){if(a.isEscapeClose&&!a.isEscapeClose()||!a.onEscape)return;s.stopPropagation(),a.onEscape();return}if(s.key!=="Tab")return;const m=La(c);if(m.length===0){s.preventDefault(),c.focus();return}const p=m[0],g=m[m.length-1],v=document.activeElement;if(!(v?c.contains(v):!1)){s.preventDefault(),(s.shiftKey?g:p).focus();return}s.shiftKey&&v===p?(s.preventDefault(),g.focus()):!s.shiftKey&&v===g&&(s.preventDefault(),p.focus())},d=()=>{t=document.activeElement,document.addEventListener("keydown",r,!0),a.isAutoFocus!==!1&&requestAnimationFrame(()=>{const s=i();if(!s)return;const c=La(s);c.length>0?c[0].focus():s.focus()})},u=()=>{document.removeEventListener("keydown",r,!0);const s=t;t=null,s&&requestAnimationFrame(()=>{s.isConnected&&s.focus()})};e.watch(l,s=>{s?d():u()},{immediate:!0}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",r,!0)})}const Ic=["id"],Dc={class:"modal-content"},Al=e.defineComponent({name:"ClModalTransition",__name:"BaseTransition",props:{id:String,className:String,isBackClick:{type:Boolean,default:!0},width:{type:String,default:"600px"},classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""},isEscapeClose:{type:Boolean,default:!0},isFocusTrap:{type:Boolean,default:!0}},emits:{onClickBack:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=new Map;let d=!1;const u=new Map,s=e.useTemplateRef("refElParent"),c=e.useTemplateRef("refElDialog"),m=e.reactive({isShow:!1}),p=e.computed(()=>o.getJsonMerge({"panel-modal":!0},de.getClassNameJson(t.className))),g=e.computed(()=>({modal:!0,fade:!0,show:m.isShow})),v=e.computed(()=>{const C={};return o.isEmpty(t.width)||(C.width=t.width),C}),y=()=>{i("onClickBack")},k=C=>{const T=r.get(C)??0;r.set(C,T+1),!(T>0||/\bmodal-open\b/.test(C.className))&&(u.set(C,C===document.body?{x:window.scrollX,y:window.scrollY}:{x:C.scrollLeft,y:C.scrollTop}),C.className+=" modal-open",C===document.body&&(d=!0))},F=C=>{const T=r.get(C)??0;if(!(T<=0))if(T===1){r.delete(C),C===document.body?d&&(C.className=C.className.replace(/\bmodal-open\b/g,"").trim(),d=!1):C.className=C.className.replace(/\bmodal-open\b/g,"").trim();const U=u.get(C);U&&(u.delete(C),requestAnimationFrame(()=>{C===document.body?window.scrollTo(U.x,U.y):(C.scrollTop=U.y,C.scrollLeft=U.x)}))}else r.set(C,T-1)},B=()=>{const C=t.teleportTarget;if(o.isEmpty(C)||C==="body")return document.body;if(C==="self"){const U=s.value?s.value.parentElement:null;if(!U)return null;let Z=U;for(;Z&&Z!==document.body;){if(window.getComputedStyle(Z).position!=="static")return Z;Z=Z.parentElement}return document.body}const T=document.querySelector(C);return T===document.body?document.body:T??document.body},I=()=>{if(m.isShow){const C=B();C&&k(C)}else{const C=B();C&&F(C)}},A=()=>{m.isShow=!1};Bc(c,e.computed(()=>t.isFocusTrap&&m.isShow),{onEscape:()=>{t.isEscapeClose&&A()},isEscapeClose:()=>t.isEscapeClose}),e.onBeforeUnmount(()=>{m.isShow&&I()}),e.watch(()=>m.isShow,()=>{I()});const N=C=>{t.isBackClick&&C.currentTarget===C.target&&(A(),y())},x=()=>{},V=()=>{};return l({show:()=>{m.isShow=!0},hide:()=>{A()}}),(C,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:n.id,ref_key:"refElParent",ref:s},[e.createVNode(e.Transition,{"enter-active-class":n.classTransitionEnter,"leave-active-class":n.classTransitionLeave,onEnter:x,onAfterLeave:V},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(g.value),role:"dialog","aria-modal":"true",tabindex:"-1",ref_key:"refElDialog",ref:c},[e.createElementVNode("div",{class:"modal-wrapper",onClick:N},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle(v.value)},[e.createElementVNode("div",Dc,[e.renderSlot(C.$slots,"default")])],4)])],2),[[e.vShow,m.isShow]])]),_:3},8,["enter-active-class","leave-active-class"]),e.createVNode(At,{show:m.isShow,zIndex:999999,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.3))",duration:150,teleportTarget:n.teleportTarget},null,8,["show","teleportTarget"])],10,Ic))}}),Tc={key:0,class:"modal-header"},Nc={class:"modal-title"},Vc={class:"modal-body"},Mc={key:2,class:"modal-footer"},Oc={key:3,class:"modal-footer-hide"},Qo=e.defineComponent({name:"ClModal",__name:"Index",props:{id:String,className:String,posSubmitClose:{type:String,default:"CloseSubmit",validator:n=>["CloseSubmit","SubmitClose"].indexOf(n)!==-1},width:{type:String,default:"600px"},titleName:String,isBackClick:{type:Boolean,default:!0},isShowHeader:{type:Boolean,default:!0},isShowFooter:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!0},isShowSubmitLoad:{type:Boolean,default:!0},closeLabel:String,submitLabel:String,classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""}},emits:{onSubmit:()=>!0,onClose:()=>!0},setup(n,{expose:l,emit:a}){const t=n,{optLocale:i}=Le(),r=(V,w)=>{i.value;const M=ot.getValue(`common.${V}`);return typeof M=="string"&&M.length>0?M:w},d=e.computed(()=>t.closeLabel||r("cancel","取消")),u=e.computed(()=>t.submitLabel||r("submit","提交")),s=a,c=e.useTemplateRef("refElTransition"),m=e.useTemplateRef("refElBtnSubmit"),p=e.reactive({isLoadBackClick:!0,disabledSubmit:!1}),g=()=>{s("onSubmit")},v=()=>{s("onClose")},y=()=>{c.value&&c.value.hide()},k=()=>{t.isShowSubmitLoad&&(p.isLoadBackClick=!1),g()},F=()=>{y(),v()},B=()=>{v()},I=()=>{N(),p.disabledSubmit=!1,c.value&&c.value.show()},A=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop(),y()},N=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop()};return l({show:I,hide:A,loadStop:N,disabledSubmit:V=>{const w=o.isBoolean(V)?V:!0;p.disabledSubmit=w}}),(V,w)=>(e.openBlock(),e.createBlock(Al,{id:n.id,className:n.className,isBackClick:n.isBackClick&&p.isLoadBackClick,classTransitionEnter:n.classTransitionEnter,classTransitionLeave:n.classTransitionLeave,width:n.width,teleportTarget:n.teleportTarget,onOnClickBack:B,ref_key:"refElTransition",ref:c},{default:e.withCtx(()=>[n.isShowHeader?(e.openBlock(),e.createElementBlock("div",Tc,[e.createElementVNode("h4",Nc,e.toDisplayString(n.titleName),1),e.createElementVNode("button",{type:"button",class:"close","aria-label":"关闭",onClick:F},[e.createVNode(ye,{name:"close"})])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Vc,[e.renderSlot(V.$slots,"default")]),n.isShowFooter?(e.openBlock(),e.createElementBlock("div",Mc,[n.posSubmitClose==="CloseSubmit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Ze,{label:d.value,color:"grayLight",onOnClick:F},null,8,["label"]),n.isShowSubmit?(e.openBlock(),e.createBlock(Ze,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:n.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:u.value,onOnClick:k},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):n.posSubmitClose==="SubmitClose"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowSubmit?(e.openBlock(),e.createBlock(Ze,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:n.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:u.value,onOnClick:k},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(Ze,{label:d.value,color:"grayLight",onOnClick:F},null,8,["label"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock("div",Oc))]),_:3},8,["id","className","isBackClick","classTransitionEnter","classTransitionLeave","width","teleportTarget"]))}}),_c=["id"],Ll=e.defineComponent({name:"ClNumberRoll",__name:"Index",props:{id:String,value:[String,Number],className:String,decimal:{type:Number,default:0},isThousand:{type:Boolean,default:!0},separator:{type:String,default:","},animationTime:{type:Number,default:.5}},setup(n){const l=n,a=l.id,t=e.ref("");let i=null;const r=e.computed(()=>{const c={"panel-number-roll":!0};return o.getJsonMerge(c,de.getClassNameJson(l.className))}),d=c=>{const m=Math.max(0,Math.min(100,l.decimal)),p=l.separator,g=l.isThousand,y=c.toFixed(m).split(".");return g&&(y[0]=y[0].replace(/\B(?=(\d{3})+(?!\d))/g,()=>p)),y.join(".")},u=(c,m,p)=>{if(i!==null&&(cancelAnimationFrame(i),i=null),c===m){t.value=d(m);return}const g=performance.now(),v=p*1e3,y=k=>{const F=Math.min((k-g)/v,1),B=F===1?1:1-Math.pow(2,-10*F);t.value=d(c+(m-c)*B),F<1?i=requestAnimationFrame(y):i=null};i=requestAnimationFrame(y)},s=(c,m)=>{const p=l.animationTime,g=y=>{if(y==null||y==="")return 0;const k=Number(y);return o.isFinite(k)?k:0},v=g(c);if(p>0){const y=g(m);u(y,v,p)}else t.value=d(v)};return e.onMounted(()=>{e.nextTick(()=>{s(l.value)})}),e.onActivated(()=>{}),e.onDeactivated(()=>{i!==null&&(cancelAnimationFrame(i),i=null);const c=m=>{if(m==null||m==="")return 0;const p=Number(m);return o.isFinite(p)?p:0};t.value=d(c(l.value))}),e.onBeforeUnmount(()=>{i!==null&&(cancelAnimationFrame(i),i=null)}),e.watch(()=>l.value,(c,m)=>{c!==m&&s(c,m)}),(c,m)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(a),class:e.normalizeClass(r.value)},e.toDisplayString(t.value),11,_c))}}),Ac=["id"],Lc={key:0,class:"progress"},$c=["aria-valuenow"],Fc=["aria-valuenow"],Pc={class:"progress-circular-line circular-line-left"},$l=e.defineComponent({name:"ClProgress",__name:"Index",props:{id:String,className:String,ratio:{type:[Number,String],required:!0},theme:{type:String,default:"horizontal",validator:n=>["horizontal","circular"].includes(n)},color:String,isShowNum:{type:Boolean,default:!0},isAnimation:{type:Boolean,default:!0},diameter:{type:String,default:"50px"},showNumText:String,showNumPos:{type:String,default:"out-center"},showNumTrigger:{type:String,default:"hover"},showNumColor:String},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElTopParent"),i=e.useTemplateRef("refElBar"),r=e.reactive({isHorizontal:l.theme==="horizontal",isCircular:l.theme==="circular",ratioHundred:"0%",circularLeftRotate:-45,circularLeftTime:0,circularRightRotate:-45,circularRightTime:0,posText:{inOut:"out",lcr:"center",isOverflow:!1}}),d={lastRatio:"",lastRotateLeft:-45,lastRotateRight:-45,runTimeCircularRotate:null,_initVersion:0,_resizeTimer:null,resizeEvent:null},u=e.computed(()=>{let I="";const{showNumText:A}=l;if(o.isNonEmptyString(A))I=A;else{let N=r.ratioHundred;N=N.substring(0,N.length-1),I=o.getFormatThousands(N)+"%"}return I}),s=e.computed(()=>{const I={"panel-progress":!0};I[`progress-${l.theme}`]=!0;const{className:A,isShowNum:N,showNumTrigger:x}=l;return N&&x!=="none"&&(I[`progress-${x}-num`]=!0),Object.assign(I,de.getClassNameJson(A)),I}),c=e.computed(()=>({"progress-bar":!0,"progress-bar-striped":l.isAnimation,"striped-animation":l.isAnimation})),m=e.computed(()=>{const I={};return r.isCircular&&(o.isEmpty(l.diameter)||(I.width=l.diameter,I.height=l.diameter)),I}),p=e.computed(()=>{const I={};if(I.width=r.ratioHundred,o.isEmpty(l.color)||(I["background-color"]=l.color),r.isHorizontal&&r.posText.inOut==="in"){let A="center";switch(r.posText.lcr){case"left":A="flex-start";break;case"center":A="center";break;case"right":A="flex-end";break;default:A="center";break}r.posText.isOverflow&&(A="flex-start"),I["justify-content"]=A}return I}),g=e.computed(()=>{const I={},{showNumColor:A}=l;if(o.isNonEmptyString(A)&&(I.color=A),r.isHorizontal&&r.posText.inOut==="out")switch(r.posText.lcr){case"left":I.left="0";break;case"center":break;case"right":I.right="0";break}return I}),v=e.computed(()=>{const I={};return I.transform=`rotate(${r.circularRightRotate}deg)`,r.circularRightTime>0&&(I["transition-duration"]=`${r.circularRightTime}ms`),o.isEmpty(l.color)||(I["border-bottom-color"]=l.color,I["border-right-color"]=l.color),I}),y=e.computed(()=>{const I={};return I.transform=`rotate(${r.circularLeftRotate}deg)`,r.circularLeftTime>0&&(I["transition-duration"]=`${r.circularLeftTime}ms`),o.isEmpty(l.color)||(I["border-bottom-color"]=l.color,I["border-right-color"]=l.color),I}),k=()=>{const{showNumPos:I}=l;if(o.isEmpty(I))return;const A=I.split("-");A.length===2?(r.posText.inOut=o.isExistValue(["in","out"],A[0])?A[0]:"out",r.posText.lcr=o.isExistValue(["left","center","right"],A[1])?A[1]:"center"):Se.warn("ClProgress",'showNumPos 格式无效,期望 "in/out-left/center/right",实际传入',I)},F=I=>{let A=o.isEmpty(I)?0:Number(I);if(o.isNaN(A)&&(A=0),A<=0?A=0:A>=100&&(A=100),r.ratioHundred=`${A}%`,r.isCircular){d.runTimeCircularRotate&&clearTimeout(d.runTimeCircularRotate);const N=A/100*360;let x=0,V=0;N<180?(x=N+-45,V=-45):(x=135,V=N-180-45);let w=!0;o.isEmpty(d.lastRatio)||(w=A>=Number(d.lastRatio));let C=0,T=0;const U=Math.abs(x-d.lastRotateRight),Z=Math.abs(V-d.lastRotateLeft);if(U>0||Z>0){const S=400/(U+Z);C=U*S,T=Z*S}const z=++d._initVersion;w?(r.circularRightRotate=x,r.circularRightTime=C,e.nextTick(()=>{z===d._initVersion&&(d.runTimeCircularRotate=setTimeout(()=>{r.circularLeftRotate=V,r.circularLeftTime=T},C))})):(r.circularLeftRotate=V,r.circularLeftTime=T,e.nextTick(()=>{z===d._initVersion&&(d.runTimeCircularRotate=setTimeout(()=>{r.circularRightRotate=x,r.circularRightTime=C},T))})),d.lastRotateRight=x,d.lastRotateLeft=V}d.lastRatio=String(A)},B=()=>{k(),F(l.ratio),i.value&&(d.resizeEvent=new je.Resize({element:i.value,callback:()=>{d._resizeTimer&&clearTimeout(d._resizeTimer),d._resizeTimer=setTimeout(()=>{if(l.isShowNum&&r.isHorizontal&&r.posText.inOut==="in"&&t.value){const I=t.value.querySelector(".progress-bar"),A=t.value.querySelector(".progress-num");if(I&&A){const N=I.clientWidth,x=A.clientWidth;let V=!1;N===0&&x===0?V=!1:N===0&&x>0?V=!0:V=N>0&&x>N,r.posText.isOverflow=V}}},150)}}))};return e.onMounted(()=>{e.nextTick(()=>{B()})}),e.onUnmounted(()=>{d._resizeTimer&&clearTimeout(d._resizeTimer),d.runTimeCircularRotate&&clearTimeout(d.runTimeCircularRotate),d.resizeEvent&&d.resizeEvent.destroy()}),e.watch(()=>l.ratio,(I,A)=>{I!==A&&F(I)}),(I,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:e.unref(a),class:e.normalizeClass(s.value),style:e.normalizeStyle(m.value)},[r.isHorizontal?(e.openBlock(),e.createElementBlock("div",Lc,[e.createElementVNode("div",{ref_key:"refElBar",ref:i,class:e.normalizeClass(c.value),style:e.normalizeStyle(p.value),role:"progressbar","aria-valuenow":Number(r.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[n.isShowNum&&r.posText.inOut==="in"?(e.openBlock(),e.createElementBlock("span",{key:0,class:"progress-num",style:e.normalizeStyle(g.value)},e.toDisplayString(u.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,$c)])):r.isCircular?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"progress-circular-line circular-line-right",role:"progressbar","aria-valuenow":Number(r.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(v.value)},null,4)],8,Fc),e.createElementVNode("div",Pc,[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(y.value)},null,4)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.isShowNum&&r.posText.inOut==="out"?(e.openBlock(),e.createElementBlock("span",{key:3,class:"progress-num",style:e.normalizeStyle(g.value)},e.toDisplayString(u.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],14,Ac))}}),Rc=["id"],Hc={key:0,class:"cl-plaintext-value"},Uc=["id","name","value","disabled","checked","onClick"],zc=["for"],Jc={key:0},Zo=e.defineComponent({name:"ClRadio",directives:{cltooltip:ut},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:[String,Number],required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`rd-${o.getRandom(8)}`,d=o.isEmpty(t.name)?r+"_name":t.name,u=t.id,s=e.ref(t.value?.toString()||"");let c={};const m=e.ref(0),p=e.ref(!1),g={isProcessing:!1,_initEmitted:!1},v=e.computed(()=>{if(t.isPlaintext)return[];const E=t.list;return o.isArray(E)?E.filter(f=>!o.isEmpty(f)):[]}),y=e.computed(()=>{t.list,m.value;const E=s.value;if(o.isEmpty(E))return"";const f=o.isExistJsonKey(c,E)?c[E]:void 0;return f&&o.isNonEmptyString(f.name)?f.name:E}),k=e.computed(()=>o.getJsonMerge({"panel-radio":!0},de.getClassNameJson(t.className))),F=e.computed(()=>{const E={radio:!0,"radio-default":!0};return E["radio-inline"]=t.isInline??!0,E}),B=E=>{i("update:value",E),i("update:modelValue",E)},I=E=>{const f=E.id?.toString()??"";B(f),i("onChange",f,o.getJsonClone(E))},A=()=>{g._initEmitted||(g._initEmitted=!0,e.nextTick(()=>{i("onInit")}))},N=E=>{const f={},{width:D}=t;return E&&!o.isEmpty(E.width)?f.width=E.width:o.isEmpty(D)||(f.width=t.width),f},x=()=>o.isExistJsonKey(c,s.value)?s.value:"",V=E=>{c=o.isEmpty(E)?{}:o.getJsonByList(E),m.value+=1},w=()=>{if(p.value){const E=o.isEmpty(s.value)?"":s.value;o.isExistJsonKey(c,E)||(s.value="",B(""))}},M=E=>{E!==s.value&&(s.value=E?.toString()||"")},C=()=>{p.value=t.list.length!==0,V(t.list),w()};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{c={},p.value=!1,g._initEmitted=!1}),e.watch(p,E=>{E&&A()}),e.watch(()=>t.list,E=>{p.value||(p.value=!0,E.length===0&&w(),A())},{deep:!0}),e.watch([()=>t.value,()=>t.list],([E,f])=>{const D=f||[];!p.value&&D.length>0&&(p.value=!0,A()),V(D),M(E),w()},{deep:!0});const T=E=>{i("onTipClick",E)},U=async E=>{if(!(!E||E.isDisabled||t.disabled||g.isProcessing)&&!o.isEmpty(E.id)){g.isProcessing=!0;try{const f=String(E.id??"");if(f===s.value)return;let D=!0;if(t.checkChangeBefore)try{D=await t.checkChangeBefore(f),D=o.isBoolean(D)?D:!0}catch{D=!1}if(t.disabled||E.isDisabled)return;D&&(s.value=f,I(E))}catch(f){i("onError",f)}finally{g.isProcessing=!1}}},Z=()=>x();return l({getValue:Z,getValueData:()=>{const E=Z();return o.isExistJsonKey(c,E)?o.getJsonClone(c[E]):{}},setValue:E=>{g.isProcessing||(M(E),w())},runInitComplete:()=>{p.value||(p.value=!0,V(t.list),M(t.value),w(),A())}}),(E,f)=>{const D=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Hc,e.toDisplayString(y.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${r}-${h.id??""}-${b}`},[h&&(h.isShow||h.isShow===void 0)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(F.value),style:e.normalizeStyle(N(h))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:`${r}_${e.unref(d)}_${h.id??""}`,name:e.unref(d),value:h.id??"",disabled:h.isDisabled||n.disabled,checked:(h.id?.toString()??"")===s.value,onClick:_=>U(h)},null,8,Uc),e.createElementVNode("label",{for:`${r}_${e.unref(d)}_${h.id??""}`},[e.renderSlot(E.$slots,"default",{data:h},()=>[h.icon&&h.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Jc,[e.createVNode(ye,{name:h.icon},null,8,["name"])])),[[D,{html:h.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(h.name),1)],64))])],8,zc)]),h.tipMsg&&h.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:e.unref(o).isNonEmptyString(h.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(h.tipIcon)?h.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[D,{html:h.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ye,{key:1,name:e.unref(o).isNonEmptyString(h.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(h.tipIcon)?h.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(_=>T(h),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,Rc)}}}),Kc=["id"],Wc=["id","name","checked","disabled"],jc=["for"],Yc={key:0},ea=e.defineComponent({name:"ClRadioOne",directives:{cltooltip:ut},__name:"One",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},forId:{type:String,default:""},label:{type:String,default:""},icon:{type:String,default:""},tipMsg:{type:String,default:""},tipIcon:{type:String,default:""},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onTipClick:()=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.computed(()=>o.isEmpty(a.forId)?`rd_${a.name||""}_${o.getRandom(8)}`:a.forId),d=e.computed(()=>{const m={"panel-radio-one":!0,radio:!0,"radio-default":!0,"radio-inline":!0};return o.getJsonMerge(m,de.getClassNameJson(a.className))}),u=m=>{t("update:value",m),t("update:modelValue",m),t("onChange",m)},s=()=>{t("onTipClick")},c=m=>{const p=m.currentTarget;p&&p.checked&&u(!0)};return(m,p)=>{const g=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),id:e.unref(i)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:r.value,name:n.name,checked:n.value,disabled:n.disabled,onClick:c},null,8,Wc),e.createElementVNode("label",{for:r.value},[n.icon&&n.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Yc,[e.createVNode(ye,{name:n.icon},null,8,["name"])])),[[g,{html:n.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.label),1)],64))],8,jc)]),n.tipMsg&&n.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[g,{html:n.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ye,{key:1,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(s,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,Kc)}}}),qc=["id"],Xc=e.defineComponent({name:"ClSliderBar",__name:"Bar",props:{id:String,className:String,left:{type:Number,default:0},width:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1}},emits:{onMoveStart:()=>!0,onMoveIng:n=>!0,onMoveEnd:()=>!0,onMouseover:()=>!0,onMouseout:()=>!0,onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$SliderTop"),r=e.useTemplateRef("refElBar"),d=a.id,u=e.reactive({left:a.left}),s=e.reactive({isClick:!1,isDragging:!1,dragStart:0,dragStartRatio:0}),c=e.ref(null),m=e.computed(()=>{let A={"slider-bar":!0,"slider-bar-drag":a.isBarDrag};return A=o.getJsonMerge(A,de.getClassNameJson(a.className)),A}),p=e.computed(()=>{const A={};return a.isVertical?(A.bottom=`${u.left}%`,A.height=`${a.width}%`):(A.left=`${u.left}%`,A.width=`${a.width}%`),A}),g=(A,N)=>{N&&(s.isClick=!0,s.isDragging=!1,s.dragStart=a.isVertical?N.clientY:N.clientX,s.dragStartRatio=a.left,t("onMoveStart"))},v=(A,N)=>{if(!i||!N)return;s.isClick=!1,s.isDragging=!0;let x=0;a.isVertical?x=s.dragStart-N.clientY:x=N.clientX-s.dragStart;const V=i.getDragValueInfo(x,s.dragStartRatio);u.left=V.ratio,t("onMoveIng",V.ratio)},y=A=>{s.isClick?t("onClick",A):t("onMoveEnd"),s.isClick=!1,s.isDragging=!1},k=()=>{if(!r.value)return;const A={start(N,x,V){let w=!1;return!a.disabled&&a.isBarDrag&&V&&(w=!0,g(N,x)),w},ing:(N,x)=>{v(N,x)},end:N=>{y(N)}};c.value=new je.Drag(r.value,A)};e.onMounted(()=>{e.nextTick(()=>{k()})}),e.onBeforeUnmount(()=>{c.value&&(c.value.end(),c.value=null)}),e.watch(()=>a.left,(A,N)=>{A!==N&&A!==u.left&&(u.left=A)});const F=A=>{!a.disabled&&!a.isBarDrag&&t("onClick",A)},B=()=>{t("onMouseover")},I=()=>{s.isDragging||t("onMouseout")};return(A,N)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElBar",ref:r,id:e.unref(d),class:e.normalizeClass(m.value),style:e.normalizeStyle(p.value),onMouseover:B,onMouseout:I,onClick:F},null,46,qc))}}),Gc=["id","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-disabled","aria-orientation"],Bo=e.defineComponent({name:"ClSliderButton",__name:"Button",props:{id:String,value:[String,Number],className:String,ratio:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},tooltipFormat:String,btnType:{type:String,default:"",validator:n=>["","start","end"].includes(n)},min:{type:Number,default:0},max:{type:Number,default:100},ariaLabel:String},emits:{onMoveIng:n=>!0,onMoveEnd:n=>!0,onDblClick:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$SliderTop"),d=ut,u=e.useTemplateRef("refElButton"),s=t.id,c=e.reactive({isHover:!1,ratio:t.ratio,value:t.value}),m=e.reactive({dragStart:0,dragStartRatio:0,isMoveIng:!1}),p=e.ref(null),g=e.computed(()=>{let f=c.value;if(f!=null){const D=t.tooltipFormat;f=o.getFormatThousands(f.toString()),o.isNonEmptyString(D)&&(f=o.convertStringFormat(D,{_value:f}))}return f??""}),v=e.computed(()=>t.isVertical?"right":"top"),y=e.computed(()=>o.isNonEmptyString(t.ariaLabel)?t.ariaLabel:t.btnType==="start"?"最小值":t.btnType==="end"?"最大值":"滑块"),k=e.computed(()=>{const f=Number(t.value);return o.isFinite(f)?f:t.min}),F=e.computed(()=>{let f={"slider-button":!0,hover:c.isHover};return f=o.getJsonMerge(f,de.getClassNameJson(t.className)),f}),B=e.computed(()=>{const f={},D=c.ratio;return t.isVertical?f.bottom=`${o.isFinite(D)?D:0}%`:f.left=`${o.isFinite(D)?D:0}%`,f}),I=()=>{u.value&&Ao.show(u.value)},A=()=>{u.value&&Ao.hide(u.value)},N=(f,D)=>{if(!r||!D)return{ratio:c.ratio,value:c.value};let h=0;t.isVertical?h=m.dragStart-D.clientY:h=D.clientX-m.dragStart;const b=r.getDragValueInfo(h,m.dragStartRatio);return c.ratio=b.ratio,c.value=b.value,b},x=(f,D)=>{D&&(m.dragStart=t.isVertical?D.clientY:D.clientX,m.dragStartRatio=t.ratio)},V=(f,D)=>{const h=N(f,D);I(),i("onMoveIng",{value:h.ratio,runType:"drag"})},w=(f,D)=>{N(f,D),c.isHover||u.value===f.target||u.value?.contains(f.target)||A(),i("onMoveEnd",{runType:"drag"})},M=f=>{if(!r)return;m.isMoveIng=!0;const D=r.getButtonMoveValueInfo(f,t.ratio);c.ratio=D.ratio,c.value=D.value,i("onMoveIng",{value:D.ratio,runType:"keydown"})},C=()=>{if(!u.value)return;const f={start(D,h,b){let _=!1;return!t.disabled&&b&&(_=!0,x(D,h)),_},ing:(D,h)=>{V(D,h)},end:(D,h)=>{w(D,h)}};p.value=new je.Drag(u.value,f)};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{p.value&&(p.value.end(),p.value=null),m.isMoveIng=!1}),e.watch(()=>t.value,(f,D)=>{f!==D&&f!==c.value&&(c.value=f)}),e.watch(()=>t.ratio,(f,D)=>{f!==D&&f!==c.ratio&&(c.ratio=f)});const T=f=>{t.disabled||(f.preventDefault(),f.stopPropagation(),M("left"))},U=f=>{t.disabled||(f.preventDefault(),f.stopPropagation(),M("right"))},Z=()=>{t.disabled||(c.isHover=!0)},z=()=>{t.disabled||(c.isHover=!1,m.isMoveIng&&(m.isMoveIng=!1,i("onMoveEnd",{runType:"keydown"})))},H=()=>{t.disabled||i("onDblClick")};return l({showTooltip:()=>{I()},hideTooltip:()=>{A()}}),(f,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElButton",ref:u,id:e.unref(s),class:e.normalizeClass(F.value),style:e.normalizeStyle(B.value),tabindex:"0",role:"slider","aria-label":y.value,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":k.value,"aria-disabled":n.disabled?"true":void 0,"aria-orientation":n.isVertical?"vertical":"horizontal",onDblclick:H,onFocus:Z,onBlur:z,onKeydown:[e.withKeys(T,["down"]),e.withKeys(U,["up"]),e.withKeys(T,["left"]),e.withKeys(U,["right"])]},[...D[0]||(D[0]=[e.createElementVNode("div",{class:"slider-button-icon"},null,-1)])],46,Gc)),[[e.unref(d),{trigger:["hover","focus"],position:v.value,html:g.value,updRefreshInx:c.ratio},void 0,{black:!0}]])}}),Qc=["id"],Zc=e.defineComponent({name:"ClSliderDot",__name:"Dot",props:{id:String,className:String,itemInfo:{type:Object,default:()=>({})},isHover:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!0},tooltipFormat:String},emits:{onMouseover:()=>!0,onMouseout:()=>!0,onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=ut,d=e.computed(()=>a.isVertical?"right":"top"),u=e.computed(()=>{const v=a.itemInfo.value;if(v!=null){let y=o.getFormatThousands(v.toString());const k=a.tooltipFormat;return o.isNonEmptyString(k)&&(y=o.convertStringFormat(k,{_value:y})),y}return""}),s=e.computed(()=>{let v={"slider-dot":!0,"slider-dot-active":a.itemInfo.isActive??!1,"slider-dot-hide":a.itemInfo.isHide??!1,hover:a.isHover};return v=o.getJsonMerge(v,de.getClassNameJson(a.className)),v}),c=e.computed(()=>{const v={},y=a.itemInfo.ratio;return y!=null&&(a.isVertical?v.bottom=`${y}%`:v.left=`${y}%`),v}),m=()=>{t("onMouseover")},p=()=>{t("onMouseout")},g=()=>{t("onClick")};return(v,y)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(s.value),style:e.normalizeStyle(c.value),onMouseover:m,onMouseout:p,onClick:g},[...y[0]||(y[0]=[e.createElementVNode("div",{class:"slider-dot-icon"},null,-1)])],46,Qc)),[[e.unref(r),{init:n.isTooltip,position:d.value,html:u.value},void 0,{black:!0,hover:!0}]])}}),eu=["id"],tu=["id"],nu={class:"slider-container"},ou={key:2,class:"slider-dots"},au={key:0,class:"slider-marks"},lu=["innerHTML","onMouseover"],ta=e.defineComponent({name:"ClSlider",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},value:[String,Number],min:{type:Number,default:0},max:{type:Number,default:100},isRange:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1},splitNumber:{type:Number,default:0},isShowDot:{type:Boolean,default:!0},isShowDotActive:{type:Boolean,default:!0},marks:{type:Array,default:()=>[]},isVertical:{type:Boolean,default:!1},verticalHeight:String,size:{type:String,default:"large"},numType:{type:String,default:"int",validator:n=>["int","float2","float3"].indexOf(n)>-1},tooltipFormat:String,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:" - "},ariaLabel:String},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`slider-${o.getRandom(5)}`,d=e.useTemplateRef("refElTrack"),u=e.useTemplateRef("refBtnStart"),s=e.useTemplateRef("refBtnEnd"),c=t.id,m=e.reactive({track:void 0,bar:void 0,btnStart:void 0,btnEnd:void 0,dots:void 0,marks:void 0});o.isNonEmptyString(c)&&(m.track=`${c}-track`,m.bar=`${c}-bar`,m.btnStart=`${c}-btn-start`,m.btnEnd=`${c}-btn-end`,m.dots=`${c}-dots`,m.marks=`${c}-marks`);const p=e.reactive({markHoverIndex:-1}),g=e.reactive({left:0,width:0}),v=e.reactive({start:t.min,end:t.min,startRatio:0,endRatio:0}),y=q=>{const ee=t.tooltipFormat;return o.isNonEmptyString(ee)?o.convertStringFormat(ee,{_value:q}):q.toString()},k=e.computed(()=>{if(!t.isRange)return y(v.end);const q=o.isString(t.plaintextSeparator)?t.plaintextSeparator:" - ";return`${y(v.start)}${q}${y(v.end)}`}),F=e.ref([]),B=e.ref([]),I=e.computed(()=>Math.abs(t.max-t.min)),A=e.computed(()=>t.marks.length>0),N=e.computed(()=>{const{isRange:q,isBarDrag:ee}=t;let $=!1;return q&&($=ee),$}),x=e.computed(()=>{let q={"panel-slider":!0,"slider-disabled":t.disabled,"slider-vertical":t.isVertical,"slider-level":!t.isVertical},ee=t.size;return o.isEmpty(ee)&&(ee="large"),q[`slider-${ee}`]=!0,q=o.getJsonMerge(q,de.getClassNameJson(t.className)),q}),V=e.computed(()=>{const q={};return t.isVertical&&o.isNonEmptyString(t.verticalHeight)&&(q.height=t.verticalHeight),q}),w=(q,ee=2)=>o.isFinite(q)?Number((q*100).toFixed(ee)):0,M=q=>{const ee=I.value;return ee>0?w((q-t.min)/ee):0},C=q=>{let ee=0;if(q<=0)ee=t.min;else if(q>=100)ee=t.max;else{const{numType:$}=t,se=I.value*q/100,me=o.getValueByFormat(se.toString(),$,{isThousands:!1});if(ee=t.min+Number(me),o.isExistValue(["float2","float3"],$)){const ie=Number($.replace("float","")),oe=ee.toString();o.isExistValue(oe,".")&&oe.split(".")[1].length>ie&&(ee=Number(ee.toFixed(ie)))}}return ee},T=q=>{let ee=Number(q),$=!0;return o.isFinite(ee)?ee<=t.min?(ee=t.min,$=!1):ee>=t.max&&(ee=t.max,$=!1):(ee=t.min,$=!1),{value:ee,check:$}},U=()=>{if(A.value){const q=[];t.marks.forEach(ee=>{if(!ee)return;const $=o.getJsonClone(ee);$.value=Number($.value),o.isFinite($.value)&&($.ratio=M($.value),o.isString($.mark)?$.safeMark=o.isHtml($.mark)?o.encodeHTML($.mark):$.mark:$.safeMark="",q.push($))}),q.sort((ee,$)=>ee.value-$.value),B.value=q}},Z=()=>{const q=[];if(A.value)B.value.forEach(ee=>{q.push({ratio:ee.ratio,value:ee.value,isActive:!1,isHide:!1})});else if(t.splitNumber>1){const ee=100/t.splitNumber,$=ee/2;for(let j=1;j<t.splitNumber;j++){const se=ee*j,me=C(se);q.push({value:me,ratio:w(se/100),isActive:!1,isHide:!1,left:w((se-$)/100),right:w((se+$)/100)})}}F.value=q},z=()=>{if(F.value.length>0){const{isShowDot:q,isShowDotActive:ee,min:$,max:j}=t,se=A.value,me=g.left,ie=me+g.width,oe=[];F.value.forEach(L=>{const te=o.getJsonClone(L),ue=L.ratio>=me&&L.ratio<=ie;te.isActive=ue;let pe=!1;se?pe=!0:q?(pe=!0,ue&&(ee?pe=!0:pe=!1)):pe=!1,(L.value===$||L.value===j)&&(pe=!1),te.isHide=!pe,oe.push(te)}),F.value=oe}},H=q=>{const ee=q.startRatio>q.endRatio?q.endRatio:q.startRatio,$=Math.abs(q.endRatio-q.startRatio);g.left=ee,g.width=$},S=q=>{e.nextTick(()=>{t.isRange?q?(u.value?.showTooltip(),s.value?.showTooltip()):(u.value?.hideTooltip(),s.value?.hideTooltip()):q?s.value?.showTooltip():s.value?.hideTooltip()})},E=q=>{H(q),v.start=q.start,v.end=q.end,v.startRatio=q.startRatio,v.endRatio=q.endRatio,z()},f=q=>{let ee,$;if(q&&!o.isEmpty(q)){const me=q.toString();if(me==="")ee=t.min,$=t.min;else{const ie=me.split(","),oe=T(ie[0]);if(t.isRange){if(ee=oe.value,$=ee,ie.length>1){const L=T(ie[1]);L.value>ee&&($=L.value)}}else ee=t.min,$=oe.value}}else ee=t.min,$=t.min;const j=M(ee),se=M($);E({start:ee,end:$,startRatio:j,endRatio:se})},D=q=>{if(!o.isFinite(q))return 0;let ee=w(q);const $=F.value;if(!A.value&&$.length>0){if(ee<$[0].left)ee=0;else if(ee>$[$.length-1].right)ee=100;else for(let j=0;j<$.length;j++)if(ee>=$[j].left&&ee<=$[j].right){ee=$[j].ratio;break}}return ee},h=q=>{const ee=D(q),$=C(ee);let{start:j,startRatio:se,end:me,endRatio:ie}=v,oe="";if(t.isRange)if(ee<=se)oe="start";else if(ee>=ie)oe="end";else{const L=(ie-se)/2;ee>se&&ee<=se+L?oe="start":ee>=ie-L&&ee<ie&&(oe="end")}else oe="end";switch(oe){case"start":j=$,se=ee;break;case"end":me=$,ie=ee;break}return{start:j,end:me,startRatio:se,endRatio:ie}},b=q=>{const ee=q?.start??v.start,$=q?.end??v.end;let j=ee,se=$;j>se&&(j=$,se=ee);const me=t.isRange?`${j},${se}`:se.toString();i("update:value",me),i("update:modelValue",me),i("onChange",me,{start:j,end:se})},_=q=>{if(!q)return{};const ee={};return t.isVertical?ee.bottom=`${q.ratio}%`:ee.left=`${q.ratio}%`,o.isEmpty(q.color)||(ee.color=q.color),ee},O=()=>{U(),Z(),f(t.value)};e.onMounted(()=>{e.nextTick(()=>{O()})}),e.watch(()=>t.value,(q,ee)=>{if(q!==ee){let $=!0;const j=q!=null?q.toString():"";if(j==="")$=!0;else{const se=j.split(","),me=Number(se[0]);if(t.isRange){const ie=se.length>1?Number(se[1]):me;(me===v.start&&ie===v.end||me===v.end&&ie===v.start)&&($=!1)}else $=me!==v.end}$&&f(q)}},{immediate:!0}),e.watch(()=>t.marks,()=>{U(),Z()});const P=q=>{if(!t.disabled&&q){q.preventDefault(),q.stopPropagation();const ee=d.value;if(!ee)return;const $=ee.getBoundingClientRect(),j=t.isVertical?($.bottom-q.clientY)/ee.clientHeight:(q.clientX-$.left)/ee.clientWidth;if(!o.isFinite(j))return;const se=h(j);E(se),b(se)}},J=(q,ee)=>{let{startRatio:$,endRatio:j}=v;const se=q.value;ee==="start"?($=se,v.start=C(se),v.startRatio=se):(j=se,v.end=C(se),v.endRatio=se),H({startRatio:$,endRatio:j}),z(),q.runType==="keydown"&&b()},Y=q=>{const{left:ee,width:$}=g,j={startRatio:ee,endRatio:ee+$};j.start=C(j.startRatio),j.end=C(j.endRatio),E(j),q.runType==="drag"&&b(j)},ne=q=>{if(t.isRange){let{start:ee,startRatio:$,end:j,endRatio:se}=v;q==="start"?(se=$,j=ee):($=se,ee=j);const me={start:ee,startRatio:$,end:j,endRatio:se};E(me),b(me)}},ce=()=>{S(!0)},X=q=>{const ee=q;v.start=C(q),v.startRatio=q;const $=q+g.width;v.end=C($),v.endRatio=$,H({startRatio:ee,endRatio:$}),z(),S(!0)},Q=()=>{b(),S(!1)},le=()=>{S(!0)},K=()=>{S(!1)},W=q=>{A.value&&(p.markHoverIndex=q)},R=()=>{p.markHoverIndex=-1},ae=()=>t.isRange?`${v.start},${v.end}`:v.end.toString();return l({getValue:ae,getValueData:()=>({value:ae(),show:ae()})}),e.provide("$SliderTop",{getDragValueInfo:(q,ee)=>{const $=d.value;if(!$)return{ratio:ee/100,value:C(ee/100)};const j=t.isVertical?$.clientHeight:$.clientWidth;if(j<=0)return{ratio:ee/100,value:C(ee/100)};const se=q/j;let me=ee/100+se;me>=1?me=1:me<=0&&(me=0),me=D(me);const ie=C(me);return{ratio:me,value:ie}},getButtonMoveValueInfo:(q,ee)=>{const $=q==="left"?-1:1,j=Number(ee);let se;const me=F.value,ie=me.length;if(!A.value&&ie>0){let L=-1;if(j<me[0].ratio)L=-1;else if(j>me[ie-1].ratio)L=ie;else for(let ue=0;ue<ie;ue++)if(j>=me[ue].ratio&&ue+1<ie&&j<me[ue+1].ratio){L=ue;break}const te=L+$;te<0?se=0:te>=ie?se=100:se=me[te].ratio}else se=j+$;se>=100?se=100:se<=0&&(se=0);const oe=C(se);return{ratio:se,value:oe}}}),(q,ee)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(c),class:"cl-plaintext-value"},e.toDisplayString(k.value),9,eu)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(c),class:e.normalizeClass(x.value),style:e.normalizeStyle(V.value)},[e.createElementVNode("div",nu,[e.createElementVNode("div",{ref_key:"refElTrack",ref:d,class:"slider-track",onClick:P},null,512),e.createVNode(Xc,{id:m.bar,disabled:n.disabled,isVertical:n.isVertical,isBarDrag:N.value,left:g.left,width:g.width,onOnMoveStart:ce,onOnMoveIng:X,onOnMoveEnd:Q,onOnClick:P,onOnMouseover:le,onOnMouseout:K},null,8,["id","disabled","isVertical","isBarDrag","left","width"]),n.isRange?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Bo,{ref_key:"refBtnStart",ref:u,id:m.btnStart,disabled:n.disabled,isVertical:n.isVertical,value:v.start,ratio:v.startRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,btnType:"start",min:n.min,max:n.max,onOnMoveIng:ee[0]||(ee[0]=$=>J($,"start")),onOnMoveEnd:Y,onOnDblClick:ee[1]||(ee[1]=$=>ne("start"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"]),e.createVNode(Bo,{ref_key:"refBtnEnd",ref:s,id:m.btnEnd,disabled:n.disabled,isVertical:n.isVertical,value:v.end,ratio:v.endRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,btnType:"end",min:n.min,max:n.max,onOnMoveIng:ee[2]||(ee[2]=$=>J($,"end")),onOnMoveEnd:Y,onOnDblClick:ee[3]||(ee[3]=$=>ne("end"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"])],64)):(e.openBlock(),e.createBlock(Bo,{key:1,ref_key:"refBtnEnd",ref:s,id:m.btnEnd,disabled:n.disabled,isVertical:n.isVertical,value:v.end,ratio:v.endRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,min:n.min,max:n.max,onOnMoveIng:ee[4]||(ee[4]=$=>J($,"end")),onOnMoveEnd:Y},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"])),F.value.length>0?(e.openBlock(),e.createElementBlock("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,($,j)=>(e.openBlock(),e.createBlock(Zc,{key:`${r}-dot-${j}`,id:m.dots?`${m.dots}-${j}`:void 0,isVertical:n.isVertical,itemInfo:$,isHover:p.markHoverIndex===j,isTooltip:!A.value,tooltipFormat:n.tooltipFormat,onOnMouseover:se=>W(j),onOnMouseout:R,onOnClick:P},null,8,["id","isVertical","itemInfo","isHover","isTooltip","tooltipFormat","onOnMouseover"]))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),A.value?(e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,($,j)=>(e.openBlock(),e.createElementBlock("div",{key:`${r}-mark-${j}`,class:e.normalizeClass({"slider-mark":!0,hover:p.markHoverIndex===j}),style:e.normalizeStyle(_($)),innerHTML:$.safeMark,onMouseover:se=>W(j),onMouseout:R},null,46,lu))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,tu))}}),iu=["id"],su=["id"],ru=["name","checked"],cu=["aria-checked"],uu={key:0,class:"switchery-txt"},du=["innerHTML"],mu=["innerHTML"],pu={key:0,class:"switchery-load-bg"},fu=22,hu=40,Fl=e.defineComponent({name:"ClSwitchery",__name:"Index",props:{id:String,name:String,value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},color:{type:[String,Object],validator:n=>o.isObject(n)?!!(n.checked||n.unChecked):o.isString(n)},isUseOnChangeCheck:{type:Boolean,default:!1},isShowLoad:{type:Boolean,default:!0},activeHtml:String,inactiveHtml:String,changeCallback:Function,isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useAttrs(),d=t.id,u=e.useTemplateRef("refElContainer");let s=!1,c=null;const m=e.reactive({isFirstComplete:!1,isOpen:t.value,buttonLeft:0,isRunLoad:!1,colorChecked:"var(--cl-primary, #2196f3)",colorUnChecked:"var(--cl-bg, #ffffff)",txtWidth:0}),p=e.computed(()=>{let H=t.name;return o.isEmpty(H)&&(H=`switchery_${o.getRandom(8)}`),H}),g=e.computed(()=>{const H=m.isOpen?t.activeHtml:t.inactiveHtml;return o.isNonEmptyString(H)?o.removeHTMLTags(H):m.isOpen?"是":"否"}),v=e.computed(()=>{const{colorChecked:H}=m;let S="";const E=t.color;if(o.isUndefined(E))S=H;else if(o.isString(E))S=E;else if(o.isObject(E)){const f=E;S=o.isExistJsonKey(f,"checked")?f.checked:H}return S}),y=e.computed(()=>{const{colorUnChecked:H}=m;let S="";const E=t.color;return o.isObject(E)&&o.isExistJsonKey(E,"unChecked")?S=E.unChecked||H:S=H,S}),k=e.computed(()=>{const H=de.getClassNameJson(t.className),S={"panel-switchery":!0,"switchery-transition-immediately":!m.isFirstComplete};return o.getJsonMerge(S,H)}),F=e.computed(()=>!o.isEmpty(t.activeHtml)||!o.isEmpty(t.inactiveHtml)),B=e.computed(()=>({"switchery-container":!0,"switchery-open":m.isOpen,"switchery-disabled":t.disabled,"switchery-has-txt":F.value})),I=e.computed(()=>{const H=m.isOpen,S=H?v.value:y.value,E={"background-color":S};return m.txtWidth>0&&(E.width=`${m.txtWidth}px`),E.transition=H?"border 0.4s, box-shadow 0.4s, background-color 1.2s":"border 0.4s, box-shadow 0.4s",E["box-shadow"]=H?`${S} 0px 0px 0px 11px inset`:`${S} 0px 0px 0px 0px inset`,(H||o.isObject(t.color)&&o.isExistJsonKey(t.color,"unChecked"))&&(E["border-color"]=S),E}),A=e.computed(()=>{const H={left:"0"};return m.isOpen&&(H.left=`${m.buttonLeft}px`),H}),N=H=>{const S=de.getElementData(r);i("update:value",H),i("update:modelValue",H),i("onChange",H,S)},x=()=>{const H=wt.getGlobalConfig("switchery");H&&(o.isExistJsonKey(H,"colorChecked")&&(m.colorChecked=H.colorChecked),o.isExistJsonKey(H,"colorUnChecked")&&(m.colorUnChecked=H.colorUnChecked))},V=()=>{if(!u.value)return;const H=u.value.clientWidth,S=u.value.querySelector(".switchery-button");if(!S)return;const E=S.clientWidth;m.buttonLeft=H===0?22:H-E},w=(H,S)=>{if(o.isEmpty(H))return 0;const E=S.querySelector(".switchery-txt > span"),f=document.createElement("span");if(f.style.position="absolute",f.style.visibility="hidden",f.style.left="-9999px",f.style.top="0",f.style.display="inline-block",f.style.whiteSpace="nowrap",E){const h=getComputedStyle(E);f.style.font=h.font,f.style.letterSpacing=h.letterSpacing}f.innerHTML=H,document.body.appendChild(f);const D=f.scrollWidth;return f.remove(),D},M=()=>{if(!F.value||!u.value){m.txtWidth=0;return}const H=u.value,S=w(t.activeHtml||"",H),E=w(t.inactiveHtml||"",H),f=Math.max(S,E);if(f===0){m.txtWidth=0;return}m.txtWidth=Math.max(f+fu+2,hu)},C=()=>{x(),M(),e.nextTick(()=>{V()}),c=setTimeout(()=>{m.isFirstComplete=!0},250)};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{c&&(clearTimeout(c),c=null)}),e.watch(()=>t.value,H=>{m.isOpen=H}),e.watch(()=>[t.activeHtml,t.inactiveHtml],()=>{e.nextTick(()=>{M(),V()})});const T=async()=>{if(t.disabled||s)return;V();const H=!m.isOpen;if(t.changeCallback&&o.isFunction(t.changeCallback)){s=!0,m.isRunLoad=!0;const S=de.getElementData(r);try{const E=await t.changeCallback(H,S);let f=!1;o.isBoolean(E)?f=E:o.isObject(E)&&o.isBoolean(E.success)&&(f=E.success),f&&(m.isOpen=H)}catch{i("onError","回调changeCallback执行异常")}finally{m.isRunLoad=!1,s=!1}}else t.isUseOnChangeCheck?m.isRunLoad=!0:m.isOpen=H,N(H)};return l({getValue:()=>m.isOpen,setValue:(H,S=!1)=>{m.isOpen=H,S&&N(H)},setOnChangeResult:()=>{t.isUseOnChangeCheck&&o.isUndefined(t.changeCallback)&&(m.isOpen=!m.isOpen,m.isRunLoad=!1,s=!1)}}),(H,S)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:"cl-plaintext-value"},e.toDisplayString(g.value),9,iu)):(e.openBlock(),e.createElementBlock("label",{key:1,id:e.unref(d),class:e.normalizeClass(k.value)},[e.createElementVNode("input",{type:"checkbox",class:"switchery-input",name:p.value,checked:m.isOpen},null,8,ru),e.createElementVNode("span",{class:e.normalizeClass(B.value),style:e.normalizeStyle(I.value),onClick:T,ref_key:"refElContainer",ref:u,role:"switch","aria-checked":m.isOpen,tabindex:"0"},[n.activeHtml||n.inactiveHtml?(e.openBlock(),e.createElementBlock("span",uu,[m.isOpen?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.activeHtml},null,8,du)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:n.inactiveHtml},null,8,mu))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"switchery-button",style:e.normalizeStyle(A.value)},[n.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createBlock(rt,{key:0,theme:"rotaryLine",size:"xs"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4)],14,cu),n.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createElementBlock("div",pu)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,su))}}),gu=["id"],vu=["onClick"],yu=["innerHTML"],ku={key:1},Xn=e.defineComponent({name:"ClTags",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isRemove:{type:Boolean,default:!0},showTextFormat:String,isRemoveAll:{type:Boolean,default:!1},color:{type:String,default:""},isSolid:{type:Boolean,default:!0},isRound:{type:Boolean,default:!1},size:{type:String,default:"m",validator:n=>["s","m","l"].indexOf(n)!==-1},isFormatHtml:{type:Boolean,default:!1}},emits:["onRemove","onClickTag"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`tags-${o.getRandom(5)}`,d=t.id,u=e.ref(t.disabled),s=e.ref([]),c=["primary","success","warning","danger","secondary"],m=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))",hID:""}),p=e.computed(()=>{let f={"panel-tags":!0};t.size!=="m"&&(f[`tags-size-${t.size}`]=!0),t.isRemoveAll&&s.value.length>0&&(f["tags-region"]=!0);const D=de.getClassNameJson(t.className);return f=o.getJsonMerge(f,D),f}),g=f=>o.isEmpty(f)?"":o.isEmpty(t.showTextFormat)?o.isNonEmptyString(f.name)?f.name:"":o.convertStringFormatEncodeHTML(t.showTextFormat,f),v=f=>o.isNonEmptyString(f.color)?f.color.trim():o.isNonEmptyString(t.color)?t.color.trim():"",y=f=>o.isBoolean(f.isSolid)?!!f.isSolid:t.isSolid,k=f=>o.isBoolean(f.isRound)?!!f.isRound:t.isRound,F=f=>o.isNonEmptyString(f)&&o.isExistValue(c,f),B=f=>{if(o.isEmpty(f))return{};const D=v(f),h=y(f),b={};return b.tag=!0,b["tag-disabled"]=!!f.isShowDisabled,b["tag-remove"]=t.isRemove&&!f.isShowDisabled,(o.isNonEmptyString(f.id)||typeof f.id=="number")&&(b["tag-hlight"]=f.id.toString()===m.hID&&m.status===2),o.isNonEmptyString(D)&&(b[h?"tag-solid":"tag-plain"]=!0,k(f)&&(b["tag-round"]=!0)),F(D)&&(b[`tag-color-${D}`]=!0),b},I=f=>{const D={};if(o.isEmpty(f))return D;const h=v(f);if(o.isNonEmptyString(h)&&!F(h)&&(y(f)?(D["background-color"]=h,D["border-color"]=h):(D.color=h,D["border-color"]=h)),o.isEmpty(f.id))return D;if(f.id.toString()===m.hID)switch(m.status){case 1:D["background-color"]=m.startColor;break;case 2:D["background-color"]=m.endColor;break}return D},A=f=>{if(o.isEmpty(f))return;const D=u.value;let h=!1;D?h=!0:h=o.isBoolean(f.isDisabled)?!!f.isDisabled:!1,f.isShowDisabled=h},N=f=>{const D=[];return!o.isArray(f)||o.isEmpty(f)||f.forEach(h=>{if(o.isEmpty(h))return;const b=o.getJsonClone(h);A(b),D.push(b)}),D},x=f=>{u.value=f;const D=N(s.value);s.value=D};let V=null,w=null;const M=()=>{V!==null&&(clearTimeout(V),V=null),w!==null&&(clearTimeout(w),w=null)},C=f=>{o.isEmpty(f)||(M(),m.hID=f.toString(),m.status=1,e.nextTick(()=>{V=setTimeout(()=>{m.status=2},10),w=setTimeout(()=>{m.status=0,m.hID=""},1500)}))},T=()=>{const f=N(t.list);s.value=f};e.onMounted(()=>{e.nextTick(()=>{T()})}),e.onBeforeUnmount(()=>{M()}),e.watch(()=>t.disabled,f=>{x(f)}),e.watch(()=>t.list,f=>{const D=N(f);s.value=D},{deep:!0});const U=(f,D)=>{i("onClickTag",D)},Z=(f,D,h)=>{if(f.preventDefault(),f.stopPropagation(),t.isRemove&&!D.isShowDisabled&&h>=0&&h<s.value.length){s.value.splice(h,1);const b=o.isNonEmptyString(D.id)||typeof D.id=="number"?D.id.toString():"";i("onRemove",b)}},z=()=>{s.value=[],i("onRemove","")};return l({setDisabled:(f=!0)=>{x(f)},addInfo:f=>{if(o.isEmpty(f))return;const D=o.getListExistValue(s.value,f.name||"","name");if(o.isEmpty(D)){const h=o.getJsonClone(f);A(h),s.value.push(h)}else D.info&&!o.isEmpty(D.info.id)&&C(D.info.id)},getData:()=>o.getListClone(s.value)}),(f,D)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(p.value)},[s.value.length>0?e.renderSlot(f.$slots,"head",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(h,b)=>(e.openBlock(),e.createElementBlock("span",{key:`${r}-list-${b}-${h.id}`,class:e.normalizeClass(B(h)),style:e.normalizeStyle(I(h)),onClick:e.withModifiers(_=>U(_,h),["stop"])},[h.isHtml||n.isFormatHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:g(h)},null,8,yu)):(e.openBlock(),e.createElementBlock("span",ku,e.toDisplayString(g(h)),1)),n.isRemove&&!h.isShowDisabled?(e.openBlock(),e.createBlock(ye,{key:2,class:"tag-close",name:"close","aria-label":"移除",onClick:_=>Z(_,h,b)},null,8,["onClick"])):e.createCommentVNode("",!0)],14,vu))),128)),n.isRemoveAll&&s.value.length>0&&!n.disabled?(e.openBlock(),e.createBlock(ye,{key:2,class:"tag-closeAll",name:"close","aria-label":"清除全部",onClick:z})):e.createCommentVNode("",!0)],10,gu))}}),Su=["id"],Pl=e.defineComponent({name:"ClWaterfall",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},itemKey:{type:String,default:"id"},width:{type:Number,default:-1},colNum:{type:Number,default:-1},spacing:{type:Number,default:10},animationName:{type:String,default:"animated fadeIn"}},setup(n,{expose:l}){const a=n,t=`waterfall-${o.getRandom(5)}`,i=a.id,r=e.useTemplateRef("refElList"),d=e.reactive({pWidth:0,pHeight:0}),u=e.ref([]),s=e.ref(!0),c={colPosY:[],resizeEvent:null,resizeDelayFun:null,deletedList:[]},m=e.computed(()=>{const V=d.pWidth,{width:w,colNum:M,spacing:C}=a;let T=300;const U=w>0,Z=M>0,z=Z?Math.max(1,parseInt(((V+C)/M).toString())-C):0;if(U&&Z){const H=(w+C)*M-C;T=V>=H?w:z}else!U&&Z?T=z:U&&!Z&&(T=V>w?w:V);return T}),p=e.computed(()=>{const V=d.pWidth,w=m.value,{colNum:M,spacing:C}=a,T=M>0;let U=-1;const Z=Math.max(1,parseInt(((V+C)/(w+C)).toString()));if(T){const z=(w+C)*M-C;U=V>=z?M:Z}else U=Z;return U}),g=e.computed(()=>{const V=d.pWidth,w=m.value,M=p.value,{spacing:C}=a,T=(w+C)*M-C;return parseInt(((V-T)/2).toString())}),v=e.computed(()=>{const V={"panel-waterfall":!0};return o.getJsonMerge(V,de.getClassNameJson(a.className))}),y=()=>{s.value=!0;const{list:V,itemKey:w}=a;V.forEach(M=>{s.value&&(s.value=o.isExistJsonKey(M,w))})},k=()=>{u.value=a.list.filter(V=>!c.deletedList.includes(V)),c.deletedList=c.deletedList.filter(V=>a.list.includes(V))},F=()=>{const{spacing:V}=a;c.colPosY=new Array(p.value).fill(V)},B=V=>{const{spacing:w}=a,M=m.value;return g.value+(M+w)*V},I=()=>{let V;if(r.value&&(V=r.value.querySelectorAll(".waterfall-item")),o.isUndefined(V)||!V){d.pHeight=0;return}if(V.length===0){d.pHeight=0;return}F();const w=m.value,{spacing:M,animationName:C}=a;for(let T=0;T<V.length;T++){const U=V[T],Z=de.getPositionView(U).height,z=Math.min.apply(null,c.colPosY),H=c.colPosY.indexOf(z),S=B(H);U.style.width=`${w}px`,U.style.transform=`translate3d(${S}px,${z}px, 0)`,c.colPosY[H]+=Z+M;const E=U.firstChild;E.style.visibility="visible",E.className=de.getRemoveClass(E.className,C),de.checkHasClass(E.className,C)||(E.style.animationDuration="1000ms",E.style.animationDelay="200ms",E.style.animationFillMode="both",E.className=de.getAddClass(E.className,C))}d.pHeight=Math.max.apply(null,c.colPosY)},A=()=>{const V=()=>{k(),e.nextTick(()=>{I()})};c.resizeDelayFun?c.resizeDelayFun.run(V):e.nextTick(V)},N=()=>{r.value&&(d.pWidth=r.value.offsetWidth,c.resizeDelayFun=new Za.DelayFun(null,200),c.resizeEvent=new je.Resize({element:r.value,callback:V=>{d.pWidth=V?.contentRect?.width??d.pWidth}}))};return e.onMounted(()=>{e.nextTick(()=>{N()})}),e.onUnmounted(()=>{c.resizeEvent&&c.resizeEvent.destroy(),c.resizeDelayFun&&c.resizeDelayFun.stopRun()}),e.watch(()=>[d.pWidth,m.value,a.list],()=>{y(),A()},{deep:!0}),e.provide("$WaterfallTop",{imgCallback:A}),l({deleteItem:V=>{const w=u.value[V];return w!==void 0&&(c.deletedList.push(w),u.value.splice(V,1),A()),w}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(v.value)},[e.createElementVNode("div",{ref_key:"refElList",ref:r,class:"waterfall-list",style:e.normalizeStyle({height:`${d.pHeight}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(M,C)=>(e.openBlock(),e.createElementBlock("div",{key:s.value?`${t}-${M[n.itemKey]}`:`${t}-${C}`,class:"waterfall-item"},[e.createElementVNode("div",null,[e.renderSlot(V.$slots,"default",{data:M,index:C})])]))),128))],4)],10,Su))}}),wu={class:"waterfall-imageBox"},Cu=["alt"],Rl=e.defineComponent({name:"ClWaterfallImage",__name:"Image",props:{url:{type:String,default:""},alt:{type:String,default:""}},setup(n){const l=n,a=e.inject("$WaterfallTop"),t=e.useTemplateRef("refElImage"),i=e.computed(()=>l.url),r=d=>{a?.imgCallback?a.imgCallback():Se.warn("ClWaterfallImage",`未检测到 $WaterfallTop 容器注入,图片${d==="loaded"?"完成":"加载失败"}回调失效`)};return e.onBeforeUnmount(()=>{t.value&&(t.value.onload=null,t.value.onerror=null)}),Nl(t,i,{callback:{loaded:()=>{r("loaded")},error:()=>{r("error")}}}),(d,u)=>(e.openBlock(),e.createElementBlock("div",wu,[e.createElementVNode("img",{ref_key:"refElImage",ref:t,class:"waterfall-image",alt:n.alt},null,8,Cu)]))}}),Hl=()=>({getPage:n=>ot.getPage(n),getValue:n=>ot.getValue(n),getType:()=>ot.getType(),setType:n=>ot.setType(n),getAll:()=>ot.getAll(),getCommon:()=>ot.getCommon()}),Eu=["id"],bu=["onKeydown","aria-expanded","aria-label"],xu=["onClick","onKeydown","aria-label"],Bu={class:"anchor-label"},Ul=e.defineComponent({name:"ClAnchorNav",directives:{cltooltip:ut},__name:"Index",props:{id:String,className:String,list:{type:Array,required:!0},isOpen:{type:Boolean,default:!1},offsetShow:{type:Number,default:100}},setup(n){const l=n,a=`anchorNav-${o.getRandom(5)}`,t=l.id,i=e.ref(""),r=e.ref(!1),d=e.ref(!l.isOpen);let u=null;const s=e.computed(()=>{const k={"panel-anchor-nav":!0,"is-fixed":r.value,"is-collapsed":d.value};return o.getJsonMerge(k,de.getClassNameJson(l.className))}),c=e.computed(()=>(l.list||[]).filter(k=>!!k)),m=()=>{l.list&&u===null&&(u=requestAnimationFrame(()=>{if(u=null,!l.list)return;const k=window.scrollY,F=window.innerHeight;r.value=k>(o.isFinite(l.offsetShow)?l.offsetShow:100);const B=c.value.map(A=>({id:A.id,element:document.getElementById(A.id)})).filter(A=>A.element!==null);if(B.length===0){i.value="";return}if(k+F>=document.documentElement.scrollHeight-1){i.value=B[B.length-1].id;return}let I=!1;for(let A=B.length-1;A>=0;A--)if(B[A].element.getBoundingClientRect().top<=F/2){i.value=B[A].id,I=!0;break}I||(i.value="")}))},p=()=>{window.addEventListener("scroll",m),window.addEventListener("resize",m)},g=()=>{u!==null&&(cancelAnimationFrame(u),u=null),window.removeEventListener("scroll",m),window.removeEventListener("resize",m)};e.onMounted(()=>{p(),m()}),e.onActivated(()=>{p(),m()}),e.onDeactivated(()=>{g()}),e.onUnmounted(()=>{g()}),e.watch(()=>l.list,()=>{m()},{deep:!0});const v=()=>{d.value=!d.value},y=k=>{const F=document.getElementById(k);F&&(F.scrollIntoView({behavior:"smooth",block:"start"}),F.hasAttribute("tabindex")||F.setAttribute("tabindex","-1"),F.focus({preventScroll:!0}))};return(k,F)=>{const B=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{id:e.unref(t),class:e.normalizeClass(s.value),role:"navigation","aria-label":"页面锚点导航"},[e.createElementVNode("div",{class:"anchor-toggle",onClick:v,onKeydown:[e.withKeys(v,["enter"]),e.withKeys(e.withModifiers(v,["prevent"]),["space"])],role:"button","aria-expanded":!d.value,"aria-label":d.value?"展开导航":"收起导航",tabindex:"0"},[e.createVNode(ye,{name:d.value?"caret-left":"caret-right"},null,8,["name"])],40,bu),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(I,A)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${a}-${I.id}-${A}`,class:e.normalizeClass(["anchor-item",{active:i.value===I.id}]),onClick:N=>y(I.id),onKeydown:[e.withKeys(N=>y(I.id),["enter"]),e.withKeys(e.withModifiers(N=>y(I.id),["prevent"]),["space"])],role:"link","aria-label":I.label??"",tabindex:"0"},[F[0]||(F[0]=e.createElementVNode("span",{class:"anchor-dot"},null,-1)),e.createElementVNode("span",Bu,e.toDisplayString(I.label??""),1)],42,xu)),[[B,d.value?{html:I.label??"",position:"left",className:"tooltip-anchorNav",isHtml:!1}:{init:!1}]])),128))],10,Eu)}}}),Iu=["id"],Du={class:"calendar-container table-base"},Tu={colspan:"7"},Nu={class:"calendar-head-label"},Vu=["title","onKeydown"],Mu={class:"calendar-head-label-year"},Ou={class:"calendar-head-label-month"},_u={class:"calendar-head-label-next"},Au=["title","onKeydown"],Lu={class:"calendar-head-Week"},$u=["tabindex","aria-label","aria-selected","onClick","onMouseover","onMouseout","onKeydown"],Fu={key:0,class:"day-today"},Pu={class:"day-num"},Ru={key:3,class:"day-lunar-num"},zl=e.defineComponent({name:"ClCalendar",__name:"Index",props:{id:String,className:String,viewDateTime:String,weekFirst:{type:String,default:"sunday",validator:n=>{const l=["monday","sunday"].includes(n);return l||Se.warn("ClCalendar",`警告:weekFirst 仅支持 'monday' 或 'sunday',收到 '${n}',已按 sunday 处理`),l}},isShowLunar:Boolean,isWeekendRest:{type:Boolean,default:void 0},restDays:{type:Array,default:()=>[]},workDays:{type:Array,default:()=>[]}},emits:{onChange:n=>!0,onClick:n=>!0,onHover:(n,l)=>!0,onInit:n=>!0,onError:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendar-${o.getRandom(5)}`,r=a.id,{optPageLanguage:d,getPageLanguage:u}=Le();u("dataTime");const s=e.reactive({selectId:"",focusedId:""}),c=e.reactive({titleYear:"",titleMonth:""}),m=e.useTemplateRef("calendarRoot"),p=e.ref([]),g=e.ref([]),v={viewDate:null,currentDate:Ye.initDay(),isAnimating:!1},y=e.computed(()=>{if(a.isWeekendRest!==void 0)return a.isWeekendRest;const h=wt.getGlobalConfig("calendar");return h?.isWeekendRest!==void 0?h.isWeekendRest:!0}),k=e.computed(()=>a.restDays.length>0?a.restDays:wt.getGlobalConfig("calendar")?.restDays||[]),F=e.computed(()=>a.workDays.length>0?a.workDays:wt.getGlobalConfig("calendar")?.workDays||[]),B=e.computed(()=>{const h={"panel-calendar":!0};return o.getJsonMerge(h,de.getClassNameJson(a.className))}),I=()=>{if(!v.viewDate)return;const h=v.viewDate.localeData(),b=v.viewDate.year(),_=h.monthsShort(v.viewDate);c.titleYear=`${b}${d.value.year}`,c.titleMonth=_;const O=h.weekdaysMin(),P=h.firstDayOfWeek();let J=[];a.weekFirst==="sunday"?J=O:O.forEach((Y,ne)=>{J[(7+ne-P)%7]=Y}),p.value=J};let A=null;const N=e.ref(!1),x=async()=>{if(!N.value)try{A=(await import("lunar-typescript")).Lunar,N.value=!0}catch(h){Se.warn("ClCalendar","农历插件加载失败,本次不显示农历",h)}},V=h=>{if(!A)return"";try{const b=A.fromDate(h.toDate()),_=b.getFestivals();if(o.isNonEmptyString(_[0]))return _[0];const O=b.getJieQi();if(o.isNonEmptyString(O))return O;const P=b.getDayInChinese();return o.isNonEmptyString(P)?P:""}catch(b){return Se.warn("ClCalendar","农历计算异常,该格不显示农历",b),""}},w=h=>{const b=_=>_.some(O=>Ye.objDay(O).isSame(h,"day"));if(F.value.length>0&&b(F.value))return{text:"班"};if(k.value.length>0&&b(k.value))return{text:"休"};if(y.value){const _=h.day();if(_===0||_===6)return{text:"休"}}return null},M=(h,b,_,O)=>{const P=h.date(),J=Ye.initFormat(h),Y=a.isShowLunar&&N.value?V(h):"",ne=w(h),ce=h.year()===b&&h.month()<_||h.year()<b,X=h.year()===b&&h.month()>_||h.year()>b,Q=O&&h.isSame(O,"day")&&!ce&&!X;return{id:`day-${J}`,cls:de.getAddClass("calendar-day",{old:ce,new:X,today:Q}),day:J,dayNum:P,lunar:Y,restMark:ne?ne.text:void 0,isOld:ce,isNew:X,isCurrentMonth:!ce&&!X,isToday:Q}},C=()=>{const h=v.viewDate.clone(),b=v.currentDate;let _=h.clone().subtract(1,"months");_=_.date(_.daysInMonth()).startOf("week"),a.weekFirst==="sunday"&&(_=_.subtract(1,"days"));const O=[];let P=[];for(let J=0;J<42;J+=1){J>0&&(_=_.add(1,"days"));const Y=M(_.clone(),h.year(),h.month(),b);P.push(Y),Y.isCurrentMonth&&!o.isEmpty(s.selectId)&&Y.dayNum===s.selectId&&(s.selectId=Y.id),P.length===7&&(O.push({days:P}),P=[])}if(g.value=O,!o.isEmpty(s.selectId))s.focusedId=s.selectId;else{const J=O.flatMap(Y=>Y.days).find(Y=>Y.isCurrentMonth);s.focusedId=J?J.id:""}},T=h=>{v.viewDate=o.isEmpty(h)?Ye.initDay():Ye.getDayjsObject(h),v.viewDate&&typeof v.viewDate.isValid=="function"&&v.viewDate.isValid()||(v.viewDate=Ye.initDay()),I(),C()},U=h=>!h||!o.isString(h)||o.isEmpty(h)?(s.selectId=Ye.getDayjsObject("").date(),Ye.initFormat({format:"YYYY-MM"})):h.split("-").length===3?(s.selectId=Ye.getDayjsObject(h).date(),Ye.initFormat({value:h,format:"YYYY-MM"})):(s.selectId="",h),Z=()=>{T(U(a.viewDateTime)),e.nextTick(()=>{z(s.focusedId),!o.isEmpty(s.selectId)&&o.isString(s.selectId)&&t("onInit",s.selectId.replace("day-",""))})},z=h=>{if(!o.isString(h)||o.isEmpty(h)||!m.value)return;const b=m.value.querySelector(`[aria-label="${h.replace("day-","")}"]`);if(!b)return;b.focus({preventScroll:!0});const _=b.getBoundingClientRect();(_.top<0||_.bottom>window.innerHeight)&&b.scrollIntoView({block:"nearest",behavior:"auto"})};e.onMounted(async()=>{a.isShowLunar&&await x(),e.nextTick(()=>{Z(),a.isShowLunar&&N.value&&T(U(a.viewDateTime))})}),e.watch(()=>a.isShowLunar,h=>{h?x().then(()=>{T(U(a.viewDateTime)),e.nextTick(()=>z(s.focusedId))}):T(U(a.viewDateTime))}),e.watch(()=>a.viewDateTime,h=>{o.isEmpty(h)||(T(U(h)),e.nextTick(()=>z(s.focusedId)))});const H=(h,b)=>{h.preventDefault(),h.stopPropagation(),b.isCurrentMonth&&(s.focusedId=b.id,e.nextTick(()=>z(b.id)),s.selectId!==b.id&&(s.selectId=b.id,t("onClick",b.day)))},S=(h,b,_)=>{h.preventDefault(),h.stopPropagation(),b.isCurrentMonth&&t("onHover",b.day,_)},E=(h,b,_)=>{const O=g.value.flatMap(Y=>Y.days);if(O.length===0)return;const P=b*7+_;let J=P;switch(h.key){case"ArrowLeft":h.preventDefault(),J=Math.max(0,P-1);break;case"ArrowRight":h.preventDefault(),J=Math.min(41,P+1);break;case"ArrowUp":h.preventDefault(),J=Math.max(0,P-7);break;case"ArrowDown":h.preventDefault(),J=Math.min(41,P+7);break;case"Enter":case" ":h.preventDefault(),H(h,O[P]);return;default:return}if(J!==P){const Y=O[J];if(!Y.isCurrentMonth)return;s.focusedId=Y.id,e.nextTick(()=>z(Y.id))}},f=()=>{if(!v.isAnimating){v.isAnimating=!0;try{const h=v.viewDate.clone();let b=Ye.subtractTime(h,1,"months");b=Ye.initFormat({value:b,format:"YYYY-MM"}),T(b),t("onChange",b),e.nextTick(()=>z(s.focusedId))}catch{t("onError","切换到上一月失败")}finally{v.isAnimating=!1}}},D=()=>{if(!v.isAnimating){v.isAnimating=!0;try{const h=v.viewDate.clone();let b=Ye.addTime(h,1,"months");b=Ye.initFormat({value:b,format:"YYYY-MM"}),T(b),t("onChange",b),e.nextTick(()=>z(s.focusedId))}catch{t("onError","切换到下一月失败")}finally{v.isAnimating=!1}}};return(h,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(B.value),id:e.unref(r),ref_key:"calendarRoot",ref:m},[e.createElementVNode("table",Du,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Tu,[e.createElementVNode("div",Nu,[e.createElementVNode("span",{class:"calendar-head-label-prev-month",title:e.unref(d).prevMonth,role:"button",tabindex:"0",onClick:f,onKeydown:[e.withKeys(e.withModifiers(f,["prevent"]),["enter"]),e.withKeys(e.withModifiers(f,["prevent"]),["space"])]},[e.createVNode(ye,{name:"angle-left"})],40,Vu),e.createElementVNode("span",null,[e.createElementVNode("span",Mu,e.toDisplayString(c.titleYear),1),e.createElementVNode("span",Ou,e.toDisplayString(c.titleMonth),1)]),e.createElementVNode("span",_u,[e.createElementVNode("span",{class:"calendar-head-label-next-month",title:e.unref(d).nextMonth,role:"button",tabindex:"0",onClick:D,onKeydown:[e.withKeys(e.withModifiers(D,["prevent"]),["enter"]),e.withKeys(e.withModifiers(D,["prevent"]),["space"])]},[e.createVNode(ye,{name:"angle-right"})],40,Au)])])])]),e.createElementVNode("tr",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(_,O)=>(e.openBlock(),e.createElementBlock("th",{key:`${i}-week-${O}`},e.toDisplayString(_),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(_,O)=>(e.openBlock(),e.createElementBlock("tr",{key:`${i}-days-${O}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.days,(P,J)=>(e.openBlock(),e.createElementBlock("td",{key:`${i}-day-${J}`,class:e.normalizeClass([P.cls,s.selectId===P.id?"calendar-day-select":"",s.focusedId===P.id?"calendar-day-focused":""]),tabindex:P.isCurrentMonth?s.focusedId===P.id?"0":"-1":void 0,role:"gridcell","aria-label":P.day,"aria-selected":s.selectId===P.id?"true":"false",onClick:e.withModifiers(Y=>H(Y,P),["stop"]),onMouseover:Y=>S(Y,P,!0),onMouseout:Y=>S(Y,P,!1),onKeydown:Y=>E(Y,O,J)},[P.isToday?(e.openBlock(),e.createElementBlock("span",Fu,"今")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Pu,e.toDisplayString(P.dayNum),1),P.restMark?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["day-rest",P.restMark==="班"?"day-rest-work":"day-rest-rest"])},e.toDisplayString(P.restMark),3)):e.createCommentVNode("",!0),P.lunar?(e.openBlock(),e.createElementBlock("div",Ru,e.toDisplayString(P.lunar),1)):e.createCommentVNode("",!0),P.isCurrentMonth?e.renderSlot(h.$slots,"day",{key:4,time:P.day,data:P.dayNum}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],42,$u))),128))]))),128))])])],10,Iu))}}),Hu={class:"code-legend-demo"},Uu={class:"code-legend-code"},zu=["aria-label"],$a=25,Ju=100,Jl=e.defineComponent({name:"ClCodeLegend",__name:"Index",props:{id:{},className:{},title:{}},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElCard"),i=e.useTemplateRef("refElFoot"),r=e.ref(!1),d=e.ref(!1),u=e.ref("auto");let s=null,c=null,m=null;const p=e.computed(()=>{const C=["code-legend"];return l.className&&o.isString(l.className)&&!o.isEmpty(l.className)&&l.className.split(" ").forEach(T=>{o.isEmpty(T)||C.push(T)}),C.join(" ")}),g=e.computed(()=>({"code-legend-footer":!0,"card-footer-fixed":d.value})),v=e.computed(()=>({"icon-rotate":!0,"rotate-180":r.value})),y=()=>{s&&(clearTimeout(s),s=null),c&&(clearTimeout(c),c=null)},k=()=>{if(r.value){const C=t.value?.$el;if(!C)return;const T=C.clientWidth,U=i.value;if(!U)return;const Z=U.getBoundingClientRect(),z=C.getBoundingClientRect(),H=window.innerHeight;z.top<H&&z.bottom>H?(d.value=!0,u.value=T.toString()+"px",U.style.left=Z.left+"px"):(d.value=!1,u.value="auto",U.style.left="")}else d.value=!1,u.value="auto"},F=()=>{m||(m=setTimeout(()=>{m=null,k()},Ju))};e.watch(()=>r.value,(C,T)=>{C!==T&&(y(),C?w():M())});const B=()=>{r.value=!r.value},I=C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),B())},A=C=>{const T=C;T.style.height="auto";const U=window.getComputedStyle(T,null).height;T.style.height="0",s=setTimeout(function(){T.style.height=U},$a)},N=C=>{const T=C;c=setTimeout(function(){T.style.height="0"},$a)},x=()=>{e.nextTick(()=>{k()})},V=()=>{e.nextTick(()=>{k()})},w=()=>{window.addEventListener("scroll",F)},M=()=>{window.removeEventListener("scroll",F),m&&(clearTimeout(m),m=null)};return e.onMounted(()=>{r.value&&w()}),e.onActivated(()=>{r.value&&(w(),k())}),e.onDeactivated(()=>{M(),y()}),e.onUnmounted(()=>{M(),y()}),(C,T)=>(e.openBlock(),e.createBlock(zo,{ref_key:"refElCard",ref:t,id:e.unref(a),theme:"loopline",className:p.value},{headTitle:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),headExplain:e.withCtx(()=>[C.$slots.remark?e.renderSlot(C.$slots,"remark",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),default:e.withCtx(()=>[e.createElementVNode("div",Hu,[e.renderSlot(C.$slots,"demo")]),e.createVNode(e.Transition,{name:"slide-fade",onEnter:A,onAfterEnter:x,onLeave:N,onAfterLeave:V},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",Uu,[e.renderSlot(C.$slots,"code")])],512),[[e.vShow,r.value]])]),_:3})]),foot:e.withCtx(()=>[C.$slots.code?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElFoot",ref:i,class:e.normalizeClass(g.value),role:"button",tabindex:"0","aria-label":r.value?"收起代码":"展开代码",onClick:B,onKeydown:I,style:e.normalizeStyle({width:u.value})},[e.createVNode(ye,{name:"caret-down",class:e.normalizeClass(v.value)},null,8,["class"])],46,zu)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3},8,["id","className"]))}}),Ku=["id"],Wu=["aria-expanded"],ju=["id"],Kl=e.defineComponent({name:"ClDropdownlayer",__name:"Base",props:{id:String,classParent:{type:[String,Object]},classText:{type:[String,Object]},classDropDown:{type:[String,Object]},isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isInitDelayComplete:{type:Boolean,default:!1},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!1},triggers:{type:String,default:"click",validator:n=>["click","hover"].includes(n)},isEscapeClose:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=o.isNonEmptyString(t.id)?t.id:`dropdownLayer-${o.getRandom(8)}`,d=e.useTemplateRef("refElTopParent"),u=e.useTemplateRef("refElText"),s=e.useTemplateRef("refElDropdown"),c=e.reactive({isOpen:!1,isShowOpen:!1,isInitFirstOpen:!1,dropDownPos:"down",arrowPos:"left",dropDownTop:"",dropDownLeft:"",arrowLeft:"",isOpacity0:!1,dropdownId:`${r}-dropdown`}),m=e.ref(!1),p=e.ref(null),g=e.ref([]),v=e.ref(null),y=e.ref(null);let k=null,F=null,B=null,I=null,A=!1;const N=e.computed(()=>{let $={"panel-dropdownlayer":!0,"dropdownLayer-arrow":t.isUseDropdownArrow,"dropdownLayer-disabled":t.isDisabled};return o.isNonEmptyString(t.classParent)?$=o.getJsonMerge($,de.getClassNameJson(t.classParent)):o.isObject(t.classParent)&&($=o.getJsonMerge($,t.classParent)),$}),x=e.computed(()=>{let $={"dropdownLayer-text":!0,"dropdownLayer-text-open":c.isShowOpen};return!o.isEmpty(c.dropDownPos)&&c.isShowOpen&&($[`dropdownLayer-text-${c.dropDownPos}`]=!0),o.isNonEmptyString(t.classText)?$=o.getJsonMerge($,de.getClassNameJson(t.classText)):o.isObject(t.classText)&&($=o.getJsonMerge($,t.classText)),$}),V=e.computed(()=>{let $={"dropdownLayer-dropdown":!0,"dropdownLayer-dropdown-open":c.isShowOpen,"dropdownLayer-dropdown-arrow":t.isUseDropdownArrow,"dropdownLayer-dropdown-opacity0":c.isOpacity0};return $[`dropdownLayer-dropdown-${c.dropDownPos}`]=!0,$[`dropdownLayer-dropdown-arrow-${c.arrowPos}`]=!0,o.isNonEmptyString(t.classDropDown)?$=o.getJsonMerge($,de.getClassNameJson(t.classDropDown)):o.isObject(t.classDropDown)&&($=o.getJsonMerge($,t.classDropDown)),$}),w=e.computed(()=>!o.isEmpty(t.appendContainer)),M=e.computed(()=>{const $={},{dropDownPos:j,dropdownArrowPos:se}=t,{dropDownTop:me,dropDownLeft:ie}=c;return j==="down"||j==="up"?($.top=me,(se==="center"||se==="top"||se==="bottom"||w.value)&&($.left=ie)):(j==="left"||j==="right")&&($.left=ie,$.top=me),$}),C=e.computed(()=>{const $={};return(t.dropdownArrowPos==="center"||t.dropdownArrowPos==="top"||t.dropdownArrowPos==="bottom")&&($.left=c.arrowLeft),$}),T=($,j)=>{const se=t.isUseDropdownArrow,me={};return j==="down"?me.top=se?$.textHeight+$.arrowHeight-1:$.textHeight:j==="up"?me.top=se?-($.dropDownHeight+$.arrowHeight-3):-$.dropDownHeight:j==="left"?(me.left=se?-($.dropDownWidth+$.arrowWidth-1):-$.dropDownWidth,me.top=0):j==="right"&&(me.left=se?$.textWidth+$.arrowWidth-1:$.textWidth,me.top=0),me},U=$=>{!s.value||!d.value||(s.value.style.width=$&&t.appendFollowWidth?`${d.value.offsetWidth}px`:"")},Z=()=>{c.isShowOpen&&e.nextTick(()=>{if(!d.value||!u.value||!s.value)return;const $=t.isUseDropdownArrow?s.value.querySelector(".arrow"):null,j=!o.isEmpty(t.appendContainer),se=j?t.appendContainer:null;U(j);let me=u.value;if(y.value){const pe=de.getParent(y.value,".dropdownLayer-arrow-anchorPoint",u.value,!1);o.isUndefined(pe)||(me=pe)}const ie=de.calculationDropdownPosition(d.value,me,s.value,$,se),L=ie[{down:"dropDownPosDown",up:"dropDownPosUp",left:"dropDownPosLeft",right:"dropDownPosRight"}[t.dropDownPos]||"dropDownPosDown"];c.dropDownPos=L;const te=z(ie,L);c.arrowPos=te;const ue=T(ie,L);(te==="center"||te==="top"||te==="bottom")&&(L==="down"||L==="up")&&(ue.left=ie.arrowPosCenterLRInfo?.dropDownLeft,c.arrowLeft=ie.arrowPosCenterLRInfo?.arrowLeft!=null?`${ie.arrowPosCenterLRInfo.arrowLeft}px`:""),j&&(ue.top=(ue.top||0)+(ie.controlOffset?.top||0),ue.left=(ue.left||0)+(ie.controlOffset?.left||0),te==="right"&&(ue.left=(ie.controlOffset?.left||0)+d.value.offsetWidth-s.value.offsetWidth)),c.dropDownTop=ue.top!=null?`${ue.top}px`:"",c.dropDownLeft=ue.left!=null?`${ue.left}px`:"",i("onChangePosition",{use:{dropDownPos:L,arrowPos:te,dropDownTop:ue.top,dropDownLeft:ue.left,arrowLeft:c.arrowLeft},original:ie})})},z=($,j)=>{switch(t.dropdownArrowPos){case"left":return $.arrowPosLeft;case"right":return $.arrowPosRight;case"top":return $.arrowPosTop;case"bottom":return $.arrowPosBottom;case"center":return j==="down"||j==="up"?$.arrowPosCenterLR:j==="left"||j==="right"?$.arrowPosCenterTB:$.arrowPosLeft;default:return $.arrowPosLeft}},H=$=>{p.value=$},S=$=>{c.isShowOpen&&$?.target&&f($)},E=$=>$?s.value&&s.value.contains($)?!1:o.isUndefined(de.getParent($,`#${c.dropdownId}`,d.value)):!0,f=$=>{if(d.value){E($?.target)&&E(p.value?.target)&&(c.isOpen=!1);return}if(o.isNonEmptyString(t.appendContainer))try{document.querySelectorAll(`${t.appendContainer}>#${c.dropdownId}`).forEach(j=>j.parentNode?.removeChild(j))}catch{Se.warn("DropdownLayer","appendContainer 选择器非法,残留面板清理已跳过")}b(),c.isOpen=!1},D=$=>{if(c.isShowOpen){if(F)return;const j=$.currentTarget;F=requestAnimationFrame(()=>{F=null,Z();const se=de.getPositionView(d.value,j),me=j.dataset,ie={right:0,left:0};ie.right=o.isUndefined(me.padRight)?0:parseInt(me.padRight.replace("px","")),ie.left=o.isUndefined(me.padLeft)?0:parseInt(me.padLeft.replace("px",""));let oe=!1;se.top+se.height/2<=0&&(oe=!0),se.right+se.width/2<=ie.right&&ie.right>=0&&(oe=!0),se.left+se.width/2<=ie.left&&ie.left>=0&&(oe=!0),c.isOpacity0=oe})}else h(!1)},h=($=!0)=>{g.value.length>0&&g.value.forEach(j=>{$?j.addEventListener("scroll",D):j.removeEventListener("scroll",D)})},b=()=>{clearTimeout(I),I=null;const $=document.querySelector("body");$&&A&&$.removeEventListener("mousedown",H),A&&document.body.removeEventListener("click",S),A=!1,h(!1),c.isShowOpen=!1,P(),y.value=null,p.value=null},_=()=>{v.value=new je.Resize({callback:()=>{c.isOpen&&Z()}});const{dropDownPos:$}=t;$==="down"||$==="up"?(c.dropDownPos="down",c.arrowPos="left"):($==="left"||$==="right")&&(c.dropDownPos="left",c.arrowPos="top")},O=()=>{k||!s.value||typeof window>"u"||!window.ResizeObserver||(k=new window.ResizeObserver(()=>{c.isOpen&&s.value&&Z()}),k.observe(s.value))},P=()=>{k&&(k.disconnect(),k=null)},J=$=>{if(!t.isDisabled){if(y.value=$.target,!c.isOpen&&t.onOpenBeforeCallback)try{const j=t.onOpenBeforeCallback();if(o.isBoolean(j)&&!j)return}catch{Se.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}c.isOpen?Y():ne()}},Y=()=>{c.isOpen=!1},ne=()=>{if(c.isShowOpen){ce();return}if(t.isCloseDestroy&&c.isInitFirstOpen){ce();return}c.isOpen=!0},ce=()=>{m.value=!0,c.isInitFirstOpen=!1,c.isShowOpen=!1,e.nextTick(()=>{c.isOpen=!c.isOpen})};e.onMounted(()=>{e.nextTick(()=>{_()})}),e.onActivated(()=>{v.value||e.nextTick(()=>{_()})}),e.onDeactivated(()=>{clearTimeout(B),v.value?.destroy(),v.value=null,P(),b(),c.isOpen=!1}),e.onUnmounted(()=>{clearTimeout(B),v.value?.destroy(),b()}),e.watch(()=>c.isOpen,$=>{c.isInitFirstOpen||(c.isInitFirstOpen=!0,o.isEmpty(t.appendContainer)||e.nextTick(()=>{let j=de.getParentCheckBody(d.value,t.appendContainer);o.isUndefined(j)&&(j=document.querySelector("body")),s.value&&j.appendChild(s.value),g.value=de.getParentScrollList(d.value,t.appendContainer,!1),h()})),$||b(),i("onChangeOpen",$),$&&(c.isOpacity0=!1,I=setTimeout(()=>{if(I=null,!c.isOpen||A)return;A=!0;const j=document.querySelector("body");j&&j.addEventListener("mousedown",H),document.body.addEventListener("click",S)}),t.isInitDelayComplete||e.nextTick(()=>{c.isShowOpen=!0,Z()}))});const X=$=>{(t.triggers==="click"||$ instanceof KeyboardEvent)&&J($)};xc(e.computed(()=>c.isOpen&&t.isEscapeClose),{isEscapeClose:()=>t.isEscapeClose,onEscape:()=>{Y()}}),e.watch(()=>s.value,$=>{$&&O()});const Q=$=>{t.triggers==="hover"&&(clearTimeout(B),c.isOpen||J($))},le=$=>{t.triggers==="hover"&&(B=setTimeout(()=>{s.value?.matches(":hover")||c.isOpen&&J($)},150))},K=()=>{O(),i("onOpenComplete")},W=()=>{m.value=!1},R=()=>{if(m.value){m.value=!1;return}t.isCloseDestroy&&(c.isInitFirstOpen=!1),i("onAfterLeave")};return l({setOpen:$=>{if(!o.isBoolean($)){Se.warn("DropdownLayer","setOpen 参数必须为 boolean,已忽略");return}if($&&t.onOpenBeforeCallback)try{const j=t.onOpenBeforeCallback();if(o.isBoolean(j)&&!j){Se.warn("DropdownLayer","setOpen 打开被 onOpenBeforeCallback 阻止");return}}catch{Se.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}c.isOpen=$},calculationPosition:()=>Z(),initCompleteOpen:()=>{c.isOpen&&e.nextTick(()=>{c.isOpen&&(c.isShowOpen=!0,s.value?Z():e.nextTick(()=>{Z()}))})},getIsShowOpen:()=>c.isShowOpen}),($,j)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(N.value),ref_key:"refElTopParent",ref:d},[e.createElementVNode("div",{class:e.normalizeClass(x.value),onClick:j[0]||(j[0]=se=>X(se)),onMouseover:j[1]||(j[1]=se=>Q(se)),onMouseleave:j[2]||(j[2]=se=>le(se)),onKeydown:[j[3]||(j[3]=e.withKeys(e.withModifiers(se=>X(se),["prevent"]),["enter"])),j[4]||(j[4]=e.withKeys(e.withModifiers(se=>X(se),["prevent"]),["space"]))],role:"combobox",tabindex:"0","aria-expanded":c.isOpen,"aria-haspopup":"listbox",ref_key:"refElText",ref:u},[e.renderSlot($.$slots,"labelText")],42,Wu),c.isInitFirstOpen?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:"dropdown-transit","enter-active-class":n.transitionEnter,"leave-active-class":n.transitionLeave,onEnter:K,onAfterLeave:R,onLeaveCancelled:W},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:c.dropdownId,class:e.normalizeClass(V.value),style:e.normalizeStyle(M.value),ref_key:"refElDropdown",ref:s,onMouseleave:j[5]||(j[5]=se=>le(se))},[n.isUseDropdownArrow?(e.openBlock(),e.createElementBlock("div",{key:0,class:"arrow",style:e.normalizeStyle(C.value)},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.renderSlot($.$slots,"dropdown")],46,ju),[[e.vShow,c.isShowOpen]])]),_:3},8,["enter-active-class","leave-active-class"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Ku))}}),Gn=e.defineComponent({name:"ClDropdownlayerPopup",__name:"Popup",props:{id:String,classParent:String,classText:String,classDropDown:String,isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!1},isInitDelayComplete:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},appendContainer:{type:String,default:""},triggers:{type:String,default:"click",validator:n=>["click","hover"].includes(n)},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let B={"dropdownLayer-theme-popup":!0,"panel-dropdownlayerpopup":!0};return B=o.getJsonMerge(B,de.getClassNameJson(t.classParent)),B}),s=e.computed(()=>{let B={"dropdownLayer-dropdown-theme-popup":!0};return B=o.getJsonMerge(B,de.getClassNameJson(t.classDropDown)),B}),c=B=>{B&&t.isInitDelayComplete&&k(),i("onChangeOpen",B)},m=B=>{i("onChangePosition",B)},p=()=>{i("onOpenComplete")},g=()=>{i("onAfterLeave")},v=B=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(B)},y=()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return d.value.calculationPosition()},k=()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}e.nextTick(()=>{d.value?.initCompleteOpen()})};return l({setOpen:v,calculationPosition:y,initCompleteOpen:k,checkIsShowOpen:()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return d.value.getIsShowOpen()}}),(B,I)=>(e.openBlock(),e.createBlock(Kl,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:u.value,classText:n.classText,classDropDown:s.value,isDisabled:n.isDisabled,dropdownArrowPos:n.dropdownArrowPos,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,isCloseDestroy:n.isCloseDestroy,isInitDelayComplete:n.isInitDelayComplete,appendContainer:n.appendContainer,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,triggers:n.triggers,onOpenBeforeCallback:n.onOpenBeforeCallback,onOnChangeOpen:c,onOnChangePosition:m,onOnOpenComplete:p,onOnAfterLeave:g},{labelText:e.withCtx(()=>[e.renderSlot(B.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(B.$slots,"dropdown")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","dropDownPos","isUseDropdownArrow","isCloseDestroy","isInitDelayComplete","appendContainer","transitionEnter","transitionLeave","triggers","onOpenBeforeCallback"]))}}),Fa=(n,l)=>Object.prototype.hasOwnProperty.call(n,l),Yu=(n,l,a)=>{const t=(2-l)*a/2,i=t===0||t===1?0:l*a/(t<.5?t*2:2-t*2);return[n,i,t]},qu=n=>typeof n=="string"&&n.includes(".")&&Number.parseFloat(n)===1,Xu=n=>typeof n=="string"&&n.includes("%"),jt=(n,l)=>{qu(n)&&(n="100%");const a=Xu(n);return n=Math.min(l,Math.max(0,Number.parseFloat(`${n}`))),a&&(n=Number.parseInt(`${n*l}`,10)/100),Math.abs(n-l)<1e-6?1:n%l/Number.parseFloat(l)},Pa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Fn=n=>{n=Math.min(Math.round(n),255);const l=Math.floor(n/16),a=n%16;return`${Pa[l]||l}${Pa[a]||a}`},Ra=({r:n,g:l,b:a})=>Number.isNaN(+n)||Number.isNaN(+l)||Number.isNaN(+a)?"":`#${Fn(n)}${Fn(l)}${Fn(a)}`,Io={A:10,B:11,C:12,D:13,E:14,F:15},Ot=n=>n.length===2?(Io[n[0].toUpperCase()]||+n[0])*16+(Io[n[1].toUpperCase()]||+n[1]):Io[n[1].toUpperCase()]||+n[1],Gu=(n,l,a)=>{l=l/100,a=a/100;let t=l;const i=Math.max(a,.01);a*=2,l*=a<=1?a:2-a,t*=i<=1?i:2-i;const r=(a+l)/2,d=a===0?2*t/(i+t):2*l/(a+l);return{h:n,s:d*100,v:r*100}},Ha=(n,l,a)=>{n=jt(n,255),l=jt(l,255),a=jt(a,255);const t=Math.max(n,l,a),i=Math.min(n,l,a);let r=0;const d=t,u=t-i,s=t===0?0:u/t;if(t===i)r=0;else{switch(t){case n:{r=(l-a)/u+(l<a?6:0);break}case l:{r=(a-n)/u+2;break}case a:{r=(n-l)/u+4;break}}r/=6}return{h:r*360,s:s*100,v:d*100}},Nn=(n,l,a)=>{n=jt(n,360)*6,l=jt(l,100),a=jt(a,100);const t=Math.floor(n),i=n-t,r=a*(1-l),d=a*(1-i*l),u=a*(1-(1-i)*l),s=t%6,c=[a,d,r,r,u,a][s],m=[u,a,a,d,r,r][s],p=[r,r,u,a,a,d][s];return{r:Math.round(c*255),g:Math.round(m*255),b:Math.round(p*255)}};class Qu{_hue=0;_saturation=100;_value=100;_alpha=100;enableAlpha=!1;format="hex";value="";selected;constructor(l){l=l||{};for(const a in l)Fa(l,a)&&(this[a]=l[a]);l.value?this.fromString(l.value):this.doOnChange()}set(l,a){if(arguments.length===1&&typeof l=="object"){for(const t in l)Fa(l,t)&&this.set(t,l[t]);return}this[`_${l}`]=a,this.doOnChange()}get(l){return l==="alpha"?Math.floor(this[`_${l}`]):this[`_${l}`]}toRgb(){return Nn(this._hue,this._saturation,this._value)}fromString(l){if(!l)return;const a=this._convertValueInfo(l);a&&(this._hue=a.hue,this._saturation=a.saturation,this._value=a.value,this._alpha=a.alpha,this.doOnChange())}compare(l){return Math.abs(l._hue-this._hue)<2&&Math.abs(l._saturation-this._saturation)<1&&Math.abs(l._value-this._value)<1&&Math.abs(l._alpha-this._alpha)<1}doOnChange(){const{_hue:l,_saturation:a,_value:t,_alpha:i,format:r}=this,d={hue:l,saturation:a,value:t,alpha:i};let u=this._convertFormat(r,d);u.length===0&&(u=this._getValueRGB(d)),this.value=u}checkValue(l){let a=!1,t="";if(/^rgb\(/.test(l)?t="^[rR][gG][Bb][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){2}[\\s]*(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)[\\s]*[\\)]{1}$":/^rgba\(/.test(l)?t="^[rR][gG][Bb][Aa][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){3}[\\s]*(1|1.0|0|0.[0-9])[\\s]*[\\)]{1}$":/^#/.test(l)?t="^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$":/^hsl\(/.test(l)?t="^[hH][Ss][Ll][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsla\(/.test(l)?t="^[hH][Ss][Ll][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$":/^hsv\(/.test(l)?t="^[hH][Ss][Vv][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsva\(/.test(l)&&(t="^[hH][Ss][Vv][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$"),t.length>0){const i=new RegExp(t);a=l.match(i)!==null}return a}getValueFormat(l,a){const t=this._convertValueInfo(l);return t?this._convertFormat(a,t):l}_convertValueInfo(l){let a=0,t=100,i=100,r=100;if(l){let d;if(l.includes("hsl")){const u=l.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d=Gu(u[0],u[1],u[2]))}else if(l.includes("hsv")){const u=l.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d={h:u[0],s:u[1],v:u[2]})}else if(l.includes("rgb")){const u=l.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d=Ha(u[0],u[1],u[2]))}else if(l.includes("#")){const u=l.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(u))return;let s=0,c=0,m=0;u.length===3?(s=Ot(u[0]+u[0]),c=Ot(u[1]+u[1]),m=Ot(u[2]+u[2])):(u.length===6||u.length===8)&&(s=Ot(u.slice(0,2)),c=Ot(u.slice(2,4)),m=Ot(u.slice(4,6))),u.length===8?(r=Ot(u.slice(6))/255,r=r>1?1:r,r=r*100):(u.length===3||u.length===6)&&(r=100),d=Ha(s,c,m)}d&&(a=Math.max(0,Math.min(360,d.h)),t=Math.max(0,Math.min(100,d.s)),i=Math.max(0,Math.min(100,d.v)))}return{hue:a,saturation:t,value:i,alpha:r}}_convertFormat(l,a){let t="";switch(l){case"hsl":{t=this._getValueHSL(a);break}case"hsv":{t=this._getValueHSV(a);break}case"rgb":{t=this._getValueRGB(a);break}case"hex":t=this._getValueHEX(a)}return t}_isShowAlpha(l){return l!==100}_getValueHSL(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(l.alpha),i=Yu(l.hue,l.saturation/100,l.value/100),r=Math.round(l.hue),d=Math.round(i[1]*100),u=Math.round(i[2]*100);return t?`hsla(${r}, ${d}%, ${u}%, ${a/100})`:`hsl(${r}, ${d}%, ${u}%)`}_getValueHSV(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(a),i=Math.round(l.hue),r=Math.round(l.saturation),d=Math.round(l.value);return t?`hsva(${i}, ${r}%, ${d}%, ${a/100})`:`hsv(${i}, ${r}%, ${d}%)`}_getValueHEX(l){const a=Math.floor(l.alpha);return this._isShowAlpha(a)?`${Ra(Nn(l.hue,l.saturation,l.value))}${Fn(a*255/100)}`:Ra(Nn(l.hue,l.saturation,l.value))}_getValueRGB(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(a),{r:i,g:r,b:d}=Nn(l.hue,l.saturation,l.value);return t?`rgba(${i}, ${r}, ${d}, ${this.get("alpha")/100})`:`rgb(${i}, ${r}, ${d})`}}const Zu=e.defineComponent({name:"ClColorPickerPalette",__name:"Palette",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.reactive({background:"hsl(0, 100%, 50%)",btnLeft:0,btnTop:0}),i=e.computed(()=>{const s=l.color.get("hue"),c=l.color.get("value");return{hue:s,value:c}}),r=(s,c)=>{const p=a.value.getBoundingClientRect();let g=c.clientX-p.left,v=c.clientY-p.top;g=Math.max(0,g),g=Math.min(g,p.width),v=Math.max(0,v),v=Math.min(v,p.height),t.btnLeft=g,t.btnTop=v,l.color.set({saturation:g/p.width*100,value:100-v/p.height*100})},d=()=>{const s=a.value,c=l.color.get("saturation"),m=l.color.get("value"),{clientWidth:p,clientHeight:g}=s;t.btnLeft=c*p/100,t.btnTop=(100-m)*g/100,t.background=`hsl(${l.color.get("hue")}, 100%, 50%)`},u=()=>{const s={ing:(c,m)=>{r(c,m)},end:(c,m)=>{r(c,m)}};new je.Drag(a.value,s),d()};return e.onMounted(()=>{e.nextTick(()=>{u()})}),e.watch(()=>i.value,()=>{d()}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-palette",style:e.normalizeStyle({backgroundColor:t.background})},[c[1]||(c[1]=e.createElementVNode("div",{class:"panel-colorpicker-palette-white"},null,-1)),c[2]||(c[2]=e.createElementVNode("div",{class:"panel-colorpicker-palette-black"},null,-1)),e.createElementVNode("div",{class:"panel-colorpicker-palette-btn",style:e.normalizeStyle({top:t.btnTop+"px",left:t.btnLeft+"px"})},[...c[0]||(c[0]=[e.createElementVNode("div",null,null,-1)])],4)],4))}}),ed=e.defineComponent({name:"ClColorPickerHue",__name:"Hue",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),i=e.useTemplateRef("refElBtn"),r=e.reactive({btnTop:0}),d=e.computed(()=>l.color.get("hue")),u=(g,v)=>{const k=a.value.getBoundingClientRect();let F=v.clientY-k.top;F=Math.max(0,F),F=Math.min(F,k.height);const B=Math.round(F/k.height*360);l.color.set("hue",B)},s=()=>{const g=a.value,v=l.color.get("hue");return Math.round(v*g.offsetHeight/360)},c=()=>{r.btnTop=s()},m=()=>{const g={ing:(v,y)=>{u(v,y)},end:(v,y)=>{u(v,y)}};new je.Drag(t.value,g),new je.Drag(i.value,g),c()};e.onMounted(()=>{e.nextTick(()=>{m()})}),e.watch(()=>d.value,()=>{c()});const p=g=>{if(g.target!==i.value){const y=de.getClientXY(g);u(g,y)}};return(g,v)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-hue"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-hue-container",onClick:p},null,512),e.createElementVNode("div",{ref_key:"refElBtn",ref:i,class:"panel-colorpicker-hue-btn",style:e.normalizeStyle({top:r.btnTop+"px"})},null,4)],512))}}),td=e.defineComponent({name:"ClColorPickerAlpha",__name:"Alpha",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),i=e.useTemplateRef("refElBtn"),r=e.reactive({background:null,btnLeft:0}),d=e.computed(()=>l.color.get("alpha")),u=(v,y)=>{const F=a.value.getBoundingClientRect();let B=y.clientX-F.left;B=Math.max(0,B),B=Math.min(B,F.width);const I=Math.round(B/F.width*100);l.color.set("alpha",I)},s=()=>{const v=a.value,y=l.color.get("alpha");return Math.round(y*v.offsetWidth/100)},c=()=>{if(l.color&&l.color.value){const{r:v,g:y,b:k}=l.color.toRgb();return`linear-gradient(to right, rgba(${v}, ${y}, ${k}, 0) 0%, rgba(${v}, ${y}, ${k}, 1) 100%)`}return null},m=()=>{r.btnLeft=s(),r.background=c()},p=()=>{const v={ing:(y,k)=>{u(y,k)},end:(y,k)=>{u(y,k)}};new je.Drag(t.value,v),new je.Drag(i.value,v),m()};e.onMounted(()=>{e.nextTick(()=>{p()})}),e.watch(()=>d.value,()=>{m()}),e.watch(()=>l.color.value,()=>{m()});const g=v=>{if(v.target!==i.value){const k=de.getClientXY(v);u(v,k)}};return(v,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-alpha"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-alpha-container",style:e.normalizeStyle({background:r.background}),onClick:g},null,4),e.createElementVNode("div",{ref_key:"refElBtn",ref:i,class:"panel-colorpicker-alpha-btn",style:e.normalizeStyle({left:r.btnLeft+"px"})},null,4)],512))}}),Wl=e.defineComponent({name:"ClColorPickerItemBlock",__name:"ItemBlock",props:{className:String,color:String},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.computed(()=>{let d="panel-colorpicker-item-block ";const{className:u}=a;return u&&!o.isEmpty(u)&&(d+=u),d}),r=()=>{t("onClick",a.color||"")};return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value),onClick:r},[u[0]||(u[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({background:n.color})},null,4)],2))}}),nd={class:"panel-colorpicker-preset"},od=e.defineComponent({name:"ClColorPickerPreset",__name:"Preset",emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=e.reactive({keyIndex:`ColorpickerPreset-${o.getRandom(8)}`}),i=e.ref([]),r=()=>{const u=["var(--cl-text-primary, #323233)","var(--cl-bg, #ffffff)","#f44336","#E91E63","#9c27b0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B","rgba(255, 69, 0, 0.68)","rgba(31, 147, 255, 0.73)","var(--cl-transparent, rgba(0, 0, 0, 0))"];i.value=u};e.onMounted(()=>{r()});const d=u=>{a("onClick",u)};return(u,s)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:`${t.keyIndex}-${m}`},[e.createVNode(Wl,{color:c,onOnClick:d},null,8,["color"])]))),128))])]))}}),ad={class:"panel-colorpicker-value"},ld={key:0,class:"panel-colorpicker-hex"},id={key:1,class:"panel-colorpicker-rgb"},sd={key:2,class:"panel-colorpicker-hsl"},rd={key:3,class:"panel-colorpicker-hsv"},cd=e.defineComponent({name:"ClColorPickerValue",__name:"Value",props:{color:{type:Object,required:!0}},emits:{onChangeType:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.reactive({type:"hex",hex:"",rgb:"",hsl:"",hsv:""}),d=e.ref(""),u=e.reactive({r:"",g:"",b:"",a:""}),s=e.reactive({h:"",s:"",l:"",a:""}),c=e.reactive({h:"",s:"",v:"",a:""}),m={typeList:["hex","rgb","hsl","hsv"]},p=e.computed(()=>t.color.value),g=C=>{const U=C.substring(C.indexOf("(")+1,C.indexOf(")")).split(",").map(Z=>o.trim(Z));return U.length===3&&U.push("1"),U},v=(C,T)=>{const U=C||p.value,{color:Z}=t,z=T==="hex"?U:Z.getValueFormat(U,"hex"),H=Z.getValueFormat(U,"rgb"),S=Z.getValueFormat(U,"hsl"),E=Z.getValueFormat(U,"hsv");r.hex=z,r.rgb=H,r.hsl=S,r.hsv=E,e.nextTick(()=>{d.value=z;const f=g(H);u.r=f[0],u.g=f[1],u.b=f[2],u.a=f[3];const D=g(S);s.h=D[0],s.s=D[1],s.l=D[2],s.a=D[3];const h=g(E);c.h=h[0],c.s=h[1],c.v=h[2],c.a=h[3]})},y=C=>{let T=m.typeList.indexOf(r.type);T+=C;const U=m.typeList.length;T<0?T=U-1:T>=U&&(T=0);const Z=m.typeList[T];r.type=Z,i("onChangeType",Z)},k=C=>{let T="";switch(C){case"hex":{d.value.length>0&&(T=d.value);break}case"rgb":{u.r.length>0&&u.g.length>0&&u.b.length>0&&u.a.length>0&&(T=`rgba(${u.r}, ${u.g}, ${u.b},${u.a})`);break}case"hsl":{s.h.length>0&&s.s.length>0&&s.l.length>0&&s.a.length>0&&(T=`hsla(${s.h}, ${s.s}, ${s.l},${s.a})`);break}case"hsv":{c.h.length>0&&c.s.length>0&&c.v.length>0&&c.a.length>0&&(T=`hsva(${c.h}, ${c.s}, ${c.v},${c.a})`);break}}if(T.length>0&&t.color.checkValue(T)){const U=t.color.getValueFormat(T,C);T!==U&&(v(T,C),e.nextTick(()=>{t.color.fromString(T)}),i("onChangeType",C))}},F=()=>{v()};e.onMounted(()=>{e.nextTick(()=>{F()})}),e.watch(()=>p.value,C=>{const T=t.color.getValueFormat(C,"rgb");r.rgb!==T&&v()});const B=()=>{k("hex")},I=()=>{k("rgb")},A=()=>{k("hsl")},N=()=>{k("hsv")},x=()=>{y(-1)},V=()=>{y(1)};return l({setType:C=>{r.type=C},clearInputs:()=>{d.value="",u.r="",u.g="",u.b="",u.a="",s.h="",s.s="",s.l="",s.a="",c.h="",c.s="",c.v="",c.a=""}}),(C,T)=>(e.openBlock(),e.createElementBlock("div",ad,[e.createElementVNode("div",null,[r.type==="hex"?(e.openBlock(),e.createElementBlock("div",ld,[e.createElementVNode("div",null,[e.createVNode(Pe,{value:d.value,"onUpdate:value":T[0]||(T[0]=U=>d.value=U),isClean:!1,onOnChange:B},null,8,["value"]),T[13]||(T[13]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"十六进制",-1))])])):r.type==="rgb"?(e.openBlock(),e.createElementBlock("div",id,[e.createElementVNode("div",null,[e.createVNode(Pe,{value:u.r,"onUpdate:value":T[1]||(T[1]=U=>u.r=U),isClean:!1,onOnChange:I},null,8,["value"]),T[14]||(T[14]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"R",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:u.g,"onUpdate:value":T[2]||(T[2]=U=>u.g=U),isClean:!1,onOnChange:I},null,8,["value"]),T[15]||(T[15]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"G",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:u.b,"onUpdate:value":T[3]||(T[3]=U=>u.b=U),isClean:!1,onOnChange:I},null,8,["value"]),T[16]||(T[16]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"B",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:u.a,"onUpdate:value":T[4]||(T[4]=U=>u.a=U),isClean:!1,onOnChange:I},null,8,["value"]),T[17]||(T[17]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):r.type==="hsl"?(e.openBlock(),e.createElementBlock("div",sd,[e.createElementVNode("div",null,[e.createVNode(Pe,{value:s.h,"onUpdate:value":T[5]||(T[5]=U=>s.h=U),isClean:!1,onOnChange:A},null,8,["value"]),T[18]||(T[18]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:s.s,"onUpdate:value":T[6]||(T[6]=U=>s.s=U),isClean:!1,onOnChange:A},null,8,["value"]),T[19]||(T[19]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:s.l,"onUpdate:value":T[7]||(T[7]=U=>s.l=U),isClean:!1,onOnChange:A},null,8,["value"]),T[20]||(T[20]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"L",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:s.a,"onUpdate:value":T[8]||(T[8]=U=>s.a=U),isClean:!1,onOnChange:A},null,8,["value"]),T[21]||(T[21]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):r.type==="hsv"?(e.openBlock(),e.createElementBlock("div",rd,[e.createElementVNode("div",null,[e.createVNode(Pe,{value:c.h,"onUpdate:value":T[9]||(T[9]=U=>c.h=U),isClean:!1,onOnChange:N},null,8,["value"]),T[22]||(T[22]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:c.s,"onUpdate:value":T[10]||(T[10]=U=>c.s=U),isClean:!1,onOnChange:N},null,8,["value"]),T[23]||(T[23]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:c.v,"onUpdate:value":T[11]||(T[11]=U=>c.v=U),isClean:!1,onOnChange:N},null,8,["value"]),T[24]||(T[24]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"V",-1))]),e.createElementVNode("div",null,[e.createVNode(Pe,{value:c.a,"onUpdate:value":T[12]||(T[12]=U=>c.a=U),isClean:!1,onOnChange:N},null,8,["value"]),T[25]||(T[25]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))]),e.createElementVNode("div",null,[e.createVNode(ye,{name:"caret-up",onClick:x}),e.createVNode(ye,{name:"caret-down",onClick:V})])]))}}),ud={key:0,class:"panel-colorpicker-copy-icon"},Ua=e.defineComponent({name:"ClColorPickerCopy",__name:"Copy",props:{className:String,color:String,getTxtCallback:Function},setup(n){const l=n,a=e.useSlots(),t=e.reactive({isHover:!1}),i=e.computed(()=>!o.isUndefined(a.default)),r=e.computed(()=>{let c=!1;return i.value?c=t.isHover:c=!0,c}),d=e.computed(()=>{const c={"panel-colorpicker-copy":!0,"panel-colorpicker-copy-hover":t.isHover},{className:m}=l;return m&&!o.isEmpty(m)&&m.split(" ").forEach(p=>{o.isEmpty(p)||(c[p]=!0)}),c}),u=()=>{i.value&&(t.isHover=!0)},s=()=>{i.value&&(t.isHover=!1)};return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),onMouseenter:u,onMouseleave:s},[e.renderSlot(c.$slots,"default"),r.value?(e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(hn,{textLabel:n.getTxtCallback||n.color||""},null,8,["textLabel"])])):e.createCommentVNode("",!0)],34))}}),dd={class:"panel-colorpicker-container"},md={key:0},pd={key:0,class:"panel-colorpicker-format"},fd={class:"panel-colorpicker-format-show"},hd={key:1,class:"panel-colorpicker-operate"},za=e.defineComponent({name:"ClColorPickerBase",__name:"Color",props:{value:String,disabled:{type:Boolean,default:!1},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isDropdown:{type:Boolean,default:!0}},emits:{onChange:n=>!0,onSubmit:()=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElColorResult"),s=e.useTemplateRef("refElColorValue"),c=e.reactive({isShowColorResult:!1,colorResult:"",formatShow:"hex"}),m=e.reactive(new Qu({value:t.value,format:"",enableAlpha:!0})),p={isColorChangeResult:!0},g=()=>m.get("alpha").toString()==="100"?"hex":"rgb",v=(C,T=!0)=>{let U="";C&&!o.isEmpty(C)&&c.isShowColorResult&&(U=m.getValueFormat(C,c.formatShow)),c.colorResult=U,T&&i("onChange",U)},y=C=>{C&&!o.isEmpty(C)?(c.isShowColorResult=!0,m.fromString(C),v(m.value,!1)):(c.isShowColorResult=!1,p.isColorChangeResult=!1,v("",!1),m.fromString(""),e.nextTick(()=>{p.isColorChangeResult=!0}))},k=()=>{const{value:C}=t;y(C),i("onInit")};e.onMounted(()=>{e.nextTick(()=>{k()})}),e.watch(()=>t.value,C=>{y(C)}),e.watch(()=>m.value,C=>{o.isEmpty(t.value)&&(c.isShowColorResult=!0),p.isColorChangeResult&&v(C),p.isColorChangeResult=!0});const F=()=>m.getValueFormat(m.value,c.formatShow),B=C=>{m.fromString(C)},I=C=>{c.formatShow=C,v(m.value,!1)},A=()=>{const C=t.value||"";c.isShowColorResult=!o.isEmpty(C),o.isEmpty(C)?m.set({hue:0,saturation:0,value:100,alpha:100}):(p.isColorChangeResult=!1,v(C),m.fromString(C))},N=()=>{m.set({hue:0,saturation:0,value:100,alpha:100})},x=()=>{i("onSubmit")};return l({getValue:()=>{let C=c.colorResult;if(C.length>0){const T=g();C=m.getValueFormat(C,T)}return C},setValue:C=>{y(C)},initValueType:()=>{const C=g();c.formatShow=C,s.value&&s.value.setType(C)}}),(C,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["panel-colorpicker-wrapper",{"panel-colorpicker-wrapper-disabled":n.disabled}])},[e.createElementVNode("div",dd,[e.createElementVNode("div",null,[e.createVNode(Zu,{color:m},null,8,["color"]),e.createVNode(ed,{color:m},null,8,["color"])]),n.isAlpha?(e.openBlock(),e.createElementBlock("div",md,[e.createVNode(td,{color:m},null,8,["color"]),T[0]||(T[0]=e.createElementVNode("div",null,null,-1))])):e.createCommentVNode("",!0)]),n.isFormat?(e.openBlock(),e.createElementBlock("div",pd,[e.createElementVNode("div",fd,[e.createVNode(Ua,{className:"panel-colorpicker-tip-current",getTxtCallback:F},{default:e.withCtx(()=>[e.createVNode(Wl,{color:m.value},null,8,["color"])]),_:1})]),e.createVNode(cd,{ref_key:"refElColorValue",ref:s,color:m,onOnChangeType:I},null,8,["color"])])):e.createCommentVNode("",!0),n.isOperate?(e.openBlock(),e.createElementBlock("div",hd,[e.createElementVNode("div",{ref_key:"refElColorResult",ref:u},e.toDisplayString(c.colorResult),513),e.createElementVNode("div",null,[e.createElementVNode("div",{onClick:A},[e.createVNode(ye,{name:"restore",title:e.unref(r).restore},null,8,["title"])]),e.createElementVNode("div",{onClick:N},[e.createVNode(ye,{name:"clear",title:e.unref(r).clearEmpty},null,8,["title"])]),e.createVNode(Ua,{color:c.colorResult},null,8,["color"]),n.isDropdown?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x},[e.createVNode(ye,{name:"check",title:e.unref(r).submit},null,8,["title"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),n.isPreset?(e.openBlock(),e.createBlock(od,{key:2,onOnClick:B})):e.createCommentVNode("",!0)],2))}}),gd={class:"panel-colorpicker-dropdown-text"},vd={key:0,class:"panel-colorpicker-dropdown-arrow"},jl=e.defineComponent({name:"ClColorPicker",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isDropdown:{type:Boolean,default:!0},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=t.id,r=a,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElColorpicker"),s=e.reactive({isInitShow:!t.isDropdown,dropdownTextValue:"",currentValue:""}),c={lastValue:""},m=e.computed(()=>{let M="panel-colorpicker ";const{className:C}=t;return C&&!o.isEmpty(C)&&(M+=C),t.isPlaintext&&(M+="cl-plaintext-static "),M}),p=()=>{const M=s.currentValue;let C=!1;t.isDropdown?C=M!==c.lastValue:C=!0,C&&(c.lastValue=M,r("update:value",M),r("update:modelValue",M),r("onChange",M))},g=M=>{let C="transparent";M&&!o.isEmpty(M)&&(C=M),s.dropdownTextValue=C},v=M=>{const C=M||"";c.lastValue=C,t.isDropdown||(s.currentValue=C),g(C)},y=()=>{const M=u.value.getValue();s.dropdownTextValue=M,s.currentValue=M,p()},k=()=>{v(t.value)};e.watch(()=>t.value,M=>{v(M)}),e.onMounted(()=>{e.nextTick(()=>{k()})});const F=()=>{r("onInit")},B=M=>{t.disabled||(M?u.value&&u.value.initValueType():t.isOperate?s.currentValue!==u.value.getValue()&&s.currentValue===c.lastValue&&u.value.setValue(c.lastValue):y())},I=()=>{s.isInitShow=!0,s.currentValue=c.lastValue},A=()=>{t.isDropdown||y()},N=()=>{y(),t.isDropdown&&d.value&&d.value.setOpen(!1)};return l({getValue:()=>s.currentValue,getValueData:()=>({value:s.currentValue}),setValue:M=>{v(M)}}),(M,C)=>n.isDropdown?(e.openBlock(),e.createBlock(Gn,{key:0,ref_key:"refElDropdownLayer",ref:d,id:e.unref(i),classParent:m.value,classDropDown:"panel-colorpicker-dropdown",isUseDropdownArrow:!0,isDisabled:n.disabled,onOnChangeOpen:B,onOnOpenComplete:I},{label:e.withCtx(()=>[e.createElementVNode("div",gd,[C[0]||(C[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({"background-color":s.dropdownTextValue})},null,4),n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("div",vd,[e.createVNode(ye,{name:"angle-down"})]))])]),dropdown:e.withCtx(()=>[s.isInitShow?(e.openBlock(),e.createBlock(za,{key:0,ref_key:"refElColorpicker",ref:u,value:s.currentValue,isAlpha:n.isAlpha,isFormat:n.isFormat,isOperate:n.isOperate,isPreset:n.isPreset,isDropdown:n.isDropdown,onOnChange:A,onOnSubmit:N,onOnInit:F},null,8,["value","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)]),_:1},8,["id","classParent","isDisabled"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(m.value)},[s.isInitShow?(e.openBlock(),e.createBlock(za,{key:0,ref_key:"refElColorpicker",ref:u,value:s.currentValue,disabled:n.disabled,isAlpha:n.isAlpha,isFormat:n.isFormat,isOperate:n.isOperate,isPreset:n.isPreset,isDropdown:n.isDropdown,onOnChange:A,onOnSubmit:N,onOnInit:F},null,8,["value","disabled","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)],2))}}),yd={class:"imgCropper-container"},kd={style:{position:"relative"}},Sd={class:"imgCropper-main"},wd={class:"frame-alignline"},Cd={class:"imgCropper-btns"},Ed={key:0,class:"imgCropper-upload"},bd=["id","name"],xd=["for"],Bd={class:"imgCropper-btns-opt"},Id={key:0,class:"imgCropper-loading-mask"},Dd=["src"],Td={key:0,class:"imgCropper-loading-mask"},Nd={key:0,class:"frame-alignline"},Ja=e.defineComponent({name:"ClCropperBase",__name:"Base",props:{className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},isCenterBox:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onImgLoad:n=>!0,onImgSave:()=>!0},setup(n,{expose:l,emit:a}){const t=e.defineAsyncComponent(()=>import("cropper-next-vue").then(O=>(Promise.resolve().then(()=>require("./index-Dyvby5gX.cjs")),O.VueCropper))),i=n,r=a,d=o.getRandom(8),u=`cropperBase-${d}`,s=e.useTemplateRef("refElCropper"),c=e.ref(!1),m=e.reactive({uploadAgainId:`btnImgCropper_uploadAgain_${d}`,isInitImageLoading:!1}),p=e.reactive({img:"",wrapper:{width:400,height:400},cropLayout:{width:i.width,height:i.height},color:i.fillColor,outputSize:1,outputType:"png",full:!0,original:!1,maxSideLength:3e3,mode:"contain",centerBox:i.isCenterBox,centerWrapper:!1}),g=e.reactive({src:"",style:{},pStyle:{}}),v=e.ref({}),y=e.ref(0),k=e.ref(0),F=e.ref(!0),B=e.computed(()=>{const{alignLine:O}=i;return o.isNonEmptyString(O)?O.split(","):[]}),I=e.computed(()=>{const O={"panel-imgCropper":!0};return o.getJsonMerge(O,de.getClassNameJson(i.className))}),A=e.computed(()=>{const{previewShape:O}=i,P=o.isNonEmptyString(O)?O:"square",J={"imgCropper-preview":!0};return J[`imgCropper-preview-${P}`]=!0,J}),N=e.computed(()=>({width:`${(i.width??0)+6}px`,height:`${(i.height??0)+6}px`,backgroundColor:i.fillColor})),x=()=>{p.cropLayout={width:Math.max(1,i.width??1),height:Math.max(1,i.height??1)}},V=()=>{const{src:O}=i;let P="";if(o.isNonEmptyString(O)){if(O.substring(0,5)!=="data:")if(/^(http|https):\/\/[^\s]+$/.test(O)){const J=`_t=${new Date().getTime()}`,Y=O.indexOf("?")===-1?"?":"&";P=O+Y+J}else P=O;else P=O;m.isInitImageLoading=!0,k.value=0,y.value=0}else m.isInitImageLoading=!1;p.img=P},w=()=>{x(),V()};e.onMounted(()=>{e.nextTick(()=>{w()})}),e.onBeforeUnmount(()=>{F.value=!1}),e.watch(()=>i.src,(O,P)=>{O!==P&&V()}),e.watch(()=>[i.width,i.height,i.fillColor,i.isCenterBox],([O,P,J,Y],[ne,ce,X,Q])=>{(O!==ne||P!==ce)&&x(),J!==X&&(p.color=J),Y!==Q&&(p.centerBox=Y)});const M=O=>{if(!O)return;const{url:P,img:J,w:Y,h:ne}=O;g.src=P??"",g.style=J??{},g.pStyle={width:typeof Y=="number"?`${Y}px`:`${i.width}px`,height:typeof ne=="number"?`${ne}px`:`${i.height}px`};const ce=J?.transform?.match(/scale\(([^)]+)\)/);ce&&(y.value=parseFloat(ce[1]),k.value||(k.value=y.value));const X=Y??i.width,Q=ne??i.height;if(X>0&&Q>0&&(X>i.width||Q>i.height)){const le=Math.min(i.width/X,i.height/Q);v.value={transform:`scale(${le})`}}else v.value={}},C=O=>{if(!O){m.isInitImageLoading=!1,r("onImgLoad",!1);return}const P=O.type==="success";m.isInitImageLoading=!1,r("onImgLoad",P)},T=O=>{const P=O.currentTarget;!P||!P.files||P.files.length===0||(k.value=0,y.value=0,m.isInitImageLoading=!0,o.getBase64ByFile(P.files).then(J=>{if(F.value){if(!J){m.isInitImageLoading=!1;return}p.img=J}}).catch(()=>{F.value&&(m.isInitImageLoading=!1)}))},U=()=>{},Z=()=>{s.value?.zoomIn(.02)},z=()=>{s.value?.zoomOut(.02)},H=()=>{s.value?.rotateLeft()},S=()=>{s.value?.rotateRight()},E=()=>{s.value&&(m.isInitImageLoading=!0,s.value.reload())},f=()=>{r("onImgSave")};return l({getImageBase64:()=>s.value?s.value.getCropData("base64"):Promise.reject(new Error("vue-cropper 实例未就绪")),refresh:()=>{if(!s.value){Se.warn("ClCropperBase","refresh 调用无效:vue-cropper 实例未就绪");return}s.value.reload()},loadingStart:()=>{c.value=!0},loadingStop:()=>{c.value=!1}}),(O,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(I.value),id:u},[e.createElementVNode("div",yd,[e.createElementVNode("div",kd,[e.createElementVNode("div",Sd,[e.createVNode(e.unref(t),e.mergeProps({ref_key:"refElCropper",ref:s},p,{onRealTime:M,onImgLoad:C}),{loading:e.withCtx(()=>[...P[0]||(P[0]=[])]),_:1},16),e.createElementVNode("div",wd,[B.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[P[1]||(P[1]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),P[2]||(P[2]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):B.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[P[3]||(P[3]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),P[4]||(P[4]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),P[5]||(P[5]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),P[6]||(P[6]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])]),e.createElementVNode("div",Cd,[e.createElementVNode("div",null,[n.isShowUpload?(e.openBlock(),e.createElementBlock("div",Ed,[e.createElementVNode("input",{type:"file",id:m.uploadAgainId,name:m.uploadAgainId,accept:"image/jpg,image/jpeg,image/pjpeg,image/png,image/x-png",onChange:T},null,40,bd),e.createElementVNode("label",{for:m.uploadAgainId},[e.createElementVNode("span",{title:"重新上传",onClick:e.withModifiers(U,["stop"])},[e.createVNode(ye,{name:"upload"})])],8,xd)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("div",Bd,[e.createElementVNode("span",{title:"放大","aria-label":"放大",role:"button",tabindex:"0",onClick:e.withModifiers(Z,["stop"])},[e.createVNode(ye,{name:"search-plus"})]),e.createElementVNode("span",{title:"缩小","aria-label":"缩小",role:"button",tabindex:"0",onClick:e.withModifiers(z,["stop"])},[e.createVNode(ye,{name:"search-minus"})]),e.createElementVNode("span",{title:"左转90°","aria-label":"左转90度",role:"button",tabindex:"0",onClick:e.withModifiers(H,["stop"])},[e.createVNode(ye,{name:"rotate-left"})]),e.createElementVNode("span",{title:"右转90°","aria-label":"右转90度",role:"button",tabindex:"0",onClick:e.withModifiers(S,["stop"])},[e.createVNode(ye,{name:"rotate-right"})]),e.createElementVNode("span",{title:"重置","aria-label":"重置",role:"button",tabindex:"0",onClick:e.withModifiers(E,["stop"])},[e.createVNode(ye,{name:"restore"})]),n.isShowSave?(e.openBlock(),e.createElementBlock("span",{key:0,title:"保存","aria-label":"保存",role:"button",tabindex:"0",onClick:e.withModifiers(f,["stop"])},[e.createVNode(ye,{name:"save"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),c.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",Id,[e.createVNode(rt,{theme:"circleSpinner",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),n.isPreview?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(A.value),style:e.normalizeStyle(N.value)},[e.createElementVNode("div",{style:e.normalizeStyle(v.value)},[e.createElementVNode("div",{style:e.normalizeStyle(g.pStyle)},[e.createElementVNode("img",{src:g.src,style:e.normalizeStyle(g.style),alt:""},null,12,Dd)],4),c.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",Td)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4),n.isPreviewAlignLine?(e.openBlock(),e.createElementBlock("div",Nd,[B.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[P[7]||(P[7]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),P[8]||(P[8]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):B.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[P[9]||(P[9]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),P[10]||(P[10]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),P[11]||(P[11]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),P[12]||(P[12]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],2))}}),Vd=["id"],Md={style:{display:"flex","justify-content":"center"}},na=e.defineComponent({name:"ClCropper",__name:"Index",props:{id:String,className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isCenterBox:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isModal:{type:Boolean,default:!0},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onSubmit:n=>!0,onImgLoad:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id||`cropper-${o.getRandom(8)}`,d=e.useTemplateRef("refElModal"),u=e.useTemplateRef("refElCropper"),s=e.ref(!t.isModal),c=e.computed(()=>{const V={"panel-cropper":!0};return o.getJsonMerge(V,de.getClassNameJson(t.className))}),m=e.computed(()=>{const{isModal:V,id:w,className:M,...C}=t;return t.isModal?{...C,isShowSave:!1}:C}),p=()=>u.value?u.value.getImageBase64():Promise.reject(new Error("Cropper 未挂载")),g=(V,w,M)=>{i("onSubmit",{success:!w,data:V,msg:w}),M&&d.value?.hide()},v=()=>p().then(V=>{g(V,"",!0)}).catch(V=>{const w=o.isString(V)?V:V?.message||"裁剪失败";g("",w,!0)}),y=V=>{i("onImgLoad",V)},k=()=>p().then(V=>{g(V,"")}).catch(V=>{const w=o.isString(V)?V:V?.message||"保存失败";g("",w)});return l({getImageBase64:()=>p(),refresh:()=>{u.value?u.value.refresh():Se.warn("ClCropper","refresh 调用无效:Cropper 未挂载")},show:()=>{d.value&&t.isModal?(s.value=!0,d.value.show()):Se.warn("ClCropper","show 调用无效:非弹窗模式或 Modal 未挂载")},showAndReset:()=>{d.value&&t.isModal?(s.value=!1,d.value.show(),e.nextTick(()=>{s.value=!0})):Se.warn("ClCropper","showAndReset 调用无效:非弹窗模式或 Modal 未挂载")},loadingStart:()=>{u.value?u.value.loadingStart():Se.warn("ClCropper","loadingStart 调用无效:Cropper 未挂载")},loadingStop:()=>{u.value?u.value.loadingStop():Se.warn("ClCropper","loadingStop 调用无效:Cropper 未挂载")}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(c.value)},[n.isModal?(e.openBlock(),e.createBlock(Qo,{key:0,ref_key:"refElModal",ref:d,width:"850px",titleName:"图片裁切",isShowSubmitLoad:!1,closeLabel:"取消",submitLabel:"确定",onOnSubmit:v},{default:e.withCtx(()=>[e.createElementVNode("div",Md,[s.value?(e.openBlock(),e.createBlock(Ja,e.mergeProps({key:0,ref_key:"refElCropper",ref:u},m.value,{onOnImgLoad:y}),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),_:1},512)):(e.openBlock(),e.createBlock(Ja,e.mergeProps({key:1,ref_key:"refElCropper",ref:u},m.value,{onOnImgLoad:y,onOnImgSave:k}),null,16))],10,Vd))}}),qe={format:{img:["jpg","jpe","jpeg","png","gif","bmp","ico"],video:["mp4","rmvb","3gp","avi","asf","asf","dv","mov","mpg4","mpeg","mpg","wm","wmx","flv","mkv","mp4a","rm","wmv","swf","swfl"],audio:["mp3","ogg","wav","wma","mid","ra","ram"],zip:["rar","zip"],excel:["xls","xlsx","csv"],pdf:["pdf"],txt:["txt"],doc:["doc","docx"]},icon:{img:"image",video:"video",audio:"music",txt:"text",zip:"zip",excel:"excel",pdf:"pdf",doc:"word",default:"file"},suffix:{jpg:["jpg","jpe","jpeg"],jpe:["jpg","jpe","jpeg"],jpeg:["jpg","jpe","jpeg"],png:["png"],gif:["gif"],bmp:["bmp"],ico:["ico"],mp4:["mp4"],rmvb:["rmvb"],"3gp":["3gp"],avi:["avi"],asf:["asf"],dv:["dv"],mov:["mov"],mpg4:["mpg4"],mpeg:["mpeg"],mpg:["mpg"],wm:["wm"],wmx:["wmx"],flv:["flv"],mkv:["mkv"],mp4a:["mp4a"],rm:["rm"],wmv:["wmv"],swf:["swf"],swfl:["swfl"],mp3:["mp3"],ogg:["ogg"],wav:["wav"],wma:["wma"],mid:["mid"],ra:["ra"],ram:["ram"],rar:["rar"],zip:["zip"],txt:["txt"],xls:["xls","xlsx","csv"],xlsx:["xls","xlsx","csv"],csv:["xls","xlsx","csv"],pdf:["pdf"],doc:["doc","docx"]},mime:{jpg:["image/jpg","image/jpeg","image/pjpeg"],jpe:["image/jpg","image/jpeg","image/pjpeg"],jpeg:["image/jpg","image/jpeg","image/pjpeg"],png:["image/png","image/x-png"],gif:["image/gif"],bmp:["image/bmp"],ico:["ico"],mp4:["video/mp4"],rmvb:["audio/x-pn-realaudio"],"3gp":["video/3gpp"],avi:["video/x-msvideo"],asf:["video/x-ms-asf"],dv:["video/x-dv"],mov:["video/quicktime"],mpg4:["video/mp4"],mpeg:["video/mpeg"],mpg:["video/mpeg"],wm:["video/x-ms-wmv"],wmx:["video/x-ms-wmx"],flv:["video/x-flv"],mkv:["video/x-matroska"],mp4a:["audio/mp4"],rm:["audio/x-pn-realaudio"],wmv:["audio/x-ms-wmv"],swf:["application/x-shockwave-flash"],swfl:["application/x-shockwave-flash"],mp3:["audio/mpeg"],ogg:["audio/ogg"],wav:["audio/wav"],wma:["audio/x-ms-wma"],mid:["audio/midi"],ra:["audio/x-pn-realaudio"],ram:["audio/x-pn-realaudio"],rar:["application/x-rar-compressed"],zip:["application/zip","application/x-zip-compressed"],txt:["text/plain"],xls:["application/vnd.ms-excel","application/wps-office.xls"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/wps-office.xlsx"],csv:["text/csv"],pdf:["application/pdf"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},getFormatGroup:n=>{let l=[];return o.isNonEmptyString(n)&&(n.split(",").forEach(t=>{for(const[i,r]of Object.entries(qe.format))o.isExistValue(r,t.toLocaleLowerCase())&&l.push(i)}),l=o.getArrUnique(l)),l},getIcon:n=>{let l="";return o.isEmpty(n)?l=qe.icon.default:l=o.isExistJsonKey(qe.icon,n)?qe.icon[n]:qe.icon.default,l},getSuffix:n=>{let l=[];return o.isEmpty(n)||(n.forEach(a=>{const t=qe.suffix[a.toLocaleLowerCase()];o.isUndefined(t)||(l=l.concat(t))}),o.isEmpty(l)&&(l=n)),l=o.getArrUnique(l),l},getRegexBySuffix:n=>{if(o.isEmpty(n))return null;const l=`\\.(?:${n.join("|")})$`;return new RegExp(l,"i")},getMime:n=>{let l=[];return o.isEmpty(n)||n.forEach(a=>{const t=qe.mime[a];o.isUndefined(t)||(l=l.concat(t))}),l=o.getArrUnique(l),l},getRegexByMime:n=>{if(o.isEmpty(n))return null;const l=`^(?:${n.join("|").replace(/\//g,"\\/")})$`;return new RegExp(l,"i")},getImageThumbnail:(n,l,a)=>{let t=null;try{const i=document.createElement("canvas");i.width=l,i.height=a,i.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,l,a),t=i.toDataURL("image/gif")}catch{t=null}return t}},Yl=(n,l)=>{let a=n;const t=e.reactive({mime:[],suffix:[],isCheckImgWH:!1});let i=null;const r=B=>{a=o.getJsonMerge(a,B),u()},d=B=>{const I=a.checkMsg;return o.isString(I)&&!o.isEmpty(I)?I:o.isObject(I)&&!o.isEmpty(I[B])?I[B]:l.value[B]},u=()=>{const B=o.isNonEmptyString(a.checkFormat)?qe.getSuffix(a.checkFormat.split(",")):[],I=qe.getMime(B),A=!o.isEmpty(a.checkWidth)&&!o.isEmpty(a.checkHeight);t.mime=I,t.suffix=B,t.isCheckImgWH=A},s=B=>{const I=qe.getIcon(B);return{type:B,icon:I,isImage:B==="img",isVideo:B==="video",isAudio:B==="audio",isTxt:B==="txt",isZip:B==="zip"}},c=(B,I)=>{if(o.isUndefined(i)){i={};for(const[N,x]of Object.entries(qe.format)){const V=qe.getSuffix(x),w=qe.getMime(V),M=qe.getRegexBySuffix(V),C=qe.getRegexByMime(w);i[N]={suffix:V,mime:w,regSuffix:M,regMime:C}}}let A="";return Object.keys(i).forEach(N=>{if(A.length===0){const x=i[N];(x.regSuffix&&x.regSuffix.test(B)||I&&x.regMime&&x.regMime.test(I))&&(A=N)}}),s(A)},m=B=>{const I=qe.getFormatGroup(o.isEmpty(B)?a.checkFormat:B),A=I.length===1?I[0]:"";return s(A)},p=B=>{if(!o.isString(B))return c("");if(B.startsWith("data:")||B.startsWith("blob:")){const A=B.match(/^[a-z]+:([a-zA-Z0-9.+-]+\/[a-zA-Z0-9.+-]+)/);return c("",A?A[1]:"")}const I=B.substring(B.lastIndexOf("/")+1).split("?")[0].split("#")[0];return c(I)},g=(B,I,A,N,x)=>{const V=o.isFinite(A)&&A>0?A:0,w=o.isFinite(N)&&N>0?N:0;let M=x;(M==="height"||M==="contain")&&w===0&&(M="width");let C=1;switch(M){case"height":C=w>0?w/I:1;break;case"contain":C=Math.min(V>0?V/B:1,w>0?w/I:1);break;case"width":default:C=V>0?V/B:1;break}return C>1&&(C=1),{tw:Math.round(B*C),th:Math.round(I*C)}},v=(B,I,A,N)=>new Promise((x,V)=>{const w=document.createElement("img");w.onload=M=>{const C=M.target.width,T=M.target.height,{tw:U,th:Z}=g(C,T,I,A,N),z=M.target.src;x({src:z,w:C,h:T,tw:U,th:Z,isImage:!0})},w.onerror=()=>{V(new Error("fail: temp create image"))},w.src=B}),y=(B,I)=>{const A=o.isEmpty(a.checkWidth)?0:parseInt(a.checkWidth,10),N=o.isEmpty(a.checkHeight)?0:parseInt(a.checkHeight,10);if(!o.isFinite(A)||!o.isFinite(N)||A===0||N===0)return!0;let x=!0;switch(a.checkWHType){case"greater":x=B>=A&&I>=N;break;case"less":x=B<=A&&I<=N;break;case"equal":x=B===A&&I===N;break;default:x=!0;break}return x},k=(B,I)=>new Promise((A,N)=>{if(B instanceof File){const x=new FileReader;x.onload=V=>{v(V.target.result,I.maxWidth,I.maxHeight,I.imgFit).then(w=>{(t.isCheckImgWH?y(w.w,w.h):!0)?A(w):N(new Error(d("checkImageWHLabel")))}).catch(w=>{N(w)})},x.onerror=()=>{N(new Error("fail: new FileReader image onload()"))},x.readAsDataURL(B)}else N(new Error("fail: file is not a File instance"))}),F=async(B,I)=>{let A=[];const N=[],x=[],V=qe.getRegexBySuffix(t.suffix),w=qe.getRegexByMime(t.mime),M=Z=>{const z=o.isEmpty(Z)?NaN:parseInt(Z,10);return o.isFinite(z)?z*1024:null},C=M(a.checkMinSize),T=M(a.checkMaxSize),U=B.length;for(let Z=0;Z<U;Z+=1){const z=[],H=B[Z],S={suffix:!1,mime:!1,size:!1},E=H.name;V&&!V.test(E)&&(S.suffix=!0);const f=H.type;!o.isEmpty(f)&&w&&!w.test(f)&&(S.mime=!0),C&&H.size<C&&(S.size=!0),T&&H.size>T&&(S.size=!0),(S.suffix||S.mime)&&z.push(d("checkSuffixMimeLabel")),S.size&&z.push(d("checkSizeLabel"));const D=c(E,f);let h=null;D.isImage&&(h=await k(H,I).catch(b=>{z.push(b.message)})),o.isUndefined(h)&&(h={}),h=o.getJsonMerge(h,D),h.fileName=E,h.file=H,z.length===0?(N.push(H),x.push(h)):U===1?A=z.map(b=>`${d("uploadFile")} ${b}`):A.push(`${E}:${z.join(",")}`)}return new Promise(Z=>{setTimeout(()=>{Z({errorMsg:A,passFiles:N,passFilesInfo:x,original:B})},200)})};return u(),{optBase:t,getTypeByFormat:m,getTypeByUrl:p,createTempImg:v,checkFile:F,setBaseOptions:r}},ql=()=>({setFileInfo:(l,a)=>{const t=a&&a.fileUrl?a.fileUrl:"";if(!o.isString(t))return{name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0};const i=o.isEmpty(t);let r="";i||t.startsWith("blob:")?r=l.fileName:r=t.substr(t.lastIndexOf("/")+1);let d="",u=0,s=0;return l.isImage&&(d=i?l.src:t,u=l.tw||0,s=l.th||0),{name:r,url:t,imgSrc:d,imgWidth:u,imgHeight:s}}}),Xl=()=>{const n=(a,t)=>{window.open(a)};return{downloadHref:n,downloadBlob:a=>{if(!o.isEmpty(a)){const t=a.lastIndexOf("/"),i=a.substring(t+1),r=a.replace(/\\/g,"/"),d=new XMLHttpRequest;d.open("GET",r,!0),d.responseType="blob",d.onload=()=>{if(d.status===200){const u=window.URL||window.webkitURL||window,s=new Blob([d.response]),c=document.createElementNS("http://www.w3.org/1999/xhtml","a");c.href=u.createObjectURL(s),c.download=i,c.click(),setTimeout(()=>URL.revokeObjectURL(c.href),1e3)}else n(a)},d.onerror=()=>{n(a)},d.send()}}}},Od=["name","accept"],_d=["name"],Ad={class:"fileUpload-label"},Ld={key:0,class:"fileUpload-img"},$d={class:"fileUpload-img-container"},Fd=["src","width","height"],Pd={key:0,class:"file-complete-img-msg"},Rd=["title"],Hd=["title"],Ud={key:1,class:"fileUpload-video"},zd=["src"],Jd=["title"],Kd={key:2,class:"fileUpload-file"},Wd=["title"],jd={key:0,class:"fileUpload-load"},Yd=e.defineComponent({name:"ClFileUploadDefault",__name:"Default",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},imgFit:{type:String,default:"width",validator:n=>["width","height","contain"].includes(n)},isServerCallback:Boolean,isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowCompleteMsg:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("fileUpload");const u=e.inject("$FileuploadTop",null);u||Se.warn("FileUpload","Default 主题缺少 $FileuploadTop 注入,使用空校验配置");const{setFileInfo:s}=ql(),c=()=>o.getJsonMerge(u?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{optBase:m,getTypeByFormat:p,getTypeByUrl:g,createTempImg:v,checkFile:y,setBaseOptions:k}=Yl(c(),r),{downloadBlob:F,downloadHref:B}=Xl(),I=e.useTemplateRef("refElTopParent"),A=()=>{const L=I.value;if(!L)return{maxWidth:0,maxHeight:0};const te=4,ue=L.clientWidth>0?Math.max(L.clientWidth-te,0):0;let pe=0;if(t.imgFit==="height"||t.imgFit==="contain"){const he=L.parentElement;he&&he.clientHeight>0&&(pe=getComputedStyle(he).height==="auto"?0:Math.max(he.clientHeight-te,0))}return{maxWidth:ue,maxHeight:pe}},N=e.reactive({isImage:!1,isVideo:!1,icon:"",completeMsgTxt:"",isInitFileInput:!0,runOperateType:"init"}),x=e.reactive({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),V={file:null};let w=0,M=null;const C=`fileUpload_${o.getRandom(8)}`,T=e.computed(()=>{let L=t.name;return o.isEmpty(L)&&(L=`fileUpload_${o.getRandom(8)}`),L}),U=e.computed(()=>{let L={"fileUpload-default":!0};return L=o.getJsonMerge(L,de.getClassNameJson(t.className)),L}),Z=e.computed(()=>({"fileUpload-wait":!0,"fileUpload-disabled":t.disabled})),z=e.computed(()=>({"fileUpload-complete":!0,"fileUpload-disabled":t.disabled})),H=L=>{i("onChange",L)},S=L=>{i("onError",L)},E=()=>{i("onRemove")},f=(L,te)=>{i("onPreview",L,te)},D=(L,te)=>{i("onSaveFile",L,te)},h=L=>{N.isImage=L.isImage,N.isVideo=L.isVideo,N.icon=L.icon},b=()=>{const L=p();o.isNonEmptyString(t.defaultIcon)&&(L.icon=t.defaultIcon),h(L)},_=L=>{L!=="load"&&(N.isInitFileInput=!0);let te="";switch(L){case"remove":case"clean":{te="init",b();break}case"fail":{let ue=!0;N.isImage?(!o.isEmpty(x.url)||!o.isEmpty(x.imgSrc))&&(ue=!1):o.isEmpty(x.url)||(ue=!1),te=ue?"init":"complete";break}default:te=L}N.runOperateType=te},O=L=>{const te=x;for(const[ue,pe]of Object.entries(L))o.isUndefined(te[ue])||(te[ue]=pe);V.file=L.file??V.file},P=(L,te)=>{ce(),h(L);const ue=s(L,te);O(ue),_("complete")},J=()=>{let L=null;return o.isString(x.url)&&x.url.startsWith("blob:")?L=V.file:o.isEmpty(x.url)?N.isImage&&!o.isEmpty(x.imgSrc)?L=x.imgSrc:L=V.file:L=x.url,o.isUndefined(L)&&(L=""),L},Y=L=>{if(L.length>0&&N.runOperateType!=="load"){N.isInitFileInput=!1,_("load"),w+=1;const te={...A(),imgFit:t.imgFit};y(L,te).then(ue=>{if(N.runOperateType==="load")if(ue.passFiles.length>0){const pe=ue.passFiles[0],he=ue.passFilesInfo[0];if(he.isImage)t.isServerCallback?(D(pe,he),Q()):(P(he,{}),V.file=pe,H(he.src));else if(t.isServerCallback)D(pe,he),Q();else{const Ce={};if(he.isVideo){const Ee=URL.createObjectURL(pe);Ce.fileUrl=Ee}P(he,Ce),V.file=pe,H(pe)}}else _("fail"),ue.errorMsg.length>0&&S(ue.errorMsg)}).catch(()=>{N.runOperateType==="load"&&(_("fail"),S(["文件校验失败,请重试"]))})}},ne=L=>{if(!o.isNonEmptyString(L)){(o.isString(L)||o.isUndefined(L))&&le();return}const te=++w,ue=g(L);if(N.isImage&&ue.isImage){const{maxWidth:pe,maxHeight:he}=A();v(L,pe,he,t.imgFit).then(Ce=>{if(te!==w)return;const Ee=o.getJsonMerge(Ce,ue);P(Ee,{fileUrl:L})}).catch(()=>{te===w&&(_("fail"),S(["图片加载失败,请检查图片地址"]))})}else P(ue,{fileUrl:L})},ce=()=>{o.isString(x.url)&&x.url.startsWith("blob:")&&URL.revokeObjectURL(x.url)},X=()=>{M&&(clearTimeout(M),M=null)},Q=()=>{X(),M=setTimeout(()=>{N.runOperateType==="load"&&(_("fail"),S(["服务端保存超时,请重试"]))},6e4)},le=()=>{w+=1,V.file=null,O({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),_("init")},K=()=>{if(o.isEmpty(t.value)){b();return}h(g(t.value))},W=()=>{let L=t.defaultHoverTitle;N.isImage&&m.isCheckImgWH&&o.isEmpty(L)&&(L=`${t.checkWidth}x${t.checkHeight}`),N.completeMsgTxt=L},R=()=>{K(),W(),ne(t.value)};e.onMounted(()=>{e.nextTick(()=>{R()})}),e.watch(()=>t.value,(L,te)=>{if(L!==te){const ue=J();L!==ue&&(X(),K(),ne(L))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{if(X(),k(c()),K(),W(),N.runOperateType==="load")return;const L=J();t.value===L&&ne(t.value)});const ae=L=>{L.preventDefault(),L.stopPropagation(),!t.disabled&&L.dataTransfer&&Y(L.dataTransfer.files)},G=L=>{t.disabled||Y(L.currentTarget.files)},q=()=>{X(),w+=1,ce(),V.file=null,O({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),_("remove");const L=document.getElementById(C);L&&(L.value=""),E()},ee=L=>{const te=o.isEmpty(x.url)?x.imgSrc:x.url;f(te,"image"),L.preventDefault(),L.stopPropagation()},$=L=>{o.isEmpty(x.url)||f(x.url,"video"),L.preventDefault(),L.stopPropagation()},j=L=>{o.isEmpty(x.url)?B(x.imgSrc,x.name):F(x.url),L.preventDefault(),L.stopPropagation()},se=L=>{if(o.isString(x.url)&&x.url.startsWith("blob:")){const te=document.createElement("a");te.href=x.url,te.download=x.name,te.click()}else F(x.url);L.preventDefault(),L.stopPropagation()};return l({saveServerCallback:L=>{if(X(),N.runOperateType!=="load")return;if(!L||!L.res||!o.isBoolean(L.res.success)){_("fail"),S(["文件保存失败,请重试"]);return}if(!L.res.success){_("fail"),S(["文件保存失败,请重试"]);return}if(!L.req){_("fail"),S(["文件保存失败,请重试"]);return}let te="";if(o.isString(L.res.fileUrl)?te=L.res.fileUrl:o.isArray(L.res.fileUrl)&&L.res.fileUrl.length>0&&o.isString(L.res.fileUrl[0])&&(te=L.res.fileUrl[0]),o.isEmpty(te)){V.file=null,O({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),_("init");return}P(L.req,{fileUrl:te}),H(te)},getValue:()=>J(),cleanReduction:()=>{X(),w+=1,ce(),V.file=null,O({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),_("clean")}}),e.onBeforeUnmount(()=>{X(),ce()}),(L,te)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(U.value),ref_key:"refElTopParent",ref:I},[e.createElementVNode("div",{class:"fileUpload-default-container",onDrop:ae,onDragover:te[0]||(te[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("label",{for:C},[N.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:C,name:T.value,onChange:G,accept:e.unref(m).mime.join(",")},null,40,Od)):(e.openBlock(),e.createElementBlock("input",{key:1,id:C,name:T.value,style:{display:"none !important"}},null,8,_d)),N.runOperateType==="init"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(Z.value)},[e.createVNode(ye,{name:N.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",Ad,[e.renderSlot(L.$slots,"label")])],2)):N.runOperateType==="complete"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(z.value)},[N.isImage?(e.openBlock(),e.createElementBlock("span",Ld,[e.createElementVNode("span",$d,[e.createElementVNode("img",{src:x.imgSrc,width:x.imgWidth,height:x.imgHeight},null,8,Fd)]),n.isShowCompleteMsg?(e.openBlock(),e.createElementBlock("span",Pd,e.toDisplayString(N.completeMsgTxt),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"preview-icon",title:e.unref(r).common.preview,onClick:e.withModifiers(ee,["stop"])},[e.createVNode(ye,{name:"search-plus"})],8,Rd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:4,class:"download-icon",title:e.unref(r).common.download,onClick:e.withModifiers(j,["stop"])},[e.createVNode(ye,{name:"download"})],8,Hd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])):N.isVideo?(e.openBlock(),e.createElementBlock("span",Ud,[e.createElementVNode("video",{src:x.url},null,8,zd),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers($,["stop"])},[e.createVNode(ye,{name:"play"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"download-icon",title:e.unref(r).common.download,onClick:e.withModifiers(se,["stop"])},[e.createVNode(ye,{name:"download"})],8,Jd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock("span",Kd,[e.createVNode(ye,{name:N.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(x.name),1)])),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)):(e.openBlock(),e.createElementBlock("a",{key:3,class:"file-complete-remove",href:"javascript:",title:e.unref(r).common.delete,onClick:e.withModifiers(q,["stop"])},[e.createVNode(ye,{name:"close"})],8,Wd))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))])],32),N.runOperateType==="load"?(e.openBlock(),e.createElementBlock("div",jd,[e.createVNode(rt,{theme:"circleBubble",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))}}),qd=["id","name","multiple","accept"],Xd=["id","name","disabled","accept"],Gd=["for"],Qd={key:0,class:"fileUpload-list"},Zd={key:0,class:"fileUpload-item-icon fileUpload-item-img"},em=["src"],tm=["title","onClick"],nm={key:1,class:"fileUpload-item-icon fileUpload-item-video"},om=["src"],am=["onClick"],lm={class:"fileUpload-item-name"},im={class:"fileUpload-item-operate"},sm=["title","onClick"],rm=["title","onClick"],cm=e.defineComponent({name:"ClFileUploadButton",__name:"Button",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},isMultiple:Boolean,buttonClass:String,buttonLabel:String,buttonIcon:{type:String,default:""},buttonColor:{type:String,default:"default"},checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},isServerCallback:Boolean,isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`fileupload-${o.getRandom(5)}`,{optPageLanguage:d,getPageLanguage:u}=Le();u("fileUpload");const s=e.inject("$FileuploadTop",null);s||Se.warn("FileUpload","Button 主题缺少 $FileuploadTop 注入,使用空校验配置");const c=()=>o.getJsonMerge(s?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{setFileInfo:m}=ql(),{optBase:p,getTypeByUrl:g,checkFile:v,setBaseOptions:y}=Yl(c(),d),{downloadBlob:k,downloadHref:F}=Xl(),B=e.useTemplateRef("refElButton"),I=e.useTemplateRef("refElLabel"),A=o.getRandom(8),N=e.reactive({elFileId:`btnFile${A}`,isInitFileInput:!0}),x=e.ref([]),V=e.ref([]);let w=null,M=null,C=null;const T=e.computed(()=>{let G=t.name;return o.isEmpty(G)&&(G=`fileUpload_${o.getRandom(8)}`),G}),U=e.computed(()=>{let G={"fileUpload-button":!0};return G=o.getJsonMerge(G,de.getClassNameJson(t.className)),G}),Z=(G,q)=>{i("onChange",G,q)},z=G=>{i("onError",G)},H=()=>{i("onRemove")},S=(G,q,ee)=>{i("onPreview",G,q,ee)},E=(G,q)=>{i("onSaveFile",G,q)},f=()=>{D(),w=setTimeout(()=>{w=null,N.isInitFileInput||(b("fail"),z(["服务端保存超时,请重试"]))},6e4)},D=()=>{w&&(clearTimeout(w),w=null)},h=()=>{x.value.forEach(G=>{o.isString(G.url)&&G.url.startsWith("blob:")&&URL.revokeObjectURL(G.url)})},b=G=>{switch(G){case"load":t.isShowUploadIng&&B.value?.loadStart();break;case"fail":case"complete":t.isShowUploadIng&&B.value?.loadStop();break}N.isInitFileInput=G!=="load"},_=(G,q)=>{t.isMultiple||(h(),x.value=[]);const ee=[],$=[];x.value.forEach(j=>{ee.push(j),$.push(j.rId)});for(let j=0;j<G.length;j++){let se=q.length>j?{fileUrl:q[j]}:{};o.isEmpty(se.fileUrl)&&G[j].isVideo&&G[j].file&&(se={fileUrl:URL.createObjectURL(G[j].file)});let me=m(G[j],se);me.rId=o.getRandom(9),me=o.getJsonMerge(G[j],me),ee.push(me),$.push(me.rId)}x.value=ee,b("complete"),e.nextTick(()=>{V.value=$})},O=()=>{const G=[];return x.value.forEach(q=>{let ee=null;o.isString(q.url)&&q.url.startsWith("blob:")?ee=q.file:o.isEmpty(q.url)?q.isImage&&!o.isEmpty(q.imgSrc)?ee=q.imgSrc:ee=q.file:ee=q.url,o.isUndefined(ee)||G.push(ee)}),G.length===0?"":t.isMultiple?G:G[0]},P=G=>{if(o.isArray(G)){h(),x.value=[];const $=[],j=[];G.forEach(se=>{if(o.isNonEmptyString(se)){const me=g(se);$.push(me),j.push(se)}}),_($,j);return}if(!o.isNonEmptyString(G)){o.isString(G)&&J();return}h(),x.value=[];const q=[],ee=[];G.split(",").filter($=>o.isNonEmptyString($)).forEach($=>{const j=g($);q.push(j),ee.push($)}),_(q,ee)},J=()=>{h(),b("init"),x.value=[]},Y=()=>{P(t.value)};e.onMounted(()=>{e.nextTick(()=>{Y()})}),e.onBeforeUnmount(()=>{D(),M&&(clearTimeout(M),M=null),h()}),e.watch(()=>t.value,(G,q)=>{if(G!==q){const ee=O();G!==ee&&(D(),P(G))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{N.isInitFileInput&&D(),y(c())});const ne=G=>{t.disabled||N.isInitFileInput&&G.currentTarget.files.length>0&&(b("load"),v(G.currentTarget.files,{}).then(q=>{if(!N.isInitFileInput){if(q.passFiles.length>0)if(t.isServerCallback){const ee=t.isMultiple?q.passFiles:q.passFiles[0],$=t.isMultiple?q.passFilesInfo:q.passFilesInfo[0];E(ee,$),f()}else t.isMultiple?(_(q.passFilesInfo,[]),Z(q.passFiles,q.passFilesInfo)):(_(q.passFilesInfo,[]),Z(q.passFiles[0],q.passFilesInfo[0]));else q.errorMsg.length===0&&(b("fail"),z(["文件校验失败,请重试"]));q.errorMsg.length>0&&(z(q.errorMsg),q.passFiles.length===0&&b("fail"))}}).catch(()=>{N.isInitFileInput||(b("fail"),z(["文件校验失败,请重试"]))}))},ce=(G,q)=>{const ee=o.isEmpty(G.url)?G.src:G.url;S(ee,"image",q)},X=(G,q)=>{o.isEmpty(G.url)||S(G.url,"video",q)},Q=G=>{if(C===G)return;C=G,D(),N.isInitFileInput||b("complete");const q=x.value.find(se=>se.rId===G);q&&o.isString(q.url)&&q.url.startsWith("blob:")&&URL.revokeObjectURL(q.url);const ee=[],$=[];x.value.forEach(se=>{se.rId!==G&&(ee.push(se),$.push(se.rId))}),V.value=$;const j=document.getElementById(N.elFileId);j&&(j.value=""),e.nextTick(()=>{ee.length>0?(x.value=ee,C=null,H()):M=setTimeout(()=>{M=null,x.value=x.value.filter(se=>se.rId!==G),C=null,H()},500)})},le=G=>{if(G.isImage&&o.isEmpty(G.url))F(G.imgSrc,G.name);else if(o.isString(G.url)&&G.url.startsWith("blob:")){const q=document.createElement("a");q.href=G.url,q.download=G.name,q.click()}else if(o.isEmpty(G.url)&&G.file){const q=URL.createObjectURL(G.file),ee=document.createElement("a");ee.href=q,ee.download=G.name,ee.click(),setTimeout(()=>{URL.revokeObjectURL(q)},1e3)}else k(G.url)},K=()=>{I.value?.click()};return l({saveServerCallback:G=>{if(D(),!N.isInitFileInput){if(o.isUndefined(G)||o.isUndefined(G.res)||!o.isBoolean(G.res.success)||o.isUndefined(G.req)){b("fail"),z(["文件保存失败,请重试"]);return}if(G.res.success){let q=[];const ee=[];if(o.isNonEmptyString(G.res.fileUrl)?(q.push(G.res.fileUrl),ee.push(0)):o.isArray(G.res.fileUrl)&&G.res.fileUrl.forEach((ie,oe)=>{o.isNonEmptyString(ie)&&(q.push(ie),ee.push(oe))}),q.length===0){b("complete");return}const $=t.isMultiple?G.req:[G.req];let j=[],se=[];if(!t.isMultiple)j=q,se=$;else{const ie=x.value.map(oe=>oe.url).filter(oe=>o.isNonEmptyString(oe));q.forEach((oe,L)=>{const te=ee[L];ie.indexOf(oe)>-1||o.isUndefined($[te])||(ie.push(oe),j.push(oe),se.push($[te]))})}if(j.length===0){b("complete");return}_(se,j);const me=t.isMultiple?j:j[0];Z(me)}else b("fail"),z(["文件保存失败,请重试"])}},getValue:()=>O(),cleanReduction:()=>{D(),J()}}),(G,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(U.value)},[N.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:N.elFileId,name:T.value,multiple:n.isMultiple,accept:e.unref(p).mime.join(","),onChange:ne},null,40,qd)):(e.openBlock(),e.createElementBlock("input",{key:1,id:N.elFileId,name:T.value,disabled:n.disabled,accept:e.unref(p).mime.join(","),style:{display:"none !important"},onChange:ne},null,40,Xd)),e.createElementVNode("label",{ref_key:"refElLabel",ref:I,for:N.elFileId},[e.createVNode(Ze,{ref_key:"refElButton",ref:B,className:n.buttonClass,isShowBackDrop:!0,disabled:n.disabled,label:n.buttonLabel||e.unref(d).common.upload,iconName:n.buttonIcon,color:n.buttonColor,onOnClick:K},null,8,["className","disabled","label","iconName","color"])],8,Gd)],2),e.renderSlot(G.$slots,"label"),x.value.length>0&&n.isShowUploadResult?(e.openBlock(),e.createElementBlock("ul",Qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(ee,$)=>(e.openBlock(),e.createBlock(e.Transition,{key:`${ee.rId}-${$}`,name:"fileUploadButton","enter-active-class":"fileupload-anim-in","leave-active-class":"fileupload-anim-out"},{default:e.withCtx(()=>[V.value.indexOf(ee.rId)>-1?(e.openBlock(),e.createElementBlock("li",{key:`${r}-${ee.rId}-${$}`,class:"fileUpload-item"},[ee.isImage?(e.openBlock(),e.createElementBlock("span",Zd,[e.createElementVNode("img",{src:ee.imgSrc},null,8,em),n.isShowPreview?(e.openBlock(),e.createElementBlock("i",{key:0,class:"preview-icon",title:e.unref(d).common.preview,onClick:e.withModifiers(j=>ce(ee,$),["stop"])},[e.createVNode(ye,{name:"search-plus"})],8,tm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):ee.isVideo?(e.openBlock(),e.createElementBlock("span",nm,[e.createElementVNode("video",{src:ee.url},null,8,om),n.isShowPreview?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(j=>X(ee,$),["stop"])},[e.createVNode(ye,{name:"play"})],8,am)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createBlock(ye,{key:2,name:ee.icon,class:"fileUpload-item-icon"},null,8,["name"])),e.createElementVNode("span",lm,e.toDisplayString(ee.name),1),e.createElementVNode("span",im,[n.isShowDownload?(e.openBlock(),e.createElementBlock("i",{key:0,class:"download-icon",title:e.unref(d).common.download,onClick:e.withModifiers(j=>le(ee),["stop"])},[e.createVNode(ye,{name:"download"})],8,sm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)):(e.openBlock(),e.createElementBlock("a",{key:2,class:"file-complete-remove",href:"javascript:",title:e.unref(d).common.delete,onClick:e.withModifiers(j=>Q(ee.rId),["stop"])},[e.createVNode(ye,{name:"close"})],8,rm))])])):e.createCommentVNode("",!0)]),_:2},1024))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),um=["id"],dm={key:0,class:"cl-plaintext-value"},mm=["src","alt"],pm=["src"],fm={key:0},oa=e.defineComponent({name:"ClFileUpload",__name:"Index",props:{id:String,name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:n=>["default","button"].includes(n)},isMultiple:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,isShowCompleteMsg:{type:Boolean,default:!0},buttonClass:String,buttonLabel:String,buttonIcon:String,buttonColor:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal"},imgFit:{type:String,default:"width"},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},serverFileCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onRemove","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$ClGlobals",null),d=e.useAttrs(),u=t.id,s=e.useTemplateRef("refElFileDefault"),c=e.useTemplateRef("refElFileButton");let m=0,p=0;const g=e.computed(()=>o.isFunction(t.serverFileCallback)),v=["jpg","jpeg","png","gif","webp","bmp","svg"],y=["mp4","webm","ogg","ogv","mov","avi","mkv"],k=S=>{const E=S.split("?")[0].split("#")[0],f=E.split("/"),D=f.length>0?f[f.length-1]:E;return o.isEmpty(D)?S:decodeURIComponent(D)},F=e.computed(()=>{const S=t.value,E=Array.isArray(S)?S:o.isEmpty(S)?[]:[S],f=[];return E.forEach(D=>{if(o.isString(D)){o.isNonEmptyString(D)&&f.push({url:D,name:k(D),type:"file"});return}D&&o.isNonEmptyString(D.name)&&f.push({url:"",name:D.name,type:"file"})}),f.map(D=>{if(o.isEmpty(D.url))return D;const h=D.name.lastIndexOf("."),b=h>-1?D.name.slice(h+1).toLowerCase():"";let _="file";return v.indexOf(b)>-1?_="image":y.indexOf(b)>-1&&(_="video"),{...D,type:_}})}),B=e.computed(()=>F.value.filter(S=>S.type!=="file")),I=e.computed(()=>{const S=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return F.value.filter(E=>E.type==="file").map(E=>E.name).join(S)}),A=e.computed(()=>{let S={"panel-file-upload":!0};return S=o.getJsonMerge(S,de.getClassNameJson(t.className)),S}),N=(S,E,f)=>{i("update:value",S),i("update:modelValue",S),i("onChange",E,f)},x=()=>{i("onRemove")},V=()=>{let S=null;switch(t.theme){case"default":S=s.value?.getValue();break;case"button":S=c.value?.getValue();break}return S},w=(S,E)=>{switch(S){case"default":s.value?.saveServerCallback(E);break;case"button":c.value?.saveServerCallback(E);break}},M=(S,E)=>{const f=V(),D=g.value?f:S;N(f,D,E)},C=S=>{o.isArray(S)&&i("onError",S)},T=()=>{p+=1,x();const S=V();N(S,S)},U=async(S,E,f)=>{const D=r?.preview;D&&await D.show({type:E,src:S,showIndex:f??0})},Z=async(S,E)=>{const f=t.theme,D=++m,h=p;let b=!0;if(t.serverFileCallback)try{const O=!t.isMultiple&&o.isObject(E)&&o.isBoolean(E.isImage)?E.isImage:!1,P=de.getElementData(d);b=await t.serverFileCallback(S,O,P)}catch{D===m&&p===h&&t.theme===f&&w(f,{req:E,res:{success:!1}});return}let _={};if(o.isBoolean(b)?_.success=b:o.isUndefined(b)?_.success=!0:o.isString(b)||o.isArray(b)?(_.success=!0,_.fileUrl=b):o.isObject(b)?_=b:_.success=!1,t.theme!==f){i("onError",["保存期间主题已切换,本次保存结果未写入"]);return}D!==m||p!==h||w(f,{req:E,res:_})};return e.provide("$FileuploadTop",e.reactive({getFileCheckInfo:()=>({checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize})})),l({getValue:()=>V(),cleanReduction:()=>{switch(t.theme){case"default":s.value?.cleanReduction();break;case"button":c.value?.cleanReduction();break}N("","")}}),(S,E)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(A.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",dm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(f,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`plain-${D}`},[f.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,src:f.url,alt:f.name,class:"cl-plaintext-media"},null,8,mm)):(e.openBlock(),e.createElementBlock("video",{key:1,src:f.url,controls:"",class:"cl-plaintext-media"},null,8,pm))],64))),128)),I.value?(e.openBlock(),e.createElementBlock("span",fm,e.toDisplayString(I.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),!n.isPlaintext&&n.theme==="button"?(e.openBlock(),e.createBlock(cm,{key:2,ref_key:"refElFileButton",ref:c,value:n.value,name:n.name,disabled:n.disabled,isMultiple:n.isMultiple,buttonClass:n.buttonClass,buttonLabel:n.buttonLabel,buttonIcon:n.buttonIcon,buttonColor:n.buttonColor,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,isServerCallback:g.value,isShowUploadResult:n.isShowUploadResult,isShowUploadIng:n.isShowUploadIng,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:M,onOnError:C,onOnRemove:T,onOnPreview:U,onOnSaveFile:Z},{label:e.withCtx(()=>[e.renderSlot(S.$slots,"label")]),_:3},8,["value","name","disabled","isMultiple","buttonClass","buttonLabel","buttonIcon","buttonColor","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","isServerCallback","isShowUploadResult","isShowUploadIng","isShowPreview","isShowDownload"])):!n.isPlaintext&&n.theme==="default"?(e.openBlock(),e.createBlock(Yd,{key:3,ref_key:"refElFileDefault",ref:s,value:n.value,name:n.name,disabled:n.disabled,defaultHoverTitle:n.defaultHoverTitle,defaultIcon:n.defaultIcon,isShowCompleteMsg:n.isShowCompleteMsg,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,imgFit:n.imgFit,isServerCallback:g.value,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:M,onOnError:C,onOnRemove:T,onOnPreview:U,onOnSaveFile:Z},{label:e.withCtx(()=>[e.renderSlot(S.$slots,"label")]),_:3},8,["value","name","disabled","defaultHoverTitle","defaultIcon","isShowCompleteMsg","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","imgFit","isServerCallback","isShowPreview","isShowDownload"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,um))}}),hm=["id"],gm={class:"previewExample-image-icon"},vm={class:"previewExample-video-img previewExample-image"},ym=["onClick"],km={key:3,class:"previewExample-label-msg"},Sm={key:5,class:"previewExample-totalCount"},aa=e.defineComponent({name:"ClPreviewExample",__name:"Index",props:{id:String,className:String,classContainer:String,classItem:String,type:{type:String,default:"image",validator:n=>["image","video"].includes(n)},width:{type:[Number,String],default:"auto"},height:{type:Number,required:!0},isWidthFull:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},label:String,previewIconSize:{type:String,default:"large"},isShowLoading:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isShowDelete:{type:Boolean,default:!1},showNum:{type:Number,default:-1},srcValueKey:{type:String,default:"value"},isShowCopy:{type:Boolean,default:!0},isClickImagePreview:{type:Boolean,default:!1},previewCallback:Function},emits:["onDelete"],setup(n,{emit:l}){const a=n,t=l,i=e.inject("$ClGlobals",null),r=`previewexample-${o.getRandom(5)}`,d=a.id,u=e.reactive({totalCount:-1}),s=e.ref([]),c=e.computed(()=>{const{width:x}=a;let V=!1;return(o.isEmpty(x)||typeof x=="string"&&x==="auto"||typeof x=="number"&&x<=0)&&(V=!0),V}),m=e.computed(()=>{let x={"panel-preview-example":!0,"previewExample-width-default":a.isWidthFull,"previewExample-width-auto":!a.isWidthFull};return x=o.getJsonMerge(x,de.getClassNameJson(a.className)),x}),p=e.computed(()=>{let x={"previewExample-container":!0};return x=o.getJsonMerge(x,de.getClassNameJson(a.classContainer)),x}),g=e.computed(()=>{const{type:x,previewIconSize:V}=a;let w={"previewExample-item":!0};return w[`previewExample-${x}`]=!0,w[`previewExample-iconSize-${V}`]=!0,w=o.getJsonMerge(w,de.getClassNameJson(a.classItem)),w}),v=e.computed(()=>{const x={height:`${a.height}px`};if(!c.value){let V=a.width.toString();V.indexOf("%")===-1&&(V=`${a.width}px`),x.width=V}return x}),y=x=>{t("onDelete",x)},k=()=>{const{list:x,showNum:V,srcValueKey:w}=a;let M=o.getListClone(x),C=x.length;V>0&&x.length>=V&&(C=V);const T=[];M.forEach((U,Z)=>{if(!o.isEmpty(U)&&Z+1<=C)if(o.isString(U))T.push({value:U});else{const z=o.isExistJsonKey(U,w)?U[w]:U.value;T.push({...U,value:z})}}),M=T,u.totalCount=x.length,s.value=M},F=()=>{k()},B=x=>{const V={};return o.isEmpty(x.id)||(V["data-id"]=x.id),o.isEmpty(x.ranId)||(V["data-ran-id"]=x.ranId),V};e.onMounted(()=>{e.nextTick(()=>{F()})}),e.watch(()=>a.list,()=>{k()},{deep:!0});const I=(x,V)=>{a.isClickImagePreview&&A(x,V,"image")},A=(x,V,w)=>{try{if(a.previewCallback)a.previewCallback(w,x,V);else{if(!i||o.isEmpty(i.preview))return;const{list:M}=a;let C;M.length===1?C=x.value:C=M.map(T=>o.isString(T)?T:T.value),i.preview.show({type:w,src:C,showIndex:V,isShowCopy:a.isShowCopy})}}catch{}},N=x=>{y(x)};return(x,V)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(m.value)},[e.createElementVNode("div",{class:e.normalizeClass(p.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(w,M)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:`${r}-${M}`,class:g.value,style:v.value},{ref_for:!0},B(w)),[n.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Wn,{src:w.value,class:e.normalizeClass({"cursor-pointer":n.isClickImagePreview}),onClick:e.withModifiers(C=>I(w,M),["stop"])},null,8,["src","class","onClick"]),e.createElementVNode("div",gm,[e.createVNode(ye,{title:"预览",name:"search","aria-label":"预览",onClick:e.withModifiers(C=>A(w,M,"image"),["stop"])},null,8,["onClick"]),n.isShowDelete?(e.openBlock(),e.createBlock(ye,{key:0,title:"删除",name:"close","aria-label":"删除",onClick:e.withModifiers(C=>N(M),["stop"])},null,8,["onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],64)):n.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",vm,[w.imgUrl&&w.imgUrl.length>0?(e.openBlock(),e.createBlock(Wn,{key:0,src:w.imgUrl},null,8,["src"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"previewExample-video-icon",onClick:e.withModifiers(C=>A(w,M,"video"),["stop"])},[e.createVNode(ye,{name:"play","aria-label":"播放"})],8,ym)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.label&&n.label.length>0||w.label&&w.label.length>0?(e.openBlock(),e.createElementBlock("div",km,e.toDisplayString(n.label&&n.label.length>0?n.label:w.label),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)),n.showNum>-1&&M===s.value.length-1&&u.totalCount>n.showNum?(e.openBlock(),e.createElementBlock("div",Sm,[e.createElementVNode("span",null,"共"+e.toDisplayString(u.totalCount)+e.toDisplayString(n.type==="image"?"张":"个"),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[],64)),e.renderSlot(x.$slots,"extend",{data:w,inx:M})],16))),128)),n.isShowLoading&&n.isLoading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`previewExample-${n.type}`]),style:e.normalizeStyle(v.value)},[e.createVNode(rt,{theme:"circleNotch",size:"large"})],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)],10,hm))}}),wm=["id"],Cm={class:"cropperPreview-box-flex"},Gl=e.defineComponent({name:"ClCropperPreview",__name:"Index",props:{id:String,className:String,previewImageUrl:String,coverImageUrl:String,width:{type:Number,default:200},height:{type:Number,default:200},widthPreview:Number,heightPreview:Number,previewShape:{type:String,default:"square"},isCenterBox:{type:Boolean,default:!1},isShowUploadBtn:{type:Boolean,default:!0},getCropperImageUrl:Function,saveImageBase64:Function},emits:{onInitCoverImage:()=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElCropper"),u=e.reactive({isEmptyPreviewUrl:!1,isEmptyCoverUrl:!1,isAgainCropper:!1,coverImageUrlOriginal:""});let s=!1;const c=e.computed(()=>{const{width:w,widthPreview:M}=t;return o.isFinite(M)?M:w}),m=e.computed(()=>{const{height:w,heightPreview:M}=t;return o.isFinite(M)?M:w}),p=e.computed(()=>({"panel-cropper-preview":!0,...de.getClassNameJson(t.className)})),g=()=>{const{previewImageUrl:w}=t,M=o.isEmpty(w);u.isEmptyPreviewUrl=M,u.isAgainCropper=M},v=()=>{const{coverImageUrl:w}=t,M=o.isEmpty(w);u.isEmptyCoverUrl=M,u.coverImageUrlOriginal=M?"":w},y=()=>{const{width:w,height:M}=t;(w<=0||M<=0)&&Se.warn("ClCropperPreview","裁切区域宽高必须大于 0,当前值 width="+w+" height="+M)},k=()=>{g(),v(),y()};e.onMounted(()=>{e.nextTick(()=>{k()})}),e.watch(()=>t.previewImageUrl,()=>{g()}),e.watch(()=>t.coverImageUrl,()=>{v()});const F=w=>{w===!0&&i("onInitCoverImage")},B=(w,M)=>{if(!s){if(!(w instanceof File)){i("onError","文件读取失败,请重新选择图片");return}s=!0,d.value?.loadingStart(),o.getBase64ByFile([w]).then(C=>{const T=o.isNonEmptyString(C);u.isAgainCropper=!0,T?(u.coverImageUrlOriginal=C,u.isEmptyCoverUrl=!1):(u.isEmptyCoverUrl=o.isEmpty(u.coverImageUrlOriginal),i("onError","文件读取失败,请重新选择图片")),d.value?.loadingStop(),s=!1}).catch(C=>{d.value?.loadingStop(),s=!1,i("onError","文件读取失败,请重新选择图片")})}},I=()=>{u.isAgainCropper=!1},A=()=>{u.isAgainCropper=!0};return l({getValue:async()=>{let w="";try{w=d.value?String(await d.value.getImageBase64()||""):""}catch(M){Se.error("ClCropperPreview","getValue 获取裁切图片失败:",M)}return w},getCropperUrl:async w=>{let M="";try{if(d.value&&o.isFunction(t.getCropperImageUrl))M=await t.getCropperImageUrl(d.value,w);else{const{previewImageUrl:C,coverImageUrl:T}=t;M=o.isNonEmptyString(C)?C:T||""}}catch(C){Se.error("ClCropperPreview","getCropperUrl 调用失败:",C)}return M},getCoverUrlOriginal:async w=>{let M="";try{const{coverImageUrlOriginal:C}=u;if(C.startsWith("data:")&&o.isFunction(t.saveImageBase64)){const T=await t.saveImageBase64(C,w);M=T&&T.success?T.imageUrl:""}else/^(http|https):\/\/[^\s]+$/.test(C)&&(M=C)}catch(C){Se.error("ClCropperPreview","getCoverUrlOriginal 调用失败:",C)}return M}}),(w,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(r)},[e.createElementVNode("div",Cm,[u.isEmptyPreviewUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.isAgainCropper?(e.openBlock(),e.createBlock(Ze,{key:0,iconName:"reply",label:"返回",color:"transparent",onOnClick:I})):(e.openBlock(),e.createBlock(Ze,{key:1,iconName:"cropper",label:"重新裁切",color:"transparent",onOnClick:A}))],64)),n.isShowUploadBtn&&(u.isAgainCropper||u.isEmptyCoverUrl&&u.isEmptyPreviewUrl)?(e.openBlock(),e.createBlock(oa,{key:2,theme:"button",checkFormat:"jpg,png",buttonIcon:"upload-cloud",buttonColor:"white",buttonLabel:"选择图片",isShowUploadResult:!1,isShowUploadIng:!1,onOnChange:B})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),!u.isEmptyPreviewUrl&&!u.isAgainCropper?(e.openBlock(),e.createBlock(aa,{key:0,type:"image",list:[{value:n.previewImageUrl||"",imgUrl:"",label:""}],width:c.value,height:m.value},null,8,["list","width","height"])):u.isAgainCropper&&(!u.isEmptyPreviewUrl||!u.isEmptyCoverUrl)?(e.openBlock(),e.createBlock(na,{key:1,ref_key:"refElCropper",ref:d,previewShape:n.previewShape,isCenterBox:n.isCenterBox,src:u.coverImageUrlOriginal,width:n.width,height:n.height,isModal:!1,isShowUpload:!1,onOnImgLoad:F},null,8,["previewShape","isCenterBox","src","width","height"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,wm))}}),Em={key:0,class:"dropdownLayer-text-arrow"},bm=["title"],xm={key:0,class:"dropdownLayer-placeholder"},Bm=["innerHTML"],Im={key:2},Dm={key:4,class:"dropdownLayer-text-arrow"},kn=e.defineComponent({name:"ClDropdownlayerList",__name:"List",props:{id:String,classParent:[String,Object],classText:String,classDropDown:String,placeholder:String,isDisabled:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isClear:{type:Boolean,default:!1},textLabel:{type:String,default:""},textArrowDirection:{type:String,default:"right",validator:n=>["left","right"].includes(n)},dropdownArrowPos:{type:String,default:"left"},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onClear:()=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>o.isHtml(t.textLabel)),s=e.computed(()=>{const{textLabel:N}=t;return o.isString(N)?o.isHtml(N)?o.removeHTMLTags(N):N:""}),c=e.computed(()=>{let N={"dropdownLayer-theme-list":!0,"panel-dropdownlayerlist":!0};return N=o.getJsonMerge(N,de.getClassNameJson(t.classParent)),N}),m=e.computed(()=>{let N={"dropdownLayer-dropdown-theme-list":!0};return N=o.getJsonMerge(N,de.getClassNameJson(t.classDropDown)),N}),p=e.computed(()=>({"dropdownLayer-text-container":!0,"arrow-pos-left":t.textArrowDirection==="left"})),g=N=>{N&&I(),i("onChangeOpen",N)},v=N=>{i("onChangePosition",N)},y=()=>{i("onClear")},k=()=>{i("onOpenComplete")},F=N=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(N)},B=()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return d.value.calculationPosition()},I=()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}d.value.initCompleteOpen()};return l({setOpen:F,calculationPosition:B,initCompleteOpen:I,checkIsShowOpen:()=>{if(!d.value){Se.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return d.value.getIsShowOpen()}}),(N,x)=>(e.openBlock(),e.createBlock(Kl,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:c.value,classText:n.classText,classDropDown:m.value,isDisabled:n.isDisabled,dropdownArrowPos:n.dropdownArrowPos,isUseDropdownArrow:n.isUseDropdownArrow,isCloseDestroy:n.isCloseDestroy,isInitDelayComplete:!0,appendContainer:n.appendContainer,appendFollowWidth:n.appendFollowWidth,onOpenBeforeCallback:n.onOpenBeforeCallback,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,onOnChangeOpen:g,onOnChangePosition:v,onOnOpenComplete:k},{labelText:e.withCtx(()=>[N.$slots.labelCustom?e.renderSlot(N.$slots,"labelCustom",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[n.textArrowDirection==="left"?(e.openBlock(),e.createElementBlock("div",Em,[e.createVNode(ye,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-text-render",title:s.value},[n.textLabel?u.value?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:n.textLabel},null,8,Bm)):(e.openBlock(),e.createElementBlock("span",Im,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("span",xm,e.toDisplayString(n.placeholder),1))],8,bm),!n.isDisabled&&n.isClear&&n.textLabel?(e.openBlock(),e.createBlock(ye,{key:2,class:"dropdownLayer-text-clear",name:"close-circle-fill",onClick:e.withModifiers(y,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.renderSlot(N.$slots,"textExtend"),n.textArrowDirection==="right"?(e.openBlock(),e.createElementBlock("div",Dm,[e.createVNode(ye,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2))]),dropdown:e.withCtx(()=>[e.renderSlot(N.$slots,"dropdown"),e.renderSlot(N.$slots,"dropdownExtend")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","isUseDropdownArrow","isCloseDestroy","appendContainer","appendFollowWidth","onOpenBeforeCallback","transitionEnter","transitionLeave"]))}}),Tm=["id"],Nm={class:"table-base"},Vm={class:"time-head time-head-day",colspan:"7"},Mm={class:"time-prev"},Om=["title"],_m=["title"],Am={class:"time-next"},Lm=["title"],$m=["title"],Fm=["aria-disabled","onClick","onKeydown","onMouseover"],Pm=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:n=>!0,onChangeType:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("dataTime");const d=e.inject("$DateTimeTop"),u=e.inject("$DateTimeTopBase"),s=e.inject("$DateTimeBase");(!d||!u||!s)&&Se.warn("ClCalendarsDays","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=`calendarsDays-${o.getRandom(5)}`,m=d?.elId?`${d.elId}-calendarsDays-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let E={"panel-calendarsdays":!0};return E=o.getJsonMerge(E,de.getClassNameJson(a.className)),E}),g=e.reactive({isPrevYear:!1,isPrevMonth:!1,titleYear:"",titleMonth:"",isNextYear:!1,isNextMonth:!1}),v=e.ref([]),y=e.ref([]),k={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},F=()=>{if(!k.viewDate)return;const E=k.viewDate.year(),D=k.viewDate.localeData().monthsShort(k.viewDate),h=k.viewDate.clone().subtract(1,"years").endOf("month"),b=s.checkDataMinMax(h,"day"),_=k.viewDate.clone().subtract(1,"months").endOf("month"),O=s.checkDataMinMax(_,"day"),P=k.viewDate.clone().add(1,"months").startOf("month"),J=s.checkDataMinMax(P,"day"),Y=k.viewDate.clone().add(1,"years").startOf("month"),ne=s.checkDataMinMax(Y,"day");g.isPrevYear=!b,g.isPrevMonth=!O,g.titleYear=`${E}${i.value.year}`,g.titleMonth=D,g.isNextMonth=!J,g.isNextYear=!ne},B=()=>{if(!k.viewDate)return;const E=k.viewDate.localeData(),f=E.weekdaysMin(),D=E.firstDayOfWeek(),h=[];f.forEach((b,_)=>{h[(7+_-D)%7]=b}),v.value=h},I=()=>{if(!k.viewDate)return;const E=k.viewDate.clone(),f=k.selectDate,D=E.year(),h=E.month();let b=E.clone().subtract(1,"months");const _=[];let O=[];b=b.date(b.daysInMonth()).startOf("week");for(let P=0;P<42;P+=1){P>0&&(b=b.add(1,"days"));const J=b.clone(),Y=J.date(),ne=b.year()===D&&b.month()<h||b.year()<D,ce=b.year()===D&&b.month()>h||b.year()>D;let X=f&&b.isSame(f,"day");const Q=s.checkDataMinMax(J,"day");let le=!1,K=!1,W=!1;u.isRange&&(k.hoverDate?k.startDate&&k.endDate&&k.startDate.isSame(k.hoverDate,"day")&&k.hoverDate.isBefore(k.endDate,"day")?(le=b.isSame(k.startDate,"day"),K=b.isSame(k.endDate,"day"),W=le||K||b.isAfter(k.startDate,"day")&&b.isBefore(k.endDate,"day")):k.startDate?(le=b.isSame(k.startDate,"day"),W=le||b.isSame(k.hoverDate,"day"),W=W||b.isAfter(k.startDate,"day")&&b.isBefore(k.hoverDate,"day"),K=k.hoverDate.isSame(k.startDate,"day")&&le):k.endDate&&(K=b.isSame(k.endDate,"day"),W=K||b.isSame(k.hoverDate,"day"),W=W||b.isAfter(k.hoverDate,"day")&&b.isBefore(k.endDate,"day"),le=k.hoverDate.isSame(k.endDate,"day")&&K):(le=!!(k.startDate&&b.isSame(k.startDate,"day")),k.endDate&&(K=b.isSame(k.endDate,"day"),W=le||K||!!(k.startDate&&b.isAfter(k.startDate,"day")&&b.isBefore(k.endDate,"day")))),X=le||K);const R=de.getAddClass("day",{old:ne,new:ce,active:X&&!ne&&!ce&&!Q,disabled:Q,"date-start":le&&!ne&&!ce,"date-end":K&&!ne&&!ce,"range-in":W&&!ne&&!ce});O.push({cls:R,day:Y,value:Y,isDisabled:Q,isOld:ne,isNew:ce}),O.length===7&&(_.push({days:O}),O=[])}y.value=_},A=(E,f,D)=>{if(!k.viewDate)return;const h=k.viewDate.clone()[E](f,D);t("onChangeDate",h)};let N=!1;const x=()=>{N||(N=!0,e.nextTick(()=>{t("onInitComplete","days")}))},V=()=>{k.selectDate=d.getMomentDate(a.selectValue),k.startDate=d.getMomentDate(a.startValue),k.endDate=d.getMomentDate(a.endValue),k.hoverDate=d.getMomentDate(a.hoverValue)},w=(E,f,D)=>{if(f!==D){const h=d.getMomentDate(f);h&&h.isValid()&&(k[E]=h,V(),B(),F(),I(),x())}},M=()=>{if(o.isNonEmptyString(a.viewValue)){const E=d.getMomentDate(a.viewValue);E&&E.isValid()&&(k.viewDate=E,V(),B(),F(),I(),x())}};e.onMounted(()=>{e.nextTick(()=>{M()})}),e.watch(()=>a.viewValue,(E,f)=>{w("viewDate",E,f)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue],()=>{k.viewDate&&(k.selectDate=d.getMomentDate(a.selectValue),k.startDate=d.getMomentDate(a.startValue),k.endDate=d.getMomentDate(a.endValue),k.hoverDate=d.getMomentDate(a.hoverValue),I())}),e.watch(()=>a.hoverValue,()=>{k.viewDate&&(k.hoverDate=d.getMomentDate(a.hoverValue),u.isRange&&I())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{k.viewDate&&(F(),I())});const C=E=>{E.preventDefault(),E.stopPropagation(),A("subtract",1,"years")},T=E=>{E.preventDefault(),E.stopPropagation(),A("subtract",1,"months")},U=E=>{E.preventDefault(),E.stopPropagation(),A("add",1,"months")},Z=E=>{E.preventDefault(),E.stopPropagation(),A("add",1,"years")},z=(E,f)=>{E.preventDefault(),E.stopPropagation(),t("onChangeType",f)},H=(E,f)=>{E.preventDefault(),E.stopPropagation(),f.isDisabled||t("onSelectDate","days",f)},S=(E,f)=>{E.preventDefault(),E.stopPropagation(),f.isDisabled||t("onHoverDate","days",f)};return(E,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Nm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Vm,[e.createElementVNode("span",Mm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(i).prevYear,onClick:C},[e.createVNode(ye,{name:"angle-double-left"})],8,Om)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),g.isPrevMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"prev-month",title:e.unref(i).prevMonth,onClick:T},[e.createVNode(ye,{name:"angle-left"})],8,_m)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:f[0]||(f[0]=D=>z(D,"years"))},e.toDisplayString(g.titleYear),1),e.createElementVNode("span",{class:"datetime-switch-month",onClick:f[1]||(f[1]=D=>z(D,"months"))},e.toDisplayString(g.titleMonth),1),e.createElementVNode("span",Am,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(i).nextYear,onClick:Z},[e.createVNode(ye,{name:"angle-double-right"})],8,Lm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),g.isNextMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"next-month",title:e.unref(i).nextMonth,onClick:U},[e.createVNode(ye,{name:"angle-right"})],8,$m)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])])]),e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(D,h)=>(e.openBlock(),e.createElementBlock("th",{key:`${c}-week-${h}`},e.toDisplayString(D),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(D,h)=>(e.openBlock(),e.createElementBlock("tr",{key:`${c}-days-${h}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.days,(b,_)=>(e.openBlock(),e.createElementBlock("td",{key:`${c}-day-${_}`,role:"gridcell",tabindex:"0","aria-disabled":b.isDisabled,class:e.normalizeClass(b.cls),onClick:O=>H(O,b),onKeydown:[e.withKeys(e.withModifiers(O=>H(O,b),["prevent"]),["enter"]),e.withKeys(e.withModifiers(O=>H(O,b),["prevent"]),["space"])],onMouseover:O=>S(O,b)},e.toDisplayString(b.day),43,Fm))),128))]))),128))])])],10,Tm))}}),Rm=["id"],Hm={class:"table-base"},Um={class:"time-head time-head-month"},zm={class:"time-prev"},Jm=["title"],Km={class:"time-next"},Wm=["title"],jm={class:"time-body-month"},Ym=["aria-disabled","onClick","onKeydown","onMouseover"],qm=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:n=>!0,onChangeType:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendarsMonths-${o.getRandom(5)}`,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase"),c=e.inject("$DateTimeBase");(!u||!s||!c)&&Se.warn("ClCalendarsMonths","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=u?.elId?`${u.elId}-calendarsMonths-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let Z={"panel-calendarsmonths":!0};return Z=o.getJsonMerge(Z,de.getClassNameJson(a.className)),Z}),g=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),v=e.ref([]),y={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},k=()=>{if(!y.viewDate)return;const Z=y.viewDate.year(),z=y.viewDate.clone().subtract(1,"years").endOf("year"),H=c.checkDataMinMax(z,"month"),S=y.viewDate.clone().add(1,"years").startOf("year"),E=c.checkDataMinMax(S,"month");g.isPrevYear=!H,g.titleYear=`${Z}${r.value.year}`,g.isNextYear=!E},F=()=>{if(!y.viewDate)return;const Z=y.viewDate.clone(),z=c.getFocusDate(),H=y.selectDate,S=Z.year(),E=[];Z.localeData().monthsShort().forEach((f,D)=>{const h=c.getViewMin(S,D);let b=!!(H&&h.isSame(H,"month")),_=!!(z&&h.isSame(z,"month"));const O=c.checkDataMinMax(h,"month");let P=!1,J=!1,Y=!1;s.isRange&&(_=!1,y.hoverDate?y.startDate&&y.endDate&&y.startDate.isSame(y.hoverDate,"month")&&y.hoverDate.isBefore(y.endDate,"month")?(P=h.isSame(y.startDate,"month"),J=h.isSame(y.endDate,"month"),Y=P||J||h.isAfter(y.startDate,"month")&&h.isBefore(y.endDate,"month")):y.startDate?(P=h.isSame(y.startDate,"month"),Y=P||h.isSame(y.hoverDate,"month"),Y=Y||h.isAfter(y.startDate,"month")&&h.isBefore(y.hoverDate,"month"),J=!!(y.hoverDate&&y.hoverDate.isSame(y.startDate,"month"))&&P):y.endDate&&(J=h.isSame(y.endDate,"month"),Y=J||h.isSame(y.hoverDate,"month"),Y=Y||h.isAfter(y.hoverDate,"month")&&h.isBefore(y.endDate,"month"),P=!!(y.hoverDate&&y.hoverDate.isSame(y.endDate,"month"))&&J):(P=!!(y.startDate&&h.isSame(y.startDate,"month")),y.endDate&&y.startDate&&(J=h.isSame(y.endDate,"month"),Y=h.isAfter(y.startDate,"month")&&h.isBefore(y.endDate,"month"))),b=P||J),s.layerType==="months"&&(_=!1);const ne=de.getAddClass("month",{active:b&&!O,focused:_,disabled:O,"date-start":P,"date-end":J,"range-in":Y});E.push({cls:ne,month:f,isDisabled:O,value:D})}),v.value=E},B=(Z,z,H)=>{if(!y.viewDate)return;const S=y.viewDate.clone()[Z](z,H);t("onChangeDate",S)};let I=!1;const A=()=>{I||(I=!0,e.nextTick(()=>{t("onInitComplete","months")}))},N=()=>{y.selectDate=u.getMomentDate(a.selectValue),y.startDate=u.getMomentDate(a.startValue),y.endDate=u.getMomentDate(a.endValue),y.hoverDate=u.getMomentDate(a.hoverValue)},x=(Z,z,H)=>{if(z!==H){const S=u.getMomentDate(z);S&&S.isValid()&&(y[Z]=S,N(),k(),F(),A())}},V=()=>{const Z=u.getMomentDate(a.viewValue);Z&&Z.isValid()&&(y.viewDate=Z,N(),k(),F(),A())};e.onMounted(()=>{e.nextTick(()=>{V()})}),e.watch(()=>a.viewValue,(Z,z)=>{x("viewDate",Z,z)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue,()=>a.hoverValue],()=>{y.viewDate&&(y.selectDate=u.getMomentDate(a.selectValue),y.startDate=u.getMomentDate(a.startValue),y.endDate=u.getMomentDate(a.endValue),y.hoverDate=u.getMomentDate(a.hoverValue),F())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{y.viewDate&&(k(),F())});const w=Z=>{Z.preventDefault(),Z.stopPropagation(),B("subtract",1,"years")},M=Z=>{Z.preventDefault(),Z.stopPropagation(),B("add",1,"years")},C=(Z,z)=>{Z.preventDefault(),Z.stopPropagation(),t("onChangeType",z)},T=(Z,z)=>{Z.preventDefault(),Z.stopPropagation(),z.isDisabled||t("onSelectDate","months",z)},U=(Z,z)=>{Z.preventDefault(),Z.stopPropagation(),z.isDisabled||t("onHoverDate","months",z)};return(Z,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Hm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Um,[e.createElementVNode("span",zm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(r).prevYear,onClick:w},[e.createVNode(ye,{name:"angle-left"})],8,Jm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:z[0]||(z[0]=H=>C(H,"years"))},e.toDisplayString(g.titleYear),1),e.createElementVNode("span",Km,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(r).nextYear,onClick:M},[e.createVNode(ye,{name:"angle-right"})],8,Wm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",jm,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:E=>T(E,H),onKeydown:[e.withKeys(e.withModifiers(E=>T(E,H),["prevent"]),["enter"]),e.withKeys(e.withModifiers(E=>T(E,H),["prevent"]),["space"])],onMouseover:E=>U(E,H)},e.toDisplayString(H.month),43,Ym))),128))])])])])])],10,Rm))}}),Xm=["id"],Gm={class:"table-base"},Qm={class:"time-head time-head-year"},Zm={class:"time-prev"},ep=["title"],tp={class:"time-next"},np=["title"],op={class:"time-body-year"},ap=["aria-disabled","onClick","onKeydown","onMouseover"],lp=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:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("dataTime");const d=e.inject("$DateTimeTop"),u=e.inject("$DateTimeTopBase"),s=e.inject("$DateTimeBase");(!d||!u||!s)&&Se.warn("ClCalendarsYears","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=`calendarsYears-${o.getRandom(5)}`,m=d?.elId?`${d.elId}-calendarsYears-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let Z={"panel-calendarsyears":!0};return Z=o.getJsonMerge(Z,de.getClassNameJson(a.className)),Z}),g=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),v=e.ref([]),y={startYear:0,viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},k=()=>{if(!y.viewDate)return;const Z=`${y.startYear}-${y.startYear+9}`,z=d.getMomentDate({year:y.startYear-1,month:11}),H=d.getMomentDate({year:y.startYear+10,month:0}),S=z?s.checkDataMinMax(z.endOf("month"),"year"):!1,E=H?s.checkDataMinMax(H.startOf("month"),"year"):!1;g.isPrevYear=!S,g.titleYear=Z,g.isNextYear=!E},F=()=>{const Z=s.getFocusDate(),z=y.selectDate,H=[];for(let S=-1;S<11;S+=1){const E=y.startYear+S,f=s.getViewMin(E),D=S===-1,h=S>9;let b=z?f.isSame(z,"year"):!1,_=!!(Z&&f.isSame(Z,"year"));const O=s.checkDataMinMax(f,"year");let P=!1,J=!1,Y=!1;if(u.isRange){if(_=!1,y.hoverDate){const ce=parseInt(y.hoverDate.format("YYYY"),10);y.startDate&&y.endDate&&y.startDate.isSame(y.hoverDate,"year")&&y.hoverDate.isBefore(y.endDate,"year")?(P=E===parseInt(y.startDate.format("YYYY"),10),J=E===parseInt(y.endDate.format("YYYY"),10),Y=P||J||E>parseInt(y.startDate.format("YYYY"),10)&&E<parseInt(y.endDate.format("YYYY"),10)):y.startDate?(P=E===parseInt(y.startDate.format("YYYY"),10),Y=P||E===ce,Y=Y||f.isAfter(y.startDate,"year")&&f.isBefore(y.hoverDate,"year"),J=!1):y.endDate&&(J=E===parseInt(y.endDate.format("YYYY"),10),Y=J||E===ce,Y=Y||f.isAfter(y.hoverDate,"year")&&f.isBefore(y.endDate,"year"),P=!!(y.hoverDate&&y.hoverDate.isSame(y.endDate,"year"))&&J)}else P=!!(y.startDate&&f.isSame(y.startDate,"year")),y.endDate&&y.startDate&&(J=f.isSame(y.endDate,"year"),Y=f.isAfter(y.startDate,"year")&&f.isBefore(y.endDate,"year"));b=P||J}u.layerType==="years"&&(_=!1);const ne=de.getAddClass("year",{old:D,new:h,active:b&&!D&&!h,focused:_,disabled:O,"date-start":P&&!D&&!h,"date-end":J&&!D&&!h,"range-in":Y&&!D&&!h});H.push({cls:ne,year:E,isDisabled:O,value:E})}v.value=H},B=()=>{y.viewDate&&(y.startYear=Math.floor(y.viewDate.year()/10)*10,k(),F())},I=(Z,z,H)=>{y.viewDate&&(y.viewDate=y.viewDate.clone()[Z](z,H),B(),t("onChangeDate",y.viewDate))};let A=!1;const N=()=>{A||(A=!0,e.nextTick(()=>{t("onInitComplete","years")}))},x=()=>{y.selectDate=d.getMomentDate(a.selectValue),y.startDate=d.getMomentDate(a.startValue),y.endDate=d.getMomentDate(a.endValue),y.hoverDate=d.getMomentDate(a.hoverValue)},V=(Z,z,H)=>{if(z!==H){const S=d.getMomentDate(z);S&&S.isValid()?(y[Z]=S,x(),B(),N()):(y.viewDate=null,y.startYear=0,v.value=[],g.isPrevYear=!1,g.isNextYear=!1,g.titleYear="")}},w=()=>{const Z=d.getMomentDate(a.viewValue);Z&&Z.isValid()&&(y.viewDate=Z,x(),B(),N())};e.onMounted(()=>{e.nextTick(()=>{w()})}),e.watch(()=>a.viewValue,(Z,z)=>{V("viewDate",Z,z)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue,()=>a.hoverValue],()=>{y.viewDate&&(y.selectDate=d.getMomentDate(a.selectValue),y.startDate=d.getMomentDate(a.startValue),y.endDate=d.getMomentDate(a.endValue),y.hoverDate=d.getMomentDate(a.hoverValue),F())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{y.viewDate&&(k(),F())});const M=Z=>{Z.preventDefault(),Z.stopPropagation(),I("subtract",10,"years")},C=Z=>{Z.preventDefault(),Z.stopPropagation(),I("add",10,"years")},T=(Z,z)=>{Z.preventDefault(),Z.stopPropagation(),z.isDisabled||t("onSelectDate","years",z)},U=(Z,z)=>{Z.preventDefault(),Z.stopPropagation(),z.isDisabled||t("onHoverDate","years",z)};return(Z,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Gm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Qm,[e.createElementVNode("span",Zm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(i).prevYear10,onClick:M},[e.createVNode(ye,{name:"angle-left"})],8,ep)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",null,e.toDisplayString(g.titleYear),1),e.createElementVNode("span",tp,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(i).nextYear10,onClick:C},[e.createVNode(ye,{name:"angle-right"})],8,np)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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:E=>T(E,H),onKeydown:[e.withKeys(e.withModifiers(E=>T(E,H),["prevent"]),["enter"]),e.withKeys(e.withModifiers(E=>T(E,H),["prevent"]),["space"])],onMouseover:E=>U(E,H)},e.toDisplayString(H.year),43,ap))),128))])])])])],10,Xm))}}),ip=["id"],sp={class:"times-container"},rp=["title"],cp=["title"],up={class:"times-clock"},dp={class:"clock-nums"},mp=["aria-disabled","onClick","onKeydown"],pp={class:"clock-pointer"},fp={class:"clock-am"},hp="2000-01-01",gp=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:n=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendarsClock-${o.getRandom(5)}`,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase");(!u||!s)&&Se.warn("ClCalendarsClocks","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=u?.elId?`${u.elId}-calendarsClock-${o.getRandom(5)}`:void 0,m=e.reactive({isOpen:!1,activePointer:"hour",activeAm:"am"}),p=e.reactive({hour:!0,hourDisabled:!1,minute:!0,minuteDisabled:!1,minuteShowAddSub:!0,second:!0,secondDisabled:!1}),g=e.reactive({hour:-90,hourMinute:0,minute:-90,minuteSecond:0,second:-90}),v=e.reactive({hour:"00",minute:"00",second:"00"}),y=e.ref([]),k={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}},F=e.computed(()=>{let ie={"panel-calendarsclocks":!0,"datetime-times":!0};return ie["times-open"]=m.isOpen,ie=o.getJsonMerge(ie,de.getClassNameJson(a.className)),ie}),B=e.computed(()=>{const ie={"pointer-hour":!0};return ie["pointer-active"]=m.activePointer==="hour",ie["pointer-disabled"]=p.hourDisabled,ie}),I=e.computed(()=>{const ie={"pointer-minute":!0};return ie["pointer-active"]=m.activePointer==="minute",ie["pointer-disabled"]=p.minuteDisabled,ie}),A=e.computed(()=>{const ie={"pointer-second":!0};return ie["pointer-active"]=m.activePointer==="second",ie["pointer-disabled"]=p.secondDisabled,ie}),N=e.computed(()=>{const ie={"am-am":!0};return ie["am-active"]=m.activeAm==="am",ie}),x=e.computed(()=>{const ie={"am-pm":!0};return ie["am-active"]=m.activeAm==="pm",ie}),V=e.computed(()=>{const ie={"clock-set":!0,"clock-set-hour":!0};return ie["clock-set-active"]=m.activePointer==="hour",ie["clock-set-disabled"]=p.hourDisabled,ie}),w=e.computed(()=>{const ie={"clock-set":!0,"clock-set-minute":!0};return ie["clock-set-active"]=m.activePointer==="minute",ie["clock-set-disabled"]=p.minuteDisabled,ie}),M=e.computed(()=>{const ie={"clock-set":!0,"clock-set-second":!0};return ie["clock-set-active"]=m.activePointer==="second",ie["clock-set-disabled"]=p.secondDisabled,ie}),C=(ie,oe)=>{k[ie]=u.getMomentDate(oe)},T=ie=>{let oe=parseInt(k.lastValue[ie],10),L=parseInt(v[ie],10),te=0;return ie==="hour"?(L===0&&oe===23&&(L=24),oe===0&&L===23&&(oe=24),L-oe>6&&(oe+=12),oe-L>=6&&(L+=12),te=L-oe):(L-oe>30&&(oe+=60),oe-L>=30&&(L+=60),te=L-oe),te},U=ie=>{const L=T(ie)*k.timeAngle[ie];return g[ie]+(L>=360?L%360:L)},Z=()=>{const ie=U("hour"),oe=k.timeAngle.hour*parseFloat((parseInt(v.minute,10)/60).toString()),L=U("minute"),te=k.timeAngle.second*parseFloat((parseInt(v.second,10)/60).toString()),ue=U("second");g.hour=ie,g.hourMinute=oe,g.minute=L,g.minuteSecond=te,g.second=ue},z=ie=>parseInt(ie,10)<12?"am":"pm",H=(ie,oe)=>{let L=!0;switch(ie){case"hour":L=!0;break;case"minute":L=parseInt(v.hour,10)===k[oe].hour;break;case"second":L=parseInt(v.hour,10)===k[oe].hour&&parseInt(v.minute,10)===k[oe].minute;break}return L},S=()=>k.isCheckMin&&k.isCheckMax&&k.checkMinDiff===0&&k.checkMaxDiff===0&&k.min.hour>k.max.hour,E=(ie,oe)=>{let L=!1;return S()&&ie==="hour"?L=oe<k.min[ie]&&oe>k.max[ie]:k.isCheckMin&&(k.checkMinDiff===0?H(ie,"min")&&(L=oe<k.min[ie]):k.checkMinDiff<0&&(L=!0)),!L&&k.isCheckMax&&(k.checkMaxDiff===0?H(ie,"max")&&(L=oe>k.max[ie]):k.checkMaxDiff>0&&(L=!0)),L},f=ie=>{let oe=ie;oe==="hour"&&(oe=m.activeAm==="am"?"hourAm":"hourPm");const L=p[`${ie}Disabled`],te=[];k.num[oe].forEach((ue,pe)=>{const he={num:ue,cls:"clock-num",isDisabled:!1};he.cls+=` clock-num${pe+1} `,he.isDisabled=L?!0:E(ie,ue),he.isDisabled&&(he.cls+=" clock-nums-disabled "),te.push(he)}),y.value=te},D=ie=>{m.activePointer=ie,ie==="hour"&&(m.activeAm=z(v.hour)),f(ie)},h=ie=>{let oe=null;if(!o.isUndefined(ie)&&!o.isUndefined(k.selectDayDate)){const L=k.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"),te=ie.clone().format("YYYY-MM-DD 00:00:00");oe=u.Dayjs(L).diff(u.Dayjs(te))}return oe},b=(ie=!0)=>{g.hour=-90,g.hourMinute=0,g.minute=-90,g.minuteSecond=0,g.second=-90,k.lastValue={hour:"00",minute:"00",second:"00"},Z(),e.nextTick(()=>{const oe=v.hour,L=v.minute,te=v.second;k.lastValue={hour:oe,minute:L,second:te},ie&&(k.origValue={hour:oe,minute:L,second:te})})},_=(ie,oe)=>{k.lastValue.hour=v.hour,k.lastValue.minute=v.minute,k.lastValue.second=v.second,v[ie]=o.getFillZero(oe),Z(),a.isShowSubmit||t("onSubmit",`${v.hour}:${v.minute}:${v.second}`)},O=ie=>{let oe=0,L=0,te=0;if(!o.isEmpty(ie)){const ue=(o.isEmpty(k.selectDayDate)?u.getNow():k.selectDayDate).format("YYYY-MM-DD"),pe=u.getMomentDate(`${ue} ${ie}`);pe&&pe.isValid()&&(oe=pe.hour(),L=pe.minute(),te=pe.second())}return{HH:oe,mm:L,ss:te}},P=()=>{let ie=!0,oe=!0;const L=o.isEmpty(k.selectDayDate),te=O(a.selectValue),ue=te.HH,pe=te.mm,he=te.ss;switch(s.layerType){case"hours":ie=!1,oe=!1;break;case"minutes":oe=!1;break}k.isCheckMin=!o.isUndefined(k.minDate),k.isCheckMin&&(k.checkMinDiff=u.checkIsTimes()?0:h(k.minDate),k.min={hour:k.minDate.hour(),minute:k.minDate.minute(),second:k.minDate.second()}),k.isCheckMax=!o.isUndefined(k.maxDate),k.isCheckMax&&(k.checkMaxDiff=u.checkIsTimes()?0:h(k.maxDate),k.max={hour:k.maxDate.hour(),minute:k.maxDate.minute(),second:k.maxDate.second()});const Ce=o.getFillZero(ue);let Ee=o.getFillZero(pe),xe=o.getFillZero(he);ie||(Ee="00"),oe||(xe="00"),k.origValue={hour:Ce,minute:Ee,second:xe},p.hour=!0,p.minute=ie,p.second=oe,v.hour=Ce,v.minute=Ee,v.second=xe,u.checkIsTimes()||(p.hourDisabled=L,p.minuteDisabled=L,p.secondDisabled=L),s.layerType==="hours"&&(p.minute=!0,p.minuteDisabled=!0,p.minuteShowAddSub=!1),J(),Y()},J=()=>{k.lastValue={hour:"00",minute:"00",second:"00"},g.hour=-90,g.hourMinute=0,g.minute=-90,g.minuteSecond=0,g.second=-90},Y=()=>{Z(),m.activeAm=z(v.hour),f(m.activePointer)},ne=()=>{m.isOpen=a.isShowPointer,C("selectDayDate",u.checkIsTimes()?hp:a.selectDay),C("minDate",u.getValueEffective(a.minValue)),C("maxDate",u.getValueEffective(a.maxValue)),P(),D("hour"),b(),e.nextTick(()=>{t("onInitComplete","times")})},ce=ie=>{let oe=!1;return p[ie]&&!p[`${ie}Disabled`]&&(m.isOpen?oe=!0:(b(!1),m.isOpen=!0,D(ie))),oe},X=(ie,oe)=>{if(p[ie]&&!p[`${ie}Disabled`]&&m.isOpen){let L=!0,te=0,ue=ie==="hour"?23:59;if(k.isCheckMin&&(k.checkMinDiff===0?H(ie,"min")&&(te=k.min[ie]):k.checkMinDiff<0&&(L=!1)),k.isCheckMax&&(k.checkMaxDiff===0?H(ie,"max")&&(ue=k.max[ie]):k.checkMaxDiff>0&&(L=!1)),L){const pe=parseInt(v[ie],10);let he=0;S()&&ie==="hour"?he=oe==="add"?pe>=23?0:pe+1:pe<=0?23:pe-1:oe==="add"?he=pe<te||pe>=ue?te:pe+1:he=pe>ue||pe<=te?ue:pe-1,E(ie,he)||(_(ie,he),D(ie))}}};e.onMounted(()=>{e.nextTick(()=>{ne()})}),e.watch(()=>a.selectDay,(ie,oe)=>{C("selectDayDate",ie),P()}),e.watch(()=>a.minValue,(ie,oe)=>{const L=u.getValueEffective(ie);C("minDate",L),P()}),e.watch(()=>a.maxValue,(ie,oe)=>{const L=u.getValueEffective(ie);C("maxDate",L),P()}),e.watch(()=>a.selectValue,(ie,oe)=>{const L=O(ie),te=o.getFillZero(L.HH),ue=o.getFillZero(L.mm),pe=o.getFillZero(L.ss);(v.hour!==te||v.minute!==ue||v.second!==pe)&&(v.hour=te,v.minute=ue,v.second=pe,k.origValue={hour:te,minute:ue,second:pe},J(),Y())});const Q=ie=>{p[ie]&&!p[`${ie}Disabled`]&&(D(ie),m.isOpen||(b(),m.isOpen=!0))},le=ie=>{if(!ie.isDisabled){const oe=m.activePointer,L=parseInt(v[oe],10),te=ie.num;te!==L&&_(oe,te)}},K=ie=>{m.activeAm=ie,m.activePointer="hour";const oe=parseInt(v.hour,10);ie==="pm"&&oe<12?v.hour=o.getFillZero(oe+12):ie==="am"&&oe>=12&&(v.hour=o.getFillZero(oe-12)),Z(),f("hour")},W=()=>ce("hour"),R=ie=>{let oe=!1,L=!1;const te=S();if(k.isCheckMin){if(k.checkMinDiff<0)oe=!0,L=!0;else if(k.checkMinDiff===0){const ue=parseInt(v[ie],10);H(ie,"min")&&(oe=te?ue===k.min[ie]:ue<=k.min[ie])}}if(k.isCheckMax){if(k.checkMaxDiff>0)oe=!0,L=!0;else if(k.checkMaxDiff===0){const ue=parseInt(v[ie],10);H(ie,"max")&&(L=te?ue===k.max[ie]:ue>=k.max[ie])}}return{subtractDisabled:oe,addDisabled:L}},ae=ie=>(o.isEmpty(ie.type)||X("hour",ie.type),{value:v.hour,...R("hour")}),G=()=>ce("minute"),q=ie=>(o.isEmpty(ie.type)||X("minute",ie.type),{value:v.minute,...R("minute")}),ee=()=>ce("second"),$=ie=>(o.isEmpty(ie.type)||X("second",ie.type),{value:v.second,...R("second")}),j=()=>{a.isClickOverlay&&m.isOpen&&(u.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${v.hour}:${v.minute}:${v.second}`))},se=()=>{u.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${v.hour}:${v.minute}:${v.second}`)},me=()=>{(v.hour!==k.origValue.hour||v.minute!==k.origValue.minute||v.second!==k.origValue.second)&&(k.lastValue.hour=v.hour,k.lastValue.minute=v.minute,k.lastValue.second=v.second,v.hour=k.origValue.hour,v.minute=k.origValue.minute,v.second=k.origValue.second,Y()),u.checkIsTimes()||(m.isOpen=!1)};return(ie,oe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value),id:e.unref(c)},[oe[15]||(oe[15]=e.createElementVNode("div",{class:"datetime-times-inner"},null,-1)),e.createElementVNode("div",null,[e.createElementVNode("div",sp,[e.createElementVNode("div",{class:"times-overlay",onClick:j}),n.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"times-cancel",title:e.unref(r).common.cancel,onClick:me},[e.createVNode(ye,{name:"close1"})],8,rp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:2,class:"times-submit",title:e.unref(r).common.submit,onClick:se},[e.createVNode(ye,{name:"check1"})],8,cp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",up,[e.createElementVNode("div",dp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(L,te)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-clock-${te}`,role:"button",tabindex:"0","aria-disabled":L.isDisabled,class:e.normalizeClass(L.cls),onClick:ue=>le(L),onKeydown:[e.withKeys(e.withModifiers(ue=>le(L),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ue=>le(L),["prevent"]),["space"])]},e.toDisplayString(L.num),43,mp))),128))]),e.createElementVNode("div",pp,[p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(B.value),onClick:oe[0]||(oe[0]=L=>Q("hour")),style:e.normalizeStyle({transform:`rotate(${g.hour+g.hourMinute}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(I.value),onClick:oe[1]||(oe[1]=L=>Q("minute")),style:e.normalizeStyle({transform:`rotate(${g.minute+g.minuteSecond}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(A.value),onClick:oe[2]||(oe[2]=L=>Q("second")),style:e.normalizeStyle({transform:`rotate(${g.second}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))]),e.withDirectives(e.createElementVNode("div",fp,[e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(N.value),onClick:oe[3]||(oe[3]=L=>K("am")),onKeydown:[oe[4]||(oe[4]=e.withKeys(e.withModifiers(L=>K("am"),["prevent"]),["enter"])),oe[5]||(oe[5]=e.withKeys(e.withModifiers(L=>K("am"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(r).am),35),e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(x.value),onClick:oe[6]||(oe[6]=L=>K("pm")),onKeydown:[oe[7]||(oe[7]=e.withKeys(e.withModifiers(L=>K("pm"),["prevent"]),["enter"])),oe[8]||(oe[8]=e.withKeys(e.withModifiers(L=>K("pm"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(r).pm),35)],512),[[e.vShow,m.activePointer==="hour"]])])]),p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(V.value),onClick:oe[10]||(oe[10]=L=>Q("hour"))},[e.createVNode(pn,{value:v.hour,"onUpdate:value":oe[9]||(oe[9]=L=>v.hour=L),size:"small",isClean:!1,disabled:p.hourDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:W,calculationOperateValueCallback:ae},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute&&p.minuteShowAddSub?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(w.value),onClick:oe[12]||(oe[12]=L=>Q("minute"))},[e.createVNode(pn,{value:v.minute,"onUpdate:value":oe[11]||(oe[11]=L=>v.minute=L),size:"small",isClean:!1,disabled:p.minuteDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:G,calculationOperateValueCallback:q},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(M.value),onClick:oe[14]||(oe[14]=L=>Q("second"))},[e.createVNode(pn,{value:v.second,"onUpdate:value":oe[13]||(oe[13]=L=>v.second=L),size:"small",isClean:!1,disabled:p.secondDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:ee,calculationOperateValueCallback:$},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],10,ip))}}),vp=["id"],Ro=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:n=>!0,onChangeViewValue:n=>!0,onHoverDate:n=>!0,onChangeViewType:n=>!0,onSelectTime:n=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$DateTimeTop"),r=e.inject("$DateTimeTopBase");(!i||!r)&&Se.warn("ClCalendarsBase","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=i?.elId?`${i.elId}-calendarsBase-${o.getRandom(5)}`:void 0,u=e.computed(()=>{let z={"panel-calendarsbase":!0};return z=o.getJsonMerge(z,de.getClassNameJson(a.className)),z}),s=e.reactive({currentView:"",viewValue:"",selectValue:"",selectClockDay:"",selectClockTime:""}),c=e.reactive({isShow:!1,isViewDay:!1,isShowClockPointer:!1,isShowClockSubmit:!1,isShowClockCancel:!1,isClockClickOverlay:!1}),m={viewDate:null,selectDate:null,focusDate:null,minDate:null,maxDate:null},p=(z,H)=>{m[z]=o.isString(H)?i.getMomentDate(H):null},g=z=>{const H=Object.keys(z);o.isExistValue(H,"viewValue")&&r.layerView===z.currentView&&t("onChangeViewValue",z.viewValue),H.forEach(S=>{const E=S,f=z[E];o.isExistJsonKey(s,E)&&s[E]!==f&&(s[E]=f),o.isExistJsonKey(m,E)&&(m[E]=f)})},v=(z,H)=>{let S=!1;return o.isEmpty(z)||o.isNaN(z)||(o.isEmpty(m.minDate)||(S=i.Dayjs(z).isBefore(m.minDate,H)),!S&&!o.isEmpty(m.maxDate)&&(S=i.Dayjs(z).isAfter(m.maxDate,H))),S},y=(z,H)=>{let S=0,E=1;if(o.isEmpty(m.minDate))o.isUndefined(H)||(S=H);else{const f=z===m.minDate.year();let D=!0;o.isUndefined(H)?S=f?m.minDate.month():0:(D=H===m.minDate.month(),S=H),E=f&&D?m.minDate.date():1}return i.getMomentDate({year:z,month:S,day:E})??i.getNow().startOf("year")},k=z=>{let H="";switch(z){case"months":H="days";break;case"years":H="months";break;default:H="days";break}return H},F=z=>{const S=(z||m.selectDate||m.viewDate).format("YYYY-MM-DD")+" "+(o.isEmpty(s.selectClockTime)?"00:00:00":s.selectClockTime);return i.Dayjs(S)},B=(z,H)=>{const S=m.viewDate.clone(),E=parseInt(H.value,10);if(o.isNaN(E))return F(S);let f;switch(z){case"days":{let D=0;H.isNew?D=1:H.isOld&&(D=-1),f=S.month(S.month()+D).date(E);break}case"months":{const D=m.selectDate||S,h=S.month(E);f=h.date(Math.min(D.date(),h.daysInMonth()));break}case"years":f=S.month(0).date(1).year(E);break;default:f=S;break}return F(f)},I=()=>{s.viewValue=m.viewDate.format(r.formatIn),m.focusDate=m.viewDate.clone()},A=z=>{p("selectDate",z==="-1"?"":z);const H=m.selectDate?m.selectDate.format("YYYY-MM-DD"):"";s.selectValue=H,s.selectClockDay=H,s.selectClockTime=m.selectDate?m.selectDate.format("HH:mm:ss"):""},N=()=>{let z=!1,H=!1,S=!1,E=!1,f=!1,D=!1;s.currentView==="times"?(z=!0,S=!0,D=!1,E=r.isDefault&&r.isShowPopup,f=r.isDefault&&r.isShowPopup,r.layerType==="hours"&&(f=!1,E=!1)):s.currentView==="days"&&(H=r.timeType==="datetime",H&&(f=!0,E=!0,S=!1,D=!0)),c.isShow=z,c.isViewDay=H,c.isShowClockPointer=S,c.isShowClockSubmit=E,c.isShowClockCancel=f,c.isClockClickOverlay=D},x=()=>{s.currentView=r.layerView,m.viewDate=i.getViewDate(a.viewValue),I(),A(a.selectValue),p("minDate",a.minValue),p("maxDate",a.maxValue),N()};e.onMounted(()=>{e.nextTick(()=>{x()})}),e.watch(()=>a.viewValue,(z,H)=>{m.viewDate=i.getViewDate(z),I()}),e.watch(()=>a.selectValue,(z,H)=>{const S=r.isRange&&z==="-1";let E=z;const f=s.selectClockTime;S&&(E=""),A(E),S&&(s.selectClockTime=f)}),e.watch(()=>a.minValue,(z,H)=>{p("minDate",z)}),e.watch(()=>a.maxValue,(z,H)=>{p("maxDate",z)});const V=z=>{g({currentView:s.currentView,viewDate:z.clone(),viewValue:z.format(r.formatIn)})},w=z=>{s.currentView=z,m.focusDate=m.viewDate.clone(),N(),t("onChangeViewType",z)},M=(z,H)=>{const S=B(z,H),E=S.format("YYYY-MM-DD"),f={};if(r.layerView===z)f.selectDate=S,f.selectValue=E,r.isRange||(f.selectClockDay=E),g(f),t("onSelectDate",E);else{const D=k(z);if(D===z){f.selectDate=S,f.selectValue=E,r.isRange||(f.selectClockDay=E),g(f),t("onSelectDate",E);return}f.viewDate=S.clone().startOf("month"),f.viewValue=f.viewDate.format(r.formatIn),f.currentView=D,g(f),N(),t("onChangeViewType",f.currentView)}},C=(z,H)=>{const S=B(z,H);t("onHoverDate",S)},T=z=>{g({selectClockTime:z}),t("onSelectTime",z)},U=new Set,Z=z=>{r.layerView===z&&!U.has(z)&&(U.add(z),t("onInitComplete",z))};return e.provide("$DateTimeBase",{checkDataMinMax:v,getViewMin:y,getFocusDate:()=>m.focusDate&&m.focusDate.clone()}),(z,H)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(u.value)},[s.currentView==="days"?(e.openBlock(),e.createBlock(Pm,{key:0,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnChangeType:w,onOnSelectDate:M,onOnHoverDate:C,onOnInitComplete:Z},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):s.currentView==="months"?(e.openBlock(),e.createBlock(qm,{key:1,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnChangeType:w,onOnSelectDate:M,onOnHoverDate:C,onOnInitComplete:Z},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):s.currentView==="years"?(e.openBlock(),e.createBlock(lp,{key:2,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnSelectDate:M,onOnHoverDate:C,onOnInitComplete:Z},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(gp,{selectDay:s.selectClockDay,selectValue:s.selectClockTime,minValue:n.minValue,maxValue:n.maxValue,isShowPointer:c.isShowClockPointer,isShowSubmit:c.isShowClockSubmit,isShowCancel:c.isShowClockCancel,isClickOverlay:c.isClockClickOverlay,onOnSubmit:T,onOnInitComplete:Z},null,8,["selectDay","selectValue","minValue","maxValue","isShowPointer","isShowSubmit","isShowCancel","isClickOverlay"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,vp))}}),yp=["tabindex","aria-disabled","onKeydown"],kp=e.defineComponent({name:"ClDateTimeDefault",__name:"DateTimeDefault",props:{className:String,value:String,minValue:String,maxValue:String},emits:{onSelectValue:n=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase");(!u||!s)&&Se.warn("ClDateTimeDefault","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=e.reactive({isShowSubmit:!1,isSubmitDisplay:!1}),m=e.reactive({day:"",time:""}),p=e.computed(()=>{let w={"panel-date-time-default":!0,"datetime-default":!0,"datetime-panel-body":!0};return w=o.getJsonMerge(w,de.getClassNameJson(t.className)),w}),g=()=>{const w=u.getMergeDayTime(m.day,m.time),M=u.checkValue(w);c.isSubmitDisplay=o.isEmpty(m.day)||M.errMsg.length>0},v=w=>{let M=!1;s.timeType==="datetime"&&(M=w==="days"),c.isShowSubmit=M},y=w=>{let M="",C="",T=!0;if(o.isNonEmptyString(w)){const U=u.getMomentDate(w);U&&(M=U.format("YYYY-MM-DD"),C=U.format("HH:mm:ss"),T=!1)}m.day=M,m.time=C,c.isSubmitDisplay=T,g()},k=()=>{v(s.layerView),y(t.value)},F=()=>{const w=u.getMomentDate(u.getMergeDayTime(m.day,m.time));w&&i("onSelectValue",w)};e.onMounted(()=>{e.nextTick(()=>{k()})}),e.watch(()=>t.value,(w,M)=>{w!==M&&y(w)}),e.watch([()=>t.minValue,()=>t.maxValue],()=>{g()});const B=w=>{m.day=w,g(),s.timeType==="date"&&F()},I=w=>{m.time=w,g(),(s.timeType==="time"||s.timeType==="datetime"&&!c.isSubmitDisplay)&&F()},A=w=>{v(w)},N=()=>{c.isShowSubmit&&!c.isSubmitDisplay&&F()},x=()=>{i("onInitComplete")};return l({getValue:()=>{const w=u.getMergeDayTime(m.day,m.time);return u.getMomentDate(w)}}),(w,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ro,{class:e.normalizeClass(p.value),selectValue:n.value,viewValue:n.value,minValue:n.minValue,maxValue:n.maxValue,onOnSelectDate:B,onOnSelectTime:I,onOnChangeViewType:A,onOnInitComplete:x},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:N,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r).common.submit),1)],42,yp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),Sp=["id"],wp={class:"calendar-range calendar-left"},Cp={class:"calendar-text"},Ep={class:"time-input-base"},bp=["value","name"],xp={class:"calendar-panel"},Bp={class:"calendar-range calendar-right"},Ip={class:"calendar-text"},Dp={class:"time-input-base"},Tp=["value","name"],Np={class:"calendar-panel"},Vp={class:"calendar-range calendar-quick"},Mp=["onClick","onKeydown"],Op={key:0,class:"panel-quick-btn"},_p=e.defineComponent({name:"ClDateTimeRange",__name:"DateTimeRange",props:{className:String,startValue:String,endValue:String,minValue:String,maxValue:String,rangeQuick:{type:Array,default:()=>[]}},emits:{onSubmit:n=>!0,onCancel:()=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`dateTimeRange-${o.getRandom(5)}`,{optPageLanguage:d,getPageLanguage:u}=Le();u("dataTime");const s=e.inject("$DateTimeTop"),c=e.inject("$DateTimeTopBase");(!s||!c)&&Se.warn("ClDateTimeRange","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=s?.elId?`${s.elId}-dateTimeRange-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let Q={"panel-date-time-range":!0,"panel-range-calendar":!0,"datetime-range":!0,"datetime-panel-body":!0};return Q=o.getJsonMerge(Q,de.getClassNameJson(t.className)),Q}),g=e.reactive({operateViewDataType:"",selectCount:0,hoverValue:"",activeQuick:"",isCheck:!0,isShowQuickBtn:c.isShowPopup||c.timeType==="datetime",previewStart:"",previewEnd:""}),v=e.reactive({view:"",text:"",name:`input_${o.getRandom(8)}`}),y=e.reactive({view:"",text:"",name:`input_${o.getRandom(8)}`}),k=e.reactive({day:"",time:"",value:""}),F=e.reactive({day:"",time:"",value:""}),B=e.ref([]),I=(Q,le)=>{const K=s.getViewDate(Q),W=c.layerView==="years"?10:1,R=g.operateViewDataType;return K[le](W,R).format(c.formatIn)},A=(Q,le)=>{if(o.isEmpty(Q))return"";const K=le==="right"?c.formatOutEnd:c.formatOut;if(o.isString(Q)){const W=s.getMomentDate(Q);return W?W.format(K):""}return Q.format(K)},N=()=>{const Q=s.getMergeDayTime(k.day,k.time);k.value=Q,v.text=A(Q,"left")},x=()=>{const Q=s.getMergeDayTime(F.day,F.time);F.value=Q,y.text=A(Q,"right")},V=()=>{if(g.selectCount===2){let Q="-1";if(!o.isEmpty(k.day)&&!o.isEmpty(F.day)&&!o.isEmpty(B.value)){const le="YYYY-MM-DD";let K=s.getMomentDate(k.day,le),W=s.getMomentDate(F.day,le);if(K&&W){switch(c.layerType){case"years":if(K=s.getMomentDate(K.startOf("year").format(le),le),W=s.getMomentDate(W.endOf("year").format(le),le),!K||!W){g.activeQuick="-1";return}break;case"months":if(K=s.getMomentDate(K.startOf("month").format(le),le),W=s.getMomentDate(W.endOf("month").format(le),le),!K||!W){g.activeQuick="-1";return}break}const R=K,ae=W;R&&ae&&B.value.forEach(G=>{G.start&&G.end&&R.isSame(Ye.getDayjsObject(G.start).format(le))&&ae.isSame(Ye.getDayjsObject(G.end).format(le))&&(Q=G.id)})}}g.activeQuick=Q}},w=Q=>{const le=k.value,K=F.value,W=o.isEmpty(le),R=o.isEmpty(K),ae=!W&&R,G=W&&!R;let q=!1,ee=!1;if(Q&&(ae||G)){const $=s.getMomentDate(ae?le:K);$&&(q=Q.isBefore($,"day"),ee=Q.isSame($,"day"))}return{isStart:ae,isEnd:G,isBefore:q,isSame:ee}},M=Q=>{if(g.selectCount===1){const le=Q.format("YYYY-MM-DD"),K=k.day,W=F.day,R=w(Q);g.hoverValue=le;let ae="",G="";R.isBefore?(ae=le,G=R.isStart?K:W):(ae=R.isEnd?W:K,G=le),g.previewStart=ae,g.previewEnd=G,v.text=A(s.getMergeDayTime(ae,k.time),"left"),y.text=A(s.getMergeDayTime(G,F.time),"right")}},C=Q=>{switch(g.previewStart="",g.previewEnd="",g.selectCount){case 0:case 2:{g.selectCount=1,g.activeQuick="",k.day=Q,N(),F.day="",F.time="",F.value="",y.text=A(s.getMergeDayTime(Q,""),"right"),g.hoverValue=Q;break}case 1:{g.selectCount=2;const le=s.getMomentDate(Q);if(!le){g.selectCount=1;break}const K=w(le);K.isSame?(k.day=Q,N(),F.day=Q,x()):K.isBefore?(F.day=k.day,F.time=k.time,k.day=Q,N(),x()):(F.day=Q,x()),g.hoverValue="";break}}g.selectCount===2&&V()},T=()=>{!g.isShowQuickBtn&&g.selectCount===2&&g.isCheck&&i("onSubmit",{start:k.value,end:F.value})},U=(Q,le)=>{const K=s.getMomentDate(le),W=K?K.format("YYYY-MM-DD"):"",R=K?K.format("HH:mm:ss"):"",ae=K?s.getMergeDayTime(W,R):"";Q?(k.day=W,k.time=R,k.value=ae,v.text=A(ae,"left")):(F.day=W,F.time=R,F.value=ae,y.text=A(ae,"right"))},Z=()=>{let Q="";switch(c.layerType){case"days":Q="months";break;case"months":Q="years";break;case"years":Q="years";break;default:Q="months"}g.operateViewDataType=Q;const le=t.startValue||"",K=t.endValue||"",W=!o.isEmpty(le),R=!o.isEmpty(K);if(g.selectCount=W&&R?2:W||R?1:0,v.view=s.getViewDate(le).format(c.formatIn),y.view=I(v.view,"add"),U(!0,le),U(!1,K),c.timeType==="time"){g.selectCount=2;const ae=c.layerType==="seconds"?"00:00:00":"00:00";o.isEmpty(v.text)&&U(!0,s.getValueEffective(ae)),o.isEmpty(y.text)&&U(!1,s.getValueEffective(ae))}z()},z=()=>{let Q=[];o.isArray(t.rangeQuick)&&(Q=o.getListClone(t.rangeQuick).filter(le=>o.isObject(le)&&o.isNonEmptyString(le.id)),Q.length>0&&Q.push({id:"-1",text:d.value.common.custom})),B.value=Q},H=()=>{Z(),V(),e.nextTick(()=>{e.nextTick(()=>{i("onInitComplete")})})},S=()=>{if(g.selectCount===2){const Q=s.checkValue(k.value,F.value);g.isCheck=Q.errMsg.length===0}};e.onMounted(()=>{e.nextTick(()=>{H()})}),e.watch([()=>t.startValue,()=>t.endValue],([Q,le])=>{U(!0,Q),U(!1,le);const K=!o.isEmpty(Q),W=!o.isEmpty(le);g.selectCount=K&&W?2:K||W?1:0,g.selectCount!==2&&(g.activeQuick=""),g.hoverValue="",g.previewStart="",g.previewEnd="",V(),S()}),e.watch(()=>t.rangeQuick,()=>{g.operateViewDataType&&z()});const E=()=>{g.hoverValue="",g.previewStart="",g.previewEnd="",v.text=A(s.getMergeDayTime(k.day,k.time),"left"),y.text=A(s.getMergeDayTime(F.day,F.time),"right")},f=Q=>{v.view=Q,y.view=I(Q,"add")},D=Q=>{C(Q),S(),T()},h=Q=>{k.time=Q,N(),S(),T()},b=Q=>{M(Q)},_=Q=>{v.view=I(Q,"subtract"),y.view=Q},O=Q=>{C(Q),S(),T()},P=Q=>{F.time=Q,x(),S(),T()},J=Q=>{M(Q)},Y=Q=>{if(Q.id!=="-1"){if(o.isEmpty(Q.start)||o.isEmpty(Q.end))return;const le=Ye.getDayjsObject(Q.start),K=Ye.getDayjsObject(Q.end);if(!le.isValid()||!K.isValid()){Se.warn("ClDateTimeRange",`快捷项 "${Q.text}" 日期无效,已忽略`);return}let W=le.format("YYYY-MM-DD"),R=K.format("YYYY-MM-DD");const ae=s.checkMinMax(W,R,"YYYY-MM-DD");if(!ae.isStartMax||!ae.isEndMin){Se.warn("ClDateTimeRange",`快捷项 "${Q.text}" 超出可选范围,已忽略`);return}ae.isStartMin||(W=ae.minDay),ae.isEndMax||(R=ae.maxDay),k.day=W,N(),F.day=R,x(),v.view=W;const G=o.isEmpty(R)?null:s.getMomentDate(R);y.view=G?G.startOf("month").format(c.formatIn):I(W,"add"),g.hoverValue="",g.previewStart="",g.previewEnd="",g.selectCount=2,g.activeQuick=Q.id,S(),T()}},ne=()=>{g.selectCount===2&&g.isCheck&&(i("onSubmit",{start:k.value,end:F.value}),g.isCheck=!1)},ce=()=>{i("onCancel")};return l({getValue:()=>({start:k.value,end:F.value})}),(Q,le)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(m),class:e.normalizeClass(p.value),onMouseleave:E},[e.createElementVNode("div",wp,[e.createElementVNode("div",Cp,[e.createElementVNode("div",Ep,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:v.text,name:v.name},null,8,bp),e.createVNode(ye,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",xp,[e.createVNode(Ro,{selectValue:g.selectCount===2?k.value:"-1",startValue:g.previewStart||k.value,endValue:g.previewEnd||F.value,viewValue:v.view,hoverValue:g.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeViewValue:f,onOnSelectDate:D,onOnSelectTime:h,onOnHoverDate:b},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Bp,[e.createElementVNode("div",Ip,[e.createElementVNode("div",Dp,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:y.text,name:y.name},null,8,Tp),e.createVNode(ye,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",Np,[e.createVNode(Ro,{selectValue:g.selectCount===2?F.value:"-1",startValue:g.previewStart||k.value,endValue:g.previewEnd||F.value,viewValue:y.view,hoverValue:g.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeViewValue:_,onOnSelectDate:O,onOnSelectTime:P,onOnHoverDate:J},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Vp,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(K,W)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-${K.id}-${W}`,role:"button",tabindex:"0",class:e.normalizeClass({active:K.id===g.activeQuick,"calendar-quick-special":K.id==="-1"}),onClick:R=>Y(K),onKeydown:[e.withKeys(e.withModifiers(R=>Y(K),["prevent"]),["enter"]),e.withKeys(e.withModifiers(R=>Y(K),["prevent"]),["space"])]},e.toDisplayString(K.text),43,Mp))),128))]),g.isShowQuickBtn?(e.openBlock(),e.createElementBlock("div",Op,[e.createVNode(Ze,{className:"quick-submit",label:e.unref(d).common.submit,size:"small",disabled:g.selectCount!==2||!g.isCheck,onOnClick:ne},null,8,["label","disabled"]),e.createVNode(Ze,{className:"quick-cancel",label:e.unref(d).common.cancel,size:"small",color:"grayLight",onOnClick:ce},null,8,["label"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],42,Sp))}}),Ap={key:3,class:"datetime-errmsg",role:"alert"},Ka=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:n=>!0,onClose:()=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`clDatetimeBase-${o.getRandom(5)}`,d=e.inject("$DateTimeTop");d||Se.warn("ClDateTimeBase","未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");const u=e.computed(()=>!!d);t.isDefault===t.isRange&&Se.warn("ClDateTimeBase",`isDefault(${t.isDefault}) 与 isRange(${t.isRange}) 必须恰好一个为 true`);const s=e.useTemplateRef("refEl");let c=!1;const m=e.computed(()=>o.isArray(t.errMsg)&&t.errMsg.length>0),p=k=>{i("onSelectValue",k)},g=()=>{i("onClose")},v=()=>{c||(c=!0,i("onInitComplete"))};return l({getValue:()=>s.value?s.value.getValue():t.isDefault?o.isNonEmptyString(t.start)?d?.getMomentDate(t.start)??t.start:null:o.isNonEmptyString(t.start)||o.isNonEmptyString(t.end)?{start:t.start,end:t.end}:""}),(k,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.value&&n.isDefault?(e.openBlock(),e.createBlock(kp,{key:0,ref_key:"refEl",ref:s,value:n.start,minValue:n.minDate,maxValue:n.maxDate,onOnSelectValue:p,onOnInitComplete:v},null,8,["value","minValue","maxValue"])):u.value&&n.isRange?(e.openBlock(),e.createBlock(_p,{key:1,ref_key:"refEl",ref:s,rangeQuick:n.rangeQuick,minValue:n.minDate,maxValue:n.maxDate,startValue:n.start,endValue:n.end,onOnSubmit:p,onOnCancel:g,onOnInitComplete:v},null,8,["rangeQuick","minValue","maxValue","startValue","endValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),m.value?(e.openBlock(),e.createElementBlock("ul",Ap,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.errMsg,(B,I)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-err-${I}`},e.toDisplayString(B),1))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],64))}}),Lp=["id"],$p=["id"],Fp="2000-01-01",la=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:n=>["default","range"].includes(n)},layerType:{type:String,default:"days",validator:n=>["years","months","days","hours","minutes","seconds"].includes(n)},timeType:{type:String,default:"date",validator:n=>["date","time","datetime"].includes(n)},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:n=>["default","noBorder"].includes(n)},arrowDirection:{type:String,default:"right"},isUseDropdownArrow:{type:Boolean,default:!0},checkCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:" ~ "},appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=`datetime-${o.getRandom(8)}`,s=t.id,c=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElDatetime"),p=e.reactive({isInit:!1,isDefault:t.theme!=="range",isRange:t.theme==="range",isShowPopup:t.isDropdown,timeType:"",layerType:t.layerType,layerView:"",formatIn:"",formatOut:"",formatOutEnd:"",rangeQuick:[],errMsg:[]}),g=e.reactive({showText:"",start:"",end:""}),v={lastStart:"",lastEnd:""},y=e.computed(()=>{let R=t.arrowDirection;return o.isEmpty(R)&&(R=t.themeStyle==="noBorder"?"left":"right"),R}),k=e.computed(()=>{let R={"panel-date-time":!0};return t.themeStyle==="noBorder"&&(R["datetime-themeStyle-noBorder"]=!0),t.themeStyle==="noBorder"&&o.isEmpty(g.showText)&&(R["datetime-empty"]=!0),t.isDropdown||(R["datetime-noPopup"]=!0,R[`datetime-${t.theme}`]=!0),R=o.getJsonMerge(R,de.getClassNameJson(t.className)),o.getStringByJson(R," ")}),F=e.computed(()=>`datetime-dropdown datetime-${t.theme} datetime-dropdown-${t.theme}`),B=e.computed(()=>{let R={"panel-date-time":!0};return R=o.getJsonMerge(R,de.getClassNameJson(t.className)),`${o.getStringByJson(R," ")} cl-plaintext-value`}),I=e.computed(()=>{const R=g.showText,ae=o.isString(t.plaintextSeparator)?t.plaintextSeparator:" ~ ";return!p.isRange||ae===" ~ "?R:R.split(" ~ ").join(ae)}),A=()=>[{id:"today",text:r.value.today,start:Me(),end:Me()},{id:"yesterDay",text:r.value.yesterDay,start:Me().subtract(1,"day"),end:Me().subtract(1,"day")},{id:"pastDays7",text:r.value.pastDays7,start:Me().subtract(7,"day"),end:Me().subtract(1,"day")},{id:"pastDays30",text:r.value.pastDays30,start:Me().subtract(30,"day"),end:Me().subtract(1,"day")},{id:"mont",text:r.value.montCurrent,start:Me().startOf("month"),end:Me().endOf("month")},{id:"montLast",text:r.value.montLast,start:Me().subtract(1,"month").startOf("month"),end:Me().subtract(1,"month").endOf("month")}],N=()=>[{id:"mont",text:r.value.montCurrent,start:Me().startOf("month"),end:Me().endOf("month")},{id:"montLast",text:r.value.montLast,start:Me().subtract(1,"month").startOf("month"),end:Me().subtract(1,"month").endOf("month")},{id:"montLately6",text:r.value.montLately6,start:Me().subtract(5,"month").startOf("month"),end:Me().endOf("month")},{id:"year",text:r.value.yearCurrent,start:Me().startOf("year"),end:Me().endOf("year")},{id:"yearLast",text:r.value.yearLast,start:Me().subtract(1,"year").startOf("year"),end:Me().subtract(1,"year").endOf("year")}],x=()=>[{id:"year",text:r.value.yearCurrent,start:Me().startOf("year"),end:Me().endOf("year")},{id:"yearLast",text:r.value.yearLast,start:Me().subtract(1,"year").startOf("year"),end:Me().subtract(1,"year").endOf("year")}],V=R=>{const ae=o.isEmpty(R.start),G=o.isEmpty(R.end),q=ae?"":Me(R.start).format(p.formatIn),ee=G?"":Me(R.end).format(p.formatIn),$=p.isDefault?q:ae||G?"":`${q}~${ee}`,j=p.isDefault?{value:q}:{start:q,end:ee,value:$};return{value:$,info:j}},w=()=>{c.value&&c.value.setOpen(!1)},M=()=>p.timeType==="time",C=R=>{if(!R)return"";const ae=o.isString(R)?o.trim(R):"";return M()?/^\d{4}-\d{2}-\d{2}/.test(ae)?ae:`${Fp} ${ae}`:ae},T=()=>Me(),U=(R,ae)=>{let G=null;if(!o.isEmpty(R)){const q=o.isUndefined(ae)?p.formatIn:ae;G=o.isString(R)?Me(R,q):Me(R),G&&!G.isValid()&&(G=null)}return G},Z=R=>{const ae=U(R);return ae?ae.startOf("month"):T().startOf("month")},z=(R,ae,G)=>{const q=o.isEmpty(G)?p.formatIn:G;let ee="";if(!o.isEmpty(t.minDate)){const Ee=U(C(t.minDate));ee=Ee?Ee.format(q):""}let $="";if(!o.isEmpty(t.maxDate)){const Ee=U(C(t.maxDate));$=Ee?Ee.format(q):""}let j=!0,se=!0,me=!0,ie=!0,oe=!0,L=!1;const te=o.isEmpty(R),ue=o.isEmpty(ae);let pe;switch(t.layerType){case"years":pe="year";break;case"months":pe="month";break;case"days":pe="day";break;case"hours":pe="hour";break;case"minutes":pe="minute";break;case"seconds":pe="second";break;default:pe="day";break}if(!te){const Ee=Me(R);if(Ee.isValid()&&(o.isEmpty(ee)||(j=Ee.isSameOrAfter(ee,pe)),o.isEmpty($)||(se=Ee.isSameOrBefore($,pe)),!ue)){const xe=Me(ae);xe.isValid()&&(o.isEmpty(ee)||(me=xe.isSameOrAfter(ee,pe)),o.isEmpty($)||(ie=xe.isSameOrBefore($,pe)),xe.isBefore(Ee)&&(oe=!1))}}const he=[],Ce=p.isRange?r.value.rangeStartLabel:"";return se?me?(j||he.push(`${Ce}${r.value.checkStartMinLabel}(${U(ee,q)?.format(p.formatOut)??ee})`),ie||he.push(`${r.value.checkEndMaxLabel}(${U($,q)?.format(p.formatOut)??$})`)):he.push(`${r.value.checkEndMinLabel}(${U(ee,q)?.format(p.formatOut)??ee})`):he.push(`${Ce}${r.value.checkStartMaxLabel}(${U($,q)?.format(p.formatOut)??$})`),p.isRange&&((te||ue)&&(L=!0,he.push(r.value.checkRangeEmptyLabel)),oe||he.push(r.value.checkStartEndLabel)),{isStartMin:j,isStartMax:se,isEndMin:me,isEndMax:ie,isStartEnd:oe,isRangeEmpty:L,errMsg:he,minDay:ee,maxDay:$}},H=(R,ae,G)=>{const q=z(R,ae||"",G);return p.errMsg=q.errMsg,c.value&&e.nextTick(()=>{c.value?.calculationPosition()}),q},S=()=>{let R=[];switch(t.layerType){case"days":case"hours":case"minutes":case"seconds":R=p.timeType==="time"?[]:A();break;case"months":R=N();break;case"years":R=x();break}return R},E=()=>{let R=[];p.isRange&&(o.isArray(t.rangeQuick)&&t.rangeQuick.length>0?R=[...t.rangeQuick]:R=S()),p.rangeQuick=R},f=()=>{["default","range"].includes(t.theme)||Se.warn("ClDateTime",`theme 非法值 "${t.theme}",可选值 default/range`),["years","months","days","hours","minutes","seconds"].includes(t.layerType)||Se.warn("ClDateTime",`layerType 非法值 "${t.layerType}"`),["date","time","datetime"].includes(t.timeType)||Se.warn("ClDateTime",`timeType 非法值 "${t.timeType}"`),["default","noBorder"].includes(t.themeStyle)||Se.warn("ClDateTime",`themeStyle 非法值 "${t.themeStyle}"`)},D=()=>{f();let R="",ae="",G="";switch(t.layerType){case"years":R="date",ae="YYYY",G=t.layerType;break;case"months":R="date",ae="YYYY-MM",G=t.layerType;break;case"days":R="date",ae="YYYY-MM-DD",G=t.layerType;break;case"hours":R=t.timeType==="date"?"datetime":t.timeType,ae=R==="time"?"HH:00":"YYYY-MM-DD HH:00",G=R==="datetime"?"days":"times";break;case"minutes":R=t.timeType==="date"?"datetime":t.timeType,ae=R==="time"?"HH:mm":"YYYY-MM-DD HH:mm",G=R==="datetime"?"days":"times";break;case"seconds":R=t.timeType==="date"?"datetime":t.timeType,ae=R==="time"?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss",G=R==="datetime"?"days":"times";break;default:R="date",ae="YYYY-MM-DD",G=t.layerType;break}p.timeType=R,p.layerView=G,p.formatIn=R==="date"?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",p.formatOut=o.isNonEmptyString(t.format)?t.format:ae,p.formatOutEnd=o.isNonEmptyString(t.formatEnd)?t.formatEnd:ae},h=R=>{let ae="",G="",q="";if(o.isNonEmptyString(R)){if(p.isDefault){const ee=C(R),$=Me(ee);$.isValid()&&(G=$.format(p.formatIn),ae=$.format(p.formatOut))}else if(p.isRange){const ee=R.split("~");if(ee.length===2){const $=C(ee[0]),j=C(ee[1]),se=Me($),me=Me(j);se.isValid()&&me.isValid()&&(G=se.format(p.formatIn),q=me.format(p.formatIn),ae=`${se.format(p.formatOut)} ~ ${me.format(p.formatOutEnd)}`)}}}g.start=G,g.end=q,g.showText=ae},b=R=>{let ae=!0;if(t.checkCallback&&!o.isEmpty(R)){try{p.isDefault?ae=t.checkCallback(R):p.isRange&&(ae=t.checkCallback(R.start,R.end))}catch(G){Se.warn("ClDateTime","checkCallback 回调执行异常,本次选择不生效",G),ae=!1}ae=o.isBoolean(ae)?ae:!0}return ae},_=R=>{let ae="",G="",q="",ee=!1;if(p.isDefault){if(!o.isEmpty(R)){const se=U(R);se&&(G=se.format(p.formatIn),ae=se.format(p.formatOut))}ee=G!==v.lastStart}else if(p.isRange){if(!o.isEmpty(R)&&!o.isEmpty(R.start)&&!o.isEmpty(R.end)){const se=U(R.start),me=U(R.end);se&&me&&(G=se.format(p.formatIn),q=me.format(p.formatIn),ae=`${se.format(p.formatOut)} ~ ${me.format(p.formatOutEnd)}`)}ee=G!==v.lastStart||q!==v.lastEnd}const $=z(G,q);let j=!1;return $.errMsg.length===0&&(j=b(R)),p.errMsg=$.errMsg,c.value&&e.nextTick(()=>{c.value?.calculationPosition()}),{start:G,end:q,text:ae,isChange:ee,checkInfo:$,isCheck:j}},O=()=>{D(),E(),h(t.value),e.nextTick(()=>{p.isInit=!0})},P=()=>{const R=m.value?.getValue();let ae="",G="";if(p.isDefault){if(!o.isEmpty(R)){const q=U(R);q&&(ae=q.format(p.formatIn))}}else if(p.isRange){const q=R;if(!o.isEmpty(q?.start)&&!o.isEmpty(q?.end)){const ee=U(q?.start),$=U(q?.end);ee&&$&&(ae=ee.format(p.formatIn),G=$.format(p.formatIn))}}return V({start:ae,end:G})};e.onMounted(()=>{e.nextTick(()=>{O()})}),e.watch(()=>t.value,(R,ae)=>{R!==ae&&(h(R),v.lastStart=g.start,v.lastEnd=g.end)}),e.watch(()=>t.isDropdown,R=>{p.isShowPopup=R}),e.watch([()=>t.theme,()=>t.layerType,()=>t.timeType,()=>t.format,()=>t.formatEnd],()=>{p.isDefault=t.theme!=="range",p.isRange=t.theme==="range",D(),E(),h(t.value),v.lastStart=g.start,v.lastEnd=g.end});const J=R=>{t.disabled||R&&(p.errMsg=[],v.lastStart=g.start,v.lastEnd=g.end,E())},Y=()=>{if(!t.disabled){g.start="",g.end="",g.showText="",v.lastStart="",v.lastEnd="";const R=V(g);i("update:value",R.value),i("update:modelValue",R.value),i("onChange",R.value,R.info)}},ne=R=>{if(!t.disabled){const{start:ae,end:G,text:q,isChange:ee,isCheck:$}=_(R);if($&&(g.start=ae,g.end=G,g.showText=q,v.lastStart=ae,v.lastEnd=G,w(),ee)){const j=V(g);i("update:value",j.value),i("update:modelValue",j.value),i("onChange",j.value,j.info)}}},ce=()=>{w()};let X=!1;const Q=()=>{p.isShowPopup&&c.value&&(c.value.checkIsShowOpen()||c.value.initCompleteOpen()),X||(X=!0,i("onInit"))};return e.provide("$DateTimeTop",{keyIndex:u,elId:t.id,getMomentDate:U,getViewDate:Z,getNow:T,checkIsTimes:M,checkValue:H,checkMinMax:z,getValueEffective:C,getMergeDayTime:(R,ae)=>{let G="";const q=o.isString(R)?o.trim(R):"";let ee=o.isString(ae)?o.trim(ae):"";switch(p.timeType){case"date":G=q;break;case"time":G=C(ee)||"";break;case"datetime":o.isEmpty(q)||(ee=o.isEmpty(ae)?"00:00:00":ee,G=`${q} ${ee}`);break}return G},Dayjs:Me}),e.provide("$DateTimeTopBase",e.readonly(p)),l({getValue:()=>P().value,getValueData:()=>P().info,setValue:R=>{h(R),v.lastStart=g.start,v.lastEnd=g.end}}),(R,ae)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:e.normalizeClass(B.value)},e.toDisplayString(I.value),11,Lp)):n.isDropdown?(e.openBlock(),e.createBlock(kn,{key:1,ref_key:"refElDropdownLayer",ref:c,id:e.unref(s),classParent:k.value,classDropDown:F.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:g.showText,textArrowDirection:y.value,dropdownArrowPos:n.direction,isUseDropdownArrow:n.isUseDropdownArrow,appendContainer:n.appendContainer,appendFollowWidth:!1,onOnChangeOpen:J,onOnClear:Y},{textExtend:e.withCtx(()=>[e.createVNode(ye,{name:p.timeType==="time"?"clock":"calendar",className:"datetime-icon","aria-hidden":"true"},null,8,["name"])]),dropdown:e.withCtx(()=>[e.createVNode(Ka,{ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:g.start,end:g.end,minDate:n.minDate,maxDate:n.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:ne,onOnClose:ce,onOnInitComplete:Q},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(s),class:e.normalizeClass(k.value)},[p.isInit?(e.openBlock(),e.createBlock(Ka,{key:0,ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:g.start,end:g.end,minDate:n.minDate,maxDate:n.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:ne,onOnClose:ce,onOnInitComplete:Q},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,$p))}}),Pp=["id"],Rp={class:"dropdownLayer-text-render"},Hp={class:"dropdownLayer-text-arrow"},Up=["id"],zp=["aria-labelledby"],Ql=e.defineComponent({name:"ClDropdownMenu",__name:"Index",props:{id:String,className:String,classDropDown:String,label:String,direction:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseLabelArrow:{type:Boolean,default:!1},isUseDropdownArrow:{type:Boolean,default:!1},transitionEnter:String,transitionLeave:String},emits:{onChangeOpen:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=o.isNonEmptyString(i)?`${i}-label`:void 0,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let w={"panel-dropdown-menu":!0};return w=o.getJsonMerge(w,de.getClassNameJson(a.className)),Object.keys(w).join(" ")}),s=e.ref([]),c=e.ref(void 0),m=e.reactive({isOpen:!1}),p=()=>s.value.filter(w=>!w.disabled),g=()=>{p().some(C=>C.id===c.value)||(c.value=void 0)},v=w=>{w&&(c.value=w.id,w.focus())},y=w=>{const M=p();if(M.length===0)return;const C=M.findIndex(U=>U.id===c.value);let T;C<0?T=w>0?0:M.length-1:T=(C+w+M.length)%M.length,v(M[T])},k=w=>{s.value.some(M=>M.id===w.id)||s.value.push(w),g()},F=w=>{s.value=s.value.filter(M=>M.id!==w.id),c.value===w.id&&(c.value=void 0),g()},B=()=>c.value,I=w=>{c.value=w},A=()=>{const w=d.value?.$el;return w?w.querySelector(".dropdownLayer-text"):null},N=w=>{if(m.isOpen)switch(w.key){case"ArrowDown":w.preventDefault(),y(1);break;case"ArrowUp":w.preventDefault(),y(-1);break;case"Home":{w.preventDefault();const M=p();v(M[0]);break}case"End":{w.preventDefault();const M=p();v(M[M.length-1]);break}}},x=()=>{A()?.focus()},V=w=>{t("onChangeOpen",w),m.isOpen=w,w?c.value=void 0:x()};return e.onMounted(()=>{document.addEventListener("keydown",N,!0)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",N,!0)}),e.provide("$DropdownmenuTop",e.reactive({hideDropdown:()=>{d.value?.setOpen(!1)},registerItem:k,unregisterItem:F,activeItemId:B,setActiveItemId:I})),(w,M)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(i),classParent:u.value,classDropDown:n.classDropDown,dropdownArrowPos:n.direction,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,onOnChangeOpen:V},{label:e.withCtx(()=>[n.isUseLabelArrow?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"dropdownLayer-text-container"},[e.createElementVNode("div",Rp,[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),e.createElementVNode("div",Hp,[e.createVNode(ye,{name:"angle-down"})])],8,Pp)):(e.openBlock(),e.createElementBlock("span",{key:1,id:e.unref(r)},[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],8,Up))]),dropdown:e.withCtx(()=>[e.createElementVNode("ul",{role:"menu","aria-labelledby":e.unref(r)},[e.renderSlot(w.$slots,"default")],8,zp)]),_:3},8,["id","classParent","classDropDown","dropdownArrowPos","dropDownPos","isUseDropdownArrow","transitionEnter","transitionLeave"]))}}),Jp=["id"],Kp=["id","tabindex","aria-disabled"],Zl=e.defineComponent({name:"ClDropdownMenuItem",__name:"Item",props:{id:String,className:String,url:String,disabled:{type:Boolean,default:!1},isDivider:{type:Boolean,default:!1},extData:Object},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.inject("$DropdownmenuTop"),d=e.useTemplateRef("refElItem"),u=o.isNonEmptyString(i)?i:`dropdownMenuItem-${o.getRandom(8)}`,s=e.computed(()=>{let v={"dropdownMenu-item":!0,"dropdownMenu-item-disabled":a.disabled,"panel-dropdown-menu-item":!0};return v=o.getJsonMerge(v,de.getClassNameJson(a.className)),v}),c=e.computed(()=>{if(!(a.disabled||a.isDivider))return r?.activeItemId()===u?0:-1}),m=()=>{d.value?.focus()},p=()=>{a.disabled||r?.setActiveItemId(u)};e.onMounted(()=>{a.isDivider||r?.registerItem({id:u,disabled:a.disabled,focus:m})}),e.onBeforeUnmount(()=>{a.isDivider||r?.unregisterItem({id:u,disabled:a.disabled,focus:m})});const g=()=>{a.disabled||(r?.hideDropdown(),t("onClick",a.extData))};return(v,y)=>n.isDivider?(e.openBlock(),e.createElementBlock("li",{key:0,id:e.unref(i),role:"separator",class:"dropdownMenu-divider"},null,8,Jp)):(e.openBlock(),e.createElementBlock("li",{key:1,id:e.unref(i),role:"menuitem",tabindex:c.value,"aria-disabled":n.disabled?"true":void 0,class:e.normalizeClass(s.value),ref_key:"refElItem",ref:d,onFocus:p},[e.createVNode(Nt,{url:n.url,disabled:n.disabled,isHideUnderline:!0,onOnClick:g},{default:e.withCtx(()=>[e.renderSlot(v.$slots,"default")]),_:3},8,["url","disabled"])],42,Kp))}}),ei=e.defineComponent({name:"ClDropdownPopup",__name:"Index",props:{id:String,className:{type:String,default:""},dropdownArrowPos:{type:String,default:"center"},dropDownPos:{type:String,default:"up"},isUseDropdownArrow:{type:Boolean,default:!0},appendContainer:{type:String,default:""},transitionEnter:{type:String,default:"animated fadeIn"},transitionLeave:{type:String,default:"animated fadeOut"},triggers:{type:String,default:"click"}},emits:{onChangeOpen:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let v={"panel-dropdown-popup":!0};return v=o.getJsonMerge(v,de.getClassNameJson(t.className)),Object.keys(v).filter(y=>v[y]).join(" ")}),s=v=>{i("onChangeOpen",v)};return l({setOpen:v=>{if(!d.value){Se.warn("DropdownPopup","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(v)},calculationPosition:()=>{if(!d.value){Se.warn("DropdownPopup","子组件尚未挂载,calculationPosition 调用已忽略");return}d.value.calculationPosition()},initCompleteOpen:()=>{if(!d.value){Se.warn("DropdownPopup","子组件尚未挂载,initCompleteOpen 调用已忽略");return}d.value.initCompleteOpen()},checkCurrentIsOpen:()=>{if(!d.value){Se.warn("DropdownPopup","子组件尚未挂载,checkCurrentIsOpen 调用已忽略");return}return d.value.checkIsShowOpen()}}),(v,y)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:u.value,classDropDown:"dropdownPopup-dropdown",dropdownArrowPos:n.dropdownArrowPos,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,appendContainer:n.appendContainer,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,triggers:n.triggers,onOnChangeOpen:s},{label:e.withCtx(()=>[e.renderSlot(v.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(v.$slots,"dropdown")]),_:3},8,["id","classParent","dropdownArrowPos","dropDownPos","isUseDropdownArrow","appendContainer","transitionEnter","transitionLeave","triggers"]))}}),Wp=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],jp={color:Wp,title:{textStyle:{fontWeight:"normal",color:"#008acd"}},visualMap:{itemWidth:15,color:["#5ab1ef","#e0ffff"]},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#008acd"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},timeline:{lineStyle:{color:"#008acd"},controlStyle:{color:"#008acd",borderColor:"#008acd"},symbol:"emptyCircle",symbolSize:3},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},candlestick:{itemStyle:{color:"#d87a80",color0:"#2ec7c9"},lineStyle:{width:1,color:"#d87a80",color0:"#2ec7c9"},areaStyle:{color:"#2ec7c9",color0:"#b6a2de"}},scatter:{symbol:"circle",symbolSize:4},map:{itemStyle:{color:"#2ec7c9"},label:{color:"#000000"}},graph:{itemStyle:{color:"#d87a80"},linkStyle:{color:"#2ec7c9"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#2ec7c9"],[.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}}},Yp=["id"],ia=e.defineComponent({name:"ClEcharts",__name:"Index",props:{id:String,chartOption:Object,className:String,height:{type:[Number,String],default:400},isRunLoad:{type:Boolean,default:!1}},emits:["onInitFirst","onHideResize","onError"],setup(n,{expose:l,emit:a}){let t=null,i=!1;const r=()=>(t||(t=import("echarts")),t),d=n,u=a,s=d.id,c=e.useTemplateRef("refElChart"),m=e.reactive({isShowLoad:d.isRunLoad,isEmptyData:!1}),p={resizeEvent:null,chartObject:null,initTimer:null,isHideEmit:!1},g=e.computed(()=>{let M={"panel-echarts":!0,"chart-loading":m.isShowLoad||m.isEmptyData};return M=o.getJsonMerge(M,de.getClassNameJson(d.className)),M}),v=e.computed(()=>{const M={};return(m.isShowLoad||m.isEmptyData)&&(M.height="100%"),M}),y=e.computed(()=>{const M={},{height:C}=d;return typeof C=="number"&&o.isFinite(C)&&C>0?M.height=`${C}px`:o.isNonEmptyString(C)&&(M.height=C),M}),k=()=>{u("onHideResize")},F=()=>{u("onInitFirst")},B=()=>{p.chartObject&&p.chartObject.resize()},I=async M=>{if(!c.value)return;const C=o.isEmpty(M);if(m.isEmptyData=C,!C&&M)try{const T=await r();i||(T.registerTheme("macarons",jp),i=!0),p.chartObject||(p.chartObject=T.init(c.value,"macarons"),p.initTimer=setTimeout(()=>{F()},50)),p.chartObject.setOption(M,!0),B()}catch{p.initTimer&&(clearTimeout(p.initTimer),p.initTimer=null),u("onError","图表配置异常")}else p.chartObject&&p.chartObject.clear()},A=()=>{p.chartObject&&(de.isHiddenParent(c.value)?p.isHideEmit||(p.isHideEmit=!0,k()):(p.isHideEmit&&(p.isHideEmit=!1),B()))},N=()=>{I(d.chartOption)};return e.onMounted(()=>{p.resizeEvent=new je.Resize({callback:()=>{A()}}),e.nextTick(()=>{N()})}),e.onBeforeUnmount(()=>{p.resizeEvent&&p.resizeEvent.destroy(),p.initTimer&&clearTimeout(p.initTimer),p.chartObject&&(p.chartObject.dispose(),p.chartObject=null)}),e.onActivated(()=>{p.resizeEvent||(p.resizeEvent=new je.Resize({callback:()=>{A()}})),e.nextTick(()=>{B()})}),e.onDeactivated(()=>{p.resizeEvent&&(p.resizeEvent.destroy(),p.resizeEvent=null)}),e.watch(()=>d.isRunLoad,M=>{m.isShowLoad=M}),e.watch(()=>d.chartOption,M=>{I(M)}),l({getChartObject:()=>p.chartObject,getChartElement:()=>c.value,resize:()=>{B()}}),(M,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(g.value),style:e.normalizeStyle(v.value)},[e.renderSlot(M.$slots,"chartHead"),e.createElementVNode("div",{ref_key:"refElChart",ref:c,style:e.normalizeStyle(y.value),role:"img","aria-label":"图表"},null,4),e.createVNode(Gt,{isLoadIng:m.isShowLoad,isEmpty:m.isEmptyData},{nothingData:e.withCtx(()=>[e.renderSlot(M.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty"])],14,Yp))}}),qp={key:0,class:"lineAxisTag-head"},Xp={class:"lineAxisTag-list"},Gp="其他",ti=e.defineComponent({name:"ClEchartsLineAxisTag",__name:"Index",props:{id:String,className:String,type:{type:String,validator:n=>n==="day"||n==="hour"},height:{type:Number,default:400,validator:n=>n>0},isRunLoad:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isTagShow:{type:Boolean,default:!0},tagList:{type:Array,default:()=>[]},tagSelectCountMax:{type:Number,validator:n=>n>0&&n<=2,default:2},tagInitValue:{type:String,default:""},tagSort:{type:Array,default:()=>[]},xAxisLen:{type:Number,default:-1},xAxisKey:{type:String,default:"name"},xAxisIsShowOther:{type:Boolean,default:!1},isShowY:{type:Boolean,default:!0},isYMinZero:{type:Boolean,default:!0},ySpace:{type:Number,default:5,validator:n=>n>0},yRatio:{type:Number,default:1.5},isYEqual:{type:Boolean,default:!1},seriesType:{type:String,default:"line",validator:n=>o.isString(n)&&n.split(",").every(l=>l==="line"||l==="bar")},tipFormat:String,seriesFormat:String,isShowLineBg:{type:Boolean,default:!0},isXBoundaryGap:{type:Boolean,default:!0},gridInfo:{type:Object,default:()=>({})}},emits:["onInitFirst","onHideResize","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=S=>{i("onError",S)},d=`echartsLineAxisTag-${o.getRandom(5)}`,u=t.id,s=e.useTemplateRef("refElChart"),c=e.ref(),m=e.ref([]),p=e.computed(()=>o.isArray(t.tagList)?t.tagList.filter(S=>!o.isUndefined(S)&&!o.isUndefined(S.id)):[]),g={tagSort:[],tagJson:{},chartTagJson:{},useSeriesType:["line","bar"],isInited:!1},v=e.computed(()=>{const S=t.seriesType,E=o.isNonEmptyString(S)?S.split(","):[],f=E.length===1?E[0]:"line",D=t.tagSelectCountMax>0?t.tagSelectCountMax:2,h=E.length-1,b=[];for(let _=0;_<D;_++)b.push(_<=h&&g.useSeriesType.indexOf(E[_])>-1?E[_]:f);return b}),y=e.computed(()=>{let S={"panel-echarts-line-axis-tag":!0};return S=o.getJsonMerge(S,de.getClassNameJson(t.className)),o.getStringByJson(S," ")}),k=()=>{i("onHideResize")},F=()=>{i("onInitFirst")},B=()=>{let S=[];const E={};if((o.isArray(t.tagList)?t.tagList:[]).forEach(D=>{if(o.isUndefined(D)||o.isUndefined(D.id))return;const h=D.id.toString();E[h]=D,S.push(h)}),!o.isEmpty(t.tagSort)){const D=[];t.tagSort.forEach(h=>{o.isExistJsonKey(E,h)&&D.push(h)}),D.length>0&&(S=D)}g.tagSort=S,g.tagJson=E},I=S=>{if(S.length===0)return[];const E=t.tagSelectCountMax;return Array.from(new Set(S)).sort((D,h)=>g.tagSort.indexOf(D)-g.tagSort.indexOf(h)).slice(0,E)},A=S=>{let E=[];o.isNonEmptyString(S)&&(S.split(",").forEach(f=>{o.isExistJsonKey(g.tagJson,f)&&E.push(f)}),E=I(E)),m.value=E},N=S=>{const E={name:[],allName:[]},f={},D=[],h={};g.tagSort.forEach(_=>{const O=o.getJsonClone(g.tagJson[_],!0);O.aliasName=o.isUndefined(O.nameFormat)?O.name:o.convertStringFormat(O.nameFormat,O),O.data=[],O.alldata=[],f[_]=O,h[_]=0});let b=S.length;return t.xAxisLen>0&&(b=b>t.xAxisLen?t.xAxisLen:b),S.forEach((_,O)=>{O<b&&D.push(_);let P=o.isExistJsonKey(_,t.xAxisKey)?_[t.xAxisKey]:"";(o.isUndefined(P)||P===null)&&(P=""),E.allName.push(P),O<b&&(t.type==="day"&&(P=o.getValueByFormat(P,"date",{dateFormat:"MM.DD"})),E.name.push(P)),g.tagSort.forEach(J=>{if(o.isExistJsonKey(_,J)){let Y=Number(_[J]);o.isFinite(Y)||(Y=0),f[J].alldata.push(Y),O<b?f[J].data.push(Y):h[J]+=Y}else f[J].alldata.push(0),O<b&&f[J].data.push(0)})}),{x:E,y:f,data:D,other:h,isEmptyData:b===0}},x=()=>{const S=I(m.value),E=v.value,{xAxisLen:f,xAxisIsShowOther:D,ySpace:h,yRatio:b,isYMinZero:_,isYEqual:O}=t;return S.map((P,J)=>{const Y=g.tagJson[P];let ne=_;return ne=o.isBoolean(Y.isYMinZero)?Y.isYMinZero:ne,{name:P,color:Y.color||null,type:E[J],len:f,isShowOther:D,ySpace:h,yMaxRatio:J===1?O?1:b:1,isYMinZero:ne}})},V=(S,E,f,D)=>{if(S.length===0)return{min:0,max:1,interval:1};const h=E>0?E:1,b=S.map(X=>X.value);let _=b.reduce((X,Q)=>Math.min(X,Q));_=o.getNumCeil(_,{isEndFive:Number(_)<100});let O=b.reduce((X,Q)=>Math.max(X,Q));O=O*1.02,O=o.getNumCeil(O,{isEndFive:Number(_)<100});const P=D?0:_,J=f>1?f:1;let Y=O*J-P;Y<=0&&(Y=1);let ne=o.getNumCeil(Y/h,{isEndFive:Number(_)<100}),ce=Number((h*ne).toFixed(2))+P;return P===ce&&ce===0&&(ce=1,ne=1/h),{min:P,max:ce,interval:ne}},w=(S,E)=>{const f=[],D=[],h=[];let b=[];const _=v.value,O=_.length>0&&_.every(P=>P==="line");if(E.forEach((P,J)=>{const Y=S.y[P.name],ne=Y.name;f.push(ne);const ce={};Y.valueFormat&&(ce.tipValueFormat=Y.valueFormat);let X=[];S.isEmptyData?X=[]:(X=Y.data.map((K,W)=>{const R={value:K,extInfo:o.getJsonClone(ce)};return R.extInfo.xValueOriginal=S.x.allName[W],R}),P.isShowOther&&P.len>0&&P.len<Y.alldata.length&&X.push({value:o.getValueByFormat(S.other[P.name],"num"),extInfo:ce}));const Q={name:ne,type:P.type,yAxisIndex:J,data:X};o.isEmpty(P.color)||(Q.itemStyle={color:P.color}),O&&t.isShowLineBg&&(Q.areaStyle={}),D.push(Q);const le=V(X,P.ySpace,P.yMaxRatio,P.isYMinZero);h.push({type:"value",name:Y.aliasName,nameLocation:"end",nameTextStyle:{color:"#aaa"},splitNumber:P.ySpace,min:S.isEmptyData?0:le.min,max:S.isEmptyData?1:le.max,interval:S.isEmptyData?1:le.interval,axisLine:{show:!0}})}),S.isEmptyData||(b=o.getArrClone(S.x.name),E[0].isShowOther&&E[0].len>0&&E[0].len<S.x.allName.length&&b.push(Gp)),h.length===2&&t.isYEqual){const P=[h[0].min,h[1].min],J=[h[0].max,h[1].max],Y=Math.min.apply(null,P),ne=Math.max.apply(null,J),ce=t.ySpace>0?t.ySpace:1,X=(ne-Y)/ce,Q=Y,le=o.getNumCeil(X),K=Number((ce*le).toFixed(2))+Q;h[0].min=h[1].min=Q,h[0].max=h[1].max=K,h[0].interval=h[1].interval=le}return{legendData:f,series:D,yAxis:h,xNames:b,xAxisBoundaryGap:t.isShowLineBg?!O:t.isXBoundaryGap}},M=S=>{const E=x();if(E.length===0){c.value={};return}const f=w(S,E),D={chartType:t.type,dataOriginal:S.data,element:s.value?.getChartElement(),tipTitleFormat:t.tipFormat,seriesNameFormat:t.seriesFormat},h=Ri.getOptionAxis(D);h.legend.show=!1,h.legend.data=f.legendData,h.xAxis.data=f.xNames,h.yAxis=f.yAxis,h.series=f.series,h.xAxis.boundaryGap=f.xAxisBoundaryGap,h.grid.top="40px",h.grid.left=f.yAxis[0].max===0?"20px":"auto",h.grid.right=f.yAxis.length>1&&f.yAxis[1].max===0?"20px":"auto",h.yAxis.length===1&&!f.xAxisBoundaryGap&&(h.grid.right="20px");const{gridInfo:b}=t;o.isEmpty(b)||["top","left","right","bottom"].forEach(_=>{const O=b[_];o.isEmpty(O)||(h.grid[_]=O)}),h.yAxis.forEach(_=>{_.show=t.isShowY}),c.value=h},C=S=>{const E=o.isArray(S)?S:[];if(g.isInited=!0,g.chartTagJson=N(E),E.length===0){c.value={};return}M(g.chartTagJson)},T=()=>{B(),A(t.tagInitValue),C(t.list)};e.onMounted(()=>{e.nextTick(()=>{g.isInited||T()})}),e.watch([()=>t.list,()=>t.tagList,()=>t.tagSort,()=>t.tagInitValue],()=>{B();const S=m.value.some(E=>!g.tagJson[E]);(m.value.length===0||S)&&A(t.tagInitValue),C(t.list)});const U=S=>{if(o.isUndefined(S))return;const E=S.toString();let f=[];switch(t.tagSelectCountMax){case 1:f=[E];break;case 2:{f=o.getArrClone(m.value);const D=f.indexOf(E);D>-1?f.length>1&&f.splice(D,1):(f.push(E),f.length>2&&f.splice(0,1));break}}m.value=f,M(g.chartTagJson)},Z=()=>{F()},z=()=>{k()};return l({resize:()=>{s.value?.resize()}}),(S,E)=>(e.openBlock(),e.createBlock(ia,{ref_key:"refElChart",ref:s,id:e.unref(u),chartOption:c.value,className:y.value,height:n.height,isRunLoad:n.isRunLoad,onOnInitFirst:Z,onOnHideResize:z,onOnError:r},{chartHead:e.withCtx(()=>[n.isTagShow?(e.openBlock(),e.createElementBlock("div",qp,[e.createElementVNode("div",null,[e.renderSlot(S.$slots,"title")]),e.createElementVNode("div",Xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(f,D)=>(e.openBlock(),e.createElementBlock("span",{key:`${d}-list-${f.id}-${D}`,class:e.normalizeClass({active:m.value.indexOf(f.id.toString())>-1})},[e.createVNode(Ze,{color:"white",label:f.name,onOnClick:h=>U(f.id)},null,8,["label","onOnClick"])],2))),128))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),nothingData:e.withCtx(()=>[e.renderSlot(S.$slots,"nothingData")]),_:3},8,["id","chartOption","className","height","isRunLoad"]))}}),Qp={class:"framephone-statusbar"},Zp={class:"framephone-statusbar-time"},ef={class:"framephone-screen-outer"},ni=e.defineComponent({name:"ClFramePhone",__name:"Index",props:{className:String,width:{type:String,default:"430px"},height:{type:String,default:"750px"},statusBarText:{type:String,default:"9:41"}},setup(n){const l=`fh_${o.getRandom(7)}`,a=e.ref(!1);e.onMounted(()=>{a.value=!0});const t=n,i=e.computed(()=>{const d={"cl-framephone":!0};return o.isNonEmptyString(t.className)&&o.split(t.className," ").forEach(u=>{o.isEmpty(u)||(d[u]=!0)}),d}),r=e.computed(()=>{const d={};return o.isNonEmptyString(t.width)&&(d.width=t.width),o.isNonEmptyString(t.height)&&(d.height=t.height),d});return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value),style:e.normalizeStyle(r.value)},[u[1]||(u[1]=e.createElementVNode("div",{class:"framephone-notch"},null,-1)),e.createElementVNode("div",Qp,[e.createElementVNode("span",Zp,e.toDisplayString(n.statusBarText),1),u[0]||(u[0]=e.createElementVNode("span",{class:"framephone-statusbar-signal"},[e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-1"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-2"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-3"})],-1))]),e.createElementVNode("div",ef,[e.createElementVNode("div",{class:"framephone-screen",id:l},[a.value?e.renderSlot(d.$slots,"default",{key:0,screenId:l}):e.createCommentVNode("",!0)])]),u[2]||(u[2]=e.createElementVNode("div",{class:"framephone-home"},null,-1))],6))}}),tf={key:0},nf={key:1},of={class:"inputTag-operate"},Wa=e.defineComponent({name:"ClInputTagInput",__name:"Input",props:{value:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:Boolean,isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:String,joinKey:{type:String,default:","},isDropdownLayer:{type:Boolean,default:!0},textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean},emits:["onInit","onChange","onChangeInput","onFocus"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$InputTagTop"),d=e.useTemplateRef("refElTag"),u=e.useTemplateRef("refElTextarea"),s=e.useTemplateRef("refElInput"),c=e.reactive({isFocus:!1}),m=e.ref([]),p=e.ref([]),g=e.ref(""),v=e.computed(()=>!o.isEmpty(p.value)||!o.isEmpty(g.value)),y=e.computed(()=>t.isClean&&!t.disabled&&v.value),k=e.computed(()=>({"dropdownLayer-text-container":t.isDropdownLayer,"inputTag-container":!0,"inputTag-multiple":t.multiple,"inputTag-focus":c.isFocus})),F=e.computed(()=>{const ne={};return t.multiple&&(t.disabled?ne["min-height"]="40px":o.isNonEmptyString(t.minHeight)&&p.value.length>0&&(ne["min-height"]=t.minHeight)),ne}),B=e.computed(()=>{const ne={},{multiple:ce,tagsMaxHeight:X}=t;return ce&&o.isNonEmptyString(X)&&(ne["max-height"]=X),ne}),I=(ne="tag")=>{const ce=w();i("onChange",ce,ne)},A=()=>{e.nextTick(()=>{i("onInit")})},N=ne=>{i("onChangeInput",ne)},x=ne=>{i("onFocus",ne)},V=()=>{let ne="";if(t.multiple){const ce=t.copyJoinKey+(t.isCopyMultipleWrap?`
8
- `:"");ne=p.value.join(ce)}else ne=g.value;return ne},w=()=>t.multiple?p.value.join(t.joinKey||","):g.value,M=ne=>{if(o.isEmpty(ne))m.value=[],p.value=[],g.value="";else if(ne!==w())if(t.multiple){const ce=[],X=[];o.split(ne,t.joinKey||",").forEach(Q=>{const le=o.trim(Q);!o.isEmpty(le)&&!o.isExistValue(X,le)&&(ce.push({id:`inputTag_${o.getRandom(8)}`,name:le}),X.push(le))}),m.value=ce,p.value=Array.from(new Set(X))}else g.value=ne},C=ne=>{const ce=o.trim(ne);d.value&&d.value.addInfo({id:`inputTag_${o.getRandom(8)}`,name:ce}),u.value&&(u.value.initHeight(),u.value.setValue(""))},T=()=>{t.multiple?u.value&&u.value.focus():s.value&&s.value.focus()},U=(ne,ce=!0)=>{if(t.multiple){const X=e.toRaw(p.value);o.split(ne,t.joinKey||",").forEach(Q=>{const le=o.trim(Q);if(!o.isEmpty(le))if(ce)C(le),o.isExistValue(X,le)||X.push(le);else{const K=m.value.findIndex(R=>R.name===le);K>-1&&m.value.splice(K,1);const W=X.indexOf(le);W>-1&&X.splice(W,1)}}),p.value=Array.from(new Set(X))}else g.value=ce?ne:"";t.multiple&&T(),I("drop")},Z=()=>{M(t.value??""),A()};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.watch(()=>t.value,(ne,ce)=>{ne!==ce&&ne!==w()&&(M(ne??""),u.value&&(u.value.setValue(""),u.value.initHeight()))});const z=ne=>{if(t.multiple){const ce=u.value?u.value.getParentElement():null;(!ce||!ce.contains(ne.target))&&T()}else T()},H=ne=>{if(ne.isComposing||ne.keyCode===229||ne.shiftKey)return;const ce=r?r.getListHoverValueKeydown():"";o.isEmpty(ce)&&(ne.preventDefault(),ne.stopPropagation())},S=ne=>{if(ne.isComposing||ne.keyCode===229||ne.shiftKey)return;const ce=ne.target.value,X=r?r.getListHoverValueKeydown():"";if(o.isEmpty(X)){if(ne.preventDefault(),ne.stopPropagation(),!o.isEmpty(ce)){const Q=e.toRaw(p.value);let le=[];o.isExistValue(ce,`
9
- `)?o.split(ce,`
10
- `).forEach(K=>{o.isEmpty(K)||le.push(...o.split(K,t.joinKey||","))}):le=o.split(ce,t.joinKey||","),le.forEach(K=>{const W=o.trim(K);o.isEmpty(W)||(C(W),o.isExistValue(Q,W)||Q.push(W))}),p.value=Array.from(new Set(Q)),I()}}else u.value&&(u.value.initHeight(),u.value.setValue(""))},E=()=>{c.isFocus=!0,x(w())},f=()=>{c.isFocus=!1},D=()=>{if(!d.value)return;const ne=d.value.getData();p.value=ne.filter(ce=>o.isNonEmptyString(ce.name)).map(ce=>ce.name),m.value=ne,N(""),I()},h=()=>{m.value=[],p.value=[],g.value="",u.value&&(u.value.setValue(""),u.value.initHeight()),I(),T()},b=ne=>{N(ne)},_=()=>{x(g.value)};return l({getValue:()=>w(),setValue:ne=>{M(ne),u.value&&(u.value.setValue(""),u.value.initHeight())},focus:()=>{T()},updateValue:(ne,ce=!0)=>{U(ne,ce)}}),(ne,ce)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value),style:e.normalizeStyle(F.value),onClick:e.withModifiers(z,["stop"])},[n.multiple?(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",{class:"inputTag-tags",style:e.normalizeStyle(B.value)},[e.createVNode(Xn,{ref_key:"refElTag",ref:d,disabled:n.disabled,list:m.value,onOnRemove:D},null,8,["disabled","list"])],4),e.withDirectives(e.createVNode(qn,{ref_key:"refElTextarea",ref:u,height:"24px",heightMax:n.textMaxHeight,disabled:n.disabled,placeholder:n.disabled?"":n.placeholder,isClean:!1,isAutoHeight:!0,onOnKeydownEnter:H,onOnKeyupEnter:S,onOnFocus:E,onOnBlur:f,onOnChangeDelay:b},null,8,["heightMax","disabled","placeholder"]),[[e.vShow,!n.disabled]])])):(e.openBlock(),e.createElementBlock("div",nf,[e.createVNode(Pe,{ref_key:"refElInput",ref:s,value:g.value,"onUpdate:value":ce[0]||(ce[0]=X=>g.value=X),placeholder:n.placeholder,isClean:!1,disabled:n.disabled,onOnFocus:_,onOnChangeDelay:b},null,8,["value","placeholder","disabled"])])),e.createElementVNode("div",of,[n.isShowNum&&n.multiple&&p.value.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:p.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),y.value?(e.openBlock(),e.createBlock(ye,{key:2,name:"close-circle-fill",className:"inputTag-operate-btn","aria-label":"清空",tabindex:"-1",role:"button",onClick:e.withModifiers(h,["stop"]),onKeydown:[e.withKeys(e.withModifiers(h,["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(h,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isCopy&&v.value?(e.openBlock(),e.createBlock(hn,{key:4,className:"inputTag-operate-btn",textLabel:V})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],6))}}),af={class:"dropdownLayer-list-container"},lf={key:0,class:"dropdownLayer-list-search"},sf={key:2,class:"dropdownLayer-list-checkboxAll"},rf=["aria-activedescendant"],cf=["id","aria-selected","aria-disabled","onClick","onMouseenter","onMouseleave"],uf={key:0,class:"dropdownLayer-list-checkbox"},df=["innerHTML"],mf={key:1},pf={key:0,class:"dropdownLayer-list-empty"},ff={key:1,class:"inputTag-load"},hf=180,gf=50,vf=100,yf=130,kf=e.defineComponent({name:"ClDropdownlayerSearchList",__name:"Dropdown",props:{isSearch:Boolean,searchValue:String,searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].indexOf(n)>-1},isMultiple:Boolean,isCheckBoxAll:Boolean,showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,selectId:{type:Array,default:()=>[]},isShowEmptyLabel:{type:Boolean,default:!0},isShowLoading:Boolean,serverCallback:Function},emits:["onChange","onSearchResult","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.inject("$InputTagTop"),s=e.useTemplateRef("refElSearch"),c=e.useTemplateRef("refElList"),m=`inputtag-${o.getRandom(5)}`;let p=0,g=0,v=0,y=0,k=!1,F=!1;const B={start:-1,end:-1,limit:50},I=e.reactive({isRunLoading:!1}),A=`dropdownLayer-list-${t.keyIndex||m}`,N=e.ref(""),x=e.ref([]),V=e.ref([]);let w=[],M=[],C=!1;const T={isScrollLoadIng:!1},U=e.computed(()=>{let oe=!1;return V.value.length>0&&t.selectId.length>=V.value.length&&(oe=o.isContainArr(t.selectId.map(te=>te.toString()),V.value)),oe}),Z=e.computed(()=>new Set(t.selectId.map(oe=>oe.toString()))),z=(oe,L)=>{i("onChange",oe,L)},H=(oe,L)=>{i("onSearchResult",{search:o.isNonEmptyString(oe)?oe:"",isEmpty:L})},S=oe=>{i("onError",oe)},E=oe=>o.isEmpty(oe)?[]:oe.filter(L=>L?o.isString(L.id)&&!o.isEmpty(L.id)||o.isNumber(L.id)&&o.isFinite(L.id):!1),f=async oe=>{v++;const L=v;let te=[];if(t.serverCallback){t.isShowLoading&&(I.isRunLoading=!0);try{if(te=await t.serverCallback({search:oe,offset:0}),L!==v)return;e.nextTick(()=>{L===v&&(I.isRunLoading=!1,u&&u.convertListToJson(te),e.nextTick(()=>{D(oe,te)}))})}catch{L===v&&(I.isRunLoading=!1,S("服务端搜索失败,请稍后重试"))}}else if(o.isEmpty(oe))te=t.originalData,D(oe,te);else if(o.isNonEmptyString(oe)){const ue=oe.toLowerCase(),pe=t.searchKey.length,he=t.searchKey;t.originalData.forEach(Ce=>{const Ee=[];for(let xe=0;xe<pe;xe++){const Ie=Ce[he[xe]];o.isNonEmptyString(Ie)&&Ie.toLowerCase().indexOf(ue)>-1&&Ee.push(!0)}if(Ee.length>0)switch(t.searchKeyType){case"||":te.push(Ce);break;case"&&":Ee.length===pe&&te.push(Ce);break}}),D(oe,te)}},D=(oe,L)=>{t.isCascade?(o.isEmpty(oe)||(L=_(L,t.originalData)),M=L,L=b(L)):L=E(L),w=L,x.value=O(0,B.limit),c.value&&(c.value.scrollTop=0),J(0,B.limit),h(),N.value="",H(oe,L.length===0)},h=()=>{const oe=[],L=t.selectId.map(te=>te.toString());w.forEach(te=>{if(o.isEmpty(te.id))return;const ue=te.id.toString();te.isDisabled?o.isExistValue(L,ue)&&oe.push(ue):oe.push(ue)}),V.value=oe},b=oe=>{const L=t.parentKey||"parentId",te=t.topParentValue||"0",ue={};oe.forEach(xe=>{if(o.isEmpty(xe.id))return;const Ie=xe[L];if(!o.isEmpty(Ie)&&Ie.toString()!==te){const Re=Ie.toString();ue[Re]||(ue[Re]=[]),ue[Re].push(xe)}});const pe=[],he=oe.filter(xe=>{if(o.isEmpty(xe.id))return!1;const Ie=xe[L];return o.isEmpty(Ie)||Ie.toString()===te}),Ce=new Set,Ee=(xe,Ie,Re)=>{xe.forEach(Fe=>{const vt=Fe.id.toString();if(Ce.has(vt))return;Ce.add(vt);const Lt=ue[vt]||[];pe.push({...Fe,_level:Ie,_parentName:Re,_hasChildren:Lt.length>0,isDisabled:Fe.isDisabled||Lt.length>0&&!t.parentSelectable}),Lt.length>0&&Ee(Lt,Ie+1,Fe.name)})};return Ee(he,0,""),pe},_=(oe,L)=>{const te=t.parentKey||"parentId",ue=t.topParentValue||"0",pe={},he={};L.forEach(Ie=>{if(o.isEmpty(Ie.id))return;const Re=Ie.id.toString();pe[Re]=Ie;const Fe=Ie[te];!o.isEmpty(Fe)&&Fe.toString()!==ue&&(he[Fe.toString()]||(he[Fe.toString()]=[]),he[Fe.toString()].push(Re))});const Ce=new Set,Ee=new Set;oe.forEach(Ie=>{o.isEmpty(Ie.id)||Ee.add(Ie.id.toString())});const xe=Ie=>{let Re=pe[Ie],Fe=0;for(;Re&&Fe<100;){Ce.add(Re.id.toString());const vt=Re[te];if(o.isEmpty(vt)||vt.toString()===ue)break;Re=pe[vt.toString()],Fe++}};return oe.forEach(Ie=>{if(o.isEmpty(Ie.id))return;const Re=Ie.id.toString();xe(Re),he[Re]&&he[Re].forEach(Fe=>{Ce.add(Fe)})}),L.filter(Ie=>o.isEmpty(Ie.id)?!1:Ce.has(Ie.id.toString()))},O=(oe,L)=>{const te=[],ue=w.length,pe=oe<0?0:oe,he=L<=ue?L:ue;if(pe<he)for(let Ce=pe;Ce<he;Ce++)te.push(w[Ce]);return te},P=(oe,L)=>{let te=0,ue=0;switch(L){case"prev":te=oe-B.limit,ue=oe;break;case"next":te=oe,ue=te+B.limit;break}return O(te,ue)},J=(oe,L)=>{let te=B.start;(te===-1||oe<te)&&(te=oe),te=te<=0?0:te;let ue=B.end;L>ue&&(ue=L),ue=L<=w.length?L:w.length,B.start=te,B.end=ue},Y=()=>{let oe=-1,L="";if(!o.isEmpty(t.selectId)){const pe=t.selectId.map(he=>he.toString());w.some((he,Ce)=>{if(o.isEmpty(he.id))return!1;const Ee=he.id.toString(),xe=o.isExistValue(pe,Ee);return xe&&(oe=Ce,L=Ee),xe})}let te=0,ue=0;oe===-1?(p=0,te=0,ue=B.limit):(te=oe-B.limit*1,ue=oe+B.limit*1),x.value=O(te,ue),B.start=te<=0?0:te,B.end=ue>=w.length?w.length:ue,o.isEmpty(L)||x.value.some((pe,he)=>{if(o.isEmpty(pe.id))return!1;const Ce=pe.id.toString()===L;return Ce&&(p=he),Ce})},ne=oe=>{e.nextTick(()=>{const L=c.value;if(!(!L||!L.children[0]))if(oe>0){const te=L.children[0].children[oe];L.scrollTop=te&&te.offsetTop>hf?te.offsetTop-gf:0}else L.scrollTop=0})},ce=()=>{t.isCascade?(M=E(t.originalData),w=b(M)):w=E(t.originalData),Y(),e.nextTick(()=>{o.isEmpty(t.searchValue)&&(s.value&&s.value.setValue(""),c.value&&ne(p))})},X=async oe=>{const L=Date.now(),te=oe.target,ue=te.scrollTop;if(L-y<150){g=ue;return}y=L;const pe=te.offsetHeight;if(!te.children[0]){g=ue;return}const he=te.children[0].offsetHeight;if(ue>g){if(ue+pe+vf>he&&!T.isScrollLoadIng){if(T.isScrollLoadIng=!0,B.end>=w.length&&t.serverCallback){const Ce=v,Ee=t.searchValue,xe={offset:w.length};o.isEmpty(Ee)||(xe.search=Ee);try{const Ie=await t.serverCallback(xe);if(F)return;Ce===v&&t.searchValue===Ee&&(t.isCascade?(M.push(...E(Ie)),w=b(M)):w.push(...E(Ie)),h(),u&&u.convertListToJson(w))}catch{Ce===v&&S("服务端加载更多失败,请稍后重试")}}if(B.end<w.length){const Ce=P(B.end,"next");x.value.push(...Ce),J(B.start,B.end+B.limit)}T.isScrollLoadIng=!1}}else if(ue<yf&&B.start>0){const Ce=P(B.start,"prev"),Ee=Ce.length;Ee>0&&(x.value.unshift(...Ce),J(B.start-B.limit,B.end),e.nextTick(()=>{const xe=c.value;if(!xe||!xe.children[0])return;let Ie=0;const Re=xe.children[0].children;for(let Fe=0;Fe<Ee&&Re[Fe];Fe++)Ie+=Re[Fe].offsetHeight;xe.scrollTop+=Ie}))}g=ue},Q=()=>{C||e.nextTick(()=>{c.value&&(c.value.addEventListener("scroll",X),C=!0)})},le=oe=>{let L=t.showDropDownTextFormat;if(oe._level>=1&&!o.isEmpty(t.showDropDownTextFormatSub)&&(L=t.showDropDownTextFormatSub),o.isEmpty(L)){if(o.isEmpty(oe.name))return"";const te=oe.name;return o.isString(te)?o.encodeHTML(te):String(te)}return o.convertStringFormatEncodeHTML(L,oe)},K=oe=>{const L=[];return t.isMultiple?(t.selectId.forEach(te=>{te.toString()!==oe&&L.push(te)}),o.isExistValue(t.selectId.map(te=>te.toString()),oe)||L.push(oe)):L.push(oe),L},W=oe=>{const L=x.value;if(L.length===0){N.value="";return}let te=-1;const ue=N.value;ue.length>0?(L.forEach((pe,he)=>{pe.id.toString()===ue&&(te=he)}),te+=oe,te<0?te=0:te>=L.length&&(te=L.length-1)):te=0,N.value=o.isEmpty(L[te].id)?"":L[te].id.toString(),ne(te)},R=oe=>{if(oe.isComposing||oe.keyCode===229)return;let L=oe.keyCode;if(!o.isUndefined(L))switch(L=L.toString(),L){case"13":if(oe.shiftKey)break;oe.preventDefault(),oe.stopPropagation();break;case"38":oe.preventDefault(),oe.stopPropagation(),W(-1);break;case"40":oe.preventDefault(),oe.stopPropagation(),W(1);break}},ae=oe=>{if(oe.isComposing||oe.keyCode===229)return;let L=oe.keyCode;if(!o.isUndefined(L))switch(L=L.toString(),L){case"27":u&&u.setDropdownOpen(!1);break;case"13":{if(oe.shiftKey)break;const te=N.value;if(!o.isEmpty(te)){const ue=x.value.find(pe=>pe.id.toString()===te);if(ue&&!ue.isDisabled){const pe=K(te);z(pe,{id:te,isSelect:t.selectId.map(he=>he.toString()).indexOf(te)===-1})}}break}}},G=()=>{ce(),h(),Q();const{searchValue:oe}=t;o.isNonEmptyString(oe)&&f(oe)};e.onMounted(()=>{G()}),e.onBeforeUnmount(()=>{F=!0,de.offListener(window,"keydown",R,!0),de.offListener(window,"keyup",ae,!0),k=!1,c.value&&c.value.removeEventListener("scroll",X)}),e.watch(()=>t.originalData,oe=>{t.isCascade?(M=E(oe),w=b(M)):w=E(oe),Y(),h(),Q()}),e.watch(()=>t.searchValue,oe=>{f(oe)});const q=oe=>{f(oe)},ee=oe=>{if(!oe||!t.isMultiple)return;const L=t.selectId.map(Ee=>Ee.toString()),te=new Set;w.forEach(Ee=>{Ee.isDisabled&&!o.isEmpty(Ee.id)&&te.add(Ee.id.toString())});const ue=[],pe=[],he=[];V.value.forEach(Ee=>{oe.value?o.isExistValue(L,Ee)||pe.push(Ee):o.isExistValue(L,Ee)&&!te.has(Ee)&&he.push(Ee),ue.push(Ee)});const Ce=o.getArrClone(t.selectId);he.length>0&&he.forEach(Ee=>{const xe=Ce.findIndex(Ie=>Ie.toString()===Ee);xe>-1&&Ce.splice(xe,1)}),pe.length>0&&Ce.push(...pe),z(Ce,{id:ue,isSelect:oe.value})},$=oe=>{if(!oe.isDisabled&&!o.isEmpty(oe.id)){const L=oe.id.toString(),te=K(L);z(te,{id:L,isSelect:t.selectId.map(ue=>ue.toString()).indexOf(L)===-1})}},j=oe=>{!oe||o.isEmpty(oe.id)||(N.value=oe.id.toString())},se=oe=>{!oe||o.isEmpty(oe.id)||N.value===oe.id.toString()&&(N.value="")};return l({initOpenShow:oe=>{oe?k||(de.onListener(window,"keydown",R,!0),de.onListener(window,"keyup",ae,!0),k=!0):k&&(de.offListener(window,"keydown",R,!0),de.offListener(window,"keyup",ae,!0),k=!1)},getHoverKeydown:()=>N.value}),(oe,L)=>(e.openBlock(),e.createElementBlock("div",af,[I.isRunLoading?(e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(Gt,{isLoadIng:I.isRunLoading},null,8,["isLoadIng"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isSearch?(e.openBlock(),e.createElementBlock("div",lf,[e.createVNode(Xt,{ref_key:"refElSearch",ref:s,placeholder:n.searchPlaceholder,onOnChange:q},null,8,["placeholder"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isMultiple&&n.isCheckBoxAll?(e.openBlock(),e.createElementBlock("div",sf,[e.createVNode(mt,{forId:`${A}-cb-all`,label:e.unref(r).checkboxAll,value:U.value,onOnChange:ee},null,8,["forId","label","value"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-body",ref_key:"refElList",ref:c},[x.value.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,role:"listbox","aria-activedescendant":N.value?`${A}-opt-${N.value}`:void 0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(te,ue)=>(e.openBlock(),e.createElementBlock("li",{key:`${m}-${te.id}-${ue}`,id:`${A}-opt-${te.id}`,role:"option","aria-selected":Z.value.has(te.id.toString()),"aria-disabled":te.isDisabled,class:e.normalizeClass({"option-selected":Z.value.has(te.id.toString()),"option-disabled":te.isDisabled,"option-hoverKeydown":N.value===te.id.toString(),"inputTag-dropdown-item-child":te._level>=1}),style:e.normalizeStyle({paddingLeft:te._level?te._level*20+"px":void 0}),onClick:pe=>$(te),onMouseenter:pe=>j(te),onMouseleave:pe=>se(te)},[e.createElementVNode("div",null,[n.isMultiple?(e.openBlock(),e.createElementBlock("div",uf,[e.createVNode(mt,{name:`${A}-cb`,forId:`${A}-cb-${te.id}`,value:Z.value.has(te.id.toString()),disabled:te.isDisabled},null,8,["name","forId","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-title",innerHTML:le(te)},null,8,df)])],46,cf))),128))],8,rf)):(e.openBlock(),e.createElementBlock("ul",mf,[n.isShowEmptyLabel?(e.openBlock(),e.createElementBlock("li",pf,e.toDisplayString(e.unref(r).noResultsText),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))],512)],64))]))}}),Sf=["id"],sa=e.defineComponent({name:"ClInputTag",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:{type:String,default:"70px"},joinKey:{type:String,default:","},isAutofill:Boolean,list:{type:Array,default:()=>[]},searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].indexOf(n)>-1},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isFocusShowDrop:Boolean,textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean,isShowLoading:Boolean,serverCallback:Function,isPlaintext:{type:Boolean,default:!1},appendContainer:{type:String,default:""}},emits:["onInit","update:value","update:modelValue","onChange","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElInput"),s=e.useTemplateRef("refElList"),c=e.reactive({keyIndex:`inputTag-${o.getRandom(8)}`,searchValue:"",dropdownSelectId:[],isUseData:!1}),m={listNameJson:{},listIdJson:{}},p=e.computed(()=>{let S={"panel-input-tag":!0,"inputTag-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext,"cl-plaintext-inputtag":t.isPlaintext};return S=o.getJsonMerge(S,de.getClassNameJson(t.className)),o.getStringByJson(S," ")}),g=e.computed(()=>{let S="inputTag-dropdown ";return c.isUseData||(S+=" inputTag-dropdown-nodata "),S}),v=(S,E="")=>{i("update:value",S),i("update:modelValue",S),i("onChange",S,E)},y=()=>{e.nextTick(()=>{i("onInit")})},k=S=>{const f=o.isEmpty(S)?[]:S.filter(D=>{if(!D)return!1;const h=o.isString(D.id)&&!o.isEmpty(D.id)||o.isNumber(D.id)&&o.isFinite(D.id),b=o.isNonEmptyString(D.name)||o.isNumber(D.name)&&!o.isEmpty(D.name);return h&&b});m.listNameJson=o.getJsonByList(f,"name"),m.listIdJson=o.getJsonByList(f,"id")},F=S=>{if(d.value){const E=d.value.checkIsShowOpen();if(S){if(!E){const f=[],D=u.value?u.value.getValue():"",h=o.isEmpty(D)?[]:o.split(D,t.joinKey||",");h.length>0&&h.forEach(b=>{if(o.isExistJsonKey(m.listNameJson,b)){const _=m.listNameJson[b];_&&!o.isEmpty(_.id)&&f.push(_.id.toString())}}),c.dropdownSelectId=f,c.isUseData=!o.isEmpty(t.list)||!!t.serverCallback,d.value.setOpen(!0),e.nextTick(()=>{d.value&&d.value.initCompleteOpen()})}}else c.isUseData=!0,E&&d.value.setOpen(!1)}},B=()=>{o.isEmpty(t.list)||k(t.list)};e.onMounted(()=>{e.nextTick(()=>{B()})}),e.watch(()=>t.list,S=>{k(S),c.isUseData=!o.isEmpty(S)||!!t.serverCallback});const I=()=>{y()},A=S=>{S&&t.disabled||e.nextTick(()=>{s.value&&s.value.initOpenShow(S)})},N=S=>{const E=S.toLowerCase(),f=t.searchKey;let D=!1;return t.list.forEach(h=>{if(D)return;let b=0;for(let _=0;_<f.length;_++){const O=h[f[_]];o.isNonEmptyString(O)&&O.toLowerCase().indexOf(E)>-1&&b++}b>0&&(t.searchKeyType==="||"||t.searchKeyType==="&&"&&b===f.length)&&(D=!0)}),D},x=S=>{c.searchValue=S;let E=!0;if(o.isNonEmptyString(S)&&(S.indexOf(`
11
- `)>-1||!o.isEmpty(t.joinKey)&&S.indexOf(t.joinKey)>-1)&&(E=!1),E){const f=o.isEmpty(S)?!1:t.serverCallback?!0:N(S);F(f)}else F(!1);t.multiple||v(S,"input")},V=S=>{F(!S.isEmpty&&!o.isEmpty(S.search))},w=S=>{i("onError",S)},M=(S,E)=>{if(o.isEmpty(E)||t.disabled)return;const f=[];(o.isArray(E.id)?E.id:[E.id]).forEach(h=>{o.isExistJsonKey(m.listIdJson,h)&&f.push(m.listIdJson[h].name)}),t.multiple||(c.searchValue=""),u.value&&u.value.updateValue(f.join(t.joinKey||","),E.isSelect)},C=(S,E)=>{v(S,E),t.isAutofill&&F(!1)},T=S=>{t.isAutofill&&t.isFocusShowDrop&&(c.searchValue=S,F(!o.isEmpty(S)))};e.provide("$InputTagTop",{getListHoverValueKeydown:()=>{let S="";return s.value&&(S=s.value.getHoverKeydown()),S},convertListToJson:k,setDropdownOpen:F});const U=()=>u.value?u.value.getValue():"";return l({getValue:U,getValueData:()=>{const S=U();return u.value?o.split(S,t.joinKey||",").filter(f=>!o.isEmpty(f)).map(f=>{const D=m.listNameJson[f];return{name:f,id:D&&!o.isEmpty(D.id)?D.id:void 0}}):[]},setValue:S=>{u.value&&u.value.setValue(S)},focus:()=>{u.value&&u.value.focus()}}),(S,E)=>n.isAutofill?(e.openBlock(),e.createBlock(kn,{key:0,ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:p.value,classDropDown:g.value,transitionLeave:"inputTag-dropdown-leave",appendContainer:n.appendContainer,onOnChangeOpen:A},{labelCustom:e.withCtx(()=>[e.createVNode(Wa,{ref_key:"refElInput",ref:u,value:n.value,placeholder:n.placeholder,disabled:n.disabled||n.isPlaintext,isClean:n.isClean,multiple:n.multiple,minHeight:n.minHeight,joinKey:n.joinKey,isCopy:n.isCopy,isCopyMultipleWrap:n.isCopyMultipleWrap,copyJoinKey:n.copyJoinKey,isDropdownLayer:!0,textMaxHeight:n.textMaxHeight,tagsMaxHeight:n.tagsMaxHeight,isShowNum:n.isShowNum,onOnChange:C,onOnChangeInput:x,onOnInit:I,onOnFocus:T},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])]),dropdown:e.withCtx(()=>[e.createVNode(kf,{ref_key:"refElList",ref:s,keyIndex:c.keyIndex,isSearch:!1,searchValue:c.searchValue,searchKey:n.searchKey,searchKeyType:n.searchKeyType,isMultiple:!1,showDropDownTextFormat:n.showDropDownTextFormat,showDropDownTextFormatSub:n.showDropDownTextFormatSub,isCascade:n.isCascade,parentSelectable:n.parentSelectable,parentKey:n.parentKey,topParentValue:n.topParentValue,isShowEmptyLabel:!1,originalData:n.list,selectId:c.dropdownSelectId,serverCallback:n.serverCallback,isShowLoading:n.isShowLoading,onOnSearchResult:V,onOnChange:M,onOnError:w},null,8,["keyIndex","searchValue","searchKey","searchKeyType","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","serverCallback","isShowLoading"])]),_:1},8,["id","classParent","classDropDown","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value),id:e.unref(r)},[e.createVNode(Wa,{ref_key:"refElInput",ref:u,value:n.value,placeholder:n.placeholder,disabled:n.disabled||n.isPlaintext,isClean:n.isClean,multiple:n.multiple,minHeight:n.minHeight,joinKey:n.joinKey,isCopy:n.isCopy,isCopyMultipleWrap:n.isCopyMultipleWrap,copyJoinKey:n.copyJoinKey,isDropdownLayer:!1,textMaxHeight:n.textMaxHeight,tagsMaxHeight:n.tagsMaxHeight,isShowNum:n.isShowNum,onOnChange:C,onOnChangeInput:x,onOnInit:I,onOnFocus:T},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])],10,Sf))}}),wf=["id"],Cf={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},Ef={key:2,class:"select-inDropdown-checkboxAll"},bf=["aria-selected","aria-disabled","onClick"],xf={class:"select-inDropdown-item-inner"},Bf={key:0,class:"select-inDropdown-checkbox"},If=["innerHTML"],Df={key:5,class:"select-inDropdown-body"},Tf={class:"select-inDropdown-empty"},Do=35,Nf=210,Vf=20,Mf=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:n=>!0,onInitComplete:()=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(K=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs")),K.RecycleScroller))),i=n,r=a,{optPageLanguage:d,getPageLanguage:u}=Le();u("common");const s=e.inject("$SelectTop",{}),c=typeof s.getSelectData=="function",m=e.useTemplateRef("refElSearch"),p=e.useTemplateRef("refElScroller"),g=e.useTemplateRef("refElRoot");let v=!0;const y={isScrollLoading:!1,hasMoreData:!0};let k=[],F=0,B=0;const I=i.id,A=`select-inList-${i.keyIndex||""}`;let N=!1;const x=e.ref(""),V=e.ref([]),w=e.ref([]);let M={};const C=K=>{const W=K.id.toString();if(i.isMultiple&&i.isCascade&&K._hasChildren&&c){const ae=s.getAllChildIds(W).filter(q=>!s.getSelectValueInfo(q)?.isDisabled);if(ae.length===0)return 0;const G=ae.filter(q=>o.isExistValue(i.selectId,q)).length;return G===0?0:G===ae.length?2:1}return o.isExistValue(i.selectId,W)?2:0},T=K=>C(K)===2,U=K=>C(K)===1,Z=e.computed(()=>{let K=!1;return w.value.length>0&&i.selectId.length>=w.value.length&&(K=o.isContainArr(i.selectId,w.value)),K}),z=K=>{if(!K||typeof K!="object")return"";let W=o.isNonEmptyString(i.showDropDownTextFormat)?i.showDropDownTextFormat:"";K._level>=1&&o.isNonEmptyString(i.showDropDownTextFormatSub)&&(W=i.showDropDownTextFormatSub);let R=o.isEmpty(W)?K.name:o.convertStringFormat(W,K);return o.isHtml(R)?o.isEmpty(W)&&o.isHtml(K.name)?R=o.encodeHTML(K.name):R=o.convertStringFormatEncodeHTML(W,K):typeof R=="string"&&R.indexOf("<")>-1&&(R=o.encodeHTML(R)),R},H=K=>{const W=M[K]||{};if(o.isBoolean(W._isTypeRadio))return W._isTypeRadio;if(c){const R=s.getSelectValueInfo(K);if(o.isBoolean(R?._isTypeRadio))return R._isTypeRadio}return!1},S=()=>{const K=[];M=o.getJsonByList(V.value),V.value.forEach(W=>{if(!o.isObject(W))return;const R=typeof W.id;if(W.id==null||R!=="string"&&(R!=="number"||!o.isFinite(W.id)))return;const ae=W.id.toString();if(!(i.isCascade&&W._hasChildren)&&!H(ae)){if(o.isExistValue(K,ae))return;W.isDisabled?o.isExistValue(i.selectId,ae)&&K.push(ae):K.push(ae)}}),w.value=K},E=K=>{const W=i.parentKey,R=i.topParentValue,ae={};K.forEach($=>{if(!o.isObject($)||$.id==null||typeof $.id!="string"&&(typeof $.id!="number"||!o.isFinite($.id)))return;const j=$[W],se=j!=null&&(typeof j=="string"||typeof j=="number")?j.toString():"";se!==""&&se!==String(R)&&(ae[se]||(ae[se]=[]),ae[se].push($))});const G=[],q=($,j,se,me)=>{$.forEach(ie=>{const oe=ie.id.toString();if(me.has(oe))return;me.add(oe);const L=ae[oe]||[];G.push({...ie,_level:j,_parentName:se,_hasChildren:L.length>0}),L.length>0&&q(L,j+1,ie.name,me)})},ee=K.filter($=>{if(!o.isObject($)||$.id==null||typeof $.id!="string"&&(typeof $.id!="number"||!o.isFinite($.id)))return!1;const j=$[W],se=j!=null&&(typeof j=="string"||typeof j=="number")?j.toString():"";return o.isEmpty(se)||se===String(R)});return q(ee,0,"",new Set),G},f=(K,W)=>{if(!c)return K;const R=K.filter(me=>me!=null&&me.id!=null&&(typeof me.id=="string"||typeof me.id=="number"&&o.isFinite(me.id))),ae=W.filter(me=>me!=null&&me.id!=null&&(typeof me.id=="string"||typeof me.id=="number"&&o.isFinite(me.id))),G=i.parentKey,q=i.topParentValue,ee=new Set,$=new Set(R.map(me=>me.id.toString()));R.forEach(me=>{const ie=me.id.toString();ee.add(ie);const oe=new Set;let L=me[G];for(;L!=null&&(typeof L=="string"||typeof L=="number")&&L.toString()!==String(q);){const ue=L.toString();if(oe.has(ue))break;oe.add(ue),$.has(ue)||ee.add(ue),L=s.getSelectValueInfo(ue)?.[G]}s.getAllChildIds(ie).forEach(ue=>{ee.add(ue)})});const j=ae.filter(me=>ee.has(me.id.toString())),se=new Set(j.map(me=>me.id.toString()));return ee.forEach(me=>{if(!se.has(me)){const ie=s.getSelectValueInfo(me);ie&&Object.keys(ie).length>0&&j.push(ie)}}),j},D=()=>{v&&(v=!1,y.hasMoreData=!0,i.isCascade?(k=[...i.originalData||[]],V.value=E(k)):V.value=o.getListClone(i.originalData).filter(K=>K!=null&&K.id!=null&&(typeof K.id=="string"||typeof K.id=="number"&&o.isFinite(K.id))),S(),h(),x.value="",e.nextTick(()=>{m.value&&m.value.setValue("")}))},h=()=>{e.nextTick(()=>{if(p.value&&i.selectId.length>0){const K=V.value.findIndex(W=>W.id!=null&&o.isExistValue(i.selectId,W.id.toString()));K>-1&&p.value.scrollToItem(K)}})},b=K=>{const W=[],R=M[K]||{},ae=i.isCascade&&R._hasChildren;if(i.isMultiple)if(H(K))o.isExistValue(i.selectId,K)?i.selectId.forEach(G=>{G!==K&&W.push(G)}):(i.selectId.forEach(G=>{H(G)||W.push(G)}),W.push(K));else if(ae&&c){const G=s.getAllChildIds(K),q=G.filter($=>!s.getSelectValueInfo($)?.isDisabled),ee=q.length>0&&q.every($=>o.isExistValue(i.selectId,$));i.selectId.forEach($=>{G.includes($)?G.includes($)&&s.getSelectValueInfo($)?.isDisabled&&W.push($):W.push($)}),ee||q.forEach($=>{o.isExistValue(W,$)||W.push($)})}else i.selectId.forEach(G=>{G!==K&&W.push(G)}),o.isExistValue(i.selectId,K)||W.push(K);else{if(ae&&!i.parentSelectable)return[...i.selectId];W.push(K)}return W},_=K=>{const W=V.value;if(W.length===0)return;let R=-1;const ae=x.value;ae.length>0?(W.forEach((G,q)=>{G.id.toString()===ae&&(R=q)}),R+=K,R<0?R=0:R>=W.length&&(R=W.length-1)):R=0,x.value=W[R].id.toString(),p.value&&p.value.scrollToItem(R)},O=K=>{let W=K.keyCode;if(!o.isUndefined(W))switch(W=W.toString(),W){case"13":{const R=g.value&&K.target instanceof Node&&g.value.contains(K.target);(K.target===document.body||R)&&(K.preventDefault(),K.stopPropagation());break}case"38":K.preventDefault(),K.stopPropagation(),_(-1);break;case"40":K.preventDefault(),K.stopPropagation(),_(1);break}},P=K=>{let W=K.keyCode;if(!o.isUndefined(W))switch(W=W.toString(),W){case"27":c&&s.closeDropdown?.();break;case"13":{const R=x.value;if(!R||i.disabled||!i.isOpen)break;const ae=g.value&&K.target instanceof Node&&g.value.contains(K.target);if(K.target!==document.body&&!ae||!V.value.some(ee=>ee.id.toString()===R)||M[R]?.isDisabled)break;const q=b(R);r("onChange",q);break}}},J=K=>K.map(W=>{const{_level:R,_parentName:ae,_hasChildren:G,...q}=W;return q}),Y=async()=>{if(i.serverCallback&&!(y.isScrollLoading||!y.hasMoreData)&&(y.isScrollLoading=!0,i.serverCallback)){const K=++B,W=V.value;try{const R={offset:W.length};if(i.isSearch&&m.value){const ee=m.value.getValue();o.isEmpty(ee)||(R.search=ee)}const ae=await i.serverCallback(R);if(K!==B||W!==V.value)return;if(!Array.isArray(ae)){Se.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof ae),r("onError","服务端加载失败:返回数据格式异常");return}if(ae.length===0){y.hasMoreData=!1;return}const G=new Set(W.map(ee=>ee?.id?.toString()).filter(Boolean)),q=ae.filter(ee=>{if(ee?.id==null)return!1;const $=typeof ee.id;return $!=="string"&&($!=="number"||!o.isFinite(ee.id))?!1:!G.has(ee.id.toString())});if(q.length===0){y.hasMoreData=!1;return}i.isCascade?R.search?V.value=E([...V.value,...q]):(k.length===0&&(k=J(V.value)),k.length===0&&(k=[...i.originalData]),k.push(...q),V.value=E(k)):V.value.push(...q),S(),c&&(s.convertListToJson(q),s.refreshDisplayLabels?.())}catch(R){Se.error("ClSelect","_loadMore 服务端加载失败:",R),r("onError","服务端加载失败,请稍后重试")}finally{y.isScrollLoading=!1}}},ne=()=>{D(),r("onInitComplete")};e.onMounted(()=>{ne()}),e.onBeforeUnmount(()=>{de.offListener(window,"keydown",O),de.offListener(window,"keyup",P),N=!1}),e.onDeactivated(()=>{de.offListener(window,"keydown",O),de.offListener(window,"keyup",P),N=!1}),e.onActivated(()=>{i.isOpen&&!N&&(de.onListener(window,"keydown",O),de.onListener(window,"keyup",P),N=!0)}),e.watch(()=>i.isOpen,K=>{K?(v=!0,D()):y.isScrollLoading=!1}),e.watch(()=>i.originalData,K=>{v=!0,i.isCascade?(k=[...K||[]],V.value=E(k)):V.value=o.getListClone(K).filter(W=>W!=null&&W.id!=null&&(typeof W.id=="string"||typeof W.id=="number"&&o.isFinite(W.id))),S(),y.hasMoreData=!0,x.value="",e.nextTick(()=>{m.value&&m.value.setValue("")})});const ce=async K=>{const W=++F;B=Math.max(B,W+1);let R=[];if(i.isCascade&&(k=[]),y.hasMoreData=!0,i.serverCallback){try{if(R=await i.serverCallback({search:K,offset:0}),Array.isArray(R)||(Se.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof R),r("onError","服务端搜索失败:返回数据格式异常"),R=[]),W!==F)return;c&&s.convertListToJson(R)}catch(ae){Se.error("ClSelect","onSearch 服务端搜索失败:",ae),r("onError","服务端搜索失败,请稍后重试"),R=[]}if(W!==F)return;i.isCascade&&(R=f(R,i.originalData),R=E(R))}else{const ae=i.originalData.filter(G=>G!=null&&G.id!=null&&(typeof G.id=="string"||typeof G.id=="number"&&o.isFinite(G.id)));if(o.isEmpty(K))R=ae;else{i.searchKeyType!=="||"&&i.searchKeyType!=="&&"&&Se.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",i.searchKeyType);const G=K.toLowerCase(),q=o.isArray(i.searchKey)?i.searchKey:["name"],ee=q.length;ae.forEach($=>{const j=[];for(let se=0;se<ee;se++){const me=$[q[se]];if(me==null)continue;String(me).toLowerCase().indexOf(G)>-1&&j.push(!0)}if(j.length>0)switch(i.searchKeyType){case"||":R.push($);break;case"&&":j.length===ee&&R.push($);break;default:R.push($)}})}i.isCascade&&(o.isEmpty(K)||(R=f(R,i.originalData)),R=E(R))}V.value=R.filter(ae=>ae!=null&&ae.id!=null&&(typeof ae.id=="string"||typeof ae.id=="number"&&o.isFinite(ae.id))),S(),x.value="",c&&s.calculationDropdownPosition()},X=K=>{if(!i.disabled&&i.isMultiple){const W=[],R=[];w.value.forEach(q=>{K.value?o.isExistValue(i.selectId,q)||W.push(q):o.isExistValue(i.selectId,q)&&(M[q]?.isDisabled||R.push(q))});const ae=o.getArrClone(i.selectId);R.length>0&&R.forEach(q=>{const ee=ae.indexOf(q);ee>-1&&ae.splice(ee,1)}),W.length>0&&W.forEach(q=>{o.isExistValue(ae,q)||ae.push(q)});const G=[];ae.forEach(q=>{(!H(q)||o.isExistValue(i.selectId,q))&&G.push(q)}),r("onChange",G)}},Q=K=>{if(K.id==null||typeof K.id!="string"&&(typeof K.id!="number"||!o.isFinite(K.id))||K.isDisabled||i.disabled)return;const W=K.id.toString(),R=b(W);r("onChange",R)};return l({initOpenShow:K=>{K?N||(de.onListener(window,"keydown",O),de.onListener(window,"keyup",P),N=!0):N&&(de.offListener(window,"keydown",O),de.offListener(window,"keyup",P),N=!1)}}),(K,W)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(I),ref_key:"refElRoot",ref:g},[n.isSearch?(e.openBlock(),e.createElementBlock("div",Cf,[e.createVNode(Xt,{ref_key:"refElSearch",ref:m,placeholder:n.searchPlaceholder,disabled:n.disabled,onOnChange:ce},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isMultiple&&n.isCheckBoxAll&&V.value.length>0?(e.openBlock(),e.createElementBlock("div",Ef,[e.createVNode(mt,{forId:`${A}-cb-all`,label:e.unref(d).checkboxAll,value:Z.value,disabled:n.disabled,onOnChange:X},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),V.value.length>0?(e.openBlock(),e.createBlock(e.unref(t),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(V.value.length*Do,Nf)+"px"}),items:V.value,"item-size":Do,"key-field":"id",ref_key:"refElScroller",ref:p,onScrollEnd:Y},{default:e.withCtx(({item:R})=>[e.createElementVNode("div",{role:"option","aria-selected":T(R),"aria-disabled":R.isDisabled||!1,class:e.normalizeClass({"option-selected":T(R),"option-disabled":R.isDisabled,"option-hoverKeydown":x.value===R.id.toString(),"select-inDropdown-item-child":R._level>=1}),style:e.normalizeStyle({height:Do+"px",paddingLeft:R._level?R._level*Vf+"px":void 0}),onClick:ae=>Q(R)},[e.createElementVNode("div",xf,[n.isMultiple?(e.openBlock(),e.createElementBlock("div",Bf,[e.createVNode(mt,{name:`${A}-cb`,forId:`${A}-cb-${R.id}`,value:T(R),indeterminate:U(R),disabled:R.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:z(R)},null,8,If)])],14,bf)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",Df,[e.createElementVNode("div",Tf,e.toDisplayString(e.unref(d).noResultsText),1)]))],8,wf))}}),Of=["id"],_f={class:"select-inTag-title"},Af={class:"select-inTag-operate"},Lf={class:"select-inTag-body"},$f=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.inject("$SelectTop",{}),s=typeof u.getSelectData=="function",c=e.computed(()=>s?o.isArray(a.selectId)?u.getSelectData(a.selectId):[]:[]),m=e.computed(()=>s?c.value.length:0),p=e.computed(()=>o.isArray(c.value)?c.value.some(y=>o.isObject(y)?!(o.isBoolean(y.isDisabled)&&y.isDisabled):!1):!1),g=()=>{const y=c.value;if(!o.isArray(y))return;const k=[];let F=!1;y.forEach(B=>{if(!o.isObject(B))return;(o.isBoolean(B.isDisabled)?!!B.isDisabled:!1)?(typeof B.id=="string"&&!o.isEmpty(B.id)||typeof B.id=="number"&&o.isFinite(B.id))&&k.push(B.id.toString()):F=!0}),F&&t("onRemove",k)},v=y=>{if(!o.isArray(a.selectId)||o.isEmpty(y))return;const k=String(y),F=a.selectId.findIndex(I=>String(I)===k);if(F===-1)return;const B=o.getArrClone(a.selectId);B.splice(F,1),t("onRemove",B)};return(y,k)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(i)},[e.createElementVNode("div",_f,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r).selected)+" "+e.toDisplayString(m.value)+" "+e.toDisplayString(e.unref(r).count),1),e.createElementVNode("span",Af,[p.value?(e.openBlock(),e.createBlock(ye,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(r).deleteAll,"aria-label":e.unref(r).deleteAll,onClick:g},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Lf,[e.createVNode(Xn,{showTextFormat:n.showTextFormat,list:c.value,onOnRemove:v},null,8,["showTextFormat","list"])])],8,Of))}}),Ff=["id"],Pf={key:0,class:"select-inText-num"},Sn=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:n=>["default","noBorder"].includes(n)},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:n=>["left","right"].includes(n)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].includes(n)},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},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},onOpenBefore:Function,serverCallback:Function,appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0,onOpen:n=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useTemplateRef("refElDropdownLayer"),d=e.useTemplateRef("refElList"),u=e.useTemplateRef("refElTags"),s=`select-${o.getRandom(8)}`,c=t.id,m=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let p=[],g={};const v={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},y=e.ref(!1),k=e.ref([]),F=e.ref([]),B=e.ref([]);let I=!1;const A=e.computed(()=>o.isNonEmptyString(t.showTextFormat)?t.showTextFormat:t.isCascade?"${name}(${parentName})":""),N=e.computed(()=>{let L={"panel-select":!0};return t.theme==="noBorder"&&(L["select-theme-noBorder"]=!0),L=o.getJsonMerge(L,de.getClassNameJson(t.className)),o.getStringByJson(L," ")}),x=e.computed(()=>`${N.value} cl-plaintext-value`),V=e.computed(()=>{const L=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return B.value.join(L)}),w=e.computed(()=>{let L={"select-inDropdown":!0};return t.theme==="noBorder"&&(L["select-inDropdown-noBorder"]=!0),m.isOpen&&t.multiple&&t.isShowTag&&(L["select-inTag-ext"]=!0,L[`select-inTag-${m.tagDirection}`]=!0),L=o.getJsonMerge(L,de.getClassNameJson(t.classDropDown)),o.getStringByJson(L," ")}),M=e.computed(()=>{const L={"select-inTag":!0,"select-inTag-open":m.isOpen};return L[`select-inTag-${m.dropDownPos}`]=!0,L[`select-inTag-${m.tagDirection}`]=!0,L}),C=L=>{i("update:value",L),i("update:modelValue",L)},T=(L,te)=>{C(L),i("onChange",L,te)},U=()=>{I||(I=!0,e.nextTick(()=>{i("onInit")}))},Z=L=>{e.nextTick(()=>{i("onOpen",L)})},z=()=>{const L=[];return k.value.forEach(te=>{o.isExistJsonKey(g,te)&&L.push(te)}),L},H=L=>{if(o.isEmpty(L)||!o.isArray(L))return;const te={},ue=t.parentKey,pe=t.topParentValue;if(L.forEach(he=>{if(!o.isObject(he)){Se.warn("ClSelect","_convertListToJson 跳过非对象数据项:",he);return}if(!(typeof he.id=="string"||typeof he.id=="number"&&o.isFinite(he.id))){Se.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",he);return}const Ee=he.id.toString();te[Ee]=o.getJsonClone(he)}),g=o.getJsonMerge(g,te),t.serverCallback&&!y.value&&!o.isEmpty(te)&&(y.value=!0,t.value!=null&&t.value!==""&&(O(t.value),_())),t.isCascade&&Object.keys(g).forEach(he=>{const Ce=g[he][ue],Ee=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";if(Ee!==""&&Ee!==String(pe)){const xe=g[Ee];xe?.name&&(g[he].parentName=xe.name)}}),t.isCascade&&(S(),t.isOutMerge&&t.multiple&&k.value.length>0)){const he=h(k.value);o.isEqualArr(k.value,he)||(k.value=he,p=he)}if(t.multiple&&k.value.length>1){const he=k.value.filter(Ce=>{const Ee=g[Ce];return o.isBoolean(Ee?._isTypeRadio)&&Ee._isTypeRadio});if(he.length>1){const Ce=he[he.length-1],Ee=k.value.filter(xe=>xe===Ce||!he.includes(xe));o.isEqualArr(k.value,Ee)||(k.value=Ee,X())}}k.value.length>0&&(k.value=[...k.value])},S=()=>{const L=t.parentKey,te=t.topParentValue;v.childrenMap={},v.parentMap={},v.lastChildMap={},v.allChildMap={},Object.keys(g).forEach(pe=>{const Ce=g[pe][L],Ee=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";Ee!==""&&Ee!==String(te)&&(v.parentMap[pe]=Ee,v.childrenMap[Ee]||(v.childrenMap[Ee]=[]),v.childrenMap[Ee].push(pe))})},E=L=>{const te=(ue,pe)=>{if(v.lastChildMap[ue])return v.lastChildMap[ue];if(pe.has(ue))return[];pe.add(ue);const he=v.childrenMap[ue];if(!he||he.length===0)return v.lastChildMap[ue]=[ue],[ue];const Ce=[];return he.forEach(Ee=>{Ce.push(...te(Ee,new Set(pe)))}),v.lastChildMap[ue]=Ce,Ce};return te(L,new Set)},f=L=>{const te=(ue,pe)=>{if(v.allChildMap[ue])return v.allChildMap[ue];if(pe.has(ue))return[];pe.add(ue);const he=v.childrenMap[ue];if(!he||he.length===0)return v.allChildMap[ue]=[],[];const Ce=[];he.forEach(xe=>{Ce.push(xe),Ce.push(...te(xe,new Set(pe)))});const Ee=Array.from(new Set(Ce));return v.allChildMap[ue]=Ee,Ee};return te(L,new Set)},D=L=>{if(L.length===0)return[];const te=new Set(L),ue=new Set,pe=new Set;for(const he of te){const Ce=v.parentMap[he];Ce&&!pe.has(Ce)&&ue.add(Ce)}for(;ue.size>0;){const he=ue.values().next().value;if(ue.delete(he),pe.has(he))continue;pe.add(he);const Ce=v.childrenMap[he];if(!Ce||Ce.length===0)continue;let Ee=!0;for(const xe of Ce)if(!te.has(xe)){Ee=!1;break}if(Ee){for(const Ie of Ce)te.delete(Ie);te.add(he);const xe=v.parentMap[he];xe&&!pe.has(xe)&&ue.add(xe)}}return[...te]},h=L=>{if(L.length===0)return[];const te=[];return L.forEach(ue=>{te.push(...E(ue))}),o.getArrUnique(te)},b=L=>!t.isCascade||!t.multiple?L:t.isOutMerge?D(L):h(L),_=()=>{if(y.value&&!o.isEmpty(k.value)){if(o.isEmpty(g)||t.serverCallback)return;const L=z();if(!o.isEqualArr(k.value,L)){const te=k.value.filter(pe=>!L.includes(pe));te.length>0&&Se.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",te),k.value=L,p=L;const ue=b(L);C(ue.join(","))}}},O=L=>{if(L!=null&&typeof L!="string"&&(typeof L!="number"||!o.isFinite(L))){Se.warn("ClSelect","setValue 收到非预期类型值:",typeof L,L);return}let te=L==null||L===""?[]:L.toString().split(",").filter(pe=>pe!=="");te=o.getArrUnique(te),t.isCascade&&t.isOutMerge&&te.length>0&&t.multiple&&(te=h(te));let ue=o.isEqualArr(k.value,te);ue&&(ue=te.join(",")===k.value.join(",")),ue||(p=te,k.value=te)},P=L=>o.isExistJsonKey(g,L)?o.getJsonClone(g[L]):{},J=L=>{const te=o.isArray(L)?L:k.value,ue=[];return te.forEach(pe=>{const he=P(pe);o.isEmpty(he)||ue.push(he)}),ue},Y=L=>{const ue=t.isCascade&&!t.multiple&&(v.childrenMap[L.id?.toString()]?.length>0||!v.parentMap[L.id?.toString()])&&o.isEmpty(t.showTextFormat)?"":A.value;let pe=o.isEmpty(ue)?L.name??"":o.convertStringFormat(ue,L);return o.isHtml(pe)?pe=o.isEmpty(ue)?o.encodeHTML(L.name):o.convertStringFormatEncodeHTML(ue,L):typeof pe=="string"&&pe.indexOf("<")>-1&&(pe=o.encodeHTML(pe)),pe},ne=L=>{if(o.isNonEmptyString(t.showTextFormat))return o.removeHTMLTags(Y(L));const te=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",ue=o.isString(L?.name)?L.name:"",pe=o.isString(L?.parentName)?L.parentName:"",he=t.isCascade&&o.isNonEmptyString(pe)?`${pe}${te}${ue}`:ue;return o.removeHTMLTags(he)},ce=()=>{const L=J();F.value=L.map(te=>Y(te)),B.value=L.map(te=>ne(te))},X=()=>{const L=z();p=L,k.value=L;const te=b(L),ue=te.join(",");let pe;if(t.multiple){const he=[];te.forEach(Ce=>{const Ee=P(Ce);o.isEmpty(Ee)||he.push(Ee)}),pe=he}else pe=P(ue),o.isEmpty(pe)&&(pe=null);T(ue,pe)},Q=()=>{m.isOpen||!o.isEqualArr(k.value,p)&&X()},le=()=>{y.value||(y.value=!0,H(t.list),O(t.value),_())},K=()=>{!y.value&&t.list&&t.list.length>0&&le()},W=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs"))})};e.onMounted(()=>{t.isPlaintext||W(),e.nextTick(()=>{K()})}),e.watch(y,L=>{L&&U()}),e.watch(()=>t.list,(L,te)=>{y.value||(L&&L.length>0||te===void 0)&&(y.value=!0)}),e.watch([()=>t.value,()=>t.list],([L,te],[ue,pe])=>{const he=te||[];!y.value&&he.length>0&&(y.value=!0),te!==pe&&(g={},v.childrenMap={},v.parentMap={},v.lastChildMap={},v.allChildMap={}),H(he),L!==void 0&&O(L),_()}),e.watch([k,()=>t.list],([L,te])=>{te&&te.length>0&&o.isEmpty(g)&&H(te),ce()}),e.watch(()=>t.isOutMerge,()=>{t.isCascade&&t.multiple&&k.value.length>0&&b(z()).join(",")!==String(t.value??"")&&X()}),e.watch([()=>t.parentKey,()=>t.topParentValue],()=>{t.isCascade&&!o.isEmpty(g)&&S()});const R=L=>{L&&t.disabled||(m.isOpen=L,L?p=k.value:Q(),e.nextTick(()=>{d.value&&d.value.initOpenShow(L)}),Z(L))},ae=()=>{t.disabled||(k.value=[],t.multiple&&t.multipleRealTimeChange?X():Q())},G=L=>{if(m.dropDownPos=L.use.dropDownPos,t.multiple&&t.isShowTag){const te=u.value?.$el?.offsetWidth||0;m.tagHeight=t.theme==="default"?`${L.original.dropDownHeight+1}px`:`${L.original.dropDownHeight}px`;const ue=L.original.winWidth-(L.original.controlOffset.left+L.original.dropDownWidth)>=te?"right":"left";m.tagDirection=ue,ue==="right"?m.tagLeft=`${L.original.dropDownWidth-1}px`:m.tagLeft=`${(L.original.dropDownWidth-L.original.textWidth+te+1)*-1}px`}},q=L=>{k.value=L,t.multiple?t.multipleRealTimeChange&&X():r.value?.setOpen(!1)},ee=L=>{t.disabled||(k.value=L,X())},$=L=>{i("onError",L)},j=()=>{r.value&&(r.value.checkIsShowOpen()||r.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:J,getSelectValueInfo:P,getAllChildIds:f,calculationDropdownPosition:()=>{r.value?.calculationPosition()},convertListToJson:H,closeDropdown:()=>{r.value?.setOpen(!1)},refreshDisplayLabels:()=>{ce()}});const se=()=>{const L=z();return b(L).join(",")};return l({getValue:se,getValueData:()=>{const L=se();if(t.multiple){const ue=L?L.split(","):[],pe=[];return ue.forEach(he=>{const Ce=P(he);o.isEmpty(Ce)||pe.push(Ce)}),pe}if(!L)return null;const te=P(L);return o.isEmpty(te)?null:te},setValue:L=>{O(L),_()},runInitComplete:()=>{le()}}),(L,te)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(c),class:e.normalizeClass(x.value)},e.toDisplayString(V.value),11,Ff)):(e.openBlock(),e.createBlock(kn,{key:1,id:e.unref(c),ref_key:"refElDropdownLayer",ref:r,classParent:N.value,classText:"select-inText",classDropDown:w.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:F.value.join(","),textArrowDirection:n.arrowDirection,transitionLeave:n.transitionLeave,appendContainer:n.appendContainer,appendFollowWidth:n.theme!=="noBorder",onOpenBeforeCallback:n.onOpenBefore,onOnChangeOpen:R,onOnClear:ae,onOnChangePosition:G},{textExtend:e.withCtx(()=>[n.multiple?(e.openBlock(),e.createElementBlock("span",Pf,[F.value.length>1?(e.openBlock(),e.createBlock(qt,{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(Mf,{ref_key:"refElList",ref:d,isSearch:n.isSearch,searchPlaceholder:n.searchPlaceholder,searchKey:n.searchKey,searchKeyType:n.searchKeyType,isMultiple:n.multiple,isCheckBoxAll:n.isCheckBoxAll,showDropDownTextFormat:n.showDropDownTextFormat,showDropDownTextFormatSub:n.showDropDownTextFormatSub,isCascade:n.isCascade,parentSelectable:n.parentSelectable,parentKey:n.parentKey,topParentValue:n.topParentValue,originalData:n.list,keyIndex:s,selectId:k.value,disabled:n.disabled,isOpen:m.isOpen,serverCallback:n.serverCallback,onOnChange:q,onOnInitComplete:j,onOnError:$},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[n.multiple&&n.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(M.value),style:e.normalizeStyle({height:m.tagHeight,left:m.tagLeft}),ref_key:"refElTags",ref:u},[e.createVNode($f,{showTextFormat:A.value,selectId:k.value,onOnRemove:ee},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"]))}}),Rf=["id"],Hf={class:"paginate-statistic"},Uf={class:"paginate-list"},zf={class:"pagination",role:"navigation","aria-label":"pagination"},Jf=["tabindex","aria-label","onClick","onKeydown"],Kf={key:0},Wf={key:1},jf={key:0,class:"paginate-limit"},Yf={key:2,class:"paginate-jump"},To=10,ra=e.defineComponent({name:"ClPaginate",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},isShowLimit:{type:Boolean,default:!0},limitValue:{type:Number,default:10},limitData:Array,isShowJump:{type:Boolean,default:!0},totalCount:{type:Number,default:0},currentPage:{type:Number,default:1}},emits:["onChange"],setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("paginate");const d=`paginate-${o.getRandom(5)}`,u=a.id,s=e.ref(""),c=e.ref(""),m=e.ref(-1),p=e.ref(-1),g=e.computed(()=>{let w={"panel-paginate":!0,"paginate-disabled":a.disabled};return w=o.getJsonMerge(w,de.getClassNameJson(a.className)),w}),v=e.computed(()=>Math.max(1,parseInt(s.value)||To)),y=e.computed(()=>{const w=o.isFinite(a.currentPage)?a.currentPage:1,M=a.totalCount>0?Math.ceil(a.totalCount/v.value):0;return M>0?Math.min(Math.max(1,w),M):w}),k=e.computed(()=>{const w=a.limitData;if(o.isArray(w)&&!o.isEmpty(w)){const T=o.getListClone(w).filter(U=>!o.isEmpty(U)&&!o.isEmpty(U.id));if(T.length>0)return T}const M=i.value.pageStrip,C=o.isNonEmptyString(M)?M:"";return[{id:10,name:`10${C}`},{id:20,name:`20${C}`},{id:30,name:`30${C}`},{id:50,name:`50${C}`},{id:100,name:`100${C}`}]}),F=e.computed(()=>{const w=v.value,M=y.value,C=a.totalCount;let T=(M-1)*w,U=M*w;C>0?(T=T+1,U=U>C?C:U,T>U&&(T=U)):(T=0,U=0);const Z=i.value.statistic;return o.isNonEmptyString(Z)?o.convertStringFormat(Z,{s:T,e:U,_total:C}):""}),B=e.computed(()=>{let w=!1,M=!1,C=!1,T=!1,U=0;const Z=v.value,z=a.totalCount;z>0&&(U=Math.ceil(z/Z));const H=y.value;w=U>0?H===1:!0,M=w,C=U>0?H===U:!0,T=C;const S=[];if(S.push({icon:"angle-double-left",ariaLabel:"first page",active:!1,disabled:w,page:1}),S.push({icon:"angle-left",ariaLabel:"previous page",active:!1,disabled:M,page:w?1:H-1}),U>0){let D=[];if(U>7){const O=U-5+1+1;H<=4?(D=o.getArrByMinMax(1,5),D.push("…"),D.push(U)):H>=O?(D=o.getArrByMinMax(O-1,U),D.unshift("…"),D.unshift(1)):(D=o.getArrByMinMax(H-1,H+1),D.unshift("…"),D.unshift(1),D.push("…"),D.push(U))}else D=o.getArrByMinMax(1,U);D.forEach(b=>{S.push({title:b,active:b===H,isOmit:b==="…",page:b})})}return S.push({icon:"angle-right",ariaLabel:"next page",active:!1,disabled:T,page:C?U:H+1}),S.push({icon:"angle-double-right",ariaLabel:"last page",active:!1,disabled:C,page:U}),S}),I=(w,M)=>{const C=parseInt(String(w)),T=parseInt(String(M));o.isFinite(C)&&o.isFinite(T)&&(C!==m.value||T!==p.value)&&(m.value=C,p.value=T,t("onChange",C,T))},A=()=>{const w=!o.isEmpty(a.limitValue)&&o.isFinite(a.limitValue)?a.limitValue:To;let C=(w>0?w:To).toString();if(a.isShowLimit){const T=k.value.map(U=>U.id.toString());T.includes(C)||(C=T[0])}return C};s.value=A(),e.watch(()=>a.limitValue,()=>{const w=A();if(w!==s.value){s.value=w;const M=y.value;M!==a.currentPage&&I(M,w)}}),e.watch(()=>a.limitData,()=>{const w=A();w!==s.value&&(s.value=w,I(y.value,w))}),e.watch(()=>a.currentPage,()=>{m.value=-1,p.value=-1}),e.watch(()=>a.totalCount,()=>{const w=y.value;w!==a.currentPage&&I(w,s.value)});const N=w=>{!a.disabled&&!w.active&&!w.disabled&&!w.isOmit&&(c.value="",I(w.page,s.value))},x=w=>{if(a.disabled)return;k.value.some(C=>C.id.toString()===w)&&(c.value="",s.value=w,I(1,w))},V=w=>{if(a.disabled||!o.isNonEmptyString(w))return;const M=parseInt(w);if(o.isFinite(M)){const C=a.totalCount>0?Math.ceil(a.totalCount/v.value):0;if(M>=1&&(C===0||M<=C)){c.value="",I(M,s.value);return}}c.value=""};return(w,M)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(g.value)},[e.createElementVNode("div",Hf,e.toDisplayString(F.value),1),e.createElementVNode("div",Uf,[e.createElementVNode("ul",zf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(C,T)=>(e.openBlock(),e.createElementBlock("li",{key:`${d}-${T}`,class:e.normalizeClass({"paginate-disabled":C.disabled||n.disabled,"paginate-active":C.active,"paginate-omit":C.isOmit}),tabindex:C.disabled||n.disabled?-1:0,role:"button","aria-label":C.ariaLabel||String(C.page),onClick:U=>N(C),onKeydown:[e.withKeys(U=>N(C),["enter"]),e.withKeys(e.withModifiers(U=>N(C),["prevent"]),["space"])]},[C.icon?(e.openBlock(),e.createElementBlock("span",Kf,[e.createVNode(ye,{name:C.icon},null,8,["name"])])):(e.openBlock(),e.createElementBlock("span",Wf,e.toDisplayString(C.title),1))],42,Jf))),128))])]),n.isShowLimit?(e.openBlock(),e.createElementBlock("div",jf,[e.createVNode(Sn,{list:k.value,value:s.value,disabled:n.disabled,transitionLeave:"dropdownLayer-close-no-anim",onOnChange:x},null,8,["list","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowJump?(e.openBlock(),e.createElementBlock("div",Yf,[e.createElementVNode("span",null,e.toDisplayString(e.unref(i).jumpTo),1),e.createVNode(Pe,{value:c.value,"onUpdate:value":M[0]||(M[0]=C=>c.value=C),disabled:n.disabled,onOnKeyupEnter:V,onOnChangeBlur:V,onOnClear:V},null,8,["value","disabled"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(i).page),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Rf))}}),qf=["id"],Xf={key:0,class:"portlet-head"},Gf={class:"portlet-title"},Qf={class:"portlet-body"},oi=e.defineComponent({name:"ClPortlet",__name:"Index",props:{id:String,className:{type:String,default:""},titleName:String,isShowHead:{type:Boolean,default:!0}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"panel-portlet":!0};return o.getJsonMerge(i,de.getClassNameJson(l.className))});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value)},[n.isShowHead?(e.openBlock(),e.createElementBlock("div",Xf,[e.createElementVNode("h3",Gf,[e.createTextVNode(e.toDisplayString(n.titleName),1),e.renderSlot(i.$slots,"titleExtend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Qf,[e.renderSlot(i.$slots,"default")])],10,qf))}}),Zf=["id"],eh={key:6,class:"fenceScrollX-cover"},fn=e.defineComponent({name:"ClScrollXFence",__name:"Index",props:{id:String,className:String,isShowLeft:{type:Boolean,default:!0},isShowRight:{type:Boolean,default:!0},isShowCorner:{type:Boolean,default:!1},isShowCover:{type:Boolean,default:!1},cornerType:{type:String,default:""},leftWidth:{type:String,default:"0"},centerWidth:{type:String,default:"0"},rightWidth:{type:String,default:"0"},initLeft:String},emits:["onScrollX"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElScrollX"),u=e.computed(()=>{let p={"panel-scroll-x-fence":!0};return t.isShowCorner&&o.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-showCorner-${t.cornerType}`]=!0),o.osType().isMobile&&(p["fenceScrollX-mob"]=!0),p=o.getJsonMerge(p,de.getClassNameJson(t.className)),p}),s=e.computed(()=>{const p={"fenceScrollX-corner":!0};return o.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-corner-${t.cornerType}`]=!0),p}),c=p=>{i("onScrollX",p)};return e.onMounted(()=>{e.nextTick(()=>{if(d.value){if(o.isNonEmptyString(t.initLeft)){const p=parseInt(t.initLeft,10);o.isFinite(p)&&(d.value.scrollLeft=p)}d.value.addEventListener("scroll",c)}})}),e.onBeforeUnmount(()=>{d.value&&d.value.removeEventListener("scroll",c)}),e.onActivated(()=>{d.value&&d.value.addEventListener("scroll",c)}),e.onDeactivated(()=>{d.value&&d.value.removeEventListener("scroll",c)}),l({setScrollLeft:p=>{d.value&&o.isFinite(p)&&(d.value.scrollLeft=p)}}),(p,g)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(u.value)},[n.isShowLeft?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fenceScrollX-left",style:e.normalizeStyle({width:n.leftWidth})},[...g[0]||(g[0]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"fenceScrollX-center",ref_key:"refElScrollX",ref:d},[e.createElementVNode("div",{style:e.normalizeStyle({width:n.centerWidth})},null,4)],512),n.isShowRight?(e.openBlock(),e.createElementBlock("div",{key:2,class:"fenceScrollX-right",style:e.normalizeStyle({width:n.rightWidth})},[...g[1]||(g[1]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isShowCorner?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(s.value)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),n.isShowCover?(e.openBlock(),e.createElementBlock("div",eh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))],10,Zf))}}),th=["id"],nh=["id"],ca=e.defineComponent({name:"ClSelectCascade",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},width:String,isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isShowInMsg:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextLevelSeparator:{type:String,default:" > "}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=`selectCascade-${o.getRandom(5)}`,s=t.id,c=e.reactive({lastValue:t.value,isFirstDataFinish:!1}),m=e.ref([]),p={dataJson:{},dataGroup:{},parentIdsJson:{}},g=e.ref(0),v=e.computed(()=>r.value.pleaseSelect),y=e.computed(()=>{const{placeholder:h}=t;return o.isNonEmptyString(h)?h.split("|"):[]}),k=e.computed(()=>{const{width:h}=t;return o.isNonEmptyString(h)?h.split("|"):[]}),F=e.computed(()=>{let h={"panel-select-cascade":!0};return h=o.getJsonMerge(h,de.getClassNameJson(t.className)),h}),B=h=>{h!==c.lastValue&&(c.lastValue=h,i("update:value",h),i("update:modelValue",h),i("onChange",h))},I=h=>o.isExistJsonKey(p.dataGroup,h),A=h=>I(h)?p.dataGroup[h]:[],N=h=>o.isExistJsonKey(p.dataJson,h)?p.dataJson[h]:null,x=()=>`top_${t.topParentValue}`,V=h=>{const{parentKey:b,topParentValue:_}=t,O={},P={};o.isEmpty(h)||h.forEach(J=>{const Y=o.getJsonClone(J);if(o.isEmpty(Y?.id)||o.isEmpty(Y?.[b]))return;const ne=Y.id.toString(),ce=Y[b].toString();O[ne]=Y;const X=ce===_.toString()?x():ce;o.isExistJsonKey(P,X)||(P[X]=[]),P[X].push(Y)}),p.dataJson=O,p.dataGroup=P,g.value+=1},w=(h,b)=>{const _={idx:h,pId:b,placeholder:v.value,list:[],sty:{},selected:""};if(!o.isEmpty(b)){const Y=A(b);_.list=o.getListClone(Y)}const O=y.value,P=O.length;P>0&&(P>h?_.placeholder=o.isEmpty(O[h])?v.value:O[h]:P===1&&(_.placeholder=O[0]));const J=k.value;return J.length>h&&(o.isEmpty(J[h])||(_.sty.width=J[h],_.sty.flex="none")),_},M=(h,b)=>{const{parentKey:_,topParentValue:O}=t;let P=[];if(b&&b.indexOf(h)>-1)return[];const J=b?b.concat([h]):[h];if(o.isExistJsonKey(p.parentIdsJson,h))P=p.parentIdsJson[h];else{const Y=N(h);if(Y!=null){const ne=Y[_].toString();if(ne!==O.toString()){const ce=N(ne);if(ce!=null){P.push(ne);const X=M(ne,J);X.length>0&&(P=P.concat(X))}}}p.parentIdsJson[h]=P}return P},C=h=>{let b=o.isUndefined(h)?t.value:h;b!=null&&!o.isEmpty(b)&&!o.isExistJsonKey(p.dataJson,b.toString())&&(b="");const _=[];if(b==null||o.isEmpty(b))_.push(w(0,x())),_.push(w(1,""));else{const O=b.toString(),P=[...M(O)].reverse(),J=P.length;if(J>0){P.forEach((ne,ce)=>{const X=ce===0?x():P[ce-1],Q=w(ce,X);Q.selected=ne,_.push(Q)});const Y=w(J,P[J-1]);Y.selected=O,_.push(Y)}else{const Y=w(0,x());Y.selected=O,_.push(Y)}}m.value=_},T=()=>{V(t.list),C(),c.isFirstDataFinish=!0,c.lastValue=t.value};e.onMounted(()=>{e.nextTick(()=>{T()})}),e.watch(()=>t.value,h=>{h!==c.lastValue&&c.isFirstDataFinish&&(C(),c.lastValue=h)}),e.watch(()=>t.list,h=>{if(!c.isFirstDataFinish){c.isFirstDataFinish=!0;return}p.parentIdsJson={},V(h);const{value:b}=t,_=b!=null&&!o.isEmpty(b)&&o.isExistJsonKey(p.dataJson,b.toString())?b:"";C(_),c.lastValue=_});const U=()=>!0,Z=(h,b)=>{let _="";if(o.isEmpty(h)&&b===0)C("");else if(o.isEmpty(h)){if(m.value.splice(b+1),b>0){const O=m.value[b-1];O&&(_=O.selected)}}else{const O=h.toString();I(O)?(m.value.splice(b+1),m.value.push(w(b+1,O))):(_=h,m.value.splice(b+1))}B(_)},z=()=>c.lastValue,H=h=>{const b=M(h),_=b.length>0?b.slice().reverse().concat([h]):[h],O=[];return _.forEach(P=>{const J=p.dataJson[P];J!=null&&!o.isEmpty(J.name)&&O.push(J.name)}),O},S=()=>{const h=c.lastValue;let b="";return h!=null&&!o.isEmpty(h)&&(b=H(h.toString()).join(" → ")),{value:h,show:b||(h!=null?h.toString():"")}},E=h=>{const b=[],_=new Set;let O=h;for(;o.isNonEmptyString(O)&&!_.has(O);){_.add(O);const P=N(O);if(P==null)break;o.isNonEmptyString(P.name)&&b.unshift(P.name);const J=P[t.parentKey],Y=J!=null?String(J):"";if(Y===""||Y===String(t.topParentValue))break;O=Y}return b},f=e.computed(()=>{t.list,g.value;const h=c.lastValue;if(h==null||o.isEmpty(h))return"";const b=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",_=E(h.toString());return _.length>0?_.join(b):h.toString()});return l({getValue:z,getValueData:S,setValue:h=>{C(h),c.lastValue=h}}),(h,b)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:"cl-plaintext-value"},e.toDisplayString(f.value),9,th)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(s),class:e.normalizeClass(F.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(_,O)=>(e.openBlock(),e.createElementBlock("div",{key:`${u}-${O}`,class:"selectCascade-item",style:e.normalizeStyle(_.sty)},[e.createVNode(Yn,{isShowMsg:n.isShowInMsg,isCheck:n.isCheckValidate,checkValue:_.selected,rules:n.validateRules},{default:e.withCtx(()=>[e.createVNode(Sn,{isClear:n.isClear,isSearch:n.isSearch,placeholder:_.placeholder,list:_.list,disabled:n.disabled,value:_.selected,"onUpdate:value":P=>_.selected=P,onOpenBefore:U,onOnChange:P=>Z(P,O)},null,8,["isClear","isSearch","placeholder","list","disabled","value","onUpdate:value","onOnChange"])]),_:2},1032,["isShowMsg","isCheck","checkValue","rules"])],4))),128))],10,nh))}}),oh=["onClick"],ah=["innerHTML"],lh=e.defineComponent({name:"ClSelectMoveSearchUl",__name:"SearchTree",props:{list:{type:Array,default:()=>[]}},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=`selectmove-search-tree-${o.getRandom(5)}`,i=r=>{o.isUndefined(r)||a("onClick",r.toString())};return(r,d)=>{const u=e.resolveComponent("cl-select-move-search-ul");return e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(s,c)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${s.id}-${c}`},[e.createElementVNode("a",{href:"javascript:",tabindex:"-1",class:e.normalizeClass({"tree-hig":s.isHig,"tree-active":s.isSelected}),onClick:e.withModifiers(m=>i(s.id),["stop"])},[e.createVNode(mt,{value:s.isSelected,indeterminate:s.isIndeterminate},null,8,["value","indeterminate"]),e.createElementVNode("span",{class:"tree-text",innerHTML:s.showTextLabel},null,8,ah)],10,oh),s.list&&s.list.length>0?(e.openBlock(),e.createBlock(u,{key:0,list:s.list,onOnClick:i},null,8,["list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))),128))])}}}),ih={class:"selectmove-search-list"},sh={key:1},rh={class:"selectmove-search-empty"},ch=1e3,uh=e.defineComponent({name:"ClSelectMoveSearch",__name:"Search",props:{disabled:Boolean,placeholder:String,width:Number,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("common");const d=e.inject("$SelectmoveTop"),u=e.inject("$SelectmoveBase");if(o.isUndefined(d)||o.isUndefined(u))throw new Error("SelectMove.Search 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const s=e.reactive({isOpen:!1,isInitSelect:!1}),c=e.ref([]),m=e.ref([]);let p="",g=[];const v={jsonSelectIds:{},jsonSelectHalfIds:{}},y=e.computed(()=>({"selectmove-search-input":!0,"selectmove-search-open":s.isOpen})),k=e.computed(()=>({"selectmove-search-dropdown":!0,"selectmove-search-open":s.isOpen})),F=e.computed(()=>{const H={};return a.width&&a.width>0&&(H.width=`${a.width}px`),H}),B=()=>{t("onChange",m.value.join(","))},I=()=>{s.isOpen=!1,c.value=[]},A=H=>{const S=u.convertSelectHalf(H);m.value=H,v.jsonSelectHalfIds=o.getArrConvertJson(S),v.jsonSelectIds=o.getArrConvertJson(H)},N=H=>{const S=H.toLowerCase().trim();if(S===p)return g;const E=[];if(o.isEmpty(a.searchKey))return Se.warn("ClSelectMoveSearch","SelectMove.Search searchKey 为空,搜索将无结果"),p=S,g=E,E;const f=o.isNonEmptyString(a.searchMultipleJoin)?a.searchMultipleJoin:",",D=a.searchIsMultiple?S.split(f).map(O=>O.trim()):[S],h=a.searchKey.length,b=a.searchKey,_=d.getDataList();return o.isArray(_)?(_.forEach(O=>{if(o.isUndefined(O)||o.isUndefined(O.id)||!o.isString(O.id)&&!o.isNumber(O.id))return;const P=O.id.toString(),J=[];let Y=0;for(let ne=0;ne<h;ne++){const ce=O[b[ne]];if(!o.isString(ce)){Y++;continue}const X=ce.toLowerCase();let Q=!1;for(let le=0;le<D.length;le++)if(D[le].length>0&&X.indexOf(D[le])>-1){Q=!0;break}Q&&J.push(!0)}if(J.length>0)switch(a.searchKeyType){case"||":E.push(P);break;case"&&":J.length===h-Y&&E.push(P);break;default:Se.warn("ClSelectMoveSearch",`SelectMove.Search searchKeyType 未知值「${a.searchKeyType}」,按 || 兜底`),E.push(P);break}}),p=S,g=E,E):(p=S,g=E,E)},x=(H,S,E,f,D)=>{const h=[],b=D||[];return o.isExistJsonKey(S,H)&&S[H].forEach(_=>{if(b.indexOf(_)>-1)return;const O=b.concat([_]),P=o.getJsonClone(d.getDataInfo(_));if(o.isEmpty(P))return;let J=o.isNonEmptyString(P.name)?o.encodeHTML(P.name):"";const Y=a.searchTextFormat;if(Y&&Y.length>0){let X="";o.isArray(Y)?Y.length>E&&(X=Y[E]):o.isString(Y)&&(X=Y),o.isEmpty(X)||(J=o.convertStringFormatEncodeHTML(X,P))}P.showTextLabel=J;let ne=!1,ce=o.isExistJsonKey(S,_);ce?P.list=x(_,S,E+1,f,O):(ne=!0,P.list=[],d.getDataGroup(_).length>0&&(ce=!0,ne=!1)),P.isIndeterminate=o.isExistJsonKey(v.jsonSelectHalfIds,_),P.isSelected=o.isExistJsonKey(v.jsonSelectIds,_),P.isChild=ce,P.isLast=ne,P.treeLevel=E,P.isHig=o.isExistJsonKey(f,_),h.push(P)}),h},V=H=>{if(H.length===0)return[];const{parentKey:S,topParentValue:E}=a,f={};let D=[];H.forEach(_=>{f[_]=!0;const O=u.getParentIds(_);D.push(...O),D.push(_)}),D=o.getArrUnique(D);const h={};D.forEach(_=>{const O=d.getDataInfo(_);if(o.isUndefined(O))return;const P=O[S],J=o.isEmpty(P)?E:P.toString(),Y=J===E?d.getTopParentValue():J;o.isExistJsonKey(h,Y)||(h[Y]=[]),h[Y].push(_)});const b=d.getTopParentValue();return o.isExistJsonKey(h,b)||Se.warn("ClSelectMoveSearch","SelectMove.Search 数据存在环或祖先链断裂,搜索结果可能为空"),x(b,h,0,f)},w=()=>{if(s.isInitSelect=!1,!o.isEqualArr(a.selectId,m.value)){const S=u.convertSelectedValue(a.selectId,!0,[]);A(S)}},M=H=>{if(o.isNonEmptyString(H)){s.isInitSelect&&w();const S=N(H),E=V(S);c.value=E,s.isOpen=!0}else I()},C=H=>{const S=[];return H.forEach(E=>{const f=o.getJsonClone(E);if(o.isUndefined(f)||o.isUndefined(f.id))return;const D=f.id.toString();f.isIndeterminate=o.isExistJsonKey(v.jsonSelectHalfIds,D),f.isSelected=o.isExistJsonKey(v.jsonSelectIds,D),f.list&&f.list.length>0&&(f.list=C(f.list)),S.push(f)}),S},T=H=>{if(s.isOpen){const S=de.getParent(H.target,".selectmove-search");o.isUndefined(S)&&(s.isOpen=!1)}};e.onUnmounted(()=>{document.body.removeEventListener("click",T)}),e.watch(()=>s.isOpen,H=>{H?document.body.addEventListener("click",T):document.body.removeEventListener("click",T)}),e.watch(()=>a.selectId,()=>{s.isInitSelect=!0,s.isOpen&&(w(),c.value=C(c.value))},{immediate:!0}),e.watch(()=>[a.searchKey,a.searchKeyType,a.searchIsMultiple,a.searchMultipleJoin],()=>{p="",g=[]});const U=H=>{M(H)},Z=H=>{s.isOpen||M(H)},z=H=>{const S=o.isExistJsonKey(v.jsonSelectIds,H),E=u.convertSelectedValue(H,!S,m.value);A(E),c.value=C(c.value),B()};return(H,S)=>(e.openBlock(),e.createElementBlock("div",{class:"selectmove-search",style:e.normalizeStyle(F.value)},[e.createElementVNode("div",{class:e.normalizeClass(y.value)},[e.createVNode(Xt,{placeholder:n.placeholder,disabled:n.disabled,changeDelayTime:ch,onOnChange:U,onOnFocus:Z},null,8,["placeholder","disabled"])],2),s.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(k.value)},[e.createElementVNode("div",ih,[c.value.length>0?(e.openBlock(),e.createBlock(lh,{key:0,list:c.value,onOnClick:z},null,8,["list"])):(e.openBlock(),e.createElementBlock("ul",sh,[e.createElementVNode("li",rh,e.toDisplayString(e.unref(i).noResultsText),1)]))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4))}}),dh={class:"selectmove-tree"},mh={class:"selectmove-tree-head"},ph={class:"selectmove-tree-head-title"},fh={class:"selectmove-tree-body"},hh=["onClick"],gh=["innerHTML"],ja=10,vh=e.defineComponent({name:"ClSelectMoveTree",__name:"Tree",props:{disabled:Boolean,maxWidth:Number,width:Number,treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$SelectmoveTop"),r=e.inject("$SelectmoveBase");if(o.isUndefined(i)||o.isUndefined(r))throw new Error("SelectMove.Tree 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const d=`selectmove-tree-${o.getRandom(5)}`,u=e.reactive({selectIds:[],HalfSelectIds:[],openActiveId:[]}),s=e.ref([]),c=()=>{t("onChange",u.selectIds.join(","))},m=w=>{let M=0;const C=i.getDataGroup(w);if(C.length>0){const T=[],U=[];C.forEach(Z=>{const z=Z.id.toString();o.isExistValue(u.selectIds,z)&&T.push(z),o.isExistValue(u.HalfSelectIds,z)&&U.push(z)}),(U.length>0||T.length>0)&&(M=2),T.length>0&&T.length===C.length&&(M=1)}return M},p=(w,M,C)=>{const T={idx:w,pId:M,title:!o.isEmpty(a.treeTitle)&&a.treeTitle.length>w?a.treeTitle[w]:C,list:[],checkAll:0,sty:{}};if(a.width&&a.maxWidth&&a.width>0&&a.maxWidth>0){let U=a.width-3;const Z=a.maxWidth/a.width;w+1>=Z&&(U+=3),T.sty.width=`${U}px`}if(!o.isEmpty(M)){const U=i.getDataGroup(M);U.length>0&&(T.list=U.map(Z=>{const z=Z.id.toString(),H=o.getJsonClone(Z);H.selected=o.isExistValue(u.selectIds,z),H.indeterminate=o.isExistValue(u.HalfSelectIds,z),H.isActive=o.isExistValue(u.openActiveId,z);const S=i.getDataGroup(z);H.isSub=S.length>0;let E=o.isNonEmptyString(Z.name)?o.encodeHTML(Z.name):"";const f=a.treeTextFormat;if(f&&f.length>0){let D="";o.isArray(f)?f.length>w&&(D=f[w]):o.isString(f)&&(D=f),o.isEmpty(D)||(E=o.convertStringFormatEncodeHTML(D,H))}return H.showTextLabel=E,H})),T.checkAll=m(M)}return T},g=w=>{const M=r.convertSelectedValue(w,!0,[]),C=r.convertSelectHalf(M);u.selectIds=M,u.HalfSelectIds=C},v=(w,M)=>{const C=[];if(s.value.forEach((T,U)=>{U<=w&&C.push(p(T.idx,T.pId,T.title))}),i.getDataGroup(M).length>0){const T=i.getDataInfo(M),U=o.isNonEmptyString(T&&T.name)?T.name:"";C.push(p(w+1,M,U))}s.value=C},y=(w,M)=>{const C=w.id.toString(),T=o.getArrClone(u.openActiveId);T.splice(M),T.push(C),u.openActiveId=T,v(M,C)},k=(w,M)=>{const C=r.convertSelectedValue(w,M,u.selectIds),T=r.convertSelectHalf(C);u.selectIds=C,u.HalfSelectIds=T,s.value=s.value.map(U=>p(U.idx,U.pId,U.title)),c()},F=w=>{const M=s.value.length,C=w||[];if(M>0&&u.selectIds.length>0){let T,U=-1;for(let Z=M-1;Z>=0;Z--)if(s.value[Z].list.some(H=>{if(H.selected||H.indeterminate)return T=H,!0})){U=Z;break}if(U>-1&&!o.isUndefined(T)&&T.isSub){const Z=T.id.toString();if(C.indexOf(Z)>-1)return;C.push(Z),y(T,U),F(C)}}},B=()=>{const w=[];return w.push(p(0,i.getTopParentValue(),"")),w};let I=null;const A=()=>{u.openActiveId=[],o.isEmpty(a.selectId)?(u.selectIds=[],u.HalfSelectIds=[]):g(a.selectId),s.value=B(),F(),I=o.getArrClone(a.selectId),a.treeShowMinLevel>1&&u.selectIds.length===0&&e.nextTick(()=>{const w=s.value.length,M=o.isFinite(a.treeShowMinLevel)?Math.min(a.treeShowMinLevel,ja):ja;if(M>w){const C=[];for(let T=w;T<M;T++)C.push(p(T,"",""));s.value=s.value.concat(C)}})};e.onMounted(()=>{e.nextTick(()=>{A()})}),e.watch(()=>a.dataRefreshIndex,()=>{A()}),e.watch(()=>a.selectId,w=>{(o.isUndefined(I)?!1:o.isEqualArr(w,I))||(I=o.getArrClone(w),g(w),s.value=s.value.map(C=>p(C.idx,C.pId,C.title)),F())});const N=(w,M)=>{const C=i.getDataGroup(M.toString()).map(T=>T.id.toString());k(C,w.value)},x=(w,M)=>{k(M.toString(),w.value)},V=(w,M,C)=>{if(a.disabled)return;const T=M.id.toString();if(o.isEmpty(i.getDataGroup(T))){if(de.getParent(w.target,".selectmove-option-checkbox",".selectmove-option"))return;k(T.toString(),!o.isExistValue(u.selectIds,T))}y(M,C)};return(w,M)=>(e.openBlock(),e.createElementBlock("div",dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(C,T)=>(e.openBlock(),e.createElementBlock("div",{key:`${d}-tree-${T}`,class:"selectmove-tree-item",style:e.normalizeStyle(C.sty)},[e.createElementVNode("div",mh,[e.withDirectives(e.createVNode(mt,{disabled:n.disabled,value:C.checkAll===1,indeterminate:C.checkAll===2,onOnChange:U=>N(U,C.pId)},null,8,["disabled","value","indeterminate","onOnChange"]),[[e.vShow,C.list.length>0]]),e.createElementVNode("div",ph,e.toDisplayString(C.title),1)]),e.createElementVNode("div",fh,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.list,(U,Z)=>(e.openBlock(),e.createElementBlock("li",{key:`${d}-${U.id}-${Z}`,class:e.normalizeClass({"selectmove-option":!0,active:U.isActive}),onClick:z=>V(z,U,T)},[e.createElementVNode("div",null,[e.createVNode(mt,{className:"selectmove-option-checkbox",disabled:n.disabled,value:U.selected,indeterminate:U.indeterminate,onOnChange:z=>x(z,U.id)},null,8,["disabled","value","indeterminate","onOnChange"]),e.createElementVNode("div",{class:"selectmove-option-text",innerHTML:U.showTextLabel},null,8,gh),U.isSub?(e.openBlock(),e.createBlock(ye,{key:0,name:"angle-right",className:"sub-icon"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,hh))),128))])])],4))),128)),e.renderSlot(w.$slots,"tail")]))}}),yh={class:"selectmove-result"},kh={class:"selectmove-result-head"},Sh=["innerHTML"],wh={class:"selectmove-result-body"},Ch=["innerHTML"],Eh=e.defineComponent({name:"ClSelectMoveResult",__name:"Result",props:{disabled:Boolean,width:Number,resultCountFormat:String,resultTextFormat:String,resultMergeParent:Boolean,selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("common");const d=e.inject("$SelectmoveTop"),u=e.inject("$SelectmoveBase");if(o.isUndefined(d)||o.isUndefined(u))throw new Error("SelectMove.Result 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const s=`selectmove-result-${o.getRandom(5)}`,c=e.ref([]),m=e.computed(()=>c.value.length),p=e.computed(()=>o.isNonEmptyString(a.resultCountFormat)?o.convertStringFormat(a.resultCountFormat,{_count:m.value}):`${i.value.selected} ${m.value} ${i.value.count}`),g=e.computed(()=>{const B={};return a.width&&a.width>0&&(B.width=`${a.width}px`),B}),v=B=>{t("onChange",B.join(","))},y=B=>{if(o.isEmpty(B))return[];const I=B.filter(x=>!o.isUndefined(x)&&!o.isEmpty(x)),A=a.resultMergeParent?u.getValueMergeParent(I):u.getValueSplitChild(I),N=[];return A.forEach(x=>{const V=d.getDataInfo(x);if(o.isUndefined(V))return;const w=o.getJsonClone(V);o.isNonEmptyString(a.resultTextFormat)?w.showTextLabel=o.convertStringFormatEncodeHTML(a.resultTextFormat,w):o.isNonEmptyString(w.name)?w.showTextLabel=o.encodeHTML(w.name):w.showTextLabel="",N.push(w)}),N};e.watch(()=>a.selectId,B=>{const A=(o.isEmpty(B)?[]:B).filter(V=>!o.isUndefined(V)&&!o.isEmpty(V)),N=c.value.map(V=>V.id.toString());o.isEqualArr(A,N)||(c.value=y(A))},{immediate:!0}),e.watch(()=>a.dataRefreshIndex,()=>{c.value=y(a.selectId)}),e.watch(()=>a.resultMergeParent,()=>{c.value=y(a.selectId)});const k=()=>{c.value=[],v([])},F=B=>{const I=[],A=[],N=B.id.toString();c.value.forEach(x=>{const V=x.id.toString();V!==N&&(A.push(x),I.push(V))}),c.value=A,v(I)};return(B,I)=>(e.openBlock(),e.createElementBlock("div",yh,[e.createElementVNode("div",{class:"selectmove-result-container",style:e.normalizeStyle(g.value)},[e.createElementVNode("div",kh,[e.createElementVNode("span",null,[n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn-cleanAll",type:"button",onClick:k},e.toDisplayString(e.unref(i).deleteAll),1))]),e.createElementVNode("span",{innerHTML:p.value},null,8,Sh)]),e.createElementVNode("div",wh,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(A,N)=>(e.openBlock(),e.createElementBlock("li",{key:`${s}-${A.id}-${N}`},[e.createElementVNode("div",null,[e.createElementVNode("div",{innerHTML:A.showTextLabel},null,8,Ch),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createBlock(ye,{key:0,name:"close",className:"btn-clean",onClick:x=>F(A)},null,8,["onClick"]))])]))),128))])])],4)]))}}),bh={class:"selectmove-body"},xh={key:0,class:"selectmove-result"},Bh=100,Ih=175,Ya=e.defineComponent({name:"ClSelectMoveContainer",__name:"Container",props:{disabled:Boolean,width:Number,isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShowSlot:Boolean,resultIsShowSubUnit:Boolean,resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},dataRefreshIndex:{type:Number,default:0},selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onSelectValue:n=>!0,onInitComplete:()=>!0},setup(n,{emit:l}){const a=n,t=l;let i=!1;const r=e.inject("$SelectmoveTop");if(o.isUndefined(r))throw new Error("SelectMove.Container 缺少容器依赖($SelectmoveTop),请确保在 ClSelectMove 内使用");const d=e.reactive({searchWidth:0,treeWidth:0,resultWidth:0}),u={parentIdsJson:Object.create(null),childIdJson:Object.create(null),childIdsJson:Object.create(null)},s=F=>{t("onSelectValue",F)},c=()=>{e.nextTick(()=>{i||t("onInitComplete")})},m=F=>{let B=[];return o.isExistJsonKey(u.childIdJson,F)?B=u.childIdJson[F]:r.isCheckChildren(F)&&(r.getDataGroup(F).forEach(I=>{o.isUndefined(I)||o.isUndefined(I.id)||B.push(I.id.toString())}),u.childIdJson[F]=B),B},p=(F,B)=>{let I=[];const A=B||[];return A.indexOf(F)>-1||(A.push(F),o.isExistJsonKey(u.childIdsJson,F)?I=u.childIdsJson[F]:(r.isCheckChildren(F)&&r.getDataGroup(F).forEach(N=>{if(o.isUndefined(N)||o.isUndefined(N.id))return;const x=N.id.toString();I.push(x);const V=p(x,A);V.length>0&&(I=I.concat(V))}),u.childIdsJson[F]=I)),I},g=(F,B)=>{const{parentKey:I,topParentValue:A}=a;let N=[];const x=B||[];if(x.indexOf(F)>-1)return N;if(x.push(F),o.isExistJsonKey(u.parentIdsJson,F))N=u.parentIdsJson[F];else{const V=r.getDataInfo(F);if(!o.isUndefined(V)){const w=V[I],M=o.isEmpty(w)?A:w.toString();if(M!==A&&!o.isUndefined(r.getDataInfo(M))){N.push(M);const C=g(M,x);C.length>0&&(N=N.concat(C))}}u.parentIdsJson[F]=N}return N},v=(F,B,I)=>{const A=(o.isUndefined(I)?[]:I).filter(T=>!o.isUndefined(T));if(o.isUndefined(F))return o.getArrClone(A);const N=o.isObject(F)?F:[F];if(!o.isArray(N))return o.getArrClone(A);const x=o.getArrConvertJson(A),V={},w=[],M=[];N.forEach(T=>{if(o.isUndefined(T))return;const U=[],Z=[],z=T.toString();if(B){if(!(o.isExistJsonKey(x,z)||o.isExistJsonKey(V,z))){U.push(z);const S=p(z);S&&S.length>0&&U.push(...S);const E=g(z);for(let f=0;f<E.length;f++){const D=E[f].toString();if(o.isExistJsonKey(x,D)||o.isExistJsonKey(V,D))break;const h=m(D),b=[];if(h.forEach(_=>{const O=_.toString();(o.isExistJsonKey(x,O)||o.isExistJsonKey(V,O)||U.indexOf(O)>-1)&&b.push(O)}),h.length===b.length)U.push(D);else break}}}else{Z.push(z);const H=p(z);H&&H.length>0&&Z.push(...H);const S=g(z);Z.push(...S)}U.length>0&&U.forEach(H=>{w.push(H),V[H]=!0}),Z.length>0&&Z.forEach(H=>{M.push(H)})});let C=o.getArrClone(A);return C.push(...w),C=o.getArrUnique(C),C=o.getArrRemoveById(C,M),C},y=F=>{if(o.isUndefined(F)||!o.isArray(F))return[];const B=[],I={};F.forEach(x=>{I[x]=!0;const V=g(x);B.push(...V)});const A=[],N={};return B.forEach(x=>{!o.isExistJsonKey(N,x)&&!o.isExistJsonKey(I,x)&&(N[x]=!0,A.push(x))}),A},k=()=>{const F=a.width;if(F!==void 0&&o.isFinite(F)&&F>=350){const B=Math.floor(F/Ih),I=Math.floor(F/B);d.searchWidth=F,d.treeWidth=I,d.resultWidth=I}};return e.onMounted(()=>{k(),c()}),e.onBeforeUnmount(()=>{i=!0}),e.watch(()=>a.dataRefreshIndex,()=>{u.parentIdsJson=Object.create(null),u.childIdJson=Object.create(null),u.childIdsJson=Object.create(null)}),e.watch(()=>a.width,()=>{k()}),e.provide("$SelectmoveBase",{convertSelectedValue:(F,B,I)=>{let A=!1;if(B&&o.isObject(F)&&F.length>Bh&&(A=!0),A){const N=r.getValueMergeParent(F);return v(N,B,I)}else return v(F,B,I)},convertSelectHalf:y,getChildIds:p,getParentIds:g,getLastChildIds:(F,B)=>r.getLastChildIds(F,B),getValueMergeParent:F=>r.getValueMergeParent(F),getValueSplitChild:F=>r.getValueSplitChild(F)}),(F,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.isSearch?(e.openBlock(),e.createBlock(uh,{key:0,disabled:n.disabled,width:d.searchWidth,placeholder:n.searchPlaceholder,searchKey:n.searchKey,searchKeyType:n.searchKeyType,searchIsMultiple:n.searchIsMultiple,searchMultipleJoin:n.searchMultipleJoin,searchTextFormat:n.searchTextFormat,selectId:n.selectId,parentKey:n.parentKey,topParentValue:n.topParentValue,onOnChange:s},null,8,["disabled","width","placeholder","searchKey","searchKeyType","searchIsMultiple","searchMultipleJoin","searchTextFormat","selectId","parentKey","topParentValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",bh,[e.createVNode(vh,{disabled:n.disabled,maxWidth:d.searchWidth,width:d.treeWidth,treeTitle:n.treeTitle,treeShowMinLevel:n.treeShowMinLevel,treeTextFormat:n.treeTextFormat,selectId:n.selectId,dataRefreshIndex:n.dataRefreshIndex,onOnChange:s},{tail:e.withCtx(()=>[n.resultIsShowSlot?(e.openBlock(),e.createElementBlock("div",xh,[e.renderSlot(F.$slots,"resultSelect")])):n.resultIsShowSubUnit?(e.openBlock(),e.createBlock(Eh,{key:1,disabled:n.disabled,width:d.resultWidth,resultTextFormat:n.resultTextFormat,resultCountFormat:n.resultCountFormat,resultMergeParent:n.resultMergeParent,selectId:n.selectId,dataRefreshIndex:n.dataRefreshIndex,onOnChange:s},null,8,["disabled","width","resultTextFormat","resultCountFormat","resultMergeParent","selectId","dataRefreshIndex"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))]),_:3},8,["disabled","maxWidth","width","treeTitle","treeShowMinLevel","treeTextFormat","selectId","dataRefreshIndex"])])],64))}}),Dh=["id"],Th={className:"selectmove-text-num"},Nh={class:"selectmove-container"},Vh=["id"],ai=e.defineComponent({name:"ClSelectMove",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!1},placeholder:String,isClear:{type:Boolean,default:!1},containerWidth:{type:Number,default:350},isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShow:{type:Boolean,default:!0},resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useSlots(),d=t.id,u=e.useTemplateRef("refElDropdownLayer"),s=e.reactive({dataRefreshIndex:0,selectedIds:[],IsShowResultSlot:!o.isUndefined(r.resultSelect),isInitEmitDone:!1}),c=e.ref([]),m={dataJson:{},dataGroup:{},childLastIdsJson:{}},p=e.computed(()=>({disabled:t.disabled,width:t.containerWidth,isSearch:t.isSearch,searchPlaceholder:t.searchPlaceholder,searchKey:t.searchKey,searchKeyType:t.searchKeyType,searchIsMultiple:t.searchIsMultiple,searchMultipleJoin:t.searchMultipleJoin,searchTextFormat:t.searchTextFormat,treeTitle:t.treeTitle,treeShowMinLevel:t.treeShowMinLevel,treeTextFormat:t.treeTextFormat,resultIsShowSubUnit:t.resultIsShow,resultIsShowSlot:s.IsShowResultSlot,resultTextFormat:t.resultTextFormat,resultCountFormat:t.resultCountFormat,resultMergeParent:t.resultMergeParent,parentKey:t.parentKey,topParentValue:t.topParentValue})),g=e.computed(()=>{let O="panel-selectmove ";return o.isNonEmptyString(t.className)&&(O+=t.className),t.isDropdown||t.disabled&&(O+=" selectmove-disabled "),O}),v=O=>{i("update:value",O),i("update:modelValue",O)},y=(O,P)=>{v(O),i("onChange",O,P)},k=()=>{i("onInit")},F=()=>t.list,B=O=>o.isExistJsonKey(m.dataGroup,O.toString()),I=O=>{const P=O.toString();return B(P)?m.dataGroup[P]:[]},A=O=>{const P=O.toString();return o.isExistJsonKey(m.dataJson,P)?m.dataJson[P]:null},N=()=>`top_${t.topParentValue}`,x=O=>{const{parentKey:P,topParentValue:J}=t,Y={},ne={};!o.isEmpty(O)&&o.isArray(O)&&O.forEach(ce=>{const X=o.getJsonClone(ce);if(!o.isString(X.id)&&!o.isNumber(X.id))return;const Q=X.id.toString(),le=o.isEmpty(X[P])?J:X[P].toString();Y[Q]=X;const K=le===J?N():le;o.isExistJsonKey(ne,K)||(ne[K]=[]),ne[K].push(X)}),m.dataJson=Y,m.dataGroup=ne,m.childLastIdsJson={}};x(t.list);const V=(O,P)=>{let J=[];const Y=P||[];return Y.indexOf(O)>-1||(Y.push(O),o.isExistJsonKey(m.childLastIdsJson,O)&&m.childLastIdsJson[O].length>0?J=m.childLastIdsJson[O]:(B(O)?I(O).forEach(ne=>{const ce=V(ne.id.toString(),Y);ce.length>0&&(J=J.concat(ce))}):J.push(O),m.childLastIdsJson[O]=J)),J},w=(O,P)=>{const{parentKey:J,topParentValue:Y}=t,ne=P||[],ce={},X=[];let Q=[];if(O.forEach(le=>{const K=A(le);if(!o.isUndefined(K)){const W=K[J],R=o.isUndefined(W)?Y:W.toString();R===Y?Q.push(le):(o.isExistJsonKey(ce,R)||(ce[R]=[]),ce[R].push(le))}}),!o.isEmpty(ce))for(const[le,K]of Object.entries(ce))K.length===I(le).length&&ne.indexOf(le)===-1?X.push(le):Q=Q.concat(K);if(X.length>0){Q.push(...X);const le=o.getArrUnique(Q);return w(le,ne.concat(X))}else return Q},M=O=>{const P=[],J=o.getArrConvertJson(O);return O.forEach(ne=>{const ce=I(ne);if(o.isEmpty(ce))P.push(ne);else{const X=[];ce.forEach(Q=>{o.isExistJsonKey(J,Q.id.toString())&&X.push(Q.id)}),ce.length!==X.length&&P.push(ne)}}),w(P)},C=O=>{let P=[];return O.forEach(J=>{const Y=V(J);P.push(...Y)}),P=o.getArrUnique(P),P},T=(O,P)=>(o.isBoolean(P)?P:t.isOutMerge)?M(O):C(O),U=O=>{const P=[],J=[];return O.forEach(Y=>{const ne=A(Y);o.isUndefined(ne)||(P.push(ne),J.push(o.isNonEmptyString(ne.name)?o.encodeHTML(ne.name):""))}),{list:P,label:J}},Z=O=>{const P=[],J=new Set;let Y=O;for(;o.isNonEmptyString(Y)&&!J.has(Y);){J.add(Y);const ne=A(Y);if(!ne)break;o.isNonEmptyString(ne.name)&&P.unshift(ne.name);const ce=ne[t.parentKey],X=ce!=null?String(ce):"";if(X===""||X===String(t.topParentValue))break;Y=X}return P},z=e.computed(()=>{if(t.list,o.isEmpty(s.selectedIds))return"";const O=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",P=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return T(s.selectedIds,t.resultMergeParent).map(Y=>{const ne=Z(Y);return o.removeHTMLTags(ne.length>0?ne.join(O):Y)}).join(P)}),H=()=>{if(t.isDropdown)if(o.isEmpty(s.selectedIds))c.value=[];else{const O=T(s.selectedIds,t.resultMergeParent);c.value=U(O).label}};(()=>{o.isNonEmptyString(t.value)&&(s.selectedIds=o.split(t.value)),H()})(),e.watch(()=>t.value,(O,P)=>{if(O!==P){const J=o.isNonEmptyString(O)?o.split(O):[],Y=T(s.selectedIds);o.isEqualArr(J,Y)||(s.selectedIds=o.isEmpty(J)?[]:J,H())}}),e.watch(()=>t.list,O=>{o.isArray(O)&&(x(O),s.selectedIds=s.selectedIds.filter(P=>!o.isUndefined(A(P))),s.dataRefreshIndex++,H())}),e.watch(()=>t.resultMergeParent,()=>{H()});const E=()=>{t.disabled||(s.selectedIds=[],H(),y("",[]))},f=()=>{t.isDropdown&&(H(),u.value&&(u.value.checkIsShowOpen()||u.value.initCompleteOpen())),s.isInitEmitDone||(s.isInitEmitDone=!0,k())},D=O=>{const P=o.isEmpty(O)?[]:o.split(O);s.selectedIds=P;const J=T(P),Y=U(J);H(),y(J.join(","),Y.list)};return e.provide("$SelectmoveTop",{isCheckChildren:B,getDataGroup:I,getDataInfo:A,getDataList:F,getLastChildIds:V,getValueMergeParent:M,getValueSplitChild:C,getTopParentValue:N}),l({getValue:()=>T(s.selectedIds).join(","),getValueData:()=>{const O=T(s.selectedIds);return U(O).list},setValue:O=>{s.selectedIds=o.isString(O)&&!o.isEmpty(O)?o.split(O):[],H()}}),(O,P)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:"cl-plaintext-value"},e.toDisplayString(z.value),9,Dh)):n.isDropdown?(e.openBlock(),e.createBlock(kn,{key:1,id:e.unref(d),ref_key:"refElDropdownLayer",ref:u,classParent:g.value,classText:"selectmove-text",classDropDown:"selectmove-dropdown",placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:c.value.join(","),textArrowDirection:"right",isUseDropdownArrow:!0,appendContainer:n.appendContainer,onOnClear:E},{textExtend:e.withCtx(()=>[e.createElementVNode("span",Th,[c.value.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:c.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),dropdown:e.withCtx(()=>[e.createElementVNode("div",Nh,[e.createVNode(Ya,e.mergeProps(p.value,{dataRefreshIndex:s.dataRefreshIndex,selectId:s.selectedIds,onOnSelectValue:D,onOnInitComplete:f}),{resultSelect:e.withCtx(()=>[e.renderSlot(O.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])])]),_:3},8,["id","classParent","placeholder","isDisabled","isClear","textLabel","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(d),class:e.normalizeClass(g.value)},[e.createVNode(Ya,e.mergeProps(p.value,{dataRefreshIndex:s.dataRefreshIndex,selectId:s.selectedIds,onOnSelectValue:D,onOnInitComplete:f}),{resultSelect:e.withCtx(()=>[e.renderSlot(O.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])],10,Vh))}}),Mh=["id"],Oh={key:0,class:"cl-plaintext-value"},_h={key:2,class:"selectTag-container"},Ah=["aria-selected","aria-disabled","tabindex"],Lh=["aria-selected","aria-disabled","tabindex","onClick","onKeydown"],$h=["innerHTML"],Fh={key:1},ua=e.defineComponent({name:"ClSelectTag",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:Boolean,type:{type:String,required:!0,validator:n=>["checkbox","radio"].indexOf(n)!==-1},list:{type:Array,default:()=>[]},theme:String,width:String,isShowAll:Boolean,showAllLabel:String,isInitRadioValue:{type:Boolean,default:!0},isRadioClickCancel:Boolean,checkChangeBefore:Function,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l,a,t)=>!0,onInit:(n,l,a)=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=`s-${o.getRandom(5)}`,s=t.id,c=e.reactive({theme:""}),m=e.ref(!1),p=Y=>{let ne=[];return o.isEmpty(Y)||(ne=Y.toString().split(",")),ne},g=e.ref(p(t.value));let v=[],y={};const k=e.ref(0),F=e.ref(!1);let B=0;const I=e.computed(()=>{const Y=t.list;return o.isArray(Y)?Y.filter(ne=>!o.isEmpty(ne)):[]}),A=e.computed(()=>{const Y=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,k.value;const ne=[];return g.value.forEach(ce=>{const X=o.isExistJsonKey(y,ce)?y[ce]:void 0;X&&o.isNonEmptyString(X.name)&&ne.push(X.name)}),ne.join(Y)}),N=e.computed(()=>{const{theme:Y}=t,ne={"panel-select-tag":!0};let ce=c.theme;return Y&&(ce=Y),o.isEmpty(ce)||(ne[`selectTag-${ce}`]=!0),o.getJsonMerge(ne,de.getClassNameJson(t.className))}),x=e.computed(()=>{const Y={};return o.isEmpty(t.width)||(Y.width=t.width),Y}),V=Y=>{i("update:value",Y),i("update:modelValue",Y)},w=Y=>{if(!o.isEqualArr(g.value,Y)){const ne=o.getArrClone(g.value),ce=C(ne);g.value=o.getArrClone(Y);const{value:X,isAll:Q,info:le}=C(Y);t.isShowAll&&(m.value=Q),V(X),i("onChange",X,le,Q,{value:ce.value,info:ce.info})}},M=()=>{e.nextTick(()=>{const{value:Y,isAll:ne,info:ce}=C(g.value);i("onInit",Y,ce,ne)})},C=Y=>{const ne=[];o.isEmpty(Y)||Y.forEach(le=>{o.isExistJsonKey(y,le)&&ne.push(o.getJsonClone(y[le]))});const ce=Y.join(","),X=ne.length>0&&ne.length===v.length;let Q;return t.type==="radio"?(Q={},ne.length>0&&(Q=ne[0])):Q=ne,{value:ce,info:Q,isAll:X}},T=Y=>!o.isEmpty(Y.id)&&g.value.includes(Y.id.toString()),U=Y=>{const ne={};return Y.isHtml?ne.width="auto":o.isEmpty(Y.width)?o.isEmpty(t.width)||(ne.width=t.width):ne.width=Y.width,ne},Z=()=>{const Y=wt.getGlobalConfig("selectTag");Y?.theme&&(c.theme=Y.theme)},z=Y=>{const ne=[];if(Y.length>0){const ce=y[Y[0]],X=ce&&!o.isEmpty(ce.type)?ce.type:t.type;Y.forEach(Q=>{if(o.isExistJsonKey(y,Q)){const le=y[Q];if((o.isEmpty(le.type)?t.type:le.type)===X)switch(X){case"radio":ne.length===0&&ne.push(Q);break;case"checkbox":ne.push(Q);break}}})}return ne},H=Y=>{if(y={},v=[],!o.isEmpty(Y)){const ne=o.getArrClone(g.value);Y.forEach(ce=>{if(o.isEmpty(ce?.id))return;const X=ce.id.toString();y[X]=ce,ce.isDisabled?o.isExistValue(ne,X)&&v.push(X):v.push(X)})}k.value+=1},S=()=>{if(F.value){let Y=[];o.isEmpty(g.value)||(Y=z(g.value),o.isEqualArr(g.value,Y)||(g.value=Y,V(Y.join(",")))),t.isShowAll&&(m.value=Y.length>0&&Y.length===v.length)}},E=()=>{if(t.type==="radio"&&t.isInitRadioValue&&o.isEmpty(g.value)&&!o.isEmpty(t.list)){const Y=t.list.find(ne=>!ne.isDisabled);if(Y&&!o.isEmpty(Y.id)){const ne=Y.id.toString();g.value=[ne],V(ne)}}},f=Y=>{const ne=p(Y);o.isEqualArr(g.value,ne)||(g.value=ne,V(ne.join(",")))},D=()=>{Z(),F.value=!o.isEmpty(t.list),H(t.list),E(),S()};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.watch(F,Y=>{Y&&M()}),e.watch([()=>t.list,()=>t.value,()=>t.type],([Y,ne],[ce,X])=>{const Q=Y;!F.value&&Q!==ce&&(F.value=!0),ne!==X&&f(ne),H(Q),ne===X&&E(),S()});const h=async()=>{if(!t.disabled&&!o.isEmpty(t.list)){const Y=++B;if(!t.list.some(le=>!le.isDisabled))return;const ce=[];t.list.forEach(le=>{if(o.isEmpty(le.id))return;const K=le.id.toString();le.isDisabled?o.isExistValue(g.value,K)&&ce.push(K):m.value||ce.push(K)});const X=z(ce);let Q=!0;if(t.checkChangeBefore){const{value:le}=C(X),K=C(o.getArrClone(g.value));try{Q=await t.checkChangeBefore(le,K.value),Q=o.isBoolean(Q)?Q:!0}catch(W){Q=!1,i("onError",W instanceof Error?W.message:String(W))}}Q&&Y===B&&w(X)}},b=async Y=>{if(!Y.isDisabled&&!t.disabled&&!o.isEmpty(Y.id)){const ne=++B;let ce=t.type;ce=o.isEmpty(Y.type)?ce:Y.type;const X=o.getArrClone(g.value);let Q=[];const le=Y.id.toString();if(X.length===0)Q=[le];else if(ce==="radio")o.isEqualArr(X,[le])?Q=t.isRadioClickCancel?[]:X:Q=[le];else{const W=y[X[0]];(W&&!o.isEmpty(W.type)?W.type:t.type)==="radio"?Q=[le]:o.isExistValue(X,le)?Q=o.getArrRemoveById(X,le):(Q=o.getArrClone(X),Q.push(le))}let K=!0;if(t.checkChangeBefore){const{value:W}=C(Q),R=C(X);try{K=await t.checkChangeBefore(W,R.value),K=o.isBoolean(K)?K:!0}catch(ae){K=!1,i("onError",ae instanceof Error?ae.message:String(ae))}}K&&ne===B&&w(Q)}},_=()=>z(g.value).join(",");return l({getValue:_,getValueData:()=>{const{value:Y,info:ne}=C(_().split(","));return t.type==="radio"&&o.isEmpty(Y)?null:ne},setValue:Y=>{f(Y),H(t.list),S()},runInitComplete:()=>{F.value||(F.value=!0,f(t.value),H(t.list),E(),S())}}),(Y,ne)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(N.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Oh,e.toDisplayString(A.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isPlaintext?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("ul",_h,[n.isShowAll?(e.openBlock(),e.createElementBlock("li",{key:0,role:"option","aria-selected":m.value,"aria-disabled":n.disabled,tabindex:n.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":m.value,"selectTag-disabled":n.disabled}),style:e.normalizeStyle(x.value),onClick:ne[0]||(ne[0]=ce=>h()),onKeydown:[ne[1]||(ne[1]=e.withKeys(e.withModifiers(ce=>h(),["prevent"]),["enter"])),ne[2]||(ne[2]=e.withKeys(e.withModifiers(ce=>h(),["prevent"]),["space"]))]},[e.createElementVNode("span",null,e.toDisplayString(n.showAllLabel||e.unref(r).checkboxAll),1)],46,Ah)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(ce,X)=>(e.openBlock(),e.createElementBlock("li",{key:`${u}-${ce.id}-${X}`,role:"option","aria-selected":T(ce),"aria-disabled":ce.isDisabled||n.disabled,tabindex:ce.isDisabled||n.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":T(ce),"selectTag-disabled":ce.isDisabled||n.disabled}),style:e.normalizeStyle(U(ce)),onClick:Q=>b(ce),onKeydown:[e.withKeys(e.withModifiers(Q=>b(ce),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Q=>b(ce),["prevent"]),["space"])]},[e.renderSlot(Y.$slots,"default",{data:ce},()=>[ce.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:e.unref(o).encodeHTML(ce.name)},null,8,$h)):(e.openBlock(),e.createElementBlock("span",Fh,e.toDisplayString(ce.name),1))])],46,Lh))),128))]))],10,Mh))}}),Ph={class:"tree-ul"},Rh=["onClick"],Hh=["aria-checked","onClick"],Uh=["tabindex","aria-disabled","onClick","onDblclick","onKeydown"],zh=["innerHTML"],Jh={key:1},qa=170,li=e.defineComponent({name:"ClTreeUl",__name:"Ul",props:{list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},firstOpenIds:{type:Array,default:()=>[]},openIds:{type:Array,default:()=>[]},selectIds:{type:Array,default:()=>[]},selectUnIds:{type:Array,default:()=>[]}},emits:["onSelect","onShrink"],setup(n,{emit:l}){const a=n,t=l,i=`tree-${o.getRandom(5)}`;let r=!1;const d=e.inject("$TreeTop",{isCheckChildren:()=>(r||(r=!0,Se.warn("ClTreeUl","未检测到 ClTree 容器提供 $TreeTop,子级判断降级为 false")),!1)}),u={dbClickTimeOut:null},s=e.computed(()=>new Set(a.firstOpenIds)),c=e.computed(()=>new Set(a.selectIds)),m=e.computed(()=>new Set(a.selectUnIds)),p=e.computed(()=>new Set(a.openIds)),g=M=>{o.isUndefined(M)||t("onSelect",M.toString())},v=M=>{o.isUndefined(M)||t("onShrink",M.toString())},y=M=>o.isUndefined(M.id)?"":M.id.toString(),k=M=>{const C=y(M);return c.value.has(C)?"true":m.value.has(C)?"mixed":"false"},F=M=>{const C={"tree-node":!0};if(C["tree-node-end"]=M.isEnd,!M.isEnd){const T=o.isUndefined(M.id)?"":M.id.toString(),U=p.value.has(T);C["tree-node-open"]=U,C["tree-node-closed"]=!U}return C},B=M=>{const C=o.isUndefined(M.id)?"":M.id.toString(),T={"tree-node-text":!0};return T["tree-node-select"]=c.value.has(C),T["tree-node-selectUn"]=m.value.has(C),T};e.onBeforeUnmount(()=>{u.dbClickTimeOut&&window.clearTimeout(u.dbClickTimeOut)});const I=M=>{a.disabled||(window.clearTimeout(u.dbClickTimeOut),v(M.id))},A=M=>{a.disabled||(window.clearTimeout(u.dbClickTimeOut),g(M.id))},N=M=>{if(!a.disabled)if(d.isCheckChildren(M.id)){let C=!0;!a.multiple&&!a.isSingleSelectParent&&(C=!1),C?(window.clearTimeout(u.dbClickTimeOut),u.dbClickTimeOut=window.setTimeout(()=>{a.disabled||g(M.id)},qa)):window.clearTimeout(u.dbClickTimeOut)}else window.clearTimeout(u.dbClickTimeOut),u.dbClickTimeOut=window.setTimeout(()=>{a.disabled||g(M.id)},qa)},x=M=>{a.disabled||d.isCheckChildren(M.id)&&(u.dbClickTimeOut&&window.clearTimeout(u.dbClickTimeOut),v(M.id))},V=M=>{g(M)},w=M=>{v(M)};return(M,C)=>(e.openBlock(),e.createElementBlock("ul",Ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(T,U)=>(e.openBlock(),e.createElementBlock("li",{key:`${i}-${T.id}-${U}`,class:e.normalizeClass(F(T))},[e.createElementVNode("i",{class:"tree-shrink",onClick:e.withModifiers(Z=>I(T),["stop"])},null,8,Rh),e.createElementVNode("span",{class:e.normalizeClass(B(T))},[n.multiple?(e.openBlock(),e.createElementBlock("i",{key:0,class:"tree-node-checkbox",role:"checkbox","aria-checked":k(T),onClick:e.withModifiers(Z=>A(T),["stop"])},null,8,Hh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("a",{href:"javascript:",tabindex:n.disabled?-1:0,"aria-disabled":n.disabled,onClick:e.withModifiers(Z=>N(T),["stop"]),onDblclick:e.withModifiers(Z=>x(T),["stop"]),onKeydown:e.withKeys(e.withModifiers(Z=>N(T),["prevent"]),["enter"])},[T.showTextLabelHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:T.showTextLabel},null,8,zh)):(e.openBlock(),e.createElementBlock("span",Jh,e.toDisplayString(T.showTextLabel),1))],40,Uh)],2),s.value.has(y(T))?(e.openBlock(),e.createBlock(gn,{key:0},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(li,{list:T.list,multiple:n.multiple,isSingleSelectParent:n.isSingleSelectParent,disabled:n.disabled,firstOpenIds:n.firstOpenIds,openIds:n.openIds,selectIds:n.selectIds,selectUnIds:n.selectUnIds,onOnSelect:V,onOnShrink:w},null,8,["list","multiple","isSingleSelectParent","disabled","firstOpenIds","openIds","selectIds","selectUnIds"]),[[e.vShow,p.value.has(y(T))]])]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),Kh=["id"],Wh=["id"],da=e.defineComponent({name:"ClTree",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},searchOpenParentIds:{type:String,default:""},searchFoldParentIds:{type:String,default:""},searchKeyword:{type:String,default:""},highlightMode:{type:String,default:""},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "}},emits:["update:value","update:modelValue","onChange","onInit"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.reactive({firstOpenIds:[],openParentIds:[],selectedIds:[],selectedUnIds:[],list:[]}),u={dataJson:{},dataGroup:{},childLastIdsJson:{},prevSearchOpenParentIds:"",prevSearchFoldParentIds:""},s=e.computed(()=>({multiple:t.multiple,disabled:t.disabled,isSingleSelectParent:t.isSingleSelectParent})),c=e.computed(()=>o.getJsonMerge({"panel-tree":!0},de.getClassNameJson(t.className))),m=X=>{i("update:value",X),i("update:modelValue",X)},p=(X,Q)=>{m(X),i("onChange",X,Q)},g=()=>{e.nextTick(()=>{i("onInit")})},v=X=>{const Q=o.isUndefined(X)?"":X.toString();return o.isExistJsonKey(u.dataGroup,Q)},y=X=>{const Q=o.isUndefined(X)?"":X.toString();return v(Q)?u.dataGroup[Q]:[]},k=e.ref(0),F=X=>{const Q=X.toString();return o.isExistJsonKey(u.dataJson,Q)?u.dataJson[Q]:null},B=X=>{const Q=[],le=new Set;let K=X;for(;o.isNonEmptyString(K)&&!le.has(K);){le.add(K);const W=F(K);if(!W)break;o.isNonEmptyString(W.name)&&Q.unshift(W.name);const R=W[t.parentKey],ae=R!=null?String(R):"";if(ae===""||ae===String(t.topParentValue))break;K=ae}return Q},I=e.computed(()=>{if(t.list,k.value,o.isEmpty(d.selectedIds))return"";const X=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",Q=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return E(d.selectedIds,t.isOutMerge).map(K=>{const W=B(K);return o.removeHTMLTags(W.length>0?W.join(X):K)}).join(Q)}),A=(X,Q,le)=>{const K=[],W=Q+1;return le===void 0&&(le=new Set),le.has(X)||(le.add(X),y(X).forEach(R=>{const ae={...R},G=ae.id.toString(),q=v(G);ae.isEnd=!q,ae.level=W,q&&(ae.list=A(G,W,le)),K.push(ae)})),K},N=X=>X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),x=X=>{const Q=t.searchKeyword,le=t.highlightMode;if(!o.isNonEmptyString(X)||o.isEmpty(Q))return N(String(X));const K=o.isNonEmptyString(t.highlightColor)?t.highlightColor:"#ffe58f",W=ee=>`<mark style="background:${K}">${N(ee)}</mark>`;if(le==="full")return X.includes(Q)?W(X):N(X);const R=X.indexOf(Q);if(R===-1)return N(X);const ae=N(X.slice(0,R)),G=W(X.slice(R,R+Q.length)),q=N(X.slice(R+Q.length));return`${ae}${G}${q}`},V=X=>{const{parentKey:Q,topParentValue:le}=t,K=o.isNonEmptyString(le)?le:"0",W={},R={};o.isEmpty(X)||X.forEach(ae=>{const G=o.getJsonClone(ae),q=!o.isEmpty(t.searchKeyword)&&!o.isEmpty(t.highlightMode);G.showTextLabelHtml=q,G.showTextLabel=q?x(o.isString(G.name)?G.name:""):o.isString(G.name)?G.name:"";const ee=o.isString(G.id)||typeof G.id=="number"&&o.isFinite(G.id),$=o.isString(G[Q])||typeof G[Q]=="number"&&o.isFinite(G[Q]);if(!ee||!$)return;const j=G.id.toString(),se=G[Q].toString();W[j]=G,o.isExistJsonKey(R,se)||(R[se]=[]),R[se].push(G)}),u.dataJson=W,u.dataGroup=R,u.childLastIdsJson={},d.list=A(K,0),k.value+=1},w=(X,Q)=>{let le=[];const{parentKey:K,topParentValue:W}=t,R=o.isNonEmptyString(W)?W:"0",ae=o.isEmpty(X)?"":X.toString();if(Q===void 0&&(Q=new Set),o.isExistJsonKey(u.dataJson,ae)&&!Q.has(ae)){Q.add(ae),le.push(ae);const G=u.dataJson[ae][K].toString();if(G!==R){const q=w(G,Q);le=le.concat(q)}}return le},M=X=>{const Q=w(X);return Q.splice(0,1),Q.reverse(),Q},C=(X,Q)=>{let le=[];const K=o.isEmpty(X)?"":X.toString();return Q===void 0&&(Q=new Set),Q.has(K)||(Q.add(K),le.push(K),v(K)&&y(K).forEach(W=>{const R=W.id.toString(),ae=C(R,Q);le=le.concat(ae)})),le},T=X=>{const Q=C(X);return Q.splice(0,1),Q},U=(X,Q,le,K)=>{const W={add:[],del:[]},R={add:[],del:[]};let ae=o.isUndefined(Q)?o.getArrClone(d.selectedIds):Q,G=o.isUndefined(le)?o.getArrClone(d.selectedUnIds):le;const q=ae.indexOf(X);K?q===-1&&ae.push(X):q===-1?ae.push(X):ae.splice(q,1),G=o.getArrRemoveById(G,X);const ee=M(X);return ee.reverse(),ee.length>0&&ee.forEach($=>{let j=0,se=0;u.dataGroup[$].forEach(ie=>{const oe=ie.id.toString();o.isExistValue(ae,oe)&&(j+=1),o.isExistValue(G,oe)&&(se+=1)});const me=u.dataGroup[$].length;j===0&&se===0?(W.del.push($),ae=o.getArrRemoveById(ae,$),R.del.push($),G=o.getArrRemoveById(G,$)):j===me?(W.add.push($),ae.push($),R.del.push($),G=o.getArrRemoveById(G,$)):(W.del.push($),ae=o.getArrRemoveById(ae,$),R.add.push($),G.push($))}),{select:W,selectUn:R}},Z=(X,Q)=>{let le=[];if(Q===void 0&&(Q=new Set),o.isExistJsonKey(u.childLastIdsJson,X)&&u.childLastIdsJson[X].length>0)le=u.childLastIdsJson[X];else{if(Q.has(X))return le;v(X)?(Q.add(X),y(X).forEach(K=>{const W=Z(K.id.toString(),Q);W.length>0&&(le=le.concat(W))})):le.push(X),u.childLastIdsJson[X]=le}return le},z=(X,Q)=>{const{parentKey:le,topParentValue:K}=t,W=o.isNonEmptyString(K)?K:"0",R={},ae=[];let G=[];if(Q===void 0&&(Q=new Set),X.forEach(q=>{const ee=F(q);if(!o.isUndefined(ee)){const $=ee[le].toString();$===W?G.push(q):(o.isExistJsonKey(R,$)||(R[$]=[]),R[$].push(q))}}),!o.isEmpty(R))for(const[q,ee]of Object.entries(R))ee.length===y(q).length?ae.push(q):G=G.concat(ee);if(ae.length>0){G.push(...ae);const q=o.getArrUnique(G),ee=ae.some($=>!Q.has($));return ae.forEach($=>Q.add($)),ee?z(q,Q):G}else return G},H=X=>{const Q=[],le=o.getArrConvertJson(X);return X.forEach(W=>{const R=y(W);if(o.isEmpty(R))Q.push(W);else{const ae=[];R.forEach(G=>{o.isExistJsonKey(le,G.id.toString())&&ae.push(G.id)}),R.length!==ae.length&&Q.push(W)}}),z(Q)},S=X=>{let Q=[];return X.forEach(le=>{const K=Z(le);Q.push(...K)}),Q=o.getArrUnique(Q),Q},E=(X,Q)=>t.multiple?(o.isBoolean(Q)?Q:t.isOutMerge)?H(X):S(X):X,f=X=>{const Q=[];return X.forEach(le=>{const K=F(le);o.isUndefined(K)||Q.push(K)}),Q},D=X=>{const Q=t.multiple?X:X.slice(0,1);let le=[],K=[];Q.forEach(R=>{const ae=F(R);if(!o.isUndefined(ae)){const G=U(R,le,K,!0);le=o.getArrRemoveById(le,G.select.del),G.select.add.length>0&&le.push(...G.select.add),K=o.getArrRemoveById(K,G.selectUn.del),G.selectUn.add.length>0&&K.push(...G.selectUn.add);const q=T(R);le.push(...q),le.push(R),le=o.getArrUnique(le),K=o.getArrUnique(K)}}),d.selectedIds=le;const W=o.getArrRemoveById(K,le);d.selectedUnIds=o.getArrClone(W),d.firstOpenIds=o.getArrUnique(d.firstOpenIds.concat(W)),d.openParentIds=o.getArrUnique(d.openParentIds.concat(W))},h=()=>{if(V(t.list),o.isNonEmptyString(t.value)){const X=t.value.split(",");D(X)}g()};e.onMounted(()=>{e.nextTick(()=>{h()})}),e.watch(()=>t.list,X=>{V(X);const Q=d.selectedIds,le=o.isNonEmptyString(t.value)?t.value.split(","):[];d.selectedIds=[],D(o.getArrUnique(Q.concat(le)));const K=E(d.selectedIds);K.join(",")!==t.value&&m(K.join(","))}),e.watch(()=>t.value,X=>{if(X!==void 0){const Q=d.selectedIds,le=o.isNonEmptyString(X)?X.split(","):[],K=E(le),W=E(Q);o.isEqualArr(K,W)||(d.selectedIds=[],D(le))}});const b=()=>{const X=o.isNonEmptyString(u.prevSearchFoldParentIds)?u.prevSearchFoldParentIds.split(","):[];d.firstOpenIds=o.getArrRemoveById(d.firstOpenIds,X),(o.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds.split(","):[]).forEach(le=>{const K=le.toString();d.firstOpenIds.indexOf(K)===-1&&d.firstOpenIds.push(K)}),u.prevSearchFoldParentIds=o.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds:""},_=()=>{const X=o.isNonEmptyString(u.prevSearchOpenParentIds)?u.prevSearchOpenParentIds.split(","):[];d.firstOpenIds=o.getArrRemoveById(d.firstOpenIds,X),d.openParentIds=o.getArrRemoveById(d.openParentIds,X),(o.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds.split(","):[]).forEach(le=>{const K=le.toString();d.firstOpenIds.indexOf(K)===-1&&d.firstOpenIds.push(K),d.openParentIds.indexOf(K)===-1&&d.openParentIds.push(K)}),u.prevSearchOpenParentIds=o.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds:""};e.watch(()=>t.searchOpenParentIds,()=>_()),e.watch(()=>t.searchFoldParentIds,()=>b());const O=X=>{Array.isArray(X)&&X.forEach(Q=>{if(!Q)return;const le=!o.isEmpty(t.searchKeyword)&&!o.isEmpty(t.highlightMode);Q.showTextLabelHtml=le,Q.showTextLabel=le?x(o.isString(Q.name)?Q.name:""):o.isString(Q.name)?Q.name:"",Array.isArray(Q.list)&&O(Q.list)})};e.watch(()=>[t.searchKeyword,t.highlightMode,t.highlightColor],()=>O(d.list));const P=X=>{const Q=X.toString();o.isExistValue(d.firstOpenIds,Q)||d.firstOpenIds.push(Q),e.nextTick(()=>{const le=d.openParentIds.indexOf(Q);le===-1?d.openParentIds.push(Q):d.openParentIds.splice(le,1)})},J=X=>{const Q=X.toString();if(t.multiple){const W=d.selectedIds.indexOf(Q)===-1,R=T(Q),ae=U(Q);let G=o.getArrClone(d.selectedIds),q=o.getArrClone(d.selectedUnIds);ae.select.del.forEach(j=>{const se=G.indexOf(j);se>-1&&G.splice(se,1)}),ae.select.add.length>0&&(G=G.concat(ae.select.add),G=o.getArrUnique(G)),ae.selectUn.del.forEach(j=>{const se=q.indexOf(j);se>-1&&q.splice(se,1)}),ae.selectUn.add.length>0&&(q=q.concat(ae.selectUn.add),q=o.getArrUnique(q)),R.length>0&&R.forEach(j=>{const se=G.indexOf(j),me=q.indexOf(j);W?se===-1&&G.push(j):se>-1&&G.splice(se,1),me>-1&&q.splice(me,1)});const ee=G.indexOf(Q);ee>-1?G.splice(ee,1):G.push(Q);const $=q.indexOf(Q);$>-1&&q.splice($,1),d.selectedIds=G,d.selectedUnIds=q}else d.selectedIds=[Q],d.selectedUnIds=[];const le=E(d.selectedIds);p(le.join(","),f(le))};return e.provide("$TreeTop",{isCheckChildren:v}),l({getValue:()=>E(d.selectedIds).join(","),getValueData:()=>{const X=E(d.selectedIds);return f(X)},setValue:X=>{const Q=o.isNonEmptyString(X)?X.split(","):[];d.selectedIds=[],D(Q)}}),(X,Q)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"cl-plaintext-value"},e.toDisplayString(I.value),9,Kh)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(c.value),id:e.unref(r)},[d.list.length>0?(e.openBlock(),e.createBlock(li,e.mergeProps({key:0,list:d.list,firstOpenIds:d.firstOpenIds,openIds:d.openParentIds,selectIds:d.selectedIds,selectUnIds:d.selectedUnIds},s.value,{onOnSelect:J,onOnShrink:P}),null,16,["list","firstOpenIds","openIds","selectIds","selectUnIds"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Wh))}}),jh=["id"],Yh={key:0,class:"selectTree-inText-num"},qh={class:"selectTree-inDropdown-container"},Xh={class:"selectTree-inDropdown-search"},Gh={class:"selectTree-inDropdown-body"},ii=e.defineComponent({name:"ClSelectTree",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},arrowDirection:{type:String,default:"right"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].includes(n)},showTextFormat:String,showDropDownTextFormat:String,isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},onOpenBefore:Function,highlightMode:{type:String,default:"full"},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0,onOpen:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElList"),s=e.reactive({isOpen:!1,isFirstDataFinish:!1,selectIds:"",selectLabel:[],filterList:[],searchOpenParentIds:"",searchFoldParentIds:"",searchKeyword:""}),c={prevSelectIds:[],originalList:[],dataJson:{}},m=e.computed(()=>{let _={"panel-select-tree":!0};return _=o.getJsonMerge(_,de.getClassNameJson(t.className)),o.getStringByJson(_," ")}),p=e.computed(()=>{let _={"selectTree-inDropdown":!0};return _=o.getJsonMerge(_,de.getClassNameJson(t.classDropDown)),o.getStringByJson(_," ")}),g=_=>{i("update:value",_),i("update:modelValue",_)},v=(_,O)=>{g(_),i("onChange",_,O)},y=()=>{e.nextTick(()=>{i("onInit")})},k=_=>{e.nextTick(()=>{i("onOpen",_)})},F=()=>{if(!s.isOpen){const _=s.selectIds,O=_.split(",");if(!o.isEqualArr(O,c.prevSelectIds)){c.prevSelectIds=O;const J=u.value?u.value.getValueData():[];v(_,J)}}},B=_=>{const O=t.showTextFormat;let P="";return o.isNonEmptyString(O)?P=O.replace(/\$\{(\w+)\}/g,(J,Y)=>o.isString(_?.[Y])?_[Y]:J):P=o.isString(_?.name)?_.name:"",o.encodeHTML(P)},I=_=>o.isEmpty(_)?[]:_.split(",").map(O=>{const P=c.dataJson[O];return P?B(P):o.encodeHTML(O)}),A=_=>{const O=[],P=new Set;let J=_;for(;o.isNonEmptyString(J)&&!P.has(J);){P.add(J);const Y=c.dataJson[J];if(!Y)break;o.isNonEmptyString(Y.name)&&O.unshift(Y.name);const ne=Y[t.parentKey],ce=ne!=null?String(ne):"";if(ce===""||ce===String(t.topParentValue))break;J=ce}return O},N=e.computed(()=>{t.list;const _=o.isString(s.selectIds)?s.selectIds:"";if(o.isEmpty(_))return"";const O=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",P=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return _.split(",").map(J=>{const Y=A(J);return o.removeHTMLTags(Y.length>0?Y.join(O):J)}).join(P)}),x=_=>Array.isArray(_)?_.filter(O=>{if(!O)return!1;const P=!o.isUndefined(O.id)&&O.id!==null,J=!o.isEmpty(O[t.parentKey]);return P&&J}):[],V=_=>_===null?"":o.isString(_)||o.isFinite(_)?String(_):"",w=_=>{const O={};return Array.isArray(_)&&_.forEach(P=>{P&&!o.isUndefined(P.id)&&P.id!==null&&(O[String(P.id)]=P)}),O},M=()=>{const _=V(t.value);s.selectIds!==_&&(s.selectIds=_,s.selectLabel=I(_),c.prevSelectIds=_.split(","))},C=(_,O)=>{const P=[];return O===void 0&&(O=new Set),O.has(_)||(O.add(_),c.originalList.forEach(J=>{if(!J)return;const Y=J[t.parentKey];o.isUndefined(Y)||String(Y)===t.topParentValue||String(Y)===String(_)&&(P.push(String(J.id)),P.push(...C(String(J.id),O)))})),P},T=(_,O)=>{if(o.isEmpty(O))return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const P=Array.isArray(t.searchKey)?t.searchKey.filter(W=>o.isString(W)):[];if(P.length===0)return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const J=t.searchKeyType==="&&",Y=_.filter(W=>{if(!W)return!1;const R=P.map(ae=>{const G=W?.[ae];return o.isString(G)?G.includes(O):!1});return J?R.every(Boolean):R.some(Boolean)});if(Y.length===0)return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const ne={};_.forEach(W=>{W&&(ne[String(W.id)]=W)});const ce=new Set,X=new Set,Q=W=>{const R=ne[String(W)];if(!R)return;const ae=R[t.parentKey];!o.isUndefined(ae)&&String(ae)!==t.topParentValue&&(ce.add(String(ae)),X.add(String(ae)),Q(String(ae)))};Y.forEach(W=>{const R=String(W.id);ce.add(R),Q(R),C(R).forEach(ae=>ce.add(ae))});const le=_.filter(W=>W&&ce.has(String(W.id)));s.searchOpenParentIds=Array.from(X).join(",");const K=new Set;return le.forEach(W=>{if(!W)return;const R=String(W.id);if(X.has(R))return;c.originalList.some(G=>{if(!G)return!1;const q=G[t.parentKey];return!o.isUndefined(q)&&String(q)===R})&&K.add(R)}),s.searchFoldParentIds=Array.from(K).join(","),le},U=()=>{s.isFirstDataFinish||(s.isFirstDataFinish=!0,y())},Z=()=>{o.isEmpty(t.list)||U()};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.watch([()=>t.value,()=>t.list],([_,O],[P,J])=>{O!==J&&(c.originalList=x(t.list),c.dataJson=w(c.originalList),s.filterList=c.originalList,s.selectLabel=I(s.selectIds),c.originalList.length>0&&U()),_!==P&&M()},{immediate:!0});const z=_=>{t.disabled||(s.isOpen=_,_?(c.prevSelectIds=s.selectIds.split(","),s.filterList=c.originalList):(s.searchKeyword="",s.searchOpenParentIds="",s.searchFoldParentIds="",F()),k(_))},H=()=>{t.disabled||(s.selectIds="",s.selectLabel=[],c.prevSelectIds=[],F())},S=()=>{d.value&&(d.value.checkIsShowOpen()||d.value.initCompleteOpen())},E=_=>{const O=o.isString(_)?_:"";s.searchKeyword=O,s.filterList=T(c.originalList,O)},f=(_,O)=>{const P=Array.isArray(O)?O:[];s.selectLabel=P.map(J=>B(J)),t.multiple||d.value?.setOpen(!1)};return l({getValue:()=>s.selectIds,getValueData:()=>u.value?u.value.getValueData():[],setValue:_=>{const O=V(_);s.selectIds=O,s.selectLabel=I(O),c.prevSelectIds=O.split(",")}}),(_,O)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"cl-plaintext-value"},e.toDisplayString(N.value),9,jh)):(e.openBlock(),e.createBlock(kn,{key:1,ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:m.value,classText:"selectTree-inText",classDropDown:p.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:s.selectLabel.join(","),textArrowDirection:n.arrowDirection,appendContainer:n.appendContainer,onOpenBeforeCallback:n.onOpenBefore,onOnChangeOpen:z,onOnClear:H},{textExtend:e.withCtx(()=>[n.multiple?(e.openBlock(),e.createElementBlock("span",Yh,[n.multiple&&s.selectLabel.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:s.selectLabel.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.createElementVNode("div",qh,[e.createElementVNode("div",Xh,[e.createVNode(Xt,{placeholder:n.searchPlaceholder,onOnChange:E},null,8,["placeholder"])]),e.createElementVNode("div",Gh,[e.createVNode(da,{ref_key:"refElList",ref:u,list:s.filterList,value:s.selectIds,"onUpdate:value":O[0]||(O[0]=P=>s.selectIds=P),multiple:n.multiple,textFormat:n.showDropDownTextFormat,isSingleSelectParent:n.isSingleSelectParent,isOutMerge:n.isOutMerge,parentKey:n.parentKey,topParentValue:n.topParentValue,searchOpenParentIds:s.searchOpenParentIds,searchFoldParentIds:s.searchFoldParentIds,searchKeyword:s.searchKeyword,highlightMode:n.highlightMode,highlightColor:n.highlightColor,onOnChange:f,onOnInit:S},null,8,["list","value","multiple","textFormat","isSingleSelectParent","isOutMerge","parentKey","topParentValue","searchOpenParentIds","searchFoldParentIds","searchKeyword","highlightMode","highlightColor"])])])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","appendContainer","onOpenBeforeCallback"]))}}),Qh={key:0,class:"sideNav-menu-iconOperate"},si=e.defineComponent({name:"ClSideMenuMenu",__name:"Menu",props:{activeId:{type:String,default:""},activePId:{type:Array,default:()=>[]},openId:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=`sideMenu-${o.getRandom(5)}`,i=d=>!!(d&&d.list&&d.list.length>0),r=d=>{a("onClick",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(s,c)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${s.id}-${c}`,class:e.normalizeClass({"sideNav-menu-submenu":i(s),"sideNav-menu-active":!i(s)&&n.activeId===s.id,"sideNav-menu-parent-active":i(s)&&n.activePId.includes(s.id)})},[e.createVNode(Nt,{"aria-haspopup":i(s)?"true":void 0,"aria-expanded":i(s)?String(n.openId.includes(s.id)):void 0,"aria-current":i(s)?void 0:n.activeId===s.id?"page":void 0,onOnClick:m=>r(s)},{default:e.withCtx(()=>[i(s)?(e.openBlock(),e.createElementBlock("span",Qh,[e.createVNode(ye,{name:"caret-right",class:e.normalizeClass(["icon-rotate",{"rotate-90":n.openId.includes(s.id)}])},null,8,["class"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),_:2},1032,["aria-haspopup","aria-expanded","aria-current","onOnClick"]),i(s)?(e.openBlock(),e.createBlock(gn,{key:0},{default:e.withCtx(()=>[n.openId.includes(s.id)?(e.openBlock(),e.createBlock(si,{key:0,activeId:n.activeId,activePId:n.activePId,openId:n.openId,list:s.list,onOnClick:r},null,8,["activeId","activePId","openId","list"])):e.createCommentVNode("",!0)]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),Zh=["id"],eg={class:"sideNav-wrapper sideNav-wrapper-rowMult"},ri=e.defineComponent({name:"ClSideMenu",inheritAttrs:!1,__name:"Index",props:{id:String,className:String,active:String,list:{type:Array,required:!0,default:()=>[]}},emits:{onChangeMenu:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.reactive({isMenushrink:!1,menuActive:o.isNonEmptyString(a.active)?a.active:"",menuActiveParent:[],menuOpenPid:[]}),d=e.ref([]),u={menuJson:{}},s=e.computed(()=>{let B={"panel-side-menu":!0};return B=o.getJsonMerge(B,de.getClassNameJson(a.className)),B}),c=B=>{t("onChangeMenu",B)},m=()=>{const B=o.getTreeLastParent(r.menuActive,u.menuJson,!1);let I=[];return B.length>0&&(I=B.map(A=>A.id)),r.menuActiveParent=I,I},p=(B,I,A,N=0)=>{N>50||B.forEach(x=>{if(o.isEmpty(x))return;const{id:V,name:w}=x;if(!o.isNonEmptyString(V)||!o.isUndefined(A[V]))return;const M=x.list,C=o.isArray(M);!C&&!o.isUndefined(M)&&(x.list=void 0),A[V]={id:V,name:w,parentId:I,hasChild:C&&M&&M.length>0},C&&M&&M.length>0&&p(M,V,A,N+1)})},g=B=>B.filter(I=>o.isNonEmptyString(I?.id)).map(I=>{const A=I.list;return o.isArray(A)&&A&&A.length>0&&(I.list=g(A)),I}),v=()=>{const B=g(o.getJsonClone(a.list,!0));if(o.isEmpty(B)){r.menuActive="",r.menuActiveParent=[],r.menuOpenPid=[],u.menuJson={},d.value=[];return}const I=u.menuJson,A=r.menuOpenPid.slice(),N=r.menuActive,x={};p(B,"",x);let V=N;(!o.isNonEmptyString(V)||o.isUndefined(x[V]))&&(V=o.isNonEmptyString(B[0].id)?B[0].id:"");const w=[];Object.keys(x).forEach(M=>{x[M].hasChild&&(o.isUndefined(I[M])||A.includes(M))&&w.push(M)}),u.menuJson=x,d.value=B,r.menuActive=V,r.menuOpenPid=w,V!==N?(m(),o.isNonEmptyString(V)&&c(V)):m()},y=()=>{v()};e.onMounted(()=>{y()}),e.watch(()=>a.list,()=>{v()},{deep:!0}),e.watch(()=>a.active,B=>{if(o.isNonEmptyString(B)&&!o.isUndefined(u.menuJson[B])){r.menuActive=B;const I=m();I.length>0&&I.forEach(A=>{r.menuOpenPid.indexOf(A)===-1&&r.menuOpenPid.push(A)})}});const k=()=>{r.isMenushrink=!r.isMenushrink},F=B=>{const I=B.id;if(o.isNonEmptyString(I))if(B.list&&B.list.length>0){const A=r.menuOpenPid.indexOf(I);A>-1?r.menuOpenPid.splice(A,1):r.menuOpenPid.push(I)}else{if(r.menuActive===I)return;r.menuActive=I,m(),c(r.menuActive)}};return(B,I)=>r.menuActive.length>0?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,id:e.unref(i),class:s.value},B.$attrs),[e.createElementVNode("div",{class:e.normalizeClass({"sideNav-menu":!0,"sideNav-visible":!r.isMenushrink})},[e.createVNode(si,{list:d.value,activeId:r.menuActive,activePId:r.menuActiveParent,openId:r.menuOpenPid,onOnClick:F},null,8,["list","activeId","activePId","openId"])],2),e.createElementVNode("div",eg,[e.createVNode(Nt,{className:"sideNav-menu-footer-bar","aria-label":"展开或收起菜单","aria-expanded":String(!r.isMenushrink),onOnClick:k},{default:e.withCtx(()=>[e.createVNode(ye,{name:r.isMenushrink?"angle-double-right":"angle-double-left"},null,8,["name"])]),_:1},8,["aria-expanded"]),e.renderSlot(B.$slots,"default")])],16,Zh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),ci=n=>{if(o.isNonEmptyString(n)){if(n.indexOf("clIcon-")===0){const l=n.substring(7);return o.isNonEmptyString(l)&&/^[a-zA-Z0-9-]+$/.test(l)?{name:l,className:""}:{name:"question-circle",className:""}}return/^clicon/i.test(n)?{name:"question-circle",className:""}:/^[a-zA-Z0-9-]+$/.test(n)?{name:n,className:""}:{name:"",className:n}}return{name:"question-circle",className:""}},tg=["aria-sort"],ng=e.defineComponent({name:"ClTableTh",directives:{cltooltip:ut},__name:"Th",props:{isOrder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isUseScrollX:{type:Boolean,default:!1},thIndex:{type:Number,default:0},thInfo:{type:Object,default:()=>({})},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickOrderBy:(n,l,a)=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.computed(()=>ci(a.thInfo?.tipIcon)),r=e.computed(()=>o.isObject(a.thInfo)&&!o.isEmpty(a.thInfo)?a.thInfo:{}),d=e.computed(()=>!a.isOrder||o.isEmpty(r.value)?!1:o.isEmpty(r.value.sort)?!0:r.value.sort===!0),u=e.computed(()=>d.value&&!a.disabled),s=e.computed(()=>{const F=a.thInfo?.tipMsg;if(!o.isNonEmptyString(F))return;const B=o.removeHTMLTags(F);return o.isNonEmptyString(B)?B:void 0}),c=e.computed(()=>{if(!d.value)return"";const F=o.isEmpty(a.orderSort)?[]:a.orderSort;return F.length>0&&F[0]===a.thIndex?F.length===2?F[1]==="asc"||F[1]==="desc"?F[1]:"none":F.length===1?"desc":"none":"none"}),m=e.computed(()=>{if(c.value==="asc")return"ascending";if(c.value==="desc")return"descending";if(c.value==="none")return"none"}),p=e.computed(()=>{const F={},B=r.value;if(!o.isEmpty(B.width)&&y(B.width)&&(F[`${a.widthClassPrefix}${B.width}`]=!0),!o.isEmpty(B.widthMin)&&y(B.widthMin)&&a.isUseScrollX&&(F[`${a.widthMinClassPrefix}${B.widthMin}`]=!0),(a.fixedLeftIndex>-1||a.fixedRightIndex>-1)&&(F["th-hidden"]=a.fixedLeftIndex>-1&&a.thIndex>a.fixedLeftIndex||a.fixedRightIndex>-1&&a.thIndex<a.fixedRightIndex),d.value){F["th-sort"]=!0,F["sort-none"]=!0,F["th-sort-near"]=B.sortNear===!0;const A=c.value;(A==="asc"||A==="desc")&&(F[`sort-${A}`]=!0,F["sort-none"]=!1)}o.isNonEmptyString(B.tipMsg)&&(F["th-tip"]=!0,F["th-tip-sideAlign"]=B.tipSideAlign===!0),a.disabled&&(F["th-disabled"]=!0),o.isNonEmptyString(B.textAlign)&&o.isExistValue(["left","center","right"],B.textAlign)&&(F[`text-${B.textAlign}`]=!0);let I=F;return I=o.getJsonMerge(I,de.getClassNameJson(B.className)),I=o.getJsonMerge(I,de.getClassNameJson(B.classTh)),I}),g=e.computed(()=>{const F={};if(!a.isInlineWidth)return F;const B=r.value;return!o.isEmpty(B.width)&&y(B.width)&&(F.width=o.isFinite(Number(B.width))?`${Number(B.width)}px`:`${B.width}`),!o.isEmpty(B.widthMin)&&y(B.widthMin)&&a.isUseScrollX&&(F.minWidth=o.isFinite(Number(B.widthMin))?`${Number(B.widthMin)}px`:`${B.widthMin}`),F}),v=(F,B)=>{t("onClickOrderBy",F,a.thIndex,B)},y=F=>o.isString(F)||o.getTypeof(F)==="number"&&o.isFinite(F),k=()=>{if(u.value){const F=c.value==="desc"?"asc":"desc";v(r.value,F)}};return(F,B)=>{const I=e.resolveDirective("cltooltip");return!e.unref(o).isBoolean(n.thInfo?.visible)||n.thInfo.visible?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(p.value),style:e.normalizeStyle(g.value),scope:"col","aria-sort":m.value},[e.createElementVNode("span",{class:"th-title",onClick:k},[e.renderSlot(F.$slots,"default")]),e.unref(o).isNonEmptyString(n.thInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:i.value.name,className:i.value.className,class:"th-tip-icon",role:"img","aria-label":s.value},null,8,["name","className","aria-label"])),[[I,{html:n.thInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.value!==""?(e.openBlock(),e.createElementBlock("i",{key:2,class:"tr-sort-icon","aria-hidden":"true",onClick:k})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],14,tg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),Ho=e.defineComponent({name:"ClTableTd",directives:{cltooltip:ut},__name:"Td",props:{tdIndex:{type:Number,default:0},tdInfo:{type:Object,default:()=>({})},isOrder:{type:Boolean,default:!1},isUseScrollX:{type:Boolean,default:!1},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},useType:{type:String,default:"td",validator:n=>["td","total"].indexOf(n)>-1}},setup(n){const l=n,a=e.computed(()=>ci(l.tdInfo?.tipIcon)),t=e.computed(()=>o.isEmpty(l.tdInfo)?{}:l.tdInfo),i=e.computed(()=>{const s=l.tdInfo?.tipMsg;if(!o.isNonEmptyString(s))return;const c=o.removeHTMLTags(s);return o.isNonEmptyString(c)?c:void 0}),r=e.computed(()=>{const s={},c=t.value;!o.isEmpty(c.width)&&u(c.width)&&(s[`${l.widthClassPrefix}${c.width}`]=!0),!o.isEmpty(c.widthMin)&&u(c.widthMin)&&l.isUseScrollX&&(s[`${l.widthMinClassPrefix}${c.widthMin}`]=!0),(l.fixedLeftIndex>-1||l.fixedRightIndex>-1)&&(s["td-hidden"]=l.fixedLeftIndex>-1&&l.tdIndex>l.fixedLeftIndex||l.fixedRightIndex>-1&&l.tdIndex<l.fixedRightIndex),l.isOrder&&(o.isEmpty(c.sort)||c.sort===!0)&&(s["td-sort"]=!0,s["td-sort-near"]=c.sortNear===!0),o.isNonEmptyString(c.tipMsg)&&(s["td-tip"]=!0,s["td-tip-sideAlign"]=c.tipSideAlign===!0),o.isNonEmptyString(c.textAlign)&&o.isExistValue(["left","center","right"],c.textAlign)&&(s[`text-${c.textAlign}`]=!0);let m=s;return m=o.getJsonMerge(m,de.getClassNameJson(c.className)),l.useType==="td"?m=o.getJsonMerge(m,de.getClassNameJson(c.classTd)):l.useType==="total"&&(m=o.getJsonMerge(m,de.getClassNameJson(c.classTotal))),m}),d=e.computed(()=>{const s={};if(!l.isInlineWidth)return s;const c=t.value;return!o.isEmpty(c.width)&&u(c.width)&&(s.width=o.isFinite(Number(c.width))?`${Number(c.width)}px`:`${c.width}`),!o.isEmpty(c.widthMin)&&u(c.widthMin)&&l.isUseScrollX&&(s.minWidth=o.isFinite(Number(c.widthMin))?`${Number(c.widthMin)}px`:`${c.widthMin}`),s}),u=s=>o.isString(s)||o.getTypeof(s)==="number"&&o.isFinite(s);return(s,c)=>{const m=e.resolveDirective("cltooltip");return!e.unref(o).isBoolean(n.tdInfo?.visible)||n.tdInfo.visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value)},[e.renderSlot(s.$slots,"default"),e.unref(o).isNonEmptyString(n.tdInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(ye,{key:0,name:a.value.name,className:a.value.className,class:"td-tip-icon",role:"img","aria-label":i.value},null,8,["name","className","aria-label"])),[[m,{html:n.tdInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),og=["aria-hidden"],ag={key:0},lg={key:0},No=99999999,Vo=e.defineComponent({name:"ClTableHead",__name:"Head",props:{columns:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isShowTotal:{type:Boolean,default:!1},totalInfo:{type:Object,default:()=>({})},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isShowCheckboxAll:{type:Boolean,default:!0},checkboxAllValue:{type:Boolean,default:!1},fixedType:{type:String,default:"",validator:n=>["","left","right"].indexOf(n)>-1},fixedLeftIndex:{type:Number,default:-1,validator:n=>n>=-1},fixedRightIndex:{type:Number,default:-1,validator:n=>n>=-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickAll:()=>!0,onClickOrderBy:(n,l,a)=>!0,onHoverIn:n=>!0,onHoverOut:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useTemplateRef("refElTable"),d=e.computed(()=>({"table-default":!0,"table-base":!0})),u=e.computed(()=>{const N={};return o.isEmpty(t.fixedType)?t.isUseScrollX&&o.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(N.minWidth=t.minWidth):o.isNonEmptyString(t.width)&&t.width!=="none"&&(N.width=t.width),N}),s=N=>N?o.isUndefined(N.title)?o.isUndefined(N.data)?"":N.data:N.title:"",c=(N,x)=>o.isUndefined(N)||!x?"":o.isEmpty(x.format)?N:o.getValueByFormat(N,x.format??"",x.formatExt),m=(N,x)=>!N||!x?"":c(N[x.data],x);e.watch(()=>t.isShowTotal,N=>{!N&&t.hoverIndex===No&&i("onHoverOut")});const p=()=>{i("onClickAll")},g=(N,x,V)=>{i("onClickOrderBy",N,x,V)},v=()=>{i("onHoverIn",No)},y=()=>{i("onHoverOut")};return l({getOffsetHeight:()=>r.value?r.value.offsetHeight:0,getRcWidth:()=>{let N=0;if((t.isShowRadio||t.isShowCheckbox)&&r.value){const x=r.value.querySelector(".th-rc");x&&(N=x.clientWidth)}return N},getPaddingLr:()=>{let N=0;if(!r.value)return N;const x=r.value.querySelectorAll("th:not(.th-rc)");for(let V=0;V<x.length;V++){const w=de.getStyle(x[V]),M=parseFloat(w.paddingLeft),C=parseFloat(w.paddingRight),T=o.isFinite(M)?M:0,U=o.isFinite(C)?C:0;N+=T+U}return N},getElTh:()=>r.value?r.value.querySelectorAll("th"):[],getTotalHeight:()=>{let N=0;if(t.isShowTotal&&r.value){const x=r.value.querySelector(".tr-total");x&&(N=x.clientHeight)}return N}}),(N,x)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(d.value),style:e.normalizeStyle(u.value),"aria-hidden":!e.unref(o).isEmpty(n.fixedType),ref_key:"refElTable",ref:r},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass({"th-rc":!0,"th-hidden":n.fixedRightIndex>-1}),scope:"col"},[n.isShowCheckbox&&n.isShowCheckboxAll?(e.openBlock(),e.createBlock(mt,{key:0,forId:e.unref(o).isNonEmptyString(n.keyIndex)?`${n.keyIndex}_${n.fixedType}_cb_all`:void 0,value:n.checkboxAllValue,disabled:n.disabled,onOnChange:p},null,8,["forId","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(V,w)=>(e.openBlock(),e.createBlock(ng,{key:`${n.keyIndex}_${n.fixedType}_head_th_${w}`,thInfo:V,thIndex:w,isOrder:n.isOrder,disabled:n.disabled,orderSort:n.orderSort,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickOrderBy:g},{default:e.withCtx(()=>[e.renderSlot(N.$slots,`th_${V?.data??""}`,{data:V},()=>[e.createElementVNode("span",null,e.toDisplayString(s(V)),1)])]),_:2},1032,["thInfo","thIndex","isOrder","disabled","orderSort","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))])]),n.isShowTotal?(e.openBlock(),e.createElementBlock("tbody",ag,[e.createElementVNode("tr",{class:e.normalizeClass({"tr-total":!0,"tr-hover":n.hoverIndex===No}),onMouseenter:v,onMouseleave:y},[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",lg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(V,w)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_total_td_${w}`,isOrder:n.isOrder,tdIndex:w,tdInfo:V,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,useType:"total"},{default:e.withCtx(()=>[e.renderSlot(N.$slots,`total_${V?.data??""}`,{data:n.totalInfo},()=>[e.createTextVNode(e.toDisplayString(m(n.totalInfo,V)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],34)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,og))}}),ig=["id"],sg=e.defineComponent({name:"ClTableTdChecked",__name:"TdChecked",props:{id:String,value:{type:Boolean,default:!1},className:String,disabled:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},keyIndex:String,info:{type:Object,default:()=>({})}},setup(n){const l=n,a=l.id,t=e.computed(()=>s("cb")),i=e.computed(()=>s("rd")),r=e.computed(()=>l.value===!0),d=e.computed(()=>l.disabled===!0||o.isBoolean(l.info?.isDisabled)&&l.info.isDisabled),u=e.computed(()=>{const c={"th-rc":!0};return o.getJsonMerge(c,de.getClassNameJson(l.className))}),s=c=>o.isNonEmptyString(l.keyIndex)?`${l.keyIndex}_${c}`:void 0;return(c,m)=>n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",{key:0,id:e.unref(a),class:e.normalizeClass(u.value)},[n.isShowCheckbox?(e.openBlock(),e.createBlock(mt,{key:0,forId:t.value,value:r.value,disabled:d.value},null,8,["forId","value","disabled"])):n.isShowRadio?(e.openBlock(),e.createBlock(ea,{key:1,forId:i.value,name:i.value,value:r.value,disabled:d.value},null,8,["forId","name","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,ig)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),rg=["onClick","onMouseenter"],cg=["onMouseenter"],ug=["colspan"],dg={key:0,class:"panel-elastic-load",role:"status","aria-live":"polite"},mg={class:"elastic-load-container"},pg=["data-elastic-id"],fg=["onMouseenter"],hg=["colspan"],gg={class:"panel-elastic-load",role:"status","aria-live":"polite"},vg={class:"elastic-load-container"},yg=["onMouseenter"],kg={key:2},Sg=["colspan"],wg={class:"panel-table-empty",role:"status"},Mo=e.defineComponent({name:"ClTableBody",__name:"Body",props:{columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},isOrder:{type:Boolean,default:!1},selectValue:{type:Array,default:()=>[]},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},hoverElasticIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},colspanCount:{type:Number,default:1},isRunLoading:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},elasticOpen:{type:Array,default:()=>[]},elasticLoading:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:n=>["default","sameDataStructure"].indexOf(n)>-1},elasticData:{type:Object,default:()=>({})},fixedType:{type:String,default:""},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String},emits:{onClickTr:(n,l,a)=>!0,onHoverIn:(n,l)=>!0,onHoverOut:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElTable"),s=e.ref(new Set),c=e.computed(()=>new Set((Array.isArray(t.selectValue)?t.selectValue:[]).filter(S=>!o.isUndefined(S)).map(S=>String(S)))),m=e.computed(()=>new Set((Array.isArray(t.elasticLoading)?t.elasticLoading:[]).filter(S=>!o.isUndefined(S)).map(S=>String(S)))),p=e.computed(()=>new Set((Array.isArray(t.elasticOpen)?t.elasticOpen:[]).filter(S=>!o.isUndefined(S)).map(S=>String(S)))),g=e.computed(()=>{const S=Number(t.colspanCount);return o.isFinite(S)&&S>=1?Math.floor(S):1}),v=e.computed(()=>({"table-default":!0,"table-base":!0,"table-empty":o.isEmpty(t.list)})),y=e.computed(()=>{const S={};return o.isNonEmptyString(t.fixedType)?o.isNonEmptyString(t.width)&&t.width!=="none"&&(S.width=t.width):t.isUseScrollX&&o.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(S.minWidth=t.minWidth),S}),k=(S,E,f)=>{i("onClickTr",S,E,f)},F=(S,E=-1)=>{i("onHoverIn",S,E)},B=()=>{i("onHoverOut")},I=(S,E)=>o.isEmpty(S)||!E?"":o.isEmpty(E.format)?S:o.getValueByFormat(S,E.format??"",E.formatExt),A=S=>{const E=t.elasticData||{};return Object.prototype.hasOwnProperty.call(E,S)?E[S]:[]},N=S=>!o.isEmpty(S)&&!o.isEmpty(S.id)&&c.value.has(S.id.toString()),x=S=>!o.isEmpty(S)&&!o.isEmpty(S.id)&&m.value.has(S.id.toString());return l({getWidth:()=>u.value?u.value.clientWidth:0,getHeight:()=>u.value?u.value.clientHeight:0,setElasticWidth:()=>{if(!u.value)return;const S=u.value.parentNode;if(!S)return;const E=u.value.querySelectorAll(".panel-elastic-load"),f=S.clientWidth;for(let D=0;D<E.length;D++)E[D].style.width=`${f}px`},setElasticHeight:S=>{if(!u.value)return;const E=u.value.querySelector(`[data-elastic-id="${CSS.escape(S)}"]`);if(E){const f=E.parentNode;if(f){E.style.height="",f.style.height="";const h=`${E.clientHeight}px`;E.style.height=h,f.style.height=h}const D=s.value;D.has(S)||(s.value=new Set(D).add(S))}},removeElasticAbsolute:S=>{if(s.value.has(S)){const E=new Set(s.value);E.delete(S),s.value=E}},clearElasticAbsolute:()=>{s.value.size>0&&(s.value=new Set)},setElasticLoadLeft:S=>{if(!u.value)return;const E=u.value.querySelectorAll(".panel-elastic-load"),f=o.isFinite(S)?Math.max(0,S):0;for(let D=0;D<E.length;D++)E[D].style.left=`${f}px`},setEmptyWidth:()=>{if(!u.value)return;const S=u.value.querySelector(".panel-table-empty");if(S){const E=u.value.parentNode;if(E){const f=E.clientWidth;S.style.width=`${f}px`}}},setEmptyLeft:S=>{const E=u.value?u.value.querySelector(".panel-table-empty"):null;if(E){const f=o.isFinite(S)?Math.max(0,S):0;E.style.left=`${f}px`}}}),(S,E)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(v.value),style:e.normalizeStyle(y.value),ref_key:"refElTable",ref:u},[e.createElementVNode("tbody",null,[e.unref(o).isEmpty(n.list)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.list,(f,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${D}`},[e.createElementVNode("tr",{class:e.normalizeClass({odd:n.isStriped&&D%2===0,"tr-customInterval-odd":n.isStriped&&n.trIntervalNum>0&&Math.floor(D/n.trIntervalNum)%2===0,"tr-customInterval-even":n.isStriped&&n.trIntervalNum>0&&Math.floor(D/n.trIntervalNum)%2===1,"tr-disabled":e.unref(o).isBoolean(f?.isDisabled)&&f.isDisabled,"tr-selected":N(f),"tr-hover":n.hoverIndex===D}),onClick:h=>k(h,f,D),onMouseenter:h=>F(D),onMouseleave:B},[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createBlock(sg,{key:0,keyIndex:`${n.keyIndex}_${n.fixedType}_body_tr_${D}`,isShowRadio:n.isShowRadio,isShowCheckbox:n.isShowCheckbox,value:N(f),info:f,disabled:n.disabled},null,8,["keyIndex","isShowRadio","isShowCheckbox","value","info","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(h,b)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${D}_td_${b}`,isOrder:n.isOrder,tdIndex:b,tdInfo:h,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(S.$slots,`td_${h?.data??""}`,{data:f,trIndex:D},()=>[e.createTextVNode(e.toDisplayString(I(f&&h?f[h.data]:void 0,h)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,rg),n.isElastic&&!e.unref(o).isEmpty(f?.id)&&p.value.has(f.id.toString())?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.elasticType==="default"?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":n.hoverIndex===D}),onMouseenter:h=>F(D),onMouseleave:B},[e.createElementVNode("td",{colspan:g.value,class:e.normalizeClass({"td-elastic-load":x(f)})},[x(f)?(e.openBlock(),e.createElementBlock("div",dg,[e.createElementVNode("div",mg,[e.createVNode(rt,{theme:"circleBubble",size:"large"})])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["elastic-container",{"elastic-container-absolute":s.value.has(f.id.toString())}]),"data-elastic-id":f.id},[e.renderSlot(S.$slots,"tr_elastic_children",{data:f,trIndex:D})],10,pg))],10,ug)],42,cg)):n.elasticType==="sameDataStructure"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[x(f)?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":n.hoverIndex===D}),onMouseenter:h=>F(D),onMouseleave:B},[e.createElementVNode("td",{colspan:g.value,class:"td-elastic-load"},[e.createElementVNode("div",gg,[e.createElementVNode("div",vg,[e.createVNode(rt,{theme:"circleBubble",size:"large"})])])],8,hg)],42,fg)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(A(f.id.toString()),(h,b)=>(e.openBlock(),e.createElementBlock("tr",{key:`${n.keyIndex}_${n.fixedType}_body_tr_${D}_elastic_${b}`,class:e.normalizeClass({"tr-elastic-sameDataStructure":!0,odd:n.isStriped&&b%2===0,"tr-disabled":e.unref(o).isBoolean(h?.isDisabled)&&h.isDisabled,"tr-hover":n.hoverElasticIndex===b&&n.hoverIndex===D}),onMouseenter:_=>F(D,b),onMouseleave:B},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(_,O)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${D}_elastic_${b}_td_${O}`,isOrder:n.isOrder,tdIndex:O,tdInfo:_,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(S.$slots,`td_elastic_${_?.data??""}`,{data:h,trIndex:D,trElasticInx:b},()=>[e.createTextVNode(e.toDisplayString(I(h&&_?h[_.data]:void 0,_)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,yg))),128))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128)),e.unref(o).isEmpty(n.list)&&!n.isRunLoading&&!e.unref(o).isNonEmptyString(n.fixedType)?(e.openBlock(),e.createElementBlock("tr",kg,[e.createElementVNode("td",{colspan:g.value,class:"td-empty"},[e.createElementVNode("div",wg,e.toDisplayString(e.unref(o).isNonEmptyString(n.emptyText)?n.emptyText:e.unref(r).noResultsText),1)],8,Sg)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],6))}});function Cg(n){if(!Array.isArray(n))return[];const l=[];return n.forEach(a=>{if(o.isEmpty(a))return;const t=a;!(o.isBoolean(t.isDisabled)?t.isDisabled:!1)&&!o.isEmpty(t.id)&&l.push(String(t.id))}),l}function Eg(n,l,a=!1){if(!Array.isArray(n)||n.length===0)return[];const t=[];return n.forEach(i=>{const r=String(i);l.includes(r)&&t.push(r)}),a&&t.length>1?[t[0]]:t}function bg(n,l){return l.length>0&&l.length===n.length}function xg(n,l){return n.filter(a=>!l.includes(a))}const Bg=["id"],Ig={class:"table-wrapper"},Dg={key:0,class:"table-fixed-column-left"},Tg={key:2,class:"table-fixed-column-right"},Ng={key:0,class:"table-scroll-occupy-container"},Vg={key:2,class:"table-fixed-column-scrollX"},Mg={key:4,class:"table-fixed-head-load"},Og={key:0,class:"table-fixed-column-left"},_g={key:2,class:"table-fixed-column-right"},Ag={key:1,class:"table-fixed-column-scrollX"},Lg={key:2,class:"table-footer-wrapper"},$g={key:0,class:"table-load",role:"status","aria-live":"polite"},Fg={class:"table-load-wrapper"},Xa=15,Pg=30,Rg=180,Hg=50,Ga=300,ui=e.defineComponent({name:"ClTable",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},totalLength:Number,totalData:{type:Object,default:()=>({})},isServer:{type:Boolean,default:!0},isParamTriggerServer:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!0},loadTheme:{type:String,default:"circleBubble"},loadColor:{type:String,default:"var(--cl-primary, #1088f0)"},isShowInitLoadIng:{type:Boolean,default:!0},isPaginate:{type:Boolean,default:!0},pageOffset:{type:Number,default:0},isPaginateLimit:{type:Boolean,default:!0},paginateLimit:{type:Number,default:10},paginateLimitData:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},selectValue:{type:[String,Number],default:""},checkedRowType:{type:String,default:"none",validator:n=>["none","radio","checkbox"].indexOf(n)>-1},isShowCheckboxAll:{type:Boolean,default:!0},isScrollX:{type:Boolean,default:!1},isScrollXBottom:{type:Boolean,default:!1},isFixedHead:{type:Boolean,default:!1},scrollY:{type:Number,default:-1},fixedColumnLeftIndex:{type:Number,default:-1},fixedColumnRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},isClickRowLinkage:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},isElasticLoad:{type:Boolean,default:!0},rowClickKeyInvalid:{type:String,default:".tr-click-invalid"},rowClickKeyElastic:{type:String,default:".tr-click-elastic"},elasticIconCls:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:n=>["default","sameDataStructure"].indexOf(n)>-1},elasticData:{type:Object,default:()=>({})},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String,isHead:{type:Boolean,default:!0}},emits:{onGetData:n=>!0,onClickRow:(n,l,a)=>!0,onClickElastic:(n,l,a,t,i)=>!0,onChangeChecked:(n,l,a)=>!0,onChangeParams:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useSlots(),d=re=>{let fe=[];if(t.isOrder){const ge=o.isEmpty(re)?[]:re;let we=[0,"desc"];const be=o.isEmpty(t.columns)?[]:t.columns;for(let Be=0;Be<be.length;Be+=1){const _e=be[Be];if(o.isEmpty(_e))continue;const Xe=_e.sort===void 0||_e.sort===null?!0:_e.sort===!0,Je=o.isBoolean(_e.visible)?_e.visible:!0;if(Xe&&Je){we=[Be,"desc"];break}}if(ge.length===0)fe=we;else{const Be=be[ge[0]];if(o.isEmpty(Be))fe=we;else{const _e=Be.sort===void 0||Be.sort===null?!0:Be.sort===!0,Xe=o.isBoolean(Be.visible)?Be.visible:!0,Je=Array.isArray(ge)?ge[0]:void 0,Bt=Array.isArray(ge)&&(ge[1]==="asc"||ge[1]==="desc")?ge[1]:void 0;fe=_e&&Xe&&!o.isUndefined(Je)?[Je,Bt??"desc"]:we}}}return fe},u=()=>{let re=1;return t.paginateLimit>0&&t.pageOffset>=0&&(re=Math.floor(t.pageOffset/t.paginateLimit)+1),re},s=d(t.orderSort),c={dataJson:o.getJsonByList(t.list),changeNewPaginate:{pages:u(),limit:t.paginateLimit},changeNewSort:{orderIndex:s[0],orderBy:s[1]},sortLocalData:[],scrollBody:{left:0},scrollHead:{left:0},resizeEvent:null,timerBody:null,pendingCanceled:!1},m={observerBodyScrollY:null},p=`table-${o.getRandom(5)}`,g=t.id,v=e.useTemplateRef("refElHeadWrapper"),y=e.useTemplateRef("refElHeadContainer"),k=e.useTemplateRef("refElHeadMain"),F=e.useTemplateRef("refElHeadTable"),B=e.useTemplateRef("refElHeadFixedScrollX"),I=e.useTemplateRef("refElBodyWrapper"),A=e.useTemplateRef("refElBodyContainer"),N=e.useTemplateRef("refElBodyMain"),x=e.useTemplateRef("refElBodyTable"),V=e.useTemplateRef("refElBodyFixedScrollX"),w=e.reactive({isRunLoading:!1,isCheckedRadio:t.checkedRowType==="radio",isCheckedCheckbox:t.checkedRowType==="checkbox",colspanCount:0,hoverTrIndex:-1,hoverTrElasticIndex:-1,totalHeight:"0"}),M=e.ref([]),C=e.reactive({pages:c.changeNewPaginate.pages,limit:c.changeNewPaginate.limit}),T=e.ref(s),U=e.ref(!1),Z=()=>{const re=t.selectValue;return o.isNonEmptyString(re)?o.split(re):o.isNumber(re)?o.split(re.toString()):[]},z=e.ref(Z()),H=e.reactive({open:[],loading:[]}),S=e.reactive({isShow:!1,minWidth:"auto",posType:"left"}),E=e.ref(!1),f=e.reactive({totalWidth:"0",centerWidth:"0",leftColumnLength:0,leftWidth:"0",rightColumnLength:0,rightWidth:"0"}),D=e.reactive({isShow:!1,width:"auto",height:"auto"}),h=e.reactive({headHeight:0});let b=null,_=null,O=0;const P=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("th_")===0)),J=e.computed(()=>{const re=Object.keys(r).filter(fe=>fe.indexOf("td_")===0&&fe.indexOf("td_elastic_")!==0);return t.isElastic&&re.push("tr_elastic_children"),re}),Y=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("total_")===0)),ne=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("td_elastic_")===0)),ce=e.computed(()=>t.isShowCheckboxAll&&M.value.length>0),X=e.computed(()=>!o.isEmpty(t.totalData)&&M.value.length>0),Q=e.computed(()=>t.isServer?o.isFinite(t.totalLength)?t.totalLength:0:o.isFinite(t.totalLength)?t.totalLength:t.list?.length||0),le=e.computed(()=>t.isScrollX||t.isScrollXBottom),K=e.computed(()=>t.scrollY>0),W=e.computed(()=>t.isHead&&t.fixedColumnLeftIndex>-1&&le.value),R=e.computed(()=>t.isHead&&t.fixedColumnRightIndex>-1&&le.value&&t.fixedColumnRightIndex>t.fixedColumnLeftIndex+1),ae=e.computed(()=>{const re={"panel-table":!0,"table-disabled":t.disabled};return w.isRunLoading&&(re["table-loading"]=!0),o.osType().isMobile&&(re["table-mob"]=!0),o.getJsonMerge(re,de.getClassNameJson(t.className))}),G=e.computed(()=>{const re={"table-head-wrapper":!0,"table-scrollY":K.value,"table-scroll-occupy-y":E.value};return D.isShow&&(re["table-fixed-head"]=!0),re}),q=e.computed(()=>{const re={"table-head-container":!0};return t.isScrollX&&(re["table-scrollX"]=!0),(W.value||R.value)&&(re["table-fixed-column"]=!0,S.isShow?re[`table-scrollX-${S.posType}`]=!0:re["table-scrollX-none"]=!0),re}),ee=e.computed(()=>{const re={"table-body-wrapper":!0,"table-scrollY":K.value,"table-scrollX":t.isScrollX,"table-scrollX-bottom":S.isShow};return re["table-scroll-borderT0"]=S.isShow&&t.isScrollX,(W.value||R.value)&&(re["table-fixed-column"]=!0,S.isShow?re[`table-scrollX-${S.posType}`]=!0:re["table-scrollX-none"]=!0),re}),$=e.computed(()=>{const re={};if((W.value||R.value)&&K.value){const fe=S.isShow?Math.max(0,t.scrollY-Xa):t.scrollY;re.maxHeight=`${fe}px`}return re}),j=e.computed(()=>{const re={};return W.value||R.value||K.value&&(re.maxHeight=`${t.scrollY}px`),re}),se=e.computed(()=>{const re={};return w.isRunLoading&&(re.height=`${h.headHeight}px`),re}),me=re=>{i("onGetData",re)},ie=(re,fe,ge,we,be)=>{i("onClickElastic",re,fe,ge,we,be)},oe=(re,fe,ge=!1)=>{i("onClickRow",re,fe,ge)},L=(re,fe,ge)=>{i("onChangeChecked",re,fe,ge)},te=()=>{const re=bn();i("onChangeParams",re)},ue=()=>{e.nextTick(()=>{if(k.value){const re=k.value.querySelector("thead");re&&(h.headHeight=re.offsetHeight)}}),w.isRunLoading=!0},pe=()=>{w.isRunLoading=!1},he=()=>{let re=0,fe=0;(w.isCheckedRadio||w.isCheckedCheckbox)&&(re=1,F.value&&(fe=F.value.getRcWidth())),(o.isEmpty(t.columns)?[]:t.columns).forEach(be=>{(o.isBoolean(be?.visible)?be.visible:!0)&&(re+=1,!o.isEmpty(be)&&!o.isEmpty(be.width)?fe+=Number(be.width)||0:!o.isEmpty(be)&&!o.isEmpty(be.widthMin)&&(fe+=Number(be.widthMin)||0))});const we=F.value?F.value.getPaddingLr():0;fe+=we,w.colspanCount=re,le.value&&(S.minWidth=fe>0?`${fe}px`:"auto")},Ce=()=>new Promise((re,fe)=>{e.nextTick(()=>{try{if(!x.value){re();return}const ge=x.value.getWidth();f.totalWidth=`${ge}px`;let we=ge;if(W.value||R.value){const be=[],Be=[];(o.isEmpty(t.columns)?[]:t.columns).forEach((pt,Zt)=>{(o.isBoolean(pt?.visible)?pt.visible:!0)&&(W.value&&Zt<=t.fixedColumnLeftIndex&&be.push(pt),R.value&&Zt>=t.fixedColumnRightIndex&&Be.push(pt))});const Xe=w.isCheckedRadio||w.isCheckedCheckbox,Je=F.value?F.value.getElTh():[],Bt=Je.length;let yt=be.length;const Qt=Be.length;let Sa=yt-1;const Ni=Bt-Qt;Xe&&(yt+=1,Sa+=1);let ro=0,co=0;for(let pt=0;pt<Bt;pt++){const Zt=Je[pt];if(!Zt)continue;const uo=Zt.clientWidth;pt<=Sa&&(ro+=uo),pt>=Ni&&(co+=uo)}W.value&&(f.leftColumnLength=be.length,f.leftWidth=`${ro}px`,we-=ro),R.value&&(f.rightColumnLength=Be.length,f.rightWidth=`${co}px`,we-=co)}we=Math.max(0,we),f.centerWidth=`${we}px`,e.nextTick(()=>{re()})}catch(ge){fe(ge)}})}),Ee=()=>{e.nextTick(()=>{x.value&&x.value.setElasticWidth()})},xe=re=>{(W.value||R.value)&&x.value&&x.value.setElasticHeight(re)},Ie=re=>{if(t.isElasticLoad){const fe=o.getArrClone(H.loading);fe.indexOf(re)===-1&&(fe.push(re),H.loading=fe)}},Re=re=>{if(t.isElasticLoad){const fe=o.getArrClone(H.loading),ge=fe.indexOf(re);ge>-1&&(fe.splice(ge,1),H.loading=fe,e.nextTick(()=>{xe(re)}))}},Fe=(re,fe,ge,we)=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const be=re.id.toString(),Be=o.getArrClone(H.open),_e=Be.indexOf(be),Xe=_e===-1;Xe?(Be.push(be),Ie(be)):(Be.splice(_e,1),Re(be),(W.value||R.value)&&x.value&&x.value.removeElasticAbsolute(be)),Lt(ge,Xe);const Je=o.isBoolean(we)?we:!0;H.open=Be,Je&&ie(be,re,fe,Xe,ge),Ee()},vt=()=>{const re=[],fe=o.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;if(fe.length===2){const ge=M.value,we=H.open;ge.forEach(be=>{if(!be){re.push(be);return}const Be=o.getJsonClone(be);if(!o.isEmpty(Be.id)){const _e=Be.id.toString();Be._elasticIconCls=we.indexOf(_e)>-1?fe[1]:fe[0]}re.push(Be)})}re.length>0&&(M.value=re)},Lt=(re,fe=!1)=>{if(re){const ge=[],we=["elastic-expand","elastic-retract"];fe?ge.push("elastic-expand"):ge.push("elastic-retract");const be=o.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;be.length===2&&(we.push(be[0]),we.push(be[1]),fe?ge.push(be[1]):ge.push(be[0]));let Be=de.getRemoveClass(re.className,we.join(" "));Be=de.getAddClass(Be,ge),re.className=Be}},wn=()=>Cg(M.value),Cn=(re=null)=>{const fe=o.isUndefined(re)||re===null?z.value:re;return Eg(fe,wn(),w.isCheckedRadio)},Qn=()=>{if(w.isCheckedCheckbox){const re=wn(),fe=Cn();U.value=bg(re,fe)}},ma=()=>{const re=[],fe=Cn(),ge=wn(),we=xg(ge,fe);if(w.isCheckedCheckbox)fe.forEach(be=>{const Be=c.dataJson[be.toString()];o.isUndefined(Be)||re.push(Be)});else if(w.isCheckedRadio&&fe.length>0){const be=c.dataJson[fe[0]];o.isUndefined(be)||re.push(be)}return{checkedIds:fe,unCheckedIds:we,checkedData:re}},Zn=()=>{const re=ma();L(re.checkedIds.join(","),re.checkedData,{checkedIds:re.checkedIds,unCheckedIds:re.unCheckedIds})},pa=re=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const fe=re.id.toString(),ge=z.value;let we=[];if(w.isCheckedCheckbox){const be=o.isExistValue(ge,fe);ge.forEach(Be=>{Be!==fe&&we.push(Be)}),be||we.push(fe),z.value=we,Qn(),Zn()}else ge.length>0&&ge[0]===fe||(we=[fe],z.value=we,Zn())},eo=()=>{if(le.value&&N.value&&x.value){const re=N.value.clientWidth,fe=x.value.getWidth();S.isShow=fe>re}},to=()=>{if(K.value&&x.value){const re=x.value.getHeight();let fe=re>t.scrollY;if(fe||(W.value||R.value?A.value&&(fe=re>A.value.clientHeight):N.value&&N.value.offsetHeight>=t.scrollY&&(fe=re>N.value.clientHeight)),fe&&X.value&&F.value){const ge=F.value.getTotalHeight()-(o.osType().isMobile?2:0);w.totalHeight=`${ge}px`}E.value=fe}},En=()=>{if((W.value||R.value)&&N.value&&x.value){let re=N.value.scrollLeft;const fe=N.value.clientWidth,ge=x.value.getWidth();let we="left";re>0&&(fe+re>=ge?we="right":we="center"),S.posType=we}},fa=()=>{if(!I.value||!x.value)return;let re=k.value?k.value.scrollLeft:0;const fe=I.value.clientWidth,ge=x.value.getWidth();fe+re>ge&&(re=0),H.loading.length>0&&x.value.setElasticLoadLeft(re),M.value.length===0&&x.value.setEmptyLeft(re)},no=re=>{O=re.target.scrollLeft,b===null&&(b=requestAnimationFrame(()=>{b=null;const fe=O;k.value&&(k.value.scrollLeft=fe),N.value&&(N.value.scrollLeft=fe),B.value&&B.value.setScrollLeft(fe),V.value&&V.value.setScrollLeft(fe),En(),fa()}))},ha=re=>{const fe=re.target,ge=fe.scrollLeft;fe.scrollWidth-fe.clientWidth-ge<1&&N.value&&N.value.scrollLeft>ge||(ge!==c.scrollHead.left&&no(re),c.scrollHead.left=ge)},ga=re=>{const fe=re.target.scrollLeft;fe!==c.scrollBody.left&&no(re),c.scrollBody.left=fe},oo=()=>{if(t.isFixedHead&&v.value&&!w.isRunLoading){let re=!1,fe="auto",ge="auto";const we=v.value&&v.value.parentNode?de.getPositionView(v.value.parentNode):null;if(we&&we.top<0&&I.value&&y.value&&F.value){const be=I.value.clientHeight;if(we.top>(be-Pg)*-1){re=!0;const Be=I.value.offsetWidth,_e=S.isShow&&t.isScrollX?y.value.offsetHeight:F.value.getOffsetHeight();fe=`${Be}px`,ge=`${_e}px`}}D.isShow=re,D.width=fe,D.height=ge}},ao=()=>{M.value.length===0&&e.nextTick(()=>{x.value&&x.value.setEmptyWidth()})},bn=()=>{const re={};if(t.isPaginate){const{pages:fe,limit:ge}=c.changeNewPaginate;re.pages=fe,re.limit=ge,re.offset=(re.pages-1)*re.limit}if(t.isOrder){const{orderIndex:fe,orderBy:ge}=c.changeNewSort;re.orderIndex=fe,re.orderBy=ge;const we=t.columns[fe];o.isUndefined(we)||(re.orderColumns=we.data)}return re},xi=()=>{t.scrollY>0&&e.nextTick(()=>{if(!N.value)return;const re=N.value.querySelectorAll(".tr-selected");N.value.scrollTop=re&&re.length>0&&re[0].offsetTop>Rg?re[0].offsetTop-Hg:0})},va=(re={})=>{if(w.isCheckedRadio||w.isCheckedCheckbox){const fe=Z();z.value=Cn(fe),Qn(),xi()}t.isElastic&&((!o.isBoolean(re.isElasticCloseAll)||re.isElasticCloseAll)&&(H.open=[],(W.value||R.value)&&x.value&&x.value.clearElasticAbsolute()),H.loading=[],vt()),w.hoverTrIndex=-1,w.hoverTrElasticIndex=-1,e.nextTick(()=>{t.isPaginate&&(C.pages=c.changeNewPaginate.pages,C.limit=c.changeNewPaginate.limit),t.isOrder&&(T.value=d([c.changeNewSort.orderIndex,c.changeNewSort.orderBy])),pe(),he(),e.nextTick(()=>{to(),eo(),Ce().then(()=>{En()}).catch(fe=>{Se.warn("ClTable","表格固定列分析失败",fe)}),ao(),oo()})})},ya=(re,fe)=>{const ge=o.isEmpty(t.list)?[]:t.list;let we=[];if(fe){if(t.isOrder){const be={},Be=[];let _e="string";if(!o.isUndefined(re.orderIndex)){const Xe=re.orderColumns,Je=t.columns[re.orderIndex];if(!o.isUndefined(Je))if(o.isEmpty(Je.sortType))switch(Je.format){case"int":case"float2":case"float3":_e="number";break;case"date":case"dateTime":case"time":_e="date";break;default:_e="string"}else _e=Je.sortType;ge.forEach(Bt=>{if(!Bt)return;let yt=Bt[Xe];yt=o.isUndefined(yt)||yt===null?"":yt;const Qt=yt.toString();o.isExistJsonKey(be,Qt)||(be[Qt]=[],Be.push(yt)),be[Qt].push(o.getJsonClone(Bt))})}Be.length>0&&(re.orderBy==="desc"?o.getArrDesc(Be,_e):o.getArrAsc(Be,_e)).forEach(Je=>{we.push(...be[Je.toString()])})}else we=o.getListClone(t.list);c.sortLocalData=we}else we=c.sortLocalData;if(t.isPaginate){const be=[],Be=we.length,_e=re.offset;let Xe=re.offset+re.limit;if(Xe=Be<Xe?Be:Xe,Be&&Be>=_e&&Be>0)for(let Je=_e;Je<Xe;Je+=1)be.push(o.getJsonClone(we[Je]));return be}else return we},xt=(re={})=>{const fe=bn();z.value=[],U.value=!1,ue(),t.isServer?(c.timerBody&&clearTimeout(c.timerBody),c.timerBody=setTimeout(()=>{c.timerBody=null,me(fe)},Ga)):(c.timerBody&&clearTimeout(c.timerBody),c.timerBody=setTimeout(()=>{c.timerBody=null;const ge=o.isBoolean(re.isChangePage)?!re.isChangePage:!0;M.value=ya(fe,ge),va()},Ga))},Bi=()=>{le.value&&(k.value&&k.value.addEventListener("scroll",ha),N.value&&N.value.addEventListener("scroll",ga))},Ii=()=>{if(K.value){const re=window,fe=re.MutationObserver||re.WebKitMutationObserver||re.MozMutationObserver;if(!fe)return;m.observerBodyScrollY=new fe(()=>{to()});const ge=m.observerBodyScrollY;x.value&&x.value.$el&&ge&&ge.observe(x.value.$el,{childList:!0,subtree:!0})}},xn=()=>{eo(),Ce().then(()=>{En()}).catch(re=>{Se.warn("ClTable","表格固定列分析失败",re)}),Ee(),ao(),fa(),e.nextTick(()=>{oo()})},Bn=()=>{_===null&&(_=requestAnimationFrame(()=>{_=null,oo()}))},Di=()=>{he(),e.nextTick(()=>{t.isServer?xt():o.isEmpty(t.list)?t.isShowInitLoadIng?ue():e.nextTick(()=>{ao()}):(xt(),t.isShowInitLoadIng||(w.isRunLoading=!1))})};e.onMounted(()=>{e.nextTick(()=>{Di(),Bi(),Ii(),c.resizeEvent=new je.Resize({isDelay:!0,callback:()=>{xn()}}),t.isFixedHead&&window.addEventListener("scroll",Bn)})}),e.onActivated(()=>{t.isFixedHead&&window.addEventListener("scroll",Bn),c.resizeEvent||(c.resizeEvent=new je.Resize({isDelay:!0,callback:()=>{xn()}})),xn(),c.pendingCanceled&&(c.pendingCanceled=!1,xt())}),e.onDeactivated(()=>{window.removeEventListener("scroll",Bn),c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null,w.isRunLoading=!1,c.pendingCanceled=!0),c.resizeEvent&&(c.resizeEvent.destroy(),c.resizeEvent=null),b!==null&&(cancelAnimationFrame(b),b=null),_!==null&&(cancelAnimationFrame(_),_=null)}),e.onBeforeUnmount(()=>{c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null),m.observerBodyScrollY&&(m.observerBodyScrollY.disconnect(),m.observerBodyScrollY.takeRecords(),m.observerBodyScrollY=null),le.value&&(k.value&&k.value.removeEventListener("scroll",ha),N.value&&N.value.removeEventListener("scroll",ga)),c.resizeEvent&&c.resizeEvent.destroy(),b!==null&&(cancelAnimationFrame(b),b=null),_!==null&&(cancelAnimationFrame(_),_=null),window.removeEventListener("scroll",Bn)}),e.watch(()=>t.list,(re,fe)=>{const ge=o.isEmpty(re)?[]:re;if(c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null),c.dataJson=o.getJsonByList(ge),t.isServer)M.value=o.getListClone(ge);else if(t.isParamTriggerServer)M.value=o.getListClone(ge,!0);else{c.changeNewPaginate.pages=1;const be=bn();M.value=ya(be,!0)}const we={};if(t.isElastic){let be=!1;if(fe)if(ge.length===fe.length){const Be=new Set(fe.map(_e=>_e?.id));be=ge.some(_e=>_e&&!Be.has(_e.id))}else be=!0;be||(we.isElasticCloseAll=!1)}va(we)},{deep:!0}),e.watch(()=>t.columns,()=>{e.nextTick(()=>{he(),e.nextTick(()=>{to(),eo(),Ce().then(()=>{En()}).catch(re=>{Se.warn("ClTable","表格固定列分析失败",re)})})})},{deep:!0}),e.watch(()=>t.selectValue,()=>{const re=Z();z.value=Cn(re),Qn()}),e.watch(()=>t.orderSort,(re,fe)=>{if(re&&re.length>=2&&!(re[0]===c.changeNewSort.orderIndex&&re[1]===c.changeNewSort.orderBy)){const ge=d(t.orderSort);c.changeNewPaginate.pages=1,C.pages=1,c.changeNewSort={orderIndex:ge[0],orderBy:ge[1]},T.value=ge,!t.isServer&&t.isParamTriggerServer?te():xt({isChangePage:!1})}},{deep:!0}),e.watch([()=>t.pageOffset,()=>t.paginateLimit],([re,fe],[ge,we])=>{const be=u();c.changeNewPaginate.pages=be,c.changeNewPaginate.limit=fe,C.pages=be,C.limit=fe,!t.isServer&&t.isParamTriggerServer?te():xt({isChangePage:!0})});const lo=()=>{if(t.disabled)return;const re=!U.value;let fe=[];if(re){const ge=wn(),we=z.value,be=[];ge.forEach(Be=>{o.isExistValue(we,Be)||be.push(Be)}),fe=we.concat(be)}U.value=re,z.value=fe,Zn()},io=(re,fe,ge)=>{t.disabled||w.isRunLoading||(c.changeNewPaginate.pages=1,C.pages=1,c.changeNewSort.orderIndex=fe,c.changeNewSort.orderBy=ge,!t.isServer&&t.isParamTriggerServer?te():xt({isChangePage:!1}))},so=(re,fe,ge)=>{if(!fe||o.isEmpty(fe)||o.isBoolean(fe.isDisabled)&&fe.isDisabled||t.disabled)return;const we=o.isNonEmptyString(t.rowClickKeyInvalid)?de.getParent(re.target,t.rowClickKeyInvalid,re.currentTarget,!1):void 0;if(o.isUndefined(we)){if(t.isElastic){const Be=o.isNonEmptyString(t.rowClickKeyElastic)?de.getParent(re.target,t.rowClickKeyElastic,re.currentTarget,!1):void 0;if(o.isUndefined(Be))t.isClickRowLinkage&&Fe(fe,ge);else{Fe(fe,ge,Be);return}}let be=!1;if(w.isCheckedRadio||w.isCheckedCheckbox){let Be=de.getParent(re.target,".th-rc",re.currentTarget,!1);Be===re.currentTarget&&(Be=null),o.isUndefined(Be)?t.isClickRowLinkage&&pa(fe):(be=!0,pa(fe))}oe(fe,ge,be)}},$t=(re,fe=-1)=>{w.hoverTrIndex=re,w.hoverTrElasticIndex=fe},Ft=()=>{w.hoverTrIndex=-1,w.hoverTrElasticIndex=-1},Ti=(re,fe)=>{t.disabled||w.isRunLoading||t.isPaginate&&(c.changeNewPaginate.pages=re,c.changeNewPaginate.limit=fe,!t.isServer&&t.isParamTriggerServer?te():xt({isChangePage:!0}))},ka=re=>{no(re)};return l({getParamInfo:()=>bn(),refresh:(re=!0)=>{w.isRunLoading||(re&&(c.changeNewPaginate.pages=1),xt())},getData:()=>{const re=e.toRaw(M.value);return o.getListClone(re)},getDataAll:()=>{if(t.isServer){const re=e.toRaw(M.value);return o.getListClone(re)}return o.getListClone(c.sortLocalData)},getSelectData:()=>{const re=ma();return{ids:(re?.checkedIds||[]).join(","),list:re?.checkedData||[]}},loadStart:()=>{ue()},loadStop:()=>{pe()},loadElasticStart:re=>{o.isUndefined(re)||re===null||Ie(re.toString())},loadElasticStop:re=>{o.isUndefined(re)||re===null||Re(re.toString())},closeElastic:(re,fe,ge)=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const we=re.id.toString();if(H.open.indexOf(we)===-1)return;const be=ge||(N.value?N.value.querySelector(`[data-elastic-id="${CSS.escape(we)}"]`):null);Fe(re,fe,be,!1)},refreshResize:()=>{xn()}}),(re,fe)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(g),class:e.normalizeClass(ae.value)},[e.createElementVNode("div",Ig,[n.isHead?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(G.value),style:e.normalizeStyle({width:D.width}),ref_key:"refElHeadWrapper",ref:v},[e.createElementVNode("div",{class:e.normalizeClass(q.value),ref_key:"refElHeadContainer",ref:y},[e.createElementVNode("div",{class:"table-head-main",ref_key:"refElHeadMain",ref:k},[e.createVNode(Vo,{minWidth:S.minWidth,columns:n.columns,isOrder:n.isOrder,orderSort:T.value,isShowTotal:X.value,totalInfo:n.totalData,keyIndex:p,hoverIndex:w.hoverTrIndex,isUseScrollX:le.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:ce.value,disabled:n.disabled,checkboxAllValue:U.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft,ref_key:"refElHeadTable",ref:F},e.createSlots({_:2},[e.renderList(P.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])})),e.renderList(Y.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])}))]),1032,["minWidth","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],512),W.value&&f.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",Dg,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:f.leftWidth})},[e.createVNode(Vo,{fixedType:"left",fixedLeftIndex:n.fixedColumnLeftIndex,width:f.totalWidth,columns:n.columns,isOrder:n.isOrder,orderSort:T.value,isShowTotal:X.value,totalInfo:n.totalData,keyIndex:p,hoverIndex:w.hoverTrIndex,isUseScrollX:le.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:ce.value,disabled:n.disabled,checkboxAllValue:U.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(P.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])})),e.renderList(Y.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])}))]),1032,["fixedLeftIndex","width","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),R.value&&f.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",Tg,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:f.rightWidth})},[e.createVNode(Vo,{fixedType:"right",fixedRightIndex:n.fixedColumnRightIndex,width:f.totalWidth,columns:n.columns,isOrder:n.isOrder,orderSort:T.value,keyIndex:p,hoverIndex:w.hoverTrIndex,isShowTotal:X.value,totalInfo:n.totalData,isUseScrollX:le.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:ce.value,disabled:n.disabled,checkboxAllValue:U.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(P.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])})),e.renderList(Y.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data})])}))]),1032,["fixedRightIndex","width","columns","isOrder","orderSort","hoverIndex","isShowTotal","totalInfo","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2),E.value?(e.openBlock(),e.createElementBlock("div",Ng,[fe[0]||(fe[0]=e.createElementVNode("div",null,null,-1)),X.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-scroll-occupy-total",style:e.normalizeStyle({height:w.totalHeight})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isScrollX?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"table-scroll-occupy-corner":S.isShow})},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isScrollX?e.withDirectives((e.openBlock(),e.createElementBlock("div",Vg,[e.createVNode(fn,{isShowLeft:W.value,isShowRight:R.value,leftWidth:f.leftWidth,centerWidth:f.centerWidth,rightWidth:f.rightWidth,isShowCorner:E.value,cornerType:"right-top",onOnScrollX:ka,ref_key:"refElHeadFixedScrollX",ref:B},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],512)),[[e.vShow,S.isShow]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),D.isShow&&w.isRunLoading?(e.openBlock(),e.createElementBlock("div",Mg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],6),D.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:D.height,width:D.width})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(ee.value),ref_key:"refElBodyWrapper",ref:I},[e.createElementVNode("div",{class:"table-body-container",style:e.normalizeStyle($.value),ref_key:"refElBodyContainer",ref:A},[e.createElementVNode("div",{class:e.normalizeClass({"table-body-main":!0,"table-body-empty":M.value.length===0}),style:e.normalizeStyle(j.value),ref_key:"refElBodyMain",ref:N},[e.createVNode(Mo,{minWidth:S.minWidth,columns:n.columns,list:M.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:z.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:le.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:H.open,elasticLoading:H.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft,ref_key:"refElBodyTable",ref:x},e.createSlots({_:2},[e.renderList(J.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex})])})),e.renderList(ne.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["minWidth","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],6),W.value&&f.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",Og,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:f.leftWidth})},[e.createVNode(Mo,{width:f.totalWidth,fixedType:"left",fixedLeftIndex:n.fixedColumnLeftIndex,columns:n.columns,list:M.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:z.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:le.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:H.open,elasticLoading:H.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(J.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex})])})),e.renderList(ne.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["width","fixedLeftIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),R.value&&f.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",_g,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:f.rightWidth})},[e.createVNode(Mo,{width:f.totalWidth,fixedType:"right",fixedRightIndex:n.fixedColumnRightIndex,columns:n.columns,list:M.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:z.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:le.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:H.open,elasticLoading:H.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(J.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex})])})),e.renderList(ne.value,ge=>({name:ge,fn:e.withCtx(we=>[e.renderSlot(re.$slots,ge,{data:we.data,trIndex:we.trIndex,trElasticInx:we.trElasticInx})])}))]),1032,["width","fixedRightIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),n.isScrollX&&M.value.length>0&&S.isShow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isScrollXBottom?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-fixed-column-scrollX",style:e.normalizeStyle({bottom:K.value?"-1px":"1px"})},[e.createVNode(fn,{isShowLeft:W.value,isShowRight:R.value,leftWidth:f.leftWidth,centerWidth:f.centerWidth,rightWidth:f.rightWidth,isShowCorner:E.value,isShowCover:!1,cornerType:"right-bottom",onOnScrollX:ka,ref_key:"refElBodyFixedScrollX",ref:V},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],4)):(e.openBlock(),e.createElementBlock("div",Ag,[e.createElementVNode("div",{style:e.normalizeStyle({height:`${Xa}px`})},null,4)]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2),n.isPaginate&&M.value.length>0?(e.openBlock(),e.createElementBlock("div",Lg,[fe[1]||(fe[1]=e.createElementVNode("div",null,null,-1)),e.createVNode(ra,{currentPage:C.pages,limitValue:C.limit,limitData:n.paginateLimitData,isShowLimit:n.isPaginateLimit,totalCount:Q.value,disabled:n.disabled||w.isRunLoading,onOnChange:Ti},null,8,["currentPage","limitValue","limitData","isShowLimit","totalCount","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),w.isRunLoading?(e.openBlock(),e.createElementBlock("div",$g,[e.createElementVNode("div",Fg,[e.createElementVNode("div",{class:"table-load-head",style:e.normalizeStyle(se.value)},null,4),e.createElementVNode("div",{class:e.normalizeClass({"table-load-body":!0,"table-load-bg-gray":n.isLoading})},[e.createVNode(Gt,{isLoadIng:n.isLoading,size:"xxl",theme:n.loadTheme,color:n.loadColor||void 0},null,8,["isLoadIng","theme","color"])],2)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Bg))}}),Ug=["id"],zg={class:"tableedit-table table-base"},di=e.defineComponent({name:"ClTableEdit",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(n,{expose:l}){const a=n,t=`tableedit-${o.getRandom(5)}`,i=a.id,r=e.useSlots(),d=e.computed(()=>o.isArray(a.list)?a.list:[]),u=e.computed(()=>(o.isArray(a.columns)?a.columns:[]).filter(v=>o.isObject(v)&&o.isNonEmptyString(v.data)&&v.visible!==!1)),s=e.computed(()=>o.getJsonMerge({"panel-table-edit":!0},de.getClassNameJson(a.className))),c=v=>{const y={};return o.isEmpty(v.width)||(y[`width-${v.width}`]=!0),o.getJsonMerge(y,de.getClassNameJson(v.className))},m=v=>!o.isEmpty(v.data)&&!!r[`td_${v.data}`],p=(v,y)=>{const k=v?v[y.data]:void 0;return o.isEmpty(k)||o.getTypeof(k)==="object"?"":k};return l({getData:()=>d.value}),(v,y)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(s.value)},[e.createElementVNode("table",zg,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(k,F)=>(e.openBlock(),e.createElementBlock("th",{key:`${t}-th-${k.data}-${F}`,class:e.normalizeClass(c(k))},e.toDisplayString(k.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(k,F)=>(e.openBlock(),e.createElementBlock("tr",{key:`${t}-tr-${F}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,I)=>(e.openBlock(),e.createElementBlock("td",{key:`${t}-td-${B.data}-${I}`,class:e.normalizeClass(c(B))},[m(B)?e.renderSlot(v.$slots,`td_${B.data}`,{key:0,data:k,col:B,trIndex:F}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(p(k,B)),1)],64))],2))),128))]))),128))])])],10,Ug))}}),Jg=["id"],Kg=["innerHTML"],mi=e.defineComponent({name:"ClTableSimple",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(n){const l=n,a=`t-${o.getRandom(5)}`,t=l.id,i=e.computed(()=>o.isArray(l.list)?l.list:[]),r=e.computed(()=>o.isArray(l.columns)?l.columns.filter(p=>o.isObject(p)&&!o.isArray(p)):[]),d=e.computed(()=>o.getJsonMerge({"panel-table-simple":!0,"table-base":!0},de.getClassNameJson(l.className))),u=(p,g)=>p?p[g.data]:void 0,s=p=>{const g={};return o.isEmpty(p.width)||(g[`width-${p.width}`]=!0),o.getJsonMerge(g,de.getClassNameJson(p.className))},c=(p,g)=>{const v=u(p,g);return o.isEmpty(v)||o.getTypeof(v)==="object"?"":v},m=(p,g)=>{const v=u(p,g);return o.isHtmlPair(v)};return(p,g)=>(e.openBlock(),e.createElementBlock("table",{id:e.unref(t),class:e.normalizeClass(d.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(v,y)=>(e.openBlock(),e.createElementBlock("th",{key:`${a}-th-${y}`,class:e.normalizeClass(s(v))},e.toDisplayString(v.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(v,y)=>(e.openBlock(),e.createElementBlock("tr",{key:`${a}-tr-${y}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(k,F)=>(e.openBlock(),e.createElementBlock("td",{key:`${a}-td-${F}`,class:e.normalizeClass(s(k))},[m(v,k)?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c(v,k)},null,8,Kg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c(v,k)),1)],64))],2))),128))]))),128))])],10,Jg))}}),Wg=["id"],jg={key:0},Yg=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],qg=["onClick"],Xg=["id","aria-labelledby"],pi=e.defineComponent({name:"ClTabs",__name:"Index",props:{id:String,className:{type:String,default:""},classContent:{type:String,default:""},list:{type:Array,default:()=>[]},theme:{type:String,default:"default",validator:n=>["default","line","card","button"].indexOf(n)!==-1},active:String,disabledData:{type:Array,default:()=>[]},hideData:{type:Array,default:()=>[]},prefixName:String,isShowRemove:{type:Boolean,default:!1},removeReserve:{type:Number,default:1},isShowAdd:{type:Boolean,default:!1},addBtnText:String,tabMinNum:{type:Number,default:1},tabMaxNum:{type:Number,default:0},isHideTabHead:{type:Boolean,default:!1},getAddInfo:Function,checkChangeBefore:Function},emits:{onChange:(n,l)=>!0,onInit:(n,l,a)=>!0,onAdd:n=>!0,onRemove:n=>!0,onErrMsg:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElNavUl"),s=e.reactive({keyIndex:`${o.getRandom(8)}`,showId:t.active}),c=e.ref([]),m=e.reactive({left:0,width:0}),p=e.reactive({isShow:!1,width:""}),g={currentTabsAutoIndex:0,isFirstInit:!1},v=e.ref(!1),y=`tabs-${o.getRandom(5)}`,k=t.id,F=e.computed(()=>{const b={"panel-tabs":!0};return b[`tabs-${t.theme}`]=!0,o.getJsonMerge(b,de.getClassNameJson(t.className))}),B=e.computed(()=>{const b={"tabs-content":!0};return o.getJsonMerge(b,de.getClassNameJson(t.classContent))}),I=()=>{const b=[],_=s.showId?s.showId.toString():"";let O={};c.value.forEach(P=>{const J=o.getJsonClone(P);P.tabId===_&&(O=J),b.push(J)}),i("onInit",s.showId||"",O,b)},A=(b,_)=>{e.nextTick(()=>{i("onChange",b,_)})},N=b=>{i("onAdd",b)},x=b=>{i("onRemove",b)},V=b=>{i("onErrMsg",b)},w=b=>{if(t.theme==="line"){const _=document.getElementById(`tab_${s.keyIndex}_${b}`);let O=0,P=0;_&&_.parentElement&&(O=_.parentElement.offsetLeft+10,P=_.parentElement.offsetWidth-20),m.left=O,m.width=P}},M=()=>{if(u.value){const b=u.value.offsetWidth;let _=0;const O=u.value.children,P=O.length;for(let Y=0;Y<P;Y++){const ne=O[Y];ne.classList.contains("tab-indicator")||(Y===0&&(_+=ne.offsetLeft),_+=ne.offsetWidth)}const J=_>b;p.isShow=J,p.width=`${_}px`}},C=(b,_)=>{const O=o.getJsonClone(b),P=o.isNonEmptyString(O.id)?O.id:"-1";if(O.tabId=P==="-1"?o.getRandom(8):P,O.value=P,o.isEmpty(O.name)){const J=o.isNonEmptyString(t.prefixName)?t.prefixName:"";O.name=J+_.toString()}return O},T=b=>{const _=[];return o.isArray(b)&&b.forEach((O,P)=>{o.isObject(O)&&_.push(C(O,P+1))}),_},U=(b,_)=>{let O="";return _&&!o.isEmpty(_)&&b.forEach(P=>{P.tabId===_&&(O=_)}),o.isEmpty(O)&&b.length>0&&(O=b[0].tabId),O},Z=()=>{const b=T(t.list);c.value=b,g.currentTabsAutoIndex=b.length,e.nextTick(()=>{s.showId=U(b,t.active||""),M(),!g.isFirstInit&&b.length>0&&(g.isFirstInit=!0,I())})};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.onBeforeUnmount(()=>{}),e.watch([()=>t.active,()=>t.list],()=>{Z()}),e.watch(()=>s.showId,(b,_)=>{b!==_&&w(s.showId||"")});const z=()=>c.value.filter(b=>t.disabledData.indexOf(b.tabId)===-1&&t.hideData.indexOf(b.tabId)===-1),H=(b,_)=>{const O=z(),P=O.findIndex(Y=>Y.tabId===s.showId);let J=P;if(b.key==="ArrowLeft")b.preventDefault(),J=P>0?P-1:O.length-1;else if(b.key==="ArrowRight")b.preventDefault(),J=P<O.length-1?P+1:0;else if(b.key==="Home")b.preventDefault(),J=0;else if(b.key==="End")b.preventDefault(),J=O.length-1;else return;J!==P&&O[J]&&S(O[J])},S=async b=>{if(!v.value&&t.disabledData.indexOf(b.tabId)===-1&&b.tabId!==s.showId){let _=!0;if(t.checkChangeBefore){v.value=!0;try{_=await t.checkChangeBefore(b.tabId,s.showId),_=o.isBoolean(_)?_:!0}catch(O){_=!0,V(`标签切换校验异常: ${String(O)}`)}finally{v.value=!1}}_&&(s.showId=b.tabId,A(b.tabId,b))}},E=b=>{if(t.disabledData.indexOf(b.tabId)===-1&&c.value.length>t.tabMinNum){const _=[];c.value.forEach(O=>{O.tabId!==b.tabId&&_.push(O)}),c.value=_,e.nextTick(()=>{M(),s.showId=U(_,s.showId||"")}),x(o.getJsonClone(b))}else V(`${r.value.checkAddMin}${t.tabMinNum}${r.value.count}`)},f=()=>{if(c.value.length<t.tabMaxNum||t.tabMaxNum<=0){let b={};if(t.getAddInfo){try{b=t.getAddInfo()}catch(J){b={},V(`新增标签数据获取异常: ${String(J)}`)}o.isObject(b)||(b={})}const _=o.isEmpty(b.name)?g.currentTabsAutoIndex+1:0,O=C(b,_);o.isEmpty(b.name)&&(g.currentTabsAutoIndex=_);const P=o.getListClone(c.value);P.push(O),c.value=P,e.nextTick(()=>{M(),s.showId=O.tabId,N(O)})}else V(`${r.value.checkAddMax}${t.tabMaxNum}${r.value.count}`)},D=b=>{const _=b.target;u.value&&_&&(u.value.scrollLeft=_.scrollLeft)};return l({getValue:()=>s.showId}),(b,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value),id:e.unref(k)},[n.isHideTabHead?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("ul",{class:"tabs-nav",ref_key:"refElNavUl",ref:u,role:"tablist"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,O=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:`${y}-nav-${O.tabId}`,class:e.normalizeClass({"tab-nav":!0,"tab-active":O.tabId===s.showId,"tab-disabled":n.disabledData.indexOf(O.tabId)>-1||v.value})},[e.createElementVNode("a",{id:`tab_${s.keyIndex}_${O.tabId}`,class:"nav-link",href:"javascript:",role:"tab","aria-selected":O.tabId===s.showId,"aria-controls":`panel_${s.keyIndex}_${O.tabId}`,tabindex:O.tabId===s.showId?0:-1,onClick:P=>S(O),onKeydown:P=>H(P)},[e.renderSlot(b.$slots,`nav_${O.tabId}`,{data:O},()=>[e.createTextVNode(e.toDisplayString(O.name),1)])],40,Yg),n.isShowRemove&&c.value.length>n.removeReserve&&c.value.length>n.tabMinNum&&n.disabledData.indexOf(O.tabId)===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:"tab-remove",onClick:P=>E(O)},[e.createVNode(ye,{name:"close"})],8,qg)):e.createCommentVNode("",!0)],2)),[[e.vShow,n.hideData.indexOf(O.tabId)===-1]])),128)),n.isShowAdd?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass({"tab-add":!0,"tab-disabled":c.value.length>=n.tabMaxNum&&n.tabMaxNum>0})},[e.createElementVNode("a",{class:"nav-link",href:"javascript:",onClick:f},[e.renderSlot(b.$slots,"nav_add",{},()=>[e.createTextVNode(e.toDisplayString(n.addBtnText||e.unref(r).add),1)])])],2)):e.createCommentVNode("",!0),n.theme==="line"?(e.openBlock(),e.createElementBlock("li",{key:1,class:"tab-indicator",style:e.normalizeStyle({left:`${m.left}px`,width:`${m.width}px`})},null,4)):e.createCommentVNode("",!0)],512),p.isShow?(e.openBlock(),e.createBlock(fn,{key:0,isShowLeft:!1,isShowRight:!1,centerWidth:p.width,onOnScrollX:D},null,8,["centerWidth"])):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:e.normalizeClass(B.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,O=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${y}-content-${O.tabId}`,id:`panel_${s.keyIndex}_${O.tabId}`,class:e.normalizeClass({"tab-content":!0,"tab-active":O.tabId===s.showId}),role:"tabpanel","aria-labelledby":`tab_${s.keyIndex}_${O.tabId}`,tabindex:0},[e.renderSlot(b.$slots,`content_${O.tabId}`,{data:O})],10,Xg)),[[e.vShow,n.hideData.indexOf(O.tabId)===-1]])),128))],2)],10,Wg))}}),Gg={class:"weekhour-quick"},Qg=e.defineComponent({name:"ClWeekHourQuick",__name:"Quick",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onClick:n=>!0,onHoverIn:n=>!0,onHoverOut:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("weekHour");const d=`weekhour-${o.getRandom(5)}`,u=e.ref([]),s=I=>{t("onClick",I)},c=I=>{t("onHoverIn",I)},m=I=>{t("onHoverOut",I)},p=()=>{const I=[{id:"dawn",name:i.value.dawn},{id:"morning",name:i.value.morning},{id:"noon",name:i.value.noon},{id:"afternoon",name:i.value.afternoon},{id:"evening",name:i.value.evening},{id:"night",name:i.value.night}];a.isOneDay||I.push({id:"workday",name:i.value.weekday},{id:"restday",name:i.value.restDay}),u.value=I};(()=>{p()})(),e.watch(()=>[a.isOneDay,i.value],()=>{m(""),p()});const v=I=>{s(I.id)},y=I=>{c(I.id)},k=I=>{m(I.id)},F=()=>{s("all")},B=()=>{s("clean")};return(I,A)=>(e.openBlock(),e.createElementBlock("div",Gg,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,N=>(e.openBlock(),e.createBlock(Nt,{key:`${d}-${N.id}`,disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:x=>v(N),onOnHoverIn:x=>y(N),onOnHoverOut:x=>k(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["disabled","onOnClick","onOnHoverIn","onOnHoverOut"]))),128))]),e.createElementVNode("div",null,[e.createVNode(Nt,{disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:F},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).common.checkboxAll),1)]),_:1},8,["disabled"]),e.createVNode(Nt,{disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).common.clearEmpty),1)]),_:1},8,["disabled"])])]))}}),Zg={class:"weekhour-picker"},ev={key:0,class:"weekhour-interval"},tv=["onMouseenter","onClick","data-hour"],nv=["onMouseenter","onClick","data-week"],ov={key:0,class:"weekhour-interval"},av=["onMouseenter","onClick","data-week","data-hour","aria-selected"],lv=e.defineComponent({name:"ClWeekHourPicker",__name:"Picker",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onChange:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("weekHour");const u=e.inject("$WeekHourTop");u||Se.warn("ClWeekHourPicker","依赖注入 $WeekHourTop 缺失,使用默认周时配置渲染");const s=u||{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],getJsonConvertArr:K=>K},c=e.useTemplateRef("refElTable"),m=`weekhour-${o.getRandom(5)}`,p=e.reactive({hoverHour:[],hoverWeek:[],hoverItem:[],hoverItemAssist:[],selectList:[]}),g=e.ref([]),v=e.ref(["0","1","2","3","4","5","6","7","","8","9","10","11","","12","13","14","","15","16","17","","18","19","","20","21","22","23"]),y={week:[],hour:s.hour,prevValue:[],isMouseMoveStart:!1,isMouseMoveIng:!1,moveStart:{}};let k,F;const B=e.ref(null),I=()=>{k&&(clearTimeout(k),k=void 0),k=setTimeout(()=>{const{selectList:K}=p;o.isEqualArr(y.prevValue,K)||(y.prevValue=o.getArrClone(K),i("onChange",y.prevValue))},500)},A=()=>{const K=t.isOneDay?[{id:"1",name:r.value.daily}]:[{id:"1",name:r.value.monday},{id:"2",name:r.value.tuesday},{id:"3",name:r.value.wednesday},{id:"4",name:r.value.thursday},{id:"5",name:r.value.friday},{id:"6",name:r.value.saturday},{id:"7",name:r.value.sunday}],W=t.isOneDay?K.map(R=>parseInt(R.id)):s.week;y.week=W,g.value=K},N=K=>{let W=[],R=[],ae=[];return o.isEmpty(K)?{week:W,hour:R,item:ae}:(Object.keys(K).forEach(G=>{Array.isArray(K[G])&&(W.push(G.toString()),K[G].forEach(q=>{q!=null&&o.isFinite(q)&&/^(0|[1-9]\d*)$/.test(q.toString())&&(R.push(q.toString()),ae.push(`${G}-${q}`))}))}),W=o.getArrUnique(W),R=o.getArrUnique(R),ae=o.getArrUnique(ae),{week:W,hour:R,item:ae})},x=K=>{const W=N(K);p.hoverWeek=W.week,p.hoverHour=W.hour,p.hoverItem=W.item,p.hoverItemAssist=[]},V=()=>{p.hoverWeek=[],p.hoverHour=[],p.hoverItem=[],p.hoverItemAssist=[]},w=K=>{const W=N(K),R=[];W.week.forEach(ae=>{y.hour.forEach(G=>{R.push(`${ae}-${G}`)})}),W.hour.forEach(ae=>{y.week.forEach(G=>{R.push(`${G}-${ae}`)})}),p.hoverItemAssist=o.getArrUnique(R)},M=(K,W=!0)=>{if(o.isEmpty(K))p.selectList=[];else{const{selectList:R}=p,G=N(K).item,q=[],ee=[];G.forEach(j=>{o.isExistValue(R,j)?ee.push(j):q.push(j)});const $=ee.length===G.length&&ee.length>0;p.selectList=$?o.getArrRemoveById(R,G):R.concat(q)}W&&I()},C=K=>{if(!K)return null;const W={isHour:!1,isWeek:!1,isItem:!1,isValidArea:!1,isValidMove:!1,isGroup:!1,hour:-1,week:-1,x:-1,width:-1};let R;K.target?(R=K.target,W.x=K.pageX):K.parentElement&&(R=K);let ae;if(c.value&&c.value.contains(R)){W.isValidArea=!0;const G=(R.tagName||"").toLocaleLowerCase();ae=G==="th"||G==="td"?R:R.parentElement;const q=ae.className.split(" ");if(W.isHour=q.indexOf("weekhour-hour")>-1,W.isWeek=q.indexOf("weekhour-week")>-1,W.isItem=q.indexOf("weekhour-item")>-1,W.isEmpty=q.indexOf("weekhour-empty")>-1,W.isInterval=q.indexOf("weekhour-interval")>-1,W.isInterval&&(W.width=ae.clientWidth),W.isHour&&(W.type="hour",W.isGroup=!0),W.isWeek&&(W.type="week",W.isGroup=!0),W.isItem&&(W.type="item",W.isGroup=!1),W.isHour||W.isWeek||W.isItem){W.isValidMove=!0;const ee=ae.dataset;let $,j;W.isHour?($=parseInt(ee.hour),j=-1):W.isWeek?($=-1,j=parseInt(ee.week)):W.isItem&&($=parseInt(ee.hour),j=parseInt(ee.week)),W.hour=$,W.week=j}}return W.el=ae,W},T=K=>{const W=C(K);if(W&&W.isInterval){const R=de.getPrev(W.el),ae=de.getNext(W.el);W.prevInfo=C(R),W.nextInfo=C(ae)}return W},U=(K,W)=>{if(K.isEmpty&&W.isEmpty)return null;K.isEmpty&&(K.type=W.type),W.isEmpty&&(W.type=K.type);const R=23,ae=y.week.length,G={x:K.hour,y:K.week},q={x:W.hour,y:W.week};if(K.isGroup||W.isGroup){if(K.type==="week")switch(W.type){case"week":G.x=0,q.x=R;break;case"item":G.x=0;break;case"hour":G.x=0,q.y=1;break}else if(K.type==="hour")switch(W.type){case"hour":G.y=1,q.y=ae;break;case"item":G.y=1;break;case"week":G.y=1,q.x=0;break}else if(K.type==="item")switch(W.type){case"hour":q.y=1;break;case"week":q.x=0;break}}let ee,$,j,se;q.x>=G.x?(ee=G.x,$=q.x):(ee=q.x,$=G.x),q.y>=G.y?(j=G.y,se=q.y):(j=q.y,se=G.y);let me;(ee>-1||$>-1)&&(ee===-1&&(ee=0),me=o.getArrByMinMax(ee,$));let ie;return(j>-1||se>-1)&&(j===-1&&(j=1),ie=o.getArrByMinMax(j,se)),!o.isUndefined(me)&&!o.isUndefined(ie)?{x:me,y:ie}:null},Z=K=>{let W={},R={};const ae=y.moveStart.isInterval,G=K.isInterval;if(ae||G){const q=y.moveStart.x,ee=K.x;if(ae&&!G)R=K,q>ee?W=y.moveStart.prevInfo||{}:ee>q&&(W=y.moveStart.nextInfo||{});else if(!ae&&G)W=y.moveStart,q>ee?R=K.nextInfo||{}:ee>q&&(R=K.prevInfo||{});else if(ae&&G){const $=y.moveStart.width;Math.abs(q-ee)>$&&(q>ee?(W=y.moveStart.prevInfo||{},R=K.nextInfo||{}):ee>q&&(W=y.moveStart.nextInfo||{},R=K.prevInfo||{}))}}else W=y.moveStart,R=K;return{startInfo:W,endInfo:R}},z=K=>{if(!y.isMouseMoveStart){y.isMouseMoveStart=!0;const W=T(K);if(W.isValidArea&&(V(),y.moveStart=W,W.isValidMove)){const R=W.week===-1?y.week:[W.week],ae=W.hour===-1?y.hour:[W.hour];x(s.getJsonConvertArr({week:R,hour:ae}))}}},H=K=>{if(y.isMouseMoveStart){y.isMouseMoveIng=!0;const W=T(K);if(W.isValidArea){V();const R=Z(W);if(!o.isEmpty(R.startInfo)&&!o.isEmpty(R.endInfo)){const ae=U(R.startInfo,R.endInfo);if(ae){const G=s.getJsonConvertArr({week:ae.y,hour:ae.x});x(G)}}}}},S=K=>{if(y.isMouseMoveIng){V();const W=T(K);if(W.isValidArea){const R=Z(W);if(!o.isEmpty(R.startInfo)&&!o.isEmpty(R.endInfo)){const ae=U(R.startInfo,R.endInfo);if(ae&&!t.disabled){const G=s.getJsonConvertArr({week:ae.y,hour:ae.x});M(G)}}}}y.isMouseMoveStart=!1,y.moveStart={},F&&(clearTimeout(F),F=void 0),F=setTimeout(()=>{y.isMouseMoveIng=!1},50)},E=()=>{const K={start(W){let R=!1;return t.disabled||(R=!0,z(W)),R},ing:W=>{H(W)},end:W=>{S(W)}};B.value=new je.Drag(c.value,K)};(()=>{A()})(),e.onMounted(()=>{e.nextTick(()=>{E()})}),e.onBeforeUnmount(()=>{B.value&&(B.value.end(),B.value=null),k&&(clearTimeout(k),k=void 0),F&&(clearTimeout(F),F=void 0)}),e.watch(()=>[t.isOneDay,r.value],([K,W],[R,ae])=>{A(),K!==R&&(p.selectList=[],I())});const D=K=>{if(!y.isMouseMoveStart&&!t.disabled){const W=s.getJsonConvertArr({week:y.week,hour:[K]});x(W)}},h=()=>{y.isMouseMoveStart||V()},b=K=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const W=s.getJsonConvertArr({week:y.week,hour:[K]});M(W)}},_=K=>{if(!y.isMouseMoveStart&&!t.disabled){const W={};W[K]=y.hour,x(W)}},O=()=>{y.isMouseMoveStart||V()},P=K=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const W={};W[K]=y.hour,M(W)}},J=(K,W)=>{if(!y.isMouseMoveStart&&!t.disabled){const R={};R[K]=[W],x(R),w(R)}},Y=()=>{y.isMouseMoveStart||V()},ne=(K,W)=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const R={};R[K]=[W],M(R)}};return l({getWeekArr:()=>o.getArrClone(y.week),setSelected:(K,W=!1)=>{if(!y.isMouseMoveStart){const R=[];N(K).item.forEach(G=>{o.isExistValue(R,G)||R.push(G)}),p.selectList=R,W?I():y.prevValue=o.getArrClone(R)}},setHoverIn:K=>{!y.isMouseMoveStart&&!t.disabled&&x(K)},setHoverOut:()=>{y.isMouseMoveStart||V()}}),(K,W)=>(e.openBlock(),e.createElementBlock("div",Zg,[e.createElementVNode("table",{ref_key:"refElTable",ref:c,class:"table-base"},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[W[0]||(W[0]=e.createElementVNode("th",{class:"weekhour-empty"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(R,ae)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-hour-${ae}`},[R===""?(e.openBlock(),e.createElementBlock("th",ev)):(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass({"weekhour-hour":!0,"weekhour-hour-hover":p.hoverHour.indexOf(R)>-1}),onMouseenter:G=>D(R),onMouseleave:h,onClick:G=>b(R),"data-hour":R},e.toDisplayString(R),43,tv))],64))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(R,ae)=>(e.openBlock(),e.createElementBlock("tr",{key:`${m}-week-${R.id}-${ae}`},[e.createElementVNode("td",{class:e.normalizeClass({"weekhour-week":!0,"weekhour-week-hover":p.hoverWeek.indexOf(R.id)>-1}),onMouseenter:G=>_(R.id),onMouseleave:O,onClick:G=>P(R.id),"data-week":R.id},e.toDisplayString(R.name),43,nv),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(G,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-week-${ae}-hour-${q}`},[G===""?(e.openBlock(),e.createElementBlock("td",ov)):(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass({"weekhour-item":!0,"weekhour-item-hover":p.hoverItem.indexOf(`${R.id}-${G}`)>-1,"weekhour-item-assist":p.hoverItemAssist.indexOf(`${R.id}-${G}`)>-1,"weekhour-selected":p.selectList.indexOf(`${R.id}-${G}`)>-1}),onMouseenter:ee=>J(R.id,G),onMouseleave:Y,onClick:ee=>ne(R.id,G),"data-week":R.id,"data-hour":G,"aria-selected":p.selectList.indexOf(`${R.id}-${G}`)>-1},[...W[1]||(W[1]=[e.createElementVNode("i",null,null,-1)])],42,av))],64))),128))]))),128))])],512)]))}}),iv={class:"weekhour-tips"},sv={class:"weekhour-tips-title"},rv={class:"weekhour-tips-title"},cv=e.defineComponent({name:"ClWeekHourTip",__name:"Tips",setup(n){const{optPageLanguage:l,getPageLanguage:a}=Le();return a("weekHour"),(t,i)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createElementVNode("span",null,[i[0]||(i[0]=e.createElementVNode("span",{class:"weekhour-item weekhour-selected"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",sv,e.toDisplayString(e.unref(l).selected),1)]),e.createElementVNode("span",null,[i[1]||(i[1]=e.createElementVNode("span",{class:"weekhour-item"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",rv,e.toDisplayString(e.unref(l).selectedNot),1)])]))}}),uv=["id"],fi=e.defineComponent({name:"ClWeekHour",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElPicker"),u=e.reactive({valueOut:""}),s={week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],quick:{dawn:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7]},morning:{week:[1,2,3,4,5,6,7],hour:[8,9,10,11]},noon:{week:[1,2,3,4,5,6,7],hour:[12,13,14]},afternoon:{week:[1,2,3,4,5,6,7],hour:[15,16,17]},evening:{week:[1,2,3,4,5,6,7],hour:[18,19]},night:{week:[1,2,3,4,5,6,7],hour:[20,21,22,23]},workday:{week:[1,2,3,4,5],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},restday:{week:[6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},all:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},clean:{week:[],hour:[]}}},c=e.computed(()=>{let T={"panel-week-hour":!0,"weekhour-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext};return T=o.getJsonMerge(T,de.getClassNameJson(t.className)),T}),m=T=>{i("update:value",T),i("update:modelValue",T),i("onChange",T)},p=()=>{e.nextTick(()=>{i("onInit")})},g=T=>{let U={};const Z=Object.keys(T);if(!o.isEmpty(Z))if(Z.length===2&&o.isExistValue(Z,"week")&&o.isExistValue(Z,"hour")&&o.isArray(T.week)&&o.isArray(T.hour)){const z=F();T.week.forEach(H=>{z.indexOf(H)>-1&&(U[H.toString()]=T.hour)})}else U=o.getJsonClone(T);return U},v=T=>{if(!/^(0|[1-9]\d*)$/.test(T))return[];const U=parseInt(T);if(U>16777215)return[];const Z=U.toString(2),z=[];return o.getFillZero(Z,24).split("").reverse().forEach((H,S)=>{parseInt(H)===1&&S<24&&z.push(S)}),z},y=T=>{const U={},Z=T.split(",");return Z.length>7&&(Z.length=7),Z.forEach((z,H)=>{U[(H+1).toString()]=v(z)}),U},k=T=>{let U={};o.isNonEmptyString(T)&&(U=y(T)),d.value&&d.value.setSelected(U)},F=()=>{let T=s.week;return t.isOneDay&&d.value&&(T=d.value.getWeekArr()),T},B=T=>{const U={};T.forEach(S=>{const E=S.split("-"),f=E[0],D=E[1];o.isExistJsonKey(U,f)||(U[f]=[]);const h=parseInt(D);o.isFinite(h)&&U[f].push(h)});const Z={};F().forEach(S=>{Z[S.toString()]=s.hour.map(()=>0)});for(const[S,E]of Object.entries(U))Z[S]&&o.getArrUnique(E).forEach(f=>{Z[S][f]=1});const H=[];return Object.keys(Z).forEach(S=>{const E=parseInt(o.getArrClone(Z[S]).reverse().join(""),2);H.push(E)}),H.join(",")},I=()=>{u.valueOut=o.isNonEmptyString(t.value)?t.value:"",k(t.value),p()};e.onMounted(()=>{e.nextTick(()=>{I()})}),e.watch(()=>t.value,T=>{const U=o.isNonEmptyString(T)?T:"";U!==u.valueOut&&(u.valueOut=U,k(U))}),e.watch(()=>t.disabled,T=>{T&&d.value&&d.value.setHoverOut()});const A=T=>{if(!t.disabled&&o.isExistJsonKey(s.quick,T)){const U=g(s.quick[T]);d.value&&d.value.setSelected(U,!0)}},N=T=>{if(o.isExistJsonKey(s.quick,T)){const U=g(s.quick[T]);d.value&&d.value.setHoverIn(U)}},x=T=>{d.value&&d.value.setHoverOut()},V=T=>{if(!Array.isArray(T))return;const U=B(T);u.valueOut=U,m(U)};return e.provide("$WeekHourTop",{week:s.week,hour:s.hour,getJsonConvertArr:g}),l({getValue:()=>u.valueOut,getValueData:()=>o.isNonEmptyString(u.valueOut)?y(u.valueOut):{},setValue:T=>{const U=o.isNonEmptyString(T)?T:"";u.valueOut=U,k(U)}}),(T,U)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(c.value)},[e.createVNode(Qg,{disabled:n.disabled||n.isPlaintext,isOneDay:n.isOneDay,onOnClick:A,onOnHoverIn:N,onOnHoverOut:x},null,8,["disabled","isOneDay"]),e.createVNode(lv,{ref_key:"refElPicker",ref:d,disabled:n.disabled||n.isPlaintext,isOneDay:n.isOneDay,onOnChange:V},null,8,["disabled","isOneDay"]),e.createVNode(cv)],10,uv))}});function dv(n,l){switch(n){case"select":return o.isBoolean(l)?l:!1;case"radio":return!1;case"checkbox":case"selectTag":return!0;case"inputTag":return o.isBoolean(l)?l:!1;default:return!1}}function Qa(n,l){if(n!==!0)return"";let a="int";if(o.isNumber(l)){const t=Number.parseInt(String(l),10);if(t>0)switch(t.toString()){case"2":a="float2";break;case"3":a="float3";break;default:a="float"}}return a}const mv={class:"xeditable-body"},pv={class:"xeditable-form"},fv={key:1,class:"xeditable-element"},hv=["id"],gv={key:0,class:"xeditable-errmsg"},hi=e.defineComponent({name:"ClXEditable",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},classNameLabel:{type:String,default:""},type:{type:String,required:!0,validator:n=>["input","inputNumber","select","selectCascade","textarea","radio","checkbox","selectTag","inputTag","dateTime","slider","customHtml"].indexOf(n)!==-1},label:String,subUnitOptions:{type:Object,default:()=>({})},subUnitList:{type:Array,default:()=>[]},isUseOnSubmitCheck:{type:Boolean,default:!1},appendContainer:{type:String,default:""},isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isUseEllipsis:{type:Boolean,default:!1},classNameEllipsis:{type:String,default:""},isAutoTooltip:{type:Boolean,default:!0},clickEditPoint:{type:String,default:"value",validator:n=>["value","icon"].indexOf(n)!==-1},isShowEditValue:{type:Boolean,default:!0},isShowEditIcon:{type:Boolean,default:!1},editIcon:{type:String,default:"edit"},isSubmitCleanValue:{type:Boolean,default:!1},submitCallback:Function,checkValidateCallback:Function},emits:["onSubmit","onChangeOpen"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useAttrs(),d=e.useSlots(),{optPageLanguage:u,getPageLanguage:s}=Le();s("xEditable");const c=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElForm"),p=e.useTemplateRef("refElFormEdit"),g=e.useTemplateRef("refElSubmit"),v=e.useTemplateRef("refElCustom"),y=e.useTemplateRef("refElContent"),k=e.useTemplateRef("refElErrMsg"),F=t.id,B=e.reactive({keyIndex:`xeditable-${o.getRandom(8)}`,showText:"",subUnitValue:"",subUnitValueType:"",showMsg:"",isShowEmpty:!1,isBtnOperateCenter:!1}),I=e.ref({}),A=e.ref([]),N=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))"}),x={lastValue:"",runStep:"",isSubmitting:!1,submitValueDataSnapshot:null,isPendingHlight:!1,pendingValue:null,pendingOpt:null,hlightTimer:null,hlightTimer1:null,hlightTimer2:null,resizeEventCustomHtml:null,resizeEventErrMsg:null,resizeEventContent:null},V=e.computed(()=>{const{type:$}=t;return $==="input"||$==="inputNumber"||$==="select"}),w=e.computed(()=>!o.isUndefined(d.iconLabel)),M=e.computed(()=>{let $={"panel-x-editable":!0};return $=o.getJsonMerge($,de.getClassNameJson(t.className)),o.getStringByJson($," ")}),C=e.computed(()=>{const $=["xeditable-value"];return B.isShowEmpty&&$.push("xeditable-empty"),(t.isShowEditIcon||w.value)&&$.push("xeditable-edit-icon"),$.join(" ")}),T=e.computed(()=>{const $=["xeditable-value-label"],{clickEditPoint:j}=t;return j==="value"||B.isShowEmpty?$.push("dropdownLayer-arrow-anchorPoint"):$.push("xeditable-click-invalid"),$.join(" ")}),U=e.computed(()=>{const $=["xeditable-value-editIcon","dropdownLayer-arrow-anchorPoint"];return w.value&&$.push("xeditable-value-editIcon-slot"),$.join(" ")}),Z=e.computed(()=>{const $=["xeditable-ellipsis"];return $.push(t.classNameEllipsis),N.status===2&&$.push("xeditable-value-hlight"),$.join(" ")}),z=e.computed(()=>{const $=["xeditable-dropdown"];return $.push(`xeditable-dropdown-${t.type}`),$.join(" ")}),H=e.computed(()=>{const $={};return B.isBtnOperateCenter&&($["text-align"]="center"),$}),S=e.computed(()=>{const $={};switch(N.status){case 1:$["background-color"]=N.startColor;break;case 2:$["background-color"]=N.endColor;break}return $}),E=$=>{const j=de.getElementData(r);i("onSubmit",$,j)},f=$=>{e.nextTick(()=>{const j=de.getElementData(r);i("onChangeOpen",$,j)})},D=()=>{c.value&&c.value.setOpen(!1),g.value&&g.value.loadStop()},h=$=>{B.showMsg=o.isEmpty($)?"":$,e.nextTick(()=>{c.value&&c.value.calculationPosition()})},b=()=>dv(t.type,I.value.multiple),_=()=>{const $=o.getJsonClone(t.subUnitOptions);switch(t.type){case"input":{let j={isClean:!0};j=o.getJsonMerge(j,$);const se=o.isBoolean(j.isNumber)?j.isNumber:!1;B.subUnitValueType=Qa(se,j.decimal),I.value=j;break}case"inputNumber":{let j={isNumber:!0,isClean:!0};j=o.getJsonMerge(j,$);const se=Qa(!0,j.decimal)||"int";B.subUnitValueType=se,I.value=j;break}case"select":{let j={multiple:!1,placeholder:u.value.common.pleaseSelect};j=o.getJsonMerge(j,$),I.value=j;break}case"selectCascade":{let j={};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"textarea":{let j={isClean:!0};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"radio":{let j={isInline:!0,name:`${B.keyIndex}-radio`};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=j.isInline;break}case"checkbox":{let j={isInline:!1,name:`${B.keyIndex}-checkbox`};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=j.isInline;break}case"selectTag":{let j={type:"radio"};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"inputTag":{let j={multiple:!0,isAutofill:!0};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"dateTime":{let j={isDropdown:!1};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"slider":{let j={};j=o.getJsonMerge(j,$),I.value=j,B.isBtnOperateCenter=!0;break}case"customHtml":{B.isBtnOperateCenter=!0;break}}},O=($,j)=>{let se=!1,me=!1;j&&(o.isUndefined(j.label)||(se=!0),o.isUndefined(j.list)||(me=!0));let ie="",oe="",L="";switch(o.isString($)?L=$:o.isNumber($)&&o.isFinite($)&&$!==void 0&&(L=$.toString()),t.type){case"input":case"inputNumber":case"textarea":{if(!se&&L&&!o.isEmpty(L))if((t.type==="inputNumber"||t.type==="input"&&o.isBoolean(I.value.isNumber)&&I.value.isNumber)&&o.isNumber(L)){const ue=B.subUnitValueType==="float"?I.value.decimal:"";ie=o.getValueByFormat(L,B.subUnitValueType,{decimalNum:ue})}else ie=L;oe=L;break}case"selectCascade":{if(!se){const te=me?j.list:A.value,ue=o.isNonEmptyString(I.value.parentKey)?I.value.parentKey:"parentId",pe=o.isNonEmptyString(I.value.topParentValue)?I.value.topParentValue:"0";if(L&&!o.isEmpty(L)){const he={};o.isArray(te)&&te.forEach(Ie=>{!o.isUndefined(Ie)&&!o.isUndefined(Ie.id)&&(he[Ie.id.toString()]=Ie)});const Ce=[],Ee={};let xe=L.toString();for(;!o.isEmpty(xe)&&!o.isExistJsonKey(Ee,xe)&&o.isExistJsonKey(he,xe);){Ee[xe]=!0;const Ie=he[xe];o.isEmpty(Ie.name)?(o.isNumber(Ie.name)||o.isString(Ie.name))&&Ce.push(Ie.name.toString()):Ce.push(Ie.name),xe=Ie[ue]!==void 0&&Ie[ue]!==null?Ie[ue].toString():"",xe===pe&&(xe="")}Ce.reverse(),ie=Ce.join(" → ")}}oe=L;break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{const te=me?j.list:o.isArray(I.value.list)?I.value.list:A.value;if(!se&&L&&!o.isEmpty(L))if(t.type==="inputTag")ie=L;else{const ue=b(),pe=[],he=ue?L.split(","):[L.toString()],Ce=o.isArray(te)?te.filter(xe=>!o.isUndefined(xe)&&!o.isUndefined(xe.id)):te,Ee=o.getJsonByList(Ce);he.forEach(xe=>{o.isExistJsonKey(Ee,xe)&&pe.push(Ee[xe].name)}),ie=pe.join(",")}oe=L;break}case"dateTime":{se||(ie=L),oe=L;break}case"slider":{se||(ie=L),oe=L;break}}t.isSubmitCleanValue&&(oe="",m.value&&m.value.reset()),B.showText=se?j.label.toString():ie,B.subUnitValue=oe,B.isShowEmpty=o.isEmpty(B.showText),x.lastValue=B.subUnitValue,me&&(A.value=j.list)},P=()=>{x.hlightTimer&&(clearTimeout(x.hlightTimer),x.hlightTimer=null),x.hlightTimer1&&clearTimeout(x.hlightTimer1),x.hlightTimer2&&clearTimeout(x.hlightTimer2),N.status=1,e.nextTick(()=>{x.hlightTimer1=setTimeout(()=>{N.status=2},10),x.hlightTimer2=setTimeout(()=>{N.status=0},1500)})},J=()=>{x.isPendingHlight=!1,x.pendingOpt!==null&&O(x.pendingValue,x.pendingOpt||{}),x.pendingValue=null,x.pendingOpt=null,P()},Y=$=>{if(o.isBoolean($)?$={success:$}:(o.isUndefined($)||!o.isObject($))&&($={success:!1}),$.success){h(""),m.value&&m.value.reset();let j=null;x.submitValueDataSnapshot?j=x.submitValueDataSnapshot:p.value&&(j=p.value.getValueData()),o.isUndefined(j)&&(j={});let se="";const me={},ie=o.isEmpty($.data)?{}:$.data,oe=o.isUndefined(ie.label),L=!oe&&(o.isString(ie.label)||o.isNumber(ie.label));switch(me.label=L?ie.label:null,t.type){case"input":case"inputNumber":case"textarea":case"dateTime":case"slider":se=j.value;break;case"selectCascade":{oe&&(me.label=j.show||j.value||""),se=j.value?j.value.toString():"",o.isArray(ie.list)&&(me.list=ie.list);break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{if(b()&&o.isArray(j)){const te=[],ue=[];j.forEach(pe=>{te.push(pe.id),ue.push(pe.name)}),oe&&(me.label=ue.join(",")),se=t.type==="inputTag"?ue.join(","):te.join(",")}else oe&&(me.label=j.name||""),se=t.type==="inputTag"?j.name||"":j.id?j.id.toString():"";o.isArray(ie.list)&&(me.list=ie.list);break}}x.runStep!=="updateProps"?(x.pendingValue=se,x.pendingOpt=me,x.isPendingHlight=!0,D()):(O(se,me),D()),x.hlightTimer&&clearTimeout(x.hlightTimer),x.hlightTimer=setTimeout(()=>{x.hlightTimer=null,x.isPendingHlight&&(x.isPendingHlight=!1,J())},400)}else h($.msg),e.nextTick(()=>{g.value&&g.value.loadStop()});x.isSubmitting=!1},ne=()=>{_(),O(t.value,{label:t.label,list:t.subUnitList})},ce=async()=>{let $=!1;if(t.isCheckValidate&&m.value){try{$=await m.value.validate()===!0}catch(j){$=!1,Se.warn("ClXEditable","表单校验执行异常",j)}if(t.checkValidateCallback&&o.isFunction(t.checkValidateCallback)){const j=de.getElementData(r),se=Q();let me=!0;try{me=await t.checkValidateCallback(se,j)}catch(ie){me=!1,Se.warn("ClXEditable","checkValidateCallback 执行异常",ie)}me=o.isBoolean(me)?me:!0,me||($=!1)}}else $=!0;return $},X=()=>{let $=!1;return t.submitCallback&&o.isFunction(t.submitCallback)&&($=!0),$},Q=()=>{let $="";return t.type!=="customHtml"&&($=p.value?p.value.getValue():""),$},le=()=>{if(X()){const $=Q(),j=de.getElementData(r),se=t.submitCallback?t.submitCallback($,j):void 0;if(se&&o.isFunction(se.then))se.then(me=>{Y(o.isBoolean(me)?{success:me}:me)}).catch(()=>{Y({success:!1,msg:u.value.submitCallback})});else{let me={};o.isUndefined(se)?me={success:!0}:o.isBoolean(se)?me={success:se}:o.isObject(se)&&o.isBoolean(se.success)?me=se:me={success:!1,msg:u.value.submitCallback},Y(me)}}};e.onMounted(()=>{e.nextTick(()=>{ne()})}),e.onUnmounted(()=>{x.hlightTimer&&clearTimeout(x.hlightTimer),x.hlightTimer1&&clearTimeout(x.hlightTimer1),x.hlightTimer2&&clearTimeout(x.hlightTimer2),x.resizeEventCustomHtml&&(x.resizeEventCustomHtml.destroy(),x.resizeEventCustomHtml=null),x.resizeEventErrMsg&&(x.resizeEventErrMsg.destroy(),x.resizeEventErrMsg=null),x.resizeEventContent&&(x.resizeEventContent.destroy(),x.resizeEventContent=null)}),e.watch([()=>t.value,()=>t.label,()=>t.subUnitList],([$,j,se],[me,ie,oe])=>{($!==me||j!==ie||se!==oe)&&($!==me&&(x.runStep="updateProps"),O($,{label:j,list:se}))}),e.watch(()=>t.subUnitOptions,()=>{_(),O(B.subUnitValue,{label:t.label,list:t.subUnitList})});const K=()=>{x.isSubmitting||(x.isSubmitting=!0,p.value&&(x.submitValueDataSnapshot=p.value.getValueData()),ce().then($=>{if($)if(t.type==="customHtml")x.runStep="first",X()?le():(Se.warn("ClXEditable","customHtml 类型必须配置 submitCallback 才能提交"),x.isSubmitting=!1,D());else{const j=Q(),se=o.isEmpty(j);String(j)!==x.lastValue||se&&B.showText.length>0?(x.runStep="first",X()?le():(t.isUseOnSubmitCheck||Y({success:!0}),E(j))):(x.isSubmitting=!1,D())}else Y({success:!1})}).catch(()=>{Y({success:!1})}))},W=()=>{D()},R=()=>{c.value&&(c.value.checkIsShowOpen()||c.value.initCompleteOpen())},ae=()=>{x.isPendingHlight&&(x.isPendingHlight=!1,x.hlightTimer&&(clearTimeout(x.hlightTimer),x.hlightTimer=null),x.hlightTimer=setTimeout(()=>{x.hlightTimer=null,J()},150))},G=$=>{$?(x.lastValue=B.subUnitValue,h(""),e.nextTick(()=>{c.value&&c.value.checkIsShowOpen()&&(t.type==="customHtml"?(R(),v.value&&(x.resizeEventCustomHtml&&x.resizeEventCustomHtml.destroy(),x.resizeEventCustomHtml=new je.Resize({element:v.value,callback:()=>{c.value&&c.value.calculationPosition()}}))):(y.value&&(x.resizeEventContent&&x.resizeEventContent.destroy(),x.resizeEventContent=new je.Resize({element:y.value,callback:()=>{c.value&&c.value.calculationPosition()}})),k.value&&(x.resizeEventErrMsg&&x.resizeEventErrMsg.destroy(),x.resizeEventErrMsg=new je.Resize({element:k.value,callback:()=>{c.value&&c.value.calculationPosition()}}))))})):(x.isPendingHlight||(B.subUnitValue=x.lastValue),x.resizeEventCustomHtml&&(x.resizeEventCustomHtml.destroy(),x.resizeEventCustomHtml=null),x.resizeEventErrMsg&&(x.resizeEventErrMsg.destroy(),x.resizeEventErrMsg=null),x.resizeEventContent&&(x.resizeEventContent.destroy(),x.resizeEventContent=null)),f($)},q=$=>{const j=de.getParent($.target,".xeditable-click-invalid",$.currentTarget,!1);o.isUndefined(j)||($.preventDefault(),$.stopPropagation())};return l({setOnSubmitResult:$=>{t.isUseOnSubmitCheck&&o.isUndefined(t.submitCallback)&&x.isSubmitting&&Y($)}}),($,j)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:c,id:e.unref(F),classParent:M.value,classText:n.classNameLabel,classDropDown:z.value,dropdownArrowPos:"center",dropDownPos:"up",isUseDropdownArrow:!0,isCloseDestroy:!0,isInitDelayComplete:!0,appendContainer:n.appendContainer,onOnChangeOpen:G,onOnAfterLeave:ae,transitionEnter:"animated fadeIn",transitionLeave:"animated fadeOut"},{label:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(C.value)},[n.isShowEditValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(T.value),onClick:j[0]||(j[0]=se=>q(se))},[n.isUseEllipsis&&B.showText.length>0?(e.openBlock(),e.createBlock(qo,{key:0,className:Z.value,isUseTooltipAuto:n.isAutoTooltip,text:B.showText,style:e.normalizeStyle(S.value)},null,8,["className","isUseTooltipAuto","text","style"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass({"xeditable-value-hlight":N.status===2}),style:e.normalizeStyle(S.value)},e.toDisplayString(B.showText),7))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowEditIcon||w.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(U.value)},[e.renderSlot($.$slots,"iconLabel",{},()=>[e.createVNode(ye,{name:n.editIcon},null,8,["name"])])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)]),dropdown:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"refElContent",ref:y,class:"xeditable-content"},[e.createElementVNode("div",mv,[e.createElementVNode("div",pv,[e.createVNode(Xo,{ref_key:"refElForm",ref:m,isScrollToErr:!1},{default:e.withCtx(()=>[n.type==="customHtml"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElCustom",ref:v,class:"xeditable-custom"},[e.renderSlot($.$slots,"customForm")],512)):(e.openBlock(),e.createElementBlock("div",fv,[e.createVNode(Yn,{isCheck:n.isCheckValidate,checkValue:B.subUnitValue,rules:n.validateRules,msgElementId:V.value?`#${B.keyIndex}_errmsg`:""},{default:e.withCtx(()=>[n.type==="inputNumber"?(e.openBlock(),e.createBlock(Vt,e.mergeProps({key:0,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[1]||(j[1]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):n.type==="input"&&I.value.isNumber?(e.openBlock(),e.createBlock(Vt,e.mergeProps({key:1,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[2]||(j[2]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):n.type==="input"?(e.openBlock(),e.createBlock(Pe,e.mergeProps({key:2,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[3]||(j[3]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):n.type==="textarea"?(e.openBlock(),e.createBlock(qn,e.mergeProps({key:3,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[4]||(j[4]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):n.type==="select"?(e.openBlock(),e.createBlock(Sn,e.mergeProps({key:4,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[5]||(j[5]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="selectCascade"?(e.openBlock(),e.createBlock(ca,e.mergeProps({key:5,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[6]||(j[6]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="radio"?(e.openBlock(),e.createBlock(Zo,e.mergeProps({key:6,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[7]||(j[7]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="checkbox"?(e.openBlock(),e.createBlock(Jo,e.mergeProps({key:7,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[8]||(j[8]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="selectTag"?(e.openBlock(),e.createBlock(ua,e.mergeProps({key:8,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[9]||(j[9]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="inputTag"?(e.openBlock(),e.createBlock(sa,e.mergeProps({key:9,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[10]||(j[10]=se=>B.subUnitValue=se),list:A.value},I.value,{onOnInit:R}),null,16,["value","list"])):n.type==="dateTime"?(e.openBlock(),e.createBlock(la,e.mergeProps({key:10,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[11]||(j[11]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):n.type==="slider"?(e.openBlock(),e.createBlock(ta,e.mergeProps({key:11,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":j[12]||(j[12]=se=>B.subUnitValue=se)},I.value,{onOnInit:R}),null,16,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[],64))]),_:1},8,["isCheck","checkValue","rules","msgElementId"])]))]),_:3},512)]),e.createElementVNode("div",{class:"xeditable-operate",style:e.normalizeStyle(H.value)},[e.createVNode(Ze,{ref_key:"refElSubmit",ref:g,iconName:"check",isShowLoad:!0,loadPos:"zoom-out",loadTheme:"rotaryLine",onOnClick:K},null,512),e.createVNode(Ze,{iconName:"close",color:"grayLight",onOnClick:W})],4)]),V.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isCheckValidate?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElErrMsg",ref:k,id:`${B.keyIndex}_errmsg`,class:"xeditable-errmsg"},null,8,hv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.showMsg.length>0?(e.openBlock(),e.createElementBlock("div",gv,e.toDisplayString(B.showMsg),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],64)):e.createCommentVNode("",!0)],512)]),_:3},8,["id","classParent","classText","classDropDown","appendContainer"]))}}),vv={class:"notify-item"},yv={class:"notify-icon"},kv={class:"notify-text"},Sv=["innerHTML"],wv=e.defineComponent({name:"ClNotifyItem",__name:"Notify",props:{isShow:{type:Boolean},itemInfo:{}},emits:["onMouseOver","onMouseOut","onDestroy"],setup(n,{emit:l}){const a=n,t=l,i=e.ref(!1),r=e.computed(()=>({progress:!0,"progress-hide":i.value})),d=e.computed(()=>({"progress-bar":!0,"progress-countdown":!i.value})),u=e.computed(()=>{const p={},g=a.itemInfo?.delay;return o.isFinite(g)&&g>0&&(p["animation-duration"]=`${g}s`),p}),s=()=>{!a.itemInfo||!a.isShow||(i.value=!0,t("onMouseOver",a.itemInfo.key))},c=()=>{!a.itemInfo||!a.isShow||(i.value=!1,t("onMouseOut",a.itemInfo.key))},m=()=>{!a.itemInfo||!a.isShow||t("onDestroy",a.itemInfo.key)};return(p,g)=>(e.openBlock(),e.createBlock(e.Transition,{name:"notify","enter-active-class":n.itemInfo?.clsTransitionEnter,"leave-active-class":n.itemInfo?.clsTransitionLeave},{default:e.withCtx(()=>[n.isShow&&n.itemInfo?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.itemInfo.clsContainer),role:"status","aria-live":"polite",onClick:m,onMouseenter:s,onMouseleave:c},[e.createElementVNode("div",vv,[e.createElementVNode("div",yv,[e.createVNode(ye,{name:n.itemInfo.iconName},null,8,["name"])]),e.createElementVNode("div",kv,[e.createElementVNode("div",{innerHTML:n.itemInfo.text},null,8,Sv)]),e.createElementVNode("button",{type:"button",class:"notify-close",title:"关闭",onClick:e.withModifiers(m,["stop"])},[e.createVNode(ye,{name:"close"})])]),n.itemInfo.isProgress?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(d.value),style:e.normalizeStyle(u.value)},null,6)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],34)):e.createCommentVNode("",!0)]),_:1},8,["enter-active-class","leave-active-class"]))}}),Cv=["id"],Ev=2*1e3,bv=1e3,xv=2147483,Bv=e.defineComponent({name:"ClNotify",__name:"Notifys",props:{id:String,className:String,position:{type:String,default:"top-right"},isProgress:{type:Boolean,default:!1},delay:{type:Number,default:3}},setup(n,{expose:l}){const a=n,t=`notify-pos-${o.getRandom(5)}`,i=`notify-item-${o.getRandom(5)}`;let r=0;const d=a.id,u={info:"info",success:"check",error:"close-circle-fill",warn:"warn-fill"},s={type:["info","success","error","warn"],position:["top-right","top-center","bottom-right"]},c=e.useTemplateRef("refElTopParent"),m=e.ref([]),p=e.reactive({"top-right":[],"top-center":[],"bottom-right":[]}),g=e.reactive({}),v=e.reactive({});let y,k=!1;const F=e.computed(()=>{let f={"panel-notify":!0};return f=o.getJsonMerge(f,de.getClassNameJson(a.className)),f}),B=()=>document.body,I=()=>{const f=c.value;return!!f&&f.isConnected},A=()=>{if(k){Se.warn("Notify","组件已销毁,无法添加通知");return}if(I())clearTimeout(y),y=void 0;else{const f=B();f&&c.value&&f.appendChild(c.value)}},N=()=>{clearTimeout(y),y=void 0,e.nextTick(()=>{I()&&m.value.length===0&&(y=setTimeout(()=>{const f=c.value;f&&f.isConnected&&f.remove()},Ev))})},x=f=>{let D={key:"",text:"",iconName:"",isProgress:!1,delay:a.delay,clsContainer:{},clsTransitionEnter:"",clsTransitionLeave:""},h=-1;if(!o.isNonEmptyString(f))return{info:D,inx:h,pos:""};const b=f.split("_item_")[0].replace("notify_",""),_=p[b];return o.isUndefined(_)||_.forEach((O,P)=>{O.key===f&&(D=O,h=P)}),{info:D,inx:h,pos:b}},V=f=>{if(x(f).inx>-1){const h=m.value.indexOf(f);h>-1&&m.value.splice(h,1),v[f]=setTimeout(()=>{delete v[f];const b=x(f);b.inx>-1&&p[b.pos].splice(b.inx,1),!o.isUndefined(p[b.pos])&&p[b.pos].length===0&&m.value.length===0&&N()},bv)}},w=(f,D)=>{const h=Math.min(D,xv);g[f]=setTimeout(()=>{delete g[f],V(f)},h*1e3)},M=f=>{let D="animated fadeInDown",h="animated fadeOutRight";switch(f){case"top-center":D="animated fadeInDown",h="animated fadeOut";break;case"bottom-right":D="animated fadeInUp",h="animated fadeOutRight";break}return{clsTransitionEnter:D,clsTransitionLeave:h}},C=f=>{if(k){Se.warn("Notify","组件已销毁,无法添加通知");return}if(!o.isEmpty(f)&&o.isNonEmptyString(f.msg)){A();const D=o.isExistValue(s.type,f.type||"")&&f.type?f.type:s.type[0];let h=a.position;if(o.isNonEmptyString(f.position)&&(h=f.position),!o.isExistValue(s.position,h)){const X=o.isString(h)?h:"未知";Se.warn("Notify",`position 无效(${X}),已回退为 ${s.position[0]}`),h=s.position[0]}const b=f.isProgress;let _=a.isProgress;o.isBoolean(b)&&b!==void 0&&(_=b);const O=f.delay,P=o.isFinite(O)&&O!==void 0&&O>0?Number(O):a.delay;let J={"notify-container":!0,"notify-progress":_};J[`notify-${D}`]=!0,o.isNonEmptyString(f.className)&&(J=o.getJsonMerge(J,de.getClassNameJson(f.className)));const Y=M(h);r+=1;const ne=`notify_${h}_item_${r}`,ce={key:ne,text:o.encodeHTML(f.msg),iconName:u[D],isProgress:_,delay:P,clsContainer:J,clsTransitionEnter:Y.clsTransitionEnter,clsTransitionLeave:Y.clsTransitionLeave};p[h].push(ce),e.nextTick(()=>{x(ce.key).inx>-1&&(m.value.push(ce.key),w(ne,ce.delay))})}else Se.warn("Notify","通知内容为空,已忽略")},T=()=>{Object.keys(g).forEach(f=>{clearTimeout(g[f]),delete g[f]}),Object.keys(v).forEach(f=>{clearTimeout(v[f]),delete v[f]}),clearTimeout(y),y=void 0};e.onBeforeUnmount(()=>{k=!0,T();const f=c.value;f&&f.isConnected&&f.remove()});const U=f=>{g[f]&&(clearTimeout(g[f]),delete g[f])},Z=f=>{const D=x(f);D.inx>-1&&w(f,D.info.delay)},z=f=>{g[f]&&(clearTimeout(g[f]),delete g[f]),V(f)};return l({addCustom:f=>{C(f)},clear:()=>{s.position.forEach(f=>{p[f]=[]}),m.value=[],T(),N()},destroy:()=>{k=!0,s.position.forEach(f=>{p[f]=[]}),m.value=[],T(),N()}}),(f,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value),ref_key:"refElTopParent",ref:c,id:e.unref(d)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p,(h,b,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${t}-${b}-${_}`},[h.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`notify-wrapper notify-${b}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h,O=>(e.openBlock(),e.createBlock(wv,{key:`${i}-${O.key}`,isShow:m.value.includes(O.key),itemInfo:O,onOnDestroy:z,onOnMouseOver:U,onOnMouseOut:Z},null,8,["isShow","itemInfo"]))),128))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,Cv))}}),gi=(n={})=>{const l=e.createApp(Bv,n),a=document.createElement("div"),t=l.mount(a),i=t;return{info:(r,d={})=>{const u=o.getJsonMerge(d,{type:"info",msg:r});i.addCustom(u)},success:(r,d={})=>{const u=o.getJsonMerge(d,{type:"success",msg:r});i.addCustom(u)},error:(r,d={})=>{const u=o.getJsonMerge(d,{type:"error",msg:r});i.addCustom(u)},warn:(r,d={})=>{const u=o.getJsonMerge(d,{type:"warn",msg:r});i.addCustom(u)},custom:r=>{i.addCustom(r)},clear:()=>{i.clear()},destroy:()=>{const r=t.$el||null;i.destroy(),l.unmount(),r&&r.parentNode&&r.parentNode.removeChild(r)}}},Iv=["id","aria-label"],Dv={class:"alert-body"},Tv={key:0,class:"alert-icon"},Nv={key:2,class:"alert-title"},Vv={key:4,class:"alert-text"},Mv=["innerHTML"],Ov={key:1},_v={key:6,class:"alert-operate"},Av=2*1e3,Lv=e.defineComponent({name:"ClAlert",__name:"Alert",props:{id:String,width:{type:String,default:"500px"},isBackClick:{type:Boolean,default:!0},submitLabel:{type:String,default:"确定"},submitColor:{type:String,default:"default"},cancelLabel:{type:String,default:"取消"},cancelColor:{type:String,default:"grayLight"},classTransitionEnter:{type:String,default:"animated zoomIn"},classTransitionLeave:String},setup(n,{expose:l}){const a=n,t=a.id||`alert-${o.getRandom(5)}`,i=e.useTemplateRef("refElTopParent"),r=e.useTemplateRef("refElTransition"),d=e.useTemplateRef("refElBtnSubmit"),u=e.reactive({isLoadBackClick:!0}),s=e.reactive({id:t,width:a.width,isBackClick:!1,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:"",submitIcon:"",submitColor:"default",cancelLabel:"",cancelIcon:"",cancelColor:"grayLight",isShowSubmit:!1,isShowSubmitLoad:!1,isShowCancel:!1,isShowOperate:!1,isShow:!1}),c=e.reactive({submit:null,cancel:null});let m=null,p=!1;const g=e.ref(!1);let v=null;const y={info:{name:"info-circle",color:"var(--cl-primary, #1088f0)"},success:{name:"check-circle",color:"var(--cl-success, #12b76a)"},error:{name:"exclamation-circle",color:"var(--cl-danger, #ee0a24)"},warn:{name:"warn-fill",color:"#fbe300"},doubt:{name:"question-circle",color:"#0ac5c5"}},k=()=>document.querySelector("body"),F=()=>document.getElementById(s.id),B=()=>F()!==null,I=()=>{if(B())(m!==null||p)&&(m!==null&&(clearTimeout(m),m=null),p=!1);else{if(!i.value){Se.warn("ClAlert","refElTopParent 未初始化,无法创建容器");return}k()?.appendChild(i.value)}},A=()=>{p=!0,m!==null&&(clearTimeout(m),m=null),e.nextTick(()=>{p=!1,B()&&!s.isShow&&(m=setTimeout(()=>{const S=F();S&&k()?.removeChild(S),m=null},Av))})},N=S=>{if(!S||typeof S!="object"||Array.isArray(S))return{id:t,width:a.width,isBackClick:a.isBackClick,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:a.submitLabel,submitIcon:"",submitColor:a.submitColor,isShowSubmit:!1,isShowSubmitLoad:!1,cancelLabel:a.cancelLabel,cancelIcon:"",cancelColor:a.cancelColor,isShowCancel:!1,isShowOperate:!1,isShow:!1};const E=o.isBoolean(S.isBackClick)?S.isBackClick:a.isBackClick,f=o.isNonEmptyString(S.id)?S.id:t,D=o.isNonEmptyString(S.width)?S.width:a.width;let h="",b="",_="";if(!o.isEmpty(S.iconType)){const G=Object.prototype.hasOwnProperty.call(y,S.iconType)?y[S.iconType]:void 0;G&&(b=G.name,_=G.color)}o.isEmpty(b)&&o.isNonEmptyString(S.icon)&&(h=S.icon);const O=!o.isEmpty(b)||!o.isEmpty(h),P=o.isNonEmptyString(S.title),J=o.isNonEmptyString(S.html),Y=o.isNonEmptyString(S.text)||J,ne=o.isEmpty(S.submitLabel)?a.submitLabel:S.submitLabel,ce=o.isEmpty(S.submitColor)?a.submitColor:S.submitColor,X=o.isEmpty(S.cancelLabel)?a.cancelLabel:S.cancelLabel,Q=o.isEmpty(S.cancelColor)?a.cancelColor:S.cancelColor,le=o.isBoolean(S.isSubmit)?S.isSubmit:!1,K=o.isBoolean(S.isLoad)?S.isLoad:!1,W=o.isBoolean(S.isCancel)?S.isCancel:!1,R=le||W,ae=P||Y;return{id:f,width:D,isBackClick:E,iconClass:h,iconName:b,iconColor:_,isShowIcon:O,title:P?S.title:"",isShowTitle:P,text:o.isNonEmptyString(S.text)?S.text:"",html:J?S.html:"",isShowTextHtml:J,isShowText:Y,submitLabel:ne,submitIcon:o.isNonEmptyString(S.submitIcon)?S.submitIcon:"",submitColor:ce,isShowSubmit:le,isShowSubmitLoad:K,cancelLabel:X,cancelIcon:o.isNonEmptyString(S.cancelIcon)?S.cancelIcon:"",cancelColor:Q,isShowCancel:W,isShowOperate:R,isShow:ae}},x=S=>{if(s.isShow&&s.isShowSubmitLoad)return;const E=N(S);E.isShow?(I(),g.value=!1,Object.assign(s,E),c.submit=S.submitCallback??null,c.cancel=S.cancelCallback??null,document.addEventListener("keydown",w),v=document.activeElement,i.value?.focus({preventScroll:!0}),r.value?.show()):(c.submit=null,c.cancel=null,r.value?.hide(),s.isShow=!1)},V=()=>{s.isShowSubmitLoad&&d.value?.loadStop(),document.removeEventListener("keydown",w),v&&typeof v.focus=="function"&&(v.focus(),v=null),g.value=!1,r.value?.hide(),u.isLoadBackClick=!0,s.isShowSubmitLoad=!1,s.isShow=!1},w=S=>{S.key==="Escape"&&!s.isShowSubmitLoad?T():S.key==="Enter"&&s.isShowSubmit&&!s.isShowSubmitLoad&&C()},M=async()=>{if(g.value)return;V();const S=c.cancel;if(S&&o.isFunction(S))try{await S()}catch(E){Se.error("ClAlert","cancel 回调执行异常:",E)}};e.onBeforeUnmount(()=>{if(document.removeEventListener("keydown",w),v&&typeof v.focus=="function"&&(v.focus(),v=null),p=!1,m!==null&&(clearTimeout(m),m=null),B()){const S=F();S&&k()?.removeChild(S)}}),e.watch(()=>s.isShow,S=>{S||A()});const C=async()=>{if(g.value)return;const S=c.submit;if(S&&o.isFunction(S)){s.isShowSubmitLoad&&(u.isLoadBackClick=!1),g.value=!0;try{await S()}catch(E){Se.error("ClAlert","submit 回调执行异常:",E),V()}}else V()},T=async()=>{await M()},U=async()=>{await M()};return l({open:S=>{x(S)},hide:()=>{V()},reset:()=>{g.value=!1,s.isShowSubmitLoad&&(d.value?.loadStop(),s.isShowSubmitLoad=!1)}}),(S,E)=>(e.openBlock(),e.createElementBlock("div",{id:s.id,class:"panel-alert",ref_key:"refElTopParent",ref:i,role:"alertdialog","aria-modal":"true",tabindex:"-1","aria-label":s.title||s.text||"提示"},[e.createVNode(Al,{isBackClick:s.isBackClick&&u.isLoadBackClick&&!g.value,classTransitionEnter:a.classTransitionEnter,classTransitionLeave:a.classTransitionLeave,width:s.width,onOnClickBack:U,ref_key:"refElTransition",ref:r},{default:e.withCtx(()=>[e.createElementVNode("div",Dv,[s.isShowIcon?(e.openBlock(),e.createElementBlock("div",Tv,[e.createVNode(ye,{name:s.iconName,color:s.iconColor,className:s.iconClass},null,8,["name","color","className"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),s.isShowTitle?(e.openBlock(),e.createElementBlock("div",Nv,e.toDisplayString(s.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),s.isShowText?(e.openBlock(),e.createElementBlock("div",Vv,[s.isShowTextHtml?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:s.html},null,8,Mv)):(e.openBlock(),e.createElementBlock("div",Ov,e.toDisplayString(s.text),1))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),s.isShowOperate?(e.openBlock(),e.createElementBlock("div",_v,[s.isShowSubmit?(e.openBlock(),e.createBlock(Ze,{key:0,ref_key:"refElBtnSubmit",ref:d,className:"alert-submit",isShowLoad:s.isShowSubmitLoad,isShowBackDrop:!0,label:s.submitLabel,icon:s.submitIcon,color:s.submitColor,onOnClick:C},null,8,["isShowLoad","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),s.isShowCancel?(e.openBlock(),e.createBlock(Ze,{key:2,className:"alert-cancel",disabled:g.value,label:s.cancelLabel,icon:s.cancelIcon,color:s.cancelColor,onOnClick:T},null,8,["disabled","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))])]),_:1},8,["isBackClick","classTransitionEnter","classTransitionLeave","width"])],8,Iv))}}),vi=(n={})=>{const l=e.createApp(Lv,n),a=document.createElement("div"),t=l.mount(a);return{alert:(i,r={})=>{const d=o.getJsonMerge({isSubmit:!0},r,{title:i,isCancel:!1,cancelCallback:null});t.open(d)},confirm:(i,r={})=>{const d=o.getJsonMerge({isSubmit:!0,isCancel:!0},r,{title:i});t.open(d)},custom:i=>{t.open(i)},close:()=>{t.hide()},reset:()=>{t.reset()},destroy:()=>{t.hide();const i=t.$el||null;l.unmount(),i&&i.parentNode&&i.parentNode.removeChild(i)}}},$v={class:"preview-image"},Fv={class:"preview-image-actions-container"},Pv={key:0},Rv={key:2,class:"image-num"},Hv={key:0,class:"preview-image-container"},Uv=["src"],zv={key:0,class:"preview-image-loading"},Jv=e.defineComponent({name:"ClPreviewImage",__name:"Image",props:{imageInx:{type:Number,default:0},list:{type:Array,default:()=>[]},isLoop:{type:Boolean,default:!1},isShowCopy:{type:Boolean,default:!0}},setup(n,{expose:l}){const a=n,t=e.inject("$PreviewTop");let i=null;const r=e.reactive({isShow:!1,isSwitch:!1,isLoading:!1,src:"",isFading:!1,scale:1,scaleRatio:1.4,rotate:0,rotateAngle:90,showIndex:a.imageInx}),d=e.computed(()=>{const x={},V=[];return V.push(`scale(${r.scale})`),V.push(`rotate(${r.rotate}deg)`),x.transform=V.join(" "),x.opacity=r.isFading?"0":"1",x}),u=()=>{if(!t)return;const{showIndex:x}=r,V=a.list,w=o.isArray(V)?V.length:0,M=w>0&&x>=0&&x<w;if(r.isShow=M,M){i&&clearTimeout(i);const C=r.isFading?200:0;setTimeout(()=>{r.isSwitch=!0,r.src=a.list[x],t.setPrevNextStatus(x,w),i=setTimeout(()=>{r.isLoading=!0},150)},C)}else r.isSwitch=!1},s=()=>{i&&(clearTimeout(i),i=null),r.isFading=!1,r.isLoading=!1},c=()=>{i&&(clearTimeout(i),i=null),r.isFading=!1,r.isLoading=!1},m=()=>{const{scale:x,scaleRatio:V}=r,w=x*V;w<7&&(r.scale=Number(w.toFixed(3)))},p=()=>{const{scale:x,scaleRatio:V}=r,w=x/V;w>.18&&(r.scale=Number(w.toFixed(3)))},g=()=>{const{rotate:x,rotateAngle:V}=r;r.rotate=(x-V)%360},v=()=>{const{rotate:x,rotateAngle:V}=r;r.rotate=(x+V)%360},y=()=>{r.scale=1,r.rotate=0};return l({show:x=>{r.showIndex=x,u()},hide:()=>{r.scale=1,r.rotate=0,r.isFading=!1,r.isShow=!1},prev:()=>{const{showIndex:x}=r;let V=-1;x>0?V=x-1:a.isLoop&&(V=a.list.length-1),V>-1&&(r.isFading=!0,r.showIndex=V,r.scale=1,r.rotate=0,u())},next:()=>{const{showIndex:x}=r;let V=-1;x<a.list.length-1?V=x+1:a.isLoop&&(V=0),V>-1&&(r.isFading=!0,r.showIndex=V,r.scale=1,r.rotate=0,u())},large:()=>{m()},small:()=>{p()}}),(x,V)=>(e.openBlock(),e.createElementBlock("div",$v,[r.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"preview-btn":!0,"preview-image-actions":!0,"preview-image-num":n.list.length>1})},[e.createElementVNode("div",Fv,[e.createElementVNode("span",{onClick:e.withModifiers(m,["stop"])},[e.createVNode(ye,{name:"search-plus"})]),e.createElementVNode("span",{onClick:e.withModifiers(p,["stop"])},[e.createVNode(ye,{name:"search-minus"})]),e.createElementVNode("span",{onClick:e.withModifiers(g,["stop"])},[e.createVNode(ye,{name:"rotate-left"})]),e.createElementVNode("span",{onClick:e.withModifiers(v,["stop"])},[e.createVNode(ye,{name:"rotate-right"})]),e.createElementVNode("span",{onClick:e.withModifiers(y,["stop"])},[e.createVNode(ye,{name:"restore"})]),n.isShowCopy?(e.openBlock(),e.createElementBlock("span",Pv,[e.createVNode(hn,{textLabel:r.src},null,8,["textLabel"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.list.length>1?(e.openBlock(),e.createElementBlock("span",Rv,e.toDisplayString(r.showIndex+1)+"/"+e.toDisplayString(n.list.length),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(e.Transition,{"enter-active-class":"preview-image-enter","leave-active-class":"preview-image-leave"},{default:e.withCtx(()=>[r.isShow?e.withDirectives((e.openBlock(),e.createElementBlock("div",Hv,[e.withDirectives(e.createElementVNode("img",{src:r.src,style:e.normalizeStyle(d.value),onLoad:s,onError:c},null,44,Uv),[[e.vShow,!r.isLoading]]),r.isLoading?(e.openBlock(),e.createElementBlock("div",zv,[...V[0]||(V[0]=[e.createElementVNode("div",{class:"preview-image-spinner"},null,-1)])])):e.createCommentVNode("",!0)],512)),[[e.vShow,r.isSwitch]]):e.createCommentVNode("",!0)]),_:1})]))}}),Kv=["id"],Wv=e.defineComponent({name:"ClPreview",__name:"Index",setup(n,{expose:l}){const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./Video-Btnven4K.cjs"))),t=e.useTemplateRef("refElTopParent"),i=e.useTemplateRef("refElImage"),r=e.useTemplateRef("refElVideo"),d=e.reactive({elId:`preview-${o.getRandom(5)}`,className:"",type:"",list:[],isLoop:!1,isShowPrevNext:!1,isDisablePrev:!1,isDisableNext:!1,isShowCopy:!0});let u=null;const s=e.computed(()=>{let T={"panel-preview":!0};return T=o.getJsonMerge(T,de.getClassNameJson(d.className)),T}),c=e.computed(()=>d.type==="image"),m=e.computed(()=>d.type==="video"),p=()=>document.querySelector("body"),g=()=>document.querySelector("body>.panel-preview"),v=()=>{const T=g();return!o.isUndefined(T)},y=()=>{v()?(clearTimeout(u),u=null):(document.body.className=de.getAddClass(document.body.className,"preview-open"),p().appendChild(t.value))},k=T=>{let U=T.keyCode;if(!o.isUndefined(U))switch(U=U.toString(),U){case"38":T.preventDefault(),T.stopPropagation();break;case"40":T.preventDefault(),T.stopPropagation();break}},F=T=>{let U=T.keyCode;if(!o.isUndefined(U))switch(U=U.toString(),U){case"27":x();break;case"37":V();break;case"38":T.preventDefault(),T.stopPropagation(),c.value?i.value?.large():m.value&&V();break;case"39":w();break;case"40":T.preventDefault(),T.stopPropagation(),c.value?i.value?.small():m.value&&w();break}},B=()=>{window.removeEventListener("keydown",k),window.removeEventListener("keyup",F)},I=()=>{window.addEventListener("keydown",k),window.addEventListener("keyup",F)},A=(T=!1)=>{v()&&(u=setTimeout(()=>{const U=g();U&&(document.body.className=de.getRemoveClass(document.body.className,"preview-open"),p().removeChild(U)),B()},T?2*1e3:0))},N=T=>{if(!o.isEmpty(T)&&!o.isEmpty(T.src)){y(),o.isNonEmptyString(T.id)&&(d.elId=T.id),d.className=o.isNonEmptyString(T.className)?T.className:"";let U=[];const Z=T.src;o.isArray(Z)?U=Z:o.isString(Z)&&(U=[Z]),d.type=T.type,d.list=U,d.isLoop=o.isBoolean(T.isLoop)?T.isLoop:!1,d.isShowCopy=o.isBoolean(T.isShowCopy)?T.isShowCopy:!0;const z=o.isEmpty(T.showIndex)?0:T.showIndex;I(),e.nextTick(()=>{c.value?i.value?.show(z):m.value&&r.value?.show(z)})}};e.onBeforeUnmount(()=>{clearTimeout(u),u=null,B();const T=g();T&&(document.body.className=de.getRemoveClass(document.body.className,"preview-open"),p().removeChild(T))});const x=()=>{c.value?i.value?.hide():m.value&&r.value?.hide(),A()},V=()=>{d.isDisablePrev||(c.value?i.value?.prev():m.value&&r.value?.prev())},w=()=>{d.isDisableNext||(c.value?i.value?.next():m.value&&r.value?.next())};return e.provide("$PreviewTop",{setPrevNextStatus:(T,U)=>{const Z=U>1;if(d.isShowPrevNext=Z,Z){const{isLoop:z}=d;d.isDisablePrev=z?!1:T===0,d.isDisableNext=z?!1:T===U-1}}}),l({show:T=>{N(T)},destroy:()=>{A(),d.elId=`preview-${o.getRandom(5)}`,d.className="",d.type="",d.list=[],d.isLoop=!1,d.isShowPrevNext=!1,d.isDisablePrev=!1,d.isDisableNext=!1}}),(T,U)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:d.elId,class:e.normalizeClass(s.value)},[e.createVNode(At,{teleportTarget:"self",show:!0,background:"var(--cl-overlay, rgba(0, 0, 0, 0.5))",zIndex:0,isLockScroll:!1,duration:0}),e.createElementVNode("div",{class:"preview-btn preview-close",onClick:e.withModifiers(x,["stop"])},[e.createVNode(ye,{name:"close"})]),d.isShowPrevNext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-prev":!0,"preview-btn-disable":d.isDisablePrev}),onClick:e.withModifiers(V,["stop"])},[e.createVNode(ye,{name:"angle-left"})],2),e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-next":!0,"preview-btn-disable":d.isDisableNext}),onClick:e.withModifiers(w,["stop"])},[e.createVNode(ye,{name:"angle-right"})],2)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.value?(e.openBlock(),e.createBlock(Jv,{key:2,ref_key:"refElImage",ref:i,isLoop:d.isLoop,list:d.list,isShowCopy:d.isShowCopy},null,8,["isLoop","list","isShowCopy"])):m.value?(e.openBlock(),e.createBlock(e.unref(a),{key:3,ref_key:"refElVideo",ref:r,isLoop:d.isLoop,list:d.list},null,8,["isLoop","list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,Kv))}}),yi=(n={})=>{const l=e.createApp(Wv,n),a=document.createElement("div"),t=l.mount(a);return{image:(i,r={})=>{const d=o.getJsonMerge(r,{type:"image",src:i});t.show(d)},video:(i,r={})=>{const d=o.getJsonMerge(r,{type:"video",src:i});t.show(d)},show:i=>{t.show(i)},destroy:()=>{t.destroy(),l.unmount(),a.parentNode&&a.parentNode.removeChild(a)}}},jv=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"}));let Vn=null;const Yv=()=>(Vn||(Vn=Promise.resolve().then(()=>require("./index.hljs-BX3KMdv8.cjs")).catch(n=>{throw Vn=null,n})),Vn),qv={bind:(n,l)=>{Yv().then(a=>{n.isConnected&&a.highlight(n,l.value)}).catch(()=>{})}},Xv="clCodeHighlight",Gv=()=>({deep:!0,beforeMount:qv.bind}),ki=Object.freeze(Object.defineProperty({__proto__:null,directive:Gv,name:Xv},Symbol.toStringTag,{value:"Module"})),Qv="cllazy",Zv=n=>{const l=new Tl(n);return{deep:!0,mounted:l.mount.bind(l),updated:l.update.bind(l),unmounted:l.unmount.bind(l)}},ey=Object.freeze(Object.defineProperty({__proto__:null,directive:Zv,name:Qv},Symbol.toStringTag,{value:"Module"}));let Mn=null;const ty=(n={})=>{if(Mn)return Mn;const l=e.createApp(Go,n),a=document.createElement("div"),t=l.mount(a);return Mn={show:(i,r)=>{t.show(i,r)},hide:(i=1e3)=>{t.hide(i)}},Mn};function ny(n){return l=>{n.forEach(a=>{l.component(a.name,a)})}}function Si(n,l){return(a,t={})=>{Object.keys(n).forEach(r=>{a.directive(n[r].name,n[r].directive(t[r]||{}))});const i={};Object.keys(l).forEach(r=>{i[r]=l[r](t[r]||{})}),o.isObject(t.globalsOption)&&wt.setGlobalConfig(t.globalsOption),a.provide("$ClGlobals",i)}}const wi={lazyImage:ey},Ci={clipboard:Ko,loadScreen:ty,languagePack:Hl,validate:Dl},oy=[At,Pe,ye,rt,Ol,_l,Gt,Go,$l,ta,Ze,tl,zo,il,rl,ll,Nt,Qo,gn,Zo,ea,Jo,mt,qt,Ll,cl,El,bl,qo,xl,Xo,Kn,Bl,Il,Yn,Wn,Vl,Vt,pn,Ml,Xt,qn,Fl,Xn,Pl,Rl,hn],ay=(n={})=>{let l=null,a=null;const t=()=>l?Promise.resolve(l):(a||(a=Promise.resolve().then(()=>jv).then(i=>(l=i.default(n),l))),a);return{show:i=>t().then(r=>r.show(i)),image:i=>t().then(r=>r.image(i)),video:i=>t().then(r=>r.video(i)),destroy:()=>t().then(i=>i.destroy())}},Ei={...wi,codeHighlight:ki,waves:al,tooltip:sl},bi={...Ci,notify:gi,alert:vi,preview:ay},ly=Si(Ei,bi),iy=[Ul,zl,Jl,jl,na,Gl,la,Ql,Zl,ei,ia,ti,oa,ni,sa,oi,aa,ra,fn,Sn,ca,ai,ua,ii,ri,ui,di,mi,pi,da,fi,hi],sy=[...oy,...iy],ry={...wi,...Ei},cy={...Ci,...bi},uy=(n,l={})=>{ny(sy)(n),Si(ry,cy)(n,l)};exports.ClAnchorNav=Ul;exports.ClBadge=qt;exports.ClBreadcrumb=tl;exports.ClButton=Ze;exports.ClCalendar=zl;exports.ClCallout=ll;exports.ClCard=zo;exports.ClCardColor=il;exports.ClCheckbox=Jo;exports.ClCheckboxOne=mt;exports.ClClipboard=hn;exports.ClCodeLegend=Jl;exports.ClCollapse=rl;exports.ClColorPicker=jl;exports.ClCountDown=cl;exports.ClCropper=na;exports.ClCropperPreview=Gl;exports.ClDarg=El;exports.ClDateTime=la;exports.ClDivider=bl;exports.ClDropdownMenu=Ql;exports.ClDropdownMenuItem=Zl;exports.ClDropdownPopup=ei;exports.ClEcharts=ia;exports.ClEchartsLineAxisTag=ti;exports.ClEllipsis=qo;exports.ClEmpty=xl;exports.ClFileUpload=oa;exports.ClForm=Xo;exports.ClFormGroupBtns=Bl;exports.ClFormGroupHorizontal=Kn;exports.ClFormGroupVertical=Il;exports.ClFormValidate=Yn;exports.ClFramePhone=ni;exports.ClIconFont=ye;exports.ClImage=Wn;exports.ClInput=Pe;exports.ClInputCaptcha=Vl;exports.ClInputNumber=Vt;exports.ClInputNumberStepper=pn;exports.ClInputPassword=Ml;exports.ClInputSearch=Xt;exports.ClInputTag=sa;exports.ClInputTextarea=qn;exports.ClLink=Nt;exports.ClLoad=rt;exports.ClLoadFullCenter=Ol;exports.ClLoadIng=Gt;exports.ClLoadScreen=Go;exports.ClLoadWarp=_l;exports.ClModal=Qo;exports.ClNumberRoll=Ll;exports.ClOverlay=At;exports.ClPaginate=ra;exports.ClPortlet=oi;exports.ClPreviewExample=aa;exports.ClProgress=$l;exports.ClRadio=Zo;exports.ClRadioOne=ea;exports.ClScrollXFence=fn;exports.ClSelect=Sn;exports.ClSelectCascade=ca;exports.ClSelectMove=ai;exports.ClSelectTag=ua;exports.ClSelectTree=ii;exports.ClSideMenu=ri;exports.ClSlider=ta;exports.ClSwitchery=Fl;exports.ClTable=ui;exports.ClTableEdit=di;exports.ClTableSimple=mi;exports.ClTabs=pi;exports.ClTags=Xn;exports.ClTransitionSlideUpDown=gn;exports.ClTree=da;exports.ClWaterfall=Pl;exports.ClWaterfallImage=Rl;exports.ClWeekHour=fi;exports.ClXEditable=hi;exports.install=uy;exports.installCore=ly;exports.languagePack=Hl;exports.useAlert=vi;exports.useClipboard=Ko;exports.useCodeHighlight=ki;exports.useNotify=gi;exports.usePreview=yi;exports.useTooltip=sl;exports.useWaves=al;
6
+ */function Ia(n,l){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);l&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),a.push.apply(a,t)}return a}function vt(n){for(var l=1;l<arguments.length;l++){var a=arguments[l]!=null?arguments[l]:{};l%2?Ia(Object(a),!0).forEach(function(t){Gs(n,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):Ia(Object(a)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(a,t))})}return n}function On(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(l){return typeof l}:On=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},On(n)}function Gs(n,l,a){return l in n?Object.defineProperty(n,l,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[l]=a,n}function Ct(){return Ct=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var a=arguments[l];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(n[t]=a[t])}return n},Ct.apply(this,arguments)}function Qs(n,l){if(n==null)return{};var a={},t=Object.keys(n),i,r;for(r=0;r<t.length;r++)i=t[r],!(l.indexOf(i)>=0)&&(a[i]=n[i]);return a}function Zs(n,l){if(n==null)return{};var a=Qs(n,l),t,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(i=0;i<r.length;i++)t=r[i],!(l.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(a[t]=n[t])}return a}var er="1.15.0";function Et(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var bt=Et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),vn=Et(/Edge/i),Da=Et(/firefox/i),rn=Et(/safari/i)&&!Et(/chrome/i)&&!Et(/android/i),ul=Et(/iP(ad|od|hone)/i),dl=Et(/chrome/i)&&Et(/android/i),ml={capture:!1,passive:!1};function Ae(n,l,a){n.addEventListener(l,a,!bt&&ml)}function Oe(n,l,a){n.removeEventListener(l,a,!bt&&ml)}function Rn(n,l){if(l){if(l[0]===">"&&(l=l.substring(1)),n)try{if(n.matches)return n.matches(l);if(n.msMatchesSelector)return n.msMatchesSelector(l);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(l)}catch{return!1}return!1}}function tr(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function gt(n,l,a,t){if(n){a=a||document;do{if(l!=null&&(l[0]===">"?n.parentNode===a&&Rn(n,l):Rn(n,l))||t&&n===a)return n;if(n===a)break}while(n=tr(n))}return null}var Ta=/\s+/g;function lt(n,l,a){if(n&&l)if(n.classList)n.classList[a?"add":"remove"](l);else{var t=(" "+n.className+" ").replace(Ta," ").replace(" "+l+" "," ");n.className=(t+(a?" "+l:"")).replace(Ta," ")}}function Ne(n,l,a){var t=n&&n.style;if(t){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(a=n.currentStyle),l===void 0?a:a[l];!(l in t)&&l.indexOf("webkit")===-1&&(l="-webkit-"+l),t[l]=a+(typeof a=="string"?"":"px")}}function Wt(n,l){var a="";if(typeof n=="string")a=n;else do{var t=Ne(n,"transform");t&&t!=="none"&&(a=t+" "+a)}while(!l&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(a)}function pl(n,l,a){if(n){var t=n.getElementsByTagName(l),i=0,r=t.length;if(a)for(;i<r;i++)a(t[i],i);return t}return[]}function rt(){var n=document.scrollingElement;return n||document.documentElement}function je(n,l,a,t,i){if(!(!n.getBoundingClientRect&&n!==window)){var r,d,u,s,c,m,p;if(n!==window&&n.parentNode&&n!==rt())r=n.getBoundingClientRect(),d=r.top,u=r.left,s=r.bottom,c=r.right,m=r.height,p=r.width;else{var g=document.documentElement.clientWidth||document.body.clientWidth||window.innerWidth,h=document.documentElement.clientHeight||document.body.clientHeight||window.innerHeight;d=0,u=0,s=h,c=g,m=h,p=g}if((l||a)&&n!==window&&(i=i||n.parentNode,!bt))do if(i&&i.getBoundingClientRect&&(Ne(i,"transform")!=="none"||a&&Ne(i,"position")!=="static")){var y=i.getBoundingClientRect();d-=y.top+parseInt(Ne(i,"border-top-width")),u-=y.left+parseInt(Ne(i,"border-left-width")),s=d+r.height,c=u+r.width;break}while(i=i.parentNode);if(t&&n!==window){var E=Wt(i||n),L=E&&E.a,B=E&&E.d;E&&(d/=B,u/=L,p/=L,m/=B,s=d+m,c=u+p)}return{top:d,left:u,bottom:s,right:c,width:p,height:m}}}function Na(n,l,a){for(var t=Tt(n,!0),i=je(n)[l];t;){var r=je(t)[a],d=void 0;if(d=i>=r,!d)return t;if(t===rt())break;t=Tt(t,!1)}return!1}function Yt(n,l,a,t){for(var i=0,r=0,d=n.children;r<d.length;){if(d[r].style.display!=="none"&&d[r]!==De.ghostClone&&(t||d[r]!==De.dragged)&&gt(d[r],a.draggable,n,!1)){if(i===l)return d[r];i++}r++}return null}function Wo(n,l){for(var a=n.lastElementChild;a&&(a===De.ghostClone||Ne(a,"display")==="none"||l&&!Rn(a,l));)a=a.previousElementSibling;return a||null}function st(n,l){var a=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==De.clone&&(!l||Rn(n,l))&&a++;return a}function Va(n){var l=0,a=0,t=rt();if(n)do{var i=Wt(n),r=i.a,d=i.d;l+=n.scrollLeft*r,a+=n.scrollTop*d}while(n!==t&&(n=n.parentNode));return[l,a]}function nr(n,l){for(var a in n)if(n.hasOwnProperty(a)){for(var t in l)if(l.hasOwnProperty(t)&&l[t]===n[a][t])return Number(a)}return-1}function Tt(n,l){if(!n||!n.getBoundingClientRect)return rt();var a=n,t=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var i=Ne(a);if(a.clientWidth<a.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return rt();if(t||l)return a;t=!0}}while(a=a.parentNode);return rt()}function or(n,l){if(n&&l)for(var a in l)l.hasOwnProperty(a)&&(n[a]=l[a]);return n}function mo(n,l){return Math.round(n.top)===Math.round(l.top)&&Math.round(n.left)===Math.round(l.left)&&Math.round(n.height)===Math.round(l.height)&&Math.round(n.width)===Math.round(l.width)}var cn;function fl(n,l){return function(){if(!cn){var a=arguments,t=this;a.length===1?n.call(t,a[0]):n.apply(t,a),cn=setTimeout(function(){cn=void 0},l)}}}function ar(){clearTimeout(cn),cn=void 0}function hl(n,l,a){n.scrollLeft+=l,n.scrollTop+=a}function gl(n){var l=window.Polymer,a=window.jQuery||window.Zepto;return l&&l.dom?l.dom(n).cloneNode(!0):a?a(n).clone(!0)[0]:n.cloneNode(!0)}var Ze="Sortable"+new Date().getTime();function lr(){var n=[],l;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(i){if(!(Ne(i,"display")==="none"||i===De.ghostClone)){n.push({target:i,rect:je(i)});var r=vt({},n[n.length-1].rect);if(i.thisAnimationDuration){var d=Wt(i,!0);d&&(r.top-=d.f,r.left-=d.e)}i.fromRect=r}})}},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(nr(n,{target:t}),1)},animateAll:function(t){var i=this;if(!this.options.animation){clearTimeout(l),typeof t=="function"&&t();return}var r=!1,d=0;n.forEach(function(u){var s=0,c=u.target,m=c.fromRect,p=je(c),g=c.prevFromRect,h=c.prevToRect,y=u.rect,E=Wt(c,!0);E&&(p.top-=E.f,p.left-=E.e),c.toRect=p,c.thisAnimationDuration&&mo(g,p)&&!mo(m,p)&&(y.top-p.top)/(y.left-p.left)===(m.top-p.top)/(m.left-p.left)&&(s=sr(y,g,h,i.options)),mo(p,m)||(c.prevFromRect=m,c.prevToRect=p,s||(s=i.options.animation),i.animate(c,y,p,s)),s&&(r=!0,d=Math.max(d,s),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},s),c.thisAnimationDuration=s)}),clearTimeout(l),r?l=setTimeout(function(){typeof t=="function"&&t()},d):typeof t=="function"&&t(),n=[]},animate:function(t,i,r,d){if(d){Ne(t,"transition",""),Ne(t,"transform","");var u=Wt(this.el),s=u&&u.a,c=u&&u.d,m=(i.left-r.left)/(s||1),p=(i.top-r.top)/(c||1);t.animatingX=!!m,t.animatingY=!!p,Ne(t,"transform","translate3d("+m+"px,"+p+"px,0)"),this.forRepaintDummy=ir(t),Ne(t,"transition","transform "+d+"ms"+(this.options.easing?" "+this.options.easing:"")),Ne(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){Ne(t,"transition",""),Ne(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},d)}}}}function ir(n){return n.offsetWidth}function sr(n,l,a,t){return Math.sqrt(Math.pow(l.top-n.top,2)+Math.pow(l.left-n.left,2))/Math.sqrt(Math.pow(l.top-a.top,2)+Math.pow(l.left-a.left,2))*t.animation}var Pt=[],po={initializeByDefault:!0},yn={mount:function(l){for(var a in po)po.hasOwnProperty(a)&&!(a in l)&&(l[a]=po[a]);Pt.forEach(function(t){if(t.pluginName===l.pluginName)throw"Sortable: Cannot mount plugin ".concat(l.pluginName," more than once")}),Pt.push(l)},pluginEvent:function(l,a,t){var i=this;this.eventCanceled=!1,t.cancel=function(){i.eventCanceled=!0};var r=l+"Global";Pt.forEach(function(d){a[d.pluginName]&&(a[d.pluginName][r]&&a[d.pluginName][r](vt({sortable:a},t)),a.options[d.pluginName]&&a[d.pluginName][l]&&a[d.pluginName][l](vt({sortable:a},t)))})},initializePlugins:function(l,a,t,i){Pt.forEach(function(u){var s=u.pluginName;if(!(!l.options[s]&&!u.initializeByDefault)){var c=new u(l,a,l.options);c.sortable=l,c.options=l.options,l[s]=c,Ct(t,c.defaults)}});for(var r in l.options)if(l.options.hasOwnProperty(r)){var d=this.modifyOption(l,r,l.options[r]);typeof d<"u"&&(l.options[r]=d)}},getEventProperties:function(l,a){var t={};return Pt.forEach(function(i){typeof i.eventProperties=="function"&&Ct(t,i.eventProperties.call(a[i.pluginName],l))}),t},modifyOption:function(l,a,t){var i;return Pt.forEach(function(r){l[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[a]=="function"&&(i=r.optionListeners[a].call(l[r.pluginName],t))}),i}};function rr(n){var l=n.sortable,a=n.rootEl,t=n.name,i=n.targetEl,r=n.cloneEl,d=n.toEl,u=n.fromEl,s=n.oldIndex,c=n.newIndex,m=n.oldDraggableIndex,p=n.newDraggableIndex,g=n.originalEvent,h=n.putSortable,y=n.extraEventProperties;if(l=l||a&&a[Ze],!!l){var E,L=l.options,B="on"+t.charAt(0).toUpperCase()+t.substr(1);window.CustomEvent&&!bt&&!vn?E=new CustomEvent(t,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(t,!0,!0)),E.to=d||a,E.from=u||a,E.item=i||a,E.clone=r,E.oldIndex=s,E.newIndex=c,E.oldDraggableIndex=m,E.newDraggableIndex=p,E.originalEvent=g,E.pullMode=h?h.lastPutMode:void 0;var I=vt(vt({},y),yn.getEventProperties(t,l));for(var M in I)E[M]=I[M];a&&a.dispatchEvent(E),L[B]&&L[B].call(l,E)}}var cr=["evt"],ot=function(l,a){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.evt,r=Zs(t,cr);yn.pluginEvent.bind(De)(l,a,vt({dragEl:ve,parentEl:ze,ghostEl:Te,rootEl:Fe,nextEl:_t,lastDownEl:_n,cloneEl:Ue,cloneHidden:Dt,dragStarted:an,putSortable:Qe,activeSortable:De.active,originalEvent:i,oldIndex:Kt,oldDraggableIndex:un,newIndex:it,newDraggableIndex:It,hideGhostForTarget:Sl,unhideGhostForTarget:wl,cloneNowHidden:function(){Dt=!0},cloneNowShown:function(){Dt=!1},dispatchSortableEvent:function(u){nt({sortable:a,name:u,originalEvent:i})}},r))};function nt(n){rr(vt({putSortable:Qe,cloneEl:Ue,targetEl:ve,rootEl:Fe,oldIndex:Kt,oldDraggableIndex:un,newIndex:it,newDraggableIndex:It},n))}var ve,zt,ze,Te,on,tn,Fe,_t,_n,Ue,Dt,Kt,it,un,It,Rt,Qe,Jt=!1,Hn=!1,Un=[],ut,mt,fo,ho,Ma,Oa,an,Ht,dn,mn=!1,In=!1,An,He,go=[],Lo=!1,zn=[],nn=null,ht=null,vo=null,wt=null,jn=typeof document<"u",Ut=ul,_a=vn||bt?"cssFloat":"float",ur=jn&&!dl&&!ul&&"draggable"in document.createElement("div"),vl=(function(){if(jn){if(bt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}})(),yl=function(l,a){var t=Ne(l),i=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),r=Yt(l,0,a),d=Yt(l,1,a),u=r&&Ne(r),s=d&&Ne(d),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+je(r).width,m=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+je(d).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&u.float&&u.float!=="none"){var p=u.float==="left"?"left":"right";return d&&(s.clear==="both"||s.clear===p)?"vertical":"horizontal"}return r&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||c>=i&&t[_a]==="none"||d&&t[_a]==="none"&&c+m>i)?"vertical":"horizontal"},dr=function(l,a,t){var i=t?l.left:l.top,r=t?l.right:l.bottom,d=t?l.width:l.height,u=t?a.left:a.top,s=t?a.right:a.bottom,c=t?a.width:a.height;return i===u||r===s||i+d/2===u+c/2},mr=function(l,a){var t;return Un.some(function(i){var r=i[Ze].options.emptyInsertThreshold;if(!(!r||Wo(i))){var d=je(i),u=l>=d.left-r&&l<=d.right+r,s=a>=d.top-r&&a<=d.bottom+r;if(u&&s)return t=i}}),t},kl=function(l){function a(r,d){return function(u,s,c,m){var p=u.options.group.name&&s.options.group.name&&u.options.group.name===s.options.group.name;if(r==null&&(d||p))return!0;if(r==null||r===!1)return!1;if(d&&r==="clone")return r;if(typeof r=="function")return a(r(u,s,c,m),d)(u,s,c,m);var g=(d?u:s).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var t={},i=l.group;(!i||On(i)!="object")&&(i={name:i}),t.name=i.name,t.checkPull=a(i.pull,!0),t.checkPut=a(i.put),t.revertClone=i.revertClone,l.group=t},Sl=function(){!vl&&Te&&Ne(Te,"display","none")},wl=function(){!vl&&Te&&Ne(Te,"display","")};jn&&!dl&&document.addEventListener("click",function(n){if(Hn)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Hn=!1,!1},!0);var Mt=function(l){if(ve){l=l.touches?l.touches[0]:l;var a=mr(l.clientX,l.clientY);if(a){var t={};for(var i in l)l.hasOwnProperty(i)&&(t[i]=l[i]);t.clientX=l.clientX,t.clientY=l.clientY,t.pageX=l.pageX!==void 0?l.pageX:l.clientX,t.pageY=l.pageY!==void 0?l.pageY:l.clientY,t.target=t.rootEl=a,t.preventDefault=void 0,t.stopPropagation=void 0,a[Ze]._onDragOver(t)}}},pr=function(l){if(ve){var a=Se._findOwnerSortable(ve.parentNode);a&&a._isOutsideThisEl(l.target)}};function De(n,l){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=l=Ct({},l),n[Ze]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yl(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(d,u){d.setData("Text",u.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:De.supportPointer!==!1&&"PointerEvent"in window&&!rn,emptyInsertThreshold:5,extOption:{boundary:{isOut:!1,element:"",x:0,y:0},wrapBody:{isWrap:!1,element:""},cross:{isCross:!1,isSameStruct:!0,dropEndBeforeCallback:null},tree:{isTree:!1,maxDepth:3,indentThreshold:20,isOnlyInnerMove:!1,isDragToChild:!0,isDragToParent:!0,rootId:"",regionCls:".darg-region"}}};yn.initializePlugins(this,n,a);for(var t in a)!(t in l)&&(l[t]=a[t]);kl(l);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=l.forceFallback?!1:ur,this.nativeDraggable&&(this.options.touchStartThreshold=1),l.supportPointer?Ae(n,"pointerdown",this._onTapStart):(Ae(n,"mousedown",this._onTapStart),Ae(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(n,"dragover",this),Ae(n,"dragenter",this)),Un.push(this.el),l.store&&l.store.get&&this.sort(l.store.get(this)||[]),Ct(this,lr())}De.prototype={constructor:De,_isOutsideThisEl:function(l){!this.el.contains(l)&&l!==this.el&&(Ht=null)},_getDirection:function(l,a){return typeof this.options.direction=="function"?this.options.direction.call(this,l,a,ve):this.options.direction},_onTapStart:function(l){if(l.cancelable){var a=this,t=this.el,i=this.options,r=i.preventOnFilter,d=l.type,u=l.touches&&l.touches[0]||l.pointerType&&l.pointerType==="touch"&&l,s=(u||l).target,c=l.target.shadowRoot&&(l.path&&l.path[0]||l.composedPath&&l.composedPath()[0])||s,m=i.filter;if(wr(t),!ve&&!(/mousedown|pointerdown/.test(d)&&l.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&rn&&s&&s.tagName.toUpperCase()==="SELECT")){var p=t;if(Se.isTreeMode(i)){var g=Se._treeRegionCls(i),h=Se.getOwnerRegion(s,g);h&&(p=h)}if(s=gt(s,i.draggable,p,!1),!(s&&s.animated)&&_n!==s){if(Kt=st(s),un=st(s,i.draggable),typeof m=="function"){if(m.call(this,l,s,this)){nt({sortable:a,rootEl:c,name:"filter",targetEl:s,toEl:t,fromEl:t}),ot("filter",a,{evt:l}),r&&l.cancelable&&l.preventDefault();return}}else if(m&&(m=m.split(",").some(function(y){if(y=gt(c,y.trim(),t,!1),y)return nt({sortable:a,rootEl:y,name:"filter",targetEl:s,fromEl:t,toEl:t}),ot("filter",a,{evt:l}),!0}),m)){r&&l.cancelable&&l.preventDefault();return}i.handle&&!gt(c,i.handle,t,!1)||this._prepareDragStart(l,u,s)}}}},_prepareDragStart:function(l,a,t){var i=this,r=i.el,d=i.options,u=r.ownerDocument,s,c=!!(d.extOption&&d.extOption.tree&&d.extOption.tree.isTree),m=!1;if(t&&!ve){if(t.parentNode===r)m=!0;else if(c&&r.contains(t)){var p=Se.findNearestTreeRoot(t,r);m=p===r}}if(m){var g=je(t);if(Fe=r,ve=t,ze=ve.parentNode,_t=ve.nextSibling,_n=t,Rt=d.group,De.dragged=ve,ut={target:ve,clientX:(a||l).clientX,clientY:(a||l).clientY},Ma=ut.clientX-g.left,Oa=ut.clientY-g.top,this._lastX=(a||l).clientX,this._lastY=(a||l).clientY,Se.isTreeMode(d)){var h=a||l;Se._tree.startPageX=h.pageX!==void 0?h.pageX:h.clientX,Se._tree.dropInfo=null,Se._tree.startDragDepth=Se.getNodeDepth(ve,Se._treeRegionCls(d));var y=window.pageXOffset||document.documentElement.scrollLeft||0;Se._tree.startLeftPage=ve.getBoundingClientRect().left+y}if(ve.style["will-change"]="transform",s=function(){if(ot("delayEnded",i,{evt:l}),De.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Da&&i.nativeDraggable&&(ve.draggable=!0),i._triggerDragStart(l,a),nt({sortable:i,name:"choose",originalEvent:l}),lt(ve,d.chosenClass,!0)},d.ignore.split(",").forEach(function(E){pl(ve,E.trim(),yo)}),Ae(u,"dragover",Mt),Ae(u,"mousemove",Mt),Ae(u,"touchmove",Mt),Ae(u,"mouseup",i._onDrop),Ae(u,"touchend",i._onDrop),Ae(u,"touchcancel",i._onDrop),Da&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ve.draggable=!0),ot("delayStart",this,{evt:l}),d.delay&&(!d.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(vn||bt))){if(De.eventCanceled){this._onDrop();return}Ae(u,"mouseup",i._disableDelayedDrag),Ae(u,"touchend",i._disableDelayedDrag),Ae(u,"touchcancel",i._disableDelayedDrag),Ae(u,"mousemove",i._delayedDragTouchMoveHandler),Ae(u,"touchmove",i._delayedDragTouchMoveHandler),d.supportPointer&&Ae(u,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,d.delay)}else s()}},_delayedDragTouchMoveHandler:function(l){var a=l.touches?l.touches[0]:l;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ve&&yo(ve),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._disableDelayedDrag),Oe(l,"touchend",this._disableDelayedDrag),Oe(l,"touchcancel",this._disableDelayedDrag),Oe(l,"mousemove",this._delayedDragTouchMoveHandler),Oe(l,"touchmove",this._delayedDragTouchMoveHandler),Oe(l,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(l,a){a=a||l.pointerType=="touch"&&l,!this.nativeDraggable||a?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):a?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(ve,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?Ln(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(l,a){if(Jt=!1,Fe&&ve){ot("dragStarted",this,{evt:a}),this.nativeDraggable&&Ae(document,"dragover",pr);var t=this.options;!l&&lt(ve,t.dragClass,!1),lt(ve,t.ghostClass,!0),De.active=this,l&&this._appendGhost(),nt({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,Sl();for(var l=document.elementFromPoint(mt.clientX,mt.clientY),a=l;l&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(mt.clientX,mt.clientY),l!==a);)a=l;var t=Se._findOwnerSortable(ve.parentNode);if(t&&t._isOutsideThisEl(l),a)do{if(a[Ze]){var i=void 0;if(i=a[Ze]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:l,rootEl:a}),i&&!this.options.dragoverBubble)break}l=a}while(a=a.parentNode);wl()}},_onTouchMove:function(l){if(ut){var a=this.options,t=a.fallbackTolerance,i=a.fallbackOffset,r=l.touches?l.touches[0]:l,d=Te&&(vo||(vo=Wt(Te,!0))),u=Te&&d&&d.a,s=Te&&d&&d.d,c,m=Ut&&He?rt():null,p,g;if(Ut&&He&&(wt&&wt.el===He&&wt.scrollLeft===He.scrollLeft&&wt.scrollTop===He.scrollTop&&wt.winTop===m.scrollTop&&wt.winLeft===m.scrollLeft?c=wt.offset:(c=Va(He),wt={el:He,scrollLeft:He.scrollLeft,scrollTop:He.scrollTop,winTop:m.scrollTop,winLeft:m.scrollLeft,offset:c})),p=(r.clientX-ut.clientX+i.x)/(u||1)+(c?c[0]-go[0]:0)/(u||1),g=(r.clientY-ut.clientY+i.y)/(s||1)+(c?c[1]-go[1]:0)/(s||1),!De.active&&!Jt){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(l,!0)}if(Te){d?(d.e+=p-(fo||0),d.f+=g-(ho||0)):d={a:1,b:0,c:0,d:1,e:p,f:g};var h="matrix(".concat(d.a,",").concat(d.b,",").concat(d.c,",").concat(d.d,",").concat(d.e,",").concat(d.f,")");Ne(Te,"transform",h),fo=p,ho=g,mt=r;const L=Se.checkMoveOutBoundary(Te,this.el,this.options);if(L.isOut){var y=0;Ut||(nn==null&&(nn=rt().scrollTop),y=rt().scrollTop-nn),tn?(d.e=tn.e,d.f=tn.f-y):(L.top&&(d.f=L.x*-1-y),L.right&&(d.e=L.y),L.bottom&&(d.f=L.x-y),L.left&&(d.e=L.y*-1));var E="matrix(".concat(d.a,",").concat(d.b,",").concat(d.c,",").concat(d.d,",").concat(d.e,",").concat(d.f,")");Ne(Te,"transform",E)}else nn=null,tn={a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}}l.cancelable&&l.preventDefault()}},_appendGhost:function(){if(!Te){var l=this.options.fallbackOnBody?document.body:Fe,a=je(ve,!0,Ut,!0,l),t=this.options;if(Ut){for(He=l;Ne(He,"position")==="static"&&Ne(He,"transform")==="none"&&He!==document;)He=He.parentNode;He!==document.body&&He!==document.documentElement?(He===document&&(He=rt()),a.top+=He.scrollTop,a.left+=He.scrollLeft):He=rt(),go=Va(He)}on=ve.cloneNode(!0),Te=ve.cloneNode(!0),Te=Se.setWrapBody(Te,this.el,this.options),lt(Te,t.ghostClass,!1),lt(Te,t.fallbackClass,!0),lt(Te,t.dragClass,!0),Ne(Te,"transition",""),Ne(Te,"transform",""),Ne(Te,"box-sizing","border-box"),Ne(Te,"margin",0),Ne(Te,"top",a.top),Ne(Te,"left",a.left),Ne(Te,"width",a.width),Ne(Te,"height",a.height),Ne(Te,"opacity","0.8"),Ne(Te,"position",Ut?"absolute":"fixed"),Ne(Te,"zIndex","100000"),Ne(Te,"pointerEvents","none"),De.ghost=Te,De.ghostClone=on,l.appendChild(Te),Ne(Te,"transform-origin",Ma/parseInt(Te.style.width)*100+"% "+Oa/parseInt(Te.style.height)*100+"%")}},_onDragStart:function(l,a){var t=this,i=l.dataTransfer,r=t.options;if(ot("dragStart",this,{evt:l}),De.eventCanceled){this._onDrop();return}ot("setupClone",this),De.eventCanceled||(Ue=gl(ve),Ue.removeAttribute("id"),Ue.draggable=!1,Ue.style["will-change"]="",this._hideClone(),lt(Ue,this.options.chosenClass,!1),De.clone=Ue),t.cloneId=Ln(function(){ot("clone",t),!De.eventCanceled&&(t.options.removeCloneOnHide||Fe.insertBefore(Ue,ve),t._hideClone(),nt({sortable:t,name:"clone"}))}),!a&&lt(ve,r.dragClass,!0),a?(Hn=!0,t._loopId=setInterval(t._emulateDragOver,50)):(Oe(document,"mouseup",t._onDrop),Oe(document,"touchend",t._onDrop),Oe(document,"touchcancel",t._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(t,i,ve)),Ae(document,"drop",t),Ne(ve,"transform","translateZ(0)")),Jt=!0,t._dragStartId=Ln(t._dragStarted.bind(t,a,l)),Ae(document,"selectstart",t),an=!0,rn&&Ne(document.body,"user-select","none")},_onDragOver:function(l){var a=this.el,t=l.target,i,r,d,u=this.options,s=u.group,c=De.active,m=Rt===s,p=u.sort,g=Qe||c,h,y=this,E=!1;if(Lo)return;if(Se.isTreeMode(u)){var L=m;if(!L&&s&&Rt){var B=!!s.name&&s.name===Rt.name;B&&(L=typeof s.checkPut=="function"?!!s.checkPut(this,c,ve,l):!0)}if(!L){Se._tree.dropInfo={isReject:!0,reason:"out-of-group"},Se.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}Se.treeDragOver(this,l,t),Se.renderTreeIndicator(this,l),l.cancelable&&l.preventDefault();return}function I(v,F){ot(v,y,vt({evt:l,isOwner:m,axis:h?"vertical":"horizontal",revert:d,dragRect:i,targetRect:r,canSort:p,fromSortable:g,target:t,completed:N,onMove:function(O,q){return Dn(Fe,a,ve,i,O,je(O),l,q)},changed:b},F))}function M(){I("dragOverAnimationCapture"),y.captureAnimationState(),y!==g&&g.captureAnimationState()}function N(v){if(I("dragOverCompleted",{insertion:v}),v&&(m?c._hideClone():c._showClone(y),y!==g&&(lt(ve,Qe?Qe.options.ghostClass:c.options.ghostClass,!1),lt(ve,u.ghostClass,!0)),Qe!==y&&y!==De.active?Qe=y:y===De.active&&Qe&&(Qe=null),g===y&&(y._ignoreWhileAnimating=t),y.animateAll(function(){I("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(t===ve&&!ve.animated||t===a&&!t.animated)&&(Ht=null),!u.dragoverBubble&&!l.rootEl&&t!==document){var F=Se._findOwnerSortable(ve.parentNode);F&&F._isOutsideThisEl(l.target),!v&&Mt(l)}return!u.dragoverBubble&&l.stopPropagation&&l.stopPropagation(),E=!0}function b(){it=st(ve),It=st(ve,u.draggable),nt({sortable:y,name:"change",toEl:a,newIndex:it,newDraggableIndex:It,originalEvent:l})}if(l.preventDefault!==void 0&&l.cancelable&&l.preventDefault(),t=gt(t,u.draggable,a,!0),I("dragOver"),De.eventCanceled)return E;if(ve.contains(l.target)||t.animated&&t.animatingX&&t.animatingY||y._ignoreWhileAnimating===t)return N(!1);if(Hn=!1,c&&!u.disabled&&(m?p||(d=ze!==Fe):Qe===this||(this.lastPutMode=Rt.checkPull(this,c,ve,l))&&s.checkPut(this,c,ve,l))){if(h=this._getDirection(l,t)==="vertical",i=je(ve),I("dragOverValid"),De.eventCanceled)return E;if(d)return ze=Fe,M(),this._hideClone(),I("revert"),De.eventCanceled||(Se.setCrossEl(t,this.options),_t?Fe.insertBefore(ve,_t):Fe.appendChild(ve)),N(!0);var V=Wo(a,u.draggable);if(!V||vr(l,h,this)&&!V.animated){if(V===ve)return N(!1);if(V&&a===l.target&&(t=V),t&&(r=je(t)),Dn(Fe,a,ve,i,t,r,l,!!t)!==!1)return M(),Se.setCrossEl(t,this.options),V&&V.nextSibling?a.insertBefore(ve,V.nextSibling):a.appendChild(ve),ze=a,b(),N(!0)}else if(V&&gr(l,h,this)){var w=Yt(a,0,u,!0);if(w===ve)return N(!1);if(t=w,r=je(t),Dn(Fe,a,ve,i,t,r,l,!1)!==!1)return M(),Se.setCrossEl(t,this.options),a.insertBefore(ve,w),ze=a,b(),N(!0)}else if(t.parentNode===a){r=je(t);var T=0,C,D=ve.parentNode!==a,J=!dr(ve.animated&&ve.toRect||i,t.animated&&t.toRect||r,h),ne=h?"top":"left",K=Na(t,"top","top")||Na(ve,"top","top"),P=K?K.scrollTop:void 0;Ht!==t&&(C=r[ne],mn=!1,In=!J&&u.invertSwap||D),T=yr(l,t,r,h,J?1:u.swapThreshold,u.invertedSwapThreshold==null?u.swapThreshold:u.invertedSwapThreshold,In,Ht===t);var x;if(T!==0){var A=st(ve);do A-=T,x=ze.children[A];while(x&&(Ne(x,"display")==="none"||x===on))}if(T===0||x===t)return N(!1);Ht=t,dn=T;var f=t.nextElementSibling,S=!1;S=T===1;var k=Dn(Fe,a,ve,i,t,r,l,S);if(k!==!1)return(k===1||k===-1)&&(S=k===1),Lo=!0,setTimeout(hr,30),M(),Se.setCrossEl(t,this.options),S&&!f?a.appendChild(ve):t.parentNode.insertBefore(ve,S?f:t),K&&hl(K,0,P-K.scrollTop),ze=ve.parentNode,C!==void 0&&!In&&(An=Math.abs(C-je(t)[ne])),b(),N(!0)}if(a.contains(ve))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Oe(document,"mousemove",this._onTouchMove),Oe(document,"touchmove",this._onTouchMove),Oe(document,"pointermove",this._onTouchMove),Oe(document,"dragover",Mt),Oe(document,"mousemove",Mt),Oe(document,"touchmove",Mt)},_offUpEvents:function(){var l=this.el.ownerDocument;Oe(l,"mouseup",this._onDrop),Oe(l,"touchend",this._onDrop),Oe(l,"pointerup",this._onDrop),Oe(l,"touchcancel",this._onDrop),Oe(document,"selectstart",this)},_onDrop:function(l){Se.crossDropEnd(this.options,this.el).then(a=>{if(!this.el){this._nulling();return}if(a){var t=this.el,i=this.options;if(it=st(ve),It=st(ve,i.draggable),ot("drop",this,{evt:l}),ze=ve&&ve.parentNode,it=st(ve),It=st(ve,i.draggable),Se.isTreeMode(i)&&typeof i.onUpdate=="function"&&i.onUpdate(),De.eventCanceled){this._nulling();return}Jt=!1,In=!1,mn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),$o(this.cloneId),$o(this._dragStartId),this.nativeDraggable&&(Oe(document,"drop",this),Oe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rn&&Ne(document.body,"user-select",""),Ne(ve,"transform",""),l&&(an&&(l.cancelable&&l.preventDefault(),!i.dropBubble&&l.stopPropagation()),Te&&Te.parentNode&&Te.parentNode.removeChild(Te),(Fe===ze||Qe&&Qe.lastPutMode!=="clone")&&Ue&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),ve&&(this.nativeDraggable&&Oe(ve,"dragend",this),yo(ve),ve.style["will-change"]="",an&&!Jt&&lt(ve,Qe?Qe.options.ghostClass:this.options.ghostClass,!1),lt(ve,this.options.chosenClass,!1),nt({sortable:this,name:"unchoose",toEl:ze,newIndex:null,newDraggableIndex:null,originalEvent:l}),Fe!==ze?(it>=0&&(nt({rootEl:ze,name:"add",toEl:ze,fromEl:Fe,originalEvent:l}),nt({sortable:this,name:"remove",toEl:ze,originalEvent:l}),nt({rootEl:ze,name:"sort",toEl:ze,fromEl:Fe,originalEvent:l}),nt({sortable:this,name:"sort",toEl:ze,originalEvent:l})),Qe&&Qe.save()):it!==Kt&&it>=0&&(nt({sortable:this,name:"update",toEl:ze,originalEvent:l}),nt({sortable:this,name:"sort",toEl:ze,originalEvent:l})),De.active&&((it==null||it===-1)&&(it=Kt,It=un),nt({sortable:this,name:"end",toEl:ze,originalEvent:l}),this.save()))),this._nulling()}})},_nulling:function(){ot("nulling",this),Fe=ve=zt=ze=Te=on=_t=Ue=_n=Dt=ut=mt=an=it=It=Kt=un=Ht=dn=Qe=Rt=De.dragged=De.ghost=De.ghostClone=De.clone=De.active=tn=nn=vo=wt=null,Se._clearHiddenBox(),Se.resetTreeState(),zn.forEach(function(l){l.checked=!0}),zn.length=fo=ho=0},handleEvent:function(l){switch(l.type){case"drop":case"dragend":this._onDrop(l);break;case"dragenter":case"dragover":ve&&(this._onDragOver(l),fr(l));break;case"selectstart":l.preventDefault();break}},toArray:function(l){for(var a=[],t,i=this.el.children,r=0,d=i.length,u=this.options;r<d;r++)t=i[r],gt(t,u.draggable,this.el,!1)&&a.push(t.getAttribute(u.dataIdAttr)||Sr(t));return a},sort:function(l,a){var t={},i=this.el;this.toArray().forEach(function(r,d){var u=i.children[d];gt(u,this.options.draggable,i,!1)&&(t[r]=u)},this),a&&this.captureAnimationState(),l.forEach(function(r){t[r]&&(i.removeChild(t[r]),i.appendChild(t[r]))}),a&&this.animateAll()},save:function(){var l=this.options.store;l&&l.set&&l.set(this)},closest:function(l,a){return gt(l,a||this.options.draggable,this.el,!1)},option:function(l,a){var t=this.options;if(a===void 0)return t[l];var i=yn.modifyOption(this,l,a);typeof i<"u"?t[l]=i:t[l]=a,l==="group"&&kl(t)},destroy:function(){ot("destroy",this);var l=this.el;l[Ze]=null,Oe(l,"mousedown",this._onTapStart),Oe(l,"touchstart",this._onTapStart),Oe(l,"pointerdown",this._onTapStart),this.nativeDraggable&&(Oe(l,"dragover",this),Oe(l,"dragenter",this)),Array.prototype.forEach.call(l.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._offMoveEvents(),this._offUpEvents(),this._onDrop(),Te&&Te.parentNode&&(Te.parentNode.removeChild(Te),Te=null),this._disableDelayedDragEvents(),Un.splice(Un.indexOf(this.el),1),this.el=l=null},_hideClone:function(){if(!Dt){if(ot("hideClone",this),De.eventCanceled)return;Ne(Ue,"display","none"),this.options.removeCloneOnHide&&Ue.parentNode&&Ue.parentNode.removeChild(Ue),Dt=!0}},_showClone:function(l){if(l.lastPutMode!=="clone"){this._hideClone();return}if(Dt){if(ot("showClone",this),De.eventCanceled)return;ve.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ue,ve):_t?Fe.insertBefore(Ue,_t):Fe.appendChild(Ue),this.options.group.revertClone&&this.animate(ve,Ue),Ne(Ue,"display",""),Dt=!1}}};function fr(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Dn(n,l,a,t,i,r,d,u){var s,c=n[Ze],m=c.options.onMove,p;return window.CustomEvent&&!bt&&!vn?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=l,s.from=n,s.dragged=a,s.draggedRect=t,s.related=i||l,s.relatedRect=r||je(l),s.willInsertAfter=u,s.originalEvent=d,n.dispatchEvent(s),m&&(p=m.call(c,s,d)),p}function yo(n){n.draggable=!1}function hr(){Lo=!1}function gr(n,l,a){var t=je(Yt(a.el,0,a.options,!0)),i=10;return l?n.clientX<t.left-i||n.clientY<t.top&&n.clientX<t.right:n.clientY<t.top-i||n.clientY<t.bottom&&n.clientX<t.left}function vr(n,l,a){var t=je(Wo(a.el,a.options.draggable)),i=10;return l?n.clientX>t.right+i||n.clientX<=t.right&&n.clientY>t.bottom&&n.clientX>=t.left:n.clientX>t.right&&n.clientY>t.top||n.clientX<=t.right&&n.clientY>t.bottom+i}function yr(n,l,a,t,i,r,d,u){var s=t?n.clientY:n.clientX,c=t?a.height:a.width,m=t?a.top:a.left,p=t?a.bottom:a.right,g=!1;if(!d){if(u&&An<c*i){if(!mn&&(dn===1?s>m+c*r/2:s<p-c*r/2)&&(mn=!0),mn)g=!0;else if(dn===1?s<m+An:s>p-An)return-dn}else if(s>m+c*(1-i)/2&&s<p-c*(1-i)/2)return kr(l)}return g=g||d,g&&(s<m+c*r/2||s>p-c*r/2)?s>m+c/2?1:-1:0}function kr(n){return st(ve)<st(n)?1:-1}function Sr(n){for(var l=n.tagName+n.className+n.src+n.href+n.textContent,a=l.length,t=0;a--;)t+=l.charCodeAt(a);return t.toString(36)}function wr(n){zn.length=0;for(var l=n.getElementsByTagName("input"),a=l.length;a--;){var t=l[a];t.checked&&zn.push(t)}}function Ln(n){return setTimeout(n,0)}function $o(n){return clearTimeout(n)}jn&&Ae(document,"touchmove",function(n){(De.active||Jt)&&n.cancelable&&n.preventDefault()});De.utils={on:Ae,off:Oe,css:Ne,find:pl,is:function(l,a){return!!gt(l,a,l,!1)},extend:or,throttle:fl,closest:gt,toggleClass:lt,clone:gl,index:st,nextTick:Ln,cancelNextTick:$o,detectDirection:yl,getChild:Yt};De.get=function(n){return n[Ze]};De.mount=function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];l[0].constructor===Array&&(l=l[0]),l.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(De.utils=vt(vt({},De.utils),t.utils)),yn.mount(t)})};De.create=function(n,l){return new De(n,l)};De.version=er;var We=[],ln,Fo,Po=!1,ko,So,Jn,sn;function Er(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this))}return n.prototype={dragStarted:function(a){var t=a.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var t=a.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?Oe(document,"dragover",this._handleAutoScroll):(Oe(document,"pointermove",this._handleFallbackAutoScroll),Oe(document,"touchmove",this._handleFallbackAutoScroll),Oe(document,"mousemove",this._handleFallbackAutoScroll)),Aa(),$n(),ar()},nulling:function(){Jn=Fo=ln=Po=sn=ko=So=null,We.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,t){var i=this,r=(a.touches?a.touches[0]:a).clientX,d=(a.touches?a.touches[0]:a).clientY,u=document.elementFromPoint(r,d);if(Jn=a,t||this.options.forceAutoScrollFallback||vn||bt||rn){wo(a,this.options,u,t);var s=Tt(u,!0);Po&&(!sn||r!==ko||d!==So)&&(sn&&Aa(),sn=setInterval(function(){var c=Tt(document.elementFromPoint(r,d),!0);c!==s&&(s=c,$n()),wo(a,i.options,c,t)},10),ko=r,So=d)}else{if(!this.options.bubbleScroll||Tt(u,!0)===rt()){$n();return}wo(a,this.options,Tt(u,!1),!1)}}},Ct(n,{pluginName:"scroll",initializeByDefault:!0})}function $n(){We.forEach(function(n){clearInterval(n.pid)}),We=[]}function Aa(){clearInterval(sn)}var wo=fl(function(n,l,a,t){if(l.scroll){var i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,d=l.scrollSensitivity,u=l.scrollSpeed,s=rt(),c=!1,m;Fo!==a&&(Fo=a,$n(),ln=l.scroll,m=l.scrollFn,ln===!0&&(ln=Tt(a,!0)));var p=0,g=ln;do{var h=g,y=je(h),E=y.top,L=y.bottom,B=y.left,I=y.right,M=y.width,N=y.height,b=void 0,V=void 0,w=h.scrollWidth,T=h.scrollHeight,C=Ne(h),D=h.scrollLeft,J=h.scrollTop;h===s?(b=M<w&&(C.overflowX==="auto"||C.overflowX==="scroll"||C.overflowX==="visible"),V=N<T&&(C.overflowY==="auto"||C.overflowY==="scroll"||C.overflowY==="visible")):(b=M<w&&(C.overflowX==="auto"||C.overflowX==="scroll"),V=N<T&&(C.overflowY==="auto"||C.overflowY==="scroll"));var ne=b&&(Math.abs(I-i)<=d&&D+M<w)-(Math.abs(B-i)<=d&&!!D),K=V&&(Math.abs(L-r)<=d&&J+N<T)-(Math.abs(E-r)<=d&&!!J);if(!We[p])for(var P=0;P<=p;P++)We[P]||(We[P]={});(We[p].vx!=ne||We[p].vy!=K||We[p].el!==h)&&(We[p].el=h,We[p].vx=ne,We[p].vy=K,clearInterval(We[p].pid),(ne!=0||K!=0)&&(c=!0,We[p].pid=setInterval(function(){t&&this.layer===0&&De.active._onTouchMove(Jn);var x=We[this.layer].vy?We[this.layer].vy*u:0,A=We[this.layer].vx?We[this.layer].vx*u:0;typeof m=="function"&&m.call(De.dragged.parentNode[Ze],A,x,n,Jn,We[this.layer].el)!=="continue"||hl(We[this.layer].el,A,x)}.bind({layer:p}),24))),p++}while(l.bubbleScroll&&g!==s&&(g=Tt(g,!1)));Po=c}},30),El=function(l){var a=l.originalEvent,t=l.putSortable,i=l.dragEl,r=l.activeSortable,d=l.dispatchSortableEvent,u=l.hideGhostForTarget,s=l.unhideGhostForTarget;if(a){var c=t||r;u();var m=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,p=document.elementFromPoint(m.clientX,m.clientY);s(),c&&!c.el.contains(p)&&(d("spill"),this.onSpill({dragEl:i,putSortable:t}))}};function jo(){}jo.prototype={startIndex:null,dragStart:function(l){var a=l.oldDraggableIndex;this.startIndex=a},onSpill:function(l){var a=l.dragEl,t=l.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var i=Yt(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(a,i):this.sortable.el.appendChild(a),this.sortable.animateAll(),t&&t.animateAll()},drop:El};Ct(jo,{pluginName:"revertOnSpill"});function Yo(){}Yo.prototype={onSpill:function(l){var a=l.dragEl,t=l.putSortable,i=t||this.sortable;i.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),i.animateAll()},drop:El};Ct(Yo,{pluginName:"removeOnSpill"});const Se={isBoolean:n=>typeof n=="boolean",isFunction:n=>typeof n=="function",isUndefined:n=>typeof n>"u"||n===null,isFiniteNumber:n=>typeof n=="number"&&isFinite(n),getOffset:n=>{const l=n.getBoundingClientRect(),t=(n&&n.ownerDocument).documentElement;let i;if(t.toString()!=="[object Window]"){const r=n.ownerDocument;i=r&&r.defaultView||window}else i=t;return{top:l.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:l.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:l.width,height:l.height}},createElement:n=>{if(n.substring(0,1)==="<"){const a=document.createElement("div");return a.innerHTML=n,a.children[0]}else return document.createElement(n)},getElementData:(n,l)=>{const a=[],t=n.children,i=t.length;let r;for(let d=0;d<i;d++){r=t[d];const u=r.getAttribute(l.dataIdAttr);u&&u.length>0&&a.push(u)}return a},_getHiddenBox:()=>(ht||(ht=document.createElement("div"),ht.style.cssText="position:fixed;left:-99999px;top:0;width:1px;height:1px;overflow:hidden;pointer-events:none;",document.body.appendChild(ht)),ht),_moveToHiddenBox:n=>{n&&n.parentNode&&Se._getHiddenBox().appendChild(n)},_clearHiddenBox:()=>{ht&&ht.parentNode&&(ht.parentNode.removeChild(ht),ht=null)},checkMoveOutBoundary:(n,l,a)=>{let t=!0,i={};const r=a.extOption.boundary;if(r){let d=r.isOut;if(d=Se.isBoolean(d)?d:!0,!d){let u;if(r.element&&r.element.length>0){const s=window.document.querySelector(r.element);s&&(u=Se.getOffset(s))}else u=Se.getOffset(l);if(u){const s=Se.getOffset(n);let c=Number(r.x);isNaN(c)&&(c=0);let m=Number(r.y);isNaN(m)&&(m=0);const p=u.top-c>s.top,g=u.left+u.width+m<s.left+s.width,h=u.top+u.height+c<s.top+s.height,y=u.left-m>s.left;t=!(p||g||h||y),t||(i={top:p,right:g,bottom:h,left:y,x:c,y:m})}}}return i.isOut=!t,i},setWrapBody:(n,l,a)=>{let t=n,i=a.extOption.wrapBody;if(a.fallbackOnBody&&(i?a.extOption.wrapBody.isWrap=!0:a.extOption.wrapBody={isWrap:!0},i=a.extOption.wrapBody),i){let r=i.isWrap;if(r=Se.isBoolean(r)?r:!1,r)if(i.element&&i.element.length>0)t=Se.createElement(i.element),t.appendChild(n);else switch(t=l.cloneNode(),t.appendChild(n),t.tagName.toLocaleLowerCase()){case"tbody":const d=l.parentNode.cloneNode();d.appendChild(t),t=d;break}}return t},checkCross:(n,l,a)=>{const t=a.extOption.cross;let i={newEl:null,isSameStruct:!0};if(t){let r=t.isCross;if(r=Se.isBoolean(r)?r:!1,n.parentNode===l.parentNode&&(r=!1),r){let d=t.isSameStruct;if(d=Se.isBoolean(d)?d:!0,!d){const u=l.tagName.toLocaleLowerCase(),s=Se.createElement(u),c=[],m=["darg-select","darg-placeholder"];switch(l.className.split(" ").forEach(p=>{m.indexOf(p)===-1&&c.push(p)}),c.push(...m),s.className=c.join(" "),Ne(s,"height",l.clientHeight),u){case"tr":let p=0;for(let h=0;h<l.children.length;h++){const y=l.children[h].getAttribute("colspan");p+=Se.isUndefined(y)?1:Number(y)}const g=Se.createElement("td");g.setAttribute("colspan",p),s.appendChild(g);break}i.isSameStruct=!1,i.newEl=s}}}return i},setCrossEl:(n,l)=>{var a=Se.checkCross(ve,n,l);if(!a.isSameStruct){const t=ve.cloneNode(!0);Se._moveToHiddenBox(ve),zt?(ve=zt,zt=null):ve=a.newEl,zt||(zt=t)}},crossDropEnd:(n,l)=>new Promise((a,t)=>{const i=n.extOption.cross;let r=!1;const d=ve&&ve.parentNode;if(i){let s=i.isCross;if(s=Se.isBoolean(s)?s:!1,s){let c=!1;if(d)if(Se.isTreeMode(n)){var u=l||De.active&&De.active.el||n.el;c=!!u&&!u.contains(ve)}else c=Fe!==d;c&&i.dropEndBeforeCallback&&(r=!0)}}if(r){const s=on||ve,c=s&&s.getAttribute?s.getAttribute(n.dataIdAttr):null,m=Se.getElementData(d,n),p=i.dropEndBeforeCallback({data:c,inx:st(ve),arrSortId:m});if(p&&p.then&&Se.isFunction(p.then))Se._crossDropLoad(!0),p.then(g=>{Se._crossDropLoad(!1);const h=Se._crossDropEndCb(g);a({success:h})});else{const g=Se._crossDropEndCb(p);a({success:g})}}else a({success:!0})}),_crossDropLoad:n=>{let l;const a=ve.tagName.toLocaleLowerCase();if(ve.children.length===0)l=ve;else switch(a){case"tr":l=ve.children[0];break}if(n){const t=Se.createElement("div");t.className="panel-darg-loading",t.innerHTML='<div class="darg-add-loading"></div>',l.appendChild(t)}else{const t=ve.querySelector(".panel-darg-loading");t&&t.parentNode&&t.parentNode.removeChild(t)}},_crossDropEndCb:n=>{var l=Se.isBoolean(n)?n:!0;return l&&ve&&ve.parentNode&&ve.parentNode.removeChild(ve),l},_tree:{startPageX:0,startDragDepth:null,startLeftPage:null,depthCache:null,dropInfo:null},_findOwnerSortable:n=>{for(var l=n;l;){var a=l[Ze];if(a&&Se.isFunction(a._isOutsideThisEl))return a;l=l.parentNode}return null},_treeRegionCls:n=>n&&n.extOption&&n.extOption.tree&&n.extOption.tree.regionCls||".darg-region",isTreeMode:n=>!!(n&&n.extOption&&n.extOption.tree&&n.extOption.tree.isTree),findNearestTreeRoot:(n,l)=>{for(var a=n;a;){if(a[Ze]&&a[Ze].options&&Se.isTreeMode(a[Ze].options))return a;a=a.parentNode}return l},getNodeDepth:(n,l)=>{for(var a=0,t=n;t&&(t.matches&&t.matches(l)&&a++,!(t.matches&&t[Ze]&&t[Ze].options));)t=t.parentNode;return a},getOwnerRegion:(n,l)=>{for(var a=n.parentNode;a;){if(a.matches&&a.matches(l))return a;a=a.parentNode}return null},getChildRegion:(n,l)=>{for(var a=n.children||[],t=0;t<a.length;t++)if(a[t].matches&&a[t].matches(l))return a[t];return null},findSiblingFallback:(n,l)=>{var a="data-id",t=h=>!!h&&h.getAttribute&&h.getAttribute(a)!==null,i=n&&n.parentNode;if(i){var r=Array.from(i.children).filter(h=>t(h)&&h!==n&&!n.contains(h));if(r.length){var d=l&&l.getBoundingClientRect?l.getBoundingClientRect():null;if(d)for(var u=d.top+d.height/2,s=0;s<r.length;s++){var c=r[s].getBoundingClientRect();if(u>=c.top&&u<=c.bottom)return r[s]}return r[0]}}for(var m=i,p=0;m&&p++<20;){var g=m.parentNode;if(t(g)&&g!==n&&!n.contains(g))return g;m=g?g.parentNode:null}return null},resolveTreeDrop:(n,l,a,t,i)=>{for(var r=t.extOption.tree||{},d=Se._treeRegionCls(t),u={isReject:!1,reason:"",targetDepth:0,hoverNode:null,intent:"same"},s=t.dataIdAttr||"data-id",c=l;c&&c!==t.el&&!(c.getAttribute&&c.getAttribute(s)!==null);)c=c.parentNode;if(!c||c===t.el)return u.isReject=!0,u.reason="no-node",u;if(c===n||n.contains(c)){var m=Se.findSiblingFallback(n,l);m&&(c=m)}if(u.hoverNode=c,n.contains(c))return u.isReject=!0,u.reason="cycle",u;if(r.isOnlyInnerMove){var p=Se.findNearestTreeRoot(n,null),g=Se.findNearestTreeRoot(c,null);if(p!==g)return u.isReject=!0,u.reason="out-of-group",u}var h=Se.getOwnerRegion(c,d),y=h?Se.getNodeDepth(c,d):1;y<1&&(y=1);var E=Number(r.indentThreshold);(isNaN(E)||E<=0)&&(E=20);var L=window.pageXOffset||document.documentElement.scrollLeft||0,B=c.getBoundingClientRect().left+L,I=B-(y-1)*E,M=1+Math.round((i-I)/E);M<1&&(M=1);var N=Number(r.maxDepth);isNaN(N)&&(N=3);var b=Se._tree.startDragDepth!==null&&Se._tree.startDragDepth!==void 0?Se._tree.startDragDepth:Se.getNodeDepth(n,d),V=M,w=!1;return V>b&&!r.isDragToChild&&(V=b,w=!0),V<b&&!r.isDragToParent&&(V=b,w=!0),N>0&&V>N&&(V=N,V<b&&(V=b)),u.targetDepth=V,u.isDepthForced=w,V>b?u.intent="child":V<b?u.intent="parent":u.intent="same",u.dragDepth=b,u.hoverDepth=y,u},resolveTreeInsert:(n,l,a,t)=>{var i=Se._treeRegionCls(a),r={container:null,refNode:null};if(!l)return r;if(n.intent==="child"){var d=Se.getChildRegion(l,i);return d||(d=Se.createChildRegion(l,a)),r.container=d,r.refNode=Se.findInsertRef(d,t,a),r}for(var u=n.targetDepth!==void 0?n.targetDepth:n.hoverDepth,s=l,c=n.hoverDepth;s&&c>u;){var m=Se.getOwnerRegion(s,i);if(!m||!m.parentNode)break;var p=m.parentNode;if(!p.getAttribute||p.getAttribute(a.dataIdAttr||"data-id")===null)break;s=p,c--}for(;s&&c<u;){var g=Se.getChildRegion(s,i);if(!g)break;if(s=g,c++,c<u){for(var h=null,y=g.children||[],E=0;E<y.length;E++)y[E].getAttribute&&y[E].getAttribute(a.dataIdAttr||"data-id")!==null&&y[E]!==ve&&(h=y[E]);if(!h){c--;break}s=h}}var L;s&&s.matches&&s.matches(i)?L=s:L=Se.getOwnerRegion(s,i);var B=n.isDepthForced===!0;if(B&&c!==u){var I=Se.getOwnerRegion(ve,i);if(I)return r.container=I,r.refNode=Se.findInsertRef(I,t,a),r}return L&&(r.container=L,r.refNode=Se.findInsertRef(L,t,a)),r},findInsertRef:(n,l,a)=>{for(var t=a.dataIdAttr||"data-id",i=[],r=n.children||[],d=0;d<r.length;d++){var u=r[d];u.getAttribute&&u.getAttribute(t)!==null&&u!==ve&&i.push(u)}for(var s=0;s<i.length;s++){var c=i[s].getBoundingClientRect(),m=c.top+c.height/2;if(l<m)return i[s]}return null},createChildRegion:(n,l)=>{var a=Se._treeRegionCls(l),t=Se.getOwnerRegion(n,a),i=t?t.tagName.toLocaleLowerCase():"ul",r=Se.createElement(i),d=a.charAt(0)==="."?a.slice(1):a;return r.className=d+" "+Se.TREE_AUTO_REGION_CLS,n.appendChild(r),r},TREE_AUTO_REGION_CLS:"darg-region-auto",cleanupEmptyAutoRegions:n=>{var l=n||document;if(!(!l||!l.querySelectorAll))for(var a=l.querySelectorAll("."+Se.TREE_AUTO_REGION_CLS),t=a.length-1;t>=0;t--){for(var i=a[t],r=!1,d=i.children||[],u=0;u<d.length;u++)if(d[u].getAttribute&&d[u].getAttribute("data-id")!==null){r=!0;break}r||ve&&(i===ve.parentNode||i.contains(ve))||i.parentNode&&i.parentNode.removeChild(i)}},treeDragOver:(n,l,a)=>{var t=n.options,i=l.clientX,r=l.clientY;if(!Se.isFiniteNumber(i)||!Se.isFiniteNumber(r))if(ut&&Se.isFiniteNumber(ut.clientX)&&Se.isFiniteNumber(ut.clientY))i=ut.clientX,r=ut.clientY;else return!1;var d=l.pageX!==void 0&&Se.isFiniteNumber(l.pageX)?l.pageX:i,u=document.elementFromPoint(i,r),s=u||a;s&&(s===ve||s.closest(".sortable-fallback"))&&(s=a);var c=Se.resolveTreeDrop(ve,s,l,t,d);if(Se._tree.dropInfo=c,c.isReject)return!1;var m=Se.resolveTreeInsert(c,c.hoverNode,t,r);if(!m.container)return!1;if(ve.contains(m.container))return Se._tree.dropInfo={isReject:!0,reason:"cycle-container"},!1;if(m.container===ve.parentNode&&(m.refNode===ve||m.refNode===ve.nextSibling))return!1;var p=m.refNode;return p?m.container.insertBefore(ve,p):m.container.appendChild(ve),Se.cleanupEmptyAutoRegions(n.el||document),!0},renderTreeIndicator:(n,l)=>{var a=n.options,t=Se._tree.dropInfo,i=document.body,r=i.querySelector(".darg-tree-indicator");if(!t||t.isReject||!t.hoverNode){r&&r.parentNode&&r.parentNode.removeChild(r);return}r||(r=Se.createElement("div"),r.className="darg-tree-indicator",i.appendChild(r)),Se._treeRegionCls(a);var d=t.hoverNode.getBoundingClientRect(),u=Number(a.extOption.tree.indentThreshold)||20,s=(t.targetDepth-t.hoverDepth)*u,c=d.left+s,m=d.width-s;m<20&&(m=20);var p=t.intent==="child"?d.bottom-1:d.top;r.style.cssText="position:fixed;pointer-events:none;z-index:100001;height:2px;background:#409eff;left:"+c+"px;top:"+p+"px;width:"+m+"px;border-radius:1px;"},clearTreeIndicator:()=>{var n=document.querySelector(".darg-tree-indicator");n&&n.parentNode&&n.parentNode.removeChild(n),Se._tree.dropInfo=null},resetTreeState:()=>{Se._tree.startPageX=0,Se._tree.startDragDepth=null,Se._tree.startLeftPage=null,Se._tree.depthCache=null,Se._tree.dropInfo=null,Se.clearTreeIndicator(),Se.cleanupEmptyAutoRegions(document)}};De.mount(new Er);De.mount(Yo,jo);const Cr=["id"],Cl=e.defineComponent({name:"ClDarg",__name:"Index",props:{id:String,className:String,group:[String,Object],dargRegionCls:{type:String,default:".darg-region"},handleCls:{type:String,default:".darg-handle"},selectCls:{type:String,default:"darg-select"},placeholderCls:{type:String,default:"darg-placeholder"},isBoundaryOut:{type:Boolean,default:!0},boundaryElement:String,isWrapBody:{type:Boolean,default:!0},wrapBodyElement:String,isDisabledInner:{type:Boolean,default:!1},isDisabledOutsideInto:{type:Boolean,default:!1},isGroupSameStruct:{type:Boolean,default:!0},keyAttrId:{type:String,default:"data-id"},animation:{type:Number,default:150},groupDropEndBeforeCallback:Function,isTree:{type:Boolean,default:!1},maxDepth:{type:Number,default:3},indentThreshold:{type:Number,default:20},isOnlyInnerMove:{type:Boolean,default:!1},isDragToChild:{type:Boolean,default:!0},isDragToParent:{type:Boolean,default:!0}},emits:{onChangeSort:n=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTop"),u={sortableObj:null},s=e.computed(()=>{let h={"panel-darg":!0};return h=o.getJsonMerge(h,me.getClassNameJson(t.className)),h}),c=()=>{const h=d.value;if(!h)return[];const y=t.keyAttrId||"data-id",E=t.dargRegionCls||".darg-region",L=M=>{const N={id:M.getAttribute(y)||"",children:[]};return Array.from(M.children).filter(V=>V.matches&&V.matches(E)).forEach(V=>{Array.from(V.children).forEach(w=>{w.matches&&w.matches("li,[data-id]")&&N.children.push(L(w))})}),N},B=[];return Array.from(h.querySelectorAll(E)).filter(M=>{let N=M.parentElement;for(;N&&N!==h;){if(N.matches&&N.matches(E))return!1;N=N.parentElement}return!0}).forEach(M=>{Array.from(M.children).forEach(N=>{N.matches&&N.matches("li,[data-id]")&&B.push(L(N))})}),B},m=()=>{if(t.isTree){i("onChangeSort",c());return}const h=u.sortableObj?.toArray?.()||[];i("onChangeSort",h)},p=()=>{e.nextTick(()=>{let h=null;try{if(h=d.value?.querySelector(t.dargRegionCls||".darg-region"),!h){we.warn("ClDarg","未找到拖拽区域元素:",t.dargRegionCls||".darg-region"),i("onError","未找到拖拽区域元素");return}const{group:y,placeholderCls:E,handleCls:L,selectCls:B,isBoundaryOut:I,boundaryElement:M,isWrapBody:N,wrapBodyElement:b,isDisabledInner:V,isDisabledOutsideInto:w,isGroupSameStruct:T,groupDropEndBeforeCallback:C,keyAttrId:D,isTree:J,maxDepth:ne,indentThreshold:K,isOnlyInnerMove:P,isDragToChild:x,isDragToParent:A}=t;let f=T;J&&!T&&(f=!0,we.warn("ClDarg","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true(原值 false 被忽略)"),i("onError","树形拖拽仅支持同结构,isGroupSameStruct 已被强制为 true"));const S={sort:!V,forceFallback:!0,fallbackOnBody:N,fallbackTolerance:0,handle:L,ghostClass:E,chosenClass:B,dragClass:"darg-moveing",animation:t.animation,dataIdAttr:D,extOption:{boundary:{isOut:I,element:M,x:5,y:20},wrapBody:{isWrap:N,element:b},cross:{isCross:!1,isSameStruct:f,dropEndBeforeCallback:C||null},tree:{isTree:J,maxDepth:ne,indentThreshold:K,isOnlyInnerMove:P,isDragToChild:x,isDragToParent:A,rootId:r||""}},onUpdate:()=>{m()}};if(y&&!o.isEmpty(y))if(S.extOption.cross.isCross=!0,w){const k=o.isObject(y)?y.name:y;S.group={name:k,pull:"clone",put:!1},S.animation=0}else S.group=y;u.sortableObj=new De(h,S)}catch(y){we.warn("ClDarg","Sortable 初始化失败:",y),i("onError","拖拽组件初始化失败")}})};return e.onMounted(()=>{p()}),e.onUpdated(()=>{if(!u.sortableObj)return;const h=d.value?.querySelector(t.dargRegionCls||".darg-region");if(h&&u.sortableObj.el!==h){try{u.sortableObj.destroy()}catch(y){we.warn("ClDarg","重建前销毁旧实例失败:",y)}u.sortableObj=null,p()}}),e.onBeforeUnmount(()=>{if(u.sortableObj){try{u.sortableObj.destroy()}catch(h){we.warn("ClDarg","销毁拖拽实例失败:",h)}u.sortableObj=null}}),l({getArrSort:()=>t.isTree?c():u.sortableObj?.toArray?u.sortableObj.toArray():[]}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTop",ref:d,id:e.unref(r),class:e.normalizeClass(s.value)},[e.renderSlot(h.$slots,"default")],10,Cr))}}),br=["id"],xr={key:0,class:"divider-text"},bl=e.defineComponent({name:"ClDivider",__name:"Index",props:{id:String,className:String,dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center",validator:n=>["center","left","right"].indexOf(n)!==-1},margin:{type:[Number,String],default:16},theme:{type:String,default:"default"},lineColor:String,textColor:String},emits:["onClick"],setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.useSlots(),d=e.computed(()=>{const m=r.default?.();return Array.isArray(m)&&m.length>0}),u=e.computed(()=>{const m={"panel-divider":!0,"panel-divider--dashed":a.dashed,"panel-divider--hairline":a.hairline,"panel-divider--left":a.contentPosition==="left","panel-divider--right":a.contentPosition==="right","panel-divider--text":d.value,"panel-divider--gold":a.theme==="gold"};return o.getJsonMerge(m,me.getClassNameJson(a.className))}),s=e.computed(()=>{const m=a.margin,p=o.isFinite(m)?`${m}px`:String(m??""),g={marginLeft:p,marginRight:p};return o.isNonEmptyString(a.lineColor)&&(g["--divider-line-color"]=a.lineColor),o.isNonEmptyString(a.textColor)&&(g["--divider-text-color"]=a.textColor),g}),c=()=>{t("onClick")};return(m,p)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(u.value),style:e.normalizeStyle(s.value),onClick:c},[d.value?(e.openBlock(),e.createElementBlock("span",xr,[e.renderSlot(m.$slots,"default")])):e.createCommentVNode("",!0)],14,br))}}),Br=["id"],Ir=["title"],qo=e.defineComponent({name:"ClEllipsis",directives:{cltooltip:dt},__name:"Index",props:{id:String,className:String,text:String,lines:{type:Number,default:1},isUseTooltipAuto:{type:Boolean,default:!1},tooltipTheme:String,tooltipPosition:String,tooltipTrigger:String,tooltipIsHtml:{type:Boolean,default:!1},tooltipHtml:String,isShowNativeTitle:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElParent"),i=e.useTemplateRef("refElSpan"),r=e.reactive({isPosParent:!1,isPosSpan:!1,isUseTooltip:!1,isUseTooltipAuto:l.isUseTooltipAuto}),d=e.computed(()=>r.isUseTooltip?"":l.isShowNativeTitle&&l.text||""),u=e.computed(()=>{if(!o.isFinite(l.lines))return 1;const p=Number(l.lines);return p===1||p===2||p===3?p:1}),s=e.computed(()=>{let p={"panel-ellipsis":!0,"ellipsis-txt-title":!0};return p[`ellipsis-txt-lines-${u.value}`]=!0,l.tooltipTrigger==="click"&&(p["ellipsis-txt-click"]=!0),p=o.getJsonMerge(p,me.getClassNameJson(l.className)),p}),c=()=>{const p=Je.getGlobalConfig("ellipsis");p&&o.isExistJsonKey(p,"isUseTooltipAuto")&&(r.isUseTooltipAuto=p.isUseTooltipAuto)},m=()=>{if(r.isUseTooltipAuto&&l.text&&l.text.length>0&&t.value&&i.value)if(u.value>1){const p=i.value,g=p.clientHeight;p.style.webkitLineClamp="unset";const h=p.offsetHeight;p.style.webkitLineClamp="";const y=h>g;r.isUseTooltip=y,r.isPosSpan=!0,r.isPosParent=!1}else{const p=t.value.clientWidth,g=i.value.offsetWidth;if(p>0&&g>0){const h=p>=g,y=p<g;r.isUseTooltip=y,r.isPosSpan=h,r.isPosParent=y}}};return e.onMounted(()=>{e.nextTick(()=>{c(),m()})}),e.watch(()=>l.text,()=>{e.nextTick(()=>{m()})}),e.watch(()=>l.isUseTooltipAuto,p=>{r.isUseTooltipAuto=p,p||(r.isUseTooltip=!1),e.nextTick(()=>{m()})}),e.watch(()=>l.lines,()=>{e.nextTick(()=>{m()})}),(p,g)=>{const h=e.resolveDirective("cltooltip");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElParent",ref:t,id:e.unref(a),class:e.normalizeClass(s.value)},[e.withDirectives((e.openBlock(),e.createElementBlock("span",{ref_key:"refElSpan",ref:i,class:e.normalizeClass(`ellipsis-txt-lines-${u.value}`),title:d.value},[e.createTextVNode(e.toDisplayString(n.text),1)],10,Ir)),[[h,{init:r.isUseTooltip&&r.isPosSpan,html:n.tooltipHtml||n.text,theme:n.tooltipTheme,position:n.tooltipPosition,trigger:n.tooltipTrigger,isHtml:n.tooltipIsHtml}]])],10,Br)),[[h,{init:r.isUseTooltip&&r.isPosParent,html:n.tooltipHtml||n.text,theme:n.tooltipTheme,position:n.tooltipPosition,trigger:n.tooltipTrigger,isHtml:n.tooltipIsHtml}]])}}}),Dr=["id"],Tr={key:0,class:"empty-description"},Nr={key:1,class:"empty-footer"},Vr=80,xl=e.defineComponent({name:"ClEmpty",__name:"Index",props:{id:String,className:String,description:String,imageSize:{type:Number,default:80}},setup(n){const l=n,a=l.id,t=e.useSlots(),i=e.computed(()=>o.isNonEmptyString(l.description)?l.description:""),r=e.computed(()=>{const s=t.default?.();return Array.isArray(s)&&s.length>0}),d=e.computed(()=>{const s={"panel-empty":!0};return o.getJsonMerge(s,me.getClassNameJson(l.className))}),u=e.computed(()=>{const s=o.isFinite(l.imageSize)&&l.imageSize>0?l.imageSize:Vr;return{width:`${s}px`,height:`${s}px`}});return(s,c)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(d.value)},[e.createElementVNode("div",{class:"empty-image",style:e.normalizeStyle(u.value)},[e.renderSlot(s.$slots,"image",{},()=>[c[0]||(c[0]=e.createElementVNode("i",{class:"empty-image-default clIconFont clIcon-empty"},null,-1))])],4),i.value?(e.openBlock(),e.createElementBlock("div",Tr,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",Nr,[e.renderSlot(s.$slots,"default")])):e.createCommentVNode("",!0)],10,Dr))}}),Mr=["id"],Xo=e.defineComponent({name:"ClForm",__name:"Index",props:{id:String,theme:String,className:String,isAwaitRun:{type:Boolean,default:!0},preScroll:Number,pElError:String,isScrollToErr:{type:Boolean,default:!0}},emits:["submit"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTop"),u=e.reactive({isRun:!t.isAwaitRun}),s={_scrollUpAnimate:null,parentScroll:null,isScrollWindow:!0,tabindexEls:new Set},c=e.computed(()=>{const I={"data-cl-validate":""};return u.isRun&&(I["data-run"]=""),o.isNonEmptyString(t.theme)&&(I["data-theme"]=t.theme),I}),m=e.computed(()=>{let I={"panel-form":!0,"form-validate":!0};return I=o.getJsonMerge(I,me.getClassNameJson(t.className)),I}),p=()=>{i("submit")},g=I=>{const M=I.querySelector('input:not([type="hidden"]), select, textarea');return M instanceof HTMLElement?M:I},h=I=>{let M=!0;u.isRun&&I instanceof HTMLElement&&d.value?.contains(I)&&I.runValidate&&(M=!!I.runValidate());const N=g(I);return M?N.removeAttribute("aria-invalid"):N.setAttribute("aria-invalid","true"),M},y=()=>{const I=d.value?.querySelectorAll("[data-validate-error]");if(!o.isUndefined(I)&&I.length>0){let M=I[0];const{preScroll:N,pElError:b}=t,V=!o.isEmpty(M.pElError),w=!o.isEmpty(b);if(V||w){const ne=me.getParent(M,V?M.pElError:b,d.value);o.isUndefined(ne)||(M=ne)}const C=me.getOffset(M,s.isScrollWindow?null:s.parentScroll).top-10-(N??0),D=s._scrollUpAnimate,J=s.parentScroll;D&&J&&(D.stop(),D.start(J.scrollTop,C,200)),M.tabIndex<0&&(M.setAttribute("tabindex","-1"),s.tabindexEls.add(M)),M.focus({preventScroll:!0})}},E=()=>{const I=me.getParentScrollList(d.value,null,!1);s.isScrollWindow=I.length===0;const M=s.isScrollWindow?document.documentElement:I[0];s.parentScroll=o.isUndefined(M)?document.documentElement:M,s._scrollUpAnimate=new Za.AnimateEasing({runIngCallback:N=>{const b=s.parentScroll;b&&(b.scrollTop=N)}})};return e.onMounted(()=>{e.nextTick(()=>{E()})}),e.onBeforeUnmount(()=>{s._scrollUpAnimate?.stop()}),l({validate:I=>Pi.promiseFun(M=>{let N=!0;try{if(o.isUndefined(I))u.isRun=!0,e.nextTick(()=>{u.isRun=!0;try{const b=d.value?.querySelectorAll("[data-validate-el]");!o.isUndefined(b)&&b.length>0&&b.forEach(V=>{h(V)||(N=!1)}),N||t.isScrollToErr&&e.nextTick(()=>{try{y()}catch{}}),M(N)}catch{M(!1)}});else{u.isRun=!0;const b=I;e.nextTick(()=>{try{N=h(b),!N&&t.isScrollToErr&&e.nextTick(()=>{try{y()}catch{}}),M(N)}catch{M(!1)}})}}catch{M(!1)}}),reset:()=>{u.isRun=!1,s._scrollUpAnimate?.stop(),d.value?.removeAttribute("data-run");const I=d.value?.querySelectorAll("[data-validate-el]");!o.isUndefined(I)&&I.length>0&&I.forEach(M=>{if(g(M).removeAttribute("aria-invalid"),M.runReset)try{M.runReset()}catch{}}),s.tabindexEls.forEach(M=>{M.removeAttribute("tabindex")}),s.tabindexEls.clear()}}),(I,M)=>(e.openBlock(),e.createElementBlock("form",e.mergeProps({ref_key:"refElTop",ref:d,autocomplete:"off",novalidate:"",onSubmit:e.withModifiers(p,["prevent"]),id:e.unref(r),class:m.value},c.value),[e.renderSlot(I.$slots,"default")],16,Mr))}}),Or=["id","aria-labelledby"],_r={key:0,class:"tip-must"},Ar=["id"],Kn=e.defineComponent({name:"ClFormGroupHorizontal",__name:"Index",props:{id:String,className:{type:String,default:""},colRatio:{type:String,default:"2:10"},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id;let t;l.id&&(t=`${a}-label`);const i=e.computed(()=>{let c={"panel-form-group-horizontal":!0,"form-group":!0,"form-group-plaintext":l.isPlaintext,row:!0};return c=o.getJsonMerge(c,me.getClassNameJson(l.className)),c}),r=e.computed(()=>l.colRatio.split(":")),d=e.computed(()=>{const c=r.value,m=s(c[0],2),p={"control-label":!0};return p[`col-sm-${m}`]=!0,p[`col-${m}`]=!0,p}),u=e.computed(()=>{const c=r.value,m=s(c[1],10),p={"form-group-content":!0};return p[`col-sm-${m}`]=!0,p[`col-${m}`]=!0,p}),s=(c,m)=>{if(!o.isNonEmptyString(c))return m;const p=parseInt(c,10);return isNaN(p)||p<1||p>12?m:p};return e.watch(r,([c,m])=>{if(!o.isNonEmptyString(c)||!o.isNonEmptyString(m))return;const p=parseInt(c,10),g=parseInt(m,10);if(isNaN(p)||isNaN(g)||p<1||p>12||g<1||g>12){we.warn("ClFormGroupHorizontal",`colRatio 值 "${c}:${m}" 不在 1-12 有效范围内,已使用默认值 2:10`);return}p+g!==12&&we.warn("ClFormGroupHorizontal",`colRatio 两值之和需为 12(当前 ${p}+${g}=${p+g}),布局可能出现异常`)},{immediate:!0}),(c,m)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(i.value),role:"group","aria-labelledby":e.unref(t)},[e.createElementVNode("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("span",null,[n.isTipMust?(e.openBlock(),e.createElementBlock("span",_r,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"control-label-text",id:e.unref(t)},e.toDisplayString(n.label),9,Ar),e.renderSlot(c.$slots,"labelExtend")])],2),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[e.renderSlot(c.$slots,"default")],2)],10,Or))}}),Lr={key:0,class:"form-group-btns-fixed"},$r=["id"],Fr=["id"],Bl=e.defineComponent({name:"ClFormGroupBtns",__name:"Index",props:{id:String,className:{type:String,default:""},isFixed:{type:Boolean,default:!1},isHorizontal:{type:Boolean,default:!1},colRatioHorizontal:String},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"form-group-btns":!0};return o.getStringByJson(o.getJsonMerge(i,me.getClassNameJson(l.className))," ")});return(i,r)=>n.isHorizontal?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isFixed?(e.openBlock(),e.createElementBlock("div",Lr,[e.createElementVNode("div",null,[e.createVNode(Kn,{id:e.unref(a),className:t.value,colRatio:n.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["id","className","colRatio"])])])):(e.openBlock(),e.createBlock(Kn,{key:1,id:e.unref(a),className:t.value,colRatio:n.colRatioHorizontal},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["id","className","colRatio"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isFixed?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(a),class:"form-group-btns-fixed"},[e.createElementVNode("div",{class:e.normalizeClass(t.value)},[e.renderSlot(i.$slots,"default")],2)],8,$r)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(a),class:e.normalizeClass(t.value)},[e.renderSlot(i.$slots,"default")],10,Fr))],64))}}),Pr=["id","aria-labelledby"],Rr={class:"form-group-title"},Hr={key:0,class:"tip-must"},Ur=["id"],zr={class:"form-group-content"},Il=e.defineComponent({name:"ClFormGroupVertical",__name:"Index",props:{id:String,className:{type:String,default:""},label:String,isTipMust:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"form-group":!0,"form-group-vertical":!0,"form-group-plaintext":l.isPlaintext};return o.getJsonMerge(i,me.getClassNameJson(l.className))});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value),role:"group","aria-labelledby":`${e.unref(a)}-label`},[e.createElementVNode("div",Rr,[n.isTipMust?(e.openBlock(),e.createElementBlock("span",Hr,"*")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"form-group-title-label",id:`${e.unref(a)}-label`},e.toDisplayString(n.label)+":",9,Ur),e.renderSlot(i.$slots,"labelExtend")]),e.createElementVNode("div",zr,[e.renderSlot(i.$slots,"default")])],10,Pr))}}),Jr={required:n=>!o.isEmpty(n),number:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i.test(a)}return l},integer:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^-?\d+$/.test(a)}return l},integerPositive:n=>{let l=!0;if(!o.isEmpty(n)){const a=o.removeReplace(n);l=/^[1-9]\d*$/.test(a)}return l},alphanum:n=>{let l=!0;return o.isEmpty(n)||(l=/^\w+$/i.test(n)),l},email:n=>{let l=!0;return o.isEmpty(n)||(l=/^((([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&"\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)),l},minLen:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=n.length>=parseInt(l,10)),a},maxLen:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=n.length<=parseInt(l,10)),a},minByte:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=o.getByteLen(n)>=parseInt(l,10)),a},maxByte:(n,l)=>{let a=!0;return o.isEmpty(n)||(a=o.getByteLen(n)<=parseInt(l,10)),a},minGreater:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)>parseFloat(l)}return a},maxGreater:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)<parseFloat(l)}return a},minGreaterEqual:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)>=parseFloat(l)}return a},maxGreaterEqual:(n,l)=>{let a=!0;if(!o.isEmpty(n)){const t=o.removeReplace(n);a=parseFloat(t)<=parseFloat(l)}return a},phone:n=>{let l=!0;return o.isEmpty(n)||(l=/^1[3-9]\d{9}$/.test(n)),l},equalto:(n,l)=>!o.isEmpty(n)&&!o.isEmpty(l)?n===l:!0,regular:(n,l)=>{let a=!0;return!o.isEmpty(n)&&!o.isEmpty(l)&&(a=new RegExp(l,"g").test(n)),a},urlHttp:n=>{let l=!0;return o.isEmpty(n)||(l=/^(http|https):\/\/[^\s]+$/.test(n)),l},bareDomain:n=>{let l=!0;if(!o.isEmpty(n)){const a=n.toLowerCase();l=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i.test(a)}return l}},Dl=(n={})=>({type:o.isEmpty(n.type)?"tip":n.type,rules:o.getJsonMerge(Jr,n.rules),messages:o.getJsonMergeDeep({},n.messages)}),Kr={key:1,class:"error-text-el"},Yn=e.defineComponent({name:"ClFormValidate",directives:{cltooltip:dt},__name:"Validate",props:{className:String,checkValue:[String,Number],rules:{type:Array,default:()=>[]},isCheck:{type:Boolean,default:!0},msgElementId:String,msgType:{type:String,validator:n=>["tip","text"].includes(n)},pElError:String,isShowMsg:{type:Boolean,default:!0}},setup(n,{expose:l}){const a=n,{optPageLanguage:t,getPageLanguage:i,getLanguageType:r}=Le();i("validate");const d=e.inject("$ClGlobals",null),u=e.useTemplateRef("refElTop"),s=e.useTemplateRef("refElMsg"),c=e.reactive({type:"",msgHtml:"",check:0}),m={form:null},p={rules:{},messages:{}};let g=null;const h=()=>{if(o.isUndefined(g)){let k=Dl();const v=d?.validate;v&&(o.isEmpty(v.rules)&&o.isEmpty(v.messages)?(o.isNonEmptyString(v.type)&&(k={...k,type:v.type}),we.warn("ClFormValidate","[cl-form-validate] 全局校验规则表($ClGlobals.validate)缺少 rules/messages,已回退内置默认规则")):k={...k,type:v.type??k.type,rules:v.rules??k.rules,messages:v.messages??k.messages});const F=Je.getGlobalConfig("formValidate"),_=F?.rules||{},O=F?.messages||{};g={...k,type:F?.type??k.type,rules:o.getJsonMerge(k.rules,_),messages:o.getJsonMergeDeep(k.messages,O)},!v&&o.isEmpty(_)&&o.isEmpty(O)&&!o.isNonEmptyString(F?.type)&&we.warn("ClFormValidate","[cl-form-validate] 未检测到全局校验规则表($ClGlobals.validate / setGlobalConfig({ formValidate })),已回退内置默认规则")}return g},y=e.computed(()=>{const S={"data-validate-el":""};if(a.isCheck){switch(c.check){case 1:S["data-validate-success"]="";break;case 2:S["data-validate-error"]="";break}S["aria-invalid"]=c.check===2?"true":"false"}return S}),E=e.computed(()=>{const S={};return a.isCheck&&(S["panel-form-validate"]=!0),o.getJsonMerge(S,me.getClassNameJson(a.className))}),L=e.computed(()=>{const S={"panel-validate-errors":!0};return S[`validate-errors-${c.type}`]=!0,S}),B=e.computed(()=>c.msgHtml.replace(/<[^>]*>/g," ").trim()),I=S=>{if(!o.isArray(S)){we.warn("ClFormValidate","[cl-form-validate] rules 应为数组,已忽略");return}const k={},v={};S.forEach(F=>{if(typeof F=="string"){if(!o.isEmpty(F))if(o.isExistValue(F,"|")){const _=F.split("|");k[_[0]]=_[1],_.length>2&&we.warn("ClFormValidate",'[cl-form-validate] 字符串规则 "'+F+'" 含多个参数段,仅取前两段,建议改用对象形式')}else k[F]=""}else if(typeof F=="object"&&!o.isUndefined(F)){let _=!0;o.isBoolean(F.isCheck)?_=F.isCheck===!0:(F.isCheck==="false"||F.isCheck==="0")&&(_=!1),!o.isEmpty(F.r)&&_&&(k[F.r]=String(F.p??""),o.isEmpty(F.m)||(v[F.r]=F.m??""))}}),p.rules=k,p.messages=v},M=()=>{const S=[],k={},v={};if(u.value&&!o.isEmpty(u.value.dataset)&&Object.keys(u.value.dataset).forEach(F=>{if(F.indexOf("validate")===0){const O=F.replace(/[A-Z]/g,q=>`-${q.toLowerCase()}`).split("-");if(O.length===3){const q=O[2].toLowerCase(),X=u.value.dataset[F];switch(O[1]){case"check":!o.isEmpty(X)&&X.toLowerCase()==="false"&&S.push(q);break;case"param":k[q]=X;break;case"message":v[q]=X;break}}}}),!o.isEmpty(p.rules)&&(!o.isEmpty(S)||!o.isEmpty(k))){const F={};for(const[_,O]of Object.entries(p.rules)){const q=_.toLowerCase();o.isExistValue(S,q)||(F[_]=o.isExistJsonKey(k,q)?k[q]:O)}p.rules=F}if(!o.isEmpty(p.messages)&&!o.isEmpty(v)){const F={};for(const[_,O]of Object.entries(p.messages)){const q=_.toLowerCase();F[_]=o.isExistJsonKey(v,q)?v[q]:O}p.messages=F}},N=S=>{const k={},v=h().rules??{};if(!o.isEmpty(p.rules)){const F=o.isEmpty(S)||o.getTypeof(S)==="number"&&o.isNaN(S),_=F?"":o.trim(S);for(const[O,q]of Object.entries(p.rules))if(o.isExistJsonKey(v,O)&&o.isFunction(v[O])){let X=!0;O==="required"?X=v.required(_):F||(X=v[O](_,q)),X||(k[O]=q)}else we.warn("ClFormValidate",'[cl-form-validate] 校验规则 "'+O+'" 未注册或非函数,已跳过')}return k},b=()=>{i("validate");const S=e.toRaw(t.value),k=e.toRaw(h().messages??{}),v=r(),F=o.isExistJsonKey(k,v.type)||o.isExistJsonKey(k,v.def)?o.getJsonMerge({},k[v.def]||{},k[v.type]||{}):k;return o.getJsonMerge({},S,F)},V=S=>{const k=b(),v=[];return Object.keys(S).forEach(F=>{let _="";if(o.isNonEmptyString(p.messages[F])?_=p.messages[F]:o.isNonEmptyString(k[F])&&(_=k[F]),!o.isEmpty(_)){const O=S[F],q=o.isExistValue(_,"%s")?_.replace(/%s/g,o.isEmpty(O)?"":String(O)):_;v.push(q)}}),v},w=()=>(m.form&&!m.form.isConnected&&(m.form=null),o.isUndefined(m.form)&&u.value&&(m.form=me.getParent(u.value,"form")),m.form),T=()=>{w();let S=h().type;m.form&&!o.isEmpty(m.form.dataset.theme)&&(S=m.form.dataset.theme),o.isNonEmptyString(a.msgType)&&(S=a.msgType),S!=="tip"&&S!=="text"&&(S="tip"),c.type=S},C=()=>{let S=!0;return w(),!o.isUndefined(m.form)&&m.form&&(o.isUndefined(m.form.dataset.clValidate)||(S=!o.isUndefined(m.form.dataset.run))),S},D=S=>{const k=o.isNonEmptyString(S)?S:"";if(o.isEmpty(k))c.msgHtml="",c.check=1;else if(c.msgHtml=k,c.check=2,o.isNonEmptyString(a.msgElementId))try{const v=window.document.querySelector(a.msgElementId);v?e.nextTick(()=>{s.value&&v.isConnected?v.appendChild(s.value):s.value&&we.warn("ClFormValidate","[cl-form-validate] msgElementId 目标已脱离文档:"+a.msgElementId+",消息展示在组件内部")}):we.warn("ClFormValidate","[cl-form-validate] 未找到 msgElementId 目标元素:"+a.msgElementId+",消息展示在组件内部")}catch{we.warn("ClFormValidate","[cl-form-validate] msgElementId 选择器无效:"+a.msgElementId)}},J=()=>{c.msgHtml="",c.check=0},ne=(S,k)=>{let v="";if(!o.isEmpty(S))switch(k){case"tip":v=S.map(F=>`<div>${F}</div>`).join("");break;case"text":v=S.join(",");break}return v},K=()=>{let S=!0;try{if(a.isCheck&&C()){T(),M();const k=N(a.checkValue);if(S=o.isEmpty(k),S)D("");else{let v=ne(V(k),c.type);if(o.isEmpty(v)){const F=Object.keys(k)[0];v=o.isNonEmptyString(F)?F:"校验未通过"}D(v)}}else J()}catch{we.warn("ClFormValidate","[cl-form-validate] 校验执行异常,已按未通过处理"),J(),S=!1}return S},P=()=>{if(I(a.rules||[]),w(),u.value){const S=u.value;S.pElError=a.pElError,S.runValidate=K,S.runErrMsg=A,S.runReset=f}};e.onMounted(()=>{e.nextTick(()=>{P()})}),e.onBeforeUnmount(()=>{s.value?.remove()}),e.watch(()=>a.checkValue,()=>{K()}),e.watch([()=>a.rules,()=>a.isCheck],([S])=>{I(S||[]),K()},{deep:!0});const x=()=>K(),A=S=>{T(),D(S)},f=()=>{T(),J()};return l({runValidate:x,runErrMsg:A,runReset:f}),(S,k)=>{const v=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"refElTop",ref:u,class:E.value},y.value),[e.renderSlot(S.$slots,"default"),c.msgHtml.length>0&&n.isShowMsg?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElMsg",ref:s,class:e.normalizeClass(L.value),role:"alert"},[c.type==="tip"?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:"exclamation-circle-fill",class:"error-tip-el",role:"img","aria-label":B.value},null,8,["aria-label"])),[[v,c.msgHtml]]):c.type==="text"?(e.openBlock(),e.createElementBlock("span",Kr,e.toDisplayString(c.msgHtml),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],16)}}}),tt={loading:"data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==",error:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABbFJREFUaEPtWV1sFFUUPufOLmjpD7G0nXtm11igD0Q0CpqImsiDEcGoIVEReeBBNGgkEQSjwUR4MQZ/MBr/MeFFFIkxYAR9MGr84cFijBJ9UFPD7r3TqtWWLsVuO3PM3ew20+3uzizTxpDsTSa7e+ec75zvnPtz7l2E87zhee4/NAj83xlsZKCRgZgRaAyhmAGMrV4zA5lM5sJEItGcz+dbhBDN5gGAZkRsQcTCd/Mwc0vpu+k3v5l5yHGcDUEPtdY7AeAsIp4t/5yYmCj0myefz//LzGfNY/p7enrGqjGtSEAp9ZgQYgsz07mGiJk3OY7zVklfKbULEZ88FzxE1L7vv+Q4ztPl+tMIZLPZFUKIb87FUFBHCLHQtu2+Up/WmuNi+r5/bSqVOh7EmUZAa70VAJ6PYwwRJ6SUyRKG67odzPxHHMyi7jYi2luTgOu6O5h5T1xjiLhDSvlsIAOfAcDKOLiI+KiU8pmwDGwGgFfjGCrqDhLRgkAWHmTml2PiPkBEr4URuAcA3o5pqKR+PxG9aX7M0DDaQEQHahJQSt2KiEdmiMA7RGQCUmha61jDiJlvcxznw7A5cAMzfz4TBHzfvzGVSn1qsDKZzErLsgyBac0skwBwwvf9HCKuBoD5VeRWSim/CMvAMkQ8MQME+ohoYZToE9HkapjNZq9AxFcQcUW5D8y83HGc72oSyGQyiy3L+qUeAsx8yMgj4p0BvZ1E9FRY9Jl5t+M4u4L2tNaPA0BBN9g8z+tJp9O/1iTQ39/f6fv+QB0ExoQQS4aGhv5qa2s7zsyXGl0hRJdt24W1P2TsbyWiF4L2lFL3IuK+ch+CmKV30zYyU/9YljVaB4EDRFSoeUrj3CwCUsrbw6JftPE9EV1ZloFhAGitkIGmdDpt6qjJVrEWcl03z8yTO2kImTuI6P2STDabfUQIsYqIbjJ91aJZhjkCANuZeSkArEbExeU2EXFcSjlnWn8l55RSg4h4UVgWELHPtu1FiDilzlFKmaxsNEa11ksA4KcwrLD3zPy34zjtkQhorU0RdkkYqJloRGRK5ClNKXUxIposFDax8kIOEfczcxsArI1goyTyOxF1RyKglPoBES+LAH4VEVVccrXWa4nogyKBXgBYXnR8DxH9XOz/EgCuj2AHmPlHx3Euj0RAa/0VAFwXAvw1EdU03tfXN7+7u3tIa73X87zD6XR6ygaZzWavEUJMKY9r2Kxor9okPsrMZkes1TYT0etRoldLxnXdF5l5SxgOIh6TUq6JlAGl1EFEvKsWqO/7C1Kp1GCY4bD3zDzHdd2TANBTS5aZ33McZ10kAlprM/k2VQNExENSypoEwxwPvndddyMz7w/R2UdE90UlYE5k5mRWsVWqCutxuJKs1tqUyetr4Owlom2RCLiuu4uZqx3A/yGi0D2iXkKnTp1amkgkTKVZERsRd0spp9RMxkbFSVzcTSePg2XOFNbjwcFBs9W35vP5Vs/z2oQQrYjY6vt+4dOs86ZI01o/AQA5Zs5ZljUyMTGRE0KMmN/JZHJkdHQ019TUNNLZ2ZmrVTP5vr89lUo9FykDWmsz1t6oN4pBeSHE+vHx8cN11lW1TE6e7oJCFTPQ39+/zvf9d+MQYOZlxc2rsBvHbUKIu23bPhgpA67rrmHmj2IY/bNYihiMWDcRJR8Q8RYp5dFIBAYGBhZ5njfl4FAvGSnlBUqph4QQ1eZSXZCWZS3u6ur6LRIBI6S1/hgAVkW0wsx8GhFPA8AIIuYA4OTw8PDDLS0txxBxXukutXiPOi8ibknsEyK6uZJO1ctds8qMjY2Zc+nVAFBwzjjJzCOJRCKXz+fPJJNJ46h5zti2fSaqU729vcmOjo5my7LmBS6MDSlzcdzseV7w8vjbuXPnHm9vbzfBmdYa/w9EjfpsyTUyMFuRjYrbyEDUSM2WXCMDsxXZqLjnfQb+A8eWU0/QfZYsAAAAAElFTkSuQmCC",attr:{timeOutId:"data-lazy-timeout-id"}};class Tl{options={loading:tt.loading,error:tt.error,observerOptions:{rootMargin:"0px",threshold:0},log:!1,callback:{}};_images=new WeakMap;constructor(l){this.config(l)}config(l={}){this.options=o.getJsonMergeDeep(this.options,l)}_initValue(l,a){let t="",i=this.options.loading,r=this.options.error,d=this.options.callback,u=this.options.delay;return o.isObject(l)?(t=l.src,i=o.isUndefined(l.loading)?this.options.loading:l.loading,r=o.isUndefined(l.error)?this.options.error:l.error,d=o.isUndefined(l.callback)?this.options.callback:l.callback,u=o.isUndefined(l.delay)?this.options.delay:l.delay):o.isString(l)?t=l:o.isUndefined(l)&&(t=a&&a.src||""),{src:t,loading:i,error:r,callback:d,delay:u}}mount(l,a){if(o.isUndefined(l))return;const t=o.isString(a)?a:a.value,{src:i,loading:r,error:d,callback:u,delay:s}=this._initValue(t,l);if(this._setCallback(l,"loading",u),l.setAttribute("src",r||tt.loading),!this._checkIntersectionObserver()){this._setImageSrc(l,i,d,u),this._log(()=>{throw new Error("Not support IntersectionObserver!")});return}this._initIntersectionObserver(l,i,d,u,s)}update(l,a){if(o.isUndefined(l))return;this._realObserver(l)?.unobserve(l),l.hasAttribute(tt.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(tt.attr.timeOutId))),l.removeAttribute(tt.attr.timeOutId));const t=o.isString(a)?a:a.value,{src:i,error:r,callback:d,delay:u}=this._initValue(t,l);this._initIntersectionObserver(l,i,r,d,u)}unmount(l){if(!o.isUndefined(l)){if(this._realObserver(l)?.unobserve(l),l.hasAttribute(tt.attr.timeOutId)&&(clearTimeout(Number(l.getAttribute(tt.attr.timeOutId))),l.removeAttribute(tt.attr.timeOutId)),l.tagName.toLowerCase()==="img"){const a=l;a.onload=null,a.onerror=null}this._images.delete(l)}}_setImageSrc(l,a,t,i){if(l.tagName.toLowerCase()==="img"){const r=l;o.isEmpty(a)?(r.onload=null,this._setCallback(r,"error",i),this._realObserver(r)?.disconnect(),t?r.setAttribute("src",t):r.removeAttribute("src")):(this.options.isCrossOrigin&&(r.crossOrigin="Anonymous"),a&&r.getAttribute("src")!==a&&r.setAttribute("src",a),r.onload=()=>{a&&this._setCallback(r,"loaded",i)},r.onerror=()=>{r.onload=null,this._setCallback(r,"error",i),this._realObserver(r)?.disconnect(),t&&r.getAttribute("src")!==t&&r.setAttribute("src",t),this._log(()=>{throw new Error(`Image failed to load!And failed src was: ${a} `)})})}else l.style.backgroundImage=`url('${a}')`}_setCallback(l,a,t){switch(l?.setAttribute("lazy",a),a){case"loading":t?.loading&&t.loading(l);break;case"loaded":t?.loaded&&t.loaded(l);break;case"error":t?.error&&t.error(l);break}}_realObserver(l){return this._images.get(l)}_checkIntersectionObserver(){if(typeof window<"u"&&window!==null&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){if(!("isIntersecting"in window.IntersectionObserverEntry.prototype))try{Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}})}catch{return!1}return!0}return!1}_initIntersectionObserver(l,a,t,i,r){const d=this.options.observerOptions;this._images.set(l,new IntersectionObserver(u=>{Array.prototype.forEach.call(u,s=>{r&&r>0?this._delayedIntersectionCallback(l,s,r,a,t,i):this._intersectionCallback(l,s,a,t,i)})},d)),this._realObserver(l)?.observe(l)}_intersectionCallback(l,a,t,i,r){a.isIntersecting&&(this._realObserver(l)?.unobserve(a.target),this._setImageSrc(l,t,i,r))}_delayedIntersectionCallback(l,a,t,i,r,d){if(a.isIntersecting){if(a.target.hasAttribute(tt.attr.timeOutId))return;const u=setTimeout(()=>{this._intersectionCallback(l,a,i,r,d),a.target.removeAttribute(tt.attr.timeOutId)},t);a.target.setAttribute(tt.attr.timeOutId,String(u))}else a.target.hasAttribute(tt.attr.timeOutId)&&(clearTimeout(Number(a.target.getAttribute(tt.attr.timeOutId))),a.target.removeAttribute(tt.attr.timeOutId))}_log(l){this.options.log&&l()}}const Nl=(n,l,a)=>{const t=new Tl(a);e.onMounted(()=>{e.nextTick(()=>{n.value&&t.mount(n.value,l)})}),e.onUnmounted(()=>{n.value&&t.unmount(n.value)}),e.watch(l,i=>{n.value&&t.update(n.value,i)})},Wr=["id"],jr=["alt"],Wn=e.defineComponent({name:"ClImage",__name:"Index",props:{id:{},className:{},src:{},alt:{},height:{},width:{},isCircle:{type:Boolean},fit:{},isCrossOrigin:{type:Boolean}},emits:["onInit"],setup(n,{emit:l}){const a=n,t=l,i=e.ref(o.isNonEmptyString(a.src)?a.src:""),r=e.useTemplateRef("refElImage"),d=e.computed(()=>o.isNonEmptyString(a.alt)?a.alt:""),u=a.id;Nl(r,i,{callback:{loaded:()=>{p()},error:()=>{p()}},isCrossOrigin:a.isCrossOrigin});const s=e.computed(()=>{let g={"panel-image":!0,"imageBox-circle":a.isCircle};return g=o.getJsonMerge(g,me.getClassNameJson(a.className)),g}),c=e.computed(()=>{const{width:g,height:h}=a,y={};return o.isNonEmptyString(g)&&(y.width=g),o.isNonEmptyString(h)&&(y.height=h),y}),m=e.computed(()=>{const{width:g,height:h,fit:y}=a,E={};return o.isNonEmptyString(y)&&(E["object-fit"]=y,o.isNonEmptyString(g)&&(E.width=g),o.isNonEmptyString(h)&&(E.height=h)),E});function p(){t("onInit")}return e.watch(()=>a.src,g=>{i.value=o.isNonEmptyString(g)?g:""}),(g,h)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(s.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("img",{ref_key:"refElImage",ref:r,alt:d.value,style:e.normalizeStyle(m.value)},null,12,jr)],14,Wr))}}),Yr=["id"],qr=["type","inputmode","name","value","placeholder","disabled","readonly"],Xr={key:0,class:"input-floating-label"},Gr={key:3,class:"input-suffix"},Eo=e.defineComponent({name:"ClInputContainer",components:{ClIconFont:ke},__name:"Container",props:{id:String,name:String,value:[String,Number],inputType:{type:String,default:"text"},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},placeholder:String,label:String,isFloating:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isShowSuffix:{type:Boolean,default:!1}},emits:["onInputText","onKeydown","onKeyup","onFocus","onBlur","onClear"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.computed(()=>{let V=t.name;return o.isEmpty(V)&&(V=`input_${o.getRandom(8)}`),V}),s=e.computed(()=>o.isEmpty(t.inputmode)?void 0:t.inputmode),c=e.computed(()=>{const V={};return o.isNonEmptyString(t.autocomplete)&&(V.autocomplete=t.autocomplete),V}),m=e.computed(()=>t.isClean&&!t.disabled&&!t.isReadonly),p=e.computed(()=>m.value&&!o.isEmpty(t.value)),g=e.computed(()=>t.isFloating?t.label||t.placeholder:""),h=e.computed(()=>({"input-container":!0,"input-clean":t.isClean,"input-suffix":t.isShowSuffix,"input-floating":t.isFloating})),y=V=>{const w=V.target;w&&i("onInputText",w.value)},E=V=>{i("onKeydown",V)},L=V=>{i("onKeyup",V)},B=()=>{i("onFocus")},I=()=>{i("onBlur")},M=()=>{i("onClear")};return l({getInputElement:()=>d.value,focus:()=>{d.value?.focus()}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(h.value)},[e.createElementVNode("input",e.mergeProps({ref_key:"refElInput",ref:d,type:n.inputType,inputmode:s.value,name:u.value},c.value,{class:"form-control",value:n.value,placeholder:n.placeholder,disabled:n.disabled,readonly:n.isReadonly,onInput:y,onKeydown:E,onKeyup:L,onFocus:B,onBlur:I}),null,16,qr),g.value?(e.openBlock(),e.createElementBlock("label",Xr,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(ke,{key:1,name:"close-circle-fill",class:"input-clear-icon","aria-label":"清除输入内容",role:"button",tabindex:"-1",onClick:e.withModifiers(M,["stop"]),onKeydown:[e.withKeys(e.withModifiers(M,["stop"]),["enter"]),e.withKeys(e.withModifiers(M,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.isShowSuffix?(e.openBlock(),e.createElementBlock("div",Gr,[e.renderSlot(V.$slots,"suffix")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,Yr))}}),Qr=["id"],Zr={key:0,class:"cl-plaintext-value"},ec={key:0,class:"input-group-prepend"},tc={class:"input-group-text"},nc={key:2,class:"input-group-append"},oc={class:"input-group-text"},Re=e.defineComponent({name:"ClInput",components:{ClInputContainer:Eo},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:String,inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},changeDelayTime:{type:Number,default:200}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElContainer"),u=e.ref(!1),s=o.isString(t.value)?t.value:t.value!==void 0&&o.isNumber(t.value)&&o.isFinite(t.value)?t.value.toString():"",c=e.ref(s),m=e.computed(()=>Je.getPlaintextOutText("input",t.plaintextEmptyText,c.value,t.value)),p=e.ref(s),g=e.ref(s),h={prevDelayValue:s,valueDelayRun:!1};let y=null;const E=e.computed(()=>{let X={"panel-input":!0,"input-disabled":t.disabled,"input-readonly":t.isReadonly};return X=o.getJsonMerge(X,me.getClassNameJson(t.className)),o.isEmpty(t.theme,"default")||(X[`input-${t.theme}`]=!0),X}),L=e.computed(()=>{const X={};return o.isNonEmptyString(t.width)&&(X.width=t.width),X}),B=X=>{I(),h.valueDelayRun=!0,y=setTimeout(()=>{y=null,p.value===X&&(h.valueDelayRun=!1,h.prevDelayValue!==X&&(h.prevDelayValue=X,i("onChangeDelay",X)))},t.changeDelayTime)},I=()=>{y&&(clearTimeout(y),y=null),h.valueDelayRun=!1},M=X=>{if(X!==p.value){p.value=X;const Z=J(X);i("update:value",Z),i("update:modelValue",Z),i("onChange",Z),B(Z)}},N=X=>{u.value=!0,g.value=X,i("onFocus",X)},b=X=>{u.value=!1,i("onBlur",X),X!==g.value&&(g.value=X,i("onChangeBlur",X))},V=X=>{i("onKeyupEnter",X)},w=X=>{i("onKeydown",X)},T=X=>{i("onKeyup",X)},C=()=>{i("onClear")},D=()=>{e.nextTick(()=>{i("onInit")})},J=X=>o.isString(X)||o.isNumber(X)&&o.isFinite(X)?X.toString():"",ne=()=>{d.value?.focus()},K=()=>{const X=J(t.value);o.isEmpty(X)||(c.value=X,p.value=X),D()};e.onMounted(()=>{K()}),e.onBeforeUnmount(()=>{I()}),e.watch(()=>t.value,X=>{const Z=J(X);Z!==c.value&&(c.value=Z,p.value=Z,h.prevDelayValue=Z,h.valueDelayRun&&I())});const P=X=>{c.value=X,M(X)},x=X=>{w(X)},A=X=>{const Z=X.key,se=X.keyCode;if(Z==="Enter"||se===13){const le=X.target,G=J(le.value);V(G)}else T(X)},f=()=>{const X=J(c.value);N(X)},S=()=>{const X=J(c.value);b(X)},k=()=>{c.value="",M(""),C(),ne()},v=()=>{const X=d.value;return X?X.getInputElement():null},F=()=>J(c.value);return l({getValue:F,getValueData:()=>({value:F(),show:c.value}),setValue:(X,Z)=>{const se=J(X);c.value=se,p.value=se,h.prevDelayValue=se,h.valueDelayRun&&I(),Z&&(i("update:value",se),i("update:modelValue",se))},focus:()=>{ne()},getInputElement:v}),(X,Z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(E.value),style:e.normalizeStyle(L.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Zr,e.toDisplayString(m.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[X.$slots.prepend||X.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"input-group":!0,"input-group-focus":u.value})},[X.$slots.prepend?(e.openBlock(),e.createElementBlock("div",ec,[e.createElementVNode("span",tc,[e.renderSlot(X.$slots,"prepend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(Eo,{ref_key:"refElContainer",ref:d,value:c.value,inputType:n.inputType,inputmode:n.inputmode,autocomplete:n.autocomplete,name:n.name,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,isShowSuffix:!!X.$slots.suffix,label:n.label,isFloating:n.isFloating,onOnInputText:P,onOnKeydown:x,onOnKeyup:A,onOnFocus:f,onOnBlur:S,onOnClear:k},e.createSlots({_:2},[X.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(X.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]),X.$slots.append?(e.openBlock(),e.createElementBlock("div",nc,[e.createElementVNode("span",oc,[e.renderSlot(X.$slots,"append")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)):(e.openBlock(),e.createBlock(Eo,{key:1,ref_key:"refElContainer",ref:d,value:c.value,inputType:n.inputType,inputmode:n.inputmode,autocomplete:n.autocomplete,name:n.name,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,isShowSuffix:!!X.$slots.suffix,label:n.label,isFloating:n.isFloating,onOnInputText:P,onOnKeydown:x,onOnKeyup:A,onOnFocus:f,onOnBlur:S,onOnClear:k},e.createSlots({_:2},[X.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(X.$slots,"suffix")]),key:"0"}:{name:"suffix",fn:e.withCtx(()=>[]),key:"1"}]),1032,["value","inputType","inputmode","autocomplete","name","placeholder","disabled","isReadonly","isClean","isShowSuffix","label","isFloating"]))],64))],14,Qr))}}),Vt=e.defineComponent({name:"ClInputNumber",components:{ClInput:Re},__name:"Index",props:{id:String,name:{type:String,default:""},value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},theme:{type:String,default:"default"},inputType:{type:String,default:""},inputmode:{type:String,default:""},autocomplete:{type:String,default:"off"},width:{type:String,default:""},placeholder:{type:String,default:""},label:String,isFloating:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isClean:{type:Boolean,default:!0},isNumber:{type:Boolean,default:!0},decimal:{type:Number,default:0,validator:n=>n>=-1&&n<=100&&n%1===0},isThousand:{type:Boolean,default:!0},isImmediateThousand:{type:Boolean,default:!0},changeDelayTime:{type:Number,default:200,validator:n=>o.isFinite(n)&&n>=0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.ref(t.value),s=e.ref(t.value),c=e.computed(()=>{let k={"panel-input-number":!0};return k=o.getJsonMerge(k,me.getClassNameJson(t.className)),o.getStringByJson(k," ")}),m=e.computed(()=>o.isNonEmptyString(t.inputmode)?t.inputmode:t.decimal===0?"numeric":"decimal"),p=k=>{if(k!==s.value){s.value=k;const v=B(k);i("update:value",v),i("update:modelValue",v),i("onChange",v)}},g=k=>{let v=o.isNumber(k);if(!v)if(o.isNaN(+k))k==="-"&&(v=!0);else{const F=k.split(".");F.length===2&&(v=(o.isNumber(F[0])||o.isEmpty(F[0]))&&(o.isEmpty(F[1])||o.isNumber(F[1])))}return v},h=(k,v,F=!0,_=!0)=>{let O=k;if(t.isNumber){let q=o.removeReplace(k);if(q.length>0)if(g(q)){if(q!=="-"){const{decimal:Z}=t;if(F&&Z!==0&&(Z===-1||Z>=0&&Z<=100)&&Z!==-1){const se=parseFloat(q);if(o.isFinite(se)){const le=se.toFixed(Z);q=le.indexOf("e")>-1?q:le}}if(_){const se=q.split("."),le=o.isEmpty(se[0])?"0":se[0];if(q=t.isThousand?o.getFormatThousands(le):le,se.length===2&&Z!==0){const G=Z===-1?se[1]:se[1].slice(0,Z);q+=`.${G}`}}}}else q=v;else q="";O=q}return O},y=(k,v)=>{const F=v.split(""),_=new RegExp("^"+F.map(X=>X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*?")),O=k.match(_);let q;return O&&(q=O[0].length),q},E=(k,v,F)=>{const _=me.getFocusSelection(k);let O=v.substring(0,_.start);O=o.removeReplace(O);const q=v.substring(_.start);let X=g(O);O.indexOf(".")>-1&&q.indexOf(".")>-1&&(X=!1);let Z=_.start;X?Z=y(F,O):Z=F.lastIndexOf(q),(o.isUndefined(Z)||Z>F.length||Z<0)&&(Z=F.length),e.nextTick(()=>{me.setFocusSelection(k,Z,Z)})},L=()=>{const k=u.value;if(o.isEmpty(k))return k;{let v=k.toString();if(t.isNumber){const{decimal:F}=t;if(v=o.removeReplace(v),v==="-")return v;if(F!==0&&F!==-1){const q=parseFloat(v);if(o.isFinite(q)&&F>=0&&F<=100){const X=q.toFixed(F);v=X.indexOf("e")>-1?v:X}}const _=v.split("."),O=o.isEmpty(_[0])?"0":_[0];_[0]=t.isThousand?o.getFormatThousands(O):O,F===0?v=_[0]:_.length===2?(_[1]=F===-1?_[1]:o.getFillZero(_[1],F,"r"),v=_.join(".")):v=_[0]}return v}},B=k=>{let v="";if(!o.isEmpty(k)&&(v=k.toString(),t.isNumber&&v!=="-")){const{decimal:F}=t,_=v.split(".");let O=o.removeReplace(_[0]);if(_.length===2&&F!==0){let q="";F===-1?q=_[1]:q=o.getFillZero(_[1],F,"r"),O+=`.${q}`}v=O}return v},I=()=>{d.value?.focus()},M=()=>{if(!o.isEmpty(t.value)){const k=h(t.value,"");u.value=k,s.value=k}};e.onMounted(()=>{M()}),e.watch(()=>t.value,(k,v)=>{if(k!==v&&k!==u.value){let F=!0;if(t.isNumber){const _=o.removeReplace(k),O=o.removeReplace(u.value),q=o.isEmpty(_),X=o.isEmpty(O);q&&X?F=!1:!q&&!X&&(F=Number(_)!==Number(O))}if(F){const _=h(k,v);u.value=_,s.value=_}}}),e.watch([()=>t.isNumber,()=>t.decimal,()=>t.isThousand],()=>{const k=h(u.value,"");u.value=k,p(k)});const N=k=>{const v=h(k,s.value,!1,t.isImmediateThousand);u.value=v,d.value?.setValue(v),t.isNumber&&e.nextTick(()=>{const F=d.value?.getInputElement();F&&u.value===v&&E(F,k,String(v))}),p(v)},b=()=>{const k=L();u.value=k,s.value=k;const v=B(k);i("onFocus",v)},V=()=>{const k=L();u.value=k,s.value=k;const v=B(k);i("onBlur",v)},w=k=>{i("onChangeBlur",B(k))},T=k=>{i("onKeyupEnter",B(k))},C=k=>{i("onKeydown",k)},D=k=>{i("onKeyup",k)},J=()=>{i("onClear")},ne=()=>{i("onInit")},K=k=>{i("onChangeDelay",B(k))},P=()=>B(u.value);return l({getValue:P,getValueData:()=>({value:P(),show:o.isEmpty(u.value)?"":u.value.toString()}),setValue:(k,v)=>{const F=o.isEmpty(k)?"":h(k,"");if(u.value=F,s.value=F,d.value?.setValue(F),v){const _=B(F);i("update:value",_),i("update:modelValue",_),i("onChange",_)}},focus:()=>{I()},getInputElement:()=>d.value?.getInputElement()??null}),(k,v)=>(e.openBlock(),e.createBlock(Re,{ref_key:"refElInput",ref:d,id:e.unref(r),value:u.value,name:n.name,className:c.value,inputType:n.inputType,inputmode:m.value,autocomplete:n.autocomplete,placeholder:n.placeholder,label:n.label,isFloating:n.isFloating,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,width:n.width,theme:n.theme,isPlaintext:n.isPlaintext,plaintextEmptyText:n.plaintextEmptyText,changeDelayTime:n.changeDelayTime,onOnChange:N,onOnFocus:b,onOnBlur:V,onOnChangeBlur:w,onOnKeyupEnter:T,onOnKeydown:C,onOnKeyup:D,onOnClear:J,onOnInit:ne,onOnChangeDelay:K},e.createSlots({_:2},[k.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"prepend")]),key:"0"}:void 0,k.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"append")]),key:"1"}:void 0,k.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(k.$slots,"suffix")]),key:"2"}:void 0]),1032,["id","value","name","className","inputType","inputmode","autocomplete","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme","isPlaintext","plaintextEmptyText","changeDelayTime"]))}}),ac=["id"],lc={key:0,class:"inputCaptcha-count"},Co=120,bo=1e3,Vl=e.defineComponent({name:"ClInputCaptcha",components:{ClInputNumber:Vt},__name:"Index",props:{id:{},value:{default:""},className:{},theme:{default:"default"},placeholder:{},autocomplete:{default:"one-time-code"},countdownMax:{default:Co},onSendBefore:{}},emits:["update:value","update:modelValue","onChange","onKeyupEnter","onSend","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.reactive({value:o.isString(t.value)?t.value:"",isSend:!1,isCountdown:!1,countdown:Co}),u={intervalCountdownId:null,isSending:!1,isUnmounted:!1},s=e.computed(()=>{let M={"panel-input-captcha":!0};return M=o.getJsonMerge(M,me.getClassNameJson(t.className)),M[`inputCaptcha-theme-${t.theme}`]=!0,M}),c=e.computed(()=>({"inputCaptcha-send":!0,"inputCaptcha-send-ing":d.isCountdown})),m=M=>{i("update:value",M),i("update:modelValue",M),i("onChange",M)},p=()=>{i("onKeyupEnter",d.value)},g=()=>{i("onSend")},h=()=>{const{countdownMax:M}=t;return o.isNumber(M)&&o.isFinite(M)&&M>0?Math.floor(M):Co},y=M=>o.isNonEmptyString(M)?M:"";e.onBeforeUnmount(()=>{u.isUnmounted=!0,u.intervalCountdownId&&(clearInterval(u.intervalCountdownId),u.intervalCountdownId=null)}),e.watch(()=>t.value,M=>{const N=y(M);d.value!==N&&(d.value=N)});const E=M=>{m(M)},L=()=>{p()},B=async()=>{if(d.isCountdown||u.isSending)return;u.isSending=!0;let M=!1;if(t.onSendBefore)if(!o.isFunction(t.onSendBefore))we.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需为函数"),i("onError","onSendBefore 需为函数");else try{const N=await t.onSendBefore(d.value);o.isBoolean(N)?M=N:(we.warn("ClInputCaptcha","InputCaptcha: onSendBefore 需返回 boolean,本次按校验失败处理"),i("onError","onSendBefore 返回值需为 boolean"))}catch{M=!1,i("onError","发送前校验异常")}else M=!0;if(u.isSending=!1,!(u.isUnmounted||d.isCountdown)&&(d.isSend=M,M)){g(),d.isCountdown=!0,d.countdown=h();const N=Date.now()+d.countdown*bo,b=setInterval(()=>{const V=Math.ceil((N-Date.now())/bo);V<=0?(clearInterval(b),u.intervalCountdownId=null,d.countdown=h(),d.isCountdown=!1):d.countdown=V},bo);u.intervalCountdownId=b}};return l({getValue:()=>d.value}),(M,N)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(s.value)},[e.createVNode(Vt,{theme:n.theme,isNumber:!0,decimal:0,isThousand:!1,value:d.value,"onUpdate:value":N[0]||(N[0]=b=>d.value=b),placeholder:n.placeholder,autocomplete:n.autocomplete,isClean:!0,onOnKeyupEnter:L,onOnChange:E},null,8,["theme","value","placeholder","autocomplete"]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[d.isSend?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[d.isCountdown?(e.openBlock(),e.createElementBlock("span",lc,e.toDisplayString(d.countdown)+"秒后重发",1)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(B,["stop"])}," 重新发送 "))],64)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inputCaptcha-btn",onClick:e.withModifiers(B,["stop"])}," 发送验证码 "))],2)],10,ac))}}),ic=["aria-disabled"],xo=e.defineComponent({name:"ClInputnumberstepperButton",__name:"Button",props:{className:{},disabled:{type:Boolean},checkDownBeforeCallback:{type:Function}},emits:["onLongDownStart","onLongDownEnd"],setup(n,{emit:l}){const a=n,t=l,i=e.useTemplateRef("refElButton"),r={longDownInterval:null,isMoveBoundary:!1,isLongDownActive:!1,isKeyDown:!1,dragEvent:null,sessionSource:null},d=e.computed(()=>{const I=o.getJsonMerge({"inputNumberStepper-controls":!0},me.getClassNameJson(a.className));return I["inputNumberStepper-controls-disabled"]=!!a.disabled,I}),u=()=>{t("onLongDownStart")},s=I=>{t("onLongDownEnd",I)},c=()=>{let I=!0;if(a.checkDownBeforeCallback){try{I=a.checkDownBeforeCallback()}catch(M){we.warn("ClInputnumberstepperButton","长按开始回调执行失败,按允许处理",M),I=!0}I=o.isBoolean(I)?I:!0}return I},m=()=>{r.longDownInterval&&(clearInterval(r.longDownInterval),r.longDownInterval=null)},p=I=>{r.isLongDownActive&&r.sessionSource!==I||(r.isLongDownActive=!0,r.sessionSource=I,u(),m(),r.longDownInterval=setInterval(()=>{a.disabled?h():u()},200))},g=I=>{if(r.sessionSource!=="mouse")return;const M=I.target;i.value===I.target||i.value?.contains(M)?r.isMoveBoundary&&(r.isMoveBoundary=!1,!a.disabled&&c()&&p("mouse")):(m(),r.isMoveBoundary=!0)},h=(I,M)=>{if(r.isLongDownActive){if(I&&r.sessionSource&&I!==r.sessionSource)return;m(),r.isLongDownActive=!1,r.sessionSource=null,r.isKeyDown=!1,s(M)}},y=()=>{const I={start(M){if(a.disabled)return!1;const N=M,b=M;let V=!1;return(N.buttons===1||M.type==="touchstart"||(b.touches?.length??0)>0)&&(V=c(),V&&(r.isMoveBoundary=!1,p("mouse"))),V},ing:M=>{g(M)},end:()=>{h("mouse")}};i.value&&(r.dragEvent=new Ye.Drag(i.value,I))};e.onMounted(()=>{e.nextTick(()=>{y()})}),e.onBeforeUnmount(()=>{h(),r.dragEvent&&(r.dragEvent.end(),r.dragEvent=null)});const E=I=>{const M=I.key;if(M==="Enter"||M===" "){if(a.disabled)return;I.preventDefault(),!r.isKeyDown&&!r.isLongDownActive&&c()&&(r.isKeyDown=!0,p("keyboard"))}},L=I=>{const M=I.key;(M==="Enter"||M===" ")&&r.isKeyDown&&h("keyboard")},B=()=>{(r.isKeyDown||r.isLongDownActive)&&h(void 0,!0)};return(I,M)=>(e.openBlock(),e.createElementBlock("span",{ref_key:"refElButton",ref:i,class:e.normalizeClass(d.value),role:"button",tabindex:"0","aria-disabled":a.disabled,onKeydown:E,onKeyup:L,onBlur:B},[e.renderSlot(I.$slots,"icon")],42,ic))}}),sc=["id"],pn=e.defineComponent({name:"ClInputNumberStepper",components:{ClInputNumber:Vt,ClInputnumberstepperButton:xo,ClIconFont:ke},__name:"Index",props:{id:String,value:{type:[String,Number],default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:"large"},btnShowType:{type:String,default:"fixed"},btnTheme:{type:String,default:"leftRight",validator:n=>["leftRight","upDown"].indexOf(n)!==-1},btnShape:{type:String,default:"square",validator:n=>["square","circle"].indexOf(n)!==-1},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!0},isTextRead:{type:Boolean,default:!1},min:Number,max:Number,isLoop:{type:Boolean,default:!1},decimal:{type:Number,default:0},fillZeroCount:{type:Number,default:0},btnStep:{type:Number,default:1},btnClsIconSub:{type:String,default:""},btnClsIconAdd:{type:String,default:""},operateBtnDownBeforeCallback:{type:Function,default:void 0},calculationOperateValueCallback:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0}},emits:["update:value","update:modelValue","onChange","onError"],setup(n,{emit:l}){const a=n,t=l,i=e.useTemplateRef("refElInput"),r=e.reactive({isFocus:!1}),d=e.ref(""),u=e.reactive({subtractDisabled:!1,addDisabled:!1}),s=a.id,c={upDown:{subtract:"angle-up",add:"angle-down"},leftRight:{subtract:"minus",add:"plus"}};let m=null;const p=()=>{const K=a.btnStep;return o.isFinite(K)&&K>0?K:1},g=e.computed(()=>{const K=a.decimal,P=p().toString();let x=K;if(P.indexOf(".")>-1){const A=P.split(".")[1].length;K<A&&(x=A)}return x===-1?-1:Math.max(0,Math.min(100,Math.round(x)))}),h=e.computed(()=>a.fillZeroCount>0&&o.isFinite(a.fillZeroCount)),y=e.computed(()=>{if(o.isNonEmptyString(a.btnClsIconSub))return"";const K=a.btnTheme||"leftRight";return c[K]?c[K].subtract:""}),E=e.computed(()=>{if(o.isNonEmptyString(a.btnClsIconAdd))return"";const K=a.btnTheme||"leftRight";return c[K]?c[K].add:""}),L=e.computed(()=>{if(a.isPlaintext){let P={"cl-plaintext-stepper":!0};return P=o.getJsonMerge(P,me.getClassNameJson(a.className)),P}let K={"panel-input-number-stepper":!0,"inputNumberStepper-disabled":a.disabled||!1};return K=o.getJsonMerge(K,me.getClassNameJson(a.className)),K[`inputNumberStepper-btn-${a.btnTheme||"leftRight"}`]=!0,K[`inputNumberStepper-btn-${a.btnShowType||"fixed"}`]=!0,(a.btnTheme||"leftRight")==="leftRight"&&a.btnShape==="circle"&&(K["inputNumberStepper-btnShape-circle"]=!0),K["inputNumberStepper-focus"]=r.isFocus,K[`inputNumberStepper-${a.size||"large"}`]=!0,K}),B=()=>{const K=d.value;t("update:value",K),t("update:modelValue",K),t("onChange",K)},I=K=>{o.isEmpty(K)||i.value?.setValue(K),d.value=K},M=(K,P)=>{o.isUndefined(K)&&(K=""),o.isString(K)&&(K=o.removeReplace(K));const x=K.toString();let A=K,f=!1,S=!1,k=!1;if(a.calculationOperateValueCallback){let v=null;try{const F=a.calculationOperateValueCallback({value:K,type:P});F&&(v=F)}catch{t("onError","数值计算回调执行失败")}v&&(o.isString(v.value)||typeof v.value=="number"&&o.isFinite(v.value))&&(A=v.value,f=v.subtractDisabled||!1,S=v.addDisabled||!1)}else{const v=P&&!o.isEmpty(P);if(v||!o.isEmpty(K)){const F=o.isEmpty(K)?0:Number(K);if(o.isFinite(F)){const _=a.min,O=a.max,{isLoop:q=!1}=a,X=o.isUndefined(_),Z=o.isUndefined(O),se=p();let le=F;if(v){le+=se*(P==="subtract"?-1:1);const G=le.toString();if(G.indexOf(".")>-1){const oe=G.split(".")[1].length,R=g.value;R>=0&&oe>R&&(le=Number(le.toFixed(R)))}}!X&&le<=_?(q||(f=!0),A=le<_&&q&&!Z?O:_,k=le!==A):!Z&&le>=O?(q||(S=!0),A=le>O&&q&&!X?_:O,k=le!==A):A=le}}}if(typeof A=="number"&&g.value>0&&(A.toString().indexOf(".")>-1||x.indexOf(".")>-1)&&(A=A.toFixed(g.value)),!o.isString(A)&&!(typeof A=="number"&&o.isFinite(A))&&(A=""),h.value&&!o.isEmpty(A)&&o.isFinite(A)){const v=a.fillZeroCount;v>10&&we.warn("ClInputNumberStepper","fillZeroCount 超过 10,按 10 处理",v);const F=A.toString(),_=F.charAt(0)==="-",O=_?F.slice(1):F,q=O.indexOf("."),X=q>-1?O.slice(0,q):O,Z=q>-1?O.slice(q):"",le=!/[eE]/.test(O)&&X.length<v?o.getFillZero(X,Math.min(v,10)):X;A=(_?"-":"")+le+Z}return I(A.toString()),u.subtractDisabled=f,u.addDisabled=S,k},N=K=>{r.isFocus=K,K&&i.value?.focus()},b=K=>["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].indexOf(K.key)!==-1;e.onBeforeUnmount(()=>{m&&(clearTimeout(m),m=null)}),e.watch(()=>a.value,(K,P)=>{K!==P&&K!==d.value&&M(K)&&B()},{immediate:!0});const V=K=>{a.disabled||(K=o.removeReplace(K),I(K),m&&(clearTimeout(m),m=null),m=setTimeout(()=>{o.isEmpty(d.value)?(u.subtractDisabled=!1,u.addDisabled=!1):M(d.value),B()},100))},w=K=>{if(!a.disabled&&!a.isTextRead&&b(K)){K.preventDefault(),m&&(clearTimeout(m),m=null);const P=K.key;P==="ArrowLeft"||P==="ArrowDown"?M(d.value,"subtract"):M(d.value,"add"),B(),N(!0)}},T=K=>{!a.disabled&&!a.isTextRead&&b(K)&&(m&&(clearTimeout(m),m=null),N(!0))},C=()=>{N(!0)},D=K=>{N(!1),a.disabled||I(K)},J=K=>{m&&(clearTimeout(m),m=null),M(d.value,K)},ne=K=>{m&&(clearTimeout(m),m=null),B(),K||N(!0)};return(K,P)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(L.value)},[e.createVNode(Vt,{ref_key:"refElInput",ref:i,value:d.value,placeholder:n.placeholder,disabled:n.disabled,isReadonly:n.isTextRead,isClean:n.isClean,isNumber:!h.value,decimal:g.value,isPlaintext:n.isPlaintext,plaintextEmptyText:n.plaintextEmptyText,theme:"icon",onOnChange:V,onOnKeydown:w,onOnKeyup:T,onOnFocus:C,onOnBlur:D},e.createSlots({_:2},[K.$slots.textPrepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(K.$slots,"textPrepend")]),key:"0"}:void 0]),1032,["value","placeholder","disabled","isReadonly","isClean","isNumber","decimal","isPlaintext","plaintextEmptyText"]),n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(xo,{className:"inputNumberStepper-subtract","aria-label":"减少",disabled:n.disabled||u.subtractDisabled,checkDownBeforeCallback:n.operateBtnDownBeforeCallback,onOnLongDownStart:P[0]||(P[0]=x=>J("subtract")),onOnLongDownEnd:ne},{icon:e.withCtx(()=>[e.createVNode(ke,{name:y.value,className:n.btnClsIconSub},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"]),e.createVNode(xo,{className:"inputNumberStepper-add","aria-label":"增加",disabled:n.disabled||u.addDisabled,checkDownBeforeCallback:n.operateBtnDownBeforeCallback,onOnLongDownStart:P[1]||(P[1]=x=>J("add")),onOnLongDownEnd:ne},{icon:e.withCtx(()=>[e.createVNode(ke,{name:E.value,className:n.btnClsIconAdd},null,8,["name","className"])]),_:1},8,["disabled","checkDownBeforeCallback"])],64))],10,sc))}}),Ml=e.defineComponent({name:"ClInputPassword",components:{ClIconFont:ke,ClInput:Re},__name:"Index",props:{id:String,name:String,value:[String,Number],className:String,disabled:Boolean,theme:{type:String,default:"default"},width:String,placeholder:String,label:String,isFloating:{type:Boolean,default:!1},isReadonly:Boolean,isClean:{type:Boolean,default:!0}},emits:["update:value","update:modelValue","onChange","onFocus","onBlur","onChangeBlur","onKeyupEnter","onClear","onInit","onKeydown","onKeyup"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput"),u=e.ref(!1),s=e.computed(()=>u.value?"text":"password"),c=e.computed(()=>{let C={"panel-input-password":!0};return C=o.getJsonMerge(C,me.getClassNameJson(t.className)),o.getStringByJson(C," ")}),m=C=>{i("update:value",C),i("update:modelValue",C),i("onChange",C)},p=C=>{m(C)},g=C=>{i("onFocus",C)},h=C=>{i("onBlur",C)},y=C=>{i("onChangeBlur",C)},E=C=>{i("onKeyupEnter",C)},L=C=>{i("onKeydown",C)},B=C=>{i("onKeyup",C)},I=()=>{i("onClear")},M=()=>{i("onInit")},N=()=>{t.disabled||(u.value=!u.value)};return l({getValue:()=>d.value?.getValue(),getValueData:()=>d.value?.getValueData(),setValue:(C,D)=>{d.value?.setValue(C,D)},focus:()=>{d.value?.focus()}}),(C,D)=>(e.openBlock(),e.createBlock(Re,{ref_key:"refElInput",ref:d,id:e.unref(r),name:n.name,value:n.value,inputType:s.value,className:c.value,placeholder:n.placeholder,label:n.label,isFloating:n.isFloating,disabled:n.disabled,isReadonly:n.isReadonly,isClean:n.isClean,width:n.width,theme:n.theme,onOnChange:p,onOnFocus:g,onOnBlur:h,onOnChangeBlur:y,onOnKeyupEnter:E,onOnKeydown:L,onOnKeyup:B,onOnClear:I,onOnInit:M},e.createSlots({suffix:e.withCtx(()=>[e.createVNode(ke,{class:"input-password-icon",name:u.value?"eye":"eye-no",role:"button","aria-label":u.value?"隐藏密码":"显示密码","aria-disabled":n.disabled,tabindex:n.disabled?-1:0,onClick:N,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},null,8,["name","aria-label","aria-disabled","tabindex","onKeydown"])]),_:2},[C.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"prepend")]),key:"0"}:void 0,C.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(C.$slots,"append")]),key:"1"}:void 0]),1032,["id","name","value","inputType","className","placeholder","label","isFloating","disabled","isReadonly","isClean","width","theme"]))}}),rc=["id"],cc=["aria-label","tabindex","onKeydown"],Xt=e.defineComponent({name:"ClInputSearch",components:{ClInput:Re,ClIconFont:ke},__name:"Index",props:{id:String,value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},textLabel:{type:String,default:""},changeDelayTime:{type:Number,default:200},theme:{type:String,default:"icon",validator:n=>["icon","text"].indexOf(n)!==-1},location:{type:String,default:"right",validator:n=>["left","right"].indexOf(n)!==-1}},emits:["update:value","update:modelValue","onChange","onSearch","onFocus","onBlur"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElInput");let u=o.isNonEmptyString(t.value)?t.value:"";const s=e.ref(o.isNonEmptyString(t.value)?t.value:"");let c=null,m=null;const p=e.computed(()=>o.isFinite(t.changeDelayTime)&&t.changeDelayTime>=0?t.changeDelayTime:200),g=e.computed(()=>{let P="append";return o.isEmpty(t.location)||(P=t.location==="left"?"prepend":"append"),P}),h=e.computed(()=>{let P={"panel-input-search":!0,"input-search-disabled":t.disabled};const x=o.isEmpty(t.theme)?"icon":t.theme;return P[`input-search-${x}`]=!0,o.getJsonMerge(P,me.getClassNameJson(t.className))}),y=P=>{i("update:value",P),i("update:modelValue",P),i("onChange",P)},E=P=>{i("onSearch",P)},L=P=>{i("onFocus",P)},B=P=>{i("onBlur",P)},I=()=>{c&&(clearTimeout(c),c=null)},M=()=>{m&&(clearTimeout(m),m=null)},N=()=>{I(),M(),u!==s.value&&(u=s.value,y(s.value)),E(s.value)};e.onBeforeUnmount(()=>{I(),M()}),e.watch(()=>t.value,P=>{s.value=o.isNonEmptyString(P)?P:"",u=s.value});const b=P=>{t.disabled||(I(),c=setTimeout(()=>{!t.disabled&&s.value===P&&u!==P&&(u=P,y(P)),c=null},p.value))},V=()=>{t.disabled||(M(),m=setTimeout(()=>{t.disabled||N()},p.value))},w=P=>{t.disabled||L(P)},T=P=>{t.disabled||B(P)},C=()=>{t.disabled||N()},D=()=>{t.disabled||(I(),M(),u="",y(""),E(""))};return l({getValue:()=>s.value,setValue:(P,x)=>{const A=o.isNonEmptyString(P)?P:"";I(),M(),u=A,s.value=A,x&&(i("update:value",A),i("update:modelValue",A))},focus:()=>{d.value?.focus()}}),(P,x)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(h.value)},[e.createVNode(Re,{ref_key:"refElInput",ref:d,value:s.value,"onUpdate:value":x[0]||(x[0]=A=>s.value=A),theme:"icon",placeholder:n.placeholder,isClean:!0,disabled:n.disabled,onOnChange:b,onOnKeyupEnter:V,onOnFocus:w,onOnBlur:T,onOnClear:D},{[g.value]:e.withCtx(()=>[n.theme==="text"&&!e.unref(o).isEmpty(n.textLabel)?(e.openBlock(),e.createElementBlock("span",{key:0,role:"button","aria-label":n.textLabel,tabindex:n.disabled?-1:0,onClick:C,onKeydown:[e.withKeys(e.withModifiers(C,["prevent"]),["enter"]),e.withKeys(e.withModifiers(C,["prevent"]),["space"])]},e.toDisplayString(n.textLabel),41,cc)):(e.openBlock(),e.createBlock(ke,{key:1,name:"search",role:"button","aria-label":"搜索",tabindex:n.disabled?-1:0,onClick:C,onKeydown:[e.withKeys(e.withModifiers(C,["prevent"]),["enter"]),e.withKeys(e.withModifiers(C,["prevent"]),["space"])]},null,8,["tabindex","onKeydown"]))]),_:2},1032,["value","placeholder","disabled"])],10,rc))}}),uc=["id"],dc=["name","placeholder","disabled","aria-label"],Tn="100px",qn=e.defineComponent({name:"ClInputTextarea",__name:"Index",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},className:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:String,default:""},height:{type:String,default:"100px"},placeholder:{type:String,default:""},isClean:{type:Boolean,default:!1},isAutoHeight:{type:Boolean,default:!1},changeDelayTime:{type:Number,default:200},heightMax:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0}},emits:["update:value","update:modelValue","onChange","onInit","onKeydownEnter","onKeyupEnter","onFocus","onBlur","onChangeDelay"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElTextarea"),u=e.reactive({height:t.height||Tn}),s=e.ref(o.isString(t.value)?t.value:""),c={lastValue:o.isString(t.value)?t.value:"",prevDelayValue:o.isString(t.value)?t.value:"",valueDelayRun:!1},m=e.computed(()=>{let S=t.name;return o.isEmpty(S)&&(S=`textarea_${o.getRandom(8)}`),S}),p=e.computed(()=>t.isClean&&!t.disabled&&!o.isEmpty(s.value)),g=e.computed(()=>{let S={"panel-input-textarea":!0,"textarea-clean":t.isClean&&!t.isPlaintext};return t.isPlaintext&&(S["cl-plaintext-value"]=!0,S["cl-plaintext-value-pre"]=!0),S=o.getJsonMerge(S,me.getClassNameJson(t.className)),S}),h=e.computed(()=>{const S=s.value;return o.isString(S)?S.replace(/<\/?br\s*\/?>/gi,`
7
+ `):""}),y=e.computed(()=>Je.getPlaintextOutText("inputTextarea",t.plaintextEmptyText,h.value,t.value)),E=e.computed(()=>{const{width:S,heightMax:k}=t,v={};return o.isNonEmptyString(S)&&(v.width=S),t.isPlaintext||(o.isEmpty(u.height)||(v.height=u.height),o.isNonEmptyString(k)&&(v["max-height"]=k)),v});let L;const B=S=>{L&&(clearTimeout(L),L=null),c.valueDelayRun=!0,L=setTimeout(()=>{c.valueDelayRun=!1,c.prevDelayValue!==S&&(c.prevDelayValue=S,i("onChangeDelay",S))},Math.max(t.changeDelayTime,0))},I=S=>{S!==c.lastValue&&(c.lastValue=S,i("update:value",S),i("update:modelValue",S),i("onChange",S),B(S))},M=()=>{if(t.isAutoHeight){const S=d.value;if(S){S.style.height=t.height||Tn;const k=S.scrollHeight+S.scrollTop+(S.offsetHeight-S.clientHeight);S.style.height="100%",u.height=k>0?`${k}px`:t.height||Tn}}},N=()=>{d.value?.focus()},b=()=>{e.nextTick(()=>{i("onInit")})};e.onMounted(()=>{b()}),e.onBeforeUnmount(()=>{L&&(clearTimeout(L),L=null)}),e.watch(()=>t.value,(S,k)=>{S!==k&&(s.value=o.isString(S)?S:"",c.lastValue=o.isString(S)?S:"",requestAnimationFrame(()=>M()),c.valueDelayRun||(c.prevDelayValue=S||""))});const V=S=>{const k=S.target;if(!k)return;const v=k.value;requestAnimationFrame(()=>M()),I(v)},w=S=>{S.key==="Enter"&&i("onKeydownEnter",S)},T=S=>{S.key==="Enter"&&i("onKeyupEnter",S)},C=()=>{s.value="",I(""),N()},D=()=>{i("onFocus")},J=()=>{i("onBlur")},ne=()=>o.trim(s.value);return l({getValue:ne,getValueData:()=>({value:ne(),show:s.value}),setValue:S=>{L&&(clearTimeout(L),L=null,c.valueDelayRun=!1);const k=o.isEmpty(S)?"":S;c.lastValue=k,c.prevDelayValue=k,s.value=k,M()},initHeight:()=>{u.height=t.height||Tn,t.isAutoHeight&&M()},focus:()=>{N()},getParentElement:()=>d.value?.parentElement||null}),(S,k)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(g.value),style:e.normalizeStyle(E.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y.value),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.withDirectives(e.createElementVNode("textarea",{ref_key:"refElTextarea",ref:d,class:"form-control text-area","onUpdate:modelValue":k[0]||(k[0]=v=>s.value=v),name:m.value,placeholder:n.placeholder,disabled:n.disabled,"aria-label":n.placeholder||"文本输入区域",onInput:V,onKeydown:w,onKeyup:T,onFocus:D,onBlur:J},null,40,dc),[[e.vModelText,s.value]]),p.value?(e.openBlock(),e.createBlock(ke,{key:0,name:"close-circle-fill",class:"textarea-clear-icon","aria-label":"清除输入内容",onClick:e.withModifiers(C,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],14,uc))}}),mc=["id"],pc=["id","href","target","rel"],fc=["id","href"],hc=["id"],Nt=e.defineComponent({name:"ClLink",__name:"Index",props:{id:String,className:{type:String,default:""},disabled:{type:Boolean,default:!1},url:{type:[String,Object],default:""},isHideUnderline:{type:Boolean,default:!1},isLight:{type:Boolean,default:!1},isTargetBlank:{type:Boolean,default:!1},isOutside:{type:Boolean,default:!1},isStopPropagation:{type:Boolean,default:!1},theme:{type:String,default:"link",validator:n=>["link","button"].indexOf(n)!==-1}},emits:{onClick:n=>!0,onHoverIn:n=>!0,onHoverOut:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.computed(()=>!o.isEmpty(a.url)),d=e.computed(()=>o.isString(a.url)?a.url:(o.isEmpty(a.url)||we.warn("ClLink","Link 组件:url 为 Router 对象时不应同时使用 isOutside 或 isTargetBlank,请传入 String 类型 url"),"")),u=e.computed(()=>{if(a.theme==="button"){let L={btn:!0,"btn-disabled":a.disabled};const B=["btn-green","btn-red","btn-yellow","btn-white","btn-grayLight","btn-transparent","btn-text"],I=me.getClassNameJson(a.className);return B.some(N=>!!I[N])||(L["btn-default"]=!0),o.getJsonMerge(L,I)}let E={"panel-link":!0,"btn-link":!0,"btn-link-disabled":a.disabled,"always-light":a.isLight,"underline-none":a.isHideUnderline};return E=o.getJsonMerge(E,me.getClassNameJson(a.className)),E}),s=y=>{t("onClick",y)},c=y=>{t("onHoverIn",y)},m=y=>{t("onHoverOut",y)},p=y=>{a.disabled||(s(y),a.isStopPropagation&&(y?.preventDefault(),y?.stopPropagation()))},g=y=>{a.disabled||c(y)},h=y=>{a.disabled||m(y)};return(y,E)=>{const L=e.resolveComponent("router-link");return n.url&&r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),role:"link","aria-disabled":"true"},[e.renderSlot(y.$slots,"default")],10,mc)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isOutside?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),href:d.value,target:n.isTargetBlank?"_blank":void 0,rel:n.isTargetBlank?"noopener noreferrer":void 0,onClick:p,onMouseenter:g,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,pc)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isTargetBlank?(e.openBlock(),e.createElementBlock("a",{key:0,id:e.unref(i),class:e.normalizeClass(u.value),href:d.value,target:"_blank",rel:"noopener noreferrer",onClick:e.withModifiers(p,["stop"]),onMouseenter:g,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,fc)):(e.openBlock(),e.createBlock(L,{key:1,id:e.unref(i),class:e.normalizeClass(u.value),to:n.url,onClick:e.withModifiers(p,["stop"])},{default:e.withCtx(()=>[e.createElementVNode("span",{onMouseenter:g,onMouseleave:h},[e.renderSlot(y.$slots,"default")],32)]),_:3},8,["id","class","to"]))],64))],64))],64)):(e.openBlock(),e.createElementBlock("a",{key:1,id:e.unref(i),class:e.normalizeClass(u.value),href:"javascript:",onClick:p,onMouseenter:g,onMouseleave:h},[e.createElementVNode("span",null,[e.renderSlot(y.$slots,"default")])],42,hc))}}}),gc={class:"loading-content"},Ol=e.defineComponent({name:"ClLoadFullCenter",__name:"FullCenter",props:{id:{},className:{},show:{type:Boolean,default:!0},teleportTarget:{},zIndex:{},background:{},theme:{},size:{},color:{}},setup(n){return(l,a)=>(e.openBlock(),e.createBlock(At,{show:n.show,id:n.id,zIndex:n.zIndex,teleportTarget:n.teleportTarget||"self",background:n.background||"var(--cl-overlay, rgba(0, 0, 0, 0.5))",duration:0,className:n.className,isLockScroll:!1},{default:e.withCtx(()=>[e.createElementVNode("div",gc,[e.createVNode(ct,{theme:n.theme,size:n.size,color:n.color},null,8,["theme","size","color"])])]),_:1},8,["show","id","zIndex","teleportTarget","background","className"]))}}),vc=["id"],yc={key:0,class:"loading-content"},kc={key:1,class:"loading-nothing"},Gt=e.defineComponent({name:"ClLoadIng",__name:"Ing",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},noDataText:{},color:{}},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-load-ing":!0},me.getClassNameJson(l.className)));return(i,r)=>n.isLoadIng||n.isEmpty?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.value),id:e.unref(a)},[n.isLoadIng?(e.openBlock(),e.createElementBlock("div",yc,[e.createVNode(ct,{theme:n.theme,size:n.size,color:n.color},null,8,["theme","size","color"])])):n.isEmpty?(e.openBlock(),e.createElementBlock("div",kc,[e.createElementVNode("div",null,[e.renderSlot(i.$slots,"nothingData",{},()=>[e.createElementVNode("span",null,e.toDisplayString(n.noDataText||"暂无数据"),1)])])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,vc)):e.createCommentVNode("",!0)}}),Sc=["aria-label"],wc={class:"loadScreen-main"},Ec={key:0,class:"loadScreen-text"},Go=e.defineComponent({name:"ClLoadScreen",__name:"Index",props:{id:String,className:String,teleportTarget:{type:String,default:"body"}},setup(n,{expose:l}){const{optA11yText:a}=Uo(),i=n.id||`loadscreen-${o.getRandom(5)}`,r=e.ref(!1),d=e.reactive({id:i,text:""});let u=null;const s=p=>{u&&(clearTimeout(u),u=null),u=setTimeout(()=>{r.value=!1,u=null},p)};return e.onBeforeUnmount(()=>{u&&(clearTimeout(u),u=null),r.value=!1}),l({show:(p,g)=>{u&&(clearTimeout(u),u=null),d.id=o.isNonEmptyString(g?.id)?g.id:i,d.text=o.isNonEmptyString(p)?p:"",r.value=!0},hide:(p=0)=>{p>0?s(p):(u&&(clearTimeout(u),u=null),r.value=!1)}}),(p,g)=>(e.openBlock(),e.createBlock(At,{id:d.id,show:r.value,teleportTarget:n.teleportTarget,zIndex:1000002,duration:0,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.4))",className:n.className},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"loadScreen-container",role:"alert","aria-label":e.unref(a).loading||"加载中"},[e.createElementVNode("div",wc,[d.text.length>0?(e.openBlock(),e.createElementBlock("span",Ec,e.toDisplayString(d.text),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(ct,{color:"white",size:"large"})])],8,Sc)]),_:1},8,["id","show","teleportTarget","className"]))}}),Cc=["id"],_l=e.defineComponent({name:"ClLoadWarp",__name:"Warp",props:{id:{},className:{},theme:{},size:{},isLoadIng:{type:Boolean},isEmpty:{type:Boolean},height:{},minHeight:{},noDataText:{},color:{}},setup(n){const l=n,a=l.id,t=e.computed(()=>o.getJsonMerge({"panel-load-warp":!0},me.getClassNameJson(l.className))),i=e.computed(()=>{const r={},{height:d,minHeight:u,isLoadIng:s}=l;return s&&(r["min-height"]="100px"),o.isNonEmptyString(d)?r.height=d:o.isNonEmptyString(u)&&(r["min-height"]=u),r});return(r,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),style:e.normalizeStyle(i.value),id:e.unref(a)},[e.renderSlot(r.$slots,"default"),e.createVNode(Gt,{isLoadIng:n.isLoadIng,isEmpty:n.isEmpty,theme:n.theme,size:n.size,color:n.color,noDataText:n.noDataText},{nothingData:e.withCtx(()=>[e.renderSlot(r.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty","theme","size","color","noDataText"])],14,Cc))}}),bc=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])','[tabindex]:not([tabindex="-1"])'].join(",");function La(n){return Array.from(n.querySelectorAll(bc)).filter(l=>!(l.hasAttribute("disabled")||l.getAttribute("aria-hidden")==="true"||l.offsetParent===null&&getComputedStyle(l).position!=="fixed"))}function xc(n,l={}){const a=t=>{n.value&&t.key==="Escape"&&(l.isEscapeClose&&!l.isEscapeClose()||l.onEscape&&(t.stopPropagation(),l.onEscape()))};e.watch(n,t=>{t?document.addEventListener("keydown",a,!0):document.removeEventListener("keydown",a,!0)},{immediate:!0}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",a,!0)})}function Bc(n,l,a={}){let t=null;const i=()=>n.value??null,r=s=>{if(!l.value)return;const c=i();if(!c)return;if(s.key==="Escape"){if(a.isEscapeClose&&!a.isEscapeClose()||!a.onEscape)return;s.stopPropagation(),a.onEscape();return}if(s.key!=="Tab")return;const m=La(c);if(m.length===0){s.preventDefault(),c.focus();return}const p=m[0],g=m[m.length-1],h=document.activeElement;if(!(h?c.contains(h):!1)){s.preventDefault(),(s.shiftKey?g:p).focus();return}s.shiftKey&&h===p?(s.preventDefault(),g.focus()):!s.shiftKey&&h===g&&(s.preventDefault(),p.focus())},d=()=>{t=document.activeElement,document.addEventListener("keydown",r,!0),a.isAutoFocus!==!1&&requestAnimationFrame(()=>{const s=i();if(!s)return;const c=La(s);c.length>0?c[0].focus():s.focus()})},u=()=>{document.removeEventListener("keydown",r,!0);const s=t;t=null,s&&requestAnimationFrame(()=>{s.isConnected&&s.focus()})};e.watch(l,s=>{s?d():u()},{immediate:!0}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",r,!0)})}const Ic=["id"],Dc={class:"modal-content"},Al=e.defineComponent({name:"ClModalTransition",__name:"BaseTransition",props:{id:String,className:String,isBackClick:{type:Boolean,default:!0},width:{type:String,default:"600px"},classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""},isEscapeClose:{type:Boolean,default:!0},isFocusTrap:{type:Boolean,default:!0}},emits:{onClickBack:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=new Map;let d=!1;const u=new Map,s=e.useTemplateRef("refElParent"),c=e.useTemplateRef("refElDialog"),m=e.reactive({isShow:!1}),p=e.computed(()=>o.getJsonMerge({"panel-modal":!0},me.getClassNameJson(t.className))),g=e.computed(()=>({modal:!0,fade:!0,show:m.isShow})),h=e.computed(()=>{const C={};return o.isEmpty(t.width)||(C.width=t.width),C}),y=()=>{i("onClickBack")},E=C=>{const D=r.get(C)??0;r.set(C,D+1),!(D>0||/\bmodal-open\b/.test(C.className))&&(u.set(C,C===document.body?{x:window.scrollX,y:window.scrollY}:{x:C.scrollLeft,y:C.scrollTop}),C.className+=" modal-open",C===document.body&&(d=!0))},L=C=>{const D=r.get(C)??0;if(!(D<=0))if(D===1){r.delete(C),C===document.body?d&&(C.className=C.className.replace(/\bmodal-open\b/g,"").trim(),d=!1):C.className=C.className.replace(/\bmodal-open\b/g,"").trim();const J=u.get(C);J&&(u.delete(C),requestAnimationFrame(()=>{C===document.body?window.scrollTo(J.x,J.y):(C.scrollTop=J.y,C.scrollLeft=J.x)}))}else r.set(C,D-1)},B=()=>{const C=t.teleportTarget;if(o.isEmpty(C)||C==="body")return document.body;if(C==="self"){const J=s.value?s.value.parentElement:null;if(!J)return null;let ne=J;for(;ne&&ne!==document.body;){if(window.getComputedStyle(ne).position!=="static")return ne;ne=ne.parentElement}return document.body}const D=document.querySelector(C);return D===document.body?document.body:D??document.body},I=()=>{if(m.isShow){const C=B();C&&E(C)}else{const C=B();C&&L(C)}},M=()=>{m.isShow=!1};Bc(c,e.computed(()=>t.isFocusTrap&&m.isShow),{onEscape:()=>{t.isEscapeClose&&M()},isEscapeClose:()=>t.isEscapeClose}),e.onBeforeUnmount(()=>{m.isShow&&I()}),e.watch(()=>m.isShow,()=>{I()});const N=C=>{t.isBackClick&&C.currentTarget===C.target&&(M(),y())},b=()=>{},V=()=>{};return l({show:()=>{m.isShow=!0},hide:()=>{M()}}),(C,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:n.id,ref_key:"refElParent",ref:s},[e.createVNode(e.Transition,{"enter-active-class":n.classTransitionEnter,"leave-active-class":n.classTransitionLeave,onEnter:b,onAfterLeave:V},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(g.value),role:"dialog","aria-modal":"true",tabindex:"-1",ref_key:"refElDialog",ref:c},[e.createElementVNode("div",{class:"modal-wrapper",onClick:N},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle(h.value)},[e.createElementVNode("div",Dc,[e.renderSlot(C.$slots,"default")])],4)])],2),[[e.vShow,m.isShow]])]),_:3},8,["enter-active-class","leave-active-class"]),e.createVNode(At,{show:m.isShow,zIndex:999999,isLockScroll:!1,background:"var(--cl-mask, rgba(0, 0, 0, 0.3))",duration:150,teleportTarget:n.teleportTarget},null,8,["show","teleportTarget"])],10,Ic))}}),Tc={key:0,class:"modal-header"},Nc={class:"modal-title"},Vc={class:"modal-body"},Mc={key:2,class:"modal-footer"},Oc={key:3,class:"modal-footer-hide"},Qo=e.defineComponent({name:"ClModal",__name:"Index",props:{id:String,className:String,posSubmitClose:{type:String,default:"CloseSubmit",validator:n=>["CloseSubmit","SubmitClose"].indexOf(n)!==-1},width:{type:String,default:"600px"},titleName:String,isBackClick:{type:Boolean,default:!0},isShowHeader:{type:Boolean,default:!0},isShowFooter:{type:Boolean,default:!0},isShowSubmit:{type:Boolean,default:!0},isShowSubmitLoad:{type:Boolean,default:!0},closeLabel:String,submitLabel:String,classTransitionEnter:{type:String,default:"animated fadeInDown"},classTransitionLeave:{type:String,default:"animated fadeOutUp"},teleportTarget:{type:String,default:""}},emits:{onSubmit:()=>!0,onClose:()=>!0},setup(n,{expose:l,emit:a}){const t=n,{optLocale:i}=Le(),r=(V,w)=>{i.value;const T=at.getValue(`common.${V}`);return typeof T=="string"&&T.length>0?T:w},d=e.computed(()=>t.closeLabel||r("cancel","取消")),u=e.computed(()=>t.submitLabel||r("submit","提交")),s=a,c=e.useTemplateRef("refElTransition"),m=e.useTemplateRef("refElBtnSubmit"),p=e.reactive({isLoadBackClick:!0,disabledSubmit:!1}),g=()=>{s("onSubmit")},h=()=>{s("onClose")},y=()=>{c.value&&c.value.hide()},E=()=>{t.isShowSubmitLoad&&(p.isLoadBackClick=!1),g()},L=()=>{y(),h()},B=()=>{h()},I=()=>{N(),p.disabledSubmit=!1,c.value&&c.value.show()},M=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop(),y()},N=()=>{p.isLoadBackClick=!0,t.isShowSubmitLoad&&m.value&&m.value.loadStop()};return l({show:I,hide:M,loadStop:N,disabledSubmit:V=>{const w=o.isBoolean(V)?V:!0;p.disabledSubmit=w}}),(V,w)=>(e.openBlock(),e.createBlock(Al,{id:n.id,className:n.className,isBackClick:n.isBackClick&&p.isLoadBackClick,classTransitionEnter:n.classTransitionEnter,classTransitionLeave:n.classTransitionLeave,width:n.width,teleportTarget:n.teleportTarget,onOnClickBack:B,ref_key:"refElTransition",ref:c},{default:e.withCtx(()=>[n.isShowHeader?(e.openBlock(),e.createElementBlock("div",Tc,[e.createElementVNode("h4",Nc,e.toDisplayString(n.titleName),1),e.createElementVNode("button",{type:"button",class:"close","aria-label":"关闭",onClick:L},[e.createVNode(ke,{name:"close"})])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Vc,[e.renderSlot(V.$slots,"default")]),n.isShowFooter?(e.openBlock(),e.createElementBlock("div",Mc,[n.posSubmitClose==="CloseSubmit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(et,{label:d.value,color:"grayLight",onOnClick:L},null,8,["label"]),n.isShowSubmit?(e.openBlock(),e.createBlock(et,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:n.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:u.value,onOnClick:E},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):n.posSubmitClose==="SubmitClose"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.isShowSubmit?(e.openBlock(),e.createBlock(et,{key:0,ref_key:"refElBtnSubmit",ref:m,disabled:p.disabledSubmit,isShowLoad:n.isShowSubmitLoad,loadColor:"var(--cl-bg, #ffffff)",isShowBackDrop:!0,label:u.value,onOnClick:E},null,8,["disabled","isShowLoad","label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(et,{label:d.value,color:"grayLight",onOnClick:L},null,8,["label"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock("div",Oc))]),_:3},8,["id","className","isBackClick","classTransitionEnter","classTransitionLeave","width","teleportTarget"]))}}),_c=["id"],Ll=e.defineComponent({name:"ClNumberRoll",__name:"Index",props:{id:String,value:[String,Number],className:String,decimal:{type:Number,default:0},isThousand:{type:Boolean,default:!0},separator:{type:String,default:","},animationTime:{type:Number,default:.5}},setup(n){const l=n,a=l.id,t=e.ref("");let i=null;const r=e.computed(()=>{const c={"panel-number-roll":!0};return o.getJsonMerge(c,me.getClassNameJson(l.className))}),d=c=>{const m=Math.max(0,Math.min(100,l.decimal)),p=l.separator,g=l.isThousand,y=c.toFixed(m).split(".");return g&&(y[0]=y[0].replace(/\B(?=(\d{3})+(?!\d))/g,()=>p)),y.join(".")},u=(c,m,p)=>{if(i!==null&&(cancelAnimationFrame(i),i=null),c===m){t.value=d(m);return}const g=performance.now(),h=p*1e3,y=E=>{const L=Math.min((E-g)/h,1),B=L===1?1:1-Math.pow(2,-10*L);t.value=d(c+(m-c)*B),L<1?i=requestAnimationFrame(y):i=null};i=requestAnimationFrame(y)},s=(c,m)=>{const p=l.animationTime,g=y=>{if(y==null||y==="")return 0;const E=Number(y);return o.isFinite(E)?E:0},h=g(c);if(p>0){const y=g(m);u(y,h,p)}else t.value=d(h)};return e.onMounted(()=>{e.nextTick(()=>{s(l.value)})}),e.onActivated(()=>{}),e.onDeactivated(()=>{i!==null&&(cancelAnimationFrame(i),i=null);const c=m=>{if(m==null||m==="")return 0;const p=Number(m);return o.isFinite(p)?p:0};t.value=d(c(l.value))}),e.onBeforeUnmount(()=>{i!==null&&(cancelAnimationFrame(i),i=null)}),e.watch(()=>l.value,(c,m)=>{c!==m&&s(c,m)}),(c,m)=>(e.openBlock(),e.createElementBlock("span",{id:e.unref(a),class:e.normalizeClass(r.value)},e.toDisplayString(t.value),11,_c))}}),Ac=["id"],Lc={key:0,class:"progress"},$c=["aria-valuenow"],Fc=["aria-valuenow"],Pc={class:"progress-circular-line circular-line-left"},$l=e.defineComponent({name:"ClProgress",__name:"Index",props:{id:String,className:String,ratio:{type:[Number,String],required:!0},theme:{type:String,default:"horizontal",validator:n=>["horizontal","circular"].includes(n)},color:String,isShowNum:{type:Boolean,default:!0},isAnimation:{type:Boolean,default:!0},diameter:{type:String,default:"50px"},showNumText:String,showNumPos:{type:String,default:"out-center"},showNumTrigger:{type:String,default:"hover"},showNumColor:String},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElTopParent"),i=e.useTemplateRef("refElBar"),r=e.reactive({isHorizontal:l.theme==="horizontal",isCircular:l.theme==="circular",ratioHundred:"0%",circularLeftRotate:-45,circularLeftTime:0,circularRightRotate:-45,circularRightTime:0,posText:{inOut:"out",lcr:"center",isOverflow:!1}}),d={lastRatio:"",lastRotateLeft:-45,lastRotateRight:-45,runTimeCircularRotate:null,_initVersion:0,_resizeTimer:null,resizeEvent:null},u=e.computed(()=>{let I="";const{showNumText:M}=l;if(o.isNonEmptyString(M))I=M;else{let N=r.ratioHundred;N=N.substring(0,N.length-1),I=o.getFormatThousands(N)+"%"}return I}),s=e.computed(()=>{const I={"panel-progress":!0};I[`progress-${l.theme}`]=!0;const{className:M,isShowNum:N,showNumTrigger:b}=l;return N&&b!=="none"&&(I[`progress-${b}-num`]=!0),Object.assign(I,me.getClassNameJson(M)),I}),c=e.computed(()=>({"progress-bar":!0,"progress-bar-striped":l.isAnimation,"striped-animation":l.isAnimation})),m=e.computed(()=>{const I={};return r.isCircular&&(o.isEmpty(l.diameter)||(I.width=l.diameter,I.height=l.diameter)),I}),p=e.computed(()=>{const I={};if(I.width=r.ratioHundred,o.isEmpty(l.color)||(I["background-color"]=l.color),r.isHorizontal&&r.posText.inOut==="in"){let M="center";switch(r.posText.lcr){case"left":M="flex-start";break;case"center":M="center";break;case"right":M="flex-end";break;default:M="center";break}r.posText.isOverflow&&(M="flex-start"),I["justify-content"]=M}return I}),g=e.computed(()=>{const I={},{showNumColor:M}=l;if(o.isNonEmptyString(M)&&(I.color=M),r.isHorizontal&&r.posText.inOut==="out")switch(r.posText.lcr){case"left":I.left="0";break;case"center":break;case"right":I.right="0";break}return I}),h=e.computed(()=>{const I={};return I.transform=`rotate(${r.circularRightRotate}deg)`,r.circularRightTime>0&&(I["transition-duration"]=`${r.circularRightTime}ms`),o.isEmpty(l.color)||(I["border-bottom-color"]=l.color,I["border-right-color"]=l.color),I}),y=e.computed(()=>{const I={};return I.transform=`rotate(${r.circularLeftRotate}deg)`,r.circularLeftTime>0&&(I["transition-duration"]=`${r.circularLeftTime}ms`),o.isEmpty(l.color)||(I["border-bottom-color"]=l.color,I["border-right-color"]=l.color),I}),E=()=>{const{showNumPos:I}=l;if(o.isEmpty(I))return;const M=I.split("-");M.length===2?(r.posText.inOut=o.isExistValue(["in","out"],M[0])?M[0]:"out",r.posText.lcr=o.isExistValue(["left","center","right"],M[1])?M[1]:"center"):we.warn("ClProgress",'showNumPos 格式无效,期望 "in/out-left/center/right",实际传入',I)},L=I=>{let M=o.isEmpty(I)?0:Number(I);if(o.isNaN(M)&&(M=0),M<=0?M=0:M>=100&&(M=100),r.ratioHundred=`${M}%`,r.isCircular){d.runTimeCircularRotate&&clearTimeout(d.runTimeCircularRotate);const N=M/100*360;let b=0,V=0;N<180?(b=N+-45,V=-45):(b=135,V=N-180-45);let w=!0;o.isEmpty(d.lastRatio)||(w=M>=Number(d.lastRatio));let C=0,D=0;const J=Math.abs(b-d.lastRotateRight),ne=Math.abs(V-d.lastRotateLeft);if(J>0||ne>0){const x=400/(J+ne);C=J*x,D=ne*x}const K=++d._initVersion;w?(r.circularRightRotate=b,r.circularRightTime=C,e.nextTick(()=>{K===d._initVersion&&(d.runTimeCircularRotate=setTimeout(()=>{r.circularLeftRotate=V,r.circularLeftTime=D},C))})):(r.circularLeftRotate=V,r.circularLeftTime=D,e.nextTick(()=>{K===d._initVersion&&(d.runTimeCircularRotate=setTimeout(()=>{r.circularRightRotate=b,r.circularRightTime=C},D))})),d.lastRotateRight=b,d.lastRotateLeft=V}d.lastRatio=String(M)},B=()=>{E(),L(l.ratio),i.value&&(d.resizeEvent=new Ye.Resize({element:i.value,callback:()=>{d._resizeTimer&&clearTimeout(d._resizeTimer),d._resizeTimer=setTimeout(()=>{if(l.isShowNum&&r.isHorizontal&&r.posText.inOut==="in"&&t.value){const I=t.value.querySelector(".progress-bar"),M=t.value.querySelector(".progress-num");if(I&&M){const N=I.clientWidth,b=M.clientWidth;let V=!1;N===0&&b===0?V=!1:N===0&&b>0?V=!0:V=N>0&&b>N,r.posText.isOverflow=V}}},150)}}))};return e.onMounted(()=>{e.nextTick(()=>{B()})}),e.onUnmounted(()=>{d._resizeTimer&&clearTimeout(d._resizeTimer),d.runTimeCircularRotate&&clearTimeout(d.runTimeCircularRotate),d.resizeEvent&&d.resizeEvent.destroy()}),e.watch(()=>l.ratio,(I,M)=>{I!==M&&L(I)}),(I,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:e.unref(a),class:e.normalizeClass(s.value),style:e.normalizeStyle(m.value)},[r.isHorizontal?(e.openBlock(),e.createElementBlock("div",Lc,[e.createElementVNode("div",{ref_key:"refElBar",ref:i,class:e.normalizeClass(c.value),style:e.normalizeStyle(p.value),role:"progressbar","aria-valuenow":Number(r.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[n.isShowNum&&r.posText.inOut==="in"?(e.openBlock(),e.createElementBlock("span",{key:0,class:"progress-num",style:e.normalizeStyle(g.value)},e.toDisplayString(u.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,$c)])):r.isCircular?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:"progress-circular-line circular-line-right",role:"progressbar","aria-valuenow":Number(r.ratioHundred.replace("%","")),"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(h.value)},null,4)],8,Fc),e.createElementVNode("div",Pc,[e.createElementVNode("div",{class:"progress-circular-bar",style:e.normalizeStyle(y.value)},null,4)])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.isShowNum&&r.posText.inOut==="out"?(e.openBlock(),e.createElementBlock("span",{key:3,class:"progress-num",style:e.normalizeStyle(g.value)},e.toDisplayString(u.value),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],14,Ac))}}),Rc=["id"],Hc={key:0,class:"cl-plaintext-value"},Uc=["id","name","value","disabled","checked","onClick"],zc=["for"],Jc={key:0},Zo=e.defineComponent({name:"ClRadio",directives:{cltooltip:dt},__name:"Index",props:{id:String,name:{type:String,required:!0},value:{type:[String,Number],required:!0},className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},width:String,isInline:{type:Boolean,default:!0},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)},checkChangeBefore:{type:Function,default:void 0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0}},emits:["update:value","update:modelValue","onChange","onInit","onError","onTipClick"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`rd-${o.getRandom(8)}`,d=o.isEmpty(t.name)?r+"_name":t.name,u=t.id,s=e.ref(t.value?.toString()||"");let c={};const m=e.ref(0),p=e.ref(!1),g={isProcessing:!1,_initEmitted:!1},h=e.computed(()=>{if(t.isPlaintext)return[];const f=t.list;return o.isArray(f)?f.filter(S=>!o.isEmpty(S)):[]}),y=e.computed(()=>{t.list,m.value;const f=s.value;if(o.isEmpty(f))return"";const S=o.isExistJsonKey(c,f)?c[f]:void 0;return S&&o.isNonEmptyString(S.name)?S.name:f}),E=e.computed(()=>Je.getPlaintextOutText("radio",t.plaintextEmptyText,y.value,t.value)),L=e.computed(()=>o.getJsonMerge({"panel-radio":!0},me.getClassNameJson(t.className))),B=e.computed(()=>{const f={radio:!0,"radio-default":!0};return f["radio-inline"]=t.isInline??!0,f}),I=f=>{i("update:value",f),i("update:modelValue",f)},M=f=>{const S=f.id?.toString()??"";I(S),i("onChange",S,o.getJsonClone(f))},N=()=>{g._initEmitted||(g._initEmitted=!0,e.nextTick(()=>{i("onInit")}))},b=f=>{const S={},{width:k}=t;return f&&!o.isEmpty(f.width)?S.width=f.width:o.isEmpty(k)||(S.width=t.width),S},V=()=>o.isExistJsonKey(c,s.value)?s.value:"",w=f=>{c=o.isEmpty(f)?{}:o.getJsonByList(f),m.value+=1},T=()=>{if(p.value){const f=o.isEmpty(s.value)?"":s.value;o.isExistJsonKey(c,f)||(s.value="",I(""))}},C=f=>{f!==s.value&&(s.value=f?.toString()||"")},D=()=>{p.value=t.list.length!==0,w(t.list),T()};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.onBeforeUnmount(()=>{c={},p.value=!1,g._initEmitted=!1}),e.watch(p,f=>{f&&N()}),e.watch(()=>t.list,f=>{p.value||(p.value=!0,f.length===0&&T(),N())},{deep:!0}),e.watch([()=>t.value,()=>t.list],([f,S])=>{const k=S||[];!p.value&&k.length>0&&(p.value=!0,N()),w(k),C(f),T()},{deep:!0});const J=f=>{i("onTipClick",f)},ne=async f=>{if(!(!f||f.isDisabled||t.disabled||g.isProcessing)&&!o.isEmpty(f.id)){g.isProcessing=!0;try{const S=String(f.id??"");if(S===s.value)return;let k=!0;if(t.checkChangeBefore)try{k=await t.checkChangeBefore(S),k=o.isBoolean(k)?k:!0}catch{k=!1}if(t.disabled||f.isDisabled)return;k&&(s.value=S,M(f))}catch(S){i("onError",S)}finally{g.isProcessing=!1}}},K=()=>V();return l({getValue:K,getValueData:()=>{const f=K();return o.isExistJsonKey(c,f)?o.getJsonClone(c[f]):{}},setValue:f=>{g.isProcessing||(C(f),T())},runInitComplete:()=>{p.value||(p.value=!0,w(t.list),C(t.value),T(),N())}}),(f,S)=>{const k=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Hc,e.toDisplayString(E.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(v,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${r}-${v.id??""}-${F}`},[v&&(v.isShow||v.isShow===void 0)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(B.value),style:e.normalizeStyle(b(v))},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:`${r}_${e.unref(d)}_${v.id??""}`,name:e.unref(d),value:v.id??"",disabled:v.isDisabled||n.disabled,checked:(v.id?.toString()??"")===s.value,onClick:_=>ne(v)},null,8,Uc),e.createElementVNode("label",{for:`${r}_${e.unref(d)}_${v.id??""}`},[e.renderSlot(f.$slots,"default",{data:v},()=>[v.icon&&v.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Jc,[e.createVNode(ke,{name:v.icon},null,8,["name"])])),[[k,{html:v.name,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(v.name),1)],64))])],8,zc)]),v.tipMsg&&v.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:e.unref(o).isNonEmptyString(v.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(v.tipIcon)?v.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[k,{html:v.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ke,{key:1,name:e.unref(o).isNonEmptyString(v.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(v.tipIcon)?v.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(_=>J(v),["stop"])},null,8,["name","className","onClick"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,Rc)}}}),Kc=["id"],Wc=["id","name","checked","disabled"],jc=["for"],Yc={key:0},ea=e.defineComponent({name:"ClRadioOne",directives:{cltooltip:dt},__name:"One",props:{id:{type:String,default:""},name:{type:String,default:""},value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},forId:{type:String,default:""},label:{type:String,default:""},icon:{type:String,default:""},tipMsg:{type:String,default:""},tipIcon:{type:String,default:""},tipMode:{type:String,default:"tooltip",validator:n=>["tooltip","clickCallback"].includes(n)}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onTipClick:()=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.computed(()=>o.isEmpty(a.forId)?`rd_${a.name||""}_${o.getRandom(8)}`:a.forId),d=e.computed(()=>{const m={"panel-radio-one":!0,radio:!0,"radio-default":!0,"radio-inline":!0};return o.getJsonMerge(m,me.getClassNameJson(a.className))}),u=m=>{t("update:value",m),t("update:modelValue",m),t("onChange",m)},s=()=>{t("onTipClick")},c=m=>{const p=m.currentTarget;p&&p.checked&&u(!0)};return(m,p)=>{const g=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),id:e.unref(i)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,[e.createElementVNode("input",{type:"radio",id:r.value,name:n.name,checked:n.value,disabled:n.disabled,onClick:c},null,8,Wc),e.createElementVNode("label",{for:r.value},[n.icon&&n.icon.length>0?e.withDirectives((e.openBlock(),e.createElementBlock("span",Yc,[e.createVNode(ke,{name:n.icon},null,8,["name"])])),[[g,{html:n.label,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.label),1)],64))],8,jc)]),n.tipMsg&&n.tipMsg.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.tipMode==="tooltip"?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"radio-icon-tip"},null,8,["name","className"])),[[g,{html:n.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createBlock(ke,{key:1,name:e.unref(o).isNonEmptyString(a.tipIcon)?void 0:"question-circle",className:e.unref(o).isNonEmptyString(a.tipIcon)?a.tipIcon:void 0,class:"radio-icon-tip",onClick:e.withModifiers(s,["stop"])},null,8,["name","className"]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,Kc)}}}),qc=["id"],Xc=e.defineComponent({name:"ClSliderBar",__name:"Bar",props:{id:String,className:String,left:{type:Number,default:0},width:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1}},emits:{onMoveStart:()=>!0,onMoveIng:n=>!0,onMoveEnd:()=>!0,onMouseover:()=>!0,onMouseout:()=>!0,onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$SliderTop"),r=e.useTemplateRef("refElBar"),d=a.id,u=e.reactive({left:a.left}),s=e.reactive({isClick:!1,isDragging:!1,dragStart:0,dragStartRatio:0}),c=e.ref(null),m=e.computed(()=>{let M={"slider-bar":!0,"slider-bar-drag":a.isBarDrag};return M=o.getJsonMerge(M,me.getClassNameJson(a.className)),M}),p=e.computed(()=>{const M={};return a.isVertical?(M.bottom=`${u.left}%`,M.height=`${a.width}%`):(M.left=`${u.left}%`,M.width=`${a.width}%`),M}),g=(M,N)=>{N&&(s.isClick=!0,s.isDragging=!1,s.dragStart=a.isVertical?N.clientY:N.clientX,s.dragStartRatio=a.left,t("onMoveStart"))},h=(M,N)=>{if(!i||!N)return;s.isClick=!1,s.isDragging=!0;let b=0;a.isVertical?b=s.dragStart-N.clientY:b=N.clientX-s.dragStart;const V=i.getDragValueInfo(b,s.dragStartRatio);u.left=V.ratio,t("onMoveIng",V.ratio)},y=M=>{s.isClick?t("onClick",M):t("onMoveEnd"),s.isClick=!1,s.isDragging=!1},E=()=>{if(!r.value)return;const M={start(N,b,V){let w=!1;return!a.disabled&&a.isBarDrag&&V&&(w=!0,g(N,b)),w},ing:(N,b)=>{h(N,b)},end:N=>{y(N)}};c.value=new Ye.Drag(r.value,M)};e.onMounted(()=>{e.nextTick(()=>{E()})}),e.onBeforeUnmount(()=>{c.value&&(c.value.end(),c.value=null)}),e.watch(()=>a.left,(M,N)=>{M!==N&&M!==u.left&&(u.left=M)});const L=M=>{!a.disabled&&!a.isBarDrag&&t("onClick",M)},B=()=>{t("onMouseover")},I=()=>{s.isDragging||t("onMouseout")};return(M,N)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElBar",ref:r,id:e.unref(d),class:e.normalizeClass(m.value),style:e.normalizeStyle(p.value),onMouseover:B,onMouseout:I,onClick:L},null,46,qc))}}),Gc=["id","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-disabled","aria-orientation"],Bo=e.defineComponent({name:"ClSliderButton",__name:"Button",props:{id:String,value:[String,Number],className:String,ratio:{type:Number,default:0},disabled:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},tooltipFormat:String,btnType:{type:String,default:"",validator:n=>["","start","end"].includes(n)},min:{type:Number,default:0},max:{type:Number,default:100},ariaLabel:String},emits:{onMoveIng:n=>!0,onMoveEnd:n=>!0,onDblClick:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$SliderTop"),d=dt,u=e.useTemplateRef("refElButton"),s=t.id,c=e.reactive({isHover:!1,ratio:t.ratio,value:t.value}),m=e.reactive({dragStart:0,dragStartRatio:0,isMoveIng:!1}),p=e.ref(null),g=e.computed(()=>{let f=c.value;if(f!=null){const S=t.tooltipFormat;f=o.getFormatThousands(f.toString()),o.isNonEmptyString(S)&&(f=o.convertStringFormat(S,{_value:f}))}return f??""}),h=e.computed(()=>t.isVertical?"right":"top"),y=e.computed(()=>o.isNonEmptyString(t.ariaLabel)?t.ariaLabel:t.btnType==="start"?"最小值":t.btnType==="end"?"最大值":"滑块"),E=e.computed(()=>{const f=Number(t.value);return o.isFinite(f)?f:t.min}),L=e.computed(()=>{let f={"slider-button":!0,hover:c.isHover};return f=o.getJsonMerge(f,me.getClassNameJson(t.className)),f}),B=e.computed(()=>{const f={},S=c.ratio;return t.isVertical?f.bottom=`${o.isFinite(S)?S:0}%`:f.left=`${o.isFinite(S)?S:0}%`,f}),I=()=>{u.value&&Ao.show(u.value)},M=()=>{u.value&&Ao.hide(u.value)},N=(f,S)=>{if(!r||!S)return{ratio:c.ratio,value:c.value};let k=0;t.isVertical?k=m.dragStart-S.clientY:k=S.clientX-m.dragStart;const v=r.getDragValueInfo(k,m.dragStartRatio);return c.ratio=v.ratio,c.value=v.value,v},b=(f,S)=>{S&&(m.dragStart=t.isVertical?S.clientY:S.clientX,m.dragStartRatio=t.ratio)},V=(f,S)=>{const k=N(f,S);I(),i("onMoveIng",{value:k.ratio,runType:"drag"})},w=(f,S)=>{N(f,S),c.isHover||u.value===f.target||u.value?.contains(f.target)||M(),i("onMoveEnd",{runType:"drag"})},T=f=>{if(!r)return;m.isMoveIng=!0;const S=r.getButtonMoveValueInfo(f,t.ratio);c.ratio=S.ratio,c.value=S.value,i("onMoveIng",{value:S.ratio,runType:"keydown"})},C=()=>{if(!u.value)return;const f={start(S,k,v){let F=!1;return!t.disabled&&v&&(F=!0,b(S,k)),F},ing:(S,k)=>{V(S,k)},end:(S,k)=>{w(S,k)}};p.value=new Ye.Drag(u.value,f)};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{p.value&&(p.value.end(),p.value=null),m.isMoveIng=!1}),e.watch(()=>t.value,(f,S)=>{f!==S&&f!==c.value&&(c.value=f)}),e.watch(()=>t.ratio,(f,S)=>{f!==S&&f!==c.ratio&&(c.ratio=f)});const D=f=>{t.disabled||(f.preventDefault(),f.stopPropagation(),T("left"))},J=f=>{t.disabled||(f.preventDefault(),f.stopPropagation(),T("right"))},ne=()=>{t.disabled||(c.isHover=!0)},K=()=>{t.disabled||(c.isHover=!1,m.isMoveIng&&(m.isMoveIng=!1,i("onMoveEnd",{runType:"keydown"})))},P=()=>{t.disabled||i("onDblClick")};return l({showTooltip:()=>{I()},hideTooltip:()=>{M()}}),(f,S)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"refElButton",ref:u,id:e.unref(s),class:e.normalizeClass(L.value),style:e.normalizeStyle(B.value),tabindex:"0",role:"slider","aria-label":y.value,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":E.value,"aria-disabled":n.disabled?"true":void 0,"aria-orientation":n.isVertical?"vertical":"horizontal",onDblclick:P,onFocus:ne,onBlur:K,onKeydown:[e.withKeys(D,["down"]),e.withKeys(J,["up"]),e.withKeys(D,["left"]),e.withKeys(J,["right"])]},[...S[0]||(S[0]=[e.createElementVNode("div",{class:"slider-button-icon"},null,-1)])],46,Gc)),[[e.unref(d),{trigger:["hover","focus"],position:h.value,html:g.value,updRefreshInx:c.ratio},void 0,{black:!0}]])}}),Qc=["id"],Zc=e.defineComponent({name:"ClSliderDot",__name:"Dot",props:{id:String,className:String,itemInfo:{type:Object,default:()=>({})},isHover:{type:Boolean,default:!1},isVertical:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!0},tooltipFormat:String},emits:{onMouseover:()=>!0,onMouseout:()=>!0,onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=dt,d=e.computed(()=>a.isVertical?"right":"top"),u=e.computed(()=>{const h=a.itemInfo.value;if(h!=null){let y=o.getFormatThousands(h.toString());const E=a.tooltipFormat;return o.isNonEmptyString(E)&&(y=o.convertStringFormat(E,{_value:y})),y}return""}),s=e.computed(()=>{let h={"slider-dot":!0,"slider-dot-active":a.itemInfo.isActive??!1,"slider-dot-hide":a.itemInfo.isHide??!1,hover:a.isHover};return h=o.getJsonMerge(h,me.getClassNameJson(a.className)),h}),c=e.computed(()=>{const h={},y=a.itemInfo.ratio;return y!=null&&(a.isVertical?h.bottom=`${y}%`:h.left=`${y}%`),h}),m=()=>{t("onMouseover")},p=()=>{t("onMouseout")},g=()=>{t("onClick")};return(h,y)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(s.value),style:e.normalizeStyle(c.value),onMouseover:m,onMouseout:p,onClick:g},[...y[0]||(y[0]=[e.createElementVNode("div",{class:"slider-dot-icon"},null,-1)])],46,Qc)),[[e.unref(r),{init:n.isTooltip,position:d.value,html:u.value},void 0,{black:!0,hover:!0}]])}}),eu=["id"],tu=["id"],nu={class:"slider-container"},ou={key:2,class:"slider-dots"},au={key:0,class:"slider-marks"},lu=["innerHTML","onMouseover"],ta=e.defineComponent({name:"ClSlider",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},value:[String,Number],min:{type:Number,default:0},max:{type:Number,default:100},isRange:{type:Boolean,default:!1},isBarDrag:{type:Boolean,default:!1},splitNumber:{type:Number,default:0},isShowDot:{type:Boolean,default:!0},isShowDotActive:{type:Boolean,default:!0},marks:{type:Array,default:()=>[]},isVertical:{type:Boolean,default:!1},verticalHeight:String,size:{type:String,default:"large"},numType:{type:String,default:"int",validator:n=>["int","float2","float3"].indexOf(n)>-1},tooltipFormat:String,isPlaintext:{type:Boolean,default:!1},plaintextSeparator:{type:String,default:" - "},ariaLabel:String},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`slider-${o.getRandom(5)}`,d=e.useTemplateRef("refElTrack"),u=e.useTemplateRef("refBtnStart"),s=e.useTemplateRef("refBtnEnd"),c=t.id,m=e.reactive({track:void 0,bar:void 0,btnStart:void 0,btnEnd:void 0,dots:void 0,marks:void 0});o.isNonEmptyString(c)&&(m.track=`${c}-track`,m.bar=`${c}-bar`,m.btnStart=`${c}-btn-start`,m.btnEnd=`${c}-btn-end`,m.dots=`${c}-dots`,m.marks=`${c}-marks`);const p=e.reactive({markHoverIndex:-1}),g=e.reactive({left:0,width:0}),h=e.reactive({start:t.min,end:t.min,startRatio:0,endRatio:0}),y=H=>{const te=t.tooltipFormat;return o.isNonEmptyString(te)?o.convertStringFormat(te,{_value:H}):H.toString()},E=e.computed(()=>{if(!t.isRange)return y(h.end);const H=o.isString(t.plaintextSeparator)?t.plaintextSeparator:" - ";return`${y(h.start)}${H}${y(h.end)}`}),L=e.ref([]),B=e.ref([]),I=e.computed(()=>Math.abs(t.max-t.min)),M=e.computed(()=>t.marks.length>0),N=e.computed(()=>{const{isRange:H,isBarDrag:te}=t;let $=!1;return H&&($=te),$}),b=e.computed(()=>{let H={"panel-slider":!0,"slider-disabled":t.disabled,"slider-vertical":t.isVertical,"slider-level":!t.isVertical},te=t.size;return o.isEmpty(te)&&(te="large"),H[`slider-${te}`]=!0,H=o.getJsonMerge(H,me.getClassNameJson(t.className)),H}),V=e.computed(()=>{const H={};return t.isVertical&&o.isNonEmptyString(t.verticalHeight)&&(H.height=t.verticalHeight),H}),w=(H,te=2)=>o.isFinite(H)?Number((H*100).toFixed(te)):0,T=H=>{const te=I.value;return te>0?w((H-t.min)/te):0},C=H=>{let te=0;if(H<=0)te=t.min;else if(H>=100)te=t.max;else{const{numType:$}=t,ce=I.value*H/100,de=o.getValueByFormat(ce.toString(),$,{isThousands:!1});if(te=t.min+Number(de),o.isExistValue(["float2","float3"],$)){const ie=Number($.replace("float","")),ae=te.toString();o.isExistValue(ae,".")&&ae.split(".")[1].length>ie&&(te=Number(te.toFixed(ie)))}}return te},D=H=>{let te=Number(H),$=!0;return o.isFinite(te)?te<=t.min?(te=t.min,$=!1):te>=t.max&&(te=t.max,$=!1):(te=t.min,$=!1),{value:te,check:$}},J=()=>{if(M.value){const H=[];t.marks.forEach(te=>{if(!te)return;const $=o.getJsonClone(te);$.value=Number($.value),o.isFinite($.value)&&($.ratio=T($.value),o.isString($.mark)?$.safeMark=o.isHtml($.mark)?o.encodeHTML($.mark):$.mark:$.safeMark="",H.push($))}),H.sort((te,$)=>te.value-$.value),B.value=H}},ne=()=>{const H=[];if(M.value)B.value.forEach(te=>{H.push({ratio:te.ratio,value:te.value,isActive:!1,isHide:!1})});else if(t.splitNumber>1){const te=100/t.splitNumber,$=te/2;for(let z=1;z<t.splitNumber;z++){const ce=te*z,de=C(ce);H.push({value:de,ratio:w(ce/100),isActive:!1,isHide:!1,left:w((ce-$)/100),right:w((ce+$)/100)})}}L.value=H},K=()=>{if(L.value.length>0){const{isShowDot:H,isShowDotActive:te,min:$,max:z}=t,ce=M.value,de=g.left,ie=de+g.width,ae=[];L.value.forEach(W=>{const j=o.getJsonClone(W),ue=W.ratio>=de&&W.ratio<=ie;j.isActive=ue;let pe=!1;ce?pe=!0:H?(pe=!0,ue&&(te?pe=!0:pe=!1)):pe=!1,(W.value===$||W.value===z)&&(pe=!1),j.isHide=!pe,ae.push(j)}),L.value=ae}},P=H=>{const te=H.startRatio>H.endRatio?H.endRatio:H.startRatio,$=Math.abs(H.endRatio-H.startRatio);g.left=te,g.width=$},x=H=>{e.nextTick(()=>{t.isRange?H?(u.value?.showTooltip(),s.value?.showTooltip()):(u.value?.hideTooltip(),s.value?.hideTooltip()):H?s.value?.showTooltip():s.value?.hideTooltip()})},A=H=>{P(H),h.start=H.start,h.end=H.end,h.startRatio=H.startRatio,h.endRatio=H.endRatio,K()},f=H=>{let te,$;if(H&&!o.isEmpty(H)){const de=H.toString();if(de==="")te=t.min,$=t.min;else{const ie=de.split(","),ae=D(ie[0]);if(t.isRange){if(te=ae.value,$=te,ie.length>1){const W=D(ie[1]);W.value>te&&($=W.value)}}else te=t.min,$=ae.value}}else te=t.min,$=t.min;const z=T(te),ce=T($);A({start:te,end:$,startRatio:z,endRatio:ce})},S=H=>{if(!o.isFinite(H))return 0;let te=w(H);const $=L.value;if(!M.value&&$.length>0){if(te<$[0].left)te=0;else if(te>$[$.length-1].right)te=100;else for(let z=0;z<$.length;z++)if(te>=$[z].left&&te<=$[z].right){te=$[z].ratio;break}}return te},k=H=>{const te=S(H),$=C(te);let{start:z,startRatio:ce,end:de,endRatio:ie}=h,ae="";if(t.isRange)if(te<=ce)ae="start";else if(te>=ie)ae="end";else{const W=(ie-ce)/2;te>ce&&te<=ce+W?ae="start":te>=ie-W&&te<ie&&(ae="end")}else ae="end";switch(ae){case"start":z=$,ce=te;break;case"end":de=$,ie=te;break}return{start:z,end:de,startRatio:ce,endRatio:ie}},v=H=>{const te=H?.start??h.start,$=H?.end??h.end;let z=te,ce=$;z>ce&&(z=$,ce=te);const de=t.isRange?`${z},${ce}`:ce.toString();i("update:value",de),i("update:modelValue",de),i("onChange",de,{start:z,end:ce})},F=H=>{if(!H)return{};const te={};return t.isVertical?te.bottom=`${H.ratio}%`:te.left=`${H.ratio}%`,o.isEmpty(H.color)||(te.color=H.color),te},_=()=>{J(),ne(),f(t.value)};e.onMounted(()=>{e.nextTick(()=>{_()})}),e.watch(()=>t.value,(H,te)=>{if(H!==te){let $=!0;const z=H!=null?H.toString():"";if(z==="")$=!0;else{const ce=z.split(","),de=Number(ce[0]);if(t.isRange){const ie=ce.length>1?Number(ce[1]):de;(de===h.start&&ie===h.end||de===h.end&&ie===h.start)&&($=!1)}else $=de!==h.end}$&&f(H)}},{immediate:!0}),e.watch(()=>t.marks,()=>{J(),ne()});const O=H=>{if(!t.disabled&&H){H.preventDefault(),H.stopPropagation();const te=d.value;if(!te)return;const $=te.getBoundingClientRect(),z=t.isVertical?($.bottom-H.clientY)/te.clientHeight:(H.clientX-$.left)/te.clientWidth;if(!o.isFinite(z))return;const ce=k(z);A(ce),v(ce)}},q=(H,te)=>{let{startRatio:$,endRatio:z}=h;const ce=H.value;te==="start"?($=ce,h.start=C(ce),h.startRatio=ce):(z=ce,h.end=C(ce),h.endRatio=ce),P({startRatio:$,endRatio:z}),K(),H.runType==="keydown"&&v()},X=H=>{const{left:te,width:$}=g,z={startRatio:te,endRatio:te+$};z.start=C(z.startRatio),z.end=C(z.endRatio),A(z),H.runType==="drag"&&v(z)},Z=H=>{if(t.isRange){let{start:te,startRatio:$,end:z,endRatio:ce}=h;H==="start"?(ce=$,z=te):($=ce,te=z);const de={start:te,startRatio:$,end:z,endRatio:ce};A(de),v(de)}},se=()=>{x(!0)},le=H=>{const te=H;h.start=C(H),h.startRatio=H;const $=H+g.width;h.end=C($),h.endRatio=$,P({startRatio:te,endRatio:$}),K(),x(!0)},G=()=>{v(),x(!1)},oe=()=>{x(!0)},R=()=>{x(!1)},U=H=>{M.value&&(p.markHoverIndex=H)},Q=()=>{p.markHoverIndex=-1},ee=()=>t.isRange?`${h.start},${h.end}`:h.end.toString();return l({getValue:ee,getValueData:()=>({value:ee(),show:ee()})}),e.provide("$SliderTop",{getDragValueInfo:(H,te)=>{const $=d.value;if(!$)return{ratio:te/100,value:C(te/100)};const z=t.isVertical?$.clientHeight:$.clientWidth;if(z<=0)return{ratio:te/100,value:C(te/100)};const ce=H/z;let de=te/100+ce;de>=1?de=1:de<=0&&(de=0),de=S(de);const ie=C(de);return{ratio:de,value:ie}},getButtonMoveValueInfo:(H,te)=>{const $=H==="left"?-1:1,z=Number(te);let ce;const de=L.value,ie=de.length;if(!M.value&&ie>0){let W=-1;if(z<de[0].ratio)W=-1;else if(z>de[ie-1].ratio)W=ie;else for(let ue=0;ue<ie;ue++)if(z>=de[ue].ratio&&ue+1<ie&&z<de[ue+1].ratio){W=ue;break}const j=W+$;j<0?ce=0:j>=ie?ce=100:ce=de[j].ratio}else ce=z+$;ce>=100?ce=100:ce<=0&&(ce=0);const ae=C(ce);return{ratio:ce,value:ae}}}),(H,te)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(c),class:"cl-plaintext-value"},e.toDisplayString(E.value),9,eu)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(c),class:e.normalizeClass(b.value),style:e.normalizeStyle(V.value)},[e.createElementVNode("div",nu,[e.createElementVNode("div",{ref_key:"refElTrack",ref:d,class:"slider-track",onClick:O},null,512),e.createVNode(Xc,{id:m.bar,disabled:n.disabled,isVertical:n.isVertical,isBarDrag:N.value,left:g.left,width:g.width,onOnMoveStart:se,onOnMoveIng:le,onOnMoveEnd:G,onOnClick:O,onOnMouseover:oe,onOnMouseout:R},null,8,["id","disabled","isVertical","isBarDrag","left","width"]),n.isRange?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Bo,{ref_key:"refBtnStart",ref:u,id:m.btnStart,disabled:n.disabled,isVertical:n.isVertical,value:h.start,ratio:h.startRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,btnType:"start",min:n.min,max:n.max,onOnMoveIng:te[0]||(te[0]=$=>q($,"start")),onOnMoveEnd:X,onOnDblClick:te[1]||(te[1]=$=>Z("start"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"]),e.createVNode(Bo,{ref_key:"refBtnEnd",ref:s,id:m.btnEnd,disabled:n.disabled,isVertical:n.isVertical,value:h.end,ratio:h.endRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,btnType:"end",min:n.min,max:n.max,onOnMoveIng:te[2]||(te[2]=$=>q($,"end")),onOnMoveEnd:X,onOnDblClick:te[3]||(te[3]=$=>Z("end"))},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"])],64)):(e.openBlock(),e.createBlock(Bo,{key:1,ref_key:"refBtnEnd",ref:s,id:m.btnEnd,disabled:n.disabled,isVertical:n.isVertical,value:h.end,ratio:h.endRatio,tooltipFormat:n.tooltipFormat,ariaLabel:n.ariaLabel,min:n.min,max:n.max,onOnMoveIng:te[4]||(te[4]=$=>q($,"end")),onOnMoveEnd:X},null,8,["id","disabled","isVertical","value","ratio","tooltipFormat","ariaLabel","min","max"])),L.value.length>0?(e.openBlock(),e.createElementBlock("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,($,z)=>(e.openBlock(),e.createBlock(Zc,{key:`${r}-dot-${z}`,id:m.dots?`${m.dots}-${z}`:void 0,isVertical:n.isVertical,itemInfo:$,isHover:p.markHoverIndex===z,isTooltip:!M.value,tooltipFormat:n.tooltipFormat,onOnMouseover:ce=>U(z),onOnMouseout:Q,onOnClick:O},null,8,["id","isVertical","itemInfo","isHover","isTooltip","tooltipFormat","onOnMouseover"]))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),M.value?(e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,($,z)=>(e.openBlock(),e.createElementBlock("div",{key:`${r}-mark-${z}`,class:e.normalizeClass({"slider-mark":!0,hover:p.markHoverIndex===z}),style:e.normalizeStyle(F($)),innerHTML:$.safeMark,onMouseover:ce=>U(z),onMouseout:Q},null,46,lu))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,tu))}}),iu=["id"],su=["id"],ru=["name","checked"],cu=["aria-checked"],uu={key:0,class:"switchery-txt"},du=["innerHTML"],mu=["innerHTML"],pu={key:0,class:"switchery-load-bg"},fu=22,hu=40,Fl=e.defineComponent({name:"ClSwitchery",__name:"Index",props:{id:String,name:String,value:{type:Boolean,default:!1},className:{type:String,default:""},disabled:{type:Boolean,default:!1},color:{type:[String,Object],validator:n=>o.isObject(n)?!!(n.checked||n.unChecked):o.isString(n)},isUseOnChangeCheck:{type:Boolean,default:!1},isShowLoad:{type:Boolean,default:!0},activeHtml:String,inactiveHtml:String,changeCallback:Function,isPlaintext:{type:Boolean,default:!1}},emits:["update:value","update:modelValue","onChange","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useAttrs(),d=t.id,u=e.useTemplateRef("refElContainer");let s=!1,c=null;const m=e.reactive({isFirstComplete:!1,isOpen:t.value,buttonLeft:0,isRunLoad:!1,colorChecked:"var(--cl-primary, #2196f3)",colorUnChecked:"var(--cl-bg, #ffffff)",txtWidth:0}),p=e.computed(()=>{let P=t.name;return o.isEmpty(P)&&(P=`switchery_${o.getRandom(8)}`),P}),g=e.computed(()=>{const P=m.isOpen?t.activeHtml:t.inactiveHtml;return o.isNonEmptyString(P)?o.removeHTMLTags(P):m.isOpen?"是":"否"}),h=e.computed(()=>{const{colorChecked:P}=m;let x="";const A=t.color;if(o.isUndefined(A))x=P;else if(o.isString(A))x=A;else if(o.isObject(A)){const f=A;x=o.isExistJsonKey(f,"checked")?f.checked:P}return x}),y=e.computed(()=>{const{colorUnChecked:P}=m;let x="";const A=t.color;return o.isObject(A)&&o.isExistJsonKey(A,"unChecked")?x=A.unChecked||P:x=P,x}),E=e.computed(()=>{const P=me.getClassNameJson(t.className),x={"panel-switchery":!0,"switchery-transition-immediately":!m.isFirstComplete};return o.getJsonMerge(x,P)}),L=e.computed(()=>!o.isEmpty(t.activeHtml)||!o.isEmpty(t.inactiveHtml)),B=e.computed(()=>({"switchery-container":!0,"switchery-open":m.isOpen,"switchery-disabled":t.disabled,"switchery-has-txt":L.value})),I=e.computed(()=>{const P=m.isOpen,x=P?h.value:y.value,A={"background-color":x};return m.txtWidth>0&&(A.width=`${m.txtWidth}px`),A.transition=P?"border 0.4s, box-shadow 0.4s, background-color 1.2s":"border 0.4s, box-shadow 0.4s",A["box-shadow"]=P?`${x} 0px 0px 0px 11px inset`:`${x} 0px 0px 0px 0px inset`,(P||o.isObject(t.color)&&o.isExistJsonKey(t.color,"unChecked"))&&(A["border-color"]=x),A}),M=e.computed(()=>{const P={left:"0"};return m.isOpen&&(P.left=`${m.buttonLeft}px`),P}),N=P=>{const x=me.getElementData(r);i("update:value",P),i("update:modelValue",P),i("onChange",P,x)},b=()=>{const P=Je.getGlobalConfig("switchery");P&&(o.isExistJsonKey(P,"colorChecked")&&(m.colorChecked=P.colorChecked),o.isExistJsonKey(P,"colorUnChecked")&&(m.colorUnChecked=P.colorUnChecked))},V=()=>{if(!u.value)return;const P=u.value.clientWidth,x=u.value.querySelector(".switchery-button");if(!x)return;const A=x.clientWidth;m.buttonLeft=P===0?22:P-A},w=(P,x)=>{if(o.isEmpty(P))return 0;const A=x.querySelector(".switchery-txt > span"),f=document.createElement("span");if(f.style.position="absolute",f.style.visibility="hidden",f.style.left="-9999px",f.style.top="0",f.style.display="inline-block",f.style.whiteSpace="nowrap",A){const k=getComputedStyle(A);f.style.font=k.font,f.style.letterSpacing=k.letterSpacing}f.innerHTML=P,document.body.appendChild(f);const S=f.scrollWidth;return f.remove(),S},T=()=>{if(!L.value||!u.value){m.txtWidth=0;return}const P=u.value,x=w(t.activeHtml||"",P),A=w(t.inactiveHtml||"",P),f=Math.max(x,A);if(f===0){m.txtWidth=0;return}m.txtWidth=Math.max(f+fu+2,hu)},C=()=>{b(),T(),e.nextTick(()=>{V()}),c=setTimeout(()=>{m.isFirstComplete=!0},250)};e.onMounted(()=>{e.nextTick(()=>{C()})}),e.onBeforeUnmount(()=>{c&&(clearTimeout(c),c=null)}),e.watch(()=>t.value,P=>{m.isOpen=P}),e.watch(()=>[t.activeHtml,t.inactiveHtml],()=>{e.nextTick(()=>{T(),V()})});const D=async()=>{if(t.disabled||s)return;V();const P=!m.isOpen;if(t.changeCallback&&o.isFunction(t.changeCallback)){s=!0,m.isRunLoad=!0;const x=me.getElementData(r);try{const A=await t.changeCallback(P,x);let f=!1;o.isBoolean(A)?f=A:o.isObject(A)&&o.isBoolean(A.success)&&(f=A.success),f&&(m.isOpen=P)}catch{i("onError","回调changeCallback执行异常")}finally{m.isRunLoad=!1,s=!1}}else t.isUseOnChangeCheck?m.isRunLoad=!0:m.isOpen=P,N(P)};return l({getValue:()=>m.isOpen,setValue:(P,x=!1)=>{m.isOpen=P,x&&N(P)},setOnChangeResult:()=>{t.isUseOnChangeCheck&&o.isUndefined(t.changeCallback)&&(m.isOpen=!m.isOpen,m.isRunLoad=!1,s=!1)}}),(P,x)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:"cl-plaintext-value"},e.toDisplayString(g.value),9,iu)):(e.openBlock(),e.createElementBlock("label",{key:1,id:e.unref(d),class:e.normalizeClass(E.value)},[e.createElementVNode("input",{type:"checkbox",class:"switchery-input",name:p.value,checked:m.isOpen},null,8,ru),e.createElementVNode("span",{class:e.normalizeClass(B.value),style:e.normalizeStyle(I.value),onClick:D,ref_key:"refElContainer",ref:u,role:"switch","aria-checked":m.isOpen,tabindex:"0"},[n.activeHtml||n.inactiveHtml?(e.openBlock(),e.createElementBlock("span",uu,[m.isOpen?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:n.activeHtml},null,8,du)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:n.inactiveHtml},null,8,mu))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",{class:"switchery-button",style:e.normalizeStyle(M.value)},[n.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createBlock(ct,{key:0,theme:"rotaryLine",size:"xs"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4)],14,cu),n.isShowLoad&&m.isRunLoad?(e.openBlock(),e.createElementBlock("div",pu)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,su))}}),gu=["id"],vu=["onClick"],yu=["innerHTML"],ku={key:1},Xn=e.defineComponent({name:"ClTags",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isRemove:{type:Boolean,default:!0},showTextFormat:String,isRemoveAll:{type:Boolean,default:!1},color:{type:String,default:""},isSolid:{type:Boolean,default:!0},isRound:{type:Boolean,default:!1},size:{type:String,default:"m",validator:n=>["s","m","l"].indexOf(n)!==-1},isFormatHtml:{type:Boolean,default:!1}},emits:["onRemove","onClickTag"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`tags-${o.getRandom(5)}`,d=t.id,u=e.ref(t.disabled),s=e.ref([]),c=["primary","success","warning","danger","secondary"],m=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))",hID:""}),p=e.computed(()=>{let f={"panel-tags":!0};t.size!=="m"&&(f[`tags-size-${t.size}`]=!0),t.isRemoveAll&&s.value.length>0&&(f["tags-region"]=!0);const S=me.getClassNameJson(t.className);return f=o.getJsonMerge(f,S),f}),g=f=>o.isEmpty(f)?"":o.isEmpty(t.showTextFormat)?o.isNonEmptyString(f.name)?f.name:"":o.convertStringFormatEncodeHTML(t.showTextFormat,f),h=f=>o.isNonEmptyString(f.color)?f.color.trim():o.isNonEmptyString(t.color)?t.color.trim():"",y=f=>o.isBoolean(f.isSolid)?!!f.isSolid:t.isSolid,E=f=>o.isBoolean(f.isRound)?!!f.isRound:t.isRound,L=f=>o.isNonEmptyString(f)&&o.isExistValue(c,f),B=f=>{if(o.isEmpty(f))return{};const S=h(f),k=y(f),v={};return v.tag=!0,v["tag-disabled"]=!!f.isShowDisabled,v["tag-remove"]=t.isRemove&&!f.isShowDisabled,(o.isNonEmptyString(f.id)||typeof f.id=="number")&&(v["tag-hlight"]=f.id.toString()===m.hID&&m.status===2),o.isNonEmptyString(S)&&(v[k?"tag-solid":"tag-plain"]=!0,E(f)&&(v["tag-round"]=!0)),L(S)&&(v[`tag-color-${S}`]=!0),v},I=f=>{const S={};if(o.isEmpty(f))return S;const k=h(f);if(o.isNonEmptyString(k)&&!L(k)&&(y(f)?(S["background-color"]=k,S["border-color"]=k):(S.color=k,S["border-color"]=k)),o.isEmpty(f.id))return S;if(f.id.toString()===m.hID)switch(m.status){case 1:S["background-color"]=m.startColor;break;case 2:S["background-color"]=m.endColor;break}return S},M=f=>{if(o.isEmpty(f))return;const S=u.value;let k=!1;S?k=!0:k=o.isBoolean(f.isDisabled)?!!f.isDisabled:!1,f.isShowDisabled=k},N=f=>{const S=[];return!o.isArray(f)||o.isEmpty(f)||f.forEach(k=>{if(o.isEmpty(k))return;const v=o.getJsonClone(k);M(v),S.push(v)}),S},b=f=>{u.value=f;const S=N(s.value);s.value=S};let V=null,w=null;const T=()=>{V!==null&&(clearTimeout(V),V=null),w!==null&&(clearTimeout(w),w=null)},C=f=>{o.isEmpty(f)||(T(),m.hID=f.toString(),m.status=1,e.nextTick(()=>{V=setTimeout(()=>{m.status=2},10),w=setTimeout(()=>{m.status=0,m.hID=""},1500)}))},D=()=>{const f=N(t.list);s.value=f};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.onBeforeUnmount(()=>{T()}),e.watch(()=>t.disabled,f=>{b(f)}),e.watch(()=>t.list,f=>{const S=N(f);s.value=S},{deep:!0});const J=(f,S)=>{i("onClickTag",S)},ne=(f,S,k)=>{if(f.preventDefault(),f.stopPropagation(),t.isRemove&&!S.isShowDisabled&&k>=0&&k<s.value.length){s.value.splice(k,1);const v=o.isNonEmptyString(S.id)||typeof S.id=="number"?S.id.toString():"";i("onRemove",v)}},K=()=>{s.value=[],i("onRemove","")};return l({setDisabled:(f=!0)=>{b(f)},addInfo:f=>{if(o.isEmpty(f))return;const S=o.getListExistValue(s.value,f.name||"","name");if(o.isEmpty(S)){const k=o.getJsonClone(f);M(k),s.value.push(k)}else S.info&&!o.isEmpty(S.info.id)&&C(S.info.id)},getData:()=>o.getListClone(s.value)}),(f,S)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(p.value)},[s.value.length>0?e.renderSlot(f.$slots,"head",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,v)=>(e.openBlock(),e.createElementBlock("span",{key:`${r}-list-${v}-${k.id}`,class:e.normalizeClass(B(k)),style:e.normalizeStyle(I(k)),onClick:e.withModifiers(F=>J(F,k),["stop"])},[k.isHtml||n.isFormatHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:g(k)},null,8,yu)):(e.openBlock(),e.createElementBlock("span",ku,e.toDisplayString(g(k)),1)),n.isRemove&&!k.isShowDisabled?(e.openBlock(),e.createBlock(ke,{key:2,class:"tag-close",name:"close","aria-label":"移除",onClick:F=>ne(F,k,v)},null,8,["onClick"])):e.createCommentVNode("",!0)],14,vu))),128)),n.isRemoveAll&&s.value.length>0&&!n.disabled?(e.openBlock(),e.createBlock(ke,{key:2,class:"tag-closeAll",name:"close","aria-label":"清除全部",onClick:K})):e.createCommentVNode("",!0)],10,gu))}}),Su=["id"],Pl=e.defineComponent({name:"ClWaterfall",__name:"Index",props:{id:String,className:String,list:{type:Array,default:()=>[]},itemKey:{type:String,default:"id"},width:{type:Number,default:-1},colNum:{type:Number,default:-1},spacing:{type:Number,default:10},animationName:{type:String,default:"animated fadeIn"}},setup(n,{expose:l}){const a=n,t=`waterfall-${o.getRandom(5)}`,i=a.id,r=e.useTemplateRef("refElList"),d=e.reactive({pWidth:0,pHeight:0}),u=e.ref([]),s=e.ref(!0),c={colPosY:[],resizeEvent:null,resizeDelayFun:null,deletedList:[]},m=e.computed(()=>{const V=d.pWidth,{width:w,colNum:T,spacing:C}=a;let D=300;const J=w>0,ne=T>0,K=ne?Math.max(1,parseInt(((V+C)/T).toString())-C):0;if(J&&ne){const P=(w+C)*T-C;D=V>=P?w:K}else!J&&ne?D=K:J&&!ne&&(D=V>w?w:V);return D}),p=e.computed(()=>{const V=d.pWidth,w=m.value,{colNum:T,spacing:C}=a,D=T>0;let J=-1;const ne=Math.max(1,parseInt(((V+C)/(w+C)).toString()));if(D){const K=(w+C)*T-C;J=V>=K?T:ne}else J=ne;return J}),g=e.computed(()=>{const V=d.pWidth,w=m.value,T=p.value,{spacing:C}=a,D=(w+C)*T-C;return parseInt(((V-D)/2).toString())}),h=e.computed(()=>{const V={"panel-waterfall":!0};return o.getJsonMerge(V,me.getClassNameJson(a.className))}),y=()=>{s.value=!0;const{list:V,itemKey:w}=a;V.forEach(T=>{s.value&&(s.value=o.isExistJsonKey(T,w))})},E=()=>{u.value=a.list.filter(V=>!c.deletedList.includes(V)),c.deletedList=c.deletedList.filter(V=>a.list.includes(V))},L=()=>{const{spacing:V}=a;c.colPosY=new Array(p.value).fill(V)},B=V=>{const{spacing:w}=a,T=m.value;return g.value+(T+w)*V},I=()=>{let V;if(r.value&&(V=r.value.querySelectorAll(".waterfall-item")),o.isUndefined(V)||!V){d.pHeight=0;return}if(V.length===0){d.pHeight=0;return}L();const w=m.value,{spacing:T,animationName:C}=a;for(let D=0;D<V.length;D++){const J=V[D],ne=me.getPositionView(J).height,K=Math.min.apply(null,c.colPosY),P=c.colPosY.indexOf(K),x=B(P);J.style.width=`${w}px`,J.style.transform=`translate3d(${x}px,${K}px, 0)`,c.colPosY[P]+=ne+T;const A=J.firstChild;A.style.visibility="visible",A.className=me.getRemoveClass(A.className,C),me.checkHasClass(A.className,C)||(A.style.animationDuration="1000ms",A.style.animationDelay="200ms",A.style.animationFillMode="both",A.className=me.getAddClass(A.className,C))}d.pHeight=Math.max.apply(null,c.colPosY)},M=()=>{const V=()=>{E(),e.nextTick(()=>{I()})};c.resizeDelayFun?c.resizeDelayFun.run(V):e.nextTick(V)},N=()=>{r.value&&(d.pWidth=r.value.offsetWidth,c.resizeDelayFun=new Za.DelayFun(null,200),c.resizeEvent=new Ye.Resize({element:r.value,callback:V=>{d.pWidth=V?.contentRect?.width??d.pWidth}}))};return e.onMounted(()=>{e.nextTick(()=>{N()})}),e.onUnmounted(()=>{c.resizeEvent&&c.resizeEvent.destroy(),c.resizeDelayFun&&c.resizeDelayFun.stopRun()}),e.watch(()=>[d.pWidth,m.value,a.list],()=>{y(),M()},{deep:!0}),e.provide("$WaterfallTop",{imgCallback:M}),l({deleteItem:V=>{const w=u.value[V];return w!==void 0&&(c.deletedList.push(w),u.value.splice(V,1),M()),w}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(h.value)},[e.createElementVNode("div",{ref_key:"refElList",ref:r,class:"waterfall-list",style:e.normalizeStyle({height:`${d.pHeight}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(T,C)=>(e.openBlock(),e.createElementBlock("div",{key:s.value?`${t}-${T[n.itemKey]}`:`${t}-${C}`,class:"waterfall-item"},[e.createElementVNode("div",null,[e.renderSlot(V.$slots,"default",{data:T,index:C})])]))),128))],4)],10,Su))}}),wu={class:"waterfall-imageBox"},Eu=["alt"],Rl=e.defineComponent({name:"ClWaterfallImage",__name:"Image",props:{url:{type:String,default:""},alt:{type:String,default:""}},setup(n){const l=n,a=e.inject("$WaterfallTop"),t=e.useTemplateRef("refElImage"),i=e.computed(()=>l.url),r=d=>{a?.imgCallback?a.imgCallback():we.warn("ClWaterfallImage",`未检测到 $WaterfallTop 容器注入,图片${d==="loaded"?"完成":"加载失败"}回调失效`)};return e.onBeforeUnmount(()=>{t.value&&(t.value.onload=null,t.value.onerror=null)}),Nl(t,i,{callback:{loaded:()=>{r("loaded")},error:()=>{r("error")}}}),(d,u)=>(e.openBlock(),e.createElementBlock("div",wu,[e.createElementVNode("img",{ref_key:"refElImage",ref:t,class:"waterfall-image",alt:n.alt},null,8,Eu)]))}}),Hl=()=>({getPage:n=>at.getPage(n),getValue:n=>at.getValue(n),getType:()=>at.getType(),setType:n=>at.setType(n),getAll:()=>at.getAll(),getCommon:()=>at.getCommon()}),Cu=["id"],bu=["onKeydown","aria-expanded","aria-label"],xu=["onClick","onKeydown","aria-label"],Bu={class:"anchor-label"},Ul=e.defineComponent({name:"ClAnchorNav",directives:{cltooltip:dt},__name:"Index",props:{id:String,className:String,list:{type:Array,required:!0},isOpen:{type:Boolean,default:!1},offsetShow:{type:Number,default:100}},setup(n){const l=n,a=`anchorNav-${o.getRandom(5)}`,t=l.id,i=e.ref(""),r=e.ref(!1),d=e.ref(!l.isOpen);let u=null;const s=e.computed(()=>{const E={"panel-anchor-nav":!0,"is-fixed":r.value,"is-collapsed":d.value};return o.getJsonMerge(E,me.getClassNameJson(l.className))}),c=e.computed(()=>(l.list||[]).filter(E=>!!E)),m=()=>{l.list&&u===null&&(u=requestAnimationFrame(()=>{if(u=null,!l.list)return;const E=window.scrollY,L=window.innerHeight;r.value=E>(o.isFinite(l.offsetShow)?l.offsetShow:100);const B=c.value.map(M=>({id:M.id,element:document.getElementById(M.id)})).filter(M=>M.element!==null);if(B.length===0){i.value="";return}if(E+L>=document.documentElement.scrollHeight-1){i.value=B[B.length-1].id;return}let I=!1;for(let M=B.length-1;M>=0;M--)if(B[M].element.getBoundingClientRect().top<=L/2){i.value=B[M].id,I=!0;break}I||(i.value="")}))},p=()=>{window.addEventListener("scroll",m),window.addEventListener("resize",m)},g=()=>{u!==null&&(cancelAnimationFrame(u),u=null),window.removeEventListener("scroll",m),window.removeEventListener("resize",m)};e.onMounted(()=>{p(),m()}),e.onActivated(()=>{p(),m()}),e.onDeactivated(()=>{g()}),e.onUnmounted(()=>{g()}),e.watch(()=>l.list,()=>{m()},{deep:!0});const h=()=>{d.value=!d.value},y=E=>{const L=document.getElementById(E);L&&(L.scrollIntoView({behavior:"smooth",block:"start"}),L.hasAttribute("tabindex")||L.setAttribute("tabindex","-1"),L.focus({preventScroll:!0}))};return(E,L)=>{const B=e.resolveDirective("cltooltip");return e.openBlock(),e.createElementBlock("div",{id:e.unref(t),class:e.normalizeClass(s.value),role:"navigation","aria-label":"页面锚点导航"},[e.createElementVNode("div",{class:"anchor-toggle",onClick:h,onKeydown:[e.withKeys(h,["enter"]),e.withKeys(e.withModifiers(h,["prevent"]),["space"])],role:"button","aria-expanded":!d.value,"aria-label":d.value?"展开导航":"收起导航",tabindex:"0"},[e.createVNode(ke,{name:d.value?"caret-left":"caret-right"},null,8,["name"])],40,bu),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(I,M)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${a}-${I.id}-${M}`,class:e.normalizeClass(["anchor-item",{active:i.value===I.id}]),onClick:N=>y(I.id),onKeydown:[e.withKeys(N=>y(I.id),["enter"]),e.withKeys(e.withModifiers(N=>y(I.id),["prevent"]),["space"])],role:"link","aria-label":I.label??"",tabindex:"0"},[L[0]||(L[0]=e.createElementVNode("span",{class:"anchor-dot"},null,-1)),e.createElementVNode("span",Bu,e.toDisplayString(I.label??""),1)],42,xu)),[[B,d.value?{html:I.label??"",position:"left",className:"tooltip-anchorNav",isHtml:!1}:{init:!1}]])),128))],10,Cu)}}}),Iu=["id"],Du={class:"calendar-container table-base"},Tu={colspan:"7"},Nu={class:"calendar-head-label"},Vu=["title","onKeydown"],Mu={class:"calendar-head-label-year"},Ou={class:"calendar-head-label-month"},_u={class:"calendar-head-label-next"},Au=["title","onKeydown"],Lu={class:"calendar-head-Week"},$u=["tabindex","aria-label","aria-selected","onClick","onMouseover","onMouseout","onKeydown"],Fu={key:0,class:"day-today"},Pu={class:"day-num"},Ru={key:3,class:"day-lunar-num"},zl=e.defineComponent({name:"ClCalendar",__name:"Index",props:{id:String,className:String,viewDateTime:String,weekFirst:{type:String,default:"sunday",validator:n=>{const l=["monday","sunday"].includes(n);return l||we.warn("ClCalendar",`警告:weekFirst 仅支持 'monday' 或 'sunday',收到 '${n}',已按 sunday 处理`),l}},isShowLunar:Boolean,isWeekendRest:{type:Boolean,default:void 0},restDays:{type:Array,default:()=>[]},workDays:{type:Array,default:()=>[]}},emits:{onChange:n=>!0,onClick:n=>!0,onHover:(n,l)=>!0,onInit:n=>!0,onError:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendar-${o.getRandom(5)}`,r=a.id,{optPageLanguage:d,getPageLanguage:u}=Le();u("dataTime");const s=e.reactive({selectId:"",focusedId:""}),c=e.reactive({titleYear:"",titleMonth:""}),m=e.useTemplateRef("calendarRoot"),p=e.ref([]),g=e.ref([]),h={viewDate:null,currentDate:qe.initDay(),isAnimating:!1},y=e.computed(()=>{if(a.isWeekendRest!==void 0)return a.isWeekendRest;const k=Je.getGlobalConfig("calendar");return k?.isWeekendRest!==void 0?k.isWeekendRest:!0}),E=e.computed(()=>a.restDays.length>0?a.restDays:Je.getGlobalConfig("calendar")?.restDays||[]),L=e.computed(()=>a.workDays.length>0?a.workDays:Je.getGlobalConfig("calendar")?.workDays||[]),B=e.computed(()=>{const k={"panel-calendar":!0};return o.getJsonMerge(k,me.getClassNameJson(a.className))}),I=()=>{if(!h.viewDate)return;const k=h.viewDate.localeData(),v=h.viewDate.year(),F=k.monthsShort(h.viewDate);c.titleYear=`${v}${d.value.year}`,c.titleMonth=F;const _=k.weekdaysMin(),O=k.firstDayOfWeek();let q=[];a.weekFirst==="sunday"?q=_:_.forEach((X,Z)=>{q[(7+Z-O)%7]=X}),p.value=q};let M=null;const N=e.ref(!1),b=async()=>{if(!N.value)try{M=(await import("lunar-typescript")).Lunar,N.value=!0}catch(k){we.warn("ClCalendar","农历插件加载失败,本次不显示农历",k)}},V=k=>{if(!M)return"";try{const v=M.fromDate(k.toDate()),F=v.getFestivals();if(o.isNonEmptyString(F[0]))return F[0];const _=v.getJieQi();if(o.isNonEmptyString(_))return _;const O=v.getDayInChinese();return o.isNonEmptyString(O)?O:""}catch(v){return we.warn("ClCalendar","农历计算异常,该格不显示农历",v),""}},w=k=>{const v=F=>F.some(_=>qe.objDay(_).isSame(k,"day"));if(L.value.length>0&&v(L.value))return{text:"班"};if(E.value.length>0&&v(E.value))return{text:"休"};if(y.value){const F=k.day();if(F===0||F===6)return{text:"休"}}return null},T=(k,v,F,_)=>{const O=k.date(),q=qe.initFormat(k),X=a.isShowLunar&&N.value?V(k):"",Z=w(k),se=k.year()===v&&k.month()<F||k.year()<v,le=k.year()===v&&k.month()>F||k.year()>v,G=_&&k.isSame(_,"day")&&!se&&!le;return{id:`day-${q}`,cls:me.getAddClass("calendar-day",{old:se,new:le,today:G}),day:q,dayNum:O,lunar:X,restMark:Z?Z.text:void 0,isOld:se,isNew:le,isCurrentMonth:!se&&!le,isToday:G}},C=()=>{const k=h.viewDate.clone(),v=h.currentDate;let F=k.clone().subtract(1,"months");F=F.date(F.daysInMonth()).startOf("week"),a.weekFirst==="sunday"&&(F=F.subtract(1,"days"));const _=[];let O=[];for(let q=0;q<42;q+=1){q>0&&(F=F.add(1,"days"));const X=T(F.clone(),k.year(),k.month(),v);O.push(X),X.isCurrentMonth&&!o.isEmpty(s.selectId)&&X.dayNum===s.selectId&&(s.selectId=X.id),O.length===7&&(_.push({days:O}),O=[])}if(g.value=_,!o.isEmpty(s.selectId))s.focusedId=s.selectId;else{const q=_.flatMap(X=>X.days).find(X=>X.isCurrentMonth);s.focusedId=q?q.id:""}},D=k=>{h.viewDate=o.isEmpty(k)?qe.initDay():qe.getDayjsObject(k),h.viewDate&&typeof h.viewDate.isValid=="function"&&h.viewDate.isValid()||(h.viewDate=qe.initDay()),I(),C()},J=k=>!k||!o.isString(k)||o.isEmpty(k)?(s.selectId=qe.getDayjsObject("").date(),qe.initFormat({format:"YYYY-MM"})):k.split("-").length===3?(s.selectId=qe.getDayjsObject(k).date(),qe.initFormat({value:k,format:"YYYY-MM"})):(s.selectId="",k),ne=()=>{D(J(a.viewDateTime)),e.nextTick(()=>{K(s.focusedId),!o.isEmpty(s.selectId)&&o.isString(s.selectId)&&t("onInit",s.selectId.replace("day-",""))})},K=k=>{if(!o.isString(k)||o.isEmpty(k)||!m.value)return;const v=m.value.querySelector(`[aria-label="${k.replace("day-","")}"]`);if(!v)return;v.focus({preventScroll:!0});const F=v.getBoundingClientRect();(F.top<0||F.bottom>window.innerHeight)&&v.scrollIntoView({block:"nearest",behavior:"auto"})};e.onMounted(async()=>{a.isShowLunar&&await b(),e.nextTick(()=>{ne(),a.isShowLunar&&N.value&&D(J(a.viewDateTime))})}),e.watch(()=>a.isShowLunar,k=>{k?b().then(()=>{D(J(a.viewDateTime)),e.nextTick(()=>K(s.focusedId))}):D(J(a.viewDateTime))}),e.watch(()=>a.viewDateTime,k=>{o.isEmpty(k)||(D(J(k)),e.nextTick(()=>K(s.focusedId)))});const P=(k,v)=>{k.preventDefault(),k.stopPropagation(),v.isCurrentMonth&&(s.focusedId=v.id,e.nextTick(()=>K(v.id)),s.selectId!==v.id&&(s.selectId=v.id,t("onClick",v.day)))},x=(k,v,F)=>{k.preventDefault(),k.stopPropagation(),v.isCurrentMonth&&t("onHover",v.day,F)},A=(k,v,F)=>{const _=g.value.flatMap(X=>X.days);if(_.length===0)return;const O=v*7+F;let q=O;switch(k.key){case"ArrowLeft":k.preventDefault(),q=Math.max(0,O-1);break;case"ArrowRight":k.preventDefault(),q=Math.min(41,O+1);break;case"ArrowUp":k.preventDefault(),q=Math.max(0,O-7);break;case"ArrowDown":k.preventDefault(),q=Math.min(41,O+7);break;case"Enter":case" ":k.preventDefault(),P(k,_[O]);return;default:return}if(q!==O){const X=_[q];if(!X.isCurrentMonth)return;s.focusedId=X.id,e.nextTick(()=>K(X.id))}},f=()=>{if(!h.isAnimating){h.isAnimating=!0;try{const k=h.viewDate.clone();let v=qe.subtractTime(k,1,"months");v=qe.initFormat({value:v,format:"YYYY-MM"}),D(v),t("onChange",v),e.nextTick(()=>K(s.focusedId))}catch{t("onError","切换到上一月失败")}finally{h.isAnimating=!1}}},S=()=>{if(!h.isAnimating){h.isAnimating=!0;try{const k=h.viewDate.clone();let v=qe.addTime(k,1,"months");v=qe.initFormat({value:v,format:"YYYY-MM"}),D(v),t("onChange",v),e.nextTick(()=>K(s.focusedId))}catch{t("onError","切换到下一月失败")}finally{h.isAnimating=!1}}};return(k,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(B.value),id:e.unref(r),ref_key:"calendarRoot",ref:m},[e.createElementVNode("table",Du,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Tu,[e.createElementVNode("div",Nu,[e.createElementVNode("span",{class:"calendar-head-label-prev-month",title:e.unref(d).prevMonth,role:"button",tabindex:"0",onClick:f,onKeydown:[e.withKeys(e.withModifiers(f,["prevent"]),["enter"]),e.withKeys(e.withModifiers(f,["prevent"]),["space"])]},[e.createVNode(ke,{name:"angle-left"})],40,Vu),e.createElementVNode("span",null,[e.createElementVNode("span",Mu,e.toDisplayString(c.titleYear),1),e.createElementVNode("span",Ou,e.toDisplayString(c.titleMonth),1)]),e.createElementVNode("span",_u,[e.createElementVNode("span",{class:"calendar-head-label-next-month",title:e.unref(d).nextMonth,role:"button",tabindex:"0",onClick:S,onKeydown:[e.withKeys(e.withModifiers(S,["prevent"]),["enter"]),e.withKeys(e.withModifiers(S,["prevent"]),["space"])]},[e.createVNode(ke,{name:"angle-right"})],40,Au)])])])]),e.createElementVNode("tr",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(F,_)=>(e.openBlock(),e.createElementBlock("th",{key:`${i}-week-${_}`},e.toDisplayString(F),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(F,_)=>(e.openBlock(),e.createElementBlock("tr",{key:`${i}-days-${_}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.days,(O,q)=>(e.openBlock(),e.createElementBlock("td",{key:`${i}-day-${q}`,class:e.normalizeClass([O.cls,s.selectId===O.id?"calendar-day-select":"",s.focusedId===O.id?"calendar-day-focused":""]),tabindex:O.isCurrentMonth?s.focusedId===O.id?"0":"-1":void 0,role:"gridcell","aria-label":O.day,"aria-selected":s.selectId===O.id?"true":"false",onClick:e.withModifiers(X=>P(X,O),["stop"]),onMouseover:X=>x(X,O,!0),onMouseout:X=>x(X,O,!1),onKeydown:X=>A(X,_,q)},[O.isToday?(e.openBlock(),e.createElementBlock("span",Fu,"今")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Pu,e.toDisplayString(O.dayNum),1),O.restMark?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["day-rest",O.restMark==="班"?"day-rest-work":"day-rest-rest"])},e.toDisplayString(O.restMark),3)):e.createCommentVNode("",!0),O.lunar?(e.openBlock(),e.createElementBlock("div",Ru,e.toDisplayString(O.lunar),1)):e.createCommentVNode("",!0),O.isCurrentMonth?e.renderSlot(k.$slots,"day",{key:4,time:O.day,data:O.dayNum}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],42,$u))),128))]))),128))])])],10,Iu))}}),Hu={class:"code-legend-demo"},Uu={class:"code-legend-code"},zu=["aria-label"],$a=25,Ju=100,Jl=e.defineComponent({name:"ClCodeLegend",__name:"Index",props:{id:{},className:{},title:{}},setup(n){const l=n,a=l.id,t=e.useTemplateRef("refElCard"),i=e.useTemplateRef("refElFoot"),r=e.ref(!1),d=e.ref(!1),u=e.ref("auto");let s=null,c=null,m=null;const p=e.computed(()=>{const C=["code-legend"];return l.className&&o.isString(l.className)&&!o.isEmpty(l.className)&&l.className.split(" ").forEach(D=>{o.isEmpty(D)||C.push(D)}),C.join(" ")}),g=e.computed(()=>({"code-legend-footer":!0,"card-footer-fixed":d.value})),h=e.computed(()=>({"icon-rotate":!0,"rotate-180":r.value})),y=()=>{s&&(clearTimeout(s),s=null),c&&(clearTimeout(c),c=null)},E=()=>{if(r.value){const C=t.value?.$el;if(!C)return;const D=C.clientWidth,J=i.value;if(!J)return;const ne=J.getBoundingClientRect(),K=C.getBoundingClientRect(),P=window.innerHeight;K.top<P&&K.bottom>P?(d.value=!0,u.value=D.toString()+"px",J.style.left=ne.left+"px"):(d.value=!1,u.value="auto",J.style.left="")}else d.value=!1,u.value="auto"},L=()=>{m||(m=setTimeout(()=>{m=null,E()},Ju))};e.watch(()=>r.value,(C,D)=>{C!==D&&(y(),C?w():T())});const B=()=>{r.value=!r.value},I=C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),B())},M=C=>{const D=C;D.style.height="auto";const J=window.getComputedStyle(D,null).height;D.style.height="0",s=setTimeout(function(){D.style.height=J},$a)},N=C=>{const D=C;c=setTimeout(function(){D.style.height="0"},$a)},b=()=>{e.nextTick(()=>{E()})},V=()=>{e.nextTick(()=>{E()})},w=()=>{window.addEventListener("scroll",L)},T=()=>{window.removeEventListener("scroll",L),m&&(clearTimeout(m),m=null)};return e.onMounted(()=>{r.value&&w()}),e.onActivated(()=>{r.value&&(w(),E())}),e.onDeactivated(()=>{T(),y()}),e.onUnmounted(()=>{T(),y()}),(C,D)=>(e.openBlock(),e.createBlock(zo,{ref_key:"refElCard",ref:t,id:e.unref(a),theme:"loopline",className:p.value},{headTitle:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),headExplain:e.withCtx(()=>[C.$slots.remark?e.renderSlot(C.$slots,"remark",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),default:e.withCtx(()=>[e.createElementVNode("div",Hu,[e.renderSlot(C.$slots,"demo")]),e.createVNode(e.Transition,{name:"slide-fade",onEnter:M,onAfterEnter:b,onLeave:N,onAfterLeave:V},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[e.createElementVNode("div",Uu,[e.renderSlot(C.$slots,"code")])],512),[[e.vShow,r.value]])]),_:3})]),foot:e.withCtx(()=>[C.$slots.code?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElFoot",ref:i,class:e.normalizeClass(g.value),role:"button",tabindex:"0","aria-label":r.value?"收起代码":"展开代码",onClick:B,onKeydown:I,style:e.normalizeStyle({width:u.value})},[e.createVNode(ke,{name:"caret-down",class:e.normalizeClass(h.value)},null,8,["class"])],46,zu)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),_:3},8,["id","className"]))}}),Ku=["id"],Wu=["aria-expanded"],ju=["id"],Kl=e.defineComponent({name:"ClDropdownlayer",__name:"Base",props:{id:String,classParent:{type:[String,Object]},classText:{type:[String,Object]},classDropDown:{type:[String,Object]},isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isInitDelayComplete:{type:Boolean,default:!1},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!1},triggers:{type:String,default:"click",validator:n=>["click","hover"].includes(n)},isEscapeClose:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=o.isNonEmptyString(t.id)?t.id:`dropdownLayer-${o.getRandom(8)}`,d=e.useTemplateRef("refElTopParent"),u=e.useTemplateRef("refElText"),s=e.useTemplateRef("refElDropdown"),c=e.reactive({isOpen:!1,isShowOpen:!1,isInitFirstOpen:!1,dropDownPos:"down",arrowPos:"left",dropDownTop:"",dropDownLeft:"",arrowLeft:"",isOpacity0:!1,dropdownId:`${r}-dropdown`}),m=e.ref(!1),p=e.ref(null),g=e.ref([]),h=e.ref(null),y=e.ref(null);let E=null,L=null,B=null,I=null,M=!1;const N=e.computed(()=>{let $={"panel-dropdownlayer":!0,"dropdownLayer-arrow":t.isUseDropdownArrow,"dropdownLayer-disabled":t.isDisabled};return o.isNonEmptyString(t.classParent)?$=o.getJsonMerge($,me.getClassNameJson(t.classParent)):o.isObject(t.classParent)&&($=o.getJsonMerge($,t.classParent)),$}),b=e.computed(()=>{let $={"dropdownLayer-text":!0,"dropdownLayer-text-open":c.isShowOpen};return!o.isEmpty(c.dropDownPos)&&c.isShowOpen&&($[`dropdownLayer-text-${c.dropDownPos}`]=!0),o.isNonEmptyString(t.classText)?$=o.getJsonMerge($,me.getClassNameJson(t.classText)):o.isObject(t.classText)&&($=o.getJsonMerge($,t.classText)),$}),V=e.computed(()=>{let $={"dropdownLayer-dropdown":!0,"dropdownLayer-dropdown-open":c.isShowOpen,"dropdownLayer-dropdown-arrow":t.isUseDropdownArrow,"dropdownLayer-dropdown-opacity0":c.isOpacity0};return $[`dropdownLayer-dropdown-${c.dropDownPos}`]=!0,$[`dropdownLayer-dropdown-arrow-${c.arrowPos}`]=!0,o.isNonEmptyString(t.classDropDown)?$=o.getJsonMerge($,me.getClassNameJson(t.classDropDown)):o.isObject(t.classDropDown)&&($=o.getJsonMerge($,t.classDropDown)),$}),w=e.computed(()=>!o.isEmpty(t.appendContainer)),T=e.computed(()=>{const $={},{dropDownPos:z,dropdownArrowPos:ce}=t,{dropDownTop:de,dropDownLeft:ie}=c;return z==="down"||z==="up"?($.top=de,(ce==="center"||ce==="top"||ce==="bottom"||w.value)&&($.left=ie)):(z==="left"||z==="right")&&($.left=ie,$.top=de),$}),C=e.computed(()=>{const $={};return(t.dropdownArrowPos==="center"||t.dropdownArrowPos==="top"||t.dropdownArrowPos==="bottom")&&($.left=c.arrowLeft),$}),D=($,z)=>{const ce=t.isUseDropdownArrow,de={};return z==="down"?de.top=ce?$.textHeight+$.arrowHeight-1:$.textHeight:z==="up"?de.top=ce?-($.dropDownHeight+$.arrowHeight-3):-$.dropDownHeight:z==="left"?(de.left=ce?-($.dropDownWidth+$.arrowWidth-1):-$.dropDownWidth,de.top=0):z==="right"&&(de.left=ce?$.textWidth+$.arrowWidth-1:$.textWidth,de.top=0),de},J=$=>{!s.value||!d.value||(s.value.style.width=$&&t.appendFollowWidth?`${d.value.offsetWidth}px`:"")},ne=()=>{c.isShowOpen&&e.nextTick(()=>{if(!d.value||!u.value||!s.value)return;const $=t.isUseDropdownArrow?s.value.querySelector(".arrow"):null,z=!o.isEmpty(t.appendContainer),ce=z?t.appendContainer:null;J(z);let de=u.value;if(y.value){const pe=me.getParent(y.value,".dropdownLayer-arrow-anchorPoint",u.value,!1);o.isUndefined(pe)||(de=pe)}const ie=me.calculationDropdownPosition(d.value,de,s.value,$,ce),W=ie[{down:"dropDownPosDown",up:"dropDownPosUp",left:"dropDownPosLeft",right:"dropDownPosRight"}[t.dropDownPos]||"dropDownPosDown"];c.dropDownPos=W;const j=K(ie,W);c.arrowPos=j;const ue=D(ie,W);(j==="center"||j==="top"||j==="bottom")&&(W==="down"||W==="up")&&(ue.left=ie.arrowPosCenterLRInfo?.dropDownLeft,c.arrowLeft=ie.arrowPosCenterLRInfo?.arrowLeft!=null?`${ie.arrowPosCenterLRInfo.arrowLeft}px`:""),z&&(ue.top=(ue.top||0)+(ie.controlOffset?.top||0),ue.left=(ue.left||0)+(ie.controlOffset?.left||0),j==="right"&&(ue.left=(ie.controlOffset?.left||0)+d.value.offsetWidth-s.value.offsetWidth)),c.dropDownTop=ue.top!=null?`${ue.top}px`:"",c.dropDownLeft=ue.left!=null?`${ue.left}px`:"",i("onChangePosition",{use:{dropDownPos:W,arrowPos:j,dropDownTop:ue.top,dropDownLeft:ue.left,arrowLeft:c.arrowLeft},original:ie})})},K=($,z)=>{switch(t.dropdownArrowPos){case"left":return $.arrowPosLeft;case"right":return $.arrowPosRight;case"top":return $.arrowPosTop;case"bottom":return $.arrowPosBottom;case"center":return z==="down"||z==="up"?$.arrowPosCenterLR:z==="left"||z==="right"?$.arrowPosCenterTB:$.arrowPosLeft;default:return $.arrowPosLeft}},P=$=>{p.value=$},x=$=>{c.isShowOpen&&$?.target&&f($)},A=$=>$?s.value&&s.value.contains($)?!1:o.isUndefined(me.getParent($,`#${c.dropdownId}`,d.value)):!0,f=$=>{if(d.value){A($?.target)&&A(p.value?.target)&&(c.isOpen=!1);return}if(o.isNonEmptyString(t.appendContainer))try{document.querySelectorAll(`${t.appendContainer}>#${c.dropdownId}`).forEach(z=>z.parentNode?.removeChild(z))}catch{we.warn("DropdownLayer","appendContainer 选择器非法,残留面板清理已跳过")}v(),c.isOpen=!1},S=$=>{if(c.isShowOpen){if(L)return;const z=$.currentTarget;L=requestAnimationFrame(()=>{L=null,ne();const ce=me.getPositionView(d.value,z),de=z.dataset,ie={right:0,left:0};ie.right=o.isUndefined(de.padRight)?0:parseInt(de.padRight.replace("px","")),ie.left=o.isUndefined(de.padLeft)?0:parseInt(de.padLeft.replace("px",""));let ae=!1;ce.top+ce.height/2<=0&&(ae=!0),ce.right+ce.width/2<=ie.right&&ie.right>=0&&(ae=!0),ce.left+ce.width/2<=ie.left&&ie.left>=0&&(ae=!0),c.isOpacity0=ae})}else k(!1)},k=($=!0)=>{g.value.length>0&&g.value.forEach(z=>{$?z.addEventListener("scroll",S):z.removeEventListener("scroll",S)})},v=()=>{clearTimeout(I),I=null;const $=document.querySelector("body");$&&M&&$.removeEventListener("mousedown",P),M&&document.body.removeEventListener("click",x),M=!1,k(!1),c.isShowOpen=!1,O(),y.value=null,p.value=null},F=()=>{h.value=new Ye.Resize({callback:()=>{c.isOpen&&ne()}});const{dropDownPos:$}=t;$==="down"||$==="up"?(c.dropDownPos="down",c.arrowPos="left"):($==="left"||$==="right")&&(c.dropDownPos="left",c.arrowPos="top")},_=()=>{E||!s.value||typeof window>"u"||!window.ResizeObserver||(E=new window.ResizeObserver(()=>{c.isOpen&&s.value&&ne()}),E.observe(s.value))},O=()=>{E&&(E.disconnect(),E=null)},q=$=>{if(!t.isDisabled){if(y.value=$.target,!c.isOpen&&t.onOpenBeforeCallback)try{const z=t.onOpenBeforeCallback();if(o.isBoolean(z)&&!z)return}catch{we.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}c.isOpen?X():Z()}},X=()=>{c.isOpen=!1},Z=()=>{if(c.isShowOpen){se();return}if(t.isCloseDestroy&&c.isInitFirstOpen){se();return}c.isOpen=!0},se=()=>{m.value=!0,c.isInitFirstOpen=!1,c.isShowOpen=!1,e.nextTick(()=>{c.isOpen=!c.isOpen})};e.onMounted(()=>{e.nextTick(()=>{F()})}),e.onActivated(()=>{h.value||e.nextTick(()=>{F()})}),e.onDeactivated(()=>{clearTimeout(B),h.value?.destroy(),h.value=null,O(),v(),c.isOpen=!1}),e.onUnmounted(()=>{clearTimeout(B),h.value?.destroy(),v()}),e.watch(()=>c.isOpen,$=>{c.isInitFirstOpen||(c.isInitFirstOpen=!0,o.isEmpty(t.appendContainer)||e.nextTick(()=>{let z=me.getParentCheckBody(d.value,t.appendContainer);o.isUndefined(z)&&(z=document.querySelector("body")),s.value&&z.appendChild(s.value),g.value=me.getParentScrollList(d.value,t.appendContainer,!1),k()})),$||v(),i("onChangeOpen",$),$&&(c.isOpacity0=!1,I=setTimeout(()=>{if(I=null,!c.isOpen||M)return;M=!0;const z=document.querySelector("body");z&&z.addEventListener("mousedown",P),document.body.addEventListener("click",x)}),t.isInitDelayComplete||e.nextTick(()=>{c.isShowOpen=!0,ne()}))});const le=$=>{(t.triggers==="click"||$ instanceof KeyboardEvent)&&q($)};xc(e.computed(()=>c.isOpen&&t.isEscapeClose),{isEscapeClose:()=>t.isEscapeClose,onEscape:()=>{X()}}),e.watch(()=>s.value,$=>{$&&_()});const G=$=>{t.triggers==="hover"&&(clearTimeout(B),c.isOpen||q($))},oe=$=>{t.triggers==="hover"&&(B=setTimeout(()=>{s.value?.matches(":hover")||c.isOpen&&q($)},150))},R=()=>{_(),i("onOpenComplete")},U=()=>{m.value=!1},Q=()=>{if(m.value){m.value=!1;return}t.isCloseDestroy&&(c.isInitFirstOpen=!1),i("onAfterLeave")};return l({setOpen:$=>{if(!o.isBoolean($)){we.warn("DropdownLayer","setOpen 参数必须为 boolean,已忽略");return}if($&&t.onOpenBeforeCallback)try{const z=t.onOpenBeforeCallback();if(o.isBoolean(z)&&!z){we.warn("DropdownLayer","setOpen 打开被 onOpenBeforeCallback 阻止");return}}catch{we.warn("DropdownLayer","onOpenBeforeCallback 执行异常,已按不阻止打开处理")}c.isOpen=$},calculationPosition:()=>ne(),initCompleteOpen:()=>{c.isOpen&&e.nextTick(()=>{c.isOpen&&(c.isShowOpen=!0,s.value?ne():e.nextTick(()=>{ne()}))})},getIsShowOpen:()=>c.isShowOpen}),($,z)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(N.value),ref_key:"refElTopParent",ref:d},[e.createElementVNode("div",{class:e.normalizeClass(b.value),onClick:z[0]||(z[0]=ce=>le(ce)),onMouseover:z[1]||(z[1]=ce=>G(ce)),onMouseleave:z[2]||(z[2]=ce=>oe(ce)),onKeydown:[z[3]||(z[3]=e.withKeys(e.withModifiers(ce=>le(ce),["prevent"]),["enter"])),z[4]||(z[4]=e.withKeys(e.withModifiers(ce=>le(ce),["prevent"]),["space"]))],role:"combobox",tabindex:"0","aria-expanded":c.isOpen,"aria-haspopup":"listbox",ref_key:"refElText",ref:u},[e.renderSlot($.$slots,"labelText")],42,Wu),c.isInitFirstOpen?(e.openBlock(),e.createBlock(e.Transition,{key:0,name:"dropdown-transit","enter-active-class":n.transitionEnter,"leave-active-class":n.transitionLeave,onEnter:R,onAfterLeave:Q,onLeaveCancelled:U},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:c.dropdownId,class:e.normalizeClass(V.value),style:e.normalizeStyle(T.value),ref_key:"refElDropdown",ref:s,onMouseleave:z[5]||(z[5]=ce=>oe(ce))},[n.isUseDropdownArrow?(e.openBlock(),e.createElementBlock("div",{key:0,class:"arrow",style:e.normalizeStyle(C.value)},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.renderSlot($.$slots,"dropdown")],46,ju),[[e.vShow,c.isShowOpen]])]),_:3},8,["enter-active-class","leave-active-class"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Ku))}}),Gn=e.defineComponent({name:"ClDropdownlayerPopup",__name:"Popup",props:{id:String,classParent:String,classText:String,classDropDown:String,isDisabled:{type:Boolean,default:!1},dropdownArrowPos:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!1},isInitDelayComplete:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},appendContainer:{type:String,default:""},triggers:{type:String,default:"click",validator:n=>["click","hover"].includes(n)},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0,onAfterLeave:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let B={"dropdownLayer-theme-popup":!0,"panel-dropdownlayerpopup":!0};return B=o.getJsonMerge(B,me.getClassNameJson(t.classParent)),B}),s=e.computed(()=>{let B={"dropdownLayer-dropdown-theme-popup":!0};return B=o.getJsonMerge(B,me.getClassNameJson(t.classDropDown)),B}),c=B=>{B&&t.isInitDelayComplete&&E(),i("onChangeOpen",B)},m=B=>{i("onChangePosition",B)},p=()=>{i("onOpenComplete")},g=()=>{i("onAfterLeave")},h=B=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(B)},y=()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return d.value.calculationPosition()},E=()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}e.nextTick(()=>{d.value?.initCompleteOpen()})};return l({setOpen:h,calculationPosition:y,initCompleteOpen:E,checkIsShowOpen:()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return d.value.getIsShowOpen()}}),(B,I)=>(e.openBlock(),e.createBlock(Kl,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:u.value,classText:n.classText,classDropDown:s.value,isDisabled:n.isDisabled,dropdownArrowPos:n.dropdownArrowPos,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,isCloseDestroy:n.isCloseDestroy,isInitDelayComplete:n.isInitDelayComplete,appendContainer:n.appendContainer,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,triggers:n.triggers,onOpenBeforeCallback:n.onOpenBeforeCallback,onOnChangeOpen:c,onOnChangePosition:m,onOnOpenComplete:p,onOnAfterLeave:g},{labelText:e.withCtx(()=>[e.renderSlot(B.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(B.$slots,"dropdown")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","dropDownPos","isUseDropdownArrow","isCloseDestroy","isInitDelayComplete","appendContainer","transitionEnter","transitionLeave","triggers","onOpenBeforeCallback"]))}}),Fa=(n,l)=>Object.prototype.hasOwnProperty.call(n,l),Yu=(n,l,a)=>{const t=(2-l)*a/2,i=t===0||t===1?0:l*a/(t<.5?t*2:2-t*2);return[n,i,t]},qu=n=>typeof n=="string"&&n.includes(".")&&Number.parseFloat(n)===1,Xu=n=>typeof n=="string"&&n.includes("%"),jt=(n,l)=>{qu(n)&&(n="100%");const a=Xu(n);return n=Math.min(l,Math.max(0,Number.parseFloat(`${n}`))),a&&(n=Number.parseInt(`${n*l}`,10)/100),Math.abs(n-l)<1e-6?1:n%l/Number.parseFloat(l)},Pa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Fn=n=>{n=Math.min(Math.round(n),255);const l=Math.floor(n/16),a=n%16;return`${Pa[l]||l}${Pa[a]||a}`},Ra=({r:n,g:l,b:a})=>Number.isNaN(+n)||Number.isNaN(+l)||Number.isNaN(+a)?"":`#${Fn(n)}${Fn(l)}${Fn(a)}`,Io={A:10,B:11,C:12,D:13,E:14,F:15},Ot=n=>n.length===2?(Io[n[0].toUpperCase()]||+n[0])*16+(Io[n[1].toUpperCase()]||+n[1]):Io[n[1].toUpperCase()]||+n[1],Gu=(n,l,a)=>{l=l/100,a=a/100;let t=l;const i=Math.max(a,.01);a*=2,l*=a<=1?a:2-a,t*=i<=1?i:2-i;const r=(a+l)/2,d=a===0?2*t/(i+t):2*l/(a+l);return{h:n,s:d*100,v:r*100}},Ha=(n,l,a)=>{n=jt(n,255),l=jt(l,255),a=jt(a,255);const t=Math.max(n,l,a),i=Math.min(n,l,a);let r=0;const d=t,u=t-i,s=t===0?0:u/t;if(t===i)r=0;else{switch(t){case n:{r=(l-a)/u+(l<a?6:0);break}case l:{r=(a-n)/u+2;break}case a:{r=(n-l)/u+4;break}}r/=6}return{h:r*360,s:s*100,v:d*100}},Nn=(n,l,a)=>{n=jt(n,360)*6,l=jt(l,100),a=jt(a,100);const t=Math.floor(n),i=n-t,r=a*(1-l),d=a*(1-i*l),u=a*(1-(1-i)*l),s=t%6,c=[a,d,r,r,u,a][s],m=[u,a,a,d,r,r][s],p=[r,r,u,a,a,d][s];return{r:Math.round(c*255),g:Math.round(m*255),b:Math.round(p*255)}};class Qu{_hue=0;_saturation=100;_value=100;_alpha=100;enableAlpha=!1;format="hex";value="";selected;constructor(l){l=l||{};for(const a in l)Fa(l,a)&&(this[a]=l[a]);l.value?this.fromString(l.value):this.doOnChange()}set(l,a){if(arguments.length===1&&typeof l=="object"){for(const t in l)Fa(l,t)&&this.set(t,l[t]);return}this[`_${l}`]=a,this.doOnChange()}get(l){return l==="alpha"?Math.floor(this[`_${l}`]):this[`_${l}`]}toRgb(){return Nn(this._hue,this._saturation,this._value)}fromString(l){if(!l)return;const a=this._convertValueInfo(l);a&&(this._hue=a.hue,this._saturation=a.saturation,this._value=a.value,this._alpha=a.alpha,this.doOnChange())}compare(l){return Math.abs(l._hue-this._hue)<2&&Math.abs(l._saturation-this._saturation)<1&&Math.abs(l._value-this._value)<1&&Math.abs(l._alpha-this._alpha)<1}doOnChange(){const{_hue:l,_saturation:a,_value:t,_alpha:i,format:r}=this,d={hue:l,saturation:a,value:t,alpha:i};let u=this._convertFormat(r,d);u.length===0&&(u=this._getValueRGB(d)),this.value=u}checkValue(l){let a=!1,t="";if(/^rgb\(/.test(l)?t="^[rR][gG][Bb][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){2}[\\s]*(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)[\\s]*[\\)]{1}$":/^rgba\(/.test(l)?t="^[rR][gG][Bb][Aa][\\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){3}[\\s]*(1|1.0|0|0.[0-9])[\\s]*[\\)]{1}$":/^#/.test(l)?t="^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$":/^hsl\(/.test(l)?t="^[hH][Ss][Ll][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsla\(/.test(l)?t="^[hH][Ss][Ll][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$":/^hsv\(/.test(l)?t="^[hH][Ss][Vv][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*)[\\)]$":/^hsva\(/.test(l)&&(t="^[hH][Ss][Vv][Aa][\\(]([\\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\\s]*,)([\\s]*((100|[0-9][0-9]?)%|0)[\\s]*,){2}([\\s]*(1|1.0|0|0.[0-9])[\\s]*)[\\)]$"),t.length>0){const i=new RegExp(t);a=l.match(i)!==null}return a}getValueFormat(l,a){const t=this._convertValueInfo(l);return t?this._convertFormat(a,t):l}_convertValueInfo(l){let a=0,t=100,i=100,r=100;if(l){let d;if(l.includes("hsl")){const u=l.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d=Gu(u[0],u[1],u[2]))}else if(l.includes("hsv")){const u=l.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d={h:u[0],s:u[1],v:u[2]})}else if(l.includes("rgb")){const u=l.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(s=>s!=="").map((s,c)=>c>2?Number.parseFloat(s):Number.parseInt(s,10));u.length===4?(r=Number.parseFloat(u[3].toString()),r=r>1?1:r,r=r*100):u.length===3&&(r=100),u.length>=3&&(d=Ha(u[0],u[1],u[2]))}else if(l.includes("#")){const u=l.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(u))return;let s=0,c=0,m=0;u.length===3?(s=Ot(u[0]+u[0]),c=Ot(u[1]+u[1]),m=Ot(u[2]+u[2])):(u.length===6||u.length===8)&&(s=Ot(u.slice(0,2)),c=Ot(u.slice(2,4)),m=Ot(u.slice(4,6))),u.length===8?(r=Ot(u.slice(6))/255,r=r>1?1:r,r=r*100):(u.length===3||u.length===6)&&(r=100),d=Ha(s,c,m)}d&&(a=Math.max(0,Math.min(360,d.h)),t=Math.max(0,Math.min(100,d.s)),i=Math.max(0,Math.min(100,d.v)))}return{hue:a,saturation:t,value:i,alpha:r}}_convertFormat(l,a){let t="";switch(l){case"hsl":{t=this._getValueHSL(a);break}case"hsv":{t=this._getValueHSV(a);break}case"rgb":{t=this._getValueRGB(a);break}case"hex":t=this._getValueHEX(a)}return t}_isShowAlpha(l){return l!==100}_getValueHSL(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(l.alpha),i=Yu(l.hue,l.saturation/100,l.value/100),r=Math.round(l.hue),d=Math.round(i[1]*100),u=Math.round(i[2]*100);return t?`hsla(${r}, ${d}%, ${u}%, ${a/100})`:`hsl(${r}, ${d}%, ${u}%)`}_getValueHSV(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(a),i=Math.round(l.hue),r=Math.round(l.saturation),d=Math.round(l.value);return t?`hsva(${i}, ${r}%, ${d}%, ${a/100})`:`hsv(${i}, ${r}%, ${d}%)`}_getValueHEX(l){const a=Math.floor(l.alpha);return this._isShowAlpha(a)?`${Ra(Nn(l.hue,l.saturation,l.value))}${Fn(a*255/100)}`:Ra(Nn(l.hue,l.saturation,l.value))}_getValueRGB(l){const a=Math.floor(l.alpha),t=this._isShowAlpha(a),{r:i,g:r,b:d}=Nn(l.hue,l.saturation,l.value);return t?`rgba(${i}, ${r}, ${d}, ${this.get("alpha")/100})`:`rgb(${i}, ${r}, ${d})`}}const Zu=e.defineComponent({name:"ClColorPickerPalette",__name:"Palette",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.reactive({background:"hsl(0, 100%, 50%)",btnLeft:0,btnTop:0}),i=e.computed(()=>{const s=l.color.get("hue"),c=l.color.get("value");return{hue:s,value:c}}),r=(s,c)=>{const p=a.value.getBoundingClientRect();let g=c.clientX-p.left,h=c.clientY-p.top;g=Math.max(0,g),g=Math.min(g,p.width),h=Math.max(0,h),h=Math.min(h,p.height),t.btnLeft=g,t.btnTop=h,l.color.set({saturation:g/p.width*100,value:100-h/p.height*100})},d=()=>{const s=a.value,c=l.color.get("saturation"),m=l.color.get("value"),{clientWidth:p,clientHeight:g}=s;t.btnLeft=c*p/100,t.btnTop=(100-m)*g/100,t.background=`hsl(${l.color.get("hue")}, 100%, 50%)`},u=()=>{const s={ing:(c,m)=>{r(c,m)},end:(c,m)=>{r(c,m)}};new Ye.Drag(a.value,s),d()};return e.onMounted(()=>{e.nextTick(()=>{u()})}),e.watch(()=>i.value,()=>{d()}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-palette",style:e.normalizeStyle({backgroundColor:t.background})},[c[1]||(c[1]=e.createElementVNode("div",{class:"panel-colorpicker-palette-white"},null,-1)),c[2]||(c[2]=e.createElementVNode("div",{class:"panel-colorpicker-palette-black"},null,-1)),e.createElementVNode("div",{class:"panel-colorpicker-palette-btn",style:e.normalizeStyle({top:t.btnTop+"px",left:t.btnLeft+"px"})},[...c[0]||(c[0]=[e.createElementVNode("div",null,null,-1)])],4)],4))}}),ed=e.defineComponent({name:"ClColorPickerHue",__name:"Hue",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),i=e.useTemplateRef("refElBtn"),r=e.reactive({btnTop:0}),d=e.computed(()=>l.color.get("hue")),u=(g,h)=>{const E=a.value.getBoundingClientRect();let L=h.clientY-E.top;L=Math.max(0,L),L=Math.min(L,E.height);const B=Math.round(L/E.height*360);l.color.set("hue",B)},s=()=>{const g=a.value,h=l.color.get("hue");return Math.round(h*g.offsetHeight/360)},c=()=>{r.btnTop=s()},m=()=>{const g={ing:(h,y)=>{u(h,y)},end:(h,y)=>{u(h,y)}};new Ye.Drag(t.value,g),new Ye.Drag(i.value,g),c()};e.onMounted(()=>{e.nextTick(()=>{m()})}),e.watch(()=>d.value,()=>{c()});const p=g=>{if(g.target!==i.value){const y=me.getClientXY(g);u(g,y)}};return(g,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-hue"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-hue-container",onClick:p},null,512),e.createElementVNode("div",{ref_key:"refElBtn",ref:i,class:"panel-colorpicker-hue-btn",style:e.normalizeStyle({top:r.btnTop+"px"})},null,4)],512))}}),td=e.defineComponent({name:"ClColorPickerAlpha",__name:"Alpha",props:{color:{type:Object,required:!0}},setup(n){const l=n,a=e.useTemplateRef("refElTopParent"),t=e.useTemplateRef("refElContainer"),i=e.useTemplateRef("refElBtn"),r=e.reactive({background:null,btnLeft:0}),d=e.computed(()=>l.color.get("alpha")),u=(h,y)=>{const L=a.value.getBoundingClientRect();let B=y.clientX-L.left;B=Math.max(0,B),B=Math.min(B,L.width);const I=Math.round(B/L.width*100);l.color.set("alpha",I)},s=()=>{const h=a.value,y=l.color.get("alpha");return Math.round(y*h.offsetWidth/100)},c=()=>{if(l.color&&l.color.value){const{r:h,g:y,b:E}=l.color.toRgb();return`linear-gradient(to right, rgba(${h}, ${y}, ${E}, 0) 0%, rgba(${h}, ${y}, ${E}, 1) 100%)`}return null},m=()=>{r.btnLeft=s(),r.background=c()},p=()=>{const h={ing:(y,E)=>{u(y,E)},end:(y,E)=>{u(y,E)}};new Ye.Drag(t.value,h),new Ye.Drag(i.value,h),m()};e.onMounted(()=>{e.nextTick(()=>{p()})}),e.watch(()=>d.value,()=>{m()}),e.watch(()=>l.color.value,()=>{m()});const g=h=>{if(h.target!==i.value){const E=me.getClientXY(h);u(h,E)}};return(h,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:a,class:"panel-colorpicker-alpha"},[e.createElementVNode("div",{ref_key:"refElContainer",ref:t,class:"panel-colorpicker-alpha-container",style:e.normalizeStyle({background:r.background}),onClick:g},null,4),e.createElementVNode("div",{ref_key:"refElBtn",ref:i,class:"panel-colorpicker-alpha-btn",style:e.normalizeStyle({left:r.btnLeft+"px"})},null,4)],512))}}),Wl=e.defineComponent({name:"ClColorPickerItemBlock",__name:"ItemBlock",props:{className:String,color:String},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.computed(()=>{let d="panel-colorpicker-item-block ";const{className:u}=a;return u&&!o.isEmpty(u)&&(d+=u),d}),r=()=>{t("onClick",a.color||"")};return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value),onClick:r},[u[0]||(u[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({background:n.color})},null,4)],2))}}),nd={class:"panel-colorpicker-preset"},od=e.defineComponent({name:"ClColorPickerPreset",__name:"Preset",emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=e.reactive({keyIndex:`ColorpickerPreset-${o.getRandom(8)}`}),i=e.ref([]),r=()=>{const u=["var(--cl-text-primary, #323233)","var(--cl-bg, #ffffff)","#f44336","#E91E63","#9c27b0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B","rgba(255, 69, 0, 0.68)","rgba(31, 147, 255, 0.73)","var(--cl-transparent, rgba(0, 0, 0, 0))"];i.value=u};e.onMounted(()=>{r()});const d=u=>{a("onClick",u)};return(u,s)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(c,m)=>(e.openBlock(),e.createElementBlock("li",{key:`${t.keyIndex}-${m}`},[e.createVNode(Wl,{color:c,onOnClick:d},null,8,["color"])]))),128))])]))}}),ad={class:"panel-colorpicker-value"},ld={key:0,class:"panel-colorpicker-hex"},id={key:1,class:"panel-colorpicker-rgb"},sd={key:2,class:"panel-colorpicker-hsl"},rd={key:3,class:"panel-colorpicker-hsv"},cd=e.defineComponent({name:"ClColorPickerValue",__name:"Value",props:{color:{type:Object,required:!0}},emits:{onChangeType:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.reactive({type:"hex",hex:"",rgb:"",hsl:"",hsv:""}),d=e.ref(""),u=e.reactive({r:"",g:"",b:"",a:""}),s=e.reactive({h:"",s:"",l:"",a:""}),c=e.reactive({h:"",s:"",v:"",a:""}),m={typeList:["hex","rgb","hsl","hsv"]},p=e.computed(()=>t.color.value),g=C=>{const J=C.substring(C.indexOf("(")+1,C.indexOf(")")).split(",").map(ne=>o.trim(ne));return J.length===3&&J.push("1"),J},h=(C,D)=>{const J=C||p.value,{color:ne}=t,K=D==="hex"?J:ne.getValueFormat(J,"hex"),P=ne.getValueFormat(J,"rgb"),x=ne.getValueFormat(J,"hsl"),A=ne.getValueFormat(J,"hsv");r.hex=K,r.rgb=P,r.hsl=x,r.hsv=A,e.nextTick(()=>{d.value=K;const f=g(P);u.r=f[0],u.g=f[1],u.b=f[2],u.a=f[3];const S=g(x);s.h=S[0],s.s=S[1],s.l=S[2],s.a=S[3];const k=g(A);c.h=k[0],c.s=k[1],c.v=k[2],c.a=k[3]})},y=C=>{let D=m.typeList.indexOf(r.type);D+=C;const J=m.typeList.length;D<0?D=J-1:D>=J&&(D=0);const ne=m.typeList[D];r.type=ne,i("onChangeType",ne)},E=C=>{let D="";switch(C){case"hex":{d.value.length>0&&(D=d.value);break}case"rgb":{u.r.length>0&&u.g.length>0&&u.b.length>0&&u.a.length>0&&(D=`rgba(${u.r}, ${u.g}, ${u.b},${u.a})`);break}case"hsl":{s.h.length>0&&s.s.length>0&&s.l.length>0&&s.a.length>0&&(D=`hsla(${s.h}, ${s.s}, ${s.l},${s.a})`);break}case"hsv":{c.h.length>0&&c.s.length>0&&c.v.length>0&&c.a.length>0&&(D=`hsva(${c.h}, ${c.s}, ${c.v},${c.a})`);break}}if(D.length>0&&t.color.checkValue(D)){const J=t.color.getValueFormat(D,C);D!==J&&(h(D,C),e.nextTick(()=>{t.color.fromString(D)}),i("onChangeType",C))}},L=()=>{h()};e.onMounted(()=>{e.nextTick(()=>{L()})}),e.watch(()=>p.value,C=>{const D=t.color.getValueFormat(C,"rgb");r.rgb!==D&&h()});const B=()=>{E("hex")},I=()=>{E("rgb")},M=()=>{E("hsl")},N=()=>{E("hsv")},b=()=>{y(-1)},V=()=>{y(1)};return l({setType:C=>{r.type=C},clearInputs:()=>{d.value="",u.r="",u.g="",u.b="",u.a="",s.h="",s.s="",s.l="",s.a="",c.h="",c.s="",c.v="",c.a=""}}),(C,D)=>(e.openBlock(),e.createElementBlock("div",ad,[e.createElementVNode("div",null,[r.type==="hex"?(e.openBlock(),e.createElementBlock("div",ld,[e.createElementVNode("div",null,[e.createVNode(Re,{value:d.value,"onUpdate:value":D[0]||(D[0]=J=>d.value=J),isClean:!1,onOnChange:B},null,8,["value"]),D[13]||(D[13]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"十六进制",-1))])])):r.type==="rgb"?(e.openBlock(),e.createElementBlock("div",id,[e.createElementVNode("div",null,[e.createVNode(Re,{value:u.r,"onUpdate:value":D[1]||(D[1]=J=>u.r=J),isClean:!1,onOnChange:I},null,8,["value"]),D[14]||(D[14]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"R",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:u.g,"onUpdate:value":D[2]||(D[2]=J=>u.g=J),isClean:!1,onOnChange:I},null,8,["value"]),D[15]||(D[15]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"G",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:u.b,"onUpdate:value":D[3]||(D[3]=J=>u.b=J),isClean:!1,onOnChange:I},null,8,["value"]),D[16]||(D[16]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"B",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:u.a,"onUpdate:value":D[4]||(D[4]=J=>u.a=J),isClean:!1,onOnChange:I},null,8,["value"]),D[17]||(D[17]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):r.type==="hsl"?(e.openBlock(),e.createElementBlock("div",sd,[e.createElementVNode("div",null,[e.createVNode(Re,{value:s.h,"onUpdate:value":D[5]||(D[5]=J=>s.h=J),isClean:!1,onOnChange:M},null,8,["value"]),D[18]||(D[18]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:s.s,"onUpdate:value":D[6]||(D[6]=J=>s.s=J),isClean:!1,onOnChange:M},null,8,["value"]),D[19]||(D[19]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:s.l,"onUpdate:value":D[7]||(D[7]=J=>s.l=J),isClean:!1,onOnChange:M},null,8,["value"]),D[20]||(D[20]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"L",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:s.a,"onUpdate:value":D[8]||(D[8]=J=>s.a=J),isClean:!1,onOnChange:M},null,8,["value"]),D[21]||(D[21]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):r.type==="hsv"?(e.openBlock(),e.createElementBlock("div",rd,[e.createElementVNode("div",null,[e.createVNode(Re,{value:c.h,"onUpdate:value":D[9]||(D[9]=J=>c.h=J),isClean:!1,onOnChange:N},null,8,["value"]),D[22]||(D[22]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"H",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.s,"onUpdate:value":D[10]||(D[10]=J=>c.s=J),isClean:!1,onOnChange:N},null,8,["value"]),D[23]||(D[23]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"S",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.v,"onUpdate:value":D[11]||(D[11]=J=>c.v=J),isClean:!1,onOnChange:N},null,8,["value"]),D[24]||(D[24]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"V",-1))]),e.createElementVNode("div",null,[e.createVNode(Re,{value:c.a,"onUpdate:value":D[12]||(D[12]=J=>c.a=J),isClean:!1,onOnChange:N},null,8,["value"]),D[25]||(D[25]=e.createElementVNode("div",{class:"panel-colorpicker-value-lable"},"A",-1))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))]),e.createElementVNode("div",null,[e.createVNode(ke,{name:"caret-up",onClick:b}),e.createVNode(ke,{name:"caret-down",onClick:V})])]))}}),ud={key:0,class:"panel-colorpicker-copy-icon"},Ua=e.defineComponent({name:"ClColorPickerCopy",__name:"Copy",props:{className:String,color:String,getTxtCallback:Function},setup(n){const l=n,a=e.useSlots(),t=e.reactive({isHover:!1}),i=e.computed(()=>!o.isUndefined(a.default)),r=e.computed(()=>{let c=!1;return i.value?c=t.isHover:c=!0,c}),d=e.computed(()=>{const c={"panel-colorpicker-copy":!0,"panel-colorpicker-copy-hover":t.isHover},{className:m}=l;return m&&!o.isEmpty(m)&&m.split(" ").forEach(p=>{o.isEmpty(p)||(c[p]=!0)}),c}),u=()=>{i.value&&(t.isHover=!0)},s=()=>{i.value&&(t.isHover=!1)};return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(d.value),onMouseenter:u,onMouseleave:s},[e.renderSlot(c.$slots,"default"),r.value?(e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(hn,{textLabel:n.getTxtCallback||n.color||""},null,8,["textLabel"])])):e.createCommentVNode("",!0)],34))}}),dd={class:"panel-colorpicker-container"},md={key:0},pd={key:0,class:"panel-colorpicker-format"},fd={class:"panel-colorpicker-format-show"},hd={key:1,class:"panel-colorpicker-operate"},za=e.defineComponent({name:"ClColorPickerBase",__name:"Color",props:{value:String,disabled:{type:Boolean,default:!1},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isDropdown:{type:Boolean,default:!0}},emits:{onChange:n=>!0,onSubmit:()=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElColorResult"),s=e.useTemplateRef("refElColorValue"),c=e.reactive({isShowColorResult:!1,colorResult:"",formatShow:"hex"}),m=e.reactive(new Qu({value:t.value,format:"",enableAlpha:!0})),p={isColorChangeResult:!0},g=()=>m.get("alpha").toString()==="100"?"hex":"rgb",h=(C,D=!0)=>{let J="";C&&!o.isEmpty(C)&&c.isShowColorResult&&(J=m.getValueFormat(C,c.formatShow)),c.colorResult=J,D&&i("onChange",J)},y=C=>{C&&!o.isEmpty(C)?(c.isShowColorResult=!0,m.fromString(C),h(m.value,!1)):(c.isShowColorResult=!1,p.isColorChangeResult=!1,h("",!1),m.fromString(""),e.nextTick(()=>{p.isColorChangeResult=!0}))},E=()=>{const{value:C}=t;y(C),i("onInit")};e.onMounted(()=>{e.nextTick(()=>{E()})}),e.watch(()=>t.value,C=>{y(C)}),e.watch(()=>m.value,C=>{o.isEmpty(t.value)&&(c.isShowColorResult=!0),p.isColorChangeResult&&h(C),p.isColorChangeResult=!0});const L=()=>m.getValueFormat(m.value,c.formatShow),B=C=>{m.fromString(C)},I=C=>{c.formatShow=C,h(m.value,!1)},M=()=>{const C=t.value||"";c.isShowColorResult=!o.isEmpty(C),o.isEmpty(C)?m.set({hue:0,saturation:0,value:100,alpha:100}):(p.isColorChangeResult=!1,h(C),m.fromString(C))},N=()=>{m.set({hue:0,saturation:0,value:100,alpha:100})},b=()=>{i("onSubmit")};return l({getValue:()=>{let C=c.colorResult;if(C.length>0){const D=g();C=m.getValueFormat(C,D)}return C},setValue:C=>{y(C)},initValueType:()=>{const C=g();c.formatShow=C,s.value&&s.value.setType(C)}}),(C,D)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["panel-colorpicker-wrapper",{"panel-colorpicker-wrapper-disabled":n.disabled}])},[e.createElementVNode("div",dd,[e.createElementVNode("div",null,[e.createVNode(Zu,{color:m},null,8,["color"]),e.createVNode(ed,{color:m},null,8,["color"])]),n.isAlpha?(e.openBlock(),e.createElementBlock("div",md,[e.createVNode(td,{color:m},null,8,["color"]),D[0]||(D[0]=e.createElementVNode("div",null,null,-1))])):e.createCommentVNode("",!0)]),n.isFormat?(e.openBlock(),e.createElementBlock("div",pd,[e.createElementVNode("div",fd,[e.createVNode(Ua,{className:"panel-colorpicker-tip-current",getTxtCallback:L},{default:e.withCtx(()=>[e.createVNode(Wl,{color:m.value},null,8,["color"])]),_:1})]),e.createVNode(cd,{ref_key:"refElColorValue",ref:s,color:m,onOnChangeType:I},null,8,["color"])])):e.createCommentVNode("",!0),n.isOperate?(e.openBlock(),e.createElementBlock("div",hd,[e.createElementVNode("div",{ref_key:"refElColorResult",ref:u},e.toDisplayString(c.colorResult),513),e.createElementVNode("div",null,[e.createElementVNode("div",{onClick:M},[e.createVNode(ke,{name:"restore",title:e.unref(r).restore},null,8,["title"])]),e.createElementVNode("div",{onClick:N},[e.createVNode(ke,{name:"clear",title:e.unref(r).clearEmpty},null,8,["title"])]),e.createVNode(Ua,{color:c.colorResult},null,8,["color"]),n.isDropdown?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:b},[e.createVNode(ke,{name:"check",title:e.unref(r).submit},null,8,["title"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),n.isPreset?(e.openBlock(),e.createBlock(od,{key:2,onOnClick:B})):e.createCommentVNode("",!0)],2))}}),gd={class:"panel-colorpicker-dropdown-text"},vd={key:0,class:"panel-colorpicker-dropdown-arrow"},jl=e.defineComponent({name:"ClColorPicker",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isDropdown:{type:Boolean,default:!0},isAlpha:{type:Boolean,default:!0},isFormat:{type:Boolean,default:!0},isOperate:{type:Boolean,default:!0},isPreset:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=t.id,r=a,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElColorpicker"),s=e.reactive({isInitShow:!t.isDropdown,dropdownTextValue:"",currentValue:""}),c={lastValue:""},m=e.computed(()=>{let T="panel-colorpicker ";const{className:C}=t;return C&&!o.isEmpty(C)&&(T+=C),t.isPlaintext&&(T+="cl-plaintext-static "),T}),p=()=>{const T=s.currentValue;let C=!1;t.isDropdown?C=T!==c.lastValue:C=!0,C&&(c.lastValue=T,r("update:value",T),r("update:modelValue",T),r("onChange",T))},g=T=>{let C="transparent";T&&!o.isEmpty(T)&&(C=T),s.dropdownTextValue=C},h=T=>{const C=T||"";c.lastValue=C,t.isDropdown||(s.currentValue=C),g(C)},y=()=>{const T=u.value.getValue();s.dropdownTextValue=T,s.currentValue=T,p()},E=()=>{h(t.value)};e.watch(()=>t.value,T=>{h(T)}),e.onMounted(()=>{e.nextTick(()=>{E()})});const L=()=>{r("onInit")},B=T=>{t.disabled||(T?u.value&&u.value.initValueType():t.isOperate?s.currentValue!==u.value.getValue()&&s.currentValue===c.lastValue&&u.value.setValue(c.lastValue):y())},I=()=>{s.isInitShow=!0,s.currentValue=c.lastValue},M=()=>{t.isDropdown||y()},N=()=>{y(),t.isDropdown&&d.value&&d.value.setOpen(!1)};return l({getValue:()=>s.currentValue,getValueData:()=>({value:s.currentValue}),setValue:T=>{h(T)}}),(T,C)=>n.isDropdown?(e.openBlock(),e.createBlock(Gn,{key:0,ref_key:"refElDropdownLayer",ref:d,id:e.unref(i),classParent:m.value,classDropDown:"panel-colorpicker-dropdown",isUseDropdownArrow:!0,isDisabled:n.disabled,onOnChangeOpen:B,onOnOpenComplete:I},{label:e.withCtx(()=>[e.createElementVNode("div",gd,[C[0]||(C[0]=e.createElementVNode("div",{class:"panel-colorpicker-bg-alpha"},null,-1)),e.createElementVNode("div",{style:e.normalizeStyle({"background-color":s.dropdownTextValue})},null,4),n.isPlaintext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("div",vd,[e.createVNode(ke,{name:"angle-down"})]))])]),dropdown:e.withCtx(()=>[s.isInitShow?(e.openBlock(),e.createBlock(za,{key:0,ref_key:"refElColorpicker",ref:u,value:s.currentValue,isAlpha:n.isAlpha,isFormat:n.isFormat,isOperate:n.isOperate,isPreset:n.isPreset,isDropdown:n.isDropdown,onOnChange:M,onOnSubmit:N,onOnInit:L},null,8,["value","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)]),_:1},8,["id","classParent","isDisabled"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(m.value)},[s.isInitShow?(e.openBlock(),e.createBlock(za,{key:0,ref_key:"refElColorpicker",ref:u,value:s.currentValue,disabled:n.disabled,isAlpha:n.isAlpha,isFormat:n.isFormat,isOperate:n.isOperate,isPreset:n.isPreset,isDropdown:n.isDropdown,onOnChange:M,onOnSubmit:N,onOnInit:L},null,8,["value","disabled","isAlpha","isFormat","isOperate","isPreset","isDropdown"])):e.createCommentVNode("",!0)],2))}}),yd={class:"imgCropper-container"},kd={style:{position:"relative"}},Sd={class:"imgCropper-main"},wd={class:"frame-alignline"},Ed={class:"imgCropper-btns"},Cd={key:0,class:"imgCropper-upload"},bd=["id","name"],xd=["for"],Bd={class:"imgCropper-btns-opt"},Id={key:0,class:"imgCropper-loading-mask"},Dd=["src"],Td={key:0,class:"imgCropper-loading-mask"},Nd={key:0,class:"frame-alignline"},Ja=e.defineComponent({name:"ClCropperBase",__name:"Base",props:{className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},isCenterBox:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onImgLoad:n=>!0,onImgSave:()=>!0},setup(n,{expose:l,emit:a}){const t=e.defineAsyncComponent(()=>import("cropper-next-vue").then(_=>(Promise.resolve().then(()=>require("./index-Dyvby5gX.cjs")),_.VueCropper))),i=n,r=a,d=o.getRandom(8),u=`cropperBase-${d}`,s=e.useTemplateRef("refElCropper"),c=e.ref(!1),m=e.reactive({uploadAgainId:`btnImgCropper_uploadAgain_${d}`,isInitImageLoading:!1}),p=e.reactive({img:"",wrapper:{width:400,height:400},cropLayout:{width:i.width,height:i.height},color:i.fillColor,outputSize:1,outputType:"png",full:!0,original:!1,maxSideLength:3e3,mode:"contain",centerBox:i.isCenterBox,centerWrapper:!1}),g=e.reactive({src:"",style:{},pStyle:{}}),h=e.ref({}),y=e.ref(0),E=e.ref(0),L=e.ref(!0),B=e.computed(()=>{const{alignLine:_}=i;return o.isNonEmptyString(_)?_.split(","):[]}),I=e.computed(()=>{const _={"panel-imgCropper":!0};return o.getJsonMerge(_,me.getClassNameJson(i.className))}),M=e.computed(()=>{const{previewShape:_}=i,O=o.isNonEmptyString(_)?_:"square",q={"imgCropper-preview":!0};return q[`imgCropper-preview-${O}`]=!0,q}),N=e.computed(()=>({width:`${(i.width??0)+6}px`,height:`${(i.height??0)+6}px`,backgroundColor:i.fillColor})),b=()=>{p.cropLayout={width:Math.max(1,i.width??1),height:Math.max(1,i.height??1)}},V=()=>{const{src:_}=i;let O="";if(o.isNonEmptyString(_)){if(_.substring(0,5)!=="data:")if(/^(http|https):\/\/[^\s]+$/.test(_)){const q=`_t=${new Date().getTime()}`,X=_.indexOf("?")===-1?"?":"&";O=_+X+q}else O=_;else O=_;m.isInitImageLoading=!0,E.value=0,y.value=0}else m.isInitImageLoading=!1;p.img=O},w=()=>{b(),V()};e.onMounted(()=>{e.nextTick(()=>{w()})}),e.onBeforeUnmount(()=>{L.value=!1}),e.watch(()=>i.src,(_,O)=>{_!==O&&V()}),e.watch(()=>[i.width,i.height,i.fillColor,i.isCenterBox],([_,O,q,X],[Z,se,le,G])=>{(_!==Z||O!==se)&&b(),q!==le&&(p.color=q),X!==G&&(p.centerBox=X)});const T=_=>{if(!_)return;const{url:O,img:q,w:X,h:Z}=_;g.src=O??"",g.style=q??{},g.pStyle={width:typeof X=="number"?`${X}px`:`${i.width}px`,height:typeof Z=="number"?`${Z}px`:`${i.height}px`};const se=q?.transform?.match(/scale\(([^)]+)\)/);se&&(y.value=parseFloat(se[1]),E.value||(E.value=y.value));const le=X??i.width,G=Z??i.height;if(le>0&&G>0&&(le>i.width||G>i.height)){const oe=Math.min(i.width/le,i.height/G);h.value={transform:`scale(${oe})`}}else h.value={}},C=_=>{if(!_){m.isInitImageLoading=!1,r("onImgLoad",!1);return}const O=_.type==="success";m.isInitImageLoading=!1,r("onImgLoad",O)},D=_=>{const O=_.currentTarget;!O||!O.files||O.files.length===0||(E.value=0,y.value=0,m.isInitImageLoading=!0,o.getBase64ByFile(O.files).then(q=>{if(L.value){if(!q){m.isInitImageLoading=!1;return}p.img=q}}).catch(()=>{L.value&&(m.isInitImageLoading=!1)}))},J=()=>{},ne=()=>{s.value?.zoomIn(.02)},K=()=>{s.value?.zoomOut(.02)},P=()=>{s.value?.rotateLeft()},x=()=>{s.value?.rotateRight()},A=()=>{s.value&&(m.isInitImageLoading=!0,s.value.reload())},f=()=>{r("onImgSave")};return l({getImageBase64:()=>s.value?s.value.getCropData("base64"):Promise.reject(new Error("vue-cropper 实例未就绪")),refresh:()=>{if(!s.value){we.warn("ClCropperBase","refresh 调用无效:vue-cropper 实例未就绪");return}s.value.reload()},loadingStart:()=>{c.value=!0},loadingStop:()=>{c.value=!1}}),(_,O)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(I.value),id:u},[e.createElementVNode("div",yd,[e.createElementVNode("div",kd,[e.createElementVNode("div",Sd,[e.createVNode(e.unref(t),e.mergeProps({ref_key:"refElCropper",ref:s},p,{onRealTime:T,onImgLoad:C}),{loading:e.withCtx(()=>[...O[0]||(O[0]=[])]),_:1},16),e.createElementVNode("div",wd,[B.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[O[1]||(O[1]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),O[2]||(O[2]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):B.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[O[3]||(O[3]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),O[4]||(O[4]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),O[5]||(O[5]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),O[6]||(O[6]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])]),e.createElementVNode("div",Ed,[e.createElementVNode("div",null,[n.isShowUpload?(e.openBlock(),e.createElementBlock("div",Cd,[e.createElementVNode("input",{type:"file",id:m.uploadAgainId,name:m.uploadAgainId,accept:"image/jpg,image/jpeg,image/pjpeg,image/png,image/x-png",onChange:D},null,40,bd),e.createElementVNode("label",{for:m.uploadAgainId},[e.createElementVNode("span",{title:"重新上传",onClick:e.withModifiers(J,["stop"])},[e.createVNode(ke,{name:"upload"})])],8,xd)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("div",Bd,[e.createElementVNode("span",{title:"放大","aria-label":"放大",role:"button",tabindex:"0",onClick:e.withModifiers(ne,["stop"])},[e.createVNode(ke,{name:"search-plus"})]),e.createElementVNode("span",{title:"缩小","aria-label":"缩小",role:"button",tabindex:"0",onClick:e.withModifiers(K,["stop"])},[e.createVNode(ke,{name:"search-minus"})]),e.createElementVNode("span",{title:"左转90°","aria-label":"左转90度",role:"button",tabindex:"0",onClick:e.withModifiers(P,["stop"])},[e.createVNode(ke,{name:"rotate-left"})]),e.createElementVNode("span",{title:"右转90°","aria-label":"右转90度",role:"button",tabindex:"0",onClick:e.withModifiers(x,["stop"])},[e.createVNode(ke,{name:"rotate-right"})]),e.createElementVNode("span",{title:"重置","aria-label":"重置",role:"button",tabindex:"0",onClick:e.withModifiers(A,["stop"])},[e.createVNode(ke,{name:"restore"})]),n.isShowSave?(e.openBlock(),e.createElementBlock("span",{key:0,title:"保存","aria-label":"保存",role:"button",tabindex:"0",onClick:e.withModifiers(f,["stop"])},[e.createVNode(ke,{name:"save"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),c.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",Id,[e.createVNode(ct,{theme:"circleSpinner",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),n.isPreview?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(M.value),style:e.normalizeStyle(N.value)},[e.createElementVNode("div",{style:e.normalizeStyle(h.value)},[e.createElementVNode("div",{style:e.normalizeStyle(g.pStyle)},[e.createElementVNode("img",{src:g.src,style:e.normalizeStyle(g.style),alt:""},null,12,Dd)],4),c.value||m.isInitImageLoading?(e.openBlock(),e.createElementBlock("div",Td)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4),n.isPreviewAlignLine?(e.openBlock(),e.createElementBlock("div",Nd,[B.value.indexOf("center")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[O[7]||(O[7]=e.createElementVNode("div",{class:"alignline-h alignline-center-h"},null,-1)),O[8]||(O[8]=e.createElementVNode("div",{class:"alignline-v alignline-center-v"},null,-1))],64)):B.value.indexOf("nineGrid")>-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[O[9]||(O[9]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h1"},null,-1)),O[10]||(O[10]=e.createElementVNode("div",{class:"alignline-h alignline-nineGrid-h2"},null,-1)),O[11]||(O[11]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v1"},null,-1)),O[12]||(O[12]=e.createElementVNode("div",{class:"alignline-v alignline-nineGrid-v2"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],2))}}),Vd=["id"],Md={style:{display:"flex","justify-content":"center"}},na=e.defineComponent({name:"ClCropper",__name:"Index",props:{id:String,className:String,src:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},isCenterBox:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!0},previewShape:{type:String,default:"square"},isModal:{type:Boolean,default:!0},isShowUpload:{type:Boolean,default:!0},isShowSave:{type:Boolean,default:!1},fillColor:{type:String,default:"transparent"},alignLine:{type:String,default:"center"},isPreviewAlignLine:{type:Boolean,default:!1}},emits:{onSubmit:n=>!0,onImgLoad:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id||`cropper-${o.getRandom(8)}`,d=e.useTemplateRef("refElModal"),u=e.useTemplateRef("refElCropper"),s=e.ref(!t.isModal),c=e.computed(()=>{const V={"panel-cropper":!0};return o.getJsonMerge(V,me.getClassNameJson(t.className))}),m=e.computed(()=>{const{isModal:V,id:w,className:T,...C}=t;return t.isModal?{...C,isShowSave:!1}:C}),p=()=>u.value?u.value.getImageBase64():Promise.reject(new Error("Cropper 未挂载")),g=(V,w,T)=>{i("onSubmit",{success:!w,data:V,msg:w}),T&&d.value?.hide()},h=()=>p().then(V=>{g(V,"",!0)}).catch(V=>{const w=o.isString(V)?V:V?.message||"裁剪失败";g("",w,!0)}),y=V=>{i("onImgLoad",V)},E=()=>p().then(V=>{g(V,"")}).catch(V=>{const w=o.isString(V)?V:V?.message||"保存失败";g("",w)});return l({getImageBase64:()=>p(),refresh:()=>{u.value?u.value.refresh():we.warn("ClCropper","refresh 调用无效:Cropper 未挂载")},show:()=>{d.value&&t.isModal?(s.value=!0,d.value.show()):we.warn("ClCropper","show 调用无效:非弹窗模式或 Modal 未挂载")},showAndReset:()=>{d.value&&t.isModal?(s.value=!1,d.value.show(),e.nextTick(()=>{s.value=!0})):we.warn("ClCropper","showAndReset 调用无效:非弹窗模式或 Modal 未挂载")},loadingStart:()=>{u.value?u.value.loadingStart():we.warn("ClCropper","loadingStart 调用无效:Cropper 未挂载")},loadingStop:()=>{u.value?u.value.loadingStop():we.warn("ClCropper","loadingStop 调用无效:Cropper 未挂载")}}),(V,w)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(c.value)},[n.isModal?(e.openBlock(),e.createBlock(Qo,{key:0,ref_key:"refElModal",ref:d,width:"850px",titleName:"图片裁切",isShowSubmitLoad:!1,closeLabel:"取消",submitLabel:"确定",onOnSubmit:h},{default:e.withCtx(()=>[e.createElementVNode("div",Md,[s.value?(e.openBlock(),e.createBlock(Ja,e.mergeProps({key:0,ref_key:"refElCropper",ref:u},m.value,{onOnImgLoad:y}),null,16)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),_:1},512)):(e.openBlock(),e.createBlock(Ja,e.mergeProps({key:1,ref_key:"refElCropper",ref:u},m.value,{onOnImgLoad:y,onOnImgSave:E}),null,16))],10,Vd))}}),Xe={format:{img:["jpg","jpe","jpeg","png","gif","bmp","ico"],video:["mp4","rmvb","3gp","avi","asf","asf","dv","mov","mpg4","mpeg","mpg","wm","wmx","flv","mkv","mp4a","rm","wmv","swf","swfl"],audio:["mp3","ogg","wav","wma","mid","ra","ram"],zip:["rar","zip"],excel:["xls","xlsx","csv"],pdf:["pdf"],txt:["txt"],doc:["doc","docx"]},icon:{img:"image",video:"video",audio:"music",txt:"text",zip:"zip",excel:"excel",pdf:"pdf",doc:"word",default:"file"},suffix:{jpg:["jpg","jpe","jpeg"],jpe:["jpg","jpe","jpeg"],jpeg:["jpg","jpe","jpeg"],png:["png"],gif:["gif"],bmp:["bmp"],ico:["ico"],mp4:["mp4"],rmvb:["rmvb"],"3gp":["3gp"],avi:["avi"],asf:["asf"],dv:["dv"],mov:["mov"],mpg4:["mpg4"],mpeg:["mpeg"],mpg:["mpg"],wm:["wm"],wmx:["wmx"],flv:["flv"],mkv:["mkv"],mp4a:["mp4a"],rm:["rm"],wmv:["wmv"],swf:["swf"],swfl:["swfl"],mp3:["mp3"],ogg:["ogg"],wav:["wav"],wma:["wma"],mid:["mid"],ra:["ra"],ram:["ram"],rar:["rar"],zip:["zip"],txt:["txt"],xls:["xls","xlsx","csv"],xlsx:["xls","xlsx","csv"],csv:["xls","xlsx","csv"],pdf:["pdf"],doc:["doc","docx"]},mime:{jpg:["image/jpg","image/jpeg","image/pjpeg"],jpe:["image/jpg","image/jpeg","image/pjpeg"],jpeg:["image/jpg","image/jpeg","image/pjpeg"],png:["image/png","image/x-png"],gif:["image/gif"],bmp:["image/bmp"],ico:["ico"],mp4:["video/mp4"],rmvb:["audio/x-pn-realaudio"],"3gp":["video/3gpp"],avi:["video/x-msvideo"],asf:["video/x-ms-asf"],dv:["video/x-dv"],mov:["video/quicktime"],mpg4:["video/mp4"],mpeg:["video/mpeg"],mpg:["video/mpeg"],wm:["video/x-ms-wmv"],wmx:["video/x-ms-wmx"],flv:["video/x-flv"],mkv:["video/x-matroska"],mp4a:["audio/mp4"],rm:["audio/x-pn-realaudio"],wmv:["audio/x-ms-wmv"],swf:["application/x-shockwave-flash"],swfl:["application/x-shockwave-flash"],mp3:["audio/mpeg"],ogg:["audio/ogg"],wav:["audio/wav"],wma:["audio/x-ms-wma"],mid:["audio/midi"],ra:["audio/x-pn-realaudio"],ram:["audio/x-pn-realaudio"],rar:["application/x-rar-compressed"],zip:["application/zip","application/x-zip-compressed"],txt:["text/plain"],xls:["application/vnd.ms-excel","application/wps-office.xls"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/wps-office.xlsx"],csv:["text/csv"],pdf:["application/pdf"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},getFormatGroup:n=>{let l=[];return o.isNonEmptyString(n)&&(n.split(",").forEach(t=>{for(const[i,r]of Object.entries(Xe.format))o.isExistValue(r,t.toLocaleLowerCase())&&l.push(i)}),l=o.getArrUnique(l)),l},getIcon:n=>{let l="";return o.isEmpty(n)?l=Xe.icon.default:l=o.isExistJsonKey(Xe.icon,n)?Xe.icon[n]:Xe.icon.default,l},getSuffix:n=>{let l=[];return o.isEmpty(n)||(n.forEach(a=>{const t=Xe.suffix[a.toLocaleLowerCase()];o.isUndefined(t)||(l=l.concat(t))}),o.isEmpty(l)&&(l=n)),l=o.getArrUnique(l),l},getRegexBySuffix:n=>{if(o.isEmpty(n))return null;const l=`\\.(?:${n.join("|")})$`;return new RegExp(l,"i")},getMime:n=>{let l=[];return o.isEmpty(n)||n.forEach(a=>{const t=Xe.mime[a];o.isUndefined(t)||(l=l.concat(t))}),l=o.getArrUnique(l),l},getRegexByMime:n=>{if(o.isEmpty(n))return null;const l=`^(?:${n.join("|").replace(/\//g,"\\/")})$`;return new RegExp(l,"i")},getImageThumbnail:(n,l,a)=>{let t=null;try{const i=document.createElement("canvas");i.width=l,i.height=a,i.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,l,a),t=i.toDataURL("image/gif")}catch{t=null}return t}},Yl=(n,l)=>{let a=n;const t=e.reactive({mime:[],suffix:[],isCheckImgWH:!1});let i=null;const r=B=>{a=o.getJsonMerge(a,B),u()},d=B=>{const I=a.checkMsg;return o.isString(I)&&!o.isEmpty(I)?I:o.isObject(I)&&!o.isEmpty(I[B])?I[B]:l.value[B]},u=()=>{const B=o.isNonEmptyString(a.checkFormat)?Xe.getSuffix(a.checkFormat.split(",")):[],I=Xe.getMime(B),M=!o.isEmpty(a.checkWidth)&&!o.isEmpty(a.checkHeight);t.mime=I,t.suffix=B,t.isCheckImgWH=M},s=B=>{const I=Xe.getIcon(B);return{type:B,icon:I,isImage:B==="img",isVideo:B==="video",isAudio:B==="audio",isTxt:B==="txt",isZip:B==="zip"}},c=(B,I)=>{if(o.isUndefined(i)){i={};for(const[N,b]of Object.entries(Xe.format)){const V=Xe.getSuffix(b),w=Xe.getMime(V),T=Xe.getRegexBySuffix(V),C=Xe.getRegexByMime(w);i[N]={suffix:V,mime:w,regSuffix:T,regMime:C}}}let M="";return Object.keys(i).forEach(N=>{if(M.length===0){const b=i[N];(b.regSuffix&&b.regSuffix.test(B)||I&&b.regMime&&b.regMime.test(I))&&(M=N)}}),s(M)},m=B=>{const I=Xe.getFormatGroup(o.isEmpty(B)?a.checkFormat:B),M=I.length===1?I[0]:"";return s(M)},p=B=>{if(!o.isString(B))return c("");if(B.startsWith("data:")||B.startsWith("blob:")){const M=B.match(/^[a-z]+:([a-zA-Z0-9.+-]+\/[a-zA-Z0-9.+-]+)/);return c("",M?M[1]:"")}const I=B.substring(B.lastIndexOf("/")+1).split("?")[0].split("#")[0];return c(I)},g=(B,I,M,N,b)=>{const V=o.isFinite(M)&&M>0?M:0,w=o.isFinite(N)&&N>0?N:0;let T=b;(T==="height"||T==="contain")&&w===0&&(T="width");let C=1;switch(T){case"height":C=w>0?w/I:1;break;case"contain":C=Math.min(V>0?V/B:1,w>0?w/I:1);break;case"width":default:C=V>0?V/B:1;break}return C>1&&(C=1),{tw:Math.round(B*C),th:Math.round(I*C)}},h=(B,I,M,N)=>new Promise((b,V)=>{const w=document.createElement("img");w.onload=T=>{const C=T.target.width,D=T.target.height,{tw:J,th:ne}=g(C,D,I,M,N),K=T.target.src;b({src:K,w:C,h:D,tw:J,th:ne,isImage:!0})},w.onerror=()=>{V(new Error("fail: temp create image"))},w.src=B}),y=(B,I)=>{const M=o.isEmpty(a.checkWidth)?0:parseInt(a.checkWidth,10),N=o.isEmpty(a.checkHeight)?0:parseInt(a.checkHeight,10);if(!o.isFinite(M)||!o.isFinite(N)||M===0||N===0)return!0;let b=!0;switch(a.checkWHType){case"greater":b=B>=M&&I>=N;break;case"less":b=B<=M&&I<=N;break;case"equal":b=B===M&&I===N;break;default:b=!0;break}return b},E=(B,I)=>new Promise((M,N)=>{if(B instanceof File){const b=new FileReader;b.onload=V=>{h(V.target.result,I.maxWidth,I.maxHeight,I.imgFit).then(w=>{(t.isCheckImgWH?y(w.w,w.h):!0)?M(w):N(new Error(d("checkImageWHLabel")))}).catch(w=>{N(w)})},b.onerror=()=>{N(new Error("fail: new FileReader image onload()"))},b.readAsDataURL(B)}else N(new Error("fail: file is not a File instance"))}),L=async(B,I)=>{let M=[];const N=[],b=[],V=Xe.getRegexBySuffix(t.suffix),w=Xe.getRegexByMime(t.mime),T=ne=>{const K=o.isEmpty(ne)?NaN:parseInt(ne,10);return o.isFinite(K)?K*1024:null},C=T(a.checkMinSize),D=T(a.checkMaxSize),J=B.length;for(let ne=0;ne<J;ne+=1){const K=[],P=B[ne],x={suffix:!1,mime:!1,size:!1},A=P.name;V&&!V.test(A)&&(x.suffix=!0);const f=P.type;!o.isEmpty(f)&&w&&!w.test(f)&&(x.mime=!0),C&&P.size<C&&(x.size=!0),D&&P.size>D&&(x.size=!0),(x.suffix||x.mime)&&K.push(d("checkSuffixMimeLabel")),x.size&&K.push(d("checkSizeLabel"));const S=c(A,f);let k=null;S.isImage&&(k=await E(P,I).catch(v=>{K.push(v.message)})),o.isUndefined(k)&&(k={}),k=o.getJsonMerge(k,S),k.fileName=A,k.file=P,K.length===0?(N.push(P),b.push(k)):J===1?M=K.map(v=>`${d("uploadFile")} ${v}`):M.push(`${A}:${K.join(",")}`)}return new Promise(ne=>{setTimeout(()=>{ne({errorMsg:M,passFiles:N,passFilesInfo:b,original:B})},200)})};return u(),{optBase:t,getTypeByFormat:m,getTypeByUrl:p,createTempImg:h,checkFile:L,setBaseOptions:r}},ql=()=>({setFileInfo:(l,a)=>{const t=a&&a.fileUrl?a.fileUrl:"";if(!o.isString(t))return{name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0};const i=o.isEmpty(t);let r="";i||t.startsWith("blob:")?r=l.fileName:r=t.substr(t.lastIndexOf("/")+1);let d="",u=0,s=0;return l.isImage&&(d=i?l.src:t,u=l.tw||0,s=l.th||0),{name:r,url:t,imgSrc:d,imgWidth:u,imgHeight:s}}}),Xl=()=>{const n=(a,t)=>{window.open(a)};return{downloadHref:n,downloadBlob:a=>{if(!o.isEmpty(a)){const t=a.lastIndexOf("/"),i=a.substring(t+1),r=a.replace(/\\/g,"/"),d=new XMLHttpRequest;d.open("GET",r,!0),d.responseType="blob",d.onload=()=>{if(d.status===200){const u=window.URL||window.webkitURL||window,s=new Blob([d.response]),c=document.createElementNS("http://www.w3.org/1999/xhtml","a");c.href=u.createObjectURL(s),c.download=i,c.click(),setTimeout(()=>URL.revokeObjectURL(c.href),1e3)}else n(a)},d.onerror=()=>{n(a)},d.send()}}}},Od=["name","accept"],_d=["name"],Ad={class:"fileUpload-label"},Ld={key:0,class:"fileUpload-img"},$d={class:"fileUpload-img-container"},Fd=["src","width","height"],Pd={key:0,class:"file-complete-img-msg"},Rd=["title"],Hd=["title"],Ud={key:1,class:"fileUpload-video"},zd=["src"],Jd=["title"],Kd={key:2,class:"fileUpload-file"},Wd=["title"],jd={key:0,class:"fileUpload-load"},Yd=e.defineComponent({name:"ClFileUploadDefault",__name:"Default",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},imgFit:{type:String,default:"width",validator:n=>["width","height","contain"].includes(n)},isServerCallback:Boolean,isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowCompleteMsg:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("fileUpload");const u=e.inject("$FileuploadTop",null);u||we.warn("FileUpload","Default 主题缺少 $FileuploadTop 注入,使用空校验配置");const{setFileInfo:s}=ql(),c=()=>o.getJsonMerge(u?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{optBase:m,getTypeByFormat:p,getTypeByUrl:g,createTempImg:h,checkFile:y,setBaseOptions:E}=Yl(c(),r),{downloadBlob:L,downloadHref:B}=Xl(),I=e.useTemplateRef("refElTopParent"),M=()=>{const W=I.value;if(!W)return{maxWidth:0,maxHeight:0};const j=4,ue=W.clientWidth>0?Math.max(W.clientWidth-j,0):0;let pe=0;if(t.imgFit==="height"||t.imgFit==="contain"){const he=W.parentElement;he&&he.clientHeight>0&&(pe=getComputedStyle(he).height==="auto"?0:Math.max(he.clientHeight-j,0))}return{maxWidth:ue,maxHeight:pe}},N=e.reactive({isImage:!1,isVideo:!1,icon:"",completeMsgTxt:"",isInitFileInput:!0,runOperateType:"init"}),b=e.reactive({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),V={file:null};let w=0,T=null;const C=`fileUpload_${o.getRandom(8)}`,D=e.computed(()=>{let W=t.name;return o.isEmpty(W)&&(W=`fileUpload_${o.getRandom(8)}`),W}),J=e.computed(()=>{let W={"fileUpload-default":!0};return W=o.getJsonMerge(W,me.getClassNameJson(t.className)),W}),ne=e.computed(()=>({"fileUpload-wait":!0,"fileUpload-disabled":t.disabled})),K=e.computed(()=>({"fileUpload-complete":!0,"fileUpload-disabled":t.disabled})),P=W=>{i("onChange",W)},x=W=>{i("onError",W)},A=()=>{i("onRemove")},f=(W,j)=>{i("onPreview",W,j)},S=(W,j)=>{i("onSaveFile",W,j)},k=W=>{N.isImage=W.isImage,N.isVideo=W.isVideo,N.icon=W.icon},v=()=>{const W=p();o.isNonEmptyString(t.defaultIcon)&&(W.icon=t.defaultIcon),k(W)},F=W=>{W!=="load"&&(N.isInitFileInput=!0);let j="";switch(W){case"remove":case"clean":{j="init",v();break}case"fail":{let ue=!0;N.isImage?(!o.isEmpty(b.url)||!o.isEmpty(b.imgSrc))&&(ue=!1):o.isEmpty(b.url)||(ue=!1),j=ue?"init":"complete";break}default:j=W}N.runOperateType=j},_=W=>{const j=b;for(const[ue,pe]of Object.entries(W))o.isUndefined(j[ue])||(j[ue]=pe);V.file=W.file??V.file},O=(W,j)=>{se(),k(W);const ue=s(W,j);_(ue),F("complete")},q=()=>{let W=null;return o.isString(b.url)&&b.url.startsWith("blob:")?W=V.file:o.isEmpty(b.url)?N.isImage&&!o.isEmpty(b.imgSrc)?W=b.imgSrc:W=V.file:W=b.url,o.isUndefined(W)&&(W=""),W},X=W=>{if(W.length>0&&N.runOperateType!=="load"){N.isInitFileInput=!1,F("load"),w+=1;const j={...M(),imgFit:t.imgFit};y(W,j).then(ue=>{if(N.runOperateType==="load")if(ue.passFiles.length>0){const pe=ue.passFiles[0],he=ue.passFilesInfo[0];if(he.isImage)t.isServerCallback?(S(pe,he),G()):(O(he,{}),V.file=pe,P(he.src));else if(t.isServerCallback)S(pe,he),G();else{const ye={};if(he.isVideo){const Ce=URL.createObjectURL(pe);ye.fileUrl=Ce}O(he,ye),V.file=pe,P(pe)}}else F("fail"),ue.errorMsg.length>0&&x(ue.errorMsg)}).catch(()=>{N.runOperateType==="load"&&(F("fail"),x(["文件校验失败,请重试"]))})}},Z=W=>{if(!o.isNonEmptyString(W)){(o.isString(W)||o.isUndefined(W))&&oe();return}const j=++w,ue=g(W);if(N.isImage&&ue.isImage){const{maxWidth:pe,maxHeight:he}=M();h(W,pe,he,t.imgFit).then(ye=>{if(j!==w)return;const Ce=o.getJsonMerge(ye,ue);O(Ce,{fileUrl:W})}).catch(()=>{j===w&&(F("fail"),x(["图片加载失败,请检查图片地址"]))})}else O(ue,{fileUrl:W})},se=()=>{o.isString(b.url)&&b.url.startsWith("blob:")&&URL.revokeObjectURL(b.url)},le=()=>{T&&(clearTimeout(T),T=null)},G=()=>{le(),T=setTimeout(()=>{N.runOperateType==="load"&&(F("fail"),x(["服务端保存超时,请重试"]))},6e4)},oe=()=>{w+=1,V.file=null,_({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),F("init")},R=()=>{if(o.isEmpty(t.value)){v();return}k(g(t.value))},U=()=>{let W=t.defaultHoverTitle;N.isImage&&m.isCheckImgWH&&o.isEmpty(W)&&(W=`${t.checkWidth}x${t.checkHeight}`),N.completeMsgTxt=W},Q=()=>{R(),U(),Z(t.value)};e.onMounted(()=>{e.nextTick(()=>{Q()})}),e.watch(()=>t.value,(W,j)=>{if(W!==j){const ue=q();W!==ue&&(le(),R(),Z(W))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{if(le(),E(c()),R(),U(),N.runOperateType==="load")return;const W=q();t.value===W&&Z(t.value)});const ee=W=>{W.preventDefault(),W.stopPropagation(),!t.disabled&&W.dataTransfer&&X(W.dataTransfer.files)},Y=W=>{t.disabled||X(W.currentTarget.files)},H=()=>{le(),w+=1,se(),V.file=null,_({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),F("remove");const W=document.getElementById(C);W&&(W.value=""),A()},te=W=>{const j=o.isEmpty(b.url)?b.imgSrc:b.url;f(j,"image"),W.preventDefault(),W.stopPropagation()},$=W=>{o.isEmpty(b.url)||f(b.url,"video"),W.preventDefault(),W.stopPropagation()},z=W=>{o.isEmpty(b.url)?B(b.imgSrc,b.name):L(b.url),W.preventDefault(),W.stopPropagation()},ce=W=>{if(o.isString(b.url)&&b.url.startsWith("blob:")){const j=document.createElement("a");j.href=b.url,j.download=b.name,j.click()}else L(b.url);W.preventDefault(),W.stopPropagation()};return l({saveServerCallback:W=>{if(le(),N.runOperateType!=="load")return;if(!W||!W.res||!o.isBoolean(W.res.success)){F("fail"),x(["文件保存失败,请重试"]);return}if(!W.res.success){F("fail"),x(["文件保存失败,请重试"]);return}if(!W.req){F("fail"),x(["文件保存失败,请重试"]);return}let j="";if(o.isString(W.res.fileUrl)?j=W.res.fileUrl:o.isArray(W.res.fileUrl)&&W.res.fileUrl.length>0&&o.isString(W.res.fileUrl[0])&&(j=W.res.fileUrl[0]),o.isEmpty(j)){V.file=null,_({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),F("init");return}O(W.req,{fileUrl:j}),P(j)},getValue:()=>q(),cleanReduction:()=>{le(),w+=1,se(),V.file=null,_({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),F("clean")}}),e.onBeforeUnmount(()=>{le(),se()}),(W,j)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(J.value),ref_key:"refElTopParent",ref:I},[e.createElementVNode("div",{class:"fileUpload-default-container",onDrop:ee,onDragover:j[0]||(j[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("label",{for:C},[N.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:C,name:D.value,onChange:Y,accept:e.unref(m).mime.join(",")},null,40,Od)):(e.openBlock(),e.createElementBlock("input",{key:1,id:C,name:D.value,style:{display:"none !important"}},null,8,_d)),N.runOperateType==="init"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(ne.value)},[e.createVNode(ke,{name:N.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",Ad,[e.renderSlot(W.$slots,"label")])],2)):N.runOperateType==="complete"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(K.value)},[N.isImage?(e.openBlock(),e.createElementBlock("span",Ld,[e.createElementVNode("span",$d,[e.createElementVNode("img",{src:b.imgSrc,width:b.imgWidth,height:b.imgHeight},null,8,Fd)]),n.isShowCompleteMsg?(e.openBlock(),e.createElementBlock("span",Pd,e.toDisplayString(N.completeMsgTxt),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"preview-icon",title:e.unref(r).common.preview,onClick:e.withModifiers(te,["stop"])},[e.createVNode(ke,{name:"search-plus"})],8,Rd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:4,class:"download-icon",title:e.unref(r).common.download,onClick:e.withModifiers(z,["stop"])},[e.createVNode(ke,{name:"download"})],8,Hd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])):N.isVideo?(e.openBlock(),e.createElementBlock("span",Ud,[e.createElementVNode("video",{src:b.url},null,8,zd),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers($,["stop"])},[e.createVNode(ke,{name:"play"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"download-icon",title:e.unref(r).common.download,onClick:e.withModifiers(ce,["stop"])},[e.createVNode(ke,{name:"download"})],8,Jd)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock("span",Kd,[e.createVNode(ke,{name:N.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(b.name),1)])),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)):(e.openBlock(),e.createElementBlock("a",{key:3,class:"file-complete-remove",href:"javascript:",title:e.unref(r).common.delete,onClick:e.withModifiers(H,["stop"])},[e.createVNode(ke,{name:"close"})],8,Wd))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))])],32),N.runOperateType==="load"?(e.openBlock(),e.createElementBlock("div",jd,[e.createVNode(ct,{theme:"circleBubble",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))}}),qd=["id","name","multiple","accept"],Xd=["id","name","disabled","accept"],Gd=["for"],Qd={key:0,class:"fileUpload-list"},Zd={key:0,class:"fileUpload-item-icon fileUpload-item-img"},em=["src"],tm=["title","onClick"],nm={key:1,class:"fileUpload-item-icon fileUpload-item-video"},om=["src"],am=["onClick"],lm={class:"fileUpload-item-name"},im={class:"fileUpload-item-operate"},sm=["title","onClick"],rm=["title","onClick"],cm=e.defineComponent({name:"ClFileUploadButton",__name:"Button",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},isMultiple:Boolean,buttonClass:String,buttonLabel:String,buttonIcon:{type:String,default:""},buttonColor:{type:String,default:"default"},checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},isServerCallback:Boolean,isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=`fileupload-${o.getRandom(5)}`,{optPageLanguage:d,getPageLanguage:u}=Le();u("fileUpload");const s=e.inject("$FileuploadTop",null);s||we.warn("FileUpload","Button 主题缺少 $FileuploadTop 注入,使用空校验配置");const c=()=>o.getJsonMerge(s?.getFileCheckInfo()??{},{checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize}),{setFileInfo:m}=ql(),{optBase:p,getTypeByUrl:g,checkFile:h,setBaseOptions:y}=Yl(c(),d),{downloadBlob:E,downloadHref:L}=Xl(),B=e.useTemplateRef("refElButton"),I=e.useTemplateRef("refElLabel"),M=o.getRandom(8),N=e.reactive({elFileId:`btnFile${M}`,isInitFileInput:!0}),b=e.ref([]),V=e.ref([]);let w=null,T=null,C=null;const D=e.computed(()=>{let Y=t.name;return o.isEmpty(Y)&&(Y=`fileUpload_${o.getRandom(8)}`),Y}),J=e.computed(()=>{let Y={"fileUpload-button":!0};return Y=o.getJsonMerge(Y,me.getClassNameJson(t.className)),Y}),ne=(Y,H)=>{i("onChange",Y,H)},K=Y=>{i("onError",Y)},P=()=>{i("onRemove")},x=(Y,H,te)=>{i("onPreview",Y,H,te)},A=(Y,H)=>{i("onSaveFile",Y,H)},f=()=>{S(),w=setTimeout(()=>{w=null,N.isInitFileInput||(v("fail"),K(["服务端保存超时,请重试"]))},6e4)},S=()=>{w&&(clearTimeout(w),w=null)},k=()=>{b.value.forEach(Y=>{o.isString(Y.url)&&Y.url.startsWith("blob:")&&URL.revokeObjectURL(Y.url)})},v=Y=>{switch(Y){case"load":t.isShowUploadIng&&B.value?.loadStart();break;case"fail":case"complete":t.isShowUploadIng&&B.value?.loadStop();break}N.isInitFileInput=Y!=="load"},F=(Y,H)=>{t.isMultiple||(k(),b.value=[]);const te=[],$=[];b.value.forEach(z=>{te.push(z),$.push(z.rId)});for(let z=0;z<Y.length;z++){let ce=H.length>z?{fileUrl:H[z]}:{};o.isEmpty(ce.fileUrl)&&Y[z].isVideo&&Y[z].file&&(ce={fileUrl:URL.createObjectURL(Y[z].file)});let de=m(Y[z],ce);de.rId=o.getRandom(9),de=o.getJsonMerge(Y[z],de),te.push(de),$.push(de.rId)}b.value=te,v("complete"),e.nextTick(()=>{V.value=$})},_=()=>{const Y=[];return b.value.forEach(H=>{let te=null;o.isString(H.url)&&H.url.startsWith("blob:")?te=H.file:o.isEmpty(H.url)?H.isImage&&!o.isEmpty(H.imgSrc)?te=H.imgSrc:te=H.file:te=H.url,o.isUndefined(te)||Y.push(te)}),Y.length===0?"":t.isMultiple?Y:Y[0]},O=Y=>{if(o.isArray(Y)){k(),b.value=[];const $=[],z=[];Y.forEach(ce=>{if(o.isNonEmptyString(ce)){const de=g(ce);$.push(de),z.push(ce)}}),F($,z);return}if(!o.isNonEmptyString(Y)){o.isString(Y)&&q();return}k(),b.value=[];const H=[],te=[];Y.split(",").filter($=>o.isNonEmptyString($)).forEach($=>{const z=g($);H.push(z),te.push($)}),F(H,te)},q=()=>{k(),v("init"),b.value=[]},X=()=>{O(t.value)};e.onMounted(()=>{e.nextTick(()=>{X()})}),e.onBeforeUnmount(()=>{S(),T&&(clearTimeout(T),T=null),k()}),e.watch(()=>t.value,(Y,H)=>{if(Y!==H){const te=_();Y!==te&&(S(),O(Y))}}),e.watch([()=>t.checkFormat,()=>t.checkWidth,()=>t.checkHeight,()=>t.checkWHType,()=>t.checkMinSize,()=>t.checkMaxSize],()=>{N.isInitFileInput&&S(),y(c())});const Z=Y=>{t.disabled||N.isInitFileInput&&Y.currentTarget.files.length>0&&(v("load"),h(Y.currentTarget.files,{}).then(H=>{if(!N.isInitFileInput){if(H.passFiles.length>0)if(t.isServerCallback){const te=t.isMultiple?H.passFiles:H.passFiles[0],$=t.isMultiple?H.passFilesInfo:H.passFilesInfo[0];A(te,$),f()}else t.isMultiple?(F(H.passFilesInfo,[]),ne(H.passFiles,H.passFilesInfo)):(F(H.passFilesInfo,[]),ne(H.passFiles[0],H.passFilesInfo[0]));else H.errorMsg.length===0&&(v("fail"),K(["文件校验失败,请重试"]));H.errorMsg.length>0&&(K(H.errorMsg),H.passFiles.length===0&&v("fail"))}}).catch(()=>{N.isInitFileInput||(v("fail"),K(["文件校验失败,请重试"]))}))},se=(Y,H)=>{const te=o.isEmpty(Y.url)?Y.src:Y.url;x(te,"image",H)},le=(Y,H)=>{o.isEmpty(Y.url)||x(Y.url,"video",H)},G=Y=>{if(C===Y)return;C=Y,S(),N.isInitFileInput||v("complete");const H=b.value.find(ce=>ce.rId===Y);H&&o.isString(H.url)&&H.url.startsWith("blob:")&&URL.revokeObjectURL(H.url);const te=[],$=[];b.value.forEach(ce=>{ce.rId!==Y&&(te.push(ce),$.push(ce.rId))}),V.value=$;const z=document.getElementById(N.elFileId);z&&(z.value=""),e.nextTick(()=>{te.length>0?(b.value=te,C=null,P()):T=setTimeout(()=>{T=null,b.value=b.value.filter(ce=>ce.rId!==Y),C=null,P()},500)})},oe=Y=>{if(Y.isImage&&o.isEmpty(Y.url))L(Y.imgSrc,Y.name);else if(o.isString(Y.url)&&Y.url.startsWith("blob:")){const H=document.createElement("a");H.href=Y.url,H.download=Y.name,H.click()}else if(o.isEmpty(Y.url)&&Y.file){const H=URL.createObjectURL(Y.file),te=document.createElement("a");te.href=H,te.download=Y.name,te.click(),setTimeout(()=>{URL.revokeObjectURL(H)},1e3)}else E(Y.url)},R=()=>{I.value?.click()};return l({saveServerCallback:Y=>{if(S(),!N.isInitFileInput){if(o.isUndefined(Y)||o.isUndefined(Y.res)||!o.isBoolean(Y.res.success)||o.isUndefined(Y.req)){v("fail"),K(["文件保存失败,请重试"]);return}if(Y.res.success){let H=[];const te=[];if(o.isNonEmptyString(Y.res.fileUrl)?(H.push(Y.res.fileUrl),te.push(0)):o.isArray(Y.res.fileUrl)&&Y.res.fileUrl.forEach((ie,ae)=>{o.isNonEmptyString(ie)&&(H.push(ie),te.push(ae))}),H.length===0){v("complete");return}const $=t.isMultiple?Y.req:[Y.req];let z=[],ce=[];if(!t.isMultiple)z=H,ce=$;else{const ie=b.value.map(ae=>ae.url).filter(ae=>o.isNonEmptyString(ae));H.forEach((ae,W)=>{const j=te[W];ie.indexOf(ae)>-1||o.isUndefined($[j])||(ie.push(ae),z.push(ae),ce.push($[j]))})}if(z.length===0){v("complete");return}F(ce,z);const de=t.isMultiple?z:z[0];ne(de)}else v("fail"),K(["文件保存失败,请重试"])}},getValue:()=>_(),cleanReduction:()=>{S(),q()}}),(Y,H)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(J.value)},[N.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:N.elFileId,name:D.value,multiple:n.isMultiple,accept:e.unref(p).mime.join(","),onChange:Z},null,40,qd)):(e.openBlock(),e.createElementBlock("input",{key:1,id:N.elFileId,name:D.value,disabled:n.disabled,accept:e.unref(p).mime.join(","),style:{display:"none !important"},onChange:Z},null,40,Xd)),e.createElementVNode("label",{ref_key:"refElLabel",ref:I,for:N.elFileId},[e.createVNode(et,{ref_key:"refElButton",ref:B,className:n.buttonClass,isShowBackDrop:!0,disabled:n.disabled,label:n.buttonLabel||e.unref(d).common.upload,iconName:n.buttonIcon,color:n.buttonColor,onOnClick:R},null,8,["className","disabled","label","iconName","color"])],8,Gd)],2),e.renderSlot(Y.$slots,"label"),b.value.length>0&&n.isShowUploadResult?(e.openBlock(),e.createElementBlock("ul",Qd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(te,$)=>(e.openBlock(),e.createBlock(e.Transition,{key:`${te.rId}-${$}`,name:"fileUploadButton","enter-active-class":"fileupload-anim-in","leave-active-class":"fileupload-anim-out"},{default:e.withCtx(()=>[V.value.indexOf(te.rId)>-1?(e.openBlock(),e.createElementBlock("li",{key:`${r}-${te.rId}-${$}`,class:"fileUpload-item"},[te.isImage?(e.openBlock(),e.createElementBlock("span",Zd,[e.createElementVNode("img",{src:te.imgSrc},null,8,em),n.isShowPreview?(e.openBlock(),e.createElementBlock("i",{key:0,class:"preview-icon",title:e.unref(d).common.preview,onClick:e.withModifiers(z=>se(te,$),["stop"])},[e.createVNode(ke,{name:"search-plus"})],8,tm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):te.isVideo?(e.openBlock(),e.createElementBlock("span",nm,[e.createElementVNode("video",{src:te.url},null,8,om),n.isShowPreview?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(z=>le(te,$),["stop"])},[e.createVNode(ke,{name:"play"})],8,am)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createBlock(ke,{key:2,name:te.icon,class:"fileUpload-item-icon"},null,8,["name"])),e.createElementVNode("span",lm,e.toDisplayString(te.name),1),e.createElementVNode("span",im,[n.isShowDownload?(e.openBlock(),e.createElementBlock("i",{key:0,class:"download-icon",title:e.unref(d).common.download,onClick:e.withModifiers(z=>oe(te),["stop"])},[e.createVNode(ke,{name:"download"})],8,sm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)):(e.openBlock(),e.createElementBlock("a",{key:2,class:"file-complete-remove",href:"javascript:",title:e.unref(d).common.delete,onClick:e.withModifiers(z=>G(te.rId),["stop"])},[e.createVNode(ke,{name:"close"})],8,rm))])])):e.createCommentVNode("",!0)]),_:2},1024))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),um=["id"],dm={key:0,class:"cl-plaintext-value"},mm=["src","alt"],pm=["src"],fm={key:0},oa=e.defineComponent({name:"ClFileUpload",__name:"Index",props:{id:String,name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:n=>["default","button"].includes(n)},isMultiple:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,isShowCompleteMsg:{type:Boolean,default:!0},buttonClass:String,buttonLabel:String,buttonIcon:String,buttonColor:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal"},imgFit:{type:String,default:"width"},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},serverFileCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onRemove","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$ClGlobals",null),d=e.useAttrs(),u=t.id,s=e.useTemplateRef("refElFileDefault"),c=e.useTemplateRef("refElFileButton");let m=0,p=0;const g=e.computed(()=>o.isFunction(t.serverFileCallback)),h=["jpg","jpeg","png","gif","webp","bmp","svg"],y=["mp4","webm","ogg","ogv","mov","avi","mkv"],E=A=>{const f=A.split("?")[0].split("#")[0],S=f.split("/"),k=S.length>0?S[S.length-1]:f;return o.isEmpty(k)?A:decodeURIComponent(k)},L=e.computed(()=>{const A=t.value,f=Array.isArray(A)?A:o.isEmpty(A)?[]:[A],S=[];return f.forEach(k=>{if(o.isString(k)){o.isNonEmptyString(k)&&S.push({url:k,name:E(k),type:"file"});return}k&&o.isNonEmptyString(k.name)&&S.push({url:"",name:k.name,type:"file"})}),S.map(k=>{if(o.isEmpty(k.url))return k;const v=k.name.lastIndexOf("."),F=v>-1?k.name.slice(v+1).toLowerCase():"";let _="file";return h.indexOf(F)>-1?_="image":y.indexOf(F)>-1&&(_="video"),{...k,type:_}})}),B=e.computed(()=>L.value.filter(A=>A.type!=="file")),I=e.computed(()=>{const A=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return L.value.filter(f=>f.type==="file").map(f=>f.name).join(A)}),M=e.computed(()=>B.value.length>0?I.value:Je.getPlaintextOutText("fileUpload",t.plaintextEmptyText,I.value)),N=e.computed(()=>{let A={"panel-file-upload":!0};return A=o.getJsonMerge(A,me.getClassNameJson(t.className)),A}),b=(A,f,S)=>{i("update:value",A),i("update:modelValue",A),i("onChange",f,S)},V=()=>{i("onRemove")},w=()=>{let A=null;switch(t.theme){case"default":A=s.value?.getValue();break;case"button":A=c.value?.getValue();break}return A},T=(A,f)=>{switch(A){case"default":s.value?.saveServerCallback(f);break;case"button":c.value?.saveServerCallback(f);break}},C=(A,f)=>{const S=w(),k=g.value?S:A;b(S,k,f)},D=A=>{o.isArray(A)&&i("onError",A)},J=()=>{p+=1,V();const A=w();b(A,A)},ne=async(A,f,S)=>{const k=r?.preview;k&&await k.show({type:f,src:A,showIndex:S??0})},K=async(A,f)=>{const S=t.theme,k=++m,v=p;let F=!0;if(t.serverFileCallback)try{const O=!t.isMultiple&&o.isObject(f)&&o.isBoolean(f.isImage)?f.isImage:!1,q=me.getElementData(d);F=await t.serverFileCallback(A,O,q)}catch{k===m&&p===v&&t.theme===S&&T(S,{req:f,res:{success:!1}});return}let _={};if(o.isBoolean(F)?_.success=F:o.isUndefined(F)?_.success=!0:o.isString(F)||o.isArray(F)?(_.success=!0,_.fileUrl=F):o.isObject(F)?_=F:_.success=!1,t.theme!==S){i("onError",["保存期间主题已切换,本次保存结果未写入"]);return}k!==m||p!==v||T(S,{req:f,res:_})};return e.provide("$FileuploadTop",e.reactive({getFileCheckInfo:()=>({checkFormat:t.checkFormat,checkWidth:t.checkWidth,checkHeight:t.checkHeight,checkWHType:t.checkWHType,checkMinSize:t.checkMinSize,checkMaxSize:t.checkMaxSize})})),l({getValue:()=>w(),cleanReduction:()=>{switch(t.theme){case"default":s.value?.cleanReduction();break;case"button":c.value?.cleanReduction();break}b("","")}}),(A,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(N.value),id:e.unref(u)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",dm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(S,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`plain-${k}`},[S.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,src:S.url,alt:S.name,class:"cl-plaintext-media"},null,8,mm)):(e.openBlock(),e.createElementBlock("video",{key:1,src:S.url,controls:"",class:"cl-plaintext-media"},null,8,pm))],64))),128)),M.value?(e.openBlock(),e.createElementBlock("span",fm,e.toDisplayString(M.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),!n.isPlaintext&&n.theme==="button"?(e.openBlock(),e.createBlock(cm,{key:2,ref_key:"refElFileButton",ref:c,value:n.value,name:n.name,disabled:n.disabled,isMultiple:n.isMultiple,buttonClass:n.buttonClass,buttonLabel:n.buttonLabel,buttonIcon:n.buttonIcon,buttonColor:n.buttonColor,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,isServerCallback:g.value,isShowUploadResult:n.isShowUploadResult,isShowUploadIng:n.isShowUploadIng,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:C,onOnError:D,onOnRemove:J,onOnPreview:ne,onOnSaveFile:K},{label:e.withCtx(()=>[e.renderSlot(A.$slots,"label")]),_:3},8,["value","name","disabled","isMultiple","buttonClass","buttonLabel","buttonIcon","buttonColor","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","isServerCallback","isShowUploadResult","isShowUploadIng","isShowPreview","isShowDownload"])):!n.isPlaintext&&n.theme==="default"?(e.openBlock(),e.createBlock(Yd,{key:3,ref_key:"refElFileDefault",ref:s,value:n.value,name:n.name,disabled:n.disabled,defaultHoverTitle:n.defaultHoverTitle,defaultIcon:n.defaultIcon,isShowCompleteMsg:n.isShowCompleteMsg,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,imgFit:n.imgFit,isServerCallback:g.value,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:C,onOnError:D,onOnRemove:J,onOnPreview:ne,onOnSaveFile:K},{label:e.withCtx(()=>[e.renderSlot(A.$slots,"label")]),_:3},8,["value","name","disabled","defaultHoverTitle","defaultIcon","isShowCompleteMsg","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","imgFit","isServerCallback","isShowPreview","isShowDownload"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,um))}}),hm=["id"],gm={class:"previewExample-image-icon"},vm={class:"previewExample-video-img previewExample-image"},ym=["onClick"],km={key:3,class:"previewExample-label-msg"},Sm={key:5,class:"previewExample-totalCount"},aa=e.defineComponent({name:"ClPreviewExample",__name:"Index",props:{id:String,className:String,classContainer:String,classItem:String,type:{type:String,default:"image",validator:n=>["image","video"].includes(n)},width:{type:[Number,String],default:"auto"},height:{type:Number,required:!0},isWidthFull:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},label:String,previewIconSize:{type:String,default:"large"},isShowLoading:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isShowDelete:{type:Boolean,default:!1},showNum:{type:Number,default:-1},srcValueKey:{type:String,default:"value"},isShowCopy:{type:Boolean,default:!0},isClickImagePreview:{type:Boolean,default:!1},previewCallback:Function},emits:["onDelete"],setup(n,{emit:l}){const a=n,t=l,i=e.inject("$ClGlobals",null),r=`previewexample-${o.getRandom(5)}`,d=a.id,u=e.reactive({totalCount:-1}),s=e.ref([]),c=e.computed(()=>{const{width:b}=a;let V=!1;return(o.isEmpty(b)||typeof b=="string"&&b==="auto"||typeof b=="number"&&b<=0)&&(V=!0),V}),m=e.computed(()=>{let b={"panel-preview-example":!0,"previewExample-width-default":a.isWidthFull,"previewExample-width-auto":!a.isWidthFull};return b=o.getJsonMerge(b,me.getClassNameJson(a.className)),b}),p=e.computed(()=>{let b={"previewExample-container":!0};return b=o.getJsonMerge(b,me.getClassNameJson(a.classContainer)),b}),g=e.computed(()=>{const{type:b,previewIconSize:V}=a;let w={"previewExample-item":!0};return w[`previewExample-${b}`]=!0,w[`previewExample-iconSize-${V}`]=!0,w=o.getJsonMerge(w,me.getClassNameJson(a.classItem)),w}),h=e.computed(()=>{const b={height:`${a.height}px`};if(!c.value){let V=a.width.toString();V.indexOf("%")===-1&&(V=`${a.width}px`),b.width=V}return b}),y=b=>{t("onDelete",b)},E=()=>{const{list:b,showNum:V,srcValueKey:w}=a;let T=o.getListClone(b),C=b.length;V>0&&b.length>=V&&(C=V);const D=[];T.forEach((J,ne)=>{if(!o.isEmpty(J)&&ne+1<=C)if(o.isString(J))D.push({value:J});else{const K=o.isExistJsonKey(J,w)?J[w]:J.value;D.push({...J,value:K})}}),T=D,u.totalCount=b.length,s.value=T},L=()=>{E()},B=b=>{const V={};return o.isEmpty(b.id)||(V["data-id"]=b.id),o.isEmpty(b.ranId)||(V["data-ran-id"]=b.ranId),V};e.onMounted(()=>{e.nextTick(()=>{L()})}),e.watch(()=>a.list,()=>{E()},{deep:!0});const I=(b,V)=>{a.isClickImagePreview&&M(b,V,"image")},M=(b,V,w)=>{try{if(a.previewCallback)a.previewCallback(w,b,V);else{if(!i||o.isEmpty(i.preview))return;const{list:T}=a;let C;T.length===1?C=b.value:C=T.map(D=>o.isString(D)?D:D.value),i.preview.show({type:w,src:C,showIndex:V,isShowCopy:a.isShowCopy})}}catch{}},N=b=>{y(b)};return(b,V)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(m.value)},[e.createElementVNode("div",{class:e.normalizeClass(p.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(w,T)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:`${r}-${T}`,class:g.value,style:h.value},{ref_for:!0},B(w)),[n.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Wn,{src:w.value,class:e.normalizeClass({"cursor-pointer":n.isClickImagePreview}),onClick:e.withModifiers(C=>I(w,T),["stop"])},null,8,["src","class","onClick"]),e.createElementVNode("div",gm,[e.createVNode(ke,{title:"预览",name:"search","aria-label":"预览",onClick:e.withModifiers(C=>M(w,T,"image"),["stop"])},null,8,["onClick"]),n.isShowDelete?(e.openBlock(),e.createBlock(ke,{key:0,title:"删除",name:"close","aria-label":"删除",onClick:e.withModifiers(C=>N(T),["stop"])},null,8,["onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],64)):n.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",vm,[w.imgUrl&&w.imgUrl.length>0?(e.openBlock(),e.createBlock(Wn,{key:0,src:w.imgUrl},null,8,["src"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"previewExample-video-icon",onClick:e.withModifiers(C=>M(w,T,"video"),["stop"])},[e.createVNode(ke,{name:"play","aria-label":"播放"})],8,ym)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),n.label&&n.label.length>0||w.label&&w.label.length>0?(e.openBlock(),e.createElementBlock("div",km,e.toDisplayString(n.label&&n.label.length>0?n.label:w.label),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)),n.showNum>-1&&T===s.value.length-1&&u.totalCount>n.showNum?(e.openBlock(),e.createElementBlock("div",Sm,[e.createElementVNode("span",null,"共"+e.toDisplayString(u.totalCount)+e.toDisplayString(n.type==="image"?"张":"个"),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[],64)),e.renderSlot(b.$slots,"extend",{data:w,inx:T})],16))),128)),n.isShowLoading&&n.isLoading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`previewExample-${n.type}`]),style:e.normalizeStyle(h.value)},[e.createVNode(ct,{theme:"circleNotch",size:"large"})],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)],10,hm))}}),wm=["id"],Em={class:"cropperPreview-box-flex"},Gl=e.defineComponent({name:"ClCropperPreview",__name:"Index",props:{id:String,className:String,previewImageUrl:String,coverImageUrl:String,width:{type:Number,default:200},height:{type:Number,default:200},widthPreview:Number,heightPreview:Number,previewShape:{type:String,default:"square"},isCenterBox:{type:Boolean,default:!1},isShowUploadBtn:{type:Boolean,default:!0},getCropperImageUrl:Function,saveImageBase64:Function},emits:{onInitCoverImage:()=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElCropper"),u=e.reactive({isEmptyPreviewUrl:!1,isEmptyCoverUrl:!1,isAgainCropper:!1,coverImageUrlOriginal:""});let s=!1;const c=e.computed(()=>{const{width:w,widthPreview:T}=t;return o.isFinite(T)?T:w}),m=e.computed(()=>{const{height:w,heightPreview:T}=t;return o.isFinite(T)?T:w}),p=e.computed(()=>({"panel-cropper-preview":!0,...me.getClassNameJson(t.className)})),g=()=>{const{previewImageUrl:w}=t,T=o.isEmpty(w);u.isEmptyPreviewUrl=T,u.isAgainCropper=T},h=()=>{const{coverImageUrl:w}=t,T=o.isEmpty(w);u.isEmptyCoverUrl=T,u.coverImageUrlOriginal=T?"":w},y=()=>{const{width:w,height:T}=t;(w<=0||T<=0)&&we.warn("ClCropperPreview","裁切区域宽高必须大于 0,当前值 width="+w+" height="+T)},E=()=>{g(),h(),y()};e.onMounted(()=>{e.nextTick(()=>{E()})}),e.watch(()=>t.previewImageUrl,()=>{g()}),e.watch(()=>t.coverImageUrl,()=>{h()});const L=w=>{w===!0&&i("onInitCoverImage")},B=(w,T)=>{if(!s){if(!(w instanceof File)){i("onError","文件读取失败,请重新选择图片");return}s=!0,d.value?.loadingStart(),o.getBase64ByFile([w]).then(C=>{const D=o.isNonEmptyString(C);u.isAgainCropper=!0,D?(u.coverImageUrlOriginal=C,u.isEmptyCoverUrl=!1):(u.isEmptyCoverUrl=o.isEmpty(u.coverImageUrlOriginal),i("onError","文件读取失败,请重新选择图片")),d.value?.loadingStop(),s=!1}).catch(C=>{d.value?.loadingStop(),s=!1,i("onError","文件读取失败,请重新选择图片")})}},I=()=>{u.isAgainCropper=!1},M=()=>{u.isAgainCropper=!0};return l({getValue:async()=>{let w="";try{w=d.value?String(await d.value.getImageBase64()||""):""}catch(T){we.error("ClCropperPreview","getValue 获取裁切图片失败:",T)}return w},getCropperUrl:async w=>{let T="";try{if(d.value&&o.isFunction(t.getCropperImageUrl))T=await t.getCropperImageUrl(d.value,w);else{const{previewImageUrl:C,coverImageUrl:D}=t;T=o.isNonEmptyString(C)?C:D||""}}catch(C){we.error("ClCropperPreview","getCropperUrl 调用失败:",C)}return T},getCoverUrlOriginal:async w=>{let T="";try{const{coverImageUrlOriginal:C}=u;if(C.startsWith("data:")&&o.isFunction(t.saveImageBase64)){const D=await t.saveImageBase64(C,w);T=D&&D.success?D.imageUrl:""}else/^(http|https):\/\/[^\s]+$/.test(C)&&(T=C)}catch(C){we.error("ClCropperPreview","getCoverUrlOriginal 调用失败:",C)}return T}}),(w,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(r)},[e.createElementVNode("div",Em,[u.isEmptyPreviewUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.isAgainCropper?(e.openBlock(),e.createBlock(et,{key:0,iconName:"reply",label:"返回",color:"transparent",onOnClick:I})):(e.openBlock(),e.createBlock(et,{key:1,iconName:"cropper",label:"重新裁切",color:"transparent",onOnClick:M}))],64)),n.isShowUploadBtn&&(u.isAgainCropper||u.isEmptyCoverUrl&&u.isEmptyPreviewUrl)?(e.openBlock(),e.createBlock(oa,{key:2,theme:"button",checkFormat:"jpg,png",buttonIcon:"upload-cloud",buttonColor:"white",buttonLabel:"选择图片",isShowUploadResult:!1,isShowUploadIng:!1,onOnChange:B})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),!u.isEmptyPreviewUrl&&!u.isAgainCropper?(e.openBlock(),e.createBlock(aa,{key:0,type:"image",list:[{value:n.previewImageUrl||"",imgUrl:"",label:""}],width:c.value,height:m.value},null,8,["list","width","height"])):u.isAgainCropper&&(!u.isEmptyPreviewUrl||!u.isEmptyCoverUrl)?(e.openBlock(),e.createBlock(na,{key:1,ref_key:"refElCropper",ref:d,previewShape:n.previewShape,isCenterBox:n.isCenterBox,src:u.coverImageUrlOriginal,width:n.width,height:n.height,isModal:!1,isShowUpload:!1,onOnImgLoad:L},null,8,["previewShape","isCenterBox","src","width","height"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,wm))}}),Cm={key:0,class:"dropdownLayer-text-arrow"},bm=["title"],xm={key:0,class:"dropdownLayer-placeholder"},Bm=["innerHTML"],Im={key:2},Dm={key:4,class:"dropdownLayer-text-arrow"},kn=e.defineComponent({name:"ClDropdownlayerList",__name:"List",props:{id:String,classParent:[String,Object],classText:String,classDropDown:String,placeholder:String,isDisabled:{type:Boolean,default:!1},transitionEnter:{type:String,default:"zoomInTop"},transitionLeave:{type:String,default:"zoomOutTop"},isClear:{type:Boolean,default:!1},textLabel:{type:String,default:""},textArrowDirection:{type:String,default:"right",validator:n=>["left","right"].includes(n)},dropdownArrowPos:{type:String,default:"left"},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},appendContainer:{type:String,default:""},appendFollowWidth:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:{onChangeOpen:n=>!0,onClear:()=>!0,onChangePosition:n=>!0,onOpenComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>o.isHtml(t.textLabel)),s=e.computed(()=>{const{textLabel:N}=t;return o.isString(N)?o.isHtml(N)?o.removeHTMLTags(N):N:""}),c=e.computed(()=>{let N={"dropdownLayer-theme-list":!0,"panel-dropdownlayerlist":!0};return N=o.getJsonMerge(N,me.getClassNameJson(t.classParent)),N}),m=e.computed(()=>{let N={"dropdownLayer-dropdown-theme-list":!0};return N=o.getJsonMerge(N,me.getClassNameJson(t.classDropDown)),N}),p=e.computed(()=>({"dropdownLayer-text-container":!0,"arrow-pos-left":t.textArrowDirection==="left"})),g=N=>{N&&I(),i("onChangeOpen",N)},h=N=>{i("onChangePosition",N)},y=()=>{i("onClear")},E=()=>{i("onOpenComplete")},L=N=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(N)},B=()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,calculationPosition 调用已忽略");return}return d.value.calculationPosition()},I=()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,initCompleteOpen 调用已忽略");return}d.value.initCompleteOpen()};return l({setOpen:L,calculationPosition:B,initCompleteOpen:I,checkIsShowOpen:()=>{if(!d.value){we.warn("DropdownLayer","子组件尚未挂载,checkIsShowOpen 调用已忽略");return}return d.value.getIsShowOpen()}}),(N,b)=>(e.openBlock(),e.createBlock(Kl,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:c.value,classText:n.classText,classDropDown:m.value,isDisabled:n.isDisabled,dropdownArrowPos:n.dropdownArrowPos,isUseDropdownArrow:n.isUseDropdownArrow,isCloseDestroy:n.isCloseDestroy,isInitDelayComplete:!0,appendContainer:n.appendContainer,appendFollowWidth:n.appendFollowWidth,onOpenBeforeCallback:n.onOpenBeforeCallback,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,onOnChangeOpen:g,onOnChangePosition:h,onOnOpenComplete:E},{labelText:e.withCtx(()=>[N.$slots.labelCustom?e.renderSlot(N.$slots,"labelCustom",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[n.textArrowDirection==="left"?(e.openBlock(),e.createElementBlock("div",Cm,[e.createVNode(ke,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-text-render",title:s.value},[n.textLabel?u.value?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:n.textLabel},null,8,Bm)):(e.openBlock(),e.createElementBlock("span",Im,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("span",xm,e.toDisplayString(n.placeholder),1))],8,bm),!n.isDisabled&&n.isClear&&n.textLabel?(e.openBlock(),e.createBlock(ke,{key:2,class:"dropdownLayer-text-clear",name:"close-circle-fill",onClick:e.withModifiers(y,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.renderSlot(N.$slots,"textExtend"),n.textArrowDirection==="right"?(e.openBlock(),e.createElementBlock("div",Dm,[e.createVNode(ke,{name:"angle-down"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2))]),dropdown:e.withCtx(()=>[e.renderSlot(N.$slots,"dropdown"),e.renderSlot(N.$slots,"dropdownExtend")]),_:3},8,["id","classParent","classText","classDropDown","isDisabled","dropdownArrowPos","isUseDropdownArrow","isCloseDestroy","appendContainer","appendFollowWidth","onOpenBeforeCallback","transitionEnter","transitionLeave"]))}}),Tm=["id"],Nm={class:"table-base"},Vm={class:"time-head time-head-day",colspan:"7"},Mm={class:"time-prev"},Om=["title"],_m=["title"],Am={class:"time-next"},Lm=["title"],$m=["title"],Fm=["aria-disabled","onClick","onKeydown","onMouseover"],Pm=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:n=>!0,onChangeType:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("dataTime");const d=e.inject("$DateTimeTop"),u=e.inject("$DateTimeTopBase"),s=e.inject("$DateTimeBase");(!d||!u||!s)&&we.warn("ClCalendarsDays","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=`calendarsDays-${o.getRandom(5)}`,m=d?.elId?`${d.elId}-calendarsDays-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let A={"panel-calendarsdays":!0};return A=o.getJsonMerge(A,me.getClassNameJson(a.className)),A}),g=e.reactive({isPrevYear:!1,isPrevMonth:!1,titleYear:"",titleMonth:"",isNextYear:!1,isNextMonth:!1}),h=e.ref([]),y=e.ref([]),E={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},L=()=>{if(!E.viewDate)return;const A=E.viewDate.year(),S=E.viewDate.localeData().monthsShort(E.viewDate),k=E.viewDate.clone().subtract(1,"years").endOf("month"),v=s.checkDataMinMax(k,"day"),F=E.viewDate.clone().subtract(1,"months").endOf("month"),_=s.checkDataMinMax(F,"day"),O=E.viewDate.clone().add(1,"months").startOf("month"),q=s.checkDataMinMax(O,"day"),X=E.viewDate.clone().add(1,"years").startOf("month"),Z=s.checkDataMinMax(X,"day");g.isPrevYear=!v,g.isPrevMonth=!_,g.titleYear=`${A}${i.value.year}`,g.titleMonth=S,g.isNextMonth=!q,g.isNextYear=!Z},B=()=>{if(!E.viewDate)return;const A=E.viewDate.localeData(),f=A.weekdaysMin(),S=A.firstDayOfWeek(),k=[];f.forEach((v,F)=>{k[(7+F-S)%7]=v}),h.value=k},I=()=>{if(!E.viewDate)return;const A=E.viewDate.clone(),f=E.selectDate,S=A.year(),k=A.month();let v=A.clone().subtract(1,"months");const F=[];let _=[];v=v.date(v.daysInMonth()).startOf("week");for(let O=0;O<42;O+=1){O>0&&(v=v.add(1,"days"));const q=v.clone(),X=q.date(),Z=v.year()===S&&v.month()<k||v.year()<S,se=v.year()===S&&v.month()>k||v.year()>S;let le=f&&v.isSame(f,"day");const G=s.checkDataMinMax(q,"day");let oe=!1,R=!1,U=!1;u.isRange&&(E.hoverDate?E.startDate&&E.endDate&&E.startDate.isSame(E.hoverDate,"day")&&E.hoverDate.isBefore(E.endDate,"day")?(oe=v.isSame(E.startDate,"day"),R=v.isSame(E.endDate,"day"),U=oe||R||v.isAfter(E.startDate,"day")&&v.isBefore(E.endDate,"day")):E.startDate?(oe=v.isSame(E.startDate,"day"),U=oe||v.isSame(E.hoverDate,"day"),U=U||v.isAfter(E.startDate,"day")&&v.isBefore(E.hoverDate,"day"),R=E.hoverDate.isSame(E.startDate,"day")&&oe):E.endDate&&(R=v.isSame(E.endDate,"day"),U=R||v.isSame(E.hoverDate,"day"),U=U||v.isAfter(E.hoverDate,"day")&&v.isBefore(E.endDate,"day"),oe=E.hoverDate.isSame(E.endDate,"day")&&R):(oe=!!(E.startDate&&v.isSame(E.startDate,"day")),E.endDate&&(R=v.isSame(E.endDate,"day"),U=oe||R||!!(E.startDate&&v.isAfter(E.startDate,"day")&&v.isBefore(E.endDate,"day")))),le=oe||R);const Q=me.getAddClass("day",{old:Z,new:se,active:le&&!Z&&!se&&!G,disabled:G,"date-start":oe&&!Z&&!se,"date-end":R&&!Z&&!se,"range-in":U&&!Z&&!se});_.push({cls:Q,day:X,value:X,isDisabled:G,isOld:Z,isNew:se}),_.length===7&&(F.push({days:_}),_=[])}y.value=F},M=(A,f,S)=>{if(!E.viewDate)return;const k=E.viewDate.clone()[A](f,S);t("onChangeDate",k)};let N=!1;const b=()=>{N||(N=!0,e.nextTick(()=>{t("onInitComplete","days")}))},V=()=>{E.selectDate=d.getMomentDate(a.selectValue),E.startDate=d.getMomentDate(a.startValue),E.endDate=d.getMomentDate(a.endValue),E.hoverDate=d.getMomentDate(a.hoverValue)},w=(A,f,S)=>{if(f!==S){const k=d.getMomentDate(f);k&&k.isValid()&&(E[A]=k,V(),B(),L(),I(),b())}},T=()=>{if(o.isNonEmptyString(a.viewValue)){const A=d.getMomentDate(a.viewValue);A&&A.isValid()&&(E.viewDate=A,V(),B(),L(),I(),b())}};e.onMounted(()=>{e.nextTick(()=>{T()})}),e.watch(()=>a.viewValue,(A,f)=>{w("viewDate",A,f)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue],()=>{E.viewDate&&(E.selectDate=d.getMomentDate(a.selectValue),E.startDate=d.getMomentDate(a.startValue),E.endDate=d.getMomentDate(a.endValue),E.hoverDate=d.getMomentDate(a.hoverValue),I())}),e.watch(()=>a.hoverValue,()=>{E.viewDate&&(E.hoverDate=d.getMomentDate(a.hoverValue),u.isRange&&I())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{E.viewDate&&(L(),I())});const C=A=>{A.preventDefault(),A.stopPropagation(),M("subtract",1,"years")},D=A=>{A.preventDefault(),A.stopPropagation(),M("subtract",1,"months")},J=A=>{A.preventDefault(),A.stopPropagation(),M("add",1,"months")},ne=A=>{A.preventDefault(),A.stopPropagation(),M("add",1,"years")},K=(A,f)=>{A.preventDefault(),A.stopPropagation(),t("onChangeType",f)},P=(A,f)=>{A.preventDefault(),A.stopPropagation(),f.isDisabled||t("onSelectDate","days",f)},x=(A,f)=>{A.preventDefault(),A.stopPropagation(),f.isDisabled||t("onHoverDate","days",f)};return(A,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Nm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Vm,[e.createElementVNode("span",Mm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(i).prevYear,onClick:C},[e.createVNode(ke,{name:"angle-double-left"})],8,Om)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),g.isPrevMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"prev-month",title:e.unref(i).prevMonth,onClick:D},[e.createVNode(ke,{name:"angle-left"})],8,_m)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:f[0]||(f[0]=S=>K(S,"years"))},e.toDisplayString(g.titleYear),1),e.createElementVNode("span",{class:"datetime-switch-month",onClick:f[1]||(f[1]=S=>K(S,"months"))},e.toDisplayString(g.titleMonth),1),e.createElementVNode("span",Am,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(i).nextYear,onClick:ne},[e.createVNode(ke,{name:"angle-double-right"})],8,Lm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),g.isNextMonth?(e.openBlock(),e.createElementBlock("span",{key:2,class:"next-month",title:e.unref(i).nextMonth,onClick:J},[e.createVNode(ke,{name:"angle-right"})],8,$m)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])])]),e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(S,k)=>(e.openBlock(),e.createElementBlock("th",{key:`${c}-week-${k}`},e.toDisplayString(S),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(S,k)=>(e.openBlock(),e.createElementBlock("tr",{key:`${c}-days-${k}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.days,(v,F)=>(e.openBlock(),e.createElementBlock("td",{key:`${c}-day-${F}`,role:"gridcell",tabindex:"0","aria-disabled":v.isDisabled,class:e.normalizeClass(v.cls),onClick:_=>P(_,v),onKeydown:[e.withKeys(e.withModifiers(_=>P(_,v),["prevent"]),["enter"]),e.withKeys(e.withModifiers(_=>P(_,v),["prevent"]),["space"])],onMouseover:_=>x(_,v)},e.toDisplayString(v.day),43,Fm))),128))]))),128))])])],10,Tm))}}),Rm=["id"],Hm={class:"table-base"},Um={class:"time-head time-head-month"},zm={class:"time-prev"},Jm=["title"],Km={class:"time-next"},Wm=["title"],jm={class:"time-body-month"},Ym=["aria-disabled","onClick","onKeydown","onMouseover"],qm=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:n=>!0,onChangeType:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendarsMonths-${o.getRandom(5)}`,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase"),c=e.inject("$DateTimeBase");(!u||!s||!c)&&we.warn("ClCalendarsMonths","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=u?.elId?`${u.elId}-calendarsMonths-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let ne={"panel-calendarsmonths":!0};return ne=o.getJsonMerge(ne,me.getClassNameJson(a.className)),ne}),g=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),h=e.ref([]),y={viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},E=()=>{if(!y.viewDate)return;const ne=y.viewDate.year(),K=y.viewDate.clone().subtract(1,"years").endOf("year"),P=c.checkDataMinMax(K,"month"),x=y.viewDate.clone().add(1,"years").startOf("year"),A=c.checkDataMinMax(x,"month");g.isPrevYear=!P,g.titleYear=`${ne}${r.value.year}`,g.isNextYear=!A},L=()=>{if(!y.viewDate)return;const ne=y.viewDate.clone(),K=c.getFocusDate(),P=y.selectDate,x=ne.year(),A=[];ne.localeData().monthsShort().forEach((f,S)=>{const k=c.getViewMin(x,S);let v=!!(P&&k.isSame(P,"month")),F=!!(K&&k.isSame(K,"month"));const _=c.checkDataMinMax(k,"month");let O=!1,q=!1,X=!1;s.isRange&&(F=!1,y.hoverDate?y.startDate&&y.endDate&&y.startDate.isSame(y.hoverDate,"month")&&y.hoverDate.isBefore(y.endDate,"month")?(O=k.isSame(y.startDate,"month"),q=k.isSame(y.endDate,"month"),X=O||q||k.isAfter(y.startDate,"month")&&k.isBefore(y.endDate,"month")):y.startDate?(O=k.isSame(y.startDate,"month"),X=O||k.isSame(y.hoverDate,"month"),X=X||k.isAfter(y.startDate,"month")&&k.isBefore(y.hoverDate,"month"),q=!!(y.hoverDate&&y.hoverDate.isSame(y.startDate,"month"))&&O):y.endDate&&(q=k.isSame(y.endDate,"month"),X=q||k.isSame(y.hoverDate,"month"),X=X||k.isAfter(y.hoverDate,"month")&&k.isBefore(y.endDate,"month"),O=!!(y.hoverDate&&y.hoverDate.isSame(y.endDate,"month"))&&q):(O=!!(y.startDate&&k.isSame(y.startDate,"month")),y.endDate&&y.startDate&&(q=k.isSame(y.endDate,"month"),X=k.isAfter(y.startDate,"month")&&k.isBefore(y.endDate,"month"))),v=O||q),s.layerType==="months"&&(F=!1);const Z=me.getAddClass("month",{active:v&&!_,focused:F,disabled:_,"date-start":O,"date-end":q,"range-in":X});A.push({cls:Z,month:f,isDisabled:_,value:S})}),h.value=A},B=(ne,K,P)=>{if(!y.viewDate)return;const x=y.viewDate.clone()[ne](K,P);t("onChangeDate",x)};let I=!1;const M=()=>{I||(I=!0,e.nextTick(()=>{t("onInitComplete","months")}))},N=()=>{y.selectDate=u.getMomentDate(a.selectValue),y.startDate=u.getMomentDate(a.startValue),y.endDate=u.getMomentDate(a.endValue),y.hoverDate=u.getMomentDate(a.hoverValue)},b=(ne,K,P)=>{if(K!==P){const x=u.getMomentDate(K);x&&x.isValid()&&(y[ne]=x,N(),E(),L(),M())}},V=()=>{const ne=u.getMomentDate(a.viewValue);ne&&ne.isValid()&&(y.viewDate=ne,N(),E(),L(),M())};e.onMounted(()=>{e.nextTick(()=>{V()})}),e.watch(()=>a.viewValue,(ne,K)=>{b("viewDate",ne,K)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue,()=>a.hoverValue],()=>{y.viewDate&&(y.selectDate=u.getMomentDate(a.selectValue),y.startDate=u.getMomentDate(a.startValue),y.endDate=u.getMomentDate(a.endValue),y.hoverDate=u.getMomentDate(a.hoverValue),L())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{y.viewDate&&(E(),L())});const w=ne=>{ne.preventDefault(),ne.stopPropagation(),B("subtract",1,"years")},T=ne=>{ne.preventDefault(),ne.stopPropagation(),B("add",1,"years")},C=(ne,K)=>{ne.preventDefault(),ne.stopPropagation(),t("onChangeType",K)},D=(ne,K)=>{ne.preventDefault(),ne.stopPropagation(),K.isDisabled||t("onSelectDate","months",K)},J=(ne,K)=>{ne.preventDefault(),ne.stopPropagation(),K.isDisabled||t("onHoverDate","months",K)};return(ne,K)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Hm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Um,[e.createElementVNode("span",zm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(r).prevYear,onClick:w},[e.createVNode(ke,{name:"angle-left"})],8,Jm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",{class:"datetime-switch-year",onClick:K[0]||(K[0]=P=>C(P,"years"))},e.toDisplayString(g.titleYear),1),e.createElementVNode("span",Km,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(r).nextYear,onClick:T},[e.createVNode(ke,{name:"angle-right"})],8,Wm)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",jm,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(P,x)=>(e.openBlock(),e.createElementBlock("span",{key:`${i}-month-${x}`,role:"button",tabindex:"0","aria-disabled":P.isDisabled,class:e.normalizeClass(P.cls),onClick:A=>D(A,P),onKeydown:[e.withKeys(e.withModifiers(A=>D(A,P),["prevent"]),["enter"]),e.withKeys(e.withModifiers(A=>D(A,P),["prevent"]),["space"])],onMouseover:A=>J(A,P)},e.toDisplayString(P.month),43,Ym))),128))])])])])])],10,Rm))}}),Xm=["id"],Gm={class:"table-base"},Qm={class:"time-head time-head-year"},Zm={class:"time-prev"},ep=["title"],tp={class:"time-next"},np=["title"],op={class:"time-body-year"},ap=["aria-disabled","onClick","onKeydown","onMouseover"],lp=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:n=>!0,onSelectDate:(n,l)=>!0,onHoverDate:(n,l)=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("dataTime");const d=e.inject("$DateTimeTop"),u=e.inject("$DateTimeTopBase"),s=e.inject("$DateTimeBase");(!d||!u||!s)&&we.warn("ClCalendarsYears","未找到 $DateTimeTop/$DateTimeTopBase/$DateTimeBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=`calendarsYears-${o.getRandom(5)}`,m=d?.elId?`${d.elId}-calendarsYears-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let ne={"panel-calendarsyears":!0};return ne=o.getJsonMerge(ne,me.getClassNameJson(a.className)),ne}),g=e.reactive({isPrevYear:!1,titleYear:"",isNextYear:!1}),h=e.ref([]),y={startYear:0,viewDate:null,selectDate:null,startDate:null,endDate:null,hoverDate:null},E=()=>{if(!y.viewDate)return;const ne=`${y.startYear}-${y.startYear+9}`,K=d.getMomentDate({year:y.startYear-1,month:11}),P=d.getMomentDate({year:y.startYear+10,month:0}),x=K?s.checkDataMinMax(K.endOf("month"),"year"):!1,A=P?s.checkDataMinMax(P.startOf("month"),"year"):!1;g.isPrevYear=!x,g.titleYear=ne,g.isNextYear=!A},L=()=>{const ne=s.getFocusDate(),K=y.selectDate,P=[];for(let x=-1;x<11;x+=1){const A=y.startYear+x,f=s.getViewMin(A),S=x===-1,k=x>9;let v=K?f.isSame(K,"year"):!1,F=!!(ne&&f.isSame(ne,"year"));const _=s.checkDataMinMax(f,"year");let O=!1,q=!1,X=!1;if(u.isRange){if(F=!1,y.hoverDate){const se=parseInt(y.hoverDate.format("YYYY"),10);y.startDate&&y.endDate&&y.startDate.isSame(y.hoverDate,"year")&&y.hoverDate.isBefore(y.endDate,"year")?(O=A===parseInt(y.startDate.format("YYYY"),10),q=A===parseInt(y.endDate.format("YYYY"),10),X=O||q||A>parseInt(y.startDate.format("YYYY"),10)&&A<parseInt(y.endDate.format("YYYY"),10)):y.startDate?(O=A===parseInt(y.startDate.format("YYYY"),10),X=O||A===se,X=X||f.isAfter(y.startDate,"year")&&f.isBefore(y.hoverDate,"year"),q=!1):y.endDate&&(q=A===parseInt(y.endDate.format("YYYY"),10),X=q||A===se,X=X||f.isAfter(y.hoverDate,"year")&&f.isBefore(y.endDate,"year"),O=!!(y.hoverDate&&y.hoverDate.isSame(y.endDate,"year"))&&q)}else O=!!(y.startDate&&f.isSame(y.startDate,"year")),y.endDate&&y.startDate&&(q=f.isSame(y.endDate,"year"),X=f.isAfter(y.startDate,"year")&&f.isBefore(y.endDate,"year"));v=O||q}u.layerType==="years"&&(F=!1);const Z=me.getAddClass("year",{old:S,new:k,active:v&&!S&&!k,focused:F,disabled:_,"date-start":O&&!S&&!k,"date-end":q&&!S&&!k,"range-in":X&&!S&&!k});P.push({cls:Z,year:A,isDisabled:_,value:A})}h.value=P},B=()=>{y.viewDate&&(y.startYear=Math.floor(y.viewDate.year()/10)*10,E(),L())},I=(ne,K,P)=>{y.viewDate&&(y.viewDate=y.viewDate.clone()[ne](K,P),B(),t("onChangeDate",y.viewDate))};let M=!1;const N=()=>{M||(M=!0,e.nextTick(()=>{t("onInitComplete","years")}))},b=()=>{y.selectDate=d.getMomentDate(a.selectValue),y.startDate=d.getMomentDate(a.startValue),y.endDate=d.getMomentDate(a.endValue),y.hoverDate=d.getMomentDate(a.hoverValue)},V=(ne,K,P)=>{if(K!==P){const x=d.getMomentDate(K);x&&x.isValid()?(y[ne]=x,b(),B(),N()):(y.viewDate=null,y.startYear=0,h.value=[],g.isPrevYear=!1,g.isNextYear=!1,g.titleYear="")}},w=()=>{const ne=d.getMomentDate(a.viewValue);ne&&ne.isValid()&&(y.viewDate=ne,b(),B(),N())};e.onMounted(()=>{e.nextTick(()=>{w()})}),e.watch(()=>a.viewValue,(ne,K)=>{V("viewDate",ne,K)}),e.watch([()=>a.selectValue,()=>a.startValue,()=>a.endValue,()=>a.hoverValue],()=>{y.viewDate&&(y.selectDate=d.getMomentDate(a.selectValue),y.startDate=d.getMomentDate(a.startValue),y.endDate=d.getMomentDate(a.endValue),y.hoverDate=d.getMomentDate(a.hoverValue),L())}),e.watch([()=>a.minValue,()=>a.maxValue],()=>{y.viewDate&&(E(),L())});const T=ne=>{ne.preventDefault(),ne.stopPropagation(),I("subtract",10,"years")},C=ne=>{ne.preventDefault(),ne.stopPropagation(),I("add",10,"years")},D=(ne,K)=>{ne.preventDefault(),ne.stopPropagation(),K.isDisabled||t("onSelectDate","years",K)},J=(ne,K)=>{ne.preventDefault(),ne.stopPropagation(),K.isDisabled||t("onHoverDate","years",K)};return(ne,K)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),id:e.unref(m)},[e.createElementVNode("table",Gm,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",Qm,[e.createElementVNode("span",Zm,[g.isPrevYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"prev-year",title:e.unref(i).prevYear10,onClick:T},[e.createVNode(ke,{name:"angle-left"})],8,ep)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),e.createElementVNode("span",null,e.toDisplayString(g.titleYear),1),e.createElementVNode("span",tp,[g.isNextYear?(e.openBlock(),e.createElementBlock("span",{key:0,class:"next-year",title:e.unref(i).nextYear10,onClick:C},[e.createVNode(ke,{name:"angle-right"})],8,np)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])])])]),e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(P,x)=>(e.openBlock(),e.createElementBlock("span",{key:`${c}-${P.year}-${x}`,role:"button",tabindex:"0","aria-disabled":P.isDisabled,class:e.normalizeClass(P.cls),onClick:A=>D(A,P),onKeydown:[e.withKeys(e.withModifiers(A=>D(A,P),["prevent"]),["enter"]),e.withKeys(e.withModifiers(A=>D(A,P),["prevent"]),["space"])],onMouseover:A=>J(A,P)},e.toDisplayString(P.year),43,ap))),128))])])])])],10,Xm))}}),ip=["id"],sp={class:"times-container"},rp=["title"],cp=["title"],up={class:"times-clock"},dp={class:"clock-nums"},mp=["aria-disabled","onClick","onKeydown"],pp={class:"clock-pointer"},fp={class:"clock-am"},hp="2000-01-01",gp=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:n=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=`calendarsClock-${o.getRandom(5)}`,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase");(!u||!s)&&we.warn("ClCalendarsClocks","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=u?.elId?`${u.elId}-calendarsClock-${o.getRandom(5)}`:void 0,m=e.reactive({isOpen:!1,activePointer:"hour",activeAm:"am"}),p=e.reactive({hour:!0,hourDisabled:!1,minute:!0,minuteDisabled:!1,minuteShowAddSub:!0,second:!0,secondDisabled:!1}),g=e.reactive({hour:-90,hourMinute:0,minute:-90,minuteSecond:0,second:-90}),h=e.reactive({hour:"00",minute:"00",second:"00"}),y=e.ref([]),E={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}},L=e.computed(()=>{let ie={"panel-calendarsclocks":!0,"datetime-times":!0};return ie["times-open"]=m.isOpen,ie=o.getJsonMerge(ie,me.getClassNameJson(a.className)),ie}),B=e.computed(()=>{const ie={"pointer-hour":!0};return ie["pointer-active"]=m.activePointer==="hour",ie["pointer-disabled"]=p.hourDisabled,ie}),I=e.computed(()=>{const ie={"pointer-minute":!0};return ie["pointer-active"]=m.activePointer==="minute",ie["pointer-disabled"]=p.minuteDisabled,ie}),M=e.computed(()=>{const ie={"pointer-second":!0};return ie["pointer-active"]=m.activePointer==="second",ie["pointer-disabled"]=p.secondDisabled,ie}),N=e.computed(()=>{const ie={"am-am":!0};return ie["am-active"]=m.activeAm==="am",ie}),b=e.computed(()=>{const ie={"am-pm":!0};return ie["am-active"]=m.activeAm==="pm",ie}),V=e.computed(()=>{const ie={"clock-set":!0,"clock-set-hour":!0};return ie["clock-set-active"]=m.activePointer==="hour",ie["clock-set-disabled"]=p.hourDisabled,ie}),w=e.computed(()=>{const ie={"clock-set":!0,"clock-set-minute":!0};return ie["clock-set-active"]=m.activePointer==="minute",ie["clock-set-disabled"]=p.minuteDisabled,ie}),T=e.computed(()=>{const ie={"clock-set":!0,"clock-set-second":!0};return ie["clock-set-active"]=m.activePointer==="second",ie["clock-set-disabled"]=p.secondDisabled,ie}),C=(ie,ae)=>{E[ie]=u.getMomentDate(ae)},D=ie=>{let ae=parseInt(E.lastValue[ie],10),W=parseInt(h[ie],10),j=0;return ie==="hour"?(W===0&&ae===23&&(W=24),ae===0&&W===23&&(ae=24),W-ae>6&&(ae+=12),ae-W>=6&&(W+=12),j=W-ae):(W-ae>30&&(ae+=60),ae-W>=30&&(W+=60),j=W-ae),j},J=ie=>{const W=D(ie)*E.timeAngle[ie];return g[ie]+(W>=360?W%360:W)},ne=()=>{const ie=J("hour"),ae=E.timeAngle.hour*parseFloat((parseInt(h.minute,10)/60).toString()),W=J("minute"),j=E.timeAngle.second*parseFloat((parseInt(h.second,10)/60).toString()),ue=J("second");g.hour=ie,g.hourMinute=ae,g.minute=W,g.minuteSecond=j,g.second=ue},K=ie=>parseInt(ie,10)<12?"am":"pm",P=(ie,ae)=>{let W=!0;switch(ie){case"hour":W=!0;break;case"minute":W=parseInt(h.hour,10)===E[ae].hour;break;case"second":W=parseInt(h.hour,10)===E[ae].hour&&parseInt(h.minute,10)===E[ae].minute;break}return W},x=()=>E.isCheckMin&&E.isCheckMax&&E.checkMinDiff===0&&E.checkMaxDiff===0&&E.min.hour>E.max.hour,A=(ie,ae)=>{let W=!1;return x()&&ie==="hour"?W=ae<E.min[ie]&&ae>E.max[ie]:E.isCheckMin&&(E.checkMinDiff===0?P(ie,"min")&&(W=ae<E.min[ie]):E.checkMinDiff<0&&(W=!0)),!W&&E.isCheckMax&&(E.checkMaxDiff===0?P(ie,"max")&&(W=ae>E.max[ie]):E.checkMaxDiff>0&&(W=!0)),W},f=ie=>{let ae=ie;ae==="hour"&&(ae=m.activeAm==="am"?"hourAm":"hourPm");const W=p[`${ie}Disabled`],j=[];E.num[ae].forEach((ue,pe)=>{const he={num:ue,cls:"clock-num",isDisabled:!1};he.cls+=` clock-num${pe+1} `,he.isDisabled=W?!0:A(ie,ue),he.isDisabled&&(he.cls+=" clock-nums-disabled "),j.push(he)}),y.value=j},S=ie=>{m.activePointer=ie,ie==="hour"&&(m.activeAm=K(h.hour)),f(ie)},k=ie=>{let ae=null;if(!o.isUndefined(ie)&&!o.isUndefined(E.selectDayDate)){const W=E.selectDayDate.clone().format("YYYY-MM-DD 00:00:00"),j=ie.clone().format("YYYY-MM-DD 00:00:00");ae=u.Dayjs(W).diff(u.Dayjs(j))}return ae},v=(ie=!0)=>{g.hour=-90,g.hourMinute=0,g.minute=-90,g.minuteSecond=0,g.second=-90,E.lastValue={hour:"00",minute:"00",second:"00"},ne(),e.nextTick(()=>{const ae=h.hour,W=h.minute,j=h.second;E.lastValue={hour:ae,minute:W,second:j},ie&&(E.origValue={hour:ae,minute:W,second:j})})},F=(ie,ae)=>{E.lastValue.hour=h.hour,E.lastValue.minute=h.minute,E.lastValue.second=h.second,h[ie]=o.getFillZero(ae),ne(),a.isShowSubmit||t("onSubmit",`${h.hour}:${h.minute}:${h.second}`)},_=ie=>{let ae=0,W=0,j=0;if(!o.isEmpty(ie)){const ue=(o.isEmpty(E.selectDayDate)?u.getNow():E.selectDayDate).format("YYYY-MM-DD"),pe=u.getMomentDate(`${ue} ${ie}`);pe&&pe.isValid()&&(ae=pe.hour(),W=pe.minute(),j=pe.second())}return{HH:ae,mm:W,ss:j}},O=()=>{let ie=!0,ae=!0;const W=o.isEmpty(E.selectDayDate),j=_(a.selectValue),ue=j.HH,pe=j.mm,he=j.ss;switch(s.layerType){case"hours":ie=!1,ae=!1;break;case"minutes":ae=!1;break}E.isCheckMin=!o.isUndefined(E.minDate),E.isCheckMin&&(E.checkMinDiff=u.checkIsTimes()?0:k(E.minDate),E.min={hour:E.minDate.hour(),minute:E.minDate.minute(),second:E.minDate.second()}),E.isCheckMax=!o.isUndefined(E.maxDate),E.isCheckMax&&(E.checkMaxDiff=u.checkIsTimes()?0:k(E.maxDate),E.max={hour:E.maxDate.hour(),minute:E.maxDate.minute(),second:E.maxDate.second()});const ye=o.getFillZero(ue);let Ce=o.getFillZero(pe),be=o.getFillZero(he);ie||(Ce="00"),ae||(be="00"),E.origValue={hour:ye,minute:Ce,second:be},p.hour=!0,p.minute=ie,p.second=ae,h.hour=ye,h.minute=Ce,h.second=be,u.checkIsTimes()||(p.hourDisabled=W,p.minuteDisabled=W,p.secondDisabled=W),s.layerType==="hours"&&(p.minute=!0,p.minuteDisabled=!0,p.minuteShowAddSub=!1),q(),X()},q=()=>{E.lastValue={hour:"00",minute:"00",second:"00"},g.hour=-90,g.hourMinute=0,g.minute=-90,g.minuteSecond=0,g.second=-90},X=()=>{ne(),m.activeAm=K(h.hour),f(m.activePointer)},Z=()=>{m.isOpen=a.isShowPointer,C("selectDayDate",u.checkIsTimes()?hp:a.selectDay),C("minDate",u.getValueEffective(a.minValue)),C("maxDate",u.getValueEffective(a.maxValue)),O(),S("hour"),v(),e.nextTick(()=>{t("onInitComplete","times")})},se=ie=>{let ae=!1;return p[ie]&&!p[`${ie}Disabled`]&&(m.isOpen?ae=!0:(v(!1),m.isOpen=!0,S(ie))),ae},le=(ie,ae)=>{if(p[ie]&&!p[`${ie}Disabled`]&&m.isOpen){let W=!0,j=0,ue=ie==="hour"?23:59;if(E.isCheckMin&&(E.checkMinDiff===0?P(ie,"min")&&(j=E.min[ie]):E.checkMinDiff<0&&(W=!1)),E.isCheckMax&&(E.checkMaxDiff===0?P(ie,"max")&&(ue=E.max[ie]):E.checkMaxDiff>0&&(W=!1)),W){const pe=parseInt(h[ie],10);let he=0;x()&&ie==="hour"?he=ae==="add"?pe>=23?0:pe+1:pe<=0?23:pe-1:ae==="add"?he=pe<j||pe>=ue?j:pe+1:he=pe>ue||pe<=j?ue:pe-1,A(ie,he)||(F(ie,he),S(ie))}}};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.watch(()=>a.selectDay,(ie,ae)=>{C("selectDayDate",ie),O()}),e.watch(()=>a.minValue,(ie,ae)=>{const W=u.getValueEffective(ie);C("minDate",W),O()}),e.watch(()=>a.maxValue,(ie,ae)=>{const W=u.getValueEffective(ie);C("maxDate",W),O()}),e.watch(()=>a.selectValue,(ie,ae)=>{const W=_(ie),j=o.getFillZero(W.HH),ue=o.getFillZero(W.mm),pe=o.getFillZero(W.ss);(h.hour!==j||h.minute!==ue||h.second!==pe)&&(h.hour=j,h.minute=ue,h.second=pe,E.origValue={hour:j,minute:ue,second:pe},q(),X())});const G=ie=>{p[ie]&&!p[`${ie}Disabled`]&&(S(ie),m.isOpen||(v(),m.isOpen=!0))},oe=ie=>{if(!ie.isDisabled){const ae=m.activePointer,W=parseInt(h[ae],10),j=ie.num;j!==W&&F(ae,j)}},R=ie=>{m.activeAm=ie,m.activePointer="hour";const ae=parseInt(h.hour,10);ie==="pm"&&ae<12?h.hour=o.getFillZero(ae+12):ie==="am"&&ae>=12&&(h.hour=o.getFillZero(ae-12)),ne(),f("hour")},U=()=>se("hour"),Q=ie=>{let ae=!1,W=!1;const j=x();if(E.isCheckMin){if(E.checkMinDiff<0)ae=!0,W=!0;else if(E.checkMinDiff===0){const ue=parseInt(h[ie],10);P(ie,"min")&&(ae=j?ue===E.min[ie]:ue<=E.min[ie])}}if(E.isCheckMax){if(E.checkMaxDiff>0)ae=!0,W=!0;else if(E.checkMaxDiff===0){const ue=parseInt(h[ie],10);P(ie,"max")&&(W=j?ue===E.max[ie]:ue>=E.max[ie])}}return{subtractDisabled:ae,addDisabled:W}},ee=ie=>(o.isEmpty(ie.type)||le("hour",ie.type),{value:h.hour,...Q("hour")}),Y=()=>se("minute"),H=ie=>(o.isEmpty(ie.type)||le("minute",ie.type),{value:h.minute,...Q("minute")}),te=()=>se("second"),$=ie=>(o.isEmpty(ie.type)||le("second",ie.type),{value:h.second,...Q("second")}),z=()=>{a.isClickOverlay&&m.isOpen&&(u.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${h.hour}:${h.minute}:${h.second}`))},ce=()=>{u.checkIsTimes()||(m.isOpen=!1),t("onSubmit",`${h.hour}:${h.minute}:${h.second}`)},de=()=>{(h.hour!==E.origValue.hour||h.minute!==E.origValue.minute||h.second!==E.origValue.second)&&(E.lastValue.hour=h.hour,E.lastValue.minute=h.minute,E.lastValue.second=h.second,h.hour=E.origValue.hour,h.minute=E.origValue.minute,h.second=E.origValue.second,X()),u.checkIsTimes()||(m.isOpen=!1)};return(ie,ae)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value),id:e.unref(c)},[ae[15]||(ae[15]=e.createElementVNode("div",{class:"datetime-times-inner"},null,-1)),e.createElementVNode("div",null,[e.createElementVNode("div",sp,[e.createElementVNode("div",{class:"times-overlay",onClick:z}),n.isShowCancel?(e.openBlock(),e.createElementBlock("div",{key:0,class:"times-cancel",title:e.unref(r).common.cancel,onClick:de},[e.createVNode(ke,{name:"close1"})],8,rp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowSubmit?(e.openBlock(),e.createElementBlock("div",{key:2,class:"times-submit",title:e.unref(r).common.submit,onClick:ce},[e.createVNode(ke,{name:"check1"})],8,cp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",up,[e.createElementVNode("div",dp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(W,j)=>(e.openBlock(),e.createElementBlock("div",{key:`${i}-clock-${j}`,role:"button",tabindex:"0","aria-disabled":W.isDisabled,class:e.normalizeClass(W.cls),onClick:ue=>oe(W),onKeydown:[e.withKeys(e.withModifiers(ue=>oe(W),["prevent"]),["enter"]),e.withKeys(e.withModifiers(ue=>oe(W),["prevent"]),["space"])]},e.toDisplayString(W.num),43,mp))),128))]),e.createElementVNode("div",pp,[p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(B.value),onClick:ae[0]||(ae[0]=W=>G("hour")),style:e.normalizeStyle({transform:`rotate(${g.hour+g.hourMinute}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(I.value),onClick:ae[1]||(ae[1]=W=>G("minute")),style:e.normalizeStyle({transform:`rotate(${g.minute+g.minuteSecond}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(M.value),onClick:ae[2]||(ae[2]=W=>G("second")),style:e.normalizeStyle({transform:`rotate(${g.second}deg)`})},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))]),e.withDirectives(e.createElementVNode("div",fp,[e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(N.value),onClick:ae[3]||(ae[3]=W=>R("am")),onKeydown:[ae[4]||(ae[4]=e.withKeys(e.withModifiers(W=>R("am"),["prevent"]),["enter"])),ae[5]||(ae[5]=e.withKeys(e.withModifiers(W=>R("am"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(r).am),35),e.createElementVNode("small",{role:"button",tabindex:"0",class:e.normalizeClass(b.value),onClick:ae[6]||(ae[6]=W=>R("pm")),onKeydown:[ae[7]||(ae[7]=e.withKeys(e.withModifiers(W=>R("pm"),["prevent"]),["enter"])),ae[8]||(ae[8]=e.withKeys(e.withModifiers(W=>R("pm"),["prevent"]),["space"]))]},e.toDisplayString(e.unref(r).pm),35)],512),[[e.vShow,m.activePointer==="hour"]])])]),p.hour?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(V.value),onClick:ae[10]||(ae[10]=W=>G("hour"))},[e.createVNode(pn,{value:h.hour,"onUpdate:value":ae[9]||(ae[9]=W=>h.hour=W),size:"small",isClean:!1,disabled:p.hourDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:U,calculationOperateValueCallback:ee},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),p.minute&&p.minuteShowAddSub?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(w.value),onClick:ae[12]||(ae[12]=W=>G("minute"))},[e.createVNode(pn,{value:h.minute,"onUpdate:value":ae[11]||(ae[11]=W=>h.minute=W),size:"small",isClean:!1,disabled:p.minuteDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:Y,calculationOperateValueCallback:H},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),p.second?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(T.value),onClick:ae[14]||(ae[14]=W=>G("second"))},[e.createVNode(pn,{value:h.second,"onUpdate:value":ae[13]||(ae[13]=W=>h.second=W),size:"small",isClean:!1,disabled:p.secondDisabled,isTextRead:!0,fillZeroCount:2,isLoop:!0,btnTheme:"upDown",operateBtnDownBeforeCallback:te,calculationOperateValueCallback:$},null,8,["value","disabled"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],10,ip))}}),vp=["id"],Ro=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:n=>!0,onChangeViewValue:n=>!0,onHoverDate:n=>!0,onChangeViewType:n=>!0,onSelectTime:n=>!0,onInitComplete:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$DateTimeTop"),r=e.inject("$DateTimeTopBase");(!i||!r)&&we.warn("ClCalendarsBase","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const d=i?.elId?`${i.elId}-calendarsBase-${o.getRandom(5)}`:void 0,u=e.computed(()=>{let K={"panel-calendarsbase":!0};return K=o.getJsonMerge(K,me.getClassNameJson(a.className)),K}),s=e.reactive({currentView:"",viewValue:"",selectValue:"",selectClockDay:"",selectClockTime:""}),c=e.reactive({isShow:!1,isViewDay:!1,isShowClockPointer:!1,isShowClockSubmit:!1,isShowClockCancel:!1,isClockClickOverlay:!1}),m={viewDate:null,selectDate:null,focusDate:null,minDate:null,maxDate:null},p=(K,P)=>{m[K]=o.isString(P)?i.getMomentDate(P):null},g=K=>{const P=Object.keys(K);o.isExistValue(P,"viewValue")&&r.layerView===K.currentView&&t("onChangeViewValue",K.viewValue),P.forEach(x=>{const A=x,f=K[A];o.isExistJsonKey(s,A)&&s[A]!==f&&(s[A]=f),o.isExistJsonKey(m,A)&&(m[A]=f)})},h=(K,P)=>{let x=!1;return o.isEmpty(K)||o.isNaN(K)||(o.isEmpty(m.minDate)||(x=i.Dayjs(K).isBefore(m.minDate,P)),!x&&!o.isEmpty(m.maxDate)&&(x=i.Dayjs(K).isAfter(m.maxDate,P))),x},y=(K,P)=>{let x=0,A=1;if(o.isEmpty(m.minDate))o.isUndefined(P)||(x=P);else{const f=K===m.minDate.year();let S=!0;o.isUndefined(P)?x=f?m.minDate.month():0:(S=P===m.minDate.month(),x=P),A=f&&S?m.minDate.date():1}return i.getMomentDate({year:K,month:x,day:A})??i.getNow().startOf("year")},E=K=>{let P="";switch(K){case"months":P="days";break;case"years":P="months";break;default:P="days";break}return P},L=K=>{const x=(K||m.selectDate||m.viewDate).format("YYYY-MM-DD")+" "+(o.isEmpty(s.selectClockTime)?"00:00:00":s.selectClockTime);return i.Dayjs(x)},B=(K,P)=>{const x=m.viewDate.clone(),A=parseInt(P.value,10);if(o.isNaN(A))return L(x);let f;switch(K){case"days":{let S=0;P.isNew?S=1:P.isOld&&(S=-1),f=x.month(x.month()+S).date(A);break}case"months":{const S=m.selectDate||x,k=x.month(A);f=k.date(Math.min(S.date(),k.daysInMonth()));break}case"years":f=x.month(0).date(1).year(A);break;default:f=x;break}return L(f)},I=()=>{s.viewValue=m.viewDate.format(r.formatIn),m.focusDate=m.viewDate.clone()},M=K=>{p("selectDate",K==="-1"?"":K);const P=m.selectDate?m.selectDate.format("YYYY-MM-DD"):"";s.selectValue=P,s.selectClockDay=P,s.selectClockTime=m.selectDate?m.selectDate.format("HH:mm:ss"):""},N=()=>{let K=!1,P=!1,x=!1,A=!1,f=!1,S=!1;s.currentView==="times"?(K=!0,x=!0,S=!1,A=r.isDefault&&r.isShowPopup,f=r.isDefault&&r.isShowPopup,r.layerType==="hours"&&(f=!1,A=!1)):s.currentView==="days"&&(P=r.timeType==="datetime",P&&(f=!0,A=!0,x=!1,S=!0)),c.isShow=K,c.isViewDay=P,c.isShowClockPointer=x,c.isShowClockSubmit=A,c.isShowClockCancel=f,c.isClockClickOverlay=S},b=()=>{s.currentView=r.layerView,m.viewDate=i.getViewDate(a.viewValue),I(),M(a.selectValue),p("minDate",a.minValue),p("maxDate",a.maxValue),N()};e.onMounted(()=>{e.nextTick(()=>{b()})}),e.watch(()=>a.viewValue,(K,P)=>{m.viewDate=i.getViewDate(K),I()}),e.watch(()=>a.selectValue,(K,P)=>{const x=r.isRange&&K==="-1";let A=K;const f=s.selectClockTime;x&&(A=""),M(A),x&&(s.selectClockTime=f)}),e.watch(()=>a.minValue,(K,P)=>{p("minDate",K)}),e.watch(()=>a.maxValue,(K,P)=>{p("maxDate",K)});const V=K=>{g({currentView:s.currentView,viewDate:K.clone(),viewValue:K.format(r.formatIn)})},w=K=>{s.currentView=K,m.focusDate=m.viewDate.clone(),N(),t("onChangeViewType",K)},T=(K,P)=>{const x=B(K,P),A=x.format("YYYY-MM-DD"),f={};if(r.layerView===K)f.selectDate=x,f.selectValue=A,r.isRange||(f.selectClockDay=A),g(f),t("onSelectDate",A);else{const S=E(K);if(S===K){f.selectDate=x,f.selectValue=A,r.isRange||(f.selectClockDay=A),g(f),t("onSelectDate",A);return}f.viewDate=x.clone().startOf("month"),f.viewValue=f.viewDate.format(r.formatIn),f.currentView=S,g(f),N(),t("onChangeViewType",f.currentView)}},C=(K,P)=>{const x=B(K,P);t("onHoverDate",x)},D=K=>{g({selectClockTime:K}),t("onSelectTime",K)},J=new Set,ne=K=>{r.layerView===K&&!J.has(K)&&(J.add(K),t("onInitComplete",K))};return e.provide("$DateTimeBase",{checkDataMinMax:h,getViewMin:y,getFocusDate:()=>m.focusDate&&m.focusDate.clone()}),(K,P)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(d),class:e.normalizeClass(u.value)},[s.currentView==="days"?(e.openBlock(),e.createBlock(Pm,{key:0,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnChangeType:w,onOnSelectDate:T,onOnHoverDate:C,onOnInitComplete:ne},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):s.currentView==="months"?(e.openBlock(),e.createBlock(qm,{key:1,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnChangeType:w,onOnSelectDate:T,onOnHoverDate:C,onOnInitComplete:ne},null,8,["viewValue","selectValue","startValue","endValue","hoverValue","minValue","maxValue"])):s.currentView==="years"?(e.openBlock(),e.createBlock(lp,{key:2,viewValue:s.viewValue,selectValue:s.selectValue,startValue:n.startValue,endValue:n.endValue,hoverValue:n.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeDate:V,onOnSelectDate:T,onOnHoverDate:C,onOnInitComplete:ne},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(gp,{selectDay:s.selectClockDay,selectValue:s.selectClockTime,minValue:n.minValue,maxValue:n.maxValue,isShowPointer:c.isShowClockPointer,isShowSubmit:c.isShowClockSubmit,isShowCancel:c.isShowClockCancel,isClickOverlay:c.isClockClickOverlay,onOnSubmit:D,onOnInitComplete:ne},null,8,["selectDay","selectValue","minValue","maxValue","isShowPointer","isShowSubmit","isShowCancel","isClickOverlay"])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],10,vp))}}),yp=["tabindex","aria-disabled","onKeydown"],kp=e.defineComponent({name:"ClDateTimeDefault",__name:"DateTimeDefault",props:{className:String,value:String,minValue:String,maxValue:String},emits:{onSelectValue:n=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=e.inject("$DateTimeTop"),s=e.inject("$DateTimeTopBase");(!u||!s)&&we.warn("ClDateTimeDefault","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const c=e.reactive({isShowSubmit:!1,isSubmitDisplay:!1}),m=e.reactive({day:"",time:""}),p=e.computed(()=>{let w={"panel-date-time-default":!0,"datetime-default":!0,"datetime-panel-body":!0};return w=o.getJsonMerge(w,me.getClassNameJson(t.className)),w}),g=()=>{const w=u.getMergeDayTime(m.day,m.time),T=u.checkValue(w);c.isSubmitDisplay=o.isEmpty(m.day)||T.errMsg.length>0},h=w=>{let T=!1;s.timeType==="datetime"&&(T=w==="days"),c.isShowSubmit=T},y=w=>{let T="",C="",D=!0;if(o.isNonEmptyString(w)){const J=u.getMomentDate(w);J&&(T=J.format("YYYY-MM-DD"),C=J.format("HH:mm:ss"),D=!1)}m.day=T,m.time=C,c.isSubmitDisplay=D,g()},E=()=>{h(s.layerView),y(t.value)},L=()=>{const w=u.getMomentDate(u.getMergeDayTime(m.day,m.time));w&&i("onSelectValue",w)};e.onMounted(()=>{e.nextTick(()=>{E()})}),e.watch(()=>t.value,(w,T)=>{w!==T&&y(w)}),e.watch([()=>t.minValue,()=>t.maxValue],()=>{g()});const B=w=>{m.day=w,g(),s.timeType==="date"&&L()},I=w=>{m.time=w,g(),(s.timeType==="time"||s.timeType==="datetime"&&!c.isSubmitDisplay)&&L()},M=w=>{h(w)},N=()=>{c.isShowSubmit&&!c.isSubmitDisplay&&L()},b=()=>{i("onInitComplete")};return l({getValue:()=>{const w=u.getMergeDayTime(m.day,m.time);return u.getMomentDate(w)}}),(w,T)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ro,{class:e.normalizeClass(p.value),selectValue:n.value,viewValue:n.value,minValue:n.minValue,maxValue:n.maxValue,onOnSelectDate:B,onOnSelectTime:I,onOnChangeViewType:M,onOnInitComplete:b},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:N,onKeydown:[e.withKeys(e.withModifiers(N,["prevent"]),["enter"]),e.withKeys(e.withModifiers(N,["prevent"]),["space"])]},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r).common.submit),1)],42,yp)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),Sp=["id"],wp={class:"calendar-range calendar-left"},Ep={class:"calendar-text"},Cp={class:"time-input-base"},bp=["value","name"],xp={class:"calendar-panel"},Bp={class:"calendar-range calendar-right"},Ip={class:"calendar-text"},Dp={class:"time-input-base"},Tp=["value","name"],Np={class:"calendar-panel"},Vp={class:"calendar-range calendar-quick"},Mp=["onClick","onKeydown"],Op={key:0,class:"panel-quick-btn"},_p=e.defineComponent({name:"ClDateTimeRange",__name:"DateTimeRange",props:{className:String,startValue:String,endValue:String,minValue:String,maxValue:String,rangeQuick:{type:Array,default:()=>[]}},emits:{onSubmit:n=>!0,onCancel:()=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`dateTimeRange-${o.getRandom(5)}`,{optPageLanguage:d,getPageLanguage:u}=Le();u("dataTime");const s=e.inject("$DateTimeTop"),c=e.inject("$DateTimeTopBase");(!s||!c)&&we.warn("ClDateTimeRange","未找到 $DateTimeTop/$DateTimeTopBase 注入,请确保组件在 ClDateTime 组件树内使用");const m=s?.elId?`${s.elId}-dateTimeRange-${o.getRandom(5)}`:void 0,p=e.computed(()=>{let G={"panel-date-time-range":!0,"panel-range-calendar":!0,"datetime-range":!0,"datetime-panel-body":!0};return G=o.getJsonMerge(G,me.getClassNameJson(t.className)),G}),g=e.reactive({operateViewDataType:"",selectCount:0,hoverValue:"",activeQuick:"",isCheck:!0,isShowQuickBtn:c.isShowPopup||c.timeType==="datetime",previewStart:"",previewEnd:""}),h=e.reactive({view:"",text:"",name:`input_${o.getRandom(8)}`}),y=e.reactive({view:"",text:"",name:`input_${o.getRandom(8)}`}),E=e.reactive({day:"",time:"",value:""}),L=e.reactive({day:"",time:"",value:""}),B=e.ref([]),I=(G,oe)=>{const R=s.getViewDate(G),U=c.layerView==="years"?10:1,Q=g.operateViewDataType;return R[oe](U,Q).format(c.formatIn)},M=(G,oe)=>{if(o.isEmpty(G))return"";const R=oe==="right"?c.formatOutEnd:c.formatOut;if(o.isString(G)){const U=s.getMomentDate(G);return U?U.format(R):""}return G.format(R)},N=()=>{const G=s.getMergeDayTime(E.day,E.time);E.value=G,h.text=M(G,"left")},b=()=>{const G=s.getMergeDayTime(L.day,L.time);L.value=G,y.text=M(G,"right")},V=()=>{if(g.selectCount===2){let G="-1";if(!o.isEmpty(E.day)&&!o.isEmpty(L.day)&&!o.isEmpty(B.value)){const oe="YYYY-MM-DD";let R=s.getMomentDate(E.day,oe),U=s.getMomentDate(L.day,oe);if(R&&U){switch(c.layerType){case"years":if(R=s.getMomentDate(R.startOf("year").format(oe),oe),U=s.getMomentDate(U.endOf("year").format(oe),oe),!R||!U){g.activeQuick="-1";return}break;case"months":if(R=s.getMomentDate(R.startOf("month").format(oe),oe),U=s.getMomentDate(U.endOf("month").format(oe),oe),!R||!U){g.activeQuick="-1";return}break}const Q=R,ee=U;Q&&ee&&B.value.forEach(Y=>{Y.start&&Y.end&&Q.isSame(qe.getDayjsObject(Y.start).format(oe))&&ee.isSame(qe.getDayjsObject(Y.end).format(oe))&&(G=Y.id)})}}g.activeQuick=G}},w=G=>{const oe=E.value,R=L.value,U=o.isEmpty(oe),Q=o.isEmpty(R),ee=!U&&Q,Y=U&&!Q;let H=!1,te=!1;if(G&&(ee||Y)){const $=s.getMomentDate(ee?oe:R);$&&(H=G.isBefore($,"day"),te=G.isSame($,"day"))}return{isStart:ee,isEnd:Y,isBefore:H,isSame:te}},T=G=>{if(g.selectCount===1){const oe=G.format("YYYY-MM-DD"),R=E.day,U=L.day,Q=w(G);g.hoverValue=oe;let ee="",Y="";Q.isBefore?(ee=oe,Y=Q.isStart?R:U):(ee=Q.isEnd?U:R,Y=oe),g.previewStart=ee,g.previewEnd=Y,h.text=M(s.getMergeDayTime(ee,E.time),"left"),y.text=M(s.getMergeDayTime(Y,L.time),"right")}},C=G=>{switch(g.previewStart="",g.previewEnd="",g.selectCount){case 0:case 2:{g.selectCount=1,g.activeQuick="",E.day=G,N(),L.day="",L.time="",L.value="",y.text=M(s.getMergeDayTime(G,""),"right"),g.hoverValue=G;break}case 1:{g.selectCount=2;const oe=s.getMomentDate(G);if(!oe){g.selectCount=1;break}const R=w(oe);R.isSame?(E.day=G,N(),L.day=G,b()):R.isBefore?(L.day=E.day,L.time=E.time,E.day=G,N(),b()):(L.day=G,b()),g.hoverValue="";break}}g.selectCount===2&&V()},D=()=>{!g.isShowQuickBtn&&g.selectCount===2&&g.isCheck&&i("onSubmit",{start:E.value,end:L.value})},J=(G,oe)=>{const R=s.getMomentDate(oe),U=R?R.format("YYYY-MM-DD"):"",Q=R?R.format("HH:mm:ss"):"",ee=R?s.getMergeDayTime(U,Q):"";G?(E.day=U,E.time=Q,E.value=ee,h.text=M(ee,"left")):(L.day=U,L.time=Q,L.value=ee,y.text=M(ee,"right"))},ne=()=>{let G="";switch(c.layerType){case"days":G="months";break;case"months":G="years";break;case"years":G="years";break;default:G="months"}g.operateViewDataType=G;const oe=t.startValue||"",R=t.endValue||"",U=!o.isEmpty(oe),Q=!o.isEmpty(R);if(g.selectCount=U&&Q?2:U||Q?1:0,h.view=s.getViewDate(oe).format(c.formatIn),y.view=I(h.view,"add"),J(!0,oe),J(!1,R),c.timeType==="time"){g.selectCount=2;const ee=c.layerType==="seconds"?"00:00:00":"00:00";o.isEmpty(h.text)&&J(!0,s.getValueEffective(ee)),o.isEmpty(y.text)&&J(!1,s.getValueEffective(ee))}K()},K=()=>{let G=[];o.isArray(t.rangeQuick)&&(G=o.getListClone(t.rangeQuick).filter(oe=>o.isObject(oe)&&o.isNonEmptyString(oe.id)),G.length>0&&G.push({id:"-1",text:d.value.common.custom})),B.value=G},P=()=>{ne(),V(),e.nextTick(()=>{e.nextTick(()=>{i("onInitComplete")})})},x=()=>{if(g.selectCount===2){const G=s.checkValue(E.value,L.value);g.isCheck=G.errMsg.length===0}};e.onMounted(()=>{e.nextTick(()=>{P()})}),e.watch([()=>t.startValue,()=>t.endValue],([G,oe])=>{J(!0,G),J(!1,oe);const R=!o.isEmpty(G),U=!o.isEmpty(oe);g.selectCount=R&&U?2:R||U?1:0,g.selectCount!==2&&(g.activeQuick=""),g.hoverValue="",g.previewStart="",g.previewEnd="",V(),x()}),e.watch(()=>t.rangeQuick,()=>{g.operateViewDataType&&K()});const A=()=>{g.hoverValue="",g.previewStart="",g.previewEnd="",h.text=M(s.getMergeDayTime(E.day,E.time),"left"),y.text=M(s.getMergeDayTime(L.day,L.time),"right")},f=G=>{h.view=G,y.view=I(G,"add")},S=G=>{C(G),x(),D()},k=G=>{E.time=G,N(),x(),D()},v=G=>{T(G)},F=G=>{h.view=I(G,"subtract"),y.view=G},_=G=>{C(G),x(),D()},O=G=>{L.time=G,b(),x(),D()},q=G=>{T(G)},X=G=>{if(G.id!=="-1"){if(o.isEmpty(G.start)||o.isEmpty(G.end))return;const oe=qe.getDayjsObject(G.start),R=qe.getDayjsObject(G.end);if(!oe.isValid()||!R.isValid()){we.warn("ClDateTimeRange",`快捷项 "${G.text}" 日期无效,已忽略`);return}let U=oe.format("YYYY-MM-DD"),Q=R.format("YYYY-MM-DD");const ee=s.checkMinMax(U,Q,"YYYY-MM-DD");if(!ee.isStartMax||!ee.isEndMin){we.warn("ClDateTimeRange",`快捷项 "${G.text}" 超出可选范围,已忽略`);return}ee.isStartMin||(U=ee.minDay),ee.isEndMax||(Q=ee.maxDay),E.day=U,N(),L.day=Q,b(),h.view=U;const Y=o.isEmpty(Q)?null:s.getMomentDate(Q);y.view=Y?Y.startOf("month").format(c.formatIn):I(U,"add"),g.hoverValue="",g.previewStart="",g.previewEnd="",g.selectCount=2,g.activeQuick=G.id,x(),D()}},Z=()=>{g.selectCount===2&&g.isCheck&&(i("onSubmit",{start:E.value,end:L.value}),g.isCheck=!1)},se=()=>{i("onCancel")};return l({getValue:()=>({start:E.value,end:L.value})}),(G,oe)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(m),class:e.normalizeClass(p.value),onMouseleave:A},[e.createElementVNode("div",wp,[e.createElementVNode("div",Ep,[e.createElementVNode("div",Cp,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:h.text,name:h.name},null,8,bp),e.createVNode(ke,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",xp,[e.createVNode(Ro,{selectValue:g.selectCount===2?E.value:"-1",startValue:g.previewStart||E.value,endValue:g.previewEnd||L.value,viewValue:h.view,hoverValue:g.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeViewValue:f,onOnSelectDate:S,onOnSelectTime:k,onOnHoverDate:v},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Bp,[e.createElementVNode("div",Ip,[e.createElementVNode("div",Dp,[e.createElementVNode("input",{class:"form-control time-input",type:"text",readonly:!0,value:y.text,name:y.name},null,8,Tp),e.createVNode(ke,{name:"calendar",className:"time-icon"})])]),e.createElementVNode("div",Np,[e.createVNode(Ro,{selectValue:g.selectCount===2?L.value:"-1",startValue:g.previewStart||E.value,endValue:g.previewEnd||L.value,viewValue:y.view,hoverValue:g.hoverValue,minValue:n.minValue,maxValue:n.maxValue,onOnChangeViewValue:F,onOnSelectDate:_,onOnSelectTime:O,onOnHoverDate:q},null,8,["selectValue","startValue","endValue","viewValue","hoverValue","minValue","maxValue"])])]),e.createElementVNode("div",Vp,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(R,U)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-${R.id}-${U}`,role:"button",tabindex:"0",class:e.normalizeClass({active:R.id===g.activeQuick,"calendar-quick-special":R.id==="-1"}),onClick:Q=>X(R),onKeydown:[e.withKeys(e.withModifiers(Q=>X(R),["prevent"]),["enter"]),e.withKeys(e.withModifiers(Q=>X(R),["prevent"]),["space"])]},e.toDisplayString(R.text),43,Mp))),128))]),g.isShowQuickBtn?(e.openBlock(),e.createElementBlock("div",Op,[e.createVNode(et,{className:"quick-submit",label:e.unref(d).common.submit,size:"small",disabled:g.selectCount!==2||!g.isCheck,onOnClick:Z},null,8,["label","disabled"]),e.createVNode(et,{className:"quick-cancel",label:e.unref(d).common.cancel,size:"small",color:"grayLight",onOnClick:se},null,8,["label"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],42,Sp))}}),Ap={key:3,class:"datetime-errmsg",role:"alert"},Ka=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:n=>!0,onClose:()=>!0,onInitComplete:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=`clDatetimeBase-${o.getRandom(5)}`,d=e.inject("$DateTimeTop");d||we.warn("ClDateTimeBase","未找到 $DateTimeTop 注入,请确保组件在 ClDateTime 组件树内使用");const u=e.computed(()=>!!d);t.isDefault===t.isRange&&we.warn("ClDateTimeBase",`isDefault(${t.isDefault}) 与 isRange(${t.isRange}) 必须恰好一个为 true`);const s=e.useTemplateRef("refEl");let c=!1;const m=e.computed(()=>o.isArray(t.errMsg)&&t.errMsg.length>0),p=E=>{i("onSelectValue",E)},g=()=>{i("onClose")},h=()=>{c||(c=!0,i("onInitComplete"))};return l({getValue:()=>s.value?s.value.getValue():t.isDefault?o.isNonEmptyString(t.start)?d?.getMomentDate(t.start)??t.start:null:o.isNonEmptyString(t.start)||o.isNonEmptyString(t.end)?{start:t.start,end:t.end}:""}),(E,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.value&&n.isDefault?(e.openBlock(),e.createBlock(kp,{key:0,ref_key:"refEl",ref:s,value:n.start,minValue:n.minDate,maxValue:n.maxDate,onOnSelectValue:p,onOnInitComplete:h},null,8,["value","minValue","maxValue"])):u.value&&n.isRange?(e.openBlock(),e.createBlock(_p,{key:1,ref_key:"refEl",ref:s,rangeQuick:n.rangeQuick,minValue:n.minDate,maxValue:n.maxDate,startValue:n.start,endValue:n.end,onOnSubmit:p,onOnCancel:g,onOnInitComplete:h},null,8,["rangeQuick","minValue","maxValue","startValue","endValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),m.value?(e.openBlock(),e.createElementBlock("ul",Ap,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.errMsg,(B,I)=>(e.openBlock(),e.createElementBlock("li",{key:`${r}-err-${I}`},e.toDisplayString(B),1))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],64))}}),Lp=["id"],$p=["id"],Fp="2000-01-01",la=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:n=>["default","range"].includes(n)},layerType:{type:String,default:"days",validator:n=>["years","months","days","hours","minutes","seconds"].includes(n)},timeType:{type:String,default:"date",validator:n=>["date","time","datetime"].includes(n)},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:n=>["default","noBorder"].includes(n)},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":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("dataTime");const u=`datetime-${o.getRandom(8)}`,s=t.id,c=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElDatetime"),p=e.reactive({isInit:!1,isDefault:t.theme!=="range",isRange:t.theme==="range",isShowPopup:t.isDropdown,timeType:"",layerType:t.layerType,layerView:"",formatIn:"",formatOut:"",formatOutEnd:"",rangeQuick:[],errMsg:[]}),g=e.reactive({showText:"",start:"",end:""}),h={lastStart:"",lastEnd:""},y=e.computed(()=>{let ee=t.arrowDirection;return o.isEmpty(ee)&&(ee=t.themeStyle==="noBorder"?"left":"right"),ee}),E=e.computed(()=>{let ee={"panel-date-time":!0};return t.themeStyle==="noBorder"&&(ee["datetime-themeStyle-noBorder"]=!0),t.themeStyle==="noBorder"&&o.isEmpty(g.showText)&&(ee["datetime-empty"]=!0),t.isDropdown||(ee["datetime-noPopup"]=!0,ee[`datetime-${t.theme}`]=!0),ee=o.getJsonMerge(ee,me.getClassNameJson(t.className)),o.getStringByJson(ee," ")}),L=e.computed(()=>`datetime-dropdown datetime-${t.theme} datetime-dropdown-${t.theme}`),B=e.computed(()=>{let ee={"panel-date-time":!0};return ee=o.getJsonMerge(ee,me.getClassNameJson(t.className)),`${o.getStringByJson(ee," ")} cl-plaintext-value`}),I=e.computed(()=>{const ee=g.showText,Y=o.isString(t.plaintextSeparator)?t.plaintextSeparator:" ~ ";return!p.isRange||Y===" ~ "?ee:ee.split(" ~ ").join(Y)}),M=e.computed(()=>Je.getPlaintextOutText("dateTime",t.plaintextEmptyText,I.value,t.value)),N=()=>[{id:"today",text:r.value.today,start:Me(),end:Me()},{id:"yesterDay",text:r.value.yesterDay,start:Me().subtract(1,"day"),end:Me().subtract(1,"day")},{id:"pastDays7",text:r.value.pastDays7,start:Me().subtract(7,"day"),end:Me().subtract(1,"day")},{id:"pastDays30",text:r.value.pastDays30,start:Me().subtract(30,"day"),end:Me().subtract(1,"day")},{id:"mont",text:r.value.montCurrent,start:Me().startOf("month"),end:Me().endOf("month")},{id:"montLast",text:r.value.montLast,start:Me().subtract(1,"month").startOf("month"),end:Me().subtract(1,"month").endOf("month")}],b=()=>[{id:"mont",text:r.value.montCurrent,start:Me().startOf("month"),end:Me().endOf("month")},{id:"montLast",text:r.value.montLast,start:Me().subtract(1,"month").startOf("month"),end:Me().subtract(1,"month").endOf("month")},{id:"montLately6",text:r.value.montLately6,start:Me().subtract(5,"month").startOf("month"),end:Me().endOf("month")},{id:"year",text:r.value.yearCurrent,start:Me().startOf("year"),end:Me().endOf("year")},{id:"yearLast",text:r.value.yearLast,start:Me().subtract(1,"year").startOf("year"),end:Me().subtract(1,"year").endOf("year")}],V=()=>[{id:"year",text:r.value.yearCurrent,start:Me().startOf("year"),end:Me().endOf("year")},{id:"yearLast",text:r.value.yearLast,start:Me().subtract(1,"year").startOf("year"),end:Me().subtract(1,"year").endOf("year")}],w=ee=>{const Y=o.isEmpty(ee.start),H=o.isEmpty(ee.end),te=Y?"":Me(ee.start).format(p.formatIn),$=H?"":Me(ee.end).format(p.formatIn),z=p.isDefault?te:Y||H?"":`${te}~${$}`,ce=p.isDefault?{value:te}:{start:te,end:$,value:z};return{value:z,info:ce}},T=()=>{c.value&&c.value.setOpen(!1)},C=()=>p.timeType==="time",D=ee=>{if(!ee)return"";const Y=o.isString(ee)?o.trim(ee):"";return C()?/^\d{4}-\d{2}-\d{2}/.test(Y)?Y:`${Fp} ${Y}`:Y},J=()=>Me(),ne=(ee,Y)=>{let H=null;if(!o.isEmpty(ee)){const te=o.isUndefined(Y)?p.formatIn:Y;H=o.isString(ee)?Me(ee,te):Me(ee),H&&!H.isValid()&&(H=null)}return H},K=ee=>{const Y=ne(ee);return Y?Y.startOf("month"):J().startOf("month")},P=(ee,Y,H)=>{const te=o.isEmpty(H)?p.formatIn:H;let $="";if(!o.isEmpty(t.minDate)){const be=ne(D(t.minDate));$=be?be.format(te):""}let z="";if(!o.isEmpty(t.maxDate)){const be=ne(D(t.maxDate));z=be?be.format(te):""}let ce=!0,de=!0,ie=!0,ae=!0,W=!0,j=!1;const ue=o.isEmpty(ee),pe=o.isEmpty(Y);let he;switch(t.layerType){case"years":he="year";break;case"months":he="month";break;case"days":he="day";break;case"hours":he="hour";break;case"minutes":he="minute";break;case"seconds":he="second";break;default:he="day";break}if(!ue){const be=Me(ee);if(be.isValid()&&(o.isEmpty($)||(ce=be.isSameOrAfter($,he)),o.isEmpty(z)||(de=be.isSameOrBefore(z,he)),!pe)){const xe=Me(Y);xe.isValid()&&(o.isEmpty($)||(ie=xe.isSameOrAfter($,he)),o.isEmpty(z)||(ae=xe.isSameOrBefore(z,he)),xe.isBefore(be)&&(W=!1))}}const ye=[],Ce=p.isRange?r.value.rangeStartLabel:"";return de?ie?(ce||ye.push(`${Ce}${r.value.checkStartMinLabel}(${ne($,te)?.format(p.formatOut)??$})`),ae||ye.push(`${r.value.checkEndMaxLabel}(${ne(z,te)?.format(p.formatOut)??z})`)):ye.push(`${r.value.checkEndMinLabel}(${ne($,te)?.format(p.formatOut)??$})`):ye.push(`${Ce}${r.value.checkStartMaxLabel}(${ne(z,te)?.format(p.formatOut)??z})`),p.isRange&&((ue||pe)&&(j=!0,ye.push(r.value.checkRangeEmptyLabel)),W||ye.push(r.value.checkStartEndLabel)),{isStartMin:ce,isStartMax:de,isEndMin:ie,isEndMax:ae,isStartEnd:W,isRangeEmpty:j,errMsg:ye,minDay:$,maxDay:z}},x=(ee,Y,H)=>{const te=P(ee,Y||"",H);return p.errMsg=te.errMsg,c.value&&e.nextTick(()=>{c.value?.calculationPosition()}),te},A=()=>{let ee=[];switch(t.layerType){case"days":case"hours":case"minutes":case"seconds":ee=p.timeType==="time"?[]:N();break;case"months":ee=b();break;case"years":ee=V();break}return ee},f=()=>{let ee=[];p.isRange&&(o.isArray(t.rangeQuick)&&t.rangeQuick.length>0?ee=[...t.rangeQuick]:ee=A()),p.rangeQuick=ee},S=()=>{["default","range"].includes(t.theme)||we.warn("ClDateTime",`theme 非法值 "${t.theme}",可选值 default/range`),["years","months","days","hours","minutes","seconds"].includes(t.layerType)||we.warn("ClDateTime",`layerType 非法值 "${t.layerType}"`),["date","time","datetime"].includes(t.timeType)||we.warn("ClDateTime",`timeType 非法值 "${t.timeType}"`),["default","noBorder"].includes(t.themeStyle)||we.warn("ClDateTime",`themeStyle 非法值 "${t.themeStyle}"`)},k=()=>{S();let ee="",Y="",H="";switch(t.layerType){case"years":ee="date",Y="YYYY",H=t.layerType;break;case"months":ee="date",Y="YYYY-MM",H=t.layerType;break;case"days":ee="date",Y="YYYY-MM-DD",H=t.layerType;break;case"hours":ee=t.timeType==="date"?"datetime":t.timeType,Y=ee==="time"?"HH:00":"YYYY-MM-DD HH:00",H=ee==="datetime"?"days":"times";break;case"minutes":ee=t.timeType==="date"?"datetime":t.timeType,Y=ee==="time"?"HH:mm":"YYYY-MM-DD HH:mm",H=ee==="datetime"?"days":"times";break;case"seconds":ee=t.timeType==="date"?"datetime":t.timeType,Y=ee==="time"?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss",H=ee==="datetime"?"days":"times";break;default:ee="date",Y="YYYY-MM-DD",H=t.layerType;break}p.timeType=ee,p.layerView=H,p.formatIn=ee==="date"?"YYYY-MM-DD":"YYYY-MM-DD HH:mm:ss",p.formatOut=o.isNonEmptyString(t.format)?t.format:Y,p.formatOutEnd=o.isNonEmptyString(t.formatEnd)?t.formatEnd:Y},v=ee=>{let Y="",H="",te="";if(o.isNonEmptyString(ee)){if(p.isDefault){const $=D(ee),z=Me($);z.isValid()&&(H=z.format(p.formatIn),Y=z.format(p.formatOut))}else if(p.isRange){const $=ee.split("~");if($.length===2){const z=D($[0]),ce=D($[1]),de=Me(z),ie=Me(ce);de.isValid()&&ie.isValid()&&(H=de.format(p.formatIn),te=ie.format(p.formatIn),Y=`${de.format(p.formatOut)} ~ ${ie.format(p.formatOutEnd)}`)}}}g.start=H,g.end=te,g.showText=Y},F=ee=>{let Y=!0;if(t.checkCallback&&!o.isEmpty(ee)){try{p.isDefault?Y=t.checkCallback(ee):p.isRange&&(Y=t.checkCallback(ee.start,ee.end))}catch(H){we.warn("ClDateTime","checkCallback 回调执行异常,本次选择不生效",H),Y=!1}Y=o.isBoolean(Y)?Y:!0}return Y},_=ee=>{let Y="",H="",te="",$=!1;if(p.isDefault){if(!o.isEmpty(ee)){const de=ne(ee);de&&(H=de.format(p.formatIn),Y=de.format(p.formatOut))}$=H!==h.lastStart}else if(p.isRange){if(!o.isEmpty(ee)&&!o.isEmpty(ee.start)&&!o.isEmpty(ee.end)){const de=ne(ee.start),ie=ne(ee.end);de&&ie&&(H=de.format(p.formatIn),te=ie.format(p.formatIn),Y=`${de.format(p.formatOut)} ~ ${ie.format(p.formatOutEnd)}`)}$=H!==h.lastStart||te!==h.lastEnd}const z=P(H,te);let ce=!1;return z.errMsg.length===0&&(ce=F(ee)),p.errMsg=z.errMsg,c.value&&e.nextTick(()=>{c.value?.calculationPosition()}),{start:H,end:te,text:Y,isChange:$,checkInfo:z,isCheck:ce}},O=()=>{k(),f(),v(t.value),e.nextTick(()=>{p.isInit=!0})},q=()=>{const ee=m.value?.getValue();let Y="",H="";if(p.isDefault){if(!o.isEmpty(ee)){const te=ne(ee);te&&(Y=te.format(p.formatIn))}}else if(p.isRange){const te=ee;if(!o.isEmpty(te?.start)&&!o.isEmpty(te?.end)){const $=ne(te?.start),z=ne(te?.end);$&&z&&(Y=$.format(p.formatIn),H=z.format(p.formatIn))}}return w({start:Y,end:H})};e.onMounted(()=>{e.nextTick(()=>{O()})}),e.watch(()=>t.value,(ee,Y)=>{ee!==Y&&(v(ee),h.lastStart=g.start,h.lastEnd=g.end)}),e.watch(()=>t.isDropdown,ee=>{p.isShowPopup=ee}),e.watch([()=>t.theme,()=>t.layerType,()=>t.timeType,()=>t.format,()=>t.formatEnd],()=>{p.isDefault=t.theme!=="range",p.isRange=t.theme==="range",k(),f(),v(t.value),h.lastStart=g.start,h.lastEnd=g.end});const X=ee=>{t.disabled||ee&&(p.errMsg=[],h.lastStart=g.start,h.lastEnd=g.end,f())},Z=()=>{if(!t.disabled){g.start="",g.end="",g.showText="",h.lastStart="",h.lastEnd="";const ee=w(g);i("update:value",ee.value),i("update:modelValue",ee.value),i("onChange",ee.value,ee.info)}},se=ee=>{if(!t.disabled){const{start:Y,end:H,text:te,isChange:$,isCheck:z}=_(ee);if(z&&(g.start=Y,g.end=H,g.showText=te,h.lastStart=Y,h.lastEnd=H,T(),$)){const ce=w(g);i("update:value",ce.value),i("update:modelValue",ce.value),i("onChange",ce.value,ce.info)}}},le=()=>{T()};let G=!1;const oe=()=>{p.isShowPopup&&c.value&&(c.value.checkIsShowOpen()||c.value.initCompleteOpen()),G||(G=!0,i("onInit"))};return e.provide("$DateTimeTop",{keyIndex:u,elId:t.id,getMomentDate:ne,getViewDate:K,getNow:J,checkIsTimes:C,checkValue:x,checkMinMax:P,getValueEffective:D,getMergeDayTime:(ee,Y)=>{let H="";const te=o.isString(ee)?o.trim(ee):"";let $=o.isString(Y)?o.trim(Y):"";switch(p.timeType){case"date":H=te;break;case"time":H=D($)||"";break;case"datetime":o.isEmpty(te)||($=o.isEmpty(Y)?"00:00:00":$,H=`${te} ${$}`);break}return H},Dayjs:Me}),e.provide("$DateTimeTopBase",e.readonly(p)),l({getValue:()=>q().value,getValueData:()=>q().info,setValue:ee=>{v(ee),h.lastStart=g.start,h.lastEnd=g.end}}),(ee,Y)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:e.normalizeClass(B.value)},e.toDisplayString(M.value),11,Lp)):n.isDropdown?(e.openBlock(),e.createBlock(kn,{key:1,ref_key:"refElDropdownLayer",ref:c,id:e.unref(s),classParent:E.value,classDropDown:L.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:g.showText,textArrowDirection:y.value,dropdownArrowPos:n.direction,isUseDropdownArrow:n.isUseDropdownArrow,appendContainer:n.appendContainer,appendFollowWidth:!1,onOnChangeOpen:X,onOnClear:Z},{textExtend:e.withCtx(()=>[e.createVNode(ke,{name:p.timeType==="time"?"clock":"calendar",className:"datetime-icon","aria-hidden":"true"},null,8,["name"])]),dropdown:e.withCtx(()=>[e.createVNode(Ka,{ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:g.start,end:g.end,minDate:n.minDate,maxDate:n.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:se,onOnClose:le,onOnInitComplete:oe},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(s),class:e.normalizeClass(E.value)},[p.isInit?(e.openBlock(),e.createBlock(Ka,{key:0,ref_key:"refElDatetime",ref:m,isDefault:p.isDefault,isRange:p.isRange,start:g.start,end:g.end,minDate:n.minDate,maxDate:n.maxDate,rangeQuick:p.rangeQuick,errMsg:p.errMsg,onOnSelectValue:se,onOnClose:le,onOnInitComplete:oe},null,8,["isDefault","isRange","start","end","minDate","maxDate","rangeQuick","errMsg"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,$p))}}),Pp=["id"],Rp={class:"dropdownLayer-text-render"},Hp={class:"dropdownLayer-text-arrow"},Up=["id"],zp=["aria-labelledby"],Ql=e.defineComponent({name:"ClDropdownMenu",__name:"Index",props:{id:String,className:String,classDropDown:String,label:String,direction:{type:String,default:"left",validator:n=>["left","right","center","top","bottom"].includes(n)},dropDownPos:{type:String,default:"down",validator:n=>["down","up","left","right"].includes(n)},isUseLabelArrow:{type:Boolean,default:!1},isUseDropdownArrow:{type:Boolean,default:!1},transitionEnter:String,transitionLeave:String},emits:{onChangeOpen:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=o.isNonEmptyString(i)?`${i}-label`:void 0,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let w={"panel-dropdown-menu":!0};return w=o.getJsonMerge(w,me.getClassNameJson(a.className)),Object.keys(w).join(" ")}),s=e.ref([]),c=e.ref(void 0),m=e.reactive({isOpen:!1}),p=()=>s.value.filter(w=>!w.disabled),g=()=>{p().some(C=>C.id===c.value)||(c.value=void 0)},h=w=>{w&&(c.value=w.id,w.focus())},y=w=>{const T=p();if(T.length===0)return;const C=T.findIndex(J=>J.id===c.value);let D;C<0?D=w>0?0:T.length-1:D=(C+w+T.length)%T.length,h(T[D])},E=w=>{s.value.some(T=>T.id===w.id)||s.value.push(w),g()},L=w=>{s.value=s.value.filter(T=>T.id!==w.id),c.value===w.id&&(c.value=void 0),g()},B=()=>c.value,I=w=>{c.value=w},M=()=>{const w=d.value?.$el;return w?w.querySelector(".dropdownLayer-text"):null},N=w=>{if(m.isOpen)switch(w.key){case"ArrowDown":w.preventDefault(),y(1);break;case"ArrowUp":w.preventDefault(),y(-1);break;case"Home":{w.preventDefault();const T=p();h(T[0]);break}case"End":{w.preventDefault();const T=p();h(T[T.length-1]);break}}},b=()=>{M()?.focus()},V=w=>{t("onChangeOpen",w),m.isOpen=w,w?c.value=void 0:b()};return e.onMounted(()=>{document.addEventListener("keydown",N,!0)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",N,!0)}),e.provide("$DropdownmenuTop",e.reactive({hideDropdown:()=>{d.value?.setOpen(!1)},registerItem:E,unregisterItem:L,activeItemId:B,setActiveItemId:I})),(w,T)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(i),classParent:u.value,classDropDown:n.classDropDown,dropdownArrowPos:n.direction,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,onOnChangeOpen:V},{label:e.withCtx(()=>[n.isUseLabelArrow?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"dropdownLayer-text-container"},[e.createElementVNode("div",Rp,[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),e.createElementVNode("div",Hp,[e.createVNode(ke,{name:"angle-down"})])],8,Pp)):(e.openBlock(),e.createElementBlock("span",{key:1,id:e.unref(r)},[e.renderSlot(w.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],8,Up))]),dropdown:e.withCtx(()=>[e.createElementVNode("ul",{role:"menu","aria-labelledby":e.unref(r)},[e.renderSlot(w.$slots,"default")],8,zp)]),_:3},8,["id","classParent","classDropDown","dropdownArrowPos","dropDownPos","isUseDropdownArrow","transitionEnter","transitionLeave"]))}}),Jp=["id"],Kp=["id","tabindex","aria-disabled"],Zl=e.defineComponent({name:"ClDropdownMenuItem",__name:"Item",props:{id:String,className:String,url:String,disabled:{type:Boolean,default:!1},isDivider:{type:Boolean,default:!1},extData:Object},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.inject("$DropdownmenuTop"),d=e.useTemplateRef("refElItem"),u=o.isNonEmptyString(i)?i:`dropdownMenuItem-${o.getRandom(8)}`,s=e.computed(()=>{let h={"dropdownMenu-item":!0,"dropdownMenu-item-disabled":a.disabled,"panel-dropdown-menu-item":!0};return h=o.getJsonMerge(h,me.getClassNameJson(a.className)),h}),c=e.computed(()=>{if(!(a.disabled||a.isDivider))return r?.activeItemId()===u?0:-1}),m=()=>{d.value?.focus()},p=()=>{a.disabled||r?.setActiveItemId(u)};e.onMounted(()=>{a.isDivider||r?.registerItem({id:u,disabled:a.disabled,focus:m})}),e.onBeforeUnmount(()=>{a.isDivider||r?.unregisterItem({id:u,disabled:a.disabled,focus:m})});const g=()=>{a.disabled||(r?.hideDropdown(),t("onClick",a.extData))};return(h,y)=>n.isDivider?(e.openBlock(),e.createElementBlock("li",{key:0,id:e.unref(i),role:"separator",class:"dropdownMenu-divider"},null,8,Jp)):(e.openBlock(),e.createElementBlock("li",{key:1,id:e.unref(i),role:"menuitem",tabindex:c.value,"aria-disabled":n.disabled?"true":void 0,class:e.normalizeClass(s.value),ref_key:"refElItem",ref:d,onFocus:p},[e.createVNode(Nt,{url:n.url,disabled:n.disabled,isHideUnderline:!0,onOnClick:g},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default")]),_:3},8,["url","disabled"])],42,Kp))}}),ei=e.defineComponent({name:"ClDropdownPopup",__name:"Index",props:{id:String,className:{type:String,default:""},dropdownArrowPos:{type:String,default:"center"},dropDownPos:{type:String,default:"up"},isUseDropdownArrow:{type:Boolean,default:!0},appendContainer:{type:String,default:""},transitionEnter:{type:String,default:"animated fadeIn"},transitionLeave:{type:String,default:"animated fadeOut"},triggers:{type:String,default:"click"}},emits:{onChangeOpen:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.computed(()=>{let h={"panel-dropdown-popup":!0};return h=o.getJsonMerge(h,me.getClassNameJson(t.className)),Object.keys(h).filter(y=>h[y]).join(" ")}),s=h=>{i("onChangeOpen",h)};return l({setOpen:h=>{if(!d.value){we.warn("DropdownPopup","子组件尚未挂载,setOpen 调用已忽略");return}d.value.setOpen(h)},calculationPosition:()=>{if(!d.value){we.warn("DropdownPopup","子组件尚未挂载,calculationPosition 调用已忽略");return}d.value.calculationPosition()},initCompleteOpen:()=>{if(!d.value){we.warn("DropdownPopup","子组件尚未挂载,initCompleteOpen 调用已忽略");return}d.value.initCompleteOpen()},checkCurrentIsOpen:()=>{if(!d.value){we.warn("DropdownPopup","子组件尚未挂载,checkCurrentIsOpen 调用已忽略");return}return d.value.checkIsShowOpen()}}),(h,y)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:u.value,classDropDown:"dropdownPopup-dropdown",dropdownArrowPos:n.dropdownArrowPos,dropDownPos:n.dropDownPos,isUseDropdownArrow:n.isUseDropdownArrow,appendContainer:n.appendContainer,transitionEnter:n.transitionEnter,transitionLeave:n.transitionLeave,triggers:n.triggers,onOnChangeOpen:s},{label:e.withCtx(()=>[e.renderSlot(h.$slots,"label")]),dropdown:e.withCtx(()=>[e.renderSlot(h.$slots,"dropdown")]),_:3},8,["id","classParent","dropdownArrowPos","dropDownPos","isUseDropdownArrow","appendContainer","transitionEnter","transitionLeave","triggers"]))}}),Wp=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],jp={color:Wp,title:{textStyle:{fontWeight:"normal",color:"#008acd"}},visualMap:{itemWidth:15,color:["#5ab1ef","#e0ffff"]},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#008acd"},crossStyle:{color:"#008acd"},shadowStyle:{color:"rgba(200,200,200,0.2)"}}},dataZoom:{dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd"},grid:{borderColor:"#eee"},categoryAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitLine:{lineStyle:{color:["#eee"]}}},valueAxis:{axisLine:{lineStyle:{color:"#008acd"}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.1)","rgba(200,200,200,0.1)"]}},splitLine:{lineStyle:{color:["#eee"]}}},timeline:{lineStyle:{color:"#008acd"},controlStyle:{color:"#008acd",borderColor:"#008acd"},symbol:"emptyCircle",symbolSize:3},line:{smooth:!0,symbol:"emptyCircle",symbolSize:3},candlestick:{itemStyle:{color:"#d87a80",color0:"#2ec7c9"},lineStyle:{width:1,color:"#d87a80",color0:"#2ec7c9"},areaStyle:{color:"#2ec7c9",color0:"#b6a2de"}},scatter:{symbol:"circle",symbolSize:4},map:{itemStyle:{color:"#2ec7c9"},label:{color:"#000000"}},graph:{itemStyle:{color:"#d87a80"},linkStyle:{color:"#2ec7c9"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#2ec7c9"],[.8,"#5ab1ef"],[1,"#d87a80"]],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:"auto"}},splitLine:{length:22,lineStyle:{color:"auto"}},pointer:{width:5}}},Yp=["id"],ia=e.defineComponent({name:"ClEcharts",__name:"Index",props:{id:String,chartOption:Object,className:String,height:{type:[Number,String],default:400},isRunLoad:{type:Boolean,default:!1}},emits:["onInitFirst","onHideResize","onError"],setup(n,{expose:l,emit:a}){let t=null,i=!1;const r=()=>(t||(t=import("echarts")),t),d=n,u=a,s=d.id,c=e.useTemplateRef("refElChart"),m=e.reactive({isShowLoad:d.isRunLoad,isEmptyData:!1}),p={resizeEvent:null,chartObject:null,initTimer:null,isHideEmit:!1},g=e.computed(()=>{let T={"panel-echarts":!0,"chart-loading":m.isShowLoad||m.isEmptyData};return T=o.getJsonMerge(T,me.getClassNameJson(d.className)),T}),h=e.computed(()=>{const T={};return(m.isShowLoad||m.isEmptyData)&&(T.height="100%"),T}),y=e.computed(()=>{const T={},{height:C}=d;return typeof C=="number"&&o.isFinite(C)&&C>0?T.height=`${C}px`:o.isNonEmptyString(C)&&(T.height=C),T}),E=()=>{u("onHideResize")},L=()=>{u("onInitFirst")},B=()=>{p.chartObject&&p.chartObject.resize()},I=async T=>{if(!c.value)return;const C=o.isEmpty(T);if(m.isEmptyData=C,!C&&T)try{const D=await r();i||(D.registerTheme("macarons",jp),i=!0),p.chartObject||(p.chartObject=D.init(c.value,"macarons"),p.initTimer=setTimeout(()=>{L()},50)),p.chartObject.setOption(T,!0),B()}catch{p.initTimer&&(clearTimeout(p.initTimer),p.initTimer=null),u("onError","图表配置异常")}else p.chartObject&&p.chartObject.clear()},M=()=>{p.chartObject&&(me.isHiddenParent(c.value)?p.isHideEmit||(p.isHideEmit=!0,E()):(p.isHideEmit&&(p.isHideEmit=!1),B()))},N=()=>{I(d.chartOption)};return e.onMounted(()=>{p.resizeEvent=new Ye.Resize({callback:()=>{M()}}),e.nextTick(()=>{N()})}),e.onBeforeUnmount(()=>{p.resizeEvent&&p.resizeEvent.destroy(),p.initTimer&&clearTimeout(p.initTimer),p.chartObject&&(p.chartObject.dispose(),p.chartObject=null)}),e.onActivated(()=>{p.resizeEvent||(p.resizeEvent=new Ye.Resize({callback:()=>{M()}})),e.nextTick(()=>{B()})}),e.onDeactivated(()=>{p.resizeEvent&&(p.resizeEvent.destroy(),p.resizeEvent=null)}),e.watch(()=>d.isRunLoad,T=>{m.isShowLoad=T}),e.watch(()=>d.chartOption,T=>{I(T)}),l({getChartObject:()=>p.chartObject,getChartElement:()=>c.value,resize:()=>{B()}}),(T,C)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(g.value),style:e.normalizeStyle(h.value)},[e.renderSlot(T.$slots,"chartHead"),e.createElementVNode("div",{ref_key:"refElChart",ref:c,style:e.normalizeStyle(y.value),role:"img","aria-label":"图表"},null,4),e.createVNode(Gt,{isLoadIng:m.isShowLoad,isEmpty:m.isEmptyData},{nothingData:e.withCtx(()=>[e.renderSlot(T.$slots,"nothingData")]),_:3},8,["isLoadIng","isEmpty"])],14,Yp))}}),qp={key:0,class:"lineAxisTag-head"},Xp={class:"lineAxisTag-list"},Gp="其他",ti=e.defineComponent({name:"ClEchartsLineAxisTag",__name:"Index",props:{id:String,className:String,type:{type:String,validator:n=>n==="day"||n==="hour"},height:{type:Number,default:400,validator:n=>n>0},isRunLoad:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isTagShow:{type:Boolean,default:!0},tagList:{type:Array,default:()=>[]},tagSelectCountMax:{type:Number,validator:n=>n>0&&n<=2,default:2},tagInitValue:{type:String,default:""},tagSort:{type:Array,default:()=>[]},xAxisLen:{type:Number,default:-1},xAxisKey:{type:String,default:"name"},xAxisIsShowOther:{type:Boolean,default:!1},isShowY:{type:Boolean,default:!0},isYMinZero:{type:Boolean,default:!0},ySpace:{type:Number,default:5,validator:n=>n>0},yRatio:{type:Number,default:1.5},isYEqual:{type:Boolean,default:!1},seriesType:{type:String,default:"line",validator:n=>o.isString(n)&&n.split(",").every(l=>l==="line"||l==="bar")},tipFormat:String,seriesFormat:String,isShowLineBg:{type:Boolean,default:!0},isXBoundaryGap:{type:Boolean,default:!0},gridInfo:{type:Object,default:()=>({})}},emits:["onInitFirst","onHideResize","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=x=>{i("onError",x)},d=`echartsLineAxisTag-${o.getRandom(5)}`,u=t.id,s=e.useTemplateRef("refElChart"),c=e.ref(),m=e.ref([]),p=e.computed(()=>o.isArray(t.tagList)?t.tagList.filter(x=>!o.isUndefined(x)&&!o.isUndefined(x.id)):[]),g={tagSort:[],tagJson:{},chartTagJson:{},useSeriesType:["line","bar"],isInited:!1},h=e.computed(()=>{const x=t.seriesType,A=o.isNonEmptyString(x)?x.split(","):[],f=A.length===1?A[0]:"line",S=t.tagSelectCountMax>0?t.tagSelectCountMax:2,k=A.length-1,v=[];for(let F=0;F<S;F++)v.push(F<=k&&g.useSeriesType.indexOf(A[F])>-1?A[F]:f);return v}),y=e.computed(()=>{let x={"panel-echarts-line-axis-tag":!0};return x=o.getJsonMerge(x,me.getClassNameJson(t.className)),o.getStringByJson(x," ")}),E=()=>{i("onHideResize")},L=()=>{i("onInitFirst")},B=()=>{let x=[];const A={};if((o.isArray(t.tagList)?t.tagList:[]).forEach(S=>{if(o.isUndefined(S)||o.isUndefined(S.id))return;const k=S.id.toString();A[k]=S,x.push(k)}),!o.isEmpty(t.tagSort)){const S=[];t.tagSort.forEach(k=>{o.isExistJsonKey(A,k)&&S.push(k)}),S.length>0&&(x=S)}g.tagSort=x,g.tagJson=A},I=x=>{if(x.length===0)return[];const A=t.tagSelectCountMax;return Array.from(new Set(x)).sort((S,k)=>g.tagSort.indexOf(S)-g.tagSort.indexOf(k)).slice(0,A)},M=x=>{let A=[];o.isNonEmptyString(x)&&(x.split(",").forEach(f=>{o.isExistJsonKey(g.tagJson,f)&&A.push(f)}),A=I(A)),m.value=A},N=x=>{const A={name:[],allName:[]},f={},S=[],k={};g.tagSort.forEach(F=>{const _=o.getJsonClone(g.tagJson[F],!0);_.aliasName=o.isUndefined(_.nameFormat)?_.name:o.convertStringFormat(_.nameFormat,_),_.data=[],_.alldata=[],f[F]=_,k[F]=0});let v=x.length;return t.xAxisLen>0&&(v=v>t.xAxisLen?t.xAxisLen:v),x.forEach((F,_)=>{_<v&&S.push(F);let O=o.isExistJsonKey(F,t.xAxisKey)?F[t.xAxisKey]:"";(o.isUndefined(O)||O===null)&&(O=""),A.allName.push(O),_<v&&(t.type==="day"&&(O=o.getValueByFormat(O,"date",{dateFormat:"MM.DD"})),A.name.push(O)),g.tagSort.forEach(q=>{if(o.isExistJsonKey(F,q)){let X=Number(F[q]);o.isFinite(X)||(X=0),f[q].alldata.push(X),_<v?f[q].data.push(X):k[q]+=X}else f[q].alldata.push(0),_<v&&f[q].data.push(0)})}),{x:A,y:f,data:S,other:k,isEmptyData:v===0}},b=()=>{const x=I(m.value),A=h.value,{xAxisLen:f,xAxisIsShowOther:S,ySpace:k,yRatio:v,isYMinZero:F,isYEqual:_}=t;return x.map((O,q)=>{const X=g.tagJson[O];let Z=F;return Z=o.isBoolean(X.isYMinZero)?X.isYMinZero:Z,{name:O,color:X.color||null,type:A[q],len:f,isShowOther:S,ySpace:k,yMaxRatio:q===1?_?1:v:1,isYMinZero:Z}})},V=(x,A,f,S)=>{if(x.length===0)return{min:0,max:1,interval:1};const k=A>0?A:1,v=x.map(le=>le.value);let F=v.reduce((le,G)=>Math.min(le,G));F=o.getNumCeil(F,{isEndFive:Number(F)<100});let _=v.reduce((le,G)=>Math.max(le,G));_=_*1.02,_=o.getNumCeil(_,{isEndFive:Number(F)<100});const O=S?0:F,q=f>1?f:1;let X=_*q-O;X<=0&&(X=1);let Z=o.getNumCeil(X/k,{isEndFive:Number(F)<100}),se=Number((k*Z).toFixed(2))+O;return O===se&&se===0&&(se=1,Z=1/k),{min:O,max:se,interval:Z}},w=(x,A)=>{const f=[],S=[],k=[];let v=[];const F=h.value,_=F.length>0&&F.every(O=>O==="line");if(A.forEach((O,q)=>{const X=x.y[O.name],Z=X.name;f.push(Z);const se={};X.valueFormat&&(se.tipValueFormat=X.valueFormat);let le=[];x.isEmptyData?le=[]:(le=X.data.map((R,U)=>{const Q={value:R,extInfo:o.getJsonClone(se)};return Q.extInfo.xValueOriginal=x.x.allName[U],Q}),O.isShowOther&&O.len>0&&O.len<X.alldata.length&&le.push({value:o.getValueByFormat(x.other[O.name],"num"),extInfo:se}));const G={name:Z,type:O.type,yAxisIndex:q,data:le};o.isEmpty(O.color)||(G.itemStyle={color:O.color}),_&&t.isShowLineBg&&(G.areaStyle={}),S.push(G);const oe=V(le,O.ySpace,O.yMaxRatio,O.isYMinZero);k.push({type:"value",name:X.aliasName,nameLocation:"end",nameTextStyle:{color:"#aaa"},splitNumber:O.ySpace,min:x.isEmptyData?0:oe.min,max:x.isEmptyData?1:oe.max,interval:x.isEmptyData?1:oe.interval,axisLine:{show:!0}})}),x.isEmptyData||(v=o.getArrClone(x.x.name),A[0].isShowOther&&A[0].len>0&&A[0].len<x.x.allName.length&&v.push(Gp)),k.length===2&&t.isYEqual){const O=[k[0].min,k[1].min],q=[k[0].max,k[1].max],X=Math.min.apply(null,O),Z=Math.max.apply(null,q),se=t.ySpace>0?t.ySpace:1,le=(Z-X)/se,G=X,oe=o.getNumCeil(le),R=Number((se*oe).toFixed(2))+G;k[0].min=k[1].min=G,k[0].max=k[1].max=R,k[0].interval=k[1].interval=oe}return{legendData:f,series:S,yAxis:k,xNames:v,xAxisBoundaryGap:t.isShowLineBg?!_:t.isXBoundaryGap}},T=x=>{const A=b();if(A.length===0){c.value={};return}const f=w(x,A),S={chartType:t.type,dataOriginal:x.data,element:s.value?.getChartElement(),tipTitleFormat:t.tipFormat,seriesNameFormat:t.seriesFormat},k=Ri.getOptionAxis(S);k.legend.show=!1,k.legend.data=f.legendData,k.xAxis.data=f.xNames,k.yAxis=f.yAxis,k.series=f.series,k.xAxis.boundaryGap=f.xAxisBoundaryGap,k.grid.top="40px",k.grid.left=f.yAxis[0].max===0?"20px":"auto",k.grid.right=f.yAxis.length>1&&f.yAxis[1].max===0?"20px":"auto",k.yAxis.length===1&&!f.xAxisBoundaryGap&&(k.grid.right="20px");const{gridInfo:v}=t;o.isEmpty(v)||["top","left","right","bottom"].forEach(F=>{const _=v[F];o.isEmpty(_)||(k.grid[F]=_)}),k.yAxis.forEach(F=>{F.show=t.isShowY}),c.value=k},C=x=>{const A=o.isArray(x)?x:[];if(g.isInited=!0,g.chartTagJson=N(A),A.length===0){c.value={};return}T(g.chartTagJson)},D=()=>{B(),M(t.tagInitValue),C(t.list)};e.onMounted(()=>{e.nextTick(()=>{g.isInited||D()})}),e.watch([()=>t.list,()=>t.tagList,()=>t.tagSort,()=>t.tagInitValue],()=>{B();const x=m.value.some(A=>!g.tagJson[A]);(m.value.length===0||x)&&M(t.tagInitValue),C(t.list)});const J=x=>{if(o.isUndefined(x))return;const A=x.toString();let f=[];switch(t.tagSelectCountMax){case 1:f=[A];break;case 2:{f=o.getArrClone(m.value);const S=f.indexOf(A);S>-1?f.length>1&&f.splice(S,1):(f.push(A),f.length>2&&f.splice(0,1));break}}m.value=f,T(g.chartTagJson)},ne=()=>{L()},K=()=>{E()};return l({resize:()=>{s.value?.resize()}}),(x,A)=>(e.openBlock(),e.createBlock(ia,{ref_key:"refElChart",ref:s,id:e.unref(u),chartOption:c.value,className:y.value,height:n.height,isRunLoad:n.isRunLoad,onOnInitFirst:ne,onOnHideResize:K,onOnError:r},{chartHead:e.withCtx(()=>[n.isTagShow?(e.openBlock(),e.createElementBlock("div",qp,[e.createElementVNode("div",null,[e.renderSlot(x.$slots,"title")]),e.createElementVNode("div",Xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(f,S)=>(e.openBlock(),e.createElementBlock("span",{key:`${d}-list-${f.id}-${S}`,class:e.normalizeClass({active:m.value.indexOf(f.id.toString())>-1})},[e.createVNode(et,{color:"white",label:f.name,onOnClick:k=>J(f.id)},null,8,["label","onOnClick"])],2))),128))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]),nothingData:e.withCtx(()=>[e.renderSlot(x.$slots,"nothingData")]),_:3},8,["id","chartOption","className","height","isRunLoad"]))}}),Qp={class:"framephone-statusbar"},Zp={class:"framephone-statusbar-time"},ef={class:"framephone-screen-outer"},ni=e.defineComponent({name:"ClFramePhone",__name:"Index",props:{className:String,width:{type:String,default:"430px"},height:{type:String,default:"750px"},statusBarText:{type:String,default:"9:41"}},setup(n){const l=`fh_${o.getRandom(7)}`,a=e.ref(!1);e.onMounted(()=>{a.value=!0});const t=n,i=e.computed(()=>{const d={"cl-framephone":!0};return o.isNonEmptyString(t.className)&&o.split(t.className," ").forEach(u=>{o.isEmpty(u)||(d[u]=!0)}),d}),r=e.computed(()=>{const d={};return o.isNonEmptyString(t.width)&&(d.width=t.width),o.isNonEmptyString(t.height)&&(d.height=t.height),d});return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(i.value),style:e.normalizeStyle(r.value)},[u[1]||(u[1]=e.createElementVNode("div",{class:"framephone-notch"},null,-1)),e.createElementVNode("div",Qp,[e.createElementVNode("span",Zp,e.toDisplayString(n.statusBarText),1),u[0]||(u[0]=e.createElementVNode("span",{class:"framephone-statusbar-signal"},[e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-1"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-2"}),e.createElementVNode("i",{class:"framephone-signal-item framephone-signal-3"})],-1))]),e.createElementVNode("div",ef,[e.createElementVNode("div",{class:"framephone-screen",id:l},[a.value?e.renderSlot(d.$slots,"default",{key:0,screenId:l}):e.createCommentVNode("",!0)])]),u[2]||(u[2]=e.createElementVNode("div",{class:"framephone-home"},null,-1))],6))}}),tf={key:0},nf={key:1},of={class:"inputTag-operate"},Wa=e.defineComponent({name:"ClInputTagInput",__name:"Input",props:{value:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:Boolean,isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:String,joinKey:{type:String,default:","},isDropdownLayer:{type:Boolean,default:!0},textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean},emits:["onInit","onChange","onChangeInput","onFocus"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.inject("$InputTagTop"),d=e.useTemplateRef("refElTag"),u=e.useTemplateRef("refElTextarea"),s=e.useTemplateRef("refElInput"),c=e.reactive({isFocus:!1}),m=e.ref([]),p=e.ref([]),g=e.ref(""),h=e.computed(()=>!o.isEmpty(p.value)||!o.isEmpty(g.value)),y=e.computed(()=>t.isClean&&!t.disabled&&h.value),E=e.computed(()=>({"dropdownLayer-text-container":t.isDropdownLayer,"inputTag-container":!0,"inputTag-multiple":t.multiple,"inputTag-focus":c.isFocus})),L=e.computed(()=>{const Z={};return t.multiple&&(t.disabled?Z["min-height"]="40px":o.isNonEmptyString(t.minHeight)&&p.value.length>0&&(Z["min-height"]=t.minHeight)),Z}),B=e.computed(()=>{const Z={},{multiple:se,tagsMaxHeight:le}=t;return se&&o.isNonEmptyString(le)&&(Z["max-height"]=le),Z}),I=(Z="tag")=>{const se=w();i("onChange",se,Z)},M=()=>{e.nextTick(()=>{i("onInit")})},N=Z=>{i("onChangeInput",Z)},b=Z=>{i("onFocus",Z)},V=()=>{let Z="";if(t.multiple){const se=t.copyJoinKey+(t.isCopyMultipleWrap?`
8
+ `:"");Z=p.value.join(se)}else Z=g.value;return Z},w=()=>t.multiple?p.value.join(t.joinKey||","):g.value,T=Z=>{if(o.isEmpty(Z))m.value=[],p.value=[],g.value="";else if(Z!==w())if(t.multiple){const se=[],le=[];o.split(Z,t.joinKey||",").forEach(G=>{const oe=o.trim(G);!o.isEmpty(oe)&&!o.isExistValue(le,oe)&&(se.push({id:`inputTag_${o.getRandom(8)}`,name:oe}),le.push(oe))}),m.value=se,p.value=Array.from(new Set(le))}else g.value=Z},C=Z=>{const se=o.trim(Z);d.value&&d.value.addInfo({id:`inputTag_${o.getRandom(8)}`,name:se}),u.value&&(u.value.initHeight(),u.value.setValue(""))},D=()=>{t.multiple?u.value&&u.value.focus():s.value&&s.value.focus()},J=(Z,se=!0)=>{if(t.multiple){const le=e.toRaw(p.value);o.split(Z,t.joinKey||",").forEach(G=>{const oe=o.trim(G);if(!o.isEmpty(oe))if(se)C(oe),o.isExistValue(le,oe)||le.push(oe);else{const R=m.value.findIndex(Q=>Q.name===oe);R>-1&&m.value.splice(R,1);const U=le.indexOf(oe);U>-1&&le.splice(U,1)}}),p.value=Array.from(new Set(le))}else g.value=se?Z:"";t.multiple&&D(),I("drop")},ne=()=>{T(t.value??""),M()};e.onMounted(()=>{e.nextTick(()=>{ne()})}),e.watch(()=>t.value,(Z,se)=>{Z!==se&&Z!==w()&&(T(Z??""),u.value&&(u.value.setValue(""),u.value.initHeight()))});const K=Z=>{if(t.multiple){const se=u.value?u.value.getParentElement():null;(!se||!se.contains(Z.target))&&D()}else D()},P=Z=>{if(Z.isComposing||Z.keyCode===229||Z.shiftKey)return;const se=r?r.getListHoverValueKeydown():"";o.isEmpty(se)&&(Z.preventDefault(),Z.stopPropagation())},x=Z=>{if(Z.isComposing||Z.keyCode===229||Z.shiftKey)return;const se=Z.target.value,le=r?r.getListHoverValueKeydown():"";if(o.isEmpty(le)){if(Z.preventDefault(),Z.stopPropagation(),!o.isEmpty(se)){const G=e.toRaw(p.value);let oe=[];o.isExistValue(se,`
9
+ `)?o.split(se,`
10
+ `).forEach(R=>{o.isEmpty(R)||oe.push(...o.split(R,t.joinKey||","))}):oe=o.split(se,t.joinKey||","),oe.forEach(R=>{const U=o.trim(R);o.isEmpty(U)||(C(U),o.isExistValue(G,U)||G.push(U))}),p.value=Array.from(new Set(G)),I()}}else u.value&&(u.value.initHeight(),u.value.setValue(""))},A=()=>{c.isFocus=!0,b(w())},f=()=>{c.isFocus=!1},S=()=>{if(!d.value)return;const Z=d.value.getData();p.value=Z.filter(se=>o.isNonEmptyString(se.name)).map(se=>se.name),m.value=Z,N(""),I()},k=()=>{m.value=[],p.value=[],g.value="",u.value&&(u.value.setValue(""),u.value.initHeight()),I(),D()},v=Z=>{N(Z)},F=()=>{b(g.value)};return l({getValue:()=>w(),setValue:Z=>{T(Z),u.value&&(u.value.setValue(""),u.value.initHeight())},focus:()=>{D()},updateValue:(Z,se=!0)=>{J(Z,se)}}),(Z,se)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.value),style:e.normalizeStyle(L.value),onClick:e.withModifiers(K,["stop"])},[n.multiple?(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",{class:"inputTag-tags",style:e.normalizeStyle(B.value)},[e.createVNode(Xn,{ref_key:"refElTag",ref:d,disabled:n.disabled,list:m.value,onOnRemove:S},null,8,["disabled","list"])],4),e.withDirectives(e.createVNode(qn,{ref_key:"refElTextarea",ref:u,height:"24px",heightMax:n.textMaxHeight,disabled:n.disabled,placeholder:n.disabled?"":n.placeholder,isClean:!1,isAutoHeight:!0,onOnKeydownEnter:P,onOnKeyupEnter:x,onOnFocus:A,onOnBlur:f,onOnChangeDelay:v},null,8,["heightMax","disabled","placeholder"]),[[e.vShow,!n.disabled]])])):(e.openBlock(),e.createElementBlock("div",nf,[e.createVNode(Re,{ref_key:"refElInput",ref:s,value:g.value,"onUpdate:value":se[0]||(se[0]=le=>g.value=le),placeholder:n.placeholder,isClean:!1,disabled:n.disabled,onOnFocus:F,onOnChangeDelay:v},null,8,["value","placeholder","disabled"])])),e.createElementVNode("div",of,[n.isShowNum&&n.multiple&&p.value.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:p.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),y.value?(e.openBlock(),e.createBlock(ke,{key:2,name:"close-circle-fill",className:"inputTag-operate-btn","aria-label":"清空",tabindex:"-1",role:"button",onClick:e.withModifiers(k,["stop"]),onKeydown:[e.withKeys(e.withModifiers(k,["stop","prevent"]),["enter"]),e.withKeys(e.withModifiers(k,["stop","prevent"]),["space"])]},null,8,["onKeydown"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isCopy&&h.value?(e.openBlock(),e.createBlock(hn,{key:4,className:"inputTag-operate-btn",textLabel:V})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])],6))}}),af={class:"dropdownLayer-list-container"},lf={key:0,class:"dropdownLayer-list-search"},sf={key:2,class:"dropdownLayer-list-checkboxAll"},rf=["aria-activedescendant"],cf=["id","aria-selected","aria-disabled","onClick","onMouseenter","onMouseleave"],uf={key:0,class:"dropdownLayer-list-checkbox"},df=["innerHTML"],mf={key:1},pf={key:0,class:"dropdownLayer-list-empty"},ff={key:1,class:"inputTag-load"},hf=180,gf=50,vf=100,yf=130,kf=e.defineComponent({name:"ClDropdownlayerSearchList",__name:"Dropdown",props:{isSearch:Boolean,searchValue:String,searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].indexOf(n)>-1},isMultiple:Boolean,isCheckBoxAll:Boolean,showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},originalData:{type:Array,default:()=>[]},keyIndex:String,selectId:{type:Array,default:()=>[]},isShowEmptyLabel:{type:Boolean,default:!0},isShowLoading:Boolean,serverCallback:Function},emits:["onChange","onSearchResult","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.inject("$InputTagTop"),s=e.useTemplateRef("refElSearch"),c=e.useTemplateRef("refElList"),m=`inputtag-${o.getRandom(5)}`;let p=0,g=0,h=0,y=0,E=!1,L=!1;const B={start:-1,end:-1,limit:50},I=e.reactive({isRunLoading:!1}),M=`dropdownLayer-list-${t.keyIndex||m}`,N=e.ref(""),b=e.ref([]),V=e.ref([]);let w=[],T=[],C=!1;const D={isScrollLoadIng:!1},J=e.computed(()=>{let ae=!1;return V.value.length>0&&t.selectId.length>=V.value.length&&(ae=o.isContainArr(t.selectId.map(j=>j.toString()),V.value)),ae}),ne=e.computed(()=>new Set(t.selectId.map(ae=>ae.toString()))),K=(ae,W)=>{i("onChange",ae,W)},P=(ae,W)=>{i("onSearchResult",{search:o.isNonEmptyString(ae)?ae:"",isEmpty:W})},x=ae=>{i("onError",ae)},A=ae=>o.isEmpty(ae)?[]:ae.filter(W=>W?o.isString(W.id)&&!o.isEmpty(W.id)||o.isNumber(W.id)&&o.isFinite(W.id):!1),f=async ae=>{h++;const W=h;let j=[];if(t.serverCallback){t.isShowLoading&&(I.isRunLoading=!0);try{if(j=await t.serverCallback({search:ae,offset:0}),W!==h)return;e.nextTick(()=>{W===h&&(I.isRunLoading=!1,u&&u.convertListToJson(j),e.nextTick(()=>{S(ae,j)}))})}catch{W===h&&(I.isRunLoading=!1,x("服务端搜索失败,请稍后重试"))}}else if(o.isEmpty(ae))j=t.originalData,S(ae,j);else if(o.isNonEmptyString(ae)){const ue=ae.toLowerCase(),pe=t.searchKey.length,he=t.searchKey;t.originalData.forEach(ye=>{const Ce=[];for(let be=0;be<pe;be++){const xe=ye[he[be]];o.isNonEmptyString(xe)&&xe.toLowerCase().indexOf(ue)>-1&&Ce.push(!0)}if(Ce.length>0)switch(t.searchKeyType){case"||":j.push(ye);break;case"&&":Ce.length===pe&&j.push(ye);break}}),S(ae,j)}},S=(ae,W)=>{t.isCascade?(o.isEmpty(ae)||(W=F(W,t.originalData)),T=W,W=v(W)):W=A(W),w=W,b.value=_(0,B.limit),c.value&&(c.value.scrollTop=0),q(0,B.limit),k(),N.value="",P(ae,W.length===0)},k=()=>{const ae=[],W=t.selectId.map(j=>j.toString());w.forEach(j=>{if(o.isEmpty(j.id))return;const ue=j.id.toString();j.isDisabled?o.isExistValue(W,ue)&&ae.push(ue):ae.push(ue)}),V.value=ae},v=ae=>{const W=t.parentKey||"parentId",j=t.topParentValue||"0",ue={};ae.forEach(be=>{if(o.isEmpty(be.id))return;const xe=be[W];if(!o.isEmpty(xe)&&xe.toString()!==j){const $e=xe.toString();ue[$e]||(ue[$e]=[]),ue[$e].push(be)}});const pe=[],he=ae.filter(be=>{if(o.isEmpty(be.id))return!1;const xe=be[W];return o.isEmpty(xe)||xe.toString()===j}),ye=new Set,Ce=(be,xe,$e)=>{be.forEach(Pe=>{const yt=Pe.id.toString();if(ye.has(yt))return;ye.add(yt);const Lt=ue[yt]||[];pe.push({...Pe,_level:xe,_parentName:$e,_hasChildren:Lt.length>0,isDisabled:Pe.isDisabled||Lt.length>0&&!t.parentSelectable}),Lt.length>0&&Ce(Lt,xe+1,Pe.name)})};return Ce(he,0,""),pe},F=(ae,W)=>{const j=t.parentKey||"parentId",ue=t.topParentValue||"0",pe={},he={};W.forEach(xe=>{if(o.isEmpty(xe.id))return;const $e=xe.id.toString();pe[$e]=xe;const Pe=xe[j];!o.isEmpty(Pe)&&Pe.toString()!==ue&&(he[Pe.toString()]||(he[Pe.toString()]=[]),he[Pe.toString()].push($e))});const ye=new Set,Ce=new Set;ae.forEach(xe=>{o.isEmpty(xe.id)||Ce.add(xe.id.toString())});const be=xe=>{let $e=pe[xe],Pe=0;for(;$e&&Pe<100;){ye.add($e.id.toString());const yt=$e[j];if(o.isEmpty(yt)||yt.toString()===ue)break;$e=pe[yt.toString()],Pe++}};return ae.forEach(xe=>{if(o.isEmpty(xe.id))return;const $e=xe.id.toString();be($e),he[$e]&&he[$e].forEach(Pe=>{ye.add(Pe)})}),W.filter(xe=>o.isEmpty(xe.id)?!1:ye.has(xe.id.toString()))},_=(ae,W)=>{const j=[],ue=w.length,pe=ae<0?0:ae,he=W<=ue?W:ue;if(pe<he)for(let ye=pe;ye<he;ye++)j.push(w[ye]);return j},O=(ae,W)=>{let j=0,ue=0;switch(W){case"prev":j=ae-B.limit,ue=ae;break;case"next":j=ae,ue=j+B.limit;break}return _(j,ue)},q=(ae,W)=>{let j=B.start;(j===-1||ae<j)&&(j=ae),j=j<=0?0:j;let ue=B.end;W>ue&&(ue=W),ue=W<=w.length?W:w.length,B.start=j,B.end=ue},X=()=>{let ae=-1,W="";if(!o.isEmpty(t.selectId)){const pe=t.selectId.map(he=>he.toString());w.some((he,ye)=>{if(o.isEmpty(he.id))return!1;const Ce=he.id.toString(),be=o.isExistValue(pe,Ce);return be&&(ae=ye,W=Ce),be})}let j=0,ue=0;ae===-1?(p=0,j=0,ue=B.limit):(j=ae-B.limit*1,ue=ae+B.limit*1),b.value=_(j,ue),B.start=j<=0?0:j,B.end=ue>=w.length?w.length:ue,o.isEmpty(W)||b.value.some((pe,he)=>{if(o.isEmpty(pe.id))return!1;const ye=pe.id.toString()===W;return ye&&(p=he),ye})},Z=ae=>{e.nextTick(()=>{const W=c.value;if(!(!W||!W.children[0]))if(ae>0){const j=W.children[0].children[ae];W.scrollTop=j&&j.offsetTop>hf?j.offsetTop-gf:0}else W.scrollTop=0})},se=()=>{t.isCascade?(T=A(t.originalData),w=v(T)):w=A(t.originalData),X(),e.nextTick(()=>{o.isEmpty(t.searchValue)&&(s.value&&s.value.setValue(""),c.value&&Z(p))})},le=async ae=>{const W=Date.now(),j=ae.target,ue=j.scrollTop;if(W-y<150){g=ue;return}y=W;const pe=j.offsetHeight;if(!j.children[0]){g=ue;return}const he=j.children[0].offsetHeight;if(ue>g){if(ue+pe+vf>he&&!D.isScrollLoadIng){if(D.isScrollLoadIng=!0,B.end>=w.length&&t.serverCallback){const ye=h,Ce=t.searchValue,be={offset:w.length};o.isEmpty(Ce)||(be.search=Ce);try{const xe=await t.serverCallback(be);if(L)return;ye===h&&t.searchValue===Ce&&(t.isCascade?(T.push(...A(xe)),w=v(T)):w.push(...A(xe)),k(),u&&u.convertListToJson(w))}catch{ye===h&&x("服务端加载更多失败,请稍后重试")}}if(B.end<w.length){const ye=O(B.end,"next");b.value.push(...ye),q(B.start,B.end+B.limit)}D.isScrollLoadIng=!1}}else if(ue<yf&&B.start>0){const ye=O(B.start,"prev"),Ce=ye.length;Ce>0&&(b.value.unshift(...ye),q(B.start-B.limit,B.end),e.nextTick(()=>{const be=c.value;if(!be||!be.children[0])return;let xe=0;const $e=be.children[0].children;for(let Pe=0;Pe<Ce&&$e[Pe];Pe++)xe+=$e[Pe].offsetHeight;be.scrollTop+=xe}))}g=ue},G=()=>{C||e.nextTick(()=>{c.value&&(c.value.addEventListener("scroll",le),C=!0)})},oe=ae=>{let W=t.showDropDownTextFormat;if(ae._level>=1&&!o.isEmpty(t.showDropDownTextFormatSub)&&(W=t.showDropDownTextFormatSub),o.isEmpty(W)){if(o.isEmpty(ae.name))return"";const j=ae.name;return o.isString(j)?o.encodeHTML(j):String(j)}return o.convertStringFormatEncodeHTML(W,ae)},R=ae=>{const W=[];return t.isMultiple?(t.selectId.forEach(j=>{j.toString()!==ae&&W.push(j)}),o.isExistValue(t.selectId.map(j=>j.toString()),ae)||W.push(ae)):W.push(ae),W},U=ae=>{const W=b.value;if(W.length===0){N.value="";return}let j=-1;const ue=N.value;ue.length>0?(W.forEach((pe,he)=>{pe.id.toString()===ue&&(j=he)}),j+=ae,j<0?j=0:j>=W.length&&(j=W.length-1)):j=0,N.value=o.isEmpty(W[j].id)?"":W[j].id.toString(),Z(j)},Q=ae=>{if(ae.isComposing||ae.keyCode===229)return;let W=ae.keyCode;if(!o.isUndefined(W))switch(W=W.toString(),W){case"13":if(ae.shiftKey)break;ae.preventDefault(),ae.stopPropagation();break;case"38":ae.preventDefault(),ae.stopPropagation(),U(-1);break;case"40":ae.preventDefault(),ae.stopPropagation(),U(1);break}},ee=ae=>{if(ae.isComposing||ae.keyCode===229)return;let W=ae.keyCode;if(!o.isUndefined(W))switch(W=W.toString(),W){case"27":u&&u.setDropdownOpen(!1);break;case"13":{if(ae.shiftKey)break;const j=N.value;if(!o.isEmpty(j)){const ue=b.value.find(pe=>pe.id.toString()===j);if(ue&&!ue.isDisabled){const pe=R(j);K(pe,{id:j,isSelect:t.selectId.map(he=>he.toString()).indexOf(j)===-1})}}break}}},Y=()=>{se(),k(),G();const{searchValue:ae}=t;o.isNonEmptyString(ae)&&f(ae)};e.onMounted(()=>{Y()}),e.onBeforeUnmount(()=>{L=!0,me.offListener(window,"keydown",Q,!0),me.offListener(window,"keyup",ee,!0),E=!1,c.value&&c.value.removeEventListener("scroll",le)}),e.watch(()=>t.originalData,ae=>{t.isCascade?(T=A(ae),w=v(T)):w=A(ae),X(),k(),G()}),e.watch(()=>t.searchValue,ae=>{f(ae)});const H=ae=>{f(ae)},te=ae=>{if(!ae||!t.isMultiple)return;const W=t.selectId.map(Ce=>Ce.toString()),j=new Set;w.forEach(Ce=>{Ce.isDisabled&&!o.isEmpty(Ce.id)&&j.add(Ce.id.toString())});const ue=[],pe=[],he=[];V.value.forEach(Ce=>{ae.value?o.isExistValue(W,Ce)||pe.push(Ce):o.isExistValue(W,Ce)&&!j.has(Ce)&&he.push(Ce),ue.push(Ce)});const ye=o.getArrClone(t.selectId);he.length>0&&he.forEach(Ce=>{const be=ye.findIndex(xe=>xe.toString()===Ce);be>-1&&ye.splice(be,1)}),pe.length>0&&ye.push(...pe),K(ye,{id:ue,isSelect:ae.value})},$=ae=>{if(!ae.isDisabled&&!o.isEmpty(ae.id)){const W=ae.id.toString(),j=R(W);K(j,{id:W,isSelect:t.selectId.map(ue=>ue.toString()).indexOf(W)===-1})}},z=ae=>{!ae||o.isEmpty(ae.id)||(N.value=ae.id.toString())},ce=ae=>{!ae||o.isEmpty(ae.id)||N.value===ae.id.toString()&&(N.value="")};return l({initOpenShow:ae=>{ae?E||(me.onListener(window,"keydown",Q,!0),me.onListener(window,"keyup",ee,!0),E=!0):E&&(me.offListener(window,"keydown",Q,!0),me.offListener(window,"keyup",ee,!0),E=!1)},getHoverKeydown:()=>N.value}),(ae,W)=>(e.openBlock(),e.createElementBlock("div",af,[I.isRunLoading?(e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(Gt,{isLoadIng:I.isRunLoading},null,8,["isLoadIng"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isSearch?(e.openBlock(),e.createElementBlock("div",lf,[e.createVNode(Xt,{ref_key:"refElSearch",ref:s,placeholder:n.searchPlaceholder,onOnChange:H},null,8,["placeholder"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isMultiple&&n.isCheckBoxAll?(e.openBlock(),e.createElementBlock("div",sf,[e.createVNode(pt,{forId:`${M}-cb-all`,label:e.unref(r).checkboxAll,value:J.value,onOnChange:te},null,8,["forId","label","value"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-body",ref_key:"refElList",ref:c},[b.value.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,role:"listbox","aria-activedescendant":N.value?`${M}-opt-${N.value}`:void 0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(j,ue)=>(e.openBlock(),e.createElementBlock("li",{key:`${m}-${j.id}-${ue}`,id:`${M}-opt-${j.id}`,role:"option","aria-selected":ne.value.has(j.id.toString()),"aria-disabled":j.isDisabled,class:e.normalizeClass({"option-selected":ne.value.has(j.id.toString()),"option-disabled":j.isDisabled,"option-hoverKeydown":N.value===j.id.toString(),"inputTag-dropdown-item-child":j._level>=1}),style:e.normalizeStyle({paddingLeft:j._level?j._level*20+"px":void 0}),onClick:pe=>$(j),onMouseenter:pe=>z(j),onMouseleave:pe=>ce(j)},[e.createElementVNode("div",null,[n.isMultiple?(e.openBlock(),e.createElementBlock("div",uf,[e.createVNode(pt,{name:`${M}-cb`,forId:`${M}-cb-${j.id}`,value:ne.value.has(j.id.toString()),disabled:j.isDisabled},null,8,["name","forId","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-list-title",innerHTML:oe(j)},null,8,df)])],46,cf))),128))],8,rf)):(e.openBlock(),e.createElementBlock("ul",mf,[n.isShowEmptyLabel?(e.openBlock(),e.createElementBlock("li",pf,e.toDisplayString(e.unref(r).noResultsText),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))],512)],64))]))}}),Sf=["id"],sa=e.defineComponent({name:"ClInputTag",__name:"Index",props:{id:String,value:String,className:String,placeholder:String,disabled:Boolean,isClean:{type:Boolean,default:!0},multiple:{type:Boolean,default:!0},isCopy:Boolean,isCopyMultipleWrap:{type:Boolean,default:!0},copyJoinKey:{type:String,default:","},minHeight:{type:String,default:"70px"},joinKey:{type:String,default:","},isAutofill:Boolean,list:{type:Array,default:()=>[]},searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].indexOf(n)>-1},showDropDownTextFormat:String,showDropDownTextFormatSub:String,isCascade:Boolean,parentSelectable:Boolean,parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isFocusShowDrop:Boolean,textMaxHeight:String,tagsMaxHeight:String,isShowNum:Boolean,isShowLoading:Boolean,serverCallback:Function,isPlaintext:{type:Boolean,default:!1},appendContainer:{type:String,default:""}},emits:["onInit","update:value","update:modelValue","onChange","onError"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElInput"),s=e.useTemplateRef("refElList"),c=e.reactive({keyIndex:`inputTag-${o.getRandom(8)}`,searchValue:"",dropdownSelectId:[],isUseData:!1}),m={listNameJson:{},listIdJson:{}},p=e.computed(()=>{let x={"panel-input-tag":!0,"inputTag-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext,"cl-plaintext-inputtag":t.isPlaintext};return x=o.getJsonMerge(x,me.getClassNameJson(t.className)),o.getStringByJson(x," ")}),g=e.computed(()=>{let x="inputTag-dropdown ";return c.isUseData||(x+=" inputTag-dropdown-nodata "),x}),h=(x,A="")=>{i("update:value",x),i("update:modelValue",x),i("onChange",x,A)},y=()=>{e.nextTick(()=>{i("onInit")})},E=x=>{const f=o.isEmpty(x)?[]:x.filter(S=>{if(!S)return!1;const k=o.isString(S.id)&&!o.isEmpty(S.id)||o.isNumber(S.id)&&o.isFinite(S.id),v=o.isNonEmptyString(S.name)||o.isNumber(S.name)&&!o.isEmpty(S.name);return k&&v});m.listNameJson=o.getJsonByList(f,"name"),m.listIdJson=o.getJsonByList(f,"id")},L=x=>{if(d.value){const A=d.value.checkIsShowOpen();if(x){if(!A){const f=[],S=u.value?u.value.getValue():"",k=o.isEmpty(S)?[]:o.split(S,t.joinKey||",");k.length>0&&k.forEach(v=>{if(o.isExistJsonKey(m.listNameJson,v)){const F=m.listNameJson[v];F&&!o.isEmpty(F.id)&&f.push(F.id.toString())}}),c.dropdownSelectId=f,c.isUseData=!o.isEmpty(t.list)||!!t.serverCallback,d.value.setOpen(!0),e.nextTick(()=>{d.value&&d.value.initCompleteOpen()})}}else c.isUseData=!0,A&&d.value.setOpen(!1)}},B=()=>{o.isEmpty(t.list)||E(t.list)};e.onMounted(()=>{e.nextTick(()=>{B()})}),e.watch(()=>t.list,x=>{E(x),c.isUseData=!o.isEmpty(x)||!!t.serverCallback});const I=()=>{y()},M=x=>{x&&t.disabled||e.nextTick(()=>{s.value&&s.value.initOpenShow(x)})},N=x=>{const A=x.toLowerCase(),f=t.searchKey;let S=!1;return t.list.forEach(k=>{if(S)return;let v=0;for(let F=0;F<f.length;F++){const _=k[f[F]];o.isNonEmptyString(_)&&_.toLowerCase().indexOf(A)>-1&&v++}v>0&&(t.searchKeyType==="||"||t.searchKeyType==="&&"&&v===f.length)&&(S=!0)}),S},b=x=>{c.searchValue=x;let A=!0;if(o.isNonEmptyString(x)&&(x.indexOf(`
11
+ `)>-1||!o.isEmpty(t.joinKey)&&x.indexOf(t.joinKey)>-1)&&(A=!1),A){const f=o.isEmpty(x)?!1:t.serverCallback?!0:N(x);L(f)}else L(!1);t.multiple||h(x,"input")},V=x=>{L(!x.isEmpty&&!o.isEmpty(x.search))},w=x=>{i("onError",x)},T=(x,A)=>{if(o.isEmpty(A)||t.disabled)return;const f=[];(o.isArray(A.id)?A.id:[A.id]).forEach(k=>{o.isExistJsonKey(m.listIdJson,k)&&f.push(m.listIdJson[k].name)}),t.multiple||(c.searchValue=""),u.value&&u.value.updateValue(f.join(t.joinKey||","),A.isSelect)},C=(x,A)=>{h(x,A),t.isAutofill&&L(!1)},D=x=>{t.isAutofill&&t.isFocusShowDrop&&(c.searchValue=x,L(!o.isEmpty(x)))};e.provide("$InputTagTop",{getListHoverValueKeydown:()=>{let x="";return s.value&&(x=s.value.getHoverKeydown()),x},convertListToJson:E,setDropdownOpen:L});const J=()=>u.value?u.value.getValue():"";return l({getValue:J,getValueData:()=>{const x=J();return u.value?o.split(x,t.joinKey||",").filter(f=>!o.isEmpty(f)).map(f=>{const S=m.listNameJson[f];return{name:f,id:S&&!o.isEmpty(S.id)?S.id:void 0}}):[]},setValue:x=>{u.value&&u.value.setValue(x)},focus:()=>{u.value&&u.value.focus()}}),(x,A)=>n.isAutofill?(e.openBlock(),e.createBlock(kn,{key:0,ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:p.value,classDropDown:g.value,transitionLeave:"inputTag-dropdown-leave",appendContainer:n.appendContainer,onOnChangeOpen:M},{labelCustom:e.withCtx(()=>[e.createVNode(Wa,{ref_key:"refElInput",ref:u,value:n.value,placeholder:n.placeholder,disabled:n.disabled||n.isPlaintext,isClean:n.isClean,multiple:n.multiple,minHeight:n.minHeight,joinKey:n.joinKey,isCopy:n.isCopy,isCopyMultipleWrap:n.isCopyMultipleWrap,copyJoinKey:n.copyJoinKey,isDropdownLayer:!0,textMaxHeight:n.textMaxHeight,tagsMaxHeight:n.tagsMaxHeight,isShowNum:n.isShowNum,onOnChange:C,onOnChangeInput:b,onOnInit:I,onOnFocus:D},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])]),dropdown:e.withCtx(()=>[e.createVNode(kf,{ref_key:"refElList",ref:s,keyIndex:c.keyIndex,isSearch:!1,searchValue:c.searchValue,searchKey:n.searchKey,searchKeyType:n.searchKeyType,isMultiple:!1,showDropDownTextFormat:n.showDropDownTextFormat,showDropDownTextFormatSub:n.showDropDownTextFormatSub,isCascade:n.isCascade,parentSelectable:n.parentSelectable,parentKey:n.parentKey,topParentValue:n.topParentValue,isShowEmptyLabel:!1,originalData:n.list,selectId:c.dropdownSelectId,serverCallback:n.serverCallback,isShowLoading:n.isShowLoading,onOnSearchResult:V,onOnChange:T,onOnError:w},null,8,["keyIndex","searchValue","searchKey","searchKeyType","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","serverCallback","isShowLoading"])]),_:1},8,["id","classParent","classDropDown","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value),id:e.unref(r)},[e.createVNode(Wa,{ref_key:"refElInput",ref:u,value:n.value,placeholder:n.placeholder,disabled:n.disabled||n.isPlaintext,isClean:n.isClean,multiple:n.multiple,minHeight:n.minHeight,joinKey:n.joinKey,isCopy:n.isCopy,isCopyMultipleWrap:n.isCopyMultipleWrap,copyJoinKey:n.copyJoinKey,isDropdownLayer:!1,textMaxHeight:n.textMaxHeight,tagsMaxHeight:n.tagsMaxHeight,isShowNum:n.isShowNum,onOnChange:C,onOnChangeInput:b,onOnInit:I,onOnFocus:D},null,8,["value","placeholder","disabled","isClean","multiple","minHeight","joinKey","isCopy","isCopyMultipleWrap","copyJoinKey","textMaxHeight","tagsMaxHeight","isShowNum"])],10,Sf))}}),wf=["id"],Ef={key:0,class:"select-inDropdown-search",role:"search","aria-label":"搜索选项"},Cf={key:2,class:"select-inDropdown-checkboxAll"},bf=["aria-selected","aria-disabled","onClick"],xf={class:"select-inDropdown-item-inner"},Bf={key:0,class:"select-inDropdown-checkbox"},If=["innerHTML"],Df={key:5,class:"select-inDropdown-body"},Tf={class:"select-inDropdown-empty"},Do=35,Nf=210,Vf=20,Mf=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:n=>!0,onInitComplete:()=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=e.defineAsyncComponent(()=>import("vue-virtual-scroller").then(R=>(Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs")),R.RecycleScroller))),i=n,r=a,{optPageLanguage:d,getPageLanguage:u}=Le();u("common");const s=e.inject("$SelectTop",{}),c=typeof s.getSelectData=="function",m=e.useTemplateRef("refElSearch"),p=e.useTemplateRef("refElScroller"),g=e.useTemplateRef("refElRoot");let h=!0;const y={isScrollLoading:!1,hasMoreData:!0};let E=[],L=0,B=0;const I=i.id,M=`select-inList-${i.keyIndex||""}`;let N=!1;const b=e.ref(""),V=e.ref([]),w=e.ref([]);let T={};const C=R=>{const U=R.id.toString();if(i.isMultiple&&i.isCascade&&R._hasChildren&&c){const ee=s.getAllChildIds(U).filter(H=>!s.getSelectValueInfo(H)?.isDisabled);if(ee.length===0)return 0;const Y=ee.filter(H=>o.isExistValue(i.selectId,H)).length;return Y===0?0:Y===ee.length?2:1}return o.isExistValue(i.selectId,U)?2:0},D=R=>C(R)===2,J=R=>C(R)===1,ne=e.computed(()=>{let R=!1;return w.value.length>0&&i.selectId.length>=w.value.length&&(R=o.isContainArr(i.selectId,w.value)),R}),K=R=>{if(!R||typeof R!="object")return"";let U=o.isNonEmptyString(i.showDropDownTextFormat)?i.showDropDownTextFormat:"";R._level>=1&&o.isNonEmptyString(i.showDropDownTextFormatSub)&&(U=i.showDropDownTextFormatSub);let Q=o.isEmpty(U)?R.name:o.convertStringFormat(U,R);return o.isHtml(Q)?o.isEmpty(U)&&o.isHtml(R.name)?Q=o.encodeHTML(R.name):Q=o.convertStringFormatEncodeHTML(U,R):typeof Q=="string"&&Q.indexOf("<")>-1&&(Q=o.encodeHTML(Q)),Q},P=R=>{const U=T[R]||{};if(o.isBoolean(U._isTypeRadio))return U._isTypeRadio;if(c){const Q=s.getSelectValueInfo(R);if(o.isBoolean(Q?._isTypeRadio))return Q._isTypeRadio}return!1},x=()=>{const R=[];T=o.getJsonByList(V.value),V.value.forEach(U=>{if(!o.isObject(U))return;const Q=typeof U.id;if(U.id==null||Q!=="string"&&(Q!=="number"||!o.isFinite(U.id)))return;const ee=U.id.toString();if(!(i.isCascade&&U._hasChildren)&&!P(ee)){if(o.isExistValue(R,ee))return;U.isDisabled?o.isExistValue(i.selectId,ee)&&R.push(ee):R.push(ee)}}),w.value=R},A=R=>{const U=i.parentKey,Q=i.topParentValue,ee={};R.forEach($=>{if(!o.isObject($)||$.id==null||typeof $.id!="string"&&(typeof $.id!="number"||!o.isFinite($.id)))return;const z=$[U],ce=z!=null&&(typeof z=="string"||typeof z=="number")?z.toString():"";ce!==""&&ce!==String(Q)&&(ee[ce]||(ee[ce]=[]),ee[ce].push($))});const Y=[],H=($,z,ce,de)=>{$.forEach(ie=>{const ae=ie.id.toString();if(de.has(ae))return;de.add(ae);const W=ee[ae]||[];Y.push({...ie,_level:z,_parentName:ce,_hasChildren:W.length>0}),W.length>0&&H(W,z+1,ie.name,de)})},te=R.filter($=>{if(!o.isObject($)||$.id==null||typeof $.id!="string"&&(typeof $.id!="number"||!o.isFinite($.id)))return!1;const z=$[U],ce=z!=null&&(typeof z=="string"||typeof z=="number")?z.toString():"";return o.isEmpty(ce)||ce===String(Q)});return H(te,0,"",new Set),Y},f=(R,U)=>{if(!c)return R;const Q=R.filter(de=>de!=null&&de.id!=null&&(typeof de.id=="string"||typeof de.id=="number"&&o.isFinite(de.id))),ee=U.filter(de=>de!=null&&de.id!=null&&(typeof de.id=="string"||typeof de.id=="number"&&o.isFinite(de.id))),Y=i.parentKey,H=i.topParentValue,te=new Set,$=new Set(Q.map(de=>de.id.toString()));Q.forEach(de=>{const ie=de.id.toString();te.add(ie);const ae=new Set;let W=de[Y];for(;W!=null&&(typeof W=="string"||typeof W=="number")&&W.toString()!==String(H);){const ue=W.toString();if(ae.has(ue))break;ae.add(ue),$.has(ue)||te.add(ue),W=s.getSelectValueInfo(ue)?.[Y]}s.getAllChildIds(ie).forEach(ue=>{te.add(ue)})});const z=ee.filter(de=>te.has(de.id.toString())),ce=new Set(z.map(de=>de.id.toString()));return te.forEach(de=>{if(!ce.has(de)){const ie=s.getSelectValueInfo(de);ie&&Object.keys(ie).length>0&&z.push(ie)}}),z},S=()=>{h&&(h=!1,y.hasMoreData=!0,i.isCascade?(E=[...i.originalData||[]],V.value=A(E)):V.value=o.getListClone(i.originalData).filter(R=>R!=null&&R.id!=null&&(typeof R.id=="string"||typeof R.id=="number"&&o.isFinite(R.id))),x(),k(),b.value="",e.nextTick(()=>{m.value&&m.value.setValue("")}))},k=()=>{e.nextTick(()=>{if(p.value&&i.selectId.length>0){const R=V.value.findIndex(U=>U.id!=null&&o.isExistValue(i.selectId,U.id.toString()));R>-1&&p.value.scrollToItem(R)}})},v=R=>{const U=[],Q=T[R]||{},ee=i.isCascade&&Q._hasChildren;if(i.isMultiple)if(P(R))o.isExistValue(i.selectId,R)?i.selectId.forEach(Y=>{Y!==R&&U.push(Y)}):(i.selectId.forEach(Y=>{P(Y)||U.push(Y)}),U.push(R));else if(ee&&c){const Y=s.getAllChildIds(R),H=Y.filter($=>!s.getSelectValueInfo($)?.isDisabled),te=H.length>0&&H.every($=>o.isExistValue(i.selectId,$));i.selectId.forEach($=>{Y.includes($)?Y.includes($)&&s.getSelectValueInfo($)?.isDisabled&&U.push($):U.push($)}),te||H.forEach($=>{o.isExistValue(U,$)||U.push($)})}else i.selectId.forEach(Y=>{Y!==R&&U.push(Y)}),o.isExistValue(i.selectId,R)||U.push(R);else{if(ee&&!i.parentSelectable)return[...i.selectId];U.push(R)}return U},F=R=>{const U=V.value;if(U.length===0)return;let Q=-1;const ee=b.value;ee.length>0?(U.forEach((Y,H)=>{Y.id.toString()===ee&&(Q=H)}),Q+=R,Q<0?Q=0:Q>=U.length&&(Q=U.length-1)):Q=0,b.value=U[Q].id.toString(),p.value&&p.value.scrollToItem(Q)},_=R=>{let U=R.keyCode;if(!o.isUndefined(U))switch(U=U.toString(),U){case"13":{const Q=g.value&&R.target instanceof Node&&g.value.contains(R.target);(R.target===document.body||Q)&&(R.preventDefault(),R.stopPropagation());break}case"38":R.preventDefault(),R.stopPropagation(),F(-1);break;case"40":R.preventDefault(),R.stopPropagation(),F(1);break}},O=R=>{let U=R.keyCode;if(!o.isUndefined(U))switch(U=U.toString(),U){case"27":c&&s.closeDropdown?.();break;case"13":{const Q=b.value;if(!Q||i.disabled||!i.isOpen)break;const ee=g.value&&R.target instanceof Node&&g.value.contains(R.target);if(R.target!==document.body&&!ee||!V.value.some(te=>te.id.toString()===Q)||T[Q]?.isDisabled)break;const H=v(Q);r("onChange",H);break}}},q=R=>R.map(U=>{const{_level:Q,_parentName:ee,_hasChildren:Y,...H}=U;return H}),X=async()=>{if(i.serverCallback&&!(y.isScrollLoading||!y.hasMoreData)&&(y.isScrollLoading=!0,i.serverCallback)){const R=++B,U=V.value;try{const Q={offset:U.length};if(i.isSearch&&m.value){const te=m.value.getValue();o.isEmpty(te)||(Q.search=te)}const ee=await i.serverCallback(Q);if(R!==B||U!==V.value)return;if(!Array.isArray(ee)){we.error("ClSelect","_loadMore 服务端返回数据格式异常(非数组):",typeof ee),r("onError","服务端加载失败:返回数据格式异常");return}if(ee.length===0){y.hasMoreData=!1;return}const Y=new Set(U.map(te=>te?.id?.toString()).filter(Boolean)),H=ee.filter(te=>{if(te?.id==null)return!1;const $=typeof te.id;return $!=="string"&&($!=="number"||!o.isFinite(te.id))?!1:!Y.has(te.id.toString())});if(H.length===0){y.hasMoreData=!1;return}i.isCascade?Q.search?V.value=A([...V.value,...H]):(E.length===0&&(E=q(V.value)),E.length===0&&(E=[...i.originalData]),E.push(...H),V.value=A(E)):V.value.push(...H),x(),c&&(s.convertListToJson(H),s.refreshDisplayLabels?.())}catch(Q){we.error("ClSelect","_loadMore 服务端加载失败:",Q),r("onError","服务端加载失败,请稍后重试")}finally{y.isScrollLoading=!1}}},Z=()=>{S(),r("onInitComplete")};e.onMounted(()=>{Z()}),e.onBeforeUnmount(()=>{me.offListener(window,"keydown",_),me.offListener(window,"keyup",O),N=!1}),e.onDeactivated(()=>{me.offListener(window,"keydown",_),me.offListener(window,"keyup",O),N=!1}),e.onActivated(()=>{i.isOpen&&!N&&(me.onListener(window,"keydown",_),me.onListener(window,"keyup",O),N=!0)}),e.watch(()=>i.isOpen,R=>{R?(h=!0,S()):y.isScrollLoading=!1}),e.watch(()=>i.originalData,R=>{h=!0,i.isCascade?(E=[...R||[]],V.value=A(E)):V.value=o.getListClone(R).filter(U=>U!=null&&U.id!=null&&(typeof U.id=="string"||typeof U.id=="number"&&o.isFinite(U.id))),x(),y.hasMoreData=!0,b.value="",e.nextTick(()=>{m.value&&m.value.setValue("")})});const se=async R=>{const U=++L;B=Math.max(B,U+1);let Q=[];if(i.isCascade&&(E=[]),y.hasMoreData=!0,i.serverCallback){try{if(Q=await i.serverCallback({search:R,offset:0}),Array.isArray(Q)||(we.error("ClSelect","onSearch 服务端返回数据格式异常(非数组):",typeof Q),r("onError","服务端搜索失败:返回数据格式异常"),Q=[]),U!==L)return;c&&s.convertListToJson(Q)}catch(ee){we.error("ClSelect","onSearch 服务端搜索失败:",ee),r("onError","服务端搜索失败,请稍后重试"),Q=[]}if(U!==L)return;i.isCascade&&(Q=f(Q,i.originalData),Q=A(Q))}else{const ee=i.originalData.filter(Y=>Y!=null&&Y.id!=null&&(typeof Y.id=="string"||typeof Y.id=="number"&&o.isFinite(Y.id)));if(o.isEmpty(R))Q=ee;else{i.searchKeyType!=="||"&&i.searchKeyType!=="&&"&&we.warn("ClSelect","onSearch searchKeyType 未知值,已降级为 OR 匹配:",i.searchKeyType);const Y=R.toLowerCase(),H=o.isArray(i.searchKey)?i.searchKey:["name"],te=H.length;ee.forEach($=>{const z=[];for(let ce=0;ce<te;ce++){const de=$[H[ce]];if(de==null)continue;String(de).toLowerCase().indexOf(Y)>-1&&z.push(!0)}if(z.length>0)switch(i.searchKeyType){case"||":Q.push($);break;case"&&":z.length===te&&Q.push($);break;default:Q.push($)}})}i.isCascade&&(o.isEmpty(R)||(Q=f(Q,i.originalData)),Q=A(Q))}V.value=Q.filter(ee=>ee!=null&&ee.id!=null&&(typeof ee.id=="string"||typeof ee.id=="number"&&o.isFinite(ee.id))),x(),b.value="",c&&s.calculationDropdownPosition()},le=R=>{if(!i.disabled&&i.isMultiple){const U=[],Q=[];w.value.forEach(H=>{R.value?o.isExistValue(i.selectId,H)||U.push(H):o.isExistValue(i.selectId,H)&&(T[H]?.isDisabled||Q.push(H))});const ee=o.getArrClone(i.selectId);Q.length>0&&Q.forEach(H=>{const te=ee.indexOf(H);te>-1&&ee.splice(te,1)}),U.length>0&&U.forEach(H=>{o.isExistValue(ee,H)||ee.push(H)});const Y=[];ee.forEach(H=>{(!P(H)||o.isExistValue(i.selectId,H))&&Y.push(H)}),r("onChange",Y)}},G=R=>{if(R.id==null||typeof R.id!="string"&&(typeof R.id!="number"||!o.isFinite(R.id))||R.isDisabled||i.disabled)return;const U=R.id.toString(),Q=v(U);r("onChange",Q)};return l({initOpenShow:R=>{R?N||(me.onListener(window,"keydown",_),me.onListener(window,"keyup",O),N=!0):N&&(me.offListener(window,"keydown",_),me.offListener(window,"keyup",O),N=!1)}}),(R,U)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inDropdown-container",id:e.unref(I),ref_key:"refElRoot",ref:g},[n.isSearch?(e.openBlock(),e.createElementBlock("div",Ef,[e.createVNode(Xt,{ref_key:"refElSearch",ref:m,placeholder:n.searchPlaceholder,disabled:n.disabled,onOnChange:se},null,8,["placeholder","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isMultiple&&n.isCheckBoxAll&&V.value.length>0?(e.openBlock(),e.createElementBlock("div",Cf,[e.createVNode(pt,{forId:`${M}-cb-all`,label:e.unref(d).checkboxAll,value:ne.value,disabled:n.disabled,onOnChange:le},null,8,["forId","label","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),V.value.length>0?(e.openBlock(),e.createBlock(e.unref(t),{key:4,class:"select-inDropdown-body select-inDropdown-scroller",role:"listbox",style:e.normalizeStyle({height:Math.min(V.value.length*Do,Nf)+"px"}),items:V.value,"item-size":Do,"key-field":"id",ref_key:"refElScroller",ref:p,onScrollEnd:X},{default:e.withCtx(({item:Q})=>[e.createElementVNode("div",{role:"option","aria-selected":D(Q),"aria-disabled":Q.isDisabled||!1,class:e.normalizeClass({"option-selected":D(Q),"option-disabled":Q.isDisabled,"option-hoverKeydown":b.value===Q.id.toString(),"select-inDropdown-item-child":Q._level>=1}),style:e.normalizeStyle({height:Do+"px",paddingLeft:Q._level?Q._level*Vf+"px":void 0}),onClick:ee=>G(Q)},[e.createElementVNode("div",xf,[n.isMultiple?(e.openBlock(),e.createElementBlock("div",Bf,[e.createVNode(pt,{name:`${M}-cb`,forId:`${M}-cb-${Q.id}`,value:D(Q),indeterminate:J(Q),disabled:Q.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:K(Q)},null,8,If)])],14,bf)]),_:1},8,["style","items"])):(e.openBlock(),e.createElementBlock("div",Df,[e.createElementVNode("div",Tf,e.toDisplayString(e.unref(d).noResultsText),1)]))],8,wf))}}),Of=["id"],_f={class:"select-inTag-title"},Af={class:"select-inTag-operate"},Lf={class:"select-inTag-body"},$f=e.defineComponent({name:"ClSelectInTags",__name:"Tags",props:{id:String,showTextFormat:String,selectId:{type:Array,default:()=>[]}},emits:{onRemove:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.inject("$SelectTop",{}),s=typeof u.getSelectData=="function",c=e.computed(()=>s?o.isArray(a.selectId)?u.getSelectData(a.selectId):[]:[]),m=e.computed(()=>s?c.value.length:0),p=e.computed(()=>o.isArray(c.value)?c.value.some(y=>o.isObject(y)?!(o.isBoolean(y.isDisabled)&&y.isDisabled):!1):!1),g=()=>{const y=c.value;if(!o.isArray(y))return;const E=[];let L=!1;y.forEach(B=>{if(!o.isObject(B))return;(o.isBoolean(B.isDisabled)?!!B.isDisabled:!1)?(typeof B.id=="string"&&!o.isEmpty(B.id)||typeof B.id=="number"&&o.isFinite(B.id))&&E.push(B.id.toString()):L=!0}),L&&t("onRemove",E)},h=y=>{if(!o.isArray(a.selectId)||o.isEmpty(y))return;const E=String(y),L=a.selectId.findIndex(I=>String(I)===E);if(L===-1)return;const B=o.getArrClone(a.selectId);B.splice(L,1),t("onRemove",B)};return(y,E)=>(e.openBlock(),e.createElementBlock("div",{class:"select-inTag-container",id:e.unref(i)},[e.createElementVNode("div",_f,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r).selected)+" "+e.toDisplayString(m.value)+" "+e.toDisplayString(e.unref(r).count),1),e.createElementVNode("span",Af,[p.value?(e.openBlock(),e.createBlock(ke,{key:0,class:"select-inTag-deleteAll",name:"remove",title:e.unref(r).deleteAll,"aria-label":e.unref(r).deleteAll,onClick:g},null,8,["title","aria-label"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),e.createElementVNode("div",Lf,[e.createVNode(Xn,{showTextFormat:n.showTextFormat,list:c.value,onOnRemove:h},null,8,["showTextFormat","list"])])],8,Of))}}),Ff=["id"],Pf={key:0,class:"select-inText-num"},Sn=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:n=>["default","noBorder"].includes(n)},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:n=>["left","right"].includes(n)},transitionLeave:{type:String,default:"zoomOutTop"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].includes(n)},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":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0,onOpen:n=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useTemplateRef("refElDropdownLayer"),d=e.useTemplateRef("refElList"),u=e.useTemplateRef("refElTags"),s=`select-${o.getRandom(8)}`,c=t.id,m=e.reactive({isOpen:!1,dropDownPos:"down",tagHeight:"",tagLeft:"",tagDirection:"right"});let p=[],g={};const h={childrenMap:{},parentMap:{},lastChildMap:{},allChildMap:{}},y=e.ref(!1),E=e.ref([]),L=e.ref([]),B=e.ref([]);let I=!1;const M=e.computed(()=>o.isNonEmptyString(t.showTextFormat)?t.showTextFormat:t.isCascade?"${name}(${parentName})":""),N=e.computed(()=>{let j={"panel-select":!0};return t.theme==="noBorder"&&(j["select-theme-noBorder"]=!0),j=o.getJsonMerge(j,me.getClassNameJson(t.className)),o.getStringByJson(j," ")}),b=e.computed(()=>`${N.value} cl-plaintext-value`),V=e.computed(()=>{const j=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return B.value.join(j)}),w=e.computed(()=>Je.getPlaintextOutText("select",t.plaintextEmptyText,V.value,t.value)),T=e.computed(()=>{let j={"select-inDropdown":!0};return t.theme==="noBorder"&&(j["select-inDropdown-noBorder"]=!0),m.isOpen&&t.multiple&&t.isShowTag&&(j["select-inTag-ext"]=!0,j[`select-inTag-${m.tagDirection}`]=!0),j=o.getJsonMerge(j,me.getClassNameJson(t.classDropDown)),o.getStringByJson(j," ")}),C=e.computed(()=>{const j={"select-inTag":!0,"select-inTag-open":m.isOpen};return j[`select-inTag-${m.dropDownPos}`]=!0,j[`select-inTag-${m.tagDirection}`]=!0,j}),D=j=>{i("update:value",j),i("update:modelValue",j)},J=(j,ue)=>{D(j),i("onChange",j,ue)},ne=()=>{I||(I=!0,e.nextTick(()=>{i("onInit")}))},K=j=>{e.nextTick(()=>{i("onOpen",j)})},P=()=>{const j=[];return E.value.forEach(ue=>{o.isExistJsonKey(g,ue)&&j.push(ue)}),j},x=j=>{if(o.isEmpty(j)||!o.isArray(j))return;const ue={},pe=t.parentKey,he=t.topParentValue;if(j.forEach(ye=>{if(!o.isObject(ye)){we.warn("ClSelect","_convertListToJson 跳过非对象数据项:",ye);return}if(!(typeof ye.id=="string"||typeof ye.id=="number"&&o.isFinite(ye.id))){we.warn("ClSelect","_convertListToJson 跳过无 id 或 id 类型异常的数据项:",ye);return}const be=ye.id.toString();ue[be]=o.getJsonClone(ye)}),g=o.getJsonMerge(g,ue),t.serverCallback&&!y.value&&!o.isEmpty(ue)&&(y.value=!0,t.value!=null&&t.value!==""&&(O(t.value),_())),t.isCascade&&Object.keys(g).forEach(ye=>{const Ce=g[ye][pe],be=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";if(be!==""&&be!==String(he)){const xe=g[be];xe?.name&&(g[ye].parentName=xe.name)}}),t.isCascade&&(A(),t.isOutMerge&&t.multiple&&E.value.length>0)){const ye=v(E.value);o.isEqualArr(E.value,ye)||(E.value=ye,p=ye)}if(t.multiple&&E.value.length>1){const ye=E.value.filter(Ce=>{const be=g[Ce];return o.isBoolean(be?._isTypeRadio)&&be._isTypeRadio});if(ye.length>1){const Ce=ye[ye.length-1],be=E.value.filter(xe=>xe===Ce||!ye.includes(xe));o.isEqualArr(E.value,be)||(E.value=be,G())}}E.value.length>0&&(E.value=[...E.value])},A=()=>{const j=t.parentKey,ue=t.topParentValue;h.childrenMap={},h.parentMap={},h.lastChildMap={},h.allChildMap={},Object.keys(g).forEach(he=>{const Ce=g[he][j],be=Ce!=null&&(typeof Ce=="string"||typeof Ce=="number")?Ce.toString():"";be!==""&&be!==String(ue)&&(h.parentMap[he]=be,h.childrenMap[be]||(h.childrenMap[be]=[]),h.childrenMap[be].push(he))})},f=j=>{const ue=(pe,he)=>{if(h.lastChildMap[pe])return h.lastChildMap[pe];if(he.has(pe))return[];he.add(pe);const ye=h.childrenMap[pe];if(!ye||ye.length===0)return h.lastChildMap[pe]=[pe],[pe];const Ce=[];return ye.forEach(be=>{Ce.push(...ue(be,new Set(he)))}),h.lastChildMap[pe]=Ce,Ce};return ue(j,new Set)},S=j=>{const ue=(pe,he)=>{if(h.allChildMap[pe])return h.allChildMap[pe];if(he.has(pe))return[];he.add(pe);const ye=h.childrenMap[pe];if(!ye||ye.length===0)return h.allChildMap[pe]=[],[];const Ce=[];ye.forEach(xe=>{Ce.push(xe),Ce.push(...ue(xe,new Set(he)))});const be=Array.from(new Set(Ce));return h.allChildMap[pe]=be,be};return ue(j,new Set)},k=j=>{if(j.length===0)return[];const ue=new Set(j),pe=new Set,he=new Set;for(const ye of ue){const Ce=h.parentMap[ye];Ce&&!he.has(Ce)&&pe.add(Ce)}for(;pe.size>0;){const ye=pe.values().next().value;if(pe.delete(ye),he.has(ye))continue;he.add(ye);const Ce=h.childrenMap[ye];if(!Ce||Ce.length===0)continue;let be=!0;for(const xe of Ce)if(!ue.has(xe)){be=!1;break}if(be){for(const $e of Ce)ue.delete($e);ue.add(ye);const xe=h.parentMap[ye];xe&&!he.has(xe)&&pe.add(xe)}}return[...ue]},v=j=>{if(j.length===0)return[];const ue=[];return j.forEach(pe=>{ue.push(...f(pe))}),o.getArrUnique(ue)},F=j=>!t.isCascade||!t.multiple?j:t.isOutMerge?k(j):v(j),_=()=>{if(y.value&&!o.isEmpty(E.value)){if(o.isEmpty(g)||t.serverCallback)return;const j=P();if(!o.isEqualArr(E.value,j)){const ue=E.value.filter(he=>!j.includes(he));ue.length>0&&we.warn("ClSelect","以下 id 在数据列表中不存在,已自动清除:",ue),E.value=j,p=j;const pe=F(j);D(pe.join(","))}}},O=j=>{if(j!=null&&typeof j!="string"&&(typeof j!="number"||!o.isFinite(j))){we.warn("ClSelect","setValue 收到非预期类型值:",typeof j,j);return}let ue=j==null||j===""?[]:j.toString().split(",").filter(he=>he!=="");ue=o.getArrUnique(ue),t.isCascade&&t.isOutMerge&&ue.length>0&&t.multiple&&(ue=v(ue));let pe=o.isEqualArr(E.value,ue);pe&&(pe=ue.join(",")===E.value.join(",")),pe||(p=ue,E.value=ue)},q=j=>o.isExistJsonKey(g,j)?o.getJsonClone(g[j]):{},X=j=>{const ue=o.isArray(j)?j:E.value,pe=[];return ue.forEach(he=>{const ye=q(he);o.isEmpty(ye)||pe.push(ye)}),pe},Z=j=>{const pe=t.isCascade&&!t.multiple&&(h.childrenMap[j.id?.toString()]?.length>0||!h.parentMap[j.id?.toString()])&&o.isEmpty(t.showTextFormat)?"":M.value;let he=o.isEmpty(pe)?j.name??"":o.convertStringFormat(pe,j);return o.isHtml(he)?he=o.isEmpty(pe)?o.encodeHTML(j.name):o.convertStringFormatEncodeHTML(pe,j):typeof he=="string"&&he.indexOf("<")>-1&&(he=o.encodeHTML(he)),he},se=j=>{if(o.isNonEmptyString(t.showTextFormat))return o.removeHTMLTags(Z(j));const ue=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",pe=o.isString(j?.name)?j.name:"",he=o.isString(j?.parentName)?j.parentName:"",ye=t.isCascade&&o.isNonEmptyString(he)?`${he}${ue}${pe}`:pe;return o.removeHTMLTags(ye)},le=()=>{const j=X();L.value=j.map(ue=>Z(ue)),B.value=E.value.map(ue=>{const pe=q(ue);return o.isEmpty(pe)?ue:se(pe)})},G=()=>{const j=P();p=j,E.value=j;const ue=F(j),pe=ue.join(",");let he;if(t.multiple){const ye=[];ue.forEach(Ce=>{const be=q(Ce);o.isEmpty(be)||ye.push(be)}),he=ye}else he=q(pe),o.isEmpty(he)&&(he=null);J(pe,he)},oe=()=>{m.isOpen||!o.isEqualArr(E.value,p)&&G()},R=()=>{y.value||(y.value=!0,x(t.list),O(t.value),_())},U=()=>{!y.value&&t.list&&t.list.length>0&&R()},Q=()=>{import("vue-virtual-scroller").then(()=>{Promise.resolve().then(()=>require("./vue-virtual-scroller-Dyvby5gX.cjs"))})};e.onMounted(()=>{t.isPlaintext||Q(),e.nextTick(()=>{U()})}),e.watch(y,j=>{j&&ne()}),e.watch(()=>t.list,(j,ue)=>{y.value||(j&&j.length>0||ue===void 0)&&(y.value=!0)}),e.watch([()=>t.value,()=>t.list],([j,ue],[pe,he])=>{const ye=ue||[];!y.value&&ye.length>0&&(y.value=!0),ue!==he&&(g={},h.childrenMap={},h.parentMap={},h.lastChildMap={},h.allChildMap={}),x(ye),j!==void 0&&O(j),_()}),e.watch([E,()=>t.list],([j,ue])=>{ue&&ue.length>0&&o.isEmpty(g)&&x(ue),le()}),e.watch(()=>t.isOutMerge,()=>{t.isCascade&&t.multiple&&E.value.length>0&&F(P()).join(",")!==String(t.value??"")&&G()}),e.watch([()=>t.parentKey,()=>t.topParentValue],()=>{t.isCascade&&!o.isEmpty(g)&&A()});const ee=j=>{j&&t.disabled||(m.isOpen=j,j?p=E.value:oe(),e.nextTick(()=>{d.value&&d.value.initOpenShow(j)}),K(j))},Y=()=>{t.disabled||(E.value=[],t.multiple&&t.multipleRealTimeChange?G():oe())},H=j=>{if(m.dropDownPos=j.use.dropDownPos,t.multiple&&t.isShowTag){const ue=u.value?.$el?.offsetWidth||0;m.tagHeight=t.theme==="default"?`${j.original.dropDownHeight+1}px`:`${j.original.dropDownHeight}px`;const pe=j.original.winWidth-(j.original.controlOffset.left+j.original.dropDownWidth)>=ue?"right":"left";m.tagDirection=pe,pe==="right"?m.tagLeft=`${j.original.dropDownWidth-1}px`:m.tagLeft=`${(j.original.dropDownWidth-j.original.textWidth+ue+1)*-1}px`}},te=j=>{E.value=j,t.multiple?t.multipleRealTimeChange&&G():r.value?.setOpen(!1)},$=j=>{t.disabled||(E.value=j,G())},z=j=>{i("onError",j)},ce=()=>{r.value&&(r.value.checkIsShowOpen()||r.value.initCompleteOpen())};e.provide("$SelectTop",{getSelectData:X,getSelectValueInfo:q,getAllChildIds:S,calculationDropdownPosition:()=>{r.value?.calculationPosition()},convertListToJson:x,closeDropdown:()=>{r.value?.setOpen(!1)},refreshDisplayLabels:()=>{le()}});const de=()=>{const j=P();return F(j).join(",")};return l({getValue:de,getValueData:()=>{const j=de();if(t.multiple){const pe=j?j.split(","):[],he=[];return pe.forEach(ye=>{const Ce=q(ye);o.isEmpty(Ce)||he.push(Ce)}),he}if(!j)return null;const ue=q(j);return o.isEmpty(ue)?null:ue},setValue:j=>{O(j),_()},runInitComplete:()=>{R()}}),(j,ue)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(c),class:e.normalizeClass(b.value)},e.toDisplayString(w.value),11,Ff)):(e.openBlock(),e.createBlock(kn,{key:1,id:e.unref(c),ref_key:"refElDropdownLayer",ref:r,classParent:N.value,classText:"select-inText",classDropDown:T.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:L.value.join(","),textArrowDirection:n.arrowDirection,transitionLeave:n.transitionLeave,appendContainer:n.appendContainer,appendFollowWidth:n.theme!=="noBorder",onOpenBeforeCallback:n.onOpenBefore,onOnChangeOpen:ee,onOnClear:Y,onOnChangePosition:H},{textExtend:e.withCtx(()=>[n.multiple?(e.openBlock(),e.createElementBlock("span",Pf,[L.value.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:L.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(Mf,{ref_key:"refElList",ref:d,isSearch:n.isSearch,searchPlaceholder:n.searchPlaceholder,searchKey:n.searchKey,searchKeyType:n.searchKeyType,isMultiple:n.multiple,isCheckBoxAll:n.isCheckBoxAll,showDropDownTextFormat:n.showDropDownTextFormat,showDropDownTextFormatSub:n.showDropDownTextFormatSub,isCascade:n.isCascade,parentSelectable:n.parentSelectable,parentKey:n.parentKey,topParentValue:n.topParentValue,originalData:n.list,keyIndex:s,selectId:E.value,disabled:n.disabled,isOpen:m.isOpen,serverCallback:n.serverCallback,onOnChange:te,onOnInitComplete:ce,onOnError:z},null,8,["isSearch","searchPlaceholder","searchKey","searchKeyType","isMultiple","isCheckBoxAll","showDropDownTextFormat","showDropDownTextFormatSub","isCascade","parentSelectable","parentKey","topParentValue","originalData","selectId","disabled","isOpen","serverCallback"])]),dropdownExtend:e.withCtx(()=>[n.multiple&&n.isShowTag?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(C.value),style:e.normalizeStyle({height:m.tagHeight,left:m.tagLeft}),ref_key:"refElTags",ref:u},[e.createVNode($f,{showTextFormat:M.value,selectId:E.value,onOnRemove:$},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"]))}}),Rf=["id"],Hf={class:"paginate-statistic"},Uf={class:"paginate-list"},zf={class:"pagination",role:"navigation","aria-label":"pagination"},Jf=["tabindex","aria-label","onClick","onKeydown"],Kf={key:0},Wf={key:1},jf={key:0,class:"paginate-limit"},Yf={key:2,class:"paginate-jump"},To=10,ra=e.defineComponent({name:"ClPaginate",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},isShowLimit:{type:Boolean,default:!0},limitValue:{type:Number,default:10},limitData:Array,isShowJump:{type:Boolean,default:!0},totalCount:{type:Number,default:0},currentPage:{type:Number,default:1}},emits:["onChange"],setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("paginate");const d=`paginate-${o.getRandom(5)}`,u=a.id,s=e.ref(""),c=e.ref(""),m=e.ref(-1),p=e.ref(-1),g=e.computed(()=>{let w={"panel-paginate":!0,"paginate-disabled":a.disabled};return w=o.getJsonMerge(w,me.getClassNameJson(a.className)),w}),h=e.computed(()=>Math.max(1,parseInt(s.value)||To)),y=e.computed(()=>{const w=o.isFinite(a.currentPage)?a.currentPage:1,T=a.totalCount>0?Math.ceil(a.totalCount/h.value):0;return T>0?Math.min(Math.max(1,w),T):w}),E=e.computed(()=>{const w=a.limitData;if(o.isArray(w)&&!o.isEmpty(w)){const D=o.getListClone(w).filter(J=>!o.isEmpty(J)&&!o.isEmpty(J.id));if(D.length>0)return D}const T=i.value.pageStrip,C=o.isNonEmptyString(T)?T:"";return[{id:10,name:`10${C}`},{id:20,name:`20${C}`},{id:30,name:`30${C}`},{id:50,name:`50${C}`},{id:100,name:`100${C}`}]}),L=e.computed(()=>{const w=h.value,T=y.value,C=a.totalCount;let D=(T-1)*w,J=T*w;C>0?(D=D+1,J=J>C?C:J,D>J&&(D=J)):(D=0,J=0);const ne=i.value.statistic;return o.isNonEmptyString(ne)?o.convertStringFormat(ne,{s:D,e:J,_total:C}):""}),B=e.computed(()=>{let w=!1,T=!1,C=!1,D=!1,J=0;const ne=h.value,K=a.totalCount;K>0&&(J=Math.ceil(K/ne));const P=y.value;w=J>0?P===1:!0,T=w,C=J>0?P===J:!0,D=C;const x=[];if(x.push({icon:"angle-double-left",ariaLabel:"first page",active:!1,disabled:w,page:1}),x.push({icon:"angle-left",ariaLabel:"previous page",active:!1,disabled:T,page:w?1:P-1}),J>0){let S=[];if(J>7){const _=J-5+1+1;P<=4?(S=o.getArrByMinMax(1,5),S.push("…"),S.push(J)):P>=_?(S=o.getArrByMinMax(_-1,J),S.unshift("…"),S.unshift(1)):(S=o.getArrByMinMax(P-1,P+1),S.unshift("…"),S.unshift(1),S.push("…"),S.push(J))}else S=o.getArrByMinMax(1,J);S.forEach(v=>{x.push({title:v,active:v===P,isOmit:v==="…",page:v})})}return x.push({icon:"angle-right",ariaLabel:"next page",active:!1,disabled:D,page:C?J:P+1}),x.push({icon:"angle-double-right",ariaLabel:"last page",active:!1,disabled:C,page:J}),x}),I=(w,T)=>{const C=parseInt(String(w)),D=parseInt(String(T));o.isFinite(C)&&o.isFinite(D)&&(C!==m.value||D!==p.value)&&(m.value=C,p.value=D,t("onChange",C,D))},M=()=>{const w=!o.isEmpty(a.limitValue)&&o.isFinite(a.limitValue)?a.limitValue:To;let C=(w>0?w:To).toString();if(a.isShowLimit){const D=E.value.map(J=>J.id.toString());D.includes(C)||(C=D[0])}return C};s.value=M(),e.watch(()=>a.limitValue,()=>{const w=M();if(w!==s.value){s.value=w;const T=y.value;T!==a.currentPage&&I(T,w)}}),e.watch(()=>a.limitData,()=>{const w=M();w!==s.value&&(s.value=w,I(y.value,w))}),e.watch(()=>a.currentPage,()=>{m.value=-1,p.value=-1}),e.watch(()=>a.totalCount,()=>{const w=y.value;w!==a.currentPage&&I(w,s.value)});const N=w=>{!a.disabled&&!w.active&&!w.disabled&&!w.isOmit&&(c.value="",I(w.page,s.value))},b=w=>{if(a.disabled)return;E.value.some(C=>C.id.toString()===w)&&(c.value="",s.value=w,I(1,w))},V=w=>{if(a.disabled||!o.isNonEmptyString(w))return;const T=parseInt(w);if(o.isFinite(T)){const C=a.totalCount>0?Math.ceil(a.totalCount/h.value):0;if(T>=1&&(C===0||T<=C)){c.value="",I(T,s.value);return}}c.value=""};return(w,T)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(u),class:e.normalizeClass(g.value)},[e.createElementVNode("div",Hf,e.toDisplayString(L.value),1),e.createElementVNode("div",Uf,[e.createElementVNode("ul",zf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(C,D)=>(e.openBlock(),e.createElementBlock("li",{key:`${d}-${D}`,class:e.normalizeClass({"paginate-disabled":C.disabled||n.disabled,"paginate-active":C.active,"paginate-omit":C.isOmit}),tabindex:C.disabled||n.disabled?-1:0,role:"button","aria-label":C.ariaLabel||String(C.page),onClick:J=>N(C),onKeydown:[e.withKeys(J=>N(C),["enter"]),e.withKeys(e.withModifiers(J=>N(C),["prevent"]),["space"])]},[C.icon?(e.openBlock(),e.createElementBlock("span",Kf,[e.createVNode(ke,{name:C.icon},null,8,["name"])])):(e.openBlock(),e.createElementBlock("span",Wf,e.toDisplayString(C.title),1))],42,Jf))),128))])]),n.isShowLimit?(e.openBlock(),e.createElementBlock("div",jf,[e.createVNode(Sn,{list:E.value,value:s.value,disabled:n.disabled,transitionLeave:"dropdownLayer-close-no-anim",onOnChange:b},null,8,["list","value","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowJump?(e.openBlock(),e.createElementBlock("div",Yf,[e.createElementVNode("span",null,e.toDisplayString(e.unref(i).jumpTo),1),e.createVNode(Re,{value:c.value,"onUpdate:value":T[0]||(T[0]=C=>c.value=C),disabled:n.disabled,onOnKeyupEnter:V,onOnChangeBlur:V,onOnClear:V},null,8,["value","disabled"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(i).page),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],10,Rf))}}),qf=["id"],Xf={key:0,class:"portlet-head"},Gf={class:"portlet-title"},Qf={class:"portlet-body"},oi=e.defineComponent({name:"ClPortlet",__name:"Index",props:{id:String,className:{type:String,default:""},titleName:String,isShowHead:{type:Boolean,default:!0}},setup(n){const l=n,a=l.id,t=e.computed(()=>{const i={"panel-portlet":!0};return o.getJsonMerge(i,me.getClassNameJson(l.className))});return(i,r)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(a),class:e.normalizeClass(t.value)},[n.isShowHead?(e.openBlock(),e.createElementBlock("div",Xf,[e.createElementVNode("h3",Gf,[e.createTextVNode(e.toDisplayString(n.titleName),1),e.renderSlot(i.$slots,"titleExtend")])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",Qf,[e.renderSlot(i.$slots,"default")])],10,qf))}}),Zf=["id"],eh={key:6,class:"fenceScrollX-cover"},fn=e.defineComponent({name:"ClScrollXFence",__name:"Index",props:{id:String,className:String,isShowLeft:{type:Boolean,default:!0},isShowRight:{type:Boolean,default:!0},isShowCorner:{type:Boolean,default:!1},isShowCover:{type:Boolean,default:!1},cornerType:{type:String,default:""},leftWidth:{type:String,default:"0"},centerWidth:{type:String,default:"0"},rightWidth:{type:String,default:"0"},initLeft:String},emits:["onScrollX"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElScrollX"),u=e.computed(()=>{let p={"panel-scroll-x-fence":!0};return t.isShowCorner&&o.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-showCorner-${t.cornerType}`]=!0),o.osType().isMobile&&(p["fenceScrollX-mob"]=!0),p=o.getJsonMerge(p,me.getClassNameJson(t.className)),p}),s=e.computed(()=>{const p={"fenceScrollX-corner":!0};return o.isNonEmptyString(t.cornerType)&&(p[`fenceScrollX-corner-${t.cornerType}`]=!0),p}),c=p=>{i("onScrollX",p)};return e.onMounted(()=>{e.nextTick(()=>{if(d.value){if(o.isNonEmptyString(t.initLeft)){const p=parseInt(t.initLeft,10);o.isFinite(p)&&(d.value.scrollLeft=p)}d.value.addEventListener("scroll",c)}})}),e.onBeforeUnmount(()=>{d.value&&d.value.removeEventListener("scroll",c)}),e.onActivated(()=>{d.value&&d.value.addEventListener("scroll",c)}),e.onDeactivated(()=>{d.value&&d.value.removeEventListener("scroll",c)}),l({setScrollLeft:p=>{d.value&&o.isFinite(p)&&(d.value.scrollLeft=p)}}),(p,g)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(u.value)},[n.isShowLeft?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fenceScrollX-left",style:e.normalizeStyle({width:n.leftWidth})},[...g[0]||(g[0]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"fenceScrollX-center",ref_key:"refElScrollX",ref:d},[e.createElementVNode("div",{style:e.normalizeStyle({width:n.centerWidth})},null,4)],512),n.isShowRight?(e.openBlock(),e.createElementBlock("div",{key:2,class:"fenceScrollX-right",style:e.normalizeStyle({width:n.rightWidth})},[...g[1]||(g[1]=[e.createElementVNode("div",null,null,-1)])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isShowCorner?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(s.value)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),n.isShowCover?(e.openBlock(),e.createElementBlock("div",eh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))],10,Zf))}}),th=["id"],nh=["id"],ca=e.defineComponent({name:"ClSelectCascade",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,isClear:{type:Boolean,default:!1},isSearch:{type:Boolean,default:!1},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},width:String,isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isShowInMsg:{type:Boolean,default:!0},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextLevelSeparator:{type:String,default:" > "}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=`selectCascade-${o.getRandom(5)}`,s=t.id,c=e.reactive({lastValue:t.value,isFirstDataFinish:!1}),m=e.ref([]),p={dataJson:{},dataGroup:{},parentIdsJson:{}},g=e.ref(0),h=e.computed(()=>r.value.pleaseSelect),y=e.computed(()=>{const{placeholder:v}=t;return o.isNonEmptyString(v)?v.split("|"):[]}),E=e.computed(()=>{const{width:v}=t;return o.isNonEmptyString(v)?v.split("|"):[]}),L=e.computed(()=>{let v={"panel-select-cascade":!0};return v=o.getJsonMerge(v,me.getClassNameJson(t.className)),v}),B=v=>{v!==c.lastValue&&(c.lastValue=v,i("update:value",v),i("update:modelValue",v),i("onChange",v))},I=v=>o.isExistJsonKey(p.dataGroup,v),M=v=>I(v)?p.dataGroup[v]:[],N=v=>o.isExistJsonKey(p.dataJson,v)?p.dataJson[v]:null,b=()=>`top_${t.topParentValue}`,V=v=>{const{parentKey:F,topParentValue:_}=t,O={},q={};o.isEmpty(v)||v.forEach(X=>{const Z=o.getJsonClone(X);if(o.isEmpty(Z?.id)||o.isEmpty(Z?.[F]))return;const se=Z.id.toString(),le=Z[F].toString();O[se]=Z;const G=le===_.toString()?b():le;o.isExistJsonKey(q,G)||(q[G]=[]),q[G].push(Z)}),p.dataJson=O,p.dataGroup=q,g.value+=1},w=(v,F)=>{const _={idx:v,pId:F,placeholder:h.value,list:[],sty:{},selected:""};if(!o.isEmpty(F)){const Z=M(F);_.list=o.getListClone(Z)}const O=y.value,q=O.length;q>0&&(q>v?_.placeholder=o.isEmpty(O[v])?h.value:O[v]:q===1&&(_.placeholder=O[0]));const X=E.value;return X.length>v&&(o.isEmpty(X[v])||(_.sty.width=X[v],_.sty.flex="none")),_},T=(v,F)=>{const{parentKey:_,topParentValue:O}=t;let q=[];if(F&&F.indexOf(v)>-1)return[];const X=F?F.concat([v]):[v];if(o.isExistJsonKey(p.parentIdsJson,v))q=p.parentIdsJson[v];else{const Z=N(v);if(Z!=null){const se=Z[_].toString();if(se!==O.toString()){const le=N(se);if(le!=null){q.push(se);const G=T(se,X);G.length>0&&(q=q.concat(G))}}}p.parentIdsJson[v]=q}return q},C=v=>{let F=o.isUndefined(v)?t.value:v;F!=null&&!o.isEmpty(F)&&!o.isExistJsonKey(p.dataJson,F.toString())&&(F="");const _=[];if(F==null||o.isEmpty(F))_.push(w(0,b())),_.push(w(1,""));else{const O=F.toString(),q=[...T(O)].reverse(),X=q.length;if(X>0){q.forEach((se,le)=>{const G=le===0?b():q[le-1],oe=w(le,G);oe.selected=se,_.push(oe)});const Z=w(X,q[X-1]);Z.selected=O,_.push(Z)}else{const Z=w(0,b());Z.selected=O,_.push(Z)}}m.value=_},D=()=>{V(t.list),C(),c.isFirstDataFinish=!0,c.lastValue=t.value};e.onMounted(()=>{e.nextTick(()=>{D()})}),e.watch(()=>t.value,v=>{v!==c.lastValue&&c.isFirstDataFinish&&(C(),c.lastValue=v)}),e.watch(()=>t.list,v=>{if(!c.isFirstDataFinish){c.isFirstDataFinish=!0;return}p.parentIdsJson={},V(v);const{value:F}=t,_=F!=null&&!o.isEmpty(F)&&o.isExistJsonKey(p.dataJson,F.toString())?F:"";C(_),c.lastValue=_});const J=()=>!0,ne=(v,F)=>{let _="";if(o.isEmpty(v)&&F===0)C("");else if(o.isEmpty(v)){if(m.value.splice(F+1),F>0){const O=m.value[F-1];O&&(_=O.selected)}}else{const O=v.toString();I(O)?(m.value.splice(F+1),m.value.push(w(F+1,O))):(_=v,m.value.splice(F+1))}B(_)},K=()=>c.lastValue,P=v=>{const F=T(v),_=F.length>0?F.slice().reverse().concat([v]):[v],O=[];return _.forEach(q=>{const X=p.dataJson[q];X!=null&&!o.isEmpty(X.name)&&O.push(X.name)}),O},x=()=>{const v=c.lastValue;let F="";return v!=null&&!o.isEmpty(v)&&(F=P(v.toString()).join(" → ")),{value:v,show:F||(v!=null?v.toString():"")}},A=v=>{const F=[],_=new Set;let O=v;for(;o.isNonEmptyString(O)&&!_.has(O);){_.add(O);const q=N(O);if(q==null)break;o.isNonEmptyString(q.name)&&F.unshift(q.name);const X=q[t.parentKey],Z=X!=null?String(X):"";if(Z===""||Z===String(t.topParentValue))break;O=Z}return F},f=e.computed(()=>{t.list,g.value;const v=c.lastValue;if(v==null||o.isEmpty(v))return"";const F=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",_=A(v.toString());return _.length>0?_.join(F):v.toString()}),S=e.computed(()=>Je.getPlaintextOutText("selectCascade",t.plaintextEmptyText,f.value,t.value));return l({getValue:K,getValueData:x,setValue:v=>{C(v),c.lastValue=v}}),(v,F)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(s),class:"cl-plaintext-value"},e.toDisplayString(S.value),9,th)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(s),class:e.normalizeClass(L.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(_,O)=>(e.openBlock(),e.createElementBlock("div",{key:`${u}-${O}`,class:"selectCascade-item",style:e.normalizeStyle(_.sty)},[e.createVNode(Yn,{isShowMsg:n.isShowInMsg,isCheck:n.isCheckValidate,checkValue:_.selected,rules:n.validateRules},{default:e.withCtx(()=>[e.createVNode(Sn,{isClear:n.isClear,isSearch:n.isSearch,placeholder:_.placeholder,list:_.list,disabled:n.disabled,value:_.selected,"onUpdate:value":q=>_.selected=q,onOpenBefore:J,onOnChange:q=>ne(q,O)},null,8,["isClear","isSearch","placeholder","list","disabled","value","onUpdate:value","onOnChange"])]),_:2},1032,["isShowMsg","isCheck","checkValue","rules"])],4))),128))],10,nh))}}),oh=["onClick"],ah=["innerHTML"],lh=e.defineComponent({name:"ClSelectMoveSearchUl",__name:"SearchTree",props:{list:{type:Array,default:()=>[]}},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=`selectmove-search-tree-${o.getRandom(5)}`,i=r=>{o.isUndefined(r)||a("onClick",r.toString())};return(r,d)=>{const u=e.resolveComponent("cl-select-move-search-ul");return e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(s,c)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${s.id}-${c}`},[e.createElementVNode("a",{href:"javascript:",tabindex:"-1",class:e.normalizeClass({"tree-hig":s.isHig,"tree-active":s.isSelected}),onClick:e.withModifiers(m=>i(s.id),["stop"])},[e.createVNode(pt,{value:s.isSelected,indeterminate:s.isIndeterminate},null,8,["value","indeterminate"]),e.createElementVNode("span",{class:"tree-text",innerHTML:s.showTextLabel},null,8,ah)],10,oh),s.list&&s.list.length>0?(e.openBlock(),e.createBlock(u,{key:0,list:s.list,onOnClick:i},null,8,["list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))]))),128))])}}}),ih={class:"selectmove-search-list"},sh={key:1},rh={class:"selectmove-search-empty"},ch=1e3,uh=e.defineComponent({name:"ClSelectMoveSearch",__name:"Search",props:{disabled:Boolean,placeholder:String,width:Number,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("common");const d=e.inject("$SelectmoveTop"),u=e.inject("$SelectmoveBase");if(o.isUndefined(d)||o.isUndefined(u))throw new Error("SelectMove.Search 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const s=e.reactive({isOpen:!1,isInitSelect:!1}),c=e.ref([]),m=e.ref([]);let p="",g=[];const h={jsonSelectIds:{},jsonSelectHalfIds:{}},y=e.computed(()=>({"selectmove-search-input":!0,"selectmove-search-open":s.isOpen})),E=e.computed(()=>({"selectmove-search-dropdown":!0,"selectmove-search-open":s.isOpen})),L=e.computed(()=>{const P={};return a.width&&a.width>0&&(P.width=`${a.width}px`),P}),B=()=>{t("onChange",m.value.join(","))},I=()=>{s.isOpen=!1,c.value=[]},M=P=>{const x=u.convertSelectHalf(P);m.value=P,h.jsonSelectHalfIds=o.getArrConvertJson(x),h.jsonSelectIds=o.getArrConvertJson(P)},N=P=>{const x=P.toLowerCase().trim();if(x===p)return g;const A=[];if(o.isEmpty(a.searchKey))return we.warn("ClSelectMoveSearch","SelectMove.Search searchKey 为空,搜索将无结果"),p=x,g=A,A;const f=o.isNonEmptyString(a.searchMultipleJoin)?a.searchMultipleJoin:",",S=a.searchIsMultiple?x.split(f).map(_=>_.trim()):[x],k=a.searchKey.length,v=a.searchKey,F=d.getDataList();return o.isArray(F)?(F.forEach(_=>{if(o.isUndefined(_)||o.isUndefined(_.id)||!o.isString(_.id)&&!o.isNumber(_.id))return;const O=_.id.toString(),q=[];let X=0;for(let Z=0;Z<k;Z++){const se=_[v[Z]];if(!o.isString(se)){X++;continue}const le=se.toLowerCase();let G=!1;for(let oe=0;oe<S.length;oe++)if(S[oe].length>0&&le.indexOf(S[oe])>-1){G=!0;break}G&&q.push(!0)}if(q.length>0)switch(a.searchKeyType){case"||":A.push(O);break;case"&&":q.length===k-X&&A.push(O);break;default:we.warn("ClSelectMoveSearch",`SelectMove.Search searchKeyType 未知值「${a.searchKeyType}」,按 || 兜底`),A.push(O);break}}),p=x,g=A,A):(p=x,g=A,A)},b=(P,x,A,f,S)=>{const k=[],v=S||[];return o.isExistJsonKey(x,P)&&x[P].forEach(F=>{if(v.indexOf(F)>-1)return;const _=v.concat([F]),O=o.getJsonClone(d.getDataInfo(F));if(o.isEmpty(O))return;let q=o.isNonEmptyString(O.name)?o.encodeHTML(O.name):"";const X=a.searchTextFormat;if(X&&X.length>0){let le="";o.isArray(X)?X.length>A&&(le=X[A]):o.isString(X)&&(le=X),o.isEmpty(le)||(q=o.convertStringFormatEncodeHTML(le,O))}O.showTextLabel=q;let Z=!1,se=o.isExistJsonKey(x,F);se?O.list=b(F,x,A+1,f,_):(Z=!0,O.list=[],d.getDataGroup(F).length>0&&(se=!0,Z=!1)),O.isIndeterminate=o.isExistJsonKey(h.jsonSelectHalfIds,F),O.isSelected=o.isExistJsonKey(h.jsonSelectIds,F),O.isChild=se,O.isLast=Z,O.treeLevel=A,O.isHig=o.isExistJsonKey(f,F),k.push(O)}),k},V=P=>{if(P.length===0)return[];const{parentKey:x,topParentValue:A}=a,f={};let S=[];P.forEach(F=>{f[F]=!0;const _=u.getParentIds(F);S.push(..._),S.push(F)}),S=o.getArrUnique(S);const k={};S.forEach(F=>{const _=d.getDataInfo(F);if(o.isUndefined(_))return;const O=_[x],q=o.isEmpty(O)?A:O.toString(),X=q===A?d.getTopParentValue():q;o.isExistJsonKey(k,X)||(k[X]=[]),k[X].push(F)});const v=d.getTopParentValue();return o.isExistJsonKey(k,v)||we.warn("ClSelectMoveSearch","SelectMove.Search 数据存在环或祖先链断裂,搜索结果可能为空"),b(v,k,0,f)},w=()=>{if(s.isInitSelect=!1,!o.isEqualArr(a.selectId,m.value)){const x=u.convertSelectedValue(a.selectId,!0,[]);M(x)}},T=P=>{if(o.isNonEmptyString(P)){s.isInitSelect&&w();const x=N(P),A=V(x);c.value=A,s.isOpen=!0}else I()},C=P=>{const x=[];return P.forEach(A=>{const f=o.getJsonClone(A);if(o.isUndefined(f)||o.isUndefined(f.id))return;const S=f.id.toString();f.isIndeterminate=o.isExistJsonKey(h.jsonSelectHalfIds,S),f.isSelected=o.isExistJsonKey(h.jsonSelectIds,S),f.list&&f.list.length>0&&(f.list=C(f.list)),x.push(f)}),x},D=P=>{if(s.isOpen){const x=me.getParent(P.target,".selectmove-search");o.isUndefined(x)&&(s.isOpen=!1)}};e.onUnmounted(()=>{document.body.removeEventListener("click",D)}),e.watch(()=>s.isOpen,P=>{P?document.body.addEventListener("click",D):document.body.removeEventListener("click",D)}),e.watch(()=>a.selectId,()=>{s.isInitSelect=!0,s.isOpen&&(w(),c.value=C(c.value))},{immediate:!0}),e.watch(()=>[a.searchKey,a.searchKeyType,a.searchIsMultiple,a.searchMultipleJoin],()=>{p="",g=[]});const J=P=>{T(P)},ne=P=>{s.isOpen||T(P)},K=P=>{const x=o.isExistJsonKey(h.jsonSelectIds,P),A=u.convertSelectedValue(P,!x,m.value);M(A),c.value=C(c.value),B()};return(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"selectmove-search",style:e.normalizeStyle(L.value)},[e.createElementVNode("div",{class:e.normalizeClass(y.value)},[e.createVNode(Xt,{placeholder:n.placeholder,disabled:n.disabled,changeDelayTime:ch,onOnChange:J,onOnFocus:ne},null,8,["placeholder","disabled"])],2),s.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(E.value)},[e.createElementVNode("div",ih,[c.value.length>0?(e.openBlock(),e.createBlock(lh,{key:0,list:c.value,onOnClick:K},null,8,["list"])):(e.openBlock(),e.createElementBlock("ul",sh,[e.createElementVNode("li",rh,e.toDisplayString(e.unref(i).noResultsText),1)]))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],4))}}),dh={class:"selectmove-tree"},mh={class:"selectmove-tree-head"},ph={class:"selectmove-tree-head-title"},fh={class:"selectmove-tree-body"},hh=["onClick"],gh=["innerHTML"],ja=10,vh=e.defineComponent({name:"ClSelectMoveTree",__name:"Tree",props:{disabled:Boolean,maxWidth:Number,width:Number,treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.inject("$SelectmoveTop"),r=e.inject("$SelectmoveBase");if(o.isUndefined(i)||o.isUndefined(r))throw new Error("SelectMove.Tree 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const d=`selectmove-tree-${o.getRandom(5)}`,u=e.reactive({selectIds:[],HalfSelectIds:[],openActiveId:[]}),s=e.ref([]),c=()=>{t("onChange",u.selectIds.join(","))},m=w=>{let T=0;const C=i.getDataGroup(w);if(C.length>0){const D=[],J=[];C.forEach(ne=>{const K=ne.id.toString();o.isExistValue(u.selectIds,K)&&D.push(K),o.isExistValue(u.HalfSelectIds,K)&&J.push(K)}),(J.length>0||D.length>0)&&(T=2),D.length>0&&D.length===C.length&&(T=1)}return T},p=(w,T,C)=>{const D={idx:w,pId:T,title:!o.isEmpty(a.treeTitle)&&a.treeTitle.length>w?a.treeTitle[w]:C,list:[],checkAll:0,sty:{}};if(a.width&&a.maxWidth&&a.width>0&&a.maxWidth>0){let J=a.width-3;const ne=a.maxWidth/a.width;w+1>=ne&&(J+=3),D.sty.width=`${J}px`}if(!o.isEmpty(T)){const J=i.getDataGroup(T);J.length>0&&(D.list=J.map(ne=>{const K=ne.id.toString(),P=o.getJsonClone(ne);P.selected=o.isExistValue(u.selectIds,K),P.indeterminate=o.isExistValue(u.HalfSelectIds,K),P.isActive=o.isExistValue(u.openActiveId,K);const x=i.getDataGroup(K);P.isSub=x.length>0;let A=o.isNonEmptyString(ne.name)?o.encodeHTML(ne.name):"";const f=a.treeTextFormat;if(f&&f.length>0){let S="";o.isArray(f)?f.length>w&&(S=f[w]):o.isString(f)&&(S=f),o.isEmpty(S)||(A=o.convertStringFormatEncodeHTML(S,P))}return P.showTextLabel=A,P})),D.checkAll=m(T)}return D},g=w=>{const T=r.convertSelectedValue(w,!0,[]),C=r.convertSelectHalf(T);u.selectIds=T,u.HalfSelectIds=C},h=(w,T)=>{const C=[];if(s.value.forEach((D,J)=>{J<=w&&C.push(p(D.idx,D.pId,D.title))}),i.getDataGroup(T).length>0){const D=i.getDataInfo(T),J=o.isNonEmptyString(D&&D.name)?D.name:"";C.push(p(w+1,T,J))}s.value=C},y=(w,T)=>{const C=w.id.toString(),D=o.getArrClone(u.openActiveId);D.splice(T),D.push(C),u.openActiveId=D,h(T,C)},E=(w,T)=>{const C=r.convertSelectedValue(w,T,u.selectIds),D=r.convertSelectHalf(C);u.selectIds=C,u.HalfSelectIds=D,s.value=s.value.map(J=>p(J.idx,J.pId,J.title)),c()},L=w=>{const T=s.value.length,C=w||[];if(T>0&&u.selectIds.length>0){let D,J=-1;for(let ne=T-1;ne>=0;ne--)if(s.value[ne].list.some(P=>{if(P.selected||P.indeterminate)return D=P,!0})){J=ne;break}if(J>-1&&!o.isUndefined(D)&&D.isSub){const ne=D.id.toString();if(C.indexOf(ne)>-1)return;C.push(ne),y(D,J),L(C)}}},B=()=>{const w=[];return w.push(p(0,i.getTopParentValue(),"")),w};let I=null;const M=()=>{u.openActiveId=[],o.isEmpty(a.selectId)?(u.selectIds=[],u.HalfSelectIds=[]):g(a.selectId),s.value=B(),L(),I=o.getArrClone(a.selectId),a.treeShowMinLevel>1&&u.selectIds.length===0&&e.nextTick(()=>{const w=s.value.length,T=o.isFinite(a.treeShowMinLevel)?Math.min(a.treeShowMinLevel,ja):ja;if(T>w){const C=[];for(let D=w;D<T;D++)C.push(p(D,"",""));s.value=s.value.concat(C)}})};e.onMounted(()=>{e.nextTick(()=>{M()})}),e.watch(()=>a.dataRefreshIndex,()=>{M()}),e.watch(()=>a.selectId,w=>{(o.isUndefined(I)?!1:o.isEqualArr(w,I))||(I=o.getArrClone(w),g(w),s.value=s.value.map(C=>p(C.idx,C.pId,C.title)),L())});const N=(w,T)=>{const C=i.getDataGroup(T.toString()).map(D=>D.id.toString());E(C,w.value)},b=(w,T)=>{E(T.toString(),w.value)},V=(w,T,C)=>{if(a.disabled)return;const D=T.id.toString();if(o.isEmpty(i.getDataGroup(D))){if(me.getParent(w.target,".selectmove-option-checkbox",".selectmove-option"))return;E(D.toString(),!o.isExistValue(u.selectIds,D))}y(T,C)};return(w,T)=>(e.openBlock(),e.createElementBlock("div",dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(C,D)=>(e.openBlock(),e.createElementBlock("div",{key:`${d}-tree-${D}`,class:"selectmove-tree-item",style:e.normalizeStyle(C.sty)},[e.createElementVNode("div",mh,[e.withDirectives(e.createVNode(pt,{disabled:n.disabled,value:C.checkAll===1,indeterminate:C.checkAll===2,onOnChange:J=>N(J,C.pId)},null,8,["disabled","value","indeterminate","onOnChange"]),[[e.vShow,C.list.length>0]]),e.createElementVNode("div",ph,e.toDisplayString(C.title),1)]),e.createElementVNode("div",fh,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.list,(J,ne)=>(e.openBlock(),e.createElementBlock("li",{key:`${d}-${J.id}-${ne}`,class:e.normalizeClass({"selectmove-option":!0,active:J.isActive}),onClick:K=>V(K,J,D)},[e.createElementVNode("div",null,[e.createVNode(pt,{className:"selectmove-option-checkbox",disabled:n.disabled,value:J.selected,indeterminate:J.indeterminate,onOnChange:K=>b(K,J.id)},null,8,["disabled","value","indeterminate","onOnChange"]),e.createElementVNode("div",{class:"selectmove-option-text",innerHTML:J.showTextLabel},null,8,gh),J.isSub?(e.openBlock(),e.createBlock(ke,{key:0,name:"angle-right",className:"sub-icon"})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],10,hh))),128))])])],4))),128)),e.renderSlot(w.$slots,"tail")]))}}),yh={class:"selectmove-result"},kh={class:"selectmove-result-head"},Sh=["innerHTML"],wh={class:"selectmove-result-body"},Eh=["innerHTML"],Ch=e.defineComponent({name:"ClSelectMoveResult",__name:"Result",props:{disabled:Boolean,width:Number,resultCountFormat:String,resultTextFormat:String,resultMergeParent:Boolean,selectId:{type:Array,default:()=>[]},dataRefreshIndex:Number},emits:{onChange:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("common");const d=e.inject("$SelectmoveTop"),u=e.inject("$SelectmoveBase");if(o.isUndefined(d)||o.isUndefined(u))throw new Error("SelectMove.Result 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用");const s=`selectmove-result-${o.getRandom(5)}`,c=e.ref([]),m=e.computed(()=>c.value.length),p=e.computed(()=>o.isNonEmptyString(a.resultCountFormat)?o.convertStringFormat(a.resultCountFormat,{_count:m.value}):`${i.value.selected} ${m.value} ${i.value.count}`),g=e.computed(()=>{const B={};return a.width&&a.width>0&&(B.width=`${a.width}px`),B}),h=B=>{t("onChange",B.join(","))},y=B=>{if(o.isEmpty(B))return[];const I=B.filter(b=>!o.isUndefined(b)&&!o.isEmpty(b)),M=a.resultMergeParent?u.getValueMergeParent(I):u.getValueSplitChild(I),N=[];return M.forEach(b=>{const V=d.getDataInfo(b);if(o.isUndefined(V))return;const w=o.getJsonClone(V);o.isNonEmptyString(a.resultTextFormat)?w.showTextLabel=o.convertStringFormatEncodeHTML(a.resultTextFormat,w):o.isNonEmptyString(w.name)?w.showTextLabel=o.encodeHTML(w.name):w.showTextLabel="",N.push(w)}),N};e.watch(()=>a.selectId,B=>{const M=(o.isEmpty(B)?[]:B).filter(V=>!o.isUndefined(V)&&!o.isEmpty(V)),N=c.value.map(V=>V.id.toString());o.isEqualArr(M,N)||(c.value=y(M))},{immediate:!0}),e.watch(()=>a.dataRefreshIndex,()=>{c.value=y(a.selectId)}),e.watch(()=>a.resultMergeParent,()=>{c.value=y(a.selectId)});const E=()=>{c.value=[],h([])},L=B=>{const I=[],M=[],N=B.id.toString();c.value.forEach(b=>{const V=b.id.toString();V!==N&&(M.push(b),I.push(V))}),c.value=M,h(I)};return(B,I)=>(e.openBlock(),e.createElementBlock("div",yh,[e.createElementVNode("div",{class:"selectmove-result-container",style:e.normalizeStyle(g.value)},[e.createElementVNode("div",kh,[e.createElementVNode("span",null,[n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn-cleanAll",type:"button",onClick:E},e.toDisplayString(e.unref(i).deleteAll),1))]),e.createElementVNode("span",{innerHTML:p.value},null,8,Sh)]),e.createElementVNode("div",wh,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(M,N)=>(e.openBlock(),e.createElementBlock("li",{key:`${s}-${M.id}-${N}`},[e.createElementVNode("div",null,[e.createElementVNode("div",{innerHTML:M.showTextLabel},null,8,Eh),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(),e.createBlock(ke,{key:0,name:"close",className:"btn-clean",onClick:b=>L(M)},null,8,["onClick"]))])]))),128))])])],4)]))}}),bh={class:"selectmove-body"},xh={key:0,class:"selectmove-result"},Bh=100,Ih=175,Ya=e.defineComponent({name:"ClSelectMoveContainer",__name:"Container",props:{disabled:Boolean,width:Number,isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShowSlot:Boolean,resultIsShowSubUnit:Boolean,resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},dataRefreshIndex:{type:Number,default:0},selectId:{type:Array,default:()=>[]},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"}},emits:{onSelectValue:n=>!0,onInitComplete:()=>!0},setup(n,{emit:l}){const a=n,t=l;let i=!1;const r=e.inject("$SelectmoveTop");if(o.isUndefined(r))throw new Error("SelectMove.Container 缺少容器依赖($SelectmoveTop),请确保在 ClSelectMove 内使用");const d=e.reactive({searchWidth:0,treeWidth:0,resultWidth:0}),u={parentIdsJson:Object.create(null),childIdJson:Object.create(null),childIdsJson:Object.create(null)},s=L=>{t("onSelectValue",L)},c=()=>{e.nextTick(()=>{i||t("onInitComplete")})},m=L=>{let B=[];return o.isExistJsonKey(u.childIdJson,L)?B=u.childIdJson[L]:r.isCheckChildren(L)&&(r.getDataGroup(L).forEach(I=>{o.isUndefined(I)||o.isUndefined(I.id)||B.push(I.id.toString())}),u.childIdJson[L]=B),B},p=(L,B)=>{let I=[];const M=B||[];return M.indexOf(L)>-1||(M.push(L),o.isExistJsonKey(u.childIdsJson,L)?I=u.childIdsJson[L]:(r.isCheckChildren(L)&&r.getDataGroup(L).forEach(N=>{if(o.isUndefined(N)||o.isUndefined(N.id))return;const b=N.id.toString();I.push(b);const V=p(b,M);V.length>0&&(I=I.concat(V))}),u.childIdsJson[L]=I)),I},g=(L,B)=>{const{parentKey:I,topParentValue:M}=a;let N=[];const b=B||[];if(b.indexOf(L)>-1)return N;if(b.push(L),o.isExistJsonKey(u.parentIdsJson,L))N=u.parentIdsJson[L];else{const V=r.getDataInfo(L);if(!o.isUndefined(V)){const w=V[I],T=o.isEmpty(w)?M:w.toString();if(T!==M&&!o.isUndefined(r.getDataInfo(T))){N.push(T);const C=g(T,b);C.length>0&&(N=N.concat(C))}}u.parentIdsJson[L]=N}return N},h=(L,B,I)=>{const M=(o.isUndefined(I)?[]:I).filter(D=>!o.isUndefined(D));if(o.isUndefined(L))return o.getArrClone(M);const N=o.isObject(L)?L:[L];if(!o.isArray(N))return o.getArrClone(M);const b=o.getArrConvertJson(M),V={},w=[],T=[];N.forEach(D=>{if(o.isUndefined(D))return;const J=[],ne=[],K=D.toString();if(B){if(!(o.isExistJsonKey(b,K)||o.isExistJsonKey(V,K))){J.push(K);const x=p(K);x&&x.length>0&&J.push(...x);const A=g(K);for(let f=0;f<A.length;f++){const S=A[f].toString();if(o.isExistJsonKey(b,S)||o.isExistJsonKey(V,S))break;const k=m(S),v=[];if(k.forEach(F=>{const _=F.toString();(o.isExistJsonKey(b,_)||o.isExistJsonKey(V,_)||J.indexOf(_)>-1)&&v.push(_)}),k.length===v.length)J.push(S);else break}}}else{ne.push(K);const P=p(K);P&&P.length>0&&ne.push(...P);const x=g(K);ne.push(...x)}J.length>0&&J.forEach(P=>{w.push(P),V[P]=!0}),ne.length>0&&ne.forEach(P=>{T.push(P)})});let C=o.getArrClone(M);return C.push(...w),C=o.getArrUnique(C),C=o.getArrRemoveById(C,T),C},y=L=>{if(o.isUndefined(L)||!o.isArray(L))return[];const B=[],I={};L.forEach(b=>{I[b]=!0;const V=g(b);B.push(...V)});const M=[],N={};return B.forEach(b=>{!o.isExistJsonKey(N,b)&&!o.isExistJsonKey(I,b)&&(N[b]=!0,M.push(b))}),M},E=()=>{const L=a.width;if(L!==void 0&&o.isFinite(L)&&L>=350){const B=Math.floor(L/Ih),I=Math.floor(L/B);d.searchWidth=L,d.treeWidth=I,d.resultWidth=I}};return e.onMounted(()=>{E(),c()}),e.onBeforeUnmount(()=>{i=!0}),e.watch(()=>a.dataRefreshIndex,()=>{u.parentIdsJson=Object.create(null),u.childIdJson=Object.create(null),u.childIdsJson=Object.create(null)}),e.watch(()=>a.width,()=>{E()}),e.provide("$SelectmoveBase",{convertSelectedValue:(L,B,I)=>{let M=!1;if(B&&o.isObject(L)&&L.length>Bh&&(M=!0),M){const N=r.getValueMergeParent(L);return h(N,B,I)}else return h(L,B,I)},convertSelectHalf:y,getChildIds:p,getParentIds:g,getLastChildIds:(L,B)=>r.getLastChildIds(L,B),getValueMergeParent:L=>r.getValueMergeParent(L),getValueSplitChild:L=>r.getValueSplitChild(L)}),(L,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.isSearch?(e.openBlock(),e.createBlock(uh,{key:0,disabled:n.disabled,width:d.searchWidth,placeholder:n.searchPlaceholder,searchKey:n.searchKey,searchKeyType:n.searchKeyType,searchIsMultiple:n.searchIsMultiple,searchMultipleJoin:n.searchMultipleJoin,searchTextFormat:n.searchTextFormat,selectId:n.selectId,parentKey:n.parentKey,topParentValue:n.topParentValue,onOnChange:s},null,8,["disabled","width","placeholder","searchKey","searchKeyType","searchIsMultiple","searchMultipleJoin","searchTextFormat","selectId","parentKey","topParentValue"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",bh,[e.createVNode(vh,{disabled:n.disabled,maxWidth:d.searchWidth,width:d.treeWidth,treeTitle:n.treeTitle,treeShowMinLevel:n.treeShowMinLevel,treeTextFormat:n.treeTextFormat,selectId:n.selectId,dataRefreshIndex:n.dataRefreshIndex,onOnChange:s},{tail:e.withCtx(()=>[n.resultIsShowSlot?(e.openBlock(),e.createElementBlock("div",xh,[e.renderSlot(L.$slots,"resultSelect")])):n.resultIsShowSubUnit?(e.openBlock(),e.createBlock(Ch,{key:1,disabled:n.disabled,width:d.resultWidth,resultTextFormat:n.resultTextFormat,resultCountFormat:n.resultCountFormat,resultMergeParent:n.resultMergeParent,selectId:n.selectId,dataRefreshIndex:n.dataRefreshIndex,onOnChange:s},null,8,["disabled","width","resultTextFormat","resultCountFormat","resultMergeParent","selectId","dataRefreshIndex"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))]),_:3},8,["disabled","maxWidth","width","treeTitle","treeShowMinLevel","treeTextFormat","selectId","dataRefreshIndex"])])],64))}}),Dh=["id"],Th={className:"selectmove-text-num"},Nh={class:"selectmove-container"},Vh=["id"],ai=e.defineComponent({name:"ClSelectMove",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},isDropdown:{type:Boolean,default:!1},placeholder:String,isClear:{type:Boolean,default:!1},containerWidth:{type:Number,default:350},isSearch:{type:Boolean,default:!0},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||"},searchIsMultiple:{type:Boolean,default:!1},searchMultipleJoin:{type:String,default:","},searchTextFormat:[String,Array],treeTitle:{type:Array,default:()=>[]},treeShowMinLevel:{type:Number,default:1},treeTextFormat:[String,Array],resultIsShow:{type:Boolean,default:!0},resultTextFormat:String,resultCountFormat:String,resultMergeParent:{type:Boolean,default:!0},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useSlots(),d=t.id,u=e.useTemplateRef("refElDropdownLayer"),s=e.reactive({dataRefreshIndex:0,selectedIds:[],IsShowResultSlot:!o.isUndefined(r.resultSelect),isInitEmitDone:!1}),c=e.ref([]),m={dataJson:{},dataGroup:{},childLastIdsJson:{}},p=e.computed(()=>({disabled:t.disabled,width:t.containerWidth,isSearch:t.isSearch,searchPlaceholder:t.searchPlaceholder,searchKey:t.searchKey,searchKeyType:t.searchKeyType,searchIsMultiple:t.searchIsMultiple,searchMultipleJoin:t.searchMultipleJoin,searchTextFormat:t.searchTextFormat,treeTitle:t.treeTitle,treeShowMinLevel:t.treeShowMinLevel,treeTextFormat:t.treeTextFormat,resultIsShowSubUnit:t.resultIsShow,resultIsShowSlot:s.IsShowResultSlot,resultTextFormat:t.resultTextFormat,resultCountFormat:t.resultCountFormat,resultMergeParent:t.resultMergeParent,parentKey:t.parentKey,topParentValue:t.topParentValue})),g=e.computed(()=>{let O="panel-selectmove ";return o.isNonEmptyString(t.className)&&(O+=t.className),t.isDropdown||t.disabled&&(O+=" selectmove-disabled "),O}),h=O=>{i("update:value",O),i("update:modelValue",O)},y=(O,q)=>{h(O),i("onChange",O,q)},E=()=>{i("onInit")},L=()=>t.list,B=O=>o.isExistJsonKey(m.dataGroup,O.toString()),I=O=>{const q=O.toString();return B(q)?m.dataGroup[q]:[]},M=O=>{const q=O.toString();return o.isExistJsonKey(m.dataJson,q)?m.dataJson[q]:null},N=()=>`top_${t.topParentValue}`,b=O=>{const{parentKey:q,topParentValue:X}=t,Z={},se={};!o.isEmpty(O)&&o.isArray(O)&&O.forEach(le=>{const G=o.getJsonClone(le);if(!o.isString(G.id)&&!o.isNumber(G.id))return;const oe=G.id.toString(),R=o.isEmpty(G[q])?X:G[q].toString();Z[oe]=G;const U=R===X?N():R;o.isExistJsonKey(se,U)||(se[U]=[]),se[U].push(G)}),m.dataJson=Z,m.dataGroup=se,m.childLastIdsJson={}};b(t.list);const V=(O,q)=>{let X=[];const Z=q||[];return Z.indexOf(O)>-1||(Z.push(O),o.isExistJsonKey(m.childLastIdsJson,O)&&m.childLastIdsJson[O].length>0?X=m.childLastIdsJson[O]:(B(O)?I(O).forEach(se=>{const le=V(se.id.toString(),Z);le.length>0&&(X=X.concat(le))}):X.push(O),m.childLastIdsJson[O]=X)),X},w=(O,q)=>{const{parentKey:X,topParentValue:Z}=t,se=q||[],le={},G=[];let oe=[];if(O.forEach(R=>{const U=M(R);if(!o.isUndefined(U)){const Q=U[X],ee=o.isUndefined(Q)?Z:Q.toString();ee===Z?oe.push(R):(o.isExistJsonKey(le,ee)||(le[ee]=[]),le[ee].push(R))}}),!o.isEmpty(le))for(const[R,U]of Object.entries(le))U.length===I(R).length&&se.indexOf(R)===-1?G.push(R):oe=oe.concat(U);if(G.length>0){oe.push(...G);const R=o.getArrUnique(oe);return w(R,se.concat(G))}else return oe},T=O=>{const q=[],X=o.getArrConvertJson(O);return O.forEach(se=>{const le=I(se);if(o.isEmpty(le))q.push(se);else{const G=[];le.forEach(oe=>{o.isExistJsonKey(X,oe.id.toString())&&G.push(oe.id)}),le.length!==G.length&&q.push(se)}}),w(q)},C=O=>{let q=[];return O.forEach(X=>{const Z=V(X);q.push(...Z)}),q=o.getArrUnique(q),q},D=(O,q)=>(o.isBoolean(q)?q:t.isOutMerge)?T(O):C(O),J=O=>{const q=[],X=[];return O.forEach(Z=>{const se=M(Z);o.isUndefined(se)||(q.push(se),X.push(o.isNonEmptyString(se.name)?o.encodeHTML(se.name):""))}),{list:q,label:X}},ne=O=>{const q=[],X=new Set;let Z=O;for(;o.isNonEmptyString(Z)&&!X.has(Z);){X.add(Z);const se=M(Z);if(!se)break;o.isNonEmptyString(se.name)&&q.unshift(se.name);const le=se[t.parentKey],G=le!=null?String(le):"";if(G===""||G===String(t.topParentValue))break;Z=G}return q},K=e.computed(()=>{if(t.list,o.isEmpty(s.selectedIds))return"";const O=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",q=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return D(s.selectedIds,t.resultMergeParent).map(Z=>{const se=ne(Z);return o.removeHTMLTags(se.length>0?se.join(O):Z)}).join(q)}),P=e.computed(()=>Je.getPlaintextOutText("selectMove",t.plaintextEmptyText,K.value,t.value)),x=()=>{if(t.isDropdown)if(o.isEmpty(s.selectedIds))c.value=[];else{const O=D(s.selectedIds,t.resultMergeParent);c.value=J(O).label}};(()=>{o.isNonEmptyString(t.value)&&(s.selectedIds=o.split(t.value)),x()})(),e.watch(()=>t.value,(O,q)=>{if(O!==q){const X=o.isNonEmptyString(O)?o.split(O):[],Z=D(s.selectedIds);o.isEqualArr(X,Z)||(s.selectedIds=o.isEmpty(X)?[]:X,x())}}),e.watch(()=>t.list,O=>{o.isArray(O)&&(b(O),s.selectedIds=s.selectedIds.filter(q=>!o.isUndefined(M(q))),s.dataRefreshIndex++,x())}),e.watch(()=>t.resultMergeParent,()=>{x()});const f=()=>{t.disabled||(s.selectedIds=[],x(),y("",[]))},S=()=>{t.isDropdown&&(x(),u.value&&(u.value.checkIsShowOpen()||u.value.initCompleteOpen())),s.isInitEmitDone||(s.isInitEmitDone=!0,E())},k=O=>{const q=o.isEmpty(O)?[]:o.split(O);s.selectedIds=q;const X=D(q),Z=J(X);x(),y(X.join(","),Z.list)};return e.provide("$SelectmoveTop",{isCheckChildren:B,getDataGroup:I,getDataInfo:M,getDataList:L,getLastChildIds:V,getValueMergeParent:T,getValueSplitChild:C,getTopParentValue:N}),l({getValue:()=>D(s.selectedIds).join(","),getValueData:()=>{const O=D(s.selectedIds);return J(O).list},setValue:O=>{s.selectedIds=o.isString(O)&&!o.isEmpty(O)?o.split(O):[],x()}}),(O,q)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(d),class:"cl-plaintext-value"},e.toDisplayString(P.value),9,Dh)):n.isDropdown?(e.openBlock(),e.createBlock(kn,{key:1,id:e.unref(d),ref_key:"refElDropdownLayer",ref:u,classParent:g.value,classText:"selectmove-text",classDropDown:"selectmove-dropdown",placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:c.value.join(","),textArrowDirection:"right",isUseDropdownArrow:!0,appendContainer:n.appendContainer,onOnClear:f},{textExtend:e.withCtx(()=>[e.createElementVNode("span",Th,[c.value.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:c.value.length},null,8,["num"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])]),dropdown:e.withCtx(()=>[e.createElementVNode("div",Nh,[e.createVNode(Ya,e.mergeProps(p.value,{dataRefreshIndex:s.dataRefreshIndex,selectId:s.selectedIds,onOnSelectValue:k,onOnInitComplete:S}),{resultSelect:e.withCtx(()=>[e.renderSlot(O.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])])]),_:3},8,["id","classParent","placeholder","isDisabled","isClear","textLabel","appendContainer"])):(e.openBlock(),e.createElementBlock("div",{key:2,id:e.unref(d),class:e.normalizeClass(g.value)},[e.createVNode(Ya,e.mergeProps(p.value,{dataRefreshIndex:s.dataRefreshIndex,selectId:s.selectedIds,onOnSelectValue:k,onOnInitComplete:S}),{resultSelect:e.withCtx(()=>[e.renderSlot(O.$slots,"resultSelect")]),_:3},16,["dataRefreshIndex","selectId"])],10,Vh))}}),Mh=["id"],Oh={key:0,class:"cl-plaintext-value"},_h={key:2,class:"selectTag-container"},Ah=["aria-selected","aria-disabled","tabindex"],Lh=["aria-selected","aria-disabled","tabindex","onClick","onKeydown"],$h=["innerHTML"],Fh={key:1},ua=e.defineComponent({name:"ClSelectTag",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:Boolean,type:{type:String,required:!0,validator:n=>["checkbox","radio"].indexOf(n)!==-1},list:{type:Array,default:()=>[]},theme:String,width:String,isShowAll:Boolean,showAllLabel:String,isInitRadioValue:{type:Boolean,default:!0},isRadioClickCancel:Boolean,checkChangeBefore:Function,isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l,a,t)=>!0,onInit:(n,l,a)=>!0,onError:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=`s-${o.getRandom(5)}`,s=t.id,c=e.reactive({theme:""}),m=e.ref(!1),p=Z=>{let se=[];return o.isEmpty(Z)||(se=Z.toString().split(",")),se},g=e.ref(p(t.value));let h=[],y={};const E=e.ref(0),L=e.ref(!1);let B=0;const I=e.computed(()=>{const Z=t.list;return o.isArray(Z)?Z.filter(se=>!o.isEmpty(se)):[]}),M=e.computed(()=>{const Z=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";t.list,E.value;const se=[];return g.value.forEach(le=>{const G=o.isExistJsonKey(y,le)?y[le]:void 0;se.push(G&&o.isNonEmptyString(G.name)?G.name:le)}),se.filter(le=>o.isNonEmptyString(le)).join(Z)}),N=e.computed(()=>Je.getPlaintextOutText("selectTag",t.plaintextEmptyText,M.value,t.value)),b=e.computed(()=>{const{theme:Z}=t,se={"panel-select-tag":!0};let le=c.theme;return Z&&(le=Z),o.isEmpty(le)||(se[`selectTag-${le}`]=!0),o.getJsonMerge(se,me.getClassNameJson(t.className))}),V=e.computed(()=>{const Z={};return o.isEmpty(t.width)||(Z.width=t.width),Z}),w=Z=>{i("update:value",Z),i("update:modelValue",Z)},T=Z=>{if(!o.isEqualArr(g.value,Z)){const se=o.getArrClone(g.value),le=D(se);g.value=o.getArrClone(Z);const{value:G,isAll:oe,info:R}=D(Z);t.isShowAll&&(m.value=oe),w(G),i("onChange",G,R,oe,{value:le.value,info:le.info})}},C=()=>{e.nextTick(()=>{const{value:Z,isAll:se,info:le}=D(g.value);i("onInit",Z,le,se)})},D=Z=>{const se=[];o.isEmpty(Z)||Z.forEach(R=>{o.isExistJsonKey(y,R)&&se.push(o.getJsonClone(y[R]))});const le=Z.join(","),G=se.length>0&&se.length===h.length;let oe;return t.type==="radio"?(oe={},se.length>0&&(oe=se[0])):oe=se,{value:le,info:oe,isAll:G}},J=Z=>!o.isEmpty(Z.id)&&g.value.includes(Z.id.toString()),ne=Z=>{const se={};return Z.isHtml?se.width="auto":o.isEmpty(Z.width)?o.isEmpty(t.width)||(se.width=t.width):se.width=Z.width,se},K=()=>{const Z=Je.getGlobalConfig("selectTag");Z?.theme&&(c.theme=Z.theme)},P=Z=>{const se=[];if(Z.length>0){const le=y[Z[0]],G=le&&!o.isEmpty(le.type)?le.type:t.type;Z.forEach(oe=>{if(o.isExistJsonKey(y,oe)){const R=y[oe];if((o.isEmpty(R.type)?t.type:R.type)===G)switch(G){case"radio":se.length===0&&se.push(oe);break;case"checkbox":se.push(oe);break}}})}return se},x=Z=>{if(y={},h=[],!o.isEmpty(Z)){const se=o.getArrClone(g.value);Z.forEach(le=>{if(o.isEmpty(le?.id))return;const G=le.id.toString();y[G]=le,le.isDisabled?o.isExistValue(se,G)&&h.push(G):h.push(G)})}E.value+=1},A=()=>{if(L.value){let Z=[];o.isEmpty(g.value)||(Z=P(g.value),o.isEqualArr(g.value,Z)||(g.value=Z,w(Z.join(",")))),t.isShowAll&&(m.value=Z.length>0&&Z.length===h.length)}},f=()=>{if(t.type==="radio"&&t.isInitRadioValue&&o.isEmpty(g.value)&&!o.isEmpty(t.list)){const Z=t.list.find(se=>!se.isDisabled);if(Z&&!o.isEmpty(Z.id)){const se=Z.id.toString();g.value=[se],w(se)}}},S=Z=>{const se=p(Z);o.isEqualArr(g.value,se)||(g.value=se,w(se.join(",")))},k=()=>{K(),L.value=!o.isEmpty(t.list),x(t.list),f(),A()};e.onMounted(()=>{e.nextTick(()=>{k()})}),e.watch(L,Z=>{Z&&C()}),e.watch([()=>t.list,()=>t.value,()=>t.type],([Z,se],[le,G])=>{const oe=Z;!L.value&&oe!==le&&(L.value=!0),se!==G&&S(se),x(oe),se===G&&f(),A()});const v=async()=>{if(!t.disabled&&!o.isEmpty(t.list)){const Z=++B;if(!t.list.some(R=>!R.isDisabled))return;const le=[];t.list.forEach(R=>{if(o.isEmpty(R.id))return;const U=R.id.toString();R.isDisabled?o.isExistValue(g.value,U)&&le.push(U):m.value||le.push(U)});const G=P(le);let oe=!0;if(t.checkChangeBefore){const{value:R}=D(G),U=D(o.getArrClone(g.value));try{oe=await t.checkChangeBefore(R,U.value),oe=o.isBoolean(oe)?oe:!0}catch(Q){oe=!1,i("onError",Q instanceof Error?Q.message:String(Q))}}oe&&Z===B&&T(G)}},F=async Z=>{if(!Z.isDisabled&&!t.disabled&&!o.isEmpty(Z.id)){const se=++B;let le=t.type;le=o.isEmpty(Z.type)?le:Z.type;const G=o.getArrClone(g.value);let oe=[];const R=Z.id.toString();if(G.length===0)oe=[R];else if(le==="radio")o.isEqualArr(G,[R])?oe=t.isRadioClickCancel?[]:G:oe=[R];else{const Q=y[G[0]];(Q&&!o.isEmpty(Q.type)?Q.type:t.type)==="radio"?oe=[R]:o.isExistValue(G,R)?oe=o.getArrRemoveById(G,R):(oe=o.getArrClone(G),oe.push(R))}let U=!0;if(t.checkChangeBefore){const{value:Q}=D(oe),ee=D(G);try{U=await t.checkChangeBefore(Q,ee.value),U=o.isBoolean(U)?U:!0}catch(Y){U=!1,i("onError",Y instanceof Error?Y.message:String(Y))}}U&&se===B&&T(oe)}},_=()=>P(g.value).join(",");return l({getValue:_,getValueData:()=>{const{value:Z,info:se}=D(_().split(","));return t.type==="radio"&&o.isEmpty(Z)?null:se},setValue:Z=>{S(Z),x(t.list),A()},runInitComplete:()=>{L.value||(L.value=!0,S(t.value),x(t.list),f(),A())}}),(Z,se)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(s),class:e.normalizeClass(b.value)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",Oh,e.toDisplayString(N.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isPlaintext?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("ul",_h,[n.isShowAll?(e.openBlock(),e.createElementBlock("li",{key:0,role:"option","aria-selected":m.value,"aria-disabled":n.disabled,tabindex:n.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":m.value,"selectTag-disabled":n.disabled}),style:e.normalizeStyle(V.value),onClick:se[0]||(se[0]=le=>v()),onKeydown:[se[1]||(se[1]=e.withKeys(e.withModifiers(le=>v(),["prevent"]),["enter"])),se[2]||(se[2]=e.withKeys(e.withModifiers(le=>v(),["prevent"]),["space"]))]},[e.createElementVNode("span",null,e.toDisplayString(n.showAllLabel||e.unref(r).checkboxAll),1)],46,Ah)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(le,G)=>(e.openBlock(),e.createElementBlock("li",{key:`${u}-${le.id}-${G}`,role:"option","aria-selected":J(le),"aria-disabled":le.isDisabled||n.disabled,tabindex:le.isDisabled||n.disabled?-1:0,class:e.normalizeClass({"selectTag-item":!0,"selectTag-active":J(le),"selectTag-disabled":le.isDisabled||n.disabled}),style:e.normalizeStyle(ne(le)),onClick:oe=>F(le),onKeydown:[e.withKeys(e.withModifiers(oe=>F(le),["prevent"]),["enter"]),e.withKeys(e.withModifiers(oe=>F(le),["prevent"]),["space"])]},[e.renderSlot(Z.$slots,"default",{data:le},()=>[le.isHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:e.unref(o).encodeHTML(le.name)},null,8,$h)):(e.openBlock(),e.createElementBlock("span",Fh,e.toDisplayString(le.name),1))])],46,Lh))),128))]))],10,Mh))}}),Ph={class:"tree-ul"},Rh=["onClick"],Hh=["aria-checked","onClick"],Uh=["tabindex","aria-disabled","onClick","onDblclick","onKeydown"],zh=["innerHTML"],Jh={key:1},qa=170,li=e.defineComponent({name:"ClTreeUl",__name:"Ul",props:{list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},firstOpenIds:{type:Array,default:()=>[]},openIds:{type:Array,default:()=>[]},selectIds:{type:Array,default:()=>[]},selectUnIds:{type:Array,default:()=>[]}},emits:["onSelect","onShrink"],setup(n,{emit:l}){const a=n,t=l,i=`tree-${o.getRandom(5)}`;let r=!1;const d=e.inject("$TreeTop",{isCheckChildren:()=>(r||(r=!0,we.warn("ClTreeUl","未检测到 ClTree 容器提供 $TreeTop,子级判断降级为 false")),!1)}),u={dbClickTimeOut:null},s=e.computed(()=>new Set(a.firstOpenIds)),c=e.computed(()=>new Set(a.selectIds)),m=e.computed(()=>new Set(a.selectUnIds)),p=e.computed(()=>new Set(a.openIds)),g=T=>{o.isUndefined(T)||t("onSelect",T.toString())},h=T=>{o.isUndefined(T)||t("onShrink",T.toString())},y=T=>o.isUndefined(T.id)?"":T.id.toString(),E=T=>{const C=y(T);return c.value.has(C)?"true":m.value.has(C)?"mixed":"false"},L=T=>{const C={"tree-node":!0};if(C["tree-node-end"]=T.isEnd,!T.isEnd){const D=o.isUndefined(T.id)?"":T.id.toString(),J=p.value.has(D);C["tree-node-open"]=J,C["tree-node-closed"]=!J}return C},B=T=>{const C=o.isUndefined(T.id)?"":T.id.toString(),D={"tree-node-text":!0};return D["tree-node-select"]=c.value.has(C),D["tree-node-selectUn"]=m.value.has(C),D};e.onBeforeUnmount(()=>{u.dbClickTimeOut&&window.clearTimeout(u.dbClickTimeOut)});const I=T=>{a.disabled||(window.clearTimeout(u.dbClickTimeOut),h(T.id))},M=T=>{a.disabled||(window.clearTimeout(u.dbClickTimeOut),g(T.id))},N=T=>{if(!a.disabled)if(d.isCheckChildren(T.id)){let C=!0;!a.multiple&&!a.isSingleSelectParent&&(C=!1),C?(window.clearTimeout(u.dbClickTimeOut),u.dbClickTimeOut=window.setTimeout(()=>{a.disabled||g(T.id)},qa)):window.clearTimeout(u.dbClickTimeOut)}else window.clearTimeout(u.dbClickTimeOut),u.dbClickTimeOut=window.setTimeout(()=>{a.disabled||g(T.id)},qa)},b=T=>{a.disabled||d.isCheckChildren(T.id)&&(u.dbClickTimeOut&&window.clearTimeout(u.dbClickTimeOut),h(T.id))},V=T=>{g(T)},w=T=>{h(T)};return(T,C)=>(e.openBlock(),e.createElementBlock("ul",Ph,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(D,J)=>(e.openBlock(),e.createElementBlock("li",{key:`${i}-${D.id}-${J}`,class:e.normalizeClass(L(D))},[e.createElementVNode("i",{class:"tree-shrink",onClick:e.withModifiers(ne=>I(D),["stop"])},null,8,Rh),e.createElementVNode("span",{class:e.normalizeClass(B(D))},[n.multiple?(e.openBlock(),e.createElementBlock("i",{key:0,class:"tree-node-checkbox",role:"checkbox","aria-checked":E(D),onClick:e.withModifiers(ne=>M(D),["stop"])},null,8,Hh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("a",{href:"javascript:",tabindex:n.disabled?-1:0,"aria-disabled":n.disabled,onClick:e.withModifiers(ne=>N(D),["stop"]),onDblclick:e.withModifiers(ne=>b(D),["stop"]),onKeydown:e.withKeys(e.withModifiers(ne=>N(D),["prevent"]),["enter"])},[D.showTextLabelHtml?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:D.showTextLabel},null,8,zh)):(e.openBlock(),e.createElementBlock("span",Jh,e.toDisplayString(D.showTextLabel),1))],40,Uh)],2),s.value.has(y(D))?(e.openBlock(),e.createBlock(gn,{key:0},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(li,{list:D.list,multiple:n.multiple,isSingleSelectParent:n.isSingleSelectParent,disabled:n.disabled,firstOpenIds:n.firstOpenIds,openIds:n.openIds,selectIds:n.selectIds,selectUnIds:n.selectUnIds,onOnSelect:V,onOnShrink:w},null,8,["list","multiple","isSingleSelectParent","disabled","firstOpenIds","openIds","selectIds","selectUnIds"]),[[e.vShow,p.value.has(y(D))]])]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),Kh=["id"],Wh=["id"],da=e.defineComponent({name:"ClTree",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},searchOpenParentIds:{type:String,default:""},searchFoldParentIds:{type:String,default:""},searchKeyword:{type:String,default:""},highlightMode:{type:String,default:""},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "}},emits:["update:value","update:modelValue","onChange","onInit"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.reactive({firstOpenIds:[],openParentIds:[],selectedIds:[],selectedUnIds:[],list:[]}),u={dataJson:{},dataGroup:{},childLastIdsJson:{},prevSearchOpenParentIds:"",prevSearchFoldParentIds:""},s=e.computed(()=>({multiple:t.multiple,disabled:t.disabled,isSingleSelectParent:t.isSingleSelectParent})),c=e.computed(()=>o.getJsonMerge({"panel-tree":!0},me.getClassNameJson(t.className))),m=G=>{i("update:value",G),i("update:modelValue",G)},p=(G,oe)=>{m(G),i("onChange",G,oe)},g=()=>{e.nextTick(()=>{i("onInit")})},h=G=>{const oe=o.isUndefined(G)?"":G.toString();return o.isExistJsonKey(u.dataGroup,oe)},y=G=>{const oe=o.isUndefined(G)?"":G.toString();return h(oe)?u.dataGroup[oe]:[]},E=e.ref(0),L=G=>{const oe=G.toString();return o.isExistJsonKey(u.dataJson,oe)?u.dataJson[oe]:null},B=G=>{const oe=[],R=new Set;let U=G;for(;o.isNonEmptyString(U)&&!R.has(U);){R.add(U);const Q=L(U);if(!Q)break;o.isNonEmptyString(Q.name)&&oe.unshift(Q.name);const ee=Q[t.parentKey],Y=ee!=null?String(ee):"";if(Y===""||Y===String(t.topParentValue))break;U=Y}return oe},I=e.computed(()=>{if(t.list,E.value,o.isEmpty(d.selectedIds))return"";const G=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",oe=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return f(d.selectedIds,t.isOutMerge).map(U=>{const Q=B(U);return o.removeHTMLTags(Q.length>0?Q.join(G):U)}).join(oe)}),M=e.computed(()=>Je.getPlaintextOutText("tree",t.plaintextEmptyText,I.value,t.value)),N=(G,oe,R)=>{const U=[],Q=oe+1;return R===void 0&&(R=new Set),R.has(G)||(R.add(G),y(G).forEach(ee=>{const Y={...ee},H=Y.id.toString(),te=h(H);Y.isEnd=!te,Y.level=Q,te&&(Y.list=N(H,Q,R)),U.push(Y)})),U},b=G=>G.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),V=G=>{const oe=t.searchKeyword,R=t.highlightMode;if(!o.isNonEmptyString(G)||o.isEmpty(oe))return b(String(G));const U=o.isNonEmptyString(t.highlightColor)?t.highlightColor:"#ffe58f",Q=$=>`<mark style="background:${U}">${b($)}</mark>`;if(R==="full")return G.includes(oe)?Q(G):b(G);const ee=G.indexOf(oe);if(ee===-1)return b(G);const Y=b(G.slice(0,ee)),H=Q(G.slice(ee,ee+oe.length)),te=b(G.slice(ee+oe.length));return`${Y}${H}${te}`},w=G=>{const{parentKey:oe,topParentValue:R}=t,U=o.isNonEmptyString(R)?R:"0",Q={},ee={};o.isEmpty(G)||G.forEach(Y=>{const H=o.getJsonClone(Y),te=!o.isEmpty(t.searchKeyword)&&!o.isEmpty(t.highlightMode);H.showTextLabelHtml=te,H.showTextLabel=te?V(o.isString(H.name)?H.name:""):o.isString(H.name)?H.name:"";const $=o.isString(H.id)||typeof H.id=="number"&&o.isFinite(H.id),z=o.isString(H[oe])||typeof H[oe]=="number"&&o.isFinite(H[oe]);if(!$||!z)return;const ce=H.id.toString(),de=H[oe].toString();Q[ce]=H,o.isExistJsonKey(ee,de)||(ee[de]=[]),ee[de].push(H)}),u.dataJson=Q,u.dataGroup=ee,u.childLastIdsJson={},d.list=N(U,0),E.value+=1},T=(G,oe)=>{let R=[];const{parentKey:U,topParentValue:Q}=t,ee=o.isNonEmptyString(Q)?Q:"0",Y=o.isEmpty(G)?"":G.toString();if(oe===void 0&&(oe=new Set),o.isExistJsonKey(u.dataJson,Y)&&!oe.has(Y)){oe.add(Y),R.push(Y);const H=u.dataJson[Y][U].toString();if(H!==ee){const te=T(H,oe);R=R.concat(te)}}return R},C=G=>{const oe=T(G);return oe.splice(0,1),oe.reverse(),oe},D=(G,oe)=>{let R=[];const U=o.isEmpty(G)?"":G.toString();return oe===void 0&&(oe=new Set),oe.has(U)||(oe.add(U),R.push(U),h(U)&&y(U).forEach(Q=>{const ee=Q.id.toString(),Y=D(ee,oe);R=R.concat(Y)})),R},J=G=>{const oe=D(G);return oe.splice(0,1),oe},ne=(G,oe,R,U)=>{const Q={add:[],del:[]},ee={add:[],del:[]};let Y=o.isUndefined(oe)?o.getArrClone(d.selectedIds):oe,H=o.isUndefined(R)?o.getArrClone(d.selectedUnIds):R;const te=Y.indexOf(G);U?te===-1&&Y.push(G):te===-1?Y.push(G):Y.splice(te,1),H=o.getArrRemoveById(H,G);const $=C(G);return $.reverse(),$.length>0&&$.forEach(z=>{let ce=0,de=0;u.dataGroup[z].forEach(ae=>{const W=ae.id.toString();o.isExistValue(Y,W)&&(ce+=1),o.isExistValue(H,W)&&(de+=1)});const ie=u.dataGroup[z].length;ce===0&&de===0?(Q.del.push(z),Y=o.getArrRemoveById(Y,z),ee.del.push(z),H=o.getArrRemoveById(H,z)):ce===ie?(Q.add.push(z),Y.push(z),ee.del.push(z),H=o.getArrRemoveById(H,z)):(Q.del.push(z),Y=o.getArrRemoveById(Y,z),ee.add.push(z),H.push(z))}),{select:Q,selectUn:ee}},K=(G,oe)=>{let R=[];if(oe===void 0&&(oe=new Set),o.isExistJsonKey(u.childLastIdsJson,G)&&u.childLastIdsJson[G].length>0)R=u.childLastIdsJson[G];else{if(oe.has(G))return R;h(G)?(oe.add(G),y(G).forEach(U=>{const Q=K(U.id.toString(),oe);Q.length>0&&(R=R.concat(Q))})):R.push(G),u.childLastIdsJson[G]=R}return R},P=(G,oe)=>{const{parentKey:R,topParentValue:U}=t,Q=o.isNonEmptyString(U)?U:"0",ee={},Y=[];let H=[];if(oe===void 0&&(oe=new Set),G.forEach(te=>{const $=L(te);if(!o.isUndefined($)){const z=$[R].toString();z===Q?H.push(te):(o.isExistJsonKey(ee,z)||(ee[z]=[]),ee[z].push(te))}}),!o.isEmpty(ee))for(const[te,$]of Object.entries(ee))$.length===y(te).length?Y.push(te):H=H.concat($);if(Y.length>0){H.push(...Y);const te=o.getArrUnique(H),$=Y.some(z=>!oe.has(z));return Y.forEach(z=>oe.add(z)),$?P(te,oe):H}else return H},x=G=>{const oe=[],R=o.getArrConvertJson(G);return G.forEach(Q=>{const ee=y(Q);if(o.isEmpty(ee))oe.push(Q);else{const Y=[];ee.forEach(H=>{o.isExistJsonKey(R,H.id.toString())&&Y.push(H.id)}),ee.length!==Y.length&&oe.push(Q)}}),P(oe)},A=G=>{let oe=[];return G.forEach(R=>{const U=K(R);oe.push(...U)}),oe=o.getArrUnique(oe),oe},f=(G,oe)=>t.multiple?(o.isBoolean(oe)?oe:t.isOutMerge)?x(G):A(G):G,S=G=>{const oe=[];return G.forEach(R=>{const U=L(R);o.isUndefined(U)||oe.push(U)}),oe},k=G=>{const oe=t.multiple?G:G.slice(0,1);let R=[],U=[];oe.forEach(ee=>{const Y=L(ee);if(!o.isUndefined(Y)){const H=ne(ee,R,U,!0);R=o.getArrRemoveById(R,H.select.del),H.select.add.length>0&&R.push(...H.select.add),U=o.getArrRemoveById(U,H.selectUn.del),H.selectUn.add.length>0&&U.push(...H.selectUn.add);const te=J(ee);R.push(...te),R.push(ee),R=o.getArrUnique(R),U=o.getArrUnique(U)}}),d.selectedIds=R;const Q=o.getArrRemoveById(U,R);d.selectedUnIds=o.getArrClone(Q),d.firstOpenIds=o.getArrUnique(d.firstOpenIds.concat(Q)),d.openParentIds=o.getArrUnique(d.openParentIds.concat(Q))},v=()=>{if(w(t.list),o.isNonEmptyString(t.value)){const G=t.value.split(",");k(G)}g()};e.onMounted(()=>{e.nextTick(()=>{v()})}),e.watch(()=>t.list,G=>{w(G);const oe=d.selectedIds,R=o.isNonEmptyString(t.value)?t.value.split(","):[];d.selectedIds=[],k(o.getArrUnique(oe.concat(R)));const U=f(d.selectedIds);U.join(",")!==t.value&&m(U.join(","))}),e.watch(()=>t.value,G=>{if(G!==void 0){const oe=d.selectedIds,R=o.isNonEmptyString(G)?G.split(","):[],U=f(R),Q=f(oe);o.isEqualArr(U,Q)||(d.selectedIds=[],k(R))}});const F=()=>{const G=o.isNonEmptyString(u.prevSearchFoldParentIds)?u.prevSearchFoldParentIds.split(","):[];d.firstOpenIds=o.getArrRemoveById(d.firstOpenIds,G),(o.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds.split(","):[]).forEach(R=>{const U=R.toString();d.firstOpenIds.indexOf(U)===-1&&d.firstOpenIds.push(U)}),u.prevSearchFoldParentIds=o.isNonEmptyString(t.searchFoldParentIds)?t.searchFoldParentIds:""},_=()=>{const G=o.isNonEmptyString(u.prevSearchOpenParentIds)?u.prevSearchOpenParentIds.split(","):[];d.firstOpenIds=o.getArrRemoveById(d.firstOpenIds,G),d.openParentIds=o.getArrRemoveById(d.openParentIds,G),(o.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds.split(","):[]).forEach(R=>{const U=R.toString();d.firstOpenIds.indexOf(U)===-1&&d.firstOpenIds.push(U),d.openParentIds.indexOf(U)===-1&&d.openParentIds.push(U)}),u.prevSearchOpenParentIds=o.isNonEmptyString(t.searchOpenParentIds)?t.searchOpenParentIds:""};e.watch(()=>t.searchOpenParentIds,()=>_()),e.watch(()=>t.searchFoldParentIds,()=>F());const O=G=>{Array.isArray(G)&&G.forEach(oe=>{if(!oe)return;const R=!o.isEmpty(t.searchKeyword)&&!o.isEmpty(t.highlightMode);oe.showTextLabelHtml=R,oe.showTextLabel=R?V(o.isString(oe.name)?oe.name:""):o.isString(oe.name)?oe.name:"",Array.isArray(oe.list)&&O(oe.list)})};e.watch(()=>[t.searchKeyword,t.highlightMode,t.highlightColor],()=>O(d.list));const q=G=>{const oe=G.toString();o.isExistValue(d.firstOpenIds,oe)||d.firstOpenIds.push(oe),e.nextTick(()=>{const R=d.openParentIds.indexOf(oe);R===-1?d.openParentIds.push(oe):d.openParentIds.splice(R,1)})},X=G=>{const oe=G.toString();if(t.multiple){const Q=d.selectedIds.indexOf(oe)===-1,ee=J(oe),Y=ne(oe);let H=o.getArrClone(d.selectedIds),te=o.getArrClone(d.selectedUnIds);Y.select.del.forEach(ce=>{const de=H.indexOf(ce);de>-1&&H.splice(de,1)}),Y.select.add.length>0&&(H=H.concat(Y.select.add),H=o.getArrUnique(H)),Y.selectUn.del.forEach(ce=>{const de=te.indexOf(ce);de>-1&&te.splice(de,1)}),Y.selectUn.add.length>0&&(te=te.concat(Y.selectUn.add),te=o.getArrUnique(te)),ee.length>0&&ee.forEach(ce=>{const de=H.indexOf(ce),ie=te.indexOf(ce);Q?de===-1&&H.push(ce):de>-1&&H.splice(de,1),ie>-1&&te.splice(ie,1)});const $=H.indexOf(oe);$>-1?H.splice($,1):H.push(oe);const z=te.indexOf(oe);z>-1&&te.splice(z,1),d.selectedIds=H,d.selectedUnIds=te}else d.selectedIds=[oe],d.selectedUnIds=[];const R=f(d.selectedIds);p(R.join(","),S(R))};return e.provide("$TreeTop",{isCheckChildren:h}),l({getValue:()=>f(d.selectedIds).join(","),getValueData:()=>{const G=f(d.selectedIds);return S(G)},setValue:G=>{const oe=o.isNonEmptyString(G)?G.split(","):[];d.selectedIds=[],k(oe)}}),(G,oe)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"cl-plaintext-value"},e.toDisplayString(M.value),9,Kh)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(c.value),id:e.unref(r)},[d.list.length>0?(e.openBlock(),e.createBlock(li,e.mergeProps({key:0,list:d.list,firstOpenIds:d.firstOpenIds,openIds:d.openParentIds,selectIds:d.selectedIds,selectUnIds:d.selectedUnIds},s.value,{onOnSelect:X,onOnShrink:q}),null,16,["list","firstOpenIds","openIds","selectIds","selectUnIds"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Wh))}}),jh=["id"],Yh={key:0,class:"selectTree-inText-num"},qh={class:"selectTree-inDropdown-container"},Xh={class:"selectTree-inDropdown-search"},Gh={class:"selectTree-inDropdown-body"},ii=e.defineComponent({name:"ClSelectTree",__name:"Index",props:{id:String,value:[String,Number],className:String,disabled:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},placeholder:String,classDropDown:String,multiple:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},arrowDirection:{type:String,default:"right"},searchPlaceholder:String,searchKey:{type:Array,default:()=>["name"]},searchKeyType:{type:String,default:"||",validator:n=>["||","&&"].includes(n)},showTextFormat:String,showDropDownTextFormat:String,isSingleSelectParent:{type:Boolean,default:!1},isOutMerge:{type:Boolean,default:!0},parentKey:{type:String,default:"parentId"},topParentValue:{type:String,default:"0"},onOpenBefore:Function,highlightMode:{type:String,default:"full"},highlightColor:{type:String,default:""},isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","},plaintextLevelSeparator:{type:String,default:" > "},appendContainer:{type:String,default:""}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:(n,l)=>!0,onInit:()=>!0,onOpen:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElDropdownLayer"),u=e.useTemplateRef("refElList"),s=e.reactive({isOpen:!1,isFirstDataFinish:!1,selectIds:"",selectLabel:[],filterList:[],searchOpenParentIds:"",searchFoldParentIds:"",searchKeyword:""}),c={prevSelectIds:[],originalList:[],dataJson:{}},m=e.computed(()=>{let _={"panel-select-tree":!0};return _=o.getJsonMerge(_,me.getClassNameJson(t.className)),o.getStringByJson(_," ")}),p=e.computed(()=>{let _={"selectTree-inDropdown":!0};return _=o.getJsonMerge(_,me.getClassNameJson(t.classDropDown)),o.getStringByJson(_," ")}),g=_=>{i("update:value",_),i("update:modelValue",_)},h=(_,O)=>{g(_),i("onChange",_,O)},y=()=>{e.nextTick(()=>{i("onInit")})},E=_=>{e.nextTick(()=>{i("onOpen",_)})},L=()=>{if(!s.isOpen){const _=s.selectIds,O=_.split(",");if(!o.isEqualArr(O,c.prevSelectIds)){c.prevSelectIds=O;const X=u.value?u.value.getValueData():[];h(_,X)}}},B=_=>{const O=t.showTextFormat;let q="";return o.isNonEmptyString(O)?q=O.replace(/\$\{(\w+)\}/g,(X,Z)=>o.isString(_?.[Z])?_[Z]:X):q=o.isString(_?.name)?_.name:"",o.encodeHTML(q)},I=_=>o.isEmpty(_)?[]:_.split(",").map(O=>{const q=c.dataJson[O];return q?B(q):o.encodeHTML(O)}),M=_=>{const O=[],q=new Set;let X=_;for(;o.isNonEmptyString(X)&&!q.has(X);){q.add(X);const Z=c.dataJson[X];if(!Z)break;o.isNonEmptyString(Z.name)&&O.unshift(Z.name);const se=Z[t.parentKey],le=se!=null?String(se):"";if(le===""||le===String(t.topParentValue))break;X=le}return O},N=e.computed(()=>{t.list;const _=o.isString(s.selectIds)?s.selectIds:"";if(o.isEmpty(_))return"";const O=o.isString(t.plaintextLevelSeparator)?t.plaintextLevelSeparator:" > ",q=o.isString(t.plaintextSeparator)?t.plaintextSeparator:",";return _.split(",").map(X=>{const Z=M(X);return o.removeHTMLTags(Z.length>0?Z.join(O):X)}).join(q)}),b=e.computed(()=>Je.getPlaintextOutText("selectTree",t.plaintextEmptyText,N.value,t.value)),V=_=>Array.isArray(_)?_.filter(O=>{if(!O)return!1;const q=!o.isUndefined(O.id)&&O.id!==null,X=!o.isEmpty(O[t.parentKey]);return q&&X}):[],w=_=>_===null?"":o.isString(_)||o.isFinite(_)?String(_):"",T=_=>{const O={};return Array.isArray(_)&&_.forEach(q=>{q&&!o.isUndefined(q.id)&&q.id!==null&&(O[String(q.id)]=q)}),O},C=()=>{const _=w(t.value);s.selectIds!==_&&(s.selectIds=_,s.selectLabel=I(_),c.prevSelectIds=_.split(","))},D=(_,O)=>{const q=[];return O===void 0&&(O=new Set),O.has(_)||(O.add(_),c.originalList.forEach(X=>{if(!X)return;const Z=X[t.parentKey];o.isUndefined(Z)||String(Z)===t.topParentValue||String(Z)===String(_)&&(q.push(String(X.id)),q.push(...D(String(X.id),O)))})),q},J=(_,O)=>{if(o.isEmpty(O))return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const q=Array.isArray(t.searchKey)?t.searchKey.filter(Q=>o.isString(Q)):[];if(q.length===0)return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const X=t.searchKeyType==="&&",Z=_.filter(Q=>{if(!Q)return!1;const ee=q.map(Y=>{const H=Q?.[Y];return o.isString(H)?H.includes(O):!1});return X?ee.every(Boolean):ee.some(Boolean)});if(Z.length===0)return s.searchOpenParentIds="",s.searchFoldParentIds="",_;const se={};_.forEach(Q=>{Q&&(se[String(Q.id)]=Q)});const le=new Set,G=new Set,oe=Q=>{const ee=se[String(Q)];if(!ee)return;const Y=ee[t.parentKey];!o.isUndefined(Y)&&String(Y)!==t.topParentValue&&(le.add(String(Y)),G.add(String(Y)),oe(String(Y)))};Z.forEach(Q=>{const ee=String(Q.id);le.add(ee),oe(ee),D(ee).forEach(Y=>le.add(Y))});const R=_.filter(Q=>Q&&le.has(String(Q.id)));s.searchOpenParentIds=Array.from(G).join(",");const U=new Set;return R.forEach(Q=>{if(!Q)return;const ee=String(Q.id);if(G.has(ee))return;c.originalList.some(H=>{if(!H)return!1;const te=H[t.parentKey];return!o.isUndefined(te)&&String(te)===ee})&&U.add(ee)}),s.searchFoldParentIds=Array.from(U).join(","),R},ne=()=>{s.isFirstDataFinish||(s.isFirstDataFinish=!0,y())},K=()=>{o.isEmpty(t.list)||ne()};e.onMounted(()=>{e.nextTick(()=>{K()})}),e.watch([()=>t.value,()=>t.list],([_,O],[q,X])=>{O!==X&&(c.originalList=V(t.list),c.dataJson=T(c.originalList),s.filterList=c.originalList,s.selectLabel=I(s.selectIds),c.originalList.length>0&&ne()),_!==q&&C()},{immediate:!0});const P=_=>{t.disabled||(s.isOpen=_,_?(c.prevSelectIds=s.selectIds.split(","),s.filterList=c.originalList):(s.searchKeyword="",s.searchOpenParentIds="",s.searchFoldParentIds="",L()),E(_))},x=()=>{t.disabled||(s.selectIds="",s.selectLabel=[],c.prevSelectIds=[],L())},A=()=>{d.value&&(d.value.checkIsShowOpen()||d.value.initCompleteOpen())},f=_=>{const O=o.isString(_)?_:"";s.searchKeyword=O,s.filterList=J(c.originalList,O)},S=(_,O)=>{const q=Array.isArray(O)?O:[];s.selectLabel=q.map(X=>B(X)),t.multiple||d.value?.setOpen(!1)};return l({getValue:()=>s.selectIds,getValueData:()=>u.value?u.value.getValueData():[],setValue:_=>{const O=w(_);s.selectIds=O,s.selectLabel=I(O),c.prevSelectIds=O.split(",")}}),(_,O)=>n.isPlaintext?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(r),class:"cl-plaintext-value"},e.toDisplayString(b.value),9,jh)):(e.openBlock(),e.createBlock(kn,{key:1,ref_key:"refElDropdownLayer",ref:d,id:e.unref(r),classParent:m.value,classText:"selectTree-inText",classDropDown:p.value,placeholder:n.placeholder,isDisabled:n.disabled,isClear:n.isClear,textLabel:s.selectLabel.join(","),textArrowDirection:n.arrowDirection,appendContainer:n.appendContainer,onOpenBeforeCallback:n.onOpenBefore,onOnChangeOpen:P,onOnClear:x},{textExtend:e.withCtx(()=>[n.multiple?(e.openBlock(),e.createElementBlock("span",Yh,[n.multiple&&s.selectLabel.length>1?(e.openBlock(),e.createBlock(qt,{key:0,num:s.selectLabel.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.createElementVNode("div",qh,[e.createElementVNode("div",Xh,[e.createVNode(Xt,{placeholder:n.searchPlaceholder,onOnChange:f},null,8,["placeholder"])]),e.createElementVNode("div",Gh,[e.createVNode(da,{ref_key:"refElList",ref:u,list:s.filterList,value:s.selectIds,"onUpdate:value":O[0]||(O[0]=q=>s.selectIds=q),multiple:n.multiple,textFormat:n.showDropDownTextFormat,isSingleSelectParent:n.isSingleSelectParent,isOutMerge:n.isOutMerge,parentKey:n.parentKey,topParentValue:n.topParentValue,searchOpenParentIds:s.searchOpenParentIds,searchFoldParentIds:s.searchFoldParentIds,searchKeyword:s.searchKeyword,highlightMode:n.highlightMode,highlightColor:n.highlightColor,onOnChange:S,onOnInit:A},null,8,["list","value","multiple","textFormat","isSingleSelectParent","isOutMerge","parentKey","topParentValue","searchOpenParentIds","searchFoldParentIds","searchKeyword","highlightMode","highlightColor"])])])]),_:1},8,["id","classParent","classDropDown","placeholder","isDisabled","isClear","textLabel","textArrowDirection","appendContainer","onOpenBeforeCallback"]))}}),Qh={key:0,class:"sideNav-menu-iconOperate"},si=e.defineComponent({name:"ClSideMenuMenu",__name:"Menu",props:{activeId:{type:String,default:""},activePId:{type:Array,default:()=>[]},openId:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},emits:{onClick:n=>!0},setup(n,{emit:l}){const a=l,t=`sideMenu-${o.getRandom(5)}`,i=d=>!!(d&&d.list&&d.list.length>0),r=d=>{a("onClick",d)};return(d,u)=>(e.openBlock(),e.createElementBlock("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.list,(s,c)=>(e.openBlock(),e.createElementBlock("li",{key:`${t}-${s.id}-${c}`,class:e.normalizeClass({"sideNav-menu-submenu":i(s),"sideNav-menu-active":!i(s)&&n.activeId===s.id,"sideNav-menu-parent-active":i(s)&&n.activePId.includes(s.id)})},[e.createVNode(Nt,{"aria-haspopup":i(s)?"true":void 0,"aria-expanded":i(s)?String(n.openId.includes(s.id)):void 0,"aria-current":i(s)?void 0:n.activeId===s.id?"page":void 0,onOnClick:m=>r(s)},{default:e.withCtx(()=>[i(s)?(e.openBlock(),e.createElementBlock("span",Qh,[e.createVNode(ke,{name:"caret-right",class:e.normalizeClass(["icon-rotate",{"rotate-90":n.openId.includes(s.id)}])},null,8,["class"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("span",null,e.toDisplayString(s.name),1)]),_:2},1032,["aria-haspopup","aria-expanded","aria-current","onOnClick"]),i(s)?(e.openBlock(),e.createBlock(gn,{key:0},{default:e.withCtx(()=>[n.openId.includes(s.id)?(e.openBlock(),e.createBlock(si,{key:0,activeId:n.activeId,activePId:n.activePId,openId:n.openId,list:s.list,onOnClick:r},null,8,["activeId","activePId","openId","list"])):e.createCommentVNode("",!0)]),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))),128))]))}}),Zh=["id"],eg={class:"sideNav-wrapper sideNav-wrapper-rowMult"},ri=e.defineComponent({name:"ClSideMenu",inheritAttrs:!1,__name:"Index",props:{id:String,className:String,active:String,list:{type:Array,required:!0,default:()=>[]}},emits:{onChangeMenu:n=>!0},setup(n,{emit:l}){const a=n,t=l,i=a.id,r=e.reactive({isMenushrink:!1,menuActive:o.isNonEmptyString(a.active)?a.active:"",menuActiveParent:[],menuOpenPid:[]}),d=e.ref([]),u={menuJson:{}},s=e.computed(()=>{let B={"panel-side-menu":!0};return B=o.getJsonMerge(B,me.getClassNameJson(a.className)),B}),c=B=>{t("onChangeMenu",B)},m=()=>{const B=o.getTreeLastParent(r.menuActive,u.menuJson,!1);let I=[];return B.length>0&&(I=B.map(M=>M.id)),r.menuActiveParent=I,I},p=(B,I,M,N=0)=>{N>50||B.forEach(b=>{if(o.isEmpty(b))return;const{id:V,name:w}=b;if(!o.isNonEmptyString(V)||!o.isUndefined(M[V]))return;const T=b.list,C=o.isArray(T);!C&&!o.isUndefined(T)&&(b.list=void 0),M[V]={id:V,name:w,parentId:I,hasChild:C&&T&&T.length>0},C&&T&&T.length>0&&p(T,V,M,N+1)})},g=B=>B.filter(I=>o.isNonEmptyString(I?.id)).map(I=>{const M=I.list;return o.isArray(M)&&M&&M.length>0&&(I.list=g(M)),I}),h=()=>{const B=g(o.getJsonClone(a.list,!0));if(o.isEmpty(B)){r.menuActive="",r.menuActiveParent=[],r.menuOpenPid=[],u.menuJson={},d.value=[];return}const I=u.menuJson,M=r.menuOpenPid.slice(),N=r.menuActive,b={};p(B,"",b);let V=N;(!o.isNonEmptyString(V)||o.isUndefined(b[V]))&&(V=o.isNonEmptyString(B[0].id)?B[0].id:"");const w=[];Object.keys(b).forEach(T=>{b[T].hasChild&&(o.isUndefined(I[T])||M.includes(T))&&w.push(T)}),u.menuJson=b,d.value=B,r.menuActive=V,r.menuOpenPid=w,V!==N?(m(),o.isNonEmptyString(V)&&c(V)):m()},y=()=>{h()};e.onMounted(()=>{y()}),e.watch(()=>a.list,()=>{h()},{deep:!0}),e.watch(()=>a.active,B=>{if(o.isNonEmptyString(B)&&!o.isUndefined(u.menuJson[B])){r.menuActive=B;const I=m();I.length>0&&I.forEach(M=>{r.menuOpenPid.indexOf(M)===-1&&r.menuOpenPid.push(M)})}});const E=()=>{r.isMenushrink=!r.isMenushrink},L=B=>{const I=B.id;if(o.isNonEmptyString(I))if(B.list&&B.list.length>0){const M=r.menuOpenPid.indexOf(I);M>-1?r.menuOpenPid.splice(M,1):r.menuOpenPid.push(I)}else{if(r.menuActive===I)return;r.menuActive=I,m(),c(r.menuActive)}};return(B,I)=>r.menuActive.length>0?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,id:e.unref(i),class:s.value},B.$attrs),[e.createElementVNode("div",{class:e.normalizeClass({"sideNav-menu":!0,"sideNav-visible":!r.isMenushrink})},[e.createVNode(si,{list:d.value,activeId:r.menuActive,activePId:r.menuActiveParent,openId:r.menuOpenPid,onOnClick:L},null,8,["list","activeId","activePId","openId"])],2),e.createElementVNode("div",eg,[e.createVNode(Nt,{className:"sideNav-menu-footer-bar","aria-label":"展开或收起菜单","aria-expanded":String(!r.isMenushrink),onOnClick:E},{default:e.withCtx(()=>[e.createVNode(ke,{name:r.isMenushrink?"angle-double-right":"angle-double-left"},null,8,["name"])]),_:1},8,["aria-expanded"]),e.renderSlot(B.$slots,"default")])],16,Zh)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),ci=n=>{if(o.isNonEmptyString(n)){if(n.indexOf("clIcon-")===0){const l=n.substring(7);return o.isNonEmptyString(l)&&/^[a-zA-Z0-9-]+$/.test(l)?{name:l,className:""}:{name:"question-circle",className:""}}return/^clicon/i.test(n)?{name:"question-circle",className:""}:/^[a-zA-Z0-9-]+$/.test(n)?{name:n,className:""}:{name:"",className:n}}return{name:"question-circle",className:""}},tg=["aria-sort"],ng=e.defineComponent({name:"ClTableTh",directives:{cltooltip:dt},__name:"Th",props:{isOrder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isUseScrollX:{type:Boolean,default:!1},thIndex:{type:Number,default:0},thInfo:{type:Object,default:()=>({})},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickOrderBy:(n,l,a)=>!0},setup(n,{emit:l}){const a=n,t=l,i=e.computed(()=>ci(a.thInfo?.tipIcon)),r=e.computed(()=>o.isObject(a.thInfo)&&!o.isEmpty(a.thInfo)?a.thInfo:{}),d=e.computed(()=>!a.isOrder||o.isEmpty(r.value)?!1:o.isEmpty(r.value.sort)?!0:r.value.sort===!0),u=e.computed(()=>d.value&&!a.disabled),s=e.computed(()=>{const L=a.thInfo?.tipMsg;if(!o.isNonEmptyString(L))return;const B=o.removeHTMLTags(L);return o.isNonEmptyString(B)?B:void 0}),c=e.computed(()=>{if(!d.value)return"";const L=o.isEmpty(a.orderSort)?[]:a.orderSort;return L.length>0&&L[0]===a.thIndex?L.length===2?L[1]==="asc"||L[1]==="desc"?L[1]:"none":L.length===1?"desc":"none":"none"}),m=e.computed(()=>{if(c.value==="asc")return"ascending";if(c.value==="desc")return"descending";if(c.value==="none")return"none"}),p=e.computed(()=>{const L={},B=r.value;if(!o.isEmpty(B.width)&&y(B.width)&&(L[`${a.widthClassPrefix}${B.width}`]=!0),!o.isEmpty(B.widthMin)&&y(B.widthMin)&&a.isUseScrollX&&(L[`${a.widthMinClassPrefix}${B.widthMin}`]=!0),(a.fixedLeftIndex>-1||a.fixedRightIndex>-1)&&(L["th-hidden"]=a.fixedLeftIndex>-1&&a.thIndex>a.fixedLeftIndex||a.fixedRightIndex>-1&&a.thIndex<a.fixedRightIndex),d.value){L["th-sort"]=!0,L["sort-none"]=!0,L["th-sort-near"]=B.sortNear===!0;const M=c.value;(M==="asc"||M==="desc")&&(L[`sort-${M}`]=!0,L["sort-none"]=!1)}o.isNonEmptyString(B.tipMsg)&&(L["th-tip"]=!0,L["th-tip-sideAlign"]=B.tipSideAlign===!0),a.disabled&&(L["th-disabled"]=!0),o.isNonEmptyString(B.textAlign)&&o.isExistValue(["left","center","right"],B.textAlign)&&(L[`text-${B.textAlign}`]=!0);let I=L;return I=o.getJsonMerge(I,me.getClassNameJson(B.className)),I=o.getJsonMerge(I,me.getClassNameJson(B.classTh)),I}),g=e.computed(()=>{const L={};if(!a.isInlineWidth)return L;const B=r.value;return!o.isEmpty(B.width)&&y(B.width)&&(L.width=o.isFinite(Number(B.width))?`${Number(B.width)}px`:`${B.width}`),!o.isEmpty(B.widthMin)&&y(B.widthMin)&&a.isUseScrollX&&(L.minWidth=o.isFinite(Number(B.widthMin))?`${Number(B.widthMin)}px`:`${B.widthMin}`),L}),h=(L,B)=>{t("onClickOrderBy",L,a.thIndex,B)},y=L=>o.isString(L)||o.getTypeof(L)==="number"&&o.isFinite(L),E=()=>{if(u.value){const L=c.value==="desc"?"asc":"desc";h(r.value,L)}};return(L,B)=>{const I=e.resolveDirective("cltooltip");return!e.unref(o).isBoolean(n.thInfo?.visible)||n.thInfo.visible?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(p.value),style:e.normalizeStyle(g.value),scope:"col","aria-sort":m.value},[e.createElementVNode("span",{class:"th-title",onClick:E},[e.renderSlot(L.$slots,"default")]),e.unref(o).isNonEmptyString(n.thInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:i.value.name,className:i.value.className,class:"th-tip-icon",role:"img","aria-label":s.value},null,8,["name","className","aria-label"])),[[I,{html:n.thInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.value!==""?(e.openBlock(),e.createElementBlock("i",{key:2,class:"tr-sort-icon","aria-hidden":"true",onClick:E})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],14,tg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),Ho=e.defineComponent({name:"ClTableTd",directives:{cltooltip:dt},__name:"Td",props:{tdIndex:{type:Number,default:0},tdInfo:{type:Object,default:()=>({})},isOrder:{type:Boolean,default:!1},isUseScrollX:{type:Boolean,default:!1},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},useType:{type:String,default:"td",validator:n=>["td","total"].indexOf(n)>-1}},setup(n){const l=n,a=e.computed(()=>ci(l.tdInfo?.tipIcon)),t=e.computed(()=>o.isEmpty(l.tdInfo)?{}:l.tdInfo),i=e.computed(()=>{const s=l.tdInfo?.tipMsg;if(!o.isNonEmptyString(s))return;const c=o.removeHTMLTags(s);return o.isNonEmptyString(c)?c:void 0}),r=e.computed(()=>{const s={},c=t.value;!o.isEmpty(c.width)&&u(c.width)&&(s[`${l.widthClassPrefix}${c.width}`]=!0),!o.isEmpty(c.widthMin)&&u(c.widthMin)&&l.isUseScrollX&&(s[`${l.widthMinClassPrefix}${c.widthMin}`]=!0),(l.fixedLeftIndex>-1||l.fixedRightIndex>-1)&&(s["td-hidden"]=l.fixedLeftIndex>-1&&l.tdIndex>l.fixedLeftIndex||l.fixedRightIndex>-1&&l.tdIndex<l.fixedRightIndex),l.isOrder&&(o.isEmpty(c.sort)||c.sort===!0)&&(s["td-sort"]=!0,s["td-sort-near"]=c.sortNear===!0),o.isNonEmptyString(c.tipMsg)&&(s["td-tip"]=!0,s["td-tip-sideAlign"]=c.tipSideAlign===!0),o.isNonEmptyString(c.textAlign)&&o.isExistValue(["left","center","right"],c.textAlign)&&(s[`text-${c.textAlign}`]=!0);let m=s;return m=o.getJsonMerge(m,me.getClassNameJson(c.className)),l.useType==="td"?m=o.getJsonMerge(m,me.getClassNameJson(c.classTd)):l.useType==="total"&&(m=o.getJsonMerge(m,me.getClassNameJson(c.classTotal))),m}),d=e.computed(()=>{const s={};if(!l.isInlineWidth)return s;const c=t.value;return!o.isEmpty(c.width)&&u(c.width)&&(s.width=o.isFinite(Number(c.width))?`${Number(c.width)}px`:`${c.width}`),!o.isEmpty(c.widthMin)&&u(c.widthMin)&&l.isUseScrollX&&(s.minWidth=o.isFinite(Number(c.widthMin))?`${Number(c.widthMin)}px`:`${c.widthMin}`),s}),u=s=>o.isString(s)||o.getTypeof(s)==="number"&&o.isFinite(s);return(s,c)=>{const m=e.resolveDirective("cltooltip");return!e.unref(o).isBoolean(n.tdInfo?.visible)||n.tdInfo.visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(r.value),style:e.normalizeStyle(d.value)},[e.renderSlot(s.$slots,"default"),e.unref(o).isNonEmptyString(n.tdInfo?.tipMsg)?e.withDirectives((e.openBlock(),e.createBlock(ke,{key:0,name:a.value.name,className:a.value.className,class:"td-tip-icon",role:"img","aria-label":i.value},null,8,["name","className","aria-label"])),[[m,{html:n.tdInfo.tipMsg,className:"tooltip-modal"}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}}),og=["aria-hidden"],ag={key:0},lg={key:0},No=99999999,Vo=e.defineComponent({name:"ClTableHead",__name:"Head",props:{columns:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},isShowTotal:{type:Boolean,default:!1},totalInfo:{type:Object,default:()=>({})},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},isShowCheckboxAll:{type:Boolean,default:!0},checkboxAllValue:{type:Boolean,default:!1},fixedType:{type:String,default:"",validator:n=>["","left","right"].indexOf(n)>-1},fixedLeftIndex:{type:Number,default:-1,validator:n=>n>=-1},fixedRightIndex:{type:Number,default:-1,validator:n=>n>=-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"}},emits:{onClickAll:()=>!0,onClickOrderBy:(n,l,a)=>!0,onHoverIn:n=>!0,onHoverOut:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useTemplateRef("refElTable"),d=e.computed(()=>({"table-default":!0,"table-base":!0})),u=e.computed(()=>{const N={};return o.isEmpty(t.fixedType)?t.isUseScrollX&&o.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(N.minWidth=t.minWidth):o.isNonEmptyString(t.width)&&t.width!=="none"&&(N.width=t.width),N}),s=N=>N?o.isUndefined(N.title)?o.isUndefined(N.data)?"":N.data:N.title:"",c=(N,b)=>o.isUndefined(N)||!b?"":o.isEmpty(b.format)?N:o.getValueByFormat(N,b.format??"",b.formatExt),m=(N,b)=>!N||!b?"":c(N[b.data],b);e.watch(()=>t.isShowTotal,N=>{!N&&t.hoverIndex===No&&i("onHoverOut")});const p=()=>{i("onClickAll")},g=(N,b,V)=>{i("onClickOrderBy",N,b,V)},h=()=>{i("onHoverIn",No)},y=()=>{i("onHoverOut")};return l({getOffsetHeight:()=>r.value?r.value.offsetHeight:0,getRcWidth:()=>{let N=0;if((t.isShowRadio||t.isShowCheckbox)&&r.value){const b=r.value.querySelector(".th-rc");b&&(N=b.clientWidth)}return N},getPaddingLr:()=>{let N=0;if(!r.value)return N;const b=r.value.querySelectorAll("th:not(.th-rc)");for(let V=0;V<b.length;V++){const w=me.getStyle(b[V]),T=parseFloat(w.paddingLeft),C=parseFloat(w.paddingRight),D=o.isFinite(T)?T:0,J=o.isFinite(C)?C:0;N+=D+J}return N},getElTh:()=>r.value?r.value.querySelectorAll("th"):[],getTotalHeight:()=>{let N=0;if(t.isShowTotal&&r.value){const b=r.value.querySelector(".tr-total");b&&(N=b.clientHeight)}return N}}),(N,b)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(d.value),style:e.normalizeStyle(u.value),"aria-hidden":!e.unref(o).isEmpty(n.fixedType),ref_key:"refElTable",ref:r},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass({"th-rc":!0,"th-hidden":n.fixedRightIndex>-1}),scope:"col"},[n.isShowCheckbox&&n.isShowCheckboxAll?(e.openBlock(),e.createBlock(pt,{key:0,forId:e.unref(o).isNonEmptyString(n.keyIndex)?`${n.keyIndex}_${n.fixedType}_cb_all`:void 0,value:n.checkboxAllValue,disabled:n.disabled,onOnChange:p},null,8,["forId","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(V,w)=>(e.openBlock(),e.createBlock(ng,{key:`${n.keyIndex}_${n.fixedType}_head_th_${w}`,thInfo:V,thIndex:w,isOrder:n.isOrder,disabled:n.disabled,orderSort:n.orderSort,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickOrderBy:g},{default:e.withCtx(()=>[e.renderSlot(N.$slots,`th_${V?.data??""}`,{data:V},()=>[e.createElementVNode("span",null,e.toDisplayString(s(V)),1)])]),_:2},1032,["thInfo","thIndex","isOrder","disabled","orderSort","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))])]),n.isShowTotal?(e.openBlock(),e.createElementBlock("tbody",ag,[e.createElementVNode("tr",{class:e.normalizeClass({"tr-total":!0,"tr-hover":n.hoverIndex===No}),onMouseenter:h,onMouseleave:y},[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",lg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(V,w)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_total_td_${w}`,isOrder:n.isOrder,tdIndex:w,tdInfo:V,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,useType:"total"},{default:e.withCtx(()=>[e.renderSlot(N.$slots,`total_${V?.data??""}`,{data:n.totalInfo},()=>[e.createTextVNode(e.toDisplayString(m(n.totalInfo,V)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],34)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],14,og))}}),ig=["id"],sg=e.defineComponent({name:"ClTableTdChecked",__name:"TdChecked",props:{id:String,value:{type:Boolean,default:!1},className:String,disabled:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},keyIndex:String,info:{type:Object,default:()=>({})}},setup(n){const l=n,a=l.id,t=e.computed(()=>s("cb")),i=e.computed(()=>s("rd")),r=e.computed(()=>l.value===!0),d=e.computed(()=>l.disabled===!0||o.isBoolean(l.info?.isDisabled)&&l.info.isDisabled),u=e.computed(()=>{const c={"th-rc":!0};return o.getJsonMerge(c,me.getClassNameJson(l.className))}),s=c=>o.isNonEmptyString(l.keyIndex)?`${l.keyIndex}_${c}`:void 0;return(c,m)=>n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createElementBlock("td",{key:0,id:e.unref(a),class:e.normalizeClass(u.value)},[n.isShowCheckbox?(e.openBlock(),e.createBlock(pt,{key:0,forId:t.value,value:r.value,disabled:d.value},null,8,["forId","value","disabled"])):n.isShowRadio?(e.openBlock(),e.createBlock(ea,{key:1,forId:i.value,name:i.value,value:r.value,disabled:d.value},null,8,["forId","name","value","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],10,ig)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))}}),rg=["onClick","onMouseenter"],cg=["onMouseenter"],ug=["colspan"],dg={key:0,class:"panel-elastic-load",role:"status","aria-live":"polite"},mg={class:"elastic-load-container"},pg=["data-elastic-id"],fg=["onMouseenter"],hg=["colspan"],gg={class:"panel-elastic-load",role:"status","aria-live":"polite"},vg={class:"elastic-load-container"},yg=["onMouseenter"],kg={key:2},Sg=["colspan"],wg={class:"panel-table-empty",role:"status"},Mo=e.defineComponent({name:"ClTableBody",__name:"Body",props:{columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},isOrder:{type:Boolean,default:!1},selectValue:{type:Array,default:()=>[]},keyIndex:String,width:{type:String,default:"none"},minWidth:{type:String,default:"none"},hoverIndex:{type:Number,default:-1},hoverElasticIndex:{type:Number,default:-1},isUseScrollX:{type:Boolean,default:!1},colspanCount:{type:Number,default:1},isRunLoading:{type:Boolean,default:!1},isShowRadio:{type:Boolean,default:!1},isShowCheckbox:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},elasticOpen:{type:Array,default:()=>[]},elasticLoading:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:n=>["default","sameDataStructure"].indexOf(n)>-1},elasticData:{type:Object,default:()=>({})},fixedType:{type:String,default:""},fixedLeftIndex:{type:Number,default:-1},fixedRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String},emits:{onClickTr:(n,l,a)=>!0,onHoverIn:(n,l)=>!0,onHoverOut:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElTable"),s=e.ref(new Set),c=e.computed(()=>new Set((Array.isArray(t.selectValue)?t.selectValue:[]).filter(x=>!o.isUndefined(x)).map(x=>String(x)))),m=e.computed(()=>new Set((Array.isArray(t.elasticLoading)?t.elasticLoading:[]).filter(x=>!o.isUndefined(x)).map(x=>String(x)))),p=e.computed(()=>new Set((Array.isArray(t.elasticOpen)?t.elasticOpen:[]).filter(x=>!o.isUndefined(x)).map(x=>String(x)))),g=e.computed(()=>{const x=Number(t.colspanCount);return o.isFinite(x)&&x>=1?Math.floor(x):1}),h=e.computed(()=>({"table-default":!0,"table-base":!0,"table-empty":o.isEmpty(t.list)})),y=e.computed(()=>{const x={};return o.isNonEmptyString(t.fixedType)?o.isNonEmptyString(t.width)&&t.width!=="none"&&(x.width=t.width):t.isUseScrollX&&o.isNonEmptyString(t.minWidth)&&t.minWidth!=="none"&&(x.minWidth=t.minWidth),x}),E=(x,A,f)=>{i("onClickTr",x,A,f)},L=(x,A=-1)=>{i("onHoverIn",x,A)},B=()=>{i("onHoverOut")},I=(x,A)=>o.isEmpty(x)||!A?"":o.isEmpty(A.format)?x:o.getValueByFormat(x,A.format??"",A.formatExt),M=x=>{const A=t.elasticData||{};return Object.prototype.hasOwnProperty.call(A,x)?A[x]:[]},N=x=>!o.isEmpty(x)&&!o.isEmpty(x.id)&&c.value.has(x.id.toString()),b=x=>!o.isEmpty(x)&&!o.isEmpty(x.id)&&m.value.has(x.id.toString());return l({getWidth:()=>u.value?u.value.clientWidth:0,getHeight:()=>u.value?u.value.clientHeight:0,setElasticWidth:()=>{if(!u.value)return;const x=u.value.parentNode;if(!x)return;const A=u.value.querySelectorAll(".panel-elastic-load"),f=x.clientWidth;for(let S=0;S<A.length;S++)A[S].style.width=`${f}px`},setElasticHeight:x=>{if(!u.value)return;const A=u.value.querySelector(`[data-elastic-id="${CSS.escape(x)}"]`);if(A){const f=A.parentNode;if(f){A.style.height="",f.style.height="";const k=`${A.clientHeight}px`;A.style.height=k,f.style.height=k}const S=s.value;S.has(x)||(s.value=new Set(S).add(x))}},removeElasticAbsolute:x=>{if(s.value.has(x)){const A=new Set(s.value);A.delete(x),s.value=A}},clearElasticAbsolute:()=>{s.value.size>0&&(s.value=new Set)},setElasticLoadLeft:x=>{if(!u.value)return;const A=u.value.querySelectorAll(".panel-elastic-load"),f=o.isFinite(x)?Math.max(0,x):0;for(let S=0;S<A.length;S++)A[S].style.left=`${f}px`},setEmptyWidth:()=>{if(!u.value)return;const x=u.value.querySelector(".panel-table-empty");if(x){const A=u.value.parentNode;if(A){const f=A.clientWidth;x.style.width=`${f}px`}}},setEmptyLeft:x=>{const A=u.value?u.value.querySelector(".panel-table-empty"):null;if(A){const f=o.isFinite(x)?Math.max(0,x):0;A.style.left=`${f}px`}}}),(x,A)=>(e.openBlock(),e.createElementBlock("table",{class:e.normalizeClass(h.value),style:e.normalizeStyle(y.value),ref_key:"refElTable",ref:u},[e.createElementVNode("tbody",null,[e.unref(o).isEmpty(n.list)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.list,(f,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${S}`},[e.createElementVNode("tr",{class:e.normalizeClass({odd:n.isStriped&&S%2===0,"tr-customInterval-odd":n.isStriped&&n.trIntervalNum>0&&Math.floor(S/n.trIntervalNum)%2===0,"tr-customInterval-even":n.isStriped&&n.trIntervalNum>0&&Math.floor(S/n.trIntervalNum)%2===1,"tr-disabled":e.unref(o).isBoolean(f?.isDisabled)&&f.isDisabled,"tr-selected":N(f),"tr-hover":n.hoverIndex===S}),onClick:k=>E(k,f,S),onMouseenter:k=>L(S),onMouseleave:B},[n.isShowRadio||n.isShowCheckbox?(e.openBlock(),e.createBlock(sg,{key:0,keyIndex:`${n.keyIndex}_${n.fixedType}_body_tr_${S}`,isShowRadio:n.isShowRadio,isShowCheckbox:n.isShowCheckbox,value:N(f),info:f,disabled:n.disabled},null,8,["keyIndex","isShowRadio","isShowCheckbox","value","info","disabled"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(k,v)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${S}_td_${v}`,isOrder:n.isOrder,tdIndex:v,tdInfo:k,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(x.$slots,`td_${k?.data??""}`,{data:f,trIndex:S},()=>[e.createTextVNode(e.toDisplayString(I(f&&k?f[k.data]:void 0,k)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,rg),n.isElastic&&!e.unref(o).isEmpty(f?.id)&&p.value.has(f.id.toString())?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.elasticType==="default"?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":n.hoverIndex===S}),onMouseenter:k=>L(S),onMouseleave:B},[e.createElementVNode("td",{colspan:g.value,class:e.normalizeClass({"td-elastic-load":b(f)})},[b(f)?(e.openBlock(),e.createElementBlock("div",dg,[e.createElementVNode("div",mg,[e.createVNode(ct,{theme:"circleBubble",size:"large"})])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["elastic-container",{"elastic-container-absolute":s.value.has(f.id.toString())}]),"data-elastic-id":f.id},[e.renderSlot(x.$slots,"tr_elastic_children",{data:f,trIndex:S})],10,pg))],10,ug)],42,cg)):n.elasticType==="sameDataStructure"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b(f)?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"tr-elastic":!0,"tr-hover":n.hoverIndex===S}),onMouseenter:k=>L(S),onMouseleave:B},[e.createElementVNode("td",{colspan:g.value,class:"td-elastic-load"},[e.createElementVNode("div",gg,[e.createElementVNode("div",vg,[e.createVNode(ct,{theme:"circleBubble",size:"large"})])])],8,hg)],42,fg)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(M(f.id.toString()),(k,v)=>(e.openBlock(),e.createElementBlock("tr",{key:`${n.keyIndex}_${n.fixedType}_body_tr_${S}_elastic_${v}`,class:e.normalizeClass({"tr-elastic-sameDataStructure":!0,odd:n.isStriped&&v%2===0,"tr-disabled":e.unref(o).isBoolean(k?.isDisabled)&&k.isDisabled,"tr-hover":n.hoverElasticIndex===v&&n.hoverIndex===S}),onMouseenter:F=>L(S,v),onMouseleave:B},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(F,_)=>(e.openBlock(),e.createBlock(Ho,{key:`${n.keyIndex}_${n.fixedType}_body_tr_${S}_elastic_${v}_td_${_}`,isOrder:n.isOrder,tdIndex:_,tdInfo:F,isUseScrollX:n.isUseScrollX,fixedLeftIndex:n.fixedLeftIndex,fixedRightIndex:n.fixedRightIndex,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix},{default:e.withCtx(()=>[e.renderSlot(x.$slots,`td_elastic_${F?.data??""}`,{data:k,trIndex:S,trElasticInx:v},()=>[e.createTextVNode(e.toDisplayString(I(k&&F?k[F.data]:void 0,F)),1)])]),_:2},1032,["isOrder","tdIndex","tdInfo","isUseScrollX","fixedLeftIndex","fixedRightIndex","isInlineWidth","widthClassPrefix","widthMinClassPrefix"]))),128))],42,yg))),128))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128)),e.unref(o).isEmpty(n.list)&&!n.isRunLoading&&!e.unref(o).isNonEmptyString(n.fixedType)?(e.openBlock(),e.createElementBlock("tr",kg,[e.createElementVNode("td",{colspan:g.value,class:"td-empty"},[e.createElementVNode("div",wg,e.toDisplayString(e.unref(o).isNonEmptyString(n.emptyText)?n.emptyText:e.unref(r).noResultsText),1)],8,Sg)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],6))}});function Eg(n){if(!Array.isArray(n))return[];const l=[];return n.forEach(a=>{if(o.isEmpty(a))return;const t=a;!(o.isBoolean(t.isDisabled)?t.isDisabled:!1)&&!o.isEmpty(t.id)&&l.push(String(t.id))}),l}function Cg(n,l,a=!1){if(!Array.isArray(n)||n.length===0)return[];const t=[];return n.forEach(i=>{const r=String(i);l.includes(r)&&t.push(r)}),a&&t.length>1?[t[0]]:t}function bg(n,l){return l.length>0&&l.length===n.length}function xg(n,l){return n.filter(a=>!l.includes(a))}const Bg=["id"],Ig={class:"table-wrapper"},Dg={key:0,class:"table-fixed-column-left"},Tg={key:2,class:"table-fixed-column-right"},Ng={key:0,class:"table-scroll-occupy-container"},Vg={key:2,class:"table-fixed-column-scrollX"},Mg={key:4,class:"table-fixed-head-load"},Og={key:0,class:"table-fixed-column-left"},_g={key:2,class:"table-fixed-column-right"},Ag={key:1,class:"table-fixed-column-scrollX"},Lg={key:2,class:"table-footer-wrapper"},$g={key:0,class:"table-load",role:"status","aria-live":"polite"},Fg={class:"table-load-wrapper"},Xa=15,Pg=30,Rg=180,Hg=50,Ga=300,ui=e.defineComponent({name:"ClTable",__name:"Index",props:{id:String,className:String,disabled:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]},totalLength:Number,totalData:{type:Object,default:()=>({})},isServer:{type:Boolean,default:!0},isParamTriggerServer:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!0},loadTheme:{type:String,default:"circleBubble"},loadColor:{type:String,default:"var(--cl-primary, #1088f0)"},isShowInitLoadIng:{type:Boolean,default:!0},isPaginate:{type:Boolean,default:!0},pageOffset:{type:Number,default:0},isPaginateLimit:{type:Boolean,default:!0},paginateLimit:{type:Number,default:10},paginateLimitData:{type:Array,default:()=>[]},isOrder:{type:Boolean,default:!1},orderSort:{type:Array,default:()=>[]},selectValue:{type:[String,Number],default:""},checkedRowType:{type:String,default:"none",validator:n=>["none","radio","checkbox"].indexOf(n)>-1},isShowCheckboxAll:{type:Boolean,default:!0},isScrollX:{type:Boolean,default:!1},isScrollXBottom:{type:Boolean,default:!1},isFixedHead:{type:Boolean,default:!1},scrollY:{type:Number,default:-1},fixedColumnLeftIndex:{type:Number,default:-1},fixedColumnRightIndex:{type:Number,default:-1},isInlineWidth:{type:Boolean,default:!1},widthClassPrefix:{type:String,default:"width-"},widthMinClassPrefix:{type:String,default:"width-min-"},isClickRowLinkage:{type:Boolean,default:!1},isElastic:{type:Boolean,default:!1},isElasticLoad:{type:Boolean,default:!0},rowClickKeyInvalid:{type:String,default:".tr-click-invalid"},rowClickKeyElastic:{type:String,default:".tr-click-elastic"},elasticIconCls:{type:Array,default:()=>[]},elasticType:{type:String,default:"default",validator:n=>["default","sameDataStructure"].indexOf(n)>-1},elasticData:{type:Object,default:()=>({})},trIntervalNum:{type:Number,default:-1},isStriped:{type:Boolean,default:!1},emptyText:String,isHead:{type:Boolean,default:!0}},emits:{onGetData:n=>!0,onClickRow:(n,l,a)=>!0,onClickElastic:(n,l,a,t,i)=>!0,onChangeChecked:(n,l,a)=>!0,onChangeParams:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useSlots(),d=re=>{let fe=[];if(t.isOrder){const ge=o.isEmpty(re)?[]:re;let Ee=[0,"desc"];const Be=o.isEmpty(t.columns)?[]:t.columns;for(let Ie=0;Ie<Be.length;Ie+=1){const _e=Be[Ie];if(o.isEmpty(_e))continue;const Ge=_e.sort===void 0||_e.sort===null?!0:_e.sort===!0,Ke=o.isBoolean(_e.visible)?_e.visible:!0;if(Ge&&Ke){Ee=[Ie,"desc"];break}}if(ge.length===0)fe=Ee;else{const Ie=Be[ge[0]];if(o.isEmpty(Ie))fe=Ee;else{const _e=Ie.sort===void 0||Ie.sort===null?!0:Ie.sort===!0,Ge=o.isBoolean(Ie.visible)?Ie.visible:!0,Ke=Array.isArray(ge)?ge[0]:void 0,Bt=Array.isArray(ge)&&(ge[1]==="asc"||ge[1]==="desc")?ge[1]:void 0;fe=_e&&Ge&&!o.isUndefined(Ke)?[Ke,Bt??"desc"]:Ee}}}return fe},u=()=>{let re=1;return t.paginateLimit>0&&t.pageOffset>=0&&(re=Math.floor(t.pageOffset/t.paginateLimit)+1),re},s=d(t.orderSort),c={dataJson:o.getJsonByList(t.list),changeNewPaginate:{pages:u(),limit:t.paginateLimit},changeNewSort:{orderIndex:s[0],orderBy:s[1]},sortLocalData:[],scrollBody:{left:0},scrollHead:{left:0},resizeEvent:null,timerBody:null,pendingCanceled:!1},m={observerBodyScrollY:null},p=`table-${o.getRandom(5)}`,g=t.id,h=e.useTemplateRef("refElHeadWrapper"),y=e.useTemplateRef("refElHeadContainer"),E=e.useTemplateRef("refElHeadMain"),L=e.useTemplateRef("refElHeadTable"),B=e.useTemplateRef("refElHeadFixedScrollX"),I=e.useTemplateRef("refElBodyWrapper"),M=e.useTemplateRef("refElBodyContainer"),N=e.useTemplateRef("refElBodyMain"),b=e.useTemplateRef("refElBodyTable"),V=e.useTemplateRef("refElBodyFixedScrollX"),w=e.reactive({isRunLoading:!1,isCheckedRadio:t.checkedRowType==="radio",isCheckedCheckbox:t.checkedRowType==="checkbox",colspanCount:0,hoverTrIndex:-1,hoverTrElasticIndex:-1,totalHeight:"0"}),T=e.ref([]),C=e.reactive({pages:c.changeNewPaginate.pages,limit:c.changeNewPaginate.limit}),D=e.ref(s),J=e.ref(!1),ne=()=>{const re=t.selectValue;return o.isNonEmptyString(re)?o.split(re):o.isNumber(re)?o.split(re.toString()):[]},K=e.ref(ne()),P=e.reactive({open:[],loading:[]}),x=e.reactive({isShow:!1,minWidth:"auto",posType:"left"}),A=e.ref(!1),f=e.reactive({totalWidth:"0",centerWidth:"0",leftColumnLength:0,leftWidth:"0",rightColumnLength:0,rightWidth:"0"}),S=e.reactive({isShow:!1,width:"auto",height:"auto"}),k=e.reactive({headHeight:0});let v=null,F=null,_=0;const O=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("th_")===0)),q=e.computed(()=>{const re=Object.keys(r).filter(fe=>fe.indexOf("td_")===0&&fe.indexOf("td_elastic_")!==0);return t.isElastic&&re.push("tr_elastic_children"),re}),X=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("total_")===0)),Z=e.computed(()=>Object.keys(r).filter(re=>re.indexOf("td_elastic_")===0)),se=e.computed(()=>t.isShowCheckboxAll&&T.value.length>0),le=e.computed(()=>!o.isEmpty(t.totalData)&&T.value.length>0),G=e.computed(()=>t.isServer?o.isFinite(t.totalLength)?t.totalLength:0:o.isFinite(t.totalLength)?t.totalLength:t.list?.length||0),oe=e.computed(()=>t.isScrollX||t.isScrollXBottom),R=e.computed(()=>t.scrollY>0),U=e.computed(()=>t.isHead&&t.fixedColumnLeftIndex>-1&&oe.value),Q=e.computed(()=>t.isHead&&t.fixedColumnRightIndex>-1&&oe.value&&t.fixedColumnRightIndex>t.fixedColumnLeftIndex+1),ee=e.computed(()=>{const re={"panel-table":!0,"table-disabled":t.disabled};return w.isRunLoading&&(re["table-loading"]=!0),o.osType().isMobile&&(re["table-mob"]=!0),o.getJsonMerge(re,me.getClassNameJson(t.className))}),Y=e.computed(()=>{const re={"table-head-wrapper":!0,"table-scrollY":R.value,"table-scroll-occupy-y":A.value};return S.isShow&&(re["table-fixed-head"]=!0),re}),H=e.computed(()=>{const re={"table-head-container":!0};return t.isScrollX&&(re["table-scrollX"]=!0),(U.value||Q.value)&&(re["table-fixed-column"]=!0,x.isShow?re[`table-scrollX-${x.posType}`]=!0:re["table-scrollX-none"]=!0),re}),te=e.computed(()=>{const re={"table-body-wrapper":!0,"table-scrollY":R.value,"table-scrollX":t.isScrollX,"table-scrollX-bottom":x.isShow};return re["table-scroll-borderT0"]=x.isShow&&t.isScrollX,(U.value||Q.value)&&(re["table-fixed-column"]=!0,x.isShow?re[`table-scrollX-${x.posType}`]=!0:re["table-scrollX-none"]=!0),re}),$=e.computed(()=>{const re={};if((U.value||Q.value)&&R.value){const fe=x.isShow?Math.max(0,t.scrollY-Xa):t.scrollY;re.maxHeight=`${fe}px`}return re}),z=e.computed(()=>{const re={};return U.value||Q.value||R.value&&(re.maxHeight=`${t.scrollY}px`),re}),ce=e.computed(()=>{const re={};return w.isRunLoading&&(re.height=`${k.headHeight}px`),re}),de=re=>{i("onGetData",re)},ie=(re,fe,ge,Ee,Be)=>{i("onClickElastic",re,fe,ge,Ee,Be)},ae=(re,fe,ge=!1)=>{i("onClickRow",re,fe,ge)},W=(re,fe,ge)=>{i("onChangeChecked",re,fe,ge)},j=()=>{const re=bn();i("onChangeParams",re)},ue=()=>{e.nextTick(()=>{if(E.value){const re=E.value.querySelector("thead");re&&(k.headHeight=re.offsetHeight)}}),w.isRunLoading=!0},pe=()=>{w.isRunLoading=!1},he=()=>{let re=0,fe=0;(w.isCheckedRadio||w.isCheckedCheckbox)&&(re=1,L.value&&(fe=L.value.getRcWidth())),(o.isEmpty(t.columns)?[]:t.columns).forEach(Be=>{(o.isBoolean(Be?.visible)?Be.visible:!0)&&(re+=1,!o.isEmpty(Be)&&!o.isEmpty(Be.width)?fe+=Number(Be.width)||0:!o.isEmpty(Be)&&!o.isEmpty(Be.widthMin)&&(fe+=Number(Be.widthMin)||0))});const Ee=L.value?L.value.getPaddingLr():0;fe+=Ee,w.colspanCount=re,oe.value&&(x.minWidth=fe>0?`${fe}px`:"auto")},ye=()=>new Promise((re,fe)=>{e.nextTick(()=>{try{if(!b.value){re();return}const ge=b.value.getWidth();f.totalWidth=`${ge}px`;let Ee=ge;if(U.value||Q.value){const Be=[],Ie=[];(o.isEmpty(t.columns)?[]:t.columns).forEach((ft,Zt)=>{(o.isBoolean(ft?.visible)?ft.visible:!0)&&(U.value&&Zt<=t.fixedColumnLeftIndex&&Be.push(ft),Q.value&&Zt>=t.fixedColumnRightIndex&&Ie.push(ft))});const Ge=w.isCheckedRadio||w.isCheckedCheckbox,Ke=L.value?L.value.getElTh():[],Bt=Ke.length;let kt=Be.length;const Qt=Ie.length;let Sa=kt-1;const Ni=Bt-Qt;Ge&&(kt+=1,Sa+=1);let ro=0,co=0;for(let ft=0;ft<Bt;ft++){const Zt=Ke[ft];if(!Zt)continue;const uo=Zt.clientWidth;ft<=Sa&&(ro+=uo),ft>=Ni&&(co+=uo)}U.value&&(f.leftColumnLength=Be.length,f.leftWidth=`${ro}px`,Ee-=ro),Q.value&&(f.rightColumnLength=Ie.length,f.rightWidth=`${co}px`,Ee-=co)}Ee=Math.max(0,Ee),f.centerWidth=`${Ee}px`,e.nextTick(()=>{re()})}catch(ge){fe(ge)}})}),Ce=()=>{e.nextTick(()=>{b.value&&b.value.setElasticWidth()})},be=re=>{(U.value||Q.value)&&b.value&&b.value.setElasticHeight(re)},xe=re=>{if(t.isElasticLoad){const fe=o.getArrClone(P.loading);fe.indexOf(re)===-1&&(fe.push(re),P.loading=fe)}},$e=re=>{if(t.isElasticLoad){const fe=o.getArrClone(P.loading),ge=fe.indexOf(re);ge>-1&&(fe.splice(ge,1),P.loading=fe,e.nextTick(()=>{be(re)}))}},Pe=(re,fe,ge,Ee)=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const Be=re.id.toString(),Ie=o.getArrClone(P.open),_e=Ie.indexOf(Be),Ge=_e===-1;Ge?(Ie.push(Be),xe(Be)):(Ie.splice(_e,1),$e(Be),(U.value||Q.value)&&b.value&&b.value.removeElasticAbsolute(Be)),Lt(ge,Ge);const Ke=o.isBoolean(Ee)?Ee:!0;P.open=Ie,Ke&&ie(Be,re,fe,Ge,ge),Ce()},yt=()=>{const re=[],fe=o.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;if(fe.length===2){const ge=T.value,Ee=P.open;ge.forEach(Be=>{if(!Be){re.push(Be);return}const Ie=o.getJsonClone(Be);if(!o.isEmpty(Ie.id)){const _e=Ie.id.toString();Ie._elasticIconCls=Ee.indexOf(_e)>-1?fe[1]:fe[0]}re.push(Ie)})}re.length>0&&(T.value=re)},Lt=(re,fe=!1)=>{if(re){const ge=[],Ee=["elastic-expand","elastic-retract"];fe?ge.push("elastic-expand"):ge.push("elastic-retract");const Be=o.isEmpty(t.elasticIconCls)?[]:t.elasticIconCls;Be.length===2&&(Ee.push(Be[0]),Ee.push(Be[1]),fe?ge.push(Be[1]):ge.push(Be[0]));let Ie=me.getRemoveClass(re.className,Ee.join(" "));Ie=me.getAddClass(Ie,ge),re.className=Ie}},wn=()=>Eg(T.value),En=(re=null)=>{const fe=o.isUndefined(re)||re===null?K.value:re;return Cg(fe,wn(),w.isCheckedRadio)},Qn=()=>{if(w.isCheckedCheckbox){const re=wn(),fe=En();J.value=bg(re,fe)}},ma=()=>{const re=[],fe=En(),ge=wn(),Ee=xg(ge,fe);if(w.isCheckedCheckbox)fe.forEach(Be=>{const Ie=c.dataJson[Be.toString()];o.isUndefined(Ie)||re.push(Ie)});else if(w.isCheckedRadio&&fe.length>0){const Be=c.dataJson[fe[0]];o.isUndefined(Be)||re.push(Be)}return{checkedIds:fe,unCheckedIds:Ee,checkedData:re}},Zn=()=>{const re=ma();W(re.checkedIds.join(","),re.checkedData,{checkedIds:re.checkedIds,unCheckedIds:re.unCheckedIds})},pa=re=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const fe=re.id.toString(),ge=K.value;let Ee=[];if(w.isCheckedCheckbox){const Be=o.isExistValue(ge,fe);ge.forEach(Ie=>{Ie!==fe&&Ee.push(Ie)}),Be||Ee.push(fe),K.value=Ee,Qn(),Zn()}else ge.length>0&&ge[0]===fe||(Ee=[fe],K.value=Ee,Zn())},eo=()=>{if(oe.value&&N.value&&b.value){const re=N.value.clientWidth,fe=b.value.getWidth();x.isShow=fe>re}},to=()=>{if(R.value&&b.value){const re=b.value.getHeight();let fe=re>t.scrollY;if(fe||(U.value||Q.value?M.value&&(fe=re>M.value.clientHeight):N.value&&N.value.offsetHeight>=t.scrollY&&(fe=re>N.value.clientHeight)),fe&&le.value&&L.value){const ge=L.value.getTotalHeight()-(o.osType().isMobile?2:0);w.totalHeight=`${ge}px`}A.value=fe}},Cn=()=>{if((U.value||Q.value)&&N.value&&b.value){let re=N.value.scrollLeft;const fe=N.value.clientWidth,ge=b.value.getWidth();let Ee="left";re>0&&(fe+re>=ge?Ee="right":Ee="center"),x.posType=Ee}},fa=()=>{if(!I.value||!b.value)return;let re=E.value?E.value.scrollLeft:0;const fe=I.value.clientWidth,ge=b.value.getWidth();fe+re>ge&&(re=0),P.loading.length>0&&b.value.setElasticLoadLeft(re),T.value.length===0&&b.value.setEmptyLeft(re)},no=re=>{_=re.target.scrollLeft,v===null&&(v=requestAnimationFrame(()=>{v=null;const fe=_;E.value&&(E.value.scrollLeft=fe),N.value&&(N.value.scrollLeft=fe),B.value&&B.value.setScrollLeft(fe),V.value&&V.value.setScrollLeft(fe),Cn(),fa()}))},ha=re=>{const fe=re.target,ge=fe.scrollLeft;fe.scrollWidth-fe.clientWidth-ge<1&&N.value&&N.value.scrollLeft>ge||(ge!==c.scrollHead.left&&no(re),c.scrollHead.left=ge)},ga=re=>{const fe=re.target.scrollLeft;fe!==c.scrollBody.left&&no(re),c.scrollBody.left=fe},oo=()=>{if(t.isFixedHead&&h.value&&!w.isRunLoading){let re=!1,fe="auto",ge="auto";const Ee=h.value&&h.value.parentNode?me.getPositionView(h.value.parentNode):null;if(Ee&&Ee.top<0&&I.value&&y.value&&L.value){const Be=I.value.clientHeight;if(Ee.top>(Be-Pg)*-1){re=!0;const Ie=I.value.offsetWidth,_e=x.isShow&&t.isScrollX?y.value.offsetHeight:L.value.getOffsetHeight();fe=`${Ie}px`,ge=`${_e}px`}}S.isShow=re,S.width=fe,S.height=ge}},ao=()=>{T.value.length===0&&e.nextTick(()=>{b.value&&b.value.setEmptyWidth()})},bn=()=>{const re={};if(t.isPaginate){const{pages:fe,limit:ge}=c.changeNewPaginate;re.pages=fe,re.limit=ge,re.offset=(re.pages-1)*re.limit}if(t.isOrder){const{orderIndex:fe,orderBy:ge}=c.changeNewSort;re.orderIndex=fe,re.orderBy=ge;const Ee=t.columns[fe];o.isUndefined(Ee)||(re.orderColumns=Ee.data)}return re},xi=()=>{t.scrollY>0&&e.nextTick(()=>{if(!N.value)return;const re=N.value.querySelectorAll(".tr-selected");N.value.scrollTop=re&&re.length>0&&re[0].offsetTop>Rg?re[0].offsetTop-Hg:0})},va=(re={})=>{if(w.isCheckedRadio||w.isCheckedCheckbox){const fe=ne();K.value=En(fe),Qn(),xi()}t.isElastic&&((!o.isBoolean(re.isElasticCloseAll)||re.isElasticCloseAll)&&(P.open=[],(U.value||Q.value)&&b.value&&b.value.clearElasticAbsolute()),P.loading=[],yt()),w.hoverTrIndex=-1,w.hoverTrElasticIndex=-1,e.nextTick(()=>{t.isPaginate&&(C.pages=c.changeNewPaginate.pages,C.limit=c.changeNewPaginate.limit),t.isOrder&&(D.value=d([c.changeNewSort.orderIndex,c.changeNewSort.orderBy])),pe(),he(),e.nextTick(()=>{to(),eo(),ye().then(()=>{Cn()}).catch(fe=>{we.warn("ClTable","表格固定列分析失败",fe)}),ao(),oo()})})},ya=(re,fe)=>{const ge=o.isEmpty(t.list)?[]:t.list;let Ee=[];if(fe){if(t.isOrder){const Be={},Ie=[];let _e="string";if(!o.isUndefined(re.orderIndex)){const Ge=re.orderColumns,Ke=t.columns[re.orderIndex];if(!o.isUndefined(Ke))if(o.isEmpty(Ke.sortType))switch(Ke.format){case"int":case"float2":case"float3":_e="number";break;case"date":case"dateTime":case"time":_e="date";break;default:_e="string"}else _e=Ke.sortType;ge.forEach(Bt=>{if(!Bt)return;let kt=Bt[Ge];kt=o.isUndefined(kt)||kt===null?"":kt;const Qt=kt.toString();o.isExistJsonKey(Be,Qt)||(Be[Qt]=[],Ie.push(kt)),Be[Qt].push(o.getJsonClone(Bt))})}Ie.length>0&&(re.orderBy==="desc"?o.getArrDesc(Ie,_e):o.getArrAsc(Ie,_e)).forEach(Ke=>{Ee.push(...Be[Ke.toString()])})}else Ee=o.getListClone(t.list);c.sortLocalData=Ee}else Ee=c.sortLocalData;if(t.isPaginate){const Be=[],Ie=Ee.length,_e=re.offset;let Ge=re.offset+re.limit;if(Ge=Ie<Ge?Ie:Ge,Ie&&Ie>=_e&&Ie>0)for(let Ke=_e;Ke<Ge;Ke+=1)Be.push(o.getJsonClone(Ee[Ke]));return Be}else return Ee},xt=(re={})=>{const fe=bn();K.value=[],J.value=!1,ue(),t.isServer?(c.timerBody&&clearTimeout(c.timerBody),c.timerBody=setTimeout(()=>{c.timerBody=null,de(fe)},Ga)):(c.timerBody&&clearTimeout(c.timerBody),c.timerBody=setTimeout(()=>{c.timerBody=null;const ge=o.isBoolean(re.isChangePage)?!re.isChangePage:!0;T.value=ya(fe,ge),va()},Ga))},Bi=()=>{oe.value&&(E.value&&E.value.addEventListener("scroll",ha),N.value&&N.value.addEventListener("scroll",ga))},Ii=()=>{if(R.value){const re=window,fe=re.MutationObserver||re.WebKitMutationObserver||re.MozMutationObserver;if(!fe)return;m.observerBodyScrollY=new fe(()=>{to()});const ge=m.observerBodyScrollY;b.value&&b.value.$el&&ge&&ge.observe(b.value.$el,{childList:!0,subtree:!0})}},xn=()=>{eo(),ye().then(()=>{Cn()}).catch(re=>{we.warn("ClTable","表格固定列分析失败",re)}),Ce(),ao(),fa(),e.nextTick(()=>{oo()})},Bn=()=>{F===null&&(F=requestAnimationFrame(()=>{F=null,oo()}))},Di=()=>{he(),e.nextTick(()=>{t.isServer?xt():o.isEmpty(t.list)?t.isShowInitLoadIng?ue():e.nextTick(()=>{ao()}):(xt(),t.isShowInitLoadIng||(w.isRunLoading=!1))})};e.onMounted(()=>{e.nextTick(()=>{Di(),Bi(),Ii(),c.resizeEvent=new Ye.Resize({isDelay:!0,callback:()=>{xn()}}),t.isFixedHead&&window.addEventListener("scroll",Bn)})}),e.onActivated(()=>{t.isFixedHead&&window.addEventListener("scroll",Bn),c.resizeEvent||(c.resizeEvent=new Ye.Resize({isDelay:!0,callback:()=>{xn()}})),xn(),c.pendingCanceled&&(c.pendingCanceled=!1,xt())}),e.onDeactivated(()=>{window.removeEventListener("scroll",Bn),c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null,w.isRunLoading=!1,c.pendingCanceled=!0),c.resizeEvent&&(c.resizeEvent.destroy(),c.resizeEvent=null),v!==null&&(cancelAnimationFrame(v),v=null),F!==null&&(cancelAnimationFrame(F),F=null)}),e.onBeforeUnmount(()=>{c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null),m.observerBodyScrollY&&(m.observerBodyScrollY.disconnect(),m.observerBodyScrollY.takeRecords(),m.observerBodyScrollY=null),oe.value&&(E.value&&E.value.removeEventListener("scroll",ha),N.value&&N.value.removeEventListener("scroll",ga)),c.resizeEvent&&c.resizeEvent.destroy(),v!==null&&(cancelAnimationFrame(v),v=null),F!==null&&(cancelAnimationFrame(F),F=null),window.removeEventListener("scroll",Bn)}),e.watch(()=>t.list,(re,fe)=>{const ge=o.isEmpty(re)?[]:re;if(c.timerBody&&(clearTimeout(c.timerBody),c.timerBody=null),c.dataJson=o.getJsonByList(ge),t.isServer)T.value=o.getListClone(ge);else if(t.isParamTriggerServer)T.value=o.getListClone(ge,!0);else{c.changeNewPaginate.pages=1;const Be=bn();T.value=ya(Be,!0)}const Ee={};if(t.isElastic){let Be=!1;if(fe)if(ge.length===fe.length){const Ie=new Set(fe.map(_e=>_e?.id));Be=ge.some(_e=>_e&&!Ie.has(_e.id))}else Be=!0;Be||(Ee.isElasticCloseAll=!1)}va(Ee)},{deep:!0}),e.watch(()=>t.columns,()=>{e.nextTick(()=>{he(),e.nextTick(()=>{to(),eo(),ye().then(()=>{Cn()}).catch(re=>{we.warn("ClTable","表格固定列分析失败",re)})})})},{deep:!0}),e.watch(()=>t.selectValue,()=>{const re=ne();K.value=En(re),Qn()}),e.watch(()=>t.orderSort,(re,fe)=>{if(re&&re.length>=2&&!(re[0]===c.changeNewSort.orderIndex&&re[1]===c.changeNewSort.orderBy)){const ge=d(t.orderSort);c.changeNewPaginate.pages=1,C.pages=1,c.changeNewSort={orderIndex:ge[0],orderBy:ge[1]},D.value=ge,!t.isServer&&t.isParamTriggerServer?j():xt({isChangePage:!1})}},{deep:!0}),e.watch([()=>t.pageOffset,()=>t.paginateLimit],([re,fe],[ge,Ee])=>{const Be=u();c.changeNewPaginate.pages=Be,c.changeNewPaginate.limit=fe,C.pages=Be,C.limit=fe,!t.isServer&&t.isParamTriggerServer?j():xt({isChangePage:!0})});const lo=()=>{if(t.disabled)return;const re=!J.value;let fe=[];if(re){const ge=wn(),Ee=K.value,Be=[];ge.forEach(Ie=>{o.isExistValue(Ee,Ie)||Be.push(Ie)}),fe=Ee.concat(Be)}J.value=re,K.value=fe,Zn()},io=(re,fe,ge)=>{t.disabled||w.isRunLoading||(c.changeNewPaginate.pages=1,C.pages=1,c.changeNewSort.orderIndex=fe,c.changeNewSort.orderBy=ge,!t.isServer&&t.isParamTriggerServer?j():xt({isChangePage:!1}))},so=(re,fe,ge)=>{if(!fe||o.isEmpty(fe)||o.isBoolean(fe.isDisabled)&&fe.isDisabled||t.disabled)return;const Ee=o.isNonEmptyString(t.rowClickKeyInvalid)?me.getParent(re.target,t.rowClickKeyInvalid,re.currentTarget,!1):void 0;if(o.isUndefined(Ee)){if(t.isElastic){const Ie=o.isNonEmptyString(t.rowClickKeyElastic)?me.getParent(re.target,t.rowClickKeyElastic,re.currentTarget,!1):void 0;if(o.isUndefined(Ie))t.isClickRowLinkage&&Pe(fe,ge);else{Pe(fe,ge,Ie);return}}let Be=!1;if(w.isCheckedRadio||w.isCheckedCheckbox){let Ie=me.getParent(re.target,".th-rc",re.currentTarget,!1);Ie===re.currentTarget&&(Ie=null),o.isUndefined(Ie)?t.isClickRowLinkage&&pa(fe):(Be=!0,pa(fe))}ae(fe,ge,Be)}},$t=(re,fe=-1)=>{w.hoverTrIndex=re,w.hoverTrElasticIndex=fe},Ft=()=>{w.hoverTrIndex=-1,w.hoverTrElasticIndex=-1},Ti=(re,fe)=>{t.disabled||w.isRunLoading||t.isPaginate&&(c.changeNewPaginate.pages=re,c.changeNewPaginate.limit=fe,!t.isServer&&t.isParamTriggerServer?j():xt({isChangePage:!0}))},ka=re=>{no(re)};return l({getParamInfo:()=>bn(),refresh:(re=!0)=>{w.isRunLoading||(re&&(c.changeNewPaginate.pages=1),xt())},getData:()=>{const re=e.toRaw(T.value);return o.getListClone(re)},getDataAll:()=>{if(t.isServer){const re=e.toRaw(T.value);return o.getListClone(re)}return o.getListClone(c.sortLocalData)},getSelectData:()=>{const re=ma();return{ids:(re?.checkedIds||[]).join(","),list:re?.checkedData||[]}},loadStart:()=>{ue()},loadStop:()=>{pe()},loadElasticStart:re=>{o.isUndefined(re)||re===null||xe(re.toString())},loadElasticStop:re=>{o.isUndefined(re)||re===null||$e(re.toString())},closeElastic:(re,fe,ge)=>{if(o.isEmpty(re)||o.isEmpty(re.id))return;const Ee=re.id.toString();if(P.open.indexOf(Ee)===-1)return;const Be=ge||(N.value?N.value.querySelector(`[data-elastic-id="${CSS.escape(Ee)}"]`):null);Pe(re,fe,Be,!1)},refreshResize:()=>{xn()}}),(re,fe)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(g),class:e.normalizeClass(ee.value)},[e.createElementVNode("div",Ig,[n.isHead?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass(Y.value),style:e.normalizeStyle({width:S.width}),ref_key:"refElHeadWrapper",ref:h},[e.createElementVNode("div",{class:e.normalizeClass(H.value),ref_key:"refElHeadContainer",ref:y},[e.createElementVNode("div",{class:"table-head-main",ref_key:"refElHeadMain",ref:E},[e.createVNode(Vo,{minWidth:x.minWidth,columns:n.columns,isOrder:n.isOrder,orderSort:D.value,isShowTotal:le.value,totalInfo:n.totalData,keyIndex:p,hoverIndex:w.hoverTrIndex,isUseScrollX:oe.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:se.value,disabled:n.disabled,checkboxAllValue:J.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft,ref_key:"refElHeadTable",ref:L},e.createSlots({_:2},[e.renderList(O.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])})),e.renderList(X.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])}))]),1032,["minWidth","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],512),U.value&&f.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",Dg,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:f.leftWidth})},[e.createVNode(Vo,{fixedType:"left",fixedLeftIndex:n.fixedColumnLeftIndex,width:f.totalWidth,columns:n.columns,isOrder:n.isOrder,orderSort:D.value,isShowTotal:le.value,totalInfo:n.totalData,keyIndex:p,hoverIndex:w.hoverTrIndex,isUseScrollX:oe.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:se.value,disabled:n.disabled,checkboxAllValue:J.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(O.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])})),e.renderList(X.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])}))]),1032,["fixedLeftIndex","width","columns","isOrder","orderSort","isShowTotal","totalInfo","hoverIndex","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),Q.value&&f.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",Tg,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:f.rightWidth})},[e.createVNode(Vo,{fixedType:"right",fixedRightIndex:n.fixedColumnRightIndex,width:f.totalWidth,columns:n.columns,isOrder:n.isOrder,orderSort:D.value,keyIndex:p,hoverIndex:w.hoverTrIndex,isShowTotal:le.value,totalInfo:n.totalData,isUseScrollX:oe.value,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isShowCheckboxAll:se.value,disabled:n.disabled,checkboxAllValue:J.value,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickAll:lo,onOnClickOrderBy:io,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(O.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])})),e.renderList(X.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data})])}))]),1032,["fixedRightIndex","width","columns","isOrder","orderSort","hoverIndex","isShowTotal","totalInfo","isUseScrollX","isShowRadio","isShowCheckbox","isShowCheckboxAll","disabled","checkboxAllValue","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2),A.value?(e.openBlock(),e.createElementBlock("div",Ng,[fe[0]||(fe[0]=e.createElementVNode("div",null,null,-1)),le.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-scroll-occupy-total",style:e.normalizeStyle({height:w.totalHeight})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isScrollX?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"table-scroll-occupy-corner":x.isShow})},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isScrollX?e.withDirectives((e.openBlock(),e.createElementBlock("div",Vg,[e.createVNode(fn,{isShowLeft:U.value,isShowRight:Q.value,leftWidth:f.leftWidth,centerWidth:f.centerWidth,rightWidth:f.rightWidth,isShowCorner:A.value,cornerType:"right-top",onOnScrollX:ka,ref_key:"refElHeadFixedScrollX",ref:B},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],512)),[[e.vShow,x.isShow]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),S.isShow&&w.isRunLoading?(e.openBlock(),e.createElementBlock("div",Mg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],6),S.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:S.height,width:S.width})},null,4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:e.normalizeClass(te.value),ref_key:"refElBodyWrapper",ref:I},[e.createElementVNode("div",{class:"table-body-container",style:e.normalizeStyle($.value),ref_key:"refElBodyContainer",ref:M},[e.createElementVNode("div",{class:e.normalizeClass({"table-body-main":!0,"table-body-empty":T.value.length===0}),style:e.normalizeStyle(z.value),ref_key:"refElBodyMain",ref:N},[e.createVNode(Mo,{minWidth:x.minWidth,columns:n.columns,list:T.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:K.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:oe.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:P.open,elasticLoading:P.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft,ref_key:"refElBodyTable",ref:b},e.createSlots({_:2},[e.renderList(q.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex})])})),e.renderList(Z.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex,trElasticInx:Ee.trElasticInx})])}))]),1032,["minWidth","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],6),U.value&&f.leftColumnLength>0?(e.openBlock(),e.createElementBlock("div",Og,[e.createElementVNode("div",{class:"table-fixed-column-left-container",style:e.normalizeStyle({width:f.leftWidth})},[e.createVNode(Mo,{width:f.totalWidth,fixedType:"left",fixedLeftIndex:n.fixedColumnLeftIndex,columns:n.columns,list:T.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:K.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:oe.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:P.open,elasticLoading:P.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(q.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex})])})),e.renderList(Z.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex,trElasticInx:Ee.trElasticInx})])}))]),1032,["width","fixedLeftIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),Q.value&&f.rightColumnLength>0?(e.openBlock(),e.createElementBlock("div",_g,[e.createElementVNode("div",{class:"table-fixed-column-right-container",style:e.normalizeStyle({width:f.rightWidth})},[e.createVNode(Mo,{width:f.totalWidth,fixedType:"right",fixedRightIndex:n.fixedColumnRightIndex,columns:n.columns,list:T.value,disabled:n.disabled,isOrder:n.isOrder,selectValue:K.value,keyIndex:p,hoverIndex:w.hoverTrIndex,hoverElasticIndex:w.hoverTrElasticIndex,isUseScrollX:oe.value,colspanCount:w.colspanCount,isRunLoading:w.isRunLoading,isShowRadio:w.isCheckedRadio,isShowCheckbox:w.isCheckedCheckbox,isElastic:n.isElastic,elasticOpen:P.open,elasticLoading:P.loading,elasticType:n.elasticType,elasticData:n.elasticData,trIntervalNum:n.trIntervalNum,isStriped:n.isStriped,emptyText:n.emptyText,isInlineWidth:n.isInlineWidth,widthClassPrefix:n.widthClassPrefix,widthMinClassPrefix:n.widthMinClassPrefix,onOnClickTr:so,onOnHoverIn:$t,onOnHoverOut:Ft},e.createSlots({_:2},[e.renderList(q.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex})])})),e.renderList(Z.value,ge=>({name:ge,fn:e.withCtx(Ee=>[e.renderSlot(re.$slots,ge,{data:Ee.data,trIndex:Ee.trIndex,trElasticInx:Ee.trElasticInx})])}))]),1032,["width","fixedRightIndex","columns","list","disabled","isOrder","selectValue","hoverIndex","hoverElasticIndex","isUseScrollX","colspanCount","isRunLoading","isShowRadio","isShowCheckbox","isElastic","elasticOpen","elasticLoading","elasticType","elasticData","trIntervalNum","isStriped","emptyText","isInlineWidth","widthClassPrefix","widthMinClassPrefix"])],4)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],4),n.isScrollX&&T.value.length>0&&x.isShow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isScrollXBottom?(e.openBlock(),e.createElementBlock("div",{key:0,class:"table-fixed-column-scrollX",style:e.normalizeStyle({bottom:R.value?"-1px":"1px"})},[e.createVNode(fn,{isShowLeft:U.value,isShowRight:Q.value,leftWidth:f.leftWidth,centerWidth:f.centerWidth,rightWidth:f.rightWidth,isShowCorner:A.value,isShowCover:!1,cornerType:"right-bottom",onOnScrollX:ka,ref_key:"refElBodyFixedScrollX",ref:V},null,8,["isShowLeft","isShowRight","leftWidth","centerWidth","rightWidth","isShowCorner"])],4)):(e.openBlock(),e.createElementBlock("div",Ag,[e.createElementVNode("div",{style:e.normalizeStyle({height:`${Xa}px`})},null,4)]))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2),n.isPaginate&&T.value.length>0?(e.openBlock(),e.createElementBlock("div",Lg,[fe[1]||(fe[1]=e.createElementVNode("div",null,null,-1)),e.createVNode(ra,{currentPage:C.pages,limitValue:C.limit,limitData:n.paginateLimitData,isShowLimit:n.isPaginateLimit,totalCount:G.value,disabled:n.disabled||w.isRunLoading,onOnChange:Ti},null,8,["currentPage","limitValue","limitData","isShowLimit","totalCount","disabled"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))]),w.isRunLoading?(e.openBlock(),e.createElementBlock("div",$g,[e.createElementVNode("div",Fg,[e.createElementVNode("div",{class:"table-load-head",style:e.normalizeStyle(ce.value)},null,4),e.createElementVNode("div",{class:e.normalizeClass({"table-load-body":!0,"table-load-bg-gray":n.isLoading})},[e.createVNode(Gt,{isLoadIng:n.isLoading,size:"xxl",theme:n.loadTheme,color:n.loadColor||void 0},null,8,["isLoadIng","theme","color"])],2)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],10,Bg))}}),Ug=["id"],zg={class:"tableedit-table table-base"},di=e.defineComponent({name:"ClTableEdit",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(n,{expose:l}){const a=n,t=`tableedit-${o.getRandom(5)}`,i=a.id,r=e.useSlots(),d=e.computed(()=>o.isArray(a.list)?a.list:[]),u=e.computed(()=>(o.isArray(a.columns)?a.columns:[]).filter(h=>o.isObject(h)&&o.isNonEmptyString(h.data)&&h.visible!==!1)),s=e.computed(()=>o.getJsonMerge({"panel-table-edit":!0},me.getClassNameJson(a.className))),c=h=>{const y={};return o.isEmpty(h.width)||(y[`width-${h.width}`]=!0),o.getJsonMerge(y,me.getClassNameJson(h.className))},m=h=>!o.isEmpty(h.data)&&!!r[`td_${h.data}`],p=(h,y)=>{const E=h?h[y.data]:void 0;return o.isEmpty(E)||o.getTypeof(E)==="object"?"":E};return l({getData:()=>d.value}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(i),class:e.normalizeClass(s.value)},[e.createElementVNode("table",zg,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(E,L)=>(e.openBlock(),e.createElementBlock("th",{key:`${t}-th-${E.data}-${L}`,class:e.normalizeClass(c(E))},e.toDisplayString(E.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(E,L)=>(e.openBlock(),e.createElementBlock("tr",{key:`${t}-tr-${L}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,I)=>(e.openBlock(),e.createElementBlock("td",{key:`${t}-td-${B.data}-${I}`,class:e.normalizeClass(c(B))},[m(B)?e.renderSlot(h.$slots,`td_${B.data}`,{key:0,data:E,col:B,trIndex:L}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(p(E,B)),1)],64))],2))),128))]))),128))])])],10,Ug))}}),Jg=["id"],Kg=["innerHTML"],mi=e.defineComponent({name:"ClTableSimple",__name:"Index",props:{id:String,className:String,columns:{type:Array,default:()=>[]},list:{type:Array,default:()=>[]}},setup(n){const l=n,a=`t-${o.getRandom(5)}`,t=l.id,i=e.computed(()=>o.isArray(l.list)?l.list:[]),r=e.computed(()=>o.isArray(l.columns)?l.columns.filter(p=>o.isObject(p)&&!o.isArray(p)):[]),d=e.computed(()=>o.getJsonMerge({"panel-table-simple":!0,"table-base":!0},me.getClassNameJson(l.className))),u=(p,g)=>p?p[g.data]:void 0,s=p=>{const g={};return o.isEmpty(p.width)||(g[`width-${p.width}`]=!0),o.getJsonMerge(g,me.getClassNameJson(p.className))},c=(p,g)=>{const h=u(p,g);return o.isEmpty(h)||o.getTypeof(h)==="object"?"":h},m=(p,g)=>{const h=u(p,g);return o.isHtmlPair(h)};return(p,g)=>(e.openBlock(),e.createElementBlock("table",{id:e.unref(t),class:e.normalizeClass(d.value)},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(h,y)=>(e.openBlock(),e.createElementBlock("th",{key:`${a}-th-${y}`,class:e.normalizeClass(s(h))},e.toDisplayString(h.title),3))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(h,y)=>(e.openBlock(),e.createElementBlock("tr",{key:`${a}-tr-${y}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(E,L)=>(e.openBlock(),e.createElementBlock("td",{key:`${a}-td-${L}`,class:e.normalizeClass(s(E))},[m(h,E)?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:c(h,E)},null,8,Kg)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c(h,E)),1)],64))],2))),128))]))),128))])],10,Jg))}}),Wg=["id"],jg={key:0},Yg=["id","aria-selected","aria-controls","tabindex","onClick","onKeydown"],qg=["onClick"],Xg=["id","aria-labelledby"],pi=e.defineComponent({name:"ClTabs",__name:"Index",props:{id:String,className:{type:String,default:""},classContent:{type:String,default:""},list:{type:Array,default:()=>[]},theme:{type:String,default:"default",validator:n=>["default","line","card","button"].indexOf(n)!==-1},active:String,disabledData:{type:Array,default:()=>[]},hideData:{type:Array,default:()=>[]},prefixName:String,isShowRemove:{type:Boolean,default:!1},removeReserve:{type:Number,default:1},isShowAdd:{type:Boolean,default:!1},addBtnText:String,tabMinNum:{type:Number,default:1},tabMaxNum:{type:Number,default:0},isHideTabHead:{type:Boolean,default:!1},getAddInfo:Function,checkChangeBefore:Function},emits:{onChange:(n,l)=>!0,onInit:(n,l,a)=>!0,onAdd:n=>!0,onRemove:n=>!0,onErrMsg:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("common");const u=e.useTemplateRef("refElNavUl"),s=e.reactive({keyIndex:`${o.getRandom(8)}`,showId:t.active}),c=e.ref([]),m=e.reactive({left:0,width:0}),p=e.reactive({isShow:!1,width:""}),g={currentTabsAutoIndex:0,isFirstInit:!1},h=e.ref(!1),y=`tabs-${o.getRandom(5)}`,E=t.id,L=e.computed(()=>{const v={"panel-tabs":!0};return v[`tabs-${t.theme}`]=!0,o.getJsonMerge(v,me.getClassNameJson(t.className))}),B=e.computed(()=>{const v={"tabs-content":!0};return o.getJsonMerge(v,me.getClassNameJson(t.classContent))}),I=()=>{const v=[],F=s.showId?s.showId.toString():"";let _={};c.value.forEach(O=>{const q=o.getJsonClone(O);O.tabId===F&&(_=q),v.push(q)}),i("onInit",s.showId||"",_,v)},M=(v,F)=>{e.nextTick(()=>{i("onChange",v,F)})},N=v=>{i("onAdd",v)},b=v=>{i("onRemove",v)},V=v=>{i("onErrMsg",v)},w=v=>{if(t.theme==="line"){const F=document.getElementById(`tab_${s.keyIndex}_${v}`);let _=0,O=0;F&&F.parentElement&&(_=F.parentElement.offsetLeft+10,O=F.parentElement.offsetWidth-20),m.left=_,m.width=O}},T=()=>{if(u.value){const v=u.value.offsetWidth;let F=0;const _=u.value.children,O=_.length;for(let X=0;X<O;X++){const Z=_[X];Z.classList.contains("tab-indicator")||(X===0&&(F+=Z.offsetLeft),F+=Z.offsetWidth)}const q=F>v;p.isShow=q,p.width=`${F}px`}},C=(v,F)=>{const _=o.getJsonClone(v),O=o.isNonEmptyString(_.id)?_.id:"-1";if(_.tabId=O==="-1"?o.getRandom(8):O,_.value=O,o.isEmpty(_.name)){const q=o.isNonEmptyString(t.prefixName)?t.prefixName:"";_.name=q+F.toString()}return _},D=v=>{const F=[];return o.isArray(v)&&v.forEach((_,O)=>{o.isObject(_)&&F.push(C(_,O+1))}),F},J=(v,F)=>{let _="";return F&&!o.isEmpty(F)&&v.forEach(O=>{O.tabId===F&&(_=F)}),o.isEmpty(_)&&v.length>0&&(_=v[0].tabId),_},ne=()=>{const v=D(t.list);c.value=v,g.currentTabsAutoIndex=v.length,e.nextTick(()=>{s.showId=J(v,t.active||""),T(),!g.isFirstInit&&v.length>0&&(g.isFirstInit=!0,I())})};e.onMounted(()=>{e.nextTick(()=>{ne()})}),e.onBeforeUnmount(()=>{}),e.watch([()=>t.active,()=>t.list],()=>{ne()}),e.watch(()=>s.showId,(v,F)=>{v!==F&&w(s.showId||"")});const K=()=>c.value.filter(v=>t.disabledData.indexOf(v.tabId)===-1&&t.hideData.indexOf(v.tabId)===-1),P=(v,F)=>{const _=K(),O=_.findIndex(X=>X.tabId===s.showId);let q=O;if(v.key==="ArrowLeft")v.preventDefault(),q=O>0?O-1:_.length-1;else if(v.key==="ArrowRight")v.preventDefault(),q=O<_.length-1?O+1:0;else if(v.key==="Home")v.preventDefault(),q=0;else if(v.key==="End")v.preventDefault(),q=_.length-1;else return;q!==O&&_[q]&&x(_[q])},x=async v=>{if(!h.value&&t.disabledData.indexOf(v.tabId)===-1&&v.tabId!==s.showId){let F=!0;if(t.checkChangeBefore){h.value=!0;try{F=await t.checkChangeBefore(v.tabId,s.showId),F=o.isBoolean(F)?F:!0}catch(_){F=!0,V(`标签切换校验异常: ${String(_)}`)}finally{h.value=!1}}F&&(s.showId=v.tabId,M(v.tabId,v))}},A=v=>{if(t.disabledData.indexOf(v.tabId)===-1&&c.value.length>t.tabMinNum){const F=[];c.value.forEach(_=>{_.tabId!==v.tabId&&F.push(_)}),c.value=F,e.nextTick(()=>{T(),s.showId=J(F,s.showId||"")}),b(o.getJsonClone(v))}else V(`${r.value.checkAddMin}${t.tabMinNum}${r.value.count}`)},f=()=>{if(c.value.length<t.tabMaxNum||t.tabMaxNum<=0){let v={};if(t.getAddInfo){try{v=t.getAddInfo()}catch(q){v={},V(`新增标签数据获取异常: ${String(q)}`)}o.isObject(v)||(v={})}const F=o.isEmpty(v.name)?g.currentTabsAutoIndex+1:0,_=C(v,F);o.isEmpty(v.name)&&(g.currentTabsAutoIndex=F);const O=o.getListClone(c.value);O.push(_),c.value=O,e.nextTick(()=>{T(),s.showId=_.tabId,N(_)})}else V(`${r.value.checkAddMax}${t.tabMaxNum}${r.value.count}`)},S=v=>{const F=v.target;u.value&&F&&(u.value.scrollLeft=F.scrollLeft)};return l({getValue:()=>s.showId}),(v,F)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value),id:e.unref(E)},[n.isHideTabHead?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",jg,[e.createElementVNode("ul",{class:"tabs-nav",ref_key:"refElNavUl",ref:u,role:"tablist"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:`${y}-nav-${_.tabId}`,class:e.normalizeClass({"tab-nav":!0,"tab-active":_.tabId===s.showId,"tab-disabled":n.disabledData.indexOf(_.tabId)>-1||h.value})},[e.createElementVNode("a",{id:`tab_${s.keyIndex}_${_.tabId}`,class:"nav-link",href:"javascript:",role:"tab","aria-selected":_.tabId===s.showId,"aria-controls":`panel_${s.keyIndex}_${_.tabId}`,tabindex:_.tabId===s.showId?0:-1,onClick:O=>x(_),onKeydown:O=>P(O)},[e.renderSlot(v.$slots,`nav_${_.tabId}`,{data:_},()=>[e.createTextVNode(e.toDisplayString(_.name),1)])],40,Yg),n.isShowRemove&&c.value.length>n.removeReserve&&c.value.length>n.tabMinNum&&n.disabledData.indexOf(_.tabId)===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:"tab-remove",onClick:O=>A(_)},[e.createVNode(ke,{name:"close"})],8,qg)):e.createCommentVNode("",!0)],2)),[[e.vShow,n.hideData.indexOf(_.tabId)===-1]])),128)),n.isShowAdd?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass({"tab-add":!0,"tab-disabled":c.value.length>=n.tabMaxNum&&n.tabMaxNum>0})},[e.createElementVNode("a",{class:"nav-link",href:"javascript:",onClick:f},[e.renderSlot(v.$slots,"nav_add",{},()=>[e.createTextVNode(e.toDisplayString(n.addBtnText||e.unref(r).add),1)])])],2)):e.createCommentVNode("",!0),n.theme==="line"?(e.openBlock(),e.createElementBlock("li",{key:1,class:"tab-indicator",style:e.normalizeStyle({left:`${m.left}px`,width:`${m.width}px`})},null,4)):e.createCommentVNode("",!0)],512),p.isShow?(e.openBlock(),e.createBlock(fn,{key:0,isShowLeft:!1,isShowRight:!1,centerWidth:p.width,onOnScrollX:S},null,8,["centerWidth"])):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:e.normalizeClass(B.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:`${y}-content-${_.tabId}`,id:`panel_${s.keyIndex}_${_.tabId}`,class:e.normalizeClass({"tab-content":!0,"tab-active":_.tabId===s.showId}),role:"tabpanel","aria-labelledby":`tab_${s.keyIndex}_${_.tabId}`,tabindex:0},[e.renderSlot(v.$slots,`content_${_.tabId}`,{data:_})],10,Xg)),[[e.vShow,n.hideData.indexOf(_.tabId)===-1]])),128))],2)],10,Wg))}}),Gg={class:"weekhour-quick"},Qg=e.defineComponent({name:"ClWeekHourQuick",__name:"Quick",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onClick:n=>!0,onHoverIn:n=>!0,onHoverOut:n=>!0},setup(n,{emit:l}){const a=n,t=l,{optPageLanguage:i,getPageLanguage:r}=Le();r("weekHour");const d=`weekhour-${o.getRandom(5)}`,u=e.ref([]),s=I=>{t("onClick",I)},c=I=>{t("onHoverIn",I)},m=I=>{t("onHoverOut",I)},p=()=>{const I=[{id:"dawn",name:i.value.dawn},{id:"morning",name:i.value.morning},{id:"noon",name:i.value.noon},{id:"afternoon",name:i.value.afternoon},{id:"evening",name:i.value.evening},{id:"night",name:i.value.night}];a.isOneDay||I.push({id:"workday",name:i.value.weekday},{id:"restday",name:i.value.restDay}),u.value=I};(()=>{p()})(),e.watch(()=>[a.isOneDay,i.value],()=>{m(""),p()});const h=I=>{s(I.id)},y=I=>{c(I.id)},E=I=>{m(I.id)},L=()=>{s("all")},B=()=>{s("clean")};return(I,M)=>(e.openBlock(),e.createElementBlock("div",Gg,[e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,N=>(e.openBlock(),e.createBlock(Nt,{key:`${d}-${N.id}`,disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:b=>h(N),onOnHoverIn:b=>y(N),onOnHoverOut:b=>E(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["disabled","onOnClick","onOnHoverIn","onOnHoverOut"]))),128))]),e.createElementVNode("div",null,[e.createVNode(Nt,{disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).common.checkboxAll),1)]),_:1},8,["disabled"]),e.createVNode(Nt,{disabled:n.disabled,isLight:!0,isHideUnderline:!1,onOnClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).common.clearEmpty),1)]),_:1},8,["disabled"])])]))}}),Zg={class:"weekhour-picker"},ev={key:0,class:"weekhour-interval"},tv=["onMouseenter","onClick","data-hour"],nv=["onMouseenter","onClick","data-week"],ov={key:0,class:"weekhour-interval"},av=["onMouseenter","onClick","data-week","data-hour","aria-selected"],lv=e.defineComponent({name:"ClWeekHourPicker",__name:"Picker",props:{disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1}},emits:{onChange:n=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,{optPageLanguage:r,getPageLanguage:d}=Le();d("weekHour");const u=e.inject("$WeekHourTop");u||we.warn("ClWeekHourPicker","依赖注入 $WeekHourTop 缺失,使用默认周时配置渲染");const s=u||{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],getJsonConvertArr:R=>R},c=e.useTemplateRef("refElTable"),m=`weekhour-${o.getRandom(5)}`,p=e.reactive({hoverHour:[],hoverWeek:[],hoverItem:[],hoverItemAssist:[],selectList:[]}),g=e.ref([]),h=e.ref(["0","1","2","3","4","5","6","7","","8","9","10","11","","12","13","14","","15","16","17","","18","19","","20","21","22","23"]),y={week:[],hour:s.hour,prevValue:[],isMouseMoveStart:!1,isMouseMoveIng:!1,moveStart:{}};let E,L;const B=e.ref(null),I=()=>{E&&(clearTimeout(E),E=void 0),E=setTimeout(()=>{const{selectList:R}=p;o.isEqualArr(y.prevValue,R)||(y.prevValue=o.getArrClone(R),i("onChange",y.prevValue))},500)},M=()=>{const R=t.isOneDay?[{id:"1",name:r.value.daily}]:[{id:"1",name:r.value.monday},{id:"2",name:r.value.tuesday},{id:"3",name:r.value.wednesday},{id:"4",name:r.value.thursday},{id:"5",name:r.value.friday},{id:"6",name:r.value.saturday},{id:"7",name:r.value.sunday}],U=t.isOneDay?R.map(Q=>parseInt(Q.id)):s.week;y.week=U,g.value=R},N=R=>{let U=[],Q=[],ee=[];return o.isEmpty(R)?{week:U,hour:Q,item:ee}:(Object.keys(R).forEach(Y=>{Array.isArray(R[Y])&&(U.push(Y.toString()),R[Y].forEach(H=>{H!=null&&o.isFinite(H)&&/^(0|[1-9]\d*)$/.test(H.toString())&&(Q.push(H.toString()),ee.push(`${Y}-${H}`))}))}),U=o.getArrUnique(U),Q=o.getArrUnique(Q),ee=o.getArrUnique(ee),{week:U,hour:Q,item:ee})},b=R=>{const U=N(R);p.hoverWeek=U.week,p.hoverHour=U.hour,p.hoverItem=U.item,p.hoverItemAssist=[]},V=()=>{p.hoverWeek=[],p.hoverHour=[],p.hoverItem=[],p.hoverItemAssist=[]},w=R=>{const U=N(R),Q=[];U.week.forEach(ee=>{y.hour.forEach(Y=>{Q.push(`${ee}-${Y}`)})}),U.hour.forEach(ee=>{y.week.forEach(Y=>{Q.push(`${Y}-${ee}`)})}),p.hoverItemAssist=o.getArrUnique(Q)},T=(R,U=!0)=>{if(o.isEmpty(R))p.selectList=[];else{const{selectList:Q}=p,Y=N(R).item,H=[],te=[];Y.forEach(z=>{o.isExistValue(Q,z)?te.push(z):H.push(z)});const $=te.length===Y.length&&te.length>0;p.selectList=$?o.getArrRemoveById(Q,Y):Q.concat(H)}U&&I()},C=R=>{if(!R)return null;const U={isHour:!1,isWeek:!1,isItem:!1,isValidArea:!1,isValidMove:!1,isGroup:!1,hour:-1,week:-1,x:-1,width:-1};let Q;R.target?(Q=R.target,U.x=R.pageX):R.parentElement&&(Q=R);let ee;if(c.value&&c.value.contains(Q)){U.isValidArea=!0;const Y=(Q.tagName||"").toLocaleLowerCase();ee=Y==="th"||Y==="td"?Q:Q.parentElement;const H=ee.className.split(" ");if(U.isHour=H.indexOf("weekhour-hour")>-1,U.isWeek=H.indexOf("weekhour-week")>-1,U.isItem=H.indexOf("weekhour-item")>-1,U.isEmpty=H.indexOf("weekhour-empty")>-1,U.isInterval=H.indexOf("weekhour-interval")>-1,U.isInterval&&(U.width=ee.clientWidth),U.isHour&&(U.type="hour",U.isGroup=!0),U.isWeek&&(U.type="week",U.isGroup=!0),U.isItem&&(U.type="item",U.isGroup=!1),U.isHour||U.isWeek||U.isItem){U.isValidMove=!0;const te=ee.dataset;let $,z;U.isHour?($=parseInt(te.hour),z=-1):U.isWeek?($=-1,z=parseInt(te.week)):U.isItem&&($=parseInt(te.hour),z=parseInt(te.week)),U.hour=$,U.week=z}}return U.el=ee,U},D=R=>{const U=C(R);if(U&&U.isInterval){const Q=me.getPrev(U.el),ee=me.getNext(U.el);U.prevInfo=C(Q),U.nextInfo=C(ee)}return U},J=(R,U)=>{if(R.isEmpty&&U.isEmpty)return null;R.isEmpty&&(R.type=U.type),U.isEmpty&&(U.type=R.type);const Q=23,ee=y.week.length,Y={x:R.hour,y:R.week},H={x:U.hour,y:U.week};if(R.isGroup||U.isGroup){if(R.type==="week")switch(U.type){case"week":Y.x=0,H.x=Q;break;case"item":Y.x=0;break;case"hour":Y.x=0,H.y=1;break}else if(R.type==="hour")switch(U.type){case"hour":Y.y=1,H.y=ee;break;case"item":Y.y=1;break;case"week":Y.y=1,H.x=0;break}else if(R.type==="item")switch(U.type){case"hour":H.y=1;break;case"week":H.x=0;break}}let te,$,z,ce;H.x>=Y.x?(te=Y.x,$=H.x):(te=H.x,$=Y.x),H.y>=Y.y?(z=Y.y,ce=H.y):(z=H.y,ce=Y.y);let de;(te>-1||$>-1)&&(te===-1&&(te=0),de=o.getArrByMinMax(te,$));let ie;return(z>-1||ce>-1)&&(z===-1&&(z=1),ie=o.getArrByMinMax(z,ce)),!o.isUndefined(de)&&!o.isUndefined(ie)?{x:de,y:ie}:null},ne=R=>{let U={},Q={};const ee=y.moveStart.isInterval,Y=R.isInterval;if(ee||Y){const H=y.moveStart.x,te=R.x;if(ee&&!Y)Q=R,H>te?U=y.moveStart.prevInfo||{}:te>H&&(U=y.moveStart.nextInfo||{});else if(!ee&&Y)U=y.moveStart,H>te?Q=R.nextInfo||{}:te>H&&(Q=R.prevInfo||{});else if(ee&&Y){const $=y.moveStart.width;Math.abs(H-te)>$&&(H>te?(U=y.moveStart.prevInfo||{},Q=R.nextInfo||{}):te>H&&(U=y.moveStart.nextInfo||{},Q=R.prevInfo||{}))}}else U=y.moveStart,Q=R;return{startInfo:U,endInfo:Q}},K=R=>{if(!y.isMouseMoveStart){y.isMouseMoveStart=!0;const U=D(R);if(U.isValidArea&&(V(),y.moveStart=U,U.isValidMove)){const Q=U.week===-1?y.week:[U.week],ee=U.hour===-1?y.hour:[U.hour];b(s.getJsonConvertArr({week:Q,hour:ee}))}}},P=R=>{if(y.isMouseMoveStart){y.isMouseMoveIng=!0;const U=D(R);if(U.isValidArea){V();const Q=ne(U);if(!o.isEmpty(Q.startInfo)&&!o.isEmpty(Q.endInfo)){const ee=J(Q.startInfo,Q.endInfo);if(ee){const Y=s.getJsonConvertArr({week:ee.y,hour:ee.x});b(Y)}}}}},x=R=>{if(y.isMouseMoveIng){V();const U=D(R);if(U.isValidArea){const Q=ne(U);if(!o.isEmpty(Q.startInfo)&&!o.isEmpty(Q.endInfo)){const ee=J(Q.startInfo,Q.endInfo);if(ee&&!t.disabled){const Y=s.getJsonConvertArr({week:ee.y,hour:ee.x});T(Y)}}}}y.isMouseMoveStart=!1,y.moveStart={},L&&(clearTimeout(L),L=void 0),L=setTimeout(()=>{y.isMouseMoveIng=!1},50)},A=()=>{const R={start(U){let Q=!1;return t.disabled||(Q=!0,K(U)),Q},ing:U=>{P(U)},end:U=>{x(U)}};B.value=new Ye.Drag(c.value,R)};(()=>{M()})(),e.onMounted(()=>{e.nextTick(()=>{A()})}),e.onBeforeUnmount(()=>{B.value&&(B.value.end(),B.value=null),E&&(clearTimeout(E),E=void 0),L&&(clearTimeout(L),L=void 0)}),e.watch(()=>[t.isOneDay,r.value],([R,U],[Q,ee])=>{M(),R!==Q&&(p.selectList=[],I())});const S=R=>{if(!y.isMouseMoveStart&&!t.disabled){const U=s.getJsonConvertArr({week:y.week,hour:[R]});b(U)}},k=()=>{y.isMouseMoveStart||V()},v=R=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const U=s.getJsonConvertArr({week:y.week,hour:[R]});T(U)}},F=R=>{if(!y.isMouseMoveStart&&!t.disabled){const U={};U[R]=y.hour,b(U)}},_=()=>{y.isMouseMoveStart||V()},O=R=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const U={};U[R]=y.hour,T(U)}},q=(R,U)=>{if(!y.isMouseMoveStart&&!t.disabled){const Q={};Q[R]=[U],b(Q),w(Q)}},X=()=>{y.isMouseMoveStart||V()},Z=(R,U)=>{if(!y.isMouseMoveStart&&!y.isMouseMoveIng&&!t.disabled){const Q={};Q[R]=[U],T(Q)}};return l({getWeekArr:()=>o.getArrClone(y.week),setSelected:(R,U=!1)=>{if(!y.isMouseMoveStart){const Q=[];N(R).item.forEach(Y=>{o.isExistValue(Q,Y)||Q.push(Y)}),p.selectList=Q,U?I():y.prevValue=o.getArrClone(Q)}},setHoverIn:R=>{!y.isMouseMoveStart&&!t.disabled&&b(R)},setHoverOut:()=>{y.isMouseMoveStart||V()}}),(R,U)=>(e.openBlock(),e.createElementBlock("div",Zg,[e.createElementVNode("table",{ref_key:"refElTable",ref:c,class:"table-base"},[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[U[0]||(U[0]=e.createElementVNode("th",{class:"weekhour-empty"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Q,ee)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-hour-${ee}`},[Q===""?(e.openBlock(),e.createElementBlock("th",ev)):(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass({"weekhour-hour":!0,"weekhour-hour-hover":p.hoverHour.indexOf(Q)>-1}),onMouseenter:Y=>S(Q),onMouseleave:k,onClick:Y=>v(Q),"data-hour":Q},e.toDisplayString(Q),43,tv))],64))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(Q,ee)=>(e.openBlock(),e.createElementBlock("tr",{key:`${m}-week-${Q.id}-${ee}`},[e.createElementVNode("td",{class:e.normalizeClass({"weekhour-week":!0,"weekhour-week-hover":p.hoverWeek.indexOf(Q.id)>-1}),onMouseenter:Y=>F(Q.id),onMouseleave:_,onClick:Y=>O(Q.id),"data-week":Q.id},e.toDisplayString(Q.name),43,nv),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Y,H)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${m}-week-${ee}-hour-${H}`},[Y===""?(e.openBlock(),e.createElementBlock("td",ov)):(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass({"weekhour-item":!0,"weekhour-item-hover":p.hoverItem.indexOf(`${Q.id}-${Y}`)>-1,"weekhour-item-assist":p.hoverItemAssist.indexOf(`${Q.id}-${Y}`)>-1,"weekhour-selected":p.selectList.indexOf(`${Q.id}-${Y}`)>-1}),onMouseenter:te=>q(Q.id,Y),onMouseleave:X,onClick:te=>Z(Q.id,Y),"data-week":Q.id,"data-hour":Y,"aria-selected":p.selectList.indexOf(`${Q.id}-${Y}`)>-1},[...U[1]||(U[1]=[e.createElementVNode("i",null,null,-1)])],42,av))],64))),128))]))),128))])],512)]))}}),iv={class:"weekhour-tips"},sv={class:"weekhour-tips-title"},rv={class:"weekhour-tips-title"},cv=e.defineComponent({name:"ClWeekHourTip",__name:"Tips",setup(n){const{optPageLanguage:l,getPageLanguage:a}=Le();return a("weekHour"),(t,i)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createElementVNode("span",null,[i[0]||(i[0]=e.createElementVNode("span",{class:"weekhour-item weekhour-selected"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",sv,e.toDisplayString(e.unref(l).selected),1)]),e.createElementVNode("span",null,[i[1]||(i[1]=e.createElementVNode("span",{class:"weekhour-item"},[e.createElementVNode("i")],-1)),e.createElementVNode("span",rv,e.toDisplayString(e.unref(l).selectedNot),1)])]))}}),uv=["id"],fi=e.defineComponent({name:"ClWeekHour",__name:"Index",props:{id:String,value:String,className:String,disabled:{type:Boolean,default:!1},isOneDay:{type:Boolean,default:!1},isPlaintext:{type:Boolean,default:!1}},emits:{"update:value":n=>!0,"update:modelValue":n=>!0,onChange:n=>!0,onInit:()=>!0},setup(n,{expose:l,emit:a}){const t=n,i=a,r=t.id,d=e.useTemplateRef("refElPicker"),u=e.reactive({valueOut:""}),s={week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],quick:{dawn:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7]},morning:{week:[1,2,3,4,5,6,7],hour:[8,9,10,11]},noon:{week:[1,2,3,4,5,6,7],hour:[12,13,14]},afternoon:{week:[1,2,3,4,5,6,7],hour:[15,16,17]},evening:{week:[1,2,3,4,5,6,7],hour:[18,19]},night:{week:[1,2,3,4,5,6,7],hour:[20,21,22,23]},workday:{week:[1,2,3,4,5],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},restday:{week:[6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},all:{week:[1,2,3,4,5,6,7],hour:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]},clean:{week:[],hour:[]}}},c=e.computed(()=>{let D={"panel-week-hour":!0,"weekhour-disabled":t.disabled||t.isPlaintext,"cl-plaintext-static":t.isPlaintext};return D=o.getJsonMerge(D,me.getClassNameJson(t.className)),D}),m=D=>{i("update:value",D),i("update:modelValue",D),i("onChange",D)},p=()=>{e.nextTick(()=>{i("onInit")})},g=D=>{let J={};const ne=Object.keys(D);if(!o.isEmpty(ne))if(ne.length===2&&o.isExistValue(ne,"week")&&o.isExistValue(ne,"hour")&&o.isArray(D.week)&&o.isArray(D.hour)){const K=L();D.week.forEach(P=>{K.indexOf(P)>-1&&(J[P.toString()]=D.hour)})}else J=o.getJsonClone(D);return J},h=D=>{if(!/^(0|[1-9]\d*)$/.test(D))return[];const J=parseInt(D);if(J>16777215)return[];const ne=J.toString(2),K=[];return o.getFillZero(ne,24).split("").reverse().forEach((P,x)=>{parseInt(P)===1&&x<24&&K.push(x)}),K},y=D=>{const J={},ne=D.split(",");return ne.length>7&&(ne.length=7),ne.forEach((K,P)=>{J[(P+1).toString()]=h(K)}),J},E=D=>{let J={};o.isNonEmptyString(D)&&(J=y(D)),d.value&&d.value.setSelected(J)},L=()=>{let D=s.week;return t.isOneDay&&d.value&&(D=d.value.getWeekArr()),D},B=D=>{const J={};D.forEach(x=>{const A=x.split("-"),f=A[0],S=A[1];o.isExistJsonKey(J,f)||(J[f]=[]);const k=parseInt(S);o.isFinite(k)&&J[f].push(k)});const ne={};L().forEach(x=>{ne[x.toString()]=s.hour.map(()=>0)});for(const[x,A]of Object.entries(J))ne[x]&&o.getArrUnique(A).forEach(f=>{ne[x][f]=1});const P=[];return Object.keys(ne).forEach(x=>{const A=parseInt(o.getArrClone(ne[x]).reverse().join(""),2);P.push(A)}),P.join(",")},I=()=>{u.valueOut=o.isNonEmptyString(t.value)?t.value:"",E(t.value),p()};e.onMounted(()=>{e.nextTick(()=>{I()})}),e.watch(()=>t.value,D=>{const J=o.isNonEmptyString(D)?D:"";J!==u.valueOut&&(u.valueOut=J,E(J))}),e.watch(()=>t.disabled,D=>{D&&d.value&&d.value.setHoverOut()});const M=D=>{if(!t.disabled&&o.isExistJsonKey(s.quick,D)){const J=g(s.quick[D]);d.value&&d.value.setSelected(J,!0)}},N=D=>{if(o.isExistJsonKey(s.quick,D)){const J=g(s.quick[D]);d.value&&d.value.setHoverIn(J)}},b=D=>{d.value&&d.value.setHoverOut()},V=D=>{if(!Array.isArray(D))return;const J=B(D);u.valueOut=J,m(J)};return e.provide("$WeekHourTop",{week:s.week,hour:s.hour,getJsonConvertArr:g}),l({getValue:()=>u.valueOut,getValueData:()=>o.isNonEmptyString(u.valueOut)?y(u.valueOut):{},setValue:D=>{const J=o.isNonEmptyString(D)?D:"";u.valueOut=J,E(J)}}),(D,J)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(r),class:e.normalizeClass(c.value)},[e.createVNode(Qg,{disabled:n.disabled||n.isPlaintext,isOneDay:n.isOneDay,onOnClick:M,onOnHoverIn:N,onOnHoverOut:b},null,8,["disabled","isOneDay"]),e.createVNode(lv,{ref_key:"refElPicker",ref:d,disabled:n.disabled||n.isPlaintext,isOneDay:n.isOneDay,onOnChange:V},null,8,["disabled","isOneDay"]),e.createVNode(cv)],10,uv))}});function dv(n,l){switch(n){case"select":return o.isBoolean(l)?l:!1;case"radio":return!1;case"checkbox":case"selectTag":return!0;case"inputTag":return o.isBoolean(l)?l:!1;default:return!1}}function Qa(n,l){if(n!==!0)return"";let a="int";if(o.isNumber(l)){const t=Number.parseInt(String(l),10);if(t>0)switch(t.toString()){case"2":a="float2";break;case"3":a="float3";break;default:a="float"}}return a}const mv={class:"xeditable-body"},pv={class:"xeditable-form"},fv={key:1,class:"xeditable-element"},hv=["id"],gv={key:0,class:"xeditable-errmsg"},hi=e.defineComponent({name:"ClXEditable",__name:"Index",props:{id:String,value:[String,Number],className:{type:String,default:""},classNameLabel:{type:String,default:""},type:{type:String,required:!0,validator:n=>["input","inputNumber","select","selectCascade","textarea","radio","checkbox","selectTag","inputTag","dateTime","slider","customHtml"].indexOf(n)!==-1},label:String,subUnitOptions:{type:Object,default:()=>({})},subUnitList:{type:Array,default:()=>[]},isUseOnSubmitCheck:{type:Boolean,default:!1},appendContainer:{type:String,default:""},isCheckValidate:{type:Boolean,default:!1},validateRules:{type:Array,default:()=>[{r:"required"}]},isUseEllipsis:{type:Boolean,default:!1},classNameEllipsis:{type:String,default:""},isAutoTooltip:{type:Boolean,default:!0},clickEditPoint:{type:String,default:"value",validator:n=>["value","icon"].indexOf(n)!==-1},isShowEditValue:{type:Boolean,default:!0},isShowEditIcon:{type:Boolean,default:!1},editIcon:{type:String,default:"edit"},isSubmitCleanValue:{type:Boolean,default:!1},submitCallback:Function,checkValidateCallback:Function},emits:["onSubmit","onChangeOpen"],setup(n,{expose:l,emit:a}){const t=n,i=a,r=e.useAttrs(),d=e.useSlots(),{optPageLanguage:u,getPageLanguage:s}=Le();s("xEditable");const c=e.useTemplateRef("refElDropdownLayer"),m=e.useTemplateRef("refElForm"),p=e.useTemplateRef("refElFormEdit"),g=e.useTemplateRef("refElSubmit"),h=e.useTemplateRef("refElCustom"),y=e.useTemplateRef("refElContent"),E=e.useTemplateRef("refElErrMsg"),L=t.id,B=e.reactive({keyIndex:`xeditable-${o.getRandom(8)}`,showText:"",subUnitValue:"",subUnitValueType:"",showMsg:"",isShowEmpty:!1,isBtnOperateCenter:!1}),I=e.ref({}),M=e.ref([]),N=e.reactive({status:0,startColor:"#FFFF80",endColor:"var(--cl-transparent, rgba(0, 0, 0, 0))"}),b={lastValue:"",runStep:"",isSubmitting:!1,submitValueDataSnapshot:null,isPendingHlight:!1,pendingValue:null,pendingOpt:null,hlightTimer:null,hlightTimer1:null,hlightTimer2:null,resizeEventCustomHtml:null,resizeEventErrMsg:null,resizeEventContent:null},V=e.computed(()=>{const{type:$}=t;return $==="input"||$==="inputNumber"||$==="select"}),w=e.computed(()=>!o.isUndefined(d.iconLabel)),T=e.computed(()=>{let $={"panel-x-editable":!0};return $=o.getJsonMerge($,me.getClassNameJson(t.className)),o.getStringByJson($," ")}),C=e.computed(()=>{const $=["xeditable-value"];return B.isShowEmpty&&$.push("xeditable-empty"),(t.isShowEditIcon||w.value)&&$.push("xeditable-edit-icon"),$.join(" ")}),D=e.computed(()=>{const $=["xeditable-value-label"],{clickEditPoint:z}=t;return z==="value"||B.isShowEmpty?$.push("dropdownLayer-arrow-anchorPoint"):$.push("xeditable-click-invalid"),$.join(" ")}),J=e.computed(()=>{const $=["xeditable-value-editIcon","dropdownLayer-arrow-anchorPoint"];return w.value&&$.push("xeditable-value-editIcon-slot"),$.join(" ")}),ne=e.computed(()=>{const $=["xeditable-ellipsis"];return $.push(t.classNameEllipsis),N.status===2&&$.push("xeditable-value-hlight"),$.join(" ")}),K=e.computed(()=>{const $=["xeditable-dropdown"];return $.push(`xeditable-dropdown-${t.type}`),$.join(" ")}),P=e.computed(()=>{const $={};return B.isBtnOperateCenter&&($["text-align"]="center"),$}),x=e.computed(()=>{const $={};switch(N.status){case 1:$["background-color"]=N.startColor;break;case 2:$["background-color"]=N.endColor;break}return $}),A=$=>{const z=me.getElementData(r);i("onSubmit",$,z)},f=$=>{e.nextTick(()=>{const z=me.getElementData(r);i("onChangeOpen",$,z)})},S=()=>{c.value&&c.value.setOpen(!1),g.value&&g.value.loadStop()},k=$=>{B.showMsg=o.isEmpty($)?"":$,e.nextTick(()=>{c.value&&c.value.calculationPosition()})},v=()=>dv(t.type,I.value.multiple),F=()=>{const $=o.getJsonClone(t.subUnitOptions);switch(t.type){case"input":{let z={isClean:!0};z=o.getJsonMerge(z,$);const ce=o.isBoolean(z.isNumber)?z.isNumber:!1;B.subUnitValueType=Qa(ce,z.decimal),I.value=z;break}case"inputNumber":{let z={isNumber:!0,isClean:!0};z=o.getJsonMerge(z,$);const ce=Qa(!0,z.decimal)||"int";B.subUnitValueType=ce,I.value=z;break}case"select":{let z={multiple:!1,placeholder:u.value.common.pleaseSelect};z=o.getJsonMerge(z,$),I.value=z;break}case"selectCascade":{let z={};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"textarea":{let z={isClean:!0};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"radio":{let z={isInline:!0,name:`${B.keyIndex}-radio`};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=z.isInline;break}case"checkbox":{let z={isInline:!1,name:`${B.keyIndex}-checkbox`};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=z.isInline;break}case"selectTag":{let z={type:"radio"};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"inputTag":{let z={multiple:!0,isAutofill:!0};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"dateTime":{let z={isDropdown:!1};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"slider":{let z={};z=o.getJsonMerge(z,$),I.value=z,B.isBtnOperateCenter=!0;break}case"customHtml":{B.isBtnOperateCenter=!0;break}}},_=($,z)=>{let ce=!1,de=!1;z&&(o.isUndefined(z.label)||(ce=!0),o.isUndefined(z.list)||(de=!0));let ie="",ae="",W="";switch(o.isString($)?W=$:o.isNumber($)&&o.isFinite($)&&$!==void 0&&(W=$.toString()),t.type){case"input":case"inputNumber":case"textarea":{if(!ce&&W&&!o.isEmpty(W))if((t.type==="inputNumber"||t.type==="input"&&o.isBoolean(I.value.isNumber)&&I.value.isNumber)&&o.isNumber(W)){const ue=B.subUnitValueType==="float"?I.value.decimal:"";ie=o.getValueByFormat(W,B.subUnitValueType,{decimalNum:ue})}else ie=W;ae=W;break}case"selectCascade":{if(!ce){const j=de?z.list:M.value,ue=o.isNonEmptyString(I.value.parentKey)?I.value.parentKey:"parentId",pe=o.isNonEmptyString(I.value.topParentValue)?I.value.topParentValue:"0";if(W&&!o.isEmpty(W)){const he={};o.isArray(j)&&j.forEach(xe=>{!o.isUndefined(xe)&&!o.isUndefined(xe.id)&&(he[xe.id.toString()]=xe)});const ye=[],Ce={};let be=W.toString();for(;!o.isEmpty(be)&&!o.isExistJsonKey(Ce,be)&&o.isExistJsonKey(he,be);){Ce[be]=!0;const xe=he[be];o.isEmpty(xe.name)?(o.isNumber(xe.name)||o.isString(xe.name))&&ye.push(xe.name.toString()):ye.push(xe.name),be=xe[ue]!==void 0&&xe[ue]!==null?xe[ue].toString():"",be===pe&&(be="")}ye.reverse(),ie=ye.join(" → ")}}ae=W;break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{const j=de?z.list:o.isArray(I.value.list)?I.value.list:M.value;if(!ce&&W&&!o.isEmpty(W))if(t.type==="inputTag")ie=W;else{const ue=v(),pe=[],he=ue?W.split(","):[W.toString()],ye=o.isArray(j)?j.filter(be=>!o.isUndefined(be)&&!o.isUndefined(be.id)):j,Ce=o.getJsonByList(ye);he.forEach(be=>{o.isExistJsonKey(Ce,be)&&pe.push(Ce[be].name)}),ie=pe.join(",")}ae=W;break}case"dateTime":{ce||(ie=W),ae=W;break}case"slider":{ce||(ie=W),ae=W;break}}t.isSubmitCleanValue&&(ae="",m.value&&m.value.reset()),B.showText=ce?z.label.toString():ie,B.subUnitValue=ae,B.isShowEmpty=o.isEmpty(B.showText),b.lastValue=B.subUnitValue,de&&(M.value=z.list)},O=()=>{b.hlightTimer&&(clearTimeout(b.hlightTimer),b.hlightTimer=null),b.hlightTimer1&&clearTimeout(b.hlightTimer1),b.hlightTimer2&&clearTimeout(b.hlightTimer2),N.status=1,e.nextTick(()=>{b.hlightTimer1=setTimeout(()=>{N.status=2},10),b.hlightTimer2=setTimeout(()=>{N.status=0},1500)})},q=()=>{b.isPendingHlight=!1,b.pendingOpt!==null&&_(b.pendingValue,b.pendingOpt||{}),b.pendingValue=null,b.pendingOpt=null,O()},X=$=>{if(o.isBoolean($)?$={success:$}:(o.isUndefined($)||!o.isObject($))&&($={success:!1}),$.success){k(""),m.value&&m.value.reset();let z=null;b.submitValueDataSnapshot?z=b.submitValueDataSnapshot:p.value&&(z=p.value.getValueData()),o.isUndefined(z)&&(z={});let ce="";const de={},ie=o.isEmpty($.data)?{}:$.data,ae=o.isUndefined(ie.label),W=!ae&&(o.isString(ie.label)||o.isNumber(ie.label));switch(de.label=W?ie.label:null,t.type){case"input":case"inputNumber":case"textarea":case"dateTime":case"slider":ce=z.value;break;case"selectCascade":{ae&&(de.label=z.show||z.value||""),ce=z.value?z.value.toString():"",o.isArray(ie.list)&&(de.list=ie.list);break}case"select":case"radio":case"checkbox":case"selectTag":case"inputTag":{if(v()&&o.isArray(z)){const j=[],ue=[];z.forEach(pe=>{j.push(pe.id),ue.push(pe.name)}),ae&&(de.label=ue.join(",")),ce=t.type==="inputTag"?ue.join(","):j.join(",")}else ae&&(de.label=z.name||""),ce=t.type==="inputTag"?z.name||"":z.id?z.id.toString():"";o.isArray(ie.list)&&(de.list=ie.list);break}}b.runStep!=="updateProps"?(b.pendingValue=ce,b.pendingOpt=de,b.isPendingHlight=!0,S()):(_(ce,de),S()),b.hlightTimer&&clearTimeout(b.hlightTimer),b.hlightTimer=setTimeout(()=>{b.hlightTimer=null,b.isPendingHlight&&(b.isPendingHlight=!1,q())},400)}else k($.msg),e.nextTick(()=>{g.value&&g.value.loadStop()});b.isSubmitting=!1},Z=()=>{F(),_(t.value,{label:t.label,list:t.subUnitList})},se=async()=>{let $=!1;if(t.isCheckValidate&&m.value){try{$=await m.value.validate()===!0}catch(z){$=!1,we.warn("ClXEditable","表单校验执行异常",z)}if(t.checkValidateCallback&&o.isFunction(t.checkValidateCallback)){const z=me.getElementData(r),ce=G();let de=!0;try{de=await t.checkValidateCallback(ce,z)}catch(ie){de=!1,we.warn("ClXEditable","checkValidateCallback 执行异常",ie)}de=o.isBoolean(de)?de:!0,de||($=!1)}}else $=!0;return $},le=()=>{let $=!1;return t.submitCallback&&o.isFunction(t.submitCallback)&&($=!0),$},G=()=>{let $="";return t.type!=="customHtml"&&($=p.value?p.value.getValue():""),$},oe=()=>{if(le()){const $=G(),z=me.getElementData(r),ce=t.submitCallback?t.submitCallback($,z):void 0;if(ce&&o.isFunction(ce.then))ce.then(de=>{X(o.isBoolean(de)?{success:de}:de)}).catch(()=>{X({success:!1,msg:u.value.submitCallback})});else{let de={};o.isUndefined(ce)?de={success:!0}:o.isBoolean(ce)?de={success:ce}:o.isObject(ce)&&o.isBoolean(ce.success)?de=ce:de={success:!1,msg:u.value.submitCallback},X(de)}}};e.onMounted(()=>{e.nextTick(()=>{Z()})}),e.onUnmounted(()=>{b.hlightTimer&&clearTimeout(b.hlightTimer),b.hlightTimer1&&clearTimeout(b.hlightTimer1),b.hlightTimer2&&clearTimeout(b.hlightTimer2),b.resizeEventCustomHtml&&(b.resizeEventCustomHtml.destroy(),b.resizeEventCustomHtml=null),b.resizeEventErrMsg&&(b.resizeEventErrMsg.destroy(),b.resizeEventErrMsg=null),b.resizeEventContent&&(b.resizeEventContent.destroy(),b.resizeEventContent=null)}),e.watch([()=>t.value,()=>t.label,()=>t.subUnitList],([$,z,ce],[de,ie,ae])=>{($!==de||z!==ie||ce!==ae)&&($!==de&&(b.runStep="updateProps"),_($,{label:z,list:ce}))}),e.watch(()=>t.subUnitOptions,()=>{F(),_(B.subUnitValue,{label:t.label,list:t.subUnitList})});const R=()=>{b.isSubmitting||(b.isSubmitting=!0,p.value&&(b.submitValueDataSnapshot=p.value.getValueData()),se().then($=>{if($)if(t.type==="customHtml")b.runStep="first",le()?oe():(we.warn("ClXEditable","customHtml 类型必须配置 submitCallback 才能提交"),b.isSubmitting=!1,S());else{const z=G(),ce=o.isEmpty(z);String(z)!==b.lastValue||ce&&B.showText.length>0?(b.runStep="first",le()?oe():(t.isUseOnSubmitCheck||X({success:!0}),A(z))):(b.isSubmitting=!1,S())}else X({success:!1})}).catch(()=>{X({success:!1})}))},U=()=>{S()},Q=()=>{c.value&&(c.value.checkIsShowOpen()||c.value.initCompleteOpen())},ee=()=>{b.isPendingHlight&&(b.isPendingHlight=!1,b.hlightTimer&&(clearTimeout(b.hlightTimer),b.hlightTimer=null),b.hlightTimer=setTimeout(()=>{b.hlightTimer=null,q()},150))},Y=$=>{$?(b.lastValue=B.subUnitValue,k(""),e.nextTick(()=>{c.value&&c.value.checkIsShowOpen()&&(t.type==="customHtml"?(Q(),h.value&&(b.resizeEventCustomHtml&&b.resizeEventCustomHtml.destroy(),b.resizeEventCustomHtml=new Ye.Resize({element:h.value,callback:()=>{c.value&&c.value.calculationPosition()}}))):(y.value&&(b.resizeEventContent&&b.resizeEventContent.destroy(),b.resizeEventContent=new Ye.Resize({element:y.value,callback:()=>{c.value&&c.value.calculationPosition()}})),E.value&&(b.resizeEventErrMsg&&b.resizeEventErrMsg.destroy(),b.resizeEventErrMsg=new Ye.Resize({element:E.value,callback:()=>{c.value&&c.value.calculationPosition()}}))))})):(b.isPendingHlight||(B.subUnitValue=b.lastValue),b.resizeEventCustomHtml&&(b.resizeEventCustomHtml.destroy(),b.resizeEventCustomHtml=null),b.resizeEventErrMsg&&(b.resizeEventErrMsg.destroy(),b.resizeEventErrMsg=null),b.resizeEventContent&&(b.resizeEventContent.destroy(),b.resizeEventContent=null)),f($)},H=$=>{const z=me.getParent($.target,".xeditable-click-invalid",$.currentTarget,!1);o.isUndefined(z)||($.preventDefault(),$.stopPropagation())};return l({setOnSubmitResult:$=>{t.isUseOnSubmitCheck&&o.isUndefined(t.submitCallback)&&b.isSubmitting&&X($)}}),($,z)=>(e.openBlock(),e.createBlock(Gn,{ref_key:"refElDropdownLayer",ref:c,id:e.unref(L),classParent:T.value,classText:n.classNameLabel,classDropDown:K.value,dropdownArrowPos:"center",dropDownPos:"up",isUseDropdownArrow:!0,isCloseDestroy:!0,isInitDelayComplete:!0,appendContainer:n.appendContainer,onOnChangeOpen:Y,onOnAfterLeave:ee,transitionEnter:"animated fadeIn",transitionLeave:"animated fadeOut"},{label:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(C.value)},[n.isShowEditValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.value),onClick:z[0]||(z[0]=ce=>H(ce))},[n.isUseEllipsis&&B.showText.length>0?(e.openBlock(),e.createBlock(qo,{key:0,className:ne.value,isUseTooltipAuto:n.isAutoTooltip,text:B.showText,style:e.normalizeStyle(x.value)},null,8,["className","isUseTooltipAuto","text","style"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass({"xeditable-value-hlight":N.status===2}),style:e.normalizeStyle(x.value)},e.toDisplayString(B.showText),7))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowEditIcon||w.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(J.value)},[e.renderSlot($.$slots,"iconLabel",{},()=>[e.createVNode(ke,{name:n.editIcon},null,8,["name"])])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],2)]),dropdown:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"refElContent",ref:y,class:"xeditable-content"},[e.createElementVNode("div",mv,[e.createElementVNode("div",pv,[e.createVNode(Xo,{ref_key:"refElForm",ref:m,isScrollToErr:!1},{default:e.withCtx(()=>[n.type==="customHtml"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElCustom",ref:h,class:"xeditable-custom"},[e.renderSlot($.$slots,"customForm")],512)):(e.openBlock(),e.createElementBlock("div",fv,[e.createVNode(Yn,{isCheck:n.isCheckValidate,checkValue:B.subUnitValue,rules:n.validateRules,msgElementId:V.value?`#${B.keyIndex}_errmsg`:""},{default:e.withCtx(()=>[n.type==="inputNumber"?(e.openBlock(),e.createBlock(Vt,e.mergeProps({key:0,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[1]||(z[1]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):n.type==="input"&&I.value.isNumber?(e.openBlock(),e.createBlock(Vt,e.mergeProps({key:1,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[2]||(z[2]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):n.type==="input"?(e.openBlock(),e.createBlock(Re,e.mergeProps({key:2,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[3]||(z[3]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):n.type==="textarea"?(e.openBlock(),e.createBlock(qn,e.mergeProps({key:3,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[4]||(z[4]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):n.type==="select"?(e.openBlock(),e.createBlock(Sn,e.mergeProps({key:4,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[5]||(z[5]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="selectCascade"?(e.openBlock(),e.createBlock(ca,e.mergeProps({key:5,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[6]||(z[6]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="radio"?(e.openBlock(),e.createBlock(Zo,e.mergeProps({key:6,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[7]||(z[7]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="checkbox"?(e.openBlock(),e.createBlock(Jo,e.mergeProps({key:7,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[8]||(z[8]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="selectTag"?(e.openBlock(),e.createBlock(ua,e.mergeProps({key:8,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[9]||(z[9]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="inputTag"?(e.openBlock(),e.createBlock(sa,e.mergeProps({key:9,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[10]||(z[10]=ce=>B.subUnitValue=ce),list:M.value},I.value,{onOnInit:Q}),null,16,["value","list"])):n.type==="dateTime"?(e.openBlock(),e.createBlock(la,e.mergeProps({key:10,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[11]||(z[11]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):n.type==="slider"?(e.openBlock(),e.createBlock(ta,e.mergeProps({key:11,ref_key:"refElFormEdit",ref:p,value:B.subUnitValue,"onUpdate:value":z[12]||(z[12]=ce=>B.subUnitValue=ce)},I.value,{onOnInit:Q}),null,16,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:12},[],64))]),_:1},8,["isCheck","checkValue","rules","msgElementId"])]))]),_:3},512)]),e.createElementVNode("div",{class:"xeditable-operate",style:e.normalizeStyle(P.value)},[e.createVNode(et,{ref_key:"refElSubmit",ref:g,iconName:"check",isShowLoad:!0,loadPos:"zoom-out",loadTheme:"rotaryLine",onOnClick:R},null,512),e.createVNode(et,{iconName:"close",color:"grayLight",onOnClick:U})],4)]),V.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.isCheckValidate?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"refElErrMsg",ref:E,id:`${B.keyIndex}_errmsg`,class:"xeditable-errmsg"},null,8,hv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.showMsg.length>0?(e.openBlock(),e.createElementBlock("div",gv,e.toDisplayString(B.showMsg),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))],64)):e.createCommentVNode("",!0)],512)]),_:3},8,["id","classParent","classText","classDropDown","appendContainer"]))}}),vv={class:"notify-item"},yv={class:"notify-icon"},kv={class:"notify-text"},Sv=["innerHTML"],wv=e.defineComponent({name:"ClNotifyItem",__name:"Notify",props:{isShow:{type:Boolean},itemInfo:{}},emits:["onMouseOver","onMouseOut","onDestroy"],setup(n,{emit:l}){const a=n,t=l,i=e.ref(!1),r=e.computed(()=>({progress:!0,"progress-hide":i.value})),d=e.computed(()=>({"progress-bar":!0,"progress-countdown":!i.value})),u=e.computed(()=>{const p={},g=a.itemInfo?.delay;return o.isFinite(g)&&g>0&&(p["animation-duration"]=`${g}s`),p}),s=()=>{!a.itemInfo||!a.isShow||(i.value=!0,t("onMouseOver",a.itemInfo.key))},c=()=>{!a.itemInfo||!a.isShow||(i.value=!1,t("onMouseOut",a.itemInfo.key))},m=()=>{!a.itemInfo||!a.isShow||t("onDestroy",a.itemInfo.key)};return(p,g)=>(e.openBlock(),e.createBlock(e.Transition,{name:"notify","enter-active-class":n.itemInfo?.clsTransitionEnter,"leave-active-class":n.itemInfo?.clsTransitionLeave},{default:e.withCtx(()=>[n.isShow&&n.itemInfo?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(n.itemInfo.clsContainer),role:"status","aria-live":"polite",onClick:m,onMouseenter:s,onMouseleave:c},[e.createElementVNode("div",vv,[e.createElementVNode("div",yv,[e.createVNode(ke,{name:n.itemInfo.iconName},null,8,["name"])]),e.createElementVNode("div",kv,[e.createElementVNode("div",{innerHTML:n.itemInfo.text},null,8,Sv)]),e.createElementVNode("button",{type:"button",class:"notify-close",title:"关闭",onClick:e.withModifiers(m,["stop"])},[e.createVNode(ke,{name:"close"})])]),n.itemInfo.isProgress?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.value)},[e.createElementVNode("div",{class:e.normalizeClass(d.value),style:e.normalizeStyle(u.value)},null,6)],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],34)):e.createCommentVNode("",!0)]),_:1},8,["enter-active-class","leave-active-class"]))}}),Ev=["id"],Cv=2*1e3,bv=1e3,xv=2147483,Bv=e.defineComponent({name:"ClNotify",__name:"Notifys",props:{id:String,className:String,position:{type:String,default:"top-right"},isProgress:{type:Boolean,default:!1},delay:{type:Number,default:3}},setup(n,{expose:l}){const a=n,t=`notify-pos-${o.getRandom(5)}`,i=`notify-item-${o.getRandom(5)}`;let r=0;const d=a.id,u={info:"info",success:"check",error:"close-circle-fill",warn:"warn-fill"},s={type:["info","success","error","warn"],position:["top-right","top-center","bottom-right"]},c=e.useTemplateRef("refElTopParent"),m=e.ref([]),p=e.reactive({"top-right":[],"top-center":[],"bottom-right":[]}),g=e.reactive({}),h=e.reactive({});let y,E=!1;const L=e.computed(()=>{let f={"panel-notify":!0};return f=o.getJsonMerge(f,me.getClassNameJson(a.className)),f}),B=()=>document.body,I=()=>{const f=c.value;return!!f&&f.isConnected},M=()=>{if(E){we.warn("Notify","组件已销毁,无法添加通知");return}if(I())clearTimeout(y),y=void 0;else{const f=B();f&&c.value&&f.appendChild(c.value)}},N=()=>{clearTimeout(y),y=void 0,e.nextTick(()=>{I()&&m.value.length===0&&(y=setTimeout(()=>{const f=c.value;f&&f.isConnected&&f.remove()},Cv))})},b=f=>{let S={key:"",text:"",iconName:"",isProgress:!1,delay:a.delay,clsContainer:{},clsTransitionEnter:"",clsTransitionLeave:""},k=-1;if(!o.isNonEmptyString(f))return{info:S,inx:k,pos:""};const v=f.split("_item_")[0].replace("notify_",""),F=p[v];return o.isUndefined(F)||F.forEach((_,O)=>{_.key===f&&(S=_,k=O)}),{info:S,inx:k,pos:v}},V=f=>{if(b(f).inx>-1){const k=m.value.indexOf(f);k>-1&&m.value.splice(k,1),h[f]=setTimeout(()=>{delete h[f];const v=b(f);v.inx>-1&&p[v.pos].splice(v.inx,1),!o.isUndefined(p[v.pos])&&p[v.pos].length===0&&m.value.length===0&&N()},bv)}},w=(f,S)=>{const k=Math.min(S,xv);g[f]=setTimeout(()=>{delete g[f],V(f)},k*1e3)},T=f=>{let S="animated fadeInDown",k="animated fadeOutRight";switch(f){case"top-center":S="animated fadeInDown",k="animated fadeOut";break;case"bottom-right":S="animated fadeInUp",k="animated fadeOutRight";break}return{clsTransitionEnter:S,clsTransitionLeave:k}},C=f=>{if(E){we.warn("Notify","组件已销毁,无法添加通知");return}if(!o.isEmpty(f)&&o.isNonEmptyString(f.msg)){M();const S=o.isExistValue(s.type,f.type||"")&&f.type?f.type:s.type[0];let k=a.position;if(o.isNonEmptyString(f.position)&&(k=f.position),!o.isExistValue(s.position,k)){const le=o.isString(k)?k:"未知";we.warn("Notify",`position 无效(${le}),已回退为 ${s.position[0]}`),k=s.position[0]}const v=f.isProgress;let F=a.isProgress;o.isBoolean(v)&&v!==void 0&&(F=v);const _=f.delay,O=o.isFinite(_)&&_!==void 0&&_>0?Number(_):a.delay;let q={"notify-container":!0,"notify-progress":F};q[`notify-${S}`]=!0,o.isNonEmptyString(f.className)&&(q=o.getJsonMerge(q,me.getClassNameJson(f.className)));const X=T(k);r+=1;const Z=`notify_${k}_item_${r}`,se={key:Z,text:o.encodeHTML(f.msg),iconName:u[S],isProgress:F,delay:O,clsContainer:q,clsTransitionEnter:X.clsTransitionEnter,clsTransitionLeave:X.clsTransitionLeave};p[k].push(se),e.nextTick(()=>{b(se.key).inx>-1&&(m.value.push(se.key),w(Z,se.delay))})}else we.warn("Notify","通知内容为空,已忽略")},D=()=>{Object.keys(g).forEach(f=>{clearTimeout(g[f]),delete g[f]}),Object.keys(h).forEach(f=>{clearTimeout(h[f]),delete h[f]}),clearTimeout(y),y=void 0};e.onBeforeUnmount(()=>{E=!0,D();const f=c.value;f&&f.isConnected&&f.remove()});const J=f=>{g[f]&&(clearTimeout(g[f]),delete g[f])},ne=f=>{const S=b(f);S.inx>-1&&w(f,S.info.delay)},K=f=>{g[f]&&(clearTimeout(g[f]),delete g[f]),V(f)};return l({addCustom:f=>{C(f)},clear:()=>{s.position.forEach(f=>{p[f]=[]}),m.value=[],D(),N()},destroy:()=>{E=!0,s.position.forEach(f=>{p[f]=[]}),m.value=[],D(),N()}}),(f,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(L.value),ref_key:"refElTopParent",ref:c,id:e.unref(d)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p,(k,v,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${t}-${v}-${F}`},[k.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`notify-wrapper notify-${v}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k,_=>(e.openBlock(),e.createBlock(wv,{key:`${i}-${_.key}`,isShow:m.value.includes(_.key),itemInfo:_,onOnDestroy:K,onOnMouseOver:J,onOnMouseOut:ne},null,8,["isShow","itemInfo"]))),128))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))),128))],10,Ev))}}),gi=(n={})=>{const l=e.createApp(Bv,n),a=document.createElement("div"),t=l.mount(a),i=t;return{info:(r,d={})=>{const u=o.getJsonMerge(d,{type:"info",msg:r});i.addCustom(u)},success:(r,d={})=>{const u=o.getJsonMerge(d,{type:"success",msg:r});i.addCustom(u)},error:(r,d={})=>{const u=o.getJsonMerge(d,{type:"error",msg:r});i.addCustom(u)},warn:(r,d={})=>{const u=o.getJsonMerge(d,{type:"warn",msg:r});i.addCustom(u)},custom:r=>{i.addCustom(r)},clear:()=>{i.clear()},destroy:()=>{const r=t.$el||null;i.destroy(),l.unmount(),r&&r.parentNode&&r.parentNode.removeChild(r)}}},Iv=["id","aria-label"],Dv={class:"alert-body"},Tv={key:0,class:"alert-icon"},Nv={key:2,class:"alert-title"},Vv={key:4,class:"alert-text"},Mv=["innerHTML"],Ov={key:1},_v={key:6,class:"alert-operate"},Av=2*1e3,Lv=e.defineComponent({name:"ClAlert",__name:"Alert",props:{id:String,width:{type:String,default:"500px"},isBackClick:{type:Boolean,default:!0},submitLabel:{type:String,default:"确定"},submitColor:{type:String,default:"default"},cancelLabel:{type:String,default:"取消"},cancelColor:{type:String,default:"grayLight"},classTransitionEnter:{type:String,default:"animated zoomIn"},classTransitionLeave:String},setup(n,{expose:l}){const a=n,t=a.id||`alert-${o.getRandom(5)}`,i=e.useTemplateRef("refElTopParent"),r=e.useTemplateRef("refElTransition"),d=e.useTemplateRef("refElBtnSubmit"),u=e.reactive({isLoadBackClick:!0}),s=e.reactive({id:t,width:a.width,isBackClick:!1,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:"",submitIcon:"",submitColor:"default",cancelLabel:"",cancelIcon:"",cancelColor:"grayLight",isShowSubmit:!1,isShowSubmitLoad:!1,isShowCancel:!1,isShowOperate:!1,isShow:!1}),c=e.reactive({submit:null,cancel:null});let m=null,p=!1;const g=e.ref(!1);let h=null;const y={info:{name:"info-circle",color:"var(--cl-primary, #1088f0)"},success:{name:"check-circle",color:"var(--cl-success, #12b76a)"},error:{name:"exclamation-circle",color:"var(--cl-danger, #ee0a24)"},warn:{name:"warn-fill",color:"#fbe300"},doubt:{name:"question-circle",color:"#0ac5c5"}},E=()=>document.querySelector("body"),L=()=>document.getElementById(s.id),B=()=>L()!==null,I=()=>{if(B())(m!==null||p)&&(m!==null&&(clearTimeout(m),m=null),p=!1);else{if(!i.value){we.warn("ClAlert","refElTopParent 未初始化,无法创建容器");return}E()?.appendChild(i.value)}},M=()=>{p=!0,m!==null&&(clearTimeout(m),m=null),e.nextTick(()=>{p=!1,B()&&!s.isShow&&(m=setTimeout(()=>{const x=L();x&&E()?.removeChild(x),m=null},Av))})},N=x=>{if(!x||typeof x!="object"||Array.isArray(x))return{id:t,width:a.width,isBackClick:a.isBackClick,iconClass:"",iconName:"",iconColor:"",isShowIcon:!1,title:"",isShowTitle:!1,text:"",html:"",isShowTextHtml:!1,isShowText:!1,submitLabel:a.submitLabel,submitIcon:"",submitColor:a.submitColor,isShowSubmit:!1,isShowSubmitLoad:!1,cancelLabel:a.cancelLabel,cancelIcon:"",cancelColor:a.cancelColor,isShowCancel:!1,isShowOperate:!1,isShow:!1};const A=o.isBoolean(x.isBackClick)?x.isBackClick:a.isBackClick,f=o.isNonEmptyString(x.id)?x.id:t,S=o.isNonEmptyString(x.width)?x.width:a.width;let k="",v="",F="";if(!o.isEmpty(x.iconType)){const Y=Object.prototype.hasOwnProperty.call(y,x.iconType)?y[x.iconType]:void 0;Y&&(v=Y.name,F=Y.color)}o.isEmpty(v)&&o.isNonEmptyString(x.icon)&&(k=x.icon);const _=!o.isEmpty(v)||!o.isEmpty(k),O=o.isNonEmptyString(x.title),q=o.isNonEmptyString(x.html),X=o.isNonEmptyString(x.text)||q,Z=o.isEmpty(x.submitLabel)?a.submitLabel:x.submitLabel,se=o.isEmpty(x.submitColor)?a.submitColor:x.submitColor,le=o.isEmpty(x.cancelLabel)?a.cancelLabel:x.cancelLabel,G=o.isEmpty(x.cancelColor)?a.cancelColor:x.cancelColor,oe=o.isBoolean(x.isSubmit)?x.isSubmit:!1,R=o.isBoolean(x.isLoad)?x.isLoad:!1,U=o.isBoolean(x.isCancel)?x.isCancel:!1,Q=oe||U,ee=O||X;return{id:f,width:S,isBackClick:A,iconClass:k,iconName:v,iconColor:F,isShowIcon:_,title:O?x.title:"",isShowTitle:O,text:o.isNonEmptyString(x.text)?x.text:"",html:q?x.html:"",isShowTextHtml:q,isShowText:X,submitLabel:Z,submitIcon:o.isNonEmptyString(x.submitIcon)?x.submitIcon:"",submitColor:se,isShowSubmit:oe,isShowSubmitLoad:R,cancelLabel:le,cancelIcon:o.isNonEmptyString(x.cancelIcon)?x.cancelIcon:"",cancelColor:G,isShowCancel:U,isShowOperate:Q,isShow:ee}},b=x=>{if(s.isShow&&s.isShowSubmitLoad)return;const A=N(x);A.isShow?(I(),g.value=!1,Object.assign(s,A),c.submit=x.submitCallback??null,c.cancel=x.cancelCallback??null,document.addEventListener("keydown",w),h=document.activeElement,i.value?.focus({preventScroll:!0}),r.value?.show()):(c.submit=null,c.cancel=null,r.value?.hide(),s.isShow=!1)},V=()=>{s.isShowSubmitLoad&&d.value?.loadStop(),document.removeEventListener("keydown",w),h&&typeof h.focus=="function"&&(h.focus(),h=null),g.value=!1,r.value?.hide(),u.isLoadBackClick=!0,s.isShowSubmitLoad=!1,s.isShow=!1},w=x=>{x.key==="Escape"&&!s.isShowSubmitLoad?D():x.key==="Enter"&&s.isShowSubmit&&!s.isShowSubmitLoad&&C()},T=async()=>{if(g.value)return;V();const x=c.cancel;if(x&&o.isFunction(x))try{await x()}catch(A){we.error("ClAlert","cancel 回调执行异常:",A)}};e.onBeforeUnmount(()=>{if(document.removeEventListener("keydown",w),h&&typeof h.focus=="function"&&(h.focus(),h=null),p=!1,m!==null&&(clearTimeout(m),m=null),B()){const x=L();x&&E()?.removeChild(x)}}),e.watch(()=>s.isShow,x=>{x||M()});const C=async()=>{if(g.value)return;const x=c.submit;if(x&&o.isFunction(x)){s.isShowSubmitLoad&&(u.isLoadBackClick=!1),g.value=!0;try{await x()}catch(A){we.error("ClAlert","submit 回调执行异常:",A),V()}}else V()},D=async()=>{await T()},J=async()=>{await T()};return l({open:x=>{b(x)},hide:()=>{V()},reset:()=>{g.value=!1,s.isShowSubmitLoad&&(d.value?.loadStop(),s.isShowSubmitLoad=!1)}}),(x,A)=>(e.openBlock(),e.createElementBlock("div",{id:s.id,class:"panel-alert",ref_key:"refElTopParent",ref:i,role:"alertdialog","aria-modal":"true",tabindex:"-1","aria-label":s.title||s.text||"提示"},[e.createVNode(Al,{isBackClick:s.isBackClick&&u.isLoadBackClick&&!g.value,classTransitionEnter:a.classTransitionEnter,classTransitionLeave:a.classTransitionLeave,width:s.width,onOnClickBack:J,ref_key:"refElTransition",ref:r},{default:e.withCtx(()=>[e.createElementVNode("div",Dv,[s.isShowIcon?(e.openBlock(),e.createElementBlock("div",Tv,[e.createVNode(ke,{name:s.iconName,color:s.iconColor,className:s.iconClass},null,8,["name","color","className"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),s.isShowTitle?(e.openBlock(),e.createElementBlock("div",Nv,e.toDisplayString(s.title),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),s.isShowText?(e.openBlock(),e.createElementBlock("div",Vv,[s.isShowTextHtml?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:s.html},null,8,Mv)):(e.openBlock(),e.createElementBlock("div",Ov,e.toDisplayString(s.text),1))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64)),s.isShowOperate?(e.openBlock(),e.createElementBlock("div",_v,[s.isShowSubmit?(e.openBlock(),e.createBlock(et,{key:0,ref_key:"refElBtnSubmit",ref:d,className:"alert-submit",isShowLoad:s.isShowSubmitLoad,isShowBackDrop:!0,label:s.submitLabel,icon:s.submitIcon,color:s.submitColor,onOnClick:C},null,8,["isShowLoad","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),s.isShowCancel?(e.openBlock(),e.createBlock(et,{key:2,className:"alert-cancel",disabled:g.value,label:s.cancelLabel,icon:s.cancelIcon,color:s.cancelColor,onOnClick:D},null,8,["disabled","label","icon","color"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:7},[],64))])]),_:1},8,["isBackClick","classTransitionEnter","classTransitionLeave","width"])],8,Iv))}}),vi=(n={})=>{const l=e.createApp(Lv,n),a=document.createElement("div"),t=l.mount(a);return{alert:(i,r={})=>{const d=o.getJsonMerge({isSubmit:!0},r,{title:i,isCancel:!1,cancelCallback:null});t.open(d)},confirm:(i,r={})=>{const d=o.getJsonMerge({isSubmit:!0,isCancel:!0},r,{title:i});t.open(d)},custom:i=>{t.open(i)},close:()=>{t.hide()},reset:()=>{t.reset()},destroy:()=>{t.hide();const i=t.$el||null;l.unmount(),i&&i.parentNode&&i.parentNode.removeChild(i)}}},$v={class:"preview-image"},Fv={class:"preview-image-actions-container"},Pv={key:0},Rv={key:2,class:"image-num"},Hv={key:0,class:"preview-image-container"},Uv=["src"],zv={key:0,class:"preview-image-loading"},Jv=e.defineComponent({name:"ClPreviewImage",__name:"Image",props:{imageInx:{type:Number,default:0},list:{type:Array,default:()=>[]},isLoop:{type:Boolean,default:!1},isShowCopy:{type:Boolean,default:!0}},setup(n,{expose:l}){const a=n,t=e.inject("$PreviewTop");let i=null;const r=e.reactive({isShow:!1,isSwitch:!1,isLoading:!1,src:"",isFading:!1,scale:1,scaleRatio:1.4,rotate:0,rotateAngle:90,showIndex:a.imageInx}),d=e.computed(()=>{const b={},V=[];return V.push(`scale(${r.scale})`),V.push(`rotate(${r.rotate}deg)`),b.transform=V.join(" "),b.opacity=r.isFading?"0":"1",b}),u=()=>{if(!t)return;const{showIndex:b}=r,V=a.list,w=o.isArray(V)?V.length:0,T=w>0&&b>=0&&b<w;if(r.isShow=T,T){i&&clearTimeout(i);const C=r.isFading?200:0;setTimeout(()=>{r.isSwitch=!0,r.src=a.list[b],t.setPrevNextStatus(b,w),i=setTimeout(()=>{r.isLoading=!0},150)},C)}else r.isSwitch=!1},s=()=>{i&&(clearTimeout(i),i=null),r.isFading=!1,r.isLoading=!1},c=()=>{i&&(clearTimeout(i),i=null),r.isFading=!1,r.isLoading=!1},m=()=>{const{scale:b,scaleRatio:V}=r,w=b*V;w<7&&(r.scale=Number(w.toFixed(3)))},p=()=>{const{scale:b,scaleRatio:V}=r,w=b/V;w>.18&&(r.scale=Number(w.toFixed(3)))},g=()=>{const{rotate:b,rotateAngle:V}=r;r.rotate=(b-V)%360},h=()=>{const{rotate:b,rotateAngle:V}=r;r.rotate=(b+V)%360},y=()=>{r.scale=1,r.rotate=0};return l({show:b=>{r.showIndex=b,u()},hide:()=>{r.scale=1,r.rotate=0,r.isFading=!1,r.isShow=!1},prev:()=>{const{showIndex:b}=r;let V=-1;b>0?V=b-1:a.isLoop&&(V=a.list.length-1),V>-1&&(r.isFading=!0,r.showIndex=V,r.scale=1,r.rotate=0,u())},next:()=>{const{showIndex:b}=r;let V=-1;b<a.list.length-1?V=b+1:a.isLoop&&(V=0),V>-1&&(r.isFading=!0,r.showIndex=V,r.scale=1,r.rotate=0,u())},large:()=>{m()},small:()=>{p()}}),(b,V)=>(e.openBlock(),e.createElementBlock("div",$v,[r.isShow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({"preview-btn":!0,"preview-image-actions":!0,"preview-image-num":n.list.length>1})},[e.createElementVNode("div",Fv,[e.createElementVNode("span",{onClick:e.withModifiers(m,["stop"])},[e.createVNode(ke,{name:"search-plus"})]),e.createElementVNode("span",{onClick:e.withModifiers(p,["stop"])},[e.createVNode(ke,{name:"search-minus"})]),e.createElementVNode("span",{onClick:e.withModifiers(g,["stop"])},[e.createVNode(ke,{name:"rotate-left"})]),e.createElementVNode("span",{onClick:e.withModifiers(h,["stop"])},[e.createVNode(ke,{name:"rotate-right"})]),e.createElementVNode("span",{onClick:e.withModifiers(y,["stop"])},[e.createVNode(ke,{name:"restore"})]),n.isShowCopy?(e.openBlock(),e.createElementBlock("span",Pv,[e.createVNode(hn,{textLabel:r.src},null,8,["textLabel"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.list.length>1?(e.openBlock(),e.createElementBlock("span",Rv,e.toDisplayString(r.showIndex+1)+"/"+e.toDisplayString(n.list.length),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(e.Transition,{"enter-active-class":"preview-image-enter","leave-active-class":"preview-image-leave"},{default:e.withCtx(()=>[r.isShow?e.withDirectives((e.openBlock(),e.createElementBlock("div",Hv,[e.withDirectives(e.createElementVNode("img",{src:r.src,style:e.normalizeStyle(d.value),onLoad:s,onError:c},null,44,Uv),[[e.vShow,!r.isLoading]]),r.isLoading?(e.openBlock(),e.createElementBlock("div",zv,[...V[0]||(V[0]=[e.createElementVNode("div",{class:"preview-image-spinner"},null,-1)])])):e.createCommentVNode("",!0)],512)),[[e.vShow,r.isSwitch]]):e.createCommentVNode("",!0)]),_:1})]))}}),Kv=["id"],Wv=e.defineComponent({name:"ClPreview",__name:"Index",setup(n,{expose:l}){const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./Video-Btnven4K.cjs"))),t=e.useTemplateRef("refElTopParent"),i=e.useTemplateRef("refElImage"),r=e.useTemplateRef("refElVideo"),d=e.reactive({elId:`preview-${o.getRandom(5)}`,className:"",type:"",list:[],isLoop:!1,isShowPrevNext:!1,isDisablePrev:!1,isDisableNext:!1,isShowCopy:!0});let u=null;const s=e.computed(()=>{let D={"panel-preview":!0};return D=o.getJsonMerge(D,me.getClassNameJson(d.className)),D}),c=e.computed(()=>d.type==="image"),m=e.computed(()=>d.type==="video"),p=()=>document.querySelector("body"),g=()=>document.querySelector("body>.panel-preview"),h=()=>{const D=g();return!o.isUndefined(D)},y=()=>{h()?(clearTimeout(u),u=null):(document.body.className=me.getAddClass(document.body.className,"preview-open"),p().appendChild(t.value))},E=D=>{let J=D.keyCode;if(!o.isUndefined(J))switch(J=J.toString(),J){case"38":D.preventDefault(),D.stopPropagation();break;case"40":D.preventDefault(),D.stopPropagation();break}},L=D=>{let J=D.keyCode;if(!o.isUndefined(J))switch(J=J.toString(),J){case"27":b();break;case"37":V();break;case"38":D.preventDefault(),D.stopPropagation(),c.value?i.value?.large():m.value&&V();break;case"39":w();break;case"40":D.preventDefault(),D.stopPropagation(),c.value?i.value?.small():m.value&&w();break}},B=()=>{window.removeEventListener("keydown",E),window.removeEventListener("keyup",L)},I=()=>{window.addEventListener("keydown",E),window.addEventListener("keyup",L)},M=(D=!1)=>{h()&&(u=setTimeout(()=>{const J=g();J&&(document.body.className=me.getRemoveClass(document.body.className,"preview-open"),p().removeChild(J)),B()},D?2*1e3:0))},N=D=>{if(!o.isEmpty(D)&&!o.isEmpty(D.src)){y(),o.isNonEmptyString(D.id)&&(d.elId=D.id),d.className=o.isNonEmptyString(D.className)?D.className:"";let J=[];const ne=D.src;o.isArray(ne)?J=ne:o.isString(ne)&&(J=[ne]),d.type=D.type,d.list=J,d.isLoop=o.isBoolean(D.isLoop)?D.isLoop:!1,d.isShowCopy=o.isBoolean(D.isShowCopy)?D.isShowCopy:!0;const K=o.isEmpty(D.showIndex)?0:D.showIndex;I(),e.nextTick(()=>{c.value?i.value?.show(K):m.value&&r.value?.show(K)})}};e.onBeforeUnmount(()=>{clearTimeout(u),u=null,B();const D=g();D&&(document.body.className=me.getRemoveClass(document.body.className,"preview-open"),p().removeChild(D))});const b=()=>{c.value?i.value?.hide():m.value&&r.value?.hide(),M()},V=()=>{d.isDisablePrev||(c.value?i.value?.prev():m.value&&r.value?.prev())},w=()=>{d.isDisableNext||(c.value?i.value?.next():m.value&&r.value?.next())};return e.provide("$PreviewTop",{setPrevNextStatus:(D,J)=>{const ne=J>1;if(d.isShowPrevNext=ne,ne){const{isLoop:K}=d;d.isDisablePrev=K?!1:D===0,d.isDisableNext=K?!1:D===J-1}}}),l({show:D=>{N(D)},destroy:()=>{M(),d.elId=`preview-${o.getRandom(5)}`,d.className="",d.type="",d.list=[],d.isLoop=!1,d.isShowPrevNext=!1,d.isDisablePrev=!1,d.isDisableNext=!1}}),(D,J)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refElTopParent",ref:t,id:d.elId,class:e.normalizeClass(s.value)},[e.createVNode(At,{teleportTarget:"self",show:!0,background:"var(--cl-overlay, rgba(0, 0, 0, 0.5))",zIndex:0,isLockScroll:!1,duration:0}),e.createElementVNode("div",{class:"preview-btn preview-close",onClick:e.withModifiers(b,["stop"])},[e.createVNode(ke,{name:"close"})]),d.isShowPrevNext?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-prev":!0,"preview-btn-disable":d.isDisablePrev}),onClick:e.withModifiers(V,["stop"])},[e.createVNode(ke,{name:"angle-left"})],2),e.createElementVNode("div",{class:e.normalizeClass({"preview-btn":!0,"preview-next":!0,"preview-btn-disable":d.isDisableNext}),onClick:e.withModifiers(w,["stop"])},[e.createVNode(ke,{name:"angle-right"})],2)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),c.value?(e.openBlock(),e.createBlock(Jv,{key:2,ref_key:"refElImage",ref:i,isLoop:d.isLoop,list:d.list,isShowCopy:d.isShowCopy},null,8,["isLoop","list","isShowCopy"])):m.value?(e.openBlock(),e.createBlock(e.unref(a),{key:3,ref_key:"refElVideo",ref:r,isLoop:d.isLoop,list:d.list},null,8,["isLoop","list"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,Kv))}}),yi=(n={})=>{const l=e.createApp(Wv,n),a=document.createElement("div"),t=l.mount(a);return{image:(i,r={})=>{const d=o.getJsonMerge(r,{type:"image",src:i});t.show(d)},video:(i,r={})=>{const d=o.getJsonMerge(r,{type:"video",src:i});t.show(d)},show:i=>{t.show(i)},destroy:()=>{t.destroy(),l.unmount(),a.parentNode&&a.parentNode.removeChild(a)}}},jv=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"}));let Vn=null;const Yv=()=>(Vn||(Vn=Promise.resolve().then(()=>require("./index.hljs-BX3KMdv8.cjs")).catch(n=>{throw Vn=null,n})),Vn),qv={bind:(n,l)=>{Yv().then(a=>{n.isConnected&&a.highlight(n,l.value)}).catch(()=>{})}},Xv="clCodeHighlight",Gv=()=>({deep:!0,beforeMount:qv.bind}),ki=Object.freeze(Object.defineProperty({__proto__:null,directive:Gv,name:Xv},Symbol.toStringTag,{value:"Module"})),Qv="cllazy",Zv=n=>{const l=new Tl(n);return{deep:!0,mounted:l.mount.bind(l),updated:l.update.bind(l),unmounted:l.unmount.bind(l)}},ey=Object.freeze(Object.defineProperty({__proto__:null,directive:Zv,name:Qv},Symbol.toStringTag,{value:"Module"}));let Mn=null;const ty=(n={})=>{if(Mn)return Mn;const l=e.createApp(Go,n),a=document.createElement("div"),t=l.mount(a);return Mn={show:(i,r)=>{t.show(i,r)},hide:(i=1e3)=>{t.hide(i)}},Mn};function ny(n){return l=>{n.forEach(a=>{l.component(a.name,a)})}}function Si(n,l){return(a,t={})=>{Object.keys(n).forEach(r=>{a.directive(n[r].name,n[r].directive(t[r]||{}))});const i={};Object.keys(l).forEach(r=>{i[r]=l[r](t[r]||{})}),o.isObject(t.globalsOption)&&Je.setGlobalConfig(t.globalsOption),a.provide("$ClGlobals",i)}}const wi={lazyImage:ey},Ei={clipboard:Ko,loadScreen:ty,languagePack:Hl,validate:Dl},oy=[At,Re,ke,ct,Ol,_l,Gt,Go,$l,ta,et,tl,zo,il,rl,ll,Nt,Qo,gn,Zo,ea,Jo,pt,qt,Ll,cl,Cl,bl,qo,xl,Xo,Kn,Bl,Il,Yn,Wn,Vl,Vt,pn,Ml,Xt,qn,Fl,Xn,Pl,Rl,hn],ay=(n={})=>{let l=null,a=null;const t=()=>l?Promise.resolve(l):(a||(a=Promise.resolve().then(()=>jv).then(i=>(l=i.default(n),l))),a);return{show:i=>t().then(r=>r.show(i)),image:i=>t().then(r=>r.image(i)),video:i=>t().then(r=>r.video(i)),destroy:()=>t().then(i=>i.destroy())}},Ci={...wi,codeHighlight:ki,waves:al,tooltip:sl},bi={...Ei,notify:gi,alert:vi,preview:ay},ly=Si(Ci,bi),iy=[Ul,zl,Jl,jl,na,Gl,la,Ql,Zl,ei,ia,ti,oa,ni,sa,oi,aa,ra,fn,Sn,ca,ai,ua,ii,ri,ui,di,mi,pi,da,fi,hi],sy=[...oy,...iy],ry={...wi,...Ci},cy={...Ei,...bi},uy=(n,l={})=>{ny(sy)(n),Si(ry,cy)(n,l)};exports.ClAnchorNav=Ul;exports.ClBadge=qt;exports.ClBreadcrumb=tl;exports.ClButton=et;exports.ClCalendar=zl;exports.ClCallout=ll;exports.ClCard=zo;exports.ClCardColor=il;exports.ClCheckbox=Jo;exports.ClCheckboxOne=pt;exports.ClClipboard=hn;exports.ClCodeLegend=Jl;exports.ClCollapse=rl;exports.ClColorPicker=jl;exports.ClCountDown=cl;exports.ClCropper=na;exports.ClCropperPreview=Gl;exports.ClDarg=Cl;exports.ClDateTime=la;exports.ClDivider=bl;exports.ClDropdownMenu=Ql;exports.ClDropdownMenuItem=Zl;exports.ClDropdownPopup=ei;exports.ClEcharts=ia;exports.ClEchartsLineAxisTag=ti;exports.ClEllipsis=qo;exports.ClEmpty=xl;exports.ClFileUpload=oa;exports.ClForm=Xo;exports.ClFormGroupBtns=Bl;exports.ClFormGroupHorizontal=Kn;exports.ClFormGroupVertical=Il;exports.ClFormValidate=Yn;exports.ClFramePhone=ni;exports.ClIconFont=ke;exports.ClImage=Wn;exports.ClInput=Re;exports.ClInputCaptcha=Vl;exports.ClInputNumber=Vt;exports.ClInputNumberStepper=pn;exports.ClInputPassword=Ml;exports.ClInputSearch=Xt;exports.ClInputTag=sa;exports.ClInputTextarea=qn;exports.ClLink=Nt;exports.ClLoad=ct;exports.ClLoadFullCenter=Ol;exports.ClLoadIng=Gt;exports.ClLoadScreen=Go;exports.ClLoadWarp=_l;exports.ClModal=Qo;exports.ClNumberRoll=Ll;exports.ClOverlay=At;exports.ClPaginate=ra;exports.ClPortlet=oi;exports.ClPreviewExample=aa;exports.ClProgress=$l;exports.ClRadio=Zo;exports.ClRadioOne=ea;exports.ClScrollXFence=fn;exports.ClSelect=Sn;exports.ClSelectCascade=ca;exports.ClSelectMove=ai;exports.ClSelectTag=ua;exports.ClSelectTree=ii;exports.ClSideMenu=ri;exports.ClSlider=ta;exports.ClSwitchery=Fl;exports.ClTable=ui;exports.ClTableEdit=di;exports.ClTableSimple=mi;exports.ClTabs=pi;exports.ClTags=Xn;exports.ClTransitionSlideUpDown=gn;exports.ClTree=da;exports.ClWaterfall=Pl;exports.ClWaterfallImage=Rl;exports.ClWeekHour=fi;exports.ClXEditable=hi;exports.install=uy;exports.installCore=ly;exports.languagePack=Hl;exports.useAlert=vi;exports.useClipboard=Ko;exports.useCodeHighlight=ki;exports.useNotify=gi;exports.usePreview=yi;exports.useTooltip=sl;exports.useWaves=al;