ire-preview 2.4.13 → 2.4.14
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/lib.es.js +383 -383
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -75,28 +75,28 @@ function isComputed(Ne) {
|
|
|
75
75
|
}
|
|
76
76
|
function createOptionsStore(Ne, _e, ke, De) {
|
|
77
77
|
const { state: $e, actions: Re, getters: Be } = _e, Le = ke.state.value[Ne];
|
|
78
|
-
let
|
|
78
|
+
let Ie;
|
|
79
79
|
function Ae() {
|
|
80
80
|
Le || (ke.state.value[Ne] = $e ? $e() : {});
|
|
81
|
-
const
|
|
82
|
-
return assign(
|
|
81
|
+
const ze = toRefs(ke.state.value[Ne]);
|
|
82
|
+
return assign(ze, Re, Object.keys(Be || {}).reduce((je, Fe) => (je[Fe] = markRaw(computed$1(() => {
|
|
83
83
|
setActivePinia(ke);
|
|
84
84
|
const Ve = ke._s.get(Ne);
|
|
85
85
|
return Be[Fe].call(Ve, Ve);
|
|
86
86
|
})), je), {}));
|
|
87
87
|
}
|
|
88
|
-
return
|
|
88
|
+
return Ie = createSetupStore(Ne, Ae, _e, ke, De, !0), Ie;
|
|
89
89
|
}
|
|
90
90
|
function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
|
|
91
91
|
let Be;
|
|
92
|
-
const Le = assign({ actions: {} }, ke),
|
|
93
|
-
let Ae,
|
|
92
|
+
const Le = assign({ actions: {} }, ke), Ie = { deep: !0 };
|
|
93
|
+
let Ae, ze, je = [], Fe = [], Ve;
|
|
94
94
|
const He = De.state.value[Ne];
|
|
95
95
|
!Re && !He && (De.state.value[Ne] = {}), ref({});
|
|
96
96
|
let qe;
|
|
97
97
|
function Xe(Ke) {
|
|
98
98
|
let ei;
|
|
99
|
-
Ae =
|
|
99
|
+
Ae = ze = !1, typeof Ke == "function" ? (Ke(De.state.value[Ne]), ei = {
|
|
100
100
|
type: MutationType.patchFunction,
|
|
101
101
|
storeId: Ne,
|
|
102
102
|
events: Ve
|
|
@@ -109,7 +109,7 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
|
|
|
109
109
|
const ii = qe = Symbol();
|
|
110
110
|
nextTick().then(() => {
|
|
111
111
|
qe === ii && (Ae = !0);
|
|
112
|
-
}),
|
|
112
|
+
}), ze = !0, triggerSubscriptions(je, ei, De.state.value[Ne]);
|
|
113
113
|
}
|
|
114
114
|
const We = Re ? function() {
|
|
115
115
|
const { state: ei } = ke, ii = ei ? ei() : {};
|
|
@@ -160,12 +160,12 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
|
|
|
160
160
|
$reset: We,
|
|
161
161
|
$subscribe(Ke, ei = {}) {
|
|
162
162
|
const ii = addSubscription(je, Ke, ei.detached, () => ti()), ti = Be.run(() => watch(() => De.state.value[Ne], (ni) => {
|
|
163
|
-
(ei.flush === "sync" ?
|
|
163
|
+
(ei.flush === "sync" ? ze : Ae) && Ke({
|
|
164
164
|
storeId: Ne,
|
|
165
165
|
type: MutationType.direct,
|
|
166
166
|
events: Ve
|
|
167
167
|
}, ni);
|
|
168
|
-
}, assign({},
|
|
168
|
+
}, assign({}, Ie, ei)));
|
|
169
169
|
return ii;
|
|
170
170
|
},
|
|
171
171
|
$dispose: Ze
|
|
@@ -195,7 +195,7 @@ function createSetupStore(Ne, _e, ke = {}, De, $e, Re) {
|
|
|
195
195
|
pinia: De,
|
|
196
196
|
options: Le
|
|
197
197
|
})));
|
|
198
|
-
}), He && Re && ke.hydrate && ke.hydrate(Ue.$state, He), Ae = !0,
|
|
198
|
+
}), He && Re && ke.hydrate && ke.hydrate(Ue.$state, He), Ae = !0, ze = !0, Ue;
|
|
199
199
|
}
|
|
200
200
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
201
201
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -204,10 +204,10 @@ function defineStore(Ne, _e, ke) {
|
|
|
204
204
|
const $e = typeof _e == "function";
|
|
205
205
|
De = $e ? ke : _e;
|
|
206
206
|
function Re(Be, Le) {
|
|
207
|
-
const
|
|
207
|
+
const Ie = hasInjectionContext();
|
|
208
208
|
return Be = // in test mode, ignore the argument provided as we can always retrieve a
|
|
209
209
|
// pinia instance with getActivePinia()
|
|
210
|
-
Be || (
|
|
210
|
+
Be || (Ie ? inject(piniaSymbol, null) : null), Be && setActivePinia(Be), Be = activePinia, Be._s.has(Ne) || ($e ? createSetupStore(Ne, _e, De, Be) : createOptionsStore(Ne, De, Be)), Be._s.get(Ne);
|
|
211
211
|
}
|
|
212
212
|
return Re.$id = Ne, Re;
|
|
213
213
|
}
|
|
@@ -228,8 +228,8 @@ function storeToRefs(Ne) {
|
|
|
228
228
|
}
|
|
229
229
|
const useGlobalStore = /* @__PURE__ */ defineStore("global", () => {
|
|
230
230
|
const Ne = ref(), _e = ref("1"), ke = ref(), De = ref(), $e = (Ae) => {
|
|
231
|
-
var
|
|
232
|
-
return (Fe = (je = (
|
|
231
|
+
var ze, je, Fe;
|
|
232
|
+
return (Fe = (je = (ze = ke.value) == null ? void 0 : ze.meta) == null ? void 0 : je.find(
|
|
233
233
|
(Ve) => (Ve == null ? void 0 : Ve.meta_key) === Ae
|
|
234
234
|
)) == null ? void 0 : Fe.meta_value;
|
|
235
235
|
}, Re = computed$1(() => $e("open_reserved_flat") === "true"), Be = computed$1(() => $e("open_sold_flat") === "true"), Le = computed$1(() => $e("price_rounded") === "true");
|
|
@@ -556,7 +556,7 @@ const tr = (Ne) => {
|
|
|
556
556
|
return (De, $e) => (openBlock(), createElementBlock("div", null, [
|
|
557
557
|
createVNode(Transition, { name: "ire-fade-in-out" }, {
|
|
558
558
|
default: withCtx(() => {
|
|
559
|
-
var Re, Be, Le,
|
|
559
|
+
var Re, Be, Le, Ie, Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi;
|
|
560
560
|
return [
|
|
561
561
|
De.type && De.hoveredData && De.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
562
562
|
De.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
@@ -564,9 +564,9 @@ const tr = (Ne) => {
|
|
|
564
564
|
createElementVNode("div", _hoisted_4$7, toDisplayString((Re = De.hoveredData) == null ? void 0 : Re.floor_number), 1),
|
|
565
565
|
createElementVNode("div", _hoisted_5$3, toDisplayString(unref(tr)("floor")), 1)
|
|
566
566
|
]),
|
|
567
|
-
(Be = De.hoveredData) != null && Be.conf || (
|
|
567
|
+
(Be = De.hoveredData) != null && Be.conf || (Ie = (Le = De.hoveredData) == null ? void 0 : Le.flats) != null && Ie.length ? (openBlock(), createElementBlock("div", _hoisted_6$3, [
|
|
568
568
|
ke.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(ke.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
569
|
-
(
|
|
569
|
+
(ze = (Ae = De.hoveredData) == null ? void 0 : Ae.counts) != null && ze.available ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
|
|
570
570
|
createElementVNode("div", _hoisted_10$3, toDisplayString(((Fe = (je = De.hoveredData) == null ? void 0 : je.counts) == null ? void 0 : Fe.available) || 0), 1),
|
|
571
571
|
createElementVNode("div", _hoisted_11$3, toDisplayString(unref(tr)("available")), 1)
|
|
572
572
|
])) : createCommentVNode("", !0),
|
|
@@ -660,7 +660,7 @@ const tr = (Ne) => {
|
|
|
660
660
|
return tr((Re = _e.hoveredData) == null ? void 0 : Re.conf);
|
|
661
661
|
});
|
|
662
662
|
return (Re, Be) => {
|
|
663
|
-
var Le,
|
|
663
|
+
var Le, Ie, Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti;
|
|
664
664
|
return Re.type && Re.hoveredData && Re.type !== "tooltip" ? (openBlock(), createElementBlock("div", {
|
|
665
665
|
key: 0,
|
|
666
666
|
class: normalizeClass(["ire-pointer-events-none ire-absolute ire-select-none", {
|
|
@@ -683,14 +683,14 @@ const tr = (Ne) => {
|
|
|
683
683
|
$e.value ? (openBlock(), createElementBlock("div", _hoisted_4$6, toDisplayString($e.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
684
684
|
createElementVNode("div", _hoisted_6$2, toDisplayString(unref(tr)("starting from")) + ": ", 1),
|
|
685
685
|
createElementVNode("div", _hoisted_7$2, [
|
|
686
|
-
createTextVNode(toDisplayString(unref(getPrice)(+((Ae = (
|
|
686
|
+
createTextVNode(toDisplayString(unref(getPrice)(+((Ae = (Ie = Re.hoveredData) == null ? void 0 : Ie.counts) == null ? void 0 : Ae.minimum_price) || 0)) + " ", 1),
|
|
687
687
|
createElementVNode("span", _hoisted_8$2, toDisplayString(unref(currencySymbol)()), 1)
|
|
688
688
|
])
|
|
689
689
|
]))
|
|
690
690
|
]),
|
|
691
691
|
createElementVNode("div", _hoisted_9$2, [
|
|
692
692
|
createElementVNode("div", _hoisted_10$2, [
|
|
693
|
-
createElementVNode("span", null, toDisplayString($e.value ? 0 : ((je = (
|
|
693
|
+
createElementVNode("span", null, toDisplayString($e.value ? 0 : ((je = (ze = Re.hoveredData) == null ? void 0 : ze.counts) == null ? void 0 : je.available) || 0), 1),
|
|
694
694
|
createTextVNode(" " + toDisplayString(unref(tr)("available")), 1)
|
|
695
695
|
]),
|
|
696
696
|
Be[1] || (Be[1] = createElementVNode("span", null, "•", -1)),
|
|
@@ -808,7 +808,7 @@ const tr = (Ne) => {
|
|
|
808
808
|
Re.value = !0;
|
|
809
809
|
}, 400);
|
|
810
810
|
}
|
|
811
|
-
), (Le,
|
|
811
|
+
), (Le, Ie) => (openBlock(), createElementBlock("div", {
|
|
812
812
|
ref_key: "canvasRef",
|
|
813
813
|
ref: $e,
|
|
814
814
|
class: "ire-group ire-relative ire-overflow-hidden ire-pt-3"
|
|
@@ -860,7 +860,7 @@ const tr = (Ne) => {
|
|
|
860
860
|
},
|
|
861
861
|
emits: ["changeComponent"],
|
|
862
862
|
setup(Ne, { emit: _e }) {
|
|
863
|
-
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re),
|
|
863
|
+
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(null), Fe = computed(() => {
|
|
864
864
|
if (De.project)
|
|
865
865
|
return De.project.svg;
|
|
866
866
|
}), Ve = (Xe) => {
|
|
@@ -868,8 +868,8 @@ const tr = (Ne) => {
|
|
|
868
868
|
We && (Ae.value = We);
|
|
869
869
|
}, He = () => {
|
|
870
870
|
var We;
|
|
871
|
-
if (!
|
|
872
|
-
((We =
|
|
871
|
+
if (!Ie.value) return;
|
|
872
|
+
((We = Ie.value) == null ? void 0 : We.querySelectorAll("g")).forEach((Ze) => {
|
|
873
873
|
var Qe, Je, Ke, ei, ii;
|
|
874
874
|
const Ge = Ze == null ? void 0 : Ze.getAttribute("id"), Ye = (Je = (Qe = De.project) == null ? void 0 : Qe.polygon_data) == null ? void 0 : Je.find(
|
|
875
875
|
(ti) => (ti == null ? void 0 : ti.key) === Ge
|
|
@@ -892,7 +892,7 @@ const tr = (Ne) => {
|
|
|
892
892
|
}, qe = (Xe) => {
|
|
893
893
|
var Ze, Ge, Ye;
|
|
894
894
|
const We = Xe.target;
|
|
895
|
-
(We == null ? void 0 : We.nodeName) === "path" && (((Ze =
|
|
895
|
+
(We == null ? void 0 : We.nodeName) === "path" && (((Ze = ze.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = ze.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke("changeComponent", ((Ye = je.value) == null ? void 0 : Ye.type) || "", ze == null ? void 0 : ze.value));
|
|
896
896
|
};
|
|
897
897
|
return watch(
|
|
898
898
|
() => $e == null ? void 0 : $e.value,
|
|
@@ -915,32 +915,32 @@ const tr = (Ne) => {
|
|
|
915
915
|
const ti = (Ue = De.floors) == null ? void 0 : Ue.find(
|
|
916
916
|
(ri) => ri.id === ii
|
|
917
917
|
);
|
|
918
|
-
|
|
918
|
+
ze.value = ti;
|
|
919
919
|
break;
|
|
920
920
|
case "block":
|
|
921
921
|
const ni = (Qe = De.blocks) == null ? void 0 : Qe.find(
|
|
922
922
|
(ri) => (ri == null ? void 0 : ri.id) === ii
|
|
923
923
|
);
|
|
924
|
-
|
|
924
|
+
ze.value = ni;
|
|
925
925
|
break;
|
|
926
926
|
case "flat":
|
|
927
927
|
const oi = (Je = De.flats) == null ? void 0 : Je.find(
|
|
928
928
|
(ri) => (ri == null ? void 0 : ri.id) === ii
|
|
929
929
|
);
|
|
930
|
-
|
|
930
|
+
ze.value = oi;
|
|
931
931
|
break;
|
|
932
932
|
case "tooltip":
|
|
933
933
|
const si = (Ke = De.actions) == null ? void 0 : Ke.find(
|
|
934
934
|
(ri) => (ri == null ? void 0 : ri.id) === ii
|
|
935
935
|
);
|
|
936
|
-
|
|
936
|
+
ze.value = si;
|
|
937
937
|
break;
|
|
938
938
|
default:
|
|
939
|
-
|
|
939
|
+
ze.value = null;
|
|
940
940
|
break;
|
|
941
941
|
}
|
|
942
942
|
} else
|
|
943
|
-
je.value = null,
|
|
943
|
+
je.value = null, ze.value = null;
|
|
944
944
|
}
|
|
945
945
|
), onMounted(() => {
|
|
946
946
|
document.addEventListener("mousemove", Ve), He();
|
|
@@ -949,7 +949,7 @@ const tr = (Ne) => {
|
|
|
949
949
|
}), (Xe, We) => {
|
|
950
950
|
var Ze;
|
|
951
951
|
return openBlock(), createBlock(_sfc_main$i, {
|
|
952
|
-
hoverdData:
|
|
952
|
+
hoverdData: ze.value,
|
|
953
953
|
type: (Ze = je.value) == null ? void 0 : Ze.type
|
|
954
954
|
}, {
|
|
955
955
|
default: withCtx(() => {
|
|
@@ -965,7 +965,7 @@ const tr = (Ne) => {
|
|
|
965
965
|
innerHTML: unref(Fe),
|
|
966
966
|
key: unref(Fe),
|
|
967
967
|
ref_key: "svgRef",
|
|
968
|
-
ref:
|
|
968
|
+
ref: Ie,
|
|
969
969
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
970
970
|
onClick: qe
|
|
971
971
|
}, null, 8, _hoisted_3$7))
|
|
@@ -1002,10 +1002,10 @@ const tr = (Ne) => {
|
|
|
1002
1002
|
class: "ire-w-full ire-cursor-pointer ire-appearance-none ire-rounded-none ire-bg-transparent ire-py-2 ire-pl-3 ire-pr-8 ire-text-sm ire-text-slate-700 ire-shadow-sm ire-transition ire-duration-300 ire-ease-linear placeholder:ire-text-slate-400 hover:ire-border-slate-400 focus:ire-border-slate-400 focus:ire-shadow-md focus:ire-outline-none"
|
|
1003
1003
|
}, [
|
|
1004
1004
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(Re.data, (Le) => {
|
|
1005
|
-
var
|
|
1005
|
+
var Ie, Ae;
|
|
1006
1006
|
return openBlock(), createElementBlock("option", {
|
|
1007
1007
|
value: Le.value,
|
|
1008
|
-
disabled: ((
|
|
1008
|
+
disabled: ((Ie = Le == null ? void 0 : Le.title) == null ? void 0 : Ie.includes("reserved")) && !unref(ke) || ((Ae = Le == null ? void 0 : Le.title) == null ? void 0 : Ae.includes("sold")) && !unref(De)
|
|
1009
1009
|
}, toDisplayString(Le.title), 9, _hoisted_4$4);
|
|
1010
1010
|
}), 256))
|
|
1011
1011
|
], 512), [
|
|
@@ -1067,7 +1067,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
|
|
|
1067
1067
|
},
|
|
1068
1068
|
emits: ["changeComponent"],
|
|
1069
1069
|
setup(Ne, { emit: _e }) {
|
|
1070
|
-
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re),
|
|
1070
|
+
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(null), Fe = ref(), Ve = ref(), He = computed$1(() => {
|
|
1071
1071
|
var Ye;
|
|
1072
1072
|
if ((Ye = De.floor) != null && Ye.svg)
|
|
1073
1073
|
return De.floor.svg;
|
|
@@ -1098,10 +1098,10 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
|
|
|
1098
1098
|
}, We = (Ye) => {
|
|
1099
1099
|
var Qe, Je, Ke;
|
|
1100
1100
|
const Ue = Ye.target;
|
|
1101
|
-
(Ue == null ? void 0 : Ue.nodeName) === "path" && (je.value && "conf" in je.value && (((Qe = je.value) == null ? void 0 : Qe.conf) === "reserved" && !Be.value || ((Je = je.value) == null ? void 0 : Je.conf) === "sold" && !Le.value) || ke("changeComponent", ((Ke =
|
|
1101
|
+
(Ue == null ? void 0 : Ue.nodeName) === "path" && (je.value && "conf" in je.value && (((Qe = je.value) == null ? void 0 : Qe.conf) === "reserved" && !Be.value || ((Je = je.value) == null ? void 0 : Je.conf) === "sold" && !Le.value) || ke("changeComponent", ((Ke = ze.value) == null ? void 0 : Ke.type) || "", je.value));
|
|
1102
1102
|
}, Ze = () => {
|
|
1103
1103
|
var Ye;
|
|
1104
|
-
|
|
1104
|
+
Ie.value && ((Ye = Ie.value) == null ? void 0 : Ye.querySelectorAll("g")).forEach((Qe) => {
|
|
1105
1105
|
var ei, ii, ti, ni, oi, si;
|
|
1106
1106
|
const Je = Qe == null ? void 0 : Qe.getAttribute("id"), Ke = (ii = (ei = De.floor) == null ? void 0 : ei.polygon_data) == null ? void 0 : ii.find(
|
|
1107
1107
|
(ri) => (ri == null ? void 0 : ri.key) === Je
|
|
@@ -1129,35 +1129,35 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
|
|
|
1129
1129
|
const Ue = Ye == null ? void 0 : Ye.parentElement;
|
|
1130
1130
|
if (Ue && (Ue == null ? void 0 : Ue.nodeName) === "g") {
|
|
1131
1131
|
const oi = Ue.getAttribute("id");
|
|
1132
|
-
if (!oi || (
|
|
1133
|
-
if (((Ke =
|
|
1132
|
+
if (!oi || (ze.value = ((Je = (Qe = De.floor) == null ? void 0 : Qe.polygon_data) == null ? void 0 : Je.find((si) => (si == null ? void 0 : si.key) === oi)) || null, !ze.value)) return;
|
|
1133
|
+
if (((Ke = ze.value) == null ? void 0 : Ke.type) === "flat") {
|
|
1134
1134
|
const si = (ei = De.flats) == null ? void 0 : ei.find(
|
|
1135
1135
|
(ai) => {
|
|
1136
1136
|
var li;
|
|
1137
|
-
return (ai == null ? void 0 : ai.id) === ((li =
|
|
1137
|
+
return (ai == null ? void 0 : ai.id) === ((li = ze.value) == null ? void 0 : li.id);
|
|
1138
1138
|
}
|
|
1139
1139
|
), ri = si ? {
|
|
1140
1140
|
...si,
|
|
1141
1141
|
conf: si.conf || ((ii = De.floor) == null ? void 0 : ii.conf) || ""
|
|
1142
1142
|
} : null;
|
|
1143
1143
|
je.value = ri;
|
|
1144
|
-
} else if (((ti =
|
|
1144
|
+
} else if (((ti = ze.value) == null ? void 0 : ti.type) === "tooltip") {
|
|
1145
1145
|
const si = (ni = De.actions) == null ? void 0 : ni.find(
|
|
1146
1146
|
(ri) => {
|
|
1147
1147
|
var ai;
|
|
1148
|
-
return (ri == null ? void 0 : ri.id) === ((ai =
|
|
1148
|
+
return (ri == null ? void 0 : ri.id) === ((ai = ze.value) == null ? void 0 : ai.id);
|
|
1149
1149
|
}
|
|
1150
1150
|
);
|
|
1151
1151
|
je.value = si ?? null;
|
|
1152
1152
|
} else
|
|
1153
1153
|
je.value = null;
|
|
1154
1154
|
} else
|
|
1155
|
-
|
|
1155
|
+
ze.value = null;
|
|
1156
1156
|
}
|
|
1157
1157
|
), watch(
|
|
1158
1158
|
() => $e == null ? void 0 : $e.value,
|
|
1159
1159
|
() => {
|
|
1160
|
-
$e != null && $e.value || (Ae.value = null,
|
|
1160
|
+
$e != null && $e.value || (Ae.value = null, ze.value = null);
|
|
1161
1161
|
}
|
|
1162
1162
|
), watch(
|
|
1163
1163
|
() => Fe.value,
|
|
@@ -1189,7 +1189,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
|
|
|
1189
1189
|
var Qe;
|
|
1190
1190
|
return openBlock(), createBlock(_sfc_main$i, {
|
|
1191
1191
|
hoverdData: je.value,
|
|
1192
|
-
type: (Qe =
|
|
1192
|
+
type: (Qe = ze.value) == null ? void 0 : Qe.type
|
|
1193
1193
|
}, {
|
|
1194
1194
|
header: withCtx(() => [
|
|
1195
1195
|
createVNode(_sfc_main$e, { onClick: Ge }),
|
|
@@ -1212,7 +1212,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_ren
|
|
|
1212
1212
|
}, null, 8, _hoisted_3$5),
|
|
1213
1213
|
(openBlock(), createElementBlock("div", {
|
|
1214
1214
|
ref_key: "svgRef",
|
|
1215
|
-
ref:
|
|
1215
|
+
ref: Ie,
|
|
1216
1216
|
innerHTML: He.value,
|
|
1217
1217
|
key: He.value,
|
|
1218
1218
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
@@ -1526,8 +1526,8 @@ class I extends g {
|
|
|
1526
1526
|
Le = De - Be < 0.5 * (ke - Be) ? ke : Be;
|
|
1527
1527
|
break;
|
|
1528
1528
|
case "iterateZoom":
|
|
1529
|
-
let
|
|
1530
|
-
Le =
|
|
1529
|
+
let Ie = [1, ke, Re].sort((ze, je) => ze - je), Ae = Ie.findIndex((ze) => ze > De + 1e-5);
|
|
1530
|
+
Le = Ie[Ae] || 1;
|
|
1531
1531
|
}
|
|
1532
1532
|
return Le;
|
|
1533
1533
|
}
|
|
@@ -1566,9 +1566,9 @@ class I extends g {
|
|
|
1566
1566
|
for (const _e of v) _e === "e" && this.isBouncingX || _e === "f" && this.isBouncingY || (this.velocity[_e] = (1 / (1 - this.friction) - 1) * (this.target[_e] - this.current[_e]));
|
|
1567
1567
|
}
|
|
1568
1568
|
checkBounds(_e = 0, ke = 0) {
|
|
1569
|
-
const { current: De } = this, $e = De.e + _e, Re = De.f + ke, Be = this.getBounds(), { x: Le, y:
|
|
1569
|
+
const { current: De } = this, $e = De.e + _e, Re = De.f + ke, Be = this.getBounds(), { x: Le, y: Ie } = Be, Ae = Le.min, ze = Le.max, je = Ie.min, Fe = Ie.max;
|
|
1570
1570
|
let Ve = 0, He = 0;
|
|
1571
|
-
return Ae !== 1 / 0 && $e < Ae ? Ve = Ae - $e :
|
|
1571
|
+
return Ae !== 1 / 0 && $e < Ae ? Ve = Ae - $e : ze !== 1 / 0 && $e > ze && (Ve = ze - $e), je !== 1 / 0 && Re < je ? He = je - Re : Fe !== 1 / 0 && Re > Fe && (He = Fe - Re), Math.abs(Ve) < 1e-4 && (Ve = 0), Math.abs(He) < 1e-4 && (He = 0), Object.assign(Object.assign({}, Be), { xDiff: Ve, yDiff: He, inBounds: !Ve && !He });
|
|
1572
1572
|
}
|
|
1573
1573
|
clampTargetBounds() {
|
|
1574
1574
|
const { target: _e } = this, { x: ke, y: De } = this.getBounds();
|
|
@@ -1576,18 +1576,18 @@ class I extends g {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
calculateContentDim(_e = this.current) {
|
|
1578
1578
|
const { content: ke, contentRect: De } = this, { fitWidth: $e, fitHeight: Re, fullWidth: Be, fullHeight: Le } = De;
|
|
1579
|
-
let
|
|
1579
|
+
let Ie = Be, Ae = Le;
|
|
1580
1580
|
if (this.option("zoom") || this.angle !== 0) {
|
|
1581
|
-
const
|
|
1582
|
-
|
|
1581
|
+
const ze = !(ke instanceof HTMLImageElement) && (window.getComputedStyle(ke).maxWidth === "none" || window.getComputedStyle(ke).maxHeight === "none"), je = ze ? Be : $e, Fe = ze ? Le : Re, Ve = this.getMatrix(_e), He = new DOMPoint(0, 0).matrixTransform(Ve), qe = new DOMPoint(0 + je, 0).matrixTransform(Ve), Xe = new DOMPoint(0 + je, 0 + Fe).matrixTransform(Ve), We = new DOMPoint(0, 0 + Fe).matrixTransform(Ve), Ze = Math.abs(Xe.x - He.x), Ge = Math.abs(Xe.y - He.y), Ye = Math.abs(We.x - qe.x), Ue = Math.abs(We.y - qe.y);
|
|
1582
|
+
Ie = Math.max(Ze, Ye), Ae = Math.max(Ge, Ue);
|
|
1583
1583
|
}
|
|
1584
|
-
return { contentWidth:
|
|
1584
|
+
return { contentWidth: Ie, contentHeight: Ae };
|
|
1585
1585
|
}
|
|
1586
1586
|
setEdgeForce() {
|
|
1587
1587
|
if (this.ignoreBounds || this.isDragging || this.panMode === O || this.targetScale < this.scale) return this.isBouncingX = !1, void (this.isBouncingY = !1);
|
|
1588
1588
|
const { target: _e } = this, { x: ke, y: De, xDiff: $e, yDiff: Re } = this.checkBounds(), Be = this.option("maxVelocity");
|
|
1589
|
-
let Le = this.velocity.e,
|
|
1590
|
-
$e !== 0 ? (this.isBouncingX = !0, $e * Le <= 0 ? Le += 0.14 * $e : (Le = 0.14 * $e, ke.min !== 1 / 0 && (this.target.e = Math.max(_e.e, ke.min)), ke.max !== 1 / 0 && (this.target.e = Math.min(_e.e, ke.max))), Be && (Le = Math.max(Math.min(Le, Be), -1 * Be))) : this.isBouncingX = !1, Re !== 0 ? (this.isBouncingY = !0, Re *
|
|
1589
|
+
let Le = this.velocity.e, Ie = this.velocity.f;
|
|
1590
|
+
$e !== 0 ? (this.isBouncingX = !0, $e * Le <= 0 ? Le += 0.14 * $e : (Le = 0.14 * $e, ke.min !== 1 / 0 && (this.target.e = Math.max(_e.e, ke.min)), ke.max !== 1 / 0 && (this.target.e = Math.min(_e.e, ke.max))), Be && (Le = Math.max(Math.min(Le, Be), -1 * Be))) : this.isBouncingX = !1, Re !== 0 ? (this.isBouncingY = !0, Re * Ie <= 0 ? Ie += 0.14 * Re : (Ie = 0.14 * Re, De.min !== 1 / 0 && (this.target.f = Math.max(_e.f, De.min)), De.max !== 1 / 0 && (this.target.f = Math.min(_e.f, De.max))), Be && (Ie = Math.max(Math.min(Ie, Be), -1 * Be))) : this.isBouncingY = !1, this.isBouncingX && (this.velocity.e = Le), this.isBouncingY && (this.velocity.f = Ie);
|
|
1591
1591
|
}
|
|
1592
1592
|
enable() {
|
|
1593
1593
|
const { content: _e } = this, ke = new DOMMatrixReadOnly(window.getComputedStyle(_e).transform);
|
|
@@ -1620,15 +1620,15 @@ class I extends g {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
if (Math.abs(this.dragOffset.x) > 3 || Math.abs(this.dragOffset.y) > 3) return _e.preventDefault(), void _e.stopPropagation();
|
|
1622
1622
|
if (De.closest("[data-fancybox]")) return;
|
|
1623
|
-
const
|
|
1624
|
-
if (Ae.time && !this.canZoomOut() && (Math.abs(
|
|
1623
|
+
const Ie = this.content.getBoundingClientRect(), Ae = this.dragStart;
|
|
1624
|
+
if (Ae.time && !this.canZoomOut() && (Math.abs(Ie.x - Ae.x) > 2 || Math.abs(Ie.y - Ae.y) > 2)) return;
|
|
1625
1625
|
this.dragStart.time = 0;
|
|
1626
|
-
const
|
|
1626
|
+
const ze = (Ve) => {
|
|
1627
1627
|
this.option("zoom", _e) && Ve && typeof Ve == "string" && /(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(Ve) && typeof this[Ve] == "function" && (_e.preventDefault(), this[Ve]({ event: _e }));
|
|
1628
1628
|
}, je = this.option("click", _e), Fe = this.option("dblClick", _e);
|
|
1629
1629
|
Fe ? (this.clicks++, this.clicks == 1 && (this.clickTimer = setTimeout(() => {
|
|
1630
|
-
this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && je &&
|
|
1631
|
-
}, 350))) : (this.emit("click", _e), !_e.defaultPrevented && je &&
|
|
1630
|
+
this.clicks === 1 ? (this.emit("click", _e), !_e.defaultPrevented && je && ze(je)) : (this.emit("dblClick", _e), _e.defaultPrevented || ze(Fe)), this.clicks = 0, this.clickTimer = null;
|
|
1631
|
+
}, 350))) : (this.emit("click", _e), !_e.defaultPrevented && je && ze(je));
|
|
1632
1632
|
}
|
|
1633
1633
|
addTrackingPoint(_e) {
|
|
1634
1634
|
const ke = this.trackingPoints.filter((De) => De.time > Date.now() - 100);
|
|
@@ -1654,13 +1654,13 @@ class I extends g {
|
|
|
1654
1654
|
if (this.option("touch", _e) === !1 || !this.isDragging || ke.length < 2 && this.panOnlyZoomed && t(this.targetScale) <= t(this.minScale) || (this.emit("touchMove", _e), _e.defaultPrevented)) return;
|
|
1655
1655
|
this.addTrackingPoint(ke[0]);
|
|
1656
1656
|
const { content: $e } = this, Re = h(De[0], De[1]), Be = h(ke[0], ke[1]);
|
|
1657
|
-
let Le = 0,
|
|
1657
|
+
let Le = 0, Ie = 0;
|
|
1658
1658
|
if (ke.length > 1) {
|
|
1659
1659
|
const Ge = $e.getBoundingClientRect();
|
|
1660
|
-
Le = Re.clientX - Ge.left - 0.5 * Ge.width,
|
|
1660
|
+
Le = Re.clientX - Ge.left - 0.5 * Ge.width, Ie = Re.clientY - Ge.top - 0.5 * Ge.height;
|
|
1661
1661
|
}
|
|
1662
|
-
const Ae = c(De[0], De[1]),
|
|
1663
|
-
let je = Ae ?
|
|
1662
|
+
const Ae = c(De[0], De[1]), ze = c(ke[0], ke[1]);
|
|
1663
|
+
let je = Ae ? ze / Ae : 1, Fe = Be.clientX - Re.clientX, Ve = Be.clientY - Re.clientY;
|
|
1664
1664
|
this.dragOffset.x += Fe, this.dragOffset.y += Ve, this.dragOffset.time = Date.now() - this.dragStart.time;
|
|
1665
1665
|
let He = t(this.targetScale) === t(this.minScale) && this.option("lockAxis");
|
|
1666
1666
|
if (He && !this.lockedAxis) if (He === "xy" || He === "y" || _e.type === "touchmove") {
|
|
@@ -1673,7 +1673,7 @@ class I extends g {
|
|
|
1673
1673
|
const qe = this.checkBounds(Fe, Ve);
|
|
1674
1674
|
this.option("rubberband") ? (this.isInfinite !== "x" && (qe.xDiff > 0 && Fe < 0 || qe.xDiff < 0 && Fe > 0) && (Fe *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitWidth * qe.xDiff))), this.isInfinite !== "y" && (qe.yDiff > 0 && Ve < 0 || qe.yDiff < 0 && Ve > 0) && (Ve *= Math.max(0, 0.5 - Math.abs(0.75 / this.contentRect.fitHeight * qe.yDiff)))) : (qe.xDiff && (Fe = 0), qe.yDiff && (Ve = 0));
|
|
1675
1675
|
const Xe = this.targetScale, We = this.minScale, Ze = this.maxScale;
|
|
1676
|
-
Xe < 0.5 * We && (je = Math.max(je, We)), Xe > 1.5 * Ze && (je = Math.min(je, Ze)), this.lockedAxis === "y" && t(Xe) === t(We) && (Fe = 0), this.lockedAxis === "x" && t(Xe) === t(We) && (Ve = 0), this.applyChange({ originX: Le, originY:
|
|
1676
|
+
Xe < 0.5 * We && (je = Math.max(je, We)), Xe > 1.5 * Ze && (je = Math.min(je, Ze)), this.lockedAxis === "y" && t(Xe) === t(We) && (Fe = 0), this.lockedAxis === "x" && t(Xe) === t(We) && (Ve = 0), this.applyChange({ originX: Le, originY: Ie, panX: Fe, panY: Ve, scale: je, friction: this.option("dragFriction"), ignoreBounds: !0 });
|
|
1677
1677
|
}
|
|
1678
1678
|
onPointerUp(_e, ke, De) {
|
|
1679
1679
|
if (De.length) return this.dragOffset.x = 0, this.dragOffset.y = 0, void (this.trackingPoints = []);
|
|
@@ -1686,20 +1686,20 @@ class I extends g {
|
|
|
1686
1686
|
for (const Ge of v) this.velocity[Ge] = 0;
|
|
1687
1687
|
this.target.e = this.current.e, this.target.f = this.current.f, S(this.container, "is-scaling"), S(this.container, "is-animating"), this.isTicking = !1;
|
|
1688
1688
|
const { trackingPoints: De } = this, $e = De[0], Re = De[De.length - 1];
|
|
1689
|
-
let Be = 0, Le = 0,
|
|
1690
|
-
Re && $e && (Be = Re.clientX - $e.clientX, Le = Re.clientY - $e.clientY,
|
|
1689
|
+
let Be = 0, Le = 0, Ie = 0;
|
|
1690
|
+
Re && $e && (Be = Re.clientX - $e.clientX, Le = Re.clientY - $e.clientY, Ie = Re.time - $e.time);
|
|
1691
1691
|
const Ae = ((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1;
|
|
1692
1692
|
Ae !== 1 && (Be *= Ae, Le *= Ae);
|
|
1693
|
-
let
|
|
1693
|
+
let ze = 0, je = 0, Fe = 0, Ve = 0, He = this.option("decelFriction");
|
|
1694
1694
|
const qe = this.targetScale;
|
|
1695
|
-
if (
|
|
1696
|
-
Fe = Math.abs(Be) > 3 ? Be / (
|
|
1695
|
+
if (Ie > 0) {
|
|
1696
|
+
Fe = Math.abs(Be) > 3 ? Be / (Ie / 30) : 0, Ve = Math.abs(Le) > 3 ? Le / (Ie / 30) : 0;
|
|
1697
1697
|
const Ge = this.option("maxVelocity");
|
|
1698
1698
|
Ge && (Fe = Math.max(Math.min(Fe, Ge), -1 * Ge), Ve = Math.max(Math.min(Ve, Ge), -1 * Ge));
|
|
1699
1699
|
}
|
|
1700
|
-
Fe && (
|
|
1700
|
+
Fe && (ze = Fe / (1 / (1 - He) - 1)), Ve && (je = Ve / (1 / (1 - He) - 1)), (this.option("lockAxis") === "y" || this.option("lockAxis") === "xy" && this.lockedAxis === "y" && t(qe) === this.minScale) && (ze = Fe = 0), (this.option("lockAxis") === "x" || this.option("lockAxis") === "xy" && this.lockedAxis === "x" && t(qe) === this.minScale) && (je = Ve = 0);
|
|
1701
1701
|
const Xe = this.dragOffset.x, We = this.dragOffset.y, Ze = this.option("dragMinThreshold") || 0;
|
|
1702
|
-
Math.abs(Xe) < Ze && Math.abs(We) < Ze && (
|
|
1702
|
+
Math.abs(Xe) < Ze && Math.abs(We) < Ze && (ze = je = 0, Fe = Ve = 0), (this.option("zoom") && (qe < this.minScale - 1e-5 || qe > this.maxScale + 1e-5) || ke && !ze && !je) && (He = 0.35), this.applyChange({ panX: ze, panY: je, friction: He }), this.emit("decel", Fe, Ve, Xe, We);
|
|
1703
1703
|
}
|
|
1704
1704
|
onWheel(_e) {
|
|
1705
1705
|
var ke = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Re, Be) {
|
|
@@ -1726,7 +1726,7 @@ class I extends g {
|
|
|
1726
1726
|
const We = Xe == "e" || Xe === "f" ? M : T;
|
|
1727
1727
|
Re[Xe] = t(_e[Xe], We), Math.abs(ke[Xe] - _e[Xe]) < (Xe == "e" || Xe === "f" ? 0.51 : 1e-3) && (_e[Xe] = ke[Xe]);
|
|
1728
1728
|
}
|
|
1729
|
-
let { a: Be, b: Le, c:
|
|
1729
|
+
let { a: Be, b: Le, c: Ie, d: Ae, e: ze, f: je } = Re, Fe = `matrix(${Be}, ${Le}, ${Ie}, ${Ae}, ${ze}, ${je})`, Ve = De.parentElement instanceof HTMLPictureElement ? De.parentElement : De;
|
|
1730
1730
|
if (this.option("transformParent") && (Ve = Ve.parentElement || Ve), Ve.style.transform === Fe) return;
|
|
1731
1731
|
Ve.style.transform = Fe;
|
|
1732
1732
|
const { contentWidth: He, contentHeight: qe } = this.calculateContentDim();
|
|
@@ -1735,10 +1735,10 @@ class I extends g {
|
|
|
1735
1735
|
updateMetrics(_e = !1) {
|
|
1736
1736
|
var ke;
|
|
1737
1737
|
if (!this || this.state === m.Destroy || this.isContentLoading) return;
|
|
1738
|
-
const De = Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1), { container: $e, content: Re } = this, Be = Re instanceof HTMLImageElement, Le = $e.getBoundingClientRect(),
|
|
1739
|
-
let Ae = Le.width * De,
|
|
1740
|
-
const je = parseFloat(
|
|
1741
|
-
this.containerRect = { width: Ae, height:
|
|
1738
|
+
const De = Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1), { container: $e, content: Re } = this, Be = Re instanceof HTMLImageElement, Le = $e.getBoundingClientRect(), Ie = getComputedStyle(this.container);
|
|
1739
|
+
let Ae = Le.width * De, ze = Le.height * De;
|
|
1740
|
+
const je = parseFloat(Ie.paddingTop) + parseFloat(Ie.paddingBottom), Fe = Ae - (parseFloat(Ie.paddingLeft) + parseFloat(Ie.paddingRight)), Ve = ze - je;
|
|
1741
|
+
this.containerRect = { width: Ae, height: ze, innerWidth: Fe, innerHeight: Ve };
|
|
1742
1742
|
const He = parseFloat(Re.dataset.width || "") || ((oi) => {
|
|
1743
1743
|
let si = 0;
|
|
1744
1744
|
return si = oi instanceof HTMLImageElement ? oi.naturalWidth : oi instanceof SVGElement ? oi.width.baseVal.value : Math.max(oi.offsetWidth, oi.scrollWidth), si || 0;
|
|
@@ -1764,9 +1764,9 @@ class I extends g {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
calculateBounds() {
|
|
1766
1766
|
const { contentWidth: _e, contentHeight: ke } = this.calculateContentDim(this.target), { targetScale: De, lockedAxis: $e } = this, { fitWidth: Re, fitHeight: Be } = this.contentRect;
|
|
1767
|
-
let Le = 0,
|
|
1767
|
+
let Le = 0, Ie = 0, Ae = 0, ze = 0;
|
|
1768
1768
|
const je = this.option("infinite");
|
|
1769
|
-
if (je === !0 || $e && je === $e) Le = -1 / 0, Ae = 1 / 0,
|
|
1769
|
+
if (je === !0 || $e && je === $e) Le = -1 / 0, Ae = 1 / 0, Ie = -1 / 0, ze = 1 / 0;
|
|
1770
1770
|
else {
|
|
1771
1771
|
let { containerRect: Fe, contentRect: Ve } = this, He = t(Re * De, M), qe = t(Be * De, M), { innerWidth: Xe, innerHeight: We } = Fe;
|
|
1772
1772
|
if (Fe.width === He && (Xe = Fe.width), Fe.width === qe && (We = Fe.height), _e > Xe) {
|
|
@@ -1775,13 +1775,13 @@ class I extends g {
|
|
|
1775
1775
|
Le += Ze, Ae += Ze;
|
|
1776
1776
|
}
|
|
1777
1777
|
if (Re > Xe && _e < Xe && (Le -= 0.5 * (Re - Xe), Ae -= 0.5 * (Re - Xe)), ke > We) {
|
|
1778
|
-
|
|
1778
|
+
ze = 0.5 * (ke - We), Ie = -1 * ze;
|
|
1779
1779
|
let Ze = 0.5 * (Ve.bottom - Ve.top);
|
|
1780
|
-
|
|
1780
|
+
Ie += Ze, ze += Ze;
|
|
1781
1781
|
}
|
|
1782
1782
|
Be > We && ke < We && (Le -= 0.5 * (Be - We), Ae -= 0.5 * (Be - We));
|
|
1783
1783
|
}
|
|
1784
|
-
return { x: { min: Le, max: Ae }, y: { min:
|
|
1784
|
+
return { x: { min: Le, max: Ae }, y: { min: Ie, max: ze } };
|
|
1785
1785
|
}
|
|
1786
1786
|
getBounds() {
|
|
1787
1787
|
const _e = this.option("bounds");
|
|
@@ -1789,11 +1789,11 @@ class I extends g {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
updateControls() {
|
|
1791
1791
|
const _e = this, ke = _e.container, { panMode: De, contentRect: $e, targetScale: Re, minScale: Be } = _e;
|
|
1792
|
-
let Le = Be,
|
|
1793
|
-
|
|
1794
|
-
let Ae = _e.canZoomIn(),
|
|
1792
|
+
let Le = Be, Ie = _e.option("click") || !1;
|
|
1793
|
+
Ie && (Le = _e.getNextScale(Ie));
|
|
1794
|
+
let Ae = _e.canZoomIn(), ze = _e.canZoomOut(), je = De === A && !!this.option("touch"), Fe = ze && je;
|
|
1795
1795
|
if (je && (t(Re) < t(Be) && !this.panOnlyZoomed && (Fe = !0), (t($e.width, 1) > t($e.fitWidth, 1) || t($e.height, 1) > t($e.fitHeight, 1)) && (Fe = !0)), t($e.width * Re, 1) < t($e.fitWidth, 1) && (Fe = !1), De === O && (Fe = !1), o(ke, this.cn("isDraggable"), Fe), !this.option("zoom")) return;
|
|
1796
|
-
let Ve = Ae && t(Le) > t(Re), He = !Ve && !Fe &&
|
|
1796
|
+
let Ve = Ae && t(Le) > t(Re), He = !Ve && !Fe && ze && t(Le) < t(Re);
|
|
1797
1797
|
o(ke, this.cn("canZoomIn"), Ve), o(ke, this.cn("canZoomOut"), He);
|
|
1798
1798
|
for (const qe of ke.querySelectorAll("[data-panzoom-action]")) {
|
|
1799
1799
|
let Xe = !1, We = !1;
|
|
@@ -1802,36 +1802,36 @@ class I extends g {
|
|
|
1802
1802
|
Ae ? Xe = !0 : We = !0;
|
|
1803
1803
|
break;
|
|
1804
1804
|
case "zoomOut":
|
|
1805
|
-
|
|
1805
|
+
ze ? Xe = !0 : We = !0;
|
|
1806
1806
|
break;
|
|
1807
1807
|
case "toggleZoom":
|
|
1808
1808
|
case "iterateZoom":
|
|
1809
|
-
Ae ||
|
|
1809
|
+
Ae || ze ? Xe = !0 : We = !0;
|
|
1810
1810
|
const Ze = qe.querySelector("g");
|
|
1811
1811
|
Ze && (Ze.style.display = Ae ? "" : "none");
|
|
1812
1812
|
}
|
|
1813
1813
|
Xe ? (qe.removeAttribute("disabled"), qe.removeAttribute("tabindex")) : We && (qe.setAttribute("disabled", ""), qe.setAttribute("tabindex", "-1"));
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
panTo({ x: _e = this.target.e, y: ke = this.target.f, scale: De = this.targetScale, friction: $e = this.option("friction"), angle: Re = 0, originX: Be = 0, originY: Le = 0, flipX:
|
|
1817
|
-
this.state !== m.Destroy && this.applyChange({ panX: _e - this.target.e, panY: ke - this.target.f, scale: De / this.targetScale, angle: Re, originX: Be, originY: Le, friction: $e, flipX:
|
|
1816
|
+
panTo({ x: _e = this.target.e, y: ke = this.target.f, scale: De = this.targetScale, friction: $e = this.option("friction"), angle: Re = 0, originX: Be = 0, originY: Le = 0, flipX: Ie = !1, flipY: Ae = !1, ignoreBounds: ze = !1 }) {
|
|
1817
|
+
this.state !== m.Destroy && this.applyChange({ panX: _e - this.target.e, panY: ke - this.target.f, scale: De / this.targetScale, angle: Re, originX: Be, originY: Le, friction: $e, flipX: Ie, flipY: Ae, ignoreBounds: ze });
|
|
1818
1818
|
}
|
|
1819
|
-
applyChange({ panX: _e = 0, panY: ke = 0, scale: De = 1, angle: $e = 0, originX: Re = -this.current.e, originY: Be = -this.current.f, friction: Le = this.option("friction"), flipX:
|
|
1819
|
+
applyChange({ panX: _e = 0, panY: ke = 0, scale: De = 1, angle: $e = 0, originX: Re = -this.current.e, originY: Be = -this.current.f, friction: Le = this.option("friction"), flipX: Ie = !1, flipY: Ae = !1, ignoreBounds: ze = !1, bounce: je = this.option("bounce") }) {
|
|
1820
1820
|
const Fe = this.state;
|
|
1821
1821
|
if (Fe === m.Destroy) return;
|
|
1822
|
-
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = Le || 0, this.ignoreBounds =
|
|
1822
|
+
this.rAF && (cancelAnimationFrame(this.rAF), this.rAF = null), this.friction = Le || 0, this.ignoreBounds = ze;
|
|
1823
1823
|
const { current: Ve } = this, He = Ve.e, qe = Ve.f, Xe = this.getMatrix(this.target);
|
|
1824
1824
|
let We = new DOMMatrix().translate(He, qe).translate(Re, Be).translate(_e, ke);
|
|
1825
1825
|
if (this.option("zoom")) {
|
|
1826
|
-
if (!
|
|
1826
|
+
if (!ze) {
|
|
1827
1827
|
const Ze = this.targetScale, Ge = this.minScale, Ye = this.maxScale;
|
|
1828
1828
|
Ze * De < Ge && (De = Ge / Ze), Ze * De > Ye && (De = Ye / Ze);
|
|
1829
1829
|
}
|
|
1830
1830
|
We = We.scale(De);
|
|
1831
1831
|
}
|
|
1832
|
-
We = We.translate(-Re, -Be).translate(-He, -qe).multiply(Xe), $e && (We = We.rotate($e)),
|
|
1832
|
+
We = We.translate(-Re, -Be).translate(-He, -qe).multiply(Xe), $e && (We = We.rotate($e)), Ie && (We = We.scale(-1, 1)), Ae && (We = We.scale(1, -1));
|
|
1833
1833
|
for (const Ze of v) Ze !== "e" && Ze !== "f" && (We[Ze] > this.minScale + 1e-5 || We[Ze] < this.minScale - 1e-5) ? this.target[Ze] = We[Ze] : this.target[Ze] = t(We[Ze], M);
|
|
1834
|
-
(this.targetScale < this.scale || Math.abs(De - 1) > 0.1 || this.panMode === O || je === !1) && !
|
|
1834
|
+
(this.targetScale < this.scale || Math.abs(De - 1) > 0.1 || this.panMode === O || je === !1) && !ze && this.clampTargetBounds(), Fe === m.Init ? this.animate() : this.isResting || (this.state = m.Panning, this.requestTick());
|
|
1835
1835
|
}
|
|
1836
1836
|
stop(_e = !1) {
|
|
1837
1837
|
if (this.state === m.Init || this.state === m.Destroy) return;
|
|
@@ -1846,13 +1846,13 @@ class I extends g {
|
|
|
1846
1846
|
panWithMouse(_e, ke = this.option("mouseMoveFriction")) {
|
|
1847
1847
|
if (this.pmme = _e, this.panMode !== O || !_e || t(this.targetScale) <= t(this.minScale)) return;
|
|
1848
1848
|
this.emit("mouseMove", _e);
|
|
1849
|
-
const { container: De, containerRect: $e, contentRect: Re } = this, Be = $e.width, Le = $e.height,
|
|
1849
|
+
const { container: De, containerRect: $e, contentRect: Re } = this, Be = $e.width, Le = $e.height, Ie = De.getBoundingClientRect(), Ae = (_e.clientX || 0) - Ie.left, ze = (_e.clientY || 0) - Ie.top;
|
|
1850
1850
|
let { contentWidth: je, contentHeight: Fe } = this.calculateContentDim(this.target);
|
|
1851
1851
|
const Ve = this.option("mouseMoveFactor");
|
|
1852
1852
|
Ve > 1 && (je !== Be && (je *= Ve), Fe !== Le && (Fe *= Ve));
|
|
1853
1853
|
let He = 0.5 * (je - Be) - Ae / Be * 100 / 100 * (je - Be);
|
|
1854
1854
|
He += 0.5 * (Re.right - Re.left);
|
|
1855
|
-
let qe = 0.5 * (Fe - Le) -
|
|
1855
|
+
let qe = 0.5 * (Fe - Le) - ze / Le * 100 / 100 * (Fe - Le);
|
|
1856
1856
|
qe += 0.5 * (Re.bottom - Re.top), this.applyChange({ panX: He - this.target.e, panY: qe - this.target.f, friction: ke });
|
|
1857
1857
|
}
|
|
1858
1858
|
zoomWithWheel(_e) {
|
|
@@ -1860,12 +1860,12 @@ class I extends g {
|
|
|
1860
1860
|
const ke = Date.now();
|
|
1861
1861
|
if (ke - this.pwt < 45) return void _e.preventDefault();
|
|
1862
1862
|
this.pwt = ke;
|
|
1863
|
-
var De = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ae,
|
|
1864
|
-
return Math.abs(
|
|
1863
|
+
var De = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ae, ze) {
|
|
1864
|
+
return Math.abs(ze) > Math.abs(Ae) ? ze : Ae;
|
|
1865
1865
|
});
|
|
1866
1866
|
const $e = Math.max(-1, Math.min(1, De)), { targetScale: Re, maxScale: Be, minScale: Le } = this;
|
|
1867
|
-
let
|
|
1868
|
-
t(
|
|
1867
|
+
let Ie = Re * (100 + 45 * $e) / 100;
|
|
1868
|
+
t(Ie) < t(Le) && t(Re) <= t(Le) ? (this.cwd += Math.abs($e), Ie = Le) : t(Ie) > t(Be) && t(Re) >= t(Be) ? (this.cwd += Math.abs($e), Ie = Be) : (this.cwd = 0, Ie = Math.max(Math.min(Ie, Be), Le)), this.cwd > this.option("wheelLimit") || (_e.preventDefault(), t(Ie) !== t(Re) && this.zoomTo(Ie, { event: _e }));
|
|
1869
1869
|
}
|
|
1870
1870
|
canZoomIn() {
|
|
1871
1871
|
return this.option("zoom") && (t(this.contentRect.width, 1) < t(this.contentRect.fitWidth, 1) || t(this.targetScale) < t(this.maxScale));
|
|
@@ -1905,13 +1905,13 @@ class I extends g {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
zoomTo(_e = 1, { friction: ke = z, originX: De = z, originY: $e = z, event: Re } = {}) {
|
|
1907
1907
|
if (this.isContentLoading || this.state === m.Destroy) return;
|
|
1908
|
-
const { targetScale: Be, fullScale: Le, maxScale:
|
|
1908
|
+
const { targetScale: Be, fullScale: Le, maxScale: Ie, coverScale: Ae } = this;
|
|
1909
1909
|
if (this.stop(), this.panMode === O && (Re = this.pmme || Re), Re || De === z || $e === z) {
|
|
1910
1910
|
const je = this.content.getBoundingClientRect(), Fe = this.container.getBoundingClientRect(), Ve = Re ? Re.clientX : Fe.left + 0.5 * Fe.width, He = Re ? Re.clientY : Fe.top + 0.5 * Fe.height;
|
|
1911
1911
|
De = Ve - je.left - 0.5 * je.width, $e = He - je.top - 0.5 * je.height;
|
|
1912
1912
|
}
|
|
1913
|
-
let
|
|
1914
|
-
typeof _e == "number" ?
|
|
1913
|
+
let ze = 1;
|
|
1914
|
+
typeof _e == "number" ? ze = _e : _e === "full" ? ze = Le : _e === "cover" ? ze = Ae : _e === "max" ? ze = Ie : _e === "fit" ? ze = 1 : _e === "next" && (ze = this.getNextScale("iterateZoom")), ze = ze / Be || 1, ke = ke === z ? ze > 1 ? 0.15 : 0.25 : ke, this.applyChange({ scale: ze, originX: De, originY: $e, friction: ke }), Re && this.panMode === O && this.panWithMouse(Re, ke);
|
|
1915
1915
|
}
|
|
1916
1916
|
rotateCCW() {
|
|
1917
1917
|
this.applyChange({ angle: -90 });
|
|
@@ -2017,16 +2017,16 @@ class W extends _ {
|
|
|
2017
2017
|
if (ke < De || ke > $e) return void this.cleanup();
|
|
2018
2018
|
const Be = typeof Re == "number" && ke > 5 && ke >= Re, Le = !this.list || this.isDynamic !== Be || this.list.children.length !== ke;
|
|
2019
2019
|
Le && this.cleanup();
|
|
2020
|
-
const
|
|
2021
|
-
if (o(
|
|
2022
|
-
let Ae,
|
|
2023
|
-
for (const je of [...
|
|
2024
|
-
const Fe =
|
|
2020
|
+
const Ie = this.build();
|
|
2021
|
+
if (o(Ie, this.cn("isDynamic"), !!Be), Le) for (let je = 0; je < ke; je++) Ie.append(this.createItem(je));
|
|
2022
|
+
let Ae, ze = 0;
|
|
2023
|
+
for (const je of [...Ie.children]) {
|
|
2024
|
+
const Fe = ze === this.instance.page;
|
|
2025
2025
|
Fe && (Ae = je), o(je, this.cn("isCurrent"), Fe), (_e = je.children[0]) === null || _e === void 0 || _e.setAttribute("aria-selected", Fe ? "true" : "false");
|
|
2026
2026
|
for (const Ve of ["isBeforePrev", "isPrev", "isNext", "isAfterNext"]) S(je, this.cn(Ve));
|
|
2027
|
-
|
|
2027
|
+
ze++;
|
|
2028
2028
|
}
|
|
2029
|
-
if (Ae = Ae ||
|
|
2029
|
+
if (Ae = Ae || Ie.firstChild, Be && Ae) {
|
|
2030
2030
|
const je = Ae.previousElementSibling, Fe = je && je.previousElementSibling;
|
|
2031
2031
|
P(je, this.cn("isPrev")), P(Fe, this.cn("isBeforePrev"));
|
|
2032
2032
|
const Ve = Ae.nextElementSibling, He = Ve && Ve.nextElementSibling;
|
|
@@ -2114,12 +2114,12 @@ class Z extends _ {
|
|
|
2114
2114
|
onNavTouch(_e, ke, De) {
|
|
2115
2115
|
var $e, Re;
|
|
2116
2116
|
if (Math.abs(ke.dragOffset.x) > 3 || Math.abs(ke.dragOffset.y) > 3) return;
|
|
2117
|
-
const Be = De.target, { nav: Le, target:
|
|
2118
|
-
if (!Le || !
|
|
2117
|
+
const Be = De.target, { nav: Le, target: Ie } = this;
|
|
2118
|
+
if (!Le || !Ie || !Be) return;
|
|
2119
2119
|
const Ae = Be.closest("[data-index]");
|
|
2120
2120
|
if (De.stopPropagation(), De.preventDefault(), !Ae) return;
|
|
2121
|
-
const
|
|
2122
|
-
Le.slideTo(Fe),
|
|
2121
|
+
const ze = parseInt(Ae.dataset.index || "", 10) || 0, je = Ie.getPageForSlide(ze), Fe = Le.getPageForSlide(ze);
|
|
2122
|
+
Le.slideTo(Fe), Ie.slideTo(je, { friction: ((Re = ($e = this.nav) === null || $e === void 0 ? void 0 : $e.plugins) === null || Re === void 0 ? void 0 : Re.Sync.option("friction")) || 0 }), this.markSelectedSlide(ze);
|
|
2123
2123
|
}
|
|
2124
2124
|
onNavCreateSlide(_e, ke) {
|
|
2125
2125
|
ke.index === this.selectedIndex && this.markSelectedSlide(ke.index);
|
|
@@ -2239,25 +2239,25 @@ class Q extends g {
|
|
|
2239
2239
|
let $e = this.option("slidesPerPage");
|
|
2240
2240
|
$e = ($e === "auto" || ke <= De) && this.option("fill") !== !1 ? 1 / 0 : parseFloat($e + "");
|
|
2241
2241
|
let Re = 0, Be = 0, Le = 0;
|
|
2242
|
-
for (const
|
|
2242
|
+
for (const Ie of this.slides) (!_e.length || Be + Ie.dim - De > 0.05 || Le >= $e) && (_e.push(N()), Re = _e.length - 1, Be = 0, Le = 0), _e[Re].slides.push(Ie), Be += Ie.dim + Ie.gap, Le++;
|
|
2243
2243
|
return _e;
|
|
2244
2244
|
}
|
|
2245
2245
|
processPages() {
|
|
2246
2246
|
const _e = this.pages, { contentDim: ke, viewportDim: De, isInfinite: $e } = this, Re = this.option("center"), Be = this.option("fill"), Le = Be && Re && ke > De && !$e;
|
|
2247
|
-
if (_e.forEach((
|
|
2247
|
+
if (_e.forEach((ze, je) => {
|
|
2248
2248
|
var Fe;
|
|
2249
|
-
|
|
2250
|
-
for (const [Ve, He] of
|
|
2251
|
-
Le &&
|
|
2252
|
-
}), _e.forEach((
|
|
2253
|
-
Be && !$e && ke > De && (
|
|
2249
|
+
ze.index = je, ze.pos = ((Fe = ze.slides[0]) === null || Fe === void 0 ? void 0 : Fe.pos) || 0, ze.dim = 0;
|
|
2250
|
+
for (const [Ve, He] of ze.slides.entries()) ze.dim += He.dim, Ve < ze.slides.length - 1 && (ze.dim += He.gap);
|
|
2251
|
+
Le && ze.pos + 0.5 * ze.dim < 0.5 * De ? ze.pos = 0 : Le && ze.pos + 0.5 * ze.dim >= ke - 0.5 * De ? ze.pos = ke - De : Re && (ze.pos += -0.5 * (De - ze.dim));
|
|
2252
|
+
}), _e.forEach((ze) => {
|
|
2253
|
+
Be && !$e && ke > De && (ze.pos = Math.max(ze.pos, 0), ze.pos = Math.min(ze.pos, ke - De)), ze.pos = t(ze.pos, 1e3), ze.dim = t(ze.dim, 1e3), Math.abs(ze.pos) <= 0.1 && (ze.pos = 0);
|
|
2254
2254
|
}), $e) return _e;
|
|
2255
|
-
const
|
|
2255
|
+
const Ie = [];
|
|
2256
2256
|
let Ae;
|
|
2257
|
-
return _e.forEach((
|
|
2258
|
-
const je = Object.assign({},
|
|
2259
|
-
Ae && je.pos === Ae.pos ? (Ae.dim += je.dim, Ae.slides = [...Ae.slides, ...je.slides]) : (je.index =
|
|
2260
|
-
}),
|
|
2257
|
+
return _e.forEach((ze) => {
|
|
2258
|
+
const je = Object.assign({}, ze);
|
|
2259
|
+
Ae && je.pos === Ae.pos ? (Ae.dim += je.dim, Ae.slides = [...Ae.slides, ...je.slides]) : (je.index = Ie.length, Ae = je, Ie.push(je));
|
|
2260
|
+
}), Ie;
|
|
2261
2261
|
}
|
|
2262
2262
|
getPageFromIndex(_e = 0) {
|
|
2263
2263
|
const ke = this.pages.length;
|
|
@@ -2268,15 +2268,15 @@ class Q extends g {
|
|
|
2268
2268
|
var ke, De;
|
|
2269
2269
|
const $e = this.isHorizontal ? "width" : "height";
|
|
2270
2270
|
let Re = 0, Be = 0, Le = _e.el;
|
|
2271
|
-
const
|
|
2271
|
+
const Ie = !(!Le || Le.parentNode);
|
|
2272
2272
|
if (Le ? Re = parseFloat(Le.dataset[$e] || "") || 0 : (Le = document.createElement("div"), Le.style.visibility = "hidden", (this.track || document.body).prepend(Le)), P(Le, this.cn(J) + " " + _e.class + " " + _e.customClass), Re) Le.style[$e] = `${Re}px`, Le.style[$e === "width" ? "height" : "width"] = "";
|
|
2273
2273
|
else {
|
|
2274
|
-
|
|
2275
|
-
let
|
|
2276
|
-
|
|
2274
|
+
Ie && (this.track || document.body).prepend(Le), Re = Le.getBoundingClientRect()[$e] * Math.max(1, ((ke = window.visualViewport) === null || ke === void 0 ? void 0 : ke.scale) || 1);
|
|
2275
|
+
let ze = Le[this.isHorizontal ? "offsetWidth" : "offsetHeight"];
|
|
2276
|
+
ze - 1 > Re && (Re = ze);
|
|
2277
2277
|
}
|
|
2278
2278
|
const Ae = getComputedStyle(Le);
|
|
2279
|
-
return Ae.boxSizing === "content-box" && (this.isHorizontal ? (Re += parseFloat(Ae.paddingLeft) || 0, Re += parseFloat(Ae.paddingRight) || 0) : (Re += parseFloat(Ae.paddingTop) || 0, Re += parseFloat(Ae.paddingBottom) || 0)), Be = parseFloat(Ae[this.isHorizontal ? "marginRight" : "marginBottom"]) || 0,
|
|
2279
|
+
return Ae.boxSizing === "content-box" && (this.isHorizontal ? (Re += parseFloat(Ae.paddingLeft) || 0, Re += parseFloat(Ae.paddingRight) || 0) : (Re += parseFloat(Ae.paddingTop) || 0, Re += parseFloat(Ae.paddingBottom) || 0)), Be = parseFloat(Ae[this.isHorizontal ? "marginRight" : "marginBottom"]) || 0, Ie ? (De = Le.parentElement) === null || De === void 0 || De.removeChild(Le) : _e.el || Le.remove(), { dim: t(Re, 1e3), gap: t(Be, 1e3) };
|
|
2280
2280
|
}
|
|
2281
2281
|
getBounds() {
|
|
2282
2282
|
const { isInfinite: _e, isRTL: ke, isHorizontal: De, pages: $e } = this;
|
|
@@ -2289,21 +2289,21 @@ class Q extends g {
|
|
|
2289
2289
|
return { x: De ? Re : { min: 0, max: 0 }, y: De ? { min: 0, max: 0 } : Re };
|
|
2290
2290
|
}
|
|
2291
2291
|
repositionSlides() {
|
|
2292
|
-
let _e, { isHorizontal: ke, isRTL: De, isInfinite: $e, viewport: Re, viewportDim: Be, contentDim: Le, page:
|
|
2293
|
-
je ? qe = -1 * je.current[this.axis] : Ae[
|
|
2294
|
-
for (const Ge of
|
|
2292
|
+
let _e, { isHorizontal: ke, isRTL: De, isInfinite: $e, viewport: Re, viewportDim: Be, contentDim: Le, page: Ie, pages: Ae, slides: ze, panzoom: je } = this, Fe = 0, Ve = 0, He = 0, qe = 0;
|
|
2293
|
+
je ? qe = -1 * je.current[this.axis] : Ae[Ie] && (qe = Ae[Ie].pos || 0), _e = ke ? De ? "right" : "left" : "top", De && ke && (qe *= -1);
|
|
2294
|
+
for (const Ge of ze) {
|
|
2295
2295
|
const Ye = Ge.el;
|
|
2296
2296
|
Ye ? (_e === "top" ? (Ye.style.right = "", Ye.style.left = "") : Ye.style.top = "", Ge.index !== Fe ? Ye.style[_e] = Ve === 0 ? "" : `${t(Ve, 1e3)}px` : Ye.style[_e] = "", He += Ge.dim + Ge.gap, Fe++) : Ve += Ge.dim + Ge.gap;
|
|
2297
2297
|
}
|
|
2298
2298
|
if ($e && He && Re) {
|
|
2299
2299
|
let Ge = getComputedStyle(Re), Ye = "padding", Ue = ke ? "Right" : "Bottom", Qe = parseFloat(Ge[Ye + (ke ? "Left" : "Top")]);
|
|
2300
2300
|
qe -= Qe, Be += Qe, Be += parseFloat(Ge[Ye + Ue]);
|
|
2301
|
-
for (const Je of
|
|
2301
|
+
for (const Je of ze) Je.el && (t(Je.pos) < t(Be) && t(Je.pos + Je.dim + Je.gap) < t(qe) && t(qe) > t(Le - Be) && (Je.el.style[_e] = `${t(Ve + He, 1e3)}px`), t(Je.pos + Je.gap) >= t(Le - Be) && t(Je.pos) > t(qe + Be) && t(qe) < t(Be) && (Je.el.style[_e] = `-${t(He, 1e3)}px`));
|
|
2302
2302
|
}
|
|
2303
2303
|
let Xe, We, Ze = [...this.inTransition];
|
|
2304
2304
|
if (Ze.length > 1 && (Xe = Ae[Ze[0]], We = Ae[Ze[1]]), Xe && We) {
|
|
2305
2305
|
let Ge = 0;
|
|
2306
|
-
for (const Ye of
|
|
2306
|
+
for (const Ye of ze) Ye.el ? this.inTransition.has(Ye.index) && Xe.slides.indexOf(Ye) < 0 && (Ye.el.style[_e] = `${t(Ge + (Xe.pos - We.pos), 1e3)}px`) : Ge += Ye.dim + Ye.gap;
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
2309
|
createSlideEl(_e) {
|
|
@@ -2314,13 +2314,13 @@ class Q extends g {
|
|
|
2314
2314
|
const Re = _e.html;
|
|
2315
2315
|
Re && (Re instanceof HTMLElement ? $e.appendChild(Re) : $e.innerHTML = _e.html + "");
|
|
2316
2316
|
const Be = [];
|
|
2317
|
-
De.forEach((
|
|
2318
|
-
|
|
2317
|
+
De.forEach((ze, je) => {
|
|
2318
|
+
ze.el && Be.push(je);
|
|
2319
2319
|
});
|
|
2320
2320
|
const Le = _e.index;
|
|
2321
|
-
let
|
|
2322
|
-
Be.length && (
|
|
2323
|
-
const Ae =
|
|
2321
|
+
let Ie = null;
|
|
2322
|
+
Be.length && (Ie = De[Be.reduce((ze, je) => Math.abs(je - Le) < Math.abs(ze - Le) ? je : ze)]);
|
|
2323
|
+
const Ae = Ie && Ie.el && Ie.el.parentNode ? Ie.index < _e.index ? Ie.el.nextSibling : Ie.el : null;
|
|
2324
2324
|
ke.insertBefore($e, ke.contains(Ae) ? Ae : null), _e.el = $e, this.emit("createSlide", _e);
|
|
2325
2325
|
}
|
|
2326
2326
|
removeSlideEl(_e, ke = !1) {
|
|
@@ -2335,23 +2335,23 @@ class Q extends g {
|
|
|
2335
2335
|
transitionTo(_e = 0, ke = this.option("transition")) {
|
|
2336
2336
|
var De, $e, Re, Be;
|
|
2337
2337
|
if (!ke) return !1;
|
|
2338
|
-
const Le = this.page, { pages:
|
|
2338
|
+
const Le = this.page, { pages: Ie, panzoom: Ae } = this;
|
|
2339
2339
|
_e = parseInt((_e || 0).toString()) || 0;
|
|
2340
|
-
const
|
|
2341
|
-
if (!Ae || !ze
|
|
2340
|
+
const ze = this.getPageFromIndex(_e);
|
|
2341
|
+
if (!Ae || !Ie[ze] || Ie.length < 2 || Math.abs(((($e = (De = Ie[Le]) === null || De === void 0 ? void 0 : De.slides[0]) === null || $e === void 0 ? void 0 : $e.dim) || 0) - this.viewportDim) > 1) return !1;
|
|
2342
2342
|
let je = _e > Le ? 1 : -1;
|
|
2343
|
-
this.isInfinite && (Le === 0 && _e ===
|
|
2344
|
-
const Fe = ze
|
|
2345
|
-
if (Le ===
|
|
2343
|
+
this.isInfinite && (Le === 0 && _e === Ie.length - 1 && (je = -1), Le === Ie.length - 1 && _e === 0 && (je = 1));
|
|
2344
|
+
const Fe = Ie[ze].pos * (this.isRTL ? 1 : -1);
|
|
2345
|
+
if (Le === ze && Math.abs(Fe - Ae.target[this.axis]) < 1) return !1;
|
|
2346
2346
|
this.clearTransitions();
|
|
2347
2347
|
const Ve = Ae.isResting;
|
|
2348
2348
|
P(this.container, this.cn("inTransition"));
|
|
2349
|
-
const He = ((Re =
|
|
2349
|
+
const He = ((Re = Ie[Le]) === null || Re === void 0 ? void 0 : Re.slides[0]) || null, qe = ((Be = Ie[ze]) === null || Be === void 0 ? void 0 : Be.slides[0]) || null;
|
|
2350
2350
|
this.inTransition.add(qe.index), this.createSlideEl(qe);
|
|
2351
2351
|
let Xe = He.el, We = qe.el;
|
|
2352
2352
|
Ve || ke === J || (ke = "fadeFast", Xe = null);
|
|
2353
2353
|
const Ze = this.isRTL ? "next" : "prev", Ge = this.isRTL ? "prev" : "next";
|
|
2354
|
-
return Xe && (this.inTransition.add(He.index), He.transition = ke, Xe.addEventListener(G, this.onAnimationEnd), Xe.classList.add(`f-${ke}Out`, `to-${je > 0 ? Ge : Ze}`)), We && (qe.transition = ke, We.addEventListener(G, this.onAnimationEnd), We.classList.add(`f-${ke}In`, `from-${je > 0 ? Ze : Ge}`)), Ae.current[this.axis] = Fe, Ae.target[this.axis] = Fe, Ae.requestTick(), this.onChange(
|
|
2354
|
+
return Xe && (this.inTransition.add(He.index), He.transition = ke, Xe.addEventListener(G, this.onAnimationEnd), Xe.classList.add(`f-${ke}Out`, `to-${je > 0 ? Ge : Ze}`)), We && (qe.transition = ke, We.addEventListener(G, this.onAnimationEnd), We.classList.add(`f-${ke}In`, `from-${je > 0 ? Ze : Ge}`)), Ae.current[this.axis] = Fe, Ae.target[this.axis] = Fe, Ae.requestTick(), this.onChange(ze), !0;
|
|
2355
2355
|
}
|
|
2356
2356
|
manageSlideVisiblity() {
|
|
2357
2357
|
const _e = /* @__PURE__ */ new Set(), ke = /* @__PURE__ */ new Set(), De = this.getVisibleSlides(parseFloat(this.option("preload", 0) + "") || 0);
|
|
@@ -2373,24 +2373,24 @@ class Q extends g {
|
|
|
2373
2373
|
flipInfiniteTrack() {
|
|
2374
2374
|
const { axis: _e, isHorizontal: ke, isInfinite: De, isRTL: $e, viewportDim: Re, contentDim: Be } = this, Le = this.panzoom;
|
|
2375
2375
|
if (!Le || !De) return;
|
|
2376
|
-
let
|
|
2377
|
-
$e && ke ? (
|
|
2376
|
+
let Ie = Le.current[_e], Ae = Le.target[_e] - Ie, ze = 0, je = 0.5 * Re;
|
|
2377
|
+
$e && ke ? (Ie < -je && (ze = -1, Ie += Be), Ie > Be - je && (ze = 1, Ie -= Be)) : (Ie > je && (ze = 1, Ie -= Be), Ie < -Be + je && (ze = -1, Ie += Be)), ze && (Le.current[_e] = Ie, Le.target[_e] = Ie + Ae);
|
|
2378
2378
|
}
|
|
2379
2379
|
lazyLoadImg(_e, ke) {
|
|
2380
2380
|
const De = this, $e = "f-fadeIn", Re = "is-preloading";
|
|
2381
2381
|
let Be = !1, Le = null;
|
|
2382
|
-
const
|
|
2382
|
+
const Ie = () => {
|
|
2383
2383
|
Be || (Be = !0, Le && (Le.remove(), Le = null), S(ke, Re), ke.complete && (P(ke, $e), setTimeout(() => {
|
|
2384
2384
|
S(ke, $e);
|
|
2385
2385
|
}, 350)), this.option("adaptiveHeight") && _e.el && this.pages[this.page].slides.indexOf(_e) > -1 && (De.updateMetrics(), De.setViewportHeight()), this.emit("load", _e));
|
|
2386
2386
|
};
|
|
2387
2387
|
P(ke, Re), ke.src = ke.dataset.lazySrcset || ke.dataset.lazySrc || "", delete ke.dataset.lazySrc, delete ke.dataset.lazySrcset, ke.addEventListener("error", () => {
|
|
2388
|
-
|
|
2388
|
+
Ie();
|
|
2389
2389
|
}), ke.addEventListener("load", () => {
|
|
2390
|
-
|
|
2390
|
+
Ie();
|
|
2391
2391
|
}), setTimeout(() => {
|
|
2392
2392
|
const Ae = ke.parentNode;
|
|
2393
|
-
Ae && _e.el && (ke.complete ?
|
|
2393
|
+
Ae && _e.el && (ke.complete ? Ie() : Be || (Le = n(x), Ae.insertBefore(Le, ke)));
|
|
2394
2394
|
}, 300);
|
|
2395
2395
|
}
|
|
2396
2396
|
lazyLoadSlide(_e) {
|
|
@@ -2412,11 +2412,11 @@ class Q extends g {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
onDecel(_e, ke = 0, De = 0, $e = 0, Re = 0) {
|
|
2414
2414
|
if (this.option("dragFree")) return void this.setPageFromPosition();
|
|
2415
|
-
const { isRTL: Be, isHorizontal: Le, axis:
|
|
2415
|
+
const { isRTL: Be, isHorizontal: Le, axis: Ie, pages: Ae } = this, ze = Ae.length, je = Math.abs(Math.atan2(De, ke) / (Math.PI / 180));
|
|
2416
2416
|
let Fe = 0;
|
|
2417
|
-
if (Fe = je > 45 && je < 135 ? Le ? 0 : De : Le ? ke : 0, !
|
|
2417
|
+
if (Fe = je > 45 && je < 135 ? Le ? 0 : De : Le ? ke : 0, !ze) return;
|
|
2418
2418
|
let Ve = this.page, He = Be && Le ? 1 : -1;
|
|
2419
|
-
const qe = _e.current[
|
|
2419
|
+
const qe = _e.current[Ie] * He;
|
|
2420
2420
|
let { pageIndex: Xe } = this.getPageFromPosition(qe);
|
|
2421
2421
|
Math.abs(Fe) > 5 ? (Ae[Ve].dim < document.documentElement["client" + (this.isHorizontal ? "Width" : "Height")] - 1 && (Ve = Xe), Ve = Be && Le ? Fe < 0 ? Ve - 1 : Ve + 1 : Fe < 0 ? Ve + 1 : Ve - 1) : Ve = $e === 0 && Re === 0 ? Ve : Xe, this.slideTo(Ve, { transition: !1, friction: _e.option("decelFriction") });
|
|
2422
2422
|
}
|
|
@@ -2456,17 +2456,17 @@ class Q extends g {
|
|
|
2456
2456
|
slideTo(_e = 0, { friction: ke = this.option("friction"), transition: De = this.option("transition") } = {}) {
|
|
2457
2457
|
if (this.state === B.Destroy) return;
|
|
2458
2458
|
_e = parseInt((_e || 0).toString()) || 0;
|
|
2459
|
-
const $e = this.getPageFromIndex(_e), { axis: Re, isHorizontal: Be, isRTL: Le, pages:
|
|
2460
|
-
if (!Ae || !
|
|
2459
|
+
const $e = this.getPageFromIndex(_e), { axis: Re, isHorizontal: Be, isRTL: Le, pages: Ie, panzoom: Ae } = this, ze = Ie.length, je = Le && Be ? 1 : -1;
|
|
2460
|
+
if (!Ae || !ze) return;
|
|
2461
2461
|
if (this.page !== $e) {
|
|
2462
2462
|
const Ve = new Event("beforeChange", { bubbles: !0, cancelable: !0 });
|
|
2463
2463
|
if (this.emit("beforeChange", Ve, _e), Ve.defaultPrevented) return;
|
|
2464
2464
|
}
|
|
2465
2465
|
if (this.transitionTo(_e, De)) return;
|
|
2466
|
-
let Fe =
|
|
2466
|
+
let Fe = Ie[$e].pos;
|
|
2467
2467
|
if (this.isInfinite) {
|
|
2468
2468
|
const Ve = this.contentDim, He = Ae.target[Re] * je;
|
|
2469
|
-
|
|
2469
|
+
ze === 2 ? Fe += Ve * Math.floor(parseFloat(_e + "") / 2) : Fe = [Fe, Fe - Ve, Fe + Ve].reduce(function(qe, Xe) {
|
|
2470
2470
|
return Math.abs(Xe - He) < Math.abs(qe - He) ? Xe : qe;
|
|
2471
2471
|
});
|
|
2472
2472
|
}
|
|
@@ -2499,7 +2499,7 @@ class Q extends g {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
addSlide(_e, ke) {
|
|
2501
2501
|
var De, $e, Re, Be;
|
|
2502
|
-
const Le = this.panzoom,
|
|
2502
|
+
const Le = this.panzoom, Ie = ((De = this.pages[this.page]) === null || De === void 0 ? void 0 : De.pos) || 0, Ae = (($e = this.pages[this.page]) === null || $e === void 0 ? void 0 : $e.dim) || 0, ze = this.contentDim < this.viewportDim;
|
|
2503
2503
|
let je = Array.isArray(ke) ? ke : [ke];
|
|
2504
2504
|
const Fe = [];
|
|
2505
2505
|
for (const Ve of je) Fe.push(H(Ve));
|
|
@@ -2507,8 +2507,8 @@ class Q extends g {
|
|
|
2507
2507
|
for (let Ve = 0; Ve < this.slides.length; Ve++) this.slides[Ve].index = Ve;
|
|
2508
2508
|
for (const Ve of Fe) this.emit("beforeInitSlide", Ve, Ve.index);
|
|
2509
2509
|
if (this.page >= _e && (this.page += Fe.length), this.updateMetrics(), Le) {
|
|
2510
|
-
const Ve = ((Re = this.pages[this.page]) === null || Re === void 0 ? void 0 : Re.pos) || 0, He = ((Be = this.pages[this.page]) === null || Be === void 0 ? void 0 : Be.dim) || 0, qe = this.pages.length || 1, Xe = this.isRTL ? Ae - He : He - Ae, We = this.isRTL ?
|
|
2511
|
-
|
|
2510
|
+
const Ve = ((Re = this.pages[this.page]) === null || Re === void 0 ? void 0 : Re.pos) || 0, He = ((Be = this.pages[this.page]) === null || Be === void 0 ? void 0 : Be.dim) || 0, qe = this.pages.length || 1, Xe = this.isRTL ? Ae - He : He - Ae, We = this.isRTL ? Ie - Ve : Ve - Ie;
|
|
2511
|
+
ze && qe === 1 ? (_e <= this.page && (Le.current[this.axis] -= Xe, Le.target[this.axis] -= Xe), Le.panTo({ [this.isHorizontal ? "x" : "y"]: -1 * Ve })) : We && _e <= this.page && (Le.target[this.axis] -= We, Le.current[this.axis] -= We, Le.requestTick());
|
|
2512
2512
|
}
|
|
2513
2513
|
for (const Ve of Fe) this.emit("initSlide", Ve, Ve.index);
|
|
2514
2514
|
}
|
|
@@ -2531,25 +2531,25 @@ class Q extends g {
|
|
|
2531
2531
|
updateMetrics() {
|
|
2532
2532
|
const { panzoom: _e, viewport: ke, track: De, slides: $e, isHorizontal: Re, isInfinite: Be } = this;
|
|
2533
2533
|
if (!De) return;
|
|
2534
|
-
const Le = Re ? "width" : "height",
|
|
2534
|
+
const Le = Re ? "width" : "height", Ie = Re ? "offsetWidth" : "offsetHeight";
|
|
2535
2535
|
if (ke) {
|
|
2536
|
-
let je = Math.max(ke[
|
|
2536
|
+
let je = Math.max(ke[Ie], t(ke.getBoundingClientRect()[Le], 1e3)), Fe = getComputedStyle(ke), Ve = "padding", He = Re ? "Right" : "Bottom";
|
|
2537
2537
|
je -= parseFloat(Fe[Ve + (Re ? "Left" : "Top")]) + parseFloat(Fe[Ve + He]), this.viewportDim = je;
|
|
2538
2538
|
}
|
|
2539
|
-
let Ae,
|
|
2539
|
+
let Ae, ze = 0;
|
|
2540
2540
|
for (const [je, Fe] of $e.entries()) {
|
|
2541
2541
|
let Ve = 0, He = 0;
|
|
2542
|
-
!Fe.el && Ae ? (Ve = Ae.dim, He = Ae.gap) : ({ dim: Ve, gap: He } = this.getSlideMetrics(Fe), Ae = Fe), Ve = t(Ve, 1e3), He = t(He, 1e3), Fe.dim = Ve, Fe.gap = He, Fe.pos =
|
|
2542
|
+
!Fe.el && Ae ? (Ve = Ae.dim, He = Ae.gap) : ({ dim: Ve, gap: He } = this.getSlideMetrics(Fe), Ae = Fe), Ve = t(Ve, 1e3), He = t(He, 1e3), Fe.dim = Ve, Fe.gap = He, Fe.pos = ze, ze += Ve, (Be || je < $e.length - 1) && (ze += He);
|
|
2543
2543
|
}
|
|
2544
|
-
|
|
2544
|
+
ze = t(ze, 1e3), this.contentDim = ze, _e && (_e.contentRect[Le] = ze, _e.contentRect[Re ? "fullWidth" : "fullHeight"] = ze), this.pages = this.createPages(), this.pages = this.processPages(), this.state === B.Init && this.setInitialPage(), this.page = Math.max(0, Math.min(this.page, this.pages.length - 1)), this.manageSlideVisiblity(), this.emit("refresh");
|
|
2545
2545
|
}
|
|
2546
2546
|
getProgress(_e, ke = !1, De = !1) {
|
|
2547
2547
|
_e === void 0 && (_e = this.page);
|
|
2548
2548
|
const $e = this, Re = $e.panzoom, Be = $e.contentDim, Le = $e.pages[_e] || 0;
|
|
2549
2549
|
if (!Le || !Re) return _e > this.page ? -1 : 1;
|
|
2550
|
-
let
|
|
2551
|
-
this.isInfinite && De !== !0 && (
|
|
2552
|
-
let Fe = [Ae,
|
|
2550
|
+
let Ie = -1 * Re.current.e, Ae = t((Ie - Le.pos) / (1 * Le.dim), 1e3), ze = Ae, je = Ae;
|
|
2551
|
+
this.isInfinite && De !== !0 && (ze = t((Ie - Le.pos + Be) / (1 * Le.dim), 1e3), je = t((Ie - Le.pos - Be) / (1 * Le.dim), 1e3));
|
|
2552
|
+
let Fe = [Ae, ze, je].reduce(function(Ve, He) {
|
|
2553
2553
|
return Math.abs(He) < Math.abs(Ve) ? He : Ve;
|
|
2554
2554
|
});
|
|
2555
2555
|
return ke ? Fe : Fe > 1 ? 1 : Fe < -1 ? -1 : Fe;
|
|
@@ -2569,28 +2569,28 @@ class Q extends g {
|
|
|
2569
2569
|
getVisibleSlides(_e = 0) {
|
|
2570
2570
|
var ke;
|
|
2571
2571
|
const De = /* @__PURE__ */ new Set();
|
|
2572
|
-
let { panzoom: $e, contentDim: Re, viewportDim: Be, pages: Le, page:
|
|
2572
|
+
let { panzoom: $e, contentDim: Re, viewportDim: Be, pages: Le, page: Ie } = this;
|
|
2573
2573
|
if (Be) {
|
|
2574
2574
|
Re = Re + ((ke = this.slides[this.slides.length - 1]) === null || ke === void 0 ? void 0 : ke.gap) || 0;
|
|
2575
2575
|
let Ae = 0;
|
|
2576
|
-
Ae = $e && $e.state !== m.Init && $e.state !== m.Destroy ? -1 * $e.current[this.axis] : Le[
|
|
2577
|
-
const
|
|
2576
|
+
Ae = $e && $e.state !== m.Init && $e.state !== m.Destroy ? -1 * $e.current[this.axis] : Le[Ie] && Le[Ie].pos || 0, this.isInfinite && (Ae -= Math.floor(Ae / Re) * Re), this.isRTL && this.isHorizontal && (Ae *= -1);
|
|
2577
|
+
const ze = Ae - Be * _e, je = Ae + Be * (_e + 1), Fe = this.isInfinite ? [-1, 0, 1] : [0];
|
|
2578
2578
|
for (const Ve of this.slides) for (const He of Fe) {
|
|
2579
2579
|
const qe = Ve.pos + He * Re, Xe = qe + Ve.dim + Ve.gap;
|
|
2580
|
-
qe < je && Xe >
|
|
2580
|
+
qe < je && Xe > ze && De.add(Ve);
|
|
2581
2581
|
}
|
|
2582
2582
|
}
|
|
2583
2583
|
return De;
|
|
2584
2584
|
}
|
|
2585
2585
|
getPageFromPosition(_e) {
|
|
2586
|
-
const { viewportDim: ke, contentDim: De, slides: $e, pages: Re, panzoom: Be } = this, Le = Re.length,
|
|
2586
|
+
const { viewportDim: ke, contentDim: De, slides: $e, pages: Re, panzoom: Be } = this, Le = Re.length, Ie = $e.length, Ae = $e[0], ze = $e[Ie - 1], je = this.option("center");
|
|
2587
2587
|
let Fe = 0, Ve = 0, He = 0, qe = _e === void 0 ? -1 * ((Be == null ? void 0 : Be.target[this.axis]) || 0) : _e;
|
|
2588
|
-
je && (qe += 0.5 * ke), this.isInfinite ? (qe < Ae.pos - 0.5 *
|
|
2589
|
-
let Xe =
|
|
2588
|
+
je && (qe += 0.5 * ke), this.isInfinite ? (qe < Ae.pos - 0.5 * ze.gap && (qe -= De, He = -1), qe > ze.pos + ze.dim + 0.5 * ze.gap && (qe -= De, He = 1)) : qe = Math.max(Ae.pos || 0, Math.min(qe, ze.pos));
|
|
2589
|
+
let Xe = ze, We = $e.find((Ze) => {
|
|
2590
2590
|
const Ge = Ze.pos - 0.5 * Xe.gap, Ye = Ze.pos + Ze.dim + 0.5 * Ze.gap;
|
|
2591
2591
|
return Xe = Ze, qe >= Ge && qe < Ye;
|
|
2592
2592
|
});
|
|
2593
|
-
return We || (We =
|
|
2593
|
+
return We || (We = ze), Ve = this.getPageForSlide(We.index), Fe = Ve + He * Le, { page: Fe, pageIndex: Ve };
|
|
2594
2594
|
}
|
|
2595
2595
|
setPageFromPosition() {
|
|
2596
2596
|
const { pageIndex: _e } = this.getPageFromPosition();
|
|
@@ -2600,10 +2600,10 @@ class Q extends g {
|
|
|
2600
2600
|
if ([B.Destroy].includes(this.state)) return;
|
|
2601
2601
|
this.state = B.Destroy;
|
|
2602
2602
|
const { container: _e, viewport: ke, track: De, slides: $e, panzoom: Re } = this, Be = this.option("classes");
|
|
2603
|
-
_e.removeEventListener("click", this.onClick, { passive: !1, capture: !1 }), _e.removeEventListener("slideTo", this.onSlideTo), window.removeEventListener("resize", this.onResize), Re && (Re.destroy(), this.panzoom = null), $e && $e.forEach((
|
|
2604
|
-
this.removeSlideEl(
|
|
2603
|
+
_e.removeEventListener("click", this.onClick, { passive: !1, capture: !1 }), _e.removeEventListener("slideTo", this.onSlideTo), window.removeEventListener("resize", this.onResize), Re && (Re.destroy(), this.panzoom = null), $e && $e.forEach((Ie) => {
|
|
2604
|
+
this.removeSlideEl(Ie);
|
|
2605
2605
|
}), this.detachPlugins(), ke && (ke.removeEventListener("scroll", this.onScroll), ke.offsetParent && De && De.offsetParent && ke.replaceWith(...De.childNodes));
|
|
2606
|
-
for (const [
|
|
2606
|
+
for (const [Ie, Ae] of Object.entries(Be)) Ie !== "container" && Ae && _e.classList.remove(Ae);
|
|
2607
2607
|
this.track = null, this.viewport = null, this.page = 0, this.slides = [];
|
|
2608
2608
|
const Le = this.events.get("ready");
|
|
2609
2609
|
this.events = /* @__PURE__ */ new Map(), Le && this.events.set("ready", Le);
|
|
@@ -2615,9 +2615,9 @@ const tt = function(Ne) {
|
|
|
2615
2615
|
const _e = window.scrollY, ke = window.innerHeight, De = _e + ke, $e = Ne.getBoundingClientRect(), Re = $e.y + _e, Be = $e.height, Le = Re + Be;
|
|
2616
2616
|
if (_e > Le || De < Re) return 0;
|
|
2617
2617
|
if (_e < Re && De > Le || Re < _e && Le > De) return 100;
|
|
2618
|
-
let
|
|
2619
|
-
Re < _e && (
|
|
2620
|
-
const Ae =
|
|
2618
|
+
let Ie = Be;
|
|
2619
|
+
Re < _e && (Ie -= _e - Re), Le > De && (Ie -= Le - De);
|
|
2620
|
+
const Ae = Ie / ke * 100;
|
|
2621
2621
|
return Math.round(Ae);
|
|
2622
2622
|
}, et = !(typeof window > "u" || !window.document || !window.document.createElement);
|
|
2623
2623
|
let it;
|
|
@@ -2714,14 +2714,14 @@ class wt extends _ {
|
|
|
2714
2714
|
var _e;
|
|
2715
2715
|
const ke = this.instance, De = ke.container, $e = ke.getSlide();
|
|
2716
2716
|
if (!De || !De.parentElement || !$e) return;
|
|
2717
|
-
const { el: Re, contentEl: Be, panzoom: Le, thumbElSrc:
|
|
2718
|
-
if (!Re || !
|
|
2717
|
+
const { el: Re, contentEl: Be, panzoom: Le, thumbElSrc: Ie } = $e;
|
|
2718
|
+
if (!Re || !Ie || !Be || !Le || Le.isContentLoading || Le.state === m.Init || Le.state === m.Destroy) return;
|
|
2719
2719
|
Le.updateMetrics();
|
|
2720
2720
|
let Ae = this.getZoomInfo($e);
|
|
2721
2721
|
if (!Ae) return;
|
|
2722
|
-
this.instance.state = rt.CustomClosing, De.classList.remove(yt), De.classList.add("is-zooming-out"), Be.style.backgroundImage = `url('${
|
|
2723
|
-
const
|
|
2724
|
-
(((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1) === 1 && Object.assign(De.style, { position: "absolute", top: `${De.offsetTop + window.scrollY}px`, left: `${De.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${
|
|
2722
|
+
this.instance.state = rt.CustomClosing, De.classList.remove(yt), De.classList.add("is-zooming-out"), Be.style.backgroundImage = `url('${Ie}')`;
|
|
2723
|
+
const ze = De.getBoundingClientRect();
|
|
2724
|
+
(((_e = window.visualViewport) === null || _e === void 0 ? void 0 : _e.scale) || 1) === 1 && Object.assign(De.style, { position: "absolute", top: `${De.offsetTop + window.scrollY}px`, left: `${De.offsetLeft + window.scrollX}px`, bottom: "auto", right: "auto", width: `${ze.width}px`, height: `${ze.height}px`, overflow: "hidden" });
|
|
2725
2725
|
const { x: je, y: Fe, scale: Ve, opacity: He } = Ae;
|
|
2726
2726
|
if (He) {
|
|
2727
2727
|
const qe = ((Xe, We, Ze, Ge) => {
|
|
@@ -2739,12 +2739,12 @@ class wt extends _ {
|
|
|
2739
2739
|
setImage(_e, ke) {
|
|
2740
2740
|
const De = this.instance;
|
|
2741
2741
|
_e.src = ke, this.process(_e, ke).then(($e) => {
|
|
2742
|
-
const { contentEl: Re, imageEl: Be, thumbElSrc: Le, el:
|
|
2742
|
+
const { contentEl: Re, imageEl: Be, thumbElSrc: Le, el: Ie } = _e;
|
|
2743
2743
|
if (De.isClosing() || !Re || !Be) return;
|
|
2744
2744
|
Re.offsetHeight;
|
|
2745
2745
|
const Ae = !!De.isOpeningSlide(_e) && this.getZoomInfo(_e);
|
|
2746
|
-
if (this.option("protected") &&
|
|
2747
|
-
|
|
2746
|
+
if (this.option("protected") && Ie) {
|
|
2747
|
+
Ie.addEventListener("contextmenu", (Fe) => {
|
|
2748
2748
|
Fe.preventDefault();
|
|
2749
2749
|
});
|
|
2750
2750
|
const je = document.createElement("div");
|
|
@@ -2759,9 +2759,9 @@ class wt extends _ {
|
|
|
2759
2759
|
Ve && (Ve.remove(), Ve = null);
|
|
2760
2760
|
}, 200));
|
|
2761
2761
|
};
|
|
2762
|
-
(
|
|
2762
|
+
(ze = Le, new Promise((qe, Xe) => {
|
|
2763
2763
|
const We = new Image();
|
|
2764
|
-
We.onload = qe, We.onerror = Xe, We.src =
|
|
2764
|
+
We.onload = qe, We.onerror = Xe, We.src = ze;
|
|
2765
2765
|
})).then(() => {
|
|
2766
2766
|
De.hideLoading(_e), _e.state = lt.Opening, this.instance.emit("reveal", _e), this.zoomIn(_e).then(() => {
|
|
2767
2767
|
He(), this.instance.done(_e);
|
|
@@ -2777,7 +2777,7 @@ class wt extends _ {
|
|
|
2777
2777
|
let He = De.optionFor(_e, "showClass") || void 0, qe = !0;
|
|
2778
2778
|
De.isOpeningSlide(_e) && (je === "full" ? $e.zoomToFull(Ve) : je === "cover" ? $e.zoomToCover(Ve) : je === "max" ? $e.zoomToMax(Ve) : qe = !1, $e.stop("current")), qe && He && (He = $e.isDragging ? "f-fadeIn" : ""), De.hideLoading(_e), De.revealContent(_e, He);
|
|
2779
2779
|
}
|
|
2780
|
-
var
|
|
2780
|
+
var ze;
|
|
2781
2781
|
}, () => {
|
|
2782
2782
|
De.setError(_e, "{{IMAGE_ERROR}}");
|
|
2783
2783
|
});
|
|
@@ -2787,25 +2787,25 @@ class wt extends _ {
|
|
|
2787
2787
|
var Re;
|
|
2788
2788
|
const Be = this.instance, Le = _e.el;
|
|
2789
2789
|
Be.clearContent(_e), Be.showLoading(_e);
|
|
2790
|
-
let
|
|
2791
|
-
if (typeof
|
|
2792
|
-
if (
|
|
2793
|
-
let Ae = "",
|
|
2794
|
-
Ae = typeof
|
|
2790
|
+
let Ie = this.optionFor(_e, "content");
|
|
2791
|
+
if (typeof Ie == "string" && (Ie = n(Ie)), !Ie || !E(Ie)) {
|
|
2792
|
+
if (Ie = document.createElement("img"), Ie instanceof HTMLImageElement) {
|
|
2793
|
+
let Ae = "", ze = _e.caption;
|
|
2794
|
+
Ae = typeof ze == "string" && ze ? ze.replace(/<[^>]+>/gi, "").substring(0, 1e3) : `Image ${_e.index + 1} of ${((Re = Be.carousel) === null || Re === void 0 ? void 0 : Re.pages.length) || 1}`, Ie.src = ke || "", Ie.alt = Ae, Ie.draggable = !1, _e.srcset && Ie.setAttribute("srcset", _e.srcset), this.instance.isOpeningSlide(_e) && (Ie.fetchPriority = "high");
|
|
2795
2795
|
}
|
|
2796
|
-
_e.sizes &&
|
|
2796
|
+
_e.sizes && Ie.setAttribute("sizes", _e.sizes);
|
|
2797
2797
|
}
|
|
2798
|
-
P(
|
|
2798
|
+
P(Ie, "fancybox-image"), _e.imageEl = Ie, Be.setContent(_e, Ie, !1), _e.panzoom = new I(Le, u({ transformParent: !0 }, this.option("Panzoom") || {}, { content: Ie, width: (Ae, ze) => Be.optionFor(_e, "width", "auto", ze) || "auto", height: (Ae, ze) => Be.optionFor(_e, "height", "auto", ze) || "auto", wheel: () => {
|
|
2799
2799
|
const Ae = Be.option("wheel");
|
|
2800
2800
|
return (Ae === "zoom" || Ae == "pan") && Ae;
|
|
2801
|
-
}, click: (Ae,
|
|
2801
|
+
}, click: (Ae, ze) => {
|
|
2802
2802
|
var je, Fe;
|
|
2803
2803
|
if (Be.isCompact || Be.isClosing() || _e.index !== ((je = Be.getSlide()) === null || je === void 0 ? void 0 : je.index)) return !1;
|
|
2804
|
-
if (
|
|
2805
|
-
const He =
|
|
2804
|
+
if (ze) {
|
|
2805
|
+
const He = ze.composedPath()[0];
|
|
2806
2806
|
if (["A", "BUTTON", "TEXTAREA", "OPTION", "INPUT", "SELECT", "VIDEO"].includes(He.nodeName)) return !1;
|
|
2807
2807
|
}
|
|
2808
|
-
let Ve = !
|
|
2808
|
+
let Ve = !ze || ze.target && ((Fe = _e.contentEl) === null || Fe === void 0 ? void 0 : Fe.contains(ze.target));
|
|
2809
2809
|
return Be.option(Ve ? "contentClick" : "backdropClick") || !1;
|
|
2810
2810
|
}, dblClick: () => Be.isCompact ? "toggleZoom" : Be.option("contentDblClick") || !1, spinner: !1, panOnlyZoomed: !0, wheelLimit: 1 / 0, on: { ready: (Ae) => {
|
|
2811
2811
|
De(Ae);
|
|
@@ -2818,18 +2818,18 @@ class wt extends _ {
|
|
|
2818
2818
|
}
|
|
2819
2819
|
zoomIn(_e) {
|
|
2820
2820
|
return new Promise((ke, De) => {
|
|
2821
|
-
const $e = this.instance, Re = $e.container, { panzoom: Be, contentEl: Le, el:
|
|
2821
|
+
const $e = this.instance, Re = $e.container, { panzoom: Be, contentEl: Le, el: Ie } = _e;
|
|
2822
2822
|
Be && Be.updateMetrics();
|
|
2823
2823
|
const Ae = this.getZoomInfo(_e);
|
|
2824
|
-
if (!(Ae &&
|
|
2825
|
-
const { x:
|
|
2824
|
+
if (!(Ae && Ie && Le && Be && Re)) return void De();
|
|
2825
|
+
const { x: ze, y: je, scale: Fe, opacity: Ve } = Ae, He = () => {
|
|
2826
2826
|
_e.state !== lt.Closing && (Ve && (Le.style.opacity = Math.max(Math.min(1, 1 - (1 - Be.scale) / (1 - Fe)), 0) + ""), Be.scale >= 1 && Be.scale > Be.targetScale - 0.1 && ke(Be));
|
|
2827
2827
|
}, qe = (Ze) => {
|
|
2828
2828
|
(Ze.scale < 0.99 || Ze.scale > 1.01) && !Ze.isDragging || (S(Re, yt), Le.style.opacity = "", Ze.off("endAnimation", qe), Ze.off("touchStart", qe), Ze.off("afterTransform", He), ke(Ze));
|
|
2829
2829
|
};
|
|
2830
2830
|
Be.on("endAnimation", qe), Be.on("touchStart", qe), Be.on("afterTransform", He), Be.on(["error", "destroy"], () => {
|
|
2831
2831
|
De();
|
|
2832
|
-
}), Be.panTo({ x:
|
|
2832
|
+
}), Be.panTo({ x: ze, y: je, scale: Fe, friction: 0, ignoreBounds: !0 }), Be.stop("current");
|
|
2833
2833
|
const Xe = { event: Be.panMode === "mousemove" ? $e.prevMouseMoveEvent || $e.options.event : void 0 }, We = this.optionFor(_e, "initialSize");
|
|
2834
2834
|
P(Re, yt), $e.hideLoading(_e), We === "full" ? Be.zoomToFull(Xe) : We === "cover" ? Be.zoomToCover(Xe) : We === "max" ? Be.zoomToMax(Xe) : Be.reset(0.172);
|
|
2835
2835
|
});
|
|
@@ -2837,13 +2837,13 @@ class wt extends _ {
|
|
|
2837
2837
|
getZoomInfo(_e) {
|
|
2838
2838
|
const { el: ke, imageEl: De, thumbEl: $e, panzoom: Re } = _e, Be = this.instance, Le = Be.container;
|
|
2839
2839
|
if (!ke || !De || !$e || !Re || tt($e) < 3 || !this.optionFor(_e, "zoom") || !Le || Be.state === rt.Destroy || getComputedStyle(Le).getPropertyValue("--f-images-zoom") === "0") return !1;
|
|
2840
|
-
const
|
|
2841
|
-
if ((
|
|
2842
|
-
let { top: Ae, left:
|
|
2840
|
+
const Ie = window.visualViewport || null;
|
|
2841
|
+
if ((Ie ? Ie.scale : 1) !== 1) return !1;
|
|
2842
|
+
let { top: Ae, left: ze, width: je, height: Fe } = $e.getBoundingClientRect(), { top: Ve, left: He, fitWidth: qe, fitHeight: Xe } = Re.contentRect;
|
|
2843
2843
|
if (!(je && Fe && qe && Xe)) return !1;
|
|
2844
2844
|
const We = Re.container.getBoundingClientRect();
|
|
2845
2845
|
He += We.left, Ve += We.top;
|
|
2846
|
-
const Ze = -1 * (He + 0.5 * qe - (
|
|
2846
|
+
const Ze = -1 * (He + 0.5 * qe - (ze + 0.5 * je)), Ge = -1 * (Ve + 0.5 * Xe - (Ae + 0.5 * Fe)), Ye = je / qe;
|
|
2847
2847
|
let Ue = this.option("zoomOpacity") || !1;
|
|
2848
2848
|
return Ue === "auto" && (Ue = Math.abs(je / Fe - qe / Xe) > 0.1), { x: Ze, y: Ge, scale: Ye, opacity: Ue };
|
|
2849
2849
|
}
|
|
@@ -2859,11 +2859,11 @@ class wt extends _ {
|
|
|
2859
2859
|
Object.defineProperty(wt, "defaults", { enumerable: !0, configurable: !0, writable: !0, value: { initialSize: "fit", Panzoom: { maxScale: 1 }, protected: !1, zoom: !0, zoomOpacity: "auto" } }), typeof SuppressedError == "function" && SuppressedError;
|
|
2860
2860
|
const xt = "html", Et = "image", St = "map", Pt = "youtube", Ct = "vimeo", Tt = "html5video", Mt = (Ne, _e = {}) => {
|
|
2861
2861
|
const ke = new URL(Ne), De = new URLSearchParams(ke.search), $e = new URLSearchParams();
|
|
2862
|
-
for (const [Le,
|
|
2863
|
-
let Ae =
|
|
2862
|
+
for (const [Le, Ie] of [...De, ...Object.entries(_e)]) {
|
|
2863
|
+
let Ae = Ie + "";
|
|
2864
2864
|
if (Le === "t") {
|
|
2865
|
-
let
|
|
2866
|
-
|
|
2865
|
+
let ze = Ae.match(/((\d*)m)?(\d*)s?/);
|
|
2866
|
+
ze && $e.set("start", 60 * parseInt(ze[2] || "0") + parseInt(ze[3] || "0") + "");
|
|
2867
2867
|
} else $e.set(Le, Ae);
|
|
2868
2868
|
}
|
|
2869
2869
|
let Re = $e + "", Be = Ne.match(/#t=((.*)?\d+s)/);
|
|
@@ -2959,7 +2959,7 @@ class Lt extends _ {
|
|
|
2959
2959
|
De.classList.add("is-loading");
|
|
2960
2960
|
const $e = this.instance, Re = document.createElement("iframe");
|
|
2961
2961
|
Re.className = "fancybox__iframe", Re.setAttribute("id", `fancybox__iframe_${$e.id}_${_e.index}`);
|
|
2962
|
-
for (const [Le,
|
|
2962
|
+
for (const [Le, Ie] of Object.entries(this.optionFor(_e, "iframeAttr") || {})) Re.setAttribute(Le, Ie);
|
|
2963
2963
|
Re.onerror = () => {
|
|
2964
2964
|
$e.setError(_e, "{{IFRAME_ERROR}}");
|
|
2965
2965
|
}, _e.iframeEl = Re;
|
|
@@ -2980,18 +2980,18 @@ class Lt extends _ {
|
|
|
2980
2980
|
Re === void 0 && (Re = this.optionFor(_e, "autoSize"));
|
|
2981
2981
|
let Be = _e.width || 0, Le = _e.height || 0;
|
|
2982
2982
|
Be && Le && (Re = !1);
|
|
2983
|
-
const
|
|
2984
|
-
if (_e.preload !== !1 && Re !== !1 &&
|
|
2985
|
-
const Ae = window.getComputedStyle($e),
|
|
2983
|
+
const Ie = $e && $e.style;
|
|
2984
|
+
if (_e.preload !== !1 && Re !== !1 && Ie) try {
|
|
2985
|
+
const Ae = window.getComputedStyle($e), ze = parseFloat(Ae.paddingLeft) + parseFloat(Ae.paddingRight), je = parseFloat(Ae.paddingTop) + parseFloat(Ae.paddingBottom), Fe = De.contentWindow;
|
|
2986
2986
|
if (Fe) {
|
|
2987
2987
|
const Ve = Fe.document, He = Ve.getElementsByTagName(xt)[0], qe = Ve.body;
|
|
2988
|
-
|
|
2988
|
+
Ie.width = "", qe.style.overflow = "hidden", Be = Be || He.scrollWidth + ze, Ie.width = `${Be}px`, qe.style.overflow = "", Ie.flex = "0 0 auto", Ie.height = `${qe.scrollHeight}px`, Le = He.scrollHeight + je;
|
|
2989
2989
|
}
|
|
2990
2990
|
} catch {
|
|
2991
2991
|
}
|
|
2992
2992
|
if (Be || Le) {
|
|
2993
2993
|
const Ae = { flex: "0 1 auto", width: "", height: "" };
|
|
2994
|
-
Be && Be !== "auto" && (Ae.width = `${Be}px`), Le && Le !== "auto" && (Ae.height = `${Le}px`), Object.assign(
|
|
2994
|
+
Be && Be !== "auto" && (Ae.width = `${Be}px`), Le && Le !== "auto" && (Ae.height = `${Le}px`), Object.assign(Ie, Ae);
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
2997
|
playVideo() {
|
|
@@ -3035,8 +3035,8 @@ class Lt extends _ {
|
|
|
3035
3035
|
for (He = Object.getOwnPropertySymbols(je); qe < He.length; qe++) Fe.indexOf(He[qe]) < 0 && Object.prototype.propertyIsEnumerable.call(je, He[qe]) && (Ve[He[qe]] = je[He[qe]]);
|
|
3036
3036
|
}
|
|
3037
3037
|
return Ve;
|
|
3038
|
-
}(Re, ["nocookie"]),
|
|
3039
|
-
_e.videoId =
|
|
3038
|
+
}(Re, ["nocookie"]), Ie = `www.youtube${Be ? "-nocookie" : ""}.com`, Ae = Mt(ke, Le), ze = encodeURIComponent($e[2]);
|
|
3039
|
+
_e.videoId = ze, _e.src = `https://${Ie}/embed/${ze}?${Ae}`, _e.thumbSrc = _e.thumbSrc || `https://i.ytimg.com/vi/${ze}/mqdefault.jpg`, De = Pt;
|
|
3040
3040
|
} else if ($e = ke.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)) {
|
|
3041
3041
|
const Re = Mt(ke, this.optionFor(_e, Ct)), Be = encodeURIComponent($e[1]), Le = $e[4] || "";
|
|
3042
3042
|
_e.videoId = Be, _e.src = `https://player.vimeo.com/video/${Be}?${Le ? `h=${Le}${Re ? "&" : ""}` : ""}${Re}`, De = Ct;
|
|
@@ -3087,8 +3087,8 @@ class Lt extends _ {
|
|
|
3087
3087
|
} else $e && Re && (De = $e / Re);
|
|
3088
3088
|
if (!De) return;
|
|
3089
3089
|
ke.style.aspectRatio = "", ke.style.width = "", ke.style.height = "", ke.offsetHeight;
|
|
3090
|
-
const Be = ke.getBoundingClientRect(), Le = Be.width || 1,
|
|
3091
|
-
ke.style.aspectRatio = De + "", De < Le /
|
|
3090
|
+
const Be = ke.getBoundingClientRect(), Le = Be.width || 1, Ie = Be.height || 1;
|
|
3091
|
+
ke.style.aspectRatio = De + "", De < Le / Ie ? (Re = Re === "auto" ? Ie : Math.min(Ie, Re), ke.style.width = "auto", ke.style.height = `${Re}px`) : ($e = $e === "auto" ? Le : Math.min(Le, $e), ke.style.width = `${$e}px`, ke.style.height = "auto");
|
|
3092
3092
|
}
|
|
3093
3093
|
attach() {
|
|
3094
3094
|
const _e = this, ke = _e.instance;
|
|
@@ -3215,8 +3215,8 @@ class Dt extends _ {
|
|
|
3215
3215
|
}, stop: () => {
|
|
3216
3216
|
De.classList.remove("has-slideshow"), _e.isCompact || _e.endIdle(), _e.emit("endSlideshow");
|
|
3217
3217
|
}, resume: ($e, Re) => {
|
|
3218
|
-
var Be, Le,
|
|
3219
|
-
!Re || !Re.cancelable || ((Be = _e.getSlide()) === null || Be === void 0 ? void 0 : Be.state) === lt.Ready && (!((
|
|
3218
|
+
var Be, Le, Ie;
|
|
3219
|
+
!Re || !Re.cancelable || ((Be = _e.getSlide()) === null || Be === void 0 ? void 0 : Be.state) === lt.Ready && (!((Ie = (Le = _e.carousel) === null || Le === void 0 ? void 0 : Le.panzoom) === null || Ie === void 0) && Ie.isResting) || Re.preventDefault();
|
|
3220
3220
|
} } }), ke.attachPlugins({ Autoplay: It }), this.ref = ke.plugins.Autoplay);
|
|
3221
3221
|
}
|
|
3222
3222
|
onReady(_e) {
|
|
@@ -3278,8 +3278,8 @@ let $t = class extends _ {
|
|
|
3278
3278
|
S(_e, this.cn(Bt));
|
|
3279
3279
|
let Le = ((Ne = $e.pages[Be]) === null || Ne === void 0 ? void 0 : Ne.pos) || 0;
|
|
3280
3280
|
Le += ke.getProgress(Be) * (this[_t] + this.thumbGap);
|
|
3281
|
-
let
|
|
3282
|
-
-1 * Le >
|
|
3281
|
+
let Ie = Re.getBounds();
|
|
3282
|
+
-1 * Le > Ie.x.min && -1 * Le < Ie.x.max && Re.panTo({ x: -1 * Le, friction: 0.12 });
|
|
3283
3283
|
} else o(_e, this.cn(Bt), De.isResting);
|
|
3284
3284
|
this.shiftModern();
|
|
3285
3285
|
}
|
|
@@ -3329,11 +3329,11 @@ let $t = class extends _ {
|
|
|
3329
3329
|
const _e = Ne.instance, ke = _e.container, De = Ne.getSlides(), $e = Ne.option("type");
|
|
3330
3330
|
Ne.type = $e;
|
|
3331
3331
|
const Re = Ne.option("parentEl"), Be = Ne.cn("container"), Le = Ne.cn("track");
|
|
3332
|
-
let
|
|
3333
|
-
|
|
3334
|
-
let Ae =
|
|
3335
|
-
Ae || (Ae = document.createElement("div"), P(Ae, Ne.cn("track")),
|
|
3336
|
-
const
|
|
3332
|
+
let Ie = Re == null ? void 0 : Re.querySelector("." + Be);
|
|
3333
|
+
Ie || (Ie = document.createElement("div"), P(Ie, Be), Re ? Re.appendChild(Ie) : ke.after(Ie)), P(Ie, `is-${$e}`), P(ke, Ne.cn("hasThumbs")), Ne.container = Ie, Ne.updateProps();
|
|
3334
|
+
let Ae = Ie.querySelector("." + Le);
|
|
3335
|
+
Ae || (Ae = document.createElement("div"), P(Ae, Ne.cn("track")), Ie.appendChild(Ae)), Ne.track = Ae;
|
|
3336
|
+
const ze = u({}, { track: Ae, infinite: !1, center: !0, fill: $e === "classic", dragFree: !0, slidesPerPage: 1, transition: !1, preload: 0.25, friction: 0.12, Panzoom: { maxVelocity: 0 }, Dots: !1, Navigation: !1, classes: { container: "f-thumbs", viewport: "f-thumbs__viewport", track: "f-thumbs__track", slide: "f-thumbs__slide" } }, Ne.option("Carousel") || {}, { Sync: { target: _e }, slides: De }), je = new _e.constructor(Ie, ze);
|
|
3337
3337
|
je.on("createSlide", (Fe, Ve) => {
|
|
3338
3338
|
Ne.setProps(Ve.index), Ne.emit("createSlide", Ve, Ve.el);
|
|
3339
3339
|
}), je.on("ready", () => {
|
|
@@ -3358,20 +3358,20 @@ let $t = class extends _ {
|
|
|
3358
3358
|
};
|
|
3359
3359
|
let [Be, Le] = $e(Ne.target);
|
|
3360
3360
|
if (Be > -1) return;
|
|
3361
|
-
const
|
|
3362
|
-
let [je, Fe] = Re(Ae -
|
|
3361
|
+
const Ie = this[_t], Ae = Ne.clientX, ze = Ne.clientY;
|
|
3362
|
+
let [je, Fe] = Re(Ae - Ie, ze), [Ve, He] = Re(Ae + Ie, ze);
|
|
3363
3363
|
Fe && He ? (Be = Math.abs(Ae - Fe.getBoundingClientRect().right) < Math.abs(Ae - He.getBoundingClientRect().left) ? je : Ve, Be === De && (Be = Be === je ? Ve : je)) : Fe ? Be = je : He && (Be = Ve), Be > -1 && ke[Be] && _e.slideTo(Be);
|
|
3364
3364
|
}
|
|
3365
3365
|
getShift(Ne) {
|
|
3366
3366
|
var _e;
|
|
3367
3367
|
const ke = this, { instance: De } = ke, $e = ke.carousel;
|
|
3368
3368
|
if (!De || !$e) return 0;
|
|
3369
|
-
const Re = ke[Ht], Be = ke[_t], Le = ke.thumbGap,
|
|
3369
|
+
const Re = ke[Ht], Be = ke[_t], Le = ke.thumbGap, Ie = ke.thumbExtraGap;
|
|
3370
3370
|
if (!(!((_e = $e.slides[Ne]) === null || _e === void 0) && _e.el)) return 0;
|
|
3371
|
-
const Ae = 0.5 * (Re - Be),
|
|
3372
|
-
let je = De.getProgress(0), Fe = De.getProgress(
|
|
3371
|
+
const Ae = 0.5 * (Re - Be), ze = De.pages.length - 1;
|
|
3372
|
+
let je = De.getProgress(0), Fe = De.getProgress(ze), Ve = De.getProgress(Ne, !1, !0), He = 0, qe = Ae + Ie + Le;
|
|
3373
3373
|
const Xe = je < 0 && je > -1, We = Fe > 0 && Fe < 1;
|
|
3374
|
-
return Ne === 0 ? (He = qe * Math.abs(je), We && je === 1 && (He -= qe * Math.abs(Fe))) : Ne ===
|
|
3374
|
+
return Ne === 0 ? (He = qe * Math.abs(je), We && je === 1 && (He -= qe * Math.abs(Fe))) : Ne === ze ? (He = qe * Math.abs(Fe) * -1, Xe && Fe === -1 && (He += qe * Math.abs(je))) : Xe || We ? (He = -1 * qe, He += qe * Math.abs(je), He += qe * (1 - Math.abs(Fe))) : He = qe * Ve, He;
|
|
3375
3375
|
}
|
|
3376
3376
|
setProps(Ne) {
|
|
3377
3377
|
var _e;
|
|
@@ -3428,8 +3428,8 @@ class Yt extends _ {
|
|
|
3428
3428
|
var De, $e, Re;
|
|
3429
3429
|
const Be = ((Re = ($e = (De = this.instance) === null || De === void 0 ? void 0 : De.carousel) === null || $e === void 0 ? void 0 : $e.slides[ke.index]) === null || Re === void 0 ? void 0 : Re.type) || "", Le = ke.el;
|
|
3430
3430
|
if (Le && Be) {
|
|
3431
|
-
let
|
|
3432
|
-
["video", "youtube", "vimeo", "html5video"].includes(Be) && (
|
|
3431
|
+
let Ie = `for-${Be}`;
|
|
3432
|
+
["video", "youtube", "vimeo", "html5video"].includes(Be) && (Ie += " for-video"), P(Le, Ie);
|
|
3433
3433
|
}
|
|
3434
3434
|
}
|
|
3435
3435
|
onInit() {
|
|
@@ -3439,9 +3439,9 @@ class Yt extends _ {
|
|
|
3439
3439
|
const Re = ke.option("parentEl") || De.footer || De.container;
|
|
3440
3440
|
if (!Re) return;
|
|
3441
3441
|
const Be = u({}, ke.options, { parentEl: Re, classes: { container: "f-thumbs fancybox__thumbs" }, Carousel: { Sync: { friction: De.option("Carousel.friction") || 0 } }, on: { ready: (Le) => {
|
|
3442
|
-
const
|
|
3443
|
-
|
|
3444
|
-
|
|
3442
|
+
const Ie = Le.container;
|
|
3443
|
+
Ie && this.hidden && (ke.refresh(), Ie.style.transition = "none", ke.hide(), Ie.offsetHeight, queueMicrotask(() => {
|
|
3444
|
+
Ie.style.transition = "", ke.show();
|
|
3445
3445
|
}));
|
|
3446
3446
|
} } });
|
|
3447
3447
|
Be.Carousel = Be.Carousel || {}, Be.Carousel.on = u(((_e = ke.options.Carousel) === null || _e === void 0 ? void 0 : _e.on) || {}, { click: this.onClick, createSlide: this.onCreateSlide }), $e.options.Thumbs = Be, $e.attachPlugins({ Thumbs: $t }), ke.ref = $e.plugins.Thumbs, ke.option("showOnStart") || (ke.ref.state = jt.Hidden, ke.hidden = !0);
|
|
@@ -3502,45 +3502,45 @@ class Qt extends _ {
|
|
|
3502
3502
|
let De = this.option("display"), $e = this.option("absolute"), Re = this.option("enabled");
|
|
3503
3503
|
if (Re === "auto") {
|
|
3504
3504
|
const Ae = this.instance.carousel;
|
|
3505
|
-
let
|
|
3506
|
-
if (Ae) for (const je of Ae.slides) (je.panzoom || je.type === "image") &&
|
|
3507
|
-
|
|
3505
|
+
let ze = 0;
|
|
3506
|
+
if (Ae) for (const je of Ae.slides) (je.panzoom || je.type === "image") && ze++;
|
|
3507
|
+
ze || (Re = !1);
|
|
3508
3508
|
}
|
|
3509
3509
|
Re || (De = void 0);
|
|
3510
3510
|
let Be = 0;
|
|
3511
3511
|
const Le = { left: [], middle: [], right: [] };
|
|
3512
|
-
if (De) for (const Ae of ["left", "middle", "right"]) for (const
|
|
3513
|
-
const je = this.createEl(
|
|
3512
|
+
if (De) for (const Ae of ["left", "middle", "right"]) for (const ze of De[Ae]) {
|
|
3513
|
+
const je = this.createEl(ze);
|
|
3514
3514
|
je && ((ke = Le[Ae]) === null || ke === void 0 || ke.push(je), Be++);
|
|
3515
3515
|
}
|
|
3516
|
-
let
|
|
3517
|
-
if (Be && (
|
|
3518
|
-
for (const [Ae,
|
|
3516
|
+
let Ie = null;
|
|
3517
|
+
if (Be && (Ie = this.createContainer()), Ie) {
|
|
3518
|
+
for (const [Ae, ze] of Object.entries(Le)) {
|
|
3519
3519
|
const je = document.createElement("div");
|
|
3520
3520
|
P(je, Jt + "__column is-" + Ae);
|
|
3521
|
-
for (const Fe of
|
|
3522
|
-
$e !== "auto" || Ae !== "middle" ||
|
|
3521
|
+
for (const Fe of ze) je.appendChild(Fe);
|
|
3522
|
+
$e !== "auto" || Ae !== "middle" || ze.length || ($e = !0), Ie.appendChild(je);
|
|
3523
3523
|
}
|
|
3524
|
-
$e === !0 && P(
|
|
3524
|
+
$e === !0 && P(Ie, "is-absolute"), this.state = Zt.Ready, this.onRefresh();
|
|
3525
3525
|
} else this.state = Zt.Disabled;
|
|
3526
3526
|
}
|
|
3527
3527
|
onClick(_e) {
|
|
3528
3528
|
var ke, De;
|
|
3529
|
-
const $e = this.instance, Re = $e.getSlide(), Be = Re == null ? void 0 : Re.panzoom, Le = _e.target,
|
|
3530
|
-
if (!
|
|
3531
|
-
if (
|
|
3532
|
-
if (
|
|
3533
|
-
if (
|
|
3529
|
+
const $e = this.instance, Re = $e.getSlide(), Be = Re == null ? void 0 : Re.panzoom, Le = _e.target, Ie = Le && E(Le) ? Le.dataset : null;
|
|
3530
|
+
if (!Ie) return;
|
|
3531
|
+
if (Ie.fancyboxToggleThumbs !== void 0) return _e.preventDefault(), _e.stopPropagation(), void ((ke = $e.plugins.Thumbs) === null || ke === void 0 || ke.toggle());
|
|
3532
|
+
if (Ie.fancyboxToggleFullscreen !== void 0) return _e.preventDefault(), _e.stopPropagation(), void this.instance.toggleFullscreen();
|
|
3533
|
+
if (Ie.fancyboxToggleSlideshow !== void 0) {
|
|
3534
3534
|
_e.preventDefault(), _e.stopPropagation();
|
|
3535
3535
|
const je = (De = $e.carousel) === null || De === void 0 ? void 0 : De.plugins.Autoplay;
|
|
3536
3536
|
let Fe = je.isActive;
|
|
3537
3537
|
return Be && Be.panMode === "mousemove" && !Fe && Be.reset(), void (Fe ? je.stop() : je.start());
|
|
3538
3538
|
}
|
|
3539
|
-
const Ae =
|
|
3540
|
-
if ((
|
|
3539
|
+
const Ae = Ie.panzoomAction, ze = Ie.panzoomChange;
|
|
3540
|
+
if ((ze || Ae) && (_e.preventDefault(), _e.stopPropagation()), ze) {
|
|
3541
3541
|
let je = {};
|
|
3542
3542
|
try {
|
|
3543
|
-
je = JSON.parse(
|
|
3543
|
+
je = JSON.parse(ze);
|
|
3544
3544
|
} catch {
|
|
3545
3545
|
}
|
|
3546
3546
|
Be && Be.applyChange(je);
|
|
@@ -3599,12 +3599,12 @@ class Qt extends _ {
|
|
|
3599
3599
|
$e = document.createElement("button"), $e.setAttribute("title", this.instance.localize(`{{${_e.toUpperCase()}}}`)), P($e, "f-button"), Ae.action && ($e.dataset.panzoomAction = Ae.action), Ae.change && ($e.dataset.panzoomChange = JSON.stringify(Ae.change)), $e.appendChild(n(this.instance.localize(Ae.icon)));
|
|
3600
3600
|
} else {
|
|
3601
3601
|
const Ae = (this.option("items") || [])[_e];
|
|
3602
|
-
Ae && ($e = n(this.instance.localize(Ae.tpl)), typeof Ae.click == "function" && $e.addEventListener("click", (
|
|
3603
|
-
|
|
3602
|
+
Ae && ($e = n(this.instance.localize(Ae.tpl)), typeof Ae.click == "function" && $e.addEventListener("click", (ze) => {
|
|
3603
|
+
ze.preventDefault(), ze.stopPropagation(), typeof Ae.click == "function" && Ae.click.call(this, this, ze);
|
|
3604
3604
|
}));
|
|
3605
3605
|
}
|
|
3606
|
-
const
|
|
3607
|
-
if (
|
|
3606
|
+
const Ie = $e == null ? void 0 : $e.querySelector("svg");
|
|
3607
|
+
if (Ie) for (const [Ae, ze] of Object.entries(Gt)) Ie.getAttribute(Ae) || Ie.setAttribute(Ae, String(ze));
|
|
3608
3608
|
return $e;
|
|
3609
3609
|
}
|
|
3610
3610
|
removeContainer() {
|
|
@@ -3735,23 +3735,23 @@ class Oe extends g {
|
|
|
3735
3735
|
}), this.option("dragToClose") && ($e.on("Panzoom.afterTransform", (Re, Be) => {
|
|
3736
3736
|
const Le = this.getSlide();
|
|
3737
3737
|
if (Le && e(Le.el)) return;
|
|
3738
|
-
const
|
|
3739
|
-
if (
|
|
3740
|
-
const Ae = Math.abs(Be.current.f),
|
|
3741
|
-
|
|
3738
|
+
const Ie = this.container;
|
|
3739
|
+
if (Ie) {
|
|
3740
|
+
const Ae = Math.abs(Be.current.f), ze = Ae < 1 ? "" : Math.max(0.5, Math.min(1, 1 - Ae / Be.contentRect.fitHeight * 1.5));
|
|
3741
|
+
Ie.style.setProperty("--fancybox-ts", ze ? "0s" : ""), Ie.style.setProperty("--fancybox-opacity", ze + "");
|
|
3742
3742
|
}
|
|
3743
3743
|
}), $e.on("Panzoom.touchEnd", (Re, Be, Le) => {
|
|
3744
|
-
var
|
|
3744
|
+
var Ie;
|
|
3745
3745
|
const Ae = this.getSlide();
|
|
3746
|
-
if (Ae && e(Ae.el) || Be.isMobile && document.activeElement && ["TEXTAREA", "INPUT"].indexOf((
|
|
3747
|
-
const
|
|
3748
|
-
Be.lockedAxis === "y" && (
|
|
3746
|
+
if (Ae && e(Ae.el) || Be.isMobile && document.activeElement && ["TEXTAREA", "INPUT"].indexOf((Ie = document.activeElement) === null || Ie === void 0 ? void 0 : Ie.nodeName) !== -1) return;
|
|
3747
|
+
const ze = Math.abs(Be.dragOffset.y);
|
|
3748
|
+
Be.lockedAxis === "y" && (ze >= 200 || ze >= 50 && Be.dragOffset.time < 300) && (Le && Le.cancelable && Le.preventDefault(), this.close(Le, "f-throwOut" + (Be.current.f < 0 ? "Up" : "Down")));
|
|
3749
3749
|
})), $e.on("change", (Re) => {
|
|
3750
3750
|
var Be;
|
|
3751
3751
|
let Le = (Be = this.getSlide()) === null || Be === void 0 ? void 0 : Be.triggerEl;
|
|
3752
3752
|
if (Le) {
|
|
3753
|
-
const
|
|
3754
|
-
Le.dispatchEvent(
|
|
3753
|
+
const Ie = new CustomEvent("slideTo", { bubbles: !0, cancelable: !0, detail: Re.page });
|
|
3754
|
+
Le.dispatchEvent(Ie);
|
|
3755
3755
|
}
|
|
3756
3756
|
}), $e.on(["refresh", "change"], (Re) => {
|
|
3757
3757
|
const Be = this.container;
|
|
@@ -3764,11 +3764,11 @@ class Oe extends g {
|
|
|
3764
3764
|
}
|
|
3765
3765
|
const Le = this.getSlide();
|
|
3766
3766
|
if (!Le) return;
|
|
3767
|
-
let
|
|
3768
|
-
|
|
3767
|
+
let Ie = Le.downloadSrc || "";
|
|
3768
|
+
Ie || Le.type !== "image" || Le.error || !ve(Le[me]) || (Ie = Le[me]);
|
|
3769
3769
|
for (const Ae of Be.querySelectorAll("[data-fancybox-download]")) {
|
|
3770
|
-
const
|
|
3771
|
-
|
|
3770
|
+
const ze = Le.downloadFilename;
|
|
3771
|
+
Ie ? (Ae.removeAttribute(ue), Ae.removeAttribute(pe), Ae.setAttribute(ge, Ie), Ae.setAttribute(fe, ze || Ie), Ae.setAttribute("target", "_blank")) : (Ae.setAttribute(ue, ""), Ae.setAttribute(pe, "-1"), Ae.removeAttribute(ge), Ae.removeAttribute(fe));
|
|
3772
3772
|
}
|
|
3773
3773
|
}), this.emit("initCarousel");
|
|
3774
3774
|
}
|
|
@@ -3792,8 +3792,8 @@ class Oe extends g {
|
|
|
3792
3792
|
const ke = window.visualViewport, De = Math.max(1, (ke == null ? void 0 : ke.scale) || 1);
|
|
3793
3793
|
let $e = "", Re = "", Be = "";
|
|
3794
3794
|
if (ke && De > 1) {
|
|
3795
|
-
let Le = `${ke.offsetLeft}px`,
|
|
3796
|
-
$e = ke.width * De + "px", Re = ke.height * De + "px", Be = `translate3d(${Le}, ${
|
|
3795
|
+
let Le = `${ke.offsetLeft}px`, Ie = `${ke.offsetTop}px`;
|
|
3796
|
+
$e = ke.width * De + "px", Re = ke.height * De + "px", Be = `translate3d(${Le}, ${Ie}, 0) scale(${1 / De})`;
|
|
3797
3797
|
}
|
|
3798
3798
|
_e.style.transform = Be, _e.style.width = $e, _e.style.height = Re;
|
|
3799
3799
|
}
|
|
@@ -3828,8 +3828,8 @@ class Oe extends g {
|
|
|
3828
3828
|
const ke = _e.target;
|
|
3829
3829
|
let De = this.option("wheel", _e);
|
|
3830
3830
|
ke.closest(".fancybox__thumbs") && (De = "slide");
|
|
3831
|
-
const $e = De === "slide", Re = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(
|
|
3832
|
-
return Math.abs(Ae) > Math.abs(
|
|
3831
|
+
const $e = De === "slide", Re = [-_e.deltaX || 0, -_e.deltaY || 0, -_e.detail || 0].reduce(function(Ie, Ae) {
|
|
3832
|
+
return Math.abs(Ae) > Math.abs(Ie) ? Ae : Ie;
|
|
3833
3833
|
}), Be = Math.max(-1, Math.min(1, Re)), Le = Date.now();
|
|
3834
3834
|
this.pwt && Le - this.pwt < 300 ? $e && _e.preventDefault() : (this.pwt = Le, this.emit("wheel", _e, Be), _e.defaultPrevented || (De === "close" ? (_e.preventDefault(), this.close(_e)) : De === "slide" && (i(ke) || (_e.preventDefault(), this[Be > 0 ? "prev" : "next"]()))));
|
|
3835
3835
|
}
|
|
@@ -3883,20 +3883,20 @@ class Oe extends g {
|
|
|
3883
3883
|
const Be = this.isCompact || this.option("commonCaption"), Le = !Be;
|
|
3884
3884
|
if (this.caption && this.stop(this.caption), Le && this.caption && (this.caption.remove(), this.caption = null), Be && !this.caption) for (const je of ((ke = this.carousel) === null || ke === void 0 ? void 0 : ke.slides) || []) je.captionEl && (je.captionEl.remove(), je.captionEl = void 0, S(je.el, de), (De = je.el) === null || De === void 0 || De.removeAttribute("aria-labelledby"));
|
|
3885
3885
|
if (_e || (_e = this.getSlide()), !_e || Be && !this.isCurrentSlide(_e)) return;
|
|
3886
|
-
const
|
|
3886
|
+
const Ie = _e.el;
|
|
3887
3887
|
let Ae = this.optionFor(_e, "caption", "");
|
|
3888
3888
|
if (!Ae) return void (Be && this.caption && this.animate(this.caption, "f-fadeOut", () => {
|
|
3889
3889
|
this.caption && (this.caption.innerHTML = "");
|
|
3890
3890
|
}));
|
|
3891
|
-
let
|
|
3891
|
+
let ze = null;
|
|
3892
3892
|
if (Le) {
|
|
3893
|
-
if (
|
|
3893
|
+
if (ze = _e.captionEl || null, Ie && !ze) {
|
|
3894
3894
|
const je = $e + `_${this.id}_${_e.index}`;
|
|
3895
|
-
|
|
3895
|
+
ze = document.createElement("div"), P(ze, $e), ze.setAttribute("id", je), _e.captionEl = Ie.appendChild(ze), P(Ie, de), Ie.setAttribute("aria-labelledby", je);
|
|
3896
3896
|
}
|
|
3897
3897
|
} else
|
|
3898
|
-
|
|
3899
|
-
|
|
3898
|
+
ze = this.caption, ze || (ze = Re.querySelector("." + $e)), !ze && (ze = document.createElement("div"), ze.dataset.fancyboxCaption = "", P(ze, $e), (this.footer || Re).prepend(ze)), P(Re, de), this.caption = ze;
|
|
3899
|
+
ze && (ze.innerHTML = "", ve(Ae) || typeof Ae == "number" ? ze.innerHTML = Ae + "" : Ae instanceof HTMLElement && ze.appendChild(Ae));
|
|
3900
3900
|
}
|
|
3901
3901
|
checkFocus(_e) {
|
|
3902
3902
|
this.focus(_e);
|
|
@@ -3906,15 +3906,15 @@ class Oe extends g {
|
|
|
3906
3906
|
if (this.ignoreFocusChange) return;
|
|
3907
3907
|
const De = document.activeElement || null, $e = (_e == null ? void 0 : _e.target) || null, Re = this.container, Be = (ke = this.carousel) === null || ke === void 0 ? void 0 : ke.viewport;
|
|
3908
3908
|
if (!Re || !Be || !_e && De && Re.contains(De)) return;
|
|
3909
|
-
const Le = this.getSlide(),
|
|
3910
|
-
if (!
|
|
3909
|
+
const Le = this.getSlide(), Ie = Le && Le.state === lt.Ready ? Le.el : null;
|
|
3910
|
+
if (!Ie || Ie.contains(De) || Re === De) return;
|
|
3911
3911
|
_e && _e.cancelable && _e.preventDefault(), this.ignoreFocusChange = !0;
|
|
3912
3912
|
const Ae = Array.from(Re.querySelectorAll(nt));
|
|
3913
|
-
let
|
|
3913
|
+
let ze = [], je = null;
|
|
3914
3914
|
for (let Ve of Ae) {
|
|
3915
|
-
const He = !Ve.offsetParent || !!Ve.closest('[aria-hidden="true"]'), qe =
|
|
3915
|
+
const He = !Ve.offsetParent || !!Ve.closest('[aria-hidden="true"]'), qe = Ie && Ie.contains(Ve), Xe = !Be.contains(Ve);
|
|
3916
3916
|
if (Ve === Re || (qe || Xe) && !He) {
|
|
3917
|
-
|
|
3917
|
+
ze.push(Ve);
|
|
3918
3918
|
const We = Ve.dataset.origTabindex;
|
|
3919
3919
|
We !== void 0 && We && (Ve.tabIndex = parseFloat(We)), Ve.removeAttribute("data-orig-tabindex"), !Ve.hasAttribute("autoFocus") && je || (je = Ve);
|
|
3920
3920
|
} else {
|
|
@@ -3923,7 +3923,7 @@ class Oe extends g {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
3925
|
let Fe = null;
|
|
3926
|
-
_e ? (!$e ||
|
|
3926
|
+
_e ? (!$e || ze.indexOf($e) < 0) && (Fe = je || Re, ze.length && (De === xe ? Fe = ze[0] : this.lastFocus !== Re && De !== we || (Fe = ze[ze.length - 1]))) : Fe = Le && Le.type === "image" ? Re : je || Re, Fe && st(Fe), this.lastFocus = document.activeElement, this.ignoreFocusChange = !1;
|
|
3927
3927
|
}
|
|
3928
3928
|
next() {
|
|
3929
3929
|
const _e = this.carousel;
|
|
@@ -4062,13 +4062,13 @@ class Oe extends g {
|
|
|
4062
4062
|
proceedClose(_e, ke) {
|
|
4063
4063
|
var De, $e;
|
|
4064
4064
|
this.state = rt.Closing, this.clearIdle(), this.detachEvents();
|
|
4065
|
-
const Re = this.container, Be = this.carousel, Le = this.getSlide(),
|
|
4066
|
-
if (
|
|
4065
|
+
const Re = this.container, Be = this.carousel, Le = this.getSlide(), Ie = Le && this.option("placeFocusBack") ? Le.triggerEl || this.option("triggerEl") : null;
|
|
4066
|
+
if (Ie && (tt(Ie) ? st(Ie) : Ie.focus()), Re && (S(Re, he), P(Re, "is-closing"), Re.setAttribute(oe, "true"), this.option("animated") && P(Re, re), Re.style.pointerEvents = "none"), Be) {
|
|
4067
4067
|
Be.clearTransitions(), (De = Be.panzoom) === null || De === void 0 || De.destroy(), ($e = Be.plugins.Navigation) === null || $e === void 0 || $e.detach();
|
|
4068
4068
|
for (const Ae of Be.slides) {
|
|
4069
4069
|
Ae.state = lt.Closing, this.hideLoading(Ae);
|
|
4070
|
-
const
|
|
4071
|
-
|
|
4070
|
+
const ze = Ae.contentEl;
|
|
4071
|
+
ze && this.stop(ze);
|
|
4072
4072
|
const je = Ae == null ? void 0 : Ae.panzoom;
|
|
4073
4073
|
je && (je.stop(), je.detachEvents(), je.detachObserver()), this.isCurrentSlide(Ae) || Be.emit("removeSlide", Ae);
|
|
4074
4074
|
}
|
|
@@ -4129,12 +4129,12 @@ class Oe extends g {
|
|
|
4129
4129
|
return !!Ze && ($e = He, Re = Xe, Be = Ze, Le = We, !0);
|
|
4130
4130
|
}))), !$e || !Re || !Be) return;
|
|
4131
4131
|
Le = Le || {}, _e.preventDefault(), ke = Be;
|
|
4132
|
-
let
|
|
4132
|
+
let Ie = [], Ae = u({}, at, Le);
|
|
4133
4133
|
Ae.event = _e, Ae.triggerEl = ke, Ae.delegate = De;
|
|
4134
|
-
const
|
|
4135
|
-
if ((!ke || Fe ||
|
|
4134
|
+
const ze = Ae.groupAll, je = Ae.groupAttr, Fe = je && ke ? ke.getAttribute(`${je}`) : "";
|
|
4135
|
+
if ((!ke || Fe || ze) && (Ie = [].slice.call($e.querySelectorAll(Re))), ke && !ze && (Ie = Fe ? Ie.filter((He) => He.getAttribute(`${je}`) === Fe) : [ke]), !Ie.length) return;
|
|
4136
4136
|
const Ve = Oe.getInstance();
|
|
4137
|
-
return Ve && Ve.options.triggerEl &&
|
|
4137
|
+
return Ve && Ve.options.triggerEl && Ie.indexOf(Ve.options.triggerEl) > -1 ? void 0 : (ke && (Ae.startIndex = Ie.indexOf(ke)), Oe.fromNodes(Ie, Ae));
|
|
4138
4138
|
}
|
|
4139
4139
|
static fromSelector(_e, ke, De) {
|
|
4140
4140
|
let $e = null, Re = "", Be = {};
|
|
@@ -4148,15 +4148,15 @@ class Oe extends g {
|
|
|
4148
4148
|
for (const $e of _e) {
|
|
4149
4149
|
const Re = $e.dataset || {}, Be = Re[me] || $e.getAttribute(ge) || $e.getAttribute("currentSrc") || $e.getAttribute(me) || void 0;
|
|
4150
4150
|
let Le;
|
|
4151
|
-
const
|
|
4151
|
+
const Ie = ke.delegate;
|
|
4152
4152
|
let Ae;
|
|
4153
|
-
|
|
4154
|
-
const
|
|
4153
|
+
Ie && De.length === ke.startIndex && (Le = Ie instanceof HTMLImageElement ? Ie : Ie.querySelector("img:not([aria-hidden])")), Le || (Le = $e instanceof HTMLImageElement ? $e : $e.querySelector("img:not([aria-hidden])")), Le && (Ae = Le.currentSrc || Le[me] || void 0, !Ae && Le.dataset && (Ae = Le.dataset.lazySrc || Le.dataset[me] || void 0));
|
|
4154
|
+
const ze = { src: Be, triggerEl: $e, thumbEl: Le, thumbElSrc: Ae, thumbSrc: Ae };
|
|
4155
4155
|
for (const je in Re) {
|
|
4156
4156
|
let Fe = Re[je] + "";
|
|
4157
|
-
Fe = Fe !== "false" && (Fe === "true" || Fe),
|
|
4157
|
+
Fe = Fe !== "false" && (Fe === "true" || Fe), ze[je] = Fe;
|
|
4158
4158
|
}
|
|
4159
|
-
De.push(
|
|
4159
|
+
De.push(ze);
|
|
4160
4160
|
}
|
|
4161
4161
|
return new Oe(De, ke);
|
|
4162
4162
|
}
|
|
@@ -4231,7 +4231,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4231
4231
|
}, toDisplayString(_e.title), 3)
|
|
4232
4232
|
], 2));
|
|
4233
4233
|
}
|
|
4234
|
-
}), _hoisted_1$6 = { class: "ire-flex ire-h-fit ire-w-fit ire-flex-col ire-items-center" }, _hoisted_2$4 = { class: "flat-preview-value ire-min-w-max ire-text-center !ire-text-2xl ire-
|
|
4234
|
+
}), _hoisted_1$6 = { class: "ire-flex ire-h-fit ire-w-fit ire-flex-col ire-items-center" }, _hoisted_2$4 = { class: "flat-preview-value ire-min-w-max ire-text-center !ire-text-2xl ire-text-black" }, _hoisted_3$4 = { class: "flat-preview-text ire-border-b ire-border-solid ire-border-b-gray-200 ire-py-2 ire-text-sm ire-uppercase ire-text-gray-600" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
4235
4235
|
__name: "FlatPreviewKeyValue",
|
|
4236
4236
|
props: {
|
|
4237
4237
|
keyName: {},
|
|
@@ -4274,15 +4274,15 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4274
4274
|
emits: ["changeComponent"],
|
|
4275
4275
|
setup(Ne) {
|
|
4276
4276
|
const _e = Ne, ke = ref(!1), De = ref(0), $e = computed$1(() => {
|
|
4277
|
-
var Le,
|
|
4278
|
-
return !!((Ae = (
|
|
4277
|
+
var Le, Ie, Ae, ze, je, Fe;
|
|
4278
|
+
return !!((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_2d) != null && Ae.length && ((Fe = (je = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : je.image_3d) != null && Fe.length));
|
|
4279
4279
|
}), Re = computed$1(() => {
|
|
4280
|
-
var
|
|
4281
|
-
const Le = ke.value ? (
|
|
4280
|
+
var Ie, Ae, ze, je, Fe, Ve;
|
|
4281
|
+
const Le = ke.value ? (ze = (Ae = (Ie = _e.flat) == null ? void 0 : Ie.type) == null ? void 0 : Ae.image_2d) == null ? void 0 : ze.length : (Ve = (Fe = (je = _e.flat) == null ? void 0 : je.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : Ve.length;
|
|
4282
4282
|
return ["I", "II", "III"].slice(0, Le);
|
|
4283
4283
|
}), Be = computed$1(() => {
|
|
4284
|
-
var Le,
|
|
4285
|
-
return ((Ae = (
|
|
4284
|
+
var Le, Ie, Ae, ze, je, Fe;
|
|
4285
|
+
return ((Ae = (Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_3d) == null ? void 0 : Ae.length) || ((Fe = (je = (ze = _e.flat) == null ? void 0 : ze.type) == null ? void 0 : je.image_2d) == null ? void 0 : Fe.length);
|
|
4286
4286
|
});
|
|
4287
4287
|
return watch(
|
|
4288
4288
|
() => ke.value,
|
|
@@ -4290,10 +4290,10 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4290
4290
|
De.value = 0;
|
|
4291
4291
|
}
|
|
4292
4292
|
), onMounted(() => {
|
|
4293
|
-
var Le,
|
|
4294
|
-
(Ae = Object.keys(((
|
|
4295
|
-
}), (Le,
|
|
4296
|
-
var Ae,
|
|
4293
|
+
var Le, Ie, Ae;
|
|
4294
|
+
(Ae = Object.keys(((Ie = (Le = _e.flat) == null ? void 0 : Le.type) == null ? void 0 : Ie.image_3d) || {})) != null && Ae.length || (ke.value = !0);
|
|
4295
|
+
}), (Le, Ie) => {
|
|
4296
|
+
var Ae, ze, je, Fe, Ve, He, qe, Xe, We, Ze, Ge, Ye, Ue, Qe, Je, Ke, ei, ii, ti, ni, oi, si, ri, ai, li, hi, di, fi, mi, gi, vi, bi, yi, _i, wi;
|
|
4297
4297
|
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
4298
4298
|
Be.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
4299
4299
|
(Ae = Le.flat) != null && Ae.conf ? (openBlock(), createElementBlock("div", _hoisted_3$3, toDisplayString(unref(tr)(Le.flat.conf)), 1)) : createCommentVNode("", !0),
|
|
@@ -4304,7 +4304,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4304
4304
|
mode: "out-in"
|
|
4305
4305
|
}, {
|
|
4306
4306
|
default: withCtx(() => {
|
|
4307
|
-
var ci, ui, pi, xi, Si, ki, Ei, Ci, Pi, Ti, Mi, Oi, Di, $i, Ri, Bi, Ni, Li, Ai,
|
|
4307
|
+
var ci, ui, pi, xi, Si, ki, Ei, Ci, Pi, Ti, Mi, Oi, Di, $i, Ri, Bi, Ni, Li, Ai, Ii, zi, ji, Vi, Fi, Hi, Wi, Xi, qi, Yi, Zi, Ui, Gi;
|
|
4308
4308
|
return [
|
|
4309
4309
|
ke.value && ((xi = (pi = (ui = (ci = Le.flat) == null ? void 0 : ci.type) == null ? void 0 : ui.image_2d) == null ? void 0 : pi[De.value]) != null && xi.url) ? (openBlock(), createElementBlock("a", {
|
|
4310
4310
|
key: 0,
|
|
@@ -4317,10 +4317,10 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4317
4317
|
src: (Bi = (Ri = ($i = (Di = Le.flat) == null ? void 0 : Di.type) == null ? void 0 : $i.image_2d) == null ? void 0 : Ri[De.value]) == null ? void 0 : Bi.url,
|
|
4318
4318
|
class: "ire-preview-img"
|
|
4319
4319
|
}, null, 8, _hoisted_5))
|
|
4320
|
-
], 8, _hoisted_4$2)) : (
|
|
4320
|
+
], 8, _hoisted_4$2)) : (Ii = (Ai = (Li = (Ni = Le.flat) == null ? void 0 : Ni.type) == null ? void 0 : Li.image_3d) == null ? void 0 : Ai[De.value]) != null && Ii.url ? (openBlock(), createElementBlock("a", {
|
|
4321
4321
|
key: 1,
|
|
4322
4322
|
"data-fancybox": "",
|
|
4323
|
-
href: (Fi = (Vi = (ji = (
|
|
4323
|
+
href: (Fi = (Vi = (ji = (zi = Le.flat) == null ? void 0 : zi.type) == null ? void 0 : ji.image_3d) == null ? void 0 : Vi[De.value]) == null ? void 0 : Fi.url,
|
|
4324
4324
|
class: "irep-flat-preview__left-3d"
|
|
4325
4325
|
}, [
|
|
4326
4326
|
(openBlock(), createElementBlock("img", {
|
|
@@ -4336,14 +4336,14 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4336
4336
|
]),
|
|
4337
4337
|
_: 1
|
|
4338
4338
|
}),
|
|
4339
|
-
$e.value || ((
|
|
4339
|
+
$e.value || ((ze = Re.value) == null ? void 0 : ze.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
4340
4340
|
$e.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
4341
4341
|
(He = (Ve = (Fe = (je = Le.flat) == null ? void 0 : je.type) == null ? void 0 : Fe.image_3d) == null ? void 0 : Ve[0]) != null && He.url ? (openBlock(), createBlock(_sfc_main$a, {
|
|
4342
4342
|
key: 0,
|
|
4343
4343
|
title: unref(tr)("3d plan"),
|
|
4344
4344
|
active: !ke.value,
|
|
4345
4345
|
class: "flat-preview-button",
|
|
4346
|
-
onClick:
|
|
4346
|
+
onClick: Ie[0] || (Ie[0] = (ci) => ke.value = !1)
|
|
4347
4347
|
}, {
|
|
4348
4348
|
icon: withCtx(() => [
|
|
4349
4349
|
createVNode(FlatIcon, {
|
|
@@ -4357,7 +4357,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4357
4357
|
title: unref(tr)("2d plan"),
|
|
4358
4358
|
active: ke.value,
|
|
4359
4359
|
class: "flat-preview-button",
|
|
4360
|
-
onClick:
|
|
4360
|
+
onClick: Ie[1] || (Ie[1] = (ci) => ke.value = !0)
|
|
4361
4361
|
}, {
|
|
4362
4362
|
icon: withCtx(() => [
|
|
4363
4363
|
createVNode(FlatIcon, {
|
|
@@ -4400,7 +4400,7 @@ const FancyBoxComp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
|
|
|
4400
4400
|
keyName: unref(tr)("area"),
|
|
4401
4401
|
value: unref(getArea)(Number((li = Le.flat) == null ? void 0 : li.type.area_m2))
|
|
4402
4402
|
}, {
|
|
4403
|
-
sufix: withCtx(() =>
|
|
4403
|
+
sufix: withCtx(() => Ie[2] || (Ie[2] = [
|
|
4404
4404
|
createElementVNode("span", null, [
|
|
4405
4405
|
createTextVNode(" m "),
|
|
4406
4406
|
createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
|
|
@@ -4516,13 +4516,13 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4516
4516
|
},
|
|
4517
4517
|
setup(Ne) {
|
|
4518
4518
|
return (_e, ke) => {
|
|
4519
|
-
var De, $e, Re, Be, Le,
|
|
4519
|
+
var De, $e, Re, Be, Le, Ie, Ae, ze, je, Fe, Ve, He;
|
|
4520
4520
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
4521
4521
|
createElementVNode("p", _hoisted_2$1, toDisplayString(($e = (De = _e.modalData) == null ? void 0 : De.modalObject) == null ? void 0 : $e.title), 1),
|
|
4522
4522
|
createVNode(_sfc_main$5, {
|
|
4523
4523
|
editor: (Be = (Re = _e.modalData) == null ? void 0 : Re.modalObject) == null ? void 0 : Be.description
|
|
4524
4524
|
}, null, 8, ["editor"]),
|
|
4525
|
-
(
|
|
4525
|
+
(ze = (Ae = (Ie = (Le = _e.modalData) == null ? void 0 : Le.modalObject) == null ? void 0 : Ie.modalImage) == null ? void 0 : Ae[0]) != null && ze.url ? (openBlock(), createElementBlock("img", {
|
|
4526
4526
|
key: 0,
|
|
4527
4527
|
src: (He = (Ve = (Fe = (je = _e.modalData) == null ? void 0 : je.modalObject) == null ? void 0 : Fe.modalImage) == null ? void 0 : Ve[0]) == null ? void 0 : He.url,
|
|
4528
4528
|
alt: "",
|
|
@@ -4541,7 +4541,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4541
4541
|
},
|
|
4542
4542
|
emits: ["changeComponent"],
|
|
4543
4543
|
setup(Ne, { emit: _e }) {
|
|
4544
|
-
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re),
|
|
4544
|
+
const ke = _e, De = Ne, $e = inject("showFlatModal"), Re = useGlobalStore(), { openReservedFlat: Be, openSoldFlat: Le } = storeToRefs(Re), Ie = ref(), Ae = ref(null), ze = ref(), je = ref(), Fe = computed$1(() => {
|
|
4545
4545
|
var Xe, We;
|
|
4546
4546
|
if ((Xe = De.block) != null && Xe.svg)
|
|
4547
4547
|
return (We = De.block) == null ? void 0 : We.svg;
|
|
@@ -4553,13 +4553,13 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4553
4553
|
const We = Xe.target;
|
|
4554
4554
|
(We == null ? void 0 : We.nodeName) === "path" && (((Ze = je.value) == null ? void 0 : Ze.conf) === "reserved" && !Be.value || ((Ge = je.value) == null ? void 0 : Ge.conf) === "sold" && !Le.value || ke(
|
|
4555
4555
|
"changeComponent",
|
|
4556
|
-
((Ye =
|
|
4556
|
+
((Ye = ze.value) == null ? void 0 : Ye.type) || "",
|
|
4557
4557
|
je.value
|
|
4558
4558
|
));
|
|
4559
4559
|
}, qe = () => {
|
|
4560
4560
|
var We;
|
|
4561
|
-
if (!
|
|
4562
|
-
((We =
|
|
4561
|
+
if (!Ie.value) return;
|
|
4562
|
+
((We = Ie.value) == null ? void 0 : We.querySelectorAll("g")).forEach((Ze) => {
|
|
4563
4563
|
var Qe, Je, Ke, ei;
|
|
4564
4564
|
const Ge = Ze == null ? void 0 : Ze.getAttribute("id"), Ye = (Je = (Qe = De.block) == null ? void 0 : Qe.polygon_data) == null ? void 0 : Je.find(
|
|
4565
4565
|
(ii) => (ii == null ? void 0 : ii.key) === Ge
|
|
@@ -4579,7 +4579,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4579
4579
|
return watch(
|
|
4580
4580
|
() => $e == null ? void 0 : $e.value,
|
|
4581
4581
|
() => {
|
|
4582
|
-
$e != null && $e.value || (Ae.value = null,
|
|
4582
|
+
$e != null && $e.value || (Ae.value = null, ze.value = null);
|
|
4583
4583
|
}
|
|
4584
4584
|
), watch(
|
|
4585
4585
|
() => Ae.value,
|
|
@@ -4590,35 +4590,35 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4590
4590
|
const We = Xe == null ? void 0 : Xe.parentElement;
|
|
4591
4591
|
if (We && (We == null ? void 0 : We.nodeName) === "g") {
|
|
4592
4592
|
const ii = We == null ? void 0 : We.getAttribute("id");
|
|
4593
|
-
if (!ii || (
|
|
4594
|
-
if (((Ye =
|
|
4593
|
+
if (!ii || (ze.value = ((Ge = (Ze = De.block) == null ? void 0 : Ze.polygon_data) == null ? void 0 : Ge.find((ti) => (ti == null ? void 0 : ti.key) === ii)) || null, !ze.value)) return;
|
|
4594
|
+
if (((Ye = ze.value) == null ? void 0 : Ye.type) === "floor") {
|
|
4595
4595
|
const ti = (Ue = De.floors) == null ? void 0 : Ue.find(
|
|
4596
4596
|
(ni) => {
|
|
4597
4597
|
var oi;
|
|
4598
|
-
return (ni == null ? void 0 : ni.id) === ((oi =
|
|
4598
|
+
return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
|
|
4599
4599
|
}
|
|
4600
4600
|
);
|
|
4601
4601
|
je.value = ti;
|
|
4602
|
-
} else if (((Qe =
|
|
4602
|
+
} else if (((Qe = ze.value) == null ? void 0 : Qe.type) === "flat") {
|
|
4603
4603
|
const ti = (Je = De.flats) == null ? void 0 : Je.find(
|
|
4604
4604
|
(ni) => {
|
|
4605
4605
|
var oi;
|
|
4606
|
-
return (ni == null ? void 0 : ni.id) === ((oi =
|
|
4606
|
+
return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
|
|
4607
4607
|
}
|
|
4608
4608
|
);
|
|
4609
4609
|
je.value = ti;
|
|
4610
|
-
} else if (((Ke =
|
|
4610
|
+
} else if (((Ke = ze.value) == null ? void 0 : Ke.type) === "tooltip") {
|
|
4611
4611
|
const ti = (ei = De.actions) == null ? void 0 : ei.find(
|
|
4612
4612
|
(ni) => {
|
|
4613
4613
|
var oi;
|
|
4614
|
-
return (ni == null ? void 0 : ni.id) === ((oi =
|
|
4614
|
+
return (ni == null ? void 0 : ni.id) === ((oi = ze.value) == null ? void 0 : oi.id);
|
|
4615
4615
|
}
|
|
4616
4616
|
);
|
|
4617
4617
|
je.value = ti;
|
|
4618
4618
|
} else
|
|
4619
4619
|
je.value = null;
|
|
4620
4620
|
} else
|
|
4621
|
-
|
|
4621
|
+
ze.value = null, je.value = null;
|
|
4622
4622
|
}
|
|
4623
4623
|
), onMounted(() => {
|
|
4624
4624
|
qe(), document.addEventListener("mousemove", Ve);
|
|
@@ -4628,7 +4628,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4628
4628
|
var Ze;
|
|
4629
4629
|
return openBlock(), createBlock(_sfc_main$i, {
|
|
4630
4630
|
hoverdData: je.value,
|
|
4631
|
-
type: (Ze =
|
|
4631
|
+
type: (Ze = ze.value) == null ? void 0 : Ze.type
|
|
4632
4632
|
}, {
|
|
4633
4633
|
header: withCtx(() => {
|
|
4634
4634
|
var Ge;
|
|
@@ -4650,7 +4650,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4650
4650
|
}, null, 8, _hoisted_3),
|
|
4651
4651
|
(openBlock(), createElementBlock("div", {
|
|
4652
4652
|
ref_key: "svgRef",
|
|
4653
|
-
ref:
|
|
4653
|
+
ref: Ie,
|
|
4654
4654
|
innerHTML: Fe.value,
|
|
4655
4655
|
key: Fe.value,
|
|
4656
4656
|
class: "canvas path-color ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full",
|
|
@@ -4667,11 +4667,11 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4667
4667
|
__name: "MouseTracker",
|
|
4668
4668
|
setup(Ne) {
|
|
4669
4669
|
const _e = useGlobalStore(), ke = ref(!0), De = ref(-400), $e = ref(-400), Re = ref(null);
|
|
4670
|
-
let Be = null, Le = 0,
|
|
4671
|
-
const Ae = (Fe, Ve, He) => Fe * (1 - He) + Ve * He,
|
|
4670
|
+
let Be = null, Le = 0, Ie = 0;
|
|
4671
|
+
const Ae = (Fe, Ve, He) => Fe * (1 - He) + Ve * He, ze = () => {
|
|
4672
4672
|
if (Be) return;
|
|
4673
4673
|
const Fe = () => {
|
|
4674
|
-
De.value = Ae(De.value, Le, 0.06), $e.value = Ae($e.value,
|
|
4674
|
+
De.value = Ae(De.value, Le, 0.06), $e.value = Ae($e.value, Ie, 0.06), Math.abs(De.value - Le) > 0.06 || Math.abs($e.value - Ie) > 0.06 ? Be = requestAnimationFrame(Fe) : Be = null;
|
|
4675
4675
|
};
|
|
4676
4676
|
Be = requestAnimationFrame(Fe);
|
|
4677
4677
|
}, je = (Fe) => {
|
|
@@ -4680,7 +4680,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4680
4680
|
if (!Re.value || !Ve || !He)
|
|
4681
4681
|
return;
|
|
4682
4682
|
const qe = Re.value.getBoundingClientRect(), Xe = He.getBoundingClientRect(), We = Ve.getBoundingClientRect(), Ze = qe.left + qe.width / 2, Ge = qe.top + qe.height / 2, Ye = Xe.left > Ze, Ue = Xe.bottom > Ge;
|
|
4683
|
-
Le = Fe.clientX - qe.left - (Ye ? We.width : -20),
|
|
4683
|
+
Le = Fe.clientX - qe.left - (Ye ? We.width : -20), Ie = Fe.clientY - qe.top - (Ue ? We.height : -20), ke.value && (De.value = Le, $e.value = Ie), ze(), ke.value = !1;
|
|
4684
4684
|
};
|
|
4685
4685
|
return onMounted(() => {
|
|
4686
4686
|
document.addEventListener("mousemove", je);
|
|
@@ -4731,11 +4731,11 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4731
4731
|
if (shortcodeData.value)
|
|
4732
4732
|
return (Le = shortcodeData.value) == null ? void 0 : Le.project;
|
|
4733
4733
|
}), floors = computed$1(() => {
|
|
4734
|
-
var Le,
|
|
4734
|
+
var Le, Ie;
|
|
4735
4735
|
if (shortcodeData.value)
|
|
4736
4736
|
return (Le = shortcodeData.value.floors) == null || Le.forEach((Ae) => {
|
|
4737
4737
|
var Fe, Ve;
|
|
4738
|
-
const
|
|
4738
|
+
const ze = (Ve = (Fe = shortcodeData.value) == null ? void 0 : Fe.flats) == null ? void 0 : Ve.filter((He) => {
|
|
4739
4739
|
var qe;
|
|
4740
4740
|
return (He == null ? void 0 : He.floor_number) !== ((qe = Ae == null ? void 0 : Ae.floor_number) == null ? void 0 : qe.toString()) ? !1 : Ae != null && Ae.polygon_data ? Object == null ? void 0 : Object.values(Ae == null ? void 0 : Ae.polygon_data).some(
|
|
4741
4741
|
(We) => {
|
|
@@ -4744,13 +4744,13 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4744
4744
|
}
|
|
4745
4745
|
) : !1;
|
|
4746
4746
|
});
|
|
4747
|
-
Ae.flats =
|
|
4747
|
+
Ae.flats = ze;
|
|
4748
4748
|
const { conf: je } = Ae || {};
|
|
4749
|
-
if (
|
|
4750
|
-
const He =
|
|
4749
|
+
if (ze != null && ze.length && !je) {
|
|
4750
|
+
const He = ze == null ? void 0 : ze.every((Xe) => (Xe == null ? void 0 : Xe.conf) === "reserved"), qe = ze == null ? void 0 : ze.every((Xe) => (Xe == null ? void 0 : Xe.conf) === "sold");
|
|
4751
4751
|
He ? Ae.conf = "reserved" : qe && (Ae.conf = "sold");
|
|
4752
4752
|
}
|
|
4753
|
-
}), (
|
|
4753
|
+
}), (Ie = shortcodeData.value) == null ? void 0 : Ie.floors;
|
|
4754
4754
|
}), blocks = computed$1(() => {
|
|
4755
4755
|
if (shortcodeData.value)
|
|
4756
4756
|
return shortcodeData.value.blocks;
|
|
@@ -4758,12 +4758,12 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4758
4758
|
if (shortcodeData.value)
|
|
4759
4759
|
return shortcodeData.value.types;
|
|
4760
4760
|
}), flats = computed$1(() => {
|
|
4761
|
-
var Le,
|
|
4761
|
+
var Le, Ie;
|
|
4762
4762
|
if (shortcodeData.value)
|
|
4763
|
-
return (
|
|
4764
|
-
var
|
|
4763
|
+
return (Ie = (Le = shortcodeData.value) == null ? void 0 : Le.flats) == null ? void 0 : Ie.map((Ae) => {
|
|
4764
|
+
var ze;
|
|
4765
4765
|
if (Ae != null && Ae.use_type || !(Ae != null && Ae.type)) {
|
|
4766
|
-
const je = (
|
|
4766
|
+
const je = (ze = types.value) == null ? void 0 : ze.find((Fe) => (Fe == null ? void 0 : Fe.id) === (Ae == null ? void 0 : Ae.type_id));
|
|
4767
4767
|
je && (Ae.type = je);
|
|
4768
4768
|
}
|
|
4769
4769
|
return Ae;
|
|
@@ -4776,8 +4776,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4776
4776
|
var Le;
|
|
4777
4777
|
if (shortcodeData.value)
|
|
4778
4778
|
return (Le = shortcodeData.value) == null ? void 0 : Le.meta;
|
|
4779
|
-
}), openNewTab = (Le,
|
|
4780
|
-
window.open(Le,
|
|
4779
|
+
}), openNewTab = (Le, Ie = !0) => {
|
|
4780
|
+
window.open(Le, Ie ? "_blank" : "_self");
|
|
4781
4781
|
}, changeRoute = (flowType, polygonItem) => {
|
|
4782
4782
|
switch (flowType) {
|
|
4783
4783
|
case "project":
|
|
@@ -4791,8 +4791,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4791
4791
|
break;
|
|
4792
4792
|
case "flat":
|
|
4793
4793
|
if ((polygonItem == null ? void 0 : polygonItem.click_action) === "follow_link") {
|
|
4794
|
-
const { link: Le, target:
|
|
4795
|
-
openNewTab(Le,
|
|
4794
|
+
const { link: Le, target: Ie } = polygonItem == null ? void 0 : polygonItem.follow_link;
|
|
4795
|
+
openNewTab(Le, Ie);
|
|
4796
4796
|
} else
|
|
4797
4797
|
showFlatModal.value = !0;
|
|
4798
4798
|
hoveredData.value = polygonItem;
|
|
@@ -4815,10 +4815,10 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4815
4815
|
return watch(
|
|
4816
4816
|
() => projectMeta.value,
|
|
4817
4817
|
() => {
|
|
4818
|
-
const Le = getMetaValue("path_color"),
|
|
4819
|
-
Le && (colors.path = Le.toString()),
|
|
4818
|
+
const Le = getMetaValue("path_color"), Ie = getMetaValue("path_hover_color"), Ae = getMetaValue("reserved_color"), ze = getMetaValue("sold_color"), je = getMetaValue("stroke_color"), Fe = getMetaValue("stroke_width");
|
|
4819
|
+
Le && (colors.path = Le.toString()), Ie && (colors.path_hover = Ie.toString()), Ae && (colors.reserved = Ae.toString()), ze && (colors.sold = ze.toString()), je && (colors.stroke_color = je.toString()), Fe && (colors.stroke_width = Number(Fe));
|
|
4820
4820
|
}
|
|
4821
|
-
), provide("showFlatModal", showFlatModal), (Le,
|
|
4821
|
+
), provide("showFlatModal", showFlatModal), (Le, Ie) => (openBlock(), createBlock(_sfc_main$2, { class: "interactive-real-estate ire-text-[16px]" }, {
|
|
4822
4822
|
default: withCtx(() => [
|
|
4823
4823
|
createVNode(Transition, {
|
|
4824
4824
|
name: "ire-fade-in-out",
|
|
@@ -4837,14 +4837,14 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4837
4837
|
projectMeta: projectMeta.value,
|
|
4838
4838
|
blocks: blocks.value,
|
|
4839
4839
|
actions: actions.value,
|
|
4840
|
-
onChangeComponent:
|
|
4840
|
+
onChangeComponent: Ie[0] || (Ie[0] = (Ae, ze) => changeRoute(Ae, ze))
|
|
4841
4841
|
}, null, 8, ["project", "floors", "flats", "projectMeta", "blocks", "actions"])) : flow.value === "blockFlow" && flats.value && floors.value && blocks.value && activeBlock.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
4842
4842
|
key: 1,
|
|
4843
4843
|
block: activeBlock.value,
|
|
4844
4844
|
flats: flats.value,
|
|
4845
4845
|
floors: floors.value,
|
|
4846
4846
|
actions: actions.value,
|
|
4847
|
-
onChangeComponent:
|
|
4847
|
+
onChangeComponent: Ie[1] || (Ie[1] = (Ae, ze) => changeRoute(Ae, ze))
|
|
4848
4848
|
}, null, 8, ["block", "flats", "floors", "actions"])) : flow.value === "floorFlow" && floors.value && activeFloor.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
4849
4849
|
key: 2,
|
|
4850
4850
|
flats: flats.value,
|
|
@@ -4852,7 +4852,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4852
4852
|
floors: floors.value,
|
|
4853
4853
|
blocks: blocks.value,
|
|
4854
4854
|
actions: actions.value,
|
|
4855
|
-
onChangeComponent:
|
|
4855
|
+
onChangeComponent: Ie[2] || (Ie[2] = (Ae, ze) => changeRoute(Ae, ze))
|
|
4856
4856
|
}, null, 8, ["flats", "floor", "floors", "blocks", "actions"])) : createCommentVNode("", !0)
|
|
4857
4857
|
], 4)) : createCommentVNode("", !0)
|
|
4858
4858
|
]),
|
|
@@ -4866,13 +4866,13 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4866
4866
|
default: withCtx(() => [
|
|
4867
4867
|
showFlatModal.value ? (openBlock(), createBlock(_sfc_main$6, {
|
|
4868
4868
|
key: 0,
|
|
4869
|
-
onClose:
|
|
4869
|
+
onClose: Ie[4] || (Ie[4] = (Ae) => showFlatModal.value = !1)
|
|
4870
4870
|
}, {
|
|
4871
4871
|
default: withCtx(() => [
|
|
4872
4872
|
createVNode(_sfc_main$8, {
|
|
4873
4873
|
flat: hoveredData.value,
|
|
4874
4874
|
floors: floors.value,
|
|
4875
|
-
onChangeComponent:
|
|
4875
|
+
onChangeComponent: Ie[3] || (Ie[3] = (Ae, ze) => changeRoute(Ae, ze))
|
|
4876
4876
|
}, null, 8, ["flat", "floors"])
|
|
4877
4877
|
]),
|
|
4878
4878
|
_: 1
|
|
@@ -4889,7 +4889,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]
|
|
|
4889
4889
|
default: withCtx(() => [
|
|
4890
4890
|
showModal.value ? (openBlock(), createBlock(_sfc_main$6, {
|
|
4891
4891
|
key: 0,
|
|
4892
|
-
onClose:
|
|
4892
|
+
onClose: Ie[5] || (Ie[5] = (Ae) => showModal.value = !1)
|
|
4893
4893
|
}, {
|
|
4894
4894
|
default: withCtx(() => [
|
|
4895
4895
|
createVNode(_sfc_main$4, { modalData: hoveredData.value }, null, 8, ["modalData"])
|