vuefinder 1.1.16 → 1.1.17
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/vuefinder.js +502 -502
- package/dist/vuefinder.umd.cjs +5 -5
- package/package.json +1 -1
package/dist/vuefinder.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
1
|
+
import { ref as L, watch as It, inject as j, openBlock as y, createElementBlock as S, createElementVNode as u, unref as x, normalizeClass as he, createTextVNode as ie, toDisplayString as M, createCommentVNode as X, createVNode as De, TransitionGroup as Wa, withCtx as q, Fragment as ue, renderList as ke, reactive as Mt, onMounted as Ce, onUpdated as Xa, withDirectives as _e, vShow as kt, withModifiers as Ke, nextTick as Lt, isRef as ho, vModelSelect as Br, customRef as qa, withKeys as st, vModelText as it, normalizeStyle as fo, provide as Be, createBlock as J, resolveDynamicComponent as Ga, renderSlot as Yt } from "vue";
|
|
2
|
+
import ct from "plupload";
|
|
3
3
|
var uo;
|
|
4
|
-
const
|
|
4
|
+
const Et = (uo = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : uo.getAttribute("content"), Tt = (t, { method: e = "get", params: r = {}, json: o = !0, signal: i = null }) => {
|
|
5
5
|
const a = { method: e };
|
|
6
6
|
if (a.signal = i, e == "get")
|
|
7
7
|
t += "?" + new URLSearchParams(r);
|
|
8
8
|
else {
|
|
9
|
-
a.headers = {},
|
|
9
|
+
a.headers = {}, Et && (a.headers["X-CSRF-Token"] = Et);
|
|
10
10
|
let n = new FormData();
|
|
11
11
|
for (const [m, g] of Object.entries(r))
|
|
12
12
|
n.append(m, g);
|
|
@@ -32,8 +32,8 @@ function Ja(t) {
|
|
|
32
32
|
}
|
|
33
33
|
function Wt(t) {
|
|
34
34
|
let e = localStorage.getItem(t + "_storage");
|
|
35
|
-
const r =
|
|
36
|
-
|
|
35
|
+
const r = L(JSON.parse(e));
|
|
36
|
+
It(r, o);
|
|
37
37
|
function o() {
|
|
38
38
|
r.value === null || r.value === "" ? localStorage.removeItem(t + "_storage") : localStorage.setItem(t + "_storage", JSON.stringify(r.value));
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ function Wt(t) {
|
|
|
45
45
|
}
|
|
46
46
|
return { getStore: (m, g = null) => r.value === null || r.value === "" ? g : r.value.hasOwnProperty(m) ? r.value[m] : g, setStore: i, clearStore: a };
|
|
47
47
|
}
|
|
48
|
-
const Hr =
|
|
48
|
+
const Hr = L("");
|
|
49
49
|
function Te() {
|
|
50
50
|
function t(e) {
|
|
51
51
|
Hr.value = e;
|
|
@@ -187,7 +187,7 @@ const Za = { class: "border-neutral-300 flex justify-between items-center py-1 t
|
|
|
187
187
|
data: Object
|
|
188
188
|
},
|
|
189
189
|
setup(t) {
|
|
190
|
-
const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), { t: i } = j("i18n"), a =
|
|
190
|
+
const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), { t: i } = j("i18n"), a = L(r("viewport", "grid")), n = L([]), m = L(r("full-screen", !1)), g = L("");
|
|
191
191
|
e.on("vf-search-query", ({ newQuery: b }) => {
|
|
192
192
|
g.value = b;
|
|
193
193
|
});
|
|
@@ -427,8 +427,8 @@ var Bs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
427
427
|
return p() ? b = Reflect.construct : b = function(c, w, _) {
|
|
428
428
|
var k = [null];
|
|
429
429
|
k.push.apply(k, w);
|
|
430
|
-
var $ = Function.bind.apply(c, k),
|
|
431
|
-
return _ && h(
|
|
430
|
+
var $ = Function.bind.apply(c, k), P = new $();
|
|
431
|
+
return _ && h(P, _.prototype), P;
|
|
432
432
|
}, b.apply(null, arguments);
|
|
433
433
|
}
|
|
434
434
|
function E(d) {
|
|
@@ -459,15 +459,15 @@ var Bs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
459
459
|
}), h(c, v);
|
|
460
460
|
}, D(d);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function T(d) {
|
|
463
463
|
if (d === void 0)
|
|
464
464
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
465
465
|
return d;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
return l && (typeof l == "object" || typeof l == "function") ? l :
|
|
467
|
+
function I(d, l) {
|
|
468
|
+
return l && (typeof l == "object" || typeof l == "function") ? l : T(d);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function U(d) {
|
|
471
471
|
var l = p();
|
|
472
472
|
return function() {
|
|
473
473
|
var v = f(d), c;
|
|
@@ -476,17 +476,17 @@ var Bs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
476
476
|
c = Reflect.construct(v, arguments, w);
|
|
477
477
|
} else
|
|
478
478
|
c = v.apply(this, arguments);
|
|
479
|
-
return
|
|
479
|
+
return I(this, c);
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function H(d, l) {
|
|
483
483
|
for (; !Object.prototype.hasOwnProperty.call(d, l) && (d = f(d), d !== null); )
|
|
484
484
|
;
|
|
485
485
|
return d;
|
|
486
486
|
}
|
|
487
487
|
function N(d, l, s) {
|
|
488
488
|
return typeof Reflect < "u" && Reflect.get ? N = Reflect.get : N = function(c, w, _) {
|
|
489
|
-
var k =
|
|
489
|
+
var k = H(c, w);
|
|
490
490
|
if (!!k) {
|
|
491
491
|
var $ = Object.getOwnPropertyDescriptor(k, w);
|
|
492
492
|
return $.get ? $.get.call(_) : $.value;
|
|
@@ -494,7 +494,7 @@ var Bs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
494
494
|
}, N(d, l, s || d);
|
|
495
495
|
}
|
|
496
496
|
function W(d, l) {
|
|
497
|
-
return
|
|
497
|
+
return V(d) || ne(d, l) || le(d, l) || be();
|
|
498
498
|
}
|
|
499
499
|
function K(d) {
|
|
500
500
|
return C(d) || Q(d) || le(d) || we();
|
|
@@ -503,7 +503,7 @@ var Bs = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
503
503
|
if (Array.isArray(d))
|
|
504
504
|
return fe(d);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function V(d) {
|
|
507
507
|
if (Array.isArray(d))
|
|
508
508
|
return d;
|
|
509
509
|
}
|
|
@@ -575,12 +575,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
return $[s];
|
|
578
|
-
},
|
|
578
|
+
}, O = function(l) {
|
|
579
579
|
return {
|
|
580
580
|
x: l.left,
|
|
581
581
|
y: l.top
|
|
582
582
|
};
|
|
583
|
-
},
|
|
583
|
+
}, B = function(l) {
|
|
584
584
|
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
585
585
|
return {
|
|
586
586
|
left: l.x,
|
|
@@ -590,7 +590,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
590
590
|
width: s,
|
|
591
591
|
height: s
|
|
592
592
|
};
|
|
593
|
-
},
|
|
593
|
+
}, z = function(l) {
|
|
594
594
|
return {
|
|
595
595
|
x: l,
|
|
596
596
|
y: l
|
|
@@ -611,7 +611,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
611
611
|
}, re = function(d) {
|
|
612
612
|
var l = document.createElement("div");
|
|
613
613
|
return l.style.position = "absolute", d || (l.style.background = "rgba(0, 0, 255, 0.1)", l.style.border = "1px solid rgba(0, 0, 255, 0.45)", l.style.display = "none", l.style.pointerEvents = "none"), l;
|
|
614
|
-
},
|
|
614
|
+
}, xt = function(d, l) {
|
|
615
615
|
var s;
|
|
616
616
|
return function() {
|
|
617
617
|
for (var v = arguments.length, c = new Array(v), w = 0; w < v; w++)
|
|
@@ -627,7 +627,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
627
627
|
y: ((d = document.body) === null || d === void 0 ? void 0 : d.scrollTop) || ((l = document.documentElement) === null || l === void 0 ? void 0 : l.scrollTop) || 0,
|
|
628
628
|
x: ((s = document.body) === null || s === void 0 ? void 0 : s.scrollLeft) || ((v = document.documentElement) === null || v === void 0 ? void 0 : v.scrollLeft) || 0
|
|
629
629
|
};
|
|
630
|
-
},
|
|
630
|
+
}, Rt = function(d, l) {
|
|
631
631
|
if (d instanceof Document)
|
|
632
632
|
return {
|
|
633
633
|
top: 0,
|
|
@@ -683,8 +683,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
683
683
|
} else {
|
|
684
684
|
var k = v.transform.trim().match(/matrix\((.*?)\)/);
|
|
685
685
|
if (k && k.length) {
|
|
686
|
-
var $,
|
|
687
|
-
s.x = parseInt(
|
|
686
|
+
var $, P = ($ = k[1]) === null || $ === void 0 ? void 0 : $.split(",");
|
|
687
|
+
s.x = parseInt(P[4]) || 0, s.y = parseInt(P[5]) || 0;
|
|
688
688
|
}
|
|
689
689
|
return s;
|
|
690
690
|
}
|
|
@@ -738,11 +738,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
738
738
|
var l = d.computedStyle, s = d.node, v = l.position, c = v === "absolute" || v === "relative" || v === "fixed";
|
|
739
739
|
!(s instanceof HTMLDocument) && !c && (s.style.position = "relative");
|
|
740
740
|
}, ha = function(d) {
|
|
741
|
-
var l = d.shiftKey, s = d.keyboardDragSpeed, v = d.zoom, c = d.key, w = d.dragKeys, _ = d.scrollDiff, k = d.canScroll, $ = d.scrollCallback,
|
|
741
|
+
var l = d.shiftKey, s = d.keyboardDragSpeed, v = d.zoom, c = d.key, w = d.dragKeys, _ = d.scrollDiff, k = d.canScroll, $ = d.scrollCallback, P = {
|
|
742
742
|
x: 0,
|
|
743
743
|
y: 0
|
|
744
|
-
},
|
|
745
|
-
return w.left.includes(c) && (
|
|
744
|
+
}, A = l ? s * 4 * v : s * v;
|
|
745
|
+
return w.left.includes(c) && (P.x = _.x || -A, !l && !_.x && k && $(["left"], s)), w.right.includes(c) && (P.x = _.x || A, !l && !_.x && k && $(["right"], s)), w.up.includes(c) && (P.y = _.y || -A, !l && !_.y && k && $(["top"], s)), w.down.includes(c) && (P.y = _.y || A, !l && !_.y && k && $(["bottom"], s)), P;
|
|
746
746
|
}, fa = function(d) {
|
|
747
747
|
var l = d.element, s = d.force, v = d.multiSelectionToggle, c = d.SelectedSet, w = d.hoverClassName;
|
|
748
748
|
l.classList.contains(w) && !s || (c.has(l) ? v && c.delete(l) : c.add(l), l.classList.add(w));
|
|
@@ -752,7 +752,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
752
752
|
return !1;
|
|
753
753
|
var _ = v.has(l), k = c.has(l);
|
|
754
754
|
_ && !k ? v.delete(l) : !_ && k && v.add(l), l.classList.remove(w);
|
|
755
|
-
},
|
|
755
|
+
}, Bt = function(d, l) {
|
|
756
756
|
return d.left < l.right && d.right > l.left && d.top < l.bottom && d.bottom > l.top;
|
|
757
757
|
}, Sr = function(d) {
|
|
758
758
|
var l = d.element, s = d.posDirection, v = d.containerRect, c = d.useTransform, w = ua(l, c), _ = Z(w, "+", s);
|
|
@@ -799,17 +799,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
799
799
|
}],
|
|
800
800
|
"Interaction:update": [{
|
|
801
801
|
name: "dragmove",
|
|
802
|
-
condition: function(
|
|
803
|
-
return
|
|
802
|
+
condition: function(A) {
|
|
803
|
+
return A.event;
|
|
804
804
|
}
|
|
805
805
|
}],
|
|
806
806
|
"Interaction:end": [{
|
|
807
807
|
name: "callback"
|
|
808
808
|
}]
|
|
809
809
|
}, _ = function() {
|
|
810
|
-
var
|
|
810
|
+
var A = W($[k], 2), R = A[0], F = A[1];
|
|
811
811
|
["pre", !1].forEach(function(oe) {
|
|
812
|
-
return l(oe ? "".concat(
|
|
812
|
+
return l(oe ? "".concat(R, ":").concat(oe) : R, function(ye) {
|
|
813
813
|
return F.forEach(function(ae) {
|
|
814
814
|
return (!ae.condition || ae.condition(ye)) && s(oe ? "".concat(oe).concat(ae.name) : ae.name, m({
|
|
815
815
|
items: c.elements,
|
|
@@ -850,7 +850,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
850
850
|
scroll_multiplier: k
|
|
851
851
|
};
|
|
852
852
|
s.PubSub.publish("Area:scroll:pre", $), pa(s._node, _, k), s.PubSub.publish("Area:scroll", $);
|
|
853
|
-
}), this._zoom = w, this.PubSub = c, this.setArea(v), this._modificationCallback =
|
|
853
|
+
}), this._zoom = w, this.PubSub = c, this.setArea(v), this._modificationCallback = xt(function(_) {
|
|
854
854
|
s.PubSub.publish("Area:modified:pre", {
|
|
855
855
|
event: _,
|
|
856
856
|
item: s
|
|
@@ -883,7 +883,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
883
883
|
}, {
|
|
884
884
|
key: "rect",
|
|
885
885
|
get: function() {
|
|
886
|
-
return this._rect ? this._rect : this._rect =
|
|
886
|
+
return this._rect ? this._rect : this._rect = Rt(this.HTMLNode, this._zoom);
|
|
887
887
|
}
|
|
888
888
|
}, {
|
|
889
889
|
key: "parentNodes",
|
|
@@ -899,12 +899,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
899
899
|
}]), d;
|
|
900
900
|
}(), ya = /* @__PURE__ */ function() {
|
|
901
901
|
function d(l) {
|
|
902
|
-
var s = this, v = l.DS, c = l.dragKeys, w = l.draggability, _ = l.keyboardDrag, k = l.keyboardDragSpeed, $ = l.useTransform,
|
|
903
|
-
r(this, d), a(this, "_useTransform", void 0), a(this, "_prevCursorPos", void 0), a(this, "_prevScrollPos", void 0), a(this, "_elements", []), a(this, "_draggability", void 0), a(this, "_dragKeys", void 0), a(this, "_dragKeysFlat", void 0), a(this, "_keyboardDrag", void 0), a(this, "_keyboardDragSpeed", void 0), a(this, "_zoom", void 0), a(this, "keyboardDrag", function(
|
|
904
|
-
var
|
|
902
|
+
var s = this, v = l.DS, c = l.dragKeys, w = l.draggability, _ = l.keyboardDrag, k = l.keyboardDragSpeed, $ = l.useTransform, P = l.zoom;
|
|
903
|
+
r(this, d), a(this, "_useTransform", void 0), a(this, "_prevCursorPos", void 0), a(this, "_prevScrollPos", void 0), a(this, "_elements", []), a(this, "_draggability", void 0), a(this, "_dragKeys", void 0), a(this, "_dragKeysFlat", void 0), a(this, "_keyboardDrag", void 0), a(this, "_keyboardDragSpeed", void 0), a(this, "_zoom", void 0), a(this, "keyboardDrag", function(A) {
|
|
904
|
+
var R = A.event, F = A.key;
|
|
905
905
|
if (!(!s._keyboardDrag || !s._dragKeysFlat.includes(F) || !s.DS.SelectedSet.size || !s._draggability || s.DS.continue)) {
|
|
906
906
|
var oe = {
|
|
907
|
-
event:
|
|
907
|
+
event: R,
|
|
908
908
|
isDragging: !0,
|
|
909
909
|
isDraggingKeyboard: !0
|
|
910
910
|
};
|
|
@@ -928,24 +928,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
928
928
|
});
|
|
929
929
|
}), s.DS.publish(["Interaction:update:pre", "Interaction:update"], oe);
|
|
930
930
|
}
|
|
931
|
-
}), a(this, "keyboardEnd", function(
|
|
932
|
-
var
|
|
931
|
+
}), a(this, "keyboardEnd", function(A) {
|
|
932
|
+
var R = A.event, F = A.key;
|
|
933
933
|
if (!(!s._keyboardDrag || !s._dragKeysFlat.includes(F) || !s.DS.SelectedSet.size || !s._draggability)) {
|
|
934
934
|
var oe = {
|
|
935
|
-
event:
|
|
935
|
+
event: R,
|
|
936
936
|
isDragging: s._draggability,
|
|
937
937
|
isDraggingKeyboard: !0
|
|
938
938
|
};
|
|
939
939
|
s.DS.publish(["Interaction:end:pre", "Interaction:end"], oe);
|
|
940
940
|
}
|
|
941
|
-
}), a(this, "start", function(
|
|
942
|
-
var
|
|
943
|
-
!
|
|
944
|
-
}), a(this, "stop", function(
|
|
945
|
-
|
|
946
|
-
}), a(this, "update", function(
|
|
947
|
-
var
|
|
948
|
-
if (!(!
|
|
941
|
+
}), a(this, "start", function(A) {
|
|
942
|
+
var R = A.isDragging, F = A.isDraggingKeyboard;
|
|
943
|
+
!R || F || (s._prevCursorPos = null, s._prevScrollPos = null, s._elements = s.DS.getSelection(), s.handleZIndex(!0));
|
|
944
|
+
}), a(this, "stop", function(A) {
|
|
945
|
+
A != null && A.isKeyboard || (s._prevCursorPos = null, s._prevScrollPos = null, s.handleZIndex(!1), s._elements = []);
|
|
946
|
+
}), a(this, "update", function(A) {
|
|
947
|
+
var R = A.isDragging, F = A.isDraggingKeyboard;
|
|
948
|
+
if (!(!R || !s._elements.length || F || s.DS.continue)) {
|
|
949
949
|
var oe = Z(s._cursorDiff, "+", s._scrollDiff);
|
|
950
950
|
s._elements.forEach(function(ye) {
|
|
951
951
|
return Sr({
|
|
@@ -956,22 +956,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
956
956
|
});
|
|
957
957
|
});
|
|
958
958
|
}
|
|
959
|
-
}), a(this, "handleZIndex", function(
|
|
960
|
-
s._elements.forEach(function(
|
|
961
|
-
return
|
|
959
|
+
}), a(this, "handleZIndex", function(A) {
|
|
960
|
+
s._elements.forEach(function(R) {
|
|
961
|
+
return R.style.zIndex = "".concat((parseInt(R.style.zIndex) || 0) + A ? 9999 : -9998);
|
|
962
962
|
});
|
|
963
|
-
}), this.DS = v, this._useTransform = $, this._keyboardDragSpeed = k, this._keyboardDrag = _, this._zoom =
|
|
964
|
-
up: c.up.map(function(
|
|
965
|
-
return
|
|
963
|
+
}), this.DS = v, this._useTransform = $, this._keyboardDragSpeed = k, this._keyboardDrag = _, this._zoom = P, this._draggability = w, this._dragKeys = {
|
|
964
|
+
up: c.up.map(function(A) {
|
|
965
|
+
return A.toLowerCase();
|
|
966
966
|
}),
|
|
967
|
-
down: c.down.map(function(
|
|
968
|
-
return
|
|
967
|
+
down: c.down.map(function(A) {
|
|
968
|
+
return A.toLowerCase();
|
|
969
969
|
}),
|
|
970
|
-
left: c.left.map(function(
|
|
971
|
-
return
|
|
970
|
+
left: c.left.map(function(A) {
|
|
971
|
+
return A.toLowerCase();
|
|
972
972
|
}),
|
|
973
|
-
right: c.right.map(function(
|
|
974
|
-
return
|
|
973
|
+
right: c.right.map(function(A) {
|
|
974
|
+
return A.toLowerCase();
|
|
975
975
|
})
|
|
976
976
|
}, this._dragKeysFlat = [].concat(K(this._dragKeys.up), K(this._dragKeys.down), K(this._dragKeys.left), K(this._dragKeys.right)), this.DS.subscribe("Interaction:start", this.start), this.DS.subscribe("Interaction:end", this.stop), this.DS.subscribe("Interaction:update", this.update), this.DS.subscribe("KeyStore:down", this.keyboardDrag), this.DS.subscribe("KeyStore:up", this.keyboardEnd);
|
|
977
977
|
}
|
|
@@ -1014,30 +1014,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1014
1014
|
isDragging: s.isDragging
|
|
1015
1015
|
}), document.addEventListener("mouseup", s.reset), document.addEventListener("touchend", s.reset));
|
|
1016
1016
|
}), a(this, "isDragEvent", function($) {
|
|
1017
|
-
var
|
|
1018
|
-
return !s._draggability || s.DS.stores.KeyStore.isMultiSelectKeyPressed($) || !
|
|
1019
|
-
|
|
1017
|
+
var P = $.target.closest(".".concat(s._selectableClass));
|
|
1018
|
+
return !s._draggability || s.DS.stores.KeyStore.isMultiSelectKeyPressed($) || !P ? !1 : (s._immediateDrag && (s.DS.SelectedSet.size ? s.DS.SelectedSet.has(P) || (s.DS.SelectedSet.clear(), s.DS.SelectedSet.add(
|
|
1019
|
+
P
|
|
1020
1020
|
)) : s.DS.SelectedSet.add(
|
|
1021
|
-
|
|
1022
|
-
)), !!s.DS.SelectedSet.has(
|
|
1021
|
+
P
|
|
1022
|
+
)), !!s.DS.SelectedSet.has(P));
|
|
1023
1023
|
}), a(this, "onClick", function($) {
|
|
1024
|
-
var
|
|
1025
|
-
if (!!s._canInteract(
|
|
1026
|
-
var
|
|
1027
|
-
F.start(
|
|
1028
|
-
var Ze =
|
|
1029
|
-
!ye.has(Ze) || (oe.isMultiSelectKeyPressed(
|
|
1024
|
+
var P = $.event;
|
|
1025
|
+
if (!!s._canInteract(P) && !(P.detail > 0)) {
|
|
1026
|
+
var A = s.DS, R = A.stores, F = R.PointerStore, oe = R.KeyStore, ye = A.SelectableSet, ae = A.SelectedSet;
|
|
1027
|
+
F.start(P);
|
|
1028
|
+
var Ze = P.target;
|
|
1029
|
+
!ye.has(Ze) || (oe.isMultiSelectKeyPressed(P) || ae.clear(), ae.toggle(Ze), s.reset());
|
|
1030
1030
|
}
|
|
1031
1031
|
}), a(this, "stop", function() {
|
|
1032
1032
|
s.isInteracting = !1, s.isDragging = !1, s._areaElement.removeEventListener("mousedown", s.start), s._areaElement.removeEventListener("touchstart", s.start, {
|
|
1033
1033
|
passive: !1
|
|
1034
1034
|
}), document.removeEventListener("mouseup", s.reset), document.removeEventListener("touchend", s.reset);
|
|
1035
1035
|
}), a(this, "update", function($) {
|
|
1036
|
-
var
|
|
1036
|
+
var P = $.event, A = $.scroll_directions, R = $.scroll_multiplier;
|
|
1037
1037
|
s.isInteracting && s.DS.publish(["Interaction:update:pre", "Interaction:update"], {
|
|
1038
|
-
event:
|
|
1039
|
-
scroll_directions:
|
|
1040
|
-
scroll_multiplier:
|
|
1038
|
+
event: P,
|
|
1039
|
+
scroll_directions: A,
|
|
1040
|
+
scroll_multiplier: R,
|
|
1041
1041
|
isDragging: s.isDragging
|
|
1042
1042
|
});
|
|
1043
1043
|
}), a(this, "reset", function($) {
|
|
@@ -1046,20 +1046,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1046
1046
|
isDragging: s.isDragging
|
|
1047
1047
|
});
|
|
1048
1048
|
}), a(this, "_reset", function($) {
|
|
1049
|
-
var
|
|
1049
|
+
var P = s.isDragging;
|
|
1050
1050
|
s.stop(), s.init(), s.DS.publish("Interaction:end", {
|
|
1051
1051
|
event: $,
|
|
1052
|
-
isDragging:
|
|
1052
|
+
isDragging: P
|
|
1053
1053
|
});
|
|
1054
1054
|
}), this._areaElement = c, this._draggability = w, this._immediateDrag = _, this._selectableClass = k, this.DS = v, this.DS.subscribe("PointerStore:updated", this.update), this.DS.subscribe("Selectable:click", this.onClick), this.DS.subscribe("Selectable:pointer", function($) {
|
|
1055
|
-
var
|
|
1056
|
-
return s.start(
|
|
1055
|
+
var P = $.event;
|
|
1056
|
+
return s.start(P);
|
|
1057
1057
|
}), this.DS.subscribe("Interaction:start:pre", function($) {
|
|
1058
|
-
var
|
|
1059
|
-
return s._start(
|
|
1058
|
+
var P = $.event;
|
|
1059
|
+
return s._start(P);
|
|
1060
1060
|
}), this.DS.subscribe("Interaction:init:pre", this._init), this.DS.subscribe("Interaction:end:pre", function($) {
|
|
1061
|
-
var
|
|
1062
|
-
return s._reset(
|
|
1061
|
+
var P = $.event;
|
|
1062
|
+
return s._reset(P);
|
|
1063
1063
|
}), this.DS.subscribe("Area:scroll", this.update);
|
|
1064
1064
|
}
|
|
1065
1065
|
return i(d, [{
|
|
@@ -1101,34 +1101,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1101
1101
|
}), this.DS = v;
|
|
1102
1102
|
}, _a = /* @__PURE__ */ function(d) {
|
|
1103
1103
|
g(s, d);
|
|
1104
|
-
var l =
|
|
1104
|
+
var l = U(s);
|
|
1105
1105
|
function s(v) {
|
|
1106
|
-
var c, w = v.elements, _ = v.className, k = v.hoverClassName, $ = v.draggability,
|
|
1107
|
-
return r(this, s), c = l.call(this), a(
|
|
1108
|
-
return c._initElements.forEach(function(
|
|
1109
|
-
return c.add(
|
|
1106
|
+
var c, w = v.elements, _ = v.className, k = v.hoverClassName, $ = v.draggability, P = v.useTransform, A = v.DS;
|
|
1107
|
+
return r(this, s), c = l.call(this), a(T(c), "_initElements", void 0), a(T(c), "_className", void 0), a(T(c), "_hoverClassName", void 0), a(T(c), "_useTransform", void 0), a(T(c), "_draggability", void 0), a(T(c), "init", function() {
|
|
1108
|
+
return c._initElements.forEach(function(R) {
|
|
1109
|
+
return c.add(R);
|
|
1110
1110
|
});
|
|
1111
|
-
}), a(
|
|
1112
|
-
return c.forEach(function(
|
|
1113
|
-
return c.delete(
|
|
1111
|
+
}), a(T(c), "clear", function() {
|
|
1112
|
+
return c.forEach(function(R) {
|
|
1113
|
+
return c.delete(R);
|
|
1114
1114
|
});
|
|
1115
|
-
}), a(
|
|
1115
|
+
}), a(T(c), "_onClick", function(R) {
|
|
1116
1116
|
return c.DS.publish(["Selectable:click:pre", "Selectable:click"], {
|
|
1117
|
-
event:
|
|
1117
|
+
event: R
|
|
1118
1118
|
});
|
|
1119
|
-
}), a(
|
|
1119
|
+
}), a(T(c), "_onPointer", function(R) {
|
|
1120
1120
|
return c.DS.publish(["Selectable:pointer:pre", "Selectable:pointer"], {
|
|
1121
|
-
event:
|
|
1121
|
+
event: R
|
|
1122
1122
|
});
|
|
1123
|
-
}), a(
|
|
1124
|
-
return
|
|
1123
|
+
}), a(T(c), "addAll", function(R) {
|
|
1124
|
+
return R.forEach(function(F) {
|
|
1125
1125
|
return c.add(F);
|
|
1126
1126
|
});
|
|
1127
|
-
}), a(
|
|
1128
|
-
return
|
|
1127
|
+
}), a(T(c), "deleteAll", function(R) {
|
|
1128
|
+
return R.forEach(function(F) {
|
|
1129
1129
|
return c.delete(F);
|
|
1130
1130
|
});
|
|
1131
|
-
}), c.DS =
|
|
1131
|
+
}), c.DS = A, c._initElements = Je(w), c._className = _, c._hoverClassName = k, c._useTransform = P, c._draggability = $, c.DS.subscribe("Interaction:init", c.init), c;
|
|
1132
1132
|
}
|
|
1133
1133
|
return i(s, [{
|
|
1134
1134
|
key: "add",
|
|
@@ -1155,18 +1155,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1155
1155
|
}]), s;
|
|
1156
1156
|
}(/* @__PURE__ */ D(Set)), ka = /* @__PURE__ */ function(d) {
|
|
1157
1157
|
g(s, d);
|
|
1158
|
-
var l =
|
|
1158
|
+
var l = U(s);
|
|
1159
1159
|
function s(v) {
|
|
1160
1160
|
var c, w = v.className, _ = v.DS;
|
|
1161
|
-
return r(this, s), c = l.call(this), a(
|
|
1161
|
+
return r(this, s), c = l.call(this), a(T(c), "_className", void 0), a(T(c), "clear", function() {
|
|
1162
1162
|
return c.forEach(function(k) {
|
|
1163
1163
|
return c.delete(k);
|
|
1164
1164
|
});
|
|
1165
|
-
}), a(
|
|
1165
|
+
}), a(T(c), "addAll", function(k) {
|
|
1166
1166
|
return k.forEach(function($) {
|
|
1167
1167
|
return c.add($);
|
|
1168
1168
|
});
|
|
1169
|
-
}), a(
|
|
1169
|
+
}), a(T(c), "deleteAll", function(k) {
|
|
1170
1170
|
return k.forEach(function($) {
|
|
1171
1171
|
return c.delete($);
|
|
1172
1172
|
});
|
|
@@ -1217,16 +1217,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1217
1217
|
var k = _.isDragging;
|
|
1218
1218
|
k || s.DS.continue || s._handleInsideSelection();
|
|
1219
1219
|
}), a(this, "_handleInsideSelection", function(_, k) {
|
|
1220
|
-
for (var $ = s.DS,
|
|
1220
|
+
for (var $ = s.DS, P = $.SelectableSet, A = $.SelectorArea, R = $.Selector, F = P.elements.map(function(Le) {
|
|
1221
1221
|
return [Le, Le.getBoundingClientRect()];
|
|
1222
1222
|
}), oe = [], ye = [], ae = 0, Ze = F.length; ae < Ze; ae++)
|
|
1223
|
-
!
|
|
1224
|
-
var
|
|
1223
|
+
!A.isInside(F[ae][0], F[ae][1]) || (Bt(F[ae][1], R.rect) ? oe.push(F[ae][0]) : ye.push(F[ae][0]));
|
|
1224
|
+
var _t = s.DS.stores.KeyStore.isMultiSelectKeyPressed(k) && s._multiSelectToggling;
|
|
1225
1225
|
s.DS.continue || (oe.forEach(function(Le) {
|
|
1226
1226
|
return fa({
|
|
1227
1227
|
element: Le,
|
|
1228
1228
|
force: _,
|
|
1229
|
-
multiSelectionToggle:
|
|
1229
|
+
multiSelectionToggle: _t,
|
|
1230
1230
|
SelectedSet: s.DS.SelectedSet,
|
|
1231
1231
|
hoverClassName: s._hoverClassName
|
|
1232
1232
|
});
|
|
@@ -1254,18 +1254,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1254
1254
|
r(this, d), a(this, "_rect", void 0), a(this, "start", function(k) {
|
|
1255
1255
|
var $ = k.isDragging;
|
|
1256
1256
|
if (!$) {
|
|
1257
|
-
var
|
|
1258
|
-
Dr(s.HTMLNode,
|
|
1257
|
+
var P = s.DS.stores.PointerStore, A = P.initialValArea;
|
|
1258
|
+
Dr(s.HTMLNode, B(A, 1)), s.HTMLNode.style.display = "block", s._rect = null;
|
|
1259
1259
|
}
|
|
1260
1260
|
}), a(this, "stop", function() {
|
|
1261
1261
|
s.HTMLNode.style.width = "0", s.HTMLNode.style.height = "0", s.HTMLNode.style.display = "none";
|
|
1262
1262
|
}), a(this, "update", function(k) {
|
|
1263
1263
|
var $ = k.isDragging;
|
|
1264
1264
|
if (!($ || s.DS.continue)) {
|
|
1265
|
-
var
|
|
1266
|
-
scrollAmount:
|
|
1267
|
-
initialPointerPos:
|
|
1268
|
-
pointerPos:
|
|
1265
|
+
var P = s.DS.stores, A = P.ScrollStore, R = P.PointerStore, F = na({
|
|
1266
|
+
scrollAmount: A.scrollAmount,
|
|
1267
|
+
initialPointerPos: R.initialValArea,
|
|
1268
|
+
pointerPos: R.currentValArea
|
|
1269
1269
|
});
|
|
1270
1270
|
Dr(s.HTMLNode, F), s._rect = null;
|
|
1271
1271
|
}
|
|
@@ -1283,12 +1283,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1283
1283
|
r(this, d), a(this, "_autoScrollSpeed", void 0), a(this, "_scrollInterval", void 0), a(this, "_rect", void 0), a(this, "currentEdges", []), a(this, "_overflowTolerance", void 0), a(this, "start", function() {
|
|
1284
1284
|
return s.applyElements("append");
|
|
1285
1285
|
}), a(this, "applyElements", function() {
|
|
1286
|
-
var k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "append", $ = document.body ? "body" : "documentElement",
|
|
1287
|
-
s.HTMLNode[
|
|
1286
|
+
var k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "append", $ = document.body ? "body" : "documentElement", P = "".concat(k, "Child");
|
|
1287
|
+
s.HTMLNode[P](s.DS.Selector.HTMLNode), document[$][P](s.HTMLNode);
|
|
1288
1288
|
}), a(this, "updatePos", function() {
|
|
1289
1289
|
s._rect = null;
|
|
1290
|
-
var k = s.DS.Area.rect, $ = s.DS.Area.computedBorder,
|
|
1291
|
-
|
|
1290
|
+
var k = s.DS.Area.rect, $ = s.DS.Area.computedBorder, P = s.HTMLNode.style, A = "".concat(k.top + $.top, "px"), R = "".concat(k.left + $.left, "px"), F = "".concat(k.width, "px"), oe = "".concat(k.height, "px");
|
|
1291
|
+
P.top !== A && (P.top = A), P.left !== R && (P.left = R), P.width !== F && (P.width = F), P.height !== oe && (P.height = oe);
|
|
1292
1292
|
}), a(this, "stop", function(k) {
|
|
1293
1293
|
s.stopAutoScroll(), k && s.applyElements("remove");
|
|
1294
1294
|
}), a(this, "startAutoScroll", function() {
|
|
@@ -1297,17 +1297,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1297
1297
|
}, 16);
|
|
1298
1298
|
}), a(this, "handleAutoScroll", function() {
|
|
1299
1299
|
if (!s.DS.continue) {
|
|
1300
|
-
var k = s.DS, $ = k.stores.PointerStore,
|
|
1300
|
+
var k = s.DS, $ = k.stores.PointerStore, P = k.Area;
|
|
1301
1301
|
s.currentEdges = xr({
|
|
1302
|
-
elementRect:
|
|
1302
|
+
elementRect: B($.currentVal),
|
|
1303
1303
|
containerRect: s.rect,
|
|
1304
1304
|
tolerance: s._overflowTolerance
|
|
1305
|
-
}), s.currentEdges.length &&
|
|
1305
|
+
}), s.currentEdges.length && P.scroll(s.currentEdges, s._autoScrollSpeed);
|
|
1306
1306
|
}
|
|
1307
1307
|
}), a(this, "stopAutoScroll", function() {
|
|
1308
1308
|
s.currentEdges = [], clearInterval(s._scrollInterval);
|
|
1309
1309
|
}), a(this, "isInside", function(k, $) {
|
|
1310
|
-
return s.DS.Area.HTMLNode.contains(k) && s.DS.stores.ScrollStore.canScroll ? !0 :
|
|
1310
|
+
return s.DS.Area.HTMLNode.contains(k) && s.DS.stores.ScrollStore.canScroll ? !0 : Bt(s.rect, $ || k.getBoundingClientRect());
|
|
1311
1311
|
}), this._autoScrollSpeed = w, this._overflowTolerance = _, this.DS = v, this.HTMLNode = me(c), this.DS.subscribe("Area:modified", this.updatePos), this.DS.subscribe("Interaction:init", this.start), this.DS.subscribe("Interaction:start", this.startAutoScroll), this.DS.subscribe("Interaction:end", function() {
|
|
1312
1312
|
s.updatePos(), s.stopAutoScroll();
|
|
1313
1313
|
});
|
|
@@ -1316,7 +1316,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1316
1316
|
key: "isClicked",
|
|
1317
1317
|
value: function(s) {
|
|
1318
1318
|
var v = this.DS.stores.PointerStore, c = s ? v.getPointerPosition(s) : v.initialVal;
|
|
1319
|
-
return
|
|
1319
|
+
return Bt({
|
|
1320
1320
|
left: c.x,
|
|
1321
1321
|
top: c.y,
|
|
1322
1322
|
right: c.x,
|
|
@@ -1461,7 +1461,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1461
1461
|
};
|
|
1462
1462
|
},
|
|
1463
1463
|
set: function(s) {
|
|
1464
|
-
this._initialVal = s, this._initialValArea = s && Z(s, "-", Z(
|
|
1464
|
+
this._initialVal = s, this._initialValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder)));
|
|
1465
1465
|
}
|
|
1466
1466
|
}, {
|
|
1467
1467
|
key: "currentVal",
|
|
@@ -1472,7 +1472,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1472
1472
|
};
|
|
1473
1473
|
},
|
|
1474
1474
|
set: function(s) {
|
|
1475
|
-
this._currentVal = s, this._currentValArea = s && Z(s, "-", Z(
|
|
1475
|
+
this._currentVal = s, this._currentValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder)));
|
|
1476
1476
|
}
|
|
1477
1477
|
}, {
|
|
1478
1478
|
key: "lastVal",
|
|
@@ -1483,7 +1483,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1483
1483
|
};
|
|
1484
1484
|
},
|
|
1485
1485
|
set: function(s) {
|
|
1486
|
-
this._lastVal = s, this._lastValArea = s && Z(s, "-", Z(
|
|
1486
|
+
this._lastVal = s, this._lastValArea = s && Z(s, "-", Z(O(this.DS.Area.rect), "+", O(this.DS.Area.computedBorder)));
|
|
1487
1487
|
}
|
|
1488
1488
|
}]), d;
|
|
1489
1489
|
}(), Ea = /* @__PURE__ */ function() {
|
|
@@ -1516,7 +1516,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1516
1516
|
}, {
|
|
1517
1517
|
key: "scrollAmount",
|
|
1518
1518
|
get: function() {
|
|
1519
|
-
var s = Z(this.currentVal, "-", this.initialVal), v =
|
|
1519
|
+
var s = Z(this.currentVal, "-", this.initialVal), v = z(this.zoom), c = Z(Z(s, "*", v), "-", s);
|
|
1520
1520
|
return {
|
|
1521
1521
|
x: s.x + c.x,
|
|
1522
1522
|
y: s.y + c.y
|
|
@@ -1538,10 +1538,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1538
1538
|
}]), d;
|
|
1539
1539
|
}(), Ta = /* @__PURE__ */ function() {
|
|
1540
1540
|
function d(l) {
|
|
1541
|
-
var s = this, v = l.area, c = v === void 0 ? document : v, w = l.selectables, _ = w === void 0 ? [] : w, k = l.autoScrollSpeed, $ = k === void 0 ? 5 : k,
|
|
1541
|
+
var s = this, v = l.area, c = v === void 0 ? document : v, w = l.selectables, _ = w === void 0 ? [] : w, k = l.autoScrollSpeed, $ = k === void 0 ? 5 : k, P = l.overflowTolerance, A = P === void 0 ? {
|
|
1542
1542
|
x: 25,
|
|
1543
1543
|
y: 25
|
|
1544
|
-
} :
|
|
1544
|
+
} : P, R = l.zoom, F = R === void 0 ? 1 : R, oe = l.customStyles, ye = oe === void 0 ? !1 : oe, ae = l.multiSelectMode, Ze = ae === void 0 ? !1 : ae, _t = l.multiSelectToggling, Le = _t === void 0 ? !0 : _t, Cr = l.multiSelectKeys, Aa = Cr === void 0 ? ["Control", "Shift", "Meta"] : Cr, $r = l.selector, Oa = $r === void 0 ? void 0 : $r, Mr = l.draggability, Ht = Mr === void 0 ? !0 : Mr, Er = l.immediateDrag, Ia = Er === void 0 ? !0 : Er, Tr = l.keyboardDrag, La = Tr === void 0 ? !0 : Tr, Pa = l.dragKeys, Ar = l.keyboardDragSpeed, Na = Ar === void 0 ? 10 : Ar, Or = l.useTransform, Ir = Or === void 0 ? !0 : Or, Lr = l.hoverClass, Pr = Lr === void 0 ? "ds-hover" : Lr, Nr = l.selectableClass, jr = Nr === void 0 ? "ds-selectable" : Nr, zr = l.selectedClass, ja = zr === void 0 ? "ds-selected" : zr, Vr = l.selectorClass, za = Vr === void 0 ? "ds-selector" : Vr, Rr = l.selectorAreaClass, Va = Rr === void 0 ? "ds-selector-area" : Rr, Ra = l.callback, Ba = l.onDragMove, Ha = l.onDragStartBegin, Ua = l.onDragStart, Ka = l.onElementSelect, Fa = l.onElementUnselect;
|
|
1545
1545
|
r(this, d), a(this, "continue", !1), a(this, "start", function() {
|
|
1546
1546
|
s.stopped = !1, s.Interaction.init();
|
|
1547
1547
|
}), a(this, "break", function() {
|
|
@@ -1602,14 +1602,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1602
1602
|
DS: this,
|
|
1603
1603
|
selectorAreaClass: Va,
|
|
1604
1604
|
autoScrollSpeed: $,
|
|
1605
|
-
overflowTolerance:
|
|
1605
|
+
overflowTolerance: A
|
|
1606
1606
|
}), this.SelectableSet = new _a({
|
|
1607
1607
|
elements: _,
|
|
1608
1608
|
DS: this,
|
|
1609
1609
|
className: jr,
|
|
1610
1610
|
hoverClassName: Pr,
|
|
1611
1611
|
useTransform: Ir,
|
|
1612
|
-
draggability:
|
|
1612
|
+
draggability: Ht
|
|
1613
1613
|
}), this.SelectedSet = new ka({
|
|
1614
1614
|
DS: this,
|
|
1615
1615
|
className: ja
|
|
@@ -1619,7 +1619,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1619
1619
|
multiSelectToggling: Le
|
|
1620
1620
|
}), this.Drag = new ya({
|
|
1621
1621
|
DS: this,
|
|
1622
|
-
draggability:
|
|
1622
|
+
draggability: Ht,
|
|
1623
1623
|
useTransform: Ir,
|
|
1624
1624
|
keyboardDrag: La,
|
|
1625
1625
|
dragKeys: Object.assign({
|
|
@@ -1633,7 +1633,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1633
1633
|
}), this.Interaction = new wa({
|
|
1634
1634
|
areaElement: c,
|
|
1635
1635
|
DS: this,
|
|
1636
|
-
draggability:
|
|
1636
|
+
draggability: Ht,
|
|
1637
1637
|
immediateDrag: Ia,
|
|
1638
1638
|
selectableClass: jr
|
|
1639
1639
|
}), va({
|
|
@@ -1648,34 +1648,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1648
1648
|
return i(d, [{
|
|
1649
1649
|
key: "_callbacksTemp",
|
|
1650
1650
|
value: function(s) {
|
|
1651
|
-
var v = s.callback, c = s.onDragMove, w = s.onDragStart, _ = s.onDragStartBegin, k = s.onElementSelect, $ = s.onElementUnselect,
|
|
1652
|
-
return console.warn("[DragSelect] ".concat(
|
|
1651
|
+
var v = s.callback, c = s.onDragMove, w = s.onDragStart, _ = s.onDragStartBegin, k = s.onElementSelect, $ = s.onElementUnselect, P = function(R, F) {
|
|
1652
|
+
return console.warn("[DragSelect] ".concat(R, ' is deprecated. Use DragSelect.subscribe("').concat(F, '", (callbackObject) => {}) instead. Act Now! See docs for more info'));
|
|
1653
1653
|
};
|
|
1654
|
-
v && (
|
|
1655
|
-
var
|
|
1656
|
-
|
|
1657
|
-
var F =
|
|
1658
|
-
return v(
|
|
1659
|
-
})), c && (
|
|
1660
|
-
|
|
1661
|
-
var
|
|
1662
|
-
return c(
|
|
1663
|
-
})), w && (
|
|
1664
|
-
|
|
1665
|
-
var
|
|
1666
|
-
return w(
|
|
1667
|
-
})), _ && (
|
|
1668
|
-
|
|
1669
|
-
var
|
|
1670
|
-
return _(
|
|
1671
|
-
})), k && (
|
|
1672
|
-
|
|
1673
|
-
var
|
|
1674
|
-
return k(
|
|
1675
|
-
})), $ && (
|
|
1676
|
-
|
|
1677
|
-
var
|
|
1678
|
-
return $(
|
|
1654
|
+
v && (P("callback", "callback"), this.subscribe("callback", function(A) {
|
|
1655
|
+
var R = A.items;
|
|
1656
|
+
A.item;
|
|
1657
|
+
var F = A.event;
|
|
1658
|
+
return v(R, F);
|
|
1659
|
+
})), c && (P("onDragMove", "dragmove"), this.subscribe("dragmove", function(A) {
|
|
1660
|
+
A.items, A.item;
|
|
1661
|
+
var R = A.event;
|
|
1662
|
+
return c(R);
|
|
1663
|
+
})), w && (P("onDragStart", "dragstart"), this.subscribe("dragstart", function(A) {
|
|
1664
|
+
A.items, A.item;
|
|
1665
|
+
var R = A.event;
|
|
1666
|
+
return w(R);
|
|
1667
|
+
})), _ && (P("onDragStartBegin", "dragstart"), this.subscribe("dragstart", function(A) {
|
|
1668
|
+
A.items, A.item;
|
|
1669
|
+
var R = A.event;
|
|
1670
|
+
return _(R);
|
|
1671
|
+
})), k && (P("onElementSelect", "elementselect"), this.subscribe("elementselect", function(A) {
|
|
1672
|
+
A.items;
|
|
1673
|
+
var R = A.item, F = A.event;
|
|
1674
|
+
return k(R, F);
|
|
1675
|
+
})), $ && (P("onElementUnselect", "elementunselect"), this.subscribe("elementunselect", function(A) {
|
|
1676
|
+
A.items;
|
|
1677
|
+
var R = A.item, F = A.event;
|
|
1678
|
+
return $(R, F);
|
|
1679
1679
|
}));
|
|
1680
1680
|
}
|
|
1681
1681
|
}, {
|
|
@@ -1786,7 +1786,7 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1786
1786
|
Ws
|
|
1787
1787
|
], qs = {
|
|
1788
1788
|
name: "VFSortIcon"
|
|
1789
|
-
},
|
|
1789
|
+
}, St = /* @__PURE__ */ Object.assign(qs, {
|
|
1790
1790
|
props: { direction: String },
|
|
1791
1791
|
setup(t) {
|
|
1792
1792
|
return (e, r) => (y(), S("div", null, [
|
|
@@ -1798,7 +1798,7 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1798
1798
|
name: "VFToast.vue"
|
|
1799
1799
|
}, Zs = /* @__PURE__ */ Object.assign(Js, {
|
|
1800
1800
|
setup(t) {
|
|
1801
|
-
const e = j("emitter"), { getStore: r } = j("storage"), o =
|
|
1801
|
+
const e = j("emitter"), { getStore: r } = j("storage"), o = L(r("full-screen", !1)), i = (g) => g == "error" ? "text-red-400 border-red-400 dark:text-red-300 dark:border-red-300" : "text-lime-600 border-lime-600 dark:text-lime-300 dark:border-lime-1300", a = L([]), n = (g) => {
|
|
1802
1802
|
a.value.splice(g, 1);
|
|
1803
1803
|
}, m = (g) => {
|
|
1804
1804
|
let f = a.value.findIndex((h) => h.id === g);
|
|
@@ -1879,14 +1879,14 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1879
1879
|
else
|
|
1880
1880
|
for (let r = 0, o; o = e[r]; r += 1)
|
|
1881
1881
|
Ur(t, o);
|
|
1882
|
-
}, Ie = "src", sr = "srcset", ir = "sizes", _o = "poster",
|
|
1882
|
+
}, Ie = "src", sr = "srcset", ir = "sizes", _o = "poster", bt = "llOriginalAttrs", ko = "data", nr = "loading", So = "loaded", Do = "applied", ri = "entered", lr = "error", Co = "native", $o = "data-", Mo = "ll-status", ve = (t, e) => t.getAttribute($o + e), oi = (t, e, r) => {
|
|
1883
1883
|
var o = $o + e;
|
|
1884
1884
|
if (r === null) {
|
|
1885
1885
|
t.removeAttribute(o);
|
|
1886
1886
|
return;
|
|
1887
1887
|
}
|
|
1888
1888
|
t.setAttribute(o, r);
|
|
1889
|
-
},
|
|
1889
|
+
}, yt = (t) => ve(t, Mo), Xe = (t, e) => oi(t, Mo, e), Pt = (t) => Xe(t, null), cr = (t) => yt(t) === null, ai = (t) => yt(t) === nr, si = (t) => yt(t) === lr, ur = (t) => yt(t) === Co, ii = [nr, So, Do, lr], ni = (t) => ii.indexOf(yt(t)) >= 0, Re = (t, e, r, o) => {
|
|
1890
1890
|
if (!!t) {
|
|
1891
1891
|
if (o !== void 0) {
|
|
1892
1892
|
t(e, r, o);
|
|
@@ -1914,7 +1914,7 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1914
1914
|
t.llTempImage = document.createElement("IMG");
|
|
1915
1915
|
}, ci = (t) => {
|
|
1916
1916
|
delete t.llTempImage;
|
|
1917
|
-
}, Eo = (t) => t.llTempImage,
|
|
1917
|
+
}, Eo = (t) => t.llTempImage, Nt = (t, e) => {
|
|
1918
1918
|
if (!e)
|
|
1919
1919
|
return;
|
|
1920
1920
|
const r = e._observer;
|
|
@@ -1922,7 +1922,7 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1922
1922
|
}, ui = (t) => {
|
|
1923
1923
|
t.disconnect();
|
|
1924
1924
|
}, di = (t, e, r) => {
|
|
1925
|
-
e.unobserve_entered &&
|
|
1925
|
+
e.unobserve_entered && Nt(t, r);
|
|
1926
1926
|
}, dr = (t, e) => {
|
|
1927
1927
|
!t || (t.loadingCount += e);
|
|
1928
1928
|
}, hi = (t) => {
|
|
@@ -1941,15 +1941,15 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1941
1941
|
Ao(r).forEach(e);
|
|
1942
1942
|
}, Oo = (t, e) => {
|
|
1943
1943
|
Ao(t).forEach(e);
|
|
1944
|
-
},
|
|
1945
|
-
if (
|
|
1944
|
+
}, jt = [Ie], Io = [Ie, _o], gt = [Ie, sr, ir], Lo = [ko], zt = (t) => !!t[bt], Po = (t) => t[bt], No = (t) => delete t[bt], at = (t, e) => {
|
|
1945
|
+
if (zt(t))
|
|
1946
1946
|
return;
|
|
1947
1947
|
const r = {};
|
|
1948
1948
|
e.forEach((o) => {
|
|
1949
1949
|
r[o] = t.getAttribute(o);
|
|
1950
|
-
}), t[
|
|
1950
|
+
}), t[bt] = r;
|
|
1951
1951
|
}, gi = (t) => {
|
|
1952
|
-
|
|
1952
|
+
zt(t) || (t[bt] = { backgroundImage: t.style.backgroundImage });
|
|
1953
1953
|
}, pi = (t, e, r) => {
|
|
1954
1954
|
if (!r) {
|
|
1955
1955
|
t.removeAttribute(e);
|
|
@@ -1957,19 +1957,19 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1957
1957
|
}
|
|
1958
1958
|
t.setAttribute(e, r);
|
|
1959
1959
|
}, Fe = (t, e) => {
|
|
1960
|
-
if (!
|
|
1960
|
+
if (!zt(t))
|
|
1961
1961
|
return;
|
|
1962
1962
|
const r = Po(t);
|
|
1963
1963
|
e.forEach((o) => {
|
|
1964
1964
|
pi(t, o, r[o]);
|
|
1965
1965
|
});
|
|
1966
1966
|
}, vi = (t) => {
|
|
1967
|
-
if (!
|
|
1967
|
+
if (!zt(t))
|
|
1968
1968
|
return;
|
|
1969
1969
|
const e = Po(t);
|
|
1970
1970
|
t.style.backgroundImage = e.backgroundImage;
|
|
1971
1971
|
}, jo = (t, e, r) => {
|
|
1972
|
-
nt(t, e.class_applied), Xe(t, Do), r && (e.unobserve_completed &&
|
|
1972
|
+
nt(t, e.class_applied), Xe(t, Do), r && (e.unobserve_completed && Nt(t, e), Re(e.callback_applied, t, r));
|
|
1973
1973
|
}, zo = (t, e, r) => {
|
|
1974
1974
|
nt(t, e.class_loading), Xe(t, nr), r && (dr(r, 1), Re(e.callback_loading, t, r));
|
|
1975
1975
|
}, ze = (t, e, r) => {
|
|
@@ -1978,13 +1978,13 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
1978
1978
|
ze(t, ir, ve(t, e.data_sizes)), ze(t, sr, ve(t, e.data_srcset)), ze(t, Ie, ve(t, e.data_src));
|
|
1979
1979
|
}, bi = (t, e) => {
|
|
1980
1980
|
hr(t, (r) => {
|
|
1981
|
-
at(r,
|
|
1982
|
-
}), at(t,
|
|
1981
|
+
at(r, gt), Kr(r, e);
|
|
1982
|
+
}), at(t, gt), Kr(t, e);
|
|
1983
1983
|
}, yi = (t, e) => {
|
|
1984
|
-
at(t,
|
|
1984
|
+
at(t, jt), ze(t, Ie, ve(t, e.data_src));
|
|
1985
1985
|
}, wi = (t, e) => {
|
|
1986
1986
|
Oo(t, (r) => {
|
|
1987
|
-
at(r,
|
|
1987
|
+
at(r, jt), ze(r, Ie, ve(r, e.data_src));
|
|
1988
1988
|
}), at(t, Io), ze(t, _o, ve(t, e.data_poster)), ze(t, Ie, ve(t, e.data_src)), t.load();
|
|
1989
1989
|
}, xi = (t, e) => {
|
|
1990
1990
|
at(t, Lo), ze(t, ko, ve(t, e.data_src));
|
|
@@ -2032,13 +2032,13 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
2032
2032
|
}
|
|
2033
2033
|
delete t.llEvLisnrs;
|
|
2034
2034
|
}, Bo = (t, e, r) => {
|
|
2035
|
-
ci(t), dr(r, -1), hi(r), $e(t, e.class_loading), e.unobserve_completed &&
|
|
2035
|
+
ci(t), dr(r, -1), hi(r), $e(t, e.class_loading), e.unobserve_completed && Nt(t, r);
|
|
2036
2036
|
}, Ai = (t, e, r, o) => {
|
|
2037
2037
|
const i = ur(e);
|
|
2038
2038
|
Bo(e, r, o), nt(e, r.class_loaded), Xe(e, So), Re(r.callback_loaded, e, o), i || Ro(r, o);
|
|
2039
2039
|
}, Oi = (t, e, r, o) => {
|
|
2040
2040
|
const i = ur(e);
|
|
2041
|
-
Bo(e, r, o), nt(e, r.class_error), Xe(e, lr), Re(r.callback_error, e, o), r.restore_on_error && Fe(e,
|
|
2041
|
+
Bo(e, r, o), nt(e, r.class_error), Xe(e, lr), Re(r.callback_error, e, o), r.restore_on_error && Fe(e, gt), i || Ro(r, o);
|
|
2042
2042
|
}, mr = (t, e, r) => {
|
|
2043
2043
|
const o = Eo(t) || t;
|
|
2044
2044
|
if (fr(o))
|
|
@@ -2064,14 +2064,14 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
2064
2064
|
}), Yr(t);
|
|
2065
2065
|
}, Ho = (t) => {
|
|
2066
2066
|
hr(t, (e) => {
|
|
2067
|
-
Fe(e,
|
|
2068
|
-
}), Fe(t,
|
|
2067
|
+
Fe(e, gt);
|
|
2068
|
+
}), Fe(t, gt);
|
|
2069
2069
|
}, ji = (t) => {
|
|
2070
2070
|
Oo(t, (e) => {
|
|
2071
|
-
Fe(e,
|
|
2071
|
+
Fe(e, jt);
|
|
2072
2072
|
}), Fe(t, Io), t.load();
|
|
2073
2073
|
}, zi = (t) => {
|
|
2074
|
-
Fe(t,
|
|
2074
|
+
Fe(t, jt);
|
|
2075
2075
|
}, Vi = (t) => {
|
|
2076
2076
|
Fe(t, Lo);
|
|
2077
2077
|
}, Ri = {
|
|
@@ -2089,9 +2089,9 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
2089
2089
|
}, Hi = (t, e) => {
|
|
2090
2090
|
cr(t) || ur(t) || ($e(t, e.class_entered), $e(t, e.class_exited), $e(t, e.class_applied), $e(t, e.class_loading), $e(t, e.class_loaded), $e(t, e.class_error));
|
|
2091
2091
|
}, Ui = (t, e) => {
|
|
2092
|
-
Bi(t), Hi(t, e),
|
|
2092
|
+
Bi(t), Hi(t, e), Pt(t), No(t);
|
|
2093
2093
|
}, Ki = (t, e, r, o) => {
|
|
2094
|
-
!r.cancel_on_exit || !ai(t) || t.tagName === "IMG" && (qt(t), Ni(t), Ho(t), $e(t, r.class_loading), dr(o, -1),
|
|
2094
|
+
!r.cancel_on_exit || !ai(t) || t.tagName === "IMG" && (qt(t), Ni(t), Ho(t), $e(t, r.class_loading), dr(o, -1), Pt(t), Re(r.callback_cancel, t, e, o));
|
|
2095
2095
|
}, Fi = (t, e, r, o) => {
|
|
2096
2096
|
const i = ni(t);
|
|
2097
2097
|
Xe(t, ri), nt(t, r.class_entered), $e(t, r.class_exited), di(t, r, o), Re(r.callback_enter, t, e, o), !i && gr(t, r, o);
|
|
@@ -2118,9 +2118,9 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
2118
2118
|
!bo || Uo(t) || (e._observer = new IntersectionObserver((r) => {
|
|
2119
2119
|
Ji(r, t, e);
|
|
2120
2120
|
}, Gi(t)));
|
|
2121
|
-
}, Ko = (t) => Array.prototype.slice.call(t),
|
|
2122
|
-
on(
|
|
2123
|
-
$e(o, t.class_error),
|
|
2121
|
+
}, Ko = (t) => Array.prototype.slice.call(t), At = (t) => t.container.querySelectorAll(t.elements_selector), tn = (t) => Ko(t).filter(cr), rn = (t) => si(t), on = (t) => Ko(t).filter(rn), Wr = (t, e) => tn(t || At(e)), an = (t, e) => {
|
|
2122
|
+
on(At(t)).forEach((o) => {
|
|
2123
|
+
$e(o, t.class_error), Pt(o);
|
|
2124
2124
|
}), e.update();
|
|
2125
2125
|
}, sn = (t, e) => {
|
|
2126
2126
|
!Ve || (e._onlineHandler = () => {
|
|
@@ -2128,11 +2128,11 @@ const Hs = mo.exports, go = (t, e, r, o, i) => (e = Math, r = e.log, o = 1024, i
|
|
|
2128
2128
|
}, window.addEventListener("online", e._onlineHandler));
|
|
2129
2129
|
}, nn = (t) => {
|
|
2130
2130
|
!Ve || window.removeEventListener("online", t._onlineHandler);
|
|
2131
|
-
},
|
|
2131
|
+
}, wt = function(t, e) {
|
|
2132
2132
|
const r = xo(t);
|
|
2133
2133
|
this._settings = r, this.loadingCount = 0, en(r, this), sn(r, this), this.update(e);
|
|
2134
2134
|
};
|
|
2135
|
-
|
|
2135
|
+
wt.prototype = {
|
|
2136
2136
|
update: function(t) {
|
|
2137
2137
|
const e = this._settings, r = Wr(t, e);
|
|
2138
2138
|
if (To(this, r.length), vo || !bo) {
|
|
@@ -2146,31 +2146,31 @@ yt.prototype = {
|
|
|
2146
2146
|
Qi(this._observer, r);
|
|
2147
2147
|
},
|
|
2148
2148
|
destroy: function() {
|
|
2149
|
-
this._observer && this._observer.disconnect(), nn(this),
|
|
2149
|
+
this._observer && this._observer.disconnect(), nn(this), At(this._settings).forEach((t) => {
|
|
2150
2150
|
No(t);
|
|
2151
2151
|
}), delete this._observer, delete this._settings, delete this._onlineHandler, delete this.loadingCount, delete this.toLoadCount;
|
|
2152
2152
|
},
|
|
2153
2153
|
loadAll: function(t) {
|
|
2154
2154
|
const e = this._settings;
|
|
2155
2155
|
Wr(t, e).forEach((o) => {
|
|
2156
|
-
|
|
2156
|
+
Nt(o, this), gr(o, e, this);
|
|
2157
2157
|
});
|
|
2158
2158
|
},
|
|
2159
2159
|
restoreAll: function() {
|
|
2160
2160
|
const t = this._settings;
|
|
2161
|
-
|
|
2161
|
+
At(t).forEach((e) => {
|
|
2162
2162
|
Ui(e, t);
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
2165
|
};
|
|
2166
|
-
|
|
2166
|
+
wt.load = (t, e) => {
|
|
2167
2167
|
const r = xo(e);
|
|
2168
2168
|
gr(t, r);
|
|
2169
2169
|
};
|
|
2170
|
-
|
|
2171
|
-
|
|
2170
|
+
wt.resetStatus = (t) => {
|
|
2171
|
+
Pt(t);
|
|
2172
2172
|
};
|
|
2173
|
-
Ve && ti(
|
|
2173
|
+
Ve && ti(wt, window.lazyLoadOptions);
|
|
2174
2174
|
const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
2175
2175
|
key: 0,
|
|
2176
2176
|
class: "grid grid-cols-12 border-b border-neutral-300 border-gray-200 dark:border-gray-700 text-xs select-none"
|
|
@@ -2283,66 +2283,66 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2283
2283
|
search: Object
|
|
2284
2284
|
},
|
|
2285
2285
|
setup(t) {
|
|
2286
|
-
const e = t, r = j("emitter"), { setStore: o, getStore: i } = j("storage"), a = j("adapter"), n = (
|
|
2286
|
+
const e = t, r = j("emitter"), { setStore: o, getStore: i } = j("storage"), a = j("adapter"), n = (O) => O == null ? void 0 : O.substring(0, 3), m = (O) => O.replace(/((?=([\w\W]{0,14}))([\w\W]{8,})([\w\W]{8,}))/, "$2..$4"), g = L(null), f = L(null), h = L(0), p = L(null), { t: b } = j("i18n"), E = Math.floor(Math.random() * 2 ** 32), D = L(i("full-screen", !1)), T = new wt();
|
|
2287
2287
|
r.on("vf-fullscreen-toggle", () => {
|
|
2288
2288
|
g.value.style.height = null, D.value = !D.value, o("full-screen", D.value);
|
|
2289
2289
|
});
|
|
2290
|
-
const
|
|
2291
|
-
r.on("vf-search-query", ({ newQuery:
|
|
2292
|
-
|
|
2290
|
+
const I = L("");
|
|
2291
|
+
r.on("vf-search-query", ({ newQuery: O }) => {
|
|
2292
|
+
I.value = O, O ? r.emit("vf-fetch", {
|
|
2293
2293
|
params: {
|
|
2294
2294
|
q: "search",
|
|
2295
2295
|
adapter: e.data.adapter,
|
|
2296
2296
|
path: e.data.dirname,
|
|
2297
|
-
filter:
|
|
2297
|
+
filter: O
|
|
2298
2298
|
},
|
|
2299
|
-
onSuccess: (
|
|
2300
|
-
|
|
2299
|
+
onSuccess: (B) => {
|
|
2300
|
+
B.files.length || r.emit("vf-toast-push", { label: b("No search result found.") });
|
|
2301
2301
|
}
|
|
2302
2302
|
}) : r.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: e.data.dirname } });
|
|
2303
2303
|
});
|
|
2304
|
-
let
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2307
|
-
}, N =
|
|
2308
|
-
|
|
2309
|
-
}, K = (
|
|
2310
|
-
|
|
2311
|
-
const
|
|
2304
|
+
let U = null;
|
|
2305
|
+
const H = () => {
|
|
2306
|
+
U && clearTimeout(U);
|
|
2307
|
+
}, N = L(!0), W = (O) => {
|
|
2308
|
+
O.touches.length > 1 && (N.value ? (p.value.stop(), r.emit("vf-toast-push", { label: b("Drag&Drop: off") })) : (p.value.start(), r.emit("vf-toast-push", { label: b("Drag&Drop: on") }), r.emit("vf-explorer-update")), N.value = !N.value);
|
|
2309
|
+
}, K = (O) => {
|
|
2310
|
+
U = setTimeout(() => {
|
|
2311
|
+
const B = new MouseEvent("contextmenu", {
|
|
2312
2312
|
bubbles: !0,
|
|
2313
2313
|
cancelable: !1,
|
|
2314
2314
|
view: window,
|
|
2315
2315
|
button: 2,
|
|
2316
2316
|
buttons: 0,
|
|
2317
|
-
clientX:
|
|
2318
|
-
clientY:
|
|
2317
|
+
clientX: O.target.getBoundingClientRect().x,
|
|
2318
|
+
clientY: O.target.getBoundingClientRect().y
|
|
2319
2319
|
});
|
|
2320
|
-
|
|
2320
|
+
O.target.dispatchEvent(B);
|
|
2321
2321
|
}, 500);
|
|
2322
|
-
}, C = (
|
|
2323
|
-
|
|
2324
|
-
},
|
|
2325
|
-
let
|
|
2326
|
-
if (!
|
|
2327
|
-
return
|
|
2322
|
+
}, C = (O) => {
|
|
2323
|
+
O.type == "dir" ? (r.emit("vf-search-exit"), r.emit("vf-fetch", { params: { q: "index", adapter: e.data.adapter, path: O.path } })) : r.emit("vf-modal-show", { type: "preview", adapter: e.data.adapter, item: O });
|
|
2324
|
+
}, V = Mt({ active: !1, column: "", order: "" }), Q = (O = !0) => {
|
|
2325
|
+
let B = [...e.data.files], z = V.column, de = V.order == "asc" ? 1 : -1;
|
|
2326
|
+
if (!O)
|
|
2327
|
+
return B;
|
|
2328
2328
|
const G = (me, re) => typeof me == "string" && typeof re == "string" ? me.toLowerCase().localeCompare(re.toLowerCase()) : me < re ? -1 : me > re ? 1 : 0;
|
|
2329
|
-
return
|
|
2330
|
-
}, ne = (
|
|
2331
|
-
|
|
2332
|
-
}, le = () => p.value.getSelection().map((
|
|
2333
|
-
if (
|
|
2334
|
-
return
|
|
2335
|
-
|
|
2336
|
-
}, we = (
|
|
2337
|
-
|
|
2338
|
-
let
|
|
2339
|
-
if (
|
|
2329
|
+
return V.active && (B = B.slice().sort((me, re) => G(me[z], re[z]) * de)), B;
|
|
2330
|
+
}, ne = (O) => {
|
|
2331
|
+
V.active && V.column == O ? (V.active = V.order == "asc", V.column = O, V.order = "desc") : (V.active = !0, V.column = O, V.order = "asc");
|
|
2332
|
+
}, le = () => p.value.getSelection().map((O) => JSON.parse(O.dataset.item)), fe = (O, B) => {
|
|
2333
|
+
if (O.altKey || O.ctrlKey || O.metaKey)
|
|
2334
|
+
return O.preventDefault(), !1;
|
|
2335
|
+
O.dataTransfer.setDragImage(f.value, 0, 15), O.dataTransfer.effectAllowed = "all", O.dataTransfer.dropEffect = "copy", O.dataTransfer.setData("items", JSON.stringify(le()));
|
|
2336
|
+
}, we = (O, B) => {
|
|
2337
|
+
O.preventDefault();
|
|
2338
|
+
let z = JSON.parse(O.dataTransfer.getData("items"));
|
|
2339
|
+
if (z.find((de) => de.storage != a.value)) {
|
|
2340
2340
|
alert("Moving items between different storages is not supported yet.");
|
|
2341
2341
|
return;
|
|
2342
2342
|
}
|
|
2343
|
-
r.emit("vf-modal-show", { type: "move", items: { from:
|
|
2344
|
-
}, be = (
|
|
2345
|
-
|
|
2343
|
+
r.emit("vf-modal-show", { type: "move", items: { from: z, to: B } });
|
|
2344
|
+
}, be = (O, B) => {
|
|
2345
|
+
O.preventDefault(), !B || B.type !== "dir" || p.value.getSelection().find((z) => z == O.currentTarget) ? (O.dataTransfer.dropEffect = "none", O.dataTransfer.effectAllowed = "none") : O.dataTransfer.dropEffect = "copy";
|
|
2346
2346
|
};
|
|
2347
2347
|
return Ce(() => {
|
|
2348
2348
|
p.value = new Hs({
|
|
@@ -2350,71 +2350,71 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2350
2350
|
keyboardDrag: !1,
|
|
2351
2351
|
selectedClass: "vf-explorer-selected",
|
|
2352
2352
|
selectorClass: "vf-explorer-selector"
|
|
2353
|
-
}), r.on("vf-explorer-update", () =>
|
|
2353
|
+
}), r.on("vf-explorer-update", () => Lt(() => {
|
|
2354
2354
|
p.value.clearSelection(), p.value.setSelectables(document.getElementsByClassName("vf-item-" + E));
|
|
2355
|
-
})), p.value.subscribe("predragstart", ({ event:
|
|
2356
|
-
if (
|
|
2355
|
+
})), p.value.subscribe("predragstart", ({ event: O, isDragging: B }) => {
|
|
2356
|
+
if (B)
|
|
2357
2357
|
h.value = p.value.getSelection().length, p.value.break();
|
|
2358
2358
|
else {
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2359
|
+
const z = O.target.offsetWidth - O.offsetX, de = O.target.offsetHeight - O.offsetY;
|
|
2360
|
+
z < 15 && de < 15 && (p.value.clearSelection(), p.value.break());
|
|
2361
2361
|
}
|
|
2362
|
-
}), p.value.subscribe("predragmove", ({ isDragging:
|
|
2363
|
-
|
|
2364
|
-
}), p.value.subscribe("callback", ({ items:
|
|
2362
|
+
}), p.value.subscribe("predragmove", ({ isDragging: O }) => {
|
|
2363
|
+
O && p.value.break();
|
|
2364
|
+
}), p.value.subscribe("callback", ({ items: O, event: B, isDragging: z }) => {
|
|
2365
2365
|
r.emit("vf-nodes-selected", le()), h.value = p.value.getSelection().length;
|
|
2366
2366
|
});
|
|
2367
2367
|
}), Xa(() => {
|
|
2368
|
-
p.value.Area.reset(), p.value.SelectorArea.updatePos(),
|
|
2368
|
+
p.value.Area.reset(), p.value.SelectorArea.updatePos(), T.update();
|
|
2369
2369
|
}), Ce(() => {
|
|
2370
|
-
|
|
2371
|
-
}), (
|
|
2372
|
-
t.view == "list" ||
|
|
2370
|
+
It(() => e.view, () => r.emit("vf-explorer-update"));
|
|
2371
|
+
}), (O, B) => (y(), S("div", ln, [
|
|
2372
|
+
t.view == "list" || I.value.length ? (y(), S("div", cn, [
|
|
2373
2373
|
u("div", {
|
|
2374
|
-
onClick:
|
|
2374
|
+
onClick: B[0] || (B[0] = (z) => ne("basename")),
|
|
2375
2375
|
class: "col-span-7 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center pl-1"
|
|
2376
2376
|
}, [
|
|
2377
2377
|
ie(M(x(b)("Name")) + " ", 1),
|
|
2378
|
-
_e(De(
|
|
2379
|
-
direction:
|
|
2378
|
+
_e(De(St, {
|
|
2379
|
+
direction: V.order == "asc" ? "down" : "up"
|
|
2380
2380
|
}, null, 8, ["direction"]), [
|
|
2381
|
-
[
|
|
2381
|
+
[kt, V.active && V.column == "basename"]
|
|
2382
2382
|
])
|
|
2383
2383
|
]),
|
|
2384
|
-
|
|
2384
|
+
I.value.length ? X("", !0) : (y(), S("div", {
|
|
2385
2385
|
key: 0,
|
|
2386
|
-
onClick:
|
|
2386
|
+
onClick: B[1] || (B[1] = (z) => ne("file_size")),
|
|
2387
2387
|
class: "col-span-2 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l border-r dark:border-gray-700"
|
|
2388
2388
|
}, [
|
|
2389
2389
|
ie(M(x(b)("Size")) + " ", 1),
|
|
2390
|
-
_e(De(
|
|
2391
|
-
direction:
|
|
2390
|
+
_e(De(St, {
|
|
2391
|
+
direction: V.order == "asc" ? "down" : "up"
|
|
2392
2392
|
}, null, 8, ["direction"]), [
|
|
2393
|
-
[
|
|
2393
|
+
[kt, V.active && V.column == "file_size"]
|
|
2394
2394
|
])
|
|
2395
2395
|
])),
|
|
2396
|
-
|
|
2396
|
+
I.value.length ? X("", !0) : (y(), S("div", {
|
|
2397
2397
|
key: 1,
|
|
2398
|
-
onClick:
|
|
2398
|
+
onClick: B[2] || (B[2] = (z) => ne("last_modified")),
|
|
2399
2399
|
class: "col-span-3 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center"
|
|
2400
2400
|
}, [
|
|
2401
2401
|
ie(M(x(b)("Date")) + " ", 1),
|
|
2402
|
-
_e(De(
|
|
2403
|
-
direction:
|
|
2402
|
+
_e(De(St, {
|
|
2403
|
+
direction: V.order == "asc" ? "down" : "up"
|
|
2404
2404
|
}, null, 8, ["direction"]), [
|
|
2405
|
-
[
|
|
2405
|
+
[kt, V.active && V.column == "last_modified"]
|
|
2406
2406
|
])
|
|
2407
2407
|
])),
|
|
2408
|
-
|
|
2408
|
+
I.value.length ? (y(), S("div", {
|
|
2409
2409
|
key: 2,
|
|
2410
|
-
onClick:
|
|
2410
|
+
onClick: B[3] || (B[3] = (z) => ne("path")),
|
|
2411
2411
|
class: "col-span-5 py-1 leading-6 hover:bg-neutral-100 bg-neutral-50 dark:bg-gray-800 dark:hover:bg-gray-700/10 flex items-center justify-center border-l dark:border-gray-700"
|
|
2412
2412
|
}, [
|
|
2413
2413
|
ie(M(x(b)("Filepath")) + " ", 1),
|
|
2414
|
-
_e(De(
|
|
2415
|
-
direction:
|
|
2414
|
+
_e(De(St, {
|
|
2415
|
+
direction: V.order == "asc" ? "down" : "up"
|
|
2416
2416
|
}, null, 8, ["direction"]), [
|
|
2417
|
-
[
|
|
2417
|
+
[kt, V.active && V.column == "path"]
|
|
2418
2418
|
])
|
|
2419
2419
|
])) : X("", !0)
|
|
2420
2420
|
])) : X("", !0),
|
|
@@ -2430,79 +2430,79 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2430
2430
|
]),
|
|
2431
2431
|
u("div", {
|
|
2432
2432
|
onTouchstart: W,
|
|
2433
|
-
onContextmenu:
|
|
2433
|
+
onContextmenu: B[10] || (B[10] = Ke((z) => x(r).emit("vf-contextmenu-show", { event: z, area: g.value, items: le() }), ["self", "prevent"])),
|
|
2434
2434
|
class: he([D.value ? "" : "resize-y", "h-full w-full text-xs vf-selector-area min-h-[150px] overflow-auto p-1 z-0"]),
|
|
2435
2435
|
ref_key: "selectorArea",
|
|
2436
2436
|
ref: g
|
|
2437
2437
|
}, [
|
|
2438
|
-
|
|
2439
|
-
onDblclick: (G) => C(
|
|
2440
|
-
onTouchstart:
|
|
2441
|
-
onTouchend:
|
|
2442
|
-
onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target:
|
|
2438
|
+
I.value.length ? (y(!0), S(ue, { key: 0 }, ke(Q(), (z, de) => (y(), S("div", {
|
|
2439
|
+
onDblclick: (G) => C(z),
|
|
2440
|
+
onTouchstart: B[4] || (B[4] = (G) => K(G)),
|
|
2441
|
+
onTouchend: B[5] || (B[5] = (G) => H()),
|
|
2442
|
+
onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target: z }), ["prevent"]),
|
|
2443
2443
|
class: he(["vf-item-" + x(E), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
2444
|
-
"data-type":
|
|
2445
|
-
"data-item": JSON.stringify(
|
|
2444
|
+
"data-type": z.type,
|
|
2445
|
+
"data-item": JSON.stringify(z),
|
|
2446
2446
|
"data-index": de
|
|
2447
2447
|
}, [
|
|
2448
2448
|
u("div", mn, [
|
|
2449
2449
|
u("div", gn, [
|
|
2450
|
-
|
|
2451
|
-
u("span", _n, M(
|
|
2450
|
+
z.type == "dir" ? (y(), S("svg", pn, bn)) : (y(), S("svg", yn, xn)),
|
|
2451
|
+
u("span", _n, M(z.basename), 1)
|
|
2452
2452
|
]),
|
|
2453
|
-
u("div", kn, M(
|
|
2453
|
+
u("div", kn, M(z.path), 1)
|
|
2454
2454
|
])
|
|
2455
2455
|
], 42, fn))), 256)) : X("", !0),
|
|
2456
|
-
t.view == "list" && !
|
|
2456
|
+
t.view == "list" && !I.value.length ? (y(!0), S(ue, { key: 1 }, ke(Q(), (z, de) => (y(), S("div", {
|
|
2457
2457
|
draggable: "true",
|
|
2458
|
-
onDblclick: (G) => C(
|
|
2459
|
-
onTouchstart:
|
|
2460
|
-
onTouchend:
|
|
2461
|
-
onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target:
|
|
2458
|
+
onDblclick: (G) => C(z),
|
|
2459
|
+
onTouchstart: B[6] || (B[6] = (G) => K(G)),
|
|
2460
|
+
onTouchend: B[7] || (B[7] = (G) => H()),
|
|
2461
|
+
onContextmenu: Ke((G) => x(r).emit("vf-contextmenu-show", { event: G, area: g.value, items: le(), target: z }), ["prevent"]),
|
|
2462
2462
|
onDragstart: (G) => fe(G),
|
|
2463
|
-
onDragover: (G) => be(G,
|
|
2464
|
-
onDrop: (G) => we(G,
|
|
2463
|
+
onDragover: (G) => be(G, z),
|
|
2464
|
+
onDrop: (G) => we(G, z),
|
|
2465
2465
|
class: he(["vf-item-" + x(E), "grid grid-cols-1 border hover:bg-neutral-50 dark:hover:bg-gray-700 border-transparent my-0.5 w-full select-none"]),
|
|
2466
|
-
"data-type":
|
|
2467
|
-
"data-item": JSON.stringify(
|
|
2466
|
+
"data-type": z.type,
|
|
2467
|
+
"data-item": JSON.stringify(z),
|
|
2468
2468
|
"data-index": de
|
|
2469
2469
|
}, [
|
|
2470
2470
|
u("div", Dn, [
|
|
2471
2471
|
u("div", Cn, [
|
|
2472
|
-
|
|
2473
|
-
u("span", In, M(
|
|
2472
|
+
z.type == "dir" ? (y(), S("svg", $n, En)) : (y(), S("svg", Tn, On)),
|
|
2473
|
+
u("span", In, M(z.basename), 1)
|
|
2474
2474
|
]),
|
|
2475
|
-
u("div", Ln, M(
|
|
2476
|
-
u("div", Pn, M(x(po)(
|
|
2475
|
+
u("div", Ln, M(z.file_size ? x(go)(z.file_size) : ""), 1),
|
|
2476
|
+
u("div", Pn, M(x(po)(z.last_modified)), 1)
|
|
2477
2477
|
])
|
|
2478
2478
|
], 42, Sn))), 256)) : X("", !0),
|
|
2479
|
-
t.view == "grid" && !
|
|
2479
|
+
t.view == "grid" && !I.value.length ? (y(!0), S(ue, { key: 2 }, ke(Q(!1), (z, de) => {
|
|
2480
2480
|
var G, me;
|
|
2481
2481
|
return y(), S("div", {
|
|
2482
2482
|
draggable: "true",
|
|
2483
|
-
onDblclick: (re) => C(
|
|
2484
|
-
onTouchstart:
|
|
2485
|
-
onTouchend:
|
|
2486
|
-
onContextmenu: Ke((re) => x(r).emit("vf-contextmenu-show", { event: re, area: g.value, items: le(), target:
|
|
2483
|
+
onDblclick: (re) => C(z),
|
|
2484
|
+
onTouchstart: B[8] || (B[8] = (re) => K(re)),
|
|
2485
|
+
onTouchend: B[9] || (B[9] = (re) => H()),
|
|
2486
|
+
onContextmenu: Ke((re) => x(r).emit("vf-contextmenu-show", { event: re, area: g.value, items: le(), target: z }), ["prevent"]),
|
|
2487
2487
|
onDragstart: (re) => fe(re),
|
|
2488
|
-
onDragover: (re) => be(re,
|
|
2489
|
-
onDrop: (re) => we(re,
|
|
2488
|
+
onDragover: (re) => be(re, z),
|
|
2489
|
+
onDrop: (re) => we(re, z),
|
|
2490
2490
|
class: he(["vf-item-" + x(E), "border border-transparent hover:bg-neutral-50 m-1 dark:hover:bg-gray-700 inline-flex w-[5.5rem] h-20 md:w-24 text-center justify-center select-none"]),
|
|
2491
|
-
"data-type":
|
|
2492
|
-
"data-item": JSON.stringify(
|
|
2491
|
+
"data-type": z.type,
|
|
2492
|
+
"data-item": JSON.stringify(z),
|
|
2493
2493
|
"data-index": de
|
|
2494
2494
|
}, [
|
|
2495
2495
|
u("div", null, [
|
|
2496
2496
|
u("div", jn, [
|
|
2497
|
-
|
|
2497
|
+
z.type == "dir" ? (y(), S("svg", zn, Rn)) : ((G = z.mime_type) != null ? G : "").startsWith("image") ? (y(), S("img", {
|
|
2498
2498
|
key: 1,
|
|
2499
2499
|
class: "lazy h-10 md:h-12 m-auto",
|
|
2500
|
-
"data-src": x(Xt)(x(a).value,
|
|
2501
|
-
alt:
|
|
2500
|
+
"data-src": x(Xt)(x(a).value, z.path),
|
|
2501
|
+
alt: z.basename
|
|
2502
2502
|
}, null, 8, Bn)) : (y(), S("svg", Hn, Kn)),
|
|
2503
|
-
!((me =
|
|
2503
|
+
!((me = z.mime_type) != null ? me : "").startsWith("image") && z.type != "dir" ? (y(), S("div", Fn, M(n(z.extension)), 1)) : X("", !0)
|
|
2504
2504
|
]),
|
|
2505
|
-
u("span", Yn, M(m(
|
|
2505
|
+
u("span", Yn, M(m(z.basename)), 1)
|
|
2506
2506
|
])
|
|
2507
2507
|
], 42, Nn);
|
|
2508
2508
|
}), 256)) : X("", !0)
|
|
@@ -2510,7 +2510,7 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2510
2510
|
De(Zs)
|
|
2511
2511
|
]));
|
|
2512
2512
|
}
|
|
2513
|
-
}), qn = "1.1.
|
|
2513
|
+
}), qn = "1.1.17", Gn = { class: "p-1 text-xs border-t border-neutral-300 dark:border-gray-700/50 flex justify-between select-none" }, Jn = { class: "flex leading-5 items-center" }, Zn = ["aria-label"], Qn = /* @__PURE__ */ u("svg", {
|
|
2514
2514
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2515
2515
|
class: "h-5 w-5",
|
|
2516
2516
|
fill: "none",
|
|
@@ -2550,13 +2550,13 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2550
2550
|
data: Object
|
|
2551
2551
|
},
|
|
2552
2552
|
setup(t) {
|
|
2553
|
-
const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), i =
|
|
2553
|
+
const e = j("emitter"), { getStore: r, setStore: o } = j("storage"), i = L(0), a = j("adapter"), { t: n, changeLocale: m } = j("i18n"), g = L(r("locale", "")), f = () => {
|
|
2554
2554
|
e.emit("vf-search-exit"), e.emit("vf-fetch", { params: { q: "index", adapter: a.value } }), o("adapter", a.value);
|
|
2555
2555
|
};
|
|
2556
2556
|
e.on("vf-nodes-selected", (p) => {
|
|
2557
2557
|
i.value = p.length;
|
|
2558
2558
|
});
|
|
2559
|
-
const h =
|
|
2559
|
+
const h = L("");
|
|
2560
2560
|
return e.on("vf-search-query", ({ newQuery: p }) => {
|
|
2561
2561
|
h.value = p;
|
|
2562
2562
|
}), (p, b) => (y(), S("div", Gn, [
|
|
@@ -2613,7 +2613,7 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2613
2613
|
}, e);
|
|
2614
2614
|
};
|
|
2615
2615
|
}, vl = (t, e, r) => {
|
|
2616
|
-
const o =
|
|
2616
|
+
const o = L(t);
|
|
2617
2617
|
return qa((a, n) => ({
|
|
2618
2618
|
get() {
|
|
2619
2619
|
return a(), o.value;
|
|
@@ -2696,15 +2696,15 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2696
2696
|
setup(t) {
|
|
2697
2697
|
const e = t, r = j("emitter");
|
|
2698
2698
|
j("storage");
|
|
2699
|
-
const o = j("adapter"), i =
|
|
2699
|
+
const o = j("adapter"), i = L(null), a = L([]), n = L(!1), m = L(null), { t: g } = j("i18n"), f = j("loadingState");
|
|
2700
2700
|
r.on("vf-explorer-update", () => {
|
|
2701
2701
|
var W;
|
|
2702
|
-
let
|
|
2702
|
+
let H = [], N = [];
|
|
2703
2703
|
i.value = (W = e.data.dirname) != null ? W : o.value + "://", i.value.length == 0 && (a.value = []), i.value.replace(o.value + "://", "").split("/").forEach(function(K) {
|
|
2704
|
-
|
|
2704
|
+
H.push(K), H.join("/") != "" && N.push({
|
|
2705
2705
|
basename: K,
|
|
2706
2706
|
name: K,
|
|
2707
|
-
path: o.value + "://" +
|
|
2707
|
+
path: o.value + "://" + H.join("/"),
|
|
2708
2708
|
type: "dir"
|
|
2709
2709
|
});
|
|
2710
2710
|
}), N.length > 4 && (N = N.slice(-5), N[0].name = ".."), a.value = N;
|
|
@@ -2716,15 +2716,15 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2716
2716
|
h();
|
|
2717
2717
|
});
|
|
2718
2718
|
const p = () => {
|
|
2719
|
-
n.value = !0,
|
|
2719
|
+
n.value = !0, Lt(() => m.value.focus());
|
|
2720
2720
|
}, b = vl("", 400), E = () => f.value;
|
|
2721
|
-
|
|
2722
|
-
r.emit("vf-toast-clear"), r.emit("vf-search-query", { newQuery:
|
|
2721
|
+
It(b, (H) => {
|
|
2722
|
+
r.emit("vf-toast-clear"), r.emit("vf-search-query", { newQuery: H });
|
|
2723
2723
|
});
|
|
2724
|
-
const D = () => a.value.length && !n.value,
|
|
2724
|
+
const D = () => a.value.length && !n.value, T = (H) => {
|
|
2725
2725
|
var W;
|
|
2726
|
-
|
|
2727
|
-
let N = JSON.parse(
|
|
2726
|
+
H.preventDefault();
|
|
2727
|
+
let N = JSON.parse(H.dataTransfer.getData("items"));
|
|
2728
2728
|
if (N.find((K) => K.storage != o.value)) {
|
|
2729
2729
|
alert("Moving items between different storages is not supported yet.");
|
|
2730
2730
|
return;
|
|
@@ -2733,20 +2733,20 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2733
2733
|
type: "move",
|
|
2734
2734
|
items: { from: N, to: (W = a.value[a.value.length - 2]) != null ? W : { path: o.value + "://" } }
|
|
2735
2735
|
});
|
|
2736
|
-
},
|
|
2737
|
-
|
|
2738
|
-
},
|
|
2736
|
+
}, I = (H) => {
|
|
2737
|
+
H.preventDefault(), D() ? H.dataTransfer.dropEffect = "copy" : (H.dataTransfer.dropEffect = "none", H.dataTransfer.effectAllowed = "none");
|
|
2738
|
+
}, U = () => {
|
|
2739
2739
|
b.value == "" && h();
|
|
2740
2740
|
};
|
|
2741
|
-
return (
|
|
2741
|
+
return (H, N) => (y(), S("div", bl, [
|
|
2742
2742
|
u("span", {
|
|
2743
2743
|
"aria-label": x(g)("Go up a directory"),
|
|
2744
2744
|
"data-microtip-position": "bottom-right",
|
|
2745
2745
|
role: "tooltip"
|
|
2746
2746
|
}, [
|
|
2747
2747
|
(y(), S("svg", {
|
|
2748
|
-
onDragover: N[0] || (N[0] = (W) =>
|
|
2749
|
-
onDrop: N[1] || (N[1] = (W) =>
|
|
2748
|
+
onDragover: N[0] || (N[0] = (W) => I(W)),
|
|
2749
|
+
onDrop: N[1] || (N[1] = (W) => T(W)),
|
|
2750
2750
|
onClick: N[2] || (N[2] = (W) => {
|
|
2751
2751
|
var K, C;
|
|
2752
2752
|
return !D() || x(r).emit("vf-fetch", { params: { q: "index", adapter: t.data.adapter, path: (C = (K = a.value[a.value.length - 2]) == null ? void 0 : K.path) != null ? C : x(o) + "://" } });
|
|
@@ -2790,7 +2790,7 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2790
2790
|
ref_key: "searchInput",
|
|
2791
2791
|
ref: m,
|
|
2792
2792
|
onKeydown: st(h, ["esc"]),
|
|
2793
|
-
onBlur:
|
|
2793
|
+
onBlur: U,
|
|
2794
2794
|
"onUpdate:modelValue": N[6] || (N[6] = (W) => ho(b) ? b.value = W : null),
|
|
2795
2795
|
placeholder: x(g)("Search anything.."),
|
|
2796
2796
|
class: "absolute ml-4 pt-1 pb-0 px-2 border-0 ring-0 outline-0 text-gray-600 focus:ring-transparent focus:border-transparent dark:focus:ring-transparent dark:focus:border-transparent dark:text-gray-300 bg-transparent",
|
|
@@ -2840,14 +2840,14 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2840
2840
|
current: Object
|
|
2841
2841
|
},
|
|
2842
2842
|
setup(t) {
|
|
2843
|
-
const e = t, r = j("emitter"), o =
|
|
2843
|
+
const e = t, r = j("emitter"), o = L(null), { apiUrl: i } = Te(), a = Mt({
|
|
2844
2844
|
active: !1,
|
|
2845
2845
|
items: [],
|
|
2846
2846
|
positions: {
|
|
2847
2847
|
left: 0,
|
|
2848
2848
|
top: 0
|
|
2849
2849
|
}
|
|
2850
|
-
}), n =
|
|
2850
|
+
}), n = L([]);
|
|
2851
2851
|
r.on("vf-context-selected", (b) => {
|
|
2852
2852
|
n.value = b;
|
|
2853
2853
|
});
|
|
@@ -2915,27 +2915,27 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
}, f = (b) => {
|
|
2917
2917
|
r.emit("vf-contextmenu-hide"), b.action();
|
|
2918
|
-
}, h =
|
|
2918
|
+
}, h = L("");
|
|
2919
2919
|
r.on("vf-search-query", ({ newQuery: b }) => {
|
|
2920
2920
|
h.value = b;
|
|
2921
|
-
}), r.on("vf-contextmenu-show", ({ event: b, area: E, items: D, target:
|
|
2921
|
+
}), r.on("vf-contextmenu-show", ({ event: b, area: E, items: D, target: T = null }) => {
|
|
2922
2922
|
if (a.items = [], h.value)
|
|
2923
|
-
if (
|
|
2924
|
-
a.items.push(g.openDir), r.emit("vf-context-selected", [
|
|
2923
|
+
if (T)
|
|
2924
|
+
a.items.push(g.openDir), r.emit("vf-context-selected", [T]);
|
|
2925
2925
|
else
|
|
2926
2926
|
return;
|
|
2927
2927
|
else
|
|
2928
|
-
!
|
|
2928
|
+
!T && !h.value ? (a.items.push(g.refresh), a.items.push(g.newfolder), r.emit("vf-context-selected", [])) : D.length > 1 && D.some((I) => I.path === T.path) ? (a.items.push(g.refresh), a.items.push(g.archive), a.items.push(g.delete), r.emit("vf-context-selected", D)) : (T.type == "dir" ? a.items.push(g.open) : (a.items.push(g.preview), a.items.push(g.download)), a.items.push(g.rename), T.mime_type == "application/zip" ? a.items.push(g.unarchive) : a.items.push(g.archive), a.items.push(g.delete), r.emit("vf-context-selected", [T]));
|
|
2929
2929
|
p(b, E);
|
|
2930
2930
|
}), r.on("vf-contextmenu-hide", () => {
|
|
2931
2931
|
a.active = !1;
|
|
2932
2932
|
});
|
|
2933
2933
|
const p = (b, E) => {
|
|
2934
|
-
a.active = !0,
|
|
2935
|
-
let D = E.getBoundingClientRect(),
|
|
2936
|
-
|
|
2937
|
-
left:
|
|
2938
|
-
top:
|
|
2934
|
+
a.active = !0, Lt(() => {
|
|
2935
|
+
let D = E.getBoundingClientRect(), T = b.pageX, I = b.pageY, U = o.value.offsetHeight, H = o.value.offsetWidth;
|
|
2936
|
+
T = D.right - b.pageX + window.scrollX < H ? T - H : T, I = D.bottom - b.pageY + window.scrollY < U ? I - U : I, a.positions = {
|
|
2937
|
+
left: T + "px",
|
|
2938
|
+
top: I + "px"
|
|
2939
2939
|
};
|
|
2940
2940
|
});
|
|
2941
2941
|
};
|
|
@@ -2949,7 +2949,7 @@ const ln = { class: "relative flex-auto flex flex-col overflow-hidden" }, cn = {
|
|
|
2949
2949
|
(y(!0), S(ue, null, ke(a.items, (D) => (y(), S("li", {
|
|
2950
2950
|
class: "px-2 py-1.5 cursor-pointer hover:bg-neutral-200 dark:hover:bg-gray-700",
|
|
2951
2951
|
key: D.title,
|
|
2952
|
-
onClick: (
|
|
2952
|
+
onClick: (T) => f(D)
|
|
2953
2953
|
}, [
|
|
2954
2954
|
Wl,
|
|
2955
2955
|
u("span", null, M(D.title()), 1)
|
|
@@ -2967,7 +2967,7 @@ async function Jl(t) {
|
|
|
2967
2967
|
return JSON.parse(e.default);
|
|
2968
2968
|
}
|
|
2969
2969
|
function Zl(t, e, r) {
|
|
2970
|
-
const { getStore: o, setStore: i } = Wt(t), a =
|
|
2970
|
+
const { getStore: o, setStore: i } = Wt(t), a = L({}), n = (f) => {
|
|
2971
2971
|
Jl(f).then((h) => {
|
|
2972
2972
|
a.value = h, i("locale", f), i("translations", h), r.emit("vf-toast-push", { label: "The language is set to " + f });
|
|
2973
2973
|
}).catch((h) => {
|
|
@@ -3017,62 +3017,62 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3017
3017
|
}
|
|
3018
3018
|
},
|
|
3019
3019
|
setup(t) {
|
|
3020
|
-
const e = t, r = Ja(), { setStore: o, getStore: i } = Wt(e.id), a =
|
|
3020
|
+
const e = t, r = Ja(), { setStore: o, getStore: i } = Wt(e.id), a = L(i("adapter"));
|
|
3021
3021
|
Be("emitter", r), Be("storage", Wt(e.id)), Be("postData", e.postData), Be("adapter", a), Be("maxFileSize", e.maxFileSize);
|
|
3022
3022
|
const n = Zl(e.id, e.locale, r);
|
|
3023
3023
|
Be("i18n", n);
|
|
3024
3024
|
const { apiUrl: m, setApiUrl: g } = Te();
|
|
3025
3025
|
g(e.url);
|
|
3026
|
-
const f =
|
|
3026
|
+
const f = Mt({ adapter: a.value, storages: [], dirname: ".", files: [] }), h = L(i("viewport", "grid")), p = L(i("darkMode", e.dark));
|
|
3027
3027
|
r.on("vf-darkMode-toggle", () => {
|
|
3028
3028
|
p.value = !p.value, o("darkMode", p.value);
|
|
3029
3029
|
});
|
|
3030
|
-
const b =
|
|
3030
|
+
const b = L(!1);
|
|
3031
3031
|
Be("loadingState", b);
|
|
3032
|
-
const E =
|
|
3032
|
+
const E = L(i("full-screen", !1));
|
|
3033
3033
|
r.on("vf-fullscreen-toggle", () => {
|
|
3034
3034
|
E.value = !E.value, o("full-screen", E.value);
|
|
3035
|
-
}), r.on("vf-view-toggle", (
|
|
3036
|
-
h.value =
|
|
3035
|
+
}), r.on("vf-view-toggle", (U) => {
|
|
3036
|
+
h.value = U;
|
|
3037
3037
|
});
|
|
3038
|
-
const D =
|
|
3038
|
+
const D = Mt({
|
|
3039
3039
|
active: !1,
|
|
3040
3040
|
type: "delete",
|
|
3041
3041
|
data: {}
|
|
3042
3042
|
});
|
|
3043
3043
|
r.on("vf-modal-close", () => {
|
|
3044
3044
|
D.active = !1;
|
|
3045
|
-
}), r.on("vf-modal-show", (
|
|
3046
|
-
D.active = !0, D.type =
|
|
3045
|
+
}), r.on("vf-modal-show", (U) => {
|
|
3046
|
+
D.active = !0, D.type = U.type, D.data = U;
|
|
3047
3047
|
});
|
|
3048
|
-
const
|
|
3049
|
-
Object.assign(f,
|
|
3048
|
+
const T = (U) => {
|
|
3049
|
+
Object.assign(f, U), r.emit("vf-nodes-selected", {}), r.emit("vf-explorer-update");
|
|
3050
3050
|
};
|
|
3051
|
-
let
|
|
3051
|
+
let I;
|
|
3052
3052
|
return r.on("vf-fetch-abort", () => {
|
|
3053
|
-
|
|
3054
|
-
}), r.on("vf-fetch", ({ params:
|
|
3055
|
-
["index", "search"].includes(
|
|
3056
|
-
const W =
|
|
3057
|
-
|
|
3058
|
-
a.value = K.adapter, ["index", "search"].includes(
|
|
3053
|
+
I.abort(), b.value = !1;
|
|
3054
|
+
}), r.on("vf-fetch", ({ params: U, onSuccess: H = null, onError: N = null }) => {
|
|
3055
|
+
["index", "search"].includes(U.q) && (I && I.abort(), b.value = !0), I = new AbortController();
|
|
3056
|
+
const W = I.signal;
|
|
3057
|
+
Tt(m.value, { params: U, signal: W }).then((K) => {
|
|
3058
|
+
a.value = K.adapter, ["index", "search"].includes(U.q) && (b.value = !1), r.emit("vf-modal-close"), T(K), H(K);
|
|
3059
3059
|
}).catch((K) => {
|
|
3060
3060
|
N && N(K);
|
|
3061
3061
|
}).finally(() => {
|
|
3062
3062
|
});
|
|
3063
|
-
}), r.on("vf-download", (
|
|
3064
|
-
document.getElementById("download_frame").src =
|
|
3063
|
+
}), r.on("vf-download", (U) => {
|
|
3064
|
+
document.getElementById("download_frame").src = U, r.emit("vf-modal-close");
|
|
3065
3065
|
}), Ce(() => {
|
|
3066
3066
|
r.emit("vf-fetch", { params: { q: "index", adapter: a.value } });
|
|
3067
|
-
}), (
|
|
3067
|
+
}), (U, H) => (y(), S("div", Ql, [
|
|
3068
3068
|
u("div", {
|
|
3069
3069
|
class: he(p.value ? "dark" : "")
|
|
3070
3070
|
}, [
|
|
3071
3071
|
u("div", {
|
|
3072
3072
|
class: he([E.value ? "fixed w-screen inset-0 z-20" : "relative rounded-md", "border flex flex-col bg-white dark:bg-gray-800 text-gray-700 dark:text-neutral-400 border-neutral-300 dark:border-gray-900 min-w-min select-none"]),
|
|
3073
3073
|
style: fo(E.value ? "" : "max-height: " + t.maxHeight),
|
|
3074
|
-
onMousedown:
|
|
3075
|
-
onTouchstart:
|
|
3074
|
+
onMousedown: H[0] || (H[0] = (N) => x(r).emit("vf-contextmenu-hide")),
|
|
3075
|
+
onTouchstart: H[1] || (H[1] = (N) => x(r).emit("vf-contextmenu-hide"))
|
|
3076
3076
|
}, [
|
|
3077
3077
|
De(Rs, { data: f }, null, 8, ["data"]),
|
|
3078
3078
|
De(Fl, { data: f }, null, 8, ["data"]),
|
|
@@ -3152,8 +3152,8 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3152
3152
|
emits: ["hidden"],
|
|
3153
3153
|
setup(t, { emit: e }) {
|
|
3154
3154
|
var m;
|
|
3155
|
-
const { t: r } = j("i18n"), o =
|
|
3156
|
-
|
|
3155
|
+
const { t: r } = j("i18n"), o = L(!1), i = L(null), a = L((m = i.value) == null ? void 0 : m.strMessage);
|
|
3156
|
+
It(a, () => o.value = !1);
|
|
3157
3157
|
const n = () => {
|
|
3158
3158
|
e("hidden"), o.value = !0;
|
|
3159
3159
|
};
|
|
@@ -3231,7 +3231,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3231
3231
|
setup(t) {
|
|
3232
3232
|
const e = t, r = j("emitter");
|
|
3233
3233
|
j("storage");
|
|
3234
|
-
const o = j("adapter"), { t: i } = j("i18n"), a =
|
|
3234
|
+
const o = j("adapter"), { t: i } = j("i18n"), a = L(e.selection.items), n = L(""), m = () => {
|
|
3235
3235
|
a.value.length && r.emit("vf-fetch", {
|
|
3236
3236
|
params: {
|
|
3237
3237
|
q: "delete",
|
|
@@ -3368,7 +3368,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3368
3368
|
setup(t) {
|
|
3369
3369
|
const e = t, r = j("emitter");
|
|
3370
3370
|
j("storage");
|
|
3371
|
-
const o = j("adapter"), { t: i } = j("i18n"), a =
|
|
3371
|
+
const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = () => {
|
|
3372
3372
|
a.value != "" && r.emit("vf-fetch", {
|
|
3373
3373
|
params: {
|
|
3374
3374
|
q: "newfolder",
|
|
@@ -3458,7 +3458,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3458
3458
|
setup(t) {
|
|
3459
3459
|
const e = t, r = j("emitter");
|
|
3460
3460
|
j("storage");
|
|
3461
|
-
const o = j("adapter"), { t: i } = j("i18n"), a =
|
|
3461
|
+
const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = () => {
|
|
3462
3462
|
a.value != "" && r.emit("vf-fetch", {
|
|
3463
3463
|
params: {
|
|
3464
3464
|
q: "newfile",
|
|
@@ -3530,9 +3530,9 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3530
3530
|
},
|
|
3531
3531
|
emits: ["load"],
|
|
3532
3532
|
setup(t, { emit: e }) {
|
|
3533
|
-
const r = t, o =
|
|
3533
|
+
const r = t, o = L(""), i = L(""), a = L(null), n = L(!1), { apiUrl: m } = Te(), g = L(""), f = L(!1), { t: h } = j("i18n");
|
|
3534
3534
|
Ce(() => {
|
|
3535
|
-
|
|
3535
|
+
Tt(m.value, {
|
|
3536
3536
|
params: { q: "preview", adapter: r.selection.adapter, path: r.selection.item.path },
|
|
3537
3537
|
json: !1
|
|
3538
3538
|
}).then((D) => {
|
|
@@ -3540,11 +3540,11 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3540
3540
|
});
|
|
3541
3541
|
});
|
|
3542
3542
|
const p = () => {
|
|
3543
|
-
n.value = !n.value, i.value = o.value, n.value == !0 &&
|
|
3543
|
+
n.value = !n.value, i.value = o.value, n.value == !0 && Lt(() => {
|
|
3544
3544
|
a.value.focus();
|
|
3545
3545
|
});
|
|
3546
3546
|
}, b = j("postData"), E = () => {
|
|
3547
|
-
g.value = "", f.value = !1,
|
|
3547
|
+
g.value = "", f.value = !1, Tt(m.value, {
|
|
3548
3548
|
method: "POST",
|
|
3549
3549
|
params: Object.assign(b, {
|
|
3550
3550
|
q: "save",
|
|
@@ -3559,7 +3559,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3559
3559
|
g.value = h(D.message), f.value = !0;
|
|
3560
3560
|
});
|
|
3561
3561
|
};
|
|
3562
|
-
return (D,
|
|
3562
|
+
return (D, T) => (y(), S(ue, null, [
|
|
3563
3563
|
u("div", tu, [
|
|
3564
3564
|
u("div", {
|
|
3565
3565
|
class: "mb-2 text-lg leading-6 font-medium text-gray-900 dark:text-gray-400",
|
|
@@ -3576,7 +3576,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3576
3576
|
}, M(x(h)("Save")), 1)) : X("", !0),
|
|
3577
3577
|
u("button", {
|
|
3578
3578
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
3579
|
-
onClick:
|
|
3579
|
+
onClick: T[0] || (T[0] = (I) => p())
|
|
3580
3580
|
}, M(n.value ? x(h)("Cancel") : x(h)("Edit")), 1)
|
|
3581
3581
|
])
|
|
3582
3582
|
]),
|
|
@@ -3585,7 +3585,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3585
3585
|
_e(u("textarea", {
|
|
3586
3586
|
ref_key: "editInput",
|
|
3587
3587
|
ref: a,
|
|
3588
|
-
"onUpdate:modelValue":
|
|
3588
|
+
"onUpdate:modelValue": T[1] || (T[1] = (I) => i.value = I),
|
|
3589
3589
|
class: "w-full p-2 rounded dark:bg-gray-700 dark:text-gray-200 dark:focus:ring-gray-600 dark:focus:border-gray-600 dark:selection:bg-gray-500 min-h-[200px] max-h-[60vh] text-xs",
|
|
3590
3590
|
name: "text",
|
|
3591
3591
|
id: "",
|
|
@@ -3597,7 +3597,7 @@ const Ql = { class: "vuefinder" }, ec = /* @__PURE__ */ u("iframe", {
|
|
|
3597
3597
|
])) : (y(), S("pre", au, M(o.value), 1)),
|
|
3598
3598
|
g.value.length ? (y(), J(Oe, {
|
|
3599
3599
|
key: 2,
|
|
3600
|
-
onHidden:
|
|
3600
|
+
onHidden: T[2] || (T[2] = (I) => g.value = ""),
|
|
3601
3601
|
error: f.value
|
|
3602
3602
|
}, {
|
|
3603
3603
|
default: q(() => [
|
|
@@ -3639,12 +3639,12 @@ function Fo(t) {
|
|
|
3639
3639
|
}
|
|
3640
3640
|
return t;
|
|
3641
3641
|
}
|
|
3642
|
-
function
|
|
3643
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
3642
|
+
function $t(t) {
|
|
3643
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? $t = function(e) {
|
|
3644
3644
|
return typeof e;
|
|
3645
|
-
} :
|
|
3645
|
+
} : $t = function(e) {
|
|
3646
3646
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3647
|
-
},
|
|
3647
|
+
}, $t(t);
|
|
3648
3648
|
}
|
|
3649
3649
|
function nu(t, e) {
|
|
3650
3650
|
if (!(t instanceof e))
|
|
@@ -3699,7 +3699,7 @@ function fu() {
|
|
|
3699
3699
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3700
3700
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3701
3701
|
}
|
|
3702
|
-
var
|
|
3702
|
+
var Vt = typeof window < "u" && typeof window.document < "u", Ee = Vt ? window : {}, pr = Vt && Ee.document.documentElement ? "ontouchstart" in Ee.document.documentElement : !1, vr = Vt ? "PointerEvent" in Ee : !1, ee = "cropper", br = "all", Wo = "crop", Xo = "move", qo = "zoom", He = "e", Ue = "w", Qe = "s", Pe = "n", ut = "ne", dt = "nw", ht = "se", ft = "sw", Jt = "".concat(ee, "-crop"), Gr = "".concat(ee, "-disabled"), pe = "".concat(ee, "-hidden"), Jr = "".concat(ee, "-hide"), mu = "".concat(ee, "-invisible"), Ot = "".concat(ee, "-modal"), Zt = "".concat(ee, "-move"), pt = "".concat(ee, "Action"), Dt = "".concat(ee, "Preview"), yr = "crop", Go = "move", Jo = "none", Qt = "crop", er = "cropend", tr = "cropmove", rr = "cropstart", Zr = "dblclick", gu = pr ? "touchstart" : "mousedown", pu = pr ? "touchmove" : "mousemove", vu = pr ? "touchend touchcancel" : "mouseup", Qr = vr ? "pointerdown" : gu, eo = vr ? "pointermove" : pu, to = vr ? "pointerup pointercancel" : vu, ro = "ready", oo = "resize", ao = "wheel", or = "zoom", so = "image/jpeg", bu = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, yu = /^data:/, wu = /^data:image\/jpeg;base64,/, xu = /^img|canvas$/i, Zo = 200, Qo = 100, io = {
|
|
3703
3703
|
viewMode: 0,
|
|
3704
3704
|
dragMode: yr,
|
|
3705
3705
|
initialAspectRatio: NaN,
|
|
@@ -3750,7 +3750,7 @@ function Ut(t) {
|
|
|
3750
3750
|
return typeof t > "u";
|
|
3751
3751
|
}
|
|
3752
3752
|
function Ye(t) {
|
|
3753
|
-
return
|
|
3753
|
+
return $t(t) === "object" && t !== null;
|
|
3754
3754
|
}
|
|
3755
3755
|
var Su = Object.prototype.hasOwnProperty;
|
|
3756
3756
|
function et(t) {
|
|
@@ -3849,7 +3849,7 @@ function wr(t) {
|
|
|
3849
3849
|
function ar(t, e) {
|
|
3850
3850
|
return Ye(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-".concat(wr(e)));
|
|
3851
3851
|
}
|
|
3852
|
-
function
|
|
3852
|
+
function vt(t, e, r) {
|
|
3853
3853
|
Ye(r) ? t[e] = r : t.dataset ? t.dataset[e] = r : t.setAttribute("data-".concat(wr(e)), r);
|
|
3854
3854
|
}
|
|
3855
3855
|
function Tu(t, e) {
|
|
@@ -3870,7 +3870,7 @@ function Tu(t, e) {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
var ta = /\s\s*/, ra = function() {
|
|
3872
3872
|
var t = !1;
|
|
3873
|
-
if (
|
|
3873
|
+
if (Vt) {
|
|
3874
3874
|
var e = !1, r = function() {
|
|
3875
3875
|
}, o = Object.defineProperty({}, "once", {
|
|
3876
3876
|
get: function() {
|
|
@@ -3933,7 +3933,7 @@ function co(t) {
|
|
|
3933
3933
|
var e = "timestamp=".concat(new Date().getTime());
|
|
3934
3934
|
return t + (t.indexOf("?") === -1 ? "?" : "&") + e;
|
|
3935
3935
|
}
|
|
3936
|
-
function
|
|
3936
|
+
function mt(t) {
|
|
3937
3937
|
var e = t.rotate, r = t.scaleX, o = t.scaleY, i = t.translateX, a = t.translateY, n = [];
|
|
3938
3938
|
Y(i) && i !== 0 && n.push("translateX(".concat(i, "px)")), Y(a) && a !== 0 && n.push("translateY(".concat(a, "px)")), Y(e) && e !== 0 && n.push("rotate(".concat(e, "deg)")), Y(r) && r !== 1 && n.push("scaleX(".concat(r, ")")), Y(o) && o !== 1 && n.push("scaleY(".concat(o, ")"));
|
|
3939
3939
|
var m = n.length ? n.join(" ") : "none";
|
|
@@ -3952,7 +3952,7 @@ function Ou(t) {
|
|
|
3952
3952
|
});
|
|
3953
3953
|
}), r;
|
|
3954
3954
|
}
|
|
3955
|
-
function
|
|
3955
|
+
function Ct(t, e) {
|
|
3956
3956
|
var r = t.pageX, o = t.pageY, i = {
|
|
3957
3957
|
endX: r,
|
|
3958
3958
|
endY: o
|
|
@@ -4001,26 +4001,26 @@ function Lu(t) {
|
|
|
4001
4001
|
};
|
|
4002
4002
|
}
|
|
4003
4003
|
function Pu(t, e, r, o) {
|
|
4004
|
-
var i = e.aspectRatio, a = e.naturalWidth, n = e.naturalHeight, m = e.rotate, g = m === void 0 ? 0 : m, f = e.scaleX, h = f === void 0 ? 1 : f, p = e.scaleY, b = p === void 0 ? 1 : p, E = r.aspectRatio, D = r.naturalWidth,
|
|
4004
|
+
var i = e.aspectRatio, a = e.naturalWidth, n = e.naturalHeight, m = e.rotate, g = m === void 0 ? 0 : m, f = e.scaleX, h = f === void 0 ? 1 : f, p = e.scaleY, b = p === void 0 ? 1 : p, E = r.aspectRatio, D = r.naturalWidth, T = r.naturalHeight, I = o.fillColor, U = I === void 0 ? "transparent" : I, H = o.imageSmoothingEnabled, N = H === void 0 ? !0 : H, W = o.imageSmoothingQuality, K = W === void 0 ? "low" : W, C = o.maxWidth, V = C === void 0 ? 1 / 0 : C, Q = o.maxHeight, ne = Q === void 0 ? 1 / 0 : Q, le = o.minWidth, fe = le === void 0 ? 0 : le, we = o.minHeight, be = we === void 0 ? 0 : we, Z = document.createElement("canvas"), O = Z.getContext("2d"), B = je({
|
|
4005
4005
|
aspectRatio: E,
|
|
4006
|
-
width:
|
|
4006
|
+
width: V,
|
|
4007
4007
|
height: ne
|
|
4008
|
-
}),
|
|
4008
|
+
}), z = je({
|
|
4009
4009
|
aspectRatio: E,
|
|
4010
4010
|
width: fe,
|
|
4011
4011
|
height: be
|
|
4012
|
-
}, "cover"), de = Math.min(
|
|
4012
|
+
}, "cover"), de = Math.min(B.width, Math.max(z.width, D)), G = Math.min(B.height, Math.max(z.height, T)), me = je({
|
|
4013
4013
|
aspectRatio: i,
|
|
4014
|
-
width:
|
|
4014
|
+
width: V,
|
|
4015
4015
|
height: ne
|
|
4016
4016
|
}), re = je({
|
|
4017
4017
|
aspectRatio: i,
|
|
4018
4018
|
width: fe,
|
|
4019
4019
|
height: be
|
|
4020
|
-
}, "cover"),
|
|
4021
|
-
return Z.width = rt(de), Z.height = rt(G),
|
|
4020
|
+
}, "cover"), xt = Math.min(me.width, Math.max(re.width, a)), qe = Math.min(me.height, Math.max(re.height, n)), Rt = [-xt / 2, -qe / 2, xt, qe];
|
|
4021
|
+
return Z.width = rt(de), Z.height = rt(G), O.fillStyle = U, O.fillRect(0, 0, de, G), O.save(), O.translate(de / 2, G / 2), O.rotate(g * Math.PI / 180), O.scale(h, b), O.imageSmoothingEnabled = N, O.imageSmoothingQuality = K, O.drawImage.apply(O, [t].concat(Yo(Rt.map(function(Ge) {
|
|
4022
4022
|
return Math.floor(rt(Ge));
|
|
4023
|
-
})))),
|
|
4023
|
+
})))), O.restore(), Z;
|
|
4024
4024
|
}
|
|
4025
4025
|
var aa = String.fromCharCode;
|
|
4026
4026
|
function Nu(t, e, r) {
|
|
@@ -4168,7 +4168,7 @@ var Hu = {
|
|
|
4168
4168
|
(o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCanvas(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, Ne(this.canvas, te({
|
|
4169
4169
|
width: o.width,
|
|
4170
4170
|
height: o.height
|
|
4171
|
-
},
|
|
4171
|
+
}, mt({
|
|
4172
4172
|
translateX: o.left,
|
|
4173
4173
|
translateY: o.top
|
|
4174
4174
|
}))), this.renderImage(e), this.cropped && this.limited && this.limitCropBox(!0, !0);
|
|
@@ -4183,7 +4183,7 @@ var Hu = {
|
|
|
4183
4183
|
}), Ne(this.image, te({
|
|
4184
4184
|
width: o.width,
|
|
4185
4185
|
height: o.height
|
|
4186
|
-
},
|
|
4186
|
+
}, mt(te({
|
|
4187
4187
|
translateX: o.left,
|
|
4188
4188
|
translateY: o.top
|
|
4189
4189
|
}, o)))), e && this.output();
|
|
@@ -4205,10 +4205,10 @@ var Hu = {
|
|
|
4205
4205
|
},
|
|
4206
4206
|
renderCropBox: function() {
|
|
4207
4207
|
var e = this.options, r = this.containerData, o = this.cropBoxData;
|
|
4208
|
-
(o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCropBox(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, e.movable && e.cropBoxMovable &&
|
|
4208
|
+
(o.width > o.maxWidth || o.width < o.minWidth) && (o.left = o.oldLeft), (o.height > o.maxHeight || o.height < o.minHeight) && (o.top = o.oldTop), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), this.limitCropBox(!1, !0), o.left = Math.min(Math.max(o.left, o.minLeft), o.maxLeft), o.top = Math.min(Math.max(o.top, o.minTop), o.maxTop), o.oldLeft = o.left, o.oldTop = o.top, e.movable && e.cropBoxMovable && vt(this.face, pt, o.width >= r.width && o.height >= r.height ? Xo : br), Ne(this.cropBox, te({
|
|
4209
4209
|
width: o.width,
|
|
4210
4210
|
height: o.height
|
|
4211
|
-
},
|
|
4211
|
+
}, mt({
|
|
4212
4212
|
translateX: o.left,
|
|
4213
4213
|
translateY: o.top
|
|
4214
4214
|
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output();
|
|
@@ -4223,7 +4223,7 @@ var Hu = {
|
|
|
4223
4223
|
var m = o;
|
|
4224
4224
|
typeof o == "string" ? m = e.ownerDocument.querySelectorAll(o) : o.querySelector && (m = [o]), this.previews = m, se(m, function(g) {
|
|
4225
4225
|
var f = document.createElement("img");
|
|
4226
|
-
|
|
4226
|
+
vt(g, Dt, {
|
|
4227
4227
|
width: g.offsetWidth,
|
|
4228
4228
|
height: g.offsetHeight,
|
|
4229
4229
|
html: g.innerHTML
|
|
@@ -4233,11 +4233,11 @@ var Hu = {
|
|
|
4233
4233
|
},
|
|
4234
4234
|
resetPreview: function() {
|
|
4235
4235
|
se(this.previews, function(e) {
|
|
4236
|
-
var r = ar(e,
|
|
4236
|
+
var r = ar(e, Dt);
|
|
4237
4237
|
Ne(e, {
|
|
4238
4238
|
width: r.width,
|
|
4239
4239
|
height: r.height
|
|
4240
|
-
}), e.innerHTML = r.html, Tu(e,
|
|
4240
|
+
}), e.innerHTML = r.html, Tu(e, Dt);
|
|
4241
4241
|
});
|
|
4242
4242
|
},
|
|
4243
4243
|
preview: function() {
|
|
@@ -4245,20 +4245,20 @@ var Hu = {
|
|
|
4245
4245
|
!this.cropped || this.disabled || (Ne(this.viewBoxImage, te({
|
|
4246
4246
|
width: n,
|
|
4247
4247
|
height: m
|
|
4248
|
-
},
|
|
4248
|
+
}, mt(te({
|
|
4249
4249
|
translateX: -g,
|
|
4250
4250
|
translateY: -f
|
|
4251
4251
|
}, e)))), se(this.previews, function(h) {
|
|
4252
|
-
var p = ar(h,
|
|
4253
|
-
i && (
|
|
4252
|
+
var p = ar(h, Dt), b = p.width, E = p.height, D = b, T = E, I = 1;
|
|
4253
|
+
i && (I = b / i, T = a * I), a && T > E && (I = E / a, D = i * I, T = E), Ne(h, {
|
|
4254
4254
|
width: D,
|
|
4255
|
-
height:
|
|
4255
|
+
height: T
|
|
4256
4256
|
}), Ne(h.getElementsByTagName("img")[0], te({
|
|
4257
|
-
width: n *
|
|
4258
|
-
height: m *
|
|
4259
|
-
},
|
|
4260
|
-
translateX: -g *
|
|
4261
|
-
translateY: -f *
|
|
4257
|
+
width: n * I,
|
|
4258
|
+
height: m * I
|
|
4259
|
+
}, mt(te({
|
|
4260
|
+
translateX: -g * I,
|
|
4261
|
+
translateY: -f * I
|
|
4262
4262
|
}, e))));
|
|
4263
4263
|
}));
|
|
4264
4264
|
}
|
|
@@ -4305,11 +4305,11 @@ var Hu = {
|
|
|
4305
4305
|
if (!(this.disabled || (e.type === "mousedown" || e.type === "pointerdown" && e.pointerType === "mouse") && (Y(r) && r !== 1 || Y(o) && o !== 0 || e.ctrlKey))) {
|
|
4306
4306
|
var i = this.options, a = this.pointers, n;
|
|
4307
4307
|
e.changedTouches ? se(e.changedTouches, function(m) {
|
|
4308
|
-
a[m.identifier] =
|
|
4309
|
-
}) : a[e.pointerId || 0] =
|
|
4308
|
+
a[m.identifier] = Ct(m);
|
|
4309
|
+
}) : a[e.pointerId || 0] = Ct(e), Object.keys(a).length > 1 && i.zoomable && i.zoomOnTouch ? n = qo : n = ar(e.target, pt), !!bu.test(n) && ot(this.element, rr, {
|
|
4310
4310
|
originalEvent: e,
|
|
4311
4311
|
action: n
|
|
4312
|
-
}) !== !1 && (e.preventDefault(), this.action = n, this.cropping = !1, n === Wo && (this.cropping = !0, ce(this.dragBox,
|
|
4312
|
+
}) !== !1 && (e.preventDefault(), this.action = n, this.cropping = !1, n === Wo && (this.cropping = !0, ce(this.dragBox, Ot)));
|
|
4313
4313
|
}
|
|
4314
4314
|
},
|
|
4315
4315
|
cropMove: function(e) {
|
|
@@ -4320,8 +4320,8 @@ var Hu = {
|
|
|
4320
4320
|
originalEvent: e,
|
|
4321
4321
|
action: r
|
|
4322
4322
|
}) !== !1 && (e.changedTouches ? se(e.changedTouches, function(i) {
|
|
4323
|
-
te(o[i.identifier] || {},
|
|
4324
|
-
}) : te(o[e.pointerId || 0] || {},
|
|
4323
|
+
te(o[i.identifier] || {}, Ct(i, !0));
|
|
4324
|
+
}) : te(o[e.pointerId || 0] || {}, Ct(e, !0)), this.change(e));
|
|
4325
4325
|
}
|
|
4326
4326
|
},
|
|
4327
4327
|
cropEnd: function(e) {
|
|
@@ -4329,7 +4329,7 @@ var Hu = {
|
|
|
4329
4329
|
var r = this.action, o = this.pointers;
|
|
4330
4330
|
e.changedTouches ? se(e.changedTouches, function(i) {
|
|
4331
4331
|
delete o[i.identifier];
|
|
4332
|
-
}) : delete o[e.pointerId || 0], r && (e.preventDefault(), Object.keys(o).length || (this.action = ""), this.cropping && (this.cropping = !1, tt(this.dragBox,
|
|
4332
|
+
}) : delete o[e.pointerId || 0], r && (e.preventDefault(), Object.keys(o).length || (this.action = ""), this.cropping && (this.cropping = !1, tt(this.dragBox, Ot, this.cropped && this.options.modal)), ot(this.element, er, {
|
|
4333
4333
|
originalEvent: e,
|
|
4334
4334
|
action: r
|
|
4335
4335
|
}));
|
|
@@ -4337,24 +4337,24 @@ var Hu = {
|
|
|
4337
4337
|
}
|
|
4338
4338
|
}, Yu = {
|
|
4339
4339
|
change: function(e) {
|
|
4340
|
-
var r = this.options, o = this.canvasData, i = this.containerData, a = this.cropBoxData, n = this.pointers, m = this.action, g = r.aspectRatio, f = a.left, h = a.top, p = a.width, b = a.height, E = f + p, D = h + b,
|
|
4341
|
-
!g && e.shiftKey && (g = p && b ? p / b : 1), this.limited && (
|
|
4340
|
+
var r = this.options, o = this.canvasData, i = this.containerData, a = this.cropBoxData, n = this.pointers, m = this.action, g = r.aspectRatio, f = a.left, h = a.top, p = a.width, b = a.height, E = f + p, D = h + b, T = 0, I = 0, U = i.width, H = i.height, N = !0, W;
|
|
4341
|
+
!g && e.shiftKey && (g = p && b ? p / b : 1), this.limited && (T = a.minLeft, I = a.minTop, U = T + Math.min(i.width, o.width, o.left + o.width), H = I + Math.min(i.height, o.height, o.top + o.height));
|
|
4342
4342
|
var K = n[Object.keys(n)[0]], C = {
|
|
4343
4343
|
x: K.endX - K.startX,
|
|
4344
4344
|
y: K.endY - K.startY
|
|
4345
|
-
},
|
|
4345
|
+
}, V = function(ne) {
|
|
4346
4346
|
switch (ne) {
|
|
4347
4347
|
case He:
|
|
4348
|
-
E + C.x >
|
|
4348
|
+
E + C.x > U && (C.x = U - E);
|
|
4349
4349
|
break;
|
|
4350
4350
|
case Ue:
|
|
4351
|
-
f + C.x <
|
|
4351
|
+
f + C.x < T && (C.x = T - f);
|
|
4352
4352
|
break;
|
|
4353
4353
|
case Pe:
|
|
4354
|
-
h + C.y <
|
|
4354
|
+
h + C.y < I && (C.y = I - h);
|
|
4355
4355
|
break;
|
|
4356
4356
|
case Qe:
|
|
4357
|
-
D + C.y >
|
|
4357
|
+
D + C.y > H && (C.y = H - D);
|
|
4358
4358
|
break;
|
|
4359
4359
|
}
|
|
4360
4360
|
};
|
|
@@ -4363,76 +4363,76 @@ var Hu = {
|
|
|
4363
4363
|
f += C.x, h += C.y;
|
|
4364
4364
|
break;
|
|
4365
4365
|
case He:
|
|
4366
|
-
if (C.x >= 0 && (E >=
|
|
4366
|
+
if (C.x >= 0 && (E >= U || g && (h <= I || D >= H))) {
|
|
4367
4367
|
N = !1;
|
|
4368
4368
|
break;
|
|
4369
4369
|
}
|
|
4370
|
-
|
|
4370
|
+
V(He), p += C.x, p < 0 && (m = Ue, p = -p, f -= p), g && (b = p / g, h += (a.height - b) / 2);
|
|
4371
4371
|
break;
|
|
4372
4372
|
case Pe:
|
|
4373
|
-
if (C.y <= 0 && (h <=
|
|
4373
|
+
if (C.y <= 0 && (h <= I || g && (f <= T || E >= U))) {
|
|
4374
4374
|
N = !1;
|
|
4375
4375
|
break;
|
|
4376
4376
|
}
|
|
4377
|
-
|
|
4377
|
+
V(Pe), b -= C.y, h += C.y, b < 0 && (m = Qe, b = -b, h -= b), g && (p = b * g, f += (a.width - p) / 2);
|
|
4378
4378
|
break;
|
|
4379
4379
|
case Ue:
|
|
4380
|
-
if (C.x <= 0 && (f <=
|
|
4380
|
+
if (C.x <= 0 && (f <= T || g && (h <= I || D >= H))) {
|
|
4381
4381
|
N = !1;
|
|
4382
4382
|
break;
|
|
4383
4383
|
}
|
|
4384
|
-
|
|
4384
|
+
V(Ue), p -= C.x, f += C.x, p < 0 && (m = He, p = -p, f -= p), g && (b = p / g, h += (a.height - b) / 2);
|
|
4385
4385
|
break;
|
|
4386
4386
|
case Qe:
|
|
4387
|
-
if (C.y >= 0 && (D >=
|
|
4387
|
+
if (C.y >= 0 && (D >= H || g && (f <= T || E >= U))) {
|
|
4388
4388
|
N = !1;
|
|
4389
4389
|
break;
|
|
4390
4390
|
}
|
|
4391
|
-
|
|
4391
|
+
V(Qe), b += C.y, b < 0 && (m = Pe, b = -b, h -= b), g && (p = b * g, f += (a.width - p) / 2);
|
|
4392
4392
|
break;
|
|
4393
|
-
case
|
|
4393
|
+
case ut:
|
|
4394
4394
|
if (g) {
|
|
4395
|
-
if (C.y <= 0 && (h <=
|
|
4395
|
+
if (C.y <= 0 && (h <= I || E >= U)) {
|
|
4396
4396
|
N = !1;
|
|
4397
4397
|
break;
|
|
4398
4398
|
}
|
|
4399
|
-
|
|
4399
|
+
V(Pe), b -= C.y, h += C.y, p = b * g;
|
|
4400
4400
|
} else
|
|
4401
|
-
|
|
4402
|
-
p < 0 && b < 0 ? (m =
|
|
4401
|
+
V(Pe), V(He), C.x >= 0 ? E < U ? p += C.x : C.y <= 0 && h <= I && (N = !1) : p += C.x, C.y <= 0 ? h > I && (b -= C.y, h += C.y) : (b -= C.y, h += C.y);
|
|
4402
|
+
p < 0 && b < 0 ? (m = ft, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = dt, p = -p, f -= p) : b < 0 && (m = ht, b = -b, h -= b);
|
|
4403
4403
|
break;
|
|
4404
|
-
case
|
|
4404
|
+
case dt:
|
|
4405
4405
|
if (g) {
|
|
4406
|
-
if (C.y <= 0 && (h <=
|
|
4406
|
+
if (C.y <= 0 && (h <= I || f <= T)) {
|
|
4407
4407
|
N = !1;
|
|
4408
4408
|
break;
|
|
4409
4409
|
}
|
|
4410
|
-
|
|
4410
|
+
V(Pe), b -= C.y, h += C.y, p = b * g, f += a.width - p;
|
|
4411
4411
|
} else
|
|
4412
|
-
|
|
4413
|
-
p < 0 && b < 0 ? (m =
|
|
4412
|
+
V(Pe), V(Ue), C.x <= 0 ? f > T ? (p -= C.x, f += C.x) : C.y <= 0 && h <= I && (N = !1) : (p -= C.x, f += C.x), C.y <= 0 ? h > I && (b -= C.y, h += C.y) : (b -= C.y, h += C.y);
|
|
4413
|
+
p < 0 && b < 0 ? (m = ht, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ut, p = -p, f -= p) : b < 0 && (m = ft, b = -b, h -= b);
|
|
4414
4414
|
break;
|
|
4415
|
-
case
|
|
4415
|
+
case ft:
|
|
4416
4416
|
if (g) {
|
|
4417
|
-
if (C.x <= 0 && (f <=
|
|
4417
|
+
if (C.x <= 0 && (f <= T || D >= H)) {
|
|
4418
4418
|
N = !1;
|
|
4419
4419
|
break;
|
|
4420
4420
|
}
|
|
4421
|
-
|
|
4421
|
+
V(Ue), p -= C.x, f += C.x, b = p / g;
|
|
4422
4422
|
} else
|
|
4423
|
-
|
|
4424
|
-
p < 0 && b < 0 ? (m =
|
|
4423
|
+
V(Qe), V(Ue), C.x <= 0 ? f > T ? (p -= C.x, f += C.x) : C.y >= 0 && D >= H && (N = !1) : (p -= C.x, f += C.x), C.y >= 0 ? D < H && (b += C.y) : b += C.y;
|
|
4424
|
+
p < 0 && b < 0 ? (m = ut, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ht, p = -p, f -= p) : b < 0 && (m = dt, b = -b, h -= b);
|
|
4425
4425
|
break;
|
|
4426
|
-
case
|
|
4426
|
+
case ht:
|
|
4427
4427
|
if (g) {
|
|
4428
|
-
if (C.x >= 0 && (E >=
|
|
4428
|
+
if (C.x >= 0 && (E >= U || D >= H)) {
|
|
4429
4429
|
N = !1;
|
|
4430
4430
|
break;
|
|
4431
4431
|
}
|
|
4432
|
-
|
|
4432
|
+
V(He), p += C.x, b = p / g;
|
|
4433
4433
|
} else
|
|
4434
|
-
|
|
4435
|
-
p < 0 && b < 0 ? (m =
|
|
4434
|
+
V(Qe), V(He), C.x >= 0 ? E < U ? p += C.x : C.y >= 0 && D >= H && (N = !1) : p += C.x, C.y >= 0 ? D < H && (b += C.y) : b += C.y;
|
|
4435
|
+
p < 0 && b < 0 ? (m = dt, b = -b, p = -p, h -= b, f -= p) : p < 0 ? (m = ft, p = -p, f -= p) : b < 0 && (m = ut, b = -b, h -= b);
|
|
4436
4436
|
break;
|
|
4437
4437
|
case Xo:
|
|
4438
4438
|
this.move(C.x, C.y), N = !1;
|
|
@@ -4445,7 +4445,7 @@ var Hu = {
|
|
|
4445
4445
|
N = !1;
|
|
4446
4446
|
break;
|
|
4447
4447
|
}
|
|
4448
|
-
W = oa(this.cropper), f = K.startX - W.left, h = K.startY - W.top, p = a.minWidth, b = a.minHeight, C.x > 0 ? m = C.y > 0 ?
|
|
4448
|
+
W = oa(this.cropper), f = K.startX - W.left, h = K.startY - W.top, p = a.minWidth, b = a.minHeight, C.x > 0 ? m = C.y > 0 ? ht : ut : C.x < 0 && (f -= p, m = C.y > 0 ? ft : dt), C.y < 0 && (h -= b), this.cropped || (Me(this.cropBox, pe), this.cropped = !0, this.limited && this.limitCropBox(!0, !0));
|
|
4449
4449
|
break;
|
|
4450
4450
|
}
|
|
4451
4451
|
N && (a.width = p, a.height = b, a.left = f, a.top = h, this.action = m, this.renderCropBox()), se(n, function(Q) {
|
|
@@ -4454,7 +4454,7 @@ var Hu = {
|
|
|
4454
4454
|
}
|
|
4455
4455
|
}, Wu = {
|
|
4456
4456
|
crop: function() {
|
|
4457
|
-
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && ce(this.dragBox,
|
|
4457
|
+
return this.ready && !this.cropped && !this.disabled && (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && ce(this.dragBox, Ot), Me(this.cropBox, pe), this.setCropBoxData(this.initialCropBoxData)), this;
|
|
4458
4458
|
},
|
|
4459
4459
|
reset: function() {
|
|
4460
4460
|
return this.ready && !this.disabled && (this.imageData = te({}, this.initialImageData), this.canvasData = te({}, this.initialCanvasData), this.cropBoxData = te({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this;
|
|
@@ -4465,7 +4465,7 @@ var Hu = {
|
|
|
4465
4465
|
top: 0,
|
|
4466
4466
|
width: 0,
|
|
4467
4467
|
height: 0
|
|
4468
|
-
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Me(this.dragBox,
|
|
4468
|
+
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Me(this.dragBox, Ot), ce(this.cropBox, pe)), this;
|
|
4469
4469
|
},
|
|
4470
4470
|
replace: function(e) {
|
|
4471
4471
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
@@ -4620,22 +4620,22 @@ var Hu = {
|
|
|
4620
4620
|
aspectRatio: h,
|
|
4621
4621
|
width: e.width || (f !== 1 ? o.width : m),
|
|
4622
4622
|
height: e.height || (f !== 1 ? o.height : g)
|
|
4623
|
-
}), D = E.width,
|
|
4624
|
-
D = Math.min(p.width, Math.max(b.width, D)),
|
|
4625
|
-
var
|
|
4626
|
-
|
|
4627
|
-
var
|
|
4628
|
-
|
|
4629
|
-
var K = o.width, C = o.height,
|
|
4630
|
-
|
|
4631
|
-
var
|
|
4623
|
+
}), D = E.width, T = E.height;
|
|
4624
|
+
D = Math.min(p.width, Math.max(b.width, D)), T = Math.min(p.height, Math.max(b.height, T));
|
|
4625
|
+
var I = document.createElement("canvas"), U = I.getContext("2d");
|
|
4626
|
+
I.width = rt(D), I.height = rt(T), U.fillStyle = e.fillColor || "transparent", U.fillRect(0, 0, D, T);
|
|
4627
|
+
var H = e.imageSmoothingEnabled, N = H === void 0 ? !0 : H, W = e.imageSmoothingQuality;
|
|
4628
|
+
U.imageSmoothingEnabled = N, W && (U.imageSmoothingQuality = W);
|
|
4629
|
+
var K = o.width, C = o.height, V = a, Q = n, ne, le, fe, we, be, Z;
|
|
4630
|
+
V <= -m || V > K ? (V = 0, ne = 0, fe = 0, be = 0) : V <= 0 ? (fe = -V, V = 0, ne = Math.min(K, m + V), be = ne) : V <= K && (fe = 0, ne = Math.min(m, K - V), be = ne), ne <= 0 || Q <= -g || Q > C ? (Q = 0, le = 0, we = 0, Z = 0) : Q <= 0 ? (we = -Q, Q = 0, le = Math.min(C, g + Q), Z = le) : Q <= C && (we = 0, le = Math.min(g, C - Q), Z = le);
|
|
4631
|
+
var O = [V, Q, ne, le];
|
|
4632
4632
|
if (be > 0 && Z > 0) {
|
|
4633
|
-
var
|
|
4634
|
-
|
|
4633
|
+
var B = D / m;
|
|
4634
|
+
O.push(fe * B, we * B, be * B, Z * B);
|
|
4635
4635
|
}
|
|
4636
|
-
return
|
|
4637
|
-
return Math.floor(rt(
|
|
4638
|
-
})))),
|
|
4636
|
+
return U.drawImage.apply(U, [o].concat(Yo(O.map(function(z) {
|
|
4637
|
+
return Math.floor(rt(z));
|
|
4638
|
+
})))), I;
|
|
4639
4639
|
},
|
|
4640
4640
|
setAspectRatio: function(e) {
|
|
4641
4641
|
var r = this.options;
|
|
@@ -4645,7 +4645,7 @@ var Hu = {
|
|
|
4645
4645
|
var r = this.options, o = this.dragBox, i = this.face;
|
|
4646
4646
|
if (this.ready && !this.disabled) {
|
|
4647
4647
|
var a = e === yr, n = r.movable && e === Go;
|
|
4648
|
-
e = a || n ? e : Jo, r.dragMode = e,
|
|
4648
|
+
e = a || n ? e : Jo, r.dragMode = e, vt(o, pt, e), tt(o, Jt, a), tt(o, Zt, n), r.cropBoxMovable || (vt(i, pt, e), tt(i, Jt, a), tt(i, Zt, n));
|
|
4649
4649
|
}
|
|
4650
4650
|
return this;
|
|
4651
4651
|
}
|
|
@@ -4748,7 +4748,7 @@ var Hu = {
|
|
|
4748
4748
|
var r = this.element, o = this.options, i = this.image, a = r.parentNode, n = document.createElement("div");
|
|
4749
4749
|
n.innerHTML = _u;
|
|
4750
4750
|
var m = n.querySelector(".".concat(ee, "-container")), g = m.querySelector(".".concat(ee, "-canvas")), f = m.querySelector(".".concat(ee, "-drag-box")), h = m.querySelector(".".concat(ee, "-crop-box")), p = h.querySelector(".".concat(ee, "-face"));
|
|
4751
|
-
this.container = a, this.cropper = m, this.canvas = g, this.dragBox = f, this.cropBox = h, this.viewBox = m.querySelector(".".concat(ee, "-view-box")), this.face = p, g.appendChild(i), ce(r, pe), a.insertBefore(m, r.nextSibling), this.isImg || Me(i, Jr), this.initPreview(), this.bind(), o.initialAspectRatio = Math.max(0, o.initialAspectRatio) || NaN, o.aspectRatio = Math.max(0, o.aspectRatio) || NaN, o.viewMode = Math.max(0, Math.min(3, Math.round(o.viewMode))) || 0, ce(h, pe), o.guides || ce(h.getElementsByClassName("".concat(ee, "-dashed")), pe), o.center || ce(h.getElementsByClassName("".concat(ee, "-center")), pe), o.background && ce(m, "".concat(ee, "-bg")), o.highlight || ce(p, mu), o.cropBoxMovable && (ce(p, Zt),
|
|
4751
|
+
this.container = a, this.cropper = m, this.canvas = g, this.dragBox = f, this.cropBox = h, this.viewBox = m.querySelector(".".concat(ee, "-view-box")), this.face = p, g.appendChild(i), ce(r, pe), a.insertBefore(m, r.nextSibling), this.isImg || Me(i, Jr), this.initPreview(), this.bind(), o.initialAspectRatio = Math.max(0, o.initialAspectRatio) || NaN, o.aspectRatio = Math.max(0, o.aspectRatio) || NaN, o.viewMode = Math.max(0, Math.min(3, Math.round(o.viewMode))) || 0, ce(h, pe), o.guides || ce(h.getElementsByClassName("".concat(ee, "-dashed")), pe), o.center || ce(h.getElementsByClassName("".concat(ee, "-center")), pe), o.background && ce(m, "".concat(ee, "-bg")), o.highlight || ce(p, mu), o.cropBoxMovable && (ce(p, Zt), vt(p, pt, br)), o.cropBoxResizable || (ce(h.getElementsByClassName("".concat(ee, "-line")), pe), ce(h.getElementsByClassName("".concat(ee, "-point")), pe)), this.render(), this.ready = !0, this.setDragMode(o.dragMode), o.autoCrop && this.crop(), this.setData(o.data), ge(o.ready) && xe(r, ro, o.ready, {
|
|
4752
4752
|
once: !0
|
|
4753
4753
|
}), ot(r, ro);
|
|
4754
4754
|
}
|
|
@@ -4783,7 +4783,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
4783
4783
|
},
|
|
4784
4784
|
emits: ["load"],
|
|
4785
4785
|
setup(t, { emit: e }) {
|
|
4786
|
-
const r = t, { t: o } = j("i18n"), { apiUrl: i } = Te(), a =
|
|
4786
|
+
const r = t, { t: o } = j("i18n"), { apiUrl: i } = Te(), a = L(null), n = L(null), m = L(!1), g = L(""), f = L(!1), h = () => {
|
|
4787
4787
|
m.value = !m.value, m.value ? n.value = new sa(a.value, {
|
|
4788
4788
|
crop(E) {
|
|
4789
4789
|
}
|
|
@@ -4794,7 +4794,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
4794
4794
|
height: 341
|
|
4795
4795
|
}).toBlob(
|
|
4796
4796
|
(E) => {
|
|
4797
|
-
g.value = "", f.value = !1,
|
|
4797
|
+
g.value = "", f.value = !1, Tt(i.value, {
|
|
4798
4798
|
method: "POST",
|
|
4799
4799
|
params: Object.assign(p, {
|
|
4800
4800
|
q: "upload",
|
|
@@ -4831,7 +4831,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
4831
4831
|
}, M(x(o)("Crop")), 1)) : X("", !0),
|
|
4832
4832
|
u("button", {
|
|
4833
4833
|
class: "ml-1 px-2 py-1 text-blue-500",
|
|
4834
|
-
onClick: D[0] || (D[0] = (
|
|
4834
|
+
onClick: D[0] || (D[0] = (T) => h())
|
|
4835
4835
|
}, M(m.value ? x(o)("Cancel") : x(o)("Edit")), 1)
|
|
4836
4836
|
])
|
|
4837
4837
|
]),
|
|
@@ -4846,7 +4846,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
4846
4846
|
]),
|
|
4847
4847
|
g.value.length ? (y(), J(Oe, {
|
|
4848
4848
|
key: 0,
|
|
4849
|
-
onHidden: D[1] || (D[1] = (
|
|
4849
|
+
onHidden: D[1] || (D[1] = (T) => g.value = ""),
|
|
4850
4850
|
error: f.value
|
|
4851
4851
|
}, {
|
|
4852
4852
|
default: q(() => [
|
|
@@ -5014,7 +5014,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5014
5014
|
selection: Object
|
|
5015
5015
|
},
|
|
5016
5016
|
setup(t) {
|
|
5017
|
-
const e = t, { apiUrl: r } = Te(), o = j("emitter"), { t: i } = j("i18n"), a =
|
|
5017
|
+
const e = t, { apiUrl: r } = Te(), o = j("emitter"), { t: i } = j("i18n"), a = L(!1), n = (f) => a.value = f, m = (f) => {
|
|
5018
5018
|
var h;
|
|
5019
5019
|
return ((h = e.selection.item.mime_type) != null ? h : "").startsWith(f);
|
|
5020
5020
|
}, g = () => {
|
|
@@ -5142,7 +5142,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5142
5142
|
setup(t) {
|
|
5143
5143
|
const e = t, r = j("emitter");
|
|
5144
5144
|
j("storage");
|
|
5145
|
-
const o = j("adapter"), { t: i } = j("i18n"), a =
|
|
5145
|
+
const o = j("adapter"), { t: i } = j("i18n"), a = L(e.selection.items[0]), n = L(e.selection.items[0].basename), m = L(""), g = () => {
|
|
5146
5146
|
n.value != "" && r.emit("vf-fetch", {
|
|
5147
5147
|
params: {
|
|
5148
5148
|
q: "rename",
|
|
@@ -5236,11 +5236,11 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5236
5236
|
current: Object
|
|
5237
5237
|
},
|
|
5238
5238
|
setup(t) {
|
|
5239
|
-
const e = t, r = j("emitter"), { apiUrl: o } = Te(), { t: i } = j("i18n"), a = j("maxFileSize"), n =
|
|
5239
|
+
const e = t, r = j("emitter"), { apiUrl: o } = Te(), { t: i } = j("i18n"), a = j("maxFileSize"), n = L(null), m = L(null), g = L(null), f = L([]), h = L(""), p = L(!0), b = () => {
|
|
5240
5240
|
h.value = "", n.value.start();
|
|
5241
|
-
}, E = j("postData")
|
|
5241
|
+
}, E = j("postData");
|
|
5242
5242
|
return Ce(() => {
|
|
5243
|
-
n.value = new
|
|
5243
|
+
n.value = new ct.Uploader({
|
|
5244
5244
|
runtimes: "html5",
|
|
5245
5245
|
browse_button: g.value,
|
|
5246
5246
|
container: m.value,
|
|
@@ -5249,33 +5249,33 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5249
5249
|
file_data_name: "file",
|
|
5250
5250
|
url: o.value + "?" + We(Object.assign(E, { q: "upload", adapter: e.current.adapter, path: e.current.dirname })),
|
|
5251
5251
|
headers: {
|
|
5252
|
-
...
|
|
5252
|
+
...Et && { "X-CSRF-Token": Et }
|
|
5253
5253
|
},
|
|
5254
5254
|
init: {
|
|
5255
5255
|
PostInit: function() {
|
|
5256
5256
|
},
|
|
5257
|
-
FilesAdded: function(
|
|
5258
|
-
p.value = !1,
|
|
5257
|
+
FilesAdded: function(D, T) {
|
|
5258
|
+
p.value = !1, ct.each(T, function(I) {
|
|
5259
5259
|
f.value.push({
|
|
5260
|
-
id:
|
|
5261
|
-
name:
|
|
5262
|
-
size:
|
|
5260
|
+
id: I.id,
|
|
5261
|
+
name: I.name,
|
|
5262
|
+
size: ct.formatSize(I.size),
|
|
5263
5263
|
percent: ""
|
|
5264
5264
|
});
|
|
5265
5265
|
});
|
|
5266
5266
|
},
|
|
5267
|
-
UploadProgress: function(
|
|
5268
|
-
f.value[f.value.findIndex((
|
|
5267
|
+
UploadProgress: function(D, T) {
|
|
5268
|
+
f.value[f.value.findIndex((I) => I.id == T.id)].percent = T.percent + "%";
|
|
5269
5269
|
},
|
|
5270
5270
|
UploadComplete: function() {
|
|
5271
5271
|
p.value = !0, r.emit("vf-fetch", { params: { q: "index", adapter: e.current.adapter, path: e.current.dirname } });
|
|
5272
5272
|
},
|
|
5273
|
-
Error: function(
|
|
5274
|
-
n.value.stop(),
|
|
5273
|
+
Error: function(D, T) {
|
|
5274
|
+
n.value.stop(), T.code == ct.HTTP_ERROR ? h.value = i(JSON.parse(T.response).message) : T.code == ct.FILE_SIZE_ERROR ? h.value = i("The selected file exceeds the maximum file size. You cannot upload files greater than %s", [a]) : h.value = i(T.message);
|
|
5275
5275
|
}
|
|
5276
5276
|
}
|
|
5277
5277
|
}), n.value.init();
|
|
5278
|
-
}), (
|
|
5278
|
+
}), (D, T) => (y(), J(Ae, null, {
|
|
5279
5279
|
buttons: q(() => [
|
|
5280
5280
|
u("button", {
|
|
5281
5281
|
disabled: p.value,
|
|
@@ -5285,7 +5285,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5285
5285
|
}, M(x(i)("Upload")), 11, Jd),
|
|
5286
5286
|
u("button", {
|
|
5287
5287
|
type: "button",
|
|
5288
|
-
onClick:
|
|
5288
|
+
onClick: T[1] || (T[1] = (I) => x(r).emit("vf-modal-close")),
|
|
5289
5289
|
class: "mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
|
5290
5290
|
}, M(x(i)("Cancel")), 1)
|
|
5291
5291
|
]),
|
|
@@ -5296,12 +5296,12 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5296
5296
|
u("h3", Yd, M(x(i)("Upload files")), 1),
|
|
5297
5297
|
u("div", Wd, [
|
|
5298
5298
|
u("div", Xd, [
|
|
5299
|
-
(y(!0), S(ue, null, ke(f.value, (
|
|
5299
|
+
(y(!0), S(ue, null, ke(f.value, (I) => (y(), S("div", null, [
|
|
5300
5300
|
u("div", {
|
|
5301
|
-
id:
|
|
5301
|
+
id: I.id
|
|
5302
5302
|
}, [
|
|
5303
|
-
ie(M(
|
|
5304
|
-
u("b", null, M(
|
|
5303
|
+
ie(M(I.name) + " ( " + M(I.size) + ") ", 1),
|
|
5304
|
+
u("b", null, M(I.percent), 1)
|
|
5305
5305
|
], 8, qd)
|
|
5306
5306
|
]))), 256)),
|
|
5307
5307
|
f.value.length ? X("", !0) : (y(), S("div", Gd, M(x(i)("No files selected!")), 1))
|
|
@@ -5320,7 +5320,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5320
5320
|
], 512),
|
|
5321
5321
|
h.value.length ? (y(), J(Oe, {
|
|
5322
5322
|
key: 0,
|
|
5323
|
-
onHidden:
|
|
5323
|
+
onHidden: T[0] || (T[0] = (I) => h.value = ""),
|
|
5324
5324
|
error: ""
|
|
5325
5325
|
}, {
|
|
5326
5326
|
default: q(() => [
|
|
@@ -5391,7 +5391,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5391
5391
|
setup(t) {
|
|
5392
5392
|
const e = t, r = j("emitter");
|
|
5393
5393
|
j("storage");
|
|
5394
|
-
const o = j("adapter"), { t: i } = j("i18n"), a =
|
|
5394
|
+
const o = j("adapter"), { t: i } = j("i18n"), a = L(""), n = L(""), m = L(e.selection.items), g = () => {
|
|
5395
5395
|
m.value.length && r.emit("vf-fetch", {
|
|
5396
5396
|
params: {
|
|
5397
5397
|
q: "archive",
|
|
@@ -5514,8 +5514,8 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5514
5514
|
const e = t, r = j("emitter");
|
|
5515
5515
|
j("storage");
|
|
5516
5516
|
const o = j("adapter"), { t: i } = j("i18n");
|
|
5517
|
-
|
|
5518
|
-
const a =
|
|
5517
|
+
L("");
|
|
5518
|
+
const a = L(e.selection.items[0]), n = L(""), m = L([]), g = () => {
|
|
5519
5519
|
r.emit("vf-fetch", {
|
|
5520
5520
|
params: {
|
|
5521
5521
|
q: "unarchive",
|
|
@@ -5642,7 +5642,7 @@ const qu = { class: "flex" }, Gu = ["aria-label"], Ju = { class: "ml-auto mb-2"
|
|
|
5642
5642
|
setup(t) {
|
|
5643
5643
|
const e = t, r = j("emitter"), { t: o } = j("i18n");
|
|
5644
5644
|
j("storage");
|
|
5645
|
-
const i = j("adapter"), a =
|
|
5645
|
+
const i = j("adapter"), a = L(e.selection.items.from), n = L(""), m = () => {
|
|
5646
5646
|
a.value.length && r.emit("vf-fetch", {
|
|
5647
5647
|
params: {
|
|
5648
5648
|
q: "move",
|