@getlupa/vue 0.0.1 → 0.0.3
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/lupaContainerStyle.css +1 -0
- package/dist/lupaContainerStyle.js +1 -0
- package/dist/lupaSearch.js +1122 -2251
- package/dist/lupaSearch.mjs +15 -1144
- package/dist/src/index.d.ts +4 -1
- package/dist/style.css +1 -1
- package/index.html +1 -1
- package/package.json +13 -9
- package/vite.config.ts +2 -2
- package/dist/lupaSearch.iife.js +0 -15899
- package/dist/lupaSearch.umd.js +0 -15900
package/dist/lupaSearch.mjs
CHANGED
|
@@ -37,7 +37,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
import
|
|
40
|
+
import { toRaw, isRef, isReactive, toRef, effectScope, ref, markRaw, hasInjectionContext, inject, getCurrentInstance, watch, reactive, nextTick, computed, unref, getCurrentScope, onScopeDispose, toRefs, defineComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, withDirectives, mergeProps, vModelText, toDisplayString, createCommentVNode, onMounted, onBeforeMount, Fragment, renderList, createBlock, toHandlers, resolveDynamicComponent, onBeforeUnmount, createVNode, createTextVNode, resolveComponent, withModifiers, vModelSelect, normalizeStyle, renderSlot, withCtx, h, provide, onUnmounted, cloneVNode } from "vue";
|
|
41
|
+
import VueSlider from "vue-slider-component";
|
|
41
42
|
var isVue2 = false;
|
|
42
43
|
function set(target, key, val) {
|
|
43
44
|
if (Array.isArray(target)) {
|
|
@@ -2723,7 +2724,6 @@ const useParamsStore = defineStore("params", () => {
|
|
|
2723
2724
|
facet
|
|
2724
2725
|
}) => {
|
|
2725
2726
|
var _a;
|
|
2726
|
-
console.log("sr", searchText);
|
|
2727
2727
|
if (!searchResultsLink.value || linksMatch(searchResultsLink.value, window.location.pathname)) {
|
|
2728
2728
|
const singleFacetParam = facet ? getFacetParam(facet.key, [facet.title]) : void 0;
|
|
2729
2729
|
const facetParam = singleFacetParam ? [
|
|
@@ -3201,7 +3201,6 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
3201
3201
|
historyStore.clear();
|
|
3202
3202
|
};
|
|
3203
3203
|
const goToResults = ({ query }) => {
|
|
3204
|
-
console.log("go to results", query);
|
|
3205
3204
|
emit("go-to-results", { query });
|
|
3206
3205
|
};
|
|
3207
3206
|
const handleKeyDown = (e) => {
|
|
@@ -4366,7 +4365,6 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
4366
4365
|
suggestedValue.value = defaultSuggestedValue;
|
|
4367
4366
|
trackSearchQuery(value);
|
|
4368
4367
|
if (props.isSearchContainer) {
|
|
4369
|
-
console.log("goint to results");
|
|
4370
4368
|
goToResultsDebounced({
|
|
4371
4369
|
searchText: value
|
|
4372
4370
|
});
|
|
@@ -4817,7 +4815,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4817
4815
|
return openBlock(), createElementBlock("span", { key: index }, [
|
|
4818
4816
|
createElementVNode("span", {
|
|
4819
4817
|
class: normalizeClass(getStyle(label))
|
|
4820
|
-
}, toDisplayString(insertValue(label)), 3)
|
|
4818
|
+
}, toDisplayString(insertValue(label)) + " ", 3)
|
|
4821
4819
|
]);
|
|
4822
4820
|
}), 128))
|
|
4823
4821
|
])) : createCommentVNode("", true),
|
|
@@ -4829,7 +4827,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
4829
4827
|
class: "lupa-did-you-mean lupa-highlighted-search-text",
|
|
4830
4828
|
"data-cy": "did-you-mean-value",
|
|
4831
4829
|
onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
|
|
4832
|
-
}, toDisplayString(didYouMeanValue.value), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(label), 1))
|
|
4830
|
+
}, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(label) + " ", 1))
|
|
4833
4831
|
]);
|
|
4834
4832
|
}), 128))
|
|
4835
4833
|
])) : createCommentVNode("", true)
|
|
@@ -5354,1138 +5352,6 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
5354
5352
|
};
|
|
5355
5353
|
}
|
|
5356
5354
|
});
|
|
5357
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
5358
|
-
function getDefaultExportFromCjs(x) {
|
|
5359
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5360
|
-
}
|
|
5361
|
-
var vueSliderComponent_umd_min = { exports: {} };
|
|
5362
|
-
(function(module, exports) {
|
|
5363
|
-
(function(t, e) {
|
|
5364
|
-
module.exports = e(require$$0);
|
|
5365
|
-
})("undefined" !== typeof self ? self : commonjsGlobal, function(t) {
|
|
5366
|
-
return function() {
|
|
5367
|
-
var e = { 388: function(t2, e2) {
|
|
5368
|
-
var r2, n2, i2;
|
|
5369
|
-
(function(o, a) {
|
|
5370
|
-
n2 = [], r2 = a, i2 = "function" === typeof r2 ? r2.apply(e2, n2) : r2, void 0 === i2 || (t2.exports = i2);
|
|
5371
|
-
})("undefined" !== typeof self && self, function() {
|
|
5372
|
-
function t3() {
|
|
5373
|
-
var e3 = Object.getOwnPropertyDescriptor(document, "currentScript");
|
|
5374
|
-
if (!e3 && "currentScript" in document && document.currentScript)
|
|
5375
|
-
return document.currentScript;
|
|
5376
|
-
if (e3 && e3.get !== t3 && document.currentScript)
|
|
5377
|
-
return document.currentScript;
|
|
5378
|
-
try {
|
|
5379
|
-
throw new Error();
|
|
5380
|
-
} catch (f) {
|
|
5381
|
-
var r3, n3, i3, o = /.*at [^(]*\((.*):(.+):(.+)\)$/gi, a = /@([^@]*):(\d+):(\d+)\s*$/gi, s = o.exec(f.stack) || a.exec(f.stack), l = s && s[1] || false, u = s && s[2] || false, c = document.location.href.replace(document.location.hash, ""), d = document.getElementsByTagName("script");
|
|
5382
|
-
l === c && (r3 = document.documentElement.outerHTML, n3 = new RegExp("(?:[^\\n]+?\\n){0," + (u - 2) + "}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*", "i"), i3 = r3.replace(n3, "$1").trim());
|
|
5383
|
-
for (var h2 = 0; h2 < d.length; h2++) {
|
|
5384
|
-
if ("interactive" === d[h2].readyState)
|
|
5385
|
-
return d[h2];
|
|
5386
|
-
if (d[h2].src === l)
|
|
5387
|
-
return d[h2];
|
|
5388
|
-
if (l === c && d[h2].innerHTML && d[h2].innerHTML.trim() === i3)
|
|
5389
|
-
return d[h2];
|
|
5390
|
-
}
|
|
5391
|
-
return null;
|
|
5392
|
-
}
|
|
5393
|
-
}
|
|
5394
|
-
return t3;
|
|
5395
|
-
});
|
|
5396
|
-
}, 905: function(t2, e2, r2) {
|
|
5397
|
-
r2.r(e2);
|
|
5398
|
-
var n2 = r2(117), i2 = r2.n(n2), o = r2(488), a = r2.n(o), s = a()(i2());
|
|
5399
|
-
s.push([t2.id, ".vue-slider-dot{position:absolute;-webkit-transition:all 0s;transition:all 0s;z-index:5}.vue-slider-dot:focus{outline:none}.vue-slider-dot-tooltip{position:absolute;visibility:hidden}.vue-slider-dot-hover:hover .vue-slider-dot-tooltip,.vue-slider-dot-tooltip-show{visibility:visible}.vue-slider-dot-tooltip-top{top:-10px;left:50%;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.vue-slider-dot-tooltip-bottom{bottom:-10px;left:50%;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.vue-slider-dot-tooltip-left{left:-10px;top:50%;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.vue-slider-dot-tooltip-right{right:-10px;top:50%;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}", ""]), e2["default"] = s;
|
|
5400
|
-
}, 121: function(t2, e2, r2) {
|
|
5401
|
-
r2.r(e2);
|
|
5402
|
-
var n2 = r2(117), i2 = r2.n(n2), o = r2(488), a = r2.n(o), s = a()(i2());
|
|
5403
|
-
s.push([t2.id, ".vue-slider-marks{position:relative;width:100%;height:100%}.vue-slider-mark{position:absolute;z-index:1}.vue-slider-ltr .vue-slider-mark,.vue-slider-rtl .vue-slider-mark{width:0;height:100%;top:50%}.vue-slider-ltr .vue-slider-mark-step,.vue-slider-rtl .vue-slider-mark-step{top:0}.vue-slider-ltr .vue-slider-mark-label,.vue-slider-rtl .vue-slider-mark-label{top:100%;margin-top:10px}.vue-slider-ltr .vue-slider-mark{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vue-slider-ltr .vue-slider-mark-step{left:0}.vue-slider-ltr .vue-slider-mark-label{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.vue-slider-rtl .vue-slider-mark{-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%)}.vue-slider-rtl .vue-slider-mark-step{right:0}.vue-slider-rtl .vue-slider-mark-label{right:50%;-webkit-transform:translateX(50%);transform:translateX(50%)}.vue-slider-btt .vue-slider-mark,.vue-slider-ttb .vue-slider-mark{width:100%;height:0;left:50%}.vue-slider-btt .vue-slider-mark-step,.vue-slider-ttb .vue-slider-mark-step{left:0}.vue-slider-btt .vue-slider-mark-label,.vue-slider-ttb .vue-slider-mark-label{left:100%;margin-left:10px}.vue-slider-btt .vue-slider-mark{-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}.vue-slider-btt .vue-slider-mark-step{top:0}.vue-slider-btt .vue-slider-mark-label{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-ttb .vue-slider-mark{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vue-slider-ttb .vue-slider-mark-step{bottom:0}.vue-slider-ttb .vue-slider-mark-label{bottom:50%;-webkit-transform:translateY(50%);transform:translateY(50%)}.vue-slider-mark-label,.vue-slider-mark-step{position:absolute}", ""]), e2["default"] = s;
|
|
5404
|
-
}, 207: function(t2, e2, r2) {
|
|
5405
|
-
r2.r(e2);
|
|
5406
|
-
var n2 = r2(117), i2 = r2.n(n2), o = r2(488), a = r2.n(o), s = a()(i2());
|
|
5407
|
-
s.push([t2.id, ".vue-slider{position:relative;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;-webkit-tap-highlight-color:rgba(0,0,0,0)}.vue-slider-rail{position:relative;width:100%;height:100%;-webkit-transition-property:width,height,left,right,top,bottom;transition-property:width,height,left,right,top,bottom}.vue-slider-process{position:absolute;z-index:1}", ""]), e2["default"] = s;
|
|
5408
|
-
}, 488: function(t2) {
|
|
5409
|
-
t2.exports = function(t3) {
|
|
5410
|
-
var e2 = [];
|
|
5411
|
-
return e2.toString = function() {
|
|
5412
|
-
return this.map(function(e3) {
|
|
5413
|
-
var r2 = "", n2 = "undefined" !== typeof e3[5];
|
|
5414
|
-
return e3[4] && (r2 += "@supports (".concat(e3[4], ") {")), e3[2] && (r2 += "@media ".concat(e3[2], " {")), n2 && (r2 += "@layer".concat(e3[5].length > 0 ? " ".concat(e3[5]) : "", " {")), r2 += t3(e3), n2 && (r2 += "}"), e3[2] && (r2 += "}"), e3[4] && (r2 += "}"), r2;
|
|
5415
|
-
}).join("");
|
|
5416
|
-
}, e2.i = function(t4, r2, n2, i2, o) {
|
|
5417
|
-
"string" === typeof t4 && (t4 = [[null, t4, void 0]]);
|
|
5418
|
-
var a = {};
|
|
5419
|
-
if (n2)
|
|
5420
|
-
for (var s = 0; s < this.length; s++) {
|
|
5421
|
-
var l = this[s][0];
|
|
5422
|
-
null != l && (a[l] = true);
|
|
5423
|
-
}
|
|
5424
|
-
for (var u = 0; u < t4.length; u++) {
|
|
5425
|
-
var c = [].concat(t4[u]);
|
|
5426
|
-
n2 && a[c[0]] || ("undefined" !== typeof o && ("undefined" === typeof c[5] || (c[1] = "@layer".concat(c[5].length > 0 ? " ".concat(c[5]) : "", " {").concat(c[1], "}")), c[5] = o), r2 && (c[2] ? (c[1] = "@media ".concat(c[2], " {").concat(c[1], "}"), c[2] = r2) : c[2] = r2), i2 && (c[4] ? (c[1] = "@supports (".concat(c[4], ") {").concat(c[1], "}"), c[4] = i2) : c[4] = "".concat(i2)), e2.push(c));
|
|
5427
|
-
}
|
|
5428
|
-
}, e2;
|
|
5429
|
-
};
|
|
5430
|
-
}, 117: function(t2) {
|
|
5431
|
-
t2.exports = function(t3) {
|
|
5432
|
-
return t3[1];
|
|
5433
|
-
};
|
|
5434
|
-
}, 831: function(t2, e2) {
|
|
5435
|
-
e2.Z = (t3, e3) => {
|
|
5436
|
-
const r2 = t3.__vccOpts || t3;
|
|
5437
|
-
for (const [n2, i2] of e3)
|
|
5438
|
-
r2[n2] = i2;
|
|
5439
|
-
return r2;
|
|
5440
|
-
};
|
|
5441
|
-
}, 466: function(t2, e2, r2) {
|
|
5442
|
-
var n2 = r2(905);
|
|
5443
|
-
n2.__esModule && (n2 = n2.default), "string" === typeof n2 && (n2 = [[t2.id, n2, ""]]), n2.locals && (t2.exports = n2.locals);
|
|
5444
|
-
var i2 = r2(959).Z;
|
|
5445
|
-
i2("50bc1720", n2, true, { sourceMap: false, shadowMode: false });
|
|
5446
|
-
}, 18: function(t2, e2, r2) {
|
|
5447
|
-
var n2 = r2(121);
|
|
5448
|
-
n2.__esModule && (n2 = n2.default), "string" === typeof n2 && (n2 = [[t2.id, n2, ""]]), n2.locals && (t2.exports = n2.locals);
|
|
5449
|
-
var i2 = r2(959).Z;
|
|
5450
|
-
i2("10aa5f36", n2, true, { sourceMap: false, shadowMode: false });
|
|
5451
|
-
}, 631: function(t2, e2, r2) {
|
|
5452
|
-
var n2 = r2(207);
|
|
5453
|
-
n2.__esModule && (n2 = n2.default), "string" === typeof n2 && (n2 = [[t2.id, n2, ""]]), n2.locals && (t2.exports = n2.locals);
|
|
5454
|
-
var i2 = r2(959).Z;
|
|
5455
|
-
i2("1772934e", n2, true, { sourceMap: false, shadowMode: false });
|
|
5456
|
-
}, 959: function(t2, e2, r2) {
|
|
5457
|
-
function n2(t3, e3) {
|
|
5458
|
-
for (var r3 = [], n3 = {}, i3 = 0; i3 < e3.length; i3++) {
|
|
5459
|
-
var o2 = e3[i3], a2 = o2[0], s2 = o2[1], l2 = o2[2], u2 = o2[3], c2 = { id: t3 + ":" + i3, css: s2, media: l2, sourceMap: u2 };
|
|
5460
|
-
n3[a2] ? n3[a2].parts.push(c2) : r3.push(n3[a2] = { id: a2, parts: [c2] });
|
|
5461
|
-
}
|
|
5462
|
-
return r3;
|
|
5463
|
-
}
|
|
5464
|
-
r2.d(e2, { Z: function() {
|
|
5465
|
-
return p;
|
|
5466
|
-
} });
|
|
5467
|
-
var i2 = "undefined" !== typeof document;
|
|
5468
|
-
if ("undefined" !== typeof DEBUG && DEBUG && !i2)
|
|
5469
|
-
throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");
|
|
5470
|
-
var o = {}, a = i2 && (document.head || document.getElementsByTagName("head")[0]), s = null, l = 0, u = false, c = function() {
|
|
5471
|
-
}, d = null, h2 = "data-vue-ssr-id", f = "undefined" !== typeof navigator && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase());
|
|
5472
|
-
function p(t3, e3, r3, i3) {
|
|
5473
|
-
u = r3, d = i3 || {};
|
|
5474
|
-
var a2 = n2(t3, e3);
|
|
5475
|
-
return m(a2), function(e4) {
|
|
5476
|
-
for (var r4 = [], i4 = 0; i4 < a2.length; i4++) {
|
|
5477
|
-
var s2 = a2[i4], l2 = o[s2.id];
|
|
5478
|
-
l2.refs--, r4.push(l2);
|
|
5479
|
-
}
|
|
5480
|
-
e4 ? (a2 = n2(t3, e4), m(a2)) : a2 = [];
|
|
5481
|
-
for (i4 = 0; i4 < r4.length; i4++) {
|
|
5482
|
-
l2 = r4[i4];
|
|
5483
|
-
if (0 === l2.refs) {
|
|
5484
|
-
for (var u2 = 0; u2 < l2.parts.length; u2++)
|
|
5485
|
-
l2.parts[u2]();
|
|
5486
|
-
delete o[l2.id];
|
|
5487
|
-
}
|
|
5488
|
-
}
|
|
5489
|
-
};
|
|
5490
|
-
}
|
|
5491
|
-
function m(t3) {
|
|
5492
|
-
for (var e3 = 0; e3 < t3.length; e3++) {
|
|
5493
|
-
var r3 = t3[e3], n3 = o[r3.id];
|
|
5494
|
-
if (n3) {
|
|
5495
|
-
n3.refs++;
|
|
5496
|
-
for (var i3 = 0; i3 < n3.parts.length; i3++)
|
|
5497
|
-
n3.parts[i3](r3.parts[i3]);
|
|
5498
|
-
for (; i3 < r3.parts.length; i3++)
|
|
5499
|
-
n3.parts.push(y(r3.parts[i3]));
|
|
5500
|
-
n3.parts.length > r3.parts.length && (n3.parts.length = r3.parts.length);
|
|
5501
|
-
} else {
|
|
5502
|
-
var a2 = [];
|
|
5503
|
-
for (i3 = 0; i3 < r3.parts.length; i3++)
|
|
5504
|
-
a2.push(y(r3.parts[i3]));
|
|
5505
|
-
o[r3.id] = { id: r3.id, refs: 1, parts: a2 };
|
|
5506
|
-
}
|
|
5507
|
-
}
|
|
5508
|
-
}
|
|
5509
|
-
function v() {
|
|
5510
|
-
var t3 = document.createElement("style");
|
|
5511
|
-
return t3.type = "text/css", a.appendChild(t3), t3;
|
|
5512
|
-
}
|
|
5513
|
-
function y(t3) {
|
|
5514
|
-
var e3, r3, n3 = document.querySelector("style[" + h2 + '~="' + t3.id + '"]');
|
|
5515
|
-
if (n3) {
|
|
5516
|
-
if (u)
|
|
5517
|
-
return c;
|
|
5518
|
-
n3.parentNode.removeChild(n3);
|
|
5519
|
-
}
|
|
5520
|
-
if (f) {
|
|
5521
|
-
var i3 = l++;
|
|
5522
|
-
n3 = s || (s = v()), e3 = g.bind(null, n3, i3, false), r3 = g.bind(null, n3, i3, true);
|
|
5523
|
-
} else
|
|
5524
|
-
n3 = v(), e3 = k.bind(null, n3), r3 = function() {
|
|
5525
|
-
n3.parentNode.removeChild(n3);
|
|
5526
|
-
};
|
|
5527
|
-
return e3(t3), function(n4) {
|
|
5528
|
-
if (n4) {
|
|
5529
|
-
if (n4.css === t3.css && n4.media === t3.media && n4.sourceMap === t3.sourceMap)
|
|
5530
|
-
return;
|
|
5531
|
-
e3(t3 = n4);
|
|
5532
|
-
} else
|
|
5533
|
-
r3();
|
|
5534
|
-
};
|
|
5535
|
-
}
|
|
5536
|
-
var b = function() {
|
|
5537
|
-
var t3 = [];
|
|
5538
|
-
return function(e3, r3) {
|
|
5539
|
-
return t3[e3] = r3, t3.filter(Boolean).join("\n");
|
|
5540
|
-
};
|
|
5541
|
-
}();
|
|
5542
|
-
function g(t3, e3, r3, n3) {
|
|
5543
|
-
var i3 = r3 ? "" : n3.css;
|
|
5544
|
-
if (t3.styleSheet)
|
|
5545
|
-
t3.styleSheet.cssText = b(e3, i3);
|
|
5546
|
-
else {
|
|
5547
|
-
var o2 = document.createTextNode(i3), a2 = t3.childNodes;
|
|
5548
|
-
a2[e3] && t3.removeChild(a2[e3]), a2.length ? t3.insertBefore(o2, a2[e3]) : t3.appendChild(o2);
|
|
5549
|
-
}
|
|
5550
|
-
}
|
|
5551
|
-
function k(t3, e3) {
|
|
5552
|
-
var r3 = e3.css, n3 = e3.media, i3 = e3.sourceMap;
|
|
5553
|
-
if (n3 && t3.setAttribute("media", n3), d.ssrId && t3.setAttribute(h2, e3.id), i3 && (r3 += "\n/*# sourceURL=" + i3.sources[0] + " */", r3 += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(i3)))) + " */"), t3.styleSheet)
|
|
5554
|
-
t3.styleSheet.cssText = r3;
|
|
5555
|
-
else {
|
|
5556
|
-
while (t3.firstChild)
|
|
5557
|
-
t3.removeChild(t3.firstChild);
|
|
5558
|
-
t3.appendChild(document.createTextNode(r3));
|
|
5559
|
-
}
|
|
5560
|
-
}
|
|
5561
|
-
}, 927: function(e2) {
|
|
5562
|
-
e2.exports = t;
|
|
5563
|
-
} }, r = {};
|
|
5564
|
-
function n(t2) {
|
|
5565
|
-
var i2 = r[t2];
|
|
5566
|
-
if (void 0 !== i2)
|
|
5567
|
-
return i2.exports;
|
|
5568
|
-
var o = r[t2] = { id: t2, exports: {} };
|
|
5569
|
-
return e[t2].call(o.exports, o, o.exports, n), o.exports;
|
|
5570
|
-
}
|
|
5571
|
-
!function() {
|
|
5572
|
-
n.n = function(t2) {
|
|
5573
|
-
var e2 = t2 && t2.__esModule ? function() {
|
|
5574
|
-
return t2["default"];
|
|
5575
|
-
} : function() {
|
|
5576
|
-
return t2;
|
|
5577
|
-
};
|
|
5578
|
-
return n.d(e2, { a: e2 }), e2;
|
|
5579
|
-
};
|
|
5580
|
-
}(), function() {
|
|
5581
|
-
n.d = function(t2, e2) {
|
|
5582
|
-
for (var r2 in e2)
|
|
5583
|
-
n.o(e2, r2) && !n.o(t2, r2) && Object.defineProperty(t2, r2, { enumerable: true, get: e2[r2] });
|
|
5584
|
-
};
|
|
5585
|
-
}(), function() {
|
|
5586
|
-
n.o = function(t2, e2) {
|
|
5587
|
-
return Object.prototype.hasOwnProperty.call(t2, e2);
|
|
5588
|
-
};
|
|
5589
|
-
}(), function() {
|
|
5590
|
-
n.r = function(t2) {
|
|
5591
|
-
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
|
|
5592
|
-
};
|
|
5593
|
-
}(), function() {
|
|
5594
|
-
n.p = "";
|
|
5595
|
-
}();
|
|
5596
|
-
var i = {};
|
|
5597
|
-
return function() {
|
|
5598
|
-
if (n.d(i, { default: function() {
|
|
5599
|
-
return St;
|
|
5600
|
-
} }), "undefined" !== typeof window) {
|
|
5601
|
-
var t2 = window.document.currentScript, e2 = n(388);
|
|
5602
|
-
t2 = e2(), "currentScript" in document || Object.defineProperty(document, "currentScript", { get: e2 });
|
|
5603
|
-
var r2 = t2 && t2.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);
|
|
5604
|
-
r2 && (n.p = r2[1]);
|
|
5605
|
-
}
|
|
5606
|
-
var o = n(927);
|
|
5607
|
-
function a(t3, e3, r3) {
|
|
5608
|
-
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
5609
|
-
}
|
|
5610
|
-
var s = { key: 0, class: "vue-slider-marks" };
|
|
5611
|
-
function l(t3, e3, r3, n2, i2, l2) {
|
|
5612
|
-
var u2 = (0, o.resolveComponent)("vue-slider-mark"), c2 = (0, o.resolveComponent)("vue-slider-dot");
|
|
5613
|
-
return (0, o.openBlock)(), (0, o.createElementBlock)("div", (0, o.mergeProps)({ ref: "container", class: t3.containerClasses, style: t3.containerStyles, onClick: e3[2] || (e3[2] = function() {
|
|
5614
|
-
return t3.clickHandle && t3.clickHandle.apply(t3, arguments);
|
|
5615
|
-
}), onTouchstartPassive: e3[3] || (e3[3] = function() {
|
|
5616
|
-
return t3.dragStartOnProcess && t3.dragStartOnProcess.apply(t3, arguments);
|
|
5617
|
-
}), onMousedownPassive: e3[4] || (e3[4] = function() {
|
|
5618
|
-
return t3.dragStartOnProcess && t3.dragStartOnProcess.apply(t3, arguments);
|
|
5619
|
-
}) }, t3.$attrs), [(0, o.createElementVNode)("div", { class: "vue-slider-rail", style: (0, o.normalizeStyle)(t3.railStyle) }, [((0, o.openBlock)(true), (0, o.createElementBlock)(o.Fragment, null, (0, o.renderList)(t3.processArray, function(e4, r4) {
|
|
5620
|
-
return (0, o.renderSlot)(t3.$slots, "process", (0, o.normalizeProps)((0, o.guardReactiveProps)(e4)), function() {
|
|
5621
|
-
return [((0, o.openBlock)(), (0, o.createElementBlock)("div", { class: "vue-slider-process", key: "process-".concat(r4), style: (0, o.normalizeStyle)(e4.style) }, null, 4))];
|
|
5622
|
-
});
|
|
5623
|
-
}), 256)), t3.sliderMarks && t3.control ? ((0, o.openBlock)(), (0, o.createElementBlock)("div", s, [((0, o.openBlock)(true), (0, o.createElementBlock)(o.Fragment, null, (0, o.renderList)(t3.control.markList, function(r4, n3) {
|
|
5624
|
-
return (0, o.renderSlot)(t3.$slots, "mark", (0, o.normalizeProps)((0, o.guardReactiveProps)(r4)), function() {
|
|
5625
|
-
var i3;
|
|
5626
|
-
return [((0, o.openBlock)(), (0, o.createBlock)(u2, { key: "mark-".concat(n3), mark: r4, hideLabel: t3.hideLabel, style: (0, o.normalizeStyle)((i3 = {}, a(i3, t3.isHorizontal ? "height" : "width", "100%"), a(i3, t3.isHorizontal ? "width" : "height", t3.tailSize), a(i3, t3.mainDirection, "".concat(r4.pos, "%")), i3)), stepStyle: t3.stepStyle, stepActiveStyle: t3.stepActiveStyle, labelStyle: t3.labelStyle, labelActiveStyle: t3.labelActiveStyle, onPressLabel: e3[0] || (e3[0] = function(e4) {
|
|
5627
|
-
return t3.clickable && t3.setValueByPos(e4);
|
|
5628
|
-
}) }, { step: (0, o.withCtx)(function() {
|
|
5629
|
-
return [(0, o.renderSlot)(t3.$slots, "step", (0, o.normalizeProps)((0, o.guardReactiveProps)(r4)))];
|
|
5630
|
-
}), label: (0, o.withCtx)(function() {
|
|
5631
|
-
return [(0, o.renderSlot)(t3.$slots, "label", (0, o.normalizeProps)((0, o.guardReactiveProps)(r4)))];
|
|
5632
|
-
}), _: 2 }, 1032, ["mark", "hideLabel", "style", "stepStyle", "stepActiveStyle", "labelStyle", "labelActiveStyle"]))];
|
|
5633
|
-
});
|
|
5634
|
-
}), 256))])) : (0, o.createCommentVNode)("", true), ((0, o.openBlock)(true), (0, o.createElementBlock)(o.Fragment, null, (0, o.renderList)(t3.dots, function(r4, n3) {
|
|
5635
|
-
var i3;
|
|
5636
|
-
return (0, o.openBlock)(), (0, o.createBlock)(c2, (0, o.mergeProps)({ ref_for: true, ref: "dot-".concat(n3), key: "dot-".concat(n3), value: r4.value, disabled: r4.disabled, focus: r4.focus, "dot-style": [r4.style, r4.disabled ? r4.disabledStyle : null, r4.focus ? r4.focusStyle : null], tooltip: r4.tooltip || t3.tooltip, "tooltip-style": [t3.tooltipStyle, r4.tooltipStyle, r4.disabled ? r4.tooltipDisabledStyle : null, r4.focus ? r4.tooltipFocusStyle : null], "tooltip-formatter": Array.isArray(t3.sliderTooltipFormatter) ? t3.sliderTooltipFormatter[n3] : t3.sliderTooltipFormatter, "tooltip-placement": t3.tooltipDirections[n3], style: [t3.dotBaseStyle, (i3 = {}, a(i3, t3.mainDirection, "".concat(r4.pos, "%")), a(i3, "transition", "".concat(t3.mainDirection, " ").concat(t3.animateTime, "s")), i3)], onDragStart: function() {
|
|
5637
|
-
return t3.dragStart(n3);
|
|
5638
|
-
}, role: "slider", "aria-valuenow": r4.value, "aria-valuemin": t3.min, "aria-valuemax": t3.max, "aria-orientation": t3.isHorizontal ? "horizontal" : "vertical", tabindex: "0", onFocus: function() {
|
|
5639
|
-
return t3.focus(r4, n3);
|
|
5640
|
-
}, onBlur: e3[1] || (e3[1] = function() {
|
|
5641
|
-
return t3.blur();
|
|
5642
|
-
}) }, t3.dotAttrs), { dot: (0, o.withCtx)(function() {
|
|
5643
|
-
return [(0, o.renderSlot)(t3.$slots, "dot", (0, o.normalizeProps)((0, o.guardReactiveProps)(r4)))];
|
|
5644
|
-
}), tooltip: (0, o.withCtx)(function() {
|
|
5645
|
-
return [(0, o.renderSlot)(t3.$slots, "tooltip", (0, o.normalizeProps)((0, o.guardReactiveProps)(r4)))];
|
|
5646
|
-
}), _: 2 }, 1040, ["value", "disabled", "focus", "dot-style", "tooltip", "tooltip-style", "tooltip-formatter", "tooltip-placement", "style", "onDragStart", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-orientation", "onFocus"]);
|
|
5647
|
-
}), 128))], 4), (0, o.renderSlot)(t3.$slots, "default", { value: t3.getValue() })], 16);
|
|
5648
|
-
}
|
|
5649
|
-
var u = ["aria-valuetext"], c = { class: "vue-slider-dot-tooltip-text" };
|
|
5650
|
-
function d(t3, e3, r3, n2, i2, a2) {
|
|
5651
|
-
var s2;
|
|
5652
|
-
return (0, o.openBlock)(), (0, o.createElementBlock)("div", { ref: "dot", class: (0, o.normalizeClass)(t3.dotClasses), "aria-valuetext": null === (s2 = t3.tooltipValue) || void 0 === s2 ? void 0 : s2.toString(), onMousedownPassive: e3[0] || (e3[0] = function() {
|
|
5653
|
-
return t3.dragStart && t3.dragStart.apply(t3, arguments);
|
|
5654
|
-
}), onTouchstartPassive: e3[1] || (e3[1] = function() {
|
|
5655
|
-
return t3.dragStart && t3.dragStart.apply(t3, arguments);
|
|
5656
|
-
}) }, [(0, o.renderSlot)(t3.$slots, "dot", {}, function() {
|
|
5657
|
-
return [(0, o.createElementVNode)("div", { class: (0, o.normalizeClass)(t3.handleClasses), style: (0, o.normalizeStyle)(t3.dotStyle) }, null, 6)];
|
|
5658
|
-
}), "none" !== t3.tooltip ? ((0, o.openBlock)(), (0, o.createElementBlock)("div", { key: 0, class: (0, o.normalizeClass)(t3.tooltipClasses) }, [(0, o.renderSlot)(t3.$slots, "tooltip", {}, function() {
|
|
5659
|
-
return [(0, o.createElementVNode)("div", { class: (0, o.normalizeClass)(t3.tooltipInnerClasses), style: (0, o.normalizeStyle)(t3.tooltipStyle) }, [(0, o.createElementVNode)("span", c, (0, o.toDisplayString)(t3.tooltipValue), 1)], 6)];
|
|
5660
|
-
})], 2)) : (0, o.createCommentVNode)("", true)], 42, u);
|
|
5661
|
-
}
|
|
5662
|
-
n(466);
|
|
5663
|
-
var h2 = (0, o.defineComponent)({ name: "VueSliderDot", emits: ["drag-start"], props: { value: { type: [String, Number], default: 0 }, tooltip: { type: String, required: true }, tooltipPlacement: { type: String, validator: function(t3) {
|
|
5664
|
-
return ["top", "right", "bottom", "left"].indexOf(t3) > -1;
|
|
5665
|
-
}, required: true }, tooltipFormatter: { type: [String, Function] }, focus: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, dotStyle: { type: Object }, tooltipStyle: { type: Object } }, computed: { dotClasses: function() {
|
|
5666
|
-
return ["vue-slider-dot", { "vue-slider-dot-hover": "hover" === this.tooltip || "active" === this.tooltip, "vue-slider-dot-disabled": this.disabled, "vue-slider-dot-focus": this.focus }];
|
|
5667
|
-
}, handleClasses: function() {
|
|
5668
|
-
return ["vue-slider-dot-handle", { "vue-slider-dot-handle-disabled": this.disabled, "vue-slider-dot-handle-focus": this.focus }];
|
|
5669
|
-
}, tooltipClasses: function() {
|
|
5670
|
-
return ["vue-slider-dot-tooltip", ["vue-slider-dot-tooltip-".concat(this.tooltipPlacement)], { "vue-slider-dot-tooltip-show": this.showTooltip }];
|
|
5671
|
-
}, tooltipInnerClasses: function() {
|
|
5672
|
-
return ["vue-slider-dot-tooltip-inner", ["vue-slider-dot-tooltip-inner-".concat(this.tooltipPlacement)], { "vue-slider-dot-tooltip-inner-disabled": this.disabled, "vue-slider-dot-tooltip-inner-focus": this.focus }];
|
|
5673
|
-
}, showTooltip: function() {
|
|
5674
|
-
switch (this.tooltip) {
|
|
5675
|
-
case "always":
|
|
5676
|
-
return true;
|
|
5677
|
-
case "none":
|
|
5678
|
-
return false;
|
|
5679
|
-
case "focus":
|
|
5680
|
-
case "active":
|
|
5681
|
-
return !!this.focus;
|
|
5682
|
-
default:
|
|
5683
|
-
return false;
|
|
5684
|
-
}
|
|
5685
|
-
}, tooltipValue: function() {
|
|
5686
|
-
return this.tooltipFormatter ? "string" === typeof this.tooltipFormatter ? this.tooltipFormatter.replace(/\{value\}/, String(this.value)) : this.tooltipFormatter(this.value) : this.value;
|
|
5687
|
-
} }, methods: { dragStart: function() {
|
|
5688
|
-
if (this.disabled)
|
|
5689
|
-
return false;
|
|
5690
|
-
this.$emit("drag-start");
|
|
5691
|
-
} } }), f = n(831);
|
|
5692
|
-
const p = (0, f.Z)(h2, [["render", d]]);
|
|
5693
|
-
var m = p;
|
|
5694
|
-
function v(t3, e3, r3, n2, i2, a2) {
|
|
5695
|
-
return (0, o.openBlock)(), (0, o.createElementBlock)("div", { class: (0, o.normalizeClass)(t3.marksClasses) }, [(0, o.renderSlot)(t3.$slots, "step", {}, function() {
|
|
5696
|
-
return [(0, o.createElementVNode)("div", { class: (0, o.normalizeClass)(t3.stepClasses), style: (0, o.normalizeStyle)([t3.stepStyle, t3.mark.style || {}, t3.mark.active && t3.stepActiveStyle ? t3.stepActiveStyle : {}, t3.mark.active && t3.mark.activeStyle ? t3.mark.activeStyle : {}]) }, null, 6)];
|
|
5697
|
-
}), t3.hideLabel ? (0, o.createCommentVNode)("", true) : (0, o.renderSlot)(t3.$slots, "label", { key: 0 }, function() {
|
|
5698
|
-
return [(0, o.createElementVNode)("div", { class: (0, o.normalizeClass)(t3.labelClasses), style: (0, o.normalizeStyle)([t3.labelStyle, t3.mark.labelStyle || {}, t3.mark.active && t3.labelActiveStyle ? t3.labelActiveStyle : {}, t3.mark.active && t3.mark.labelActiveStyle ? t3.mark.labelActiveStyle : {}]), onClick: e3[0] || (e3[0] = function() {
|
|
5699
|
-
return t3.labelClickHandle && t3.labelClickHandle.apply(t3, arguments);
|
|
5700
|
-
}) }, (0, o.toDisplayString)(t3.mark.label), 7)];
|
|
5701
|
-
})], 2);
|
|
5702
|
-
}
|
|
5703
|
-
n(18);
|
|
5704
|
-
var y = (0, o.defineComponent)({ name: "VueSliderMark", emits: ["press-label"], props: { mark: { type: Object, required: true }, hideLabel: { type: Boolean }, stepStyle: { type: Object, default: function() {
|
|
5705
|
-
return {};
|
|
5706
|
-
} }, stepActiveStyle: { type: Object, default: function() {
|
|
5707
|
-
return {};
|
|
5708
|
-
} }, labelStyle: { type: Object, default: function() {
|
|
5709
|
-
return {};
|
|
5710
|
-
} }, labelActiveStyle: { type: Object, default: function() {
|
|
5711
|
-
return {};
|
|
5712
|
-
} } }, computed: { marksClasses: function() {
|
|
5713
|
-
return ["vue-slider-mark", { "vue-slider-mark-active": this.mark.active }];
|
|
5714
|
-
}, stepClasses: function() {
|
|
5715
|
-
return ["vue-slider-mark-step", { "vue-slider-mark-step-active": this.mark.active }];
|
|
5716
|
-
}, labelClasses: function() {
|
|
5717
|
-
return ["vue-slider-mark-label", { "vue-slider-mark-label-active": this.mark.active }];
|
|
5718
|
-
} }, methods: { labelClickHandle: function(t3) {
|
|
5719
|
-
t3.stopPropagation(), this.$emit("press-label", this.mark.pos);
|
|
5720
|
-
} } });
|
|
5721
|
-
const b = (0, f.Z)(y, [["render", v]]);
|
|
5722
|
-
var g, k = b, S = function(t3) {
|
|
5723
|
-
return "number" === typeof t3 ? "".concat(t3, "px") : t3;
|
|
5724
|
-
}, x = function(t3) {
|
|
5725
|
-
var e3 = document.documentElement, r3 = document.body, n2 = t3.getBoundingClientRect(), i2 = { y: n2.top + (window.pageYOffset || e3.scrollTop) - (e3.clientTop || r3.clientTop || 0), x: n2.left + (window.pageXOffset || e3.scrollLeft) - (e3.clientLeft || r3.clientLeft || 0) };
|
|
5726
|
-
return i2;
|
|
5727
|
-
}, P = function(t3, e3, r3) {
|
|
5728
|
-
var n2 = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1, i2 = "targetTouches" in t3 ? t3.targetTouches[0] : t3, o2 = x(e3), a2 = { x: i2.pageX - o2.x, y: i2.pageY - o2.y };
|
|
5729
|
-
return { x: r3 ? e3.offsetWidth * n2 - a2.x : a2.x, y: r3 ? e3.offsetHeight * n2 - a2.y : a2.y };
|
|
5730
|
-
};
|
|
5731
|
-
(function(t3) {
|
|
5732
|
-
t3[t3["PAGE_UP"] = 33] = "PAGE_UP", t3[t3["PAGE_DOWN"] = 34] = "PAGE_DOWN", t3[t3["END"] = 35] = "END", t3[t3["HOME"] = 36] = "HOME", t3[t3["LEFT"] = 37] = "LEFT", t3[t3["UP"] = 38] = "UP", t3[t3["RIGHT"] = 39] = "RIGHT", t3[t3["DOWN"] = 40] = "DOWN";
|
|
5733
|
-
})(g || (g = {}));
|
|
5734
|
-
var w = function(t3, e3) {
|
|
5735
|
-
if (e3.hook) {
|
|
5736
|
-
var r3 = e3.hook(t3);
|
|
5737
|
-
if ("function" === typeof r3)
|
|
5738
|
-
return r3;
|
|
5739
|
-
if (!r3)
|
|
5740
|
-
return null;
|
|
5741
|
-
}
|
|
5742
|
-
switch (t3.keyCode) {
|
|
5743
|
-
case g.UP:
|
|
5744
|
-
return function(t4) {
|
|
5745
|
-
return "ttb" === e3.direction ? t4 - 1 : t4 + 1;
|
|
5746
|
-
};
|
|
5747
|
-
case g.RIGHT:
|
|
5748
|
-
return function(t4) {
|
|
5749
|
-
return "rtl" === e3.direction ? t4 - 1 : t4 + 1;
|
|
5750
|
-
};
|
|
5751
|
-
case g.DOWN:
|
|
5752
|
-
return function(t4) {
|
|
5753
|
-
return "ttb" === e3.direction ? t4 + 1 : t4 - 1;
|
|
5754
|
-
};
|
|
5755
|
-
case g.LEFT:
|
|
5756
|
-
return function(t4) {
|
|
5757
|
-
return "rtl" === e3.direction ? t4 + 1 : t4 - 1;
|
|
5758
|
-
};
|
|
5759
|
-
case g.END:
|
|
5760
|
-
return function() {
|
|
5761
|
-
return e3.max;
|
|
5762
|
-
};
|
|
5763
|
-
case g.HOME:
|
|
5764
|
-
return function() {
|
|
5765
|
-
return e3.min;
|
|
5766
|
-
};
|
|
5767
|
-
case g.PAGE_UP:
|
|
5768
|
-
return function(t4) {
|
|
5769
|
-
return t4 + 10;
|
|
5770
|
-
};
|
|
5771
|
-
case g.PAGE_DOWN:
|
|
5772
|
-
return function(t4) {
|
|
5773
|
-
return t4 - 10;
|
|
5774
|
-
};
|
|
5775
|
-
default:
|
|
5776
|
-
return null;
|
|
5777
|
-
}
|
|
5778
|
-
};
|
|
5779
|
-
function O(t3, e3) {
|
|
5780
|
-
if (!(t3 instanceof e3))
|
|
5781
|
-
throw new TypeError("Cannot call a class as a function");
|
|
5782
|
-
}
|
|
5783
|
-
function D(t3, e3) {
|
|
5784
|
-
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
5785
|
-
var n2 = e3[r3];
|
|
5786
|
-
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
function E(t3, e3, r3) {
|
|
5790
|
-
return e3 && D(t3.prototype, e3), r3 && D(t3, r3), Object.defineProperty(t3, "prototype", { writable: false }), t3;
|
|
5791
|
-
}
|
|
5792
|
-
function R(t3, e3, r3) {
|
|
5793
|
-
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
5794
|
-
}
|
|
5795
|
-
var A, V, j = function() {
|
|
5796
|
-
function t3(e3) {
|
|
5797
|
-
O(this, t3), R(this, "num", void 0), this.num = e3;
|
|
5798
|
-
}
|
|
5799
|
-
return E(t3, [{ key: "decimal", value: function(t4, e3) {
|
|
5800
|
-
var r3 = this.num, n2 = this.getDecimalLen(r3), i2 = this.getDecimalLen(t4), o2 = 0;
|
|
5801
|
-
switch (e3) {
|
|
5802
|
-
case "+":
|
|
5803
|
-
o2 = this.getExponent(n2, i2), this.num = (this.safeRoundUp(r3, o2) + this.safeRoundUp(t4, o2)) / o2;
|
|
5804
|
-
break;
|
|
5805
|
-
case "-":
|
|
5806
|
-
o2 = this.getExponent(n2, i2), this.num = (this.safeRoundUp(r3, o2) - this.safeRoundUp(t4, o2)) / o2;
|
|
5807
|
-
break;
|
|
5808
|
-
case "*":
|
|
5809
|
-
this.num = this.safeRoundUp(this.safeRoundUp(r3, this.getExponent(n2)), this.safeRoundUp(t4, this.getExponent(i2))) / this.getExponent(n2 + i2);
|
|
5810
|
-
break;
|
|
5811
|
-
case "/":
|
|
5812
|
-
o2 = this.getExponent(n2, i2), this.num = this.safeRoundUp(r3, o2) / this.safeRoundUp(t4, o2);
|
|
5813
|
-
break;
|
|
5814
|
-
case "%":
|
|
5815
|
-
o2 = this.getExponent(n2, i2), this.num = this.safeRoundUp(r3, o2) % this.safeRoundUp(t4, o2) / o2;
|
|
5816
|
-
break;
|
|
5817
|
-
}
|
|
5818
|
-
return this;
|
|
5819
|
-
} }, { key: "plus", value: function(t4) {
|
|
5820
|
-
return this.decimal(t4, "+");
|
|
5821
|
-
} }, { key: "minus", value: function(t4) {
|
|
5822
|
-
return this.decimal(t4, "-");
|
|
5823
|
-
} }, { key: "multiply", value: function(t4) {
|
|
5824
|
-
return this.decimal(t4, "*");
|
|
5825
|
-
} }, { key: "divide", value: function(t4) {
|
|
5826
|
-
return this.decimal(t4, "/");
|
|
5827
|
-
} }, { key: "remainder", value: function(t4) {
|
|
5828
|
-
return this.decimal(t4, "%");
|
|
5829
|
-
} }, { key: "toNumber", value: function() {
|
|
5830
|
-
return this.num;
|
|
5831
|
-
} }, { key: "getDecimalLen", value: function(t4) {
|
|
5832
|
-
var e3 = "".concat(t4).split("e");
|
|
5833
|
-
return ("".concat(e3[0]).split(".")[1] || "").length - (e3[1] ? +e3[1] : 0);
|
|
5834
|
-
} }, { key: "getExponent", value: function(t4, e3) {
|
|
5835
|
-
return Math.pow(10, void 0 !== e3 ? Math.max(t4, e3) : t4);
|
|
5836
|
-
} }, { key: "safeRoundUp", value: function(t4, e3) {
|
|
5837
|
-
return Math.round(t4 * e3);
|
|
5838
|
-
} }]), t3;
|
|
5839
|
-
}();
|
|
5840
|
-
function C(t3, e3) {
|
|
5841
|
-
return L(t3) || M(t3, e3) || H(t3, e3) || B();
|
|
5842
|
-
}
|
|
5843
|
-
function B() {
|
|
5844
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5845
|
-
}
|
|
5846
|
-
function M(t3, e3) {
|
|
5847
|
-
var r3 = null == t3 ? null : "undefined" !== typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
|
|
5848
|
-
if (null != r3) {
|
|
5849
|
-
var n2, i2, o2 = [], a2 = true, s2 = false;
|
|
5850
|
-
try {
|
|
5851
|
-
for (r3 = r3.call(t3); !(a2 = (n2 = r3.next()).done); a2 = true)
|
|
5852
|
-
if (o2.push(n2.value), e3 && o2.length === e3)
|
|
5853
|
-
break;
|
|
5854
|
-
} catch (l2) {
|
|
5855
|
-
s2 = true, i2 = l2;
|
|
5856
|
-
} finally {
|
|
5857
|
-
try {
|
|
5858
|
-
a2 || null == r3["return"] || r3["return"]();
|
|
5859
|
-
} finally {
|
|
5860
|
-
if (s2)
|
|
5861
|
-
throw i2;
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
return o2;
|
|
5865
|
-
}
|
|
5866
|
-
}
|
|
5867
|
-
function L(t3) {
|
|
5868
|
-
if (Array.isArray(t3))
|
|
5869
|
-
return t3;
|
|
5870
|
-
}
|
|
5871
|
-
function N(t3, e3) {
|
|
5872
|
-
var r3 = Object.keys(t3);
|
|
5873
|
-
if (Object.getOwnPropertySymbols) {
|
|
5874
|
-
var n2 = Object.getOwnPropertySymbols(t3);
|
|
5875
|
-
e3 && (n2 = n2.filter(function(e4) {
|
|
5876
|
-
return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
|
|
5877
|
-
})), r3.push.apply(r3, n2);
|
|
5878
|
-
}
|
|
5879
|
-
return r3;
|
|
5880
|
-
}
|
|
5881
|
-
function z(t3) {
|
|
5882
|
-
for (var e3 = 1; e3 < arguments.length; e3++) {
|
|
5883
|
-
var r3 = null != arguments[e3] ? arguments[e3] : {};
|
|
5884
|
-
e3 % 2 ? N(Object(r3), true).forEach(function(e4) {
|
|
5885
|
-
X(t3, e4, r3[e4]);
|
|
5886
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : N(Object(r3)).forEach(function(e4) {
|
|
5887
|
-
Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
|
|
5888
|
-
});
|
|
5889
|
-
}
|
|
5890
|
-
return t3;
|
|
5891
|
-
}
|
|
5892
|
-
function I(t3) {
|
|
5893
|
-
return $(t3) || F(t3) || H(t3) || T();
|
|
5894
|
-
}
|
|
5895
|
-
function T() {
|
|
5896
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5897
|
-
}
|
|
5898
|
-
function H(t3, e3) {
|
|
5899
|
-
if (t3) {
|
|
5900
|
-
if ("string" === typeof t3)
|
|
5901
|
-
return U(t3, e3);
|
|
5902
|
-
var r3 = Object.prototype.toString.call(t3).slice(8, -1);
|
|
5903
|
-
return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? U(t3, e3) : void 0;
|
|
5904
|
-
}
|
|
5905
|
-
}
|
|
5906
|
-
function F(t3) {
|
|
5907
|
-
if ("undefined" !== typeof Symbol && null != t3[Symbol.iterator] || null != t3["@@iterator"])
|
|
5908
|
-
return Array.from(t3);
|
|
5909
|
-
}
|
|
5910
|
-
function $(t3) {
|
|
5911
|
-
if (Array.isArray(t3))
|
|
5912
|
-
return U(t3);
|
|
5913
|
-
}
|
|
5914
|
-
function U(t3, e3) {
|
|
5915
|
-
(null == e3 || e3 > t3.length) && (e3 = t3.length);
|
|
5916
|
-
for (var r3 = 0, n2 = new Array(e3); r3 < e3; r3++)
|
|
5917
|
-
n2[r3] = t3[r3];
|
|
5918
|
-
return n2;
|
|
5919
|
-
}
|
|
5920
|
-
function _(t3, e3) {
|
|
5921
|
-
if (!(t3 instanceof e3))
|
|
5922
|
-
throw new TypeError("Cannot call a class as a function");
|
|
5923
|
-
}
|
|
5924
|
-
function W(t3, e3) {
|
|
5925
|
-
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
5926
|
-
var n2 = e3[r3];
|
|
5927
|
-
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
5928
|
-
}
|
|
5929
|
-
}
|
|
5930
|
-
function G(t3, e3, r3) {
|
|
5931
|
-
return e3 && W(t3.prototype, e3), r3 && W(t3, r3), Object.defineProperty(t3, "prototype", { writable: false }), t3;
|
|
5932
|
-
}
|
|
5933
|
-
function X(t3, e3, r3) {
|
|
5934
|
-
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
5935
|
-
}
|
|
5936
|
-
(function(t3) {
|
|
5937
|
-
t3[t3["VALUE"] = 1] = "VALUE", t3[t3["INTERVAL"] = 2] = "INTERVAL", t3[t3["MIN"] = 3] = "MIN", t3[t3["MAX"] = 4] = "MAX", t3[t3["ORDER"] = 5] = "ORDER";
|
|
5938
|
-
})(V || (V = {}));
|
|
5939
|
-
var q = (A = {}, X(A, V.VALUE, 'The type of the "value" is illegal'), X(A, V.INTERVAL, 'The prop "interval" is invalid, "(max - min)" must be divisible by "interval"'), X(A, V.MIN, 'The "value" must be greater than or equal to the "min".'), X(A, V.MAX, 'The "value" must be less than or equal to the "max".'), X(A, V.ORDER, 'When "order" is false, the parameters "minRange", "maxRange", "fixed", "enabled" are invalid.'), A), Z = function() {
|
|
5940
|
-
function t3(e3) {
|
|
5941
|
-
_(this, t3), X(this, "dotsPos", []), X(this, "dotsValue", []), X(this, "data", void 0), X(this, "enableCross", void 0), X(this, "fixed", void 0), X(this, "max", void 0), X(this, "min", void 0), X(this, "interval", void 0), X(this, "minRange", void 0), X(this, "maxRange", void 0), X(this, "order", void 0), X(this, "marks", void 0), X(this, "included", void 0), X(this, "process", void 0), X(this, "adsorb", void 0), X(this, "dotOptions", void 0), X(this, "onError", void 0), X(this, "cacheRangeDir", {}), this.data = e3.data, this.max = e3.max, this.min = e3.min, this.interval = e3.interval, this.order = e3.order, this.marks = e3.marks, this.included = e3.included, this.process = e3.process, this.adsorb = e3.adsorb, this.dotOptions = e3.dotOptions, this.onError = e3.onError, this.order ? (this.minRange = e3.minRange || 0, this.maxRange = e3.maxRange || 0, this.enableCross = e3.enableCross, this.fixed = e3.fixed) : ((e3.minRange || e3.maxRange || !e3.enableCross || e3.fixed) && this.emitError(V.ORDER), this.minRange = 0, this.maxRange = 0, this.enableCross = true, this.fixed = false), this.setValue(e3.value);
|
|
5942
|
-
}
|
|
5943
|
-
return G(t3, [{ key: "setValue", value: function(t4) {
|
|
5944
|
-
this.setDotsValue(Array.isArray(t4) ? I(t4) : [t4], true);
|
|
5945
|
-
} }, { key: "setDotsValue", value: function(t4, e3) {
|
|
5946
|
-
this.dotsValue = t4, e3 && this.syncDotsPos();
|
|
5947
|
-
} }, { key: "setDotsPos", value: function(t4) {
|
|
5948
|
-
var e3 = this, r3 = this.order ? I(t4).sort(function(t5, e4) {
|
|
5949
|
-
return t5 - e4;
|
|
5950
|
-
}) : t4;
|
|
5951
|
-
this.dotsPos = r3, this.setDotsValue(r3.map(function(t5) {
|
|
5952
|
-
return e3.getValueByPos(t5);
|
|
5953
|
-
}), this.adsorb);
|
|
5954
|
-
} }, { key: "getValueByPos", value: function(t4) {
|
|
5955
|
-
var e3 = this.parsePos(t4);
|
|
5956
|
-
if (this.included) {
|
|
5957
|
-
var r3 = 100;
|
|
5958
|
-
this.markList.forEach(function(n2) {
|
|
5959
|
-
var i2 = Math.abs(n2.pos - t4);
|
|
5960
|
-
i2 < r3 && (r3 = i2, e3 = n2.value);
|
|
5961
|
-
});
|
|
5962
|
-
}
|
|
5963
|
-
return e3;
|
|
5964
|
-
} }, { key: "syncDotsPos", value: function() {
|
|
5965
|
-
var t4 = this;
|
|
5966
|
-
this.dotsPos = this.dotsValue.map(function(e3) {
|
|
5967
|
-
return t4.parseValue(e3);
|
|
5968
|
-
});
|
|
5969
|
-
} }, { key: "markList", get: function() {
|
|
5970
|
-
var t4 = this;
|
|
5971
|
-
if (!this.marks)
|
|
5972
|
-
return [];
|
|
5973
|
-
var e3 = function(e4, r3) {
|
|
5974
|
-
var n2 = t4.parseValue(e4);
|
|
5975
|
-
return z({ pos: n2, value: e4, label: e4, active: t4.isActiveByPos(n2) }, r3);
|
|
5976
|
-
};
|
|
5977
|
-
return true === this.marks ? this.getValues().map(function(t5) {
|
|
5978
|
-
return e3(t5);
|
|
5979
|
-
}) : "[object Object]" === Object.prototype.toString.call(this.marks) ? Object.keys(this.marks).sort(function(t5, e4) {
|
|
5980
|
-
return +t5 - +e4;
|
|
5981
|
-
}).map(function(r3) {
|
|
5982
|
-
var n2 = t4.marks[r3];
|
|
5983
|
-
return e3(r3, "string" !== typeof n2 ? n2 : { label: n2 });
|
|
5984
|
-
}) : Array.isArray(this.marks) ? this.marks.map(function(t5) {
|
|
5985
|
-
return e3(t5);
|
|
5986
|
-
}) : "function" === typeof this.marks ? this.getValues().map(function(e4) {
|
|
5987
|
-
return { value: e4, result: t4.marks(e4) };
|
|
5988
|
-
}).filter(function(t5) {
|
|
5989
|
-
var e4 = t5.result;
|
|
5990
|
-
return !!e4;
|
|
5991
|
-
}).map(function(t5) {
|
|
5992
|
-
var r3 = t5.value, n2 = t5.result;
|
|
5993
|
-
return e3(r3, n2);
|
|
5994
|
-
}) : [];
|
|
5995
|
-
} }, { key: "getRecentDot", value: function(t4) {
|
|
5996
|
-
var e3 = this.dotsPos.map(function(e4) {
|
|
5997
|
-
return Math.abs(e4 - t4);
|
|
5998
|
-
});
|
|
5999
|
-
return e3.indexOf(Math.min.apply(Math, I(e3)));
|
|
6000
|
-
} }, { key: "getIndexByValue", value: function(t4) {
|
|
6001
|
-
return this.data ? this.data.indexOf(t4) : new j(+t4).minus(this.min).divide(this.interval).toNumber();
|
|
6002
|
-
} }, { key: "getValueByIndex", value: function(t4) {
|
|
6003
|
-
return t4 < 0 ? t4 = 0 : t4 > this.total && (t4 = this.total), this.data ? this.data[t4] : new j(t4).multiply(this.interval).plus(this.min).toNumber();
|
|
6004
|
-
} }, { key: "setDotPos", value: function(t4, e3) {
|
|
6005
|
-
t4 = this.getValidPos(t4, e3).pos;
|
|
6006
|
-
var r3 = t4 - this.dotsPos[e3];
|
|
6007
|
-
if (r3) {
|
|
6008
|
-
var n2 = new Array(this.dotsPos.length);
|
|
6009
|
-
this.fixed ? n2 = this.getFixedChangePosArr(r3, e3) : this.minRange || this.maxRange ? n2 = this.getLimitRangeChangePosArr(t4, r3, e3) : n2[e3] = r3, this.setDotsPos(this.dotsPos.map(function(t5, e4) {
|
|
6010
|
-
return t5 + (n2[e4] || 0);
|
|
6011
|
-
}));
|
|
6012
|
-
}
|
|
6013
|
-
} }, { key: "getFixedChangePosArr", value: function(t4, e3) {
|
|
6014
|
-
var r3 = this;
|
|
6015
|
-
return this.dotsPos.forEach(function(n2, i2) {
|
|
6016
|
-
if (i2 !== e3) {
|
|
6017
|
-
var o2 = r3.getValidPos(n2 + t4, i2), a2 = o2.pos, s2 = o2.inRange;
|
|
6018
|
-
s2 || (t4 = Math.min(Math.abs(a2 - n2), Math.abs(t4)) * (t4 < 0 ? -1 : 1));
|
|
6019
|
-
}
|
|
6020
|
-
}), this.dotsPos.map(function(e4) {
|
|
6021
|
-
return t4;
|
|
6022
|
-
});
|
|
6023
|
-
} }, { key: "getLimitRangeChangePosArr", value: function(t4, e3, r3) {
|
|
6024
|
-
var n2 = this, i2 = [{ index: r3, changePos: e3 }], o2 = e3;
|
|
6025
|
-
return [this.minRange, this.maxRange].forEach(function(a2, s2) {
|
|
6026
|
-
if (!a2)
|
|
6027
|
-
return false;
|
|
6028
|
-
var l2 = 0 === s2, u2 = e3 > 0, c2 = 0;
|
|
6029
|
-
c2 = l2 ? u2 ? 1 : -1 : u2 ? -1 : 1;
|
|
6030
|
-
var d2 = function(t5, e4) {
|
|
6031
|
-
var r4 = Math.abs(t5 - e4);
|
|
6032
|
-
return l2 ? r4 < n2.minRangeDir : r4 > n2.maxRangeDir;
|
|
6033
|
-
}, h3 = r3 + c2, f2 = n2.dotsPos[h3], p2 = t4;
|
|
6034
|
-
while (n2.isPos(f2) && d2(f2, p2)) {
|
|
6035
|
-
var m2 = n2.getValidPos(f2 + o2, h3), v2 = m2.pos;
|
|
6036
|
-
i2.push({ index: h3, changePos: v2 - f2 }), h3 += c2, p2 = v2, f2 = n2.dotsPos[h3];
|
|
6037
|
-
}
|
|
6038
|
-
}), this.dotsPos.map(function(t5, e4) {
|
|
6039
|
-
var r4 = i2.filter(function(t6) {
|
|
6040
|
-
return t6.index === e4;
|
|
6041
|
-
});
|
|
6042
|
-
return r4.length ? r4[0].changePos : 0;
|
|
6043
|
-
});
|
|
6044
|
-
} }, { key: "isPos", value: function(t4) {
|
|
6045
|
-
return "number" === typeof t4;
|
|
6046
|
-
} }, { key: "getValidPos", value: function(t4, e3) {
|
|
6047
|
-
var r3 = this.valuePosRange[e3], n2 = true;
|
|
6048
|
-
return t4 < r3[0] ? (t4 = r3[0], n2 = false) : t4 > r3[1] && (t4 = r3[1], n2 = false), { pos: t4, inRange: n2 };
|
|
6049
|
-
} }, { key: "parseValue", value: function(t4) {
|
|
6050
|
-
if (this.data)
|
|
6051
|
-
t4 = this.data.indexOf(t4);
|
|
6052
|
-
else if ("number" === typeof t4 || "string" === typeof t4) {
|
|
6053
|
-
if (t4 = +t4, t4 < this.min)
|
|
6054
|
-
return this.emitError(V.MIN), 0;
|
|
6055
|
-
if (t4 > this.max)
|
|
6056
|
-
return this.emitError(V.MAX), 0;
|
|
6057
|
-
if ("number" !== typeof t4 || t4 !== t4)
|
|
6058
|
-
return this.emitError(V.VALUE), 0;
|
|
6059
|
-
t4 = new j(t4).minus(this.min).divide(this.interval).toNumber();
|
|
6060
|
-
}
|
|
6061
|
-
var e3 = new j(t4).multiply(this.gap).toNumber();
|
|
6062
|
-
return e3 < 0 ? 0 : e3 > 100 ? 100 : e3;
|
|
6063
|
-
} }, { key: "parsePos", value: function(t4) {
|
|
6064
|
-
var e3 = Math.round(t4 / this.gap);
|
|
6065
|
-
return this.getValueByIndex(e3);
|
|
6066
|
-
} }, { key: "isActiveByPos", value: function(t4) {
|
|
6067
|
-
return this.processArray.some(function(e3) {
|
|
6068
|
-
var r3 = C(e3, 2), n2 = r3[0], i2 = r3[1];
|
|
6069
|
-
return t4 >= n2 && t4 <= i2;
|
|
6070
|
-
});
|
|
6071
|
-
} }, { key: "getValues", value: function() {
|
|
6072
|
-
if (this.data)
|
|
6073
|
-
return this.data;
|
|
6074
|
-
for (var t4 = [], e3 = 0; e3 <= this.total; e3++)
|
|
6075
|
-
t4.push(new j(e3).multiply(this.interval).plus(this.min).toNumber());
|
|
6076
|
-
return t4;
|
|
6077
|
-
} }, { key: "getRangeDir", value: function(t4) {
|
|
6078
|
-
return t4 ? new j(t4).divide(new j(this.data ? this.data.length - 1 : this.max).minus(this.data ? 0 : this.min).toNumber()).multiply(100).toNumber() : 100;
|
|
6079
|
-
} }, { key: "emitError", value: function(t4) {
|
|
6080
|
-
this.onError && this.onError(t4, q[t4]);
|
|
6081
|
-
} }, { key: "processArray", get: function() {
|
|
6082
|
-
if (this.process) {
|
|
6083
|
-
if ("function" === typeof this.process)
|
|
6084
|
-
return this.process(this.dotsPos);
|
|
6085
|
-
if (1 === this.dotsPos.length)
|
|
6086
|
-
return [[0, this.dotsPos[0]]];
|
|
6087
|
-
if (this.dotsPos.length > 1)
|
|
6088
|
-
return [[Math.min.apply(Math, I(this.dotsPos)), Math.max.apply(Math, I(this.dotsPos))]];
|
|
6089
|
-
}
|
|
6090
|
-
return [];
|
|
6091
|
-
} }, { key: "total", get: function() {
|
|
6092
|
-
var t4 = 0;
|
|
6093
|
-
return t4 = this.data ? this.data.length - 1 : new j(this.max).minus(this.min).divide(this.interval).toNumber(), t4 - Math.floor(t4) !== 0 ? (this.emitError(V.INTERVAL), 0) : t4;
|
|
6094
|
-
} }, { key: "gap", get: function() {
|
|
6095
|
-
return 100 / this.total;
|
|
6096
|
-
} }, { key: "minRangeDir", get: function() {
|
|
6097
|
-
return this.cacheRangeDir[this.minRange] ? this.cacheRangeDir[this.minRange] : this.cacheRangeDir[this.minRange] = this.getRangeDir(this.minRange);
|
|
6098
|
-
} }, { key: "maxRangeDir", get: function() {
|
|
6099
|
-
return this.cacheRangeDir[this.maxRange] ? this.cacheRangeDir[this.maxRange] : this.cacheRangeDir[this.maxRange] = this.getRangeDir(this.maxRange);
|
|
6100
|
-
} }, { key: "getDotRange", value: function(t4, e3, r3) {
|
|
6101
|
-
if (!this.dotOptions)
|
|
6102
|
-
return r3;
|
|
6103
|
-
var n2 = Array.isArray(this.dotOptions) ? this.dotOptions[t4] : this.dotOptions;
|
|
6104
|
-
return n2 && void 0 !== n2[e3] ? this.parseValue(n2[e3]) : r3;
|
|
6105
|
-
} }, { key: "valuePosRange", get: function() {
|
|
6106
|
-
var t4 = this, e3 = this.dotsPos, r3 = [];
|
|
6107
|
-
return e3.forEach(function(n2, i2) {
|
|
6108
|
-
r3.push([Math.max(t4.minRange ? t4.minRangeDir * i2 : 0, t4.enableCross ? 0 : e3[i2 - 1] || 0, t4.getDotRange(i2, "min", 0)), Math.min(t4.minRange ? 100 - t4.minRangeDir * (e3.length - 1 - i2) : 100, t4.enableCross ? 100 : e3[i2 + 1] || 100, t4.getDotRange(i2, "max", 100))]);
|
|
6109
|
-
}), r3;
|
|
6110
|
-
} }, { key: "dotsIndex", get: function() {
|
|
6111
|
-
var t4 = this;
|
|
6112
|
-
return this.dotsValue.map(function(e3) {
|
|
6113
|
-
return t4.getIndexByValue(e3);
|
|
6114
|
-
});
|
|
6115
|
-
} }]), t3;
|
|
6116
|
-
}();
|
|
6117
|
-
function Y(t3, e3) {
|
|
6118
|
-
if (!(t3 instanceof e3))
|
|
6119
|
-
throw new TypeError("Cannot call a class as a function");
|
|
6120
|
-
}
|
|
6121
|
-
function K(t3, e3) {
|
|
6122
|
-
for (var r3 = 0; r3 < e3.length; r3++) {
|
|
6123
|
-
var n2 = e3[r3];
|
|
6124
|
-
n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(t3, n2.key, n2);
|
|
6125
|
-
}
|
|
6126
|
-
}
|
|
6127
|
-
function J(t3, e3, r3) {
|
|
6128
|
-
return e3 && K(t3.prototype, e3), r3 && K(t3, r3), Object.defineProperty(t3, "prototype", { writable: false }), t3;
|
|
6129
|
-
}
|
|
6130
|
-
function Q(t3, e3, r3) {
|
|
6131
|
-
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
6132
|
-
}
|
|
6133
|
-
var tt = function() {
|
|
6134
|
-
function t3(e3) {
|
|
6135
|
-
Y(this, t3), Q(this, "map", void 0), Q(this, "states", 0), this.map = e3;
|
|
6136
|
-
}
|
|
6137
|
-
return J(t3, [{ key: "add", value: function(t4) {
|
|
6138
|
-
this.states |= t4;
|
|
6139
|
-
} }, { key: "delete", value: function(t4) {
|
|
6140
|
-
this.states &= ~t4;
|
|
6141
|
-
} }, { key: "toggle", value: function(t4) {
|
|
6142
|
-
this.has(t4) ? this.delete(t4) : this.add(t4);
|
|
6143
|
-
} }, { key: "has", value: function(t4) {
|
|
6144
|
-
return !!(this.states & t4);
|
|
6145
|
-
} }]), t3;
|
|
6146
|
-
}();
|
|
6147
|
-
n(631);
|
|
6148
|
-
function et(t3) {
|
|
6149
|
-
return it(t3) || nt(t3) || dt(t3) || rt();
|
|
6150
|
-
}
|
|
6151
|
-
function rt() {
|
|
6152
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6153
|
-
}
|
|
6154
|
-
function nt(t3) {
|
|
6155
|
-
if ("undefined" !== typeof Symbol && null != t3[Symbol.iterator] || null != t3["@@iterator"])
|
|
6156
|
-
return Array.from(t3);
|
|
6157
|
-
}
|
|
6158
|
-
function it(t3) {
|
|
6159
|
-
if (Array.isArray(t3))
|
|
6160
|
-
return ht(t3);
|
|
6161
|
-
}
|
|
6162
|
-
function ot(t3) {
|
|
6163
|
-
return ot = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t4) {
|
|
6164
|
-
return typeof t4;
|
|
6165
|
-
} : function(t4) {
|
|
6166
|
-
return t4 && "function" == typeof Symbol && t4.constructor === Symbol && t4 !== Symbol.prototype ? "symbol" : typeof t4;
|
|
6167
|
-
}, ot(t3);
|
|
6168
|
-
}
|
|
6169
|
-
function at(t3, e3) {
|
|
6170
|
-
var r3 = Object.keys(t3);
|
|
6171
|
-
if (Object.getOwnPropertySymbols) {
|
|
6172
|
-
var n2 = Object.getOwnPropertySymbols(t3);
|
|
6173
|
-
e3 && (n2 = n2.filter(function(e4) {
|
|
6174
|
-
return Object.getOwnPropertyDescriptor(t3, e4).enumerable;
|
|
6175
|
-
})), r3.push.apply(r3, n2);
|
|
6176
|
-
}
|
|
6177
|
-
return r3;
|
|
6178
|
-
}
|
|
6179
|
-
function st(t3) {
|
|
6180
|
-
for (var e3 = 1; e3 < arguments.length; e3++) {
|
|
6181
|
-
var r3 = null != arguments[e3] ? arguments[e3] : {};
|
|
6182
|
-
e3 % 2 ? at(Object(r3), true).forEach(function(e4) {
|
|
6183
|
-
lt(t3, e4, r3[e4]);
|
|
6184
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t3, Object.getOwnPropertyDescriptors(r3)) : at(Object(r3)).forEach(function(e4) {
|
|
6185
|
-
Object.defineProperty(t3, e4, Object.getOwnPropertyDescriptor(r3, e4));
|
|
6186
|
-
});
|
|
6187
|
-
}
|
|
6188
|
-
return t3;
|
|
6189
|
-
}
|
|
6190
|
-
function lt(t3, e3, r3) {
|
|
6191
|
-
return e3 in t3 ? Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }) : t3[e3] = r3, t3;
|
|
6192
|
-
}
|
|
6193
|
-
function ut(t3, e3) {
|
|
6194
|
-
return pt(t3) || ft(t3, e3) || dt(t3, e3) || ct();
|
|
6195
|
-
}
|
|
6196
|
-
function ct() {
|
|
6197
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6198
|
-
}
|
|
6199
|
-
function dt(t3, e3) {
|
|
6200
|
-
if (t3) {
|
|
6201
|
-
if ("string" === typeof t3)
|
|
6202
|
-
return ht(t3, e3);
|
|
6203
|
-
var r3 = Object.prototype.toString.call(t3).slice(8, -1);
|
|
6204
|
-
return "Object" === r3 && t3.constructor && (r3 = t3.constructor.name), "Map" === r3 || "Set" === r3 ? Array.from(t3) : "Arguments" === r3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r3) ? ht(t3, e3) : void 0;
|
|
6205
|
-
}
|
|
6206
|
-
}
|
|
6207
|
-
function ht(t3, e3) {
|
|
6208
|
-
(null == e3 || e3 > t3.length) && (e3 = t3.length);
|
|
6209
|
-
for (var r3 = 0, n2 = new Array(e3); r3 < e3; r3++)
|
|
6210
|
-
n2[r3] = t3[r3];
|
|
6211
|
-
return n2;
|
|
6212
|
-
}
|
|
6213
|
-
function ft(t3, e3) {
|
|
6214
|
-
var r3 = null == t3 ? null : "undefined" !== typeof Symbol && t3[Symbol.iterator] || t3["@@iterator"];
|
|
6215
|
-
if (null != r3) {
|
|
6216
|
-
var n2, i2, o2 = [], a2 = true, s2 = false;
|
|
6217
|
-
try {
|
|
6218
|
-
for (r3 = r3.call(t3); !(a2 = (n2 = r3.next()).done); a2 = true)
|
|
6219
|
-
if (o2.push(n2.value), e3 && o2.length === e3)
|
|
6220
|
-
break;
|
|
6221
|
-
} catch (l2) {
|
|
6222
|
-
s2 = true, i2 = l2;
|
|
6223
|
-
} finally {
|
|
6224
|
-
try {
|
|
6225
|
-
a2 || null == r3["return"] || r3["return"]();
|
|
6226
|
-
} finally {
|
|
6227
|
-
if (s2)
|
|
6228
|
-
throw i2;
|
|
6229
|
-
}
|
|
6230
|
-
}
|
|
6231
|
-
return o2;
|
|
6232
|
-
}
|
|
6233
|
-
}
|
|
6234
|
-
function pt(t3) {
|
|
6235
|
-
if (Array.isArray(t3))
|
|
6236
|
-
return t3;
|
|
6237
|
-
}
|
|
6238
|
-
var mt = { None: 0, Drag: 2, Focus: 4 }, vt = 4, yt = (0, o.defineComponent)({ name: "VueSlider", components: { VueSliderDot: m, VueSliderMark: k }, emits: ["change", "drag-start", "dragging", "drag-end", "error", "update:modelValue"], data: function() {
|
|
6239
|
-
return { control: null, states: new tt(mt), scale: 1, focusDotIndex: 0 };
|
|
6240
|
-
}, props: { modelValue: { type: [Number, String, Array], default: 0 }, silent: { type: Boolean, default: false }, direction: { type: String, default: "ltr", validator: function(t3) {
|
|
6241
|
-
return ["ltr", "rtl", "ttb", "btt"].indexOf(t3) > -1;
|
|
6242
|
-
} }, width: { type: [Number, String] }, height: { type: [Number, String] }, dotSize: { type: [Number, Array], default: 14 }, contained: { type: Boolean, default: false }, min: { type: Number, default: 0 }, max: { type: Number, default: 100 }, interval: { type: Number, default: 1 }, disabled: { type: Boolean, default: false }, clickable: { type: Boolean, default: true }, dragOnClick: { type: Boolean, default: false }, duration: { type: Number, default: 0.5 }, data: { type: [Object, Array] }, dataValue: { type: String, default: "value" }, dataLabel: { type: String, default: "label" }, lazy: { type: Boolean, default: false }, tooltip: { type: String, default: "active", validator: function(t3) {
|
|
6243
|
-
return ["none", "always", "focus", "hover", "active"].indexOf(t3) > -1;
|
|
6244
|
-
} }, tooltipPlacement: { type: [String, Array], validator: function(t3) {
|
|
6245
|
-
return (Array.isArray(t3) ? t3 : [t3]).every(function(t4) {
|
|
6246
|
-
return ["top", "right", "bottom", "left"].indexOf(t4) > -1;
|
|
6247
|
-
});
|
|
6248
|
-
} }, tooltipFormatter: { type: [String, Array, Function] }, useKeyboard: { type: Boolean, default: true }, keydownHook: { type: Function }, enableCross: { type: Boolean, default: true }, fixed: { type: Boolean, default: false }, order: { type: Boolean, default: true }, minRange: { type: Number }, maxRange: { type: Number }, marks: { type: [Boolean, Object, Array, Function], default: false }, process: { type: [Boolean, Function], default: true }, zoom: { type: Number }, included: { type: Boolean }, adsorb: { type: Boolean }, hideLabel: { type: Boolean }, dotOptions: { type: [Object, Array] }, dotAttrs: { type: Object }, railStyle: { type: Object }, processStyle: { type: Object }, dotStyle: { type: Object }, tooltipStyle: { type: Object }, stepStyle: { type: Object }, stepActiveStyle: { type: Object }, labelStyle: { type: Object }, labelActiveStyle: { type: Object } }, computed: { isHorizontal: function() {
|
|
6249
|
-
return "ltr" === this.direction || "rtl" === this.direction;
|
|
6250
|
-
}, isReverse: function() {
|
|
6251
|
-
return "rtl" === this.direction || "btt" === this.direction;
|
|
6252
|
-
}, tailSize: function() {
|
|
6253
|
-
return S((this.isHorizontal ? this.height : this.width) || vt);
|
|
6254
|
-
}, containerClasses: function() {
|
|
6255
|
-
return ["vue-slider", ["vue-slider-".concat(this.direction)], { "vue-slider-disabled": this.disabled }];
|
|
6256
|
-
}, containerStyles: function() {
|
|
6257
|
-
var t3 = Array.isArray(this.dotSize) ? this.dotSize : [this.dotSize, this.dotSize], e3 = ut(t3, 2), r3 = e3[0], n2 = e3[1], i2 = this.width ? S(this.width) : this.isHorizontal ? "auto" : S(vt), o2 = this.height ? S(this.height) : this.isHorizontal ? S(vt) : "auto";
|
|
6258
|
-
return { padding: this.contained ? "".concat(n2 / 2, "px ").concat(r3 / 2, "px") : this.isHorizontal ? "".concat(n2 / 2, "px 0") : "0 ".concat(r3 / 2, "px"), width: i2, height: o2 };
|
|
6259
|
-
}, processArray: function() {
|
|
6260
|
-
var t3 = this;
|
|
6261
|
-
return this.control.processArray.map(function(e3, r3) {
|
|
6262
|
-
var n2, i2 = ut(e3, 3), o2 = i2[0], a2 = i2[1], s2 = i2[2];
|
|
6263
|
-
if (o2 > a2) {
|
|
6264
|
-
var l2 = [a2, o2];
|
|
6265
|
-
o2 = l2[0], a2 = l2[1];
|
|
6266
|
-
}
|
|
6267
|
-
var u2 = t3.isHorizontal ? "width" : "height";
|
|
6268
|
-
return { start: o2, end: a2, index: r3, style: st(st((n2 = {}, lt(n2, t3.isHorizontal ? "height" : "width", "100%"), lt(n2, t3.isHorizontal ? "top" : "left", 0), lt(n2, t3.mainDirection, "".concat(o2, "%")), lt(n2, u2, "".concat(a2 - o2, "%")), lt(n2, "transitionProperty", "".concat(u2, ",").concat(t3.mainDirection)), lt(n2, "transitionDuration", "".concat(t3.animateTime, "s")), n2), t3.processStyle), s2) };
|
|
6269
|
-
});
|
|
6270
|
-
}, dotBaseStyle: function() {
|
|
6271
|
-
var t3, e3 = Array.isArray(this.dotSize) ? this.dotSize : [this.dotSize, this.dotSize], r3 = ut(e3, 2), n2 = r3[0], i2 = r3[1];
|
|
6272
|
-
return t3 = this.isHorizontal ? lt({ transform: "translate(".concat(this.isReverse ? "50%" : "-50%", ", -50%)"), WebkitTransform: "translate(".concat(this.isReverse ? "50%" : "-50%", ", -50%)"), top: "50%" }, "ltr" === this.direction ? "left" : "right", "0") : lt({ transform: "translate(-50%, ".concat(this.isReverse ? "50%" : "-50%", ")"), WebkitTransform: "translate(-50%, ".concat(this.isReverse ? "50%" : "-50%", ")"), left: "50%" }, "btt" === this.direction ? "bottom" : "top", "0"), st({ width: "".concat(n2, "px"), height: "".concat(i2, "px") }, t3);
|
|
6273
|
-
}, mainDirection: function() {
|
|
6274
|
-
switch (this.direction) {
|
|
6275
|
-
case "ltr":
|
|
6276
|
-
return "left";
|
|
6277
|
-
case "rtl":
|
|
6278
|
-
return "right";
|
|
6279
|
-
case "btt":
|
|
6280
|
-
return "bottom";
|
|
6281
|
-
case "ttb":
|
|
6282
|
-
return "top";
|
|
6283
|
-
default:
|
|
6284
|
-
return "left";
|
|
6285
|
-
}
|
|
6286
|
-
}, tooltipDirections: function() {
|
|
6287
|
-
var t3 = this.tooltipPlacement || (this.isHorizontal ? "top" : "left");
|
|
6288
|
-
return Array.isArray(t3) ? t3 : this.dots.map(function() {
|
|
6289
|
-
return t3;
|
|
6290
|
-
});
|
|
6291
|
-
}, dots: function() {
|
|
6292
|
-
var t3 = this;
|
|
6293
|
-
return this.control.dotsPos.map(function(e3, r3) {
|
|
6294
|
-
return st({ pos: e3, index: r3, value: t3.control.dotsValue[r3], focus: t3.states.has(mt.Focus) && t3.focusDotIndex === r3, disabled: t3.disabled, style: t3.dotStyle }, (Array.isArray(t3.dotOptions) ? t3.dotOptions[r3] : t3.dotOptions) || {});
|
|
6295
|
-
});
|
|
6296
|
-
}, animateTime: function() {
|
|
6297
|
-
return this.states.has(mt.Drag) ? 0 : this.duration;
|
|
6298
|
-
}, canSort: function() {
|
|
6299
|
-
return this.order && !this.minRange && !this.maxRange && !this.fixed && this.enableCross;
|
|
6300
|
-
}, sliderData: function() {
|
|
6301
|
-
var t3 = this;
|
|
6302
|
-
return this.isObjectArrayData(this.data) ? this.data.map(function(e3) {
|
|
6303
|
-
return e3[t3.dataValue];
|
|
6304
|
-
}) : this.isObjectData(this.data) ? Object.keys(this.data) : this.data;
|
|
6305
|
-
}, sliderMarks: function() {
|
|
6306
|
-
var t3 = this;
|
|
6307
|
-
return this.marks ? this.marks : this.isObjectArrayData(this.data) ? function(e3) {
|
|
6308
|
-
var r3 = { label: e3 };
|
|
6309
|
-
return t3.data.some(function(n2) {
|
|
6310
|
-
return n2[t3.dataValue] === e3 && (r3.label = n2[t3.dataLabel], true);
|
|
6311
|
-
}), r3;
|
|
6312
|
-
} : this.isObjectData(this.data) ? this.data : void 0;
|
|
6313
|
-
}, sliderTooltipFormatter: function() {
|
|
6314
|
-
var t3 = this;
|
|
6315
|
-
if (this.tooltipFormatter)
|
|
6316
|
-
return this.tooltipFormatter;
|
|
6317
|
-
if (this.isObjectArrayData(this.data))
|
|
6318
|
-
return function(e4) {
|
|
6319
|
-
var r3 = "" + e4;
|
|
6320
|
-
return t3.data.some(function(n2) {
|
|
6321
|
-
return n2[t3.dataValue] === e4 && (r3 = n2[t3.dataLabel], true);
|
|
6322
|
-
}), r3;
|
|
6323
|
-
};
|
|
6324
|
-
if (this.isObjectData(this.data)) {
|
|
6325
|
-
var e3 = this.data;
|
|
6326
|
-
return function(t4) {
|
|
6327
|
-
return e3[t4];
|
|
6328
|
-
};
|
|
6329
|
-
}
|
|
6330
|
-
}, isNotSync: function() {
|
|
6331
|
-
var t3 = this.control.dotsValue;
|
|
6332
|
-
return Array.isArray(this.modelValue) ? this.modelValue.length !== t3.length || this.modelValue.some(function(e3, r3) {
|
|
6333
|
-
return e3 !== t3[r3];
|
|
6334
|
-
}) : this.modelValue !== t3[0];
|
|
6335
|
-
}, dragRange: function() {
|
|
6336
|
-
var t3 = this.dots[this.focusDotIndex - 1], e3 = this.dots[this.focusDotIndex + 1];
|
|
6337
|
-
return [t3 ? t3.pos : -1 / 0, e3 ? e3.pos : 1 / 0];
|
|
6338
|
-
} }, watch: { modelValue: function() {
|
|
6339
|
-
this.control && !this.states.has(mt.Drag) && this.isNotSync && this.control.setValue(this.modelValue);
|
|
6340
|
-
} }, methods: { isObjectData: function(t3) {
|
|
6341
|
-
return !!t3 && "[object Object]" === Object.prototype.toString.call(t3);
|
|
6342
|
-
}, isObjectArrayData: function(t3) {
|
|
6343
|
-
return !!t3 && Array.isArray(t3) && t3.length > 0 && "object" === ot(t3[0]);
|
|
6344
|
-
}, bindEvent: function() {
|
|
6345
|
-
document.addEventListener("touchmove", this.dragMove, { passive: false }), document.addEventListener("touchend", this.dragEnd, { passive: false }), document.addEventListener("mousedown", this.blurHandle), document.addEventListener("mousemove", this.dragMove), document.addEventListener("mouseup", this.dragEnd), document.addEventListener("mouseleave", this.dragEnd), document.addEventListener("keydown", this.keydownHandle);
|
|
6346
|
-
}, unbindEvent: function() {
|
|
6347
|
-
document.removeEventListener("touchmove", this.dragMove), document.removeEventListener("touchend", this.dragEnd), document.removeEventListener("mousedown", this.blurHandle), document.removeEventListener("mousemove", this.dragMove), document.removeEventListener("mouseup", this.dragEnd), document.removeEventListener("mouseleave", this.dragEnd), document.removeEventListener("keydown", this.keydownHandle);
|
|
6348
|
-
}, setScale: function() {
|
|
6349
|
-
this.scale = new j(Math.floor(this.isHorizontal ? this.$el.offsetWidth : this.$el.offsetHeight)).multiply(this.zoom || 1).divide(100).toNumber();
|
|
6350
|
-
}, initControl: function() {
|
|
6351
|
-
var t3 = this;
|
|
6352
|
-
this.control = new Z({ value: this.modelValue, data: this.sliderData, enableCross: this.enableCross, fixed: this.fixed, max: this.max, min: this.min, interval: this.interval, minRange: this.minRange, maxRange: this.maxRange, order: this.order, marks: this.sliderMarks, included: this.included, process: this.process, adsorb: this.adsorb, dotOptions: this.dotOptions, onError: this.emitError }), ["data", "enableCross", "fixed", "max", "min", "interval", "minRange", "maxRange", "order", "marks", "process", "adsorb", "included", "dotOptions"].forEach(function(e3) {
|
|
6353
|
-
t3.$watch(e3, function(r3) {
|
|
6354
|
-
if ("data" === e3 && Array.isArray(t3.control.data) && Array.isArray(r3) && t3.control.data.length === r3.length && r3.every(function(e4, r4) {
|
|
6355
|
-
return e4 === t3.control.data[r4];
|
|
6356
|
-
}))
|
|
6357
|
-
return false;
|
|
6358
|
-
switch (e3) {
|
|
6359
|
-
case "data":
|
|
6360
|
-
case "dataLabel":
|
|
6361
|
-
case "dataValue":
|
|
6362
|
-
t3.control.data = t3.sliderData;
|
|
6363
|
-
break;
|
|
6364
|
-
case "mark":
|
|
6365
|
-
t3.control.marks = t3.sliderMarks;
|
|
6366
|
-
break;
|
|
6367
|
-
default:
|
|
6368
|
-
t3.control[e3] = r3;
|
|
6369
|
-
}
|
|
6370
|
-
["data", "max", "min", "interval"].indexOf(e3) > -1 && t3.control.syncDotsPos();
|
|
6371
|
-
});
|
|
6372
|
-
});
|
|
6373
|
-
}, syncValueByPos: function() {
|
|
6374
|
-
var t3 = this.control.dotsValue;
|
|
6375
|
-
if (this.isDiff(t3, Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue])) {
|
|
6376
|
-
var e3 = 1 === t3.length ? t3[0] : et(t3);
|
|
6377
|
-
this.$emit("change", e3, this.focusDotIndex), this.$emit("update:modelValue", e3);
|
|
6378
|
-
}
|
|
6379
|
-
}, isDiff: function(t3, e3) {
|
|
6380
|
-
return t3.length !== e3.length || t3.some(function(t4, r3) {
|
|
6381
|
-
return t4 !== e3[r3];
|
|
6382
|
-
});
|
|
6383
|
-
}, emitError: function(t3, e3) {
|
|
6384
|
-
this.silent || console.error("[VueSlider error]: ".concat(e3)), this.$emit("error", t3, e3);
|
|
6385
|
-
}, dragStartOnProcess: function(t3) {
|
|
6386
|
-
if (this.dragOnClick) {
|
|
6387
|
-
this.setScale();
|
|
6388
|
-
var e3 = this.getPosByEvent(t3), r3 = this.control.getRecentDot(e3);
|
|
6389
|
-
if (this.dots[r3].disabled)
|
|
6390
|
-
return;
|
|
6391
|
-
this.dragStart(r3), this.control.setDotPos(e3, this.focusDotIndex), this.lazy || this.syncValueByPos();
|
|
6392
|
-
}
|
|
6393
|
-
}, dragStart: function(t3) {
|
|
6394
|
-
this.focusDotIndex = t3, this.setScale(), this.states.add(mt.Drag), this.states.add(mt.Focus), this.$emit("drag-start", this.focusDotIndex);
|
|
6395
|
-
}, dragMove: function(t3) {
|
|
6396
|
-
if (!this.states.has(mt.Drag))
|
|
6397
|
-
return false;
|
|
6398
|
-
t3.preventDefault();
|
|
6399
|
-
var e3 = this.getPosByEvent(t3);
|
|
6400
|
-
this.isCrossDot(e3), this.control.setDotPos(e3, this.focusDotIndex), this.lazy || this.syncValueByPos();
|
|
6401
|
-
var r3 = this.control.dotsValue;
|
|
6402
|
-
this.$emit("dragging", 1 === r3.length ? r3[0] : et(r3), this.focusDotIndex);
|
|
6403
|
-
}, isCrossDot: function(t3) {
|
|
6404
|
-
if (this.canSort) {
|
|
6405
|
-
var e3 = this.focusDotIndex, r3 = t3;
|
|
6406
|
-
if (r3 > this.dragRange[1] ? (r3 = this.dragRange[1], this.focusDotIndex++) : r3 < this.dragRange[0] && (r3 = this.dragRange[0], this.focusDotIndex--), e3 !== this.focusDotIndex) {
|
|
6407
|
-
var n2 = this.$refs["dot-".concat(this.focusDotIndex)];
|
|
6408
|
-
n2 && n2.$el && n2.$el.focus(), this.control.setDotPos(r3, e3);
|
|
6409
|
-
}
|
|
6410
|
-
}
|
|
6411
|
-
}, dragEnd: function(t3) {
|
|
6412
|
-
var e3 = this;
|
|
6413
|
-
if (!this.states.has(mt.Drag))
|
|
6414
|
-
return false;
|
|
6415
|
-
setTimeout(function() {
|
|
6416
|
-
e3.lazy && e3.syncValueByPos(), e3.included && e3.isNotSync ? e3.control.setValue(e3.modelValue) : e3.control.syncDotsPos(), e3.states.delete(mt.Drag), e3.useKeyboard && !("targetTouches" in t3) || e3.states.delete(mt.Focus), e3.$emit("drag-end", e3.focusDotIndex);
|
|
6417
|
-
});
|
|
6418
|
-
}, blurHandle: function(t3) {
|
|
6419
|
-
if (!this.states.has(mt.Focus) || !this.$refs.container || this.$refs.container.contains(t3.target))
|
|
6420
|
-
return false;
|
|
6421
|
-
this.states.delete(mt.Focus);
|
|
6422
|
-
}, clickHandle: function(t3) {
|
|
6423
|
-
if (!this.clickable || this.disabled)
|
|
6424
|
-
return false;
|
|
6425
|
-
if (!this.states.has(mt.Drag)) {
|
|
6426
|
-
this.setScale();
|
|
6427
|
-
var e3 = this.getPosByEvent(t3);
|
|
6428
|
-
this.setValueByPos(e3);
|
|
6429
|
-
}
|
|
6430
|
-
}, focus: function(t3) {
|
|
6431
|
-
var e3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
|
|
6432
|
-
t3.disabled || (this.states.add(mt.Focus), this.focusDotIndex = e3);
|
|
6433
|
-
}, blur: function() {
|
|
6434
|
-
this.states.delete(mt.Focus);
|
|
6435
|
-
}, getValue: function() {
|
|
6436
|
-
var t3 = this.control.dotsValue;
|
|
6437
|
-
return 1 === t3.length ? t3[0] : t3;
|
|
6438
|
-
}, getIndex: function() {
|
|
6439
|
-
var t3 = this.control.dotsIndex;
|
|
6440
|
-
return 1 === t3.length ? t3[0] : t3;
|
|
6441
|
-
}, setValue: function(t3) {
|
|
6442
|
-
this.control.setValue(Array.isArray(t3) ? et(t3) : [t3]), this.syncValueByPos();
|
|
6443
|
-
}, setIndex: function(t3) {
|
|
6444
|
-
var e3 = this, r3 = Array.isArray(t3) ? t3.map(function(t4) {
|
|
6445
|
-
return e3.control.getValueByIndex(t4);
|
|
6446
|
-
}) : this.control.getValueByIndex(t3);
|
|
6447
|
-
this.setValue(r3);
|
|
6448
|
-
}, setValueByPos: function(t3) {
|
|
6449
|
-
var e3 = this, r3 = this.control.getRecentDot(t3);
|
|
6450
|
-
if (this.disabled || this.dots[r3].disabled)
|
|
6451
|
-
return false;
|
|
6452
|
-
this.focusDotIndex = r3, this.control.setDotPos(t3, r3), this.syncValueByPos(), this.useKeyboard && this.states.add(mt.Focus), setTimeout(function() {
|
|
6453
|
-
e3.included && e3.isNotSync ? e3.control.setValue(e3.modelValue) : e3.control.syncDotsPos();
|
|
6454
|
-
});
|
|
6455
|
-
}, keydownHandle: function(t3) {
|
|
6456
|
-
var e3 = this;
|
|
6457
|
-
if (!this.useKeyboard || !this.states.has(mt.Focus))
|
|
6458
|
-
return false;
|
|
6459
|
-
var r3 = this.included && this.marks, n2 = w(t3, { direction: this.direction, max: r3 ? this.control.markList.length - 1 : this.control.total, min: 0, hook: this.keydownHook });
|
|
6460
|
-
if (n2) {
|
|
6461
|
-
t3.preventDefault();
|
|
6462
|
-
var i2 = -1, o2 = 0;
|
|
6463
|
-
r3 ? (this.control.markList.some(function(t4, r4) {
|
|
6464
|
-
return t4.value === e3.control.dotsValue[e3.focusDotIndex] && (i2 = n2(r4), true);
|
|
6465
|
-
}), i2 < 0 ? i2 = 0 : i2 > this.control.markList.length - 1 && (i2 = this.control.markList.length - 1), o2 = this.control.markList[i2].pos) : (i2 = n2(this.control.getIndexByValue(this.control.dotsValue[this.focusDotIndex])), o2 = this.control.parseValue(this.control.getValueByIndex(i2))), this.isCrossDot(o2), this.control.setDotPos(o2, this.focusDotIndex), this.syncValueByPos();
|
|
6466
|
-
}
|
|
6467
|
-
}, getPosByEvent: function(t3) {
|
|
6468
|
-
return P(t3, this.$el, this.isReverse, this.zoom)[this.isHorizontal ? "x" : "y"] / this.scale;
|
|
6469
|
-
}, renderSlot: function(t3, e3, r3) {
|
|
6470
|
-
var n2 = this.$slots[t3];
|
|
6471
|
-
return n2 ? n2(e3) : r3;
|
|
6472
|
-
} }, created: function() {
|
|
6473
|
-
this.initControl();
|
|
6474
|
-
}, mounted: function() {
|
|
6475
|
-
this.bindEvent();
|
|
6476
|
-
}, beforeUnmount: function() {
|
|
6477
|
-
this.unbindEvent();
|
|
6478
|
-
} });
|
|
6479
|
-
const bt = (0, f.Z)(yt, [["render", l]]);
|
|
6480
|
-
var gt = bt;
|
|
6481
|
-
gt.VueSliderMark = k, gt.VueSliderDot = m;
|
|
6482
|
-
var kt = gt, St = kt;
|
|
6483
|
-
}(), i = i["default"], i;
|
|
6484
|
-
}();
|
|
6485
|
-
});
|
|
6486
|
-
})(vueSliderComponent_umd_min);
|
|
6487
|
-
var vueSliderComponent_umd_minExports = vueSliderComponent_umd_min.exports;
|
|
6488
|
-
const VueSlider = /* @__PURE__ */ getDefaultExportFromCjs(vueSliderComponent_umd_minExports);
|
|
6489
5355
|
const _hoisted_1$F = { class: "lupa-search-result-facet-stats-values" };
|
|
6490
5356
|
const _hoisted_2$r = {
|
|
6491
5357
|
key: 0,
|
|
@@ -8794,7 +7660,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
8794
7660
|
label,
|
|
8795
7661
|
similarQuery
|
|
8796
7662
|
}, null, 8, ["label", "similarQuery"])
|
|
8797
|
-
], 8, _hoisted_4$2)) : (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(label), 1))
|
|
7663
|
+
], 8, _hoisted_4$2)) : (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(label) + " ", 1))
|
|
8798
7664
|
]);
|
|
8799
7665
|
}), 128)) : (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
8800
7666
|
createElementVNode("span", _hoisted_7, toDisplayString(_ctx.labels.aiSuggestions), 1)
|
|
@@ -9332,7 +8198,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9332
8198
|
props.options.sort,
|
|
9333
8199
|
defaultSearchResultPageSize.value
|
|
9334
8200
|
);
|
|
9335
|
-
console.log(publicQuery);
|
|
9336
8201
|
searchResultStore.setLoading(true);
|
|
9337
8202
|
query(getPublicQuery(publicQuery, initialFilters.value, props.isProductList));
|
|
9338
8203
|
};
|
|
@@ -9356,7 +8221,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9356
8221
|
watch(searchString, () => handleParamsChange());
|
|
9357
8222
|
const handleParamsChange = () => {
|
|
9358
8223
|
var _a, _b;
|
|
9359
|
-
console.log("params change");
|
|
9360
8224
|
handleUrlChange();
|
|
9361
8225
|
(_b = (_a = props.options.callbacks) == null ? void 0 : _a.onUrlQueryChange) == null ? void 0 : _b.call(_a, {
|
|
9362
8226
|
queryKey: props.options.queryKey,
|
|
@@ -9501,6 +8365,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
9501
8365
|
};
|
|
9502
8366
|
}
|
|
9503
8367
|
});
|
|
8368
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
9504
8369
|
var lodash = { exports: {} };
|
|
9505
8370
|
/**
|
|
9506
8371
|
* @license
|
|
@@ -14283,7 +13148,7 @@ lodash.exports;
|
|
|
14283
13148
|
}
|
|
14284
13149
|
return result2 + omission;
|
|
14285
13150
|
}
|
|
14286
|
-
function
|
|
13151
|
+
function unescape(string) {
|
|
14287
13152
|
string = toString(string);
|
|
14288
13153
|
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|
14289
13154
|
}
|
|
@@ -14797,7 +13662,7 @@ lodash.exports;
|
|
|
14797
13662
|
lodash2.trimEnd = trimEnd;
|
|
14798
13663
|
lodash2.trimStart = trimStart;
|
|
14799
13664
|
lodash2.truncate = truncate;
|
|
14800
|
-
lodash2.unescape =
|
|
13665
|
+
lodash2.unescape = unescape;
|
|
14801
13666
|
lodash2.uniqueId = uniqueId;
|
|
14802
13667
|
lodash2.upperCase = upperCase;
|
|
14803
13668
|
lodash2.upperFirst = upperFirst;
|
|
@@ -15012,7 +13877,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
15012
13877
|
const innerClick = () => {
|
|
15013
13878
|
};
|
|
15014
13879
|
const reloadOptions = () => {
|
|
15015
|
-
console.log("reloading options", fullSearchResultsOptions.value);
|
|
15016
13880
|
setTimeout(() => {
|
|
15017
13881
|
optionsStore.setSearchResultOptions({ options: fullSearchResultsOptions.value });
|
|
15018
13882
|
});
|
|
@@ -15886,8 +14750,15 @@ const setupTracking = (options) => {
|
|
|
15886
14750
|
initTracking(options);
|
|
15887
14751
|
store.setTrackingOptions({ options });
|
|
15888
14752
|
};
|
|
14753
|
+
const LupaSearch = {
|
|
14754
|
+
install: (app, options) => {
|
|
14755
|
+
const pinia = createPinia();
|
|
14756
|
+
app.use(pinia);
|
|
14757
|
+
}
|
|
14758
|
+
};
|
|
15889
14759
|
export {
|
|
15890
14760
|
DocumentElementType,
|
|
14761
|
+
LupaSearch,
|
|
15891
14762
|
_sfc_main$2 as ProductList,
|
|
15892
14763
|
_sfc_main as Recommendations,
|
|
15893
14764
|
_sfc_main$R as SearchBox,
|