qy-vue-plugins 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-BFusb3rd.js +880 -0
  2. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-C0OTINr4.js +1 -0
  3. package/dist/chunks/aria-CU11fhFG.js +5 -0
  4. package/dist/chunks/aria-Lnh-oIIU.js +173 -0
  5. package/dist/chunks/{base-C6ZR-g-3.js → base-BBPoamOf.js} +180 -168
  6. package/dist/chunks/base-Dbw4YzZq.js +1 -0
  7. package/dist/chunks/use-global-config-D_HRwVvW.js +301 -0
  8. package/dist/chunks/use-global-config-Wtw3ujWW.js +2 -0
  9. package/dist/manageTable/ReplaceSpeciesNameDialog.cjs +1 -1
  10. package/dist/manageTable/ReplaceSpeciesNameDialog.mjs +1 -1
  11. package/dist/manageTable/SortItem.cjs +1 -1
  12. package/dist/manageTable/SortItem.mjs +42 -39
  13. package/dist/manageTable/manageTable.cjs +1 -1
  14. package/dist/manageTable/manageTable.mjs +155 -108
  15. package/dist/mapbox/components/VideoDialog.cjs +3 -0
  16. package/dist/mapbox/components/VideoDialog.mjs +1741 -0
  17. package/dist/mapbox/widgets/LayerAttributeDialog.cjs +1 -2
  18. package/dist/mapbox/widgets/LayerAttributeDialog.mjs +264 -551
  19. package/dist/mapbox/widgets/LayerDialog.cjs +1 -1
  20. package/dist/mapbox/widgets/LayerDialog.mjs +201 -167
  21. package/dist/qy-vue-plugins.css +1 -1
  22. package/dist/types/manageTable/components/SortItem.vue.d.ts +1 -0
  23. package/dist/types/manageTable/manageTable.vue.d.ts +4 -0
  24. package/dist/types/mapbox/components/VideoDialog.vue.d.ts +58 -0
  25. package/dist/types/mapbox-components-VideoDialog.d.ts +4 -0
  26. package/package.json +1 -1
  27. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-BsMK0hpE.js +0 -1014
  28. package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-Crqsopo0.js +0 -5
  29. package/dist/chunks/base-CPjTxLkU.js +0 -1
@@ -0,0 +1,880 @@
1
+ import { s as yt, t as bt, v as We, w as wt, x as Te, y as Ge, z as ve, A as Xe, B as Oe, c as xt, d as Ve, f as Ye, i as le, j as F, C as St, e as Q, D as Ct, E as Et, k as Fe, u as Me, N as ue, b as Ae } from "./base-BBPoamOf.js";
2
+ import { computed as y, getCurrentInstance as qe, shallowRef as j, ref as O, watch as ee, unref as a, onMounted as Ze, nextTick as M, defineComponent as ge, useAttrs as It, useSlots as Nt, toRef as Pt, createElementBlock as z, openBlock as h, normalizeStyle as $e, normalizeClass as x, createCommentVNode as b, Fragment as de, createElementVNode as A, renderSlot as Z, createBlock as I, withCtx as E, resolveDynamicComponent as H, mergeProps as ke, withModifiers as ce, toDisplayString as W, inject as zt, reactive as Tt, createVNode as L, createTextVNode as pe } from "vue";
3
+ import { ElDialog as Ot, ElForm as Vt, ElFormItem as Re, ElButton as Le, ElMessage as J } from "element-plus";
4
+ import { a as Ft } from "./ProvideKeys-jhgDnhL_.js";
5
+ import { useEventListener as K, useResizeObserver as Mt, isClient as At } from "@vueuse/core";
6
+ import { i as $t, U as te, a as fe, b as kt, _ as Rt, u as Lt, c as Dt, d as _t, e as Bt, V as Ht, f as Kt, E as U, C as De, I as me, w as Ut } from "./aria-Lnh-oIIU.js";
7
+ import { CircleClose as Wt, View as Gt, Hide as Xt } from "@element-plus/icons-vue";
8
+ function Yt(e) {
9
+ return e;
10
+ }
11
+ function qt(e, t, s) {
12
+ switch (s.length) {
13
+ case 0:
14
+ return e.call(t);
15
+ case 1:
16
+ return e.call(t, s[0]);
17
+ case 2:
18
+ return e.call(t, s[0], s[1]);
19
+ case 3:
20
+ return e.call(t, s[0], s[1], s[2]);
21
+ }
22
+ return e.apply(t, s);
23
+ }
24
+ var Zt = 800, Jt = 16, Qt = Date.now;
25
+ function jt(e) {
26
+ var t = 0, s = 0;
27
+ return function() {
28
+ var o = Qt(), r = Jt - (o - s);
29
+ if (s = o, r > 0) {
30
+ if (++t >= Zt)
31
+ return arguments[0];
32
+ } else
33
+ t = 0;
34
+ return e.apply(void 0, arguments);
35
+ };
36
+ }
37
+ function en(e) {
38
+ return function() {
39
+ return e;
40
+ };
41
+ }
42
+ var ne = function() {
43
+ try {
44
+ var e = yt(Object, "defineProperty");
45
+ return e({}, "", {}), e;
46
+ } catch {
47
+ }
48
+ }(), tn = ne ? function(e, t) {
49
+ return ne(e, "toString", {
50
+ configurable: !0,
51
+ enumerable: !1,
52
+ value: en(t),
53
+ writable: !0
54
+ });
55
+ } : Yt, nn = jt(tn), on = 9007199254740991, an = /^(?:0|[1-9]\d*)$/;
56
+ function Je(e, t) {
57
+ var s = typeof e;
58
+ return t = t ?? on, !!t && (s == "number" || s != "symbol" && an.test(e)) && e > -1 && e % 1 == 0 && e < t;
59
+ }
60
+ function sn(e, t, s) {
61
+ t == "__proto__" && ne ? ne(e, t, {
62
+ configurable: !0,
63
+ enumerable: !0,
64
+ value: s,
65
+ writable: !0
66
+ }) : e[t] = s;
67
+ }
68
+ var rn = Object.prototype, ln = rn.hasOwnProperty;
69
+ function un(e, t, s) {
70
+ var o = e[t];
71
+ (!(ln.call(e, t) && bt(o, s)) || s === void 0 && !(t in e)) && sn(e, t, s);
72
+ }
73
+ var _e = Math.max;
74
+ function dn(e, t, s) {
75
+ return t = _e(t === void 0 ? e.length - 1 : t, 0), function() {
76
+ for (var o = arguments, r = -1, i = _e(o.length - t, 0), c = Array(i); ++r < i; )
77
+ c[r] = o[t + r];
78
+ r = -1;
79
+ for (var d = Array(t + 1); ++r < t; )
80
+ d[r] = o[r];
81
+ return d[t] = s(c), qt(e, this, d);
82
+ };
83
+ }
84
+ var cn = 9007199254740991;
85
+ function pn(e) {
86
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= cn;
87
+ }
88
+ var fn = "[object Arguments]";
89
+ function Be(e) {
90
+ return We(e) && wt(e) == fn;
91
+ }
92
+ var Qe = Object.prototype, mn = Qe.hasOwnProperty, vn = Qe.propertyIsEnumerable, je = Be(/* @__PURE__ */ function() {
93
+ return arguments;
94
+ }()) ? Be : function(e) {
95
+ return We(e) && mn.call(e, "callee") && !vn.call(e, "callee");
96
+ };
97
+ function gn(e, t) {
98
+ for (var s = -1, o = t.length, r = e.length; ++s < o; )
99
+ e[r + s] = t[s];
100
+ return e;
101
+ }
102
+ var He = Te ? Te.isConcatSpreadable : void 0;
103
+ function hn(e) {
104
+ return Ge(e) || je(e) || !!(He && e && e[He]);
105
+ }
106
+ function yn(e, t, s, o, r) {
107
+ var i = -1, c = e.length;
108
+ for (s || (s = hn), r || (r = []); ++i < c; ) {
109
+ var d = e[i];
110
+ s(d) ? gn(r, d) : r[r.length] = d;
111
+ }
112
+ return r;
113
+ }
114
+ function bn(e) {
115
+ var t = e == null ? 0 : e.length;
116
+ return t ? yn(e) : [];
117
+ }
118
+ function wn(e) {
119
+ return nn(dn(e, void 0, bn), e + "");
120
+ }
121
+ function xn(e, t) {
122
+ return e != null && t in Object(e);
123
+ }
124
+ function Sn(e, t, s) {
125
+ t = ve(t, e);
126
+ for (var o = -1, r = t.length, i = !1; ++o < r; ) {
127
+ var c = Xe(t[o]);
128
+ if (!(i = e != null && s(e, c)))
129
+ break;
130
+ e = e[c];
131
+ }
132
+ return i || ++o != r ? i : (r = e == null ? 0 : e.length, !!r && pn(r) && Je(c, r) && (Ge(e) || je(e)));
133
+ }
134
+ function Cn(e, t) {
135
+ return e != null && Sn(e, t, xn);
136
+ }
137
+ function En(e, t, s, o) {
138
+ if (!Oe(e))
139
+ return e;
140
+ t = ve(t, e);
141
+ for (var r = -1, i = t.length, c = i - 1, d = e; d != null && ++r < i; ) {
142
+ var p = Xe(t[r]), f = s;
143
+ if (p === "__proto__" || p === "constructor" || p === "prototype")
144
+ return e;
145
+ if (r != c) {
146
+ var v = d[p];
147
+ f = void 0, f === void 0 && (f = Oe(v) ? v : Je(t[r + 1]) ? [] : {});
148
+ }
149
+ un(d, p, f), d = d[p];
150
+ }
151
+ return e;
152
+ }
153
+ function In(e, t, s) {
154
+ for (var o = -1, r = t.length, i = {}; ++o < r; ) {
155
+ var c = t[o], d = xt(e, c);
156
+ s(d, c) && En(i, ve(c, e), d);
157
+ }
158
+ return i;
159
+ }
160
+ function Nn(e, t) {
161
+ return In(e, t, function(s, o) {
162
+ return Cn(e, o);
163
+ });
164
+ }
165
+ var Pn = wn(function(e, t) {
166
+ return e == null ? {} : Nn(e, t);
167
+ });
168
+ let C;
169
+ const zn = {
170
+ height: "0",
171
+ visibility: "hidden",
172
+ overflow: $t() ? "" : "hidden",
173
+ position: "absolute",
174
+ "z-index": "-1000",
175
+ top: "0",
176
+ right: "0"
177
+ }, Tn = [
178
+ "letter-spacing",
179
+ "line-height",
180
+ "padding-top",
181
+ "padding-bottom",
182
+ "font-family",
183
+ "font-weight",
184
+ "font-size",
185
+ "text-rendering",
186
+ "text-transform",
187
+ "width",
188
+ "text-indent",
189
+ "padding-left",
190
+ "padding-right",
191
+ "border-width",
192
+ "box-sizing",
193
+ "word-break"
194
+ ], Ke = (e) => {
195
+ const t = Number.parseFloat(e);
196
+ return Number.isNaN(t) ? e : t;
197
+ };
198
+ function On(e) {
199
+ const t = window.getComputedStyle(e), s = t.getPropertyValue("box-sizing"), o = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), r = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width"));
200
+ return { contextStyle: Tn.map((c) => [
201
+ c,
202
+ t.getPropertyValue(c)
203
+ ]), paddingSize: o, borderSize: r, boxSizing: s };
204
+ }
205
+ function Ue(e, t = 1, s) {
206
+ var o, r;
207
+ C || (C = document.createElement("textarea"), ((o = e.parentNode) != null ? o : document.body).appendChild(C));
208
+ const { paddingSize: i, borderSize: c, boxSizing: d, contextStyle: p } = On(e);
209
+ p.forEach(([g, l]) => C?.style.setProperty(g, l)), Object.entries(zn).forEach(([g, l]) => C?.style.setProperty(g, l, "important")), C.value = e.value || e.placeholder || "";
210
+ let f = C.scrollHeight;
211
+ const v = {};
212
+ d === "border-box" ? f = f + c : d === "content-box" && (f = f - i), C.value = "";
213
+ const N = C.scrollHeight - i;
214
+ if (Ve(t)) {
215
+ let g = N * t;
216
+ d === "border-box" && (g = g + i + c), f = Math.max(g, f), v.minHeight = `${g}px`;
217
+ }
218
+ if (Ve(s)) {
219
+ let g = N * s;
220
+ d === "border-box" && (g = g + i + c), f = Math.min(g, f);
221
+ }
222
+ return v.height = `${f}px`, (r = C.parentNode) == null || r.removeChild(C), C = void 0, v;
223
+ }
224
+ const Vn = (e) => e, Fn = Ye({
225
+ ariaLabel: String,
226
+ ariaOrientation: {
227
+ type: String,
228
+ values: ["horizontal", "vertical", "undefined"]
229
+ },
230
+ ariaControls: String
231
+ }), Mn = (e) => Pn(Fn, e), An = Ye({
232
+ id: {
233
+ type: String,
234
+ default: void 0
235
+ },
236
+ size: St,
237
+ disabled: {
238
+ type: Boolean,
239
+ default: void 0
240
+ },
241
+ modelValue: {
242
+ type: F([
243
+ String,
244
+ Number,
245
+ Object
246
+ ]),
247
+ default: ""
248
+ },
249
+ modelModifiers: {
250
+ type: F(Object),
251
+ default: () => ({})
252
+ },
253
+ maxlength: {
254
+ type: [String, Number]
255
+ },
256
+ minlength: {
257
+ type: [String, Number]
258
+ },
259
+ type: {
260
+ type: F(String),
261
+ default: "text"
262
+ },
263
+ resize: {
264
+ type: String,
265
+ values: ["none", "both", "horizontal", "vertical"]
266
+ },
267
+ autosize: {
268
+ type: F([Boolean, Object]),
269
+ default: !1
270
+ },
271
+ autocomplete: {
272
+ type: F(String),
273
+ default: "off"
274
+ },
275
+ formatter: {
276
+ type: Function
277
+ },
278
+ parser: {
279
+ type: Function
280
+ },
281
+ placeholder: {
282
+ type: String
283
+ },
284
+ form: {
285
+ type: String
286
+ },
287
+ readonly: Boolean,
288
+ clearable: Boolean,
289
+ clearIcon: {
290
+ type: fe,
291
+ default: Wt
292
+ },
293
+ showPassword: Boolean,
294
+ showWordLimit: Boolean,
295
+ wordLimitPosition: {
296
+ type: String,
297
+ values: ["inside", "outside"],
298
+ default: "inside"
299
+ },
300
+ suffixIcon: {
301
+ type: fe
302
+ },
303
+ prefixIcon: {
304
+ type: fe
305
+ },
306
+ containerRole: {
307
+ type: String,
308
+ default: void 0
309
+ },
310
+ tabindex: {
311
+ type: [String, Number],
312
+ default: 0
313
+ },
314
+ validateEvent: {
315
+ type: Boolean,
316
+ default: !0
317
+ },
318
+ inputStyle: {
319
+ type: F([Object, Array, String]),
320
+ default: () => Vn({})
321
+ },
322
+ autofocus: Boolean,
323
+ rows: {
324
+ type: Number,
325
+ default: 2
326
+ },
327
+ ...Mn(["ariaLabel"]),
328
+ inputmode: {
329
+ type: F(String),
330
+ default: void 0
331
+ },
332
+ name: String
333
+ }), $n = {
334
+ [te]: (e) => le(e),
335
+ input: (e) => le(e),
336
+ change: (e, t) => le(e) && (t instanceof Event || t === void 0),
337
+ focus: (e) => e instanceof FocusEvent,
338
+ blur: (e) => e instanceof FocusEvent,
339
+ clear: () => !0,
340
+ mouseleave: (e) => e instanceof MouseEvent,
341
+ mouseenter: (e) => e instanceof MouseEvent,
342
+ keydown: (e) => e instanceof Event,
343
+ compositionstart: (e) => e instanceof CompositionEvent,
344
+ compositionupdate: (e) => e instanceof CompositionEvent,
345
+ compositionend: (e) => e instanceof CompositionEvent
346
+ }, kn = ["class", "style"], Rn = /^on[A-Z]/, Ln = (e = {}) => {
347
+ const { excludeListeners: t = !1, excludeKeys: s } = e, o = y(() => (s?.value || []).concat(kn)), r = qe();
348
+ return r ? y(() => {
349
+ var i;
350
+ return Ct(Object.entries((i = r.proxy) == null ? void 0 : i.$attrs).filter(([c]) => !o.value.includes(c) && !(t && Rn.test(c))));
351
+ }) : (Q("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), y(() => ({})));
352
+ };
353
+ function Dn(e, {
354
+ disabled: t,
355
+ beforeFocus: s,
356
+ afterFocus: o,
357
+ beforeBlur: r,
358
+ afterBlur: i
359
+ } = {}) {
360
+ const c = qe(), { emit: d } = c, p = j(), f = O(!1), v = (l) => {
361
+ const u = Fe(s) ? s(l) : !1;
362
+ a(t) || f.value || u || (f.value = !0, d("focus", l), o?.());
363
+ }, N = (l) => {
364
+ var u;
365
+ const S = Fe(r) ? r(l) : !1;
366
+ a(t) || l.relatedTarget && ((u = p.value) != null && u.contains(l.relatedTarget)) || S || (f.value = !1, d("blur", l), i?.());
367
+ }, g = (l) => {
368
+ var u, S;
369
+ a(t) || kt(l.target) || (u = p.value) != null && u.contains(document.activeElement) && p.value !== document.activeElement || (S = e.value) == null || S.focus();
370
+ };
371
+ return ee([p, () => a(t)], ([l, u]) => {
372
+ l && (u ? l.removeAttribute("tabindex") : l.setAttribute("tabindex", "-1"));
373
+ }), K(p, "focus", v, !0), K(p, "blur", N, !0), K(p, "click", g, !0), typeof process < "u" && process.env.NODE_ENV === "test" && Ze(() => {
374
+ const l = Et(e.value) ? e.value : document.querySelector("input,textarea");
375
+ l && (K(l, "focus", v, !0), K(l, "blur", N, !0));
376
+ }), {
377
+ isFocused: f,
378
+ wrapperRef: p,
379
+ handleFocus: v,
380
+ handleBlur: N
381
+ };
382
+ }
383
+ const _n = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);
384
+ function Bn({
385
+ afterComposition: e,
386
+ emit: t
387
+ }) {
388
+ const s = O(!1), o = (d) => {
389
+ t?.("compositionstart", d), s.value = !0;
390
+ }, r = (d) => {
391
+ var p;
392
+ t?.("compositionupdate", d);
393
+ const f = (p = d.target) == null ? void 0 : p.value, v = f[f.length - 1] || "";
394
+ s.value = !_n(v);
395
+ }, i = (d) => {
396
+ t?.("compositionend", d), s.value && (s.value = !1, M(() => e(d)));
397
+ };
398
+ return {
399
+ isComposing: s,
400
+ handleComposition: (d) => {
401
+ d.type === "compositionend" ? i(d) : r(d);
402
+ },
403
+ handleCompositionStart: o,
404
+ handleCompositionUpdate: r,
405
+ handleCompositionEnd: i
406
+ };
407
+ }
408
+ function Hn(e) {
409
+ let t;
410
+ function s() {
411
+ if (e.value == null)
412
+ return;
413
+ const { selectionStart: r, selectionEnd: i, value: c } = e.value;
414
+ if (r == null || i == null)
415
+ return;
416
+ const d = c.slice(0, Math.max(0, r)), p = c.slice(Math.max(0, i));
417
+ t = {
418
+ selectionStart: r,
419
+ selectionEnd: i,
420
+ value: c,
421
+ beforeTxt: d,
422
+ afterTxt: p
423
+ };
424
+ }
425
+ function o() {
426
+ if (e.value == null || t == null)
427
+ return;
428
+ const { value: r } = e.value, { beforeTxt: i, afterTxt: c, selectionStart: d } = t;
429
+ if (i == null || c == null || d == null)
430
+ return;
431
+ let p = r.length;
432
+ if (r.endsWith(c))
433
+ p = r.length - c.length;
434
+ else if (r.startsWith(i))
435
+ p = i.length;
436
+ else {
437
+ const f = i[d - 1], v = r.indexOf(f, d - 1);
438
+ v !== -1 && (p = v + 1);
439
+ }
440
+ e.value.setSelectionRange(p, p);
441
+ }
442
+ return [s, o];
443
+ }
444
+ const et = "ElInput", Kn = ge({
445
+ name: et,
446
+ inheritAttrs: !1
447
+ }), Un = /* @__PURE__ */ ge({
448
+ ...Kn,
449
+ props: An,
450
+ emits: $n,
451
+ setup(e, { expose: t, emit: s }) {
452
+ const o = e, r = It(), i = Ln(), c = Nt(), d = y(() => [
453
+ o.type === "textarea" ? S.b() : u.b(),
454
+ u.m(g.value),
455
+ u.is("disabled", l.value),
456
+ u.is("exceed", rt.value),
457
+ {
458
+ [u.b("group")]: c.prepend || c.append,
459
+ [u.m("prefix")]: c.prefix || o.prefixIcon,
460
+ [u.m("suffix")]: c.suffix || o.suffixIcon || o.clearable || o.showPassword,
461
+ [u.bm("suffix", "password-clear")]: q.value && se.value,
462
+ [u.b("hidden")]: o.type === "hidden"
463
+ },
464
+ r.class
465
+ ]), p = y(() => [
466
+ u.e("wrapper"),
467
+ u.is("focus", ae.value)
468
+ ]), { form: f, formItem: v } = _t(), { inputId: N } = Bt(o, {
469
+ formItemContext: v
470
+ }), g = Lt(), l = Dt(), u = Me("input"), S = Me("textarea"), G = j(), T = j(), oe = O(!1), X = O(!1), he = O(), Y = j(o.inputStyle), P = y(() => G.value || T.value), { wrapperRef: tt, isFocused: ae, handleFocus: nt, handleBlur: ot } = Dn(P, {
471
+ disabled: l,
472
+ afterBlur() {
473
+ var n;
474
+ o.validateEvent && ((n = v?.validate) == null || n.call(v, "blur").catch((m) => Q(m)));
475
+ }
476
+ }), ye = y(() => {
477
+ var n;
478
+ return (n = f?.statusIcon) != null ? n : !1;
479
+ }), D = y(() => v?.validateState || ""), be = y(() => D.value && Ht[D.value]), at = y(() => X.value ? Gt : Xt), st = y(() => [
480
+ r.style
481
+ ]), we = y(() => [
482
+ o.inputStyle,
483
+ Y.value,
484
+ { resize: o.resize }
485
+ ]), V = y(() => Kt(o.modelValue) ? "" : String(o.modelValue)), q = y(() => o.clearable && !l.value && !o.readonly && !!V.value && (ae.value || oe.value)), se = y(() => o.showPassword && !l.value && !!V.value), $ = y(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !l.value && !o.readonly && !o.showPassword), re = y(() => V.value.length), rt = y(() => !!$.value && re.value > Number(o.maxlength)), it = y(() => !!c.suffix || !!o.suffixIcon || q.value || o.showPassword || $.value || !!D.value && ye.value), lt = y(() => !!Object.keys(o.modelModifiers).length), [ut, dt] = Hn(G);
486
+ Mt(T, (n) => {
487
+ if (ct(), !$.value || o.resize !== "both" && o.resize !== "horizontal")
488
+ return;
489
+ const m = n[0], { width: w } = m.contentRect;
490
+ he.value = {
491
+ right: `calc(100% - ${w + 22 - 10}px)`
492
+ };
493
+ });
494
+ const _ = () => {
495
+ const { type: n, autosize: m } = o;
496
+ if (!(!At || n !== "textarea" || !T.value))
497
+ if (m) {
498
+ const w = Ae(m) ? m.minRows : void 0, R = Ae(m) ? m.maxRows : void 0, B = Ue(T.value, w, R);
499
+ Y.value = {
500
+ overflowY: "hidden",
501
+ ...B
502
+ }, M(() => {
503
+ T.value.offsetHeight, Y.value = B;
504
+ });
505
+ } else
506
+ Y.value = {
507
+ minHeight: Ue(T.value).minHeight
508
+ };
509
+ }, ct = ((n) => {
510
+ let m = !1;
511
+ return () => {
512
+ var w;
513
+ if (m || !o.autosize)
514
+ return;
515
+ ((w = T.value) == null ? void 0 : w.offsetParent) === null || (setTimeout(n), m = !0);
516
+ };
517
+ })(_), k = () => {
518
+ const n = P.value, m = o.formatter ? o.formatter(V.value) : V.value;
519
+ !n || n.value === m || o.type === "file" || (n.value = m);
520
+ }, xe = (n) => {
521
+ const { trim: m, number: w } = o.modelModifiers;
522
+ return m && (n = n.trim()), w && (n = `${Ke(n)}`), o.formatter && o.parser && (n = o.parser(n)), n;
523
+ }, ie = async (n) => {
524
+ if (Ce.value)
525
+ return;
526
+ const { lazy: m } = o.modelModifiers;
527
+ let { value: w } = n.target;
528
+ if (m) {
529
+ s(me, w);
530
+ return;
531
+ }
532
+ if (w = xe(w), String(w) === V.value) {
533
+ o.formatter && k();
534
+ return;
535
+ }
536
+ ut(), s(te, w), s(me, w), await M(), (o.formatter && o.parser || !lt.value) && k(), dt();
537
+ }, Se = async (n) => {
538
+ let { value: m } = n.target;
539
+ m = xe(m), o.modelModifiers.lazy && s(te, m), s(De, m, n), await M(), k();
540
+ }, {
541
+ isComposing: Ce,
542
+ handleCompositionStart: Ee,
543
+ handleCompositionUpdate: Ie,
544
+ handleCompositionEnd: Ne
545
+ } = Bn({ emit: s, afterComposition: ie }), pt = () => {
546
+ X.value = !X.value;
547
+ }, ft = () => {
548
+ var n;
549
+ return (n = P.value) == null ? void 0 : n.focus();
550
+ }, mt = () => {
551
+ var n;
552
+ return (n = P.value) == null ? void 0 : n.blur();
553
+ }, vt = (n) => {
554
+ oe.value = !1, s("mouseleave", n);
555
+ }, gt = (n) => {
556
+ oe.value = !0, s("mouseenter", n);
557
+ }, Pe = (n) => {
558
+ s("keydown", n);
559
+ }, ht = () => {
560
+ var n;
561
+ (n = P.value) == null || n.select();
562
+ }, ze = () => {
563
+ s(te, ""), s(De, ""), s("clear"), s(me, "");
564
+ };
565
+ return ee(() => o.modelValue, () => {
566
+ var n;
567
+ M(() => _()), o.validateEvent && ((n = v?.validate) == null || n.call(v, "change").catch((m) => Q(m)));
568
+ }), ee(V, (n) => {
569
+ if (!P.value)
570
+ return;
571
+ const { trim: m, number: w } = o.modelModifiers, R = P.value.value, B = (w || o.type === "number") && !/^0\d/.test(R) ? `${Ke(R)}` : R;
572
+ B !== n && (document.activeElement === P.value && P.value.type !== "range" && m && B.trim() === n || k());
573
+ }), ee(() => o.type, async () => {
574
+ await M(), k(), _();
575
+ }), Ze(() => {
576
+ !o.formatter && o.parser && Q(et, "If you set the parser, you also need to set the formatter."), k(), M(_);
577
+ }), t({
578
+ input: G,
579
+ textarea: T,
580
+ ref: P,
581
+ textareaStyle: we,
582
+ autosize: Pt(o, "autosize"),
583
+ isComposing: Ce,
584
+ focus: ft,
585
+ blur: mt,
586
+ select: ht,
587
+ clear: ze,
588
+ resizeTextarea: _
589
+ }), (n, m) => (h(), z("div", {
590
+ class: x([
591
+ a(d),
592
+ {
593
+ [a(u).bm("group", "append")]: n.$slots.append,
594
+ [a(u).bm("group", "prepend")]: n.$slots.prepend
595
+ }
596
+ ]),
597
+ style: $e(a(st)),
598
+ onMouseenter: gt,
599
+ onMouseleave: vt
600
+ }, [
601
+ b(" input "),
602
+ n.type !== "textarea" ? (h(), z(de, { key: 0 }, [
603
+ b(" prepend slot "),
604
+ n.$slots.prepend ? (h(), z("div", {
605
+ key: 0,
606
+ class: x(a(u).be("group", "prepend"))
607
+ }, [
608
+ Z(n.$slots, "prepend")
609
+ ], 2)) : b("v-if", !0),
610
+ A("div", {
611
+ ref_key: "wrapperRef",
612
+ ref: tt,
613
+ class: x(a(p))
614
+ }, [
615
+ b(" prefix slot "),
616
+ n.$slots.prefix || n.prefixIcon ? (h(), z("span", {
617
+ key: 0,
618
+ class: x(a(u).e("prefix"))
619
+ }, [
620
+ A("span", {
621
+ class: x(a(u).e("prefix-inner"))
622
+ }, [
623
+ Z(n.$slots, "prefix"),
624
+ n.prefixIcon ? (h(), I(a(U), {
625
+ key: 0,
626
+ class: x(a(u).e("icon"))
627
+ }, {
628
+ default: E(() => [
629
+ (h(), I(H(n.prefixIcon)))
630
+ ]),
631
+ _: 1
632
+ }, 8, ["class"])) : b("v-if", !0)
633
+ ], 2)
634
+ ], 2)) : b("v-if", !0),
635
+ A("input", ke({
636
+ id: a(N),
637
+ ref_key: "input",
638
+ ref: G,
639
+ class: a(u).e("inner")
640
+ }, a(i), {
641
+ name: n.name,
642
+ minlength: n.minlength,
643
+ maxlength: n.maxlength,
644
+ type: n.showPassword ? X.value ? "text" : "password" : n.type,
645
+ disabled: a(l),
646
+ readonly: n.readonly,
647
+ autocomplete: n.autocomplete,
648
+ tabindex: n.tabindex,
649
+ "aria-label": n.ariaLabel,
650
+ placeholder: n.placeholder,
651
+ style: n.inputStyle,
652
+ form: n.form,
653
+ autofocus: n.autofocus,
654
+ role: n.containerRole,
655
+ inputmode: n.inputmode,
656
+ onCompositionstart: a(Ee),
657
+ onCompositionupdate: a(Ie),
658
+ onCompositionend: a(Ne),
659
+ onInput: ie,
660
+ onChange: Se,
661
+ onKeydown: Pe
662
+ }), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
663
+ b(" suffix slot "),
664
+ a(it) ? (h(), z("span", {
665
+ key: 1,
666
+ class: x(a(u).e("suffix"))
667
+ }, [
668
+ A("span", {
669
+ class: x(a(u).e("suffix-inner"))
670
+ }, [
671
+ !a(q) || !a(se) || !a($) ? (h(), z(de, { key: 0 }, [
672
+ Z(n.$slots, "suffix"),
673
+ n.suffixIcon ? (h(), I(a(U), {
674
+ key: 0,
675
+ class: x(a(u).e("icon"))
676
+ }, {
677
+ default: E(() => [
678
+ (h(), I(H(n.suffixIcon)))
679
+ ]),
680
+ _: 1
681
+ }, 8, ["class"])) : b("v-if", !0)
682
+ ], 64)) : b("v-if", !0),
683
+ a(q) ? (h(), I(a(U), {
684
+ key: 1,
685
+ class: x([a(u).e("icon"), a(u).e("clear")]),
686
+ onMousedown: ce(a(ue), ["prevent"]),
687
+ onClick: ze
688
+ }, {
689
+ default: E(() => [
690
+ (h(), I(H(n.clearIcon)))
691
+ ]),
692
+ _: 1
693
+ }, 8, ["class", "onMousedown"])) : b("v-if", !0),
694
+ a(se) ? (h(), I(a(U), {
695
+ key: 2,
696
+ class: x([a(u).e("icon"), a(u).e("password")]),
697
+ onClick: pt,
698
+ onMousedown: ce(a(ue), ["prevent"]),
699
+ onMouseup: ce(a(ue), ["prevent"])
700
+ }, {
701
+ default: E(() => [
702
+ (h(), I(H(a(at))))
703
+ ]),
704
+ _: 1
705
+ }, 8, ["class", "onMousedown", "onMouseup"])) : b("v-if", !0),
706
+ a($) ? (h(), z("span", {
707
+ key: 3,
708
+ class: x([
709
+ a(u).e("count"),
710
+ a(u).is("outside", n.wordLimitPosition === "outside")
711
+ ])
712
+ }, [
713
+ A("span", {
714
+ class: x(a(u).e("count-inner"))
715
+ }, W(a(re)) + " / " + W(n.maxlength), 3)
716
+ ], 2)) : b("v-if", !0),
717
+ a(D) && a(be) && a(ye) ? (h(), I(a(U), {
718
+ key: 4,
719
+ class: x([
720
+ a(u).e("icon"),
721
+ a(u).e("validateIcon"),
722
+ a(u).is("loading", a(D) === "validating")
723
+ ])
724
+ }, {
725
+ default: E(() => [
726
+ (h(), I(H(a(be))))
727
+ ]),
728
+ _: 1
729
+ }, 8, ["class"])) : b("v-if", !0)
730
+ ], 2)
731
+ ], 2)) : b("v-if", !0)
732
+ ], 2),
733
+ b(" append slot "),
734
+ n.$slots.append ? (h(), z("div", {
735
+ key: 1,
736
+ class: x(a(u).be("group", "append"))
737
+ }, [
738
+ Z(n.$slots, "append")
739
+ ], 2)) : b("v-if", !0)
740
+ ], 64)) : (h(), z(de, { key: 1 }, [
741
+ b(" textarea "),
742
+ A("textarea", ke({
743
+ id: a(N),
744
+ ref_key: "textarea",
745
+ ref: T,
746
+ class: [a(S).e("inner"), a(u).is("focus", a(ae))]
747
+ }, a(i), {
748
+ name: n.name,
749
+ minlength: n.minlength,
750
+ maxlength: n.maxlength,
751
+ tabindex: n.tabindex,
752
+ disabled: a(l),
753
+ readonly: n.readonly,
754
+ autocomplete: n.autocomplete,
755
+ style: a(we),
756
+ "aria-label": n.ariaLabel,
757
+ placeholder: n.placeholder,
758
+ form: n.form,
759
+ autofocus: n.autofocus,
760
+ rows: n.rows,
761
+ role: n.containerRole,
762
+ onCompositionstart: a(Ee),
763
+ onCompositionupdate: a(Ie),
764
+ onCompositionend: a(Ne),
765
+ onInput: ie,
766
+ onFocus: a(nt),
767
+ onBlur: a(ot),
768
+ onChange: Se,
769
+ onKeydown: Pe
770
+ }), null, 16, ["id", "name", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
771
+ a($) ? (h(), z("span", {
772
+ key: 0,
773
+ style: $e(he.value),
774
+ class: x([
775
+ a(u).e("count"),
776
+ a(u).is("outside", n.wordLimitPosition === "outside")
777
+ ])
778
+ }, W(a(re)) + " / " + W(n.maxlength), 7)) : b("v-if", !0)
779
+ ], 64))
780
+ ], 38));
781
+ }
782
+ });
783
+ var Wn = /* @__PURE__ */ Rt(Un, [["__file", "input.vue"]]);
784
+ const Gn = Ut(Wn), to = /* @__PURE__ */ ge({
785
+ __name: "ReplaceSpeciesNameDialog",
786
+ emits: ["closed"],
787
+ setup(e, { expose: t, emit: s }) {
788
+ const o = zt(Ft), r = O(!1), i = Tt({
789
+ speciesName: ""
790
+ }), c = O(!1), d = O(""), p = O([]), f = s, v = async () => {
791
+ if (i.speciesName == "") {
792
+ J.error("请输入新的物种名称");
793
+ return;
794
+ }
795
+ if (c.value = !0, o) {
796
+ for (let l = 0; l < p.value.length; l++)
797
+ if (p.value[l].speciesName != i.speciesName) {
798
+ var g = Object.assign({}, p.value[l], { speciesName: i.speciesName });
799
+ await o([g]);
800
+ }
801
+ J.success("替换成功"), f("closed");
802
+ } else
803
+ J.warning("该调查不支持替换");
804
+ c.value = !1, r.value = !1, i.speciesName = "";
805
+ };
806
+ return t({
807
+ showDialog: (g, l) => {
808
+ if (l[0].speciesName == null) {
809
+ J.warning("该调查不支持替换");
810
+ return;
811
+ }
812
+ d.value = g, r.value = !0, p.value = l;
813
+ }
814
+ }), (g, l) => {
815
+ const u = Gn;
816
+ return h(), I(a(Ot), {
817
+ center: "",
818
+ title: "物种名称替换",
819
+ modelValue: r.value,
820
+ "onUpdate:modelValue": l[2] || (l[2] = (S) => r.value = S),
821
+ width: "30%",
822
+ "append-to-body": ""
823
+ }, {
824
+ footer: E(() => [
825
+ A("span", null, [
826
+ L(a(Le), {
827
+ onClick: l[1] || (l[1] = (S) => r.value = !1)
828
+ }, {
829
+ default: E(() => [...l[3] || (l[3] = [
830
+ pe("取消", -1)
831
+ ])]),
832
+ _: 1
833
+ }),
834
+ L(a(Le), {
835
+ loading: c.value,
836
+ type: "primary",
837
+ onClick: v,
838
+ plain: ""
839
+ }, {
840
+ default: E(() => [...l[4] || (l[4] = [
841
+ pe("确定", -1)
842
+ ])]),
843
+ _: 1
844
+ }, 8, ["loading"])
845
+ ])
846
+ ]),
847
+ default: E(() => [
848
+ L(a(Vt), {
849
+ model: i,
850
+ "label-width": "150px",
851
+ inline: !1
852
+ }, {
853
+ default: E(() => [
854
+ L(a(Re), { label: "原物种名称:" }, {
855
+ default: E(() => [
856
+ pe(W(p.value.map((S) => S.speciesName).join(",")), 1)
857
+ ]),
858
+ _: 1
859
+ }),
860
+ L(a(Re), { label: "新的物名称:" }, {
861
+ default: E(() => [
862
+ L(u, {
863
+ modelValue: i.speciesName,
864
+ "onUpdate:modelValue": l[0] || (l[0] = (S) => i.speciesName = S)
865
+ }, null, 8, ["modelValue"])
866
+ ]),
867
+ _: 1
868
+ })
869
+ ]),
870
+ _: 1
871
+ }, 8, ["model"])
872
+ ]),
873
+ _: 1
874
+ }, 8, ["modelValue"]);
875
+ };
876
+ }
877
+ });
878
+ export {
879
+ to as _
880
+ };