st-comp 0.0.274 → 0.0.275

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 (143) hide show
  1. package/es/ChartLayout.js +4 -4
  2. package/es/CustomFunction.cjs +1 -1
  3. package/es/CustomFunction.js +70 -71
  4. package/es/FactorWarning.cjs +1 -1
  5. package/es/FactorWarning.js +35 -36
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +19 -20
  8. package/es/KlineBasic.cjs +1 -1
  9. package/es/KlineBasic.js +28 -29
  10. package/es/KlineConfig.cjs +1 -1
  11. package/es/KlineConfig.js +49 -50
  12. package/es/KlineNew.cjs +1 -1
  13. package/es/KlineNew.js +18 -19
  14. package/es/KlinePlus.cjs +1 -1
  15. package/es/KlinePlus.js +21 -22
  16. package/es/MonacoEditor.cjs +1 -1
  17. package/es/MonacoEditor.js +26 -27
  18. package/es/Pagination.cjs +1 -1
  19. package/es/Pagination.js +76 -77
  20. package/es/PasswordPrompt.js +3 -3
  21. package/es/Table.cjs +1 -1
  22. package/es/Table.js +37 -38
  23. package/es/User.cjs +1 -1
  24. package/es/User.js +141 -142
  25. package/es/VarSelectDialog.cjs +1 -1
  26. package/es/VarSelectDialog.js +27 -28
  27. package/es/VarietyAiHelper.cjs +4 -4
  28. package/es/VarietyAiHelper.js +472 -473
  29. package/es/VarietyAutoComplete.cjs +1 -1
  30. package/es/VarietyAutoComplete.js +12 -13
  31. package/es/VarietySearch.cjs +9 -9
  32. package/es/VarietySearch.js +298 -298
  33. package/es/{VarietySelect-7da473c5.cjs → VarietySelect-610903f0.cjs} +1 -1
  34. package/es/{VarietySelect-b01281d3.js → VarietySelect-6a166293.js} +4 -4
  35. package/es/VarietyTextCopy.cjs +1 -1
  36. package/es/VarietyTextCopy.js +22 -23
  37. package/es/VirtualTable.js +14 -14
  38. package/es/{_initCloneObject-6243b839.js → _initCloneObject-152b4f4e.js} +3 -3
  39. package/es/aiTools-0c653fa6.js +113 -0
  40. package/es/aiTools-336e4de3.cjs +2 -0
  41. package/es/aiTools.js +8 -2
  42. package/es/{base-29f73b05.js → base-a5af3db3.js} +2 -2
  43. package/es/{castArray-609a313e.js → castArray-7741a212.js} +1 -1
  44. package/es/{config-provider-20b05e99.js → config-provider-7a3aca55.js} +4 -4
  45. package/es/{debounce-a09ce9a3.js → debounce-8d53f4dd.js} +1 -1
  46. package/es/{dropdown-f8d9fe56.js → dropdown-01e09205.js} +19 -20
  47. package/es/dropdown-987c47fb.cjs +1 -0
  48. package/es/el-autocomplete-16f66b34.cjs +1 -0
  49. package/es/{el-autocomplete-3f34a1c3.js → el-autocomplete-342ae823.js} +17 -18
  50. package/es/{el-button-cd144ee1.js → el-button-314171a0.js} +4 -4
  51. package/es/{el-checkbox-d6c883f4.js → el-checkbox-5899681f.js} +4 -4
  52. package/es/el-checkbox-bdf64663.cjs +1 -0
  53. package/es/el-dialog-0ef95df6.cjs +1 -0
  54. package/es/{el-dialog-59a23c2b.js → el-dialog-86a3eec2.js} +6 -6
  55. package/es/{el-divider-523e5874.js → el-divider-4e059794.js} +1 -1
  56. package/es/{el-empty-f5a1607a.js → el-empty-33cb66f1.js} +3 -3
  57. package/es/{el-form-item-3475aaad.cjs → el-form-item-77ef6784.cjs} +1 -1
  58. package/es/{el-form-item-a9556441.js → el-form-item-cda4d93c.js} +8 -8
  59. package/es/el-input-89222943.cjs +1 -0
  60. package/es/{el-input-1f14a6e2.js → el-input-fa1445ad.js} +14 -14
  61. package/es/{el-input-number-411ac93d.js → el-input-number-8f6dbf74.js} +6 -6
  62. package/es/el-input-number-d3338e5e.cjs +1 -0
  63. package/es/{el-loading-cbeb3b86.js → el-loading-9b671203.js} +2 -2
  64. package/es/el-menu-item-4531fd0e.cjs +1 -0
  65. package/es/{el-menu-item-77152904.js → el-menu-item-535fef90.js} +17 -18
  66. package/es/{el-message-box-a26e3ed4.js → el-message-box-621ed2f1.js} +11 -11
  67. package/es/el-message-box-f5717070.cjs +1 -0
  68. package/es/el-overlay-151708cb.cjs +1 -0
  69. package/es/{el-overlay-465cd11e.js → el-overlay-23de4324.js} +19 -19
  70. package/es/el-popconfirm-b8aa490e.cjs +1 -0
  71. package/es/{el-popconfirm-289b3e89.js → el-popconfirm-bcff0aa5.js} +20 -21
  72. package/es/el-popper-03988662.js +2094 -0
  73. package/es/el-popper-43ec37f4.cjs +1 -0
  74. package/es/el-segmented-79a1367c.cjs +1 -0
  75. package/es/{el-segmented-598b92b0.js → el-segmented-db3a86be.js} +4 -4
  76. package/es/{el-select-d47b5923.js → el-select-4bd0010d.js} +43 -44
  77. package/es/el-select-ec04e7ce.cjs +1 -0
  78. package/es/el-table-column-35e47229.cjs +14 -0
  79. package/es/{el-table-column-f1017e75.js → el-table-column-7af2bec7.js} +24 -25
  80. package/es/el-tag-5d5608e0.cjs +1 -0
  81. package/es/{el-tag-0a4197f5.js → el-tag-bef9e83d.js} +13 -13
  82. package/es/{el-text-c3ee80fe.js → el-text-f998902c.js} +2 -2
  83. package/es/{index-67180968.js → index-102edf6c.js} +3 -3
  84. package/es/{index-a76e80d9.cjs → index-2d7ac156.cjs} +2 -2
  85. package/es/{index-1b97095f.js → index-5c44d71a.js} +1 -1
  86. package/es/{index-d3e9a6f2.js → index-5ed42e9c.js} +11 -11
  87. package/es/{index-3301d870.js → index-6290ae0f.js} +3 -3
  88. package/es/{index-a17c90c5.js → index-936e7dec.js} +2 -2
  89. package/es/{index-8391a3df.js → index-960806da.js} +3 -3
  90. package/es/index-a00e0534.cjs +1 -0
  91. package/es/{index-33430c9f.js → index-a83ec4b7.js} +3 -3
  92. package/es/index-c58e90e9.cjs +1 -0
  93. package/es/{index-499cf989.js → index-ce21e2ce.js} +17 -17
  94. package/es/index-cfd00899.cjs +1 -0
  95. package/es/{index-afc4a1e5.js → index-d1b554ac.js} +3 -3
  96. package/es/{index-de24705f.js → index-d77a7336.js} +1 -1
  97. package/es/{index-3ed7914e.cjs → index-db846633.cjs} +1 -1
  98. package/es/{index-5b47cf8f.js → index-f3f6ee27.js} +11 -11
  99. package/es/{python-df3d529e.js → python-6cc6ec1b.js} +28 -29
  100. package/es/{python-b5d87b74.cjs → python-71f59893.cjs} +1 -1
  101. package/es/{raf-744cf95a.js → raf-80ef0c0a.js} +1 -1
  102. package/es/{scroll-6799bafc.js → scroll-679bd6bf.js} +1 -1
  103. package/es/style.css +1 -1
  104. package/es/{use-form-common-props-dd9617de.js → use-form-common-props-76a09d89.js} +28 -28
  105. package/es/{use-global-config-4dfc7236.js → use-global-config-0f43458b.js} +4 -4
  106. package/es/{validator-029bfc98.js → validator-0e037618.js} +1 -1
  107. package/es/{vnode-a83e6de8.js → vnode-5ddb7ed1.js} +1 -1
  108. package/es/{zh-cn-89e434f9.js → zh-cn-1227eb8a.js} +2 -2
  109. package/lib/aiTools.js +8 -2
  110. package/lib/bundle.js +1 -1
  111. package/lib/bundle.umd.cjs +172 -172
  112. package/lib/{index-a854f18c.js → index-298ca804.js} +14406 -14406
  113. package/lib/{python-77c3b638.js → python-4b8051bd.js} +1 -1
  114. package/lib/style.css +1 -1
  115. package/package.json +1 -1
  116. package/packages/VarietyAiHelper/images/like.png +0 -0
  117. package/packages/VarietyAiHelper/images/like_no.png +0 -0
  118. package/packages/VarietyAiHelper/index.vue +342 -410
  119. package/packages/VarietySearch/index.vue +1 -1
  120. package/public/aiTools.js +8 -2
  121. package/es/aiTools-4412c56c.cjs +0 -2
  122. package/es/aiTools-e6e4e996.js +0 -111
  123. package/es/dropdown-33c19e56.cjs +0 -1
  124. package/es/el-autocomplete-525ca867.cjs +0 -1
  125. package/es/el-checkbox-95325acd.cjs +0 -1
  126. package/es/el-dialog-4056070b.cjs +0 -1
  127. package/es/el-input-c7bf8e44.cjs +0 -1
  128. package/es/el-input-number-9d810842.cjs +0 -1
  129. package/es/el-menu-item-18d7d869.cjs +0 -1
  130. package/es/el-message-box-e4b8cc99.cjs +0 -1
  131. package/es/el-overlay-d26a1b98.cjs +0 -1
  132. package/es/el-popconfirm-12f6f35c.cjs +0 -1
  133. package/es/el-popper-c7648df6.cjs +0 -1
  134. package/es/el-popper-f96fc206.js +0 -1662
  135. package/es/el-segmented-f0bce6f2.cjs +0 -1
  136. package/es/el-select-f3cc464f.cjs +0 -1
  137. package/es/el-table-column-220ae131.cjs +0 -14
  138. package/es/el-tag-51bd491c.cjs +0 -1
  139. package/es/index-09ce1753.cjs +0 -1
  140. package/es/index-4b95bae1.cjs +0 -1
  141. package/es/index-68798830.cjs +0 -1
  142. package/es/index-8e88a0bd.js +0 -440
  143. package/es/index-d2cfd4a3.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";require("./base-ef747d02.cjs");const y=require("./el-autocomplete-525ca867.cjs");require("./el-input-c7bf8e44.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-popper-c7648df6.cjs");const e=require("vue"),f=require("./index-8901a38c.cjs"),S=require("./_plugin-vue_export-helper-f246444f.cjs");const V={class:"variety-auto-complete"},b={key:0},q={class:"label"},x={__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(s,{emit:u}){const d=e.inject("stConfig"),r=u,n=s,c=e.ref(""),p=async(t,l)=>{if(t===""||t==="null")l([]);else{const a={keyWord:t,pageNum:1,pageSize:999,userId:f.V("id"),hotSearchFlag:1},{body:o}=await d.request.post("/common/qt/getFeatureInfosByPage",a),g=o.list.map(({code:i,featureName:h})=>({label:`${i}   ${h}`,value:i}));l(g)}},_=({label:t,value:l})=>{const a=t.split(" ").at(-1);r("select",{name:a,code:l}),n.selectClearEnable&&(c.value="")},m=t=>{r("change",t)};return(t,l)=>{const a=y.ElAutocomplete;return e.openBlock(),e.createElementBlock("div",V,[s.labelShowEnable?(e.openBlock(),e.createElementBlock("span",b,"品种搜索:")):e.createCommentVNode("",!0),e.createVNode(a,{modelValue:c.value,"onUpdate:modelValue":l[0]||(l[0]=o=>c.value=o),clearable:"",size:n.size,placeholder:n.placeholder,"fetch-suggestions":p,onSelect:_,onChange:m},{default:e.withCtx(({item:o})=>[e.createElementVNode("div",q,e.toDisplayString(o.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},v=S._export_sfc(x,[["__scopeId","data-v-d433c4b8"]]);exports.VarietySelect=v;
1
+ "use strict";require("./base-ef747d02.cjs");const y=require("./el-autocomplete-16f66b34.cjs");require("./el-input-89222943.cjs");require("./el-scrollbar-bc3f790d.cjs");require("./el-popper-43ec37f4.cjs");const e=require("vue"),f=require("./index-8901a38c.cjs"),S=require("./_plugin-vue_export-helper-f246444f.cjs");const V={class:"variety-auto-complete"},b={key:0},q={class:"label"},x={__name:"VarietySelect",props:{size:{type:String,default:"default"},placeholder:{type:String,default:"请输入品种名称或代码"},labelShowEnable:{type:Boolean,default:!0},selectClearEnable:{type:Boolean,default:!0}},emits:["select","change"],setup(s,{emit:u}){const d=e.inject("stConfig"),r=u,n=s,c=e.ref(""),p=async(t,l)=>{if(t===""||t==="null")l([]);else{const a={keyWord:t,pageNum:1,pageSize:999,userId:f.V("id"),hotSearchFlag:1},{body:o}=await d.request.post("/common/qt/getFeatureInfosByPage",a),g=o.list.map(({code:i,featureName:h})=>({label:`${i}   ${h}`,value:i}));l(g)}},_=({label:t,value:l})=>{const a=t.split(" ").at(-1);r("select",{name:a,code:l}),n.selectClearEnable&&(c.value="")},m=t=>{r("change",t)};return(t,l)=>{const a=y.ElAutocomplete;return e.openBlock(),e.createElementBlock("div",V,[s.labelShowEnable?(e.openBlock(),e.createElementBlock("span",b,"品种搜索:")):e.createCommentVNode("",!0),e.createVNode(a,{modelValue:c.value,"onUpdate:modelValue":l[0]||(l[0]=o=>c.value=o),clearable:"",size:n.size,placeholder:n.placeholder,"fetch-suggestions":p,onSelect:_,onChange:m},{default:e.withCtx(({item:o})=>[e.createElementVNode("div",q,e.toDisplayString(o.label),1)]),_:1},8,["modelValue","size","placeholder"])])}}},v=S._export_sfc(x,[["__scopeId","data-v-d433c4b8"]]);exports.VarietySelect=v;
@@ -1,8 +1,8 @@
1
- import "./base-29f73b05.js";
2
- import { E as y } from "./el-autocomplete-3f34a1c3.js";
3
- import "./el-input-1f14a6e2.js";
1
+ import "./base-a5af3db3.js";
2
+ import { E as y } from "./el-autocomplete-342ae823.js";
3
+ import "./el-input-fa1445ad.js";
4
4
  import "./el-scrollbar-323542e7.js";
5
- import "./el-popper-f96fc206.js";
5
+ import "./el-popper-03988662.js";
6
6
  import { inject as S, ref as b, openBlock as i, createElementBlock as p, createCommentVNode as V, createVNode as x, withCtx as v, createElementVNode as C, toDisplayString as E } from "vue";
7
7
  import { V as z } from "./index-7ed0999e.js";
8
8
  import { _ as B } from "./_plugin-vue_export-helper-dad06003.js";
@@ -1,4 +1,4 @@
1
- "use strict";require("./base-ef747d02.cjs");const v=require("./el-input-c7bf8e44.cjs");require("./el-tooltip-0ea8fbf8.cjs");const q=require("./el-popper-c7648df6.cjs"),e=require("vue"),i=require("./index-476c4459.cjs");require("./el-message-0ea8fbf8.cjs");const V=require("./_plugin-vue_export-helper-f246444f.cjs"),f=require("./index-4b95bae1.cjs");require("./use-form-common-props-02be4928.cjs");require("./index-9780a537.cjs");require("./typescript-b63f8e83.cjs");require("./index-68798830.cjs");require("./index-09ce1753.cjs");require("./use-global-config-31b3ec57.cjs");require("./index-bb833443.cjs");require("./index-cfcd60ca.cjs");require("./config-provider-4c784baf.cjs");const c=r=>(e.pushScopeId("data-v-445e2903"),r=r(),e.popScopeId(),r),h={class:"variety-text-copy"},y={class:"stats-container"},N={class:"stat-item"},g=c(()=>e.createElementVNode("span",{class:"label"},"品种数量统计:",-1)),E={class:"value"},C=c(()=>e.createElementVNode("br",null,null,-1)),I=c(()=>e.createElementVNode("br",null,null,-1)),w={__name:"index",props:{required:{type:Boolean,default:!0}},setup(r,{expose:u}){const d=e.inject("stConfig"),p=r,o=e.ref(""),_=e.computed(()=>l(o.value).length),l=n=>n?n.split(`
1
+ "use strict";require("./base-ef747d02.cjs");const v=require("./el-input-89222943.cjs");require("./el-tooltip-0ea8fbf8.cjs");const q=require("./el-popper-43ec37f4.cjs"),e=require("vue"),i=require("./index-476c4459.cjs");require("./el-message-0ea8fbf8.cjs");const V=require("./_plugin-vue_export-helper-f246444f.cjs"),f=require("./index-c58e90e9.cjs");require("./use-form-common-props-02be4928.cjs");require("./index-9780a537.cjs");require("./typescript-b63f8e83.cjs");require("./index-cfd00899.cjs");require("./use-global-config-31b3ec57.cjs");require("./index-bb833443.cjs");require("./index-cfcd60ca.cjs");require("./config-provider-4c784baf.cjs");const c=r=>(e.pushScopeId("data-v-445e2903"),r=r(),e.popScopeId(),r),h={class:"variety-text-copy"},y={class:"stats-container"},N={class:"stat-item"},g=c(()=>e.createElementVNode("span",{class:"label"},"品种数量统计:",-1)),E={class:"value"},C=c(()=>e.createElementVNode("br",null,null,-1)),I=c(()=>e.createElementVNode("br",null,null,-1)),w={__name:"index",props:{required:{type:Boolean,default:!0}},setup(r,{expose:u}){const d=e.inject("stConfig"),p=r,o=e.ref(""),_=e.computed(()=>l(o.value).length),l=n=>n?n.split(`
2
2
  `).reduce((s,a)=>{const t=a.trim().replace(/\s+/gi," ").split(" ")[0];return t&&s.push(t),s},[]):[];return u({validate:n=>new Promise(async(s,a)=>{try{if(p.required&&(!o.value||o.value.trim()===""))return f.ElMessage.error("品种内容不可为空"),n(!1);const{body:t}=await d.request.post("/invest/analysis/strategy/verifyCodes",{codes:l(o.value)});return n(!0,t)}catch(t){return a(t)}})}),(n,s)=>{const a=i.ElIcon,t=q.ElTooltip,x=v.ElInput;return e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",y,[e.createElementVNode("div",N,[g,e.createElementVNode("span",E,e.toDisplayString(_.value),1),e.createVNode(t,{class:"box-item",effect:"dark",placement:"right"},{content:e.withCtx(()=>[e.createTextVNode(" 仅统计符合输入格式的数量, 输入格式示例(代码和名称需空格隔开, 名称可不写):"),C,e.createTextVNode("hc8888 热轧卷板期货指数 "),I,e.createTextVNode("sp8888 纸浆期货指数")]),default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.info_filled_default))]),_:1})]),_:1})])]),e.createVNode(x,{class:"textarea",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=m=>o.value=m),resize:"none",type:"textarea",placeholder:`文本格式要求示例:
3
3
  hc8888  热轧卷板期货指数
4
4
  sp8888  纸浆期货指数
@@ -1,42 +1,41 @@
1
- import "./base-29f73b05.js";
2
- import { E as y } from "./el-input-1f14a6e2.js";
1
+ import "./base-a5af3db3.js";
2
+ import { E as y } from "./el-input-fa1445ad.js";
3
3
  import "./el-tooltip-4ed993c7.js";
4
- import { E as h } from "./el-popper-f96fc206.js";
4
+ import { E as h } from "./el-popper-03988662.js";
5
5
  import { inject as g, ref as E, computed as C, openBlock as V, createElementBlock as I, createElementVNode as n, toDisplayString as S, createVNode as i, withCtx as l, createTextVNode as c, unref as b, pushScopeId as w, popScopeId as T } from "vue";
6
- import { i as q, E as B } from "./index-1b97095f.js";
6
+ import { i as q, E as B } from "./index-5c44d71a.js";
7
7
  import "./el-message-4ed993c7.js";
8
8
  import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
9
- import { E as k } from "./index-499cf989.js";
10
- import "./use-form-common-props-dd9617de.js";
11
- import "./index-8391a3df.js";
9
+ import { E as k } from "./index-ce21e2ce.js";
10
+ import "./use-form-common-props-76a09d89.js";
11
+ import "./index-960806da.js";
12
12
  import "./typescript-7ae59c4c.js";
13
- import "./index-8e88a0bd.js";
14
- import "./index-d3e9a6f2.js";
15
- import "./use-global-config-4dfc7236.js";
16
- import "./index-de24705f.js";
17
- import "./index-33430c9f.js";
18
- import "./config-provider-20b05e99.js";
13
+ import "./index-5ed42e9c.js";
14
+ import "./use-global-config-0f43458b.js";
15
+ import "./index-d77a7336.js";
16
+ import "./index-a83ec4b7.js";
17
+ import "./config-provider-7a3aca55.js";
19
18
  const p = (t) => (w("data-v-445e2903"), t = t(), T(), t), j = { class: "variety-text-copy" }, z = { class: "stats-container" }, D = { class: "stat-item" }, F = /* @__PURE__ */ p(() => /* @__PURE__ */ n("span", { class: "label" }, "品种数量统计:", -1)), M = { class: "value" }, P = /* @__PURE__ */ p(() => /* @__PURE__ */ n("br", null, null, -1)), U = /* @__PURE__ */ p(() => /* @__PURE__ */ n("br", null, null, -1)), A = {
20
19
  __name: "index",
21
20
  props: {
22
21
  required: { type: Boolean, default: !0 }
23
22
  },
24
23
  setup(t, { expose: d }) {
25
- const _ = g("stConfig"), m = t, o = E(""), f = C(() => u(o.value).length), u = (r) => r ? r.split(`
26
- `).reduce((s, a) => {
24
+ const _ = g("stConfig"), m = t, o = E(""), f = C(() => u(o.value).length), u = (s) => s ? s.split(`
25
+ `).reduce((r, a) => {
27
26
  const e = a.trim().replace(/\s+/gi, " ").split(" ")[0];
28
- return e && s.push(e), s;
27
+ return e && r.push(e), r;
29
28
  }, []) : [];
30
- return d({ validate: (r) => new Promise(async (s, a) => {
29
+ return d({ validate: (s) => new Promise(async (r, a) => {
31
30
  try {
32
31
  if (m.required && (!o.value || o.value.trim() === ""))
33
- return k.error("品种内容不可为空"), r(!1);
32
+ return k.error("品种内容不可为空"), s(!1);
34
33
  const { body: e } = await _.request.post("/invest/analysis/strategy/verifyCodes", { codes: u(o.value) });
35
- return r(!0, e);
34
+ return s(!0, e);
36
35
  } catch (e) {
37
36
  return a(e);
38
37
  }
39
- }) }), (r, s) => {
38
+ }) }), (s, r) => {
40
39
  const a = B, e = h, x = y;
41
40
  return V(), I("div", j, [
42
41
  n("div", z, [
@@ -70,7 +69,7 @@ const p = (t) => (w("data-v-445e2903"), t = t(), T(), t), j = { class: "variety-
70
69
  i(x, {
71
70
  class: "textarea",
72
71
  modelValue: o.value,
73
- "onUpdate:modelValue": s[0] || (s[0] = (v) => o.value = v),
72
+ "onUpdate:modelValue": r[0] || (r[0] = (v) => o.value = v),
74
73
  resize: "none",
75
74
  type: "textarea",
76
75
  placeholder: `文本格式要求示例:
@@ -81,11 +80,11 @@ bu8888  石油沥青期货指数`
81
80
  ]);
82
81
  };
83
82
  }
84
- }, G = /* @__PURE__ */ N(A, [["__scopeId", "data-v-445e2903"]]), ie = {
83
+ }, G = /* @__PURE__ */ N(A, [["__scopeId", "data-v-445e2903"]]), ae = {
85
84
  install(t) {
86
85
  t.component("st-varietyTextCopy", G);
87
86
  }
88
87
  };
89
88
  export {
90
- ie as default
89
+ ae as default
91
90
  };
@@ -1,22 +1,22 @@
1
- import { I as Oe, e as I, b as ae, u as Ie, f as xt, p as Q, j as We, n as Qe, x as Tt, s as Dl, c as Nt, y as Pl, i as $l, w as Jt } from "./base-29f73b05.js";
2
- import { E as Qt } from "./el-empty-f5a1607a.js";
1
+ import { I as Oe, e as I, b as ae, u as Ie, f as xt, p as Q, j as We, n as Qe, x as Tt, s as Dl, c as Nt, y as Pl, i as $l, w as Jt } from "./base-a5af3db3.js";
2
+ import { E as Qt } from "./el-empty-33cb66f1.js";
3
3
  import { B as Fl } from "./el-scrollbar-323542e7.js";
4
- import { E as Wl } from "./el-divider-523e5874.js";
5
- import { E as Gl } from "./el-button-cd144ee1.js";
4
+ import { E as Wl } from "./el-divider-4e059794.js";
5
+ import { E as Gl } from "./el-button-314171a0.js";
6
6
  import { getCurrentInstance as nt, computed as E, defineComponent as xe, ref as F, reactive as kl, unref as n, watch as Re, onBeforeUnmount as el, h as ue, withModifiers as Vl, shallowRef as $e, nextTick as Se, isVNode as Ne, toRef as Lt, inject as Et, onUpdated as Kl, createVNode as C, onMounted as rt, resolveDynamicComponent as zt, Fragment as jl, provide as tl, onActivated as Bl, mergeProps as Y, renderSlot as Ye, mergeModels as Dt, useModel as ql, onUnmounted as Ul, openBlock as Xe, createBlock as it, withCtx as De, createElementBlock as Yl, createTextVNode as Pt, createCommentVNode as $t } from "vue";
7
- import { d as Zl } from "./debounce-a09ce9a3.js";
7
+ import { d as Zl } from "./debounce-8d53f4dd.js";
8
8
  import { m as ll } from "./typescript-7ae59c4c.js";
9
- import { c as Xl } from "./castArray-609a313e.js";
10
- import { c as Jl, u as Ql } from "./use-form-common-props-dd9617de.js";
11
- import { c as ol, r as nl } from "./raf-744cf95a.js";
12
- import { m as eo } from "./index-8391a3df.js";
13
- import { g as to } from "./scroll-6799bafc.js";
14
- import { E as rl, g as lo, H as oo, I as no } from "./index-1b97095f.js";
15
- import { g as ro } from "./index-de24705f.js";
9
+ import { c as Xl } from "./castArray-7741a212.js";
10
+ import { c as Jl, u as Ql } from "./use-form-common-props-76a09d89.js";
11
+ import { c as ol, r as nl } from "./raf-80ef0c0a.js";
12
+ import { m as eo } from "./index-960806da.js";
13
+ import { g as to } from "./scroll-679bd6bf.js";
14
+ import { E as rl, g as lo, H as oo, I as no } from "./index-5c44d71a.js";
15
+ import { g as ro } from "./index-d77a7336.js";
16
16
  import { _ as ao } from "./_plugin-vue_export-helper-dad06003.js";
17
17
  import "./index-2e331d74.js";
18
- import "./use-global-config-4dfc7236.js";
19
- import "./index-33430c9f.js";
18
+ import "./use-global-config-0f43458b.js";
19
+ import "./index-a83ec4b7.js";
20
20
  import "./index-657047bb.js";
21
21
  var Ft = Number.isNaN || function(t) {
22
22
  return typeof t == "number" && t !== t;
@@ -1,6 +1,6 @@
1
- import { o as O, r as y } from "./use-form-common-props-dd9617de.js";
2
- import { j as p, a as m, l as x, o as w, U as i } from "./index-33430c9f.js";
3
- import { i as v, r as P } from "./index-8391a3df.js";
1
+ import { o as O, r as y } from "./use-form-common-props-76a09d89.js";
2
+ import { j as p, a as m, l as x, o as w, U as i } from "./index-a83ec4b7.js";
3
+ import { i as v, r as P } from "./index-960806da.js";
4
4
  var u = Object.create, b = function() {
5
5
  function e() {
6
6
  }
@@ -0,0 +1,113 @@
1
+ const w = async ({ baseUrl: d, path: c, token: u, value: o, sessionId: t, origin: i = "web", getSSE: n }) => {
2
+ try {
3
+ const r = await fetch(`${d}${c}`, {
4
+ method: "POST",
5
+ headers: {
6
+ "Content-Type": "application/json",
7
+ token: u
8
+ },
9
+ body: JSON.stringify({
10
+ query: o,
11
+ origin: i,
12
+ sessionId: t,
13
+ stream: !0
14
+ })
15
+ });
16
+ if (!r.ok) {
17
+ n("error", `HTTP ${r.status}: ${r.statusText}`);
18
+ return;
19
+ }
20
+ const s = r.body.getReader(), m = new TextDecoder();
21
+ let a = "", e;
22
+ for (; ; ) {
23
+ const { done: f, value: p } = await s.read();
24
+ if (f) {
25
+ n("finish");
26
+ break;
27
+ }
28
+ a += m.decode(p, { stream: !0 });
29
+ let h;
30
+ for (; (h = a.indexOf(`
31
+ `)) !== -1; ) {
32
+ const g = a.substring(0, h).trim();
33
+ if (a = a.substring(h + 1), g.startsWith("data: ")) {
34
+ const y = g.substring(6).trim();
35
+ if (!y || y === "[DONE]")
36
+ continue;
37
+ n("message", y);
38
+ }
39
+ }
40
+ }
41
+ } catch (r) {
42
+ console.error("SSE请求失败:", r), n("error", r.message || "sendToNodeSSE检测到异常");
43
+ }
44
+ }, T = async ({ baseUrl: d, token: c, value: u, sessionId: o, callback: t }) => {
45
+ const i = {};
46
+ return w({
47
+ baseUrl: d,
48
+ path: "/middleLayer/ai/varietyAiHelper",
49
+ token: c,
50
+ value: u,
51
+ sessionId: o,
52
+ origin: "web",
53
+ getSSE: (r, s) => {
54
+ var m, a;
55
+ switch (r) {
56
+ case "message": {
57
+ try {
58
+ const e = JSON.parse(s);
59
+ if (e.type === "session" && t("session", e.sessionId), e.node_name && e.node_status) {
60
+ const f = e.node_name, p = e.node_status === "success" ? "success" : "executing";
61
+ i[f] !== p && (i[f] = p, t("node", {
62
+ name: f,
63
+ status: p
64
+ }));
65
+ }
66
+ ((m = e.output) == null ? void 0 : m.finish_reason) === "stop" && ((a = e.output) != null && a.text) && t("message", e.output.text), e.error && t("error", e.error);
67
+ } catch {
68
+ }
69
+ break;
70
+ }
71
+ case "finish": {
72
+ t("finish");
73
+ break;
74
+ }
75
+ case "error": {
76
+ t("error", s);
77
+ break;
78
+ }
79
+ }
80
+ }
81
+ });
82
+ }, S = async ({ baseUrl: d, token: c, value: u, callback: o }) => w({
83
+ baseUrl: d,
84
+ path: "/middleLayer/ai/factorAiTest",
85
+ token: c,
86
+ value: u,
87
+ origin: "web",
88
+ getSSE: (i, n) => {
89
+ var r;
90
+ switch (i) {
91
+ case "message": {
92
+ try {
93
+ const s = JSON.parse(n);
94
+ s.output && o("message", (r = s.output) == null ? void 0 : r.content), s.error && o("error", s.error);
95
+ } catch {
96
+ }
97
+ break;
98
+ }
99
+ case "finish": {
100
+ o("finish");
101
+ break;
102
+ }
103
+ case "error": {
104
+ o("error", n);
105
+ break;
106
+ }
107
+ }
108
+ }
109
+ });
110
+ export {
111
+ S as a,
112
+ T as s
113
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";const g=async({baseUrl:d,path:c,token:u,value:o,sessionId:t,origin:a="web",getSSE:n})=>{try{const r=await fetch(`${d}${c}`,{method:"POST",headers:{"Content-Type":"application/json",token:u},body:JSON.stringify({query:o,origin:a,sessionId:t,stream:!0})});if(!r.ok){n("error",`HTTP ${r.status}: ${r.statusText}`);return}const s=r.body.getReader(),m=new TextDecoder;let i="",e;for(;;){const{done:f,value:p}=await s.read();if(f){n("finish");break}i+=m.decode(p,{stream:!0});let h;for(;(h=i.indexOf(`
2
+ `))!==-1;){const T=i.substring(0,h).trim();if(i=i.substring(h+1),T.startsWith("data: ")){const y=T.substring(6).trim();if(!y||y==="[DONE]")continue;n("message",y)}}}}catch(r){console.error("SSE请求失败:",r),n("error",r.message||"sendToNodeSSE检测到异常")}},w=async({baseUrl:d,token:c,value:u,sessionId:o,callback:t})=>{const a={};return g({baseUrl:d,path:"/middleLayer/ai/varietyAiHelper",token:c,value:u,sessionId:o,origin:"web",getSSE:(r,s)=>{var m,i;switch(r){case"message":{try{const e=JSON.parse(s);if(e.type==="session"&&t("session",e.sessionId),e.node_name&&e.node_status){const f=e.node_name,p=e.node_status==="success"?"success":"executing";a[f]!==p&&(a[f]=p,t("node",{name:f,status:p}))}((m=e.output)==null?void 0:m.finish_reason)==="stop"&&((i=e.output)!=null&&i.text)&&t("message",e.output.text),e.error&&t("error",e.error)}catch{}break}case"finish":{t("finish");break}case"error":{t("error",s);break}}}})},N=async({baseUrl:d,token:c,value:u,callback:o})=>g({baseUrl:d,path:"/middleLayer/ai/factorAiTest",token:c,value:u,origin:"web",getSSE:(a,n)=>{var r;switch(a){case"message":{try{const s=JSON.parse(n);s.output&&o("message",(r=s.output)==null?void 0:r.content),s.error&&o("error",s.error)}catch{}break}case"finish":{o("finish");break}case"error":{o("error",n);break}}}});exports.sendToNodeFactorAiTest=N;exports.sendToNodeVarietyAiHelper=w;
package/es/aiTools.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * @param {Function} params.getSSE - 回调函数 (type, str) => void
10
10
  * type: "finish" || "error" || "message"
11
11
  */
12
- const sendToNodeSSE = async ({ baseUrl, path, token, value, origin = "web", getSSE }) => {
12
+ const sendToNodeSSE = async ({ baseUrl, path, token, value, sessionId, origin = "web", getSSE }) => {
13
13
  try {
14
14
  // 创建请求
15
15
  const response = await fetch(`${baseUrl}${path}`, {
@@ -21,6 +21,7 @@ const sendToNodeSSE = async ({ baseUrl, path, token, value, origin = "web", getS
21
21
  body: JSON.stringify({
22
22
  query: value,
23
23
  origin,
24
+ sessionId,
24
25
  stream: true,
25
26
  }),
26
27
  });
@@ -69,7 +70,7 @@ const sendToNodeSSE = async ({ baseUrl, path, token, value, origin = "web", getS
69
70
  };
70
71
 
71
72
  // 品种池AI查询助手
72
- export const sendToNodeVarietyAiHelper = async ({ baseUrl, token, value, callback }) => {
73
+ export const sendToNodeVarietyAiHelper = async ({ baseUrl, token, value, sessionId, callback }) => {
73
74
  // 工作流节点
74
75
  const nodeMap = {};
75
76
  const params = {
@@ -77,12 +78,17 @@ export const sendToNodeVarietyAiHelper = async ({ baseUrl, token, value, callbac
77
78
  path: "/middleLayer/ai/varietyAiHelper",
78
79
  token,
79
80
  value,
81
+ sessionId,
80
82
  origin: "web",
81
83
  getSSE: (type, str) => {
82
84
  switch (type) {
83
85
  case "message": {
84
86
  try {
85
87
  const data = JSON.parse(str);
88
+ // 会话Id
89
+ if (data.type === "session") {
90
+ callback("session", data.sessionId);
91
+ }
86
92
  // 节点状态
87
93
  if (data.node_name && data.node_status) {
88
94
  const nodeName = data.node_name;
@@ -245,8 +245,8 @@ export {
245
245
  jt as D,
246
246
  g as E,
247
247
  Zt as F,
248
- ht as G,
249
- rt as H,
248
+ rt as G,
249
+ ht as H,
250
250
  Ot as I,
251
251
  Z as J,
252
252
  Dt as K,
@@ -1,4 +1,4 @@
1
- import { c as a } from "./index-8391a3df.js";
1
+ import { c as a } from "./index-960806da.js";
2
2
  function e() {
3
3
  if (!arguments.length)
4
4
  return [];
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as p, watch as s, renderSlot as l } from "vue";
2
- import { p as m } from "./use-global-config-4dfc7236.js";
3
- import { m as u } from "./index-33430c9f.js";
4
- import { b as d, e } from "./base-29f73b05.js";
5
- import { h as c } from "./use-form-common-props-dd9617de.js";
2
+ import { p as m } from "./use-global-config-0f43458b.js";
3
+ import { m as u } from "./index-a83ec4b7.js";
4
+ import { b as d, e } from "./base-a5af3db3.js";
5
+ import { h as c } from "./use-form-common-props-76a09d89.js";
6
6
  const f = d({
7
7
  a11y: {
8
8
  type: Boolean,
@@ -1,4 +1,4 @@
1
- import { l as L, i as v, r as M } from "./index-8391a3df.js";
1
+ import { l as L, i as v, r as M } from "./index-960806da.js";
2
2
  var N = /\s/;
3
3
  function $(n) {
4
4
  for (var r = n.length; r-- && N.test(n.charAt(r)); )
@@ -1,7 +1,6 @@
1
- import { a as f, u as _, r as b } from "./el-popper-f96fc206.js";
2
- import { _ as g, b as E, e as o } from "./base-29f73b05.js";
3
- import { E as e } from "./index-8e88a0bd.js";
4
- import { i as L } from "./use-form-common-props-dd9617de.js";
1
+ import { i as f, a as e, g as _, r as b } from "./el-popper-03988662.js";
2
+ import { _ as g, b as E, e as o } from "./base-a5af3db3.js";
3
+ import { i as L } from "./use-form-common-props-76a09d89.js";
5
4
  import { defineComponent as y, renderSlot as T, ref as I, provide as C, inject as $, onMounted as v, unref as m, onBeforeUnmount as h } from "vue";
6
5
  const w = y({
7
6
  inheritAttrs: !1
@@ -61,7 +60,7 @@ const x = "data-el-collection-item", Y = (n) => {
61
60
  ElCollection: d,
62
61
  ElCollectionItem: O
63
62
  };
64
- }, q = E({
63
+ }, k = E({
65
64
  trigger: f.trigger,
66
65
  triggerKeys: {
67
66
  type: o(Array),
@@ -141,7 +140,7 @@ const x = "data-el-collection-item", Y = (n) => {
141
140
  type: Boolean,
142
141
  default: !0
143
142
  }
144
- }), z = E({
143
+ }), q = E({
145
144
  command: {
146
145
  type: [Object, String, Number],
147
146
  default: () => ({})
@@ -152,28 +151,28 @@ const x = "data-el-collection-item", Y = (n) => {
152
151
  icon: {
153
152
  type: L
154
153
  }
155
- }), G = E({
154
+ }), z = E({
156
155
  onKeydown: { type: o(Function) }
157
156
  }), R = [
158
157
  e.down,
159
158
  e.pageDown,
160
159
  e.home
161
- ], j = [e.up, e.pageUp, e.end], H = [...R, ...j], {
162
- ElCollection: W,
163
- ElCollectionItem: Q,
164
- COLLECTION_INJECTION_KEY: X,
165
- COLLECTION_ITEM_INJECTION_KEY: Z
160
+ ], j = [e.up, e.pageUp, e.end], G = [...R, ...j], {
161
+ ElCollection: H,
162
+ ElCollectionItem: W,
163
+ COLLECTION_INJECTION_KEY: Q,
164
+ COLLECTION_ITEM_INJECTION_KEY: X
166
165
  } = Y("Dropdown");
167
166
  export {
168
- Z as C,
169
- W as E,
170
- H as F,
167
+ X as C,
168
+ H as E,
169
+ G as F,
171
170
  j as L,
172
- z as a,
171
+ q as a,
173
172
  x as b,
174
173
  Y as c,
175
- q as d,
176
- Q as e,
177
- G as f,
178
- X as g
174
+ k as d,
175
+ W as e,
176
+ z as f,
177
+ Q as g
179
178
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./el-popper-43ec37f4.cjs"),o=require("./base-ef747d02.cjs"),O=require("./use-form-common-props-02be4928.cjs"),t=require("vue"),N=t.defineComponent({inheritAttrs:!1});function y(r,l,c,i,d,E){return t.renderSlot(r.$slots,"default")}var g=o._export_sfc(N,[["render",y],["__file","collection.vue"]]);const S=t.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function P(r,l,c,i,d,E){return t.renderSlot(r.$slots,"default")}var L=o._export_sfc(S,[["render",P],["__file","collection-item.vue"]]);const f="data-el-collection-item",T=r=>{const l=`El${r}Collection`,c=`${l}Item`,i=Symbol(l),d=Symbol(c),E={...g,name:l,setup(){const a=t.ref(),u=new Map,p=()=>{const s=t.unref(a);if(!s)return[];const n=Array.from(s.querySelectorAll(`[${f}]`));return[...u.values()].sort((m,I)=>n.indexOf(m.ref)-n.indexOf(I.ref))};t.provide(i,{itemMap:u,getItems:p,collectionRef:a})}},C={...L,name:c,setup(a,{attrs:u}){const p=t.ref(),s=t.inject(i,void 0);t.provide(d,{collectionItemRef:p}),t.onMounted(()=>{const n=t.unref(p);n&&s.itemMap.set(n,{ref:n,...u})}),t.onBeforeUnmount(()=>{const n=t.unref(p);s.itemMap.delete(n)})}};return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:d,ElCollection:E,ElCollectionItem:C}},b=o.buildProps({trigger:e.useTooltipTriggerProps.trigger,triggerKeys:{type:o.definePropType(Array),default:()=>[e.EVENT_CODE.enter,e.EVENT_CODE.numpadEnter,e.EVENT_CODE.space,e.EVENT_CODE.down]},virtualTriggering:e.useTooltipTriggerProps.virtualTriggering,virtualRef:e.useTooltipTriggerProps.virtualRef,effect:{...e.useTooltipContentProps.effect,default:"light"},type:{type:o.definePropType(String)},placement:{type:o.definePropType(String),default:"bottom"},popperOptions:{type:o.definePropType(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:o.definePropType([Number,String]),default:0},maxHeight:{type:o.definePropType([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:e.roleTypes,default:"menu"},buttonProps:{type:o.definePropType(Object)},teleported:e.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0}}),v=o.buildProps({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:O.iconPropType}}),w=o.buildProps({onKeydown:{type:o.definePropType(Function)}}),M=[e.EVENT_CODE.down,e.EVENT_CODE.pageDown,e.EVENT_CODE.home],_=[e.EVENT_CODE.up,e.EVENT_CODE.pageUp,e.EVENT_CODE.end],$=[...M,..._],{ElCollection:h,ElCollectionItem:K,COLLECTION_INJECTION_KEY:A,COLLECTION_ITEM_INJECTION_KEY:D}=T("Dropdown");exports.COLLECTION_INJECTION_KEY=A;exports.COLLECTION_ITEM_INJECTION_KEY=D;exports.COLLECTION_ITEM_SIGN=f;exports.ElCollection=h;exports.ElCollectionItem=K;exports.FIRST_LAST_KEYS=$;exports.LAST_KEYS=_;exports.createCollectionWithScope=T;exports.dropdownItemProps=v;exports.dropdownMenuProps=w;exports.dropdownProps=b;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),K=require("./use-form-common-props-02be4928.cjs"),M=require("./index-476c4459.cjs"),S=require("./el-input-89222943.cjs"),se=require("./index-a00e0534.cjs"),u=require("./el-popper-43ec37f4.cjs"),n=require("./base-ef747d02.cjs"),re=require("./index-9780a537.cjs"),ae=require("./debounce-62f5b6e8.cjs"),ue=n.buildProps({...S.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:n.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:n.definePropType([Function,Array]),default:n.NOOP},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:u.useTooltipContentProps.teleported,appendTo:u.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),ie={[u.UPDATE_MODEL_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.INPUT_EVENT]:s=>n.isString(s)||n.isNumber(s),[u.CHANGE_EVENT]:s=>n.isString(s)||n.isNumber(s),focus:s=>s instanceof FocusEvent,blur:s=>s instanceof FocusEvent,clear:()=>!0,select:s=>n.isObject(s)},U="ElAutocomplete",ce=e.defineComponent({name:U,inheritAttrs:!1}),de=e.defineComponent({...ce,props:ue,emits:ie,setup(s,{expose:z,emit:d}){const a=s,L=e.computed(()=>u.pick(a,Object.keys(S.inputProps))),R=e.useAttrs(),T=K.useFormDisabled(),i=n.useNamespace("autocomplete"),f=e.ref(),$=e.ref(),b=e.ref(),A=e.ref();let P=!1,C=!1;const p=e.ref([]),r=e.ref(-1),V=e.ref(""),v=e.ref(!1),E=e.ref(!1),m=e.ref(!1),h=re.useId(),W=e.computed(()=>R.style),g=e.computed(()=>(p.value.length>0||m.value)&&v.value),I=e.computed(()=>!a.hideLoading&&m.value),H=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),x=()=>{g.value&&(V.value=`${f.value.$el.offsetWidth}px`)},G=()=>{r.value=-1},_=async t=>{if(E.value)return;const o=l=>{m.value=!1,!E.value&&(n.isArray(l)?(p.value=l,r.value=a.highlightFirstItem?0:-1):u.throwError(U,"autocomplete suggestions must be an array"))};if(m.value=!0,n.isArray(a.fetchSuggestions))o(a.fetchSuggestions);else{const l=await a.fetchSuggestions(t,o);n.isArray(l)&&o(l)}},B=ae.debounce(_,a.debounce),j=t=>{const o=!!t;if(d(u.INPUT_EVENT,t),d(u.UPDATE_MODEL_EVENT,t),E.value=!1,v.value||(v.value=o),!a.triggerOnFocus&&!t){E.value=!0,p.value=[];return}B(t)},J=t=>{var o;T.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||H.value.includes(document.activeElement))&&(v.value=!0)},Q=t=>{d(u.CHANGE_EVENT,t)},X=t=>{var o;if(C)C=!1;else{v.value=!0,d("focus",t);const l=(o=a.modelValue)!=null?o:"";a.triggerOnFocus&&!P&&B(String(l))}},Y=t=>{setTimeout(()=>{var o;if((o=b.value)!=null&&o.isFocusInsideContent()){C=!0;return}v.value&&y(),d("blur",t)})},Z=()=>{v.value=!1,d(u.UPDATE_MODEL_EVENT,""),d("clear")},D=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&r.value>=0&&r.value<p.value.length?w(p.value[r.value]):a.selectWhenUnmatched&&(d("select",{value:a.modelValue}),p.value=[],r.value=-1))},ee=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),y())},y=()=>{v.value=!1},te=()=>{var t;(t=f.value)==null||t.focus()},oe=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{d(u.INPUT_EVENT,t[a.valueKey]),d(u.UPDATE_MODEL_EVENT,t[a.valueKey]),d("select",t),p.value=[],r.value=-1},k=t=>{var o,l;if(!g.value||m.value)return;if(t<0){r.value=-1;return}t>=p.value.length&&(t=p.value.length-1);const c=$.value.querySelector(`.${i.be("suggestion","wrap")}`),ne=c.querySelectorAll(`.${i.be("suggestion","list")} li`)[t],O=c.scrollTop,{offsetTop:q,scrollHeight:N}=ne;q+N>O+c.clientHeight&&(c.scrollTop+=N),q<O&&(c.scrollTop-=N),r.value=t,(l=(o=f.value)==null?void 0:o.ref)==null||l.setAttribute("aria-activedescendant",`${h.value}-item-${r.value}`)},F=K.onClickOutside(A,()=>{var t;(t=b.value)!=null&&t.isFocusInsideContent()||g.value&&y()});return e.onBeforeUnmount(()=>{F==null||F()}),e.onMounted(()=>{var t;const o=(t=f.value)==null?void 0:t.ref;o&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${h.value}-item-${r.value}`}].forEach(({key:l,value:c})=>o.setAttribute(l,c)),P=o.hasAttribute("readonly"))}),z({highlightedIndex:r,activated:v,loading:m,inputRef:f,popperRef:b,suggestions:p,handleSelect:w,handleKeyEnter:D,focus:te,blur:oe,close:y,highlight:k,getData:_}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(u.ElTooltip),{ref_key:"popperRef",ref:b,visible:e.unref(g),placement:t.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(i).e("popper"),t.popperClass],teleported:t.teleported,"append-to":t.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:x,onHide:G},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:$,class:e.normalizeClass([e.unref(i).b("suggestion"),e.unref(i).is("loading",e.unref(I))]),style:e.normalizeStyle({[t.fitInputWidth?"width":"minWidth"]:V.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).be("suggestion","header")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"header")],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(se.ElScrollbar),{id:e.unref(h),tag:"ul","wrap-class":e.unref(i).be("suggestion","wrap"),"view-class":e.unref(i).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[e.unref(I)?(e.openBlock(),e.createElementBlock("li",{key:0},[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(M.ElIcon),{class:e.normalizeClass(e.unref(i).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,(l,c)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(h)}-item-${c}`,key:c,class:e.normalizeClass({highlighted:r.value===c}),role:"option","aria-selected":r.value===c,onClick:le=>w(l)},[e.renderSlot(t.$slots,"default",{item:l},()=>[e.createTextVNode(e.toDisplayString(l[t.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).be("suggestion","footer")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"footer")],10,["onClick"])):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:A,class:e.normalizeClass([e.unref(i).b(),t.$attrs.class]),style:e.normalizeStyle(e.unref(W)),role:"combobox","aria-haspopup":"listbox","aria-expanded":e.unref(g),"aria-owns":e.unref(h)},[e.createVNode(e.unref(S.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(e.unref(L),t.$attrs),{"model-value":t.modelValue,disabled:e.unref(T),onInput:j,onChange:Q,onFocus:X,onBlur:Y,onClear:Z,onKeydown:[e.withKeys(e.withModifiers(l=>k(r.value-1),["prevent"]),["up"]),e.withKeys(e.withModifiers(l=>k(r.value+1),["prevent"]),["down"]),e.withKeys(D,["enter"]),e.withKeys(y,["tab"]),e.withKeys(ee,["esc"])],onMousedown:J}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")])}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")])}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")])}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var pe=n._export_sfc(de,[["__file","autocomplete.vue"]]);const fe=n.withInstall(pe);exports.ElAutocomplete=fe;
@@ -1,14 +1,13 @@
1
1
  import { defineComponent as oe, computed as k, useAttrs as Ce, ref as d, onBeforeUnmount as Se, onMounted as Ie, openBlock as b, createBlock as Ne, unref as t, withCtx as v, createElementVNode as X, normalizeClass as y, normalizeStyle as Y, createElementBlock as w, withModifiers as N, renderSlot as g, createCommentVNode as Z, createVNode as T, Fragment as Te, renderList as Ae, createTextVNode as Fe, toDisplayString as Pe, mergeProps as x, withKeys as C, createSlots as Ve } from "vue";
2
- import { g as _e, x as Be } from "./use-form-common-props-dd9617de.js";
3
- import { E as De, l as Oe } from "./index-1b97095f.js";
4
- import { i as se, E as Ke } from "./el-input-1f14a6e2.js";
5
- import { E as Re } from "./index-67180968.js";
6
- import { u as ee, E as Me } from "./el-popper-f96fc206.js";
7
- import { b as Ue, e as te, N as We, c as B, p as D, f as Le, u as He, _ as qe, j as O, w as je } from "./base-29f73b05.js";
8
- import { U as A, I as K, C as le, p as ze, a as Ge } from "./index-8e88a0bd.js";
9
- import { u as Je } from "./index-8391a3df.js";
10
- import { d as Qe } from "./debounce-a09ce9a3.js";
11
- const Xe = Ue({
2
+ import { g as _e, x as Be } from "./use-form-common-props-76a09d89.js";
3
+ import { E as De, l as Oe } from "./index-5c44d71a.js";
4
+ import { i as se, E as Ke } from "./el-input-fa1445ad.js";
5
+ import { E as Re } from "./index-102edf6c.js";
6
+ import { g as ee, U as A, I as K, C as le, p as Me, E as Ue, b as We } from "./el-popper-03988662.js";
7
+ import { b as Le, e as te, N as He, c as B, p as D, f as qe, u as je, _ as ze, j as O, w as Ge } from "./base-a5af3db3.js";
8
+ import { u as Je } from "./index-960806da.js";
9
+ import { d as Qe } from "./debounce-8d53f4dd.js";
10
+ const Xe = Le({
12
11
  ...se,
13
12
  valueKey: {
14
13
  type: String,
@@ -36,7 +35,7 @@ const Xe = Ue({
36
35
  },
37
36
  fetchSuggestions: {
38
37
  type: te([Function, Array]),
39
- default: We
38
+ default: He
40
39
  },
41
40
  popperClass: {
42
41
  type: String,
@@ -59,7 +58,7 @@ const Xe = Ue({
59
58
  focus: (l) => l instanceof FocusEvent,
60
59
  blur: (l) => l instanceof FocusEvent,
61
60
  clear: () => !0,
62
- select: (l) => Le(l)
61
+ select: (l) => qe(l)
63
62
  }, ae = "ElAutocomplete", Ze = oe({
64
63
  name: ae,
65
64
  inheritAttrs: !1
@@ -68,7 +67,7 @@ const Xe = Ue({
68
67
  props: Xe,
69
68
  emits: Ye,
70
69
  setup(l, { expose: ne, emit: i }) {
71
- const n = l, re = k(() => ze(n, Object.keys(se))), ue = Ce(), R = _e(), r = He("autocomplete"), p = d(), M = d(), S = d(), U = d();
70
+ const n = l, re = k(() => Me(n, Object.keys(se))), ue = Ce(), R = _e(), r = je("autocomplete"), p = d(), M = d(), S = d(), U = d();
72
71
  let W = !1, F = !1;
73
72
  const c = d([]), a = d(-1), L = d(""), f = d(!1), I = d(!1), h = d(!1), E = Je(), ie = k(() => ue.style), m = k(() => (c.value.length > 0 || h.value) && f.value), H = k(() => !n.hideLoading && h.value), ce = k(() => p.value ? Array.from(p.value.$el.querySelectorAll("input")) : []), pe = () => {
74
73
  m.value && (L.value = `${p.value.$el.offsetWidth}px`);
@@ -78,7 +77,7 @@ const Xe = Ue({
78
77
  if (I.value)
79
78
  return;
80
79
  const o = (s) => {
81
- h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) : Ge(ae, "autocomplete suggestions must be an array"));
80
+ h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) : We(ae, "autocomplete suggestions must be an array"));
82
81
  };
83
82
  if (h.value = !0, O(n.fetchSuggestions))
84
83
  o(n.fetchSuggestions);
@@ -176,7 +175,7 @@ const Xe = Ue({
176
175
  close: $,
177
176
  highlight: V,
178
177
  getData: q
179
- }), (e, o) => (b(), Ne(t(Me), {
178
+ }), (e, o) => (b(), Ne(t(Ue), {
180
179
  ref_key: "popperRef",
181
180
  ref: S,
182
181
  visible: t(m),
@@ -323,8 +322,8 @@ const Xe = Ue({
323
322
  }, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
324
323
  }
325
324
  });
326
- var et = /* @__PURE__ */ qe(xe, [["__file", "autocomplete.vue"]]);
327
- const pt = je(et);
325
+ var et = /* @__PURE__ */ ze(xe, [["__file", "autocomplete.vue"]]);
326
+ const ct = Ge(et);
328
327
  export {
329
- pt as E
328
+ ct as E
330
329
  };
@@ -1,9 +1,9 @@
1
1
  import { computed as u, inject as M, ref as O, useSlots as R, Text as q, defineComponent as B, openBlock as m, createBlock as y, resolveDynamicComponent as N, mergeProps as H, unref as d, withCtx as V, createElementBlock as $, Fragment as J, renderSlot as k, normalizeClass as w, createCommentVNode as T, provide as L, reactive as Q, toRef as P } from "vue";
2
- import { l as W, E as G } from "./index-1b97095f.js";
2
+ import { l as W, E as G } from "./index-5c44d71a.js";
3
3
  import { u as X } from "./index-2e331d74.js";
4
- import { a as Y } from "./use-global-config-4dfc7236.js";
5
- import { d as Z, e as tt, g as F, h as et, i as D } from "./use-form-common-props-dd9617de.js";
6
- import { b as ot, e as lt, u as I, _ as K, w as nt, l as at } from "./base-29f73b05.js";
4
+ import { a as Y } from "./use-global-config-0f43458b.js";
5
+ import { d as Z, e as tt, g as F, h as et, i as D } from "./use-form-common-props-76a09d89.js";
6
+ import { b as ot, e as lt, u as I, _ as K, w as nt, l as at } from "./base-a5af3db3.js";
7
7
  import { T as rt } from "./index-657047bb.js";
8
8
  const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
9
9
  X({
@@ -1,8 +1,8 @@
1
1
  import { inject as I, computed as m, getCurrentInstance as X, watch as Y, nextTick as Z, ref as D, toRaw as H, defineComponent as S, useSlots as ee, openBlock as V, createBlock as w, resolveDynamicComponent as le, unref as s, normalizeClass as y, withCtx as ae, createElementVNode as N, withDirectives as te, mergeProps as A, isRef as ne, withModifiers as oe, vModelCheckbox as ue, createElementBlock as E, renderSlot as j, Fragment as se, createTextVNode as ie, toDisplayString as re, createCommentVNode as $, normalizeStyle as Ve, provide as ye, toRefs as Se, renderList as Le } from "vue";
2
- import { h as ce, g as Ee, d as M, e as W, f as de } from "./use-form-common-props-dd9617de.js";
3
- import { u as be, U as F, d as ve, C as P, p as Be } from "./index-8e88a0bd.js";
4
- import { c as J, p as Q, o as U, i as O, j as B, k as T, f as Ie, u as R, _ as K, b as Ne, e as G, w as Fe, l as me } from "./base-29f73b05.js";
5
- import { i as fe } from "./index-33430c9f.js";
2
+ import { h as ce, g as Ee, d as M, e as W, f as de } from "./use-form-common-props-76a09d89.js";
3
+ import { u as be, U as F, d as ve, C as P, p as Be } from "./el-popper-03988662.js";
4
+ import { c as J, p as Q, o as U, i as O, j as B, k as T, f as Ie, u as R, _ as K, b as Ne, e as G, w as Fe, l as me } from "./base-a5af3db3.js";
5
+ import { i as fe } from "./index-a83ec4b7.js";
6
6
  import { u as z } from "./index-2e331d74.js";
7
7
  const he = {
8
8
  modelValue: {
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),E=require("./use-form-common-props-02be4928.cjs"),g=require("./el-popper-43ec37f4.cjs"),o=require("./base-ef747d02.cjs"),L=require("./index-cfcd60ca.cjs"),B=require("./index-f1c702f6.cjs"),N={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:E.useSizeProp,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...g.useAriaProps(["ariaControls"])},I={[g.UPDATE_MODEL_EVENT]:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l),change:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l)},y=Symbol("checkboxGroupContextKey"),A=({model:l,isChecked:t})=>{const i=e.inject(y,void 0),n=e.computed(()=>{var c,b;const u=(c=i==null?void 0:i.max)==null?void 0:c.value,v=(b=i==null?void 0:i.min)==null?void 0:b.value;return!o.isUndefined(u)&&l.value.length>=u&&!t.value||!o.isUndefined(v)&&l.value.length<=v&&t.value});return{isDisabled:E.useFormDisabled(e.computed(()=>(i==null?void 0:i.disabled.value)||n.value)),isLimitDisabled:n}},w=(l,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:m,isLabeledByFormItem:c})=>{const b=e.inject(y,void 0),{formItem:u}=E.useFormItem(),{emit:v}=e.getCurrentInstance();function f(h){var a,C,k,d;return[!0,l.trueValue,l.trueLabel].includes(h)?(C=(a=l.trueValue)!=null?a:l.trueLabel)!=null?C:!0:(d=(k=l.falseValue)!=null?k:l.falseLabel)!=null?d:!1}function r(h,a){v(g.CHANGE_EVENT,f(h),a)}function s(h){if(i.value)return;const a=h.target;v(g.CHANGE_EVENT,f(a.checked),h)}async function p(h){i.value||!n.value&&!m.value&&c.value&&(h.composedPath().some(k=>k.tagName==="LABEL")||(t.value=f([!1,l.falseValue,l.falseLabel].includes(t.value)),await e.nextTick(),r(t.value,h)))}const x=e.computed(()=>(b==null?void 0:b.validateEvent)||l.validateEvent);return e.watch(()=>l.modelValue,()=>{x.value&&(u==null||u.validate("change").catch(h=>g.debugWarn()))}),{handleChange:s,onClickRoot:p}},G=l=>{const t=e.ref(!1),{emit:i}=e.getCurrentInstance(),n=e.inject(y,void 0),m=e.computed(()=>o.isUndefined(n)===!1),c=e.ref(!1),b=e.computed({get(){var u,v;return m.value?(u=n==null?void 0:n.modelValue)==null?void 0:u.value:(v=l.modelValue)!=null?v:t.value},set(u){var v,f;m.value&&o.isArray(u)?(c.value=((v=n==null?void 0:n.max)==null?void 0:v.value)!==void 0&&u.length>(n==null?void 0:n.max.value)&&u.length>b.value.length,c.value===!1&&((f=n==null?void 0:n.changeEvent)==null||f.call(n,u))):(i(g.UPDATE_MODEL_EVENT,u),t.value=u)}});return{model:b,isGroup:m,isLimitExceeded:c}},$=(l,t,{model:i})=>{const n=e.inject(y,void 0),m=e.ref(!1),c=e.computed(()=>o.isPropAbsent(l.value)?l.label:l.value),b=e.computed(()=>{const r=i.value;return o.isBoolean(r)?r:o.isArray(r)?o.isObject(c.value)?r.map(e.toRaw).some(s=>L.isEqual(s,c.value)):r.map(e.toRaw).includes(c.value):r!=null?r===l.trueValue||r===l.trueLabel:!!r}),u=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.size)==null?void 0:r.value}),{prop:!0}),v=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.size)==null?void 0:r.value})),f=e.computed(()=>!!t.default||!o.isPropAbsent(c.value));return{checkboxButtonSize:u,isChecked:b,isFocused:m,checkboxSize:v,hasOwnLabel:f,actualValue:c}},D=(l,t)=>{const{formItem:i}=E.useFormItem(),{model:n,isGroup:m,isLimitExceeded:c}=G(l),{isFocused:b,isChecked:u,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,actualValue:s}=$(l,t,{model:n}),{isDisabled:p}=A({model:n,isChecked:u}),{inputId:x,isLabeledByFormItem:h}=E.useFormItemInputId(l,{formItemContext:i,disableIdGeneration:r,disableIdManagement:m}),{handleChange:a,onClickRoot:C}=w(l,{model:n,isLimitExceeded:c,hasOwnLabel:r,isDisabled:p,isLabeledByFormItem:h});return(()=>{function d(){var _,V;o.isArray(n.value)&&!n.value.includes(s.value)?n.value.push(s.value):n.value=(V=(_=l.trueValue)!=null?_:l.trueLabel)!=null?V:!0}l.checked&&d()})(),B.useDeprecated({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>m.value&&o.isPropAbsent(l.value))),B.useDeprecated({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.trueLabel)),B.useDeprecated({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.falseLabel)),{inputId:x,isLabeledByFormItem:h,isChecked:u,isDisabled:p,isFocused:b,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,model:n,actualValue:s,handleChange:a,onClickRoot:C}},U=e.defineComponent({name:"ElCheckbox"}),O=e.defineComponent({...U,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{inputId:n,isLabeledByFormItem:m,isChecked:c,isDisabled:b,isFocused:u,checkboxSize:v,hasOwnLabel:f,model:r,actualValue:s,handleChange:p,onClickRoot:x}=D(t,i),h=e.computed(()=>{var d,_,V,S;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(_=(d=t.trueValue)!=null?d:t.trueLabel)!=null?_:!0,"false-value":(S=(V=t.falseValue)!=null?V:t.falseLabel)!=null?S:!1}:{value:s.value}}),a=o.useNamespace("checkbox"),C=e.computed(()=>[a.b(),a.m(v.value),a.is("disabled",b.value),a.is("bordered",t.border),a.is("checked",c.value)]),k=e.computed(()=>[a.e("input"),a.is("disabled",b.value),a.is("checked",c.value),a.is("indeterminate",t.indeterminate),a.is("focus",u.value)]);return(d,_)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(!e.unref(f)&&e.unref(m)?"span":"label"),{class:e.normalizeClass(e.unref(C)),"aria-controls":d.indeterminate?d.ariaControls:null,onClick:e.unref(x)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(k))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":V=>e.isRef(r)?r.value=V:null,class:e.unref(a).e("original"),type:"checkbox",indeterminate:d.indeterminate,name:d.name,tabindex:d.tabindex,disabled:e.unref(b)},e.unref(h),{onChange:e.unref(p),onFocus:V=>u.value=!0,onBlur:V=>u.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(r)]]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("inner"))},null,2)],2),e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).e("label"))},[e.renderSlot(d.$slots,"default"),d.$slots.default?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.label),1)],64))],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var P=o._export_sfc(O,[["__file","checkbox.vue"]]);const M=e.defineComponent({name:"ElCheckboxButton"}),j=e.defineComponent({...M,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{isFocused:n,isChecked:m,isDisabled:c,checkboxButtonSize:b,model:u,actualValue:v,handleChange:f}=D(t,i),r=e.computed(()=>{var a,C,k,d;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(C=(a=t.trueValue)!=null?a:t.trueLabel)!=null?C:!0,"false-value":(d=(k=t.falseValue)!=null?k:t.falseLabel)!=null?d:!1}:{value:v.value}}),s=e.inject(y,void 0),p=o.useNamespace("checkbox"),x=e.computed(()=>{var a,C,k,d;const _=(C=(a=s==null?void 0:s.fill)==null?void 0:a.value)!=null?C:"";return{backgroundColor:_,borderColor:_,color:(d=(k=s==null?void 0:s.textColor)==null?void 0:k.value)!=null?d:"",boxShadow:_?`-1px 0 0 0 ${_}`:void 0}}),h=e.computed(()=>[p.b("button"),p.bm("button",b.value),p.is("disabled",c.value),p.is("checked",m.value),p.is("focus",n.value)]);return(a,C)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(h))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":k=>e.isRef(u)?u.value=k:null,class:e.unref(p).be("button","original"),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:e.unref(c)},e.unref(r),{onChange:e.unref(f),onFocus:k=>n.value=!0,onBlur:k=>n.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["onUpdate:modelValue","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(u)]]),a.$slots.default||a.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(p).be("button","inner")),style:e.normalizeStyle(e.unref(m)?e.unref(x):void 0)},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.label),1)])],6)):e.createCommentVNode("v-if",!0)],2))}});var z=o._export_sfc(j,[["__file","checkbox-button.vue"]]);const q=o.buildProps({modelValue:{type:o.definePropType(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:E.useSizeProp,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:o.definePropType(Array)},props:{type:o.definePropType(Object),default:()=>F},...g.useAriaProps(["ariaLabel"])}),R={[g.UPDATE_MODEL_EVENT]:l=>o.isArray(l),change:l=>o.isArray(l)},F={label:"label",value:"value",disabled:"disabled"},K=e.defineComponent({name:"ElCheckboxGroup"}),H=e.defineComponent({...K,props:q,emits:R,setup(l,{emit:t}){const i=l,n=o.useNamespace("checkbox"),{formItem:m}=E.useFormItem(),{inputId:c,isLabeledByFormItem:b}=E.useFormItemInputId(i,{formItemContext:m}),u=async s=>{t(g.UPDATE_MODEL_EVENT,s),await e.nextTick(),t(g.CHANGE_EVENT,s)},v=e.computed({get(){return i.modelValue},set(s){u(s)}}),f=e.computed(()=>({...F,...i.props})),r=s=>{const p={label:s[f.value.label],value:s[f.value.value],disabled:s[f.value.disabled]};return{...s,...p}};return e.provide(y,{...g.pick(e.toRefs(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:v,changeEvent:u}),e.watch(()=>i.modelValue,(s,p)=>{i.validateEvent&&!L.isEqual(s,p)&&(m==null||m.validate("change").catch(x=>g.debugWarn()))}),(s,p)=>{var x;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{id:e.unref(c),class:e.normalizeClass(e.unref(n).b("group")),role:"group","aria-label":e.unref(b)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":e.unref(b)?(x=e.unref(m))==null?void 0:x.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options,(h,a)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:a},r(h)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var T=o._export_sfc(H,[["__file","checkbox-group.vue"]]);const W=o.withInstall(P,{CheckboxButton:z,CheckboxGroup:T});o.withNoopInstall(z);const J=o.withNoopInstall(T);exports.ElCheckbox=W;exports.ElCheckboxGroup=J;