@opengis/filter 0.0.4 → 0.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.
- package/dist/filter.js +209 -205
- package/dist/filter.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, createElementBlock as S, openBlock as b, createElementVNode as y, withModifiers as Zt, normalizeClass as $, createCommentVNode as _, toDisplayString as U, ref as O, computed as j, watch as M, onBeforeUnmount as ze, createStaticVNode as en, onMounted as
|
|
1
|
+
import { defineComponent as I, createElementBlock as S, openBlock as b, createElementVNode as y, withModifiers as Zt, normalizeClass as $, createCommentVNode as _, toDisplayString as U, ref as O, computed as j, watch as M, onBeforeUnmount as ze, createStaticVNode as en, onMounted as ce, withDirectives as H, isRef as gt, vModelText as ne, unref as h, Fragment as F, renderList as Y, createBlock as B, createVNode as J, createTextVNode as q, vShow as he, Teleport as bt, normalizeStyle as vt, renderSlot as Re, nextTick as Ke, withCtx as de, resolveDynamicComponent as ae, mergeProps as z, toRaw as te, cloneVNode as tn, useSlots as We } from "vue";
|
|
2
2
|
const nn = { class: "flex items-center w-full rounded-lg group hover:bg-gray-100" }, rn = { class: "flex items-center justify-between w-full text-sm" }, on = { class: "flex items-center cursor-pointer w-full" }, ln = {
|
|
3
3
|
key: 0,
|
|
4
4
|
width: "16",
|
|
@@ -66,9 +66,9 @@ function wt(e, t) {
|
|
|
66
66
|
const { toString: dn } = Object.prototype, { getPrototypeOf: Je } = Object, { iterator: _e, toStringTag: kt } = Symbol, Ae = /* @__PURE__ */ ((e) => (t) => {
|
|
67
67
|
const r = dn.call(t);
|
|
68
68
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
69
|
-
})(/* @__PURE__ */ Object.create(null)), Q = (e) => (e = e.toLowerCase(), (t) => Ae(t) === e), Oe = (e) => (t) => typeof t === e, { isArray:
|
|
69
|
+
})(/* @__PURE__ */ Object.create(null)), Q = (e) => (e = e.toLowerCase(), (t) => Ae(t) === e), Oe = (e) => (t) => typeof t === e, { isArray: fe } = Array, ye = Oe("undefined");
|
|
70
70
|
function ge(e) {
|
|
71
|
-
return e !== null && !
|
|
71
|
+
return e !== null && !ye(e) && e.constructor !== null && !ye(e.constructor) && K(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
72
72
|
}
|
|
73
73
|
const Ct = Q("ArrayBuffer");
|
|
74
74
|
function fn(e) {
|
|
@@ -97,7 +97,7 @@ function ve(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
|
97
97
|
if (e === null || typeof e > "u")
|
|
98
98
|
return;
|
|
99
99
|
let n, o;
|
|
100
|
-
if (typeof e != "object" && (e = [e]),
|
|
100
|
+
if (typeof e != "object" && (e = [e]), fe(e))
|
|
101
101
|
for (n = 0, o = e.length; n < o; n++)
|
|
102
102
|
t.call(null, e[n], n, e);
|
|
103
103
|
else {
|
|
@@ -120,11 +120,11 @@ function St(e, t) {
|
|
|
120
120
|
return o;
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
|
-
const le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (e) => !
|
|
123
|
+
const le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Et = (e) => !ye(e) && e !== le;
|
|
124
124
|
function Me() {
|
|
125
125
|
const { caseless: e } = Et(this) && this || {}, t = {}, r = (n, o) => {
|
|
126
126
|
const l = e && St(t, o) || o;
|
|
127
|
-
we(t[l]) && we(n) ? t[l] = Me(t[l], n) : we(n) ? t[l] = Me({}, n) :
|
|
127
|
+
we(t[l]) && we(n) ? t[l] = Me(t[l], n) : we(n) ? t[l] = Me({}, n) : fe(n) ? t[l] = n.slice() : t[l] = n;
|
|
128
128
|
};
|
|
129
129
|
for (let n = 0, o = arguments.length; n < o; n++)
|
|
130
130
|
arguments[n] && ve(arguments[n], r);
|
|
@@ -152,7 +152,7 @@ const An = (e, t, r, { allOwnKeys: n } = {}) => (ve(t, (o, l) => {
|
|
|
152
152
|
return n !== -1 && n === r;
|
|
153
153
|
}, $n = (e) => {
|
|
154
154
|
if (!e) return null;
|
|
155
|
-
if (
|
|
155
|
+
if (fe(e)) return e;
|
|
156
156
|
let t = e.length;
|
|
157
157
|
if (!Rt(t)) return null;
|
|
158
158
|
const r = new Array(t);
|
|
@@ -204,7 +204,7 @@ const An = (e, t, r, { allOwnKeys: n } = {}) => (ve(t, (o, l) => {
|
|
|
204
204
|
r[l] = !0;
|
|
205
205
|
});
|
|
206
206
|
};
|
|
207
|
-
return
|
|
207
|
+
return fe(e) ? n(e) : n(String(e).split(t)), r;
|
|
208
208
|
}, In = () => {
|
|
209
209
|
}, qn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
210
210
|
function Hn(e) {
|
|
@@ -219,10 +219,10 @@ const zn = (e) => {
|
|
|
219
219
|
return n;
|
|
220
220
|
if (!("toJSON" in n)) {
|
|
221
221
|
t[o] = n;
|
|
222
|
-
const l =
|
|
222
|
+
const l = fe(n) ? [] : {};
|
|
223
223
|
return ve(n, (s, u) => {
|
|
224
224
|
const a = r(s, o + 1);
|
|
225
|
-
!
|
|
225
|
+
!ye(a) && (l[u] = a);
|
|
226
226
|
}), t[o] = void 0, l;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
@@ -237,7 +237,7 @@ const zn = (e) => {
|
|
|
237
237
|
typeof setImmediate == "function",
|
|
238
238
|
K(le.postMessage)
|
|
239
239
|
), Jn = typeof queueMicrotask < "u" ? queueMicrotask.bind(le) : typeof process < "u" && process.nextTick || At, Yn = (e) => e != null && K(e[_e]), p = {
|
|
240
|
-
isArray:
|
|
240
|
+
isArray: fe,
|
|
241
241
|
isArrayBuffer: Ct,
|
|
242
242
|
isBuffer: ge,
|
|
243
243
|
isFormData: wn,
|
|
@@ -252,7 +252,7 @@ const zn = (e) => {
|
|
|
252
252
|
isRequest: Rn,
|
|
253
253
|
isResponse: Sn,
|
|
254
254
|
isHeaders: En,
|
|
255
|
-
isUndefined:
|
|
255
|
+
isUndefined: ye,
|
|
256
256
|
isDate: yn,
|
|
257
257
|
isFile: gn,
|
|
258
258
|
isBlob: bn,
|
|
@@ -371,55 +371,55 @@ function Te(e, t, r) {
|
|
|
371
371
|
metaTokens: !0,
|
|
372
372
|
dots: !1,
|
|
373
373
|
indexes: !1
|
|
374
|
-
}, !1, function(
|
|
375
|
-
return !p.isUndefined(
|
|
374
|
+
}, !1, function(v, C) {
|
|
375
|
+
return !p.isUndefined(C[v]);
|
|
376
376
|
});
|
|
377
377
|
const n = r.metaTokens, o = r.visitor || c, l = r.dots, s = r.indexes, a = (r.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(t);
|
|
378
378
|
if (!p.isFunction(o))
|
|
379
379
|
throw new TypeError("visitor must be a function");
|
|
380
|
-
function d(
|
|
381
|
-
if (
|
|
382
|
-
if (p.isDate(
|
|
383
|
-
return
|
|
384
|
-
if (p.isBoolean(
|
|
385
|
-
return
|
|
386
|
-
if (!a && p.isBlob(
|
|
380
|
+
function d(R) {
|
|
381
|
+
if (R === null) return "";
|
|
382
|
+
if (p.isDate(R))
|
|
383
|
+
return R.toISOString();
|
|
384
|
+
if (p.isBoolean(R))
|
|
385
|
+
return R.toString();
|
|
386
|
+
if (!a && p.isBlob(R))
|
|
387
387
|
throw new A("Blob is not supported. Use a Buffer instead.");
|
|
388
|
-
return p.isArrayBuffer(
|
|
389
|
-
}
|
|
390
|
-
function c(v, C
|
|
391
|
-
let T =
|
|
392
|
-
if (
|
|
393
|
-
if (p.endsWith(
|
|
394
|
-
|
|
395
|
-
else if (p.isArray(
|
|
396
|
-
return
|
|
388
|
+
return p.isArrayBuffer(R) || p.isTypedArray(R) ? a && typeof Blob == "function" ? new Blob([R]) : Buffer.from(R) : R;
|
|
389
|
+
}
|
|
390
|
+
function c(R, v, C) {
|
|
391
|
+
let T = R;
|
|
392
|
+
if (R && !C && typeof R == "object") {
|
|
393
|
+
if (p.endsWith(v, "{}"))
|
|
394
|
+
v = n ? v : v.slice(0, -2), R = JSON.stringify(R);
|
|
395
|
+
else if (p.isArray(R) && Gn(R) || (p.isFileList(R) || p.endsWith(v, "[]")) && (T = p.toArray(R)))
|
|
396
|
+
return v = Vt(v), T.forEach(function(w, g) {
|
|
397
397
|
!(p.isUndefined(w) || w === null) && t.append(
|
|
398
398
|
// eslint-disable-next-line no-nested-ternary
|
|
399
|
-
s === !0 ? tt([
|
|
399
|
+
s === !0 ? tt([v], g, l) : s === null ? v : v + "[]",
|
|
400
400
|
d(w)
|
|
401
401
|
);
|
|
402
402
|
}), !1;
|
|
403
403
|
}
|
|
404
|
-
return Le(
|
|
404
|
+
return Le(R) ? !0 : (t.append(tt(C, v, l), d(R)), !1);
|
|
405
405
|
}
|
|
406
406
|
const i = [], m = Object.assign(Xn, {
|
|
407
407
|
defaultVisitor: c,
|
|
408
408
|
convertValue: d,
|
|
409
409
|
isVisitable: Le
|
|
410
410
|
});
|
|
411
|
-
function E(
|
|
412
|
-
if (!p.isUndefined(
|
|
413
|
-
if (i.indexOf(
|
|
414
|
-
throw Error("Circular reference detected in " +
|
|
415
|
-
i.push(
|
|
411
|
+
function E(R, v) {
|
|
412
|
+
if (!p.isUndefined(R)) {
|
|
413
|
+
if (i.indexOf(R) !== -1)
|
|
414
|
+
throw Error("Circular reference detected in " + v.join("."));
|
|
415
|
+
i.push(R), p.forEach(R, function(T, k) {
|
|
416
416
|
(!(p.isUndefined(T) || T === null) && o.call(
|
|
417
417
|
t,
|
|
418
418
|
T,
|
|
419
419
|
p.isString(k) ? k.trim() : k,
|
|
420
|
-
|
|
420
|
+
v,
|
|
421
421
|
m
|
|
422
|
-
)) === !0 && E(T,
|
|
422
|
+
)) === !0 && E(T, v ? v.concat(k) : [k]);
|
|
423
423
|
}), i.pop();
|
|
424
424
|
}
|
|
425
425
|
}
|
|
@@ -692,7 +692,7 @@ const fr = p.toObjectSet([
|
|
|
692
692
|
o = s.indexOf(":"), r = s.substring(0, o).trim().toLowerCase(), n = s.substring(o + 1).trim(), !(!r || t[r] && fr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
693
693
|
}), t;
|
|
694
694
|
}, ot = Symbol("internals");
|
|
695
|
-
function
|
|
695
|
+
function me(e) {
|
|
696
696
|
return e && String(e).trim().toLowerCase();
|
|
697
697
|
}
|
|
698
698
|
function ke(e) {
|
|
@@ -737,7 +737,7 @@ let W = class {
|
|
|
737
737
|
set(t, r, n) {
|
|
738
738
|
const o = this;
|
|
739
739
|
function l(u, a, d) {
|
|
740
|
-
const c =
|
|
740
|
+
const c = me(a);
|
|
741
741
|
if (!c)
|
|
742
742
|
throw new Error("header name must be a non-empty string");
|
|
743
743
|
const i = p.findKey(o, c);
|
|
@@ -761,7 +761,7 @@ let W = class {
|
|
|
761
761
|
return this;
|
|
762
762
|
}
|
|
763
763
|
get(t, r) {
|
|
764
|
-
if (t =
|
|
764
|
+
if (t = me(t), t) {
|
|
765
765
|
const n = p.findKey(this, t);
|
|
766
766
|
if (n) {
|
|
767
767
|
const o = this[n];
|
|
@@ -778,7 +778,7 @@ let W = class {
|
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
has(t, r) {
|
|
781
|
-
if (t =
|
|
781
|
+
if (t = me(t), t) {
|
|
782
782
|
const n = p.findKey(this, t);
|
|
783
783
|
return !!(n && this[n] !== void 0 && (!r || De(this, this[n], n, r)));
|
|
784
784
|
}
|
|
@@ -788,7 +788,7 @@ let W = class {
|
|
|
788
788
|
const n = this;
|
|
789
789
|
let o = !1;
|
|
790
790
|
function l(s) {
|
|
791
|
-
if (s =
|
|
791
|
+
if (s = me(s), s) {
|
|
792
792
|
const u = p.findKey(n, s);
|
|
793
793
|
u && (!r || De(n, n[u], u, r)) && (delete n[u], o = !0);
|
|
794
794
|
}
|
|
@@ -850,7 +850,7 @@ let W = class {
|
|
|
850
850
|
accessors: {}
|
|
851
851
|
}).accessors, o = this.prototype;
|
|
852
852
|
function l(s) {
|
|
853
|
-
const u =
|
|
853
|
+
const u = me(s);
|
|
854
854
|
n[u] || (gr(o, s), n[u] = !0);
|
|
855
855
|
}
|
|
856
856
|
return p.isArray(t) ? t.forEach(l) : l(t), this;
|
|
@@ -877,10 +877,10 @@ function Fe(e, t) {
|
|
|
877
877
|
function Nt(e) {
|
|
878
878
|
return !!(e && e.__CANCEL__);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function pe(e, t, r) {
|
|
881
881
|
A.call(this, e ?? "canceled", A.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
882
882
|
}
|
|
883
|
-
p.inherits(
|
|
883
|
+
p.inherits(pe, A, {
|
|
884
884
|
__CANCEL__: !0
|
|
885
885
|
});
|
|
886
886
|
function Mt(e, t, r) {
|
|
@@ -1082,57 +1082,57 @@ const jt = (e) => {
|
|
|
1082
1082
|
const o = jt(e);
|
|
1083
1083
|
let l = o.data;
|
|
1084
1084
|
const s = W.from(o.headers).normalize();
|
|
1085
|
-
let { responseType: u, onUploadProgress: a, onDownloadProgress: d } = o, c, i, m, E,
|
|
1086
|
-
function
|
|
1087
|
-
E && E(),
|
|
1085
|
+
let { responseType: u, onUploadProgress: a, onDownloadProgress: d } = o, c, i, m, E, R;
|
|
1086
|
+
function v() {
|
|
1087
|
+
E && E(), R && R(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
1088
1088
|
}
|
|
1089
|
-
let
|
|
1090
|
-
|
|
1089
|
+
let C = new XMLHttpRequest();
|
|
1090
|
+
C.open(o.method.toUpperCase(), o.url, !0), C.timeout = o.timeout;
|
|
1091
1091
|
function T() {
|
|
1092
|
-
if (!
|
|
1092
|
+
if (!C)
|
|
1093
1093
|
return;
|
|
1094
1094
|
const w = W.from(
|
|
1095
|
-
"getAllResponseHeaders" in
|
|
1095
|
+
"getAllResponseHeaders" in C && C.getAllResponseHeaders()
|
|
1096
1096
|
), f = {
|
|
1097
|
-
data: !u || u === "text" || u === "json" ?
|
|
1098
|
-
status:
|
|
1099
|
-
statusText:
|
|
1097
|
+
data: !u || u === "text" || u === "json" ? C.responseText : C.response,
|
|
1098
|
+
status: C.status,
|
|
1099
|
+
statusText: C.statusText,
|
|
1100
1100
|
headers: w,
|
|
1101
1101
|
config: e,
|
|
1102
|
-
request:
|
|
1102
|
+
request: C
|
|
1103
1103
|
};
|
|
1104
1104
|
Mt(function(D) {
|
|
1105
|
-
r(D),
|
|
1105
|
+
r(D), v();
|
|
1106
1106
|
}, function(D) {
|
|
1107
|
-
n(D),
|
|
1108
|
-
}, f),
|
|
1109
|
-
}
|
|
1110
|
-
"onloadend" in
|
|
1111
|
-
!
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1115
|
-
n(new A("Network Error", A.ERR_NETWORK, e,
|
|
1116
|
-
},
|
|
1107
|
+
n(D), v();
|
|
1108
|
+
}, f), C = null;
|
|
1109
|
+
}
|
|
1110
|
+
"onloadend" in C ? C.onloadend = T : C.onreadystatechange = function() {
|
|
1111
|
+
!C || C.readyState !== 4 || C.status === 0 && !(C.responseURL && C.responseURL.indexOf("file:") === 0) || setTimeout(T);
|
|
1112
|
+
}, C.onabort = function() {
|
|
1113
|
+
C && (n(new A("Request aborted", A.ECONNABORTED, e, C)), C = null);
|
|
1114
|
+
}, C.onerror = function() {
|
|
1115
|
+
n(new A("Network Error", A.ERR_NETWORK, e, C)), C = null;
|
|
1116
|
+
}, C.ontimeout = function() {
|
|
1117
1117
|
let g = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1118
1118
|
const f = o.transitional || Dt;
|
|
1119
1119
|
o.timeoutErrorMessage && (g = o.timeoutErrorMessage), n(new A(
|
|
1120
1120
|
g,
|
|
1121
1121
|
f.clarifyTimeoutError ? A.ETIMEDOUT : A.ECONNABORTED,
|
|
1122
1122
|
e,
|
|
1123
|
-
|
|
1124
|
-
)),
|
|
1125
|
-
}, l === void 0 && s.setContentType(null), "setRequestHeader" in
|
|
1126
|
-
|
|
1127
|
-
}), p.isUndefined(o.withCredentials) || (
|
|
1128
|
-
|
|
1123
|
+
C
|
|
1124
|
+
)), C = null;
|
|
1125
|
+
}, l === void 0 && s.setContentType(null), "setRequestHeader" in C && p.forEach(s.toJSON(), function(g, f) {
|
|
1126
|
+
C.setRequestHeader(f, g);
|
|
1127
|
+
}), p.isUndefined(o.withCredentials) || (C.withCredentials = !!o.withCredentials), u && u !== "json" && (C.responseType = o.responseType), d && ([m, R] = Se(d, !0), C.addEventListener("progress", m)), a && C.upload && ([i, E] = Se(a), C.upload.addEventListener("progress", i), C.upload.addEventListener("loadend", E)), (o.cancelToken || o.signal) && (c = (w) => {
|
|
1128
|
+
C && (n(!w || w.type ? new pe(null, e, C) : w), C.abort(), C = null);
|
|
1129
1129
|
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
1130
1130
|
const k = br(o.url);
|
|
1131
1131
|
if (k && P.protocols.indexOf(k) === -1) {
|
|
1132
1132
|
n(new A("Unsupported protocol " + k + ":", A.ERR_BAD_REQUEST, e));
|
|
1133
1133
|
return;
|
|
1134
1134
|
}
|
|
1135
|
-
|
|
1135
|
+
C.send(l || null);
|
|
1136
1136
|
});
|
|
1137
1137
|
}, _r = (e, t) => {
|
|
1138
1138
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
@@ -1142,7 +1142,7 @@ const jt = (e) => {
|
|
|
1142
1142
|
if (!o) {
|
|
1143
1143
|
o = !0, u();
|
|
1144
1144
|
const c = d instanceof Error ? d : this.reason;
|
|
1145
|
-
n.abort(c instanceof A ? c : new
|
|
1145
|
+
n.abort(c instanceof A ? c : new pe(c instanceof Error ? c.message : c));
|
|
1146
1146
|
}
|
|
1147
1147
|
};
|
|
1148
1148
|
let s = t && setTimeout(() => {
|
|
@@ -1273,13 +1273,13 @@ const $r = async (e) => {
|
|
|
1273
1273
|
fetchOptions: m
|
|
1274
1274
|
} = jt(e);
|
|
1275
1275
|
d = d ? (d + "").toLowerCase() : "text";
|
|
1276
|
-
let E = _r([o, l && l.toAbortSignal()], s),
|
|
1277
|
-
const
|
|
1276
|
+
let E = _r([o, l && l.toAbortSignal()], s), R;
|
|
1277
|
+
const v = E && E.unsubscribe && (() => {
|
|
1278
1278
|
E.unsubscribe();
|
|
1279
1279
|
});
|
|
1280
|
-
let
|
|
1280
|
+
let C;
|
|
1281
1281
|
try {
|
|
1282
|
-
if (a && Br && r !== "get" && r !== "head" && (
|
|
1282
|
+
if (a && Br && r !== "get" && r !== "head" && (C = await Dr(c, n)) !== 0) {
|
|
1283
1283
|
let f = new Request(t, {
|
|
1284
1284
|
method: "POST",
|
|
1285
1285
|
body: n,
|
|
@@ -1287,7 +1287,7 @@ const $r = async (e) => {
|
|
|
1287
1287
|
}), x;
|
|
1288
1288
|
if (p.isFormData(n) && (x = f.headers.get("content-type")) && c.setContentType(x), f.body) {
|
|
1289
1289
|
const [D, ee] = lt(
|
|
1290
|
-
|
|
1290
|
+
C,
|
|
1291
1291
|
Se(st(a))
|
|
1292
1292
|
);
|
|
1293
1293
|
n = it(f.body, ut, D, ee);
|
|
@@ -1295,7 +1295,7 @@ const $r = async (e) => {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
p.isString(i) || (i = i ? "include" : "omit");
|
|
1297
1297
|
const T = "credentials" in Request.prototype;
|
|
1298
|
-
|
|
1298
|
+
R = new Request(t, {
|
|
1299
1299
|
...m,
|
|
1300
1300
|
signal: E,
|
|
1301
1301
|
method: r.toUpperCase(),
|
|
@@ -1304,9 +1304,9 @@ const $r = async (e) => {
|
|
|
1304
1304
|
duplex: "half",
|
|
1305
1305
|
credentials: T ? i : void 0
|
|
1306
1306
|
});
|
|
1307
|
-
let k = await fetch(
|
|
1307
|
+
let k = await fetch(R, m);
|
|
1308
1308
|
const w = Ue && (d === "stream" || d === "response");
|
|
1309
|
-
if (Ue && (u || w &&
|
|
1309
|
+
if (Ue && (u || w && v)) {
|
|
1310
1310
|
const f = {};
|
|
1311
1311
|
["status", "statusText", "headers"].forEach((V) => {
|
|
1312
1312
|
f[V] = k[V];
|
|
@@ -1317,30 +1317,30 @@ const $r = async (e) => {
|
|
|
1317
1317
|
) || [];
|
|
1318
1318
|
k = new Response(
|
|
1319
1319
|
it(k.body, ut, D, () => {
|
|
1320
|
-
ee && ee(),
|
|
1320
|
+
ee && ee(), v && v();
|
|
1321
1321
|
}),
|
|
1322
1322
|
f
|
|
1323
1323
|
);
|
|
1324
1324
|
}
|
|
1325
1325
|
d = d || "text";
|
|
1326
1326
|
let g = await Ee[p.findKey(Ee, d) || "text"](k, e);
|
|
1327
|
-
return !w &&
|
|
1327
|
+
return !w && v && v(), await new Promise((f, x) => {
|
|
1328
1328
|
Mt(f, x, {
|
|
1329
1329
|
data: g,
|
|
1330
1330
|
headers: W.from(k.headers),
|
|
1331
1331
|
status: k.status,
|
|
1332
1332
|
statusText: k.statusText,
|
|
1333
1333
|
config: e,
|
|
1334
|
-
request:
|
|
1334
|
+
request: R
|
|
1335
1335
|
});
|
|
1336
1336
|
});
|
|
1337
1337
|
} catch (T) {
|
|
1338
|
-
throw
|
|
1339
|
-
new A("Network Error", A.ERR_NETWORK, e,
|
|
1338
|
+
throw v && v(), T && T.name === "TypeError" && /Load failed|fetch/i.test(T.message) ? Object.assign(
|
|
1339
|
+
new A("Network Error", A.ERR_NETWORK, e, R),
|
|
1340
1340
|
{
|
|
1341
1341
|
cause: T.cause || T
|
|
1342
1342
|
}
|
|
1343
|
-
) : A.from(T, T && T.code, e,
|
|
1343
|
+
) : A.from(T, T && T.code, e, R);
|
|
1344
1344
|
}
|
|
1345
1345
|
}), Pe = {
|
|
1346
1346
|
http: Qn,
|
|
@@ -1389,7 +1389,7 @@ const ct = (e) => `- ${e}`, Nr = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1389
1389
|
};
|
|
1390
1390
|
function Ne(e) {
|
|
1391
1391
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1392
|
-
throw new
|
|
1392
|
+
throw new pe(null, e);
|
|
1393
1393
|
}
|
|
1394
1394
|
function dt(e) {
|
|
1395
1395
|
return Ne(e), e.headers = W.from(e.headers), e.data = Fe.call(
|
|
@@ -1512,41 +1512,41 @@ let se = class {
|
|
|
1512
1512
|
);
|
|
1513
1513
|
l && p.forEach(
|
|
1514
1514
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1515
|
-
(
|
|
1516
|
-
delete l[
|
|
1515
|
+
(R) => {
|
|
1516
|
+
delete l[R];
|
|
1517
1517
|
}
|
|
1518
1518
|
), r.headers = W.concat(s, l);
|
|
1519
1519
|
const u = [];
|
|
1520
1520
|
let a = !0;
|
|
1521
|
-
this.interceptors.request.forEach(function(
|
|
1522
|
-
typeof
|
|
1521
|
+
this.interceptors.request.forEach(function(v) {
|
|
1522
|
+
typeof v.runWhen == "function" && v.runWhen(r) === !1 || (a = a && v.synchronous, u.unshift(v.fulfilled, v.rejected));
|
|
1523
1523
|
});
|
|
1524
1524
|
const d = [];
|
|
1525
|
-
this.interceptors.response.forEach(function(
|
|
1526
|
-
d.push(
|
|
1525
|
+
this.interceptors.response.forEach(function(v) {
|
|
1526
|
+
d.push(v.fulfilled, v.rejected);
|
|
1527
1527
|
});
|
|
1528
1528
|
let c, i = 0, m;
|
|
1529
1529
|
if (!a) {
|
|
1530
|
-
const
|
|
1531
|
-
for (
|
|
1532
|
-
c = c.then(
|
|
1530
|
+
const R = [dt.bind(this), void 0];
|
|
1531
|
+
for (R.unshift(...u), R.push(...d), m = R.length, c = Promise.resolve(r); i < m; )
|
|
1532
|
+
c = c.then(R[i++], R[i++]);
|
|
1533
1533
|
return c;
|
|
1534
1534
|
}
|
|
1535
1535
|
m = u.length;
|
|
1536
1536
|
let E = r;
|
|
1537
1537
|
for (i = 0; i < m; ) {
|
|
1538
|
-
const
|
|
1538
|
+
const R = u[i++], v = u[i++];
|
|
1539
1539
|
try {
|
|
1540
|
-
E =
|
|
1541
|
-
} catch (
|
|
1542
|
-
|
|
1540
|
+
E = R(E);
|
|
1541
|
+
} catch (C) {
|
|
1542
|
+
v.call(this, C);
|
|
1543
1543
|
break;
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
try {
|
|
1547
1547
|
c = dt.call(this, E);
|
|
1548
|
-
} catch (
|
|
1549
|
-
return Promise.reject(
|
|
1548
|
+
} catch (R) {
|
|
1549
|
+
return Promise.reject(R);
|
|
1550
1550
|
}
|
|
1551
1551
|
for (i = 0, m = d.length; i < m; )
|
|
1552
1552
|
c = c.then(d[i++], d[i++]);
|
|
@@ -1606,7 +1606,7 @@ let Lr = class Ht {
|
|
|
1606
1606
|
n.unsubscribe(l);
|
|
1607
1607
|
}, s;
|
|
1608
1608
|
}, t(function(l, s, u) {
|
|
1609
|
-
n.reason || (n.reason = new
|
|
1609
|
+
n.reason || (n.reason = new pe(l, s, u), r(n.reason));
|
|
1610
1610
|
});
|
|
1611
1611
|
}
|
|
1612
1612
|
/**
|
|
@@ -1739,7 +1739,7 @@ function zt(e) {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
const L = zt(xe);
|
|
1741
1741
|
L.Axios = se;
|
|
1742
|
-
L.CanceledError =
|
|
1742
|
+
L.CanceledError = pe;
|
|
1743
1743
|
L.CancelToken = Lr;
|
|
1744
1744
|
L.isCancel = Nt;
|
|
1745
1745
|
L.VERSION = qt;
|
|
@@ -1785,13 +1785,13 @@ function Kt(e, t) {
|
|
|
1785
1785
|
function u(V) {
|
|
1786
1786
|
return s ? Array.isArray(V) ? V : V ? [V] : [] : V ?? "";
|
|
1787
1787
|
}
|
|
1788
|
-
const a = O(u(e.modelValue)), d = O(""), c = O(!1), i = O([]), m = O("id"), E = O("text"),
|
|
1789
|
-
function
|
|
1788
|
+
const a = O(u(e.modelValue)), d = O(""), c = O(!1), i = O([]), m = O("id"), E = O("text"), R = O(!1), v = O(e.layout !== "popover" && n.length > o);
|
|
1789
|
+
function C(V) {
|
|
1790
1790
|
const G = V.find(Boolean) ?? {}, re = ["id", "value", "code", "key"].find(($e) => $e in G) ?? "id", Xt = ["text", "label", "name", "title"].find(($e) => $e in G) ?? "text";
|
|
1791
1791
|
return { autoValueKey: re, autoLabelKey: Xt };
|
|
1792
1792
|
}
|
|
1793
1793
|
if (n.length > 0) {
|
|
1794
|
-
const V =
|
|
1794
|
+
const V = C(n);
|
|
1795
1795
|
m.value = V.autoValueKey, E.value = V.autoLabelKey;
|
|
1796
1796
|
}
|
|
1797
1797
|
const T = j(() => {
|
|
@@ -1799,7 +1799,7 @@ function Kt(e, t) {
|
|
|
1799
1799
|
const V = i.value;
|
|
1800
1800
|
if (e.layout === "popover") return V;
|
|
1801
1801
|
if (!d.value)
|
|
1802
|
-
return
|
|
1802
|
+
return R.value ? V : V.slice(0, o);
|
|
1803
1803
|
const G = d.value.toLowerCase();
|
|
1804
1804
|
return V.filter((re) => re[E.value].toLowerCase().includes(G));
|
|
1805
1805
|
});
|
|
@@ -1816,7 +1816,7 @@ function Kt(e, t) {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
});
|
|
1818
1818
|
if (i.value = G.data[l], i.value.length > 0) {
|
|
1819
|
-
const re =
|
|
1819
|
+
const re = C(i.value);
|
|
1820
1820
|
m.value = re.autoValueKey, E.value = re.autoLabelKey;
|
|
1821
1821
|
}
|
|
1822
1822
|
} catch (G) {
|
|
@@ -1848,10 +1848,10 @@ function Kt(e, t) {
|
|
|
1848
1848
|
s ? a.value = [] : a.value = void 0, t("update:modelValue", a.value), t("clear", e.name);
|
|
1849
1849
|
}
|
|
1850
1850
|
function D() {
|
|
1851
|
-
k && clearTimeout(k), d.value = "",
|
|
1851
|
+
k && clearTimeout(k), d.value = "", R.value = !1;
|
|
1852
1852
|
}
|
|
1853
1853
|
function ee() {
|
|
1854
|
-
|
|
1854
|
+
R.value = !R.value;
|
|
1855
1855
|
}
|
|
1856
1856
|
return ze(() => {
|
|
1857
1857
|
k && clearTimeout(k);
|
|
@@ -1865,8 +1865,8 @@ function Kt(e, t) {
|
|
|
1865
1865
|
resetSearch: D,
|
|
1866
1866
|
toggleShowAll: ee,
|
|
1867
1867
|
isReqProc: c,
|
|
1868
|
-
showAll:
|
|
1869
|
-
isEnableShowAll:
|
|
1868
|
+
showAll: R,
|
|
1869
|
+
isEnableShowAll: v,
|
|
1870
1870
|
labelKey: E,
|
|
1871
1871
|
valueKey: m,
|
|
1872
1872
|
allOptions: i
|
|
@@ -1979,9 +1979,9 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
1979
1979
|
clear: i,
|
|
1980
1980
|
resetSearch: m,
|
|
1981
1981
|
toggleShowAll: E,
|
|
1982
|
-
isReqProc:
|
|
1983
|
-
showAll:
|
|
1984
|
-
isEnableShowAll:
|
|
1982
|
+
isReqProc: R,
|
|
1983
|
+
showAll: v,
|
|
1984
|
+
isEnableShowAll: C,
|
|
1985
1985
|
labelKey: T,
|
|
1986
1986
|
valueKey: k,
|
|
1987
1987
|
allOptions: w
|
|
@@ -1989,7 +1989,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
1989
1989
|
...n,
|
|
1990
1990
|
modelValue: n.modelValue ?? n.default ?? ""
|
|
1991
1991
|
}, l);
|
|
1992
|
-
return
|
|
1992
|
+
return ce(() => {
|
|
1993
1993
|
m();
|
|
1994
1994
|
}), t({
|
|
1995
1995
|
clear: i,
|
|
@@ -2073,7 +2073,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2073
2073
|
onItemClick: (D) => h(c)(x)
|
|
2074
2074
|
}, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
|
|
2075
2075
|
], 2),
|
|
2076
|
-
g.type === "select" && h(a).length === 0 && !h(
|
|
2076
|
+
g.type === "select" && h(a).length === 0 && !h(R) ? (b(), S("div", Gr, [
|
|
2077
2077
|
y("div", Xr, [
|
|
2078
2078
|
J(Wt),
|
|
2079
2079
|
f[8] || (f[8] = y("div", { class: "max-w-sm mx-auto mt-6" }, [
|
|
@@ -2083,7 +2083,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2083
2083
|
])
|
|
2084
2084
|
])) : _("", !0),
|
|
2085
2085
|
g.layout !== "popover" && g.type !== "select" ? (b(), S(F, { key: 2 }, [
|
|
2086
|
-
!h(
|
|
2086
|
+
!h(v) && h(C) ? (b(), S("div", {
|
|
2087
2087
|
key: 0,
|
|
2088
2088
|
onClick: f[2] || (f[2] = //@ts-ignore
|
|
2089
2089
|
(...x) => h(E) && h(E)(...x)),
|
|
@@ -2092,7 +2092,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2092
2092
|
f[9] || (f[9] = q(" Показати більше ")),
|
|
2093
2093
|
J(Ge)
|
|
2094
2094
|
])) : _("", !0),
|
|
2095
|
-
h(
|
|
2095
|
+
h(v) ? (b(), S("div", {
|
|
2096
2096
|
key: 1,
|
|
2097
2097
|
onClick: f[3] || (f[3] = //@ts-ignore
|
|
2098
2098
|
(...x) => h(E) && h(E)(...x)),
|
|
@@ -2110,7 +2110,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2110
2110
|
onClick: f[4] || (f[4] = //@ts-ignore
|
|
2111
2111
|
(...x) => h(i) && h(i)(...x))
|
|
2112
2112
|
}, " Очистити ", 512), [
|
|
2113
|
-
[
|
|
2113
|
+
[he, h(s) !== "" && h(s) !== void 0]
|
|
2114
2114
|
])
|
|
2115
2115
|
])) : _("", !0),
|
|
2116
2116
|
g.layout === "popover" ? (b(), S("div", eo, [
|
|
@@ -2120,7 +2120,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2120
2120
|
onClick: f[5] || (f[5] = //@ts-ignore
|
|
2121
2121
|
(...x) => h(i) && h(i)(...x))
|
|
2122
2122
|
}, " Очистити ", 512), [
|
|
2123
|
-
[
|
|
2123
|
+
[he, h(s) !== "" && h(s) !== void 0]
|
|
2124
2124
|
])
|
|
2125
2125
|
])) : _("", !0)
|
|
2126
2126
|
], 64)) : _("", !0)
|
|
@@ -2173,9 +2173,9 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2173
2173
|
resetSearch: i,
|
|
2174
2174
|
toggleShowAll: m,
|
|
2175
2175
|
isReqProc: E,
|
|
2176
|
-
showAll:
|
|
2177
|
-
isEnableShowAll:
|
|
2178
|
-
searchTerm:
|
|
2176
|
+
showAll: R,
|
|
2177
|
+
isEnableShowAll: v,
|
|
2178
|
+
searchTerm: C,
|
|
2179
2179
|
labelKey: T,
|
|
2180
2180
|
valueKey: k,
|
|
2181
2181
|
allOptions: w
|
|
@@ -2184,7 +2184,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2184
2184
|
type: "checkbox",
|
|
2185
2185
|
modelValue: n.modelValue
|
|
2186
2186
|
}, o);
|
|
2187
|
-
return
|
|
2187
|
+
return ce(() => {
|
|
2188
2188
|
i();
|
|
2189
2189
|
}), M(
|
|
2190
2190
|
() => n.modelValue,
|
|
@@ -2199,14 +2199,14 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2199
2199
|
}, [
|
|
2200
2200
|
g.type === "select" ? (b(), S("div", to, [
|
|
2201
2201
|
H(y("input", {
|
|
2202
|
-
"onUpdate:modelValue": f[0] || (f[0] = (x) => gt(
|
|
2202
|
+
"onUpdate:modelValue": f[0] || (f[0] = (x) => gt(C) ? C.value = x : null),
|
|
2203
2203
|
class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
|
|
2204
2204
|
placeholder: "Пошук",
|
|
2205
2205
|
type: "text",
|
|
2206
2206
|
ref_key: "inputTextRef",
|
|
2207
2207
|
ref: l
|
|
2208
2208
|
}, null, 512), [
|
|
2209
|
-
[ne, h(
|
|
2209
|
+
[ne, h(C)]
|
|
2210
2210
|
]),
|
|
2211
2211
|
f[7] || (f[7] = y("svg", {
|
|
2212
2212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2229,7 +2229,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2229
2229
|
y("path", { d: "M21 21l-6 -6" })
|
|
2230
2230
|
], -1)),
|
|
2231
2231
|
(b(), S("svg", {
|
|
2232
|
-
onClick: f[1] || (f[1] = (x) =>
|
|
2232
|
+
onClick: f[1] || (f[1] = (x) => C.value = ""),
|
|
2233
2233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2234
2234
|
viewBox: "0 0 24 24",
|
|
2235
2235
|
fill: "none",
|
|
@@ -2277,7 +2277,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2277
2277
|
])
|
|
2278
2278
|
])) : _("", !0),
|
|
2279
2279
|
g.layout !== "popover" && g.type !== "select" ? (b(), S(F, { key: 2 }, [
|
|
2280
|
-
!h(
|
|
2280
|
+
!h(R) && h(v) ? (b(), S("div", {
|
|
2281
2281
|
key: 0,
|
|
2282
2282
|
onClick: f[2] || (f[2] = //@ts-ignore
|
|
2283
2283
|
(...x) => h(m) && h(m)(...x)),
|
|
@@ -2286,7 +2286,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2286
2286
|
f[9] || (f[9] = q(" Показати більше ")),
|
|
2287
2287
|
J(Ge)
|
|
2288
2288
|
])) : _("", !0),
|
|
2289
|
-
h(
|
|
2289
|
+
h(R) ? (b(), S("div", {
|
|
2290
2290
|
key: 1,
|
|
2291
2291
|
onClick: f[3] || (f[3] = //@ts-ignore
|
|
2292
2292
|
(...x) => h(m) && h(m)(...x)),
|
|
@@ -2304,7 +2304,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2304
2304
|
onClick: f[4] || (f[4] = //@ts-ignore
|
|
2305
2305
|
(...x) => h(c) && h(c)(...x))
|
|
2306
2306
|
}, " Очистити ", 512), [
|
|
2307
|
-
[
|
|
2307
|
+
[he, h(s).length !== 0]
|
|
2308
2308
|
])
|
|
2309
2309
|
])) : _("", !0),
|
|
2310
2310
|
g.layout === "popover" ? (b(), S("div", lo, [
|
|
@@ -2314,7 +2314,7 @@ const Jt = /* @__PURE__ */ Z(Wr, [["render", Yr]]), Qr = {
|
|
|
2314
2314
|
onClick: f[5] || (f[5] = //@ts-ignore
|
|
2315
2315
|
(...x) => h(c) && h(c)(...x))
|
|
2316
2316
|
}, " Очистити ", 512), [
|
|
2317
|
-
[
|
|
2317
|
+
[he, h(s).length !== 0]
|
|
2318
2318
|
])
|
|
2319
2319
|
])) : _("", !0)
|
|
2320
2320
|
], 64)) : _("", !0)
|
|
@@ -2580,10 +2580,10 @@ const _o = /* @__PURE__ */ I({
|
|
|
2580
2580
|
function d() {
|
|
2581
2581
|
const v = u.value, C = a.value;
|
|
2582
2582
|
if (!v || !C) return;
|
|
2583
|
-
const
|
|
2583
|
+
const T = v.getBoundingClientRect();
|
|
2584
2584
|
l.value = {
|
|
2585
|
-
top:
|
|
2586
|
-
left:
|
|
2585
|
+
top: T.bottom + 8,
|
|
2586
|
+
left: T.left
|
|
2587
2587
|
};
|
|
2588
2588
|
}
|
|
2589
2589
|
function c() {
|
|
@@ -2597,15 +2597,16 @@ const _o = /* @__PURE__ */ I({
|
|
|
2597
2597
|
function m(v) {
|
|
2598
2598
|
v.key === "Escape" && (o.value = !1);
|
|
2599
2599
|
}
|
|
2600
|
-
|
|
2600
|
+
const E = O(!1);
|
|
2601
|
+
ce(() => E.value = !0), ce(() => {
|
|
2601
2602
|
document.addEventListener("click", i, !0), document.addEventListener("keydown", m), window.addEventListener("scroll", d, !0);
|
|
2602
2603
|
}), ze(() => {
|
|
2603
2604
|
document.removeEventListener("click", i, !0), document.removeEventListener("keydown", m), window.removeEventListener("scroll", d, !0);
|
|
2604
2605
|
});
|
|
2605
|
-
function
|
|
2606
|
+
function R() {
|
|
2606
2607
|
o.value = !1;
|
|
2607
2608
|
}
|
|
2608
|
-
return t({ close:
|
|
2609
|
+
return t({ close: R }), (v, C) => (b(), S("div", null, [
|
|
2609
2610
|
y("button", {
|
|
2610
2611
|
onClick: c,
|
|
2611
2612
|
disabled: v.disabled,
|
|
@@ -2620,7 +2621,10 @@ const _o = /* @__PURE__ */ I({
|
|
|
2620
2621
|
J(Ge, { class: "h-4 w-4" }),
|
|
2621
2622
|
(Array.isArray(v.currentValue) ? v.currentValue === null || v.currentValue.length > 0 : v.currentValue === null || v.currentValue) && v.layout === "inline" ? (b(), S("span", Oo)) : _("", !0)
|
|
2622
2623
|
], 10, Ao),
|
|
2623
|
-
(b(), B(bt, {
|
|
2624
|
+
E.value ? (b(), B(bt, {
|
|
2625
|
+
key: 0,
|
|
2626
|
+
to: "body"
|
|
2627
|
+
}, [
|
|
2624
2628
|
H(y("div", {
|
|
2625
2629
|
ref_key: "popperRef",
|
|
2626
2630
|
ref: a,
|
|
@@ -2634,9 +2638,9 @@ const _o = /* @__PURE__ */ I({
|
|
|
2634
2638
|
])
|
|
2635
2639
|
])
|
|
2636
2640
|
], 4), [
|
|
2637
|
-
[
|
|
2641
|
+
[he, o.value]
|
|
2638
2642
|
])
|
|
2639
|
-
]))
|
|
2643
|
+
])) : _("", !0)
|
|
2640
2644
|
]));
|
|
2641
2645
|
}
|
|
2642
2646
|
});
|
|
@@ -2848,7 +2852,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2848
2852
|
}
|
|
2849
2853
|
a.value = [...g], s("change", { name: n.name, value: a }), s("update:modelValue", a.value);
|
|
2850
2854
|
}
|
|
2851
|
-
function
|
|
2855
|
+
function R() {
|
|
2852
2856
|
const g = [];
|
|
2853
2857
|
switch (d.value) {
|
|
2854
2858
|
case "today":
|
|
@@ -2869,7 +2873,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2869
2873
|
}
|
|
2870
2874
|
a.value = [...g], s("change", { name: n.name, value: a }), s("update:modelValue", a.value);
|
|
2871
2875
|
}
|
|
2872
|
-
|
|
2876
|
+
ce(() => {
|
|
2873
2877
|
let g = [];
|
|
2874
2878
|
if (Array.isArray(n.modelValue) ? g = n.modelValue : Array.isArray(n.default) && (g = n.default), g.length === 0) return;
|
|
2875
2879
|
const [f, ...x] = g;
|
|
@@ -2902,7 +2906,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2902
2906
|
}
|
|
2903
2907
|
a.value = [...D], s("update:modelValue", a.value);
|
|
2904
2908
|
});
|
|
2905
|
-
const
|
|
2909
|
+
const v = [
|
|
2906
2910
|
"Січень",
|
|
2907
2911
|
"Лютий",
|
|
2908
2912
|
"Березень",
|
|
@@ -2916,7 +2920,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2916
2920
|
"Листопад",
|
|
2917
2921
|
"Грудень"
|
|
2918
2922
|
];
|
|
2919
|
-
function
|
|
2923
|
+
function C(g) {
|
|
2920
2924
|
const [f, x, D] = g.split("-");
|
|
2921
2925
|
return `${D}.${x}.${f}`;
|
|
2922
2926
|
}
|
|
@@ -2924,11 +2928,11 @@ const ol = /* @__PURE__ */ I({
|
|
|
2924
2928
|
const { value: f } = a;
|
|
2925
2929
|
switch (g) {
|
|
2926
2930
|
case "today":
|
|
2927
|
-
return
|
|
2931
|
+
return C(f[0]);
|
|
2928
2932
|
case "range":
|
|
2929
2933
|
return "Період";
|
|
2930
2934
|
case "week":
|
|
2931
|
-
return f[0] && f[1] ? `${
|
|
2935
|
+
return f[0] && f[1] ? `${C(f[0])} – ${C(f[1])}` : "";
|
|
2932
2936
|
case "quarter":
|
|
2933
2937
|
if (f[0]) {
|
|
2934
2938
|
const x = new Date(f[0]), D = x.getFullYear(), ee = x.getMonth();
|
|
@@ -2938,7 +2942,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2938
2942
|
case "month":
|
|
2939
2943
|
if (f[0]) {
|
|
2940
2944
|
const [x, D] = f[0].split("-");
|
|
2941
|
-
return `${
|
|
2945
|
+
return `${v[parseInt(D, 10) - 1]} ${x}`;
|
|
2942
2946
|
}
|
|
2943
2947
|
return "";
|
|
2944
2948
|
case "year":
|
|
@@ -2974,7 +2978,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
2974
2978
|
onClear: w,
|
|
2975
2979
|
layout: g.layout
|
|
2976
2980
|
}, {
|
|
2977
|
-
default:
|
|
2981
|
+
default: de(() => [
|
|
2978
2982
|
y("div", null, [
|
|
2979
2983
|
y("button", {
|
|
2980
2984
|
type: "button",
|
|
@@ -3058,7 +3062,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
3058
3062
|
type: "button",
|
|
3059
3063
|
title: "Попередній період",
|
|
3060
3064
|
class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
|
|
3061
|
-
onClick:
|
|
3065
|
+
onClick: R
|
|
3062
3066
|
}, [
|
|
3063
3067
|
J(Lo)
|
|
3064
3068
|
])
|
|
@@ -3141,7 +3145,7 @@ const ol = /* @__PURE__ */ I({
|
|
|
3141
3145
|
}, U(h(qo)(x)), 11, rl)), 64)),
|
|
3142
3146
|
y("button", {
|
|
3143
3147
|
class: $(h(l)),
|
|
3144
|
-
onClick:
|
|
3148
|
+
onClick: R
|
|
3145
3149
|
}, " < ", 2),
|
|
3146
3150
|
y("button", {
|
|
3147
3151
|
class: $(h(l)),
|
|
@@ -3345,7 +3349,7 @@ const il = /* @__PURE__ */ Z(ll, [["render", al]]), ul = { style: { display: "in
|
|
|
3345
3349
|
disabled: i.disabled,
|
|
3346
3350
|
layout: "inline"
|
|
3347
3351
|
}, {
|
|
3348
|
-
default:
|
|
3352
|
+
default: de(() => [
|
|
3349
3353
|
(b(), B(ae(h(s)?.component), z({
|
|
3350
3354
|
ref_key: "filterRef",
|
|
3351
3355
|
ref: l
|
|
@@ -3546,7 +3550,7 @@ function Ze(e, t) {
|
|
|
3546
3550
|
M(c, async () => {
|
|
3547
3551
|
await Ke(), m?.value?.filterRef?.inputTextRef && m.value.filterRef.inputTextRef.focus();
|
|
3548
3552
|
});
|
|
3549
|
-
const E = j(() => e.schema?.value ? Object.fromEntries(Object.entries(e.schema?.value).slice(0, e.limit)) : {}),
|
|
3553
|
+
const E = j(() => e.schema?.value ? Object.fromEntries(Object.entries(e.schema?.value).slice(0, e.limit)) : {}), R = j(() => e.schema?.value ? e.view !== "inline" ? e.schema?.value : Object.fromEntries(Object.entries(e.schema?.value).slice(e.limit)) : {}), v = j(() => {
|
|
3550
3554
|
if (u.value.length === 0) return [];
|
|
3551
3555
|
let k = 0;
|
|
3552
3556
|
if (e.schema?.value) {
|
|
@@ -3554,12 +3558,12 @@ function Ze(e, t) {
|
|
|
3554
3558
|
w < e.limit ? k = e.limit - w : k = 0;
|
|
3555
3559
|
}
|
|
3556
3560
|
return u.value.slice(0, k);
|
|
3557
|
-
}),
|
|
3561
|
+
}), C = j(() => u.value.length === 0 ? [] : e.view !== "inline" ? u.value : u.value.slice(v.value.length));
|
|
3558
3562
|
function T() {
|
|
3559
|
-
if (
|
|
3560
|
-
const [k] = Object.keys(
|
|
3563
|
+
if (R.value) {
|
|
3564
|
+
const [k] = Object.keys(R.value);
|
|
3561
3565
|
c.value = k;
|
|
3562
|
-
} else
|
|
3566
|
+
} else C.value.length > 0 ? c.value = C.value[0].props.name : c.value = "";
|
|
3563
3567
|
}
|
|
3564
3568
|
return {
|
|
3565
3569
|
activeFilter: n,
|
|
@@ -3568,10 +3572,10 @@ function Ze(e, t) {
|
|
|
3568
3572
|
clearFilter: l,
|
|
3569
3573
|
clearAllFilters: d,
|
|
3570
3574
|
limitedSchema: E,
|
|
3571
|
-
popoverSchema:
|
|
3575
|
+
popoverSchema: R,
|
|
3572
3576
|
filtersSlot: u,
|
|
3573
|
-
limitedFiltersSlot:
|
|
3574
|
-
popoverFiltersSlot:
|
|
3577
|
+
limitedFiltersSlot: v,
|
|
3578
|
+
popoverFiltersSlot: C,
|
|
3575
3579
|
vnodeMap: a,
|
|
3576
3580
|
onPopoverOpen: T,
|
|
3577
3581
|
selectedFilter: c,
|
|
@@ -3600,7 +3604,7 @@ const gl = /* @__PURE__ */ I({
|
|
|
3600
3604
|
const m = i.target;
|
|
3601
3605
|
!l.value?.contains(i.target) && !n.value?.contains(i.target) && !m.closest("[data-inside-popover]") && (r.value = !1);
|
|
3602
3606
|
}
|
|
3603
|
-
|
|
3607
|
+
ce(() => {
|
|
3604
3608
|
l.value = o.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", u), document.addEventListener("click", d), window.addEventListener("resize", a), window.addEventListener("scroll", a, !0);
|
|
3605
3609
|
}), ze(() => {
|
|
3606
3610
|
l.value?.removeEventListener("click", u), document.removeEventListener("click", d), window.removeEventListener("resize", a), window.removeEventListener("scroll", a, !0);
|
|
@@ -3678,9 +3682,9 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3678
3682
|
clearAllFilters: i,
|
|
3679
3683
|
popoverSchema: m,
|
|
3680
3684
|
popoverFiltersSlot: E,
|
|
3681
|
-
onPopoverOpen:
|
|
3682
|
-
selectedFilter:
|
|
3683
|
-
filterRef:
|
|
3685
|
+
onPopoverOpen: R,
|
|
3686
|
+
selectedFilter: v,
|
|
3687
|
+
filterRef: C
|
|
3684
3688
|
} = Ze({
|
|
3685
3689
|
...n,
|
|
3686
3690
|
schema: s,
|
|
@@ -3696,10 +3700,10 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3696
3700
|
clearFilter: c,
|
|
3697
3701
|
clearAllFilters: i
|
|
3698
3702
|
}), (T, k) => (b(), B(gl, {
|
|
3699
|
-
onOpen: h(
|
|
3700
|
-
onClose: k[5] || (k[5] = (w) =>
|
|
3703
|
+
onOpen: h(R),
|
|
3704
|
+
onClose: k[5] || (k[5] = (w) => v.value = "")
|
|
3701
3705
|
}, {
|
|
3702
|
-
trigger:
|
|
3706
|
+
trigger: de(() => [
|
|
3703
3707
|
y("button", {
|
|
3704
3708
|
"data-popover-trigger": "",
|
|
3705
3709
|
"aria-haspopup": "dialog",
|
|
@@ -3715,7 +3719,7 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3715
3719
|
h(a) > 0 ? (b(), S("div", kl, U(h(a)), 1)) : _("", !0)
|
|
3716
3720
|
], 2)
|
|
3717
3721
|
]),
|
|
3718
|
-
default:
|
|
3722
|
+
default: de(() => [
|
|
3719
3723
|
y("div", Cl, [
|
|
3720
3724
|
y("div", Rl, [
|
|
3721
3725
|
k[7] || (k[7] = y("div", { class: "p-4 border-b" }, [
|
|
@@ -3725,11 +3729,11 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3725
3729
|
T.schema ? (b(!0), S(F, { key: 0 }, Y(Object.entries(h(m)), ([w, g]) => (b(), S("button", {
|
|
3726
3730
|
key: w,
|
|
3727
3731
|
onClick: () => {
|
|
3728
|
-
|
|
3732
|
+
v.value = w;
|
|
3729
3733
|
},
|
|
3730
3734
|
class: $([
|
|
3731
3735
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
3732
|
-
h(
|
|
3736
|
+
h(v) === w ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
3733
3737
|
])
|
|
3734
3738
|
}, [
|
|
3735
3739
|
y("div", _l, [
|
|
@@ -3739,10 +3743,10 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3739
3743
|
], 10, El))), 128)) : _("", !0),
|
|
3740
3744
|
(b(!0), S(F, null, Y(h(E), (w, g) => (b(), S("button", {
|
|
3741
3745
|
key: "slot-" + g,
|
|
3742
|
-
onClick: (f) =>
|
|
3746
|
+
onClick: (f) => v.value = w.props.name,
|
|
3743
3747
|
class: $([
|
|
3744
3748
|
"w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors",
|
|
3745
|
-
h(
|
|
3749
|
+
h(v) === w.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : ""
|
|
3746
3750
|
])
|
|
3747
3751
|
}, [
|
|
3748
3752
|
y("div", Vl, [
|
|
@@ -3761,18 +3765,18 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3761
3765
|
])) : _("", !0)
|
|
3762
3766
|
]),
|
|
3763
3767
|
y("div", Fl, [
|
|
3764
|
-
h(
|
|
3768
|
+
h(v) === "" ? (b(), S("div", Nl, k[8] || (k[8] = [
|
|
3765
3769
|
y("p", { class: "text-sm" }, "Select a field to start creating a filter.", -1)
|
|
3766
3770
|
]))) : _("", !0),
|
|
3767
|
-
h(
|
|
3771
|
+
h(v) ? (b(), S(F, { key: 1 }, [
|
|
3768
3772
|
h(m) ? (b(!0), S(F, { key: 0 }, Y(Object.entries(h(m)), ([w, g]) => (b(), S(F, null, [
|
|
3769
|
-
h(
|
|
3773
|
+
h(v) === w ? (b(), B(ue, z({
|
|
3770
3774
|
key: 0,
|
|
3771
3775
|
name: w,
|
|
3772
3776
|
layout: "popover",
|
|
3773
3777
|
ref_for: !0,
|
|
3774
3778
|
ref_key: "filterRef",
|
|
3775
|
-
ref:
|
|
3779
|
+
ref: C
|
|
3776
3780
|
}, { ref_for: !0 }, g, {
|
|
3777
3781
|
onChange: k[1] || (k[1] = (f) => h(d)(f.name, f.value)),
|
|
3778
3782
|
onClear: k[2] || (k[2] = (f) => {
|
|
@@ -3786,13 +3790,13 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3786
3790
|
(b(!0), S(F, null, Y(h(E), (w, g) => (b(), S(F, {
|
|
3787
3791
|
key: "slot-" + g
|
|
3788
3792
|
}, [
|
|
3789
|
-
h(
|
|
3793
|
+
h(v) === w.props.name ? (b(), B(ue, z({
|
|
3790
3794
|
key: 0,
|
|
3791
3795
|
layout: "popover"
|
|
3792
3796
|
}, { ref_for: !0 }, w.props, {
|
|
3793
3797
|
ref_for: !0,
|
|
3794
3798
|
ref_key: "filterRef",
|
|
3795
|
-
ref:
|
|
3799
|
+
ref: C,
|
|
3796
3800
|
onChange: k[3] || (k[3] = (f) => h(d)(f.name, f.value)),
|
|
3797
3801
|
onClear: k[4] || (k[4] = (f) => {
|
|
3798
3802
|
h(c)(f), h(d)(f, void 0);
|
|
@@ -3830,8 +3834,8 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3830
3834
|
limitedSchema: i,
|
|
3831
3835
|
popoverSchema: m,
|
|
3832
3836
|
filtersSlot: E,
|
|
3833
|
-
limitedFiltersSlot:
|
|
3834
|
-
popoverFiltersSlot:
|
|
3837
|
+
limitedFiltersSlot: R,
|
|
3838
|
+
popoverFiltersSlot: v
|
|
3835
3839
|
} = Ze(
|
|
3836
3840
|
{
|
|
3837
3841
|
...r,
|
|
@@ -3839,9 +3843,9 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3839
3843
|
slots: o
|
|
3840
3844
|
},
|
|
3841
3845
|
n
|
|
3842
|
-
),
|
|
3846
|
+
), C = O();
|
|
3843
3847
|
function T() {
|
|
3844
|
-
console.log(
|
|
3848
|
+
console.log(C.value), C.value && C.value.clearAllFilters(), c();
|
|
3845
3849
|
}
|
|
3846
3850
|
return M(
|
|
3847
3851
|
() => r.schema,
|
|
@@ -3864,7 +3868,7 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3864
3868
|
modelValue: h(s)[g],
|
|
3865
3869
|
"onUpdate:modelValue": (x) => h(s)[g] = x
|
|
3866
3870
|
}), null, 16, ["name", "mode", "modelValue", "onUpdate:modelValue"]))), 128)) : _("", !0),
|
|
3867
|
-
(b(!0), S(F, null, Y(h(
|
|
3871
|
+
(b(!0), S(F, null, Y(h(R), (g, f) => (b(), B(ue, z({
|
|
3868
3872
|
key: "slot-" + f,
|
|
3869
3873
|
layout: "vertical"
|
|
3870
3874
|
}, { ref_for: !0 }, g.props, {
|
|
@@ -3876,15 +3880,15 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3876
3880
|
modelValue: h(s)[g.props.name],
|
|
3877
3881
|
"onUpdate:modelValue": (x) => h(s)[g.props.name] = x
|
|
3878
3882
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128)),
|
|
3879
|
-
Object.entries(h(m)).length > 0 || h(
|
|
3883
|
+
Object.entries(h(m)).length > 0 || h(v).length > 0 ? (b(), B(Gt, z({ key: 1 }, r, {
|
|
3880
3884
|
onChange: w[4] || (w[4] = (g) => h(a)(g.name, g.value)),
|
|
3881
3885
|
onClearAll: h(c),
|
|
3882
3886
|
onClear: w[5] || (w[5] = (g) => h(d)(g.name)),
|
|
3883
3887
|
ref_key: "popoverRef",
|
|
3884
|
-
ref:
|
|
3888
|
+
ref: C,
|
|
3885
3889
|
cleanable: !0
|
|
3886
3890
|
}), {
|
|
3887
|
-
default:
|
|
3891
|
+
default: de(() => [
|
|
3888
3892
|
(b(!0), S(F, null, Y(h(E), (g, f) => (b(), B(ae(g), z({
|
|
3889
3893
|
key: "slot-" + f,
|
|
3890
3894
|
layout: "inline"
|
|
@@ -3937,28 +3941,28 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
3937
3941
|
class: "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200",
|
|
3938
3942
|
type: "button"
|
|
3939
3943
|
}, " Очистити ")) : _("", !0),
|
|
3940
|
-
i.schema ? (b(!0), S(F, { key: 1 }, Y(Object.entries(i.schema), ([E,
|
|
3944
|
+
i.schema ? (b(!0), S(F, { key: 1 }, Y(Object.entries(i.schema), ([E, R]) => (b(), B(ue, z({
|
|
3941
3945
|
name: E,
|
|
3942
3946
|
layout: "vertical"
|
|
3943
|
-
}, { ref_for: !0 },
|
|
3944
|
-
onChange: m[1] || (m[1] = (
|
|
3945
|
-
onClear: m[2] || (m[2] = (
|
|
3946
|
-
h(a)(
|
|
3947
|
+
}, { ref_for: !0 }, R, {
|
|
3948
|
+
onChange: m[1] || (m[1] = (v) => h(u)(v.name, v.value)),
|
|
3949
|
+
onClear: m[2] || (m[2] = (v) => {
|
|
3950
|
+
h(a)(v), h(u)(v, void 0);
|
|
3947
3951
|
}),
|
|
3948
3952
|
modelValue: h(l)[E],
|
|
3949
|
-
"onUpdate:modelValue": (
|
|
3953
|
+
"onUpdate:modelValue": (v) => h(l)[E] = v,
|
|
3950
3954
|
showClean: !0
|
|
3951
3955
|
}), null, 16, ["name", "modelValue", "onUpdate:modelValue"]))), 256)) : _("", !0),
|
|
3952
|
-
(b(!0), S(F, null, Y(h(c), (E,
|
|
3953
|
-
key: "slot-" +
|
|
3956
|
+
(b(!0), S(F, null, Y(h(c), (E, R) => (b(), B(ue, z({
|
|
3957
|
+
key: "slot-" + R,
|
|
3954
3958
|
layout: "vertical"
|
|
3955
3959
|
}, { ref_for: !0 }, E.props, {
|
|
3956
|
-
onChange: m[3] || (m[3] = (
|
|
3957
|
-
onClear: m[4] || (m[4] = (
|
|
3958
|
-
h(a)(
|
|
3960
|
+
onChange: m[3] || (m[3] = (v) => h(u)(v.name, v.value)),
|
|
3961
|
+
onClear: m[4] || (m[4] = (v) => {
|
|
3962
|
+
h(a)(v), h(u)(v, void 0);
|
|
3959
3963
|
}),
|
|
3960
3964
|
modelValue: h(l)[E.props.name],
|
|
3961
|
-
"onUpdate:modelValue": (
|
|
3965
|
+
"onUpdate:modelValue": (v) => h(l)[E.props.name] = v,
|
|
3962
3966
|
showClean: !0
|
|
3963
3967
|
}), null, 16, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
3964
3968
|
])
|
|
@@ -4034,7 +4038,7 @@ const wl = /* @__PURE__ */ Z(bl, [["render", xl]]), kl = {
|
|
|
4034
4038
|
onClear: i[1] || (i[1] = (m) => s(m.name)),
|
|
4035
4039
|
onClearAll: u
|
|
4036
4040
|
}), {
|
|
4037
|
-
default:
|
|
4041
|
+
default: de(() => [
|
|
4038
4042
|
Re(c.$slots, "default")
|
|
4039
4043
|
]),
|
|
4040
4044
|
_: 3
|