@livestorm/ui-vue 1.0.4 → 1.1.0
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/README.md +19 -16
- package/dist/components.mjs +1560 -0
- package/dist/environment-e70e5768.mjs +1664 -0
- package/dist/index.mjs +168 -0
- package/dist/style.css +1 -1
- package/package.json +68 -20
- package/dist/ui-vue.es.js +0 -5182
- package/dist/ui-vue.umd.js +0 -671
|
@@ -0,0 +1,1664 @@
|
|
|
1
|
+
import { useSlots as de, isVNode as Re, Comment as Ie, Fragment as W, computed as k, resolveComponent as G, openBlock as S, createBlock as D, resolveDynamicComponent as Ee, mergeProps as Ne, withCtx as L, createElementVNode as F, createElementBlock as w, normalizeClass as _, createVNode as J, createCommentVNode as B, withModifiers as ce, resolveDirective as Le, withDirectives as fe, ref as R, watch as ve, onUnmounted as me, getCurrentInstance as Ve, onMounted as oe, nextTick as je, defineComponent as ze, reactive as De, provide as se, toRefs as pe, Transition as qe, unref as A, Suspense as We, normalizeStyle as Ge, renderSlot as be, pushScopeId as Ue, popScopeId as He, createTextVNode as he, toDisplayString as Z, renderList as ue, normalizeProps as Qe, guardReactiveProps as Ke, withKeys as q, vModelText as Ze } from "vue";
|
|
2
|
+
import Je from "mitt";
|
|
3
|
+
import { onKeyDown as Xe, onClickOutside as Ye } from "@vueuse/core";
|
|
4
|
+
import "i18next";
|
|
5
|
+
import "floating-vue";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
function ge() {
|
|
8
|
+
const d = de();
|
|
9
|
+
return new Proxy(d, {
|
|
10
|
+
get: (o, s) => (...m) => {
|
|
11
|
+
var a;
|
|
12
|
+
return ye((a = o[s]) == null ? void 0 : a.call(o, ...m));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function ye(d) {
|
|
17
|
+
return d && d.some((f) => Re(f) ? !(f.type === Ie || f.type === W && !ye(f.children)) : !0) ? d : null;
|
|
18
|
+
}
|
|
19
|
+
const Gt = ({ vnodes: d }) => d, $e = {
|
|
20
|
+
props: {
|
|
21
|
+
href: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
to: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: null
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "submit"
|
|
32
|
+
},
|
|
33
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
34
|
+
value: {
|
|
35
|
+
default: null
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
component() {
|
|
40
|
+
return this.to ? {
|
|
41
|
+
is: "router-link",
|
|
42
|
+
props: {
|
|
43
|
+
to: this.to,
|
|
44
|
+
// @TODO vue3 check if we need to have a replacement for this
|
|
45
|
+
// exact: !this.activePage,
|
|
46
|
+
disabled: this.disabled
|
|
47
|
+
}
|
|
48
|
+
} : this.href ? {
|
|
49
|
+
is: "a",
|
|
50
|
+
props: {
|
|
51
|
+
href: this.disabled ? void 0 : this.href
|
|
52
|
+
}
|
|
53
|
+
} : this.$attrs.tag ? {
|
|
54
|
+
is: this.$attrs.tag,
|
|
55
|
+
props: {}
|
|
56
|
+
} : {
|
|
57
|
+
is: "button",
|
|
58
|
+
props: {
|
|
59
|
+
type: this.type,
|
|
60
|
+
disabled: this.disabled
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, X = (d, f) => {
|
|
66
|
+
const o = d.__vccOpts || d;
|
|
67
|
+
for (const [s, m] of f)
|
|
68
|
+
o[s] = m;
|
|
69
|
+
return o;
|
|
70
|
+
}, et = {
|
|
71
|
+
mixins: [
|
|
72
|
+
$e
|
|
73
|
+
],
|
|
74
|
+
props: {
|
|
75
|
+
disabled: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1
|
|
78
|
+
},
|
|
79
|
+
hideLabel: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !1
|
|
82
|
+
},
|
|
83
|
+
hideLeftIcon: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !1
|
|
86
|
+
},
|
|
87
|
+
icon: {
|
|
88
|
+
type: [String, Boolean],
|
|
89
|
+
default: null
|
|
90
|
+
},
|
|
91
|
+
iconRight: {
|
|
92
|
+
type: [String, Boolean],
|
|
93
|
+
default: null
|
|
94
|
+
},
|
|
95
|
+
loading: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: !1
|
|
98
|
+
},
|
|
99
|
+
label: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: null
|
|
102
|
+
},
|
|
103
|
+
imageSource: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: null
|
|
106
|
+
},
|
|
107
|
+
alignCenter: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !1
|
|
110
|
+
},
|
|
111
|
+
closable: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !1
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
emits: [
|
|
117
|
+
"click",
|
|
118
|
+
"close",
|
|
119
|
+
"mouseenter",
|
|
120
|
+
"mouseleave"
|
|
121
|
+
],
|
|
122
|
+
setup(d) {
|
|
123
|
+
const f = ge(), o = k(() => f.default()), s = k(() => f.icon()), m = k(() => !d.hideLabel && !!o.value);
|
|
124
|
+
return {
|
|
125
|
+
defaultSlot: o,
|
|
126
|
+
iconSlot: s,
|
|
127
|
+
hasLabel: m
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
computed: {
|
|
131
|
+
cssClass() {
|
|
132
|
+
return {
|
|
133
|
+
loading: this.loading,
|
|
134
|
+
"hide-label": this.hideLabel,
|
|
135
|
+
"base-button-square": !this.hasLabel && this.hasIcon,
|
|
136
|
+
"flex justify-center": this.alignCenter,
|
|
137
|
+
closable: this.closable
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
finalDisabled() {
|
|
141
|
+
return this.disabled || this.loading;
|
|
142
|
+
},
|
|
143
|
+
hasIcon() {
|
|
144
|
+
return this.icon || this.iconRight;
|
|
145
|
+
},
|
|
146
|
+
isToggle() {
|
|
147
|
+
var d;
|
|
148
|
+
return ((d = this.iconRight) == null ? void 0 : d.includes("i-ls-chevron-down")) && this.hasLabel;
|
|
149
|
+
},
|
|
150
|
+
labelFinal() {
|
|
151
|
+
var d, f, o;
|
|
152
|
+
return !this.isToggle && (((o = ((f = (d = this.$slots).default) == null ? void 0 : f.call(d)[0].text) || this.label) == null ? void 0 : o.trim()) || void 0);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
methods: {
|
|
156
|
+
onClick(d) {
|
|
157
|
+
this.finalDisabled ? d.preventDefault() : this.$emit("click", d);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, tt = { class: "button-wrapper" }, nt = /* @__PURE__ */ F("span", { class: "loader" }, null, -1), rt = [
|
|
161
|
+
nt
|
|
162
|
+
], it = ["src"], at = { class: "content truncate" };
|
|
163
|
+
function st(d, f, o, s, m, a) {
|
|
164
|
+
const r = G("RenderSlot");
|
|
165
|
+
return S(), D(Ee(d.component.is), Ne(d.component.props, {
|
|
166
|
+
disabled: a.finalDisabled ? !0 : null,
|
|
167
|
+
class: [a.cssClass, "base-button"],
|
|
168
|
+
"aria-label": a.labelFinal,
|
|
169
|
+
onClick: a.onClick,
|
|
170
|
+
onMouseenter: f[1] || (f[1] = (i) => d.$emit("mouseenter")),
|
|
171
|
+
onMouseleave: f[2] || (f[2] = (i) => d.$emit("mouseleave"))
|
|
172
|
+
}), {
|
|
173
|
+
default: L(() => [
|
|
174
|
+
F("div", tt, [
|
|
175
|
+
o.loading ? (S(), w("span", {
|
|
176
|
+
key: 0,
|
|
177
|
+
class: _(["button-loader", { "left-icon": s.hasLabel }])
|
|
178
|
+
}, rt, 2)) : o.hideLeftIcon ? B("", !0) : (S(), w(W, { key: 1 }, [
|
|
179
|
+
s.iconSlot ? (S(), w("div", {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: _([{ "left-icon": s.hasLabel }, "button-icon"])
|
|
182
|
+
}, [
|
|
183
|
+
J(r, { vnodes: s.iconSlot }, null, 8, ["vnodes"])
|
|
184
|
+
], 2)) : o.imageSource ? (S(), w("div", {
|
|
185
|
+
key: 1,
|
|
186
|
+
class: _([{ "left-icon": s.hasLabel }, "button-icon"])
|
|
187
|
+
}, [
|
|
188
|
+
F("img", { src: o.imageSource }, null, 8, it)
|
|
189
|
+
], 2)) : o.icon ? (S(), w("div", {
|
|
190
|
+
key: 2,
|
|
191
|
+
class: _([[
|
|
192
|
+
o.icon,
|
|
193
|
+
{ "left-icon": s.hasLabel }
|
|
194
|
+
], "button-icon"])
|
|
195
|
+
}, null, 2)) : B("", !0)
|
|
196
|
+
], 64)),
|
|
197
|
+
F("span", at, [
|
|
198
|
+
o.hideLabel ? B("", !0) : (S(), D(r, {
|
|
199
|
+
key: 0,
|
|
200
|
+
vnodes: s.defaultSlot
|
|
201
|
+
}, null, 8, ["vnodes"]))
|
|
202
|
+
]),
|
|
203
|
+
o.iconRight ? (S(), w("div", {
|
|
204
|
+
key: 2,
|
|
205
|
+
class: _([[
|
|
206
|
+
o.iconRight,
|
|
207
|
+
{ "right-icon": s.hasLabel }
|
|
208
|
+
], "button-icon"])
|
|
209
|
+
}, null, 2)) : B("", !0),
|
|
210
|
+
o.closable ? (S(), w("div", {
|
|
211
|
+
key: 3,
|
|
212
|
+
class: "button-icon icon-close i-ls-x",
|
|
213
|
+
onClick: f[0] || (f[0] = ce((i) => d.$emit("close"), ["stop", "prevent"]))
|
|
214
|
+
})) : B("", !0)
|
|
215
|
+
])
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 16, ["disabled", "class", "aria-label", "onClick"]);
|
|
219
|
+
}
|
|
220
|
+
const Se = /* @__PURE__ */ X(et, [["render", st]]), Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
221
|
+
__proto__: null,
|
|
222
|
+
default: Se
|
|
223
|
+
}, Symbol.toStringTag, { value: "Module" })), ot = {
|
|
224
|
+
inject: {
|
|
225
|
+
BaseFormInputInjection: { default: null }
|
|
226
|
+
},
|
|
227
|
+
props: {
|
|
228
|
+
// eslint-disable-next-line
|
|
229
|
+
modelValue: {},
|
|
230
|
+
// eslint-disable-next-line
|
|
231
|
+
value: {
|
|
232
|
+
default: !1
|
|
233
|
+
},
|
|
234
|
+
label: {
|
|
235
|
+
type: String,
|
|
236
|
+
default: null
|
|
237
|
+
},
|
|
238
|
+
labelClass: {
|
|
239
|
+
type: String,
|
|
240
|
+
default: null
|
|
241
|
+
},
|
|
242
|
+
inputClass: {
|
|
243
|
+
type: String,
|
|
244
|
+
default: null
|
|
245
|
+
},
|
|
246
|
+
forId: {
|
|
247
|
+
type: String,
|
|
248
|
+
required: !0
|
|
249
|
+
},
|
|
250
|
+
tooltip: {
|
|
251
|
+
type: String,
|
|
252
|
+
default: null
|
|
253
|
+
},
|
|
254
|
+
required: {
|
|
255
|
+
type: Boolean,
|
|
256
|
+
default: !1
|
|
257
|
+
},
|
|
258
|
+
disabled: {
|
|
259
|
+
type: Boolean,
|
|
260
|
+
default: !1
|
|
261
|
+
},
|
|
262
|
+
disableChange: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
default: !1
|
|
265
|
+
},
|
|
266
|
+
isConsent: {
|
|
267
|
+
type: Boolean,
|
|
268
|
+
default: !1
|
|
269
|
+
},
|
|
270
|
+
icon: {
|
|
271
|
+
type: String,
|
|
272
|
+
default: "i-ls-check"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
emits: [
|
|
276
|
+
"change",
|
|
277
|
+
"update:modelValue",
|
|
278
|
+
"tooltip-clicked"
|
|
279
|
+
],
|
|
280
|
+
computed: {
|
|
281
|
+
baseFormInputValue() {
|
|
282
|
+
return this.BaseFormInputInjection && this.BaseFormInputInjection.childConfig.value;
|
|
283
|
+
},
|
|
284
|
+
checked() {
|
|
285
|
+
return this.modelValue !== void 0 ? Array.isArray(this.modelValue) ? this.modelValue.includes(this.value) : this.modelValue === this.value : this.BaseFormInputInjection && this.baseFormInputValue ? Array.isArray(this.baseFormInputValue) ? this.baseFormInputValue.includes(this.value) : this.baseFormInputValue === this.value && this.value : this.value;
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
methods: {
|
|
289
|
+
onChange(d) {
|
|
290
|
+
let f = d.target.checked;
|
|
291
|
+
this.modelValue !== void 0 && (f = [...this.modelValue], d.target.checked ? f.push(this.value) : f.splice(f.indexOf(this.value), 1)), this.$emit("update:modelValue", f), this.$emit("change", f), this.BaseFormInputInjection && this.BaseFormInputInjection.setInputModel(f);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}, lt = ["id", "checked", "disabled"], ut = ["for"], dt = {
|
|
295
|
+
key: 0,
|
|
296
|
+
class: "label-custom"
|
|
297
|
+
}, ct = ["innerHTML"];
|
|
298
|
+
function ft(d, f, o, s, m, a) {
|
|
299
|
+
const r = Le("tooltip");
|
|
300
|
+
return S(), w("div", {
|
|
301
|
+
class: _(["base-checkbox", {
|
|
302
|
+
"base-checkbox-disabled": o.disabled,
|
|
303
|
+
"pointer-events-none": o.disableChange,
|
|
304
|
+
"base-checkbox-consent": o.isConsent
|
|
305
|
+
}])
|
|
306
|
+
}, [
|
|
307
|
+
F("input", {
|
|
308
|
+
id: o.forId,
|
|
309
|
+
ref: "checkbox",
|
|
310
|
+
checked: a.checked,
|
|
311
|
+
disabled: o.disabled,
|
|
312
|
+
type: "checkbox",
|
|
313
|
+
onChange: f[0] || (f[0] = (...i) => a.onChange && a.onChange(...i))
|
|
314
|
+
}, null, 40, lt),
|
|
315
|
+
F("label", { for: o.forId }, [
|
|
316
|
+
F("span", {
|
|
317
|
+
class: _(["input-custom !mt-[1px]", o.inputClass])
|
|
318
|
+
}, [
|
|
319
|
+
!o.disabled || a.checked ? (S(), w("div", {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: _([o.icon, "check-checkbox"])
|
|
322
|
+
}, null, 2)) : B("", !0)
|
|
323
|
+
], 2),
|
|
324
|
+
o.label ? (S(), w("span", dt, [
|
|
325
|
+
F("span", {
|
|
326
|
+
class: _(o.labelClass),
|
|
327
|
+
innerHTML: o.required ? `${o.label} *` : o.label
|
|
328
|
+
}, null, 10, ct),
|
|
329
|
+
o.tooltip ? fe((S(), w("span", {
|
|
330
|
+
key: 0,
|
|
331
|
+
"data-testid": "open-tooltip",
|
|
332
|
+
onClick: f[1] || (f[1] = ce((i) => d.$emit("tooltip-clicked"), ["stop", "prevent"]))
|
|
333
|
+
}, null, 512)), [
|
|
334
|
+
[r, o.tooltip]
|
|
335
|
+
]) : B("", !0)
|
|
336
|
+
])) : B("", !0)
|
|
337
|
+
], 8, ut)
|
|
338
|
+
], 2);
|
|
339
|
+
}
|
|
340
|
+
const vt = /* @__PURE__ */ X(ot, [["render", ft]]), Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
341
|
+
__proto__: null,
|
|
342
|
+
default: vt
|
|
343
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
344
|
+
Je();
|
|
345
|
+
let mt = 0;
|
|
346
|
+
const N = R([]), pt = k(() => N.value.length > 0);
|
|
347
|
+
function bt(d, f) {
|
|
348
|
+
const o = mt++, s = k(() => N.value.findIndex((l) => l.id === o));
|
|
349
|
+
function m() {
|
|
350
|
+
N.value.some((l) => l.id === o) || N.value.push({
|
|
351
|
+
id: o,
|
|
352
|
+
type: f
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
function a() {
|
|
356
|
+
s.value !== -1 && N.value.splice(s.value, 1);
|
|
357
|
+
}
|
|
358
|
+
ve(d, (l) => {
|
|
359
|
+
l ? m() : a();
|
|
360
|
+
}, {
|
|
361
|
+
immediate: !0
|
|
362
|
+
}), me(() => {
|
|
363
|
+
a();
|
|
364
|
+
});
|
|
365
|
+
const r = k(() => {
|
|
366
|
+
var l;
|
|
367
|
+
return o === ((l = N.value[N.value.length - 1]) == null ? void 0 : l.id);
|
|
368
|
+
}), i = k(() => s.value > 0), v = k(() => N.value.filter((l) => l.type === f)), e = k(() => v.value.findIndex((l) => l.id === o) < v.value.length - 1), t = k(() => v.value.findIndex((l) => l.id === o) > 0), n = [];
|
|
369
|
+
function h(l) {
|
|
370
|
+
n.push(l);
|
|
371
|
+
}
|
|
372
|
+
return Xe("Escape", () => {
|
|
373
|
+
r.value && n.forEach((l) => l());
|
|
374
|
+
}), {
|
|
375
|
+
isActiveStacked: r,
|
|
376
|
+
hasStackedBehind: i,
|
|
377
|
+
isBehindSameType: e,
|
|
378
|
+
hasStackedSameTypeBehind: t,
|
|
379
|
+
stackIndex: s,
|
|
380
|
+
onClose: h
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
typeof document < "u" && ve(pt, (d) => {
|
|
384
|
+
d ? document.documentElement.classList.add("overflow-hidden") : document.documentElement.classList.remove("overflow-hidden");
|
|
385
|
+
}, {
|
|
386
|
+
immediate: !0
|
|
387
|
+
});
|
|
388
|
+
function ht() {
|
|
389
|
+
const d = Ve();
|
|
390
|
+
let f = null;
|
|
391
|
+
oe(async () => {
|
|
392
|
+
await je();
|
|
393
|
+
const o = d.proxy.$el;
|
|
394
|
+
if (!(o != null && o.querySelector))
|
|
395
|
+
return;
|
|
396
|
+
let s = o.querySelector("[data-stackview-autofocus]");
|
|
397
|
+
s ? ["INPUT", "A", "BUTTON", "TEXTAREA"].includes(s.tagName) || (s = s.querySelector("input, a, button, textarea") || s) : (s = o.querySelector('button[type="submit"]'), console.warn(
|
|
398
|
+
"%cDEV",
|
|
399
|
+
"background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;",
|
|
400
|
+
"A element should have the data-stackview-autofocus attribute in this component. Fallback to submit button."
|
|
401
|
+
)), clearTimeout(f), f = setTimeout(() => s == null ? void 0 : s.focus(), 150);
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
const gt = (d) => (Ue("data-v-9d64f090"), d = d(), He(), d), yt = /* @__PURE__ */ gt(() => /* @__PURE__ */ F("div", { class: "backdrop bg-alpha-black-300 fixed inset-0 -z-10" }, null, -1)), Me = Symbol("BaseModal.propsFromContent"), _e = Symbol("BaseModal.close"), we = Symbol("BaseModal.onClose"), St = /* @__PURE__ */ ze({
|
|
405
|
+
__name: "BaseModal",
|
|
406
|
+
props: {
|
|
407
|
+
shown: { type: Boolean, default: !0 }
|
|
408
|
+
},
|
|
409
|
+
emits: [
|
|
410
|
+
"close",
|
|
411
|
+
"update:shown"
|
|
412
|
+
],
|
|
413
|
+
setup(d, { emit: f }) {
|
|
414
|
+
const o = d, s = De({
|
|
415
|
+
locked: !1,
|
|
416
|
+
fullScreen: !1
|
|
417
|
+
});
|
|
418
|
+
se(Me, s);
|
|
419
|
+
const m = k(() => s.locked), a = k(() => s.fullScreen);
|
|
420
|
+
function r() {
|
|
421
|
+
m.value || (f("update:shown", !1), f("close"));
|
|
422
|
+
}
|
|
423
|
+
se(_e, r);
|
|
424
|
+
const i = [];
|
|
425
|
+
se(we, (c) => {
|
|
426
|
+
i.push(c), me(() => {
|
|
427
|
+
const b = i.indexOf(c);
|
|
428
|
+
i.splice(b, 1);
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
function v() {
|
|
432
|
+
m.value || (r(), i.forEach((c) => c()));
|
|
433
|
+
}
|
|
434
|
+
const { shown: e } = pe(o), {
|
|
435
|
+
isActiveStacked: t,
|
|
436
|
+
stackIndex: n,
|
|
437
|
+
onClose: h
|
|
438
|
+
} = bt(e, "modal");
|
|
439
|
+
h(v);
|
|
440
|
+
const l = R(!1);
|
|
441
|
+
oe(() => {
|
|
442
|
+
requestAnimationFrame(() => {
|
|
443
|
+
l.value = !0;
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
const u = k(() => e.value && l.value);
|
|
447
|
+
return ht(), (c, b) => {
|
|
448
|
+
const g = G("SafeTeleport");
|
|
449
|
+
return S(), D(g, { to: "#teleport-end" }, {
|
|
450
|
+
default: L(() => [
|
|
451
|
+
J(qe, {
|
|
452
|
+
duration: 200,
|
|
453
|
+
name: "modal",
|
|
454
|
+
appear: ""
|
|
455
|
+
}, {
|
|
456
|
+
default: L(() => [
|
|
457
|
+
A(u) ? (S(), D(We, { key: 0 }, {
|
|
458
|
+
default: L(() => [
|
|
459
|
+
F("div", {
|
|
460
|
+
class: _(["base-modal-wrapper fixed inset-0 overflow-y-auto", [
|
|
461
|
+
A(t) ? "stack-active" : "grayscale stack-inactive",
|
|
462
|
+
{
|
|
463
|
+
"full-screen": A(a)
|
|
464
|
+
}
|
|
465
|
+
]]),
|
|
466
|
+
style: Ge({
|
|
467
|
+
"z-index": A(n) + 8e3
|
|
468
|
+
}),
|
|
469
|
+
"data-testid": "modal-wrapper"
|
|
470
|
+
}, [
|
|
471
|
+
F("div", {
|
|
472
|
+
class: "absolute inset-0",
|
|
473
|
+
onClick: b[0] || (b[0] = (M) => v())
|
|
474
|
+
}),
|
|
475
|
+
yt,
|
|
476
|
+
be(c.$slots, "default", {}, void 0, !0)
|
|
477
|
+
], 6)
|
|
478
|
+
]),
|
|
479
|
+
_: 3
|
|
480
|
+
})) : B("", !0)
|
|
481
|
+
]),
|
|
482
|
+
_: 3
|
|
483
|
+
})
|
|
484
|
+
]),
|
|
485
|
+
_: 3
|
|
486
|
+
});
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
const Mt = /* @__PURE__ */ X(St, [["__scopeId", "data-v-9d64f090"]]), Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
491
|
+
__proto__: null,
|
|
492
|
+
InjectClose: _e,
|
|
493
|
+
InjectOnClose: we,
|
|
494
|
+
InjectPropsFromContent: Me,
|
|
495
|
+
default: Mt
|
|
496
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
497
|
+
const _t = {
|
|
498
|
+
components: {
|
|
499
|
+
BaseButton: Se
|
|
500
|
+
},
|
|
501
|
+
props: {
|
|
502
|
+
type: {
|
|
503
|
+
type: String,
|
|
504
|
+
default: "alert",
|
|
505
|
+
validator(d) {
|
|
506
|
+
return ["info", "success", "warning", "alert"].includes(d);
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
display: {
|
|
510
|
+
type: String,
|
|
511
|
+
default: "inline",
|
|
512
|
+
validator(d) {
|
|
513
|
+
return ["inline", "block"].includes(d);
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
buttonLabel: {
|
|
517
|
+
type: String,
|
|
518
|
+
default: ""
|
|
519
|
+
},
|
|
520
|
+
buttonHref: {
|
|
521
|
+
type: String,
|
|
522
|
+
default: null
|
|
523
|
+
},
|
|
524
|
+
buttonIcon: {
|
|
525
|
+
type: String,
|
|
526
|
+
default: null
|
|
527
|
+
},
|
|
528
|
+
closable: {
|
|
529
|
+
type: Boolean,
|
|
530
|
+
default: !1
|
|
531
|
+
},
|
|
532
|
+
bannerMode: {
|
|
533
|
+
type: Boolean,
|
|
534
|
+
default: !1
|
|
535
|
+
},
|
|
536
|
+
borderRounded: {
|
|
537
|
+
type: Boolean,
|
|
538
|
+
default: !0
|
|
539
|
+
},
|
|
540
|
+
bannerBottomOnSmallScreen: {
|
|
541
|
+
type: Boolean,
|
|
542
|
+
default: !0
|
|
543
|
+
},
|
|
544
|
+
forceInlineDisplayOnSmallScreen: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
default: !0
|
|
547
|
+
},
|
|
548
|
+
disabledButton: {
|
|
549
|
+
type: Boolean,
|
|
550
|
+
default: !1
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
emits: ["handleClick", "close"],
|
|
554
|
+
setup() {
|
|
555
|
+
const d = ge(), f = k(() => d.default()), o = k(() => d.description()), s = k(() => d.buttons());
|
|
556
|
+
return {
|
|
557
|
+
descriptionSlot: o,
|
|
558
|
+
buttonsSlot: s,
|
|
559
|
+
defaultSlot: f
|
|
560
|
+
};
|
|
561
|
+
},
|
|
562
|
+
data() {
|
|
563
|
+
return {
|
|
564
|
+
isClosed: !1
|
|
565
|
+
};
|
|
566
|
+
},
|
|
567
|
+
computed: {
|
|
568
|
+
icon() {
|
|
569
|
+
switch (this.type) {
|
|
570
|
+
case "alert":
|
|
571
|
+
return "i-ls-alert-circle text-red-600";
|
|
572
|
+
case "warning":
|
|
573
|
+
return "i-ls-alert-triangle text-orange-600";
|
|
574
|
+
case "info":
|
|
575
|
+
return "i-ls-info text-livestorm-600";
|
|
576
|
+
case "success":
|
|
577
|
+
return "i-ls-check-circle text-green-600";
|
|
578
|
+
default:
|
|
579
|
+
return "i-ls-alert-circle text-livestorm-600";
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
bgColor() {
|
|
583
|
+
switch (this.type) {
|
|
584
|
+
case "alert":
|
|
585
|
+
return "bg-red-100";
|
|
586
|
+
case "warning":
|
|
587
|
+
return "bg-orange-100";
|
|
588
|
+
case "success":
|
|
589
|
+
return "bg-green-100";
|
|
590
|
+
case "info":
|
|
591
|
+
default:
|
|
592
|
+
return "bg-livestorm-100";
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
buttonClass() {
|
|
596
|
+
switch (this.type) {
|
|
597
|
+
case "alert":
|
|
598
|
+
return "base-button-red-secondary";
|
|
599
|
+
case "warning":
|
|
600
|
+
return "base-button-orange-secondary";
|
|
601
|
+
case "success":
|
|
602
|
+
return "base-button-green-secondary";
|
|
603
|
+
case "info":
|
|
604
|
+
default:
|
|
605
|
+
return "base-button-secondary";
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
isDisplayBlock() {
|
|
609
|
+
return this.display === "block" || this.display === "inline" && this.$responsive.mobile && this.forceInlineDisplayOnSmallScreen;
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
methods: {
|
|
613
|
+
close() {
|
|
614
|
+
this.isClosed = !0, this.$emit("close");
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}, wt = ["data-type"];
|
|
618
|
+
function kt(d, f, o, s, m, a) {
|
|
619
|
+
const r = G("RenderSlot"), i = G("BaseButton");
|
|
620
|
+
return m.isClosed ? B("", !0) : (S(), w("div", {
|
|
621
|
+
key: 0,
|
|
622
|
+
class: _(["base-banner flex justify-between text-grey-700 text-14-regular px-6 py-4", [
|
|
623
|
+
{
|
|
624
|
+
"rounded-8": o.borderRounded && !o.bannerMode,
|
|
625
|
+
"items-center": !a.isDisplayBlock,
|
|
626
|
+
"fixed z-[10000] w-full left-0": o.bannerMode,
|
|
627
|
+
"bottom-0 md:bottom-auto md:top-0": o.bannerMode && o.bannerBottomOnSmallScreen,
|
|
628
|
+
"top-0": o.bannerMode && !o.bannerBottomOnSmallScreen
|
|
629
|
+
},
|
|
630
|
+
`type-${o.type}`,
|
|
631
|
+
a.bgColor
|
|
632
|
+
]]),
|
|
633
|
+
"data-testid": "base-banner",
|
|
634
|
+
"data-type": o.type
|
|
635
|
+
}, [
|
|
636
|
+
F("div", {
|
|
637
|
+
class: _(["flex w-full", a.isDisplayBlock ? "flex-col items-center" : "justify-between items-center"])
|
|
638
|
+
}, [
|
|
639
|
+
F("div", {
|
|
640
|
+
class: _(["flex items-center", {
|
|
641
|
+
"flex-col": a.isDisplayBlock
|
|
642
|
+
}])
|
|
643
|
+
}, [
|
|
644
|
+
F("div", {
|
|
645
|
+
class: _(["shrink-0 w-6 h-6 flex justify-center items-center", a.icon])
|
|
646
|
+
}, null, 2),
|
|
647
|
+
F("div", {
|
|
648
|
+
class: _({
|
|
649
|
+
"text-center mt-4": a.isDisplayBlock,
|
|
650
|
+
"mr-3": !a.isDisplayBlock && (o.buttonLabel || s.buttonsSlot),
|
|
651
|
+
"ml-3": !a.isDisplayBlock
|
|
652
|
+
})
|
|
653
|
+
}, [
|
|
654
|
+
s.defaultSlot ? (S(), w("div", {
|
|
655
|
+
key: 0,
|
|
656
|
+
class: _({ "text-14-semibold": s.descriptionSlot })
|
|
657
|
+
}, [
|
|
658
|
+
J(r, { vnodes: s.defaultSlot }, null, 8, ["vnodes"])
|
|
659
|
+
], 2)) : B("", !0),
|
|
660
|
+
J(r, { vnodes: s.descriptionSlot }, null, 8, ["vnodes"])
|
|
661
|
+
], 2)
|
|
662
|
+
], 2),
|
|
663
|
+
s.buttonsSlot ? (S(), w("div", {
|
|
664
|
+
key: 0,
|
|
665
|
+
class: _({ "mt-4": a.isDisplayBlock })
|
|
666
|
+
}, [
|
|
667
|
+
J(r, { vnodes: s.buttonsSlot }, null, 8, ["vnodes"])
|
|
668
|
+
], 2)) : B("", !0),
|
|
669
|
+
s.buttonsSlot ? B("", !0) : (S(), w(W, { key: 1 }, [
|
|
670
|
+
o.buttonLabel ? (S(), D(i, {
|
|
671
|
+
key: 0,
|
|
672
|
+
type: "button",
|
|
673
|
+
class: _([
|
|
674
|
+
{ "mt-4": a.isDisplayBlock },
|
|
675
|
+
a.buttonClass
|
|
676
|
+
]),
|
|
677
|
+
icon: o.buttonIcon,
|
|
678
|
+
href: o.buttonHref,
|
|
679
|
+
disabled: o.disabledButton,
|
|
680
|
+
target: o.buttonHref ? "_blank" : null,
|
|
681
|
+
"data-testid": "warning-message-button",
|
|
682
|
+
onClick: f[0] || (f[0] = (v) => d.$emit("handleClick"))
|
|
683
|
+
}, {
|
|
684
|
+
default: L(() => [
|
|
685
|
+
he(Z(o.buttonLabel), 1)
|
|
686
|
+
]),
|
|
687
|
+
_: 1
|
|
688
|
+
}, 8, ["class", "icon", "href", "disabled", "target"])) : B("", !0)
|
|
689
|
+
], 64))
|
|
690
|
+
], 2),
|
|
691
|
+
o.closable ? (S(), w("div", {
|
|
692
|
+
key: 0,
|
|
693
|
+
class: _(["i-ls-x shrink-0 w-5 h-5 text-grey-600 cursor-pointer hover:text-livestorm-800", { "ml-2": !a.isDisplayBlock }]),
|
|
694
|
+
onClick: f[1] || (f[1] = (...v) => a.close && a.close(...v))
|
|
695
|
+
}, null, 2)) : B("", !0)
|
|
696
|
+
], 10, wt));
|
|
697
|
+
}
|
|
698
|
+
const Bt = /* @__PURE__ */ X(_t, [["render", kt], ["__scopeId", "data-v-5a97a209"]]), Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
699
|
+
__proto__: null,
|
|
700
|
+
default: Bt
|
|
701
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
702
|
+
const At = { key: 0 }, Ft = ["placeholder"], Pt = { class: "bg-white" }, Ot = ["onClick"], xt = {
|
|
703
|
+
key: 1,
|
|
704
|
+
class: "px-4 py-2"
|
|
705
|
+
}, Ct = {
|
|
706
|
+
__name: "BaseAutocomplete",
|
|
707
|
+
props: {
|
|
708
|
+
modelValue: {
|
|
709
|
+
type: [String, Array, Object],
|
|
710
|
+
default: null
|
|
711
|
+
},
|
|
712
|
+
size: {
|
|
713
|
+
type: String,
|
|
714
|
+
validator: (d) => ["small", "medium", "large"].includes(d),
|
|
715
|
+
default: "medium"
|
|
716
|
+
},
|
|
717
|
+
placeholder: {
|
|
718
|
+
type: String,
|
|
719
|
+
default: null
|
|
720
|
+
},
|
|
721
|
+
prependIcon: {
|
|
722
|
+
type: String,
|
|
723
|
+
default: null
|
|
724
|
+
},
|
|
725
|
+
items: {
|
|
726
|
+
type: Array,
|
|
727
|
+
required: !0
|
|
728
|
+
},
|
|
729
|
+
multiple: {
|
|
730
|
+
type: Boolean,
|
|
731
|
+
default: !1
|
|
732
|
+
},
|
|
733
|
+
hideSelected: {
|
|
734
|
+
type: Boolean,
|
|
735
|
+
default: !1
|
|
736
|
+
},
|
|
737
|
+
noFilter: {
|
|
738
|
+
type: Boolean,
|
|
739
|
+
default: !1
|
|
740
|
+
},
|
|
741
|
+
error: {
|
|
742
|
+
type: Boolean,
|
|
743
|
+
default: !1
|
|
744
|
+
},
|
|
745
|
+
hideNoData: {
|
|
746
|
+
type: Boolean,
|
|
747
|
+
default: !1
|
|
748
|
+
},
|
|
749
|
+
autofocus: {
|
|
750
|
+
type: Boolean,
|
|
751
|
+
default: !1
|
|
752
|
+
},
|
|
753
|
+
noDataText: {
|
|
754
|
+
type: String,
|
|
755
|
+
default: null
|
|
756
|
+
},
|
|
757
|
+
clearable: {
|
|
758
|
+
type: Boolean,
|
|
759
|
+
default: !1
|
|
760
|
+
},
|
|
761
|
+
creatable: {
|
|
762
|
+
type: Boolean,
|
|
763
|
+
default: !1
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
emits: ["update:modelValue", "update:search"],
|
|
767
|
+
setup(d, { emit: f }) {
|
|
768
|
+
const o = d, { items: s, modelValue: m, multiple: a, hideSelected: r, noFilter: i, hideNoData: v, autofocus: e, creatable: t } = pe(o), n = de(), h = R(!1), l = k(() => {
|
|
769
|
+
var p;
|
|
770
|
+
return a.value ? ((p = m.value) == null ? void 0 : p.map((y) => V(y))) || [] : V(m.value);
|
|
771
|
+
}), u = R(a.value ? null : K(l.value)), c = k(() => {
|
|
772
|
+
var p;
|
|
773
|
+
return ((p = s.value) == null ? void 0 : p.map(V)) || [];
|
|
774
|
+
}), b = R(!1), g = R(null), M = R(null), x = R(null), U = R(null), H = R(null), T = k(() => {
|
|
775
|
+
const p = !i.value && b.value && u.value ? c.value.filter((z) => K(z).toLowerCase().includes(u.value.toLowerCase())) : c.value;
|
|
776
|
+
return r.value ? p.filter((z) => !ne(z)) : p;
|
|
777
|
+
}), I = k(() => a.value && l.value.length > 0), Q = k(() => v.value && T.value.length === 0 && (!t.value || !u.value) ? !1 : h.value), Y = k(() => t.value && u.value && b.value && !c.value.some((p) => O(p) === u.value));
|
|
778
|
+
function V(p) {
|
|
779
|
+
const y = p !== null && typeof p == "object";
|
|
780
|
+
return {
|
|
781
|
+
...y ? p : null,
|
|
782
|
+
value: y ? p.value : p,
|
|
783
|
+
text: y ? p.text : p
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function P(p) {
|
|
787
|
+
return c.value.find((z) => O(z) === O(p)) ?? null;
|
|
788
|
+
}
|
|
789
|
+
function j(p) {
|
|
790
|
+
const y = V(p);
|
|
791
|
+
ee(y), a.value && c.value.push(y);
|
|
792
|
+
}
|
|
793
|
+
function ee(p) {
|
|
794
|
+
if (ne(p)) {
|
|
795
|
+
te(p);
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
a.value ? (u.value = null, M.value = null, x.value.focus(), f("update:modelValue", [...l.value.map((y) => y.value), O(p)])) : (h.value = !1, u.value = K(p), f("update:modelValue", l.value)), b.value = !1;
|
|
799
|
+
}
|
|
800
|
+
function te(p) {
|
|
801
|
+
a.value ? (f("update:modelValue", l.value.filter((y) => O(y) !== O(p)).map((y) => O(y))), x.value.focus()) : (h.value = !1, u.value = null, f("update:modelValue", null));
|
|
802
|
+
}
|
|
803
|
+
function ne(p) {
|
|
804
|
+
return l.value ? a.value ? l.value.some((y) => O(y) === O(p)) : O(p) === O(l.value) : !1;
|
|
805
|
+
}
|
|
806
|
+
function Be(p) {
|
|
807
|
+
return g.value === null ? !1 : g.value % T.value.length === p;
|
|
808
|
+
}
|
|
809
|
+
function Ae(p) {
|
|
810
|
+
return M.value === null || !a.value ? !1 : M.value % l.value.length === p;
|
|
811
|
+
}
|
|
812
|
+
function Fe(p) {
|
|
813
|
+
h.value = !0;
|
|
814
|
+
}
|
|
815
|
+
function Pe() {
|
|
816
|
+
b.value = !0, g.value = null, M.value = null, a.value || f("update:modelValue", null), f("update:search", u.value);
|
|
817
|
+
}
|
|
818
|
+
function Oe() {
|
|
819
|
+
h.value = !1, b.value = !1, g.value = null, M.value = null, x.value.blur(), a.value && (u.value = null);
|
|
820
|
+
}
|
|
821
|
+
function re(p) {
|
|
822
|
+
if (p === "up")
|
|
823
|
+
g.value = g.value <= 0 ? T.value.length - 1 : g.value - 1;
|
|
824
|
+
else if (p === "down")
|
|
825
|
+
g.value ?? (g.value = -1), g.value++;
|
|
826
|
+
else if (p === "enter")
|
|
827
|
+
if (g.value !== null) {
|
|
828
|
+
const y = T.value[g.value % T.value.length];
|
|
829
|
+
y && ee(y);
|
|
830
|
+
} else
|
|
831
|
+
Y.value && j(u.value);
|
|
832
|
+
}
|
|
833
|
+
function ie(p) {
|
|
834
|
+
u.value || !a.value || (M.value ?? (M.value = -1), p === "left" ? M.value = M.value <= 0 ? l.value.length - 1 : M.value - 1 : p === "right" ? M.value++ : p === "delete" && (M.value === -1 ? M.value = l.value.length - 1 : (te(l.value[M.value % l.value.length]), M.value = M.value - 1)));
|
|
835
|
+
}
|
|
836
|
+
function xe() {
|
|
837
|
+
h.value ? h.value = !1 : x.value.focus();
|
|
838
|
+
}
|
|
839
|
+
function Ce() {
|
|
840
|
+
a.value ? f("update:modelValue", []) : f("update:modelValue", null), u.value = null;
|
|
841
|
+
}
|
|
842
|
+
function O(p) {
|
|
843
|
+
return p.value;
|
|
844
|
+
}
|
|
845
|
+
function K(p) {
|
|
846
|
+
return p.text;
|
|
847
|
+
}
|
|
848
|
+
return oe(() => {
|
|
849
|
+
var p;
|
|
850
|
+
e.value && ((p = x.value) == null || p.focus(), h.value = !0);
|
|
851
|
+
}), Ye(U, () => {
|
|
852
|
+
h.value = !1;
|
|
853
|
+
}, {
|
|
854
|
+
ignore: [k(() => H.value.$refs.popperContent.$el)]
|
|
855
|
+
}), (p, y) => {
|
|
856
|
+
const z = G("BaseTag"), Te = G("VDropdown");
|
|
857
|
+
return S(), D(Te, {
|
|
858
|
+
ref_key: "dropdown",
|
|
859
|
+
ref: H,
|
|
860
|
+
shown: A(Q),
|
|
861
|
+
triggers: [],
|
|
862
|
+
"auto-size": "",
|
|
863
|
+
"popper-class": "no-padding",
|
|
864
|
+
"no-auto-focus": "",
|
|
865
|
+
"auto-hide": !1,
|
|
866
|
+
onHide: Oe
|
|
867
|
+
}, {
|
|
868
|
+
popper: L(() => [
|
|
869
|
+
F("div", Pt, [
|
|
870
|
+
A(Y) ? (S(), w("div", {
|
|
871
|
+
key: 0,
|
|
872
|
+
"data-testid": "base-autocomplete-create-item",
|
|
873
|
+
class: _(["empty:hidden item text-livestorm-600 text-14-semibold", {
|
|
874
|
+
active: g.value === null
|
|
875
|
+
}]),
|
|
876
|
+
onClick: y[7] || (y[7] = (E) => j(u.value))
|
|
877
|
+
}, Z(p.i18n.t("base-autocomplete-create-item", { item: u.value })), 3)) : B("", !0),
|
|
878
|
+
(S(!0), w(W, null, ue(A(T), (E, $) => (S(), w("div", {
|
|
879
|
+
key: O(E),
|
|
880
|
+
class: _(["item", {
|
|
881
|
+
selected: ne(E),
|
|
882
|
+
active: Be($)
|
|
883
|
+
}]),
|
|
884
|
+
"data-testid": "base-autocomplete-item",
|
|
885
|
+
onClick: (ae) => ee(E)
|
|
886
|
+
}, Z(K(E)), 11, Ot))), 128)),
|
|
887
|
+
A(r) && d.noDataText && A(T).length === 0 ? (S(), w("div", xt, Z(d.noDataText), 1)) : B("", !0)
|
|
888
|
+
])
|
|
889
|
+
]),
|
|
890
|
+
default: L(() => {
|
|
891
|
+
var E, $, ae;
|
|
892
|
+
return [
|
|
893
|
+
F("div", {
|
|
894
|
+
ref_key: "autocompleteWrapper",
|
|
895
|
+
ref: U,
|
|
896
|
+
class: _(["base-input base-form-style stretchable flex rounded-8 items-center", [`base-input-${d.size}`, {
|
|
897
|
+
error: d.error,
|
|
898
|
+
"!border-livestorm-600": A(Q)
|
|
899
|
+
}]])
|
|
900
|
+
}, [
|
|
901
|
+
d.prependIcon ? (S(), w("div", {
|
|
902
|
+
key: 0,
|
|
903
|
+
class: _([d.prependIcon, "w-4 h-4 mr-3"])
|
|
904
|
+
}, null, 2)) : B("", !0),
|
|
905
|
+
F("div", {
|
|
906
|
+
class: _(["flex flex-1 flex-wrap items-center", {
|
|
907
|
+
"mb-1": d.size == "medium" && A(I),
|
|
908
|
+
"mb-2": d.size === "large" && A(I)
|
|
909
|
+
}])
|
|
910
|
+
}, [
|
|
911
|
+
A(I) ? (S(!0), w(W, { key: 0 }, ue(A(l), (C, le) => (S(), D(z, {
|
|
912
|
+
key: O(P(C)),
|
|
913
|
+
deletable: "",
|
|
914
|
+
theme: Ae(le) ? "dark-grey" : "light-grey",
|
|
915
|
+
class: _(["mr-1 self-baseline", {
|
|
916
|
+
"mt-1": d.size !== "large",
|
|
917
|
+
"mt-2": d.size === "large"
|
|
918
|
+
}]),
|
|
919
|
+
size: d.size === "small" ? "xsmall" : "small",
|
|
920
|
+
onDelete: (Lt) => te(C)
|
|
921
|
+
}, {
|
|
922
|
+
default: L(() => [
|
|
923
|
+
A(n).tag ? (S(), w("div", At, [
|
|
924
|
+
be(p.$slots, "tag", Qe(Ke({
|
|
925
|
+
item: P(C),
|
|
926
|
+
index: le
|
|
927
|
+
})), void 0, !0)
|
|
928
|
+
])) : (S(), w(W, { key: 1 }, [
|
|
929
|
+
he(Z(K(P(C))), 1)
|
|
930
|
+
], 64))
|
|
931
|
+
]),
|
|
932
|
+
_: 2
|
|
933
|
+
}, 1032, ["theme", "class", "size", "onDelete"]))), 128)) : B("", !0),
|
|
934
|
+
fe(F("input", {
|
|
935
|
+
ref_key: "input",
|
|
936
|
+
ref: x,
|
|
937
|
+
"onUpdate:modelValue": y[0] || (y[0] = (C) => u.value = C),
|
|
938
|
+
type: "text",
|
|
939
|
+
"data-testid": "base-autocomplete-input",
|
|
940
|
+
class: _(["flex-1 h-6 min-w-0 focus:min-w-[64px]", {
|
|
941
|
+
"mt-1": A(I) && d.size === "medium",
|
|
942
|
+
"mt-2": A(I) && d.size === "large"
|
|
943
|
+
}]),
|
|
944
|
+
placeholder: (E = A(l)) != null && E.length ? null : d.placeholder,
|
|
945
|
+
onFocus: Fe,
|
|
946
|
+
onInput: Pe,
|
|
947
|
+
onKeydown: [
|
|
948
|
+
y[1] || (y[1] = q((C) => re("up"), ["up"])),
|
|
949
|
+
y[2] || (y[2] = q((C) => re("down"), ["down"])),
|
|
950
|
+
y[3] || (y[3] = q((C) => re("enter"), ["enter"])),
|
|
951
|
+
y[4] || (y[4] = q((C) => ie("left"), ["left"])),
|
|
952
|
+
y[5] || (y[5] = q((C) => ie("right"), ["right"])),
|
|
953
|
+
y[6] || (y[6] = q((C) => ie("delete"), ["delete"]))
|
|
954
|
+
]
|
|
955
|
+
}, null, 42, Ft), [
|
|
956
|
+
[Ze, u.value]
|
|
957
|
+
])
|
|
958
|
+
], 2),
|
|
959
|
+
d.clearable && ((($ = u.value) == null ? void 0 : $.length) > 0 || ((ae = A(l)) == null ? void 0 : ae.length) > 0) ? (S(), w("div", {
|
|
960
|
+
key: 1,
|
|
961
|
+
class: "i-ls-x cursor-pointer w-4 h-4 ml-3",
|
|
962
|
+
"data-testid": "base-autocomplete-clear",
|
|
963
|
+
onClick: Ce
|
|
964
|
+
})) : B("", !0),
|
|
965
|
+
A(T).length > 0 ? (S(), w("div", {
|
|
966
|
+
key: 2,
|
|
967
|
+
class: _([h.value ? "i-ls-chevron-up" : "i-ls-chevron-down", "cursor-text w-4 h-4 ml-3"]),
|
|
968
|
+
onClick: xe
|
|
969
|
+
}, null, 2)) : B("", !0)
|
|
970
|
+
], 2)
|
|
971
|
+
];
|
|
972
|
+
}),
|
|
973
|
+
_: 3
|
|
974
|
+
}, 8, ["shown"]);
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
}, Tt = /* @__PURE__ */ X(Ct, [["__scopeId", "data-v-05e5aae4"]]), Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
978
|
+
__proto__: null,
|
|
979
|
+
default: Tt
|
|
980
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
981
|
+
var Rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
982
|
+
function It(d) {
|
|
983
|
+
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
984
|
+
}
|
|
985
|
+
var ke = { exports: {} };
|
|
986
|
+
(function(d, f) {
|
|
987
|
+
(function(o, s) {
|
|
988
|
+
d.exports = s();
|
|
989
|
+
})(Rt, function() {
|
|
990
|
+
return function(o) {
|
|
991
|
+
var s = {};
|
|
992
|
+
function m(a) {
|
|
993
|
+
if (s[a])
|
|
994
|
+
return s[a].exports;
|
|
995
|
+
var r = s[a] = { i: a, l: !1, exports: {} };
|
|
996
|
+
return o[a].call(r.exports, r, r.exports, m), r.l = !0, r.exports;
|
|
997
|
+
}
|
|
998
|
+
return m.m = o, m.c = s, m.d = function(a, r, i) {
|
|
999
|
+
m.o(a, r) || Object.defineProperty(a, r, { enumerable: !0, get: i });
|
|
1000
|
+
}, m.r = function(a) {
|
|
1001
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(a, "__esModule", { value: !0 });
|
|
1002
|
+
}, m.t = function(a, r) {
|
|
1003
|
+
if (1 & r && (a = m(a)), 8 & r || 4 & r && typeof a == "object" && a && a.__esModule)
|
|
1004
|
+
return a;
|
|
1005
|
+
var i = /* @__PURE__ */ Object.create(null);
|
|
1006
|
+
if (m.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: a }), 2 & r && typeof a != "string")
|
|
1007
|
+
for (var v in a)
|
|
1008
|
+
m.d(i, v, function(e) {
|
|
1009
|
+
return a[e];
|
|
1010
|
+
}.bind(null, v));
|
|
1011
|
+
return i;
|
|
1012
|
+
}, m.n = function(a) {
|
|
1013
|
+
var r = a && a.__esModule ? function() {
|
|
1014
|
+
return a.default;
|
|
1015
|
+
} : function() {
|
|
1016
|
+
return a;
|
|
1017
|
+
};
|
|
1018
|
+
return m.d(r, "a", r), r;
|
|
1019
|
+
}, m.o = function(a, r) {
|
|
1020
|
+
return Object.prototype.hasOwnProperty.call(a, r);
|
|
1021
|
+
}, m.p = "", m(m.s = 90);
|
|
1022
|
+
}({ 17: function(o, s, m) {
|
|
1023
|
+
s.__esModule = !0, s.default = void 0;
|
|
1024
|
+
var a = m(18), r = function() {
|
|
1025
|
+
function i() {
|
|
1026
|
+
}
|
|
1027
|
+
return i.getFirstMatch = function(v, e) {
|
|
1028
|
+
var t = e.match(v);
|
|
1029
|
+
return t && t.length > 0 && t[1] || "";
|
|
1030
|
+
}, i.getSecondMatch = function(v, e) {
|
|
1031
|
+
var t = e.match(v);
|
|
1032
|
+
return t && t.length > 1 && t[2] || "";
|
|
1033
|
+
}, i.matchAndReturnConst = function(v, e, t) {
|
|
1034
|
+
if (v.test(e))
|
|
1035
|
+
return t;
|
|
1036
|
+
}, i.getWindowsVersionName = function(v) {
|
|
1037
|
+
switch (v) {
|
|
1038
|
+
case "NT":
|
|
1039
|
+
return "NT";
|
|
1040
|
+
case "XP":
|
|
1041
|
+
return "XP";
|
|
1042
|
+
case "NT 5.0":
|
|
1043
|
+
return "2000";
|
|
1044
|
+
case "NT 5.1":
|
|
1045
|
+
return "XP";
|
|
1046
|
+
case "NT 5.2":
|
|
1047
|
+
return "2003";
|
|
1048
|
+
case "NT 6.0":
|
|
1049
|
+
return "Vista";
|
|
1050
|
+
case "NT 6.1":
|
|
1051
|
+
return "7";
|
|
1052
|
+
case "NT 6.2":
|
|
1053
|
+
return "8";
|
|
1054
|
+
case "NT 6.3":
|
|
1055
|
+
return "8.1";
|
|
1056
|
+
case "NT 10.0":
|
|
1057
|
+
return "10";
|
|
1058
|
+
default:
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
}, i.getMacOSVersionName = function(v) {
|
|
1062
|
+
var e = v.split(".").splice(0, 2).map(function(t) {
|
|
1063
|
+
return parseInt(t, 10) || 0;
|
|
1064
|
+
});
|
|
1065
|
+
if (e.push(0), e[0] === 10)
|
|
1066
|
+
switch (e[1]) {
|
|
1067
|
+
case 5:
|
|
1068
|
+
return "Leopard";
|
|
1069
|
+
case 6:
|
|
1070
|
+
return "Snow Leopard";
|
|
1071
|
+
case 7:
|
|
1072
|
+
return "Lion";
|
|
1073
|
+
case 8:
|
|
1074
|
+
return "Mountain Lion";
|
|
1075
|
+
case 9:
|
|
1076
|
+
return "Mavericks";
|
|
1077
|
+
case 10:
|
|
1078
|
+
return "Yosemite";
|
|
1079
|
+
case 11:
|
|
1080
|
+
return "El Capitan";
|
|
1081
|
+
case 12:
|
|
1082
|
+
return "Sierra";
|
|
1083
|
+
case 13:
|
|
1084
|
+
return "High Sierra";
|
|
1085
|
+
case 14:
|
|
1086
|
+
return "Mojave";
|
|
1087
|
+
case 15:
|
|
1088
|
+
return "Catalina";
|
|
1089
|
+
default:
|
|
1090
|
+
return;
|
|
1091
|
+
}
|
|
1092
|
+
}, i.getAndroidVersionName = function(v) {
|
|
1093
|
+
var e = v.split(".").splice(0, 2).map(function(t) {
|
|
1094
|
+
return parseInt(t, 10) || 0;
|
|
1095
|
+
});
|
|
1096
|
+
if (e.push(0), !(e[0] === 1 && e[1] < 5))
|
|
1097
|
+
return e[0] === 1 && e[1] < 6 ? "Cupcake" : e[0] === 1 && e[1] >= 6 ? "Donut" : e[0] === 2 && e[1] < 2 ? "Eclair" : e[0] === 2 && e[1] === 2 ? "Froyo" : e[0] === 2 && e[1] > 2 ? "Gingerbread" : e[0] === 3 ? "Honeycomb" : e[0] === 4 && e[1] < 1 ? "Ice Cream Sandwich" : e[0] === 4 && e[1] < 4 ? "Jelly Bean" : e[0] === 4 && e[1] >= 4 ? "KitKat" : e[0] === 5 ? "Lollipop" : e[0] === 6 ? "Marshmallow" : e[0] === 7 ? "Nougat" : e[0] === 8 ? "Oreo" : e[0] === 9 ? "Pie" : void 0;
|
|
1098
|
+
}, i.getVersionPrecision = function(v) {
|
|
1099
|
+
return v.split(".").length;
|
|
1100
|
+
}, i.compareVersions = function(v, e, t) {
|
|
1101
|
+
t === void 0 && (t = !1);
|
|
1102
|
+
var n = i.getVersionPrecision(v), h = i.getVersionPrecision(e), l = Math.max(n, h), u = 0, c = i.map([v, e], function(b) {
|
|
1103
|
+
var g = l - i.getVersionPrecision(b), M = b + new Array(g + 1).join(".0");
|
|
1104
|
+
return i.map(M.split("."), function(x) {
|
|
1105
|
+
return new Array(20 - x.length).join("0") + x;
|
|
1106
|
+
}).reverse();
|
|
1107
|
+
});
|
|
1108
|
+
for (t && (u = l - Math.min(n, h)), l -= 1; l >= u; ) {
|
|
1109
|
+
if (c[0][l] > c[1][l])
|
|
1110
|
+
return 1;
|
|
1111
|
+
if (c[0][l] === c[1][l]) {
|
|
1112
|
+
if (l === u)
|
|
1113
|
+
return 0;
|
|
1114
|
+
l -= 1;
|
|
1115
|
+
} else if (c[0][l] < c[1][l])
|
|
1116
|
+
return -1;
|
|
1117
|
+
}
|
|
1118
|
+
}, i.map = function(v, e) {
|
|
1119
|
+
var t, n = [];
|
|
1120
|
+
if (Array.prototype.map)
|
|
1121
|
+
return Array.prototype.map.call(v, e);
|
|
1122
|
+
for (t = 0; t < v.length; t += 1)
|
|
1123
|
+
n.push(e(v[t]));
|
|
1124
|
+
return n;
|
|
1125
|
+
}, i.find = function(v, e) {
|
|
1126
|
+
var t, n;
|
|
1127
|
+
if (Array.prototype.find)
|
|
1128
|
+
return Array.prototype.find.call(v, e);
|
|
1129
|
+
for (t = 0, n = v.length; t < n; t += 1) {
|
|
1130
|
+
var h = v[t];
|
|
1131
|
+
if (e(h, t))
|
|
1132
|
+
return h;
|
|
1133
|
+
}
|
|
1134
|
+
}, i.assign = function(v) {
|
|
1135
|
+
for (var e, t, n = v, h = arguments.length, l = new Array(h > 1 ? h - 1 : 0), u = 1; u < h; u++)
|
|
1136
|
+
l[u - 1] = arguments[u];
|
|
1137
|
+
if (Object.assign)
|
|
1138
|
+
return Object.assign.apply(Object, [v].concat(l));
|
|
1139
|
+
var c = function() {
|
|
1140
|
+
var b = l[e];
|
|
1141
|
+
typeof b == "object" && b !== null && Object.keys(b).forEach(function(g) {
|
|
1142
|
+
n[g] = b[g];
|
|
1143
|
+
});
|
|
1144
|
+
};
|
|
1145
|
+
for (e = 0, t = l.length; e < t; e += 1)
|
|
1146
|
+
c();
|
|
1147
|
+
return v;
|
|
1148
|
+
}, i.getBrowserAlias = function(v) {
|
|
1149
|
+
return a.BROWSER_ALIASES_MAP[v];
|
|
1150
|
+
}, i.getBrowserTypeByAlias = function(v) {
|
|
1151
|
+
return a.BROWSER_MAP[v] || "";
|
|
1152
|
+
}, i;
|
|
1153
|
+
}();
|
|
1154
|
+
s.default = r, o.exports = s.default;
|
|
1155
|
+
}, 18: function(o, s, m) {
|
|
1156
|
+
s.__esModule = !0, s.ENGINE_MAP = s.OS_MAP = s.PLATFORMS_MAP = s.BROWSER_MAP = s.BROWSER_ALIASES_MAP = void 0, s.BROWSER_ALIASES_MAP = { "Amazon Silk": "amazon_silk", "Android Browser": "android", Bada: "bada", BlackBerry: "blackberry", Chrome: "chrome", Chromium: "chromium", Electron: "electron", Epiphany: "epiphany", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", "Internet Explorer": "ie", "K-Meleon": "k_meleon", Maxthon: "maxthon", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", Opera: "opera", "Opera Coast": "opera_coast", PhantomJS: "phantomjs", Puffin: "puffin", QupZilla: "qupzilla", QQ: "qq", QQLite: "qqlite", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", "Yandex Browser": "yandex", Roku: "roku" }, s.BROWSER_MAP = { amazon_silk: "Amazon Silk", android: "Android Browser", bada: "Bada", blackberry: "BlackBerry", chrome: "Chrome", chromium: "Chromium", electron: "Electron", epiphany: "Epiphany", firefox: "Firefox", focus: "Focus", generic: "Generic", googlebot: "Googlebot", google_search: "Google Search", ie: "Internet Explorer", k_meleon: "K-Meleon", maxthon: "Maxthon", edge: "Microsoft Edge", mz: "MZ Browser", naver: "NAVER Whale Browser", opera: "Opera", opera_coast: "Opera Coast", phantomjs: "PhantomJS", puffin: "Puffin", qupzilla: "QupZilla", qq: "QQ Browser", qqlite: "QQ Browser Lite", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", sleipnir: "Sleipnir", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yandex: "Yandex Browser" }, s.PLATFORMS_MAP = { tablet: "tablet", mobile: "mobile", desktop: "desktop", tv: "tv" }, s.OS_MAP = { WindowsPhone: "Windows Phone", Windows: "Windows", MacOS: "macOS", iOS: "iOS", Android: "Android", WebOS: "WebOS", BlackBerry: "BlackBerry", Bada: "Bada", Tizen: "Tizen", Linux: "Linux", ChromeOS: "Chrome OS", PlayStation4: "PlayStation 4", Roku: "Roku" }, s.ENGINE_MAP = { EdgeHTML: "EdgeHTML", Blink: "Blink", Trident: "Trident", Presto: "Presto", Gecko: "Gecko", WebKit: "WebKit" };
|
|
1157
|
+
}, 90: function(o, s, m) {
|
|
1158
|
+
s.__esModule = !0, s.default = void 0;
|
|
1159
|
+
var a, r = (a = m(91)) && a.__esModule ? a : { default: a }, i = m(18);
|
|
1160
|
+
function v(t, n) {
|
|
1161
|
+
for (var h = 0; h < n.length; h++) {
|
|
1162
|
+
var l = n[h];
|
|
1163
|
+
l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(t, l.key, l);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
var e = function() {
|
|
1167
|
+
function t() {
|
|
1168
|
+
}
|
|
1169
|
+
var n, h, l;
|
|
1170
|
+
return t.getParser = function(u, c) {
|
|
1171
|
+
if (c === void 0 && (c = !1), typeof u != "string")
|
|
1172
|
+
throw new Error("UserAgent should be a string");
|
|
1173
|
+
return new r.default(u, c);
|
|
1174
|
+
}, t.parse = function(u) {
|
|
1175
|
+
return new r.default(u).getResult();
|
|
1176
|
+
}, n = t, l = [{ key: "BROWSER_MAP", get: function() {
|
|
1177
|
+
return i.BROWSER_MAP;
|
|
1178
|
+
} }, { key: "ENGINE_MAP", get: function() {
|
|
1179
|
+
return i.ENGINE_MAP;
|
|
1180
|
+
} }, { key: "OS_MAP", get: function() {
|
|
1181
|
+
return i.OS_MAP;
|
|
1182
|
+
} }, { key: "PLATFORMS_MAP", get: function() {
|
|
1183
|
+
return i.PLATFORMS_MAP;
|
|
1184
|
+
} }], (h = null) && v(n.prototype, h), l && v(n, l), t;
|
|
1185
|
+
}();
|
|
1186
|
+
s.default = e, o.exports = s.default;
|
|
1187
|
+
}, 91: function(o, s, m) {
|
|
1188
|
+
s.__esModule = !0, s.default = void 0;
|
|
1189
|
+
var a = t(m(92)), r = t(m(93)), i = t(m(94)), v = t(m(95)), e = t(m(17));
|
|
1190
|
+
function t(h) {
|
|
1191
|
+
return h && h.__esModule ? h : { default: h };
|
|
1192
|
+
}
|
|
1193
|
+
var n = function() {
|
|
1194
|
+
function h(u, c) {
|
|
1195
|
+
if (c === void 0 && (c = !1), u == null || u === "")
|
|
1196
|
+
throw new Error("UserAgent parameter can't be empty");
|
|
1197
|
+
this._ua = u, this.parsedResult = {}, c !== !0 && this.parse();
|
|
1198
|
+
}
|
|
1199
|
+
var l = h.prototype;
|
|
1200
|
+
return l.getUA = function() {
|
|
1201
|
+
return this._ua;
|
|
1202
|
+
}, l.test = function(u) {
|
|
1203
|
+
return u.test(this._ua);
|
|
1204
|
+
}, l.parseBrowser = function() {
|
|
1205
|
+
var u = this;
|
|
1206
|
+
this.parsedResult.browser = {};
|
|
1207
|
+
var c = e.default.find(a.default, function(b) {
|
|
1208
|
+
if (typeof b.test == "function")
|
|
1209
|
+
return b.test(u);
|
|
1210
|
+
if (b.test instanceof Array)
|
|
1211
|
+
return b.test.some(function(g) {
|
|
1212
|
+
return u.test(g);
|
|
1213
|
+
});
|
|
1214
|
+
throw new Error("Browser's test function is not valid");
|
|
1215
|
+
});
|
|
1216
|
+
return c && (this.parsedResult.browser = c.describe(this.getUA())), this.parsedResult.browser;
|
|
1217
|
+
}, l.getBrowser = function() {
|
|
1218
|
+
return this.parsedResult.browser ? this.parsedResult.browser : this.parseBrowser();
|
|
1219
|
+
}, l.getBrowserName = function(u) {
|
|
1220
|
+
return u ? String(this.getBrowser().name).toLowerCase() || "" : this.getBrowser().name || "";
|
|
1221
|
+
}, l.getBrowserVersion = function() {
|
|
1222
|
+
return this.getBrowser().version;
|
|
1223
|
+
}, l.getOS = function() {
|
|
1224
|
+
return this.parsedResult.os ? this.parsedResult.os : this.parseOS();
|
|
1225
|
+
}, l.parseOS = function() {
|
|
1226
|
+
var u = this;
|
|
1227
|
+
this.parsedResult.os = {};
|
|
1228
|
+
var c = e.default.find(r.default, function(b) {
|
|
1229
|
+
if (typeof b.test == "function")
|
|
1230
|
+
return b.test(u);
|
|
1231
|
+
if (b.test instanceof Array)
|
|
1232
|
+
return b.test.some(function(g) {
|
|
1233
|
+
return u.test(g);
|
|
1234
|
+
});
|
|
1235
|
+
throw new Error("Browser's test function is not valid");
|
|
1236
|
+
});
|
|
1237
|
+
return c && (this.parsedResult.os = c.describe(this.getUA())), this.parsedResult.os;
|
|
1238
|
+
}, l.getOSName = function(u) {
|
|
1239
|
+
var c = this.getOS().name;
|
|
1240
|
+
return u ? String(c).toLowerCase() || "" : c || "";
|
|
1241
|
+
}, l.getOSVersion = function() {
|
|
1242
|
+
return this.getOS().version;
|
|
1243
|
+
}, l.getPlatform = function() {
|
|
1244
|
+
return this.parsedResult.platform ? this.parsedResult.platform : this.parsePlatform();
|
|
1245
|
+
}, l.getPlatformType = function(u) {
|
|
1246
|
+
u === void 0 && (u = !1);
|
|
1247
|
+
var c = this.getPlatform().type;
|
|
1248
|
+
return u ? String(c).toLowerCase() || "" : c || "";
|
|
1249
|
+
}, l.parsePlatform = function() {
|
|
1250
|
+
var u = this;
|
|
1251
|
+
this.parsedResult.platform = {};
|
|
1252
|
+
var c = e.default.find(i.default, function(b) {
|
|
1253
|
+
if (typeof b.test == "function")
|
|
1254
|
+
return b.test(u);
|
|
1255
|
+
if (b.test instanceof Array)
|
|
1256
|
+
return b.test.some(function(g) {
|
|
1257
|
+
return u.test(g);
|
|
1258
|
+
});
|
|
1259
|
+
throw new Error("Browser's test function is not valid");
|
|
1260
|
+
});
|
|
1261
|
+
return c && (this.parsedResult.platform = c.describe(this.getUA())), this.parsedResult.platform;
|
|
1262
|
+
}, l.getEngine = function() {
|
|
1263
|
+
return this.parsedResult.engine ? this.parsedResult.engine : this.parseEngine();
|
|
1264
|
+
}, l.getEngineName = function(u) {
|
|
1265
|
+
return u ? String(this.getEngine().name).toLowerCase() || "" : this.getEngine().name || "";
|
|
1266
|
+
}, l.parseEngine = function() {
|
|
1267
|
+
var u = this;
|
|
1268
|
+
this.parsedResult.engine = {};
|
|
1269
|
+
var c = e.default.find(v.default, function(b) {
|
|
1270
|
+
if (typeof b.test == "function")
|
|
1271
|
+
return b.test(u);
|
|
1272
|
+
if (b.test instanceof Array)
|
|
1273
|
+
return b.test.some(function(g) {
|
|
1274
|
+
return u.test(g);
|
|
1275
|
+
});
|
|
1276
|
+
throw new Error("Browser's test function is not valid");
|
|
1277
|
+
});
|
|
1278
|
+
return c && (this.parsedResult.engine = c.describe(this.getUA())), this.parsedResult.engine;
|
|
1279
|
+
}, l.parse = function() {
|
|
1280
|
+
return this.parseBrowser(), this.parseOS(), this.parsePlatform(), this.parseEngine(), this;
|
|
1281
|
+
}, l.getResult = function() {
|
|
1282
|
+
return e.default.assign({}, this.parsedResult);
|
|
1283
|
+
}, l.satisfies = function(u) {
|
|
1284
|
+
var c = this, b = {}, g = 0, M = {}, x = 0;
|
|
1285
|
+
if (Object.keys(u).forEach(function(P) {
|
|
1286
|
+
var j = u[P];
|
|
1287
|
+
typeof j == "string" ? (M[P] = j, x += 1) : typeof j == "object" && (b[P] = j, g += 1);
|
|
1288
|
+
}), g > 0) {
|
|
1289
|
+
var U = Object.keys(b), H = e.default.find(U, function(P) {
|
|
1290
|
+
return c.isOS(P);
|
|
1291
|
+
});
|
|
1292
|
+
if (H) {
|
|
1293
|
+
var T = this.satisfies(b[H]);
|
|
1294
|
+
if (T !== void 0)
|
|
1295
|
+
return T;
|
|
1296
|
+
}
|
|
1297
|
+
var I = e.default.find(U, function(P) {
|
|
1298
|
+
return c.isPlatform(P);
|
|
1299
|
+
});
|
|
1300
|
+
if (I) {
|
|
1301
|
+
var Q = this.satisfies(b[I]);
|
|
1302
|
+
if (Q !== void 0)
|
|
1303
|
+
return Q;
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
if (x > 0) {
|
|
1307
|
+
var Y = Object.keys(M), V = e.default.find(Y, function(P) {
|
|
1308
|
+
return c.isBrowser(P, !0);
|
|
1309
|
+
});
|
|
1310
|
+
if (V !== void 0)
|
|
1311
|
+
return this.compareVersion(M[V]);
|
|
1312
|
+
}
|
|
1313
|
+
}, l.isBrowser = function(u, c) {
|
|
1314
|
+
c === void 0 && (c = !1);
|
|
1315
|
+
var b = this.getBrowserName().toLowerCase(), g = u.toLowerCase(), M = e.default.getBrowserTypeByAlias(g);
|
|
1316
|
+
return c && M && (g = M.toLowerCase()), g === b;
|
|
1317
|
+
}, l.compareVersion = function(u) {
|
|
1318
|
+
var c = [0], b = u, g = !1, M = this.getBrowserVersion();
|
|
1319
|
+
if (typeof M == "string")
|
|
1320
|
+
return u[0] === ">" || u[0] === "<" ? (b = u.substr(1), u[1] === "=" ? (g = !0, b = u.substr(2)) : c = [], u[0] === ">" ? c.push(1) : c.push(-1)) : u[0] === "=" ? b = u.substr(1) : u[0] === "~" && (g = !0, b = u.substr(1)), c.indexOf(e.default.compareVersions(M, b, g)) > -1;
|
|
1321
|
+
}, l.isOS = function(u) {
|
|
1322
|
+
return this.getOSName(!0) === String(u).toLowerCase();
|
|
1323
|
+
}, l.isPlatform = function(u) {
|
|
1324
|
+
return this.getPlatformType(!0) === String(u).toLowerCase();
|
|
1325
|
+
}, l.isEngine = function(u) {
|
|
1326
|
+
return this.getEngineName(!0) === String(u).toLowerCase();
|
|
1327
|
+
}, l.is = function(u, c) {
|
|
1328
|
+
return c === void 0 && (c = !1), this.isBrowser(u, c) || this.isOS(u) || this.isPlatform(u);
|
|
1329
|
+
}, l.some = function(u) {
|
|
1330
|
+
var c = this;
|
|
1331
|
+
return u === void 0 && (u = []), u.some(function(b) {
|
|
1332
|
+
return c.is(b);
|
|
1333
|
+
});
|
|
1334
|
+
}, h;
|
|
1335
|
+
}();
|
|
1336
|
+
s.default = n, o.exports = s.default;
|
|
1337
|
+
}, 92: function(o, s, m) {
|
|
1338
|
+
s.__esModule = !0, s.default = void 0;
|
|
1339
|
+
var a, r = (a = m(17)) && a.__esModule ? a : { default: a }, i = /version\/(\d+(\.?_?\d+)+)/i, v = [{ test: [/googlebot/i], describe: function(e) {
|
|
1340
|
+
var t = { name: "Googlebot" }, n = r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, e) || r.default.getFirstMatch(i, e);
|
|
1341
|
+
return n && (t.version = n), t;
|
|
1342
|
+
} }, { test: [/opera/i], describe: function(e) {
|
|
1343
|
+
var t = { name: "Opera" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1344
|
+
return n && (t.version = n), t;
|
|
1345
|
+
} }, { test: [/opr\/|opios/i], describe: function(e) {
|
|
1346
|
+
var t = { name: "Opera" }, n = r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1347
|
+
return n && (t.version = n), t;
|
|
1348
|
+
} }, { test: [/SamsungBrowser/i], describe: function(e) {
|
|
1349
|
+
var t = { name: "Samsung Internet for Android" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1350
|
+
return n && (t.version = n), t;
|
|
1351
|
+
} }, { test: [/Whale/i], describe: function(e) {
|
|
1352
|
+
var t = { name: "NAVER Whale Browser" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, e);
|
|
1353
|
+
return n && (t.version = n), t;
|
|
1354
|
+
} }, { test: [/MZBrowser/i], describe: function(e) {
|
|
1355
|
+
var t = { name: "MZ Browser" }, n = r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1356
|
+
return n && (t.version = n), t;
|
|
1357
|
+
} }, { test: [/focus/i], describe: function(e) {
|
|
1358
|
+
var t = { name: "Focus" }, n = r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1359
|
+
return n && (t.version = n), t;
|
|
1360
|
+
} }, { test: [/swing/i], describe: function(e) {
|
|
1361
|
+
var t = { name: "Swing" }, n = r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1362
|
+
return n && (t.version = n), t;
|
|
1363
|
+
} }, { test: [/coast/i], describe: function(e) {
|
|
1364
|
+
var t = { name: "Opera Coast" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1365
|
+
return n && (t.version = n), t;
|
|
1366
|
+
} }, { test: [/opt\/\d+(?:.?_?\d+)+/i], describe: function(e) {
|
|
1367
|
+
var t = { name: "Opera Touch" }, n = r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1368
|
+
return n && (t.version = n), t;
|
|
1369
|
+
} }, { test: [/yabrowser/i], describe: function(e) {
|
|
1370
|
+
var t = { name: "Yandex Browser" }, n = r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1371
|
+
return n && (t.version = n), t;
|
|
1372
|
+
} }, { test: [/ucbrowser/i], describe: function(e) {
|
|
1373
|
+
var t = { name: "UC Browser" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1374
|
+
return n && (t.version = n), t;
|
|
1375
|
+
} }, { test: [/Maxthon|mxios/i], describe: function(e) {
|
|
1376
|
+
var t = { name: "Maxthon" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1377
|
+
return n && (t.version = n), t;
|
|
1378
|
+
} }, { test: [/epiphany/i], describe: function(e) {
|
|
1379
|
+
var t = { name: "Epiphany" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1380
|
+
return n && (t.version = n), t;
|
|
1381
|
+
} }, { test: [/puffin/i], describe: function(e) {
|
|
1382
|
+
var t = { name: "Puffin" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1383
|
+
return n && (t.version = n), t;
|
|
1384
|
+
} }, { test: [/sleipnir/i], describe: function(e) {
|
|
1385
|
+
var t = { name: "Sleipnir" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1386
|
+
return n && (t.version = n), t;
|
|
1387
|
+
} }, { test: [/k-meleon/i], describe: function(e) {
|
|
1388
|
+
var t = { name: "K-Meleon" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1389
|
+
return n && (t.version = n), t;
|
|
1390
|
+
} }, { test: [/micromessenger/i], describe: function(e) {
|
|
1391
|
+
var t = { name: "WeChat" }, n = r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1392
|
+
return n && (t.version = n), t;
|
|
1393
|
+
} }, { test: [/qqbrowser/i], describe: function(e) {
|
|
1394
|
+
var t = { name: /qqbrowserlite/i.test(e) ? "QQ Browser Lite" : "QQ Browser" }, n = r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1395
|
+
return n && (t.version = n), t;
|
|
1396
|
+
} }, { test: [/msie|trident/i], describe: function(e) {
|
|
1397
|
+
var t = { name: "Internet Explorer" }, n = r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, e);
|
|
1398
|
+
return n && (t.version = n), t;
|
|
1399
|
+
} }, { test: [/\sedg\//i], describe: function(e) {
|
|
1400
|
+
var t = { name: "Microsoft Edge" }, n = r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, e);
|
|
1401
|
+
return n && (t.version = n), t;
|
|
1402
|
+
} }, { test: [/edg([ea]|ios)/i], describe: function(e) {
|
|
1403
|
+
var t = { name: "Microsoft Edge" }, n = r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, e);
|
|
1404
|
+
return n && (t.version = n), t;
|
|
1405
|
+
} }, { test: [/vivaldi/i], describe: function(e) {
|
|
1406
|
+
var t = { name: "Vivaldi" }, n = r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, e);
|
|
1407
|
+
return n && (t.version = n), t;
|
|
1408
|
+
} }, { test: [/seamonkey/i], describe: function(e) {
|
|
1409
|
+
var t = { name: "SeaMonkey" }, n = r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, e);
|
|
1410
|
+
return n && (t.version = n), t;
|
|
1411
|
+
} }, { test: [/sailfish/i], describe: function(e) {
|
|
1412
|
+
var t = { name: "Sailfish" }, n = r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, e);
|
|
1413
|
+
return n && (t.version = n), t;
|
|
1414
|
+
} }, { test: [/silk/i], describe: function(e) {
|
|
1415
|
+
var t = { name: "Amazon Silk" }, n = r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, e);
|
|
1416
|
+
return n && (t.version = n), t;
|
|
1417
|
+
} }, { test: [/phantom/i], describe: function(e) {
|
|
1418
|
+
var t = { name: "PhantomJS" }, n = r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, e);
|
|
1419
|
+
return n && (t.version = n), t;
|
|
1420
|
+
} }, { test: [/slimerjs/i], describe: function(e) {
|
|
1421
|
+
var t = { name: "SlimerJS" }, n = r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, e);
|
|
1422
|
+
return n && (t.version = n), t;
|
|
1423
|
+
} }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e) {
|
|
1424
|
+
var t = { name: "BlackBerry" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, e);
|
|
1425
|
+
return n && (t.version = n), t;
|
|
1426
|
+
} }, { test: [/(web|hpw)[o0]s/i], describe: function(e) {
|
|
1427
|
+
var t = { name: "WebOS Browser" }, n = r.default.getFirstMatch(i, e) || r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, e);
|
|
1428
|
+
return n && (t.version = n), t;
|
|
1429
|
+
} }, { test: [/bada/i], describe: function(e) {
|
|
1430
|
+
var t = { name: "Bada" }, n = r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, e);
|
|
1431
|
+
return n && (t.version = n), t;
|
|
1432
|
+
} }, { test: [/tizen/i], describe: function(e) {
|
|
1433
|
+
var t = { name: "Tizen" }, n = r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1434
|
+
return n && (t.version = n), t;
|
|
1435
|
+
} }, { test: [/qupzilla/i], describe: function(e) {
|
|
1436
|
+
var t = { name: "QupZilla" }, n = r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1437
|
+
return n && (t.version = n), t;
|
|
1438
|
+
} }, { test: [/firefox|iceweasel|fxios/i], describe: function(e) {
|
|
1439
|
+
var t = { name: "Firefox" }, n = r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1440
|
+
return n && (t.version = n), t;
|
|
1441
|
+
} }, { test: [/electron/i], describe: function(e) {
|
|
1442
|
+
var t = { name: "Electron" }, n = r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, e);
|
|
1443
|
+
return n && (t.version = n), t;
|
|
1444
|
+
} }, { test: [/MiuiBrowser/i], describe: function(e) {
|
|
1445
|
+
var t = { name: "Miui" }, n = r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, e);
|
|
1446
|
+
return n && (t.version = n), t;
|
|
1447
|
+
} }, { test: [/chromium/i], describe: function(e) {
|
|
1448
|
+
var t = { name: "Chromium" }, n = r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, e) || r.default.getFirstMatch(i, e);
|
|
1449
|
+
return n && (t.version = n), t;
|
|
1450
|
+
} }, { test: [/chrome|crios|crmo/i], describe: function(e) {
|
|
1451
|
+
var t = { name: "Chrome" }, n = r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, e);
|
|
1452
|
+
return n && (t.version = n), t;
|
|
1453
|
+
} }, { test: [/GSA/i], describe: function(e) {
|
|
1454
|
+
var t = { name: "Google Search" }, n = r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, e);
|
|
1455
|
+
return n && (t.version = n), t;
|
|
1456
|
+
} }, { test: function(e) {
|
|
1457
|
+
var t = !e.test(/like android/i), n = e.test(/android/i);
|
|
1458
|
+
return t && n;
|
|
1459
|
+
}, describe: function(e) {
|
|
1460
|
+
var t = { name: "Android Browser" }, n = r.default.getFirstMatch(i, e);
|
|
1461
|
+
return n && (t.version = n), t;
|
|
1462
|
+
} }, { test: [/playstation 4/i], describe: function(e) {
|
|
1463
|
+
var t = { name: "PlayStation 4" }, n = r.default.getFirstMatch(i, e);
|
|
1464
|
+
return n && (t.version = n), t;
|
|
1465
|
+
} }, { test: [/safari|applewebkit/i], describe: function(e) {
|
|
1466
|
+
var t = { name: "Safari" }, n = r.default.getFirstMatch(i, e);
|
|
1467
|
+
return n && (t.version = n), t;
|
|
1468
|
+
} }, { test: [/.*/i], describe: function(e) {
|
|
1469
|
+
var t = e.search("\\(") !== -1 ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /;
|
|
1470
|
+
return { name: r.default.getFirstMatch(t, e), version: r.default.getSecondMatch(t, e) };
|
|
1471
|
+
} }];
|
|
1472
|
+
s.default = v, o.exports = s.default;
|
|
1473
|
+
}, 93: function(o, s, m) {
|
|
1474
|
+
s.__esModule = !0, s.default = void 0;
|
|
1475
|
+
var a, r = (a = m(17)) && a.__esModule ? a : { default: a }, i = m(18), v = [{ test: [/Roku\/DVP/], describe: function(e) {
|
|
1476
|
+
var t = r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, e);
|
|
1477
|
+
return { name: i.OS_MAP.Roku, version: t };
|
|
1478
|
+
} }, { test: [/windows phone/i], describe: function(e) {
|
|
1479
|
+
var t = r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, e);
|
|
1480
|
+
return { name: i.OS_MAP.WindowsPhone, version: t };
|
|
1481
|
+
} }, { test: [/windows /i], describe: function(e) {
|
|
1482
|
+
var t = r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, e), n = r.default.getWindowsVersionName(t);
|
|
1483
|
+
return { name: i.OS_MAP.Windows, version: t, versionName: n };
|
|
1484
|
+
} }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function(e) {
|
|
1485
|
+
var t = { name: i.OS_MAP.iOS }, n = r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/, e);
|
|
1486
|
+
return n && (t.version = n), t;
|
|
1487
|
+
} }, { test: [/macintosh/i], describe: function(e) {
|
|
1488
|
+
var t = r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, e).replace(/[_\s]/g, "."), n = r.default.getMacOSVersionName(t), h = { name: i.OS_MAP.MacOS, version: t };
|
|
1489
|
+
return n && (h.versionName = n), h;
|
|
1490
|
+
} }, { test: [/(ipod|iphone|ipad)/i], describe: function(e) {
|
|
1491
|
+
var t = r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, e).replace(/[_\s]/g, ".");
|
|
1492
|
+
return { name: i.OS_MAP.iOS, version: t };
|
|
1493
|
+
} }, { test: function(e) {
|
|
1494
|
+
var t = !e.test(/like android/i), n = e.test(/android/i);
|
|
1495
|
+
return t && n;
|
|
1496
|
+
}, describe: function(e) {
|
|
1497
|
+
var t = r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, e), n = r.default.getAndroidVersionName(t), h = { name: i.OS_MAP.Android, version: t };
|
|
1498
|
+
return n && (h.versionName = n), h;
|
|
1499
|
+
} }, { test: [/(web|hpw)[o0]s/i], describe: function(e) {
|
|
1500
|
+
var t = r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, e), n = { name: i.OS_MAP.WebOS };
|
|
1501
|
+
return t && t.length && (n.version = t), n;
|
|
1502
|
+
} }, { test: [/blackberry|\bbb\d+/i, /rim\stablet/i], describe: function(e) {
|
|
1503
|
+
var t = r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, e) || r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, e) || r.default.getFirstMatch(/\bbb(\d+)/i, e);
|
|
1504
|
+
return { name: i.OS_MAP.BlackBerry, version: t };
|
|
1505
|
+
} }, { test: [/bada/i], describe: function(e) {
|
|
1506
|
+
var t = r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, e);
|
|
1507
|
+
return { name: i.OS_MAP.Bada, version: t };
|
|
1508
|
+
} }, { test: [/tizen/i], describe: function(e) {
|
|
1509
|
+
var t = r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, e);
|
|
1510
|
+
return { name: i.OS_MAP.Tizen, version: t };
|
|
1511
|
+
} }, { test: [/linux/i], describe: function() {
|
|
1512
|
+
return { name: i.OS_MAP.Linux };
|
|
1513
|
+
} }, { test: [/CrOS/], describe: function() {
|
|
1514
|
+
return { name: i.OS_MAP.ChromeOS };
|
|
1515
|
+
} }, { test: [/PlayStation 4/], describe: function(e) {
|
|
1516
|
+
var t = r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, e);
|
|
1517
|
+
return { name: i.OS_MAP.PlayStation4, version: t };
|
|
1518
|
+
} }];
|
|
1519
|
+
s.default = v, o.exports = s.default;
|
|
1520
|
+
}, 94: function(o, s, m) {
|
|
1521
|
+
s.__esModule = !0, s.default = void 0;
|
|
1522
|
+
var a, r = (a = m(17)) && a.__esModule ? a : { default: a }, i = m(18), v = [{ test: [/googlebot/i], describe: function() {
|
|
1523
|
+
return { type: "bot", vendor: "Google" };
|
|
1524
|
+
} }, { test: [/huawei/i], describe: function(e) {
|
|
1525
|
+
var t = r.default.getFirstMatch(/(can-l01)/i, e) && "Nova", n = { type: i.PLATFORMS_MAP.mobile, vendor: "Huawei" };
|
|
1526
|
+
return t && (n.model = t), n;
|
|
1527
|
+
} }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: function() {
|
|
1528
|
+
return { type: i.PLATFORMS_MAP.tablet, vendor: "Nexus" };
|
|
1529
|
+
} }, { test: [/ipad/i], describe: function() {
|
|
1530
|
+
return { type: i.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" };
|
|
1531
|
+
} }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: function() {
|
|
1532
|
+
return { type: i.PLATFORMS_MAP.tablet, vendor: "Apple", model: "iPad" };
|
|
1533
|
+
} }, { test: [/kftt build/i], describe: function() {
|
|
1534
|
+
return { type: i.PLATFORMS_MAP.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" };
|
|
1535
|
+
} }, { test: [/silk/i], describe: function() {
|
|
1536
|
+
return { type: i.PLATFORMS_MAP.tablet, vendor: "Amazon" };
|
|
1537
|
+
} }, { test: [/tablet(?! pc)/i], describe: function() {
|
|
1538
|
+
return { type: i.PLATFORMS_MAP.tablet };
|
|
1539
|
+
} }, { test: function(e) {
|
|
1540
|
+
var t = e.test(/ipod|iphone/i), n = e.test(/like (ipod|iphone)/i);
|
|
1541
|
+
return t && !n;
|
|
1542
|
+
}, describe: function(e) {
|
|
1543
|
+
var t = r.default.getFirstMatch(/(ipod|iphone)/i, e);
|
|
1544
|
+
return { type: i.PLATFORMS_MAP.mobile, vendor: "Apple", model: t };
|
|
1545
|
+
} }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: function() {
|
|
1546
|
+
return { type: i.PLATFORMS_MAP.mobile, vendor: "Nexus" };
|
|
1547
|
+
} }, { test: [/[^-]mobi/i], describe: function() {
|
|
1548
|
+
return { type: i.PLATFORMS_MAP.mobile };
|
|
1549
|
+
} }, { test: function(e) {
|
|
1550
|
+
return e.getBrowserName(!0) === "blackberry";
|
|
1551
|
+
}, describe: function() {
|
|
1552
|
+
return { type: i.PLATFORMS_MAP.mobile, vendor: "BlackBerry" };
|
|
1553
|
+
} }, { test: function(e) {
|
|
1554
|
+
return e.getBrowserName(!0) === "bada";
|
|
1555
|
+
}, describe: function() {
|
|
1556
|
+
return { type: i.PLATFORMS_MAP.mobile };
|
|
1557
|
+
} }, { test: function(e) {
|
|
1558
|
+
return e.getBrowserName() === "windows phone";
|
|
1559
|
+
}, describe: function() {
|
|
1560
|
+
return { type: i.PLATFORMS_MAP.mobile, vendor: "Microsoft" };
|
|
1561
|
+
} }, { test: function(e) {
|
|
1562
|
+
var t = Number(String(e.getOSVersion()).split(".")[0]);
|
|
1563
|
+
return e.getOSName(!0) === "android" && t >= 3;
|
|
1564
|
+
}, describe: function() {
|
|
1565
|
+
return { type: i.PLATFORMS_MAP.tablet };
|
|
1566
|
+
} }, { test: function(e) {
|
|
1567
|
+
return e.getOSName(!0) === "android";
|
|
1568
|
+
}, describe: function() {
|
|
1569
|
+
return { type: i.PLATFORMS_MAP.mobile };
|
|
1570
|
+
} }, { test: function(e) {
|
|
1571
|
+
return e.getOSName(!0) === "macos";
|
|
1572
|
+
}, describe: function() {
|
|
1573
|
+
return { type: i.PLATFORMS_MAP.desktop, vendor: "Apple" };
|
|
1574
|
+
} }, { test: function(e) {
|
|
1575
|
+
return e.getOSName(!0) === "windows";
|
|
1576
|
+
}, describe: function() {
|
|
1577
|
+
return { type: i.PLATFORMS_MAP.desktop };
|
|
1578
|
+
} }, { test: function(e) {
|
|
1579
|
+
return e.getOSName(!0) === "linux";
|
|
1580
|
+
}, describe: function() {
|
|
1581
|
+
return { type: i.PLATFORMS_MAP.desktop };
|
|
1582
|
+
} }, { test: function(e) {
|
|
1583
|
+
return e.getOSName(!0) === "playstation 4";
|
|
1584
|
+
}, describe: function() {
|
|
1585
|
+
return { type: i.PLATFORMS_MAP.tv };
|
|
1586
|
+
} }, { test: function(e) {
|
|
1587
|
+
return e.getOSName(!0) === "roku";
|
|
1588
|
+
}, describe: function() {
|
|
1589
|
+
return { type: i.PLATFORMS_MAP.tv };
|
|
1590
|
+
} }];
|
|
1591
|
+
s.default = v, o.exports = s.default;
|
|
1592
|
+
}, 95: function(o, s, m) {
|
|
1593
|
+
s.__esModule = !0, s.default = void 0;
|
|
1594
|
+
var a, r = (a = m(17)) && a.__esModule ? a : { default: a }, i = m(18), v = [{ test: function(e) {
|
|
1595
|
+
return e.getBrowserName(!0) === "microsoft edge";
|
|
1596
|
+
}, describe: function(e) {
|
|
1597
|
+
if (/\sedg\//i.test(e))
|
|
1598
|
+
return { name: i.ENGINE_MAP.Blink };
|
|
1599
|
+
var t = r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, e);
|
|
1600
|
+
return { name: i.ENGINE_MAP.EdgeHTML, version: t };
|
|
1601
|
+
} }, { test: [/trident/i], describe: function(e) {
|
|
1602
|
+
var t = { name: i.ENGINE_MAP.Trident }, n = r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, e);
|
|
1603
|
+
return n && (t.version = n), t;
|
|
1604
|
+
} }, { test: function(e) {
|
|
1605
|
+
return e.test(/presto/i);
|
|
1606
|
+
}, describe: function(e) {
|
|
1607
|
+
var t = { name: i.ENGINE_MAP.Presto }, n = r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, e);
|
|
1608
|
+
return n && (t.version = n), t;
|
|
1609
|
+
} }, { test: function(e) {
|
|
1610
|
+
var t = e.test(/gecko/i), n = e.test(/like gecko/i);
|
|
1611
|
+
return t && !n;
|
|
1612
|
+
}, describe: function(e) {
|
|
1613
|
+
var t = { name: i.ENGINE_MAP.Gecko }, n = r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, e);
|
|
1614
|
+
return n && (t.version = n), t;
|
|
1615
|
+
} }, { test: [/(apple)?webkit\/537\.36/i], describe: function() {
|
|
1616
|
+
return { name: i.ENGINE_MAP.Blink };
|
|
1617
|
+
} }, { test: [/(apple)?webkit/i], describe: function(e) {
|
|
1618
|
+
var t = { name: i.ENGINE_MAP.WebKit }, n = r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, e);
|
|
1619
|
+
return n && (t.version = n), t;
|
|
1620
|
+
} }];
|
|
1621
|
+
s.default = v, o.exports = s.default;
|
|
1622
|
+
} });
|
|
1623
|
+
});
|
|
1624
|
+
})(ke);
|
|
1625
|
+
var Et = ke.exports;
|
|
1626
|
+
const Nt = /* @__PURE__ */ It(Et);
|
|
1627
|
+
{
|
|
1628
|
+
const d = Nt.getParser(window.navigator.userAgent), f = d.getResult();
|
|
1629
|
+
window.browser = {
|
|
1630
|
+
...f,
|
|
1631
|
+
// Misc infos
|
|
1632
|
+
name: f.browser.name,
|
|
1633
|
+
full_version: f.browser.version,
|
|
1634
|
+
// 74.3.45.564
|
|
1635
|
+
version: parseFloat((f.browser.version || "").split(".").slice(0, 2).join(".")),
|
|
1636
|
+
// 74.3.45.564 => 74.3
|
|
1637
|
+
[f.platform.type]: !0,
|
|
1638
|
+
// browser.{desktop|mobile|tablet}
|
|
1639
|
+
parser: d
|
|
1640
|
+
}, window.browser.os.version = parseFloat((browser.os.version || "").split(".").slice(0, 2).join(".")), browser.os.name === "Chrome OS" && (browser.mobile = !1, browser.tablet = !1, browser.desktop = !0, document.querySelector("body").setAttribute("data-mobile", !1), document.querySelector("body").setAttribute("data-tablet", !1)), browser.os.name === "macOS" && browser.desktop && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2 && (browser.mobile = !1, browser.tablet = !0, browser.desktop = !1, document.querySelector("body").setAttribute("data-mobile", !1), document.querySelector("body").setAttribute("data-tablet", !0), document.querySelector("body").setAttribute("data-platform", "ios"));
|
|
1641
|
+
}
|
|
1642
|
+
function Jt() {
|
|
1643
|
+
return typeof browser > "u" ? !1 : browser.mobile || browser.tablet;
|
|
1644
|
+
}
|
|
1645
|
+
export {
|
|
1646
|
+
Se as B,
|
|
1647
|
+
$e as D,
|
|
1648
|
+
Me as I,
|
|
1649
|
+
Gt as R,
|
|
1650
|
+
X as _,
|
|
1651
|
+
vt as a,
|
|
1652
|
+
Mt as b,
|
|
1653
|
+
Bt as c,
|
|
1654
|
+
Tt as d,
|
|
1655
|
+
_e as e,
|
|
1656
|
+
we as f,
|
|
1657
|
+
Zt as g,
|
|
1658
|
+
Kt as h,
|
|
1659
|
+
Jt as i,
|
|
1660
|
+
Ut as j,
|
|
1661
|
+
Ht as k,
|
|
1662
|
+
Qt as l,
|
|
1663
|
+
ge as u
|
|
1664
|
+
};
|