@eox/itemfilter 0.4.0 → 0.5.1
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/eox-itemfilter.js +2403 -1193
- package/dist/eox-itemfilter.umd.cjs +71 -53
- package/package.json +3 -2
- package/test/general.cy.ts +7 -2
- package/test/testItems.json +120 -20
package/dist/eox-itemfilter.js
CHANGED
|
@@ -1,235 +1,235 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Cr = Object.defineProperty;
|
|
2
|
+
var Or = (i, e, t) => e in i ? Cr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var ee = (i, e, t) => (Or(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2019 Google LLC
|
|
7
7
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
8
|
*/
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
constructor(
|
|
12
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
const kt = window, Ms = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yi = Symbol(), Js = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
let Dr = class {
|
|
11
|
+
constructor(e, t, s) {
|
|
12
|
+
if (this._$cssResult$ = !0, s !== yi)
|
|
13
13
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
14
|
-
this.cssText =
|
|
14
|
+
this.cssText = e, this.t = t;
|
|
15
15
|
}
|
|
16
16
|
get styleSheet() {
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const s =
|
|
21
|
-
s && (
|
|
17
|
+
let e = this.o;
|
|
18
|
+
const t = this.t;
|
|
19
|
+
if (Ms && e === void 0) {
|
|
20
|
+
const s = t !== void 0 && t.length === 1;
|
|
21
|
+
s && (e = Js.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Js.set(t, e));
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return e;
|
|
24
24
|
}
|
|
25
25
|
toString() {
|
|
26
26
|
return this.cssText;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const s = document.createElement("style"), n =
|
|
32
|
-
n !== void 0 && s.setAttribute("nonce", n), s.textContent =
|
|
29
|
+
const Tr = (i) => new Dr(typeof i == "string" ? i : i + "", void 0, yi), Rr = (i, e) => {
|
|
30
|
+
Ms ? i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
|
31
|
+
const s = document.createElement("style"), n = kt.litNonce;
|
|
32
|
+
n !== void 0 && s.setAttribute("nonce", n), s.textContent = t.cssText, i.appendChild(s);
|
|
33
33
|
});
|
|
34
|
-
},
|
|
35
|
-
let
|
|
36
|
-
for (const s of
|
|
37
|
-
|
|
38
|
-
return
|
|
34
|
+
}, Zs = Ms ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
35
|
+
let t = "";
|
|
36
|
+
for (const s of e.cssRules)
|
|
37
|
+
t += s.cssText;
|
|
38
|
+
return Tr(t);
|
|
39
39
|
})(i) : i;
|
|
40
40
|
/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2017 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
switch (
|
|
45
|
+
var ns;
|
|
46
|
+
const Lt = window, Qs = Lt.trustedTypes, Pr = Qs ? Qs.emptyScript : "", ei = Lt.reactiveElementPolyfillSupport, fs = { toAttribute(i, e) {
|
|
47
|
+
switch (e) {
|
|
48
48
|
case Boolean:
|
|
49
|
-
i = i ?
|
|
49
|
+
i = i ? Pr : null;
|
|
50
50
|
break;
|
|
51
51
|
case Object:
|
|
52
52
|
case Array:
|
|
53
53
|
i = i == null ? i : JSON.stringify(i);
|
|
54
54
|
}
|
|
55
55
|
return i;
|
|
56
|
-
}, fromAttribute(i,
|
|
57
|
-
let
|
|
58
|
-
switch (
|
|
56
|
+
}, fromAttribute(i, e) {
|
|
57
|
+
let t = i;
|
|
58
|
+
switch (e) {
|
|
59
59
|
case Boolean:
|
|
60
|
-
|
|
60
|
+
t = i !== null;
|
|
61
61
|
break;
|
|
62
62
|
case Number:
|
|
63
|
-
|
|
63
|
+
t = i === null ? null : Number(i);
|
|
64
64
|
break;
|
|
65
65
|
case Object:
|
|
66
66
|
case Array:
|
|
67
67
|
try {
|
|
68
|
-
|
|
68
|
+
t = JSON.parse(i);
|
|
69
69
|
} catch {
|
|
70
|
-
|
|
70
|
+
t = null;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
return
|
|
74
|
-
} },
|
|
75
|
-
let
|
|
73
|
+
return t;
|
|
74
|
+
} }, bi = (i, e) => e !== i && (e == e || i == i), os = { attribute: !0, type: String, converter: fs, reflect: !1, hasChanged: bi }, gs = "finalized";
|
|
75
|
+
let Ze = class extends HTMLElement {
|
|
76
76
|
constructor() {
|
|
77
77
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
78
78
|
}
|
|
79
|
-
static addInitializer(
|
|
80
|
-
var
|
|
81
|
-
this.finalize(), ((
|
|
79
|
+
static addInitializer(e) {
|
|
80
|
+
var t;
|
|
81
|
+
this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
|
|
82
82
|
}
|
|
83
83
|
static get observedAttributes() {
|
|
84
84
|
this.finalize();
|
|
85
|
-
const
|
|
86
|
-
return this.elementProperties.forEach((
|
|
87
|
-
const n = this._$Ep(s,
|
|
88
|
-
n !== void 0 && (this._$Ev.set(n, s),
|
|
89
|
-
}),
|
|
90
|
-
}
|
|
91
|
-
static createProperty(
|
|
92
|
-
if (
|
|
93
|
-
const s = typeof
|
|
94
|
-
n !== void 0 && Object.defineProperty(this.prototype,
|
|
85
|
+
const e = [];
|
|
86
|
+
return this.elementProperties.forEach((t, s) => {
|
|
87
|
+
const n = this._$Ep(s, t);
|
|
88
|
+
n !== void 0 && (this._$Ev.set(n, s), e.push(n));
|
|
89
|
+
}), e;
|
|
90
|
+
}
|
|
91
|
+
static createProperty(e, t = os) {
|
|
92
|
+
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
93
|
+
const s = typeof e == "symbol" ? Symbol() : "__" + e, n = this.getPropertyDescriptor(e, s, t);
|
|
94
|
+
n !== void 0 && Object.defineProperty(this.prototype, e, n);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
static getPropertyDescriptor(
|
|
97
|
+
static getPropertyDescriptor(e, t, s) {
|
|
98
98
|
return { get() {
|
|
99
|
-
return this[
|
|
99
|
+
return this[t];
|
|
100
100
|
}, set(n) {
|
|
101
|
-
const
|
|
102
|
-
this[
|
|
101
|
+
const l = this[e];
|
|
102
|
+
this[t] = n, this.requestUpdate(e, l, s);
|
|
103
103
|
}, configurable: !0, enumerable: !0 };
|
|
104
104
|
}
|
|
105
|
-
static getPropertyOptions(
|
|
106
|
-
return this.elementProperties.get(
|
|
105
|
+
static getPropertyOptions(e) {
|
|
106
|
+
return this.elementProperties.get(e) || os;
|
|
107
107
|
}
|
|
108
108
|
static finalize() {
|
|
109
|
-
if (this.hasOwnProperty(
|
|
109
|
+
if (this.hasOwnProperty(gs))
|
|
110
110
|
return !1;
|
|
111
|
-
this
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
111
|
+
this[gs] = !0;
|
|
112
|
+
const e = Object.getPrototypeOf(this);
|
|
113
|
+
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
114
|
+
const t = this.properties, s = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
115
115
|
for (const n of s)
|
|
116
|
-
this.createProperty(n,
|
|
116
|
+
this.createProperty(n, t[n]);
|
|
117
117
|
}
|
|
118
118
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
119
119
|
}
|
|
120
|
-
static finalizeStyles(
|
|
121
|
-
const
|
|
122
|
-
if (Array.isArray(
|
|
123
|
-
const s = new Set(
|
|
120
|
+
static finalizeStyles(e) {
|
|
121
|
+
const t = [];
|
|
122
|
+
if (Array.isArray(e)) {
|
|
123
|
+
const s = new Set(e.flat(1 / 0).reverse());
|
|
124
124
|
for (const n of s)
|
|
125
|
-
|
|
125
|
+
t.unshift(Zs(n));
|
|
126
126
|
} else
|
|
127
|
-
|
|
128
|
-
return
|
|
127
|
+
e !== void 0 && t.push(Zs(e));
|
|
128
|
+
return t;
|
|
129
129
|
}
|
|
130
|
-
static _$Ep(
|
|
131
|
-
const s =
|
|
132
|
-
return s === !1 ? void 0 : typeof s == "string" ? s : typeof
|
|
130
|
+
static _$Ep(e, t) {
|
|
131
|
+
const s = t.attribute;
|
|
132
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
133
133
|
}
|
|
134
134
|
u() {
|
|
135
|
-
var
|
|
136
|
-
this._$E_ = new Promise((
|
|
135
|
+
var e;
|
|
136
|
+
this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
|
|
137
137
|
}
|
|
138
|
-
addController(
|
|
139
|
-
var
|
|
140
|
-
((
|
|
138
|
+
addController(e) {
|
|
139
|
+
var t, s;
|
|
140
|
+
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((s = e.hostConnected) === null || s === void 0 || s.call(e));
|
|
141
141
|
}
|
|
142
|
-
removeController(
|
|
143
|
-
var
|
|
144
|
-
(
|
|
142
|
+
removeController(e) {
|
|
143
|
+
var t;
|
|
144
|
+
(t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
|
|
145
145
|
}
|
|
146
146
|
_$Eg() {
|
|
147
|
-
this.constructor.elementProperties.forEach((
|
|
148
|
-
this.hasOwnProperty(
|
|
147
|
+
this.constructor.elementProperties.forEach((e, t) => {
|
|
148
|
+
this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
createRenderRoot() {
|
|
152
|
-
var
|
|
153
|
-
const
|
|
154
|
-
return
|
|
152
|
+
var e;
|
|
153
|
+
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
154
|
+
return Rr(t, this.constructor.elementStyles), t;
|
|
155
155
|
}
|
|
156
156
|
connectedCallback() {
|
|
157
|
-
var
|
|
158
|
-
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
157
|
+
var e;
|
|
158
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
159
159
|
var s;
|
|
160
|
-
return (s =
|
|
160
|
+
return (s = t.hostConnected) === null || s === void 0 ? void 0 : s.call(t);
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
enableUpdating(
|
|
163
|
+
enableUpdating(e) {
|
|
164
164
|
}
|
|
165
165
|
disconnectedCallback() {
|
|
166
|
-
var
|
|
167
|
-
(
|
|
166
|
+
var e;
|
|
167
|
+
(e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
168
168
|
var s;
|
|
169
|
-
return (s =
|
|
169
|
+
return (s = t.hostDisconnected) === null || s === void 0 ? void 0 : s.call(t);
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
attributeChangedCallback(
|
|
173
|
-
this._$AK(
|
|
172
|
+
attributeChangedCallback(e, t, s) {
|
|
173
|
+
this._$AK(e, s);
|
|
174
174
|
}
|
|
175
|
-
_$EO(
|
|
175
|
+
_$EO(e, t, s = os) {
|
|
176
176
|
var n;
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter :
|
|
180
|
-
this._$El =
|
|
177
|
+
const l = this.constructor._$Ep(e, s);
|
|
178
|
+
if (l !== void 0 && s.reflect === !0) {
|
|
179
|
+
const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter : fs).toAttribute(t, s.type);
|
|
180
|
+
this._$El = e, o == null ? this.removeAttribute(l) : this.setAttribute(l, o), this._$El = null;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
_$AK(
|
|
183
|
+
_$AK(e, t) {
|
|
184
184
|
var s;
|
|
185
|
-
const n = this.constructor,
|
|
186
|
-
if (
|
|
187
|
-
const o = n.getPropertyOptions(
|
|
188
|
-
this._$El =
|
|
185
|
+
const n = this.constructor, l = n._$Ev.get(e);
|
|
186
|
+
if (l !== void 0 && this._$El !== l) {
|
|
187
|
+
const o = n.getPropertyOptions(l), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : fs;
|
|
188
|
+
this._$El = l, this[l] = h.fromAttribute(t, o.type), this._$El = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
requestUpdate(
|
|
191
|
+
requestUpdate(e, t, s) {
|
|
192
192
|
let n = !0;
|
|
193
|
-
|
|
193
|
+
e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || bi)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
194
194
|
}
|
|
195
195
|
async _$Ej() {
|
|
196
196
|
this.isUpdatePending = !0;
|
|
197
197
|
try {
|
|
198
198
|
await this._$E_;
|
|
199
|
-
} catch (
|
|
200
|
-
Promise.reject(
|
|
199
|
+
} catch (t) {
|
|
200
|
+
Promise.reject(t);
|
|
201
201
|
}
|
|
202
|
-
const
|
|
203
|
-
return
|
|
202
|
+
const e = this.scheduleUpdate();
|
|
203
|
+
return e != null && await e, !this.isUpdatePending;
|
|
204
204
|
}
|
|
205
205
|
scheduleUpdate() {
|
|
206
206
|
return this.performUpdate();
|
|
207
207
|
}
|
|
208
208
|
performUpdate() {
|
|
209
|
-
var
|
|
209
|
+
var e;
|
|
210
210
|
if (!this.isUpdatePending)
|
|
211
211
|
return;
|
|
212
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n,
|
|
213
|
-
let
|
|
212
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, l) => this[l] = n), this._$Ei = void 0);
|
|
213
|
+
let t = !1;
|
|
214
214
|
const s = this._$AL;
|
|
215
215
|
try {
|
|
216
|
-
|
|
217
|
-
var
|
|
218
|
-
return (
|
|
216
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
|
|
217
|
+
var l;
|
|
218
|
+
return (l = n.hostUpdate) === null || l === void 0 ? void 0 : l.call(n);
|
|
219
219
|
}), this.update(s)) : this._$Ek();
|
|
220
220
|
} catch (n) {
|
|
221
|
-
throw
|
|
221
|
+
throw t = !1, this._$Ek(), n;
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
t && this._$AE(s);
|
|
224
224
|
}
|
|
225
|
-
willUpdate(
|
|
225
|
+
willUpdate(e) {
|
|
226
226
|
}
|
|
227
|
-
_$AE(
|
|
228
|
-
var
|
|
229
|
-
(
|
|
227
|
+
_$AE(e) {
|
|
228
|
+
var t;
|
|
229
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
|
230
230
|
var n;
|
|
231
231
|
return (n = s.hostUpdated) === null || n === void 0 ? void 0 : n.call(s);
|
|
232
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
232
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
233
233
|
}
|
|
234
234
|
_$Ek() {
|
|
235
235
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -240,104 +240,104 @@ let B = class extends HTMLElement {
|
|
|
240
240
|
getUpdateComplete() {
|
|
241
241
|
return this._$E_;
|
|
242
242
|
}
|
|
243
|
-
shouldUpdate(
|
|
243
|
+
shouldUpdate(e) {
|
|
244
244
|
return !0;
|
|
245
245
|
}
|
|
246
|
-
update(
|
|
247
|
-
this._$EC !== void 0 && (this._$EC.forEach((
|
|
246
|
+
update(e) {
|
|
247
|
+
this._$EC !== void 0 && (this._$EC.forEach((t, s) => this._$EO(s, this[s], t)), this._$EC = void 0), this._$Ek();
|
|
248
248
|
}
|
|
249
|
-
updated(
|
|
249
|
+
updated(e) {
|
|
250
250
|
}
|
|
251
|
-
firstUpdated(
|
|
251
|
+
firstUpdated(e) {
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
|
-
|
|
254
|
+
Ze[gs] = !0, Ze.elementProperties = /* @__PURE__ */ new Map(), Ze.elementStyles = [], Ze.shadowRootOptions = { mode: "open" }, ei == null || ei({ ReactiveElement: Ze }), ((ns = Lt.reactiveElementVersions) !== null && ns !== void 0 ? ns : Lt.reactiveElementVersions = []).push("1.6.2");
|
|
255
255
|
/**
|
|
256
256
|
* @license
|
|
257
257
|
* Copyright 2017 Google LLC
|
|
258
258
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
259
259
|
*/
|
|
260
|
-
var
|
|
261
|
-
const
|
|
262
|
-
\f\r]`,
|
|
263
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
264
|
-
const
|
|
265
|
-
let n,
|
|
266
|
-
for (let
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
for (;
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
const
|
|
260
|
+
var ls;
|
|
261
|
+
const Ct = window, Qe = Ct.trustedTypes, ti = Qe ? Qe.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, vs = "$lit$", Ie = `lit$${(Math.random() + "").slice(9)}$`, $i = "?" + Ie, Ir = `<${$i}>`, We = document, ht = () => We.createComment(""), ut = (i) => i === null || typeof i != "object" && typeof i != "function", _i = Array.isArray, Nr = (i) => _i(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", as = `[
|
|
262
|
+
\f\r]`, nt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, si = /-->/g, ii = />/g, Fe = RegExp(`>|${as}(?:([^\\s"'>=/]+)(${as}*=${as}*(?:[^
|
|
263
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ri = /'/g, ni = /"/g, xi = /^(?:script|style|textarea|title)$/i, jr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), _e = jr(1), Ve = Symbol.for("lit-noChange"), te = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), ze = We.createTreeWalker(We, 129, null, !1), Hr = (i, e) => {
|
|
264
|
+
const t = i.length - 1, s = [];
|
|
265
|
+
let n, l = e === 2 ? "<svg>" : "", o = nt;
|
|
266
|
+
for (let u = 0; u < t; u++) {
|
|
267
|
+
const d = i[u];
|
|
268
|
+
let m, v, $ = -1, M = 0;
|
|
269
|
+
for (; M < d.length && (o.lastIndex = M, v = o.exec(d), v !== null); )
|
|
270
|
+
M = o.lastIndex, o === nt ? v[1] === "!--" ? o = si : v[1] !== void 0 ? o = ii : v[2] !== void 0 ? (xi.test(v[2]) && (n = RegExp("</" + v[2], "g")), o = Fe) : v[3] !== void 0 && (o = Fe) : o === Fe ? v[0] === ">" ? (o = n ?? nt, $ = -1) : v[1] === void 0 ? $ = -2 : ($ = o.lastIndex - v[2].length, m = v[1], o = v[3] === void 0 ? Fe : v[3] === '"' ? ni : ri) : o === ni || o === ri ? o = Fe : o === si || o === ii ? o = nt : (o = Fe, n = void 0);
|
|
271
|
+
const j = o === Fe && i[u + 1].startsWith("/>") ? " " : "";
|
|
272
|
+
l += o === nt ? d + Ir : $ >= 0 ? (s.push(m), d.slice(0, $) + vs + d.slice($) + Ie + j) : d + Ie + ($ === -2 ? (s.push(void 0), u) : j);
|
|
273
|
+
}
|
|
274
|
+
const h = l + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
|
|
275
275
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
276
276
|
throw Error("invalid template strings array");
|
|
277
|
-
return [
|
|
277
|
+
return [ti !== void 0 ? ti.createHTML(h) : h, s];
|
|
278
278
|
};
|
|
279
|
-
class
|
|
280
|
-
constructor({ strings:
|
|
279
|
+
class dt {
|
|
280
|
+
constructor({ strings: e, _$litType$: t }, s) {
|
|
281
281
|
let n;
|
|
282
282
|
this.parts = [];
|
|
283
|
-
let
|
|
284
|
-
const
|
|
285
|
-
if (this.el =
|
|
286
|
-
const
|
|
287
|
-
|
|
283
|
+
let l = 0, o = 0;
|
|
284
|
+
const h = e.length - 1, u = this.parts, [d, m] = Hr(e, t);
|
|
285
|
+
if (this.el = dt.createElement(d, s), ze.currentNode = this.el.content, t === 2) {
|
|
286
|
+
const v = this.el.content, $ = v.firstChild;
|
|
287
|
+
$.remove(), v.append(...$.childNodes);
|
|
288
288
|
}
|
|
289
|
-
for (; (n =
|
|
289
|
+
for (; (n = ze.nextNode()) !== null && u.length < h; ) {
|
|
290
290
|
if (n.nodeType === 1) {
|
|
291
291
|
if (n.hasAttributes()) {
|
|
292
|
-
const
|
|
293
|
-
for (const
|
|
294
|
-
if (
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
298
|
-
|
|
292
|
+
const v = [];
|
|
293
|
+
for (const $ of n.getAttributeNames())
|
|
294
|
+
if ($.endsWith(vs) || $.startsWith(Ie)) {
|
|
295
|
+
const M = m[o++];
|
|
296
|
+
if (v.push($), M !== void 0) {
|
|
297
|
+
const j = n.getAttribute(M.toLowerCase() + vs).split(Ie), J = /([.?@])?(.*)/.exec(M);
|
|
298
|
+
u.push({ type: 1, index: l, name: J[2], strings: j, ctor: J[1] === "." ? Fr : J[1] === "?" ? zr : J[1] === "@" ? Wr : Dt });
|
|
299
299
|
} else
|
|
300
|
-
|
|
300
|
+
u.push({ type: 6, index: l });
|
|
301
301
|
}
|
|
302
|
-
for (const
|
|
303
|
-
n.removeAttribute(
|
|
302
|
+
for (const $ of v)
|
|
303
|
+
n.removeAttribute($);
|
|
304
304
|
}
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
-
n.textContent =
|
|
309
|
-
for (let
|
|
310
|
-
n.append(
|
|
311
|
-
n.append(
|
|
305
|
+
if (xi.test(n.tagName)) {
|
|
306
|
+
const v = n.textContent.split(Ie), $ = v.length - 1;
|
|
307
|
+
if ($ > 0) {
|
|
308
|
+
n.textContent = Qe ? Qe.emptyScript : "";
|
|
309
|
+
for (let M = 0; M < $; M++)
|
|
310
|
+
n.append(v[M], ht()), ze.nextNode(), u.push({ type: 2, index: ++l });
|
|
311
|
+
n.append(v[$], ht());
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
} else if (n.nodeType === 8)
|
|
315
|
-
if (n.data ===
|
|
316
|
-
|
|
315
|
+
if (n.data === $i)
|
|
316
|
+
u.push({ type: 2, index: l });
|
|
317
317
|
else {
|
|
318
|
-
let
|
|
319
|
-
for (; (
|
|
320
|
-
|
|
318
|
+
let v = -1;
|
|
319
|
+
for (; (v = n.data.indexOf(Ie, v + 1)) !== -1; )
|
|
320
|
+
u.push({ type: 7, index: l }), v += Ie.length - 1;
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
l++;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
static createElement(
|
|
326
|
-
const s =
|
|
327
|
-
return s.innerHTML =
|
|
325
|
+
static createElement(e, t) {
|
|
326
|
+
const s = We.createElement("template");
|
|
327
|
+
return s.innerHTML = e, s;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
var n,
|
|
332
|
-
if (
|
|
333
|
-
return
|
|
334
|
-
let
|
|
335
|
-
const
|
|
336
|
-
return (
|
|
330
|
+
function et(i, e, t = i, s) {
|
|
331
|
+
var n, l, o, h;
|
|
332
|
+
if (e === Ve)
|
|
333
|
+
return e;
|
|
334
|
+
let u = s !== void 0 ? (n = t._$Co) === null || n === void 0 ? void 0 : n[s] : t._$Cl;
|
|
335
|
+
const d = ut(e) ? void 0 : e._$litDirective$;
|
|
336
|
+
return (u == null ? void 0 : u.constructor) !== d && ((l = u == null ? void 0 : u._$AO) === null || l === void 0 || l.call(u, !1), d === void 0 ? u = void 0 : (u = new d(i), u._$AT(i, t, s)), s !== void 0 ? ((o = (h = t)._$Co) !== null && o !== void 0 ? o : h._$Co = [])[s] = u : t._$Cl = u), u !== void 0 && (e = et(i, u._$AS(i, e.values), u, s)), e;
|
|
337
337
|
}
|
|
338
|
-
class
|
|
339
|
-
constructor(
|
|
340
|
-
this._$AV = [], this._$AN = void 0, this._$AD =
|
|
338
|
+
class Ur {
|
|
339
|
+
constructor(e, t) {
|
|
340
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
341
341
|
}
|
|
342
342
|
get parentNode() {
|
|
343
343
|
return this._$AM.parentNode;
|
|
@@ -345,39 +345,39 @@ class Me {
|
|
|
345
345
|
get _$AU() {
|
|
346
346
|
return this._$AM._$AU;
|
|
347
347
|
}
|
|
348
|
-
u(
|
|
349
|
-
var
|
|
350
|
-
const { el: { content: s }, parts: n } = this._$AD,
|
|
351
|
-
|
|
352
|
-
let o =
|
|
353
|
-
for (;
|
|
354
|
-
if (
|
|
355
|
-
let
|
|
356
|
-
|
|
348
|
+
u(e) {
|
|
349
|
+
var t;
|
|
350
|
+
const { el: { content: s }, parts: n } = this._$AD, l = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : We).importNode(s, !0);
|
|
351
|
+
ze.currentNode = l;
|
|
352
|
+
let o = ze.nextNode(), h = 0, u = 0, d = n[0];
|
|
353
|
+
for (; d !== void 0; ) {
|
|
354
|
+
if (h === d.index) {
|
|
355
|
+
let m;
|
|
356
|
+
d.type === 2 ? m = new pt(o, o.nextSibling, this, e) : d.type === 1 ? m = new d.ctor(o, d.name, d.strings, this, e) : d.type === 6 && (m = new Vr(o, this, e)), this._$AV.push(m), d = n[++u];
|
|
357
357
|
}
|
|
358
|
-
|
|
358
|
+
h !== (d == null ? void 0 : d.index) && (o = ze.nextNode(), h++);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return ze.currentNode = We, l;
|
|
361
361
|
}
|
|
362
|
-
v(
|
|
363
|
-
let
|
|
362
|
+
v(e) {
|
|
363
|
+
let t = 0;
|
|
364
364
|
for (const s of this._$AV)
|
|
365
|
-
s !== void 0 && (s.strings !== void 0 ? (s._$AI(
|
|
365
|
+
s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
class
|
|
369
|
-
constructor(
|
|
370
|
-
var
|
|
371
|
-
this.type = 2, this._$AH =
|
|
368
|
+
class pt {
|
|
369
|
+
constructor(e, t, s, n) {
|
|
370
|
+
var l;
|
|
371
|
+
this.type = 2, this._$AH = te, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = n, this._$Cp = (l = n == null ? void 0 : n.isConnected) === null || l === void 0 || l;
|
|
372
372
|
}
|
|
373
373
|
get _$AU() {
|
|
374
|
-
var
|
|
375
|
-
return (
|
|
374
|
+
var e, t;
|
|
375
|
+
return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cp;
|
|
376
376
|
}
|
|
377
377
|
get parentNode() {
|
|
378
|
-
let
|
|
379
|
-
const
|
|
380
|
-
return
|
|
378
|
+
let e = this._$AA.parentNode;
|
|
379
|
+
const t = this._$AM;
|
|
380
|
+
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
|
|
381
381
|
}
|
|
382
382
|
get startNode() {
|
|
383
383
|
return this._$AA;
|
|
@@ -385,55 +385,55 @@ class et {
|
|
|
385
385
|
get endNode() {
|
|
386
386
|
return this._$AB;
|
|
387
387
|
}
|
|
388
|
-
_$AI(
|
|
389
|
-
|
|
388
|
+
_$AI(e, t = this) {
|
|
389
|
+
e = et(this, e, t), ut(e) ? e === te || e == null || e === "" ? (this._$AH !== te && this._$AR(), this._$AH = te) : e !== this._$AH && e !== Ve && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : Nr(e) ? this.T(e) : this._(e);
|
|
390
390
|
}
|
|
391
|
-
k(
|
|
392
|
-
return this._$AA.parentNode.insertBefore(
|
|
391
|
+
k(e) {
|
|
392
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
393
393
|
}
|
|
394
|
-
$(
|
|
395
|
-
this._$AH !==
|
|
394
|
+
$(e) {
|
|
395
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
|
|
396
396
|
}
|
|
397
|
-
_(
|
|
398
|
-
this._$AH !==
|
|
397
|
+
_(e) {
|
|
398
|
+
this._$AH !== te && ut(this._$AH) ? this._$AA.nextSibling.data = e : this.$(We.createTextNode(e)), this._$AH = e;
|
|
399
399
|
}
|
|
400
|
-
g(
|
|
401
|
-
var
|
|
402
|
-
const { values: s, _$litType$: n } =
|
|
403
|
-
if (((
|
|
400
|
+
g(e) {
|
|
401
|
+
var t;
|
|
402
|
+
const { values: s, _$litType$: n } = e, l = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = dt.createElement(n.h, this.options)), n);
|
|
403
|
+
if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === l)
|
|
404
404
|
this._$AH.v(s);
|
|
405
405
|
else {
|
|
406
|
-
const o = new
|
|
407
|
-
o.v(s), this.$(
|
|
406
|
+
const o = new Ur(l, this), h = o.u(this.options);
|
|
407
|
+
o.v(s), this.$(h), this._$AH = o;
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
_$AC(
|
|
411
|
-
let
|
|
412
|
-
return
|
|
410
|
+
_$AC(e) {
|
|
411
|
+
let t = oi.get(e.strings);
|
|
412
|
+
return t === void 0 && oi.set(e.strings, t = new dt(e)), t;
|
|
413
413
|
}
|
|
414
|
-
T(
|
|
415
|
-
|
|
416
|
-
const
|
|
414
|
+
T(e) {
|
|
415
|
+
_i(this._$AH) || (this._$AH = [], this._$AR());
|
|
416
|
+
const t = this._$AH;
|
|
417
417
|
let s, n = 0;
|
|
418
|
-
for (const
|
|
419
|
-
n ===
|
|
420
|
-
n <
|
|
418
|
+
for (const l of e)
|
|
419
|
+
n === t.length ? t.push(s = new pt(this.k(ht()), this.k(ht()), this, this.options)) : s = t[n], s._$AI(l), n++;
|
|
420
|
+
n < t.length && (this._$AR(s && s._$AB.nextSibling, n), t.length = n);
|
|
421
421
|
}
|
|
422
|
-
_$AR(
|
|
422
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
423
423
|
var s;
|
|
424
|
-
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0,
|
|
425
|
-
const n =
|
|
426
|
-
|
|
424
|
+
for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
|
425
|
+
const n = e.nextSibling;
|
|
426
|
+
e.remove(), e = n;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
setConnected(
|
|
430
|
-
var
|
|
431
|
-
this._$AM === void 0 && (this._$Cp =
|
|
429
|
+
setConnected(e) {
|
|
430
|
+
var t;
|
|
431
|
+
this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
class
|
|
435
|
-
constructor(
|
|
436
|
-
this.type = 1, this._$AH =
|
|
434
|
+
class Dt {
|
|
435
|
+
constructor(e, t, s, n, l) {
|
|
436
|
+
this.type = 1, this._$AH = te, this._$AN = void 0, this.element = e, this.name = t, this._$AM = n, this.options = l, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = te;
|
|
437
437
|
}
|
|
438
438
|
get tagName() {
|
|
439
439
|
return this.element.tagName;
|
|
@@ -441,76 +441,76 @@ class at {
|
|
|
441
441
|
get _$AU() {
|
|
442
442
|
return this._$AM._$AU;
|
|
443
443
|
}
|
|
444
|
-
_$AI(
|
|
445
|
-
const
|
|
444
|
+
_$AI(e, t = this, s, n) {
|
|
445
|
+
const l = this.strings;
|
|
446
446
|
let o = !1;
|
|
447
|
-
if (
|
|
448
|
-
|
|
447
|
+
if (l === void 0)
|
|
448
|
+
e = et(this, e, t, 0), o = !ut(e) || e !== this._$AH && e !== Ve, o && (this._$AH = e);
|
|
449
449
|
else {
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
for (
|
|
453
|
-
|
|
450
|
+
const h = e;
|
|
451
|
+
let u, d;
|
|
452
|
+
for (e = l[0], u = 0; u < l.length - 1; u++)
|
|
453
|
+
d = et(this, h[s + u], t, u), d === Ve && (d = this._$AH[u]), o || (o = !ut(d) || d !== this._$AH[u]), d === te ? e = te : e !== te && (e += (d ?? "") + l[u + 1]), this._$AH[u] = d;
|
|
454
454
|
}
|
|
455
|
-
o && !n && this.j(
|
|
455
|
+
o && !n && this.j(e);
|
|
456
456
|
}
|
|
457
|
-
j(
|
|
458
|
-
|
|
457
|
+
j(e) {
|
|
458
|
+
e === te ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class Fr extends Dt {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
465
|
-
j(
|
|
466
|
-
this.element[this.name] =
|
|
465
|
+
j(e) {
|
|
466
|
+
this.element[this.name] = e === te ? void 0 : e;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
const
|
|
470
|
-
class
|
|
469
|
+
const Br = Qe ? Qe.emptyScript : "";
|
|
470
|
+
class zr extends Dt {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(...arguments), this.type = 4;
|
|
473
473
|
}
|
|
474
|
-
j(
|
|
475
|
-
|
|
474
|
+
j(e) {
|
|
475
|
+
e && e !== te ? this.element.setAttribute(this.name, Br) : this.element.removeAttribute(this.name);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
class
|
|
479
|
-
constructor(
|
|
480
|
-
super(
|
|
478
|
+
class Wr extends Dt {
|
|
479
|
+
constructor(e, t, s, n, l) {
|
|
480
|
+
super(e, t, s, n, l), this.type = 5;
|
|
481
481
|
}
|
|
482
|
-
_$AI(
|
|
482
|
+
_$AI(e, t = this) {
|
|
483
483
|
var s;
|
|
484
|
-
if ((
|
|
484
|
+
if ((e = (s = et(this, e, t, 0)) !== null && s !== void 0 ? s : te) === Ve)
|
|
485
485
|
return;
|
|
486
|
-
const n = this._$AH,
|
|
487
|
-
|
|
486
|
+
const n = this._$AH, l = e === te && n !== te || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, o = e !== te && (n === te || l);
|
|
487
|
+
l && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
488
488
|
}
|
|
489
|
-
handleEvent(
|
|
490
|
-
var
|
|
491
|
-
typeof this._$AH == "function" ? this._$AH.call((s = (
|
|
489
|
+
handleEvent(e) {
|
|
490
|
+
var t, s;
|
|
491
|
+
typeof this._$AH == "function" ? this._$AH.call((s = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && s !== void 0 ? s : this.element, e) : this._$AH.handleEvent(e);
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
class
|
|
495
|
-
constructor(
|
|
496
|
-
this.element =
|
|
494
|
+
class Vr {
|
|
495
|
+
constructor(e, t, s) {
|
|
496
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
|
497
497
|
}
|
|
498
498
|
get _$AU() {
|
|
499
499
|
return this._$AM._$AU;
|
|
500
500
|
}
|
|
501
|
-
_$AI(
|
|
502
|
-
|
|
501
|
+
_$AI(e) {
|
|
502
|
+
et(this, e);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
505
|
+
const li = Ct.litHtmlPolyfillSupport;
|
|
506
|
+
li == null || li(dt, pt), ((ls = Ct.litHtmlVersions) !== null && ls !== void 0 ? ls : Ct.litHtmlVersions = []).push("2.7.4");
|
|
507
|
+
const Yr = (i, e, t) => {
|
|
508
508
|
var s, n;
|
|
509
|
-
const
|
|
510
|
-
let o =
|
|
509
|
+
const l = (s = t == null ? void 0 : t.renderBefore) !== null && s !== void 0 ? s : e;
|
|
510
|
+
let o = l._$litPart$;
|
|
511
511
|
if (o === void 0) {
|
|
512
|
-
const
|
|
513
|
-
|
|
512
|
+
const h = (n = t == null ? void 0 : t.renderBefore) !== null && n !== void 0 ? n : null;
|
|
513
|
+
l._$litPart$ = o = new pt(e.insertBefore(ht(), h), h, void 0, t ?? {});
|
|
514
514
|
}
|
|
515
515
|
return o._$AI(i), o;
|
|
516
516
|
};
|
|
@@ -519,97 +519,97 @@ const Te = (i, t, e) => {
|
|
|
519
519
|
* Copyright 2017 Google LLC
|
|
520
520
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
521
521
|
*/
|
|
522
|
-
var
|
|
523
|
-
class
|
|
522
|
+
var cs, hs;
|
|
523
|
+
class ct extends Ze {
|
|
524
524
|
constructor() {
|
|
525
525
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
526
526
|
}
|
|
527
527
|
createRenderRoot() {
|
|
528
|
-
var
|
|
528
|
+
var e, t;
|
|
529
529
|
const s = super.createRenderRoot();
|
|
530
|
-
return (
|
|
530
|
+
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = s.firstChild), s;
|
|
531
531
|
}
|
|
532
|
-
update(
|
|
533
|
-
const
|
|
534
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(
|
|
532
|
+
update(e) {
|
|
533
|
+
const t = this.render();
|
|
534
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Yr(t, this.renderRoot, this.renderOptions);
|
|
535
535
|
}
|
|
536
536
|
connectedCallback() {
|
|
537
|
-
var
|
|
538
|
-
super.connectedCallback(), (
|
|
537
|
+
var e;
|
|
538
|
+
super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
|
|
539
539
|
}
|
|
540
540
|
disconnectedCallback() {
|
|
541
|
-
var
|
|
542
|
-
super.disconnectedCallback(), (
|
|
541
|
+
var e;
|
|
542
|
+
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
|
543
543
|
}
|
|
544
544
|
render() {
|
|
545
|
-
return
|
|
545
|
+
return Ve;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
((
|
|
548
|
+
ct.finalized = !0, ct._$litElement$ = !0, (cs = globalThis.litElementHydrateSupport) === null || cs === void 0 || cs.call(globalThis, { LitElement: ct });
|
|
549
|
+
const ai = globalThis.litElementPolyfillSupport;
|
|
550
|
+
ai == null || ai({ LitElement: ct });
|
|
551
|
+
((hs = globalThis.litElementVersions) !== null && hs !== void 0 ? hs : globalThis.litElementVersions = []).push("3.3.2");
|
|
552
552
|
/**
|
|
553
553
|
* @license
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const
|
|
558
|
-
const { kind: n, elements:
|
|
559
|
-
return { kind: n, elements:
|
|
560
|
-
customElements.define(
|
|
557
|
+
const Kr = (i) => (e) => typeof e == "function" ? ((t, s) => (customElements.define(t, s), s))(i, e) : ((t, s) => {
|
|
558
|
+
const { kind: n, elements: l } = s;
|
|
559
|
+
return { kind: n, elements: l, finisher(o) {
|
|
560
|
+
customElements.define(t, o);
|
|
561
561
|
} };
|
|
562
|
-
})(i,
|
|
562
|
+
})(i, e);
|
|
563
563
|
/**
|
|
564
564
|
* @license
|
|
565
565
|
* Copyright 2017 Google LLC
|
|
566
566
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
567
567
|
*/
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey:
|
|
571
|
-
typeof
|
|
572
|
-
}, finisher(
|
|
573
|
-
|
|
574
|
-
} }
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
568
|
+
const qr = (i, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
|
|
569
|
+
t.createProperty(e.key, i);
|
|
570
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
|
|
571
|
+
typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
|
|
572
|
+
}, finisher(t) {
|
|
573
|
+
t.createProperty(e.key, i);
|
|
574
|
+
} }, Xr = (i, e, t) => {
|
|
575
|
+
e.constructor.createProperty(t, i);
|
|
576
|
+
};
|
|
577
|
+
function Ss(i) {
|
|
578
|
+
return (e, t) => t !== void 0 ? Xr(i, e, t) : qr(i, e);
|
|
579
579
|
}
|
|
580
580
|
/**
|
|
581
581
|
* @license
|
|
582
582
|
* Copyright 2017 Google LLC
|
|
583
583
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
584
584
|
*/
|
|
585
|
-
function
|
|
586
|
-
return
|
|
585
|
+
function Tt(i) {
|
|
586
|
+
return Ss({ ...i, state: !0 });
|
|
587
587
|
}
|
|
588
588
|
/**
|
|
589
589
|
* @license
|
|
590
590
|
* Copyright 2021 Google LLC
|
|
591
591
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
592
592
|
*/
|
|
593
|
-
var
|
|
594
|
-
((
|
|
593
|
+
var us;
|
|
594
|
+
((us = window.HTMLSlotElement) === null || us === void 0 ? void 0 : us.prototype.assignedElements) != null;
|
|
595
595
|
/**
|
|
596
596
|
* @license
|
|
597
597
|
* Copyright 2021 Google LLC
|
|
598
598
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
599
599
|
*/
|
|
600
|
-
function
|
|
601
|
-
return i ?
|
|
600
|
+
function ot(i, e, t) {
|
|
601
|
+
return i ? e() : t == null ? void 0 : t();
|
|
602
602
|
}
|
|
603
603
|
/**
|
|
604
604
|
* @license
|
|
605
605
|
* Copyright 2021 Google LLC
|
|
606
606
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
607
607
|
*/
|
|
608
|
-
function*
|
|
608
|
+
function* lt(i, e) {
|
|
609
609
|
if (i !== void 0) {
|
|
610
|
-
let
|
|
610
|
+
let t = 0;
|
|
611
611
|
for (const s of i)
|
|
612
|
-
yield
|
|
612
|
+
yield e(s, t++);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
@@ -617,21 +617,21 @@ function* X(i, t) {
|
|
|
617
617
|
* Copyright 2017 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
|
-
const
|
|
621
|
-
class
|
|
622
|
-
constructor(
|
|
620
|
+
const Gr = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Jr = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
621
|
+
class Zr {
|
|
622
|
+
constructor(e) {
|
|
623
623
|
}
|
|
624
624
|
get _$AU() {
|
|
625
625
|
return this._$AM._$AU;
|
|
626
626
|
}
|
|
627
|
-
_$AT(
|
|
628
|
-
this._$Ct =
|
|
627
|
+
_$AT(e, t, s) {
|
|
628
|
+
this._$Ct = e, this._$AM = t, this._$Ci = s;
|
|
629
629
|
}
|
|
630
|
-
_$AS(
|
|
631
|
-
return this.update(
|
|
630
|
+
_$AS(e, t) {
|
|
631
|
+
return this.update(e, t);
|
|
632
632
|
}
|
|
633
|
-
update(
|
|
634
|
-
return this.render(...
|
|
633
|
+
update(e, t) {
|
|
634
|
+
return this.render(...t);
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
/**
|
|
@@ -639,78 +639,78 @@ class He {
|
|
|
639
639
|
* Copyright 2017 Google LLC
|
|
640
640
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
641
641
|
*/
|
|
642
|
-
class
|
|
643
|
-
constructor(
|
|
644
|
-
if (super(
|
|
642
|
+
class ms extends Zr {
|
|
643
|
+
constructor(e) {
|
|
644
|
+
if (super(e), this.et = te, e.type !== Gr.CHILD)
|
|
645
645
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
646
646
|
}
|
|
647
|
-
render(
|
|
648
|
-
if (
|
|
649
|
-
return this.ft = void 0, this.et =
|
|
650
|
-
if (
|
|
651
|
-
return
|
|
652
|
-
if (typeof
|
|
647
|
+
render(e) {
|
|
648
|
+
if (e === te || e == null)
|
|
649
|
+
return this.ft = void 0, this.et = e;
|
|
650
|
+
if (e === Ve)
|
|
651
|
+
return e;
|
|
652
|
+
if (typeof e != "string")
|
|
653
653
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
654
|
-
if (
|
|
654
|
+
if (e === this.et)
|
|
655
655
|
return this.ft;
|
|
656
|
-
this.et =
|
|
657
|
-
const
|
|
658
|
-
return
|
|
656
|
+
this.et = e;
|
|
657
|
+
const t = [e];
|
|
658
|
+
return t.raw = t, this.ft = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
function
|
|
664
|
-
return Array.isArray ? Array.isArray(i) :
|
|
661
|
+
ms.directiveName = "unsafeHTML", ms.resultType = 1;
|
|
662
|
+
const ci = Jr(ms);
|
|
663
|
+
function Re(i) {
|
|
664
|
+
return Array.isArray ? Array.isArray(i) : Mi(i) === "[object Array]";
|
|
665
665
|
}
|
|
666
|
-
const
|
|
667
|
-
function
|
|
666
|
+
const Qr = 1 / 0;
|
|
667
|
+
function en(i) {
|
|
668
668
|
if (typeof i == "string")
|
|
669
669
|
return i;
|
|
670
|
-
let
|
|
671
|
-
return
|
|
670
|
+
let e = i + "";
|
|
671
|
+
return e == "0" && 1 / i == -Qr ? "-0" : e;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return i == null ? "" :
|
|
673
|
+
function tn(i) {
|
|
674
|
+
return i == null ? "" : en(i);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Te(i) {
|
|
677
677
|
return typeof i == "string";
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function wi(i) {
|
|
680
680
|
return typeof i == "number";
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return i === !0 || i === !1 ||
|
|
682
|
+
function sn(i) {
|
|
683
|
+
return i === !0 || i === !1 || rn(i) && Mi(i) == "[object Boolean]";
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Ai(i) {
|
|
686
686
|
return typeof i == "object";
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function rn(i) {
|
|
689
|
+
return Ai(i) && i !== null;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function xe(i) {
|
|
692
692
|
return i != null;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function ds(i) {
|
|
695
695
|
return !i.trim().length;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Mi(i) {
|
|
698
698
|
return i == null ? i === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(i);
|
|
699
699
|
}
|
|
700
|
-
const
|
|
701
|
-
class
|
|
702
|
-
constructor(
|
|
700
|
+
const nn = "Incorrect 'index' type", on = (i) => `Invalid value for key ${i}`, ln = (i) => `Pattern length exceeds max of ${i}.`, an = (i) => `Missing ${i} property in key`, cn = (i) => `Property 'weight' in key '${i}' must be a positive integer`, hi = Object.prototype.hasOwnProperty;
|
|
701
|
+
class hn {
|
|
702
|
+
constructor(e) {
|
|
703
703
|
this._keys = [], this._keyMap = {};
|
|
704
|
-
let
|
|
705
|
-
|
|
706
|
-
let n =
|
|
707
|
-
|
|
704
|
+
let t = 0;
|
|
705
|
+
e.forEach((s) => {
|
|
706
|
+
let n = Si(s);
|
|
707
|
+
t += n.weight, this._keys.push(n), this._keyMap[n.id] = n, t += n.weight;
|
|
708
708
|
}), this._keys.forEach((s) => {
|
|
709
|
-
s.weight /=
|
|
709
|
+
s.weight /= t;
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
get(
|
|
713
|
-
return this._keyMap[
|
|
712
|
+
get(e) {
|
|
713
|
+
return this._keyMap[e];
|
|
714
714
|
}
|
|
715
715
|
keys() {
|
|
716
716
|
return this._keys;
|
|
@@ -719,50 +719,50 @@ class Je {
|
|
|
719
719
|
return JSON.stringify(this._keys);
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
let
|
|
724
|
-
if (
|
|
725
|
-
s = i,
|
|
722
|
+
function Si(i) {
|
|
723
|
+
let e = null, t = null, s = null, n = 1, l = null;
|
|
724
|
+
if (Te(i) || Re(i))
|
|
725
|
+
s = i, e = ui(i), t = ys(i);
|
|
726
726
|
else {
|
|
727
|
-
if (!
|
|
728
|
-
throw new Error(
|
|
727
|
+
if (!hi.call(i, "name"))
|
|
728
|
+
throw new Error(an("name"));
|
|
729
729
|
const o = i.name;
|
|
730
|
-
if (s = o,
|
|
731
|
-
throw new Error(
|
|
732
|
-
|
|
730
|
+
if (s = o, hi.call(i, "weight") && (n = i.weight, n <= 0))
|
|
731
|
+
throw new Error(cn(o));
|
|
732
|
+
e = ui(o), t = ys(o), l = i.getFn;
|
|
733
733
|
}
|
|
734
|
-
return { path:
|
|
734
|
+
return { path: e, id: t, weight: n, src: s, getFn: l };
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return
|
|
736
|
+
function ui(i) {
|
|
737
|
+
return Re(i) ? i : i.split(".");
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
739
|
+
function ys(i) {
|
|
740
|
+
return Re(i) ? i.join(".") : i;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
let
|
|
744
|
-
const n = (
|
|
745
|
-
if (
|
|
746
|
-
if (!o[
|
|
747
|
-
|
|
742
|
+
function un(i, e) {
|
|
743
|
+
let t = [], s = !1;
|
|
744
|
+
const n = (l, o, h) => {
|
|
745
|
+
if (xe(l))
|
|
746
|
+
if (!o[h])
|
|
747
|
+
t.push(l);
|
|
748
748
|
else {
|
|
749
|
-
let
|
|
750
|
-
const
|
|
751
|
-
if (!
|
|
749
|
+
let u = o[h];
|
|
750
|
+
const d = l[u];
|
|
751
|
+
if (!xe(d))
|
|
752
752
|
return;
|
|
753
|
-
if (
|
|
754
|
-
|
|
755
|
-
else if (
|
|
753
|
+
if (h === o.length - 1 && (Te(d) || wi(d) || sn(d)))
|
|
754
|
+
t.push(tn(d));
|
|
755
|
+
else if (Re(d)) {
|
|
756
756
|
s = !0;
|
|
757
|
-
for (let
|
|
758
|
-
n(
|
|
757
|
+
for (let m = 0, v = d.length; m < v; m += 1)
|
|
758
|
+
n(d[m], o, h + 1);
|
|
759
759
|
} else
|
|
760
|
-
o.length && n(
|
|
760
|
+
o.length && n(d, o, h + 1);
|
|
761
761
|
}
|
|
762
762
|
};
|
|
763
|
-
return n(i,
|
|
763
|
+
return n(i, Te(e) ? e.split(".") : e, 0), s ? t : t[0];
|
|
764
764
|
}
|
|
765
|
-
const
|
|
765
|
+
const dn = {
|
|
766
766
|
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
767
767
|
// set will include the indices of the matched characters.
|
|
768
768
|
// These can consequently be used for highlighting purposes.
|
|
@@ -772,7 +772,7 @@ const Qe = {
|
|
|
772
772
|
findAllMatches: !1,
|
|
773
773
|
// Minimum number of characters that must be matched before a result is considered a match
|
|
774
774
|
minMatchCharLength: 1
|
|
775
|
-
},
|
|
775
|
+
}, pn = {
|
|
776
776
|
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
777
777
|
// match is found before the end of the same input.
|
|
778
778
|
isCaseSensitive: !1,
|
|
@@ -783,8 +783,8 @@ const Qe = {
|
|
|
783
783
|
// Whether to sort the result list, by score
|
|
784
784
|
shouldSort: !0,
|
|
785
785
|
// Default sort function: sort by ascending score, ascending index
|
|
786
|
-
sortFn: (i,
|
|
787
|
-
},
|
|
786
|
+
sortFn: (i, e) => i.score === e.score ? i.idx < e.idx ? -1 : 1 : i.score < e.score ? -1 : 1
|
|
787
|
+
}, fn = {
|
|
788
788
|
// Approximately where in the text is the pattern expected to be found?
|
|
789
789
|
location: 0,
|
|
790
790
|
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
@@ -796,12 +796,12 @@ const Qe = {
|
|
|
796
796
|
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
797
797
|
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
798
798
|
distance: 100
|
|
799
|
-
},
|
|
799
|
+
}, gn = {
|
|
800
800
|
// When `true`, it enables the use of unix-like search commands
|
|
801
801
|
useExtendedSearch: !1,
|
|
802
802
|
// The get function to use when fetching an object's properties.
|
|
803
803
|
// The default will search nested paths *ie foo.bar.baz*
|
|
804
|
-
getFn:
|
|
804
|
+
getFn: un,
|
|
805
805
|
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
806
806
|
// where in the string the pattern appears.
|
|
807
807
|
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
@@ -813,113 +813,113 @@ const Qe = {
|
|
|
813
813
|
// The weight to determine how much field length norm effects scoring.
|
|
814
814
|
fieldNormWeight: 1
|
|
815
815
|
};
|
|
816
|
-
var
|
|
817
|
-
...
|
|
818
|
-
...
|
|
819
|
-
...
|
|
820
|
-
...
|
|
816
|
+
var T = {
|
|
817
|
+
...pn,
|
|
818
|
+
...dn,
|
|
819
|
+
...fn,
|
|
820
|
+
...gn
|
|
821
821
|
};
|
|
822
|
-
const
|
|
823
|
-
function
|
|
824
|
-
const
|
|
822
|
+
const vn = /[^ ]+/g;
|
|
823
|
+
function mn(i = 1, e = 3) {
|
|
824
|
+
const t = /* @__PURE__ */ new Map(), s = Math.pow(10, e);
|
|
825
825
|
return {
|
|
826
826
|
get(n) {
|
|
827
|
-
const
|
|
828
|
-
if (
|
|
829
|
-
return
|
|
830
|
-
const o = 1 / Math.pow(
|
|
831
|
-
return
|
|
827
|
+
const l = n.match(vn).length;
|
|
828
|
+
if (t.has(l))
|
|
829
|
+
return t.get(l);
|
|
830
|
+
const o = 1 / Math.pow(l, 0.5 * i), h = parseFloat(Math.round(o * s) / s);
|
|
831
|
+
return t.set(l, h), h;
|
|
832
832
|
},
|
|
833
833
|
clear() {
|
|
834
|
-
|
|
834
|
+
t.clear();
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class Es {
|
|
839
839
|
constructor({
|
|
840
|
-
getFn:
|
|
841
|
-
fieldNormWeight:
|
|
840
|
+
getFn: e = T.getFn,
|
|
841
|
+
fieldNormWeight: t = T.fieldNormWeight
|
|
842
842
|
} = {}) {
|
|
843
|
-
this.norm =
|
|
843
|
+
this.norm = mn(t, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
844
844
|
}
|
|
845
|
-
setSources(
|
|
846
|
-
this.docs =
|
|
845
|
+
setSources(e = []) {
|
|
846
|
+
this.docs = e;
|
|
847
847
|
}
|
|
848
|
-
setIndexRecords(
|
|
849
|
-
this.records =
|
|
848
|
+
setIndexRecords(e = []) {
|
|
849
|
+
this.records = e;
|
|
850
850
|
}
|
|
851
|
-
setKeys(
|
|
852
|
-
this.keys =
|
|
853
|
-
this._keysMap[
|
|
851
|
+
setKeys(e = []) {
|
|
852
|
+
this.keys = e, this._keysMap = {}, e.forEach((t, s) => {
|
|
853
|
+
this._keysMap[t.id] = s;
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
create() {
|
|
857
|
-
this.isCreated || !this.docs.length || (this.isCreated = !0,
|
|
858
|
-
this._addString(
|
|
859
|
-
}) : this.docs.forEach((
|
|
860
|
-
this._addObject(
|
|
857
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, Te(this.docs[0]) ? this.docs.forEach((e, t) => {
|
|
858
|
+
this._addString(e, t);
|
|
859
|
+
}) : this.docs.forEach((e, t) => {
|
|
860
|
+
this._addObject(e, t);
|
|
861
861
|
}), this.norm.clear());
|
|
862
862
|
}
|
|
863
863
|
// Adds a doc to the end of the index
|
|
864
|
-
add(
|
|
865
|
-
const
|
|
866
|
-
|
|
864
|
+
add(e) {
|
|
865
|
+
const t = this.size();
|
|
866
|
+
Te(e) ? this._addString(e, t) : this._addObject(e, t);
|
|
867
867
|
}
|
|
868
868
|
// Removes the doc at the specified index of the index
|
|
869
|
-
removeAt(
|
|
870
|
-
this.records.splice(
|
|
871
|
-
for (let
|
|
872
|
-
this.records[
|
|
869
|
+
removeAt(e) {
|
|
870
|
+
this.records.splice(e, 1);
|
|
871
|
+
for (let t = e, s = this.size(); t < s; t += 1)
|
|
872
|
+
this.records[t].i -= 1;
|
|
873
873
|
}
|
|
874
|
-
getValueForItemAtKeyId(
|
|
875
|
-
return
|
|
874
|
+
getValueForItemAtKeyId(e, t) {
|
|
875
|
+
return e[this._keysMap[t]];
|
|
876
876
|
}
|
|
877
877
|
size() {
|
|
878
878
|
return this.records.length;
|
|
879
879
|
}
|
|
880
|
-
_addString(
|
|
881
|
-
if (!
|
|
880
|
+
_addString(e, t) {
|
|
881
|
+
if (!xe(e) || ds(e))
|
|
882
882
|
return;
|
|
883
883
|
let s = {
|
|
884
|
-
v:
|
|
885
|
-
i:
|
|
886
|
-
n: this.norm.get(
|
|
884
|
+
v: e,
|
|
885
|
+
i: t,
|
|
886
|
+
n: this.norm.get(e)
|
|
887
887
|
};
|
|
888
888
|
this.records.push(s);
|
|
889
889
|
}
|
|
890
|
-
_addObject(
|
|
891
|
-
let s = { i:
|
|
892
|
-
this.keys.forEach((n,
|
|
893
|
-
let o = n.getFn ? n.getFn(
|
|
894
|
-
if (
|
|
895
|
-
if (
|
|
896
|
-
let
|
|
897
|
-
const
|
|
898
|
-
for (;
|
|
899
|
-
const { nestedArrIndex:
|
|
900
|
-
if (
|
|
901
|
-
if (
|
|
902
|
-
let
|
|
903
|
-
v:
|
|
904
|
-
i:
|
|
905
|
-
n: this.norm.get(
|
|
890
|
+
_addObject(e, t) {
|
|
891
|
+
let s = { i: t, $: {} };
|
|
892
|
+
this.keys.forEach((n, l) => {
|
|
893
|
+
let o = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
|
|
894
|
+
if (xe(o)) {
|
|
895
|
+
if (Re(o)) {
|
|
896
|
+
let h = [];
|
|
897
|
+
const u = [{ nestedArrIndex: -1, value: o }];
|
|
898
|
+
for (; u.length; ) {
|
|
899
|
+
const { nestedArrIndex: d, value: m } = u.pop();
|
|
900
|
+
if (xe(m))
|
|
901
|
+
if (Te(m) && !ds(m)) {
|
|
902
|
+
let v = {
|
|
903
|
+
v: m,
|
|
904
|
+
i: d,
|
|
905
|
+
n: this.norm.get(m)
|
|
906
906
|
};
|
|
907
|
-
|
|
907
|
+
h.push(v);
|
|
908
908
|
} else
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
nestedArrIndex:
|
|
912
|
-
value:
|
|
909
|
+
Re(m) && m.forEach((v, $) => {
|
|
910
|
+
u.push({
|
|
911
|
+
nestedArrIndex: $,
|
|
912
|
+
value: v
|
|
913
913
|
});
|
|
914
914
|
});
|
|
915
915
|
}
|
|
916
|
-
s.$[
|
|
917
|
-
} else if (
|
|
918
|
-
let
|
|
916
|
+
s.$[l] = h;
|
|
917
|
+
} else if (Te(o) && !ds(o)) {
|
|
918
|
+
let h = {
|
|
919
919
|
v: o,
|
|
920
920
|
n: this.norm.get(o)
|
|
921
921
|
};
|
|
922
|
-
s.$[
|
|
922
|
+
s.$[l] = h;
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
}), this.records.push(s);
|
|
@@ -931,221 +931,221 @@ class Tt {
|
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
const n = new
|
|
936
|
-
return n.setKeys(i.map(
|
|
934
|
+
function Ei(i, e, { getFn: t = T.getFn, fieldNormWeight: s = T.fieldNormWeight } = {}) {
|
|
935
|
+
const n = new Es({ getFn: t, fieldNormWeight: s });
|
|
936
|
+
return n.setKeys(i.map(Si)), n.setSources(e), n.create(), n;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
const { keys: s, records: n } = i,
|
|
940
|
-
return
|
|
938
|
+
function yn(i, { getFn: e = T.getFn, fieldNormWeight: t = T.fieldNormWeight } = {}) {
|
|
939
|
+
const { keys: s, records: n } = i, l = new Es({ getFn: e, fieldNormWeight: t });
|
|
940
|
+
return l.setKeys(s), l.setIndexRecords(n), l;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
errors:
|
|
944
|
-
currentLocation:
|
|
942
|
+
function St(i, {
|
|
943
|
+
errors: e = 0,
|
|
944
|
+
currentLocation: t = 0,
|
|
945
945
|
expectedLocation: s = 0,
|
|
946
|
-
distance: n =
|
|
947
|
-
ignoreLocation:
|
|
946
|
+
distance: n = T.distance,
|
|
947
|
+
ignoreLocation: l = T.ignoreLocation
|
|
948
948
|
} = {}) {
|
|
949
|
-
const o =
|
|
950
|
-
if (
|
|
949
|
+
const o = e / i.length;
|
|
950
|
+
if (l)
|
|
951
951
|
return o;
|
|
952
|
-
const
|
|
953
|
-
return n ? o +
|
|
954
|
-
}
|
|
955
|
-
function
|
|
956
|
-
let
|
|
957
|
-
for (let o = i.length;
|
|
958
|
-
let
|
|
959
|
-
|
|
960
|
-
}
|
|
961
|
-
return i[
|
|
962
|
-
}
|
|
963
|
-
const
|
|
964
|
-
function
|
|
965
|
-
location: s =
|
|
966
|
-
distance: n =
|
|
967
|
-
threshold:
|
|
968
|
-
findAllMatches: o =
|
|
969
|
-
minMatchCharLength:
|
|
970
|
-
includeMatches:
|
|
971
|
-
ignoreLocation:
|
|
952
|
+
const h = Math.abs(s - t);
|
|
953
|
+
return n ? o + h / n : h ? 1 : o;
|
|
954
|
+
}
|
|
955
|
+
function bn(i = [], e = T.minMatchCharLength) {
|
|
956
|
+
let t = [], s = -1, n = -1, l = 0;
|
|
957
|
+
for (let o = i.length; l < o; l += 1) {
|
|
958
|
+
let h = i[l];
|
|
959
|
+
h && s === -1 ? s = l : !h && s !== -1 && (n = l - 1, n - s + 1 >= e && t.push([s, n]), s = -1);
|
|
960
|
+
}
|
|
961
|
+
return i[l - 1] && l - s >= e && t.push([s, l - 1]), t;
|
|
962
|
+
}
|
|
963
|
+
const Be = 32;
|
|
964
|
+
function $n(i, e, t, {
|
|
965
|
+
location: s = T.location,
|
|
966
|
+
distance: n = T.distance,
|
|
967
|
+
threshold: l = T.threshold,
|
|
968
|
+
findAllMatches: o = T.findAllMatches,
|
|
969
|
+
minMatchCharLength: h = T.minMatchCharLength,
|
|
970
|
+
includeMatches: u = T.includeMatches,
|
|
971
|
+
ignoreLocation: d = T.ignoreLocation
|
|
972
972
|
} = {}) {
|
|
973
|
-
if (
|
|
974
|
-
throw new Error(
|
|
975
|
-
const
|
|
976
|
-
let
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
for (; (
|
|
980
|
-
let
|
|
981
|
-
currentLocation:
|
|
982
|
-
expectedLocation:
|
|
973
|
+
if (e.length > Be)
|
|
974
|
+
throw new Error(ln(Be));
|
|
975
|
+
const m = e.length, v = i.length, $ = Math.max(0, Math.min(s, v));
|
|
976
|
+
let M = l, j = $;
|
|
977
|
+
const J = h > 1 || u, ge = J ? Array(v) : [];
|
|
978
|
+
let le;
|
|
979
|
+
for (; (le = i.indexOf(e, j)) > -1; ) {
|
|
980
|
+
let X = St(e, {
|
|
981
|
+
currentLocation: le,
|
|
982
|
+
expectedLocation: $,
|
|
983
983
|
distance: n,
|
|
984
|
-
ignoreLocation:
|
|
984
|
+
ignoreLocation: d
|
|
985
985
|
});
|
|
986
|
-
if (
|
|
987
|
-
let
|
|
988
|
-
for (;
|
|
989
|
-
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
let
|
|
994
|
-
const
|
|
995
|
-
for (let
|
|
996
|
-
let
|
|
997
|
-
for (;
|
|
998
|
-
|
|
999
|
-
errors:
|
|
1000
|
-
currentLocation:
|
|
1001
|
-
expectedLocation:
|
|
986
|
+
if (M = Math.min(X, M), j = le + m, J) {
|
|
987
|
+
let ie = 0;
|
|
988
|
+
for (; ie < m; )
|
|
989
|
+
ge[le + ie] = 1, ie += 1;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
j = -1;
|
|
993
|
+
let ve = [], pe = 1, Me = m + v;
|
|
994
|
+
const me = 1 << m - 1;
|
|
995
|
+
for (let X = 0; X < m; X += 1) {
|
|
996
|
+
let ie = 0, z = Me;
|
|
997
|
+
for (; ie < z; )
|
|
998
|
+
St(e, {
|
|
999
|
+
errors: X,
|
|
1000
|
+
currentLocation: $ + z,
|
|
1001
|
+
expectedLocation: $,
|
|
1002
1002
|
distance: n,
|
|
1003
|
-
ignoreLocation:
|
|
1004
|
-
}) <=
|
|
1005
|
-
|
|
1006
|
-
let
|
|
1007
|
-
|
|
1008
|
-
for (let
|
|
1009
|
-
let
|
|
1010
|
-
if (
|
|
1011
|
-
errors:
|
|
1012
|
-
currentLocation:
|
|
1013
|
-
expectedLocation:
|
|
1003
|
+
ignoreLocation: d
|
|
1004
|
+
}) <= M ? ie = z : Me = z, z = Math.floor((Me - ie) / 2 + ie);
|
|
1005
|
+
Me = z;
|
|
1006
|
+
let B = Math.max(1, $ - z + 1), Ce = o ? v : Math.min($ + z, v) + m, Se = Array(Ce + 2);
|
|
1007
|
+
Se[Ce + 1] = (1 << X) - 1;
|
|
1008
|
+
for (let y = Ce; y >= B; y -= 1) {
|
|
1009
|
+
let b = y - 1, k = t[i.charAt(b)];
|
|
1010
|
+
if (J && (ge[b] = +!!k), Se[y] = (Se[y + 1] << 1 | 1) & k, X && (Se[y] |= (ve[y + 1] | ve[y]) << 1 | 1 | ve[y + 1]), Se[y] & me && (pe = St(e, {
|
|
1011
|
+
errors: X,
|
|
1012
|
+
currentLocation: b,
|
|
1013
|
+
expectedLocation: $,
|
|
1014
1014
|
distance: n,
|
|
1015
|
-
ignoreLocation:
|
|
1016
|
-
}),
|
|
1017
|
-
if (
|
|
1015
|
+
ignoreLocation: d
|
|
1016
|
+
}), pe <= M)) {
|
|
1017
|
+
if (M = pe, j = b, j <= $)
|
|
1018
1018
|
break;
|
|
1019
|
-
|
|
1019
|
+
B = Math.max(1, 2 * $ - j);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
if (
|
|
1023
|
-
errors:
|
|
1024
|
-
currentLocation:
|
|
1025
|
-
expectedLocation:
|
|
1022
|
+
if (St(e, {
|
|
1023
|
+
errors: X + 1,
|
|
1024
|
+
currentLocation: $,
|
|
1025
|
+
expectedLocation: $,
|
|
1026
1026
|
distance: n,
|
|
1027
|
-
ignoreLocation:
|
|
1028
|
-
}) >
|
|
1027
|
+
ignoreLocation: d
|
|
1028
|
+
}) > M)
|
|
1029
1029
|
break;
|
|
1030
|
-
|
|
1030
|
+
ve = Se;
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1033
|
-
isMatch:
|
|
1032
|
+
const F = {
|
|
1033
|
+
isMatch: j >= 0,
|
|
1034
1034
|
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
1035
|
-
score: Math.max(1e-3,
|
|
1035
|
+
score: Math.max(1e-3, pe)
|
|
1036
1036
|
};
|
|
1037
|
-
if (
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1037
|
+
if (J) {
|
|
1038
|
+
const X = bn(ge, h);
|
|
1039
|
+
X.length ? u && (F.indices = X) : F.isMatch = !1;
|
|
1040
1040
|
}
|
|
1041
|
-
return
|
|
1041
|
+
return F;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
let
|
|
1045
|
-
for (let
|
|
1046
|
-
const n = i.charAt(
|
|
1047
|
-
|
|
1043
|
+
function _n(i) {
|
|
1044
|
+
let e = {};
|
|
1045
|
+
for (let t = 0, s = i.length; t < s; t += 1) {
|
|
1046
|
+
const n = i.charAt(t);
|
|
1047
|
+
e[n] = (e[n] || 0) | 1 << s - t - 1;
|
|
1048
1048
|
}
|
|
1049
|
-
return
|
|
1049
|
+
return e;
|
|
1050
1050
|
}
|
|
1051
|
-
class
|
|
1052
|
-
constructor(
|
|
1053
|
-
location:
|
|
1054
|
-
threshold: s =
|
|
1055
|
-
distance: n =
|
|
1056
|
-
includeMatches:
|
|
1057
|
-
findAllMatches: o =
|
|
1058
|
-
minMatchCharLength:
|
|
1059
|
-
isCaseSensitive:
|
|
1060
|
-
ignoreLocation:
|
|
1051
|
+
class ki {
|
|
1052
|
+
constructor(e, {
|
|
1053
|
+
location: t = T.location,
|
|
1054
|
+
threshold: s = T.threshold,
|
|
1055
|
+
distance: n = T.distance,
|
|
1056
|
+
includeMatches: l = T.includeMatches,
|
|
1057
|
+
findAllMatches: o = T.findAllMatches,
|
|
1058
|
+
minMatchCharLength: h = T.minMatchCharLength,
|
|
1059
|
+
isCaseSensitive: u = T.isCaseSensitive,
|
|
1060
|
+
ignoreLocation: d = T.ignoreLocation
|
|
1061
1061
|
} = {}) {
|
|
1062
1062
|
if (this.options = {
|
|
1063
|
-
location:
|
|
1063
|
+
location: t,
|
|
1064
1064
|
threshold: s,
|
|
1065
1065
|
distance: n,
|
|
1066
|
-
includeMatches:
|
|
1066
|
+
includeMatches: l,
|
|
1067
1067
|
findAllMatches: o,
|
|
1068
|
-
minMatchCharLength:
|
|
1069
|
-
isCaseSensitive:
|
|
1070
|
-
ignoreLocation:
|
|
1071
|
-
}, this.pattern =
|
|
1068
|
+
minMatchCharLength: h,
|
|
1069
|
+
isCaseSensitive: u,
|
|
1070
|
+
ignoreLocation: d
|
|
1071
|
+
}, this.pattern = u ? e : e.toLowerCase(), this.chunks = [], !this.pattern.length)
|
|
1072
1072
|
return;
|
|
1073
|
-
const
|
|
1073
|
+
const m = ($, M) => {
|
|
1074
1074
|
this.chunks.push({
|
|
1075
|
-
pattern:
|
|
1076
|
-
alphabet:
|
|
1077
|
-
startIndex:
|
|
1075
|
+
pattern: $,
|
|
1076
|
+
alphabet: _n($),
|
|
1077
|
+
startIndex: M
|
|
1078
1078
|
});
|
|
1079
|
-
},
|
|
1080
|
-
if (
|
|
1081
|
-
let
|
|
1082
|
-
const
|
|
1083
|
-
for (;
|
|
1084
|
-
|
|
1085
|
-
if (
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1079
|
+
}, v = this.pattern.length;
|
|
1080
|
+
if (v > Be) {
|
|
1081
|
+
let $ = 0;
|
|
1082
|
+
const M = v % Be, j = v - M;
|
|
1083
|
+
for (; $ < j; )
|
|
1084
|
+
m(this.pattern.substr($, Be), $), $ += Be;
|
|
1085
|
+
if (M) {
|
|
1086
|
+
const J = v - Be;
|
|
1087
|
+
m(this.pattern.substr(J), J);
|
|
1088
1088
|
}
|
|
1089
1089
|
} else
|
|
1090
|
-
|
|
1090
|
+
m(this.pattern, 0);
|
|
1091
1091
|
}
|
|
1092
|
-
searchIn(
|
|
1093
|
-
const { isCaseSensitive:
|
|
1094
|
-
if (
|
|
1095
|
-
let
|
|
1092
|
+
searchIn(e) {
|
|
1093
|
+
const { isCaseSensitive: t, includeMatches: s } = this.options;
|
|
1094
|
+
if (t || (e = e.toLowerCase()), this.pattern === e) {
|
|
1095
|
+
let j = {
|
|
1096
1096
|
isMatch: !0,
|
|
1097
1097
|
score: 0
|
|
1098
1098
|
};
|
|
1099
|
-
return s && (
|
|
1099
|
+
return s && (j.indices = [[0, e.length - 1]]), j;
|
|
1100
1100
|
}
|
|
1101
1101
|
const {
|
|
1102
1102
|
location: n,
|
|
1103
|
-
distance:
|
|
1103
|
+
distance: l,
|
|
1104
1104
|
threshold: o,
|
|
1105
|
-
findAllMatches:
|
|
1106
|
-
minMatchCharLength:
|
|
1107
|
-
ignoreLocation:
|
|
1105
|
+
findAllMatches: h,
|
|
1106
|
+
minMatchCharLength: u,
|
|
1107
|
+
ignoreLocation: d
|
|
1108
1108
|
} = this.options;
|
|
1109
|
-
let
|
|
1110
|
-
this.chunks.forEach(({ pattern:
|
|
1111
|
-
const { isMatch:
|
|
1112
|
-
location: n +
|
|
1113
|
-
distance:
|
|
1109
|
+
let m = [], v = 0, $ = !1;
|
|
1110
|
+
this.chunks.forEach(({ pattern: j, alphabet: J, startIndex: ge }) => {
|
|
1111
|
+
const { isMatch: le, score: ve, indices: pe } = $n(e, j, J, {
|
|
1112
|
+
location: n + ge,
|
|
1113
|
+
distance: l,
|
|
1114
1114
|
threshold: o,
|
|
1115
|
-
findAllMatches:
|
|
1116
|
-
minMatchCharLength:
|
|
1115
|
+
findAllMatches: h,
|
|
1116
|
+
minMatchCharLength: u,
|
|
1117
1117
|
includeMatches: s,
|
|
1118
|
-
ignoreLocation:
|
|
1118
|
+
ignoreLocation: d
|
|
1119
1119
|
});
|
|
1120
|
-
|
|
1120
|
+
le && ($ = !0), v += ve, le && pe && (m = [...m, ...pe]);
|
|
1121
1121
|
});
|
|
1122
|
-
let
|
|
1123
|
-
isMatch:
|
|
1124
|
-
score:
|
|
1122
|
+
let M = {
|
|
1123
|
+
isMatch: $,
|
|
1124
|
+
score: $ ? v / this.chunks.length : 1
|
|
1125
1125
|
};
|
|
1126
|
-
return
|
|
1126
|
+
return $ && s && (M.indices = m), M;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
class
|
|
1130
|
-
constructor(
|
|
1131
|
-
this.pattern =
|
|
1129
|
+
class je {
|
|
1130
|
+
constructor(e) {
|
|
1131
|
+
this.pattern = e;
|
|
1132
1132
|
}
|
|
1133
|
-
static isMultiMatch(
|
|
1134
|
-
return
|
|
1133
|
+
static isMultiMatch(e) {
|
|
1134
|
+
return di(e, this.multiRegex);
|
|
1135
1135
|
}
|
|
1136
|
-
static isSingleMatch(
|
|
1137
|
-
return
|
|
1136
|
+
static isSingleMatch(e) {
|
|
1137
|
+
return di(e, this.singleRegex);
|
|
1138
1138
|
}
|
|
1139
1139
|
search() {
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const
|
|
1144
|
-
return
|
|
1142
|
+
function di(i, e) {
|
|
1143
|
+
const t = i.match(e);
|
|
1144
|
+
return t ? t[1] : null;
|
|
1145
1145
|
}
|
|
1146
|
-
class
|
|
1147
|
-
constructor(
|
|
1148
|
-
super(
|
|
1146
|
+
class xn extends je {
|
|
1147
|
+
constructor(e) {
|
|
1148
|
+
super(e);
|
|
1149
1149
|
}
|
|
1150
1150
|
static get type() {
|
|
1151
1151
|
return "exact";
|
|
@@ -1156,18 +1156,18 @@ class ls extends L {
|
|
|
1156
1156
|
static get singleRegex() {
|
|
1157
1157
|
return /^=(.*)$/;
|
|
1158
1158
|
}
|
|
1159
|
-
search(
|
|
1160
|
-
const
|
|
1159
|
+
search(e) {
|
|
1160
|
+
const t = e === this.pattern;
|
|
1161
1161
|
return {
|
|
1162
|
-
isMatch:
|
|
1163
|
-
score:
|
|
1162
|
+
isMatch: t,
|
|
1163
|
+
score: t ? 0 : 1,
|
|
1164
1164
|
indices: [0, this.pattern.length - 1]
|
|
1165
1165
|
};
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
|
-
class
|
|
1169
|
-
constructor(
|
|
1170
|
-
super(
|
|
1168
|
+
class wn extends je {
|
|
1169
|
+
constructor(e) {
|
|
1170
|
+
super(e);
|
|
1171
1171
|
}
|
|
1172
1172
|
static get type() {
|
|
1173
1173
|
return "inverse-exact";
|
|
@@ -1178,18 +1178,18 @@ class cs extends L {
|
|
|
1178
1178
|
static get singleRegex() {
|
|
1179
1179
|
return /^!(.*)$/;
|
|
1180
1180
|
}
|
|
1181
|
-
search(
|
|
1182
|
-
const s =
|
|
1181
|
+
search(e) {
|
|
1182
|
+
const s = e.indexOf(this.pattern) === -1;
|
|
1183
1183
|
return {
|
|
1184
1184
|
isMatch: s,
|
|
1185
1185
|
score: s ? 0 : 1,
|
|
1186
|
-
indices: [0,
|
|
1186
|
+
indices: [0, e.length - 1]
|
|
1187
1187
|
};
|
|
1188
1188
|
}
|
|
1189
1189
|
}
|
|
1190
|
-
class
|
|
1191
|
-
constructor(
|
|
1192
|
-
super(
|
|
1190
|
+
class An extends je {
|
|
1191
|
+
constructor(e) {
|
|
1192
|
+
super(e);
|
|
1193
1193
|
}
|
|
1194
1194
|
static get type() {
|
|
1195
1195
|
return "prefix-exact";
|
|
@@ -1200,18 +1200,18 @@ class as extends L {
|
|
|
1200
1200
|
static get singleRegex() {
|
|
1201
1201
|
return /^\^(.*)$/;
|
|
1202
1202
|
}
|
|
1203
|
-
search(
|
|
1204
|
-
const
|
|
1203
|
+
search(e) {
|
|
1204
|
+
const t = e.startsWith(this.pattern);
|
|
1205
1205
|
return {
|
|
1206
|
-
isMatch:
|
|
1207
|
-
score:
|
|
1206
|
+
isMatch: t,
|
|
1207
|
+
score: t ? 0 : 1,
|
|
1208
1208
|
indices: [0, this.pattern.length - 1]
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
class
|
|
1213
|
-
constructor(
|
|
1214
|
-
super(
|
|
1212
|
+
class Mn extends je {
|
|
1213
|
+
constructor(e) {
|
|
1214
|
+
super(e);
|
|
1215
1215
|
}
|
|
1216
1216
|
static get type() {
|
|
1217
1217
|
return "inverse-prefix-exact";
|
|
@@ -1222,18 +1222,18 @@ class hs extends L {
|
|
|
1222
1222
|
static get singleRegex() {
|
|
1223
1223
|
return /^!\^(.*)$/;
|
|
1224
1224
|
}
|
|
1225
|
-
search(
|
|
1226
|
-
const
|
|
1225
|
+
search(e) {
|
|
1226
|
+
const t = !e.startsWith(this.pattern);
|
|
1227
1227
|
return {
|
|
1228
|
-
isMatch:
|
|
1229
|
-
score:
|
|
1230
|
-
indices: [0,
|
|
1228
|
+
isMatch: t,
|
|
1229
|
+
score: t ? 0 : 1,
|
|
1230
|
+
indices: [0, e.length - 1]
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
class
|
|
1235
|
-
constructor(
|
|
1236
|
-
super(
|
|
1234
|
+
class Sn extends je {
|
|
1235
|
+
constructor(e) {
|
|
1236
|
+
super(e);
|
|
1237
1237
|
}
|
|
1238
1238
|
static get type() {
|
|
1239
1239
|
return "suffix-exact";
|
|
@@ -1244,18 +1244,18 @@ class us extends L {
|
|
|
1244
1244
|
static get singleRegex() {
|
|
1245
1245
|
return /^(.*)\$$/;
|
|
1246
1246
|
}
|
|
1247
|
-
search(
|
|
1248
|
-
const
|
|
1247
|
+
search(e) {
|
|
1248
|
+
const t = e.endsWith(this.pattern);
|
|
1249
1249
|
return {
|
|
1250
|
-
isMatch:
|
|
1251
|
-
score:
|
|
1252
|
-
indices: [
|
|
1250
|
+
isMatch: t,
|
|
1251
|
+
score: t ? 0 : 1,
|
|
1252
|
+
indices: [e.length - this.pattern.length, e.length - 1]
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
class
|
|
1257
|
-
constructor(
|
|
1258
|
-
super(
|
|
1256
|
+
class En extends je {
|
|
1257
|
+
constructor(e) {
|
|
1258
|
+
super(e);
|
|
1259
1259
|
}
|
|
1260
1260
|
static get type() {
|
|
1261
1261
|
return "inverse-suffix-exact";
|
|
@@ -1266,35 +1266,35 @@ class ds extends L {
|
|
|
1266
1266
|
static get singleRegex() {
|
|
1267
1267
|
return /^!(.*)\$$/;
|
|
1268
1268
|
}
|
|
1269
|
-
search(
|
|
1270
|
-
const
|
|
1269
|
+
search(e) {
|
|
1270
|
+
const t = !e.endsWith(this.pattern);
|
|
1271
1271
|
return {
|
|
1272
|
-
isMatch:
|
|
1273
|
-
score:
|
|
1274
|
-
indices: [0,
|
|
1272
|
+
isMatch: t,
|
|
1273
|
+
score: t ? 0 : 1,
|
|
1274
|
+
indices: [0, e.length - 1]
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
|
-
class
|
|
1279
|
-
constructor(
|
|
1280
|
-
location:
|
|
1281
|
-
threshold: s =
|
|
1282
|
-
distance: n =
|
|
1283
|
-
includeMatches:
|
|
1284
|
-
findAllMatches: o =
|
|
1285
|
-
minMatchCharLength:
|
|
1286
|
-
isCaseSensitive:
|
|
1287
|
-
ignoreLocation:
|
|
1278
|
+
class Li extends je {
|
|
1279
|
+
constructor(e, {
|
|
1280
|
+
location: t = T.location,
|
|
1281
|
+
threshold: s = T.threshold,
|
|
1282
|
+
distance: n = T.distance,
|
|
1283
|
+
includeMatches: l = T.includeMatches,
|
|
1284
|
+
findAllMatches: o = T.findAllMatches,
|
|
1285
|
+
minMatchCharLength: h = T.minMatchCharLength,
|
|
1286
|
+
isCaseSensitive: u = T.isCaseSensitive,
|
|
1287
|
+
ignoreLocation: d = T.ignoreLocation
|
|
1288
1288
|
} = {}) {
|
|
1289
|
-
super(
|
|
1290
|
-
location:
|
|
1289
|
+
super(e), this._bitapSearch = new ki(e, {
|
|
1290
|
+
location: t,
|
|
1291
1291
|
threshold: s,
|
|
1292
1292
|
distance: n,
|
|
1293
|
-
includeMatches:
|
|
1293
|
+
includeMatches: l,
|
|
1294
1294
|
findAllMatches: o,
|
|
1295
|
-
minMatchCharLength:
|
|
1296
|
-
isCaseSensitive:
|
|
1297
|
-
ignoreLocation:
|
|
1295
|
+
minMatchCharLength: h,
|
|
1296
|
+
isCaseSensitive: u,
|
|
1297
|
+
ignoreLocation: d
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
static get type() {
|
|
@@ -1306,13 +1306,13 @@ class pe extends L {
|
|
|
1306
1306
|
static get singleRegex() {
|
|
1307
1307
|
return /^(.*)$/;
|
|
1308
1308
|
}
|
|
1309
|
-
search(
|
|
1310
|
-
return this._bitapSearch.searchIn(
|
|
1309
|
+
search(e) {
|
|
1310
|
+
return this._bitapSearch.searchIn(e);
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
class
|
|
1314
|
-
constructor(
|
|
1315
|
-
super(
|
|
1313
|
+
class Ci extends je {
|
|
1314
|
+
constructor(e) {
|
|
1315
|
+
super(e);
|
|
1316
1316
|
}
|
|
1317
1317
|
static get type() {
|
|
1318
1318
|
return "include";
|
|
@@ -1323,11 +1323,11 @@ class ge extends L {
|
|
|
1323
1323
|
static get singleRegex() {
|
|
1324
1324
|
return /^'(.*)$/;
|
|
1325
1325
|
}
|
|
1326
|
-
search(
|
|
1327
|
-
let
|
|
1328
|
-
const n = [],
|
|
1329
|
-
for (; (s =
|
|
1330
|
-
|
|
1326
|
+
search(e) {
|
|
1327
|
+
let t = 0, s;
|
|
1328
|
+
const n = [], l = this.pattern.length;
|
|
1329
|
+
for (; (s = e.indexOf(this.pattern, t)) > -1; )
|
|
1330
|
+
t = s + l, n.push([s, t - 1]);
|
|
1331
1331
|
const o = !!n.length;
|
|
1332
1332
|
return {
|
|
1333
1333
|
isMatch: o,
|
|
@@ -1336,33 +1336,33 @@ class ge extends L {
|
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
],
|
|
1349
|
-
function
|
|
1350
|
-
return i.split(
|
|
1351
|
-
let s =
|
|
1352
|
-
for (let
|
|
1353
|
-
const
|
|
1354
|
-
let
|
|
1355
|
-
for (; !
|
|
1356
|
-
const
|
|
1357
|
-
let
|
|
1358
|
-
|
|
1339
|
+
const bs = [
|
|
1340
|
+
xn,
|
|
1341
|
+
Ci,
|
|
1342
|
+
An,
|
|
1343
|
+
Mn,
|
|
1344
|
+
En,
|
|
1345
|
+
Sn,
|
|
1346
|
+
wn,
|
|
1347
|
+
Li
|
|
1348
|
+
], pi = bs.length, kn = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Ln = "|";
|
|
1349
|
+
function Cn(i, e = {}) {
|
|
1350
|
+
return i.split(Ln).map((t) => {
|
|
1351
|
+
let s = t.trim().split(kn).filter((l) => l && !!l.trim()), n = [];
|
|
1352
|
+
for (let l = 0, o = s.length; l < o; l += 1) {
|
|
1353
|
+
const h = s[l];
|
|
1354
|
+
let u = !1, d = -1;
|
|
1355
|
+
for (; !u && ++d < pi; ) {
|
|
1356
|
+
const m = bs[d];
|
|
1357
|
+
let v = m.isMultiMatch(h);
|
|
1358
|
+
v && (n.push(new m(v, e)), u = !0);
|
|
1359
1359
|
}
|
|
1360
|
-
if (!
|
|
1361
|
-
for (
|
|
1362
|
-
const
|
|
1363
|
-
let
|
|
1364
|
-
if (
|
|
1365
|
-
n.push(new
|
|
1360
|
+
if (!u)
|
|
1361
|
+
for (d = -1; ++d < pi; ) {
|
|
1362
|
+
const m = bs[d];
|
|
1363
|
+
let v = m.isSingleMatch(h);
|
|
1364
|
+
if (v) {
|
|
1365
|
+
n.push(new m(v, e));
|
|
1366
1366
|
break;
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
@@ -1370,63 +1370,63 @@ function gs(i, t = {}) {
|
|
|
1370
1370
|
return n;
|
|
1371
1371
|
});
|
|
1372
1372
|
}
|
|
1373
|
-
const
|
|
1374
|
-
class
|
|
1375
|
-
constructor(
|
|
1376
|
-
isCaseSensitive:
|
|
1377
|
-
includeMatches: s =
|
|
1378
|
-
minMatchCharLength: n =
|
|
1379
|
-
ignoreLocation:
|
|
1380
|
-
findAllMatches: o =
|
|
1381
|
-
location:
|
|
1382
|
-
threshold:
|
|
1383
|
-
distance:
|
|
1373
|
+
const On = /* @__PURE__ */ new Set([Li.type, Ci.type]);
|
|
1374
|
+
class Dn {
|
|
1375
|
+
constructor(e, {
|
|
1376
|
+
isCaseSensitive: t = T.isCaseSensitive,
|
|
1377
|
+
includeMatches: s = T.includeMatches,
|
|
1378
|
+
minMatchCharLength: n = T.minMatchCharLength,
|
|
1379
|
+
ignoreLocation: l = T.ignoreLocation,
|
|
1380
|
+
findAllMatches: o = T.findAllMatches,
|
|
1381
|
+
location: h = T.location,
|
|
1382
|
+
threshold: u = T.threshold,
|
|
1383
|
+
distance: d = T.distance
|
|
1384
1384
|
} = {}) {
|
|
1385
1385
|
this.query = null, this.options = {
|
|
1386
|
-
isCaseSensitive:
|
|
1386
|
+
isCaseSensitive: t,
|
|
1387
1387
|
includeMatches: s,
|
|
1388
1388
|
minMatchCharLength: n,
|
|
1389
1389
|
findAllMatches: o,
|
|
1390
|
-
ignoreLocation:
|
|
1391
|
-
location:
|
|
1392
|
-
threshold:
|
|
1393
|
-
distance:
|
|
1394
|
-
}, this.pattern =
|
|
1395
|
-
}
|
|
1396
|
-
static condition(
|
|
1397
|
-
return
|
|
1398
|
-
}
|
|
1399
|
-
searchIn(
|
|
1400
|
-
const
|
|
1401
|
-
if (!
|
|
1390
|
+
ignoreLocation: l,
|
|
1391
|
+
location: h,
|
|
1392
|
+
threshold: u,
|
|
1393
|
+
distance: d
|
|
1394
|
+
}, this.pattern = t ? e : e.toLowerCase(), this.query = Cn(this.pattern, this.options);
|
|
1395
|
+
}
|
|
1396
|
+
static condition(e, t) {
|
|
1397
|
+
return t.useExtendedSearch;
|
|
1398
|
+
}
|
|
1399
|
+
searchIn(e) {
|
|
1400
|
+
const t = this.query;
|
|
1401
|
+
if (!t)
|
|
1402
1402
|
return {
|
|
1403
1403
|
isMatch: !1,
|
|
1404
1404
|
score: 1
|
|
1405
1405
|
};
|
|
1406
1406
|
const { includeMatches: s, isCaseSensitive: n } = this.options;
|
|
1407
|
-
|
|
1408
|
-
let
|
|
1409
|
-
for (let
|
|
1410
|
-
const
|
|
1411
|
-
o.length = 0,
|
|
1412
|
-
for (let
|
|
1413
|
-
const
|
|
1414
|
-
if (
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1407
|
+
e = n ? e : e.toLowerCase();
|
|
1408
|
+
let l = 0, o = [], h = 0;
|
|
1409
|
+
for (let u = 0, d = t.length; u < d; u += 1) {
|
|
1410
|
+
const m = t[u];
|
|
1411
|
+
o.length = 0, l = 0;
|
|
1412
|
+
for (let v = 0, $ = m.length; v < $; v += 1) {
|
|
1413
|
+
const M = m[v], { isMatch: j, indices: J, score: ge } = M.search(e);
|
|
1414
|
+
if (j) {
|
|
1415
|
+
if (l += 1, h += ge, s) {
|
|
1416
|
+
const le = M.constructor.type;
|
|
1417
|
+
On.has(le) ? o = [...o, ...J] : o.push(J);
|
|
1418
1418
|
}
|
|
1419
1419
|
} else {
|
|
1420
|
-
|
|
1420
|
+
h = 0, l = 0, o.length = 0;
|
|
1421
1421
|
break;
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
if (
|
|
1425
|
-
let
|
|
1424
|
+
if (l) {
|
|
1425
|
+
let v = {
|
|
1426
1426
|
isMatch: !0,
|
|
1427
|
-
score:
|
|
1427
|
+
score: h / l
|
|
1428
1428
|
};
|
|
1429
|
-
return s && (
|
|
1429
|
+
return s && (v.indices = o), v;
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
return {
|
|
@@ -1435,354 +1435,1455 @@ class _s {
|
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1440
|
-
|
|
1438
|
+
const $s = [];
|
|
1439
|
+
function Tn(...i) {
|
|
1440
|
+
$s.push(...i);
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1443
|
-
for (let
|
|
1444
|
-
let n =
|
|
1445
|
-
if (n.condition(i,
|
|
1446
|
-
return new n(i,
|
|
1442
|
+
function _s(i, e) {
|
|
1443
|
+
for (let t = 0, s = $s.length; t < s; t += 1) {
|
|
1444
|
+
let n = $s[t];
|
|
1445
|
+
if (n.condition(i, e))
|
|
1446
|
+
return new n(i, e);
|
|
1447
1447
|
}
|
|
1448
|
-
return new
|
|
1448
|
+
return new ki(i, e);
|
|
1449
1449
|
}
|
|
1450
|
-
const
|
|
1450
|
+
const Ot = {
|
|
1451
1451
|
AND: "$and",
|
|
1452
1452
|
OR: "$or"
|
|
1453
|
-
},
|
|
1453
|
+
}, xs = {
|
|
1454
1454
|
PATH: "$path",
|
|
1455
1455
|
PATTERN: "$val"
|
|
1456
|
-
},
|
|
1457
|
-
[
|
|
1458
|
-
[
|
|
1456
|
+
}, ws = (i) => !!(i[Ot.AND] || i[Ot.OR]), Rn = (i) => !!i[xs.PATH], Pn = (i) => !Re(i) && Ai(i) && !ws(i), fi = (i) => ({
|
|
1457
|
+
[Ot.AND]: Object.keys(i).map((e) => ({
|
|
1458
|
+
[e]: i[e]
|
|
1459
1459
|
}))
|
|
1460
1460
|
});
|
|
1461
|
-
function
|
|
1461
|
+
function Oi(i, e, { auto: t = !0 } = {}) {
|
|
1462
1462
|
const s = (n) => {
|
|
1463
|
-
let
|
|
1464
|
-
const o =
|
|
1465
|
-
if (!o &&
|
|
1466
|
-
return s(
|
|
1467
|
-
if (
|
|
1468
|
-
const
|
|
1469
|
-
if (!
|
|
1470
|
-
throw new Error(
|
|
1471
|
-
const
|
|
1472
|
-
keyId:
|
|
1473
|
-
pattern:
|
|
1463
|
+
let l = Object.keys(n);
|
|
1464
|
+
const o = Rn(n);
|
|
1465
|
+
if (!o && l.length > 1 && !ws(n))
|
|
1466
|
+
return s(fi(n));
|
|
1467
|
+
if (Pn(n)) {
|
|
1468
|
+
const u = o ? n[xs.PATH] : l[0], d = o ? n[xs.PATTERN] : n[u];
|
|
1469
|
+
if (!Te(d))
|
|
1470
|
+
throw new Error(on(u));
|
|
1471
|
+
const m = {
|
|
1472
|
+
keyId: ys(u),
|
|
1473
|
+
pattern: d
|
|
1474
1474
|
};
|
|
1475
|
-
return
|
|
1475
|
+
return t && (m.searcher = _s(d, e)), m;
|
|
1476
1476
|
}
|
|
1477
|
-
let
|
|
1477
|
+
let h = {
|
|
1478
1478
|
children: [],
|
|
1479
|
-
operator:
|
|
1479
|
+
operator: l[0]
|
|
1480
1480
|
};
|
|
1481
|
-
return
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1481
|
+
return l.forEach((u) => {
|
|
1482
|
+
const d = n[u];
|
|
1483
|
+
Re(d) && d.forEach((m) => {
|
|
1484
|
+
h.children.push(s(m));
|
|
1485
1485
|
});
|
|
1486
|
-
}),
|
|
1486
|
+
}), h;
|
|
1487
1487
|
};
|
|
1488
|
-
return
|
|
1488
|
+
return ws(i) || (i = fi(i)), s(i);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
i.forEach((
|
|
1490
|
+
function In(i, { ignoreFieldNorm: e = T.ignoreFieldNorm }) {
|
|
1491
|
+
i.forEach((t) => {
|
|
1492
1492
|
let s = 1;
|
|
1493
|
-
|
|
1494
|
-
const
|
|
1493
|
+
t.matches.forEach(({ key: n, norm: l, score: o }) => {
|
|
1494
|
+
const h = n ? n.weight : null;
|
|
1495
1495
|
s *= Math.pow(
|
|
1496
|
-
o === 0 &&
|
|
1497
|
-
(
|
|
1496
|
+
o === 0 && h ? Number.EPSILON : o,
|
|
1497
|
+
(h || 1) * (e ? 1 : l)
|
|
1498
1498
|
);
|
|
1499
|
-
}),
|
|
1499
|
+
}), t.score = s;
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
if (!
|
|
1502
|
+
function Nn(i, e) {
|
|
1503
|
+
const t = i.matches;
|
|
1504
|
+
e.matches = [], xe(t) && t.forEach((s) => {
|
|
1505
|
+
if (!xe(s.indices) || !s.indices.length)
|
|
1506
1506
|
return;
|
|
1507
|
-
const { indices: n, value:
|
|
1507
|
+
const { indices: n, value: l } = s;
|
|
1508
1508
|
let o = {
|
|
1509
1509
|
indices: n,
|
|
1510
|
-
value:
|
|
1510
|
+
value: l
|
|
1511
1511
|
};
|
|
1512
|
-
s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx),
|
|
1512
|
+
s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx), e.matches.push(o);
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1516
|
-
|
|
1515
|
+
function jn(i, e) {
|
|
1516
|
+
e.score = i.score;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1519
|
-
includeMatches:
|
|
1520
|
-
includeScore: s =
|
|
1518
|
+
function Hn(i, e, {
|
|
1519
|
+
includeMatches: t = T.includeMatches,
|
|
1520
|
+
includeScore: s = T.includeScore
|
|
1521
1521
|
} = {}) {
|
|
1522
1522
|
const n = [];
|
|
1523
|
-
return
|
|
1524
|
-
const { idx: o } =
|
|
1525
|
-
item:
|
|
1523
|
+
return t && n.push(Nn), s && n.push(jn), i.map((l) => {
|
|
1524
|
+
const { idx: o } = l, h = {
|
|
1525
|
+
item: e[o],
|
|
1526
1526
|
refIndex: o
|
|
1527
1527
|
};
|
|
1528
|
-
return n.length && n.forEach((
|
|
1529
|
-
l
|
|
1530
|
-
}),
|
|
1528
|
+
return n.length && n.forEach((u) => {
|
|
1529
|
+
u(l, h);
|
|
1530
|
+
}), h;
|
|
1531
1531
|
});
|
|
1532
1532
|
}
|
|
1533
|
-
class
|
|
1534
|
-
constructor(
|
|
1535
|
-
this.options = { ...
|
|
1533
|
+
class tt {
|
|
1534
|
+
constructor(e, t = {}, s) {
|
|
1535
|
+
this.options = { ...T, ...t }, this.options.useExtendedSearch, this._keyStore = new hn(this.options.keys), this.setCollection(e, s);
|
|
1536
1536
|
}
|
|
1537
|
-
setCollection(
|
|
1538
|
-
if (this._docs =
|
|
1539
|
-
throw new Error(
|
|
1540
|
-
this._myIndex =
|
|
1537
|
+
setCollection(e, t) {
|
|
1538
|
+
if (this._docs = e, t && !(t instanceof Es))
|
|
1539
|
+
throw new Error(nn);
|
|
1540
|
+
this._myIndex = t || Ei(this.options.keys, this._docs, {
|
|
1541
1541
|
getFn: this.options.getFn,
|
|
1542
1542
|
fieldNormWeight: this.options.fieldNormWeight
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
|
-
add(
|
|
1546
|
-
|
|
1545
|
+
add(e) {
|
|
1546
|
+
xe(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
1547
1547
|
}
|
|
1548
|
-
remove(
|
|
1549
|
-
const
|
|
1548
|
+
remove(e = () => !1) {
|
|
1549
|
+
const t = [];
|
|
1550
1550
|
for (let s = 0, n = this._docs.length; s < n; s += 1) {
|
|
1551
|
-
const
|
|
1552
|
-
|
|
1551
|
+
const l = this._docs[s];
|
|
1552
|
+
e(l, s) && (this.removeAt(s), s -= 1, n -= 1, t.push(l));
|
|
1553
1553
|
}
|
|
1554
|
-
return
|
|
1554
|
+
return t;
|
|
1555
1555
|
}
|
|
1556
|
-
removeAt(
|
|
1557
|
-
this._docs.splice(
|
|
1556
|
+
removeAt(e) {
|
|
1557
|
+
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
1558
1558
|
}
|
|
1559
1559
|
getIndex() {
|
|
1560
1560
|
return this._myIndex;
|
|
1561
1561
|
}
|
|
1562
|
-
search(
|
|
1562
|
+
search(e, { limit: t = -1 } = {}) {
|
|
1563
1563
|
const {
|
|
1564
1564
|
includeMatches: s,
|
|
1565
1565
|
includeScore: n,
|
|
1566
|
-
shouldSort:
|
|
1566
|
+
shouldSort: l,
|
|
1567
1567
|
sortFn: o,
|
|
1568
|
-
ignoreFieldNorm:
|
|
1568
|
+
ignoreFieldNorm: h
|
|
1569
1569
|
} = this.options;
|
|
1570
|
-
let
|
|
1571
|
-
return
|
|
1570
|
+
let u = Te(e) ? Te(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
1571
|
+
return In(u, { ignoreFieldNorm: h }), l && u.sort(o), wi(t) && t > -1 && (u = u.slice(0, t)), Hn(u, this._docs, {
|
|
1572
1572
|
includeMatches: s,
|
|
1573
1573
|
includeScore: n
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
|
-
_searchStringList(
|
|
1577
|
-
const
|
|
1578
|
-
return s.forEach(({ v:
|
|
1579
|
-
if (!
|
|
1576
|
+
_searchStringList(e) {
|
|
1577
|
+
const t = _s(e, this.options), { records: s } = this._myIndex, n = [];
|
|
1578
|
+
return s.forEach(({ v: l, i: o, n: h }) => {
|
|
1579
|
+
if (!xe(l))
|
|
1580
1580
|
return;
|
|
1581
|
-
const { isMatch:
|
|
1582
|
-
|
|
1583
|
-
item:
|
|
1581
|
+
const { isMatch: u, score: d, indices: m } = t.searchIn(l);
|
|
1582
|
+
u && n.push({
|
|
1583
|
+
item: l,
|
|
1584
1584
|
idx: o,
|
|
1585
|
-
matches: [{ score:
|
|
1585
|
+
matches: [{ score: d, value: l, norm: h, indices: m }]
|
|
1586
1586
|
});
|
|
1587
1587
|
}), n;
|
|
1588
1588
|
}
|
|
1589
|
-
_searchLogical(
|
|
1590
|
-
const
|
|
1591
|
-
if (!
|
|
1592
|
-
const { keyId:
|
|
1593
|
-
key: this._keyStore.get(
|
|
1594
|
-
value: this._myIndex.getValueForItemAtKeyId(
|
|
1595
|
-
searcher:
|
|
1589
|
+
_searchLogical(e) {
|
|
1590
|
+
const t = Oi(e, this.options), s = (h, u, d) => {
|
|
1591
|
+
if (!h.children) {
|
|
1592
|
+
const { keyId: v, searcher: $ } = h, M = this._findMatches({
|
|
1593
|
+
key: this._keyStore.get(v),
|
|
1594
|
+
value: this._myIndex.getValueForItemAtKeyId(u, v),
|
|
1595
|
+
searcher: $
|
|
1596
1596
|
});
|
|
1597
|
-
return
|
|
1597
|
+
return M && M.length ? [
|
|
1598
1598
|
{
|
|
1599
|
-
idx:
|
|
1600
|
-
item:
|
|
1601
|
-
matches:
|
|
1599
|
+
idx: d,
|
|
1600
|
+
item: u,
|
|
1601
|
+
matches: M
|
|
1602
1602
|
}
|
|
1603
1603
|
] : [];
|
|
1604
1604
|
}
|
|
1605
|
-
const
|
|
1606
|
-
for (let
|
|
1607
|
-
const
|
|
1608
|
-
if (
|
|
1609
|
-
|
|
1610
|
-
else if (
|
|
1605
|
+
const m = [];
|
|
1606
|
+
for (let v = 0, $ = h.children.length; v < $; v += 1) {
|
|
1607
|
+
const M = h.children[v], j = s(M, u, d);
|
|
1608
|
+
if (j.length)
|
|
1609
|
+
m.push(...j);
|
|
1610
|
+
else if (h.operator === Ot.AND)
|
|
1611
1611
|
return [];
|
|
1612
1612
|
}
|
|
1613
|
-
return
|
|
1614
|
-
}, n = this._myIndex.records,
|
|
1615
|
-
return n.forEach(({ $:
|
|
1616
|
-
if (
|
|
1617
|
-
let
|
|
1618
|
-
|
|
1619
|
-
|
|
1613
|
+
return m;
|
|
1614
|
+
}, n = this._myIndex.records, l = {}, o = [];
|
|
1615
|
+
return n.forEach(({ $: h, i: u }) => {
|
|
1616
|
+
if (xe(h)) {
|
|
1617
|
+
let d = s(t, h, u);
|
|
1618
|
+
d.length && (l[u] || (l[u] = { idx: u, item: h, matches: [] }, o.push(l[u])), d.forEach(({ matches: m }) => {
|
|
1619
|
+
l[u].matches.push(...m);
|
|
1620
1620
|
}));
|
|
1621
1621
|
}
|
|
1622
1622
|
}), o;
|
|
1623
1623
|
}
|
|
1624
|
-
_searchObjectList(
|
|
1625
|
-
const
|
|
1626
|
-
return n.forEach(({ $: o, i:
|
|
1627
|
-
if (!
|
|
1624
|
+
_searchObjectList(e) {
|
|
1625
|
+
const t = _s(e, this.options), { keys: s, records: n } = this._myIndex, l = [];
|
|
1626
|
+
return n.forEach(({ $: o, i: h }) => {
|
|
1627
|
+
if (!xe(o))
|
|
1628
1628
|
return;
|
|
1629
|
-
let
|
|
1630
|
-
s.forEach((
|
|
1631
|
-
|
|
1629
|
+
let u = [];
|
|
1630
|
+
s.forEach((d, m) => {
|
|
1631
|
+
u.push(
|
|
1632
1632
|
...this._findMatches({
|
|
1633
|
-
key:
|
|
1634
|
-
value: o[
|
|
1635
|
-
searcher:
|
|
1633
|
+
key: d,
|
|
1634
|
+
value: o[m],
|
|
1635
|
+
searcher: t
|
|
1636
1636
|
})
|
|
1637
1637
|
);
|
|
1638
|
-
}),
|
|
1639
|
-
idx:
|
|
1638
|
+
}), u.length && l.push({
|
|
1639
|
+
idx: h,
|
|
1640
1640
|
item: o,
|
|
1641
|
-
matches:
|
|
1641
|
+
matches: u
|
|
1642
1642
|
});
|
|
1643
|
-
}),
|
|
1643
|
+
}), l;
|
|
1644
1644
|
}
|
|
1645
|
-
_findMatches({ key:
|
|
1646
|
-
if (!
|
|
1645
|
+
_findMatches({ key: e, value: t, searcher: s }) {
|
|
1646
|
+
if (!xe(t))
|
|
1647
1647
|
return [];
|
|
1648
1648
|
let n = [];
|
|
1649
|
-
if (
|
|
1650
|
-
|
|
1651
|
-
if (!
|
|
1649
|
+
if (Re(t))
|
|
1650
|
+
t.forEach(({ v: l, i: o, n: h }) => {
|
|
1651
|
+
if (!xe(l))
|
|
1652
1652
|
return;
|
|
1653
|
-
const { isMatch:
|
|
1654
|
-
|
|
1655
|
-
score:
|
|
1656
|
-
key:
|
|
1657
|
-
value:
|
|
1653
|
+
const { isMatch: u, score: d, indices: m } = s.searchIn(l);
|
|
1654
|
+
u && n.push({
|
|
1655
|
+
score: d,
|
|
1656
|
+
key: e,
|
|
1657
|
+
value: l,
|
|
1658
1658
|
idx: o,
|
|
1659
|
-
norm:
|
|
1660
|
-
indices:
|
|
1659
|
+
norm: h,
|
|
1660
|
+
indices: m
|
|
1661
1661
|
});
|
|
1662
1662
|
});
|
|
1663
1663
|
else {
|
|
1664
|
-
const { v:
|
|
1665
|
-
|
|
1664
|
+
const { v: l, n: o } = t, { isMatch: h, score: u, indices: d } = s.searchIn(l);
|
|
1665
|
+
h && n.push({ score: u, key: e, value: l, norm: o, indices: d });
|
|
1666
1666
|
}
|
|
1667
1667
|
return n;
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
var
|
|
1677
|
-
function
|
|
1670
|
+
tt.version = "6.6.2";
|
|
1671
|
+
tt.createIndex = Ei;
|
|
1672
|
+
tt.parseIndex = yn;
|
|
1673
|
+
tt.config = T;
|
|
1674
|
+
tt.parseQuery = Oi;
|
|
1675
|
+
Tn(Dn);
|
|
1676
|
+
var at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1677
|
+
function Di(i) {
|
|
1678
1678
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
1679
1679
|
}
|
|
1680
|
-
var
|
|
1681
|
-
return
|
|
1680
|
+
var Un = "Expected a function", gi = 0 / 0, Fn = "[object Symbol]", Bn = /^\s+|\s+$/g, zn = /^[-+]0x[0-9a-f]+$/i, Wn = /^0b[01]+$/i, Vn = /^0o[0-7]+$/i, Yn = parseInt, Kn = typeof at == "object" && at && at.Object === Object && at, qn = typeof self == "object" && self && self.Object === Object && self, Xn = Kn || qn || Function("return this")(), Gn = Object.prototype, Jn = Gn.toString, Zn = Math.max, Qn = Math.min, ps = function() {
|
|
1681
|
+
return Xn.Date.now();
|
|
1682
1682
|
};
|
|
1683
|
-
function
|
|
1684
|
-
var s, n,
|
|
1683
|
+
function eo(i, e, t) {
|
|
1684
|
+
var s, n, l, o, h, u, d = 0, m = !1, v = !1, $ = !0;
|
|
1685
1685
|
if (typeof i != "function")
|
|
1686
|
-
throw new TypeError(
|
|
1687
|
-
|
|
1688
|
-
function
|
|
1689
|
-
var
|
|
1690
|
-
return s = n = void 0,
|
|
1691
|
-
}
|
|
1692
|
-
function
|
|
1693
|
-
return
|
|
1694
|
-
}
|
|
1695
|
-
function
|
|
1696
|
-
var
|
|
1697
|
-
return
|
|
1698
|
-
}
|
|
1699
|
-
function
|
|
1700
|
-
var
|
|
1701
|
-
return
|
|
1702
|
-
}
|
|
1703
|
-
function
|
|
1704
|
-
var
|
|
1705
|
-
if (
|
|
1706
|
-
return
|
|
1707
|
-
|
|
1708
|
-
}
|
|
1709
|
-
function
|
|
1710
|
-
return
|
|
1711
|
-
}
|
|
1712
|
-
function
|
|
1713
|
-
|
|
1714
|
-
}
|
|
1715
|
-
function
|
|
1716
|
-
return
|
|
1717
|
-
}
|
|
1718
|
-
function
|
|
1719
|
-
var
|
|
1720
|
-
if (s = arguments, n = this,
|
|
1721
|
-
if (
|
|
1722
|
-
return
|
|
1723
|
-
if (
|
|
1724
|
-
return
|
|
1686
|
+
throw new TypeError(Un);
|
|
1687
|
+
e = vi(e) || 0, As(t) && (m = !!t.leading, v = "maxWait" in t, l = v ? Zn(vi(t.maxWait) || 0, e) : l, $ = "trailing" in t ? !!t.trailing : $);
|
|
1688
|
+
function M(F) {
|
|
1689
|
+
var X = s, ie = n;
|
|
1690
|
+
return s = n = void 0, d = F, o = i.apply(ie, X), o;
|
|
1691
|
+
}
|
|
1692
|
+
function j(F) {
|
|
1693
|
+
return d = F, h = setTimeout(le, e), m ? M(F) : o;
|
|
1694
|
+
}
|
|
1695
|
+
function J(F) {
|
|
1696
|
+
var X = F - u, ie = F - d, z = e - X;
|
|
1697
|
+
return v ? Qn(z, l - ie) : z;
|
|
1698
|
+
}
|
|
1699
|
+
function ge(F) {
|
|
1700
|
+
var X = F - u, ie = F - d;
|
|
1701
|
+
return u === void 0 || X >= e || X < 0 || v && ie >= l;
|
|
1702
|
+
}
|
|
1703
|
+
function le() {
|
|
1704
|
+
var F = ps();
|
|
1705
|
+
if (ge(F))
|
|
1706
|
+
return ve(F);
|
|
1707
|
+
h = setTimeout(le, J(F));
|
|
1708
|
+
}
|
|
1709
|
+
function ve(F) {
|
|
1710
|
+
return h = void 0, $ && s ? M(F) : (s = n = void 0, o);
|
|
1711
|
+
}
|
|
1712
|
+
function pe() {
|
|
1713
|
+
h !== void 0 && clearTimeout(h), d = 0, s = u = n = h = void 0;
|
|
1714
|
+
}
|
|
1715
|
+
function Me() {
|
|
1716
|
+
return h === void 0 ? o : ve(ps());
|
|
1717
|
+
}
|
|
1718
|
+
function me() {
|
|
1719
|
+
var F = ps(), X = ge(F);
|
|
1720
|
+
if (s = arguments, n = this, u = F, X) {
|
|
1721
|
+
if (h === void 0)
|
|
1722
|
+
return j(u);
|
|
1723
|
+
if (v)
|
|
1724
|
+
return h = setTimeout(le, e), M(u);
|
|
1725
1725
|
}
|
|
1726
|
-
return
|
|
1726
|
+
return h === void 0 && (h = setTimeout(le, e)), o;
|
|
1727
1727
|
}
|
|
1728
|
-
return
|
|
1728
|
+
return me.cancel = pe, me.flush = Me, me;
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1731
|
-
var
|
|
1732
|
-
return !!i && (
|
|
1730
|
+
function As(i) {
|
|
1731
|
+
var e = typeof i;
|
|
1732
|
+
return !!i && (e == "object" || e == "function");
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function to(i) {
|
|
1735
1735
|
return !!i && typeof i == "object";
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1738
|
-
return typeof i == "symbol" ||
|
|
1737
|
+
function so(i) {
|
|
1738
|
+
return typeof i == "symbol" || to(i) && Jn.call(i) == Fn;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1740
|
+
function vi(i) {
|
|
1741
1741
|
if (typeof i == "number")
|
|
1742
1742
|
return i;
|
|
1743
|
-
if (
|
|
1744
|
-
return
|
|
1745
|
-
if (
|
|
1746
|
-
var
|
|
1747
|
-
i =
|
|
1743
|
+
if (so(i))
|
|
1744
|
+
return gi;
|
|
1745
|
+
if (As(i)) {
|
|
1746
|
+
var e = typeof i.valueOf == "function" ? i.valueOf() : i;
|
|
1747
|
+
i = As(e) ? e + "" : e;
|
|
1748
1748
|
}
|
|
1749
1749
|
if (typeof i != "string")
|
|
1750
1750
|
return i === 0 ? i : +i;
|
|
1751
|
-
i = i.replace(
|
|
1752
|
-
var
|
|
1753
|
-
return
|
|
1754
|
-
}
|
|
1755
|
-
var
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
let
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
let
|
|
1765
|
-
return
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1751
|
+
i = i.replace(Bn, "");
|
|
1752
|
+
var t = Wn.test(i);
|
|
1753
|
+
return t || Vn.test(i) ? Yn(i.slice(2), t ? 2 : 8) : zn.test(i) ? gi : +i;
|
|
1754
|
+
}
|
|
1755
|
+
var io = eo;
|
|
1756
|
+
const ro = /* @__PURE__ */ Di(io);
|
|
1757
|
+
(() => {
|
|
1758
|
+
var i = Object.defineProperty, e = Math.pow, t = (r, c, f) => c in r ? i(r, c, { enumerable: !0, configurable: !0, writable: !0, value: f }) : r[c] = f, s = (r, c, f) => (t(r, typeof c != "symbol" ? c + "" : c, f), f), n = (r, c) => ` ${c && c.length > 0 ? c.map((f) => `<link rel="stylesheet" href="${f}" />`).join("") : ""} <style> ${r} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`, l = ":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}", o = "pointers-overlap", h = "pointers-min-distance", u = "pointers-max-distance", d = "range-dragging", m = "data", v = "min", $ = "max", M = "step", j = "round", J = "type", ge = "theme", le = "rtl", ve = "btt", pe = "disabled", Me = "keyboard-disabled", me = "mousewheel-disabled", F = "slider-width", X = "slider-height", ie = "slider-radius", z = "slider-bg", B = "slider-bg-hover", Ce = "slider-bg-fill", Se = "pointer-width", D = "pointer-height", y = "pointer-radius", b = "pointer-bg", k = "pointer-bg-hover", _ = "pointer-bg-focus", P = "pointer-shadow", R = "pointer-shadow-hover", V = "pointer-shadow-focus", se = "pointer-border", Z = "pointer-border-hover", ce = "pointer-border-focus", Ee = "animate-onclick", ke = "css-links", ue = "vertical", we = "horizontal", Oe = (r, c, f, p, x) => {
|
|
1759
|
+
let L = c - r;
|
|
1760
|
+
return L === 0 ? f : (p - f) * (x - r) / L + f;
|
|
1761
|
+
}, Q = (r) => !isNaN(parseFloat(r)) && isFinite(r), K = (r, c) => Q(r) ? Number(r) : c, Ke = (r, c) => c === 0 ? 0 : Math.round(r / c) * c, qe = (r, c = 1 / 0) => {
|
|
1762
|
+
if (c === 1 / 0)
|
|
1763
|
+
return r;
|
|
1764
|
+
let f = e(10, c);
|
|
1765
|
+
return Math.round(r * f) / f;
|
|
1766
|
+
}, de = (r) => r == null ? !1 : typeof r == "boolean" ? r : r.trim().toLowerCase() === "true", Ri = (r, c) => {
|
|
1767
|
+
r.dispatchEvent(new CustomEvent("onPointerClicked", { detail: { $pointer: c } }));
|
|
1768
|
+
}, Pi = (r, c) => {
|
|
1769
|
+
r.dispatchEvent(new CustomEvent("onMouseDown", { detail: { nativeEvent: c } }));
|
|
1770
|
+
}, Ii = (r, c) => {
|
|
1771
|
+
r.dispatchEvent(new CustomEvent("onMouseUp", { detail: { nativeEvent: c } }));
|
|
1772
|
+
}, Ni = (r, c) => {
|
|
1773
|
+
r.dispatchEvent(new CustomEvent("onKeyDown", { detail: { nativeEvent: c } }));
|
|
1774
|
+
}, ji = (r, c) => {
|
|
1775
|
+
if (!c || c.length <= 0)
|
|
1776
|
+
return;
|
|
1777
|
+
let f = c.map((x) => Q(x) ? K(x, x) : x), p = { values: f || [] };
|
|
1778
|
+
p.value = f[0], p.value0 = f[0], p.value1 = f[0];
|
|
1779
|
+
for (let x = 1; x < f.length; x++)
|
|
1780
|
+
p[`value${x + 1}`] = f[x];
|
|
1781
|
+
r.dispatchEvent(new CustomEvent("change", { detail: p }));
|
|
1782
|
+
}, Rt = (r, c, f) => {
|
|
1783
|
+
let p = 0, x, L, I, w, A = !1, N = (O, G, he, ae, re, ne) => {
|
|
1784
|
+
let ye = p;
|
|
1785
|
+
he !== void 0 && O > he && (O = he), G !== void 0 && O < G && (O = G), p = O;
|
|
1786
|
+
let be = p;
|
|
1787
|
+
return (ae === ue && ne || ae === we && re) && (be = 100 - be), ae === ue ? c.style.top = `${be}%` : c.style.left = `${be}%`, ye !== p;
|
|
1788
|
+
}, U = (O) => O === c || c.contains(O), E = (O, G, he, ae) => {
|
|
1789
|
+
x = O, L = G, I = he, w = ae;
|
|
1790
|
+
}, Y = (O) => {
|
|
1791
|
+
A = O, c.classList.toggle("disabled", A), A ? c.setAttribute("aria-disabled", "true") : c.hasAttribute("aria-disabled") && c.removeAttribute("aria-disabled");
|
|
1792
|
+
}, Ae = (O, G) => {
|
|
1793
|
+
G == null ? c.removeAttribute(O) : c.setAttribute(O, G);
|
|
1794
|
+
}, fe = (O) => c.getAttribute(O), C = (O) => {
|
|
1795
|
+
if (!A) {
|
|
1796
|
+
switch (O.key) {
|
|
1797
|
+
case "ArrowLeft": {
|
|
1798
|
+
O.preventDefault(), typeof x == "function" && x(f);
|
|
1799
|
+
break;
|
|
1800
|
+
}
|
|
1801
|
+
case "ArrowRight": {
|
|
1802
|
+
O.preventDefault(), typeof L == "function" && L(f);
|
|
1803
|
+
break;
|
|
1804
|
+
}
|
|
1805
|
+
case "ArrowUp": {
|
|
1806
|
+
O.preventDefault(), typeof I == "function" && I(f);
|
|
1807
|
+
break;
|
|
1808
|
+
}
|
|
1809
|
+
case "ArrowDown": {
|
|
1810
|
+
O.preventDefault(), typeof w == "function" && w(f);
|
|
1811
|
+
break;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
Ni(r, O);
|
|
1815
|
+
}
|
|
1816
|
+
}, H = () => {
|
|
1817
|
+
A || Ri(r, c);
|
|
1818
|
+
};
|
|
1819
|
+
return c.className = `pointer pointer-${f}`, c.addEventListener("keydown", C), c.addEventListener("click", H), { $pointer: c, get percent() {
|
|
1820
|
+
return p;
|
|
1821
|
+
}, get disabled() {
|
|
1822
|
+
return A;
|
|
1823
|
+
}, set disabled(O) {
|
|
1824
|
+
Y(O);
|
|
1825
|
+
}, updatePosition: N, isClicked: U, setCallbacks: E, setAttr: Ae, getAttr: fe, destroy: () => {
|
|
1826
|
+
c.removeEventListener("keydown", C), c.removeEventListener("click", H), c.remove();
|
|
1827
|
+
} };
|
|
1828
|
+
}, Hi = (r) => {
|
|
1829
|
+
if (r == null)
|
|
1830
|
+
return;
|
|
1831
|
+
if (Array.isArray(r))
|
|
1832
|
+
return r;
|
|
1833
|
+
if (r.trim() === "")
|
|
1834
|
+
return;
|
|
1835
|
+
let c = r.split(","), f = [], p = !0;
|
|
1836
|
+
for (let x = 0; x < c.length; x++) {
|
|
1837
|
+
let L = c[x].trim();
|
|
1838
|
+
L !== "" && (f.push(L), Q(L) || (p = !1));
|
|
1839
|
+
}
|
|
1840
|
+
return p ? f.map((x) => Number(x)) : f;
|
|
1841
|
+
}, Ui = (r, c) => c ? c.findIndex((f) => f === r || f.toString().trim() === r.toString().trim()) : -1, Fi = (r) => ({ updatePosition: (c, f, p, x) => {
|
|
1842
|
+
if (f.length <= 0)
|
|
1843
|
+
return;
|
|
1844
|
+
let L = f.length === 1, I = f[0], w = f[f.length - 1];
|
|
1845
|
+
c === ue ? (r.style.removeProperty("width"), r.style.removeProperty("right"), r.style.removeProperty("left"), L ? r.style.height = `${I}%` : r.style.height = `${Math.abs(I - w)}%`, x ? (r.style.bottom = "0%", L ? r.style.top = "auto" : r.style.top = `${Math.min(100 - w, 100 - I)}%`) : (r.style.bottom = "auto", L ? r.style.top = "0%" : r.style.top = `${Math.min(I, w)}%`)) : (r.style.removeProperty("height"), r.style.removeProperty("top"), r.style.removeProperty("bottom"), L ? r.style.width = `${I}%` : r.style.width = `${Math.abs(I - w)}%`, p ? (r.style.right = "0%", L ? r.style.left = "auto" : r.style.left = `${Math.min(100 - w, 100 - I)}%`) : (r.style.right = "auto", L ? r.style.left = "0%" : r.style.left = `${Math.min(I, w)}%`));
|
|
1846
|
+
} }), ks = "--animate-onclick", Bi = "--width", zi = "--height", Wi = "--panel-bg-border-radius", Vi = "--panel-bg", Yi = "--panel-bg-hover", Ki = "--panel-bg-fill", qi = "--pointer-width", Xi = "--pointer-height", Gi = "--pointer-border-radius", Ji = "--pointer-bg", Zi = "--pointer-bg-hover", Qi = "--pointer-bg-focus", er = "--pointer-shadow", tr = "--pointer-shadow-hover", sr = "--pointer-shadow-focus", ir = "--pointer-border", rr = "--pointer-border-hover", nr = "--pointer-border-focus", ft = (r, c, f) => {
|
|
1847
|
+
let p = /* @__PURE__ */ new Map();
|
|
1848
|
+
for (let x of r.attributes) {
|
|
1849
|
+
let L = x.nodeName.trim().toLowerCase();
|
|
1850
|
+
if (!c.test(L))
|
|
1851
|
+
continue;
|
|
1852
|
+
let I = L.replace(/\D/g, "").trim(), w = I === "" || I === "0" || I === "1" ? 0 : K(I, 0) - 1, A = f && typeof f == "function" ? f(x.value) : x.value;
|
|
1853
|
+
p.set(w, A);
|
|
1854
|
+
}
|
|
1855
|
+
return p;
|
|
1856
|
+
}, or = (r) => {
|
|
1857
|
+
if (!r)
|
|
1858
|
+
return null;
|
|
1859
|
+
let c = r.getAttribute(ke);
|
|
1860
|
+
if (!c)
|
|
1861
|
+
return null;
|
|
1862
|
+
let f = c.split(";"), p = [];
|
|
1863
|
+
for (let x of f)
|
|
1864
|
+
x.trim() !== "" && p.push(x.trim());
|
|
1865
|
+
return p;
|
|
1866
|
+
}, Ls = [[Bi, F, "sliderWidth", null], [zi, X, "sliderHeight", null], [Wi, ie, "sliderRadius", null], [Vi, z, "sliderBg", null], [Yi, B, "sliderBgHover", null], [Ki, Ce, "sliderBgFill", null], [qi, Se, "pointer#Width", /^pointer([0-9]*)-width$/], [Xi, D, "pointer#Height", /^pointer([0-9]*)-height$/], [Gi, y, "pointer#Radius", /^pointer([0-9]*)-radius$/], [Ji, b, "pointer#Bg", /^pointer([0-9]*)-bg$/], [Zi, k, "pointer#BgHover", /^pointer([0-9]*)-bg-hover$/], [Qi, _, "pointer#BgFocus", /^pointer([0-9]*)-bg-focus$/], [er, P, "pointer#Shadow", /^pointer([0-9]*)-shadow$/], [tr, R, "pointer#ShadowHover", /^pointer([0-9]*)-shadow-hover$/], [sr, V, "pointer#ShadowFocus", /^pointer([0-9]*)-shadow-focus$/], [ir, se, "pointer#Border", /^pointer([0-9]*)-border$/], [rr, Z, "pointer#BorderHover", /^pointer([0-9]*)-border-hover$/], [nr, ce, "pointer#BorderFocus", /^pointer([0-9]*)-border-focus$/]], lr = (r, c, f) => {
|
|
1867
|
+
let p = null, x = [], L = /* @__PURE__ */ new Map(), I = (C, H = c) => {
|
|
1868
|
+
let O = [...H.classList];
|
|
1869
|
+
for (let G of O)
|
|
1870
|
+
G.startsWith(C) && c.classList.remove(G);
|
|
1871
|
+
}, w = () => {
|
|
1872
|
+
I("shape");
|
|
1873
|
+
let C = c.querySelectorAll(".pointer");
|
|
1874
|
+
for (let H of C)
|
|
1875
|
+
I("shape", H);
|
|
1876
|
+
}, A = (C) => {
|
|
1877
|
+
p = C, I("theme-"), typeof C == "string" && c.classList.add(`theme-${C}`);
|
|
1878
|
+
}, N = () => {
|
|
1879
|
+
if (w(), !(x.length <= 0)) {
|
|
1880
|
+
c.classList.add("shape", `shape-${x[0]}`);
|
|
1881
|
+
for (let C = 1; C < x.length; C++) {
|
|
1882
|
+
let H = x[C];
|
|
1883
|
+
if (!H)
|
|
1884
|
+
continue;
|
|
1885
|
+
let O = c.querySelector(`.pointer-${C}`);
|
|
1886
|
+
!O || O.classList.add("shape", `shape-${H}`);
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
}, U = (C, H) => {
|
|
1890
|
+
x[C] = H, N();
|
|
1891
|
+
}, E = () => {
|
|
1892
|
+
w();
|
|
1893
|
+
let C = ft(r, /^pointer([0-9]*)-shape$/);
|
|
1894
|
+
if (!(C.size <= 0)) {
|
|
1895
|
+
for (let H of C) {
|
|
1896
|
+
let O = H[0];
|
|
1897
|
+
x[O] = H[1];
|
|
1898
|
+
}
|
|
1899
|
+
N();
|
|
1900
|
+
}
|
|
1901
|
+
}, Y = (C, H) => `${C}-${H}`, Ae = (C, H, O) => {
|
|
1902
|
+
let G = f[O];
|
|
1903
|
+
if (!G)
|
|
1904
|
+
return;
|
|
1905
|
+
let he = O === 0 ? c : G.$pointer;
|
|
1906
|
+
if (H == null) {
|
|
1907
|
+
L.has(Y(C, O)) && L.delete(Y(C, O)), he.style.removeProperty(C);
|
|
1908
|
+
return;
|
|
1909
|
+
}
|
|
1910
|
+
L.set(Y(C, O), H), he.style.setProperty(C, H);
|
|
1911
|
+
}, fe = (C, H) => L.get(Y(C, H));
|
|
1912
|
+
return (() => {
|
|
1913
|
+
for (let C of Ls) {
|
|
1914
|
+
let [H, O, G, he] = C;
|
|
1915
|
+
if (he) {
|
|
1916
|
+
let re = ft(r, he);
|
|
1917
|
+
for (let ne of re) {
|
|
1918
|
+
let ye = ne[0], be = ne[1];
|
|
1919
|
+
Ae(H, be, ye);
|
|
1920
|
+
}
|
|
1921
|
+
} else {
|
|
1922
|
+
let re = r.getAttribute(O);
|
|
1923
|
+
Ae(H, re, 0);
|
|
1924
|
+
}
|
|
1925
|
+
let ae = [];
|
|
1926
|
+
if (G.indexOf("#") === -1)
|
|
1927
|
+
ae.push([G, 0]);
|
|
1928
|
+
else {
|
|
1929
|
+
ae.push([G.replace("#", ""), 0]), ae.push([G.replace("#", "0"), 0]), ae.push([G.replace("#", "1"), 0]);
|
|
1930
|
+
for (let re = 1; re < f.length; re++)
|
|
1931
|
+
ae.push([G.replace("#", (re + 1).toString()), re]);
|
|
1932
|
+
}
|
|
1933
|
+
for (let re of ae)
|
|
1934
|
+
try {
|
|
1935
|
+
let ne = re[0], ye = re[1];
|
|
1936
|
+
Object.prototype.hasOwnProperty.call(r, ne) || Object.defineProperty(r, ne, { get() {
|
|
1937
|
+
return fe(H, ye);
|
|
1938
|
+
}, set: (be) => {
|
|
1939
|
+
Ae(H, be, ye);
|
|
1940
|
+
} });
|
|
1941
|
+
} catch (ne) {
|
|
1942
|
+
console.error(ne);
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
A(r.getAttribute(ge)), E();
|
|
1946
|
+
})(), { setStyle: Ae, getStyle: fe, get theme() {
|
|
1947
|
+
return p;
|
|
1948
|
+
}, set theme(C) {
|
|
1949
|
+
A(C);
|
|
1950
|
+
}, get pointerShapes() {
|
|
1951
|
+
return x;
|
|
1952
|
+
}, setPointerShape: U };
|
|
1953
|
+
}, Xe = "animate-on-click", Cs = "range-dragging", ar = (r, c, f, p) => {
|
|
1954
|
+
let x = [], L = (U) => {
|
|
1955
|
+
for (let E of x)
|
|
1956
|
+
E.update && typeof E.update == "function" && E.update(U);
|
|
1957
|
+
}, I = () => {
|
|
1958
|
+
for (let U of x)
|
|
1959
|
+
U.destroy && typeof U.destroy == "function" && U.destroy();
|
|
1960
|
+
}, w = (U, E) => {
|
|
1961
|
+
for (let Y of x)
|
|
1962
|
+
Y.onAttrChange && typeof Y.onAttrChange == "function" && Y.onAttrChange(U, E);
|
|
1963
|
+
}, A = (U) => {
|
|
1964
|
+
if (U.gettersAndSetters) {
|
|
1965
|
+
for (let E of U.gettersAndSetters)
|
|
1966
|
+
if (!(!E.name || !E.attributes))
|
|
1967
|
+
try {
|
|
1968
|
+
Object.prototype.hasOwnProperty.call(r, E.name) || Object.defineProperty(r, E.name, E.attributes);
|
|
1969
|
+
} catch (Y) {
|
|
1970
|
+
console.error("defineSettersGetters error:", Y);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}, N = (U) => {
|
|
1974
|
+
var E;
|
|
1975
|
+
if (!U.css)
|
|
1976
|
+
return;
|
|
1977
|
+
let Y = (E = r.shadowRoot) == null ? void 0 : E.querySelector("style");
|
|
1978
|
+
!Y || (Y.innerHTML += U.css);
|
|
1979
|
+
};
|
|
1980
|
+
return { init: () => {
|
|
1981
|
+
if (window.tcRangeSliderPlugins)
|
|
1982
|
+
for (let U of window.tcRangeSliderPlugins) {
|
|
1983
|
+
let E = U();
|
|
1984
|
+
x.push(E), E.init && typeof E.init == "function" && (E.init(r, c, f, p), A(E), N(E));
|
|
1985
|
+
}
|
|
1986
|
+
}, update: L, onAttrChange: w, destroy: I };
|
|
1987
|
+
}, cr = 10, hr = (r, c) => {
|
|
1988
|
+
let f = /* @__PURE__ */ new Map(), p = /^value([0-9]*)$/;
|
|
1989
|
+
for (let w of r.attributes) {
|
|
1990
|
+
let A = w.nodeName.trim().toLowerCase();
|
|
1991
|
+
if (!p.test(A))
|
|
1992
|
+
continue;
|
|
1993
|
+
let N = A.replace("value", "").trim(), U = N === "" || N === "0" || N === "1" ? 0 : K(N, 0) - 1, E = Q(w.value) ? K(w.value, 0) : w.value;
|
|
1994
|
+
f.set(U, E);
|
|
1995
|
+
}
|
|
1996
|
+
let x = Math.max(...Array.from(f.keys())), L = [];
|
|
1997
|
+
L.push([Rt(r, c, 0), f.get(0)]);
|
|
1998
|
+
let I = c;
|
|
1999
|
+
for (let w = 1; w <= x; w++) {
|
|
2000
|
+
let A = c.cloneNode(!0);
|
|
2001
|
+
I.after(A), I = A, L.push([Rt(r, A, w), f.get(w)]);
|
|
2002
|
+
}
|
|
2003
|
+
return L;
|
|
2004
|
+
}, Os = (r, c, f, p, x, L, I) => {
|
|
2005
|
+
try {
|
|
2006
|
+
Object.defineProperty(r, p, { configurable: !0, get() {
|
|
2007
|
+
if (!c)
|
|
2008
|
+
return;
|
|
2009
|
+
let w = c.pointers[f];
|
|
2010
|
+
if (!w)
|
|
2011
|
+
return;
|
|
2012
|
+
let A = c.getTextValue(w.percent);
|
|
2013
|
+
return Q(A) ? K(A, A) : A;
|
|
2014
|
+
}, set: (w) => {
|
|
2015
|
+
c.pointers[f] ? c == null || c.setValue(w, f) : c == null || c.addPointer(w);
|
|
2016
|
+
} }), Object.defineProperty(r, x, { configurable: !0, get() {
|
|
2017
|
+
var w, A;
|
|
2018
|
+
return (A = (w = c == null ? void 0 : c.pointers[f]) == null ? void 0 : w.getAttr("aria-label")) != null ? A : void 0;
|
|
2019
|
+
}, set: (w) => {
|
|
2020
|
+
!c || c.setAriaLabel(f, w);
|
|
2021
|
+
} }), Object.defineProperty(r, L, { configurable: !0, get() {
|
|
2022
|
+
var w, A;
|
|
2023
|
+
return (A = (w = c == null ? void 0 : c.styles) == null ? void 0 : w.pointerShapes[f]) != null ? A : null;
|
|
2024
|
+
}, set: (w) => {
|
|
2025
|
+
!c || !c.styles || c.styles.setPointerShape(f, w);
|
|
2026
|
+
} }), Object.defineProperty(r, I, { configurable: !0, get() {
|
|
2027
|
+
var w;
|
|
2028
|
+
return (w = c == null ? void 0 : c.pointers[f].disabled) != null ? w : !1;
|
|
2029
|
+
}, set: (w) => {
|
|
2030
|
+
if (!c)
|
|
2031
|
+
return;
|
|
2032
|
+
let A = c == null ? void 0 : c.pointers[f];
|
|
2033
|
+
!A || (A.disabled = w);
|
|
2034
|
+
} });
|
|
2035
|
+
} catch (w) {
|
|
2036
|
+
console.error(w);
|
|
2037
|
+
}
|
|
2038
|
+
}, ur = (r, c) => {
|
|
2039
|
+
let f = [["value", "ariaLabel", "pointerShape", "pointerDisabled", 0], ["value0", "ariaLabel0", "pointerShape0", "pointer0Disabled", 0], ["value1", "ariaLabel1", "pointerShape1", "pointer1Disabled", 0]];
|
|
2040
|
+
for (let p = 2; p < cr; p++)
|
|
2041
|
+
f.push([`value${p}`, `ariaLabel${p}`, `pointer${p}Shape`, `pointer${p}Disabled`, p - 1]);
|
|
2042
|
+
for (let p of f)
|
|
2043
|
+
Os(r, c, p[4], p[0], p[1], p[2], p[3]);
|
|
2044
|
+
}, Ds = (r, c, f) => {
|
|
2045
|
+
var p;
|
|
2046
|
+
let x = (p = f.shadowRoot) == null ? void 0 : p.querySelector(".container");
|
|
2047
|
+
if (x)
|
|
2048
|
+
for (let L of r)
|
|
2049
|
+
c ? x.prepend(L.$pointer) : x.append(L.$pointer);
|
|
2050
|
+
}, Pt = 0, st = 100, Ge = 2, Ts = "0.3s", dr = (r, c, f) => {
|
|
2051
|
+
let p = f.map((a) => a[0]), x = null, L = null, I = null, w = null, A = Pt, N = st, U, E, Y = we, Ae = Ge, fe = !1, C = !1, H = !1, O = 0, G = 1 / 0, he = !1, ae, re, ne = !1, ye = !1, be = !1, Pe = Ts, Rs = [], Ps = (a) => {
|
|
2052
|
+
ne || (a.preventDefault && a.preventDefault(), He(a), window.addEventListener("mousemove", He), window.addEventListener("mouseup", gt), Pi(r, a));
|
|
2053
|
+
}, gt = (a) => {
|
|
2054
|
+
ne || (ae = void 0, re = void 0, window.removeEventListener("mousemove", He), window.removeEventListener("mouseup", gt), Pe && c.classList.add(Xe), Ii(r, a));
|
|
2055
|
+
}, gr = (a, g) => {
|
|
2056
|
+
if (p.length <= 0)
|
|
2057
|
+
return;
|
|
2058
|
+
if (p.length === 1)
|
|
2059
|
+
return p[0].isClicked(a) && Pe && c.classList.remove(Xe), p[0];
|
|
2060
|
+
let S = mr(a);
|
|
2061
|
+
if (he) {
|
|
2062
|
+
let W = g, Le = mt(W);
|
|
2063
|
+
Le !== void 0 && (W = Ke(W, Le)), S ? (ae = W, re = 0, Pe && c.classList.remove(Xe)) : ae !== void 0 && (re = W - ae, ae = W);
|
|
2064
|
+
}
|
|
2065
|
+
if (!vr(a) && !S) {
|
|
2066
|
+
for (let W of p)
|
|
2067
|
+
if (!(!W.isClicked(a) || W.disabled))
|
|
2068
|
+
return Pe && c.classList.remove(Xe), W;
|
|
2069
|
+
for (let W of p)
|
|
2070
|
+
if (x === W)
|
|
2071
|
+
return W;
|
|
2072
|
+
}
|
|
2073
|
+
let q = 1 / 0, oe = null;
|
|
2074
|
+
for (let W of p) {
|
|
2075
|
+
if (W.disabled)
|
|
2076
|
+
continue;
|
|
2077
|
+
let Le = Math.abs(g - W.percent);
|
|
2078
|
+
Le < q && (q = Le, oe = W);
|
|
2079
|
+
}
|
|
2080
|
+
return oe;
|
|
2081
|
+
}, Is = () => p.findIndex((a) => x === a && !a.disabled), He = (a) => {
|
|
2082
|
+
let g;
|
|
2083
|
+
if (Y === ue) {
|
|
2084
|
+
let { height: q, top: oe } = c.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientY : a.touches[0].clientY;
|
|
2085
|
+
g = Math.min(Math.max(0, W - oe), q) * 100 / q;
|
|
2086
|
+
} else {
|
|
2087
|
+
let { width: q, left: oe } = c.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientX : a.touches[0].clientX;
|
|
2088
|
+
g = Math.min(Math.max(0, W - oe), q) * 100 / q;
|
|
2089
|
+
}
|
|
2090
|
+
if ((fe || C) && (g = 100 - g), x = gr(a.target, g), he && p.length > 1 && re !== void 0) {
|
|
2091
|
+
let q = p[0], oe = p[p.length - 1], W = q.percent + re < 0, Le = oe.percent + re > 100;
|
|
2092
|
+
if (W || Le)
|
|
2093
|
+
return;
|
|
2094
|
+
for (let Mt = 0; Mt < p.length; Mt++)
|
|
2095
|
+
$e(Mt, p[Mt].percent + re);
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
let S = Is();
|
|
2099
|
+
S !== -1 && ($e(S, g), x == null || x.$pointer.focus());
|
|
2100
|
+
}, vt = (a) => {
|
|
2101
|
+
if (ne || document.activeElement !== r || x != null && x.disabled)
|
|
2102
|
+
return;
|
|
2103
|
+
a.stopPropagation(), a.preventDefault();
|
|
2104
|
+
let g = a.deltaY < 0, S = fe || C, q = g ? !S : S, oe = Is();
|
|
2105
|
+
oe !== -1 && (q ? it(oe, p[oe].percent) : rt(oe, p[oe].percent));
|
|
2106
|
+
}, Ns = (a) => {
|
|
2107
|
+
ne || ye || (Y === ue ? C ? $e(a, 100) : $e(a, 0) : fe ? rt(a, p[a].percent) : it(a, p[a].percent));
|
|
2108
|
+
}, js = (a) => {
|
|
2109
|
+
ne || ye || (Y === ue ? C ? $e(a, 0) : $e(a, 100) : fe ? it(a, p[a].percent) : rt(a, p[a].percent));
|
|
2110
|
+
}, Hs = (a) => {
|
|
2111
|
+
ne || ye || (Y === ue ? C ? rt(a, p[a].percent) : it(a, p[a].percent) : fe ? $e(a, 100) : $e(a, 0));
|
|
2112
|
+
}, Us = (a) => {
|
|
2113
|
+
ne || ye || (Y === ue ? C ? it(a, p[a].percent) : rt(a, p[a].percent) : fe ? $e(a, 0) : $e(a, 100));
|
|
2114
|
+
}, vr = (a) => a.classList.contains("panel"), mr = (a) => a.classList.contains("panel-fill"), it = (a, g) => {
|
|
2115
|
+
if (g === void 0)
|
|
2116
|
+
return;
|
|
2117
|
+
let S = mt(g);
|
|
2118
|
+
S == null && (S = 1), g -= S, g < 0 && (g = 0), $e(a, g);
|
|
2119
|
+
}, rt = (a, g) => {
|
|
2120
|
+
if (g === void 0)
|
|
2121
|
+
return;
|
|
2122
|
+
let S = mt(g);
|
|
2123
|
+
S == null && (S = 1), g += S, g > 100 && (g = 100), $e(a, g);
|
|
2124
|
+
}, Ue = () => {
|
|
2125
|
+
!w || w.update({ percents: Fs(), values: Bs(), $pointers: zs(), min: Ws(), max: Vs(), data: jt(), step: Nt(), round: Ut(), type: Ht(), textMin: yt(), textMax: bt(), rightToLeft: zt(), bottomToTop: Wt(), pointersOverlap: qt(), pointersMinDistance: Ft(), pointersMaxDistance: Bt(), rangeDragging: Xt(), disabled: Vt(), keyboardDisabled: Yt(), mousewheelDisabled: Kt() });
|
|
2126
|
+
}, yr = () => {
|
|
2127
|
+
Ue();
|
|
2128
|
+
}, br = (a) => {
|
|
2129
|
+
if (!(H || p.length <= 1 || N === A))
|
|
2130
|
+
if (a === 0) {
|
|
2131
|
+
let g = G * 100 / (N - A);
|
|
2132
|
+
return Math.max(0, p[a + 1].percent - g);
|
|
2133
|
+
} else {
|
|
2134
|
+
let g = O * 100 / (N - A);
|
|
2135
|
+
return Math.min(p[a - 1].percent + g, 100);
|
|
2136
|
+
}
|
|
2137
|
+
}, $r = (a) => {
|
|
2138
|
+
if (!(H || p.length <= 1 || N === A))
|
|
2139
|
+
if (a === p.length - 1) {
|
|
2140
|
+
let g = G * 100 / (N - A);
|
|
2141
|
+
return Math.min(p[a - 1].percent + g, 100);
|
|
2142
|
+
} else {
|
|
2143
|
+
let g = O * 100 / (N - A);
|
|
2144
|
+
return Math.max(0, p[a + 1].percent - g);
|
|
2145
|
+
}
|
|
2146
|
+
}, mt = (a) => {
|
|
2147
|
+
let g;
|
|
2148
|
+
if (typeof U == "function") {
|
|
2149
|
+
let S = Oe(0, 100, A, N, a);
|
|
2150
|
+
g = U(S, a);
|
|
2151
|
+
} else
|
|
2152
|
+
g = U;
|
|
2153
|
+
if (Q(g)) {
|
|
2154
|
+
let S = N - A;
|
|
2155
|
+
return g = S === 0 ? 0 : g * 100 / S, g;
|
|
2156
|
+
}
|
|
2157
|
+
}, Je = (a) => {
|
|
2158
|
+
if (a === void 0)
|
|
2159
|
+
return;
|
|
2160
|
+
let g = Oe(0, 100, A, N, a);
|
|
2161
|
+
return E !== void 0 ? E[Math.round(g)] : qe(g, Ae);
|
|
2162
|
+
}, yt = () => E !== void 0 ? E[A] : A, bt = () => E !== void 0 ? E[N] : N, Nt = () => U, _r = (a) => {
|
|
2163
|
+
var g;
|
|
2164
|
+
return a <= 0 || H ? yt() : (g = Je(p[a - 1].percent)) != null ? g : "";
|
|
2165
|
+
}, xr = (a) => {
|
|
2166
|
+
var g;
|
|
2167
|
+
return p.length <= 1 || a >= p.length - 1 || H ? bt() : (g = Je(p[a + 1].percent)) != null ? g : "";
|
|
2168
|
+
}, Fs = () => p.map((a) => a.percent), Bs = () => p.map((a) => Je(a.percent)), zs = () => p.map((a) => a.$pointer), Ws = () => A, Vs = () => N, jt = () => E, Ht = () => Y, Ut = () => Ae, Ft = () => O, Bt = () => G, wr = (a) => Rs[a], zt = () => fe, Wt = () => C, Vt = () => ne, Yt = () => ye, Kt = () => be, qt = () => H, Xt = () => he, $e = (a, g) => {
|
|
2169
|
+
if (g === void 0)
|
|
2170
|
+
return;
|
|
2171
|
+
let S = mt(g);
|
|
2172
|
+
S !== void 0 && (g = Ke(g, S));
|
|
2173
|
+
let q = p[a];
|
|
2174
|
+
if (!q)
|
|
2175
|
+
return;
|
|
2176
|
+
let oe = q.updatePosition(g, br(a), $r(a), Y, fe, C);
|
|
2177
|
+
L == null || L.updatePosition(Y, p.map((W) => W.percent), fe, C), Ue();
|
|
2178
|
+
for (let W of p) {
|
|
2179
|
+
let Le = Je(W.percent);
|
|
2180
|
+
Le !== void 0 && (W.setAttr("aria-valuenow", Le.toString()), W.setAttr("aria-valuetext", Le.toString()));
|
|
2181
|
+
}
|
|
2182
|
+
Mr(), oe && ji(r, p.map((W) => Je(W.percent)));
|
|
2183
|
+
}, De = () => {
|
|
2184
|
+
for (let a = 0; a < p.length; a++)
|
|
2185
|
+
$e(a, p[a].percent);
|
|
2186
|
+
}, Ar = (a, g) => {
|
|
2187
|
+
A = E !== void 0 ? 0 : K(a, Pt), N = E !== void 0 ? E.length - 1 : K(g, st), $t(A), _t(N);
|
|
2188
|
+
}, Mr = () => {
|
|
2189
|
+
var a, g;
|
|
2190
|
+
for (let S = 0; S < p.length; S++) {
|
|
2191
|
+
let q = p[S];
|
|
2192
|
+
q.setAttr("aria-valuemin", ((a = _r(S)) != null ? a : "").toString()), q.setAttr("aria-valuemax", ((g = xr(S)) != null ? g : "").toString());
|
|
2193
|
+
}
|
|
2194
|
+
}, $t = (a) => {
|
|
2195
|
+
A = K(a, Pt), A > N && (N = A + st), De();
|
|
2196
|
+
}, _t = (a) => {
|
|
2197
|
+
N = K(a, st), N < A && (N = A + st), De();
|
|
2198
|
+
}, Ys = (a) => {
|
|
2199
|
+
H = !0;
|
|
2200
|
+
for (let g = 0; g < a.length; g++)
|
|
2201
|
+
xt(a[g], g);
|
|
2202
|
+
H = !1;
|
|
2203
|
+
for (let g = 0; g < a.length; g++)
|
|
2204
|
+
xt(a[g], g);
|
|
2205
|
+
}, xt = (a, g) => {
|
|
2206
|
+
let S;
|
|
2207
|
+
E !== void 0 ? (S = a == null ? 0 : Ui(a, E), S === -1 && (S = 0)) : (S = K(a, A), S < A && (S = A), S > N && (S = N));
|
|
2208
|
+
let q = Oe(A, N, 0, 100, S);
|
|
2209
|
+
$e(g, q);
|
|
2210
|
+
}, wt = (a) => {
|
|
2211
|
+
if (a == null) {
|
|
2212
|
+
U = void 0;
|
|
2213
|
+
return;
|
|
2214
|
+
}
|
|
2215
|
+
if (typeof a == "function") {
|
|
2216
|
+
U = a, De();
|
|
2217
|
+
return;
|
|
2218
|
+
}
|
|
2219
|
+
if (Q(a)) {
|
|
2220
|
+
U = K(a, 1);
|
|
2221
|
+
let g = Math.abs(N - A);
|
|
2222
|
+
U > g && (U = void 0), De();
|
|
2223
|
+
return;
|
|
2224
|
+
}
|
|
2225
|
+
U = void 0;
|
|
2226
|
+
}, Gt = (a) => {
|
|
2227
|
+
H = a, De();
|
|
2228
|
+
}, Jt = (a) => {
|
|
2229
|
+
(!Q(a) || a < 0) && (a = 0), O = a;
|
|
2230
|
+
}, Zt = (a) => {
|
|
2231
|
+
(!Q(a) || a < 0) && (a = 1 / 0), G = a;
|
|
2232
|
+
}, Qt = (a) => {
|
|
2233
|
+
ne = a, c.classList.toggle("disabled", ne), ne ? c.setAttribute("aria-disabled", "true") : c.hasAttribute("aria-disabled") && c.removeAttribute("aria-disabled");
|
|
2234
|
+
}, Ks = (a) => {
|
|
2235
|
+
ye = a;
|
|
2236
|
+
}, qs = (a) => {
|
|
2237
|
+
be = a, be ? document.removeEventListener("wheel", vt) : document.addEventListener("wheel", vt, { passive: !1 });
|
|
2238
|
+
}, es = (a) => {
|
|
2239
|
+
if (a == null) {
|
|
2240
|
+
E = void 0;
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
if (E = Hi(a), E === void 0 || E.length <= 0) {
|
|
2244
|
+
E = void 0;
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2247
|
+
$t(0), _t(E.length - 1), U === void 0 && wt(1);
|
|
2248
|
+
}, ts = (a) => {
|
|
2249
|
+
var g;
|
|
2250
|
+
typeof a == "string" ? Y = a.trim().toLowerCase() === ue ? ue : we : Y = we;
|
|
2251
|
+
let S = (g = r.shadowRoot) == null ? void 0 : g.querySelector(".range-slider-box");
|
|
2252
|
+
if (!S)
|
|
2253
|
+
return;
|
|
2254
|
+
S.className = `range-slider-box type-${Y}`, De();
|
|
2255
|
+
let q = Y === ue ? "vertical" : "horizontal";
|
|
2256
|
+
for (let oe of p)
|
|
2257
|
+
oe.setAttr("aria-orientation", q);
|
|
2258
|
+
}, ss = (a) => {
|
|
2259
|
+
fe = a, p.length > 1 && Ds(p, fe, r), De(), Ue();
|
|
2260
|
+
}, is = (a) => {
|
|
2261
|
+
C = a, p.length > 1 && Ds(p, C, r), De(), Ue();
|
|
2262
|
+
}, rs = (a) => {
|
|
2263
|
+
Ae = K(a, Ge), Ae < 0 && (Ae = Ge), Ue();
|
|
2264
|
+
}, Xs = (a) => {
|
|
2265
|
+
a == null || a.toString().trim().toLowerCase() === "false" ? (Pe = void 0, c.style.removeProperty(ks), c.classList.remove(Xe)) : (Pe = a.toString(), c.style.setProperty(ks, Pe), c.classList.add(Xe));
|
|
2266
|
+
}, Gs = (a, g) => {
|
|
2267
|
+
let S = p[a];
|
|
2268
|
+
!S || (S.setAttr("aria-label", g), Rs[a] = g);
|
|
2269
|
+
}, At = (a) => {
|
|
2270
|
+
if (ae = void 0, p.length <= 1) {
|
|
2271
|
+
he = !1, c.classList.remove(Cs);
|
|
2272
|
+
return;
|
|
2273
|
+
}
|
|
2274
|
+
he = a, c.classList.toggle(Cs, he);
|
|
2275
|
+
}, Sr = () => {
|
|
2276
|
+
Qt(de(r.getAttribute(pe))), ye = de(r.getAttribute(Me)), be = de(r.getAttribute(me));
|
|
2277
|
+
let a = ft(r, /^pointer([0-9]*)-disabled$/, (g) => de(g));
|
|
2278
|
+
for (let g of a) {
|
|
2279
|
+
let S = g[0];
|
|
2280
|
+
!p[S] || (p[S].disabled = g[1]);
|
|
2281
|
+
}
|
|
2282
|
+
}, Er = () => {
|
|
2283
|
+
let a = ft(r, /^aria-label([0-9]*)$/);
|
|
2284
|
+
for (let g of a) {
|
|
2285
|
+
let S = g[0];
|
|
2286
|
+
Gs(S, g[1]);
|
|
2287
|
+
}
|
|
2288
|
+
}, kr = (a) => {
|
|
2289
|
+
let g = p.length, S = p[g - 1].$pointer, q = S.cloneNode(!0);
|
|
2290
|
+
S.after(q);
|
|
2291
|
+
let oe = Rt(r, q, g);
|
|
2292
|
+
return oe.setCallbacks(Ns, js, Hs, Us), p.push(oe), xt(a, g), De(), Ue(), g;
|
|
2293
|
+
}, Lr = () => {
|
|
2294
|
+
let a = p.length, g = p[a - 1];
|
|
2295
|
+
return g ? (g.destroy(), p.pop(), p.length <= 1 && At(!1), De(), Ue(), a - 1) : -1;
|
|
2296
|
+
};
|
|
2297
|
+
return (() => {
|
|
2298
|
+
var a, g;
|
|
2299
|
+
for (let q of p)
|
|
2300
|
+
q.setCallbacks(Ns, js, Hs, Us);
|
|
2301
|
+
let S = (a = r.shadowRoot) == null ? void 0 : a.querySelector(".panel-fill");
|
|
2302
|
+
S && (L = Fi(S)), ts(r.getAttribute(J)), ss(de(r.getAttribute(le))), is(de(r.getAttribute(ve))), Ar(r.getAttribute(v), r.getAttribute($)), wt(r.getAttribute(M)), es(r.getAttribute(m)), Ys(f.map((q) => q[1])), Gt(de(r.getAttribute(o))), Jt(K(r.getAttribute(h), 0)), Zt(K(r.getAttribute(u), 1 / 0)), At(de(r.getAttribute(d))), rs(K(r.getAttribute(j), Ge)), Sr(), Er(), I = lr(r, c, p), Xs((g = r.getAttribute(Ee)) != null ? g : Ts), c.addEventListener("mousedown", Ps), c.addEventListener("mouseup", gt), c.addEventListener("touchmove", He), c.addEventListener("touchstart", He), be || document.addEventListener("wheel", vt, { passive: !1 }), w = ar(r, yr, { setValues: Ys, setMin: $t, setMax: _t, setStep: wt, setPointersOverlap: Gt, setPointersMinDistance: Jt, setPointersMaxDistance: Zt, setDisabled: Qt, setType: ts, setRightToLeft: ss, setBottomToTop: is, setRound: rs, setKeyboardDisabled: Ks, setMousewheelDisabled: qs, setRangeDragging: At, setData: es }, { getPercents: Fs, getValues: Bs, getPointerElements: zs, getMin: Ws, getMax: Vs, getStep: Nt, getData: jt, getType: Ht, getRound: Ut, getTextMin: yt, getTextMax: bt, isRightToLeft: zt, isBottomToTop: Wt, isDisabled: Vt, isKeyboardDisabled: Yt, isMousewheelDisabled: Kt, isPointersOverlap: qt, isRangeDraggingEnabled: Xt, getPointersMinDistance: Ft, getPointersMaxDistance: Bt }), w.init();
|
|
2303
|
+
})(), { get pointers() {
|
|
2304
|
+
return p;
|
|
2305
|
+
}, get styles() {
|
|
2306
|
+
return I;
|
|
2307
|
+
}, get pluginsManager() {
|
|
2308
|
+
return w;
|
|
2309
|
+
}, get min() {
|
|
2310
|
+
return yt();
|
|
2311
|
+
}, get max() {
|
|
2312
|
+
return bt();
|
|
2313
|
+
}, get step() {
|
|
2314
|
+
return Nt();
|
|
2315
|
+
}, get pointersOverlap() {
|
|
2316
|
+
return qt();
|
|
2317
|
+
}, set pointersOverlap(a) {
|
|
2318
|
+
Gt(a);
|
|
2319
|
+
}, get pointersMinDistance() {
|
|
2320
|
+
return Ft();
|
|
2321
|
+
}, set pointersMinDistance(a) {
|
|
2322
|
+
Jt(a);
|
|
2323
|
+
}, get pointersMaxDistance() {
|
|
2324
|
+
return Bt();
|
|
2325
|
+
}, set pointersMaxDistance(a) {
|
|
2326
|
+
Zt(a);
|
|
2327
|
+
}, get disabled() {
|
|
2328
|
+
return Vt();
|
|
2329
|
+
}, set disabled(a) {
|
|
2330
|
+
Qt(a);
|
|
2331
|
+
}, get data() {
|
|
2332
|
+
return jt();
|
|
2333
|
+
}, get type() {
|
|
2334
|
+
return Ht();
|
|
2335
|
+
}, set type(a) {
|
|
2336
|
+
ts(a);
|
|
2337
|
+
}, get rightToLeft() {
|
|
2338
|
+
return zt();
|
|
2339
|
+
}, set rightToLeft(a) {
|
|
2340
|
+
ss(a);
|
|
2341
|
+
}, get bottomToTop() {
|
|
2342
|
+
return Wt();
|
|
2343
|
+
}, set bottomToTop(a) {
|
|
2344
|
+
is(a);
|
|
2345
|
+
}, get round() {
|
|
2346
|
+
return Ut();
|
|
2347
|
+
}, set round(a) {
|
|
2348
|
+
rs(a);
|
|
2349
|
+
}, get animateOnClick() {
|
|
2350
|
+
return Pe;
|
|
2351
|
+
}, set animateOnClick(a) {
|
|
2352
|
+
Xs(a);
|
|
2353
|
+
}, get keyboardDisabled() {
|
|
2354
|
+
return Yt();
|
|
2355
|
+
}, set keyboardDisabled(a) {
|
|
2356
|
+
Ks(a);
|
|
2357
|
+
}, get mousewheelDisabled() {
|
|
2358
|
+
return Kt();
|
|
2359
|
+
}, set mousewheelDisabled(a) {
|
|
2360
|
+
qs(a);
|
|
2361
|
+
}, get rangeDragging() {
|
|
2362
|
+
return Xt();
|
|
2363
|
+
}, set rangeDragging(a) {
|
|
2364
|
+
At(a);
|
|
2365
|
+
}, setMin: $t, setMax: _t, setValue: xt, setStep: wt, setData: es, getTextValue: Je, setAriaLabel: Gs, getAriaLabel: wr, addPointer: kr, removePointer: Lr, destroy: () => {
|
|
2366
|
+
c.removeEventListener("mousedown", Ps), c.removeEventListener("mouseup", gt), c.removeEventListener("touchmove", He), c.removeEventListener("touchstart", He), document.removeEventListener("wheel", vt);
|
|
2367
|
+
for (let a of p)
|
|
2368
|
+
a.destroy();
|
|
2369
|
+
w == null || w.destroy();
|
|
2370
|
+
} };
|
|
2371
|
+
}, pr = (r, c, f) => {
|
|
2372
|
+
let p = Ls.find(([w, A, N, U]) => A.replace("#", "") === c.replace(/\d+/g, ""));
|
|
2373
|
+
if (p && r.styles) {
|
|
2374
|
+
let [w, A, N, U] = p, E = c.replace(/\D/g, "").trim(), Y = E === "" || E === "0" || E === "1" ? 0 : K(E, 0) - 1;
|
|
2375
|
+
r.styles.setStyle(w, f, Y);
|
|
2376
|
+
return;
|
|
2377
|
+
}
|
|
2378
|
+
switch (r && r.pluginsManager && r.pluginsManager.onAttrChange(c, f), c) {
|
|
2379
|
+
case v: {
|
|
2380
|
+
r.setMin(f);
|
|
2381
|
+
break;
|
|
2382
|
+
}
|
|
2383
|
+
case $: {
|
|
2384
|
+
r.setMax(f);
|
|
2385
|
+
break;
|
|
2386
|
+
}
|
|
2387
|
+
case M: {
|
|
2388
|
+
r.setStep(f);
|
|
2389
|
+
break;
|
|
2390
|
+
}
|
|
2391
|
+
case o: {
|
|
2392
|
+
r.pointersOverlap = de(f);
|
|
2393
|
+
break;
|
|
2394
|
+
}
|
|
2395
|
+
case h: {
|
|
2396
|
+
r.pointersMinDistance = K(f, 0);
|
|
2397
|
+
break;
|
|
2398
|
+
}
|
|
2399
|
+
case d: {
|
|
2400
|
+
r.rangeDragging = de(f);
|
|
2401
|
+
break;
|
|
2402
|
+
}
|
|
2403
|
+
case u: {
|
|
2404
|
+
r.pointersMaxDistance = K(f, 1 / 0);
|
|
2405
|
+
break;
|
|
2406
|
+
}
|
|
2407
|
+
case pe: {
|
|
2408
|
+
r.disabled = de(f);
|
|
2409
|
+
break;
|
|
2410
|
+
}
|
|
2411
|
+
case Me: {
|
|
2412
|
+
r.keyboardDisabled = de(f);
|
|
2413
|
+
break;
|
|
2414
|
+
}
|
|
2415
|
+
case me: {
|
|
2416
|
+
r.mousewheelDisabled = de(f);
|
|
2417
|
+
break;
|
|
2418
|
+
}
|
|
2419
|
+
case m: {
|
|
2420
|
+
r.setData(f);
|
|
2421
|
+
break;
|
|
2422
|
+
}
|
|
2423
|
+
case J: {
|
|
2424
|
+
r.type = f;
|
|
2425
|
+
break;
|
|
2426
|
+
}
|
|
2427
|
+
case le: {
|
|
2428
|
+
r.rightToLeft = de(f);
|
|
2429
|
+
break;
|
|
2430
|
+
}
|
|
2431
|
+
case ve: {
|
|
2432
|
+
r.bottomToTop = de(f);
|
|
2433
|
+
break;
|
|
2434
|
+
}
|
|
2435
|
+
case j: {
|
|
2436
|
+
r.round = K(f, Ge);
|
|
2437
|
+
break;
|
|
2438
|
+
}
|
|
2439
|
+
case ge: {
|
|
2440
|
+
r.styles && (r.styles.theme = f);
|
|
2441
|
+
break;
|
|
2442
|
+
}
|
|
2443
|
+
case Ee: {
|
|
2444
|
+
r.animateOnClick = f;
|
|
2445
|
+
break;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
let x = null;
|
|
2449
|
+
if (/^value([0-9]*)$/.test(c) && (x = "value"), /^pointer([0-9]*)-disabled$/.test(c) && (x = "pointer-disabled"), /^aria-label([0-9]*)$/.test(c) && (x = "aria-label"), /^pointer([0-9]*)-shape$/.test(c) && (x = "pointer-shape"), !x)
|
|
2450
|
+
return;
|
|
2451
|
+
let L = c.replace(/\D/g, "").trim(), I = L === "" || L === "0" || L === "1" ? 0 : K(L, 0) - 1;
|
|
2452
|
+
switch (x) {
|
|
2453
|
+
case "value": {
|
|
2454
|
+
r.setValue(f, I);
|
|
2455
|
+
break;
|
|
2456
|
+
}
|
|
2457
|
+
case "pointer-disabled": {
|
|
2458
|
+
let w = r == null ? void 0 : r.pointers[I];
|
|
2459
|
+
if (!w)
|
|
2460
|
+
return;
|
|
2461
|
+
w.disabled = de(f);
|
|
2462
|
+
break;
|
|
2463
|
+
}
|
|
2464
|
+
case "aria-label": {
|
|
2465
|
+
r.setAriaLabel(I, f);
|
|
2466
|
+
break;
|
|
2467
|
+
}
|
|
2468
|
+
case "pointer-shape": {
|
|
2469
|
+
r.styles && r.styles.setPointerShape(I, f);
|
|
2470
|
+
break;
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
}, fr = class extends HTMLElement {
|
|
2474
|
+
constructor() {
|
|
2475
|
+
super(), s(this, "slider"), s(this, "_externalCSSList", []), s(this, "_observer", null), this.attachShadow({ mode: "open" });
|
|
2476
|
+
}
|
|
2477
|
+
set step(r) {
|
|
2478
|
+
this.slider && this.slider.setStep(r);
|
|
2479
|
+
}
|
|
2480
|
+
get step() {
|
|
2481
|
+
var r;
|
|
2482
|
+
return (r = this.slider) == null ? void 0 : r.step;
|
|
2483
|
+
}
|
|
2484
|
+
set disabled(r) {
|
|
2485
|
+
this.slider && (this.slider.disabled = r);
|
|
2486
|
+
}
|
|
2487
|
+
get disabled() {
|
|
2488
|
+
var r, c;
|
|
2489
|
+
return (c = (r = this.slider) == null ? void 0 : r.disabled) != null ? c : !1;
|
|
2490
|
+
}
|
|
2491
|
+
set data(r) {
|
|
2492
|
+
var c;
|
|
2493
|
+
(c = this.slider) == null || c.setData(r);
|
|
2494
|
+
}
|
|
2495
|
+
get data() {
|
|
2496
|
+
var r;
|
|
2497
|
+
return (r = this.slider) == null ? void 0 : r.data;
|
|
2498
|
+
}
|
|
2499
|
+
set min(r) {
|
|
2500
|
+
var c;
|
|
2501
|
+
(c = this.slider) == null || c.setMin(r);
|
|
2502
|
+
}
|
|
2503
|
+
get min() {
|
|
2504
|
+
var r;
|
|
2505
|
+
return (r = this.slider) == null ? void 0 : r.min;
|
|
2506
|
+
}
|
|
2507
|
+
set max(r) {
|
|
2508
|
+
var c;
|
|
2509
|
+
(c = this.slider) == null || c.setMax(r);
|
|
2510
|
+
}
|
|
2511
|
+
get max() {
|
|
2512
|
+
var r;
|
|
2513
|
+
return (r = this.slider) == null ? void 0 : r.max;
|
|
2514
|
+
}
|
|
2515
|
+
set round(r) {
|
|
2516
|
+
!this.slider || (this.slider.round = r);
|
|
2517
|
+
}
|
|
2518
|
+
get round() {
|
|
2519
|
+
var r, c;
|
|
2520
|
+
return (c = (r = this.slider) == null ? void 0 : r.round) != null ? c : Ge;
|
|
2521
|
+
}
|
|
2522
|
+
set type(r) {
|
|
2523
|
+
!this.slider || (this.slider.type = r ?? we);
|
|
2524
|
+
}
|
|
2525
|
+
get type() {
|
|
2526
|
+
var r;
|
|
2527
|
+
return ((r = this.slider) == null ? void 0 : r.type) || we;
|
|
2528
|
+
}
|
|
2529
|
+
set pointersOverlap(r) {
|
|
2530
|
+
!this.slider || (this.slider.pointersOverlap = r);
|
|
2531
|
+
}
|
|
2532
|
+
get pointersOverlap() {
|
|
2533
|
+
var r, c;
|
|
2534
|
+
return (c = (r = this.slider) == null ? void 0 : r.pointersOverlap) != null ? c : !1;
|
|
2535
|
+
}
|
|
2536
|
+
set pointersMinDistance(r) {
|
|
2537
|
+
!this.slider || (this.slider.pointersMinDistance = r);
|
|
2538
|
+
}
|
|
2539
|
+
get pointersMinDistance() {
|
|
2540
|
+
var r, c;
|
|
2541
|
+
return (c = (r = this.slider) == null ? void 0 : r.pointersMinDistance) != null ? c : 0;
|
|
2542
|
+
}
|
|
2543
|
+
set pointersMaxDistance(r) {
|
|
2544
|
+
!this.slider || (this.slider.pointersMaxDistance = r);
|
|
2545
|
+
}
|
|
2546
|
+
get pointersMaxDistance() {
|
|
2547
|
+
var r, c;
|
|
2548
|
+
return (c = (r = this.slider) == null ? void 0 : r.pointersMaxDistance) != null ? c : 1 / 0;
|
|
2549
|
+
}
|
|
2550
|
+
set theme(r) {
|
|
2551
|
+
!this.slider || !this.slider.styles || (this.slider.styles.theme = r);
|
|
2552
|
+
}
|
|
2553
|
+
get theme() {
|
|
2554
|
+
var r, c, f;
|
|
2555
|
+
return (f = (c = (r = this.slider) == null ? void 0 : r.styles) == null ? void 0 : c.theme) != null ? f : null;
|
|
2556
|
+
}
|
|
2557
|
+
set rtl(r) {
|
|
2558
|
+
!this.slider || (this.slider.rightToLeft = r);
|
|
2559
|
+
}
|
|
2560
|
+
get rtl() {
|
|
2561
|
+
var r, c;
|
|
2562
|
+
return (c = (r = this.slider) == null ? void 0 : r.rightToLeft) != null ? c : !1;
|
|
2563
|
+
}
|
|
2564
|
+
set btt(r) {
|
|
2565
|
+
!this.slider || (this.slider.bottomToTop = r);
|
|
2566
|
+
}
|
|
2567
|
+
get btt() {
|
|
2568
|
+
var r, c;
|
|
2569
|
+
return (c = (r = this.slider) == null ? void 0 : r.bottomToTop) != null ? c : !1;
|
|
2570
|
+
}
|
|
2571
|
+
set keyboardDisabled(r) {
|
|
2572
|
+
!this.slider || (this.slider.keyboardDisabled = r);
|
|
2573
|
+
}
|
|
2574
|
+
get keyboardDisabled() {
|
|
2575
|
+
var r, c;
|
|
2576
|
+
return (c = (r = this.slider) == null ? void 0 : r.keyboardDisabled) != null ? c : !1;
|
|
2577
|
+
}
|
|
2578
|
+
set mousewheelDisabled(r) {
|
|
2579
|
+
!this.slider || (this.slider.mousewheelDisabled = r);
|
|
2580
|
+
}
|
|
2581
|
+
get mousewheelDisabled() {
|
|
2582
|
+
var r, c;
|
|
2583
|
+
return (c = (r = this.slider) == null ? void 0 : r.mousewheelDisabled) != null ? c : !1;
|
|
2584
|
+
}
|
|
2585
|
+
set animateOnClick(r) {
|
|
2586
|
+
!this.slider || (this.slider.animateOnClick = r);
|
|
2587
|
+
}
|
|
2588
|
+
get animateOnClick() {
|
|
2589
|
+
var r;
|
|
2590
|
+
return (r = this.slider) == null ? void 0 : r.animateOnClick;
|
|
2591
|
+
}
|
|
2592
|
+
get rangeDragging() {
|
|
2593
|
+
var r, c;
|
|
2594
|
+
return (c = (r = this.slider) == null ? void 0 : r.rangeDragging) != null ? c : !1;
|
|
2595
|
+
}
|
|
2596
|
+
set rangeDragging(r) {
|
|
2597
|
+
this.slider && (this.slider.rangeDragging = de(r));
|
|
2598
|
+
}
|
|
2599
|
+
get externalCSSList() {
|
|
2600
|
+
return this._externalCSSList;
|
|
2601
|
+
}
|
|
2602
|
+
addPointer(r) {
|
|
2603
|
+
var c;
|
|
2604
|
+
if (!this.slider)
|
|
2605
|
+
return;
|
|
2606
|
+
let f = (c = this.slider) == null ? void 0 : c.addPointer(r);
|
|
2607
|
+
Os(this, this.slider, f, `value${f + 1}`, `ariaLabel${f + 1}`, `pointerShape${f + 1}`, `pointer${f + 1}Disabled`);
|
|
2608
|
+
}
|
|
2609
|
+
removePointer() {
|
|
2610
|
+
var r;
|
|
2611
|
+
!this.slider || (r = this.slider) == null || r.removePointer();
|
|
2612
|
+
}
|
|
2613
|
+
addCSS(r) {
|
|
2614
|
+
if (!this.shadowRoot)
|
|
2615
|
+
return;
|
|
2616
|
+
let c = document.createElement("style");
|
|
2617
|
+
c.textContent = r, this.shadowRoot.appendChild(c);
|
|
2618
|
+
}
|
|
2619
|
+
connectedCallback() {
|
|
2620
|
+
var r, c;
|
|
2621
|
+
if (!this.shadowRoot)
|
|
2622
|
+
return;
|
|
2623
|
+
this._externalCSSList = or(this), this.shadowRoot.innerHTML = n(l, this._externalCSSList);
|
|
2624
|
+
let f = (r = this.shadowRoot) == null ? void 0 : r.querySelector(".pointer");
|
|
2625
|
+
if (!f)
|
|
2626
|
+
return;
|
|
2627
|
+
let p = (c = this.shadowRoot) == null ? void 0 : c.getElementById("range-slider");
|
|
2628
|
+
if (!p)
|
|
2629
|
+
return;
|
|
2630
|
+
let x = hr(this, f);
|
|
2631
|
+
this.slider = dr(this, p, x), ur(this, this.slider), this._observer = new MutationObserver((L) => {
|
|
2632
|
+
L.forEach((I) => {
|
|
2633
|
+
var w;
|
|
2634
|
+
if (!this.slider || I.type !== "attributes")
|
|
2635
|
+
return;
|
|
2636
|
+
let A = I.attributeName;
|
|
2637
|
+
!A || pr(this.slider, A, (w = this.getAttribute(A)) != null ? w : "");
|
|
2638
|
+
});
|
|
2639
|
+
}), this._observer.observe(this, { attributes: !0 });
|
|
2640
|
+
}
|
|
2641
|
+
disconnectedCallback() {
|
|
2642
|
+
this._observer && this._observer.disconnect(), this.slider && this.slider.destroy();
|
|
2643
|
+
}
|
|
2644
|
+
}, It = fr;
|
|
2645
|
+
window.tcRangeSlider = It, customElements.get("toolcool-range-slider") || customElements.define("toolcool-range-slider", It), customElements.get("tc-range-slider") || customElements.define("tc-range-slider", class extends It {
|
|
2646
|
+
});
|
|
2647
|
+
})();
|
|
2648
|
+
var Ti = { exports: {} };
|
|
2649
|
+
(function(i, e) {
|
|
2650
|
+
(function(t, s) {
|
|
2651
|
+
i.exports = s();
|
|
2652
|
+
})(at, function() {
|
|
2653
|
+
var t = 1e3, s = 6e4, n = 36e5, l = "millisecond", o = "second", h = "minute", u = "hour", d = "day", m = "week", v = "month", $ = "quarter", M = "year", j = "date", J = "Invalid Date", ge = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, le = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ve = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) {
|
|
2654
|
+
var y = ["th", "st", "nd", "rd"], b = D % 100;
|
|
2655
|
+
return "[" + D + (y[(b - 20) % 10] || y[b] || y[0]) + "]";
|
|
2656
|
+
} }, pe = function(D, y, b) {
|
|
2657
|
+
var k = String(D);
|
|
2658
|
+
return !k || k.length >= y ? D : "" + Array(y + 1 - k.length).join(b) + D;
|
|
2659
|
+
}, Me = { s: pe, z: function(D) {
|
|
2660
|
+
var y = -D.utcOffset(), b = Math.abs(y), k = Math.floor(b / 60), _ = b % 60;
|
|
2661
|
+
return (y <= 0 ? "+" : "-") + pe(k, 2, "0") + ":" + pe(_, 2, "0");
|
|
2662
|
+
}, m: function D(y, b) {
|
|
2663
|
+
if (y.date() < b.date())
|
|
2664
|
+
return -D(b, y);
|
|
2665
|
+
var k = 12 * (b.year() - y.year()) + (b.month() - y.month()), _ = y.clone().add(k, v), P = b - _ < 0, R = y.clone().add(k + (P ? -1 : 1), v);
|
|
2666
|
+
return +(-(k + (b - _) / (P ? _ - R : R - _)) || 0);
|
|
2667
|
+
}, a: function(D) {
|
|
2668
|
+
return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
|
|
2669
|
+
}, p: function(D) {
|
|
2670
|
+
return { M: v, y: M, w: m, d, D: j, h: u, m: h, s: o, ms: l, Q: $ }[D] || String(D || "").toLowerCase().replace(/s$/, "");
|
|
2671
|
+
}, u: function(D) {
|
|
2672
|
+
return D === void 0;
|
|
2673
|
+
} }, me = "en", F = {};
|
|
2674
|
+
F[me] = ve;
|
|
2675
|
+
var X = function(D) {
|
|
2676
|
+
return D instanceof Ce;
|
|
2677
|
+
}, ie = function D(y, b, k) {
|
|
2678
|
+
var _;
|
|
2679
|
+
if (!y)
|
|
2680
|
+
return me;
|
|
2681
|
+
if (typeof y == "string") {
|
|
2682
|
+
var P = y.toLowerCase();
|
|
2683
|
+
F[P] && (_ = P), b && (F[P] = b, _ = P);
|
|
2684
|
+
var R = y.split("-");
|
|
2685
|
+
if (!_ && R.length > 1)
|
|
2686
|
+
return D(R[0]);
|
|
2687
|
+
} else {
|
|
2688
|
+
var V = y.name;
|
|
2689
|
+
F[V] = y, _ = V;
|
|
2690
|
+
}
|
|
2691
|
+
return !k && _ && (me = _), _ || !k && me;
|
|
2692
|
+
}, z = function(D, y) {
|
|
2693
|
+
if (X(D))
|
|
2694
|
+
return D.clone();
|
|
2695
|
+
var b = typeof y == "object" ? y : {};
|
|
2696
|
+
return b.date = D, b.args = arguments, new Ce(b);
|
|
2697
|
+
}, B = Me;
|
|
2698
|
+
B.l = ie, B.i = X, B.w = function(D, y) {
|
|
2699
|
+
return z(D, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
|
|
2700
|
+
};
|
|
2701
|
+
var Ce = function() {
|
|
2702
|
+
function D(b) {
|
|
2703
|
+
this.$L = ie(b.locale, null, !0), this.parse(b);
|
|
2704
|
+
}
|
|
2705
|
+
var y = D.prototype;
|
|
2706
|
+
return y.parse = function(b) {
|
|
2707
|
+
this.$d = function(k) {
|
|
2708
|
+
var _ = k.date, P = k.utc;
|
|
2709
|
+
if (_ === null)
|
|
2710
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
2711
|
+
if (B.u(_))
|
|
2712
|
+
return /* @__PURE__ */ new Date();
|
|
2713
|
+
if (_ instanceof Date)
|
|
2714
|
+
return new Date(_);
|
|
2715
|
+
if (typeof _ == "string" && !/Z$/i.test(_)) {
|
|
2716
|
+
var R = _.match(ge);
|
|
2717
|
+
if (R) {
|
|
2718
|
+
var V = R[2] - 1 || 0, se = (R[7] || "0").substring(0, 3);
|
|
2719
|
+
return P ? new Date(Date.UTC(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se)) : new Date(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se);
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
return new Date(_);
|
|
2723
|
+
}(b), this.$x = b.x || {}, this.init();
|
|
2724
|
+
}, y.init = function() {
|
|
2725
|
+
var b = this.$d;
|
|
2726
|
+
this.$y = b.getFullYear(), this.$M = b.getMonth(), this.$D = b.getDate(), this.$W = b.getDay(), this.$H = b.getHours(), this.$m = b.getMinutes(), this.$s = b.getSeconds(), this.$ms = b.getMilliseconds();
|
|
2727
|
+
}, y.$utils = function() {
|
|
2728
|
+
return B;
|
|
2729
|
+
}, y.isValid = function() {
|
|
2730
|
+
return this.$d.toString() !== J;
|
|
2731
|
+
}, y.isSame = function(b, k) {
|
|
2732
|
+
var _ = z(b);
|
|
2733
|
+
return this.startOf(k) <= _ && _ <= this.endOf(k);
|
|
2734
|
+
}, y.isAfter = function(b, k) {
|
|
2735
|
+
return z(b) < this.startOf(k);
|
|
2736
|
+
}, y.isBefore = function(b, k) {
|
|
2737
|
+
return this.endOf(k) < z(b);
|
|
2738
|
+
}, y.$g = function(b, k, _) {
|
|
2739
|
+
return B.u(b) ? this[k] : this.set(_, b);
|
|
2740
|
+
}, y.unix = function() {
|
|
2741
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
2742
|
+
}, y.valueOf = function() {
|
|
2743
|
+
return this.$d.getTime();
|
|
2744
|
+
}, y.startOf = function(b, k) {
|
|
2745
|
+
var _ = this, P = !!B.u(k) || k, R = B.p(b), V = function(Oe, Q) {
|
|
2746
|
+
var K = B.w(_.$u ? Date.UTC(_.$y, Q, Oe) : new Date(_.$y, Q, Oe), _);
|
|
2747
|
+
return P ? K : K.endOf(d);
|
|
2748
|
+
}, se = function(Oe, Q) {
|
|
2749
|
+
return B.w(_.toDate()[Oe].apply(_.toDate("s"), (P ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Q)), _);
|
|
2750
|
+
}, Z = this.$W, ce = this.$M, Ee = this.$D, ke = "set" + (this.$u ? "UTC" : "");
|
|
2751
|
+
switch (R) {
|
|
2752
|
+
case M:
|
|
2753
|
+
return P ? V(1, 0) : V(31, 11);
|
|
2754
|
+
case v:
|
|
2755
|
+
return P ? V(1, ce) : V(0, ce + 1);
|
|
2756
|
+
case m:
|
|
2757
|
+
var ue = this.$locale().weekStart || 0, we = (Z < ue ? Z + 7 : Z) - ue;
|
|
2758
|
+
return V(P ? Ee - we : Ee + (6 - we), ce);
|
|
2759
|
+
case d:
|
|
2760
|
+
case j:
|
|
2761
|
+
return se(ke + "Hours", 0);
|
|
2762
|
+
case u:
|
|
2763
|
+
return se(ke + "Minutes", 1);
|
|
2764
|
+
case h:
|
|
2765
|
+
return se(ke + "Seconds", 2);
|
|
2766
|
+
case o:
|
|
2767
|
+
return se(ke + "Milliseconds", 3);
|
|
2768
|
+
default:
|
|
2769
|
+
return this.clone();
|
|
2770
|
+
}
|
|
2771
|
+
}, y.endOf = function(b) {
|
|
2772
|
+
return this.startOf(b, !1);
|
|
2773
|
+
}, y.$set = function(b, k) {
|
|
2774
|
+
var _, P = B.p(b), R = "set" + (this.$u ? "UTC" : ""), V = (_ = {}, _[d] = R + "Date", _[j] = R + "Date", _[v] = R + "Month", _[M] = R + "FullYear", _[u] = R + "Hours", _[h] = R + "Minutes", _[o] = R + "Seconds", _[l] = R + "Milliseconds", _)[P], se = P === d ? this.$D + (k - this.$W) : k;
|
|
2775
|
+
if (P === v || P === M) {
|
|
2776
|
+
var Z = this.clone().set(j, 1);
|
|
2777
|
+
Z.$d[V](se), Z.init(), this.$d = Z.set(j, Math.min(this.$D, Z.daysInMonth())).$d;
|
|
2778
|
+
} else
|
|
2779
|
+
V && this.$d[V](se);
|
|
2780
|
+
return this.init(), this;
|
|
2781
|
+
}, y.set = function(b, k) {
|
|
2782
|
+
return this.clone().$set(b, k);
|
|
2783
|
+
}, y.get = function(b) {
|
|
2784
|
+
return this[B.p(b)]();
|
|
2785
|
+
}, y.add = function(b, k) {
|
|
2786
|
+
var _, P = this;
|
|
2787
|
+
b = Number(b);
|
|
2788
|
+
var R = B.p(k), V = function(ce) {
|
|
2789
|
+
var Ee = z(P);
|
|
2790
|
+
return B.w(Ee.date(Ee.date() + Math.round(ce * b)), P);
|
|
2791
|
+
};
|
|
2792
|
+
if (R === v)
|
|
2793
|
+
return this.set(v, this.$M + b);
|
|
2794
|
+
if (R === M)
|
|
2795
|
+
return this.set(M, this.$y + b);
|
|
2796
|
+
if (R === d)
|
|
2797
|
+
return V(1);
|
|
2798
|
+
if (R === m)
|
|
2799
|
+
return V(7);
|
|
2800
|
+
var se = (_ = {}, _[h] = s, _[u] = n, _[o] = t, _)[R] || 1, Z = this.$d.getTime() + b * se;
|
|
2801
|
+
return B.w(Z, this);
|
|
2802
|
+
}, y.subtract = function(b, k) {
|
|
2803
|
+
return this.add(-1 * b, k);
|
|
2804
|
+
}, y.format = function(b) {
|
|
2805
|
+
var k = this, _ = this.$locale();
|
|
2806
|
+
if (!this.isValid())
|
|
2807
|
+
return _.invalidDate || J;
|
|
2808
|
+
var P = b || "YYYY-MM-DDTHH:mm:ssZ", R = B.z(this), V = this.$H, se = this.$m, Z = this.$M, ce = _.weekdays, Ee = _.months, ke = function(Q, K, Ke, qe) {
|
|
2809
|
+
return Q && (Q[K] || Q(k, P)) || Ke[K].slice(0, qe);
|
|
2810
|
+
}, ue = function(Q) {
|
|
2811
|
+
return B.s(V % 12 || 12, Q, "0");
|
|
2812
|
+
}, we = _.meridiem || function(Q, K, Ke) {
|
|
2813
|
+
var qe = Q < 12 ? "AM" : "PM";
|
|
2814
|
+
return Ke ? qe.toLowerCase() : qe;
|
|
2815
|
+
}, Oe = { YY: String(this.$y).slice(-2), YYYY: B.s(this.$y, 4, "0"), M: Z + 1, MM: B.s(Z + 1, 2, "0"), MMM: ke(_.monthsShort, Z, Ee, 3), MMMM: ke(Ee, Z), D: this.$D, DD: B.s(this.$D, 2, "0"), d: String(this.$W), dd: ke(_.weekdaysMin, this.$W, ce, 2), ddd: ke(_.weekdaysShort, this.$W, ce, 3), dddd: ce[this.$W], H: String(V), HH: B.s(V, 2, "0"), h: ue(1), hh: ue(2), a: we(V, se, !0), A: we(V, se, !1), m: String(se), mm: B.s(se, 2, "0"), s: String(this.$s), ss: B.s(this.$s, 2, "0"), SSS: B.s(this.$ms, 3, "0"), Z: R };
|
|
2816
|
+
return P.replace(le, function(Q, K) {
|
|
2817
|
+
return K || Oe[Q] || R.replace(":", "");
|
|
2818
|
+
});
|
|
2819
|
+
}, y.utcOffset = function() {
|
|
2820
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
2821
|
+
}, y.diff = function(b, k, _) {
|
|
2822
|
+
var P, R = B.p(k), V = z(b), se = (V.utcOffset() - this.utcOffset()) * s, Z = this - V, ce = B.m(this, V);
|
|
2823
|
+
return ce = (P = {}, P[M] = ce / 12, P[v] = ce, P[$] = ce / 3, P[m] = (Z - se) / 6048e5, P[d] = (Z - se) / 864e5, P[u] = Z / n, P[h] = Z / s, P[o] = Z / t, P)[R] || Z, _ ? ce : B.a(ce);
|
|
2824
|
+
}, y.daysInMonth = function() {
|
|
2825
|
+
return this.endOf(v).$D;
|
|
2826
|
+
}, y.$locale = function() {
|
|
2827
|
+
return F[this.$L];
|
|
2828
|
+
}, y.locale = function(b, k) {
|
|
2829
|
+
if (!b)
|
|
2830
|
+
return this.$L;
|
|
2831
|
+
var _ = this.clone(), P = ie(b, k, !0);
|
|
2832
|
+
return P && (_.$L = P), _;
|
|
2833
|
+
}, y.clone = function() {
|
|
2834
|
+
return B.w(this.$d, this);
|
|
2835
|
+
}, y.toDate = function() {
|
|
2836
|
+
return new Date(this.valueOf());
|
|
2837
|
+
}, y.toJSON = function() {
|
|
2838
|
+
return this.isValid() ? this.toISOString() : null;
|
|
2839
|
+
}, y.toISOString = function() {
|
|
2840
|
+
return this.$d.toISOString();
|
|
2841
|
+
}, y.toString = function() {
|
|
2842
|
+
return this.$d.toUTCString();
|
|
2843
|
+
}, D;
|
|
2844
|
+
}(), Se = Ce.prototype;
|
|
2845
|
+
return z.prototype = Se, [["$ms", l], ["$s", o], ["$m", h], ["$H", u], ["$W", d], ["$M", v], ["$y", M], ["$D", j]].forEach(function(D) {
|
|
2846
|
+
Se[D[1]] = function(y) {
|
|
2847
|
+
return this.$g(y, D[0], D[1]);
|
|
2848
|
+
};
|
|
2849
|
+
}), z.extend = function(D, y) {
|
|
2850
|
+
return D.$i || (D(y, Ce, z), D.$i = !0), z;
|
|
2851
|
+
}, z.locale = ie, z.isDayjs = X, z.unix = function(D) {
|
|
2852
|
+
return z(1e3 * D);
|
|
2853
|
+
}, z.en = F[me], z.Ls = F, z.p = {}, z;
|
|
2854
|
+
});
|
|
2855
|
+
})(Ti);
|
|
2856
|
+
var no = Ti.exports;
|
|
2857
|
+
const Et = /* @__PURE__ */ Di(no), oo = (i, e = "highlight", t = "title") => {
|
|
2858
|
+
const s = (l, o, h) => {
|
|
2859
|
+
const u = o.split(".");
|
|
2860
|
+
let d;
|
|
2861
|
+
for (d = 0; d < u.length - 1; d++)
|
|
2862
|
+
l = l[u[d]];
|
|
2863
|
+
l[u[d]] = h;
|
|
2864
|
+
}, n = (l, o = []) => {
|
|
2865
|
+
let h = "", u = 0;
|
|
2866
|
+
return o.forEach((d) => {
|
|
2867
|
+
const m = d[1] + 1;
|
|
2868
|
+
h += [
|
|
2869
|
+
l.substring(u, d[0]),
|
|
2870
|
+
`<mark class="${e}">`,
|
|
2871
|
+
l.substring(d[0], m),
|
|
1771
2872
|
"</mark>"
|
|
1772
|
-
].join(""),
|
|
1773
|
-
}),
|
|
2873
|
+
].join(""), u = m;
|
|
2874
|
+
}), h += l.substring(u), h;
|
|
1774
2875
|
};
|
|
1775
|
-
return i.filter(({ matches:
|
|
1776
|
-
const
|
|
1777
|
-
return o.forEach((
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
n(
|
|
2876
|
+
return i.filter(({ matches: l }) => l && l.length).map(({ item: l, matches: o }) => {
|
|
2877
|
+
const h = { ...l };
|
|
2878
|
+
return o.forEach((u) => {
|
|
2879
|
+
u.key === t && s(
|
|
2880
|
+
h,
|
|
2881
|
+
u.key,
|
|
2882
|
+
n(u.value, u.indices)
|
|
1782
2883
|
);
|
|
1783
|
-
}),
|
|
2884
|
+
}), h;
|
|
1784
2885
|
});
|
|
1785
|
-
},
|
|
2886
|
+
}, lo = `
|
|
1786
2887
|
:host {
|
|
1787
2888
|
display: flex;
|
|
1788
2889
|
box-sizing: border-box;
|
|
@@ -1927,92 +3028,92 @@ section.inline details.details-filter summary {
|
|
|
1927
3028
|
overflow-y: auto;
|
|
1928
3029
|
}
|
|
1929
3030
|
`;
|
|
1930
|
-
var
|
|
1931
|
-
for (var n = s > 1 ? void 0 : s ?
|
|
1932
|
-
(o = i[
|
|
1933
|
-
return s && n &&
|
|
3031
|
+
var ao = Object.defineProperty, co = Object.getOwnPropertyDescriptor, Ye = (i, e, t, s) => {
|
|
3032
|
+
for (var n = s > 1 ? void 0 : s ? co(e, t) : e, l = i.length - 1, o; l >= 0; l--)
|
|
3033
|
+
(o = i[l]) && (n = (s ? o(e, t, n) : o(n)) || n);
|
|
3034
|
+
return s && n && ao(e, t, n), n;
|
|
1934
3035
|
};
|
|
1935
|
-
class
|
|
3036
|
+
class mi {
|
|
1936
3037
|
constructor() {
|
|
1937
3038
|
/**
|
|
1938
3039
|
* Aggregate results by a property key
|
|
1939
3040
|
*/
|
|
1940
|
-
|
|
3041
|
+
ee(this, "aggregateResults");
|
|
1941
3042
|
/**
|
|
1942
3043
|
* Highlighting of search result character matches
|
|
1943
3044
|
*/
|
|
1944
|
-
|
|
3045
|
+
ee(this, "enableHighlighting", !1);
|
|
1945
3046
|
/**
|
|
1946
3047
|
* Search functionality
|
|
1947
3048
|
*/
|
|
1948
|
-
|
|
3049
|
+
ee(this, "enableSearch", !1);
|
|
1949
3050
|
/**
|
|
1950
3051
|
* Make the filters mutually exclusive
|
|
1951
3052
|
*/
|
|
1952
|
-
|
|
3053
|
+
ee(this, "exclusiveFilters", !1);
|
|
1953
3054
|
/**
|
|
1954
3055
|
* Use an external search endpoint instead of fuse search.
|
|
1955
3056
|
* Passed properties: input string, filters object
|
|
1956
3057
|
*/
|
|
1957
|
-
|
|
3058
|
+
ee(this, "externalSearch");
|
|
1958
3059
|
/**
|
|
1959
3060
|
* The filter properties.
|
|
1960
3061
|
* @param filterProperties
|
|
1961
3062
|
*/
|
|
1962
|
-
|
|
3063
|
+
ee(this, "filterProperties", []);
|
|
1963
3064
|
/**
|
|
1964
3065
|
* Native fuse.js config override
|
|
1965
3066
|
*/
|
|
1966
|
-
|
|
3067
|
+
ee(this, "fuseConfig", {
|
|
1967
3068
|
keys: ["title"]
|
|
1968
3069
|
});
|
|
1969
3070
|
/**
|
|
1970
3071
|
* Inline mode, for rendering the itemfilter in avery condensed space.
|
|
1971
3072
|
* Expexts showResults to be false and enableSearch to be true
|
|
1972
3073
|
*/
|
|
1973
|
-
|
|
3074
|
+
ee(this, "inlineMode", !1);
|
|
1974
3075
|
/**
|
|
1975
3076
|
* Show all result items if nothing is input by the user
|
|
1976
3077
|
* @default true
|
|
1977
3078
|
*/
|
|
1978
|
-
|
|
3079
|
+
ee(this, "matchAllWhenEmpty", !0);
|
|
1979
3080
|
/**
|
|
1980
3081
|
* Callback that is triggered on item search
|
|
1981
3082
|
* @returns result items
|
|
1982
3083
|
*/
|
|
1983
|
-
|
|
3084
|
+
ee(this, "onSearch", () => {
|
|
1984
3085
|
});
|
|
1985
3086
|
/**
|
|
1986
3087
|
* Callback that is triggered on item selection
|
|
1987
3088
|
* @returns selected item
|
|
1988
3089
|
*/
|
|
1989
|
-
|
|
3090
|
+
ee(this, "onSelect", () => {
|
|
1990
3091
|
});
|
|
1991
3092
|
/**
|
|
1992
3093
|
* Display results list
|
|
1993
3094
|
*/
|
|
1994
|
-
|
|
3095
|
+
ee(this, "showResults", !0);
|
|
1995
3096
|
/**
|
|
1996
3097
|
* The property of the result items used for display
|
|
1997
3098
|
*/
|
|
1998
|
-
|
|
3099
|
+
ee(this, "titleProperty", "title");
|
|
1999
3100
|
}
|
|
2000
3101
|
}
|
|
2001
|
-
let
|
|
3102
|
+
let Ne = class extends ct {
|
|
2002
3103
|
constructor() {
|
|
2003
3104
|
super(...arguments);
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
this._items =
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
})), this._fuse = new
|
|
3105
|
+
ee(this, "_fuse");
|
|
3106
|
+
ee(this, "_resultAggregation", []);
|
|
3107
|
+
ee(this, "_items", []);
|
|
3108
|
+
ee(this, "_results");
|
|
3109
|
+
ee(this, "_filters", {});
|
|
3110
|
+
ee(this, "_selectedResult");
|
|
3111
|
+
ee(this, "_config", new mi());
|
|
3112
|
+
ee(this, "apply", (e) => {
|
|
3113
|
+
this._items = e.map((t, s) => ({
|
|
3114
|
+
id: `item-${s}`,
|
|
3115
|
+
...t
|
|
3116
|
+
})), this._fuse = new tt(this._items, {
|
|
2016
3117
|
// minMatchCharLength: 3,
|
|
2017
3118
|
// location: 0,
|
|
2018
3119
|
threshold: 0.4,
|
|
@@ -2020,110 +3121,168 @@ let T = class extends Q {
|
|
|
2020
3121
|
includeMatches: !0,
|
|
2021
3122
|
useExtendedSearch: !0,
|
|
2022
3123
|
...this._config.fuseConfig
|
|
2023
|
-
}), this._config.filterProperties.length && this._config.filterProperties.forEach((
|
|
2024
|
-
const s = {};
|
|
2025
|
-
this._items.forEach((
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
3124
|
+
}), this._config.filterProperties.length && this._config.filterProperties.forEach((t) => {
|
|
3125
|
+
const s = {}, n = (l) => t.format === "date" ? Et(l).unix() : parseInt(l);
|
|
3126
|
+
this._items.forEach((l) => {
|
|
3127
|
+
if (t.type === "range") {
|
|
3128
|
+
if (Array.isArray(l[t.key])) {
|
|
3129
|
+
const o = [
|
|
3130
|
+
// @ts-ignore
|
|
3131
|
+
n(l[t.key][0]),
|
|
3132
|
+
// @ts-ignore
|
|
3133
|
+
n(l[t.key][1])
|
|
3134
|
+
];
|
|
3135
|
+
s.min = // @ts-ignore
|
|
3136
|
+
s.min !== void 0 ? (
|
|
3137
|
+
// @ts-ignore
|
|
3138
|
+
Math.min(s.min, o[0])
|
|
3139
|
+
) : o[0], s.max = // @ts-ignore
|
|
3140
|
+
s.max !== void 0 ? (
|
|
3141
|
+
// @ts-ignore
|
|
3142
|
+
Math.max(s.max, o[1])
|
|
3143
|
+
) : o[1];
|
|
3144
|
+
} else {
|
|
3145
|
+
const o = n(l[t.key]);
|
|
3146
|
+
s.min = // @ts-ignore
|
|
3147
|
+
s.min !== void 0 ? (
|
|
3148
|
+
// @ts-ignore
|
|
3149
|
+
Math.min(s.min, o)
|
|
3150
|
+
) : o, s.max = // @ts-ignore
|
|
3151
|
+
s.max !== void 0 ? (
|
|
3152
|
+
// @ts-ignore
|
|
3153
|
+
Math.max(s.max, o)
|
|
3154
|
+
) : o;
|
|
3155
|
+
}
|
|
3156
|
+
return;
|
|
3157
|
+
}
|
|
3158
|
+
Array.isArray(l[t.key]) ? l[t.key].forEach((o) => {
|
|
3159
|
+
s[o] = void 0;
|
|
3160
|
+
}) : s[l[t.key]] = void 0;
|
|
3161
|
+
}), this._filters[t.key] = {
|
|
3162
|
+
type: t.type || "string",
|
|
3163
|
+
keys: s,
|
|
3164
|
+
...t.type === "range" && {
|
|
3165
|
+
// @ts-ignore
|
|
3166
|
+
min: s.min,
|
|
3167
|
+
// @ts-ignore
|
|
3168
|
+
max: s.max,
|
|
3169
|
+
format: t.format
|
|
3170
|
+
}
|
|
3171
|
+
};
|
|
2030
3172
|
}), this._config.matchAllWhenEmpty !== !1 && (this._results = this.sortResults(this._items), this.requestUpdate()), this._config.aggregateResults && (this._resultAggregation = [
|
|
2031
3173
|
...new Set(
|
|
2032
|
-
this._items.reduce((
|
|
3174
|
+
this._items.reduce((t, s) => t.concat(s[this._config.aggregateResults]), [])
|
|
2033
3175
|
)
|
|
2034
|
-
].sort((
|
|
3176
|
+
].sort((t, s) => t.localeCompare(s)));
|
|
2035
3177
|
});
|
|
2036
|
-
|
|
3178
|
+
ee(this, "inputHandler", () => {
|
|
2037
3179
|
this.search(this.renderRoot.querySelector("input[type='text']").value);
|
|
2038
3180
|
});
|
|
2039
|
-
|
|
3181
|
+
ee(this, "debouncedInputHandler", ro(this.inputHandler, 500, {
|
|
2040
3182
|
leading: !0
|
|
2041
3183
|
}));
|
|
2042
3184
|
}
|
|
2043
|
-
set config(
|
|
2044
|
-
const
|
|
3185
|
+
set config(e) {
|
|
3186
|
+
const t = this._config;
|
|
2045
3187
|
this._config = {
|
|
2046
|
-
...new
|
|
2047
|
-
...
|
|
2048
|
-
}, this.requestUpdate("config",
|
|
3188
|
+
...new mi(),
|
|
3189
|
+
...e
|
|
3190
|
+
}, this.requestUpdate("config", t);
|
|
2049
3191
|
}
|
|
2050
3192
|
get config() {
|
|
2051
3193
|
return this._config;
|
|
2052
3194
|
}
|
|
2053
|
-
async search(
|
|
2054
|
-
const s = Object.entries(
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
},
|
|
2064
|
-
[]
|
|
2065
|
-
);
|
|
3195
|
+
async search(e = "", t = this._filters) {
|
|
3196
|
+
const s = Object.entries(t).filter(([o, h]) => h.type === "string").reduce((o, [h, u]) => {
|
|
3197
|
+
const d = "$or", m = [], v = ($) => {
|
|
3198
|
+
const M = {};
|
|
3199
|
+
M[h] = `="${$}"`, m.push(M);
|
|
3200
|
+
};
|
|
3201
|
+
return Object.entries(u.keys).filter(([$, M]) => M).forEach(([$, M]) => v($)), m.length > 0 && o.push({
|
|
3202
|
+
[d]: m
|
|
3203
|
+
}), o;
|
|
3204
|
+
}, []);
|
|
2066
3205
|
let n;
|
|
2067
|
-
if (!(
|
|
3206
|
+
if (!(e.length > 0) && !s.length && this._config.matchAllWhenEmpty !== !1)
|
|
2068
3207
|
n = this._items;
|
|
2069
3208
|
else if (this.config.externalSearch)
|
|
2070
3209
|
n = (await (await fetch(
|
|
2071
|
-
`${this.config.externalSearch(
|
|
3210
|
+
`${this.config.externalSearch(e, t)}`
|
|
2072
3211
|
)).json()).features;
|
|
2073
3212
|
else {
|
|
2074
|
-
const
|
|
3213
|
+
const o = {
|
|
2075
3214
|
$and: [
|
|
2076
|
-
...
|
|
3215
|
+
...e.length > 0 ? [
|
|
2077
3216
|
{
|
|
2078
3217
|
$or: [
|
|
2079
3218
|
// @ts-ignore
|
|
2080
|
-
...this._config.fuseConfig.keys.map((
|
|
2081
|
-
[
|
|
3219
|
+
...this._config.fuseConfig.keys.map((u) => ({
|
|
3220
|
+
[u]: e
|
|
2082
3221
|
}))
|
|
2083
3222
|
]
|
|
2084
3223
|
}
|
|
2085
3224
|
] : [],
|
|
2086
3225
|
...s
|
|
2087
3226
|
]
|
|
2088
|
-
},
|
|
2089
|
-
n = this._config.enableHighlighting ?
|
|
3227
|
+
}, h = this._fuse.search(o);
|
|
3228
|
+
n = this._config.enableHighlighting ? oo(h, "highlight", this._config.titleProperty) : h.map((u) => u.item);
|
|
3229
|
+
}
|
|
3230
|
+
const l = Object.entries(this._filters).filter(([o, h]) => h.type === "range").reduce((o, [h, u]) => (o[h] = {
|
|
3231
|
+
min: u.keys.min,
|
|
3232
|
+
max: u.keys.max,
|
|
3233
|
+
format: u.format
|
|
3234
|
+
}, o), {});
|
|
3235
|
+
if (Object.keys(l).length > 0) {
|
|
3236
|
+
const o = [];
|
|
3237
|
+
for (let h = 0; h < n.length; h++) {
|
|
3238
|
+
const u = {};
|
|
3239
|
+
for (let [d, m] of Object.entries(l)) {
|
|
3240
|
+
const v = ($) => m.format === "date" ? Et($).unix() : $;
|
|
3241
|
+
n[h].hasOwnProperty(d) ? Array.isArray(n[h][d]) ? u[d] = // @ts-ignore
|
|
3242
|
+
l[d].min <= v(n[h][d][1]) && // @ts-ignore
|
|
3243
|
+
v(n[h][d][0]) <= l[d].max : /* @ts-ignore */ v(n[h][d]) >= l[d].min && // @ts-ignore
|
|
3244
|
+
v(n[h][d]) <= l[d].max ? u[d] = !0 : u[d] = !1 : u[d] = !0;
|
|
3245
|
+
}
|
|
3246
|
+
Object.values(u).every((d) => !!d) && o.push(n[h]);
|
|
3247
|
+
}
|
|
3248
|
+
n = [...o];
|
|
2090
3249
|
}
|
|
2091
3250
|
this._results = this.sortResults(n), this._config.onSearch(n), this.requestUpdate();
|
|
2092
3251
|
}
|
|
2093
|
-
aggregateResults(
|
|
2094
|
-
return
|
|
2095
|
-
const n = s[this._config.aggregateResults],
|
|
3252
|
+
aggregateResults(e, t) {
|
|
3253
|
+
return e.filter((s) => {
|
|
3254
|
+
const n = s[this._config.aggregateResults], l = Object.keys(
|
|
2096
3255
|
// @ts-ignore
|
|
2097
3256
|
this._filters[this._config.aggregateResults]
|
|
2098
3257
|
// @ts-ignore
|
|
2099
|
-
).filter((
|
|
2100
|
-
return (
|
|
3258
|
+
).filter((h) => this._filters[this._config.aggregateResults].keys[h]);
|
|
3259
|
+
return (l.length ? (
|
|
2101
3260
|
// @ts-ignore
|
|
2102
|
-
|
|
2103
|
-
) : !0) && Array.isArray(n) ? n.includes(
|
|
3261
|
+
l.includes(t)
|
|
3262
|
+
) : !0) && Array.isArray(n) ? n.includes(t) : n === t;
|
|
2104
3263
|
});
|
|
2105
3264
|
}
|
|
2106
|
-
sortResults(
|
|
2107
|
-
return [...
|
|
2108
|
-
(
|
|
3265
|
+
sortResults(e) {
|
|
3266
|
+
return [...e].sort(
|
|
3267
|
+
(t, s) => (
|
|
2109
3268
|
// @ts-ignore
|
|
2110
|
-
|
|
3269
|
+
t[this._config.titleProperty].localeCompare(s[this._config.titleProperty])
|
|
2111
3270
|
)
|
|
2112
3271
|
);
|
|
2113
3272
|
}
|
|
2114
|
-
toggleFilter(
|
|
2115
|
-
s && Object.keys(this._filters).forEach((o) => {
|
|
2116
|
-
this._config.filterProperties.find((
|
|
2117
|
-
this._filters[o][
|
|
3273
|
+
toggleFilter(e, t, s) {
|
|
3274
|
+
s && Object.keys(this._filters).filter((o) => this._filters[o].type === "string").forEach((o) => {
|
|
3275
|
+
this._config.filterProperties.find((h) => h.key === o).exclusive && Object.keys(this._filters[o].keys).forEach((h) => {
|
|
3276
|
+
this._filters[o].keys[h] = !1;
|
|
2118
3277
|
});
|
|
2119
|
-
}), this._filters[
|
|
3278
|
+
}), this._filters[e].keys[t] = !this._filters[e].keys[t];
|
|
2120
3279
|
const n = this.renderRoot.querySelector('input[type="text"]');
|
|
2121
3280
|
n ? this.search(n.value) : this.search();
|
|
2122
|
-
const
|
|
3281
|
+
const l = this.renderRoot.querySelectorAll(
|
|
2123
3282
|
"ul#results input[type='radio']"
|
|
2124
3283
|
);
|
|
2125
|
-
for (let o = 0; o <
|
|
2126
|
-
|
|
3284
|
+
for (let o = 0; o < l.length; o++)
|
|
3285
|
+
l[o].checked = !1;
|
|
2127
3286
|
this._selectedResult && setTimeout(() => {
|
|
2128
3287
|
const o = this.renderRoot.querySelector(
|
|
2129
3288
|
// @ts-ignore
|
|
@@ -2133,25 +3292,29 @@ let T = class extends Q {
|
|
|
2133
3292
|
});
|
|
2134
3293
|
}
|
|
2135
3294
|
resetFilters() {
|
|
2136
|
-
this.renderRoot.querySelectorAll(".details-filter input").forEach((
|
|
2137
|
-
|
|
3295
|
+
this.renderRoot.querySelectorAll(".details-filter input").forEach((t) => {
|
|
3296
|
+
t.checked = !1;
|
|
2138
3297
|
});
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
this._filters[
|
|
3298
|
+
const e = this.renderRoot.querySelector('input[type="text"]');
|
|
3299
|
+
e && (e.value = ""), Object.keys(this._filters).forEach((t) => {
|
|
3300
|
+
if (this._filters[t].type === "range") {
|
|
3301
|
+
this._filters[t].keys.min = this._filters[t].min, this._filters[t].keys.max = this._filters[t].max;
|
|
3302
|
+
return;
|
|
3303
|
+
}
|
|
3304
|
+
Object.keys(this._filters[t].keys).forEach((s) => {
|
|
3305
|
+
this._filters[t].keys[s] = !1;
|
|
2143
3306
|
});
|
|
2144
3307
|
}), this.search(), this.requestUpdate();
|
|
2145
3308
|
}
|
|
2146
3309
|
render() {
|
|
2147
|
-
return
|
|
3310
|
+
return _e`
|
|
2148
3311
|
<style>
|
|
2149
|
-
${
|
|
3312
|
+
${lo}
|
|
2150
3313
|
</style>
|
|
2151
|
-
<form @submit="${(
|
|
2152
|
-
${
|
|
3314
|
+
<form @submit="${(e) => e.preventDefault()}">
|
|
3315
|
+
${ot(
|
|
2153
3316
|
this._config.enableSearch,
|
|
2154
|
-
() =>
|
|
3317
|
+
() => _e`
|
|
2155
3318
|
<section>
|
|
2156
3319
|
<input
|
|
2157
3320
|
type="text"
|
|
@@ -2163,37 +3326,37 @@ let T = class extends Q {
|
|
|
2163
3326
|
</section>
|
|
2164
3327
|
`
|
|
2165
3328
|
)}
|
|
2166
|
-
${
|
|
3329
|
+
${ot(
|
|
2167
3330
|
this._config.filterProperties.length,
|
|
2168
|
-
() =>
|
|
2169
|
-
<section class="${this.config.inlineMode ? "inline" :
|
|
2170
|
-
${
|
|
3331
|
+
() => _e`
|
|
3332
|
+
<section class="${this.config.inlineMode ? "inline" : te}">
|
|
3333
|
+
${ot(
|
|
2171
3334
|
!this.config.inlineMode,
|
|
2172
|
-
() =>
|
|
3335
|
+
() => _e` <slot name="filterstitle"></slot> `
|
|
2173
3336
|
)}
|
|
2174
3337
|
<ul id="filters">
|
|
2175
|
-
${
|
|
3338
|
+
${lt(
|
|
2176
3339
|
this._config.filterProperties,
|
|
2177
|
-
(
|
|
3340
|
+
(e) => _e`
|
|
2178
3341
|
<details
|
|
2179
3342
|
class="details-filter"
|
|
2180
3343
|
part="details-filter"
|
|
2181
|
-
data-filter="${
|
|
3344
|
+
data-filter="${e.key}"
|
|
2182
3345
|
>
|
|
2183
3346
|
<summary>
|
|
2184
3347
|
<small>
|
|
2185
3348
|
<strong
|
|
2186
3349
|
class="title"
|
|
2187
|
-
style="${!
|
|
3350
|
+
style="${!e.title && "text-transform: capitalize"}"
|
|
2188
3351
|
>
|
|
2189
|
-
${
|
|
2190
|
-
${
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
).length ? `(${Object.values(
|
|
3352
|
+
${e.title || e.key}
|
|
3353
|
+
${e.type === "string" && Object.values(
|
|
3354
|
+
// @ts-ignore
|
|
3355
|
+
this._filters[e.key].keys
|
|
3356
|
+
).filter((t) => t).length ? `(${Object.values(
|
|
2194
3357
|
// @ts-ignore
|
|
2195
|
-
this._filters[
|
|
2196
|
-
).filter((
|
|
3358
|
+
this._filters[e.key].keys
|
|
3359
|
+
).filter((t) => t).length})` : te}
|
|
2197
3360
|
</strong>
|
|
2198
3361
|
</small>
|
|
2199
3362
|
<div
|
|
@@ -2212,41 +3375,88 @@ let T = class extends Q {
|
|
|
2212
3375
|
</div>
|
|
2213
3376
|
</summary>
|
|
2214
3377
|
<div class="scroll" style="max-height: 150px">
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
3378
|
+
${e.type === "range" ? _e`
|
|
3379
|
+
<div>
|
|
3380
|
+
${e.format === "date" ? Et.unix(
|
|
2218
3381
|
// @ts-ignore
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
3382
|
+
this._filters[e.key].keys.min
|
|
3383
|
+
) : (
|
|
3384
|
+
// @ts-ignore
|
|
3385
|
+
this._filters[e.key].keys.min
|
|
3386
|
+
)}
|
|
3387
|
+
</div>
|
|
3388
|
+
<tc-range-slider
|
|
3389
|
+
min="${// @ts-ignore
|
|
3390
|
+
this._filters[e.key].min}"
|
|
3391
|
+
max="${// @ts-ignore
|
|
3392
|
+
this._filters[e.key].max}"
|
|
3393
|
+
value1="${// @ts-ignore
|
|
3394
|
+
this._filters[e.key].keys.min}"
|
|
3395
|
+
value2="${// @ts-ignore
|
|
3396
|
+
this._filters[e.key].keys.max}"
|
|
3397
|
+
step="1"
|
|
3398
|
+
style="margin: 5px"
|
|
3399
|
+
@change="${(t) => {
|
|
3400
|
+
[
|
|
3401
|
+
// @ts-ignore
|
|
3402
|
+
this._filters[e.key].keys.min,
|
|
3403
|
+
// @ts-ignore
|
|
3404
|
+
this._filters[e.key].keys.max
|
|
3405
|
+
// @ts-ignore
|
|
3406
|
+
] = t.detail.values, this.search(
|
|
3407
|
+
this.renderRoot.querySelector(
|
|
3408
|
+
"input[type='text']"
|
|
3409
|
+
// @ts-ignore
|
|
3410
|
+
).value
|
|
3411
|
+
);
|
|
3412
|
+
}}"
|
|
3413
|
+
></tc-range-slider>
|
|
3414
|
+
<div>
|
|
3415
|
+
${e.format === "date" ? Et.unix(
|
|
3416
|
+
// @ts-ignore
|
|
3417
|
+
this._filters[e.key].keys.max
|
|
3418
|
+
) : (
|
|
3419
|
+
// @ts-ignore
|
|
3420
|
+
this._filters[e.key].keys.max
|
|
3421
|
+
)}
|
|
3422
|
+
</div>
|
|
3423
|
+
` : _e`
|
|
3424
|
+
<ul>
|
|
3425
|
+
${// @ts-ignore
|
|
3426
|
+
this._filters[e.key] ? lt(
|
|
3427
|
+
Object.keys(
|
|
3428
|
+
// @ts-ignore
|
|
3429
|
+
this._filters[e.key].keys
|
|
3430
|
+
).sort((t, s) => t.localeCompare(s)),
|
|
3431
|
+
(t) => _e`
|
|
3432
|
+
<li>
|
|
3433
|
+
<label>
|
|
3434
|
+
<input
|
|
3435
|
+
name="selection"
|
|
3436
|
+
type="${e.exclusive ? "radio" : "checkbox"}"
|
|
3437
|
+
checked="${// @ts-ignore
|
|
3438
|
+
this._filters[e.key].keys[t] || te}"
|
|
3439
|
+
@click=${() => this.toggleFilter(
|
|
3440
|
+
e.key,
|
|
3441
|
+
t,
|
|
3442
|
+
e.exclusive
|
|
2234
3443
|
)}
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
3444
|
+
/>
|
|
3445
|
+
<span class="title">${t}</span>
|
|
3446
|
+
</label>
|
|
3447
|
+
</li>
|
|
3448
|
+
`
|
|
2240
3449
|
) : null}
|
|
2241
|
-
|
|
3450
|
+
</ul>
|
|
3451
|
+
`}
|
|
2242
3452
|
</div>
|
|
2243
3453
|
</details>
|
|
2244
3454
|
`
|
|
2245
3455
|
)}
|
|
2246
3456
|
</ul>
|
|
2247
|
-
${
|
|
3457
|
+
${ot(
|
|
2248
3458
|
this._config.filterProperties,
|
|
2249
|
-
() =>
|
|
3459
|
+
() => _e`
|
|
2250
3460
|
<a
|
|
2251
3461
|
id="filter-reset"
|
|
2252
3462
|
data-cy="filter-reset"
|
|
@@ -2258,24 +3468,24 @@ let T = class extends Q {
|
|
|
2258
3468
|
</section>
|
|
2259
3469
|
`
|
|
2260
3470
|
)}
|
|
2261
|
-
${
|
|
3471
|
+
${ot(
|
|
2262
3472
|
this.config.showResults && this._results,
|
|
2263
|
-
() =>
|
|
3473
|
+
() => _e`
|
|
2264
3474
|
<section id="section-results">
|
|
2265
3475
|
<div>
|
|
2266
3476
|
<slot name="resultstitle"></slot>
|
|
2267
3477
|
</div>
|
|
2268
3478
|
<div id="container-results" class="scroll">
|
|
2269
|
-
${this._results.length < 1 ?
|
|
3479
|
+
${this._results.length < 1 ? _e` <small class="no-results">No matching items</small> ` : te}
|
|
2270
3480
|
<ul id="results" part="results">
|
|
2271
|
-
${this._config.aggregateResults ?
|
|
3481
|
+
${this._config.aggregateResults ? lt(
|
|
2272
3482
|
this._resultAggregation.filter(
|
|
2273
|
-
(
|
|
3483
|
+
(e) => this.aggregateResults(
|
|
2274
3484
|
this._results,
|
|
2275
|
-
|
|
3485
|
+
e
|
|
2276
3486
|
).length
|
|
2277
3487
|
),
|
|
2278
|
-
(
|
|
3488
|
+
(e) => _e`<details
|
|
2279
3489
|
id="details-results"
|
|
2280
3490
|
open
|
|
2281
3491
|
>
|
|
@@ -2290,38 +3500,38 @@ let T = class extends Q {
|
|
|
2290
3500
|
/>
|
|
2291
3501
|
</svg>
|
|
2292
3502
|
<strong class="title">
|
|
2293
|
-
${
|
|
3503
|
+
${e}
|
|
2294
3504
|
</strong>
|
|
2295
3505
|
<span style="margin-left: 0.25rem"
|
|
2296
3506
|
>(${this.aggregateResults(
|
|
2297
3507
|
this._results,
|
|
2298
|
-
|
|
3508
|
+
e
|
|
2299
3509
|
).length})</span
|
|
2300
3510
|
>
|
|
2301
3511
|
</summary>
|
|
2302
3512
|
<ul>
|
|
2303
|
-
${
|
|
3513
|
+
${lt(
|
|
2304
3514
|
this.aggregateResults(
|
|
2305
3515
|
this._results,
|
|
2306
|
-
|
|
3516
|
+
e
|
|
2307
3517
|
),
|
|
2308
3518
|
// @ts-ignore
|
|
2309
|
-
(
|
|
3519
|
+
(t) => _e`
|
|
2310
3520
|
<li>
|
|
2311
3521
|
<label>
|
|
2312
3522
|
<input
|
|
2313
3523
|
type="radio"
|
|
2314
3524
|
name="result"
|
|
2315
3525
|
id="${// @ts-ignore
|
|
2316
|
-
|
|
3526
|
+
t.id}"
|
|
2317
3527
|
@click=${() => {
|
|
2318
|
-
this._selectedResult =
|
|
3528
|
+
this._selectedResult = t, this._config.onSelect(t);
|
|
2319
3529
|
}}
|
|
2320
3530
|
/>
|
|
2321
3531
|
<span class="title"
|
|
2322
|
-
>${
|
|
3532
|
+
>${ci(
|
|
2323
3533
|
// @ts-ignore
|
|
2324
|
-
|
|
3534
|
+
t[this._config.titleProperty]
|
|
2325
3535
|
)}</span
|
|
2326
3536
|
>
|
|
2327
3537
|
</label>
|
|
@@ -2330,12 +3540,12 @@ let T = class extends Q {
|
|
|
2330
3540
|
)}
|
|
2331
3541
|
</ul>
|
|
2332
3542
|
</details>`
|
|
2333
|
-
) :
|
|
3543
|
+
) : lt(
|
|
2334
3544
|
this._results,
|
|
2335
3545
|
// @ts-ignore
|
|
2336
|
-
(
|
|
3546
|
+
(e) => _e`<li part="result">
|
|
2337
3547
|
${// @ts-ignore
|
|
2338
|
-
|
|
3548
|
+
ci(e[this._config.titleProperty])}
|
|
2339
3549
|
</li>`
|
|
2340
3550
|
)}
|
|
2341
3551
|
</ul>
|
|
@@ -2363,27 +3573,27 @@ let T = class extends Q {
|
|
|
2363
3573
|
// slot.replaceWith(clon);
|
|
2364
3574
|
// }
|
|
2365
3575
|
};
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
],
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
],
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
],
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
],
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
],
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
],
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
],
|
|
3576
|
+
Ye([
|
|
3577
|
+
Tt()
|
|
3578
|
+
], Ne.prototype, "_items", 2);
|
|
3579
|
+
Ye([
|
|
3580
|
+
Tt()
|
|
3581
|
+
], Ne.prototype, "_results", 2);
|
|
3582
|
+
Ye([
|
|
3583
|
+
Tt()
|
|
3584
|
+
], Ne.prototype, "_filters", 2);
|
|
3585
|
+
Ye([
|
|
3586
|
+
Tt()
|
|
3587
|
+
], Ne.prototype, "_selectedResult", 2);
|
|
3588
|
+
Ye([
|
|
3589
|
+
Ss({ attribute: !1 })
|
|
3590
|
+
], Ne.prototype, "config", 1);
|
|
3591
|
+
Ye([
|
|
3592
|
+
Ss()
|
|
3593
|
+
], Ne.prototype, "apply", 2);
|
|
3594
|
+
Ne = Ye([
|
|
3595
|
+
Kr("eox-itemfilter")
|
|
3596
|
+
], Ne);
|
|
2387
3597
|
export {
|
|
2388
|
-
|
|
3598
|
+
Ne as EOxItemFilter
|
|
2389
3599
|
};
|