st-comp 0.0.90 → 0.0.91

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 (57) hide show
  1. package/components.d.ts +1 -0
  2. package/es/ChartLayout.js +2 -2
  3. package/es/Dialog.js +10 -10
  4. package/es/FactorWarning.cjs +1 -0
  5. package/es/FactorWarning.js +410 -0
  6. package/es/Kline.cjs +1 -1
  7. package/es/Kline.js +11 -10
  8. package/es/KlineNew.cjs +1 -1
  9. package/es/KlineNew.js +10 -9
  10. package/es/Pagination.cjs +1 -1
  11. package/es/Pagination.js +106 -105
  12. package/es/Table.cjs +1 -1
  13. package/es/Table.js +309 -431
  14. package/es/VarietySearch.cjs +1 -12
  15. package/es/VarietySearch.js +788 -2512
  16. package/es/VirtualTable.js +89 -89
  17. package/es/{base-e85dae08.js → base-1bc9f12c.js} +19 -19
  18. package/es/{castArray-b93d1330.js → castArray-f42865a2.js} +1 -1
  19. package/es/{config-provider-cb918d0f.js → config-provider-c8d3957d.js} +3 -3
  20. package/es/{el-button-aab1dbd4.js → el-button-93e0ac7c.js} +33 -33
  21. package/es/{el-empty-ab3ce002.js → el-empty-0c85d9b7.js} +13 -13
  22. package/es/el-icon-0ea8fbf8.cjs +1 -0
  23. package/es/el-icon-4ed993c7.js +1 -0
  24. package/es/el-input-29806e42.js +543 -0
  25. package/es/el-input-a8791103.cjs +9 -0
  26. package/es/{el-overlay-98d7f866.js → el-overlay-53eb27a5.js} +6 -6
  27. package/es/el-popover-1d087574.cjs +1 -0
  28. package/es/el-popover-dd66e2c8.js +133 -0
  29. package/es/el-radio-group-46e8f574.cjs +12 -0
  30. package/es/el-radio-group-caebab9d.js +1743 -0
  31. package/es/{el-scrollbar-7b9d83d5.js → el-scrollbar-e17fad47.js} +14 -14
  32. package/es/el-select-64511731.cjs +1 -0
  33. package/es/el-select-ac302f3c.js +1360 -0
  34. package/es/{el-icon-2d22f211.js → el-table-column-b8e2141b.js} +750 -750
  35. package/es/{el-tag-87576c55.js → el-tag-9493bdff.js} +66 -66
  36. package/es/{focus-trap-067be6d2.js → focus-trap-1b2aef75.js} +1 -1
  37. package/es/{raf-b091dc88.js → raf-6d7e80f4.js} +1 -1
  38. package/es/{scroll-510cef88.js → scroll-a928a93e.js} +1 -1
  39. package/es/style.css +1 -1
  40. package/es/{use-form-item-439ac27c.js → use-form-item-aeec8499.js} +38 -38
  41. package/es/{use-global-config-857b51f5.js → use-global-config-b07c467a.js} +12 -12
  42. package/es/{vnode-8c7963dc.js → vnode-aa872900.js} +1 -1
  43. package/es/{zh-cn-c2b42b5f.js → zh-cn-d29347f8.js} +2 -2
  44. package/lib/bundle.js +1 -1
  45. package/lib/bundle.umd.cjs +153 -153
  46. package/lib/{index-4512909d.js → index-ee45a01a.js} +20349 -19967
  47. package/lib/{python-7403caa0.js → python-1c6a2ac7.js} +1 -1
  48. package/lib/style.css +1 -1
  49. package/package.json +1 -1
  50. package/packages/FactorWarning/index.ts +8 -0
  51. package/packages/FactorWarning/index.vue +332 -0
  52. package/packages/index.ts +2 -0
  53. package/src/pages/FactorWarning/index.vue +62 -0
  54. package/src/router/routes.ts +5 -0
  55. package/es/el-select-d3f15536.cjs +0 -9
  56. package/es/el-select-fd76b16b.js +0 -1894
  57. /package/es/{el-icon-773986c7.cjs → el-table-column-773986c7.cjs} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "st-comp",
3
3
  "public": true,
4
- "version": "0.0.90",
4
+ "version": "0.0.91",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -0,0 +1,8 @@
1
+ import { App } from "vue";
2
+ import StFactorWarning from "./index.vue";
3
+
4
+ export default {
5
+ install(app: App) {
6
+ app.component("st-factorWarning", StFactorWarning);
7
+ },
8
+ }
@@ -0,0 +1,332 @@
1
+ <script setup>
2
+ import { ref, watch } from "vue";
3
+
4
+ const visible = defineModel("visible", { default: false });
5
+ const props = defineProps({
6
+ // 标题名称
7
+ title: { type: [String, null], default: null },
8
+ // 预警因子[多, 空]-数据源
9
+ moreFactorOptions: { type: Array, default: () => [] },
10
+ emptyFactorOptions: { type: Array, default: () => [] },
11
+ // 预警表格数据
12
+ tableData: { type: Array, default: () => [] },
13
+ // 是否允许进行操作(表单, 表格的操作)
14
+ allowOperation: { type: Boolean, default: true },
15
+ });
16
+ const emit = defineEmits(["add", "delete", "enabled"]);
17
+
18
+ // 内容类型(添加-ruleForm, 管理-table)
19
+ const contentType = ref(props.allowOperation ? "ruleForm" : "table");
20
+
21
+ /**
22
+ * @description: 添加-表单相关参数和方法
23
+ */
24
+ const ruleFormRef = ref(null);
25
+ const ruleForm = ref({
26
+ factorType: 1,
27
+ factorSelectedList: [],
28
+ totalCount: 1,
29
+ minPrice: null,
30
+ maxPrice: null,
31
+ mark: null,
32
+ });
33
+ const rules = ref({
34
+ factorType: [{ required: true, message: "请选择交易类型", trigger: "blur" }],
35
+ factorSelectedList: [{ required: true, message: "请选择预警因子", trigger: "blur" }],
36
+ totalCount: [{ required: true, message: "请填写预警次数", trigger: "blur" }],
37
+ });
38
+ const handleFastControls = async (type) => {
39
+ switch (type) {
40
+ case "threeMore":
41
+ Object.assign(ruleForm.value, {
42
+ factorType: 1,
43
+ factorSelectedList: ["dkx金叉", "dkx黄白线上+双箱单次", "dkx金叉后+单箱突破", "30均线上+向上+单箱"],
44
+ totalCount: 3,
45
+ });
46
+ break;
47
+ case "threeEmpty":
48
+ Object.assign(ruleForm.value, {
49
+ factorType: -1,
50
+ factorSelectedList: ["dkx死叉", "dkx黄白线下+双箱单次", "dkx死叉后+单箱突破", "30均线下+向下+单箱"],
51
+ totalCount: 3,
52
+ });
53
+ break;
54
+ }
55
+ handleSubmit(ruleFormRef.value, false);
56
+ };
57
+ const handleSubmit = async (formEl, close = true) => {
58
+ if (!formEl) return;
59
+ await formEl.validate((valid) => {
60
+ if (!valid) return false;
61
+ emit("add", ruleForm.value);
62
+ if (close) {
63
+ visible.value = false;
64
+ } else {
65
+ ruleForm.value = {
66
+ factorType: 1,
67
+ factorSelectedList: [],
68
+ totalCount: 1,
69
+ minPrice: null,
70
+ maxPrice: null,
71
+ mark: null,
72
+ };
73
+ }
74
+ });
75
+ };
76
+ /**
77
+ * @description: 管理-表格相关参数和方法
78
+ */
79
+ const handleDelete = (row) => emit("delete", row);
80
+ const handleEnabled = (row) => emit("enabled", row);
81
+
82
+ // 监视组件开关
83
+ watch(
84
+ () => visible.value,
85
+ (newValue) => {
86
+ if (newValue) {
87
+ contentType.value = props.allowOperation ? "ruleForm" : "table";
88
+ ruleForm.value = {
89
+ factorType: 1,
90
+ factorSelectedList: [],
91
+ totalCount: 1,
92
+ minPrice: null,
93
+ maxPrice: null,
94
+ mark: null,
95
+ };
96
+ }
97
+ }
98
+ );
99
+ </script>
100
+
101
+ <template>
102
+ <div class="st-factorWarning">
103
+ <el-dialog
104
+ v-model="visible"
105
+ width="840"
106
+ align-center
107
+ destroy-on-close
108
+ >
109
+ <!-- 头部 -->
110
+ <template #header="{ close, titleId, titleClass }">
111
+ <div class="custom-header">
112
+ <div :class="titleClass">
113
+ <span style="margin-right: 4px">因子预警</span>
114
+ <span>{{ title }}</span>
115
+ </div>
116
+ <el-radio-group v-model="contentType">
117
+ <el-radio-button
118
+ label="ruleForm"
119
+ :disabled="!allowOperation"
120
+ >添加</el-radio-button
121
+ >
122
+ <el-radio-button label="table">管理</el-radio-button>
123
+ </el-radio-group>
124
+ </div>
125
+ </template>
126
+ <!-- 内容: 添加 -->
127
+ <template v-if="contentType === 'ruleForm'">
128
+ <el-form
129
+ ref="ruleFormRef"
130
+ :model="ruleForm"
131
+ :rules="rules"
132
+ label-width="90px"
133
+ >
134
+ <!-- 交易类型 -->
135
+ <el-form-item
136
+ label="交易类型:"
137
+ prop="factorType"
138
+ >
139
+ <el-radio-group v-model="ruleForm.factorType">
140
+ <el-radio :label="1">多</el-radio>
141
+ <el-radio :label="-1">空</el-radio>
142
+ </el-radio-group>
143
+ </el-form-item>
144
+ <!-- 预警因子 -->
145
+ <el-form-item
146
+ label="预警因子:"
147
+ prop="factorSelectedList"
148
+ >
149
+ <el-checkbox-group v-model="ruleForm.factorSelectedList">
150
+ <template v-if="ruleForm.factorType === 1">
151
+ <el-checkbox
152
+ v-for="(item, index) in moreFactorOptions"
153
+ :key="index"
154
+ :label="item.factorTypeName"
155
+ style="width: 200px"
156
+ >
157
+ {{ item.factorTypeName }}
158
+ </el-checkbox>
159
+ </template>
160
+ <template v-if="ruleForm.factorType === -1">
161
+ <el-checkbox
162
+ v-for="(item, index) in emptyFactorOptions"
163
+ :key="index"
164
+ :label="item.factorTypeName"
165
+ style="width: 200px"
166
+ >
167
+ {{ item.factorTypeName }}
168
+ </el-checkbox>
169
+ </template>
170
+ </el-checkbox-group>
171
+ </el-form-item>
172
+ <!-- 预警次数 -->
173
+ <el-form-item
174
+ label="预警次数:"
175
+ prop="totalCount"
176
+ >
177
+ <el-input-number
178
+ v-model="ruleForm.totalCount"
179
+ :min="1"
180
+ controls-position="right"
181
+ style="margin-right: 20px"
182
+ />
183
+ <el-button @click="handleFastControls('threeMore')">3次多</el-button>
184
+ <el-button @click="handleFastControls('threeEmpty')">3次空</el-button>
185
+ </el-form-item>
186
+ <!-- 价格范围 -->
187
+ <el-form-item label="价格范围:">
188
+ <el-input-number
189
+ v-model="ruleForm.minPrice"
190
+ :min="-999"
191
+ placeholder="请输入"
192
+ :max="999"
193
+ controls-position="right"
194
+ />
195
+ <span style="margin: 0 5px">~</span>
196
+ <el-input-number
197
+ v-model="ruleForm.maxPrice"
198
+ placeholder="请输入"
199
+ :min="-999"
200
+ :max="999"
201
+ controls-position="right"
202
+ />
203
+ </el-form-item>
204
+ <!-- 备注 -->
205
+ <el-form-item
206
+ label="备注:"
207
+ prop="mark"
208
+ >
209
+ <el-input
210
+ v-model="ruleForm.mark"
211
+ type="textarea"
212
+ placeholder="请输入关键字"
213
+ :rows="2"
214
+ style="width: 380px"
215
+ />
216
+ </el-form-item>
217
+ </el-form>
218
+ </template>
219
+ <!-- 内容: 表格 -->
220
+ <template v-if="contentType === 'table'">
221
+ <el-table
222
+ :data="tableData"
223
+ height="590"
224
+ size="small"
225
+ >
226
+ <el-table-column
227
+ label="预警周期"
228
+ width="80"
229
+ >
230
+ <template #default="scope">
231
+ {{ scope.row.freqName || "-" }}
232
+ </template>
233
+ </el-table-column>
234
+ <el-table-column label="预警因子">
235
+ <template #default="scope">
236
+ {{ scope.row.factorExtendName || "-" }}
237
+ </template>
238
+ </el-table-column>
239
+ <el-table-column
240
+ label="预警次数"
241
+ width="80"
242
+ >
243
+ <template #default="scope">
244
+ {{ `${scope.row.currentCount} / ${scope.row.totalCount}` }}
245
+ </template>
246
+ </el-table-column>
247
+ <el-table-column
248
+ label="状态"
249
+ width="80"
250
+ >
251
+ <template #default="scope">
252
+ <div>
253
+ <span v-if="scope.row.enable === 1">未触发</span>
254
+ <span v-else-if="scope.row.enable === 2">已触发</span>
255
+ <span v-else>-</span>
256
+ </div>
257
+ </template>
258
+ </el-table-column>
259
+ <el-table-column label="设置时间">
260
+ <template #default="scope">
261
+ {{ scope.row.createdTime || "-" }}
262
+ </template>
263
+ </el-table-column>
264
+ <el-table-column label="备注">
265
+ <template #default="scope">
266
+ {{ scope.row.mark || "-" }}
267
+ </template>
268
+ </el-table-column>
269
+ <el-table-column
270
+ v-if="allowOperation"
271
+ label="操作"
272
+ width="140"
273
+ >
274
+ <template #default="scope">
275
+ <el-button
276
+ size="small"
277
+ :disabled="scope.row.currentCount !== scope.row.totalCount"
278
+ @click="handleEnabled(scope.row)"
279
+ >
280
+ 启用
281
+ </el-button>
282
+ <el-popconfirm
283
+ title="确定删除?"
284
+ @confirm="handleDelete(scope.row)"
285
+ >
286
+ <template #reference>
287
+ <el-button size="small">删除</el-button>
288
+ </template>
289
+ </el-popconfirm>
290
+ </template>
291
+ </el-table-column>
292
+ </el-table>
293
+ </template>
294
+ <!-- 底部 -->
295
+ <template #footer>
296
+ <div class="custom-footer">
297
+ <el-button @click="visible = false">关闭</el-button>
298
+ <el-button
299
+ v-if="contentType === 'ruleForm'"
300
+ type="primary"
301
+ @click="handleSubmit(ruleFormRef)"
302
+ >
303
+ 确认
304
+ </el-button>
305
+ </div>
306
+ </template>
307
+ </el-dialog>
308
+ </div>
309
+ </template>
310
+
311
+ <style lang="scss" scoped>
312
+ .st-factorWarning {
313
+ :deep(.el-dialog__header) {
314
+ padding-top: 6px;
315
+ padding-right: 40px;
316
+ }
317
+ :deep(.el-dialog__body) {
318
+ padding-top: 0;
319
+ padding-bottom: 0;
320
+ }
321
+ .custom-header {
322
+ width: 100%;
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: space-between;
326
+ padding: 10px;
327
+ }
328
+ .el-radio {
329
+ margin-right: 20px;
330
+ }
331
+ }
332
+ </style>
package/packages/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { App } from "vue"
2
2
  import StChartLayout from "./ChartLayout/index.ts"
3
3
  import StDialog from "./Dialog/index.ts"
4
+ import StFactorWarning from "./FactorWarning/index.ts"
4
5
  import StHeatMap from "./HeatMap/index.ts"
5
6
  import StKline from "./Kline/index.ts"
6
7
  import StKlineNew from "./KlineNew/index.ts"
@@ -18,6 +19,7 @@ export default {
18
19
  install(app: App) {
19
20
  StChartLayout.install(app)
20
21
  StDialog.install(app)
22
+ StFactorWarning.install(app)
21
23
  StHeatMap.install(app)
22
24
  StKline.install(app)
23
25
  StKlineNew.install(app)
@@ -0,0 +1,62 @@
1
+ <template>
2
+ <div style="width: 100%; height: 100%">
3
+ <el-button @click="openDialog">因子预警</el-button>
4
+ <st-factorWarning
5
+ v-model:visible="visible"
6
+ :title="title"
7
+ :moreFactorOptions="moreFactorOptions"
8
+ :emptyFactorOptions="emptyFactorOptions"
9
+ :tableData="tableData"
10
+ @add="handleAddFactor"
11
+ @delete="handleDeleteFactor"
12
+ @enabled="handleEnabledFactor"
13
+ />
14
+ </div>
15
+ </template>
16
+
17
+ <script setup>
18
+ import axios from "axios";
19
+ import { ref, onMounted } from "vue";
20
+
21
+ const visible = ref(false);
22
+ const title = ref("品种-code(周期)");
23
+ const moreFactorOptions = ref([]);
24
+ const emptyFactorOptions = ref([]);
25
+ const tableData = ref([]);
26
+
27
+ // 打开弹窗
28
+ const openDialog = async () => {
29
+ // 获取预警因子[多, 空]选项
30
+ const { data } = await axios({
31
+ method: "post",
32
+ headers: {
33
+ token: "6133a9e88fd02c60789824c80e0084d5",
34
+ },
35
+ url: "http://192.168.12.38:5173/middleLayer/post/alarm/deliversign/getFactorConfigByPage",
36
+ data: {
37
+ pageNum: 1,
38
+ pageSize: 9999,
39
+ factorType: 2,
40
+ },
41
+ });
42
+ const { body } = data;
43
+ moreFactorOptions.value = body.list.reduce((result, item) => {
44
+ result.push({
45
+ alarmFactor: item.id,
46
+ ...item.tbFactorConfigExtendList.find((citem) => citem.factorType === 1),
47
+ });
48
+ return result;
49
+ }, []);
50
+ emptyFactorOptions.value = body.list.reduce((result, item) => {
51
+ result.push({
52
+ alarmFactor: item.id,
53
+ ...item.tbFactorConfigExtendList.find((citem) => citem.factorType === -1),
54
+ });
55
+ return result;
56
+ }, []);
57
+ visible.value = true;
58
+ };
59
+ const handleAddFactor = (ruleForm) => console.log(ruleForm);
60
+ const handleDeleteFactor = () => {};
61
+ const handleEnabledFactor = () => {};
62
+ </script>
@@ -9,6 +9,11 @@ export default [
9
9
  name: 'Dialog',
10
10
  component: () => import('../pages/Dialog/index.vue'),
11
11
  },
12
+ {
13
+ path: '/factorWarning',
14
+ name: 'FactorWarning',
15
+ component: () => import('../pages/FactorWarning/index.vue'),
16
+ },
12
17
  {
13
18
  path: '/heatMap',
14
19
  name: 'HeatMap',
@@ -1,9 +0,0 @@
1
- "use strict";const e=require("vue"),me=require("./el-scrollbar-9473fd47.cjs"),re=require("./el-tag-a6a4d4ef.cjs"),S=require("./use-form-item-7924b6c1.cjs"),d=require("./base-315cbfab.cjs"),et=require("./typescript-b63f8e83.cjs"),M=require("./focus-trap-ea177336.cjs"),tt=require("./scroll-a80e1458.cjs"),nt=()=>d.isClient&&/firefox/i.test(window.navigator.userAgent);var je=1/0,lt=17976931348623157e292;function ot(t){if(!t)return t===0?t:0;if(t=me.toNumber(t),t===je||t===-je){var n=t<0?-1:1;return n*lt}return t===t?t:0}function it(t){var n=ot(t),i=n%1;return n===n?i?n-i:n:0}function at(t,n,i,r){for(var p=t.length,u=i+(r?1:-1);r?u--:++u<p;)if(n(t[u],u,t))return u;return-1}var rt=Math.max,st=Math.min;function ut(t,n,i){var r=t==null?0:t.length;if(!r)return-1;var p=r-1;return i!==void 0&&(p=it(i),p=i<0?rt(r+p,0):st(p,r-1)),at(t,re.baseIteratee(n),p,!0)}const ct=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),dt=t=>S.componentSizeMap[t||"default"],pt=t=>["",...S.componentSizes].includes(t),Ge=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),ft=["class","style"],mt=/^on[A-Z]/,vt=(t={})=>{const{excludeListeners:n=!1,excludeKeys:i}=t,r=e.computed(()=>((i==null?void 0:i.value)||[]).concat(ft)),p=e.getCurrentInstance();return p?e.computed(()=>{var u;return d.fromPairs(Object.entries((u=p.proxy)==null?void 0:u.$attrs).filter(([f])=>!r.value.includes(f)&&!(n&&mt.test(f))))}):(d.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),e.computed(()=>({})))};function ht(t){const n=e.ref();function i(){if(t.value==null)return;const{selectionStart:p,selectionEnd:u,value:f}=t.value;if(p==null||u==null)return;const g=f.slice(0,Math.max(0,p)),m=f.slice(Math.max(0,u));n.value={selectionStart:p,selectionEnd:u,value:f,beforeTxt:g,afterTxt:m}}function r(){if(t.value==null||n.value==null)return;const{value:p}=t.value,{beforeTxt:u,afterTxt:f,selectionStart:g}=n.value;if(u==null||f==null||g==null)return;let m=p.length;if(p.endsWith(f))m=p.length-f.length;else if(p.startsWith(u))m=u.length;else{const C=u[g-1],b=p.indexOf(C,g-1);b!==-1&&(m=b+1)}t.value.setSelectionRange(m,m)}return[i,r]}function gt(t,{afterFocus:n,afterBlur:i}={}){const r=e.getCurrentInstance(),{emit:p}=r,u=e.shallowRef(),f=e.ref(!1),g=b=>{f.value||(f.value=!0,p("focus",b),n==null||n())},m=b=>{var v;b.relatedTarget&&((v=u.value)!=null&&v.contains(b.relatedTarget))||(f.value=!1,p("blur",b),i==null||i())},C=()=>{var b;(b=t.value)==null||b.focus()};return e.watch(u,b=>{b&&b.setAttribute("tabindex","-1")}),me.useEventListener(u,"click",C),{wrapperRef:u,isFocused:f,handleFocus:g,handleBlur:m}}let W;const bt=`
2
- height:0 !important;
3
- visibility:hidden !important;
4
- ${nt()?"":"overflow:hidden !important;"}
5
- position:absolute !important;
6
- z-index:-1000 !important;
7
- top:0 !important;
8
- right:0 !important;
9
- `,yt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Ct(t){const n=window.getComputedStyle(t),i=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),p=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:yt.map(f=>`${f}:${n.getPropertyValue(f)}`).join(";"),paddingSize:r,borderSize:p,boxSizing:i}}function Ue(t,n=1,i){var r;W||(W=document.createElement("textarea"),document.body.appendChild(W));const{paddingSize:p,borderSize:u,boxSizing:f,contextStyle:g}=Ct(t);W.setAttribute("style",`${g};${bt}`),W.value=t.value||t.placeholder||"";let m=W.scrollHeight;const C={};f==="border-box"?m=m+u:f==="content-box"&&(m=m-p),W.value="";const b=W.scrollHeight-p;if(d.isNumber(n)){let v=b*n;f==="border-box"&&(v=v+p+u),m=Math.max(v,m),C.minHeight=`${v}px`}if(d.isNumber(i)){let v=b*i;f==="border-box"&&(v=v+p+u),m=Math.min(v,m)}return C.height=`${m}px`,(r=W.parentNode)==null||r.removeChild(W),W=void 0,C}const St=d.buildProps({id:{type:String,default:void 0},size:S.useSizeProp,disabled:Boolean,modelValue:{type:d.definePropType([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:d.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:S.iconPropType},prefixIcon:{type:S.iconPropType},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:d.definePropType([Object,Array,String]),default:()=>et.mutable({})},autofocus:{type:Boolean,default:!1}}),wt={[M.UPDATE_MODEL_EVENT]:t=>d.isString(t),input:t=>d.isString(t),change:t=>d.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},Et=["role"],kt=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],Ot=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],Tt=e.defineComponent({name:"ElInput",inheritAttrs:!1}),Vt=e.defineComponent({...Tt,props:St,emits:wt,setup(t,{expose:n,emit:i}){const r=t,p=e.useAttrs(),u=e.useSlots(),f=e.computed(()=>{const s={};return r.containerRole==="combobox"&&(s["aria-haspopup"]=p["aria-haspopup"],s["aria-owns"]=p["aria-owns"],s["aria-expanded"]=p["aria-expanded"]),s}),g=e.computed(()=>[r.type==="textarea"?w.b():o.b(),o.m(I.value),o.is("disabled",O.value),o.is("exceed",we.value),{[o.b("group")]:u.prepend||u.append,[o.bm("group","append")]:u.append,[o.bm("group","prepend")]:u.prepend,[o.m("prefix")]:u.prefix||r.prefixIcon,[o.m("suffix")]:u.suffix||r.suffixIcon||r.clearable||r.showPassword,[o.bm("suffix","password-clear")]:G.value&&ne.value},p.class]),m=e.computed(()=>[o.e("wrapper"),o.is("focus",te.value)]),C=vt({excludeKeys:e.computed(()=>Object.keys(f.value))}),{form:b,formItem:v}=S.useFormItem(),{inputId:B}=S.useFormItemInputId(r,{formItemContext:v}),I=S.useFormSize(),O=S.useFormDisabled(),o=d.useNamespace("input"),w=d.useNamespace("textarea"),k=e.shallowRef(),E=e.shallowRef(),P=e.ref(!1),H=e.ref(!1),$=e.ref(!1),ve=e.ref(),q=e.shallowRef(r.inputStyle),x=e.computed(()=>k.value||E.value),{wrapperRef:ye,isFocused:te,handleFocus:j,handleBlur:V}=gt(x,{afterBlur(){var s;r.validateEvent&&((s=v==null?void 0:v.validate)==null||s.call(v,"blur").catch(h=>d.debugWarn(h)))}}),he=e.computed(()=>{var s;return(s=b==null?void 0:b.statusIcon)!=null?s:!1}),Q=e.computed(()=>(v==null?void 0:v.validateState)||""),U=e.computed(()=>Q.value&&S.ValidateComponentsMap[Q.value]),Ce=e.computed(()=>$.value?S.view_default:S.hide_default),Se=e.computed(()=>[p.style,r.inputStyle]),F=e.computed(()=>[r.inputStyle,q.value,{resize:r.resize}]),z=e.computed(()=>M.isNil(r.modelValue)?"":String(r.modelValue)),G=e.computed(()=>r.clearable&&!O.value&&!r.readonly&&!!z.value&&(te.value||P.value)),ne=e.computed(()=>r.showPassword&&!O.value&&!r.readonly&&!!z.value&&(!!z.value||te.value)),A=e.computed(()=>r.showWordLimit&&!!C.value.maxlength&&(r.type==="text"||r.type==="textarea")&&!O.value&&!r.readonly&&!r.showPassword),le=e.computed(()=>z.value.length),we=e.computed(()=>!!A.value&&le.value>Number(C.value.maxlength)),Ee=e.computed(()=>!!u.suffix||!!r.suffixIcon||G.value||r.showPassword||A.value||!!Q.value&&he.value),[ke,Oe]=ht(k);me.useResizeObserver(E,s=>{if(X(),!A.value||r.resize!=="both")return;const h=s[0],{width:T}=h.contentRect;ve.value={right:`calc(100% - ${T+15+6}px)`}});const Y=()=>{const{type:s,autosize:h}=r;if(!(!d.isClient||s!=="textarea"||!E.value))if(h){const T=d.isObject(h)?h.minRows:void 0,J=d.isObject(h)?h.maxRows:void 0,ae=Ue(E.value,T,J);q.value={overflowY:"hidden",...ae},e.nextTick(()=>{E.value.offsetHeight,q.value=ae})}else q.value={minHeight:Ue(E.value).minHeight}},X=(s=>{let h=!1;return()=>{var T;if(h||!r.autosize)return;((T=E.value)==null?void 0:T.offsetParent)===null||(s(),h=!0)}})(Y),K=()=>{const s=x.value,h=r.formatter?r.formatter(z.value):z.value;!s||s.value===h||(s.value=h)},se=async s=>{ke();let{value:h}=s.target;if(r.formatter&&(h=r.parser?r.parser(h):h),!H.value){if(h===z.value){K();return}i(M.UPDATE_MODEL_EVENT,h),i("input",h),await e.nextTick(),K(),Oe()}},ue=s=>{i("change",s.target.value)},oe=s=>{i("compositionstart",s),H.value=!0},ce=s=>{var h;i("compositionupdate",s);const T=(h=s.target)==null?void 0:h.value,J=T[T.length-1]||"";H.value=!Ge(J)},de=s=>{i("compositionend",s),H.value&&(H.value=!1,se(s))},pe=()=>{$.value=!$.value,Z()},Z=async()=>{var s;await e.nextTick(),(s=x.value)==null||s.focus()},Te=()=>{var s;return(s=x.value)==null?void 0:s.blur()},Ve=s=>{P.value=!1,i("mouseleave",s)},Ie=s=>{P.value=!0,i("mouseenter",s)},ie=s=>{i("keydown",s)},Be=()=>{var s;(s=x.value)==null||s.select()},ge=()=>{i(M.UPDATE_MODEL_EVENT,""),i("change",""),i("clear"),i("input","")};return e.watch(()=>r.modelValue,()=>{var s;e.nextTick(()=>Y()),r.validateEvent&&((s=v==null?void 0:v.validate)==null||s.call(v,"change").catch(h=>d.debugWarn(h)))}),e.watch(z,()=>K()),e.watch(()=>r.type,async()=>{await e.nextTick(),K(),Y()}),e.onMounted(()=>{!r.formatter&&r.parser&&d.debugWarn("ElInput","If you set the parser, you also need to set the formatter."),K(),e.nextTick(Y)}),n({input:k,textarea:E,ref:x,textareaStyle:F,autosize:e.toRef(r,"autosize"),focus:Z,blur:Te,select:Be,clear:ge,resizeTextarea:Y}),(s,h)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(e.unref(f),{class:e.unref(g),style:e.unref(Se),role:s.containerRole,onMouseenter:Ie,onMouseleave:Ve}),[e.createCommentVNode(" input "),s.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createCommentVNode(" prepend slot "),s.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(s.$slots,"prepend")],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperRef",ref:ye,class:e.normalizeClass(e.unref(m))},[e.createCommentVNode(" prefix slot "),s.$slots.prefix||s.prefixIcon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner"))},[e.renderSlot(s.$slots,"prefix"),s.prefixIcon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:0,class:e.normalizeClass(e.unref(o).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.prefixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(B),ref_key:"input",ref:k,class:e.unref(o).e("inner")},e.unref(C),{type:s.showPassword?$.value?"text":"password":s.type,disabled:e.unref(O),formatter:s.formatter,parser:s.parser,readonly:s.readonly,autocomplete:s.autocomplete,tabindex:s.tabindex,"aria-label":s.label,placeholder:s.placeholder,style:s.inputStyle,form:r.form,autofocus:r.autofocus,onCompositionstart:oe,onCompositionupdate:ce,onCompositionend:de,onInput:se,onFocus:h[0]||(h[0]=(...T)=>e.unref(j)&&e.unref(j)(...T)),onBlur:h[1]||(h[1]=(...T)=>e.unref(V)&&e.unref(V)(...T)),onChange:ue,onKeydown:ie}),null,16,kt),e.createCommentVNode(" suffix slot "),e.unref(Ee)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner"))},[!e.unref(G)||!e.unref(ne)||!e.unref(A)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(s.$slots,"suffix"),s.suffixIcon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:0,class:e.normalizeClass(e.unref(o).e("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.suffixIcon)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],64)):e.createCommentVNode("v-if",!0),e.unref(G)?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("clear")]),onMousedown:e.withModifiers(e.unref(d.NOOP),["prevent"]),onClick:ge},{default:e.withCtx(()=>[e.createVNode(e.unref(S.circle_close_default))]),_:1},8,["class","onMousedown"])):e.createCommentVNode("v-if",!0),e.unref(ne)?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:2,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("password")]),onClick:pe},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ce))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),e.unref(A)?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(e.unref(le))+" / "+e.toDisplayString(e.unref(C).maxlength),3)],2)):e.createCommentVNode("v-if",!0),e.unref(Q)&&e.unref(U)&&e.unref(he)?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:4,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",e.unref(Q)==="validating")])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(U))))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0)],2)],2)):e.createCommentVNode("v-if",!0)],2),e.createCommentVNode(" append slot "),s.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(s.$slots,"append")],2)):e.createCommentVNode("v-if",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createCommentVNode(" textarea "),e.createElementVNode("textarea",e.mergeProps({id:e.unref(B),ref_key:"textarea",ref:E,class:e.unref(w).e("inner")},e.unref(C),{tabindex:s.tabindex,disabled:e.unref(O),readonly:s.readonly,autocomplete:s.autocomplete,style:e.unref(F),"aria-label":s.label,placeholder:s.placeholder,form:r.form,autofocus:r.autofocus,onCompositionstart:oe,onCompositionupdate:ce,onCompositionend:de,onInput:se,onFocus:h[2]||(h[2]=(...T)=>e.unref(j)&&e.unref(j)(...T)),onBlur:h[3]||(h[3]=(...T)=>e.unref(V)&&e.unref(V)(...T)),onChange:ue,onKeydown:ie}),null,16,Ot),e.unref(A)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(ve.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(e.unref(le))+" / "+e.toDisplayString(e.unref(C).maxlength),7)):e.createCommentVNode("v-if",!0)],64))],16,Et)),[[e.vShow,s.type!=="hidden"]])}});var It=d._export_sfc(Vt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const Ye=d.withInstall(It),Xe=d.buildProps({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:S.componentSizes,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),Bt={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},zt=e.defineComponent({name:"ElTag"}),Nt=e.defineComponent({...zt,props:Xe,emits:Bt,setup(t,{emit:n}){const i=t,r=S.useFormSize(),p=d.useNamespace("tag"),u=e.computed(()=>{const{type:m,hit:C,effect:b,closable:v,round:B}=i;return[p.b(),p.is("closable",v),p.m(m),p.m(r.value),p.m(b),p.is("hit",C),p.is("round",B)]}),f=m=>{n("close",m)},g=m=>{n("click",m)};return(m,C)=>m.disableTransitions?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:m.color}),onClick:g},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(p).e("content"))},[e.renderSlot(m.$slots,"default")],2),m.closable?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:0,class:e.normalizeClass(e.unref(p).e("close")),onClick:e.withModifiers(f,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(S.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)):(e.openBlock(),e.createBlock(e.Transition,{key:1,name:`${e.unref(p).namespace.value}-zoom-in-center`,appear:""},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(u)),style:e.normalizeStyle({backgroundColor:m.color}),onClick:g},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(p).e("content"))},[e.renderSlot(m.$slots,"default")],2),m.closable?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:0,class:e.normalizeClass(e.unref(p).e("close")),onClick:e.withModifiers(f,["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(S.close_default))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Lt=d._export_sfc(Nt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const Ze=d.withInstall(Lt),Je=Symbol("ElSelectGroup"),Fe=Symbol("ElSelect");function Mt(t,n){const i=e.inject(Fe),r=e.inject(Je,{disabled:!1}),p=e.computed(()=>Object.prototype.toString.call(t.value).toLowerCase()==="[object object]"),u=e.computed(()=>i.props.multiple?v(i.props.modelValue,t.value):B(t.value,i.props.modelValue)),f=e.computed(()=>{if(i.props.multiple){const o=i.props.modelValue||[];return!u.value&&o.length>=i.props.multipleLimit&&i.props.multipleLimit>0}else return!1}),g=e.computed(()=>t.label||(p.value?"":t.value)),m=e.computed(()=>t.value||t.label||""),C=e.computed(()=>t.disabled||n.groupDisabled||f.value),b=e.getCurrentInstance(),v=(o=[],w)=>{if(p.value){const k=i.props.valueKey;return o&&o.some(E=>e.toRaw(d.get(E,k))===d.get(w,k))}else return o&&o.includes(w)},B=(o,w)=>{if(p.value){const{valueKey:k}=i.props;return d.get(o,k)===d.get(w,k)}else return o===w},I=()=>{!t.disabled&&!r.disabled&&(i.hoverIndex=i.optionsArray.indexOf(b.proxy))};e.watch(()=>g.value,()=>{!t.created&&!i.props.remote&&i.setSelected()}),e.watch(()=>t.value,(o,w)=>{const{remote:k,valueKey:E}=i.props;if(Object.is(o,w)||(i.onOptionDestroy(w,b.proxy),i.onOptionCreate(b.proxy)),!t.created&&!k){if(E&&typeof o=="object"&&typeof w=="object"&&o[E]===w[E])return;i.setSelected()}}),e.watch(()=>r.disabled,()=>{n.groupDisabled=r.disabled},{immediate:!0});const{queryChange:O}=e.toRaw(i);return e.watch(O,o=>{const{query:w}=e.unref(o),k=new RegExp(ct(w),"i");n.visible=k.test(g.value)||t.created,n.visible||i.filteredOptionsCount--},{immediate:!0}),{select:i,currentLabel:g,currentValue:m,itemSelected:u,isDisabled:C,hoverItem:I}}const Dt=e.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const n=d.useNamespace("select"),i=e.computed(()=>[n.be("dropdown","item"),n.is("disabled",e.unref(f)),{selected:e.unref(u),hover:e.unref(b)}]),r=e.reactive({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:p,itemSelected:u,isDisabled:f,select:g,hoverItem:m}=Mt(t,r),{visible:C,hover:b}=e.toRefs(r),v=e.getCurrentInstance().proxy;g.onOptionCreate(v),e.onBeforeUnmount(()=>{const I=v.value,{selected:O}=g,w=(g.props.multiple?O:[O]).some(k=>k.value===v.value);e.nextTick(()=>{g.cachedOptions.get(I)===v&&!w&&g.cachedOptions.delete(I)}),g.onOptionDestroy(I,v)});function B(){t.disabled!==!0&&r.groupDisabled!==!0&&g.handleOptionSelect(v)}return{ns:n,containerKls:i,currentLabel:p,itemSelected:u,isDisabled:f,select:g,hoverItem:m,visible:C,hover:b,selectOptionClick:B,states:r}}});function Pt(t,n,i,r,p,u){return e.withDirectives((e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(t.containerKls),onMouseenter:n[0]||(n[0]=(...f)=>t.hoverItem&&t.hoverItem(...f)),onClick:n[1]||(n[1]=e.withModifiers((...f)=>t.selectOptionClick&&t.selectOptionClick(...f),["stop"]))},[e.renderSlot(t.$slots,"default",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.currentLabel),1)])],34)),[[e.vShow,t.visible]])}var xe=d._export_sfc(Dt,[["render",Pt],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const $t=e.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=e.inject(Fe),n=d.useNamespace("select"),i=e.computed(()=>t.props.popperClass),r=e.computed(()=>t.props.multiple),p=e.computed(()=>t.props.fitInputWidth),u=e.ref("");function f(){var g;u.value=`${(g=t.selectWrapper)==null?void 0:g.offsetWidth}px`}return e.onMounted(()=>{f(),me.useResizeObserver(t.selectWrapper,f)}),{ns:n,minWidth:u,popperClass:i,isMultiple:r,isFitInputWidth:p}}});function Ft(t,n,i,r,p,u){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:e.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[e.renderSlot(t.$slots,"default")],6)}var At=d._export_sfc($t,[["render",Ft],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);function Kt(t){const{t:n}=d.useLocale();return e.reactive({options:new Map,cachedOptions:new Map,disabledOptions:new Map,createdLabel:null,createdSelected:!1,selected:t.multiple?[]:{},inputLength:20,inputWidth:0,optionsCount:0,filteredOptionsCount:0,visible:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,cachedPlaceHolder:"",currentPlaceholder:n("el.select.placeholder"),menuVisibleOnFocus:!1,isOnComposition:!1,prefixWidth:11,mouseEnter:!1,focused:!1})}const Rt=(t,n,i)=>{const{t:r}=d.useLocale(),p=d.useNamespace("select");S.useDeprecated({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},e.computed(()=>t.suffixTransition===!1));const u=e.ref(null),f=e.ref(null),g=e.ref(null),m=e.ref(null),C=e.ref(null),b=e.ref(null),v=e.ref(null),B=e.ref(null),I=e.ref(-1),O=e.shallowRef({query:""}),o=e.shallowRef(""),w=e.ref([]);let k=0;const{form:E,formItem:P}=S.useFormItem(),H=e.computed(()=>!t.filterable||t.multiple||!n.visible),$=e.computed(()=>t.disabled||(E==null?void 0:E.disabled)),ve=e.computed(()=>{const l=t.multiple?Array.isArray(t.modelValue)&&t.modelValue.length>0:t.modelValue!==void 0&&t.modelValue!==null&&t.modelValue!=="";return t.clearable&&!$.value&&n.inputHovering&&l}),q=e.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),x=e.computed(()=>p.is("reverse",q.value&&n.visible&&t.suffixTransition)),ye=e.computed(()=>(E==null?void 0:E.statusIcon)&&(P==null?void 0:P.validateState)&&S.ValidateComponentsMap[P==null?void 0:P.validateState]),te=e.computed(()=>t.remote?300:0),j=e.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&n.query===""&&n.options.size===0?!1:t.filterable&&n.query&&n.options.size>0&&n.filteredOptionsCount===0?t.noMatchText||r("el.select.noMatch"):n.options.size===0?t.noDataText||r("el.select.noData"):null),V=e.computed(()=>{const l=Array.from(n.options.values()),a=[];return w.value.forEach(c=>{const y=l.findIndex(N=>N.currentLabel===c);y>-1&&a.push(l[y])}),a.length>=l.length?a:l}),he=e.computed(()=>Array.from(n.cachedOptions.values())),Q=e.computed(()=>{const l=V.value.filter(a=>!a.created).some(a=>a.currentLabel===n.query);return t.filterable&&t.allowCreate&&n.query!==""&&!l}),U=S.useFormSize(),Ce=e.computed(()=>["small"].includes(U.value)?"small":"default"),Se=e.computed({get(){return n.visible&&j.value!==!1},set(l){n.visible=l}});e.watch([()=>$.value,()=>U.value,()=>E==null?void 0:E.size],()=>{e.nextTick(()=>{F()})}),e.watch(()=>t.placeholder,l=>{n.cachedPlaceHolder=n.currentPlaceholder=l,t.multiple&&Array.isArray(t.modelValue)&&t.modelValue.length>0&&(n.currentPlaceholder="")}),e.watch(()=>t.modelValue,(l,a)=>{t.multiple&&(F(),l&&l.length>0||f.value&&n.query!==""?n.currentPlaceholder="":n.currentPlaceholder=n.cachedPlaceHolder,t.filterable&&!t.reserveKeyword&&(n.query="",z(n.query))),A(),t.filterable&&!t.multiple&&(n.inputLength=20),!re.isEqual(l,a)&&t.validateEvent&&(P==null||P.validate("change").catch(c=>d.debugWarn(c)))},{flush:"post",deep:!0}),e.watch(()=>n.visible,l=>{var a,c,y,N,D;l?((c=(a=m.value)==null?void 0:a.updatePopper)==null||c.call(a),t.filterable&&(n.filteredOptionsCount=n.optionsCount,n.query=t.remote?"":n.selectedLabel,(N=(y=g.value)==null?void 0:y.focus)==null||N.call(y),t.multiple?(D=f.value)==null||D.focus():n.selectedLabel&&(n.currentPlaceholder=`${n.selectedLabel}`,n.selectedLabel=""),z(n.query),!t.multiple&&!t.remote&&(O.value.query="",e.triggerRef(O),e.triggerRef(o)))):(t.filterable&&(d.isFunction(t.filterMethod)&&t.filterMethod(""),d.isFunction(t.remoteMethod)&&t.remoteMethod("")),n.query="",n.previousQuery=null,n.selectedLabel="",n.inputLength=20,n.menuVisibleOnFocus=!1,we(),e.nextTick(()=>{f.value&&f.value.value===""&&n.selected.length===0&&(n.currentPlaceholder=n.cachedPlaceHolder)}),t.multiple||(n.selected&&(t.filterable&&t.allowCreate&&n.createdSelected&&n.createdLabel?n.selectedLabel=n.createdLabel:n.selectedLabel=n.selected.currentLabel,t.filterable&&(n.query=n.selectedLabel)),t.filterable&&(n.currentPlaceholder=n.cachedPlaceHolder))),i.emit("visible-change",l)}),e.watch(()=>n.options.entries(),()=>{var l,a,c;if(!d.isClient)return;(a=(l=m.value)==null?void 0:l.updatePopper)==null||a.call(l),t.multiple&&F();const y=((c=v.value)==null?void 0:c.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!d.isUndefined(t.modelValue)||!Array.from(y).includes(document.activeElement))&&A(),t.defaultFirstOption&&(t.filterable||t.remote)&&n.filteredOptionsCount&&ne()},{flush:"post"}),e.watch(()=>n.hoverIndex,l=>{d.isNumber(l)&&l>-1?I.value=V.value[l]||{}:I.value={},V.value.forEach(a=>{a.hover=I.value===a})});const F=()=>{e.nextTick(()=>{var l,a;if(!u.value)return;const c=u.value.$el.querySelector("input");k=k||(c.clientHeight>0?c.clientHeight+2:0);const y=b.value,N=dt(U.value||(E==null?void 0:E.size)),D=U.value||N===k||k<=0?N:k;!(c.offsetParent===null)&&(c.style.height=`${(n.selected.length===0?D:Math.max(y?y.clientHeight+(y.clientHeight>D?6:0):0,D))-2}px`),n.visible&&j.value!==!1&&((a=(l=m.value)==null?void 0:l.updatePopper)==null||a.call(l))})},z=async l=>{if(!(n.previousQuery===l||n.isOnComposition)){if(n.previousQuery===null&&(d.isFunction(t.filterMethod)||d.isFunction(t.remoteMethod))){n.previousQuery=l;return}n.previousQuery=l,e.nextTick(()=>{var a,c;n.visible&&((c=(a=m.value)==null?void 0:a.updatePopper)==null||c.call(a))}),n.hoverIndex=-1,t.multiple&&t.filterable&&e.nextTick(()=>{if(!$.value){const a=f.value.value.length*15+20;n.inputLength=t.collapseTags?Math.min(50,a):a,G()}F()}),t.remote&&d.isFunction(t.remoteMethod)?(n.hoverIndex=-1,t.remoteMethod(l)):d.isFunction(t.filterMethod)?(t.filterMethod(l),e.triggerRef(o)):(n.filteredOptionsCount=n.optionsCount,O.value.query=l,e.triggerRef(O),e.triggerRef(o)),t.defaultFirstOption&&(t.filterable||t.remote)&&n.filteredOptionsCount&&(await e.nextTick(),ne())}},G=()=>{n.currentPlaceholder!==""&&(n.currentPlaceholder=f.value.value?"":n.cachedPlaceHolder)},ne=()=>{const l=V.value.filter(y=>y.visible&&!y.disabled&&!y.states.groupDisabled),a=l.find(y=>y.created),c=l[0];n.hoverIndex=de(V.value,a||c)},A=()=>{var l;if(t.multiple)n.selectedLabel="";else{const c=le(t.modelValue);(l=c.props)!=null&&l.created?(n.createdLabel=c.props.value,n.createdSelected=!0):n.createdSelected=!1,n.selectedLabel=c.currentLabel,n.selected=c,t.filterable&&(n.query=n.selectedLabel);return}const a=[];Array.isArray(t.modelValue)&&t.modelValue.forEach(c=>{a.push(le(c))}),n.selected=a,e.nextTick(()=>{F()})},le=l=>{let a;const c=d.toRawType(l).toLowerCase()==="object",y=d.toRawType(l).toLowerCase()==="null",N=d.toRawType(l).toLowerCase()==="undefined";for(let ee=n.cachedOptions.size-1;ee>=0;ee--){const R=he.value[ee];if(c?d.get(R.value,t.valueKey)===d.get(l,t.valueKey):R.value===l){a={value:l,currentLabel:R.currentLabel,isDisabled:R.isDisabled};break}}if(a)return a;const D=c?l.label:!y&&!N?l:"",_={value:l,currentLabel:D};return t.multiple&&(_.hitState=!1),_},we=()=>{setTimeout(()=>{const l=t.valueKey;t.multiple?n.selected.length>0?n.hoverIndex=Math.min.apply(null,n.selected.map(a=>V.value.findIndex(c=>d.get(c,l)===d.get(a,l)))):n.hoverIndex=-1:n.hoverIndex=V.value.findIndex(a=>Ne(a)===Ne(n.selected))},300)},Ee=()=>{var l,a;ke(),(a=(l=m.value)==null?void 0:l.updatePopper)==null||a.call(l),t.multiple&&F()},ke=()=>{var l;n.inputWidth=(l=u.value)==null?void 0:l.$el.offsetWidth},Oe=()=>{t.filterable&&n.query!==n.selectedLabel&&(n.query=n.selectedLabel,z(n.query))},Y=me.debounce(()=>{Oe()},te.value),De=me.debounce(l=>{z(l.target.value)},te.value),X=l=>{re.isEqual(t.modelValue,l)||i.emit(M.CHANGE_EVENT,l)},K=l=>ut(l,a=>!n.disabledOptions.has(a)),se=l=>{if(l.code!==M.EVENT_CODE.delete){if(l.target.value.length<=0&&!ie()){const a=t.modelValue.slice(),c=K(a);if(c<0)return;a.splice(c,1),i.emit(M.UPDATE_MODEL_EVENT,a),X(a)}l.target.value.length===1&&t.modelValue.length===0&&(n.currentPlaceholder=n.cachedPlaceHolder)}},ue=(l,a)=>{const c=n.selected.indexOf(a);if(c>-1&&!$.value){const y=t.modelValue.slice();y.splice(c,1),i.emit(M.UPDATE_MODEL_EVENT,y),X(y),i.emit("remove-tag",a.value)}l.stopPropagation(),h()},oe=l=>{l.stopPropagation();const a=t.multiple?[]:"";if(!d.isString(a))for(const c of n.selected)c.isDisabled&&a.push(c.value);i.emit(M.UPDATE_MODEL_EVENT,a),X(a),n.hoverIndex=-1,n.visible=!1,i.emit("clear"),h()},ce=l=>{var a;if(t.multiple){const c=(t.modelValue||[]).slice(),y=de(c,l.value);y>-1?c.splice(y,1):(t.multipleLimit<=0||c.length<t.multipleLimit)&&c.push(l.value),i.emit(M.UPDATE_MODEL_EVENT,c),X(c),l.created&&(n.query="",z(""),n.inputLength=20),t.filterable&&((a=f.value)==null||a.focus())}else i.emit(M.UPDATE_MODEL_EVENT,l.value),X(l.value),n.visible=!1;pe(),!n.visible&&e.nextTick(()=>{Z(l)})},de=(l=[],a)=>{if(!d.isObject(a))return l.indexOf(a);const c=t.valueKey;let y=-1;return l.some((N,D)=>e.toRaw(d.get(N,c))===d.get(a,c)?(y=D,!0):!1),y},pe=()=>{const l=f.value||u.value;l&&(l==null||l.focus())},Z=l=>{var a,c,y,N,D;const _=Array.isArray(l)?l[0]:l;let ee=null;if(_!=null&&_.value){const R=V.value.filter(L=>L.value===_.value);R.length>0&&(ee=R[0].$el)}if(m.value&&ee){const R=(N=(y=(c=(a=m.value)==null?void 0:a.popperRef)==null?void 0:c.contentRef)==null?void 0:y.querySelector)==null?void 0:N.call(y,`.${p.be("dropdown","wrap")}`);R&&tt.scrollIntoView(R,ee)}(D=B.value)==null||D.handleScroll()},Te=l=>{n.optionsCount++,n.filteredOptionsCount++,n.options.set(l.value,l),n.cachedOptions.set(l.value,l),l.disabled&&n.disabledOptions.set(l.value,l)},Ve=(l,a)=>{n.options.get(l)===a&&(n.optionsCount--,n.filteredOptionsCount--,n.options.delete(l))},Ie=l=>{l.code!==M.EVENT_CODE.backspace&&ie(!1),n.inputLength=f.value.value.length*15+20,F()},ie=l=>{if(!Array.isArray(n.selected))return;const a=K(n.selected.map(y=>y.value)),c=n.selected[a];if(c)return l===!0||l===!1?(c.hitState=l,l):(c.hitState=!c.hitState,c.hitState)},Be=l=>{const a=l.target.value;if(l.type==="compositionend")n.isOnComposition=!1,e.nextTick(()=>z(a));else{const c=a[a.length-1]||"";n.isOnComposition=!Ge(c)}},ge=()=>{e.nextTick(()=>Z(n.selected))},s=l=>{n.focused||((t.automaticDropdown||t.filterable)&&(t.filterable&&!n.visible&&(n.menuVisibleOnFocus=!0),n.visible=!0),n.focused=!0,i.emit("focus",l))},h=()=>{var l,a;n.visible?(l=f.value||u.value)==null||l.focus():(a=u.value)==null||a.focus()},T=()=>{var l,a,c;n.visible=!1,(l=u.value)==null||l.blur(),(c=(a=g.value)==null?void 0:a.blur)==null||c.call(a)},J=l=>{var a,c,y;(a=m.value)!=null&&a.isFocusInsideContent(l)||(c=C.value)!=null&&c.isFocusInsideContent(l)||(y=v.value)!=null&&y.contains(l.relatedTarget)||(n.visible&&Pe(),n.focused=!1,i.emit("blur",l))},ae=l=>{oe(l)},Pe=()=>{n.visible=!1},Ae=l=>{n.visible&&(l.preventDefault(),l.stopPropagation(),n.visible=!1)},ze=l=>{l&&!n.mouseEnter||$.value||(n.menuVisibleOnFocus?n.menuVisibleOnFocus=!1:(!m.value||!m.value.isFocusInsideContent())&&(n.visible=!n.visible),h())},$e=()=>{n.visible?V.value[n.hoverIndex]&&ce(V.value[n.hoverIndex]):ze()},Ne=l=>d.isObject(l.value)?d.get(l.value,t.valueKey):l.value,Le=e.computed(()=>V.value.filter(l=>l.visible).every(l=>l.disabled)),Ke=e.computed(()=>t.multiple?n.selected.slice(0,t.maxCollapseTags):[]),Re=e.computed(()=>t.multiple?n.selected.slice(t.maxCollapseTags):[]),Me=l=>{if(!n.visible){n.visible=!0;return}if(!(n.options.size===0||n.filteredOptionsCount===0)&&!n.isOnComposition&&!Le.value){l==="next"?(n.hoverIndex++,n.hoverIndex===n.options.size&&(n.hoverIndex=0)):l==="prev"&&(n.hoverIndex--,n.hoverIndex<0&&(n.hoverIndex=n.options.size-1));const a=V.value[n.hoverIndex];(a.disabled===!0||a.states.groupDisabled===!0||!a.visible)&&Me(l),e.nextTick(()=>Z(I.value))}},qe=()=>{n.mouseEnter=!0},We=()=>{n.mouseEnter=!1},be=(l,a)=>{var c,y;ue(l,a),(y=(c=C.value)==null?void 0:c.updatePopper)==null||y.call(c)},He=e.computed(()=>({maxWidth:`${e.unref(n.inputWidth)-32-(ye.value?22:0)}px`,width:"100%"}));return{optionList:w,optionsArray:V,selectSize:U,handleResize:Ee,debouncedOnInputChange:Y,debouncedQueryChange:De,deletePrevTag:se,deleteTag:ue,deleteSelected:oe,handleOptionSelect:ce,scrollToOption:Z,readonly:H,resetInputHeight:F,showClose:ve,iconComponent:q,iconReverse:x,showNewOption:Q,collapseTagSize:Ce,setSelected:A,managePlaceholder:G,selectDisabled:$,emptyText:j,toggleLastOptionHitState:ie,resetInputState:Ie,handleComposition:Be,onOptionCreate:Te,onOptionDestroy:Ve,handleMenuEnter:ge,handleFocus:s,focus:h,blur:T,handleBlur:J,handleClearClick:ae,handleClose:Pe,handleKeydownEscape:Ae,toggleMenu:ze,selectOption:$e,getValueKey:Ne,navigateOptions:Me,handleDeleteTooltipTag:be,dropMenuVisible:Se,queryChange:O,groupQueryChange:o,showTagList:Ke,collapseTagList:Re,selectTagsStyle:He,reference:u,input:f,iOSInput:g,tooltipRef:m,tagTooltipRef:C,tags:b,selectWrapper:v,scrollbar:B,handleMouseEnter:qe,handleMouseLeave:We}};var qt=e.defineComponent({name:"ElOptions",emits:["update-options"],setup(t,{slots:n,emit:i}){let r=[];function p(u,f){if(u.length!==f.length)return!1;for(const[g]of u.entries())if(u[g]!=f[g])return!1;return!0}return()=>{var u,f;const g=(u=n.default)==null?void 0:u.call(n),m=[];function C(b){Array.isArray(b)&&b.forEach(v=>{var B,I,O,o;const w=(B=(v==null?void 0:v.type)||{})==null?void 0:B.name;w==="ElOptionGroup"?C(!d.isString(v.children)&&!Array.isArray(v.children)&&d.isFunction((I=v.children)==null?void 0:I.default)?(O=v.children)==null?void 0:O.default():v.children):w==="ElOption"?m.push((o=v.props)==null?void 0:o.label):Array.isArray(v.children)&&C(v.children)})}return g.length&&C((f=g[0])==null?void 0:f.children),p(m,r)||(r=m,i("update-options",m)),g}}});const Qe="ElSelect",Wt=e.defineComponent({name:Qe,componentName:Qe,components:{ElInput:Ye,ElSelectMenu:At,ElOption:xe,ElOptions:qt,ElTag:Ze,ElScrollbar:re.ElScrollbar,ElTooltip:re.ElTooltip,ElIcon:S.ElIcon},directives:{ClickOutside:re.ClickOutside},props:{name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:{type:String,validator:pt},effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:re.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:S.iconPropType,default:S.circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:S.iconPropType,default:S.arrow_down_default},tagType:{...Xe.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:String,values:re.Ee,default:"bottom-start"},ariaLabel:{type:String,default:void 0}},emits:[M.UPDATE_MODEL_EVENT,M.CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur"],setup(t,n){const i=d.useNamespace("select"),r=d.useNamespace("input"),{t:p}=d.useLocale(),u=Kt(t),{optionList:f,optionsArray:g,selectSize:m,readonly:C,handleResize:b,collapseTagSize:v,debouncedOnInputChange:B,debouncedQueryChange:I,deletePrevTag:O,deleteTag:o,deleteSelected:w,handleOptionSelect:k,scrollToOption:E,setSelected:P,resetInputHeight:H,managePlaceholder:$,showClose:ve,selectDisabled:q,iconComponent:x,iconReverse:ye,showNewOption:te,emptyText:j,toggleLastOptionHitState:V,resetInputState:he,handleComposition:Q,onOptionCreate:U,onOptionDestroy:Ce,handleMenuEnter:Se,handleFocus:F,focus:z,blur:G,handleBlur:ne,handleClearClick:A,handleClose:le,handleKeydownEscape:we,toggleMenu:Ee,selectOption:ke,getValueKey:Oe,navigateOptions:Y,handleDeleteTooltipTag:De,dropMenuVisible:X,reference:K,input:se,iOSInput:ue,tooltipRef:oe,tagTooltipRef:ce,tags:de,selectWrapper:pe,scrollbar:Z,queryChange:Te,groupQueryChange:Ve,handleMouseEnter:Ie,handleMouseLeave:ie,showTagList:Be,collapseTagList:ge,selectTagsStyle:s}=Rt(t,u,n),{inputWidth:h,selected:T,inputLength:J,filteredOptionsCount:ae,visible:Pe,selectedLabel:Ae,hoverIndex:ze,query:$e,inputHovering:Ne,currentPlaceholder:Le,menuVisibleOnFocus:Ke,isOnComposition:Re,options:Me,cachedOptions:qe,optionsCount:We,prefixWidth:be}=e.toRefs(u),He=e.computed(()=>{const L=[i.b()],fe=e.unref(m);return fe&&L.push(i.m(fe)),t.disabled&&L.push(i.m("disabled")),L}),l=e.computed(()=>[i.e("tags"),i.is("disabled",e.unref(q))]),a=e.computed(()=>[i.b("tags-wrapper"),{"has-prefix":e.unref(be)&&e.unref(T).length}]),c=e.computed(()=>[i.e("input"),i.is(e.unref(m)),i.is("disabled",e.unref(q))]),y=e.computed(()=>[i.e("input"),i.is(e.unref(m)),i.em("input","iOS")]),N=e.computed(()=>[i.is("empty",!t.allowCreate&&!!e.unref($e)&&e.unref(ae)===0)]),D=e.computed(()=>({maxWidth:`${e.unref(h)>123?e.unref(h)-123:e.unref(h)-75}px`})),_=e.computed(()=>({marginLeft:`${e.unref(be)}px`,flexGrow:1,width:`${e.unref(J)/(e.unref(h)-32)}%`,maxWidth:`${e.unref(h)-42}px`}));e.provide(Fe,e.reactive({props:t,options:Me,optionsArray:g,cachedOptions:qe,optionsCount:We,filteredOptionsCount:ae,hoverIndex:ze,handleOptionSelect:k,onOptionCreate:U,onOptionDestroy:Ce,selectWrapper:pe,selected:T,setSelected:P,queryChange:Te,groupQueryChange:Ve})),e.onMounted(()=>{u.cachedPlaceHolder=Le.value=t.placeholder||(()=>p("el.select.placeholder")),t.multiple&&Array.isArray(t.modelValue)&&t.modelValue.length>0&&(Le.value=""),me.useResizeObserver(pe,b),t.remote&&t.multiple&&H(),e.nextTick(()=>{const L=K.value&&K.value.$el;if(L&&(h.value=L.getBoundingClientRect().width,n.slots.prefix)){const fe=L.querySelector(`.${r.e("prefix")}`);be.value=Math.max(fe.getBoundingClientRect().width+11,30)}}),P()}),t.multiple&&!Array.isArray(t.modelValue)&&n.emit(M.UPDATE_MODEL_EVENT,[]),!t.multiple&&Array.isArray(t.modelValue)&&n.emit(M.UPDATE_MODEL_EVENT,"");const ee=e.computed(()=>{var L,fe;return(fe=(L=oe.value)==null?void 0:L.popperRef)==null?void 0:fe.contentRef}),R=L=>{f.value=L};return{isIOS:d.isIOS,onOptionsRendered:R,prefixWidth:be,selectSize:m,readonly:C,handleResize:b,collapseTagSize:v,debouncedOnInputChange:B,debouncedQueryChange:I,deletePrevTag:O,deleteTag:o,handleDeleteTooltipTag:De,deleteSelected:w,handleOptionSelect:k,scrollToOption:E,inputWidth:h,selected:T,inputLength:J,filteredOptionsCount:ae,visible:Pe,selectedLabel:Ae,hoverIndex:ze,query:$e,inputHovering:Ne,currentPlaceholder:Le,menuVisibleOnFocus:Ke,isOnComposition:Re,options:Me,resetInputHeight:H,managePlaceholder:$,showClose:ve,selectDisabled:q,iconComponent:x,iconReverse:ye,showNewOption:te,emptyText:j,toggleLastOptionHitState:V,resetInputState:he,handleComposition:Q,handleMenuEnter:Se,handleFocus:F,focus:z,blur:G,handleBlur:ne,handleClearClick:A,handleClose:le,handleKeydownEscape:we,toggleMenu:Ee,selectOption:ke,getValueKey:Oe,navigateOptions:Y,dropMenuVisible:X,reference:K,input:se,iOSInput:ue,tooltipRef:oe,popperPaneRef:ee,tags:de,selectWrapper:pe,scrollbar:Z,wrapperKls:He,tagsKls:l,tagWrapperKls:a,inputKls:c,iOSInputKls:y,scrollbarKls:N,selectTagsStyle:s,nsSelect:i,tagTextStyle:D,inputStyle:_,handleMouseEnter:Ie,handleMouseLeave:ie,showTagList:Be,collapseTagList:ge,tagTooltipRef:ce}}}),Ht=["disabled","autocomplete","aria-label"],xt=["disabled"],jt={style:{height:"100%",display:"flex","justify-content":"center","align-items":"center"}};function Ut(t,n,i,r,p,u){const f=e.resolveComponent("el-tag"),g=e.resolveComponent("el-tooltip"),m=e.resolveComponent("el-icon"),C=e.resolveComponent("el-input"),b=e.resolveComponent("el-option"),v=e.resolveComponent("el-options"),B=e.resolveComponent("el-scrollbar"),I=e.resolveComponent("el-select-menu"),O=e.resolveDirective("click-outside");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref:"selectWrapper",class:e.normalizeClass(t.wrapperKls),onMouseenter:n[22]||(n[22]=(...o)=>t.handleMouseEnter&&t.handleMouseEnter(...o)),onMouseleave:n[23]||(n[23]=(...o)=>t.handleMouseLeave&&t.handleMouseLeave(...o)),onClick:n[24]||(n[24]=e.withModifiers((...o)=>t.toggleMenu&&t.toggleMenu(...o),["stop"]))},[e.createVNode(g,{ref:"tooltipRef",visible:t.dropMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,onShow:t.handleMenuEnter},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-trigger",onMouseenter:n[20]||(n[20]=o=>t.inputHovering=!0),onMouseleave:n[21]||(n[21]=o=>t.inputHovering=!1)},[t.multiple?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"tags",tabindex:"-1",class:e.normalizeClass(t.tagsKls),style:e.normalizeStyle(t.selectTagsStyle),onClick:n[15]||(n[15]=(...o)=>t.focus&&t.focus(...o))},[t.collapseTags&&t.selected.length?(e.openBlock(),e.createBlock(e.Transition,{key:0,onAfterLeave:t.resetInputHeight},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.tagWrapperKls)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.showTagList,o=>(e.openBlock(),e.createBlock(f,{key:t.getValueKey(o),closable:!t.selectDisabled&&!o.isDisabled,size:t.collapseTagSize,hit:o.hitState,type:t.tagType,"disable-transitions":"",onClose:w=>t.deleteTag(w,o)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.nsSelect.e("tags-text")),style:e.normalizeStyle(t.tagTextStyle)},e.toDisplayString(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128)),t.selected.length>t.maxCollapseTags?(e.openBlock(),e.createBlock(f,{key:0,closable:!1,size:t.collapseTagSize,type:t.tagType,"disable-transitions":""},{default:e.withCtx(()=>[t.collapseTagsTooltip?(e.openBlock(),e.createBlock(g,{key:0,ref:"tagTooltipRef",disabled:t.dropMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.nsSelect.e("tags-text"))},"+ "+e.toDisplayString(t.selected.length-t.maxCollapseTags),3)]),content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.nsSelect.e("collapse-tags"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.collapseTagList,o=>(e.openBlock(),e.createElementBlock("div",{key:t.getValueKey(o),class:e.normalizeClass(t.nsSelect.e("collapse-tag"))},[e.createVNode(f,{class:"in-tooltip",closable:!t.selectDisabled&&!o.isDisabled,size:t.collapseTagSize,hit:o.hitState,type:t.tagType,"disable-transitions":"",style:{margin:"2px"},onClose:w=>t.handleDeleteTooltipTag(w,o)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.nsSelect.e("tags-text")),style:e.normalizeStyle({maxWidth:t.inputWidth-75+"px"})},e.toDisplayString(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(t.nsSelect.e("tags-text"))},"+ "+e.toDisplayString(t.selected.length-t.maxCollapseTags),3))]),_:1},8,["size","type"])):e.createCommentVNode("v-if",!0)],2)]),_:1},8,["onAfterLeave"])):e.createCommentVNode("v-if",!0),t.collapseTags?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(e.Transition,{key:1,onAfterLeave:t.resetInputHeight},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.tagWrapperKls),style:e.normalizeStyle(t.prefixWidth&&t.selected.length?{marginLeft:`${t.prefixWidth}px`}:"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selected,o=>(e.openBlock(),e.createBlock(f,{key:t.getValueKey(o),closable:!t.selectDisabled&&!o.isDisabled,size:t.collapseTagSize,hit:o.hitState,type:t.tagType,"disable-transitions":"",onClose:w=>t.deleteTag(w,o)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(t.nsSelect.e("tags-text")),style:e.normalizeStyle({maxWidth:t.inputWidth-75+"px"})},e.toDisplayString(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128))],6)]),_:1},8,["onAfterLeave"])),t.filterable&&!t.selectDisabled?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref:"input","onUpdate:modelValue":n[0]||(n[0]=o=>t.query=o),type:"text",class:e.normalizeClass(t.inputKls),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:e.normalizeStyle(t.inputStyle),"aria-label":t.ariaLabel,onFocus:n[1]||(n[1]=(...o)=>t.handleFocus&&t.handleFocus(...o)),onBlur:n[2]||(n[2]=(...o)=>t.handleBlur&&t.handleBlur(...o)),onKeyup:n[3]||(n[3]=(...o)=>t.managePlaceholder&&t.managePlaceholder(...o)),onKeydown:[n[4]||(n[4]=(...o)=>t.resetInputState&&t.resetInputState(...o)),n[5]||(n[5]=e.withKeys(e.withModifiers(o=>t.navigateOptions("next"),["prevent"]),["down"])),n[6]||(n[6]=e.withKeys(e.withModifiers(o=>t.navigateOptions("prev"),["prevent"]),["up"])),n[7]||(n[7]=e.withKeys((...o)=>t.handleKeydownEscape&&t.handleKeydownEscape(...o),["esc"])),n[8]||(n[8]=e.withKeys(e.withModifiers((...o)=>t.selectOption&&t.selectOption(...o),["stop","prevent"]),["enter"])),n[9]||(n[9]=e.withKeys((...o)=>t.deletePrevTag&&t.deletePrevTag(...o),["delete"])),n[10]||(n[10]=e.withKeys(o=>t.visible=!1,["tab"]))],onCompositionstart:n[11]||(n[11]=(...o)=>t.handleComposition&&t.handleComposition(...o)),onCompositionupdate:n[12]||(n[12]=(...o)=>t.handleComposition&&t.handleComposition(...o)),onCompositionend:n[13]||(n[13]=(...o)=>t.handleComposition&&t.handleComposition(...o)),onInput:n[14]||(n[14]=(...o)=>t.debouncedQueryChange&&t.debouncedQueryChange(...o))},null,46,Ht)),[[e.vModelText,t.query]]):e.createCommentVNode("v-if",!0)],6)):e.createCommentVNode("v-if",!0),e.createCommentVNode(" fix: https://github.com/element-plus/element-plus/issues/11415 "),t.isIOS&&!t.multiple&&t.filterable&&t.readonly?(e.openBlock(),e.createElementBlock("input",{key:1,ref:"iOSInput",class:e.normalizeClass(t.iOSInputKls),disabled:t.selectDisabled,type:"text"},null,10,xt)):e.createCommentVNode("v-if",!0),e.createVNode(C,{id:t.id,ref:"reference",modelValue:t.selectedLabel,"onUpdate:modelValue":n[16]||(n[16]=o=>t.selectedLabel=o),type:"text",placeholder:typeof t.currentPlaceholder=="function"?t.currentPlaceholder():t.currentPlaceholder,name:t.name,autocomplete:t.autocomplete,size:t.selectSize,disabled:t.selectDisabled,readonly:t.readonly,"validate-event":!1,class:e.normalizeClass([t.nsSelect.is("focus",t.visible)]),tabindex:t.multiple&&t.filterable?-1:void 0,label:t.ariaLabel,onFocus:t.handleFocus,onBlur:t.handleBlur,onInput:t.debouncedOnInputChange,onPaste:t.debouncedOnInputChange,onCompositionstart:t.handleComposition,onCompositionupdate:t.handleComposition,onCompositionend:t.handleComposition,onKeydown:[n[17]||(n[17]=e.withKeys(e.withModifiers(o=>t.navigateOptions("next"),["stop","prevent"]),["down"])),n[18]||(n[18]=e.withKeys(e.withModifiers(o=>t.navigateOptions("prev"),["stop","prevent"]),["up"])),e.withKeys(e.withModifiers(t.selectOption,["stop","prevent"]),["enter"]),e.withKeys(t.handleKeydownEscape,["esc"]),n[19]||(n[19]=e.withKeys(o=>t.visible=!1,["tab"]))]},e.createSlots({suffix:e.withCtx(()=>[t.iconComponent&&!t.showClose?(e.openBlock(),e.createBlock(m,{key:0,class:e.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):e.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(e.openBlock(),e.createBlock(m,{key:1,class:e.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon")]),onClick:t.handleClearClick},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):e.createCommentVNode("v-if",!0)]),_:2},[t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createElementVNode("div",jt,[e.renderSlot(t.$slots,"prefix")])])}:void 0]),1032,["id","modelValue","placeholder","name","autocomplete","size","disabled","readonly","class","tabindex","label","onFocus","onBlur","onInput","onPaste","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown"])],32)]),content:e.withCtx(()=>[e.createVNode(I,null,{default:e.withCtx(()=>[e.withDirectives(e.createVNode(B,{ref:"scrollbar",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:e.normalizeClass(t.scrollbarKls)},{default:e.withCtx(()=>[t.showNewOption?(e.openBlock(),e.createBlock(b,{key:0,value:t.query,created:!0},null,8,["value"])):e.createCommentVNode("v-if",!0),e.createVNode(v,{onUpdateOptions:t.onOptionsRendered},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["onUpdateOptions"])]),_:3},8,["wrap-class","view-class","class"]),[[e.vShow,t.options.size>0&&!t.loading]]),t.emptyText&&(!t.allowCreate||t.loading||t.allowCreate&&t.options.size===0)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.empty?e.renderSlot(t.$slots,"empty",{key:0}):(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(t.nsSelect.be("dropdown","empty"))},e.toDisplayString(t.emptyText),3))],64)):e.createCommentVNode("v-if",!0)]),_:3})]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onShow"])],34)),[[O,t.handleClose,t.popperPaneRef]])}var Qt=d._export_sfc(Wt,[["render",Ut],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const Gt=e.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const n=d.useNamespace("select"),i=e.ref(!0),r=e.getCurrentInstance(),p=e.ref([]);e.provide(Je,e.reactive({...e.toRefs(t)}));const u=e.inject(Fe);e.onMounted(()=>{p.value=f(r.subTree)});const f=m=>{const C=[];return Array.isArray(m.children)&&m.children.forEach(b=>{var v;b.type&&b.type.name==="ElOption"&&b.component&&b.component.proxy?C.push(b.component.proxy):(v=b.children)!=null&&v.length&&C.push(...f(b))}),C},{groupQueryChange:g}=e.toRaw(u);return e.watch(g,()=>{i.value=p.value.some(m=>m.visible===!0)},{flush:"post"}),{visible:i,ns:n}}});function Yt(t,n,i,r,p,u){return e.withDirectives((e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(t.ns.be("group","wrap"))},[e.createElementVNode("li",{class:e.normalizeClass(t.ns.be("group","title"))},e.toDisplayString(t.label),3),e.createElementVNode("li",null,[e.createElementVNode("ul",{class:e.normalizeClass(t.ns.b("group"))},[e.renderSlot(t.$slots,"default")],2)])],2)),[[e.vShow,t.visible]])}var _e=d._export_sfc(Gt,[["render",Yt],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const Xt=d.withInstall(Qt,{Option:xe,OptionGroup:_e}),Zt=d.withNoopInstall(xe);d.withNoopInstall(_e);exports.ElInput=Ye;exports.ElOption=Zt;exports.ElSelect=Xt;exports.ElTag=Ze;