@eodash/eodash 5.0.0-alpha.2.5 → 5.0.0-alpha.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/core/client/App.vue +6 -7
- package/core/client/SuspensedDashboard.ce.vue +58 -40
- package/core/client/asWebComponent.d.ts +10 -5
- package/core/client/asWebComponent.js +6 -6
- package/core/client/components/DashboardLayout.vue +35 -16
- package/core/client/components/DynamicWebComponent.vue +44 -44
- package/core/client/components/ErrorAlert.vue +19 -7
- package/core/client/components/Footer.vue +28 -14
- package/core/client/components/Header.vue +4 -4
- package/core/client/components/IframeWrapper.vue +3 -3
- package/core/client/components/Loading.vue +17 -18
- package/core/client/components/MobileLayout.vue +48 -26
- package/core/client/composables/DefineEodash.js +38 -29
- package/core/client/composables/DefineWidgets.js +101 -81
- package/core/client/composables/index.js +43 -29
- package/core/client/eodash.js +59 -41
- package/core/client/main.js +2 -2
- package/core/client/plugins/index.js +9 -10
- package/core/client/plugins/vuetify.js +9 -10
- package/core/client/render.js +4 -5
- package/core/client/store/Actions.js +8 -0
- package/core/client/store/States.js +8 -13
- package/core/client/store/index.js +14 -11
- package/core/client/store/stac.js +51 -37
- package/core/client/types.d.ts +173 -200
- package/core/client/utils/eodashSTAC.js +130 -49
- package/core/client/utils/helpers.js +18 -20
- package/core/client/utils/index.js +29 -10
- package/core/client/utils/keys.js +2 -2
- package/core/client/views/Dashboard.vue +53 -36
- package/core/client/vite-env.d.ts +19 -17
- package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-Cbci3g7o.js} +9 -9
- package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-DzmQ3Fr3.js} +3 -3
- package/dist/client/EodashDatePicker-SP5bYISd.js +252 -0
- package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-B9Tf2TBw.js} +4 -6
- package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-D_znzmX7.js} +13131 -14490
- package/dist/client/EodashMapBtns-BOKugQ88.js +37 -0
- package/dist/client/ExportState-D7m9s4T8.js +558 -0
- package/dist/client/{Footer-BVIZms1S.js → Footer-C2uV1-zu.js} +12 -12
- package/dist/client/Header-C2ROtxo_.js +350 -0
- package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-Wwou4pwf.js} +1 -1
- package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-DR27Ctiz.js} +45 -57
- package/dist/client/PopUp-bPGAY43o.js +300 -0
- package/dist/client/VImg-swqiqth2.js +291 -0
- package/dist/client/{VMain-C9XV5Lyg.js → VMain-Bu1bPjvK.js} +2 -2
- package/dist/client/VOverlay-D_MKJ4vQ.js +967 -0
- package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-CpxYT8YI.js} +10 -3
- package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-DeaU3QoK.js} +6332 -6159
- package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
- package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-nokx54iM.js} +1 -1
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
- package/dist/client/eo-dash.js +2 -2
- package/dist/client/eodashSTAC-CFQuZ_cI.js +2788 -0
- package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
- package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
- package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-D0a135Tc.js} +43 -50
- package/dist/client/{index-CabQjjQg.js → index-CoqcWt6E.js} +4 -4
- package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
- package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-B3rx9xzz.js} +5 -7
- package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
- package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
- package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
- package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
- package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-C-inWOiD.js} +1 -1
- package/dist/client/style.css +2 -2
- package/dist/client/{transition-BlLt41wg.js → transition-C8le0YwQ.js} +3 -3
- package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
- package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/node/types.d.ts +32 -38
- package/package.json +12 -12
- package/widgets/EodashDatePicker.vue +94 -43
- package/widgets/EodashItemFilter.vue +13 -10
- package/widgets/EodashMap.vue +87 -20
- package/widgets/EodashMapBtns.vue +34 -0
- package/widgets/ExportState.vue +112 -0
- package/widgets/PopUp.vue +40 -0
- package/widgets/WidgetsContainer.vue +45 -27
- package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
- package/dist/client/Header-TsTL1d2R.js +0 -633
- package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
- package/dist/client/http-ZWiLaAeR.js +0 -1337
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { g as V, b as p, d as h, ab as w, p as b, y as R, r as O, L as M, w as x, a as L, D as q, ak as I, N, ae as W, e as X, ac as j, af as U, aS as Y, aT as z, ag as H, f as Q, h as G, i as J, Q as K, R as Z, ah as _, ad as ee, ai as te, aX as ae, aY as oe, aj as se, a$ as ne, b0 as re, X as ie, $ as P, a6 as k, a1 as S, a0 as le, a3 as E, a4 as ce, a5 as C, bb as ue } from "./asWebComponent-DeaU3QoK.js";
|
|
2
|
+
import { m as de, V as B } from "./VOverlay-D_MKJ4vQ.js";
|
|
3
|
+
import { a as y, d as me, s as D, c as fe, g as ge, n as ve, b as pe, f as he } from "./forwardRefs-D0a135Tc.js";
|
|
4
|
+
const ye = b({
|
|
5
|
+
target: [Object, Array]
|
|
6
|
+
}, "v-dialog-transition"), Pe = V()({
|
|
7
|
+
name: "VDialogTransition",
|
|
8
|
+
props: ye(),
|
|
9
|
+
setup(e, i) {
|
|
10
|
+
let {
|
|
11
|
+
slots: o
|
|
12
|
+
} = i;
|
|
13
|
+
const r = {
|
|
14
|
+
onBeforeEnter(t) {
|
|
15
|
+
t.style.pointerEvents = "none", t.style.visibility = "hidden";
|
|
16
|
+
},
|
|
17
|
+
async onEnter(t, c) {
|
|
18
|
+
await new Promise((n) => requestAnimationFrame(n)), await new Promise((n) => requestAnimationFrame(n)), t.style.visibility = "";
|
|
19
|
+
const {
|
|
20
|
+
x: a,
|
|
21
|
+
y: l,
|
|
22
|
+
sx: d,
|
|
23
|
+
sy: m,
|
|
24
|
+
speed: s
|
|
25
|
+
} = A(e.target, t), u = y(t, [{
|
|
26
|
+
transform: `translate(${a}px, ${l}px) scale(${d}, ${m})`,
|
|
27
|
+
opacity: 0
|
|
28
|
+
}, {}], {
|
|
29
|
+
duration: 225 * s,
|
|
30
|
+
easing: me
|
|
31
|
+
});
|
|
32
|
+
T(t)?.forEach((n) => {
|
|
33
|
+
y(n, [{
|
|
34
|
+
opacity: 0
|
|
35
|
+
}, {
|
|
36
|
+
opacity: 0,
|
|
37
|
+
offset: 0.33
|
|
38
|
+
}, {}], {
|
|
39
|
+
duration: 225 * 2 * s,
|
|
40
|
+
easing: D
|
|
41
|
+
});
|
|
42
|
+
}), u.finished.then(() => c());
|
|
43
|
+
},
|
|
44
|
+
onAfterEnter(t) {
|
|
45
|
+
t.style.removeProperty("pointer-events");
|
|
46
|
+
},
|
|
47
|
+
onBeforeLeave(t) {
|
|
48
|
+
t.style.pointerEvents = "none";
|
|
49
|
+
},
|
|
50
|
+
async onLeave(t, c) {
|
|
51
|
+
await new Promise((n) => requestAnimationFrame(n));
|
|
52
|
+
const {
|
|
53
|
+
x: a,
|
|
54
|
+
y: l,
|
|
55
|
+
sx: d,
|
|
56
|
+
sy: m,
|
|
57
|
+
speed: s
|
|
58
|
+
} = A(e.target, t);
|
|
59
|
+
y(t, [{}, {
|
|
60
|
+
transform: `translate(${a}px, ${l}px) scale(${d}, ${m})`,
|
|
61
|
+
opacity: 0
|
|
62
|
+
}], {
|
|
63
|
+
duration: 125 * s,
|
|
64
|
+
easing: fe
|
|
65
|
+
}).finished.then(() => c()), T(t)?.forEach((n) => {
|
|
66
|
+
y(n, [{}, {
|
|
67
|
+
opacity: 0,
|
|
68
|
+
offset: 0.2
|
|
69
|
+
}, {
|
|
70
|
+
opacity: 0
|
|
71
|
+
}], {
|
|
72
|
+
duration: 125 * 2 * s,
|
|
73
|
+
easing: D
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
onAfterLeave(t) {
|
|
78
|
+
t.style.removeProperty("pointer-events");
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
return () => e.target ? p(w, h({
|
|
82
|
+
name: "dialog-transition"
|
|
83
|
+
}, r, {
|
|
84
|
+
css: !1
|
|
85
|
+
}), o) : p(w, {
|
|
86
|
+
name: "dialog-transition"
|
|
87
|
+
}, o);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
function T(e) {
|
|
91
|
+
const i = e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")?.children;
|
|
92
|
+
return i && [...i];
|
|
93
|
+
}
|
|
94
|
+
function A(e, i) {
|
|
95
|
+
const o = ge(e), r = ve(i), [t, c] = getComputedStyle(i).transformOrigin.split(" ").map((F) => parseFloat(F)), [a, l] = getComputedStyle(i).getPropertyValue("--v-overlay-anchor-origin").split(" ");
|
|
96
|
+
let d = o.left + o.width / 2;
|
|
97
|
+
a === "left" || l === "left" ? d -= o.width / 2 : (a === "right" || l === "right") && (d += o.width / 2);
|
|
98
|
+
let m = o.top + o.height / 2;
|
|
99
|
+
a === "top" || l === "top" ? m -= o.height / 2 : (a === "bottom" || l === "bottom") && (m += o.height / 2);
|
|
100
|
+
const s = o.width / r.width, u = o.height / r.height, n = Math.max(1, s, u), f = s / n || 0, v = u / n || 0, g = r.width * r.height / (window.innerWidth * window.innerHeight), $ = g > 0.12 ? Math.min(1.5, (g - 0.12) * 10 + 1) : 1;
|
|
101
|
+
return {
|
|
102
|
+
x: d - (t + r.left),
|
|
103
|
+
y: m - (c + r.top),
|
|
104
|
+
sx: f,
|
|
105
|
+
sy: v,
|
|
106
|
+
speed: $
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const Ee = b({
|
|
110
|
+
fullscreen: Boolean,
|
|
111
|
+
retainFocus: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !0
|
|
114
|
+
},
|
|
115
|
+
scrollable: Boolean,
|
|
116
|
+
...de({
|
|
117
|
+
origin: "center center",
|
|
118
|
+
scrollStrategy: "block",
|
|
119
|
+
transition: {
|
|
120
|
+
component: Pe
|
|
121
|
+
},
|
|
122
|
+
zIndex: 2400
|
|
123
|
+
})
|
|
124
|
+
}, "VDialog"), Ve = V()({
|
|
125
|
+
name: "VDialog",
|
|
126
|
+
props: Ee(),
|
|
127
|
+
emits: {
|
|
128
|
+
"update:modelValue": (e) => !0,
|
|
129
|
+
afterLeave: () => !0
|
|
130
|
+
},
|
|
131
|
+
setup(e, i) {
|
|
132
|
+
let {
|
|
133
|
+
emit: o,
|
|
134
|
+
slots: r
|
|
135
|
+
} = i;
|
|
136
|
+
const t = R(e, "modelValue"), {
|
|
137
|
+
scopeId: c
|
|
138
|
+
} = pe(), a = O();
|
|
139
|
+
function l(s) {
|
|
140
|
+
const u = s.relatedTarget, n = s.target;
|
|
141
|
+
if (u !== n && a.value?.contentEl && // We're the topmost dialog
|
|
142
|
+
a.value?.globalTop && // It isn't the document or the dialog body
|
|
143
|
+
![document, a.value.contentEl].includes(n) && // It isn't inside the dialog body
|
|
144
|
+
!a.value.contentEl.contains(n)) {
|
|
145
|
+
const f = N(a.value.contentEl);
|
|
146
|
+
if (!f.length) return;
|
|
147
|
+
const v = f[0], g = f[f.length - 1];
|
|
148
|
+
u === v ? g.focus() : v.focus();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
M && x(() => t.value && e.retainFocus, (s) => {
|
|
152
|
+
s ? document.addEventListener("focusin", l) : document.removeEventListener("focusin", l);
|
|
153
|
+
}, {
|
|
154
|
+
immediate: !0
|
|
155
|
+
});
|
|
156
|
+
function d() {
|
|
157
|
+
a.value?.contentEl && !a.value.contentEl.contains(document.activeElement) && a.value.contentEl.focus({
|
|
158
|
+
preventScroll: !0
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function m() {
|
|
162
|
+
o("afterLeave");
|
|
163
|
+
}
|
|
164
|
+
return x(t, async (s) => {
|
|
165
|
+
s || (await q(), a.value.activatorEl?.focus({
|
|
166
|
+
preventScroll: !0
|
|
167
|
+
}));
|
|
168
|
+
}), L(() => {
|
|
169
|
+
const s = B.filterProps(e), u = h({
|
|
170
|
+
"aria-haspopup": "dialog",
|
|
171
|
+
"aria-expanded": String(t.value)
|
|
172
|
+
}, e.activatorProps), n = h({
|
|
173
|
+
tabindex: -1
|
|
174
|
+
}, e.contentProps);
|
|
175
|
+
return p(B, h({
|
|
176
|
+
ref: a,
|
|
177
|
+
class: ["v-dialog", {
|
|
178
|
+
"v-dialog--fullscreen": e.fullscreen,
|
|
179
|
+
"v-dialog--scrollable": e.scrollable
|
|
180
|
+
}, e.class],
|
|
181
|
+
style: e.style
|
|
182
|
+
}, s, {
|
|
183
|
+
modelValue: t.value,
|
|
184
|
+
"onUpdate:modelValue": (f) => t.value = f,
|
|
185
|
+
"aria-modal": "true",
|
|
186
|
+
activatorProps: u,
|
|
187
|
+
contentProps: n,
|
|
188
|
+
role: "dialog",
|
|
189
|
+
onAfterEnter: d,
|
|
190
|
+
onAfterLeave: m
|
|
191
|
+
}, c), {
|
|
192
|
+
activator: r.activator,
|
|
193
|
+
default: function() {
|
|
194
|
+
for (var f = arguments.length, v = new Array(f), g = 0; g < f; g++)
|
|
195
|
+
v[g] = arguments[g];
|
|
196
|
+
return p(I, {
|
|
197
|
+
root: "VDialog"
|
|
198
|
+
}, {
|
|
199
|
+
default: () => [r.default?.(...v)]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}), he({}, a);
|
|
204
|
+
}
|
|
205
|
+
}), be = b({
|
|
206
|
+
color: String,
|
|
207
|
+
...W(),
|
|
208
|
+
...X(),
|
|
209
|
+
...j(),
|
|
210
|
+
...U(),
|
|
211
|
+
...Y(),
|
|
212
|
+
...z(),
|
|
213
|
+
...H(),
|
|
214
|
+
...Q(),
|
|
215
|
+
...G()
|
|
216
|
+
}, "VSheet"), we = V()({
|
|
217
|
+
name: "VSheet",
|
|
218
|
+
props: be(),
|
|
219
|
+
setup(e, i) {
|
|
220
|
+
let {
|
|
221
|
+
slots: o
|
|
222
|
+
} = i;
|
|
223
|
+
const {
|
|
224
|
+
themeClasses: r
|
|
225
|
+
} = J(e), {
|
|
226
|
+
backgroundColorClasses: t,
|
|
227
|
+
backgroundColorStyles: c
|
|
228
|
+
} = K(Z(e, "color")), {
|
|
229
|
+
borderClasses: a
|
|
230
|
+
} = _(e), {
|
|
231
|
+
dimensionStyles: l
|
|
232
|
+
} = ee(e), {
|
|
233
|
+
elevationClasses: d
|
|
234
|
+
} = te(e), {
|
|
235
|
+
locationStyles: m
|
|
236
|
+
} = ae(e), {
|
|
237
|
+
positionClasses: s
|
|
238
|
+
} = oe(e), {
|
|
239
|
+
roundedClasses: u
|
|
240
|
+
} = se(e);
|
|
241
|
+
return L(() => p(e.tag, {
|
|
242
|
+
class: ["v-sheet", r.value, t.value, a.value, d.value, s.value, u.value, e.class],
|
|
243
|
+
style: [c.value, l.value, m.value, e.style]
|
|
244
|
+
}, o)), {};
|
|
245
|
+
}
|
|
246
|
+
}), xe = { key: 1 }, Be = {
|
|
247
|
+
__name: "PopUp",
|
|
248
|
+
props: /* @__PURE__ */ ne({
|
|
249
|
+
widget: {
|
|
250
|
+
/** @type {import("vue").PropType<import("@/types").Widget>} */
|
|
251
|
+
type: Object,
|
|
252
|
+
default: void 0
|
|
253
|
+
}
|
|
254
|
+
}, {
|
|
255
|
+
modelValue: { type: Boolean, required: !0, default: !1 },
|
|
256
|
+
modelModifiers: {}
|
|
257
|
+
}),
|
|
258
|
+
emits: ["update:modelValue"],
|
|
259
|
+
setup(e) {
|
|
260
|
+
const i = re(e, "modelValue"), o = e, [r] = ie([o?.widget]);
|
|
261
|
+
return (t, c) => (P(), k("span", null, [
|
|
262
|
+
p(Ve, {
|
|
263
|
+
"max-width": "500px",
|
|
264
|
+
"max-height": "500px",
|
|
265
|
+
absolute: "",
|
|
266
|
+
scrollable: "",
|
|
267
|
+
"scroll-strategy": "block",
|
|
268
|
+
"close-on-back": "",
|
|
269
|
+
modelValue: i.value,
|
|
270
|
+
"onUpdate:modelValue": c[0] || (c[0] = (a) => i.value = a)
|
|
271
|
+
}, {
|
|
272
|
+
default: S(() => [
|
|
273
|
+
p(we, null, {
|
|
274
|
+
default: S(() => [
|
|
275
|
+
e.widget ? (P(), le(
|
|
276
|
+
ce(E(r).component),
|
|
277
|
+
h({
|
|
278
|
+
key: E(r).id
|
|
279
|
+
}, E(r).props),
|
|
280
|
+
null,
|
|
281
|
+
16
|
|
282
|
+
/* FULL_PROPS */
|
|
283
|
+
)) : C("v-if", !0),
|
|
284
|
+
t.$slots.default ? (P(), k("span", xe, [
|
|
285
|
+
ue(t.$slots, "default")
|
|
286
|
+
])) : C("v-if", !0)
|
|
287
|
+
]),
|
|
288
|
+
_: 3
|
|
289
|
+
/* FORWARDED */
|
|
290
|
+
})
|
|
291
|
+
]),
|
|
292
|
+
_: 3
|
|
293
|
+
/* FORWARDED */
|
|
294
|
+
}, 8, ["modelValue"])
|
|
295
|
+
]));
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
export {
|
|
299
|
+
Be as default
|
|
300
|
+
};
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { b6 as O, p as W, e as D, ac as G, g as $, ad as J, a as E, b as n, c as h, ag as K, Q as X, R as Y, aj as Z, b7 as p, s as f, r as ee, w as C, b8 as te, D as ne, an as re, t as U, v as ae, F as se, d as ie, C as le, B as oe } from "./asWebComponent-DeaU3QoK.js";
|
|
2
|
+
import { m as ue, M as b } from "./transition-C8le0YwQ.js";
|
|
3
|
+
function ce(e, s) {
|
|
4
|
+
if (!O) return;
|
|
5
|
+
const i = s.modifiers || {}, l = s.value, {
|
|
6
|
+
handler: v,
|
|
7
|
+
options: R
|
|
8
|
+
} = typeof l == "object" ? l : {
|
|
9
|
+
handler: l,
|
|
10
|
+
options: {}
|
|
11
|
+
}, S = new IntersectionObserver(function() {
|
|
12
|
+
let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ = arguments.length > 1 ? arguments[1] : void 0;
|
|
13
|
+
const r = e._observe?.[s.instance.$.uid];
|
|
14
|
+
if (!r) return;
|
|
15
|
+
const a = c.some((d) => d.isIntersecting);
|
|
16
|
+
v && (!i.quiet || r.init) && (!i.once || a || r.init) && v(a, c, _), a && i.once ? M(e, s) : r.init = !0;
|
|
17
|
+
}, R);
|
|
18
|
+
e._observe = Object(e._observe), e._observe[s.instance.$.uid] = {
|
|
19
|
+
init: !1,
|
|
20
|
+
observer: S
|
|
21
|
+
}, S.observe(e);
|
|
22
|
+
}
|
|
23
|
+
function M(e, s) {
|
|
24
|
+
const i = e._observe?.[s.instance.$.uid];
|
|
25
|
+
i && (i.observer.unobserve(e), delete e._observe[s.instance.$.uid]);
|
|
26
|
+
}
|
|
27
|
+
const de = {
|
|
28
|
+
mounted: ce,
|
|
29
|
+
unmounted: M
|
|
30
|
+
};
|
|
31
|
+
function ve(e) {
|
|
32
|
+
return {
|
|
33
|
+
aspectStyles: h(() => {
|
|
34
|
+
const s = Number(e.aspectRatio);
|
|
35
|
+
return s ? {
|
|
36
|
+
paddingBottom: String(1 / s * 100) + "%"
|
|
37
|
+
} : void 0;
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const q = W({
|
|
42
|
+
aspectRatio: [String, Number],
|
|
43
|
+
contentClass: null,
|
|
44
|
+
inline: Boolean,
|
|
45
|
+
...D(),
|
|
46
|
+
...G()
|
|
47
|
+
}, "VResponsive"), F = $()({
|
|
48
|
+
name: "VResponsive",
|
|
49
|
+
props: q(),
|
|
50
|
+
setup(e, s) {
|
|
51
|
+
let {
|
|
52
|
+
slots: i
|
|
53
|
+
} = s;
|
|
54
|
+
const {
|
|
55
|
+
aspectStyles: l
|
|
56
|
+
} = ve(e), {
|
|
57
|
+
dimensionStyles: v
|
|
58
|
+
} = J(e);
|
|
59
|
+
return E(() => n("div", {
|
|
60
|
+
class: ["v-responsive", {
|
|
61
|
+
"v-responsive--inline": e.inline
|
|
62
|
+
}, e.class],
|
|
63
|
+
style: [v.value, e.style]
|
|
64
|
+
}, [n("div", {
|
|
65
|
+
class: "v-responsive__sizer",
|
|
66
|
+
style: l.value
|
|
67
|
+
}, null), i.additional?.(), i.default && n("div", {
|
|
68
|
+
class: ["v-responsive__content", e.contentClass]
|
|
69
|
+
}, [i.default()])])), {};
|
|
70
|
+
}
|
|
71
|
+
}), ge = W({
|
|
72
|
+
alt: String,
|
|
73
|
+
cover: Boolean,
|
|
74
|
+
color: String,
|
|
75
|
+
draggable: {
|
|
76
|
+
type: [Boolean, String],
|
|
77
|
+
default: void 0
|
|
78
|
+
},
|
|
79
|
+
eager: Boolean,
|
|
80
|
+
gradient: String,
|
|
81
|
+
lazySrc: String,
|
|
82
|
+
options: {
|
|
83
|
+
type: Object,
|
|
84
|
+
// For more information on types, navigate to:
|
|
85
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
|
|
86
|
+
default: () => ({
|
|
87
|
+
root: void 0,
|
|
88
|
+
rootMargin: void 0,
|
|
89
|
+
threshold: void 0
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
sizes: String,
|
|
93
|
+
src: {
|
|
94
|
+
type: [String, Object],
|
|
95
|
+
default: ""
|
|
96
|
+
},
|
|
97
|
+
crossorigin: String,
|
|
98
|
+
referrerpolicy: String,
|
|
99
|
+
srcset: String,
|
|
100
|
+
position: String,
|
|
101
|
+
...q(),
|
|
102
|
+
...D(),
|
|
103
|
+
...K(),
|
|
104
|
+
...ue()
|
|
105
|
+
}, "VImg"), Se = $()({
|
|
106
|
+
name: "VImg",
|
|
107
|
+
directives: {
|
|
108
|
+
intersect: de
|
|
109
|
+
},
|
|
110
|
+
props: ge(),
|
|
111
|
+
emits: {
|
|
112
|
+
loadstart: (e) => !0,
|
|
113
|
+
load: (e) => !0,
|
|
114
|
+
error: (e) => !0
|
|
115
|
+
},
|
|
116
|
+
setup(e, s) {
|
|
117
|
+
let {
|
|
118
|
+
emit: i,
|
|
119
|
+
slots: l
|
|
120
|
+
} = s;
|
|
121
|
+
const {
|
|
122
|
+
backgroundColorClasses: v,
|
|
123
|
+
backgroundColorStyles: R
|
|
124
|
+
} = X(Y(e, "color")), {
|
|
125
|
+
roundedClasses: S
|
|
126
|
+
} = Z(e), c = p("VImg"), _ = f(""), r = ee(), a = f(e.eager ? "loading" : "idle"), d = f(), y = f(), o = h(() => e.src && typeof e.src == "object" ? {
|
|
127
|
+
src: e.src.src,
|
|
128
|
+
srcset: e.srcset || e.src.srcset,
|
|
129
|
+
lazySrc: e.lazySrc || e.src.lazySrc,
|
|
130
|
+
aspect: Number(e.aspectRatio || e.src.aspect || 0)
|
|
131
|
+
} : {
|
|
132
|
+
src: e.src,
|
|
133
|
+
srcset: e.srcset,
|
|
134
|
+
lazySrc: e.lazySrc,
|
|
135
|
+
aspect: Number(e.aspectRatio || 0)
|
|
136
|
+
}), g = h(() => o.value.aspect || d.value / y.value || 0);
|
|
137
|
+
C(() => e.src, () => {
|
|
138
|
+
z(a.value !== "idle");
|
|
139
|
+
}), C(g, (t, u) => {
|
|
140
|
+
!t && u && r.value && m(r.value);
|
|
141
|
+
}), te(() => z());
|
|
142
|
+
function z(t) {
|
|
143
|
+
if (!(e.eager && t) && !(O && !t && !e.eager)) {
|
|
144
|
+
if (a.value = "loading", o.value.lazySrc) {
|
|
145
|
+
const u = new Image();
|
|
146
|
+
u.src = o.value.lazySrc, m(u, null);
|
|
147
|
+
}
|
|
148
|
+
o.value.src && ne(() => {
|
|
149
|
+
i("loadstart", r.value?.currentSrc || o.value.src), setTimeout(() => {
|
|
150
|
+
if (!c.isUnmounted)
|
|
151
|
+
if (r.value?.complete) {
|
|
152
|
+
if (r.value.naturalWidth || w(), a.value === "error") return;
|
|
153
|
+
g.value || m(r.value, null), a.value === "loading" && P();
|
|
154
|
+
} else
|
|
155
|
+
g.value || m(r.value), k();
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function P() {
|
|
161
|
+
c.isUnmounted || (k(), m(r.value), a.value = "loaded", i("load", r.value?.currentSrc || o.value.src));
|
|
162
|
+
}
|
|
163
|
+
function w() {
|
|
164
|
+
c.isUnmounted || (a.value = "error", i("error", r.value?.currentSrc || o.value.src));
|
|
165
|
+
}
|
|
166
|
+
function k() {
|
|
167
|
+
const t = r.value;
|
|
168
|
+
t && (_.value = t.currentSrc || t.src);
|
|
169
|
+
}
|
|
170
|
+
let I = -1;
|
|
171
|
+
re(() => {
|
|
172
|
+
clearTimeout(I);
|
|
173
|
+
});
|
|
174
|
+
function m(t) {
|
|
175
|
+
let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 100;
|
|
176
|
+
const B = () => {
|
|
177
|
+
if (clearTimeout(I), c.isUnmounted) return;
|
|
178
|
+
const {
|
|
179
|
+
naturalHeight: j,
|
|
180
|
+
naturalWidth: N
|
|
181
|
+
} = t;
|
|
182
|
+
j || N ? (d.value = N, y.value = j) : !t.complete && a.value === "loading" && u != null ? I = window.setTimeout(B, u) : (t.currentSrc.endsWith(".svg") || t.currentSrc.startsWith("data:image/svg+xml")) && (d.value = 1, y.value = 1);
|
|
183
|
+
};
|
|
184
|
+
B();
|
|
185
|
+
}
|
|
186
|
+
const T = h(() => ({
|
|
187
|
+
"v-img__img--cover": e.cover,
|
|
188
|
+
"v-img__img--contain": !e.cover
|
|
189
|
+
})), x = () => {
|
|
190
|
+
if (!o.value.src || a.value === "idle") return null;
|
|
191
|
+
const t = n("img", {
|
|
192
|
+
class: ["v-img__img", T.value],
|
|
193
|
+
style: {
|
|
194
|
+
objectPosition: e.position
|
|
195
|
+
},
|
|
196
|
+
src: o.value.src,
|
|
197
|
+
srcset: o.value.srcset,
|
|
198
|
+
alt: e.alt,
|
|
199
|
+
crossorigin: e.crossorigin,
|
|
200
|
+
referrerpolicy: e.referrerpolicy,
|
|
201
|
+
draggable: e.draggable,
|
|
202
|
+
sizes: e.sizes,
|
|
203
|
+
ref: r,
|
|
204
|
+
onLoad: P,
|
|
205
|
+
onError: w
|
|
206
|
+
}, null), u = l.sources?.();
|
|
207
|
+
return n(b, {
|
|
208
|
+
transition: e.transition,
|
|
209
|
+
appear: !0
|
|
210
|
+
}, {
|
|
211
|
+
default: () => [U(u ? n("picture", {
|
|
212
|
+
class: "v-img__picture"
|
|
213
|
+
}, [u, t]) : t, [[oe, a.value === "loaded"]])]
|
|
214
|
+
});
|
|
215
|
+
}, A = () => n(b, {
|
|
216
|
+
transition: e.transition
|
|
217
|
+
}, {
|
|
218
|
+
default: () => [o.value.lazySrc && a.value !== "loaded" && n("img", {
|
|
219
|
+
class: ["v-img__img", "v-img__img--preload", T.value],
|
|
220
|
+
style: {
|
|
221
|
+
objectPosition: e.position
|
|
222
|
+
},
|
|
223
|
+
src: o.value.lazySrc,
|
|
224
|
+
alt: e.alt,
|
|
225
|
+
crossorigin: e.crossorigin,
|
|
226
|
+
referrerpolicy: e.referrerpolicy,
|
|
227
|
+
draggable: e.draggable
|
|
228
|
+
}, null)]
|
|
229
|
+
}), H = () => l.placeholder ? n(b, {
|
|
230
|
+
transition: e.transition,
|
|
231
|
+
appear: !0
|
|
232
|
+
}, {
|
|
233
|
+
default: () => [(a.value === "loading" || a.value === "error" && !l.error) && n("div", {
|
|
234
|
+
class: "v-img__placeholder"
|
|
235
|
+
}, [l.placeholder()])]
|
|
236
|
+
}) : null, L = () => l.error ? n(b, {
|
|
237
|
+
transition: e.transition,
|
|
238
|
+
appear: !0
|
|
239
|
+
}, {
|
|
240
|
+
default: () => [a.value === "error" && n("div", {
|
|
241
|
+
class: "v-img__error"
|
|
242
|
+
}, [l.error()])]
|
|
243
|
+
}) : null, Q = () => e.gradient ? n("div", {
|
|
244
|
+
class: "v-img__gradient",
|
|
245
|
+
style: {
|
|
246
|
+
backgroundImage: `linear-gradient(${e.gradient})`
|
|
247
|
+
}
|
|
248
|
+
}, null) : null, V = f(!1);
|
|
249
|
+
{
|
|
250
|
+
const t = C(g, (u) => {
|
|
251
|
+
u && (requestAnimationFrame(() => {
|
|
252
|
+
requestAnimationFrame(() => {
|
|
253
|
+
V.value = !0;
|
|
254
|
+
});
|
|
255
|
+
}), t());
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return E(() => {
|
|
259
|
+
const t = F.filterProps(e);
|
|
260
|
+
return U(n(F, ie({
|
|
261
|
+
class: ["v-img", {
|
|
262
|
+
"v-img--booting": !V.value
|
|
263
|
+
}, v.value, S.value, e.class],
|
|
264
|
+
style: [{
|
|
265
|
+
width: le(e.width === "auto" ? d.value : e.width)
|
|
266
|
+
}, R.value, e.style]
|
|
267
|
+
}, t, {
|
|
268
|
+
aspectRatio: g.value,
|
|
269
|
+
"aria-label": e.alt,
|
|
270
|
+
role: e.alt ? "img" : void 0
|
|
271
|
+
}), {
|
|
272
|
+
additional: () => n(se, null, [n(x, null, null), n(A, null, null), n(Q, null, null), n(H, null, null), n(L, null, null)]),
|
|
273
|
+
default: l.default
|
|
274
|
+
}), [[ae("intersect"), {
|
|
275
|
+
handler: z,
|
|
276
|
+
options: e.options
|
|
277
|
+
}, null, {
|
|
278
|
+
once: !0
|
|
279
|
+
}]]);
|
|
280
|
+
}), {
|
|
281
|
+
currentSrc: _,
|
|
282
|
+
image: r,
|
|
283
|
+
state: a,
|
|
284
|
+
naturalWidth: d,
|
|
285
|
+
naturalHeight: y
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
export {
|
|
290
|
+
Se as V
|
|
291
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as i, e as m, ac as c, f as u, g as d, ad as y, Y as v, a as f, b as e } from "./asWebComponent-
|
|
2
|
-
import { u as V } from "./ssrBoot-
|
|
1
|
+
import { p as i, e as m, ac as c, f as u, g as d, ad as y, Y as v, a as f, b as e } from "./asWebComponent-DeaU3QoK.js";
|
|
2
|
+
import { u as V } from "./ssrBoot-C-inWOiD.js";
|
|
3
3
|
const b = i({
|
|
4
4
|
scrollable: Boolean,
|
|
5
5
|
...m(),
|