@vsleem-realsee-viewer/projection-plugin 2.0.2 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1509 +0,0 @@
1
- import { defineComponent as G, ref as U, createVNode as C, shallowRef as X, watch as ae, computed as Q, onMounted as Oe, Fragment as De, nextTick as be, onBeforeUpdate as ut, onBeforeUnmount as we, watchEffect as Pe, getCurrentInstance as Ye, onUnmounted as it, unref as fe, resolveDirective as st, createElementBlock as ct, openBlock as dt, withDirectives as ft, createElementVNode as me, withCtx as Me, createTextVNode as Te } from "vue";
2
- import { utils as he, Point as $e } from "@vsleem-realsee-viewer/shared";
3
- import { u as vt } from "./resize-BnocRTcF.mjs";
4
- import { o as pt, i as bt, b as gt, f as He, _ as M, s as mt, P as K, c as ee, a as D, d as V, e as q, B as Xe, g as Ne, u as We, F as ie, h as ze, j as se, k as ht, l as Ee, m as Qe, C as Ge, n as oe, N as Fe, p as ke, S as yt, q as Se, r as J, t as xt, w as ve, v as Ct, R as At, I as qe, x as wt, y as St } from "./index-CS-tvHJ_.mjs";
5
- var It = pt(Object.getPrototypeOf, Object), Ot = "[object Object]", Pt = Function.prototype, zt = Object.prototype, Ke = Pt.toString, Et = zt.hasOwnProperty, _t = Ke.call(Object);
6
- function Bt(e) {
7
- if (!bt(e) || gt(e) != Ot)
8
- return !1;
9
- var l = It(e);
10
- if (l === null)
11
- return !0;
12
- var t = Et.call(l, "constructor") && l.constructor;
13
- return typeof t == "function" && t instanceof t && Ke.call(t) == _t;
14
- }
15
- const re = (e) => e != null && (Array.isArray(e) ? He(e).length : !0);
16
- function _e(e) {
17
- return re(e.prefix) || re(e.suffix) || re(e.allowClear);
18
- }
19
- function pe(e) {
20
- return re(e.addonBefore) || re(e.addonAfter);
21
- }
22
- function Ie(e) {
23
- return typeof e > "u" || e === null ? "" : String(e);
24
- }
25
- function ue(e, l, t, n) {
26
- if (!t)
27
- return;
28
- const a = l;
29
- if (l.type === "click") {
30
- Object.defineProperty(a, "target", {
31
- writable: !0
32
- }), Object.defineProperty(a, "currentTarget", {
33
- writable: !0
34
- });
35
- const g = e.cloneNode(!0);
36
- a.target = g, a.currentTarget = g, g.value = "", t(a);
37
- return;
38
- }
39
- if (n !== void 0) {
40
- Object.defineProperty(a, "target", {
41
- writable: !0
42
- }), Object.defineProperty(a, "currentTarget", {
43
- writable: !0
44
- }), a.target = e, a.currentTarget = e, e.value = n, t(a);
45
- return;
46
- }
47
- t(a);
48
- }
49
- function Je(e, l) {
50
- if (!e) return;
51
- e.focus(l);
52
- const {
53
- cursor: t
54
- } = l || {};
55
- if (t) {
56
- const n = e.value.length;
57
- switch (t) {
58
- case "start":
59
- e.setSelectionRange(0, 0);
60
- break;
61
- case "end":
62
- e.setSelectionRange(n, n);
63
- break;
64
- default:
65
- e.setSelectionRange(0, n);
66
- }
67
- }
68
- }
69
- const Rt = () => ({
70
- addonBefore: K.any,
71
- addonAfter: K.any,
72
- prefix: K.any,
73
- suffix: K.any,
74
- clearIcon: K.any,
75
- affixWrapperClassName: String,
76
- groupClassName: String,
77
- wrapperClassName: String,
78
- inputClassName: String,
79
- allowClear: {
80
- type: Boolean,
81
- default: void 0
82
- }
83
- }), et = () => M(M({}, Rt()), {
84
- value: {
85
- type: [String, Number, Symbol],
86
- default: void 0
87
- },
88
- defaultValue: {
89
- type: [String, Number, Symbol],
90
- default: void 0
91
- },
92
- inputElement: K.any,
93
- prefixCls: String,
94
- disabled: {
95
- type: Boolean,
96
- default: void 0
97
- },
98
- focused: {
99
- type: Boolean,
100
- default: void 0
101
- },
102
- triggerFocus: Function,
103
- readonly: {
104
- type: Boolean,
105
- default: void 0
106
- },
107
- handleReset: Function,
108
- hidden: {
109
- type: Boolean,
110
- default: void 0
111
- }
112
- }), tt = () => M(M({}, et()), {
113
- id: String,
114
- placeholder: {
115
- type: [String, Number]
116
- },
117
- autocomplete: String,
118
- type: mt("text"),
119
- name: String,
120
- size: {
121
- type: String
122
- },
123
- autofocus: {
124
- type: Boolean,
125
- default: void 0
126
- },
127
- lazy: {
128
- type: Boolean,
129
- default: !0
130
- },
131
- maxlength: Number,
132
- loading: {
133
- type: Boolean,
134
- default: void 0
135
- },
136
- bordered: {
137
- type: Boolean,
138
- default: void 0
139
- },
140
- showCount: {
141
- type: [Boolean, Object]
142
- },
143
- htmlSize: Number,
144
- onPressEnter: Function,
145
- onKeydown: Function,
146
- onKeyup: Function,
147
- onFocus: Function,
148
- onBlur: Function,
149
- onChange: Function,
150
- onInput: Function,
151
- "onUpdate:value": Function,
152
- onCompositionstart: Function,
153
- onCompositionend: Function,
154
- valueModifiers: Object,
155
- hidden: {
156
- type: Boolean,
157
- default: void 0
158
- },
159
- status: String
160
- }), Mt = G({
161
- name: "BaseInput",
162
- inheritAttrs: !1,
163
- props: et(),
164
- setup(e, l) {
165
- let {
166
- slots: t,
167
- attrs: n
168
- } = l;
169
- const a = U(), g = (o) => {
170
- var c;
171
- if (!((c = a.value) === null || c === void 0) && c.contains(o.target)) {
172
- const {
173
- triggerFocus: d
174
- } = e;
175
- d == null || d();
176
- }
177
- }, i = () => {
178
- var o;
179
- const {
180
- allowClear: c,
181
- value: d,
182
- disabled: f,
183
- readonly: v,
184
- handleReset: s,
185
- suffix: P = t.suffix,
186
- prefixCls: E
187
- } = e;
188
- if (!c)
189
- return null;
190
- const R = !f && !v && d, p = `${E}-clear-icon`, T = ((o = t.clearIcon) === null || o === void 0 ? void 0 : o.call(t)) || "*";
191
- return C("span", {
192
- onClick: s,
193
- onMousedown: (I) => I.preventDefault(),
194
- class: D({
195
- [`${p}-hidden`]: !R,
196
- [`${p}-has-suffix`]: !!P
197
- }, p),
198
- role: "button",
199
- tabindex: -1
200
- }, [T]);
201
- };
202
- return () => {
203
- var o, c;
204
- const {
205
- focused: d,
206
- value: f,
207
- disabled: v,
208
- allowClear: s,
209
- readonly: P,
210
- hidden: E,
211
- prefixCls: R,
212
- prefix: p = (o = t.prefix) === null || o === void 0 ? void 0 : o.call(t),
213
- suffix: T = (c = t.suffix) === null || c === void 0 ? void 0 : c.call(t),
214
- addonAfter: I = t.addonAfter,
215
- addonBefore: z = t.addonBefore,
216
- inputElement: N,
217
- affixWrapperClassName: b,
218
- wrapperClassName: m,
219
- groupClassName: r
220
- } = e;
221
- let S = ee(N, {
222
- value: f,
223
- hidden: E
224
- });
225
- if (_e({
226
- prefix: p,
227
- suffix: T,
228
- allowClear: s
229
- })) {
230
- const w = `${R}-affix-wrapper`, $ = D(w, {
231
- [`${w}-disabled`]: v,
232
- [`${w}-focused`]: d,
233
- [`${w}-readonly`]: P,
234
- [`${w}-input-with-clear-btn`]: T && s && f
235
- }, !pe({
236
- addonAfter: I,
237
- addonBefore: z
238
- }) && n.class, b), j = (T || s) && C("span", {
239
- class: `${R}-suffix`
240
- }, [i(), T]);
241
- S = C("span", {
242
- class: $,
243
- style: n.style,
244
- hidden: !pe({
245
- addonAfter: I,
246
- addonBefore: z
247
- }) && E,
248
- onMousedown: g,
249
- ref: a
250
- }, [p && C("span", {
251
- class: `${R}-prefix`
252
- }, [p]), ee(N, {
253
- style: null,
254
- value: f,
255
- hidden: null
256
- }), j]);
257
- }
258
- if (pe({
259
- addonAfter: I,
260
- addonBefore: z
261
- })) {
262
- const w = `${R}-group`, $ = `${w}-addon`, j = D(`${R}-wrapper`, w, m), F = D(`${R}-group-wrapper`, n.class, r);
263
- return C("span", {
264
- class: F,
265
- style: n.style,
266
- hidden: E
267
- }, [C("span", {
268
- class: j
269
- }, [z && C("span", {
270
- class: $
271
- }, [z]), ee(S, {
272
- style: null,
273
- hidden: null
274
- }), I && C("span", {
275
- class: $
276
- }, [I])])]);
277
- }
278
- return S;
279
- };
280
- }
281
- });
282
- var Tt = function(e, l) {
283
- var t = {};
284
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
285
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
286
- l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
287
- return t;
288
- };
289
- const $t = G({
290
- name: "VCInput",
291
- inheritAttrs: !1,
292
- props: tt(),
293
- setup(e, l) {
294
- let {
295
- slots: t,
296
- attrs: n,
297
- expose: a,
298
- emit: g
299
- } = l;
300
- const i = X(e.value === void 0 ? e.defaultValue : e.value), o = X(!1), c = X(), d = X();
301
- ae(() => e.value, () => {
302
- i.value = e.value;
303
- }), ae(() => e.disabled, () => {
304
- e.disabled && (o.value = !1);
305
- });
306
- const f = (r) => {
307
- c.value && Je(c.value.input, r);
308
- }, v = () => {
309
- var r;
310
- (r = c.value.input) === null || r === void 0 || r.blur();
311
- }, s = (r, S, w) => {
312
- var $;
313
- ($ = c.value.input) === null || $ === void 0 || $.setSelectionRange(r, S, w);
314
- }, P = () => {
315
- var r;
316
- (r = c.value.input) === null || r === void 0 || r.select();
317
- };
318
- a({
319
- focus: f,
320
- blur: v,
321
- input: Q(() => {
322
- var r;
323
- return (r = c.value.input) === null || r === void 0 ? void 0 : r.input;
324
- }),
325
- stateValue: i,
326
- setSelectionRange: s,
327
- select: P
328
- });
329
- const E = (r) => {
330
- g("change", r);
331
- }, R = (r, S) => {
332
- i.value !== r && (e.value === void 0 ? i.value = r : be(() => {
333
- var w;
334
- c.value.input.value !== i.value && ((w = d.value) === null || w === void 0 || w.$forceUpdate());
335
- }), be(() => {
336
- S && S();
337
- }));
338
- }, p = (r) => {
339
- const {
340
- value: S
341
- } = r.target;
342
- if (i.value === S) return;
343
- const w = r.target.value;
344
- ue(c.value.input, r, E), R(w);
345
- }, T = (r) => {
346
- r.keyCode === 13 && g("pressEnter", r), g("keydown", r);
347
- }, I = (r) => {
348
- o.value = !0, g("focus", r);
349
- }, z = (r) => {
350
- o.value = !1, g("blur", r);
351
- }, N = (r) => {
352
- ue(c.value.input, r, E), R("", () => {
353
- f();
354
- });
355
- }, b = () => {
356
- var r, S;
357
- const {
358
- addonBefore: w = t.addonBefore,
359
- addonAfter: $ = t.addonAfter,
360
- disabled: j,
361
- valueModifiers: F = {},
362
- htmlSize: y,
363
- autocomplete: O,
364
- prefixCls: x,
365
- inputClassName: A,
366
- prefix: _ = (r = t.prefix) === null || r === void 0 ? void 0 : r.call(t),
367
- suffix: k = (S = t.suffix) === null || S === void 0 ? void 0 : S.call(t),
368
- allowClear: u,
369
- type: h = "text"
370
- } = e, B = q(e, [
371
- "prefixCls",
372
- "onPressEnter",
373
- "addonBefore",
374
- "addonAfter",
375
- "prefix",
376
- "suffix",
377
- "allowClear",
378
- // Input elements must be either controlled or uncontrolled,
379
- // specify either the value prop, or the defaultValue prop, but not both.
380
- "defaultValue",
381
- "size",
382
- "bordered",
383
- "htmlSize",
384
- "lazy",
385
- "showCount",
386
- "valueModifiers",
387
- "showCount",
388
- "affixWrapperClassName",
389
- "groupClassName",
390
- "inputClassName",
391
- "wrapperClassName"
392
- ]), L = M(M(M({}, B), n), {
393
- autocomplete: O,
394
- onChange: p,
395
- onInput: p,
396
- onFocus: I,
397
- onBlur: z,
398
- onKeydown: T,
399
- class: D(x, {
400
- [`${x}-disabled`]: j
401
- }, A, !pe({
402
- addonAfter: $,
403
- addonBefore: w
404
- }) && !_e({
405
- prefix: _,
406
- suffix: k,
407
- allowClear: u
408
- }) && n.class),
409
- ref: c,
410
- key: "ant-input",
411
- size: y,
412
- type: h,
413
- lazy: e.lazy
414
- });
415
- return F.lazy && delete L.onInput, L.autofocus || delete L.autofocus, C(Xe, q(L, ["size"]), null);
416
- }, m = () => {
417
- var r;
418
- const {
419
- maxlength: S,
420
- suffix: w = (r = t.suffix) === null || r === void 0 ? void 0 : r.call(t),
421
- showCount: $,
422
- prefixCls: j
423
- } = e, F = Number(S) > 0;
424
- if (w || $) {
425
- const y = [...Ie(i.value)].length, O = typeof $ == "object" ? $.formatter({
426
- count: y,
427
- maxlength: S
428
- }) : `${y}${F ? ` / ${S}` : ""}`;
429
- return C(De, null, [!!$ && C("span", {
430
- class: D(`${j}-show-count-suffix`, {
431
- [`${j}-show-count-has-suffix`]: !!w
432
- })
433
- }, [O]), w]);
434
- }
435
- return null;
436
- };
437
- return Oe(() => {
438
- process.env.NODE_ENV === "test" && e.autofocus && f();
439
- }), () => {
440
- const {
441
- prefixCls: r,
442
- disabled: S
443
- } = e, w = Tt(e, ["prefixCls", "disabled"]);
444
- return C(Mt, V(V(V({}, w), n), {}, {
445
- ref: d,
446
- prefixCls: r,
447
- inputElement: b(),
448
- handleReset: N,
449
- value: Ie(i.value),
450
- focused: o.value,
451
- triggerFocus: f,
452
- suffix: m(),
453
- disabled: S
454
- }), t);
455
- };
456
- }
457
- }), ge = () => q(tt(), ["wrapperClassName", "groupClassName", "inputClassName", "affixWrapperClassName"]), nt = () => M(M({}, q(ge(), ["prefix", "addonBefore", "addonAfter", "suffix"])), {
458
- rows: Number,
459
- autosize: {
460
- type: [Boolean, Object],
461
- default: void 0
462
- },
463
- autoSize: {
464
- type: [Boolean, Object],
465
- default: void 0
466
- },
467
- onResize: {
468
- type: Function
469
- },
470
- onCompositionstart: Ne(),
471
- onCompositionend: Ne(),
472
- valueModifiers: Object
473
- });
474
- var Nt = function(e, l) {
475
- var t = {};
476
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
477
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
478
- l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
479
- return t;
480
- };
481
- const Z = G({
482
- compatConfig: {
483
- MODE: 3
484
- },
485
- name: "AInput",
486
- inheritAttrs: !1,
487
- props: ge(),
488
- setup(e, l) {
489
- let {
490
- slots: t,
491
- attrs: n,
492
- expose: a,
493
- emit: g
494
- } = l;
495
- const i = U(), o = We(), c = ie.useInject(), d = Q(() => ze(c.status, e.status)), {
496
- direction: f,
497
- prefixCls: v,
498
- size: s,
499
- autocomplete: P
500
- } = se("input", e), {
501
- compactSize: E,
502
- compactItemClassnames: R
503
- } = ht(v, f), p = Q(() => E.value || s.value), [T, I] = Ee(v), z = Qe();
504
- a({
505
- focus: (y) => {
506
- var O;
507
- (O = i.value) === null || O === void 0 || O.focus(y);
508
- },
509
- blur: () => {
510
- var y;
511
- (y = i.value) === null || y === void 0 || y.blur();
512
- },
513
- input: i,
514
- setSelectionRange: (y, O, x) => {
515
- var A;
516
- (A = i.value) === null || A === void 0 || A.setSelectionRange(y, O, x);
517
- },
518
- select: () => {
519
- var y;
520
- (y = i.value) === null || y === void 0 || y.select();
521
- }
522
- });
523
- const S = U([]), w = () => {
524
- S.value.push(setTimeout(() => {
525
- var y, O, x, A;
526
- !((y = i.value) === null || y === void 0) && y.input && ((O = i.value) === null || O === void 0 ? void 0 : O.input.getAttribute("type")) === "password" && (!((x = i.value) === null || x === void 0) && x.input.hasAttribute("value")) && ((A = i.value) === null || A === void 0 || A.input.removeAttribute("value"));
527
- }));
528
- };
529
- Oe(() => {
530
- w();
531
- }), ut(() => {
532
- S.value.forEach((y) => clearTimeout(y));
533
- }), we(() => {
534
- S.value.forEach((y) => clearTimeout(y));
535
- });
536
- const $ = (y) => {
537
- w(), g("blur", y), o.onFieldBlur();
538
- }, j = (y) => {
539
- w(), g("focus", y);
540
- }, F = (y) => {
541
- g("update:value", y.target.value), g("change", y), g("input", y), o.onFieldChange();
542
- };
543
- return () => {
544
- var y, O, x, A, _, k;
545
- const {
546
- hasFeedback: u,
547
- feedbackIcon: h
548
- } = c, {
549
- allowClear: B,
550
- bordered: L = !0,
551
- prefix: Y = (y = t.prefix) === null || y === void 0 ? void 0 : y.call(t),
552
- suffix: le = (O = t.suffix) === null || O === void 0 ? void 0 : O.call(t),
553
- addonAfter: ce = (x = t.addonAfter) === null || x === void 0 ? void 0 : x.call(t),
554
- addonBefore: te = (A = t.addonBefore) === null || A === void 0 ? void 0 : A.call(t),
555
- id: de = (_ = o.id) === null || _ === void 0 ? void 0 : _.value
556
- } = e, ne = Nt(e, ["allowClear", "bordered", "prefix", "suffix", "addonAfter", "addonBefore", "id"]), lt = (u || le) && C(De, null, [le, u && h]), H = v.value, ot = _e({
557
- prefix: Y,
558
- suffix: le
559
- }) || !!u, rt = t.clearIcon || (() => C(Ge, null, null));
560
- return T(C($t, V(V(V({}, n), q(ne, ["onUpdate:value", "onChange", "onInput"])), {}, {
561
- onChange: F,
562
- id: de,
563
- disabled: (k = e.disabled) !== null && k !== void 0 ? k : z.value,
564
- ref: i,
565
- prefixCls: H,
566
- autocomplete: P.value,
567
- onBlur: $,
568
- onFocus: j,
569
- prefix: Y,
570
- suffix: lt,
571
- allowClear: B,
572
- addonAfter: ce && C(Fe, null, {
573
- default: () => [C(ke, null, {
574
- default: () => [ce]
575
- })]
576
- }),
577
- addonBefore: te && C(Fe, null, {
578
- default: () => [C(ke, null, {
579
- default: () => [te]
580
- })]
581
- }),
582
- class: [n.class, R.value],
583
- inputClassName: D({
584
- [`${H}-sm`]: p.value === "small",
585
- [`${H}-lg`]: p.value === "large",
586
- [`${H}-rtl`]: f.value === "rtl",
587
- [`${H}-borderless`]: !L
588
- }, !ot && oe(H, d.value), I.value),
589
- affixWrapperClassName: D({
590
- [`${H}-affix-wrapper-sm`]: p.value === "small",
591
- [`${H}-affix-wrapper-lg`]: p.value === "large",
592
- [`${H}-affix-wrapper-rtl`]: f.value === "rtl",
593
- [`${H}-affix-wrapper-borderless`]: !L
594
- }, oe(`${H}-affix-wrapper`, d.value, u), I.value),
595
- wrapperClassName: D({
596
- [`${H}-group-rtl`]: f.value === "rtl"
597
- }, I.value),
598
- groupClassName: D({
599
- [`${H}-group-wrapper-sm`]: p.value === "small",
600
- [`${H}-group-wrapper-lg`]: p.value === "large",
601
- [`${H}-group-wrapper-rtl`]: f.value === "rtl"
602
- }, oe(`${H}-group-wrapper`, d.value, u), I.value)
603
- }), M(M({}, t), {
604
- clearIcon: rt
605
- })));
606
- };
607
- }
608
- }), Ft = G({
609
- compatConfig: {
610
- MODE: 3
611
- },
612
- name: "AInputGroup",
613
- inheritAttrs: !1,
614
- props: {
615
- prefixCls: String,
616
- size: {
617
- type: String
618
- },
619
- compact: {
620
- type: Boolean,
621
- default: void 0
622
- }
623
- },
624
- setup(e, l) {
625
- let {
626
- slots: t,
627
- attrs: n
628
- } = l;
629
- const {
630
- prefixCls: a,
631
- direction: g,
632
- getPrefixCls: i
633
- } = se("input-group", e), o = ie.useInject();
634
- ie.useProvide(o, {
635
- isFormItemInput: !1
636
- });
637
- const c = Q(() => i("input")), [d, f] = Ee(c), v = Q(() => {
638
- const s = a.value;
639
- return {
640
- [`${s}`]: !0,
641
- [f.value]: !0,
642
- [`${s}-lg`]: e.size === "large",
643
- [`${s}-sm`]: e.size === "small",
644
- [`${s}-compact`]: e.compact,
645
- [`${s}-rtl`]: g.value === "rtl"
646
- };
647
- });
648
- return () => {
649
- var s;
650
- return d(C("span", V(V({}, n), {}, {
651
- class: D(v.value, n.class)
652
- }), [(s = t.default) === null || s === void 0 ? void 0 : s.call(t)]));
653
- };
654
- }
655
- });
656
- var kt = function(e, l) {
657
- var t = {};
658
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
659
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
660
- l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
661
- return t;
662
- };
663
- const jt = G({
664
- compatConfig: {
665
- MODE: 3
666
- },
667
- name: "AInputSearch",
668
- inheritAttrs: !1,
669
- props: M(M({}, ge()), {
670
- inputPrefixCls: String,
671
- // 不能设置默认值 https://github.com/vueComponent/ant-design-vue/issues/1916
672
- enterButton: K.any,
673
- onSearch: {
674
- type: Function
675
- }
676
- }),
677
- setup(e, l) {
678
- let {
679
- slots: t,
680
- attrs: n,
681
- expose: a,
682
- emit: g
683
- } = l;
684
- const i = X(), o = X(!1);
685
- a({
686
- focus: () => {
687
- var b;
688
- (b = i.value) === null || b === void 0 || b.focus();
689
- },
690
- blur: () => {
691
- var b;
692
- (b = i.value) === null || b === void 0 || b.blur();
693
- }
694
- });
695
- const f = (b) => {
696
- g("update:value", b.target.value), b && b.target && b.type === "click" && g("search", b.target.value, b), g("change", b);
697
- }, v = (b) => {
698
- var m;
699
- document.activeElement === ((m = i.value) === null || m === void 0 ? void 0 : m.input) && b.preventDefault();
700
- }, s = (b) => {
701
- var m, r;
702
- g("search", (r = (m = i.value) === null || m === void 0 ? void 0 : m.input) === null || r === void 0 ? void 0 : r.stateValue, b);
703
- }, P = (b) => {
704
- o.value || e.loading || s(b);
705
- }, E = (b) => {
706
- o.value = !0, g("compositionstart", b);
707
- }, R = (b) => {
708
- o.value = !1, g("compositionend", b);
709
- }, {
710
- prefixCls: p,
711
- getPrefixCls: T,
712
- direction: I,
713
- size: z
714
- } = se("input-search", e), N = Q(() => T("input", e.inputPrefixCls));
715
- return () => {
716
- var b, m, r, S;
717
- const {
718
- disabled: w,
719
- loading: $,
720
- addonAfter: j = (b = t.addonAfter) === null || b === void 0 ? void 0 : b.call(t),
721
- suffix: F = (m = t.suffix) === null || m === void 0 ? void 0 : m.call(t)
722
- } = e, y = kt(e, ["disabled", "loading", "addonAfter", "suffix"]);
723
- let {
724
- enterButton: O = (S = (r = t.enterButton) === null || r === void 0 ? void 0 : r.call(t)) !== null && S !== void 0 ? S : !1
725
- } = e;
726
- O = O || O === "";
727
- const x = typeof O == "boolean" ? C(yt, null, null) : null, A = `${p.value}-button`, _ = Array.isArray(O) ? O[0] : O;
728
- let k;
729
- const u = _.type && Bt(_.type) && _.type.__ANT_BUTTON;
730
- if (u || _.tagName === "button")
731
- k = ee(_, M({
732
- onMousedown: v,
733
- onClick: s,
734
- key: "enterButton"
735
- }, u ? {
736
- class: A,
737
- size: z.value
738
- } : {}), !1);
739
- else {
740
- const B = x && !O;
741
- k = C(Se, {
742
- class: A,
743
- type: O ? "primary" : void 0,
744
- size: z.value,
745
- disabled: w,
746
- key: "enterButton",
747
- onMousedown: v,
748
- onClick: s,
749
- loading: $,
750
- icon: B ? x : null
751
- }, {
752
- default: () => [B ? null : x || O]
753
- });
754
- }
755
- j && (k = [k, j]);
756
- const h = D(p.value, {
757
- [`${p.value}-rtl`]: I.value === "rtl",
758
- [`${p.value}-${z.value}`]: !!z.value,
759
- [`${p.value}-with-button`]: !!O
760
- }, n.class);
761
- return C(Z, V(V(V({
762
- ref: i
763
- }, q(y, ["onUpdate:value", "onSearch", "enterButton"])), n), {}, {
764
- onPressEnter: P,
765
- onCompositionstart: E,
766
- onCompositionend: R,
767
- size: z.value,
768
- prefixCls: N.value,
769
- addonAfter: k,
770
- suffix: F,
771
- onChange: f,
772
- class: h,
773
- disabled: w
774
- }), t);
775
- };
776
- }
777
- }), je = (e) => e != null && (Array.isArray(e) ? He(e).length : !0);
778
- function Lt(e) {
779
- return je(e.addonBefore) || je(e.addonAfter);
780
- }
781
- const Zt = ["text", "input"], Ut = G({
782
- compatConfig: {
783
- MODE: 3
784
- },
785
- name: "ClearableLabeledInput",
786
- inheritAttrs: !1,
787
- props: {
788
- prefixCls: String,
789
- inputType: K.oneOf(xt("text", "input")),
790
- value: J(),
791
- defaultValue: J(),
792
- allowClear: {
793
- type: Boolean,
794
- default: void 0
795
- },
796
- element: J(),
797
- handleReset: Function,
798
- disabled: {
799
- type: Boolean,
800
- default: void 0
801
- },
802
- direction: {
803
- type: String
804
- },
805
- size: {
806
- type: String
807
- },
808
- suffix: J(),
809
- prefix: J(),
810
- addonBefore: J(),
811
- addonAfter: J(),
812
- readonly: {
813
- type: Boolean,
814
- default: void 0
815
- },
816
- focused: {
817
- type: Boolean,
818
- default: void 0
819
- },
820
- bordered: {
821
- type: Boolean,
822
- default: !0
823
- },
824
- triggerFocus: {
825
- type: Function
826
- },
827
- hidden: Boolean,
828
- status: String,
829
- hashId: String
830
- },
831
- setup(e, l) {
832
- let {
833
- slots: t,
834
- attrs: n
835
- } = l;
836
- const a = ie.useInject(), g = (o) => {
837
- const {
838
- value: c,
839
- disabled: d,
840
- readonly: f,
841
- handleReset: v,
842
- suffix: s = t.suffix
843
- } = e, P = !d && !f && c, E = `${o}-clear-icon`;
844
- return C(Ge, {
845
- onClick: v,
846
- onMousedown: (R) => R.preventDefault(),
847
- class: D({
848
- [`${E}-hidden`]: !P,
849
- [`${E}-has-suffix`]: !!s
850
- }, E),
851
- role: "button"
852
- }, null);
853
- }, i = (o, c) => {
854
- const {
855
- value: d,
856
- allowClear: f,
857
- direction: v,
858
- bordered: s,
859
- hidden: P,
860
- status: E,
861
- addonAfter: R = t.addonAfter,
862
- addonBefore: p = t.addonBefore,
863
- hashId: T
864
- } = e, {
865
- status: I,
866
- hasFeedback: z
867
- } = a;
868
- if (!f)
869
- return ee(c, {
870
- value: d,
871
- disabled: e.disabled
872
- });
873
- const N = D(`${o}-affix-wrapper`, `${o}-affix-wrapper-textarea-with-clear-btn`, oe(`${o}-affix-wrapper`, ze(I, E), z), {
874
- [`${o}-affix-wrapper-rtl`]: v === "rtl",
875
- [`${o}-affix-wrapper-borderless`]: !s,
876
- // className will go to addon wrapper
877
- [`${n.class}`]: !Lt({
878
- addonAfter: R,
879
- addonBefore: p
880
- }) && n.class
881
- }, T);
882
- return C("span", {
883
- class: N,
884
- style: n.style,
885
- hidden: P
886
- }, [ee(c, {
887
- style: null,
888
- value: d,
889
- disabled: e.disabled
890
- }), g(o)]);
891
- };
892
- return () => {
893
- var o;
894
- const {
895
- prefixCls: c,
896
- inputType: d,
897
- element: f = (o = t.element) === null || o === void 0 ? void 0 : o.call(t)
898
- } = e;
899
- return d === Zt[0] ? i(c, f) : null;
900
- };
901
- }
902
- }), Vt = `
903
- min-height:0 !important;
904
- max-height:none !important;
905
- height:0 !important;
906
- visibility:hidden !important;
907
- overflow:hidden !important;
908
- position:absolute !important;
909
- z-index:-1000 !important;
910
- top:0 !important;
911
- right:0 !important;
912
- pointer-events: none !important;
913
- `, Dt = ["letter-spacing", "line-height", "padding-top", "padding-bottom", "font-family", "font-weight", "font-size", "font-variant", "text-rendering", "text-transform", "width", "text-indent", "padding-left", "padding-right", "border-width", "box-sizing", "word-break", "white-space"], ye = {};
914
- let W;
915
- function Yt(e) {
916
- let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
917
- const t = e.getAttribute("id") || e.getAttribute("data-reactid") || e.getAttribute("name");
918
- if (l && ye[t])
919
- return ye[t];
920
- const n = window.getComputedStyle(e), a = n.getPropertyValue("box-sizing") || n.getPropertyValue("-moz-box-sizing") || n.getPropertyValue("-webkit-box-sizing"), g = parseFloat(n.getPropertyValue("padding-bottom")) + parseFloat(n.getPropertyValue("padding-top")), i = parseFloat(n.getPropertyValue("border-bottom-width")) + parseFloat(n.getPropertyValue("border-top-width")), c = {
921
- sizingStyle: Dt.map((d) => `${d}:${n.getPropertyValue(d)}`).join(";"),
922
- paddingSize: g,
923
- borderSize: i,
924
- boxSizing: a
925
- };
926
- return l && t && (ye[t] = c), c;
927
- }
928
- function Ht(e) {
929
- let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
930
- W || (W = document.createElement("textarea"), W.setAttribute("tab-index", "-1"), W.setAttribute("aria-hidden", "true"), document.body.appendChild(W)), e.getAttribute("wrap") ? W.setAttribute("wrap", e.getAttribute("wrap")) : W.removeAttribute("wrap");
931
- const {
932
- paddingSize: a,
933
- borderSize: g,
934
- boxSizing: i,
935
- sizingStyle: o
936
- } = Yt(e, l);
937
- W.setAttribute("style", `${o};${Vt}`), W.value = e.value || e.placeholder || "";
938
- let c, d, f, v = W.scrollHeight;
939
- if (i === "border-box" ? v += g : i === "content-box" && (v -= a), t !== null || n !== null) {
940
- W.value = " ";
941
- const P = W.scrollHeight - a;
942
- t !== null && (c = P * t, i === "border-box" && (c = c + a + g), v = Math.max(c, v)), n !== null && (d = P * n, i === "border-box" && (d = d + a + g), f = v > d ? "" : "hidden", v = Math.min(d, v));
943
- }
944
- const s = {
945
- height: `${v}px`,
946
- overflowY: f,
947
- resize: "none"
948
- };
949
- return c && (s.minHeight = `${c}px`), d && (s.maxHeight = `${d}px`), s;
950
- }
951
- const xe = 0, Ce = 1, Ae = 2, Xt = G({
952
- compatConfig: {
953
- MODE: 3
954
- },
955
- name: "ResizableTextArea",
956
- inheritAttrs: !1,
957
- props: nt(),
958
- setup(e, l) {
959
- let {
960
- attrs: t,
961
- emit: n,
962
- expose: a
963
- } = l, g, i;
964
- const o = U(), c = U({}), d = U(Ae);
965
- we(() => {
966
- ve.cancel(g), ve.cancel(i);
967
- });
968
- const f = () => {
969
- try {
970
- if (o.value && document.activeElement === o.value.input) {
971
- const m = o.value.getSelectionStart(), r = o.value.getSelectionEnd(), S = o.value.getScrollTop();
972
- o.value.setSelectionRange(m, r), o.value.setScrollTop(S);
973
- }
974
- } catch {
975
- }
976
- }, v = U(), s = U();
977
- Pe(() => {
978
- const m = e.autoSize || e.autosize;
979
- m ? (v.value = m.minRows, s.value = m.maxRows) : (v.value = void 0, s.value = void 0);
980
- });
981
- const P = Q(() => !!(e.autoSize || e.autosize)), E = () => {
982
- d.value = xe;
983
- };
984
- ae([() => e.value, v, s, P], () => {
985
- P.value && E();
986
- }, {
987
- immediate: !0
988
- });
989
- const R = U();
990
- ae([d, o], () => {
991
- if (o.value)
992
- if (d.value === xe)
993
- d.value = Ce;
994
- else if (d.value === Ce) {
995
- const m = Ht(o.value.input, !1, v.value, s.value);
996
- d.value = Ae, R.value = m;
997
- } else
998
- f();
999
- }, {
1000
- immediate: !0,
1001
- flush: "post"
1002
- });
1003
- const p = Ye(), T = U(), I = () => {
1004
- ve.cancel(T.value);
1005
- }, z = (m) => {
1006
- d.value === Ae && (n("resize", m), P.value && (I(), T.value = ve(() => {
1007
- E();
1008
- })));
1009
- };
1010
- we(() => {
1011
- I();
1012
- }), a({
1013
- resizeTextarea: () => {
1014
- E();
1015
- },
1016
- textArea: Q(() => {
1017
- var m;
1018
- return (m = o.value) === null || m === void 0 ? void 0 : m.input;
1019
- }),
1020
- instance: p
1021
- }), Ct(e.autosize === void 0, "Input.TextArea", "autosize is deprecated, please use autoSize instead.");
1022
- const b = () => {
1023
- const {
1024
- prefixCls: m,
1025
- disabled: r
1026
- } = e, S = q(e, ["prefixCls", "onPressEnter", "autoSize", "autosize", "defaultValue", "allowClear", "type", "maxlength", "valueModifiers"]), w = D(m, t.class, {
1027
- [`${m}-disabled`]: r
1028
- }), $ = P.value ? R.value : null, j = [t.style, c.value, $], F = M(M(M({}, S), t), {
1029
- style: j,
1030
- class: w
1031
- });
1032
- return (d.value === xe || d.value === Ce) && j.push({
1033
- overflowX: "hidden",
1034
- overflowY: "hidden"
1035
- }), F.autofocus || delete F.autofocus, F.rows === 0 && delete F.rows, C(At, {
1036
- onResize: z,
1037
- disabled: !P.value
1038
- }, {
1039
- default: () => [C(Xe, V(V({}, F), {}, {
1040
- ref: o,
1041
- tag: "textarea"
1042
- }), null)]
1043
- });
1044
- };
1045
- return () => b();
1046
- }
1047
- });
1048
- function at(e, l) {
1049
- return [...e || ""].slice(0, l).join("");
1050
- }
1051
- function Le(e, l, t, n) {
1052
- let a = t;
1053
- return e ? a = at(t, n) : [...l || ""].length < t.length && [...t || ""].length > n && (a = l), a;
1054
- }
1055
- const Wt = G({
1056
- compatConfig: {
1057
- MODE: 3
1058
- },
1059
- name: "ATextarea",
1060
- inheritAttrs: !1,
1061
- props: nt(),
1062
- setup(e, l) {
1063
- let {
1064
- attrs: t,
1065
- expose: n,
1066
- emit: a
1067
- } = l;
1068
- var g;
1069
- const i = We(), o = ie.useInject(), c = Q(() => ze(o.status, e.status)), d = X((g = e.value) !== null && g !== void 0 ? g : e.defaultValue), f = X(), v = X(""), {
1070
- prefixCls: s,
1071
- size: P,
1072
- direction: E
1073
- } = se("input", e), [R, p] = Ee(s), T = Qe(), I = Q(() => e.showCount === "" || e.showCount || !1), z = Q(() => Number(e.maxlength) > 0), N = X(!1), b = X(), m = X(0), r = (u) => {
1074
- N.value = !0, b.value = v.value, m.value = u.currentTarget.selectionStart, a("compositionstart", u);
1075
- }, S = (u) => {
1076
- var h;
1077
- N.value = !1;
1078
- let B = u.currentTarget.value;
1079
- if (z.value) {
1080
- const L = m.value >= e.maxlength + 1 || m.value === ((h = b.value) === null || h === void 0 ? void 0 : h.length);
1081
- B = Le(L, b.value, B, e.maxlength);
1082
- }
1083
- B !== v.value && (F(B), ue(u.currentTarget, u, x, B)), a("compositionend", u);
1084
- }, w = Ye();
1085
- ae(() => e.value, () => {
1086
- var u;
1087
- "value" in w.vnode.props, d.value = (u = e.value) !== null && u !== void 0 ? u : "";
1088
- });
1089
- const $ = (u) => {
1090
- var h;
1091
- Je((h = f.value) === null || h === void 0 ? void 0 : h.textArea, u);
1092
- }, j = () => {
1093
- var u, h;
1094
- (h = (u = f.value) === null || u === void 0 ? void 0 : u.textArea) === null || h === void 0 || h.blur();
1095
- }, F = (u, h) => {
1096
- d.value !== u && (e.value === void 0 ? d.value = u : be(() => {
1097
- var B, L, Y;
1098
- f.value.textArea.value !== v.value && ((Y = (B = f.value) === null || B === void 0 ? void 0 : (L = B.instance).update) === null || Y === void 0 || Y.call(L));
1099
- }), be(() => {
1100
- h && h();
1101
- }));
1102
- }, y = (u) => {
1103
- u.keyCode === 13 && a("pressEnter", u), a("keydown", u);
1104
- }, O = (u) => {
1105
- const {
1106
- onBlur: h
1107
- } = e;
1108
- h == null || h(u), i.onFieldBlur();
1109
- }, x = (u) => {
1110
- a("update:value", u.target.value), a("change", u), a("input", u), i.onFieldChange();
1111
- }, A = (u) => {
1112
- ue(f.value.textArea, u, x), F("", () => {
1113
- $();
1114
- });
1115
- }, _ = (u) => {
1116
- let h = u.target.value;
1117
- if (d.value !== h) {
1118
- if (z.value) {
1119
- const B = u.target, L = B.selectionStart >= e.maxlength + 1 || B.selectionStart === h.length || !B.selectionStart;
1120
- h = Le(L, v.value, h, e.maxlength);
1121
- }
1122
- ue(u.currentTarget, u, x, h), F(h);
1123
- }
1124
- }, k = () => {
1125
- var u, h;
1126
- const {
1127
- class: B
1128
- } = t, {
1129
- bordered: L = !0
1130
- } = e, Y = M(M(M({}, q(e, ["allowClear"])), t), {
1131
- class: [{
1132
- [`${s.value}-borderless`]: !L,
1133
- [`${B}`]: B && !I.value,
1134
- [`${s.value}-sm`]: P.value === "small",
1135
- [`${s.value}-lg`]: P.value === "large"
1136
- }, oe(s.value, c.value), p.value],
1137
- disabled: T.value,
1138
- showCount: null,
1139
- prefixCls: s.value,
1140
- onInput: _,
1141
- onChange: _,
1142
- onBlur: O,
1143
- onKeydown: y,
1144
- onCompositionstart: r,
1145
- onCompositionend: S
1146
- });
1147
- return !((u = e.valueModifiers) === null || u === void 0) && u.lazy && delete Y.onInput, C(Xt, V(V({}, Y), {}, {
1148
- id: (h = Y == null ? void 0 : Y.id) !== null && h !== void 0 ? h : i.id.value,
1149
- ref: f,
1150
- maxlength: e.maxlength,
1151
- lazy: e.lazy
1152
- }), null);
1153
- };
1154
- return n({
1155
- focus: $,
1156
- blur: j,
1157
- resizableTextArea: f
1158
- }), Pe(() => {
1159
- let u = Ie(d.value);
1160
- !N.value && z.value && (e.value === null || e.value === void 0) && (u = at(u, e.maxlength)), v.value = u;
1161
- }), () => {
1162
- var u;
1163
- const {
1164
- maxlength: h,
1165
- bordered: B = !0,
1166
- hidden: L
1167
- } = e, {
1168
- style: Y,
1169
- class: le
1170
- } = t, ce = M(M(M({}, e), t), {
1171
- prefixCls: s.value,
1172
- inputType: "text",
1173
- handleReset: A,
1174
- direction: E.value,
1175
- bordered: B,
1176
- style: I.value ? void 0 : Y,
1177
- hashId: p.value,
1178
- disabled: (u = e.disabled) !== null && u !== void 0 ? u : T.value
1179
- });
1180
- let te = C(Ut, V(V({}, ce), {}, {
1181
- value: v.value,
1182
- status: e.status
1183
- }), {
1184
- element: k
1185
- });
1186
- if (I.value || o.hasFeedback) {
1187
- const de = [...v.value].length;
1188
- let ne = "";
1189
- typeof I.value == "object" ? ne = I.value.formatter({
1190
- value: v.value,
1191
- count: de,
1192
- maxlength: h
1193
- }) : ne = `${de}${z.value ? ` / ${h}` : ""}`, te = C("div", {
1194
- hidden: L,
1195
- class: D(`${s.value}-textarea`, {
1196
- [`${s.value}-textarea-rtl`]: E.value === "rtl",
1197
- [`${s.value}-textarea-show-count`]: I.value,
1198
- [`${s.value}-textarea-in-form-item`]: o.isFormItemInput
1199
- }, `${s.value}-textarea-show-count`, le, p.value),
1200
- style: Y,
1201
- "data-count": typeof ne != "object" ? ne : void 0
1202
- }, [te, o.hasFeedback && C("span", {
1203
- class: `${s.value}-textarea-suffix`
1204
- }, [o.feedbackIcon])]);
1205
- }
1206
- return R(te);
1207
- };
1208
- }
1209
- });
1210
- var Qt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
1211
- function Ze(e) {
1212
- for (var l = 1; l < arguments.length; l++) {
1213
- var t = arguments[l] != null ? Object(arguments[l]) : {}, n = Object.keys(t);
1214
- typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(t).filter(function(a) {
1215
- return Object.getOwnPropertyDescriptor(t, a).enumerable;
1216
- }))), n.forEach(function(a) {
1217
- Gt(e, a, t[a]);
1218
- });
1219
- }
1220
- return e;
1221
- }
1222
- function Gt(e, l, t) {
1223
- return l in e ? Object.defineProperty(e, l, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[l] = t, e;
1224
- }
1225
- var Be = function(l, t) {
1226
- var n = Ze({}, l, t.attrs);
1227
- return C(qe, Ze({}, n, {
1228
- icon: Qt
1229
- }), null);
1230
- };
1231
- Be.displayName = "EyeOutlined";
1232
- Be.inheritAttrs = !1;
1233
- var qt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
1234
- function Ue(e) {
1235
- for (var l = 1; l < arguments.length; l++) {
1236
- var t = arguments[l] != null ? Object(arguments[l]) : {}, n = Object.keys(t);
1237
- typeof Object.getOwnPropertySymbols == "function" && (n = n.concat(Object.getOwnPropertySymbols(t).filter(function(a) {
1238
- return Object.getOwnPropertyDescriptor(t, a).enumerable;
1239
- }))), n.forEach(function(a) {
1240
- Kt(e, a, t[a]);
1241
- });
1242
- }
1243
- return e;
1244
- }
1245
- function Kt(e, l, t) {
1246
- return l in e ? Object.defineProperty(e, l, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[l] = t, e;
1247
- }
1248
- var Re = function(l, t) {
1249
- var n = Ue({}, l, t.attrs);
1250
- return C(qe, Ue({}, n, {
1251
- icon: qt
1252
- }), null);
1253
- };
1254
- Re.displayName = "EyeInvisibleOutlined";
1255
- Re.inheritAttrs = !1;
1256
- var Jt = function(e, l) {
1257
- var t = {};
1258
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && l.indexOf(n) < 0 && (t[n] = e[n]);
1259
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1260
- l.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (t[n[a]] = e[n[a]]);
1261
- return t;
1262
- };
1263
- const en = {
1264
- click: "onClick",
1265
- hover: "onMouseover"
1266
- }, tn = (e) => e ? C(Be, null, null) : C(Re, null, null), nn = G({
1267
- compatConfig: {
1268
- MODE: 3
1269
- },
1270
- name: "AInputPassword",
1271
- inheritAttrs: !1,
1272
- props: M(M({}, ge()), {
1273
- prefixCls: String,
1274
- inputPrefixCls: String,
1275
- action: {
1276
- type: String,
1277
- default: "click"
1278
- },
1279
- visibilityToggle: {
1280
- type: Boolean,
1281
- default: !0
1282
- },
1283
- visible: {
1284
- type: Boolean,
1285
- default: void 0
1286
- },
1287
- "onUpdate:visible": Function,
1288
- iconRender: Function
1289
- }),
1290
- setup(e, l) {
1291
- let {
1292
- slots: t,
1293
- attrs: n,
1294
- expose: a,
1295
- emit: g
1296
- } = l;
1297
- const i = X(!1), o = () => {
1298
- const {
1299
- disabled: p
1300
- } = e;
1301
- p || (i.value = !i.value, g("update:visible", i.value));
1302
- };
1303
- Pe(() => {
1304
- e.visible !== void 0 && (i.value = !!e.visible);
1305
- });
1306
- const c = X();
1307
- a({
1308
- focus: () => {
1309
- var p;
1310
- (p = c.value) === null || p === void 0 || p.focus();
1311
- },
1312
- blur: () => {
1313
- var p;
1314
- (p = c.value) === null || p === void 0 || p.blur();
1315
- }
1316
- });
1317
- const v = (p) => {
1318
- const {
1319
- action: T,
1320
- iconRender: I = t.iconRender || tn
1321
- } = e, z = en[T] || "", N = I(i.value), b = {
1322
- [z]: o,
1323
- class: `${p}-icon`,
1324
- key: "passwordIcon",
1325
- onMousedown: (m) => {
1326
- m.preventDefault();
1327
- },
1328
- onMouseup: (m) => {
1329
- m.preventDefault();
1330
- }
1331
- };
1332
- return ee(wt(N) ? N : C("span", null, [N]), b);
1333
- }, {
1334
- prefixCls: s,
1335
- getPrefixCls: P
1336
- } = se("input-password", e), E = Q(() => P("input", e.inputPrefixCls)), R = () => {
1337
- const {
1338
- size: p,
1339
- visibilityToggle: T
1340
- } = e, I = Jt(e, ["size", "visibilityToggle"]), z = T && v(s.value), N = D(s.value, n.class, {
1341
- [`${s.value}-${p}`]: !!p
1342
- }), b = M(M(M({}, q(I, ["suffix", "iconRender", "action"])), n), {
1343
- type: i.value ? "text" : "password",
1344
- class: N,
1345
- prefixCls: E.value,
1346
- suffix: z
1347
- });
1348
- return p && (b.size = p), C(Z, V({
1349
- ref: c
1350
- }, b), t);
1351
- };
1352
- return () => R();
1353
- }
1354
- });
1355
- Z.Group = Ft;
1356
- Z.Search = jt;
1357
- Z.TextArea = Wt;
1358
- Z.Password = nn;
1359
- Z.install = function(e) {
1360
- return e.component(Z.name, Z), e.component(Z.Group.name, Z.Group), e.component(Z.Search.name, Z.Search), e.component(Z.TextArea.name, Z.TextArea), e.component(Z.Password.name, Z.Password), e;
1361
- };
1362
- const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAArCAMAAAC6hdP3AAAAllBMVEUAAAAZbLMabrYWa7IXa7MdcrkabbUhd8EYbLIfdb0ZbLMecroabrUZbrUYbbQZbbMZbrUccbgZbbQZbbQZbbMYbLMXa7MZbbQXbLIXbLMXbLYWZrYZbbMpgcv///8lfMYDRn6HuOI/cpyov9Lz+fzX6Pa92O+v0OxEkNEjecI3iM56sN7H1uO4y9uKqcOHp8JOfaQXVYh03AfrAAAAHXRSTlMA8e9FVe/Z/Pv39fTf0ZXouvPLs5yDMqRyYiEWfCwvk0oAAAFKSURBVDjLpZHZkoIwEEU7BFBWcd+miSgIOPv//9w0kFQI0ac5b9Sp201ug4JvEhazZMPBxPWdViCimDm+OxZZhBov04IJxKaoq7yqi4aCCyUcEkWZD5SFVpnAxz3X3B8o1v1y2jGI78t1ULTLJRPTqG7K7XqRJqeBPgBfYtPt+Lz8/ihTNuhw2LcUIT6+yhsZFZql4Aus5bc2NYoEGGJlmQqRdT+QWyZHjCF8kQkhebFnBSn9m2UKbFP5Hmn0ezwO4FMHE/PedwCup3q7TXqDEK2ukUHHNsDxfWgURgfomSOOb0rMYWAzQ5NgK82JmYIiinVrCLqAYucYJjyDgsobR/ag4d7IOCcYsdChNoMxx0hHdmAQKkGHMXkLVITDhLmM+DAlHSryXMucWR9ZWEJWFB1BY1TE4BkrgcHhqeFLWb9NLC9m487hn/wBKitHe4OSQz4AAAAASUVORK5CYII=", ln = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAArCAMAAAC6hdP3AAABFFBMVEUAAAAdcbgZbbMYbLIfdb0cb7gZbrUid8AZbLMec7sbb7YabbMabrUYbbMXa7MXbLIAbbYabLQabbQabrUZbrQZbbQZbbMYbLMWa7IXa7MkesQZbLMedLsZbbQabrUZbrUZbbQXbLIYbbEZbLQXa7IXbLYabrQabbQZbLUZbbMXbLIXbbQUZrgaZrMqgcv///8DRn4of8mHuOLy+PzX6Pa92O+v0OxEkNEmfccle8UieMEkXo/7/P03iM4jecPz9vnm7fPH1uOGuOGatcspYpEZVokHSYC+0N56sN6tw9V1mrlkjbBeiq1KeqI/cp0wZpUPT4UKS4Lr8PXY4uvN2uaxxtd+oL1sk7RpkbJTgKc5bZkgW42w7570AAAALnRSTlMA8vH89+3R+/X07+/elldTBePZ18yznINFMvz47Om7uKRyS0dBIfTbkHxjYhkU/2HJwwAAAcFJREFUOMulktd62kAQhUcCZLCBAAZc4+70HO3KGJVgwDT3ll7e/z2iWRVrbe78X0i7+jXfaM+IElbbllk2rfYq6VQbhcCTkF5QaLzKii1DIkEa249iaR1wR92O3emOXGD9dSp8wDmyI45GgB+rLR8nx/xw8H3It+MT+C3VvASwGN4IISZnrACDP6Ms4YTbr1Mxvfo7m52GawdyOTyHAZd7XInrnm3/En+4l4vCAe0EqsSeCH77h7izVVFQoWUPXd6Mx4PweimuedOFZ5Ep0bETTh/EGd87kEtUBlJx8SB+RyugTMW0pvdTiEteqJoiWdyHGdyI+4tIcJ8mVfpwVMWtmHyzYxz039FefJ6xmA4TwefZJ3obZXAn7r8wt+H6XGVA1U3OrTcTEf9UbptqfBuSs07grPk0zEoe2fmcAyjtElPLIcR11EwdF4DMUUR7ATr5ldgcmtDJ1Sim1dfEQoUS1hY1U/xMKZafLdmhR/YKGWMeUoa6l4r+NmX5UErN4ppmeIARfpN03ueTkgPS4YgYv0FPqXBE8W+r8+kNC69Oz2kFHP9HStEikibNo+kjvzvX7Bs8sbnUeWJzqW7U6GX8ByIkdQYA6dReAAAAAElFTkSuQmCC", on = { class: "vsleem-map-control" }, rn = { class: "tool-search" }, un = { class: "tool-button" }, Ve = 17, sn = /* @__PURE__ */ G({
1363
- name: "MapControl",
1364
- __name: "MapControl",
1365
- props: {
1366
- currentModel: {},
1367
- points: {}
1368
- },
1369
- emits: ["change"],
1370
- setup(e, { expose: l, emit: t }) {
1371
- const { Search: n } = Z, a = t, g = e, i = U(), o = U(!0), c = U(), d = [an, ln], f = U(), v = U(0), s = U([]), P = U(""), E = U(), R = he.debounce(N, 300);
1372
- ae([() => g.points], z), Oe(() => {
1373
- vt(c, R), I();
1374
- }), it(() => {
1375
- p();
1376
- });
1377
- function p() {
1378
- f.value && (f.value = void 0);
1379
- }
1380
- async function T() {
1381
- try {
1382
- return o.value = !0, await he.loadScript(
1383
- "https://api.tianditu.gov.cn/api?v=4.0&tk=09ed69fddb23a82443cb2ecfb3f92d9a"
1384
- );
1385
- } finally {
1386
- o.value = !1;
1387
- }
1388
- }
1389
- async function I() {
1390
- f.value || !await T() || (i.value = window == null ? void 0 : window.T, f.value = new i.value.Map(fe(c)), b(), z(), m(), S());
1391
- }
1392
- function z() {
1393
- s.value = [...he.cloneDeep(g.points || [])], r();
1394
- }
1395
- function N() {
1396
- var x;
1397
- (x = f.value) == null || x.checkResize();
1398
- }
1399
- function b() {
1400
- var x;
1401
- (x = f.value) == null || x.addEventListener("click", (A) => {
1402
- const { lnglat: _ } = A;
1403
- s.value[v.value] = new $e({
1404
- lon: _.lng,
1405
- lat: _.lat
1406
- }), r(), y(), a("change", O());
1407
- });
1408
- }
1409
- function m() {
1410
- var _;
1411
- const x = s.value[0] || {
1412
- lon: 120.581256,
1413
- lat: 31.300996
1414
- }, A = new i.value.LngLat(x.lon, x.lat);
1415
- (_ = f.value) == null || _.centerAndZoom(A, Ve);
1416
- }
1417
- function r() {
1418
- var x, A;
1419
- f.value && ((x = f.value) == null || x.clearOverLays(), (A = s.value) == null || A.forEach((_, k) => {
1420
- const u = new i.value.Icon({
1421
- iconUrl: d[k],
1422
- iconSize: new i.value.Point(25, 43),
1423
- iconAnchor: new i.value.Point(12, 43)
1424
- }), h = new i.value.LngLat(_.lon, _.lat), B = new i.value.Marker(h, { icon: u });
1425
- f.value.addOverLay(B);
1426
- }));
1427
- }
1428
- function S() {
1429
- E.value = new i.value.LocalSearch(f.value, {
1430
- pageCapacity: 10,
1431
- //每页显示的数量
1432
- onSearchComplete: w
1433
- //接收数据的回调函数
1434
- });
1435
- }
1436
- function w(x) {
1437
- const { area: A, pois: _ } = x.result || {}, k = A || (_ == null ? void 0 : _[0]);
1438
- if (k) {
1439
- const u = k.level || Ve, h = k.lonlat.split(","), B = new i.value.LngLat(Number(h[0]), Number(h[1]));
1440
- f.value.centerAndZoom(B, u);
1441
- }
1442
- }
1443
- function $() {
1444
- var x;
1445
- (x = E.value) == null || x.search(P.value);
1446
- }
1447
- function j() {
1448
- v.value = 0;
1449
- }
1450
- function F() {
1451
- v.value = 1;
1452
- }
1453
- function y() {
1454
- v.value = v.value === 0 ? 1 : 0;
1455
- }
1456
- function O() {
1457
- return { points: s.value.map((A) => new $e({ x: A.lon, y: A.lat, z: A.alt })) };
1458
- }
1459
- return l({
1460
- getData: O
1461
- }), (x, A) => {
1462
- const _ = st("loading");
1463
- return dt(), ct("div", on, [
1464
- ft(me("div", {
1465
- ref_key: "mapElRef",
1466
- ref: c,
1467
- class: "map-canvas"
1468
- }, null, 512), [
1469
- [_, o.value]
1470
- ]),
1471
- me("div", rn, [
1472
- C(fe(n), {
1473
- value: P.value,
1474
- "onUpdate:value": A[0] || (A[0] = (k) => P.value = k),
1475
- onSearch: $
1476
- }, null, 8, ["value"])
1477
- ]),
1478
- me("div", un, [
1479
- C(fe(Se), {
1480
- type: "primary",
1481
- ghost: v.value != 0,
1482
- onClick: j
1483
- }, {
1484
- default: Me(() => A[1] || (A[1] = [
1485
- Te(" 定位点1 ", -1)
1486
- ])),
1487
- _: 1,
1488
- __: [1]
1489
- }, 8, ["ghost"]),
1490
- C(fe(Se), {
1491
- type: "primary",
1492
- danger: "",
1493
- ghost: v.value != 1,
1494
- onClick: F
1495
- }, {
1496
- default: Me(() => A[2] || (A[2] = [
1497
- Te(" 定位点2 ", -1)
1498
- ])),
1499
- _: 1,
1500
- __: [2]
1501
- }, 8, ["ghost"])
1502
- ])
1503
- ]);
1504
- };
1505
- }
1506
- }), pn = /* @__PURE__ */ St(sn, [["__scopeId", "data-v-7f681c85"]]);
1507
- export {
1508
- pn as default
1509
- };