@bscjc/webui 0.0.2

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.
@@ -0,0 +1,2135 @@
1
+ import { defineComponent as q, createElementBlock as N, openBlock as S, createElementVNode as I, reactive as ne, ref as B, watch as J, onMounted as ie, nextTick as Ce, onUnmounted as lt, createBlock as G, unref as C, mergeProps as le, createSlots as nt, withCtx as F, createVNode as M, withDirectives as ce, createCommentVNode as Ne, vModelText as ut, createTextVNode as H, normalizeStyle as Pe, renderSlot as He, toDisplayString as re, vShow as fe, Fragment as pe, renderList as ge, computed as Le } from "vue";
2
+ import { ElSelect as me, ElOption as ye, ElCheckbox as $e, ElCheckboxGroup as at, ElButton as W, ElDatePicker as it, ElInput as xe, ElIcon as ae, ElPopover as qe, ElMessage as Qe, ElTag as rt } from "element-plus";
3
+ import "element-plus/es/components/select/style/css";
4
+ import "element-plus/es/components/option/style/css";
5
+ import "element-plus/es/components/checkbox-group/style/css";
6
+ import "element-plus/es/components/checkbox/style/css";
7
+ import "element-plus/es/components/button/style/css";
8
+ import { isEmpty as L, isArray as _e, cloneDeep as ot, findIndex as ct, filter as dt, includes as ft } from "lodash-es";
9
+ import { RecycleScroller as ht } from "vue-virtual-scroller";
10
+ import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
11
+ import { createInjectionState as vt } from "@vueuse/shared";
12
+ import "element-plus/es/components/date-picker/style/css";
13
+ import "element-plus/es/components/input/style/css";
14
+ import "element-plus/es/components/icon/style/css";
15
+ import "element-plus/es/components/popover/style/css";
16
+ import "element-plus/es/components/message/style/css";
17
+ import "element-plus/es/components/tag/style/css";
18
+ /*! Element Plus Icons Vue v2.3.1 */
19
+ var pt = /* @__PURE__ */ q({
20
+ name: "CirclePlus",
21
+ __name: "circle-plus",
22
+ setup(t) {
23
+ return (e, s) => (S(), N("svg", {
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ viewBox: "0 0 1024 1024"
26
+ }, [
27
+ I("path", {
28
+ fill: "currentColor",
29
+ d: "M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"
30
+ }),
31
+ I("path", {
32
+ fill: "currentColor",
33
+ d: "M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"
34
+ }),
35
+ I("path", {
36
+ fill: "currentColor",
37
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
38
+ })
39
+ ]));
40
+ }
41
+ }), gt = pt, mt = /* @__PURE__ */ q({
42
+ name: "Close",
43
+ __name: "close",
44
+ setup(t) {
45
+ return (e, s) => (S(), N("svg", {
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ viewBox: "0 0 1024 1024"
48
+ }, [
49
+ I("path", {
50
+ fill: "currentColor",
51
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
52
+ })
53
+ ]));
54
+ }
55
+ }), Ke = mt, yt = /* @__PURE__ */ q({
56
+ name: "Delete",
57
+ __name: "delete",
58
+ setup(t) {
59
+ return (e, s) => (S(), N("svg", {
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ viewBox: "0 0 1024 1024"
62
+ }, [
63
+ I("path", {
64
+ fill: "currentColor",
65
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
66
+ })
67
+ ]));
68
+ }
69
+ }), Ct = yt, At = /* @__PURE__ */ q({
70
+ name: "Grid",
71
+ __name: "grid",
72
+ setup(t) {
73
+ return (e, s) => (S(), N("svg", {
74
+ xmlns: "http://www.w3.org/2000/svg",
75
+ viewBox: "0 0 1024 1024"
76
+ }, [
77
+ I("path", {
78
+ fill: "currentColor",
79
+ d: "M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"
80
+ })
81
+ ]));
82
+ }
83
+ }), xt = At, _t = /* @__PURE__ */ q({
84
+ name: "Operation",
85
+ __name: "operation",
86
+ setup(t) {
87
+ return (e, s) => (S(), N("svg", {
88
+ xmlns: "http://www.w3.org/2000/svg",
89
+ viewBox: "0 0 1024 1024"
90
+ }, [
91
+ I("path", {
92
+ fill: "currentColor",
93
+ d: "M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"
94
+ })
95
+ ]));
96
+ }
97
+ }), Et = _t, wt = /* @__PURE__ */ q({
98
+ name: "Search",
99
+ __name: "search",
100
+ setup(t) {
101
+ return (e, s) => (S(), N("svg", {
102
+ xmlns: "http://www.w3.org/2000/svg",
103
+ viewBox: "0 0 1024 1024"
104
+ }, [
105
+ I("path", {
106
+ fill: "currentColor",
107
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
108
+ })
109
+ ]));
110
+ }
111
+ }), ke = wt;
112
+ function X(t) {
113
+ return Array.isArray ? Array.isArray(t) : We(t) === "[object Array]";
114
+ }
115
+ function bt(t) {
116
+ if (typeof t == "string")
117
+ return t;
118
+ let e = t + "";
119
+ return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
120
+ }
121
+ function Ft(t) {
122
+ return t == null ? "" : bt(t);
123
+ }
124
+ function U(t) {
125
+ return typeof t == "string";
126
+ }
127
+ function Ue(t) {
128
+ return typeof t == "number";
129
+ }
130
+ function Mt(t) {
131
+ return t === !0 || t === !1 || Bt(t) && We(t) == "[object Boolean]";
132
+ }
133
+ function Ye(t) {
134
+ return typeof t == "object";
135
+ }
136
+ function Bt(t) {
137
+ return Ye(t) && t !== null;
138
+ }
139
+ function T(t) {
140
+ return t != null;
141
+ }
142
+ function Ae(t) {
143
+ return !t.trim().length;
144
+ }
145
+ function We(t) {
146
+ return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
147
+ }
148
+ const kt = "Incorrect 'index' type", It = (t) => `Invalid value for key ${t}`, zt = (t) => `Pattern length exceeds max of ${t}.`, St = (t) => `Missing ${t} property in key`, Dt = (t) => `Property 'weight' in key '${t}' must be a positive integer`, Ve = Object.prototype.hasOwnProperty;
149
+ class Lt {
150
+ constructor(e) {
151
+ this._keys = [], this._keyMap = {};
152
+ let s = 0;
153
+ e.forEach((l) => {
154
+ let u = Je(l);
155
+ this._keys.push(u), this._keyMap[u.id] = u, s += u.weight;
156
+ }), this._keys.forEach((l) => {
157
+ l.weight /= s;
158
+ });
159
+ }
160
+ get(e) {
161
+ return this._keyMap[e];
162
+ }
163
+ keys() {
164
+ return this._keys;
165
+ }
166
+ toJSON() {
167
+ return JSON.stringify(this._keys);
168
+ }
169
+ }
170
+ function Je(t) {
171
+ let e = null, s = null, l = null, u = 1, n = null;
172
+ if (U(t) || X(t))
173
+ l = t, e = je(t), s = Ee(t);
174
+ else {
175
+ if (!Ve.call(t, "name"))
176
+ throw new Error(St("name"));
177
+ const i = t.name;
178
+ if (l = i, Ve.call(t, "weight") && (u = t.weight, u <= 0))
179
+ throw new Error(Dt(i));
180
+ e = je(i), s = Ee(i), n = t.getFn;
181
+ }
182
+ return { path: e, id: s, weight: u, src: l, getFn: n };
183
+ }
184
+ function je(t) {
185
+ return X(t) ? t : t.split(".");
186
+ }
187
+ function Ee(t) {
188
+ return X(t) ? t.join(".") : t;
189
+ }
190
+ function $t(t, e) {
191
+ let s = [], l = !1;
192
+ const u = (n, i, a) => {
193
+ if (T(n))
194
+ if (!i[a])
195
+ s.push(n);
196
+ else {
197
+ let r = i[a];
198
+ const c = n[r];
199
+ if (!T(c))
200
+ return;
201
+ if (a === i.length - 1 && (U(c) || Ue(c) || Mt(c)))
202
+ s.push(Ft(c));
203
+ else if (X(c)) {
204
+ l = !0;
205
+ for (let o = 0, p = c.length; o < p; o += 1)
206
+ u(c[o], i, a + 1);
207
+ } else i.length && u(c, i, a + 1);
208
+ }
209
+ };
210
+ return u(t, U(e) ? e.split(".") : e, 0), l ? s : s[0];
211
+ }
212
+ const Vt = {
213
+ // Whether the matches should be included in the result set. When `true`, each record in the result
214
+ // set will include the indices of the matched characters.
215
+ // These can consequently be used for highlighting purposes.
216
+ includeMatches: !1,
217
+ // When `true`, the matching function will continue to the end of a search pattern even if
218
+ // a perfect match has already been located in the string.
219
+ findAllMatches: !1,
220
+ // Minimum number of characters that must be matched before a result is considered a match
221
+ minMatchCharLength: 1
222
+ }, jt = {
223
+ // When `true`, the algorithm continues searching to the end of the input even if a perfect
224
+ // match is found before the end of the same input.
225
+ isCaseSensitive: !1,
226
+ // When `true`, the algorithm will ignore diacritics (accents) in comparisons
227
+ ignoreDiacritics: !1,
228
+ // When true, the matching function will continue to the end of a search pattern even if
229
+ includeScore: !1,
230
+ // List of properties that will be searched. This also supports nested properties.
231
+ keys: [],
232
+ // Whether to sort the result list, by score
233
+ shouldSort: !0,
234
+ // Default sort function: sort by ascending score, ascending index
235
+ sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
236
+ }, Rt = {
237
+ // Approximately where in the text is the pattern expected to be found?
238
+ location: 0,
239
+ // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
240
+ // (of both letters and location), a threshold of '1.0' would match anything.
241
+ threshold: 0.6,
242
+ // Determines how close the match must be to the fuzzy location (specified above).
243
+ // An exact letter match which is 'distance' characters away from the fuzzy location
244
+ // would score as a complete mismatch. A distance of '0' requires the match be at
245
+ // the exact location specified, a threshold of '1000' would require a perfect match
246
+ // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
247
+ distance: 100
248
+ }, Ot = {
249
+ // When `true`, it enables the use of unix-like search commands
250
+ useExtendedSearch: !1,
251
+ // The get function to use when fetching an object's properties.
252
+ // The default will search nested paths *ie foo.bar.baz*
253
+ getFn: $t,
254
+ // When `true`, search will ignore `location` and `distance`, so it won't matter
255
+ // where in the string the pattern appears.
256
+ // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
257
+ ignoreLocation: !1,
258
+ // When `true`, the calculation for the relevance score (used for sorting) will
259
+ // ignore the field-length norm.
260
+ // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
261
+ ignoreFieldNorm: !1,
262
+ // The weight to determine how much field length norm effects scoring.
263
+ fieldNormWeight: 1
264
+ };
265
+ var A = {
266
+ ...jt,
267
+ ...Vt,
268
+ ...Rt,
269
+ ...Ot
270
+ };
271
+ const Tt = /[^ ]+/g;
272
+ function Nt(t = 1, e = 3) {
273
+ const s = /* @__PURE__ */ new Map(), l = Math.pow(10, e);
274
+ return {
275
+ get(u) {
276
+ const n = u.match(Tt).length;
277
+ if (s.has(n))
278
+ return s.get(n);
279
+ const i = 1 / Math.pow(n, 0.5 * t), a = parseFloat(Math.round(i * l) / l);
280
+ return s.set(n, a), a;
281
+ },
282
+ clear() {
283
+ s.clear();
284
+ }
285
+ };
286
+ }
287
+ class Ie {
288
+ constructor({
289
+ getFn: e = A.getFn,
290
+ fieldNormWeight: s = A.fieldNormWeight
291
+ } = {}) {
292
+ this.norm = Nt(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
293
+ }
294
+ setSources(e = []) {
295
+ this.docs = e;
296
+ }
297
+ setIndexRecords(e = []) {
298
+ this.records = e;
299
+ }
300
+ setKeys(e = []) {
301
+ this.keys = e, this._keysMap = {}, e.forEach((s, l) => {
302
+ this._keysMap[s.id] = l;
303
+ });
304
+ }
305
+ create() {
306
+ this.isCreated || !this.docs.length || (this.isCreated = !0, U(this.docs[0]) ? this.docs.forEach((e, s) => {
307
+ this._addString(e, s);
308
+ }) : this.docs.forEach((e, s) => {
309
+ this._addObject(e, s);
310
+ }), this.norm.clear());
311
+ }
312
+ // Adds a doc to the end of the index
313
+ add(e) {
314
+ const s = this.size();
315
+ U(e) ? this._addString(e, s) : this._addObject(e, s);
316
+ }
317
+ // Removes the doc at the specified index of the index
318
+ removeAt(e) {
319
+ this.records.splice(e, 1);
320
+ for (let s = e, l = this.size(); s < l; s += 1)
321
+ this.records[s].i -= 1;
322
+ }
323
+ getValueForItemAtKeyId(e, s) {
324
+ return e[this._keysMap[s]];
325
+ }
326
+ size() {
327
+ return this.records.length;
328
+ }
329
+ _addString(e, s) {
330
+ if (!T(e) || Ae(e))
331
+ return;
332
+ let l = {
333
+ v: e,
334
+ i: s,
335
+ n: this.norm.get(e)
336
+ };
337
+ this.records.push(l);
338
+ }
339
+ _addObject(e, s) {
340
+ let l = { i: s, $: {} };
341
+ this.keys.forEach((u, n) => {
342
+ let i = u.getFn ? u.getFn(e) : this.getFn(e, u.path);
343
+ if (T(i)) {
344
+ if (X(i)) {
345
+ let a = [];
346
+ const r = [{ nestedArrIndex: -1, value: i }];
347
+ for (; r.length; ) {
348
+ const { nestedArrIndex: c, value: o } = r.pop();
349
+ if (T(o))
350
+ if (U(o) && !Ae(o)) {
351
+ let p = {
352
+ v: o,
353
+ i: c,
354
+ n: this.norm.get(o)
355
+ };
356
+ a.push(p);
357
+ } else X(o) && o.forEach((p, h) => {
358
+ r.push({
359
+ nestedArrIndex: h,
360
+ value: p
361
+ });
362
+ });
363
+ }
364
+ l.$[n] = a;
365
+ } else if (U(i) && !Ae(i)) {
366
+ let a = {
367
+ v: i,
368
+ n: this.norm.get(i)
369
+ };
370
+ l.$[n] = a;
371
+ }
372
+ }
373
+ }), this.records.push(l);
374
+ }
375
+ toJSON() {
376
+ return {
377
+ keys: this.keys,
378
+ records: this.records
379
+ };
380
+ }
381
+ }
382
+ function Ge(t, e, { getFn: s = A.getFn, fieldNormWeight: l = A.fieldNormWeight } = {}) {
383
+ const u = new Ie({ getFn: s, fieldNormWeight: l });
384
+ return u.setKeys(t.map(Je)), u.setSources(e), u.create(), u;
385
+ }
386
+ function Pt(t, { getFn: e = A.getFn, fieldNormWeight: s = A.fieldNormWeight } = {}) {
387
+ const { keys: l, records: u } = t, n = new Ie({ getFn: e, fieldNormWeight: s });
388
+ return n.setKeys(l), n.setIndexRecords(u), n;
389
+ }
390
+ function de(t, {
391
+ errors: e = 0,
392
+ currentLocation: s = 0,
393
+ expectedLocation: l = 0,
394
+ distance: u = A.distance,
395
+ ignoreLocation: n = A.ignoreLocation
396
+ } = {}) {
397
+ const i = e / t.length;
398
+ if (n)
399
+ return i;
400
+ const a = Math.abs(l - s);
401
+ return u ? i + a / u : a ? 1 : i;
402
+ }
403
+ function Ht(t = [], e = A.minMatchCharLength) {
404
+ let s = [], l = -1, u = -1, n = 0;
405
+ for (let i = t.length; n < i; n += 1) {
406
+ let a = t[n];
407
+ a && l === -1 ? l = n : !a && l !== -1 && (u = n - 1, u - l + 1 >= e && s.push([l, u]), l = -1);
408
+ }
409
+ return t[n - 1] && n - l >= e && s.push([l, n - 1]), s;
410
+ }
411
+ const se = 32;
412
+ function qt(t, e, s, {
413
+ location: l = A.location,
414
+ distance: u = A.distance,
415
+ threshold: n = A.threshold,
416
+ findAllMatches: i = A.findAllMatches,
417
+ minMatchCharLength: a = A.minMatchCharLength,
418
+ includeMatches: r = A.includeMatches,
419
+ ignoreLocation: c = A.ignoreLocation
420
+ } = {}) {
421
+ if (e.length > se)
422
+ throw new Error(zt(se));
423
+ const o = e.length, p = t.length, h = Math.max(0, Math.min(l, p));
424
+ let y = n, g = h;
425
+ const d = a > 1 || r, f = d ? Array(p) : [];
426
+ let m;
427
+ for (; (m = t.indexOf(e, g)) > -1; ) {
428
+ let D = de(e, {
429
+ currentLocation: m,
430
+ expectedLocation: h,
431
+ distance: u,
432
+ ignoreLocation: c
433
+ });
434
+ if (y = Math.min(D, y), g = m + o, d) {
435
+ let $ = 0;
436
+ for (; $ < o; )
437
+ f[m + $] = 1, $ += 1;
438
+ }
439
+ }
440
+ g = -1;
441
+ let E = [], k = 1, O = o + p;
442
+ const Y = 1 << o - 1;
443
+ for (let D = 0; D < o; D += 1) {
444
+ let $ = 0, j = O;
445
+ for (; $ < j; )
446
+ de(e, {
447
+ errors: D,
448
+ currentLocation: h + j,
449
+ expectedLocation: h,
450
+ distance: u,
451
+ ignoreLocation: c
452
+ }) <= y ? $ = j : O = j, j = Math.floor((O - $) / 2 + $);
453
+ O = j;
454
+ let Q = Math.max(1, h - j + 1), te = i ? p : Math.min(h + j, p) + o, v = Array(te + 2);
455
+ v[te + 1] = (1 << D) - 1;
456
+ for (let x = te; x >= Q; x -= 1) {
457
+ let w = x - 1, b = s[t.charAt(w)];
458
+ if (d && (f[w] = +!!b), v[x] = (v[x + 1] << 1 | 1) & b, D && (v[x] |= (E[x + 1] | E[x]) << 1 | 1 | E[x + 1]), v[x] & Y && (k = de(e, {
459
+ errors: D,
460
+ currentLocation: w,
461
+ expectedLocation: h,
462
+ distance: u,
463
+ ignoreLocation: c
464
+ }), k <= y)) {
465
+ if (y = k, g = w, g <= h)
466
+ break;
467
+ Q = Math.max(1, 2 * h - g);
468
+ }
469
+ }
470
+ if (de(e, {
471
+ errors: D + 1,
472
+ currentLocation: h,
473
+ expectedLocation: h,
474
+ distance: u,
475
+ ignoreLocation: c
476
+ }) > y)
477
+ break;
478
+ E = v;
479
+ }
480
+ const P = {
481
+ isMatch: g >= 0,
482
+ // Count exact matches (those with a score of 0) to be "almost" exact
483
+ score: Math.max(1e-3, k)
484
+ };
485
+ if (d) {
486
+ const D = Ht(f, a);
487
+ D.length ? r && (P.indices = D) : P.isMatch = !1;
488
+ }
489
+ return P;
490
+ }
491
+ function Qt(t) {
492
+ let e = {};
493
+ for (let s = 0, l = t.length; s < l; s += 1) {
494
+ const u = t.charAt(s);
495
+ e[u] = (e[u] || 0) | 1 << l - s - 1;
496
+ }
497
+ return e;
498
+ }
499
+ const he = String.prototype.normalize ? (t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "") : (t) => t;
500
+ class Xe {
501
+ constructor(e, {
502
+ location: s = A.location,
503
+ threshold: l = A.threshold,
504
+ distance: u = A.distance,
505
+ includeMatches: n = A.includeMatches,
506
+ findAllMatches: i = A.findAllMatches,
507
+ minMatchCharLength: a = A.minMatchCharLength,
508
+ isCaseSensitive: r = A.isCaseSensitive,
509
+ ignoreDiacritics: c = A.ignoreDiacritics,
510
+ ignoreLocation: o = A.ignoreLocation
511
+ } = {}) {
512
+ if (this.options = {
513
+ location: s,
514
+ threshold: l,
515
+ distance: u,
516
+ includeMatches: n,
517
+ findAllMatches: i,
518
+ minMatchCharLength: a,
519
+ isCaseSensitive: r,
520
+ ignoreDiacritics: c,
521
+ ignoreLocation: o
522
+ }, e = r ? e : e.toLowerCase(), e = c ? he(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
523
+ return;
524
+ const p = (y, g) => {
525
+ this.chunks.push({
526
+ pattern: y,
527
+ alphabet: Qt(y),
528
+ startIndex: g
529
+ });
530
+ }, h = this.pattern.length;
531
+ if (h > se) {
532
+ let y = 0;
533
+ const g = h % se, d = h - g;
534
+ for (; y < d; )
535
+ p(this.pattern.substr(y, se), y), y += se;
536
+ if (g) {
537
+ const f = h - se;
538
+ p(this.pattern.substr(f), f);
539
+ }
540
+ } else
541
+ p(this.pattern, 0);
542
+ }
543
+ searchIn(e) {
544
+ const { isCaseSensitive: s, ignoreDiacritics: l, includeMatches: u } = this.options;
545
+ if (e = s ? e : e.toLowerCase(), e = l ? he(e) : e, this.pattern === e) {
546
+ let d = {
547
+ isMatch: !0,
548
+ score: 0
549
+ };
550
+ return u && (d.indices = [[0, e.length - 1]]), d;
551
+ }
552
+ const {
553
+ location: n,
554
+ distance: i,
555
+ threshold: a,
556
+ findAllMatches: r,
557
+ minMatchCharLength: c,
558
+ ignoreLocation: o
559
+ } = this.options;
560
+ let p = [], h = 0, y = !1;
561
+ this.chunks.forEach(({ pattern: d, alphabet: f, startIndex: m }) => {
562
+ const { isMatch: E, score: k, indices: O } = qt(e, d, f, {
563
+ location: n + m,
564
+ distance: i,
565
+ threshold: a,
566
+ findAllMatches: r,
567
+ minMatchCharLength: c,
568
+ includeMatches: u,
569
+ ignoreLocation: o
570
+ });
571
+ E && (y = !0), h += k, E && O && (p = [...p, ...O]);
572
+ });
573
+ let g = {
574
+ isMatch: y,
575
+ score: y ? h / this.chunks.length : 1
576
+ };
577
+ return y && u && (g.indices = p), g;
578
+ }
579
+ }
580
+ class ee {
581
+ constructor(e) {
582
+ this.pattern = e;
583
+ }
584
+ static isMultiMatch(e) {
585
+ return Re(e, this.multiRegex);
586
+ }
587
+ static isSingleMatch(e) {
588
+ return Re(e, this.singleRegex);
589
+ }
590
+ search() {
591
+ }
592
+ }
593
+ function Re(t, e) {
594
+ const s = t.match(e);
595
+ return s ? s[1] : null;
596
+ }
597
+ class Kt extends ee {
598
+ constructor(e) {
599
+ super(e);
600
+ }
601
+ static get type() {
602
+ return "exact";
603
+ }
604
+ static get multiRegex() {
605
+ return /^="(.*)"$/;
606
+ }
607
+ static get singleRegex() {
608
+ return /^=(.*)$/;
609
+ }
610
+ search(e) {
611
+ const s = e === this.pattern;
612
+ return {
613
+ isMatch: s,
614
+ score: s ? 0 : 1,
615
+ indices: [0, this.pattern.length - 1]
616
+ };
617
+ }
618
+ }
619
+ class Ut extends ee {
620
+ constructor(e) {
621
+ super(e);
622
+ }
623
+ static get type() {
624
+ return "inverse-exact";
625
+ }
626
+ static get multiRegex() {
627
+ return /^!"(.*)"$/;
628
+ }
629
+ static get singleRegex() {
630
+ return /^!(.*)$/;
631
+ }
632
+ search(e) {
633
+ const l = e.indexOf(this.pattern) === -1;
634
+ return {
635
+ isMatch: l,
636
+ score: l ? 0 : 1,
637
+ indices: [0, e.length - 1]
638
+ };
639
+ }
640
+ }
641
+ class Yt extends ee {
642
+ constructor(e) {
643
+ super(e);
644
+ }
645
+ static get type() {
646
+ return "prefix-exact";
647
+ }
648
+ static get multiRegex() {
649
+ return /^\^"(.*)"$/;
650
+ }
651
+ static get singleRegex() {
652
+ return /^\^(.*)$/;
653
+ }
654
+ search(e) {
655
+ const s = e.startsWith(this.pattern);
656
+ return {
657
+ isMatch: s,
658
+ score: s ? 0 : 1,
659
+ indices: [0, this.pattern.length - 1]
660
+ };
661
+ }
662
+ }
663
+ class Wt extends ee {
664
+ constructor(e) {
665
+ super(e);
666
+ }
667
+ static get type() {
668
+ return "inverse-prefix-exact";
669
+ }
670
+ static get multiRegex() {
671
+ return /^!\^"(.*)"$/;
672
+ }
673
+ static get singleRegex() {
674
+ return /^!\^(.*)$/;
675
+ }
676
+ search(e) {
677
+ const s = !e.startsWith(this.pattern);
678
+ return {
679
+ isMatch: s,
680
+ score: s ? 0 : 1,
681
+ indices: [0, e.length - 1]
682
+ };
683
+ }
684
+ }
685
+ class Jt extends ee {
686
+ constructor(e) {
687
+ super(e);
688
+ }
689
+ static get type() {
690
+ return "suffix-exact";
691
+ }
692
+ static get multiRegex() {
693
+ return /^"(.*)"\$$/;
694
+ }
695
+ static get singleRegex() {
696
+ return /^(.*)\$$/;
697
+ }
698
+ search(e) {
699
+ const s = e.endsWith(this.pattern);
700
+ return {
701
+ isMatch: s,
702
+ score: s ? 0 : 1,
703
+ indices: [e.length - this.pattern.length, e.length - 1]
704
+ };
705
+ }
706
+ }
707
+ class Gt extends ee {
708
+ constructor(e) {
709
+ super(e);
710
+ }
711
+ static get type() {
712
+ return "inverse-suffix-exact";
713
+ }
714
+ static get multiRegex() {
715
+ return /^!"(.*)"\$$/;
716
+ }
717
+ static get singleRegex() {
718
+ return /^!(.*)\$$/;
719
+ }
720
+ search(e) {
721
+ const s = !e.endsWith(this.pattern);
722
+ return {
723
+ isMatch: s,
724
+ score: s ? 0 : 1,
725
+ indices: [0, e.length - 1]
726
+ };
727
+ }
728
+ }
729
+ class Ze extends ee {
730
+ constructor(e, {
731
+ location: s = A.location,
732
+ threshold: l = A.threshold,
733
+ distance: u = A.distance,
734
+ includeMatches: n = A.includeMatches,
735
+ findAllMatches: i = A.findAllMatches,
736
+ minMatchCharLength: a = A.minMatchCharLength,
737
+ isCaseSensitive: r = A.isCaseSensitive,
738
+ ignoreDiacritics: c = A.ignoreDiacritics,
739
+ ignoreLocation: o = A.ignoreLocation
740
+ } = {}) {
741
+ super(e), this._bitapSearch = new Xe(e, {
742
+ location: s,
743
+ threshold: l,
744
+ distance: u,
745
+ includeMatches: n,
746
+ findAllMatches: i,
747
+ minMatchCharLength: a,
748
+ isCaseSensitive: r,
749
+ ignoreDiacritics: c,
750
+ ignoreLocation: o
751
+ });
752
+ }
753
+ static get type() {
754
+ return "fuzzy";
755
+ }
756
+ static get multiRegex() {
757
+ return /^"(.*)"$/;
758
+ }
759
+ static get singleRegex() {
760
+ return /^(.*)$/;
761
+ }
762
+ search(e) {
763
+ return this._bitapSearch.searchIn(e);
764
+ }
765
+ }
766
+ class et extends ee {
767
+ constructor(e) {
768
+ super(e);
769
+ }
770
+ static get type() {
771
+ return "include";
772
+ }
773
+ static get multiRegex() {
774
+ return /^'"(.*)"$/;
775
+ }
776
+ static get singleRegex() {
777
+ return /^'(.*)$/;
778
+ }
779
+ search(e) {
780
+ let s = 0, l;
781
+ const u = [], n = this.pattern.length;
782
+ for (; (l = e.indexOf(this.pattern, s)) > -1; )
783
+ s = l + n, u.push([l, s - 1]);
784
+ const i = !!u.length;
785
+ return {
786
+ isMatch: i,
787
+ score: i ? 0 : 1,
788
+ indices: u
789
+ };
790
+ }
791
+ }
792
+ const we = [
793
+ Kt,
794
+ et,
795
+ Yt,
796
+ Wt,
797
+ Gt,
798
+ Jt,
799
+ Ut,
800
+ Ze
801
+ ], Oe = we.length, Xt = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Zt = "|";
802
+ function es(t, e = {}) {
803
+ return t.split(Zt).map((s) => {
804
+ let l = s.trim().split(Xt).filter((n) => n && !!n.trim()), u = [];
805
+ for (let n = 0, i = l.length; n < i; n += 1) {
806
+ const a = l[n];
807
+ let r = !1, c = -1;
808
+ for (; !r && ++c < Oe; ) {
809
+ const o = we[c];
810
+ let p = o.isMultiMatch(a);
811
+ p && (u.push(new o(p, e)), r = !0);
812
+ }
813
+ if (!r)
814
+ for (c = -1; ++c < Oe; ) {
815
+ const o = we[c];
816
+ let p = o.isSingleMatch(a);
817
+ if (p) {
818
+ u.push(new o(p, e));
819
+ break;
820
+ }
821
+ }
822
+ }
823
+ return u;
824
+ });
825
+ }
826
+ const ts = /* @__PURE__ */ new Set([Ze.type, et.type]);
827
+ class ss {
828
+ constructor(e, {
829
+ isCaseSensitive: s = A.isCaseSensitive,
830
+ ignoreDiacritics: l = A.ignoreDiacritics,
831
+ includeMatches: u = A.includeMatches,
832
+ minMatchCharLength: n = A.minMatchCharLength,
833
+ ignoreLocation: i = A.ignoreLocation,
834
+ findAllMatches: a = A.findAllMatches,
835
+ location: r = A.location,
836
+ threshold: c = A.threshold,
837
+ distance: o = A.distance
838
+ } = {}) {
839
+ this.query = null, this.options = {
840
+ isCaseSensitive: s,
841
+ ignoreDiacritics: l,
842
+ includeMatches: u,
843
+ minMatchCharLength: n,
844
+ findAllMatches: a,
845
+ ignoreLocation: i,
846
+ location: r,
847
+ threshold: c,
848
+ distance: o
849
+ }, e = s ? e : e.toLowerCase(), e = l ? he(e) : e, this.pattern = e, this.query = es(this.pattern, this.options);
850
+ }
851
+ static condition(e, s) {
852
+ return s.useExtendedSearch;
853
+ }
854
+ searchIn(e) {
855
+ const s = this.query;
856
+ if (!s)
857
+ return {
858
+ isMatch: !1,
859
+ score: 1
860
+ };
861
+ const { includeMatches: l, isCaseSensitive: u, ignoreDiacritics: n } = this.options;
862
+ e = u ? e : e.toLowerCase(), e = n ? he(e) : e;
863
+ let i = 0, a = [], r = 0;
864
+ for (let c = 0, o = s.length; c < o; c += 1) {
865
+ const p = s[c];
866
+ a.length = 0, i = 0;
867
+ for (let h = 0, y = p.length; h < y; h += 1) {
868
+ const g = p[h], { isMatch: d, indices: f, score: m } = g.search(e);
869
+ if (d) {
870
+ if (i += 1, r += m, l) {
871
+ const E = g.constructor.type;
872
+ ts.has(E) ? a = [...a, ...f] : a.push(f);
873
+ }
874
+ } else {
875
+ r = 0, i = 0, a.length = 0;
876
+ break;
877
+ }
878
+ }
879
+ if (i) {
880
+ let h = {
881
+ isMatch: !0,
882
+ score: r / i
883
+ };
884
+ return l && (h.indices = a), h;
885
+ }
886
+ }
887
+ return {
888
+ isMatch: !1,
889
+ score: 1
890
+ };
891
+ }
892
+ }
893
+ const be = [];
894
+ function ls(...t) {
895
+ be.push(...t);
896
+ }
897
+ function Fe(t, e) {
898
+ for (let s = 0, l = be.length; s < l; s += 1) {
899
+ let u = be[s];
900
+ if (u.condition(t, e))
901
+ return new u(t, e);
902
+ }
903
+ return new Xe(t, e);
904
+ }
905
+ const ve = {
906
+ AND: "$and",
907
+ OR: "$or"
908
+ }, Me = {
909
+ PATH: "$path",
910
+ PATTERN: "$val"
911
+ }, Be = (t) => !!(t[ve.AND] || t[ve.OR]), ns = (t) => !!t[Me.PATH], us = (t) => !X(t) && Ye(t) && !Be(t), Te = (t) => ({
912
+ [ve.AND]: Object.keys(t).map((e) => ({
913
+ [e]: t[e]
914
+ }))
915
+ });
916
+ function tt(t, e, { auto: s = !0 } = {}) {
917
+ const l = (u) => {
918
+ let n = Object.keys(u);
919
+ const i = ns(u);
920
+ if (!i && n.length > 1 && !Be(u))
921
+ return l(Te(u));
922
+ if (us(u)) {
923
+ const r = i ? u[Me.PATH] : n[0], c = i ? u[Me.PATTERN] : u[r];
924
+ if (!U(c))
925
+ throw new Error(It(r));
926
+ const o = {
927
+ keyId: Ee(r),
928
+ pattern: c
929
+ };
930
+ return s && (o.searcher = Fe(c, e)), o;
931
+ }
932
+ let a = {
933
+ children: [],
934
+ operator: n[0]
935
+ };
936
+ return n.forEach((r) => {
937
+ const c = u[r];
938
+ X(c) && c.forEach((o) => {
939
+ a.children.push(l(o));
940
+ });
941
+ }), a;
942
+ };
943
+ return Be(t) || (t = Te(t)), l(t);
944
+ }
945
+ function as(t, { ignoreFieldNorm: e = A.ignoreFieldNorm }) {
946
+ t.forEach((s) => {
947
+ let l = 1;
948
+ s.matches.forEach(({ key: u, norm: n, score: i }) => {
949
+ const a = u ? u.weight : null;
950
+ l *= Math.pow(
951
+ i === 0 && a ? Number.EPSILON : i,
952
+ (a || 1) * (e ? 1 : n)
953
+ );
954
+ }), s.score = l;
955
+ });
956
+ }
957
+ function is(t, e) {
958
+ const s = t.matches;
959
+ e.matches = [], T(s) && s.forEach((l) => {
960
+ if (!T(l.indices) || !l.indices.length)
961
+ return;
962
+ const { indices: u, value: n } = l;
963
+ let i = {
964
+ indices: u,
965
+ value: n
966
+ };
967
+ l.key && (i.key = l.key.src), l.idx > -1 && (i.refIndex = l.idx), e.matches.push(i);
968
+ });
969
+ }
970
+ function rs(t, e) {
971
+ e.score = t.score;
972
+ }
973
+ function os(t, e, {
974
+ includeMatches: s = A.includeMatches,
975
+ includeScore: l = A.includeScore
976
+ } = {}) {
977
+ const u = [];
978
+ return s && u.push(is), l && u.push(rs), t.map((n) => {
979
+ const { idx: i } = n, a = {
980
+ item: e[i],
981
+ refIndex: i
982
+ };
983
+ return u.length && u.forEach((r) => {
984
+ r(n, a);
985
+ }), a;
986
+ });
987
+ }
988
+ class Z {
989
+ constructor(e, s = {}, l) {
990
+ this.options = { ...A, ...s }, this.options.useExtendedSearch, this._keyStore = new Lt(this.options.keys), this.setCollection(e, l);
991
+ }
992
+ setCollection(e, s) {
993
+ if (this._docs = e, s && !(s instanceof Ie))
994
+ throw new Error(kt);
995
+ this._myIndex = s || Ge(this.options.keys, this._docs, {
996
+ getFn: this.options.getFn,
997
+ fieldNormWeight: this.options.fieldNormWeight
998
+ });
999
+ }
1000
+ add(e) {
1001
+ T(e) && (this._docs.push(e), this._myIndex.add(e));
1002
+ }
1003
+ remove(e = () => !1) {
1004
+ const s = [];
1005
+ for (let l = 0, u = this._docs.length; l < u; l += 1) {
1006
+ const n = this._docs[l];
1007
+ e(n, l) && (this.removeAt(l), l -= 1, u -= 1, s.push(n));
1008
+ }
1009
+ return s;
1010
+ }
1011
+ removeAt(e) {
1012
+ this._docs.splice(e, 1), this._myIndex.removeAt(e);
1013
+ }
1014
+ getIndex() {
1015
+ return this._myIndex;
1016
+ }
1017
+ search(e, { limit: s = -1 } = {}) {
1018
+ const {
1019
+ includeMatches: l,
1020
+ includeScore: u,
1021
+ shouldSort: n,
1022
+ sortFn: i,
1023
+ ignoreFieldNorm: a
1024
+ } = this.options;
1025
+ let r = U(e) ? U(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
1026
+ return as(r, { ignoreFieldNorm: a }), n && r.sort(i), Ue(s) && s > -1 && (r = r.slice(0, s)), os(r, this._docs, {
1027
+ includeMatches: l,
1028
+ includeScore: u
1029
+ });
1030
+ }
1031
+ _searchStringList(e) {
1032
+ const s = Fe(e, this.options), { records: l } = this._myIndex, u = [];
1033
+ return l.forEach(({ v: n, i, n: a }) => {
1034
+ if (!T(n))
1035
+ return;
1036
+ const { isMatch: r, score: c, indices: o } = s.searchIn(n);
1037
+ r && u.push({
1038
+ item: n,
1039
+ idx: i,
1040
+ matches: [{ score: c, value: n, norm: a, indices: o }]
1041
+ });
1042
+ }), u;
1043
+ }
1044
+ _searchLogical(e) {
1045
+ const s = tt(e, this.options), l = (a, r, c) => {
1046
+ if (!a.children) {
1047
+ const { keyId: p, searcher: h } = a, y = this._findMatches({
1048
+ key: this._keyStore.get(p),
1049
+ value: this._myIndex.getValueForItemAtKeyId(r, p),
1050
+ searcher: h
1051
+ });
1052
+ return y && y.length ? [
1053
+ {
1054
+ idx: c,
1055
+ item: r,
1056
+ matches: y
1057
+ }
1058
+ ] : [];
1059
+ }
1060
+ const o = [];
1061
+ for (let p = 0, h = a.children.length; p < h; p += 1) {
1062
+ const y = a.children[p], g = l(y, r, c);
1063
+ if (g.length)
1064
+ o.push(...g);
1065
+ else if (a.operator === ve.AND)
1066
+ return [];
1067
+ }
1068
+ return o;
1069
+ }, u = this._myIndex.records, n = {}, i = [];
1070
+ return u.forEach(({ $: a, i: r }) => {
1071
+ if (T(a)) {
1072
+ let c = l(s, a, r);
1073
+ c.length && (n[r] || (n[r] = { idx: r, item: a, matches: [] }, i.push(n[r])), c.forEach(({ matches: o }) => {
1074
+ n[r].matches.push(...o);
1075
+ }));
1076
+ }
1077
+ }), i;
1078
+ }
1079
+ _searchObjectList(e) {
1080
+ const s = Fe(e, this.options), { keys: l, records: u } = this._myIndex, n = [];
1081
+ return u.forEach(({ $: i, i: a }) => {
1082
+ if (!T(i))
1083
+ return;
1084
+ let r = [];
1085
+ l.forEach((c, o) => {
1086
+ r.push(
1087
+ ...this._findMatches({
1088
+ key: c,
1089
+ value: i[o],
1090
+ searcher: s
1091
+ })
1092
+ );
1093
+ }), r.length && n.push({
1094
+ idx: a,
1095
+ item: i,
1096
+ matches: r
1097
+ });
1098
+ }), n;
1099
+ }
1100
+ _findMatches({ key: e, value: s, searcher: l }) {
1101
+ if (!T(s))
1102
+ return [];
1103
+ let u = [];
1104
+ if (X(s))
1105
+ s.forEach(({ v: n, i, n: a }) => {
1106
+ if (!T(n))
1107
+ return;
1108
+ const { isMatch: r, score: c, indices: o } = l.searchIn(n);
1109
+ r && u.push({
1110
+ score: c,
1111
+ key: e,
1112
+ value: n,
1113
+ idx: i,
1114
+ norm: a,
1115
+ indices: o
1116
+ });
1117
+ });
1118
+ else {
1119
+ const { v: n, n: i } = s, { isMatch: a, score: r, indices: c } = l.searchIn(n);
1120
+ a && u.push({ score: r, key: e, value: n, norm: i, indices: c });
1121
+ }
1122
+ return u;
1123
+ }
1124
+ }
1125
+ Z.version = "7.1.0";
1126
+ Z.createIndex = Ge;
1127
+ Z.parseIndex = Pt;
1128
+ Z.config = A;
1129
+ Z.parseQuery = tt;
1130
+ ls(ss);
1131
+ const [cs, oe] = vt(
1132
+ (t) => {
1133
+ const e = ne(t);
1134
+ function s(a, r) {
1135
+ L(r) ? delete e.queryForm[a] : e.queryForm[a] = r;
1136
+ }
1137
+ function l(a) {
1138
+ const r = e.tags.findIndex((c) => c.label === a.label);
1139
+ r === -1 ? e.tags.push(a) : e.tags.splice(r, 1, a);
1140
+ }
1141
+ function u(a, r) {
1142
+ if (delete e.queryForm[a.label], r)
1143
+ e.tags.splice(r, 1);
1144
+ else {
1145
+ const c = e.tags.findIndex((o) => o.label === a.label);
1146
+ c !== -1 && e.tags.splice(c, 1);
1147
+ }
1148
+ }
1149
+ function n() {
1150
+ e.tags.forEach((a) => {
1151
+ delete e.queryForm[a.label];
1152
+ }), e.tags = [];
1153
+ }
1154
+ function i() {
1155
+ Object.keys(e.queryForm).forEach((a) => {
1156
+ delete e.queryForm[a];
1157
+ }), e.tags = [];
1158
+ }
1159
+ return { state: e, setQuery: s, addTag: l, reduceTag: u, reduceAllTag: n, clearQuery: i };
1160
+ }
1161
+ ), ds = { class: "el-select-pop-search-container" }, fs = { class: "el-select-dropdown__wrap virtual-scroll-wrap" }, hs = { class: "check-all ak-relative el-select-dropdown__item" }, vs = ["title"], ps = { class: "el-select-dropdown__empty" }, gs = { class: "custom-multi-footer" }, ms = /* @__PURE__ */ q({
1162
+ name: "jc-select-query",
1163
+ __name: "index",
1164
+ props: {
1165
+ field: {
1166
+ type: String,
1167
+ required: !0,
1168
+ default: ""
1169
+ },
1170
+ options: {
1171
+ type: Array,
1172
+ default: () => [],
1173
+ required: !0
1174
+ },
1175
+ allowCreate: {
1176
+ type: Boolean,
1177
+ default: !0
1178
+ },
1179
+ keyField: {
1180
+ type: Array,
1181
+ default: () => ["label", "value"]
1182
+ },
1183
+ width: {
1184
+ type: String,
1185
+ default: "160px"
1186
+ },
1187
+ size: {
1188
+ type: String,
1189
+ default: "default",
1190
+ validator: (t) => ["small", "default", "large"].includes(t)
1191
+ },
1192
+ footerBtnName: {
1193
+ type: String,
1194
+ default: "搜索"
1195
+ },
1196
+ maxScrollHeight: {
1197
+ type: String,
1198
+ default: "240px"
1199
+ },
1200
+ isNeedFooter: {
1201
+ type: Boolean,
1202
+ default: !0
1203
+ }
1204
+ },
1205
+ setup(t, { expose: e }) {
1206
+ const s = t, l = B(), u = B([]), n = ne(
1207
+ {}
1208
+ ), i = B(""), a = B(), r = B([]), c = B([]), o = B([]), p = B(!1), h = B(!1), { state: y, setQuery: g } = oe();
1209
+ let d = -1, f = !1;
1210
+ const m = B(), E = (v) => {
1211
+ v && (o.value = u.value, i.value = "", c.value = r.value, $(o.value), Ce(() => {
1212
+ var _;
1213
+ (_ = a.value) == null || _.focus();
1214
+ }));
1215
+ }, k = (v) => {
1216
+ o.value = o.value.filter(
1217
+ (_) => _.value !== v.value
1218
+ );
1219
+ }, O = (v) => {
1220
+ g(s.field, v);
1221
+ }, Y = () => {
1222
+ const v = i.value.trim();
1223
+ v !== "" ? c.value = m.value.search(v).map((_) => _.item) : c.value = r.value;
1224
+ }, P = () => {
1225
+ L(i.value) || c.value.map((v) => v.value).includes(i.value) || (r.value.unshift({
1226
+ label: i.value,
1227
+ value: i.value
1228
+ }), o.value.push({
1229
+ label: i.value,
1230
+ value: i.value
1231
+ }), u.value = o.value, g(s.field, u.value), Ce(() => {
1232
+ m.value = new Z(r.value, {
1233
+ keys: s.keyField
1234
+ }), Y();
1235
+ }));
1236
+ }, D = (v) => {
1237
+ o.value = v ? c.value : [], h.value = !1, s.isNeedFooter || (u.value = o.value, g(s.field, u.value));
1238
+ }, $ = (v) => {
1239
+ if (v.length === 0) {
1240
+ p.value = !1, h.value = !1;
1241
+ return;
1242
+ }
1243
+ const _ = v.length;
1244
+ p.value = _ === c.value.length, h.value = _ > 0 && _ < c.value.length;
1245
+ const { options: x } = s;
1246
+ let w = 0;
1247
+ if (v.length > 0) {
1248
+ const b = v[v.length - 1];
1249
+ w = x.findIndex((z) => z.value === b.value);
1250
+ }
1251
+ if (f) {
1252
+ const b = Math.abs(d - w) + 1, z = Math.min(d, w);
1253
+ let R = 0;
1254
+ for (; R < b; ) {
1255
+ const V = z + R;
1256
+ ct(v, x[V]) === -1 && o.value.push(x[V]), R++;
1257
+ }
1258
+ }
1259
+ s.isNeedFooter || (u.value = o.value, g(s.field, u.value));
1260
+ }, j = (v) => {
1261
+ !f && !o.value.includes(v) && (d = r.value.findIndex((_) => _.value === v.value));
1262
+ }, Q = () => {
1263
+ var v;
1264
+ (v = l.value) == null || v.blur();
1265
+ }, te = () => {
1266
+ u.value = o.value, g(s.field, u.value), Q();
1267
+ };
1268
+ return J(
1269
+ () => s.options,
1270
+ () => {
1271
+ var v;
1272
+ !_e(s.options) || ((v = s.options) == null ? void 0 : v.length) === 0 || (c.value = s.options, r.value = ot(s.options), m.value = new Z(r.value, {
1273
+ keys: s.keyField,
1274
+ threshold: 0.1
1275
+ }));
1276
+ },
1277
+ {
1278
+ immediate: !0,
1279
+ deep: !0
1280
+ }
1281
+ ), J(
1282
+ () => y.queryForm[s.field],
1283
+ (v) => {
1284
+ L(v) ? (u.value = [], o.value = []) : u.value = _e(v) ? v : [];
1285
+ },
1286
+ {
1287
+ deep: !0
1288
+ }
1289
+ ), ie(() => {
1290
+ window.addEventListener("keydown", (v) => {
1291
+ v.shiftKey && (f = !0);
1292
+ }), window.addEventListener("keyup", () => {
1293
+ f = !1;
1294
+ }), Ce(() => {
1295
+ m.value = new Z(r.value, {
1296
+ keys: s.keyField
1297
+ });
1298
+ });
1299
+ }), lt(() => {
1300
+ window.removeEventListener("keydown", (v) => {
1301
+ v.shiftKey && (f = !0);
1302
+ }), window.removeEventListener("keyup", () => {
1303
+ f = !1;
1304
+ });
1305
+ }), ie(() => {
1306
+ var v;
1307
+ l.value && (n.focus = l.value.focus, n.blur = l.value.blur, n.selectedLabel = (v = l.value) == null ? void 0 : v.selectedLabel);
1308
+ }), e(n), (v, _) => (S(), G(C(me), le({
1309
+ ref_key: "selectRef",
1310
+ ref: l,
1311
+ modelValue: u.value,
1312
+ "onUpdate:modelValue": _[3] || (_[3] = (x) => u.value = x)
1313
+ }, v.$attrs, {
1314
+ multiple: "",
1315
+ clearable: "",
1316
+ "show-arrow": !1,
1317
+ "collapse-tags": !0,
1318
+ "collapse-tags-tooltip": !0,
1319
+ "max-collapse-tags": 1,
1320
+ size: t.size,
1321
+ style: { width: t.width },
1322
+ class: "jc-select",
1323
+ "popper-class": "jc-select-popper",
1324
+ placeholder: "请选择",
1325
+ onVisibleChange: E,
1326
+ onRemoveTag: k,
1327
+ onChange: O
1328
+ }), nt({
1329
+ default: F(() => [
1330
+ M(C(ye), {
1331
+ value: "1",
1332
+ hidden: ""
1333
+ }),
1334
+ I("div", ds, [
1335
+ M(C(ke), { class: "selcet-icon search-icon" }),
1336
+ ce(I("input", {
1337
+ ref_key: "searchInputRef",
1338
+ ref: a,
1339
+ "onUpdate:modelValue": _[0] || (_[0] = (x) => i.value = x),
1340
+ class: "el-select-pop__input",
1341
+ onInput: Y
1342
+ }, null, 544), [
1343
+ [ut, i.value]
1344
+ ]),
1345
+ t.allowCreate ? (S(), G(C(gt), {
1346
+ key: 0,
1347
+ class: "selcet-icon circle-icon",
1348
+ onClick: P
1349
+ })) : Ne("", !0)
1350
+ ]),
1351
+ ce(I("div", fs, [
1352
+ I("li", hs, [
1353
+ M(C($e), {
1354
+ modelValue: p.value,
1355
+ "onUpdate:modelValue": _[1] || (_[1] = (x) => p.value = x),
1356
+ indeterminate: h.value,
1357
+ size: t.size,
1358
+ onChange: D
1359
+ }, {
1360
+ default: F(() => _[4] || (_[4] = [
1361
+ H("全选")
1362
+ ])),
1363
+ _: 1,
1364
+ __: [4]
1365
+ }, 8, ["modelValue", "indeterminate", "size"])
1366
+ ]),
1367
+ M(C(at), {
1368
+ modelValue: o.value,
1369
+ "onUpdate:modelValue": _[2] || (_[2] = (x) => o.value = x),
1370
+ onChange: $,
1371
+ size: t.size
1372
+ }, {
1373
+ default: F(() => [
1374
+ M(C(ht), {
1375
+ class: "recycle-scroller",
1376
+ items: c.value,
1377
+ "item-size": 30,
1378
+ "key-field": "value",
1379
+ style: Pe({ maxHeight: t.maxScrollHeight })
1380
+ }, {
1381
+ default: F(({ item: x }) => [
1382
+ I("li", {
1383
+ class: "el-select-dropdown__item",
1384
+ title: x.label
1385
+ }, [
1386
+ M(C($e), {
1387
+ size: t.size,
1388
+ value: x,
1389
+ label: x,
1390
+ disabled: x.disabled,
1391
+ onClick: (w) => j(x)
1392
+ }, {
1393
+ default: F(() => [
1394
+ He(v.$slots, "default", { scope: x }, () => [
1395
+ I("span", null, re(x.label), 1)
1396
+ ])
1397
+ ]),
1398
+ _: 2
1399
+ }, 1032, ["size", "value", "label", "disabled", "onClick"])
1400
+ ], 8, vs)
1401
+ ]),
1402
+ _: 3
1403
+ }, 8, ["items", "style"])
1404
+ ]),
1405
+ _: 3
1406
+ }, 8, ["modelValue", "size"])
1407
+ ], 512), [
1408
+ [fe, c.value.length > 0]
1409
+ ]),
1410
+ ce(I("p", ps, "无数据", 512), [
1411
+ [fe, c.value.length === 0]
1412
+ ])
1413
+ ]),
1414
+ _: 2
1415
+ }, [
1416
+ t.isNeedFooter ? {
1417
+ name: "footer",
1418
+ fn: F(() => [
1419
+ I("div", gs, [
1420
+ _[6] || (_[6] = I("span", { class: "shift-tips" }, [
1421
+ I("span", null, "提示:按住Shift可以快速多选")
1422
+ ], -1)),
1423
+ _[7] || (_[7] = I("span", { class: "counts" }, null, -1)),
1424
+ I("span", null, [
1425
+ M(C(W), {
1426
+ size: t.size,
1427
+ link: "",
1428
+ type: "primary",
1429
+ onClick: Q
1430
+ }, {
1431
+ default: F(() => _[5] || (_[5] = [
1432
+ H("关闭")
1433
+ ])),
1434
+ _: 1,
1435
+ __: [5]
1436
+ }, 8, ["size"]),
1437
+ M(C(W), {
1438
+ type: "primary",
1439
+ size: t.size,
1440
+ onClick: te
1441
+ }, {
1442
+ default: F(() => [
1443
+ H(re(t.footerBtnName), 1)
1444
+ ]),
1445
+ _: 1
1446
+ }, 8, ["size"])
1447
+ ])
1448
+ ])
1449
+ ]),
1450
+ key: "0"
1451
+ } : void 0
1452
+ ]), 1040, ["modelValue", "size", "style"]));
1453
+ }
1454
+ }), ys = (t) => (t.install = (e) => {
1455
+ const s = t.name;
1456
+ e.component(s, t);
1457
+ }, t), Cs = ys(ms), As = /* @__PURE__ */ q({
1458
+ name: "jc-date-picker",
1459
+ __name: "index",
1460
+ props: {
1461
+ fieldList: {
1462
+ type: Array,
1463
+ require: !0,
1464
+ default: () => []
1465
+ },
1466
+ type: {
1467
+ type: String,
1468
+ default: "daterange",
1469
+ validator: (t) => ["daterange", "monthrange"].includes(t)
1470
+ },
1471
+ size: {
1472
+ type: String,
1473
+ default: "default",
1474
+ validator: (t) => ["small", "default", "large"].includes(t)
1475
+ },
1476
+ width: {
1477
+ type: String,
1478
+ default: "320px"
1479
+ }
1480
+ },
1481
+ emits: ["fieldChange"],
1482
+ setup(t, { expose: e, emit: s }) {
1483
+ const l = t, u = s, n = B([]), i = B([]), a = B(""), r = B(""), { state: c, setQuery: o } = oe(), p = () => {
1484
+ l.fieldList.forEach((f) => {
1485
+ o(f.value, null);
1486
+ });
1487
+ }, h = (f) => {
1488
+ p(), o(f, n.value), u("fieldChange", f);
1489
+ }, y = () => {
1490
+ r.value = a.value, i.value = n.value, o(a.value, n.value);
1491
+ };
1492
+ J(
1493
+ () => l.fieldList,
1494
+ (f) => {
1495
+ !L(f) && L(a.value) && (a.value = f[0].value, n.value = []);
1496
+ },
1497
+ {
1498
+ immediate: !0,
1499
+ deep: !0
1500
+ }
1501
+ ), J(
1502
+ l.fieldList.map((f) => () => c.queryForm[f.value]),
1503
+ (f) => {
1504
+ const m = f.findIndex((E) => !L(E));
1505
+ m === -1 ? (a.value = l.fieldList[0].value, n.value = []) : (a.value = l.fieldList[m].value, n.value = f[m] || []);
1506
+ },
1507
+ {
1508
+ deep: !0
1509
+ }
1510
+ );
1511
+ const g = B(), d = ne({});
1512
+ return ie(() => {
1513
+ var f, m, E, k;
1514
+ g.value && (d.focus = (f = g.value) == null ? void 0 : f.focus, d.blur = (m = g.value) == null ? void 0 : m.blur, d.handleOpen = (E = g.value) == null ? void 0 : E.handleOpen, d.handleClose = (k = g.value) == null ? void 0 : k.handleClose);
1515
+ }), e(d), (f, m) => (S(), N("div", {
1516
+ class: "jc-date-picker",
1517
+ style: Pe({ width: t.width })
1518
+ }, [
1519
+ M(C(me), {
1520
+ modelValue: a.value,
1521
+ "onUpdate:modelValue": m[0] || (m[0] = (E) => a.value = E),
1522
+ size: t.size,
1523
+ class: "select-field",
1524
+ onChange: h
1525
+ }, {
1526
+ prefix: F(() => [
1527
+ H(re((t.fieldList.find((E) => E.value === a.value) || {}).label), 1)
1528
+ ]),
1529
+ default: F(() => [
1530
+ (S(!0), N(pe, null, ge(t.fieldList, (E) => (S(), G(C(ye), {
1531
+ key: E.value,
1532
+ label: E.label,
1533
+ value: E.value
1534
+ }, null, 8, ["label", "value"]))), 128))
1535
+ ]),
1536
+ _: 1
1537
+ }, 8, ["modelValue", "size"]),
1538
+ M(C(it), le({
1539
+ ref_key: "datePickerRef",
1540
+ ref: g,
1541
+ modelValue: n.value,
1542
+ "onUpdate:modelValue": m[1] || (m[1] = (E) => n.value = E),
1543
+ type: t.type
1544
+ }, f.$attrs, {
1545
+ "range-separator": "至",
1546
+ "start-placeholder": "开始时间",
1547
+ "end-placeholder": "结束时间",
1548
+ size: t.size,
1549
+ "value-format": t.type === "daterange" ? "YYYY-MM-DD" : "YYYY-MM",
1550
+ onChange: y
1551
+ }), null, 16, ["modelValue", "type", "size", "value-format"])
1552
+ ], 4));
1553
+ }
1554
+ }), xs = (t) => (t.install = (e) => {
1555
+ const s = t.name;
1556
+ e.component(s, t);
1557
+ }, t), _s = xs(As), Es = { class: "suffixContent" }, ws = /* @__PURE__ */ q({
1558
+ name: "jc-input-switch",
1559
+ __name: "index",
1560
+ props: {
1561
+ fieldList: {
1562
+ type: Array,
1563
+ required: !0,
1564
+ default: () => []
1565
+ },
1566
+ size: {
1567
+ type: String,
1568
+ default: "default",
1569
+ validator: (t) => ["small", "default", "large"].includes(t)
1570
+ },
1571
+ width: {
1572
+ type: String,
1573
+ default: "320px"
1574
+ }
1575
+ },
1576
+ emits: ["fieldChange"],
1577
+ setup(t, { expose: e, emit: s }) {
1578
+ const l = t, u = s, n = B(""), i = B(""), a = B(""), r = B(""), { state: c, setQuery: o } = oe(), p = () => {
1579
+ l.fieldList.forEach((m) => {
1580
+ o(m.value, null);
1581
+ });
1582
+ }, h = () => {
1583
+ n.value = "", p();
1584
+ }, y = (m) => {
1585
+ p(), o(m, n.value), u("fieldChange", m);
1586
+ }, g = () => {
1587
+ i.value = n.value, r.value = a.value, o(a.value, n.value.trim());
1588
+ };
1589
+ J(
1590
+ () => l.fieldList,
1591
+ (m) => {
1592
+ !L(m) && L(a.value) && (a.value = m[0].value, n.value = "");
1593
+ },
1594
+ {
1595
+ immediate: !0,
1596
+ deep: !0
1597
+ }
1598
+ ), J(
1599
+ l.fieldList.map((m) => () => c.queryForm[m.value]),
1600
+ (m) => {
1601
+ const E = m.findIndex((k) => !L(k));
1602
+ E === -1 ? (a.value = l.fieldList[0].value, n.value = "") : (a.value = l.fieldList[E].value, n.value = m[E] || "");
1603
+ },
1604
+ {
1605
+ deep: !0
1606
+ }
1607
+ );
1608
+ const d = B(), f = ne({});
1609
+ return ie(() => {
1610
+ var m, E, k, O, Y, P, D, $, j, Q;
1611
+ d.value && (f.blur = (m = d.value) == null ? void 0 : m.blur, f.clear = (E = d.value) == null ? void 0 : E.clear, f.focus = (k = d.value) == null ? void 0 : k.focus, f.input = (O = d.value) == null ? void 0 : O.input, f.ref = (Y = d.value) == null ? void 0 : Y.ref, f.resizeTextarea = (P = d.value) == null ? void 0 : P.resizeTextarea, f.select = (D = d.value) == null ? void 0 : D.select, f.textarea = ($ = d.value) == null ? void 0 : $.textarea, f.textareaStyle = (j = d.value) == null ? void 0 : j.textareaStyle, f.isComposing = (Q = d.value) == null ? void 0 : Q.isComposing);
1612
+ }), e(f), (m, E) => (S(), G(C(xe), le({
1613
+ ref_key: "inputRef",
1614
+ ref: d,
1615
+ modelValue: n.value,
1616
+ "onUpdate:modelValue": E[1] || (E[1] = (k) => n.value = k),
1617
+ modelModifiers: { trim: !0 }
1618
+ }, m.$attrs, {
1619
+ placeholder: "请输入内容",
1620
+ style: { width: t.width },
1621
+ size: t.size,
1622
+ class: "jc-input jc-input-switch"
1623
+ }), {
1624
+ prepend: F(() => [
1625
+ M(C(me), {
1626
+ modelValue: a.value,
1627
+ "onUpdate:modelValue": E[0] || (E[0] = (k) => a.value = k),
1628
+ size: t.size,
1629
+ class: "select-field",
1630
+ onChange: y
1631
+ }, {
1632
+ prefix: F(() => [
1633
+ H(re((t.fieldList.find((k) => k.value === a.value) || {}).label), 1)
1634
+ ]),
1635
+ default: F(() => [
1636
+ (S(!0), N(pe, null, ge(t.fieldList, (k) => (S(), G(C(ye), {
1637
+ key: k.value,
1638
+ label: k.label,
1639
+ value: k.value
1640
+ }, null, 8, ["label", "value"]))), 128))
1641
+ ]),
1642
+ _: 1
1643
+ }, 8, ["modelValue", "size"])
1644
+ ]),
1645
+ suffix: F(() => [
1646
+ I("div", Es, [
1647
+ ce(M(C(ae), {
1648
+ class: "el-input__icon",
1649
+ onClick: h
1650
+ }, {
1651
+ default: F(() => [
1652
+ M(C(Ke))
1653
+ ]),
1654
+ _: 1
1655
+ }, 512), [
1656
+ [fe, n.value]
1657
+ ]),
1658
+ M(C(ae), {
1659
+ class: "el-input__icon",
1660
+ onClick: g
1661
+ }, {
1662
+ default: F(() => [
1663
+ M(C(ke))
1664
+ ]),
1665
+ _: 1
1666
+ })
1667
+ ])
1668
+ ]),
1669
+ _: 1
1670
+ }, 16, ["modelValue", "style", "size"]));
1671
+ }
1672
+ }), bs = (t) => (t.install = (e) => {
1673
+ const s = t.name;
1674
+ e.component(s, t);
1675
+ }, t), Fs = bs(ws), Ms = { class: "suffixContent" }, Bs = { class: "popover-body" }, ks = { class: "popover-btn" }, Is = { class: "popover-btn-right" }, zs = /* @__PURE__ */ q({
1676
+ name: "jc-input-complex",
1677
+ __name: "index",
1678
+ props: {
1679
+ fieldList: {
1680
+ type: Array,
1681
+ require: !0,
1682
+ default: () => []
1683
+ },
1684
+ size: {
1685
+ type: String,
1686
+ default: "default",
1687
+ validator: (t) => ["small", "default", "large"].includes(t)
1688
+ },
1689
+ width: {
1690
+ type: String,
1691
+ default: "320px"
1692
+ }
1693
+ },
1694
+ emits: ["fieldChange"],
1695
+ setup(t, { expose: e, emit: s }) {
1696
+ const l = t, u = s, n = B(""), i = B(""), a = B(""), r = B(""), c = B(!1), o = Le(() => a.value + "List"), p = Le(
1697
+ () => {
1698
+ var w;
1699
+ return (w = l.fieldList.find((b) => b.value === a.value)) == null ? void 0 : w.label;
1700
+ }
1701
+ ), h = B(""), { state: y, setQuery: g, addTag: d, reduceTag: f } = oe(), m = {}, E = {};
1702
+ l.fieldList.forEach((w) => {
1703
+ m[w.value] = null, E[w.value + "List"] = [];
1704
+ });
1705
+ const k = (w) => {
1706
+ c.value = !1, O(), u("fieldChange", w);
1707
+ }, O = () => {
1708
+ y.queryForm[o.value] ? h.value = y.queryForm[o.value].join(`
1709
+ `) : h.value = "";
1710
+ }, Y = () => {
1711
+ n.value = "", g(a.value, null), $();
1712
+ }, P = () => {
1713
+ for (const w in m)
1714
+ g(w, null);
1715
+ }, D = () => {
1716
+ h.value = "", i.value = n.value, r.value = a.value, P(), g(o.value, null), f({ label: o.value, value: "" }), g(a.value, n.value.trim());
1717
+ }, $ = () => {
1718
+ const w = h.value.split(`
1719
+ `).filter((b) => !L(b));
1720
+ if (w.length > 0) {
1721
+ const b = [...new Set(w)], z = dt(
1722
+ w,
1723
+ (V, K, ue) => ft(ue, V, K + 1)
1724
+ ), R = [...new Set(z)];
1725
+ if (R.length > 0) {
1726
+ const V = l.fieldList.find(
1727
+ (ue) => ue.value === a.value
1728
+ ), K = `搜索条件中包含重复的内容:${V == null ? void 0 : V.label}:${R.join(
1729
+ `
1730
+ `
1731
+ )}`;
1732
+ Qe.warning(K);
1733
+ }
1734
+ h.value = b.join(`
1735
+ `), P(), g(o.value, b), d({
1736
+ label: o.value,
1737
+ value: `${p.value}:${b.join(",")}`
1738
+ });
1739
+ } else
1740
+ g(o.value, null), f({ label: o.value, value: "" });
1741
+ j();
1742
+ }, j = () => {
1743
+ c.value = !1;
1744
+ }, Q = () => {
1745
+ n.value = "", h.value = "", i.value = "", j();
1746
+ }, te = (w) => {
1747
+ Object.keys(w).forEach((b) => {
1748
+ a.value = b.replace("List", ""), h.value = w[b].join(`
1749
+ `), $();
1750
+ });
1751
+ }, v = () => {
1752
+ !L(n.value) && (n.value !== i.value || a.value !== r.value) ? (i.value = n.value, r.value = a.value, P(), g(o.value, null), f({ label: o.value, value: "" }), g(a.value, n.value.trim())) : L(n.value) && (i.value = n.value, g(a.value, null));
1753
+ };
1754
+ J(
1755
+ () => l.fieldList,
1756
+ (w) => {
1757
+ !L(w) && L(a.value) && (a.value = w[0].value, n.value = "", h.value = "");
1758
+ },
1759
+ {
1760
+ immediate: !0,
1761
+ deep: !0
1762
+ }
1763
+ ), J(
1764
+ l.fieldList.flatMap((w) => [
1765
+ () => y.queryForm[w.value],
1766
+ () => y.queryForm[w.value + "List"]
1767
+ ]),
1768
+ (w) => {
1769
+ if (w.findIndex((R) => !L(R)) === -1) {
1770
+ Q();
1771
+ return;
1772
+ }
1773
+ let z = !1;
1774
+ l.fieldList.forEach((R) => {
1775
+ var K;
1776
+ const V = R.value + "List";
1777
+ if (h.value = ((K = y.queryForm[V]) == null ? void 0 : K.join(`
1778
+ `)) || "", _e(y.queryForm[V]) && !L(y.queryForm[V])) {
1779
+ d({
1780
+ label: V,
1781
+ value: `${R.label}:${y.queryForm[V].join(",")}`
1782
+ });
1783
+ return;
1784
+ } else
1785
+ f({ label: V, value: "" });
1786
+ y.queryForm[R.value] ? (z = !0, a.value = R.value, n.value = y.queryForm[R.value] || "") : z || (n.value = "");
1787
+ });
1788
+ },
1789
+ {
1790
+ deep: !0
1791
+ }
1792
+ );
1793
+ const _ = B(), x = ne({});
1794
+ return ie(() => {
1795
+ var w, b, z, R, V, K, ue, ze, Se, De;
1796
+ _.value && (x.blur = (w = _.value) == null ? void 0 : w.blur, x.clear = (b = _.value) == null ? void 0 : b.clear, x.focus = (z = _.value) == null ? void 0 : z.focus, x.input = (R = _.value) == null ? void 0 : R.input, x.ref = (V = _.value) == null ? void 0 : V.ref, x.resizeTextarea = (K = _.value) == null ? void 0 : K.resizeTextarea, x.select = (ue = _.value) == null ? void 0 : ue.select, x.textarea = (ze = _.value) == null ? void 0 : ze.textarea, x.textareaStyle = (Se = _.value) == null ? void 0 : Se.textareaStyle, x.isComposing = (De = _.value) == null ? void 0 : De.isComposing);
1797
+ }), x.setInputValueMult = te, x.setInputByOutside = v, e(x), (w, b) => (S(), G(C(xe), le({
1798
+ ref_key: "inputRef",
1799
+ ref: _,
1800
+ modelValue: n.value,
1801
+ "onUpdate:modelValue": b[5] || (b[5] = (z) => n.value = z),
1802
+ modelModifiers: { trim: !0 }
1803
+ }, w.$attrs, {
1804
+ placeholder: "请输入内容",
1805
+ style: { width: t.width },
1806
+ class: "jc-input jc-input-complex search-input",
1807
+ size: t.size
1808
+ }), {
1809
+ prepend: F(() => [
1810
+ M(C(me), {
1811
+ ref: "selectRef",
1812
+ modelValue: a.value,
1813
+ "onUpdate:modelValue": b[0] || (b[0] = (z) => a.value = z),
1814
+ size: t.size,
1815
+ class: "select-field",
1816
+ onChange: k
1817
+ }, {
1818
+ prefix: F(() => [
1819
+ H(re((t.fieldList.find((z) => z.value === a.value) || {}).label), 1)
1820
+ ]),
1821
+ default: F(() => [
1822
+ (S(!0), N(pe, null, ge(t.fieldList, (z) => (S(), G(C(ye), {
1823
+ key: z.value,
1824
+ label: z.label,
1825
+ value: z.value
1826
+ }, null, 8, ["label", "value"]))), 128))
1827
+ ]),
1828
+ _: 1
1829
+ }, 8, ["modelValue", "size"])
1830
+ ]),
1831
+ suffix: F(() => [
1832
+ I("div", Ms, [
1833
+ ce(M(C(ae), {
1834
+ class: "el-input__icon",
1835
+ onClick: Y
1836
+ }, {
1837
+ default: F(() => [
1838
+ M(C(Ke))
1839
+ ]),
1840
+ _: 1
1841
+ }, 512), [
1842
+ [fe, n.value]
1843
+ ]),
1844
+ M(C(ae), {
1845
+ class: "el-input__icon",
1846
+ onClick: D
1847
+ }, {
1848
+ default: F(() => [
1849
+ M(C(ke))
1850
+ ]),
1851
+ _: 1
1852
+ }),
1853
+ M(C(qe), {
1854
+ visible: c.value,
1855
+ "onUpdate:visible": b[4] || (b[4] = (z) => c.value = z),
1856
+ placement: "bottom-end",
1857
+ width: "240",
1858
+ "show-arrow": !1,
1859
+ "popper-class": "jc-input-pop",
1860
+ trigger: "click"
1861
+ }, {
1862
+ reference: F(() => [
1863
+ M(C(ae), {
1864
+ class: "el-input__icon",
1865
+ title: "多项搜索",
1866
+ style: { "background-color": "#f0f2f5" },
1867
+ onClick: O
1868
+ }, {
1869
+ default: F(() => [
1870
+ M(C(xt))
1871
+ ]),
1872
+ _: 1
1873
+ })
1874
+ ]),
1875
+ default: F(() => [
1876
+ I("div", Bs, [
1877
+ M(C(xe), le({
1878
+ modelValue: h.value,
1879
+ "onUpdate:modelValue": b[1] || (b[1] = (z) => h.value = z),
1880
+ type: "textarea"
1881
+ }, w.$attrs, {
1882
+ size: t.size,
1883
+ placeholder: "一行一项",
1884
+ class: "popover-textarea",
1885
+ wrap: "off"
1886
+ }), null, 16, ["modelValue", "size"]),
1887
+ I("div", ks, [
1888
+ M(C(W), {
1889
+ size: t.size,
1890
+ onClick: b[2] || (b[2] = (z) => h.value = "")
1891
+ }, {
1892
+ default: F(() => b[6] || (b[6] = [
1893
+ H("清空")
1894
+ ])),
1895
+ _: 1,
1896
+ __: [6]
1897
+ }, 8, ["size"]),
1898
+ I("div", Is, [
1899
+ M(C(W), {
1900
+ size: t.size,
1901
+ link: "",
1902
+ type: "primary",
1903
+ onClick: j
1904
+ }, {
1905
+ default: F(() => b[7] || (b[7] = [
1906
+ H("关闭")
1907
+ ])),
1908
+ _: 1,
1909
+ __: [7]
1910
+ }, 8, ["size"]),
1911
+ M(C(W), {
1912
+ type: "primary",
1913
+ size: t.size,
1914
+ onClick: b[3] || (b[3] = (z) => $())
1915
+ }, {
1916
+ default: F(() => b[8] || (b[8] = [
1917
+ H("搜索")
1918
+ ])),
1919
+ _: 1,
1920
+ __: [8]
1921
+ }, 8, ["size"])
1922
+ ])
1923
+ ])
1924
+ ])
1925
+ ]),
1926
+ _: 1
1927
+ }, 8, ["visible"])
1928
+ ])
1929
+ ]),
1930
+ _: 1
1931
+ }, 16, ["modelValue", "style", "size"]));
1932
+ }
1933
+ }), Ss = (t) => (t.install = (e) => {
1934
+ const s = t.name;
1935
+ e.component(s, t);
1936
+ }, t), Ds = Ss(zs), Ls = { style: { display: "flex", "flex-wrap": "wrap", flex: "1", "flex-basis": "calc(100% - 50px)", "font-size": "12px", "margin-top": "4px" } }, $s = /* @__PURE__ */ q({
1937
+ name: "jc-tag-query",
1938
+ __name: "index",
1939
+ setup(t) {
1940
+ const { state: e, reduceTag: s, reduceAllTag: l } = oe();
1941
+ return (u, n) => (S(), N("div", Ls, [
1942
+ (S(!0), N(pe, null, ge(C(e).tags, (i, a) => (S(), G(C(rt), le({ ref_for: !0 }, u.$attrs, {
1943
+ key: i.label,
1944
+ closable: "",
1945
+ style: [{ height: "auto", "max-height": "26px", "white-space": "normal", "text-align": "left", "max-width": "1800px", overflow: "hidden", "word-break": "break-word", "text-overflow": "ellipsis" }, { marginLeft: a > 0 ? "4px" : "0px" }],
1946
+ onClose: (r) => C(s)(i, a)
1947
+ }), {
1948
+ default: F(() => [
1949
+ I("span", null, re(i.value), 1)
1950
+ ]),
1951
+ _: 2
1952
+ }, 1040, ["style", "onClose"]))), 128)),
1953
+ C(e).tags.length > 1 ? (S(), N("span", {
1954
+ key: 0,
1955
+ style: { "margin-left": "10px", "margin-top": "2px", display: "block" },
1956
+ onClick: n[0] || (n[0] = //@ts-ignore
1957
+ (...i) => C(l) && C(l)(...i))
1958
+ }, [
1959
+ M(C(ae), null, {
1960
+ default: F(() => [
1961
+ M(C(Ct))
1962
+ ]),
1963
+ _: 1
1964
+ })
1965
+ ])) : Ne("", !0)
1966
+ ]));
1967
+ }
1968
+ }), st = (t, e) => {
1969
+ const s = t.__vccOpts || t;
1970
+ for (const [l, u] of e)
1971
+ s[l] = u;
1972
+ return s;
1973
+ }, Vs = /* @__PURE__ */ st($s, [["__scopeId", "data-v-99c0d2b1"]]), js = (t) => (t.install = (e) => {
1974
+ const s = t.name;
1975
+ e.component(s, t);
1976
+ }, t), Rs = js(Vs), Os = { class: "popover-btn" }, Ts = { class: "popover-btn-right" }, Ns = /* @__PURE__ */ q({
1977
+ name: "jc-more-query-contain",
1978
+ __name: "index",
1979
+ props: {
1980
+ fieldList: {
1981
+ type: Array,
1982
+ require: !0,
1983
+ default: () => []
1984
+ },
1985
+ customTagObj: {
1986
+ type: Object,
1987
+ default: () => ({})
1988
+ },
1989
+ width: {
1990
+ type: Number,
1991
+ default: 400
1992
+ },
1993
+ size: {
1994
+ type: String,
1995
+ default: "default",
1996
+ validator: (t) => ["small", "default", "large"].includes(t)
1997
+ }
1998
+ },
1999
+ setup(t, { expose: e }) {
2000
+ const s = B(!1), l = B({}), u = t, { state: n, setQuery: i, addTag: a, reduceTag: r } = oe(), c = () => {
2001
+ s.value = !s.value, s.value && u.fieldList.forEach((d) => {
2002
+ l.value[d.value] = n.queryForm[d.value] || null;
2003
+ });
2004
+ }, o = () => {
2005
+ l.value = {}, u.fieldList.forEach((d) => {
2006
+ i(d.value, null), r({ label: d.value, value: "" });
2007
+ }), s.value = !1;
2008
+ }, p = (d, f) => {
2009
+ typeof l.value[d] == "string" || typeof l.value[d] == "number" ? a({
2010
+ label: d,
2011
+ value: `${f}:${L(u.customTagObj[d]) ? l.value[d] : u.customTagObj[d]}`
2012
+ }) : a({
2013
+ label: d,
2014
+ value: `${f}:${L(u.customTagObj[d]) ? l.value[d].join(",") : u.customTagObj[d]}`
2015
+ });
2016
+ }, h = () => {
2017
+ for (const d in l.value) {
2018
+ i(d, l.value[d] || null);
2019
+ const f = u.fieldList.find((m) => m.value === d);
2020
+ f === void 0 && Qe.warning("传入的fieldList和表单绑定的字段不匹配"), p(d, f.label);
2021
+ }
2022
+ s.value = !1;
2023
+ };
2024
+ J(
2025
+ u.fieldList.map((d) => () => n.queryForm[d.value]),
2026
+ () => {
2027
+ u.fieldList.forEach((d) => {
2028
+ l.value[d.value] = n.queryForm[d.value], L(n.queryForm[d.value]) ? r({ label: d.value, value: "" }) : p(d.value, d.label);
2029
+ });
2030
+ },
2031
+ {
2032
+ deep: !0
2033
+ }
2034
+ );
2035
+ const y = B(), g = ne({});
2036
+ return ie(() => {
2037
+ var d;
2038
+ y.value && (g.hide = (d = y.value) == null ? void 0 : d.hide);
2039
+ }), e(g), (d, f) => (S(), G(C(qe), le({
2040
+ ref_key: "popoverRef",
2041
+ ref: y
2042
+ }, d.$attrs, {
2043
+ visible: s.value,
2044
+ placement: "bottom",
2045
+ width: t.width,
2046
+ "show-arrow": !1,
2047
+ "popper-class": "moreQuery-pop",
2048
+ trigger: "click"
2049
+ }), {
2050
+ reference: F(() => [
2051
+ M(C(W), {
2052
+ size: t.size,
2053
+ icon: C(Et),
2054
+ onClick: c
2055
+ }, null, 8, ["size", "icon"])
2056
+ ]),
2057
+ default: F(() => [
2058
+ He(d.$slots, "default", { scopeForm: l.value }, void 0, !0),
2059
+ I("div", Os, [
2060
+ M(C(W), {
2061
+ size: t.size,
2062
+ onClick: o
2063
+ }, {
2064
+ default: F(() => f[1] || (f[1] = [
2065
+ H("清空")
2066
+ ])),
2067
+ _: 1,
2068
+ __: [1]
2069
+ }, 8, ["size"]),
2070
+ I("div", Ts, [
2071
+ M(C(W), {
2072
+ size: t.size,
2073
+ onClick: f[0] || (f[0] = (m) => s.value = !1)
2074
+ }, {
2075
+ default: F(() => f[2] || (f[2] = [
2076
+ H("关闭")
2077
+ ])),
2078
+ _: 1,
2079
+ __: [2]
2080
+ }, 8, ["size"]),
2081
+ M(C(W), {
2082
+ type: "primary",
2083
+ size: t.size,
2084
+ onClick: h
2085
+ }, {
2086
+ default: F(() => f[3] || (f[3] = [
2087
+ H("搜索")
2088
+ ])),
2089
+ _: 1,
2090
+ __: [3]
2091
+ }, 8, ["size"])
2092
+ ])
2093
+ ])
2094
+ ]),
2095
+ _: 3
2096
+ }, 16, ["visible", "width"]));
2097
+ }
2098
+ }), Ps = /* @__PURE__ */ st(Ns, [["__scopeId", "data-v-775b8567"]]), Hs = (t) => (t.install = (e) => {
2099
+ const s = t.name;
2100
+ e.component(s, t);
2101
+ }, t), qs = Hs(Ps), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2102
+ __proto__: null,
2103
+ JcDatePicker: _s,
2104
+ JcInputComplex: Ds,
2105
+ JcInputSwitch: Fs,
2106
+ JcMoreQueryContain: qs,
2107
+ JcSelectQuery: Cs,
2108
+ JcTagQuery: Rs
2109
+ }, Symbol.toStringTag, { value: "Module" })), ol = () => {
2110
+ const t = ne({ queryForm: {}, tags: [] }), { state: e, setQuery: s, addTag: l, reduceTag: u, reduceAllTag: n, clearQuery: i } = cs(t);
2111
+ return {
2112
+ queryForm: e.queryForm,
2113
+ setQuery: s,
2114
+ addTag: l,
2115
+ reduceTag: u,
2116
+ reduceAllTag: n,
2117
+ clearQuery: i
2118
+ };
2119
+ }, cl = {
2120
+ install: (t) => {
2121
+ for (const e of Object.values(Qs))
2122
+ t.use(e);
2123
+ }
2124
+ };
2125
+ export {
2126
+ _s as JcDatePicker,
2127
+ Ds as JcInputComplex,
2128
+ Fs as JcInputSwitch,
2129
+ qs as JcMoreQueryContain,
2130
+ Cs as JcSelectQuery,
2131
+ Rs as JcTagQuery,
2132
+ cl as default,
2133
+ ol as reactiveQuery
2134
+ };
2135
+ //# sourceMappingURL=index.mjs.map