@eodash/eodash 5.0.0-alpha.2.8 → 5.0.0-processing

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.
Files changed (138) hide show
  1. package/README.md +1 -1
  2. package/core/client/App.vue +13 -1
  3. package/core/client/asWebComponent.js +13 -3
  4. package/core/client/components/DashboardLayout.vue +6 -2
  5. package/core/client/composables/DefineEodash.js +1 -1
  6. package/core/client/composables/EodashMap.js +349 -0
  7. package/core/client/composables/EodashProcess.js +575 -0
  8. package/core/client/composables/index.js +107 -24
  9. package/core/client/eodash.js +83 -10
  10. package/core/client/plugins/axios.js +8 -0
  11. package/core/client/plugins/index.js +2 -1
  12. package/core/client/store/Actions.js +63 -12
  13. package/core/client/store/States.js +19 -0
  14. package/core/client/store/stac.js +98 -8
  15. package/core/client/types.d.ts +25 -18
  16. package/core/client/utils/createLayers.js +313 -0
  17. package/core/client/utils/eodashSTAC.js +320 -170
  18. package/core/client/utils/helpers.js +369 -9
  19. package/core/client/utils/keys.js +2 -0
  20. package/core/client/utils/states.js +17 -0
  21. package/core/client/views/Dashboard.vue +17 -46
  22. package/core/client/vite-env.d.ts +1 -9
  23. package/dist/client/DashboardLayout-CVMJ4l8M.js +87 -0
  24. package/dist/client/DynamicWebComponent-Cv8n457T.js +88 -0
  25. package/dist/client/EodashDatePicker-VVkiPmpc.js +394 -0
  26. package/dist/client/EodashItemFilter-CugWNQ86.js +194 -0
  27. package/dist/client/EodashLayerControl-53WghA8G.js +110 -0
  28. package/dist/client/EodashMap-CQnOePpy.js +486 -0
  29. package/dist/client/EodashMapBtns-uaRwFtfB.js +66 -0
  30. package/dist/client/EodashProcess-cF0unIy8.js +1477 -0
  31. package/dist/client/ExportState-BT8MLAW7.js +644 -0
  32. package/dist/client/Footer-C6GUG84G.js +141 -0
  33. package/dist/client/Header-D2dtCWp8.js +437 -0
  34. package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
  35. package/dist/client/MobileLayout-BAo8Wr8T.js +1210 -0
  36. package/dist/client/PopUp-Bm01q7Ko.js +389 -0
  37. package/dist/client/VImg-B8AbetCE.js +384 -0
  38. package/dist/client/VMain-DnGlQUyr.js +43 -0
  39. package/dist/client/VOverlay-B8Qj7LRG.js +1453 -0
  40. package/dist/client/WidgetsContainer-CwXRRLS1.js +83 -0
  41. package/dist/client/asWebComponent-DUUoR7MZ.js +11621 -0
  42. package/dist/client/eo-dash.js +2 -6
  43. package/dist/client/forwardRefs-CZJhEAKW.js +245 -0
  44. package/dist/client/index-DlIO7sJ3.js +199 -0
  45. package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
  46. package/dist/client/style.css +2 -2
  47. package/dist/client/transition-BiR8wMn1.js +37 -0
  48. package/dist/node/cli.js +4 -4
  49. package/dist/node/types.d.ts +2 -0
  50. package/dist/types/core/client/App.vue.d.ts +7 -0
  51. package/dist/types/core/client/asWebComponent.d.ts +9 -0
  52. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +2 -0
  53. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +18 -0
  54. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +2 -0
  55. package/dist/types/core/client/components/Footer.vue.d.ts +2 -0
  56. package/dist/types/core/client/components/Header.vue.d.ts +2 -0
  57. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +7 -0
  58. package/dist/types/core/client/components/Loading.vue.d.ts +2 -0
  59. package/dist/types/core/client/components/MobileLayout.vue.d.ts +2 -0
  60. package/dist/types/core/client/composables/DefineEodash.d.ts +2 -0
  61. package/dist/types/core/client/composables/DefineTemplate.d.ts +15 -0
  62. package/dist/types/core/client/composables/DefineWidgets.d.ts +14 -0
  63. package/dist/types/core/client/composables/EodashMap.d.ts +5 -0
  64. package/dist/types/core/client/composables/index.d.ts +30 -0
  65. package/dist/types/core/client/eodash.d.ts +8 -0
  66. package/dist/types/core/client/main.d.ts +2 -0
  67. package/dist/types/core/client/plugins/axios.d.ts +2 -0
  68. package/dist/types/core/client/plugins/index.d.ts +3 -0
  69. package/dist/types/core/client/plugins/vuetify.d.ts +82 -0
  70. package/dist/types/core/client/render.d.ts +1 -0
  71. package/dist/types/core/client/store/Actions.d.ts +12 -0
  72. package/dist/types/core/client/store/States.d.ts +22 -0
  73. package/dist/types/core/client/store/index.d.ts +2 -0
  74. package/dist/types/core/client/store/stac.d.ts +25 -0
  75. package/dist/types/core/client/types.d.ts +279 -0
  76. package/dist/types/core/client/utils/createLayers.d.ts +45 -0
  77. package/dist/types/core/client/utils/eodashSTAC.d.ts +82 -0
  78. package/dist/types/core/client/utils/helpers.d.ts +84 -0
  79. package/dist/types/core/client/utils/index.d.ts +2 -0
  80. package/dist/types/core/client/utils/keys.d.ts +6 -0
  81. package/dist/types/core/client/utils/states.d.ts +14 -0
  82. package/dist/types/core/client/views/Dashboard.vue.d.ts +9 -0
  83. package/dist/types/widgets/EodashDatePicker.vue.d.ts +7 -0
  84. package/dist/types/widgets/EodashItemFilter.vue.d.ts +42 -0
  85. package/dist/types/widgets/EodashLayerControl.vue.d.ts +11 -0
  86. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +9 -0
  87. package/dist/types/widgets/EodashMap.vue.d.ts +7 -0
  88. package/dist/types/widgets/EodashMapBtns.vue.d.ts +11 -0
  89. package/dist/types/widgets/EodashStacInfo.vue.d.ts +21 -0
  90. package/dist/types/widgets/EodashTools.vue.d.ts +15 -0
  91. package/dist/types/widgets/ExportState.vue.d.ts +7 -0
  92. package/dist/types/widgets/PopUp.vue.d.ts +22 -0
  93. package/dist/types/widgets/WidgetsContainer.vue.d.ts +7 -0
  94. package/package.json +58 -37
  95. package/widgets/EodashDatePicker.vue +128 -100
  96. package/widgets/EodashItemFilter.vue +149 -47
  97. package/widgets/EodashLayerControl.vue +98 -0
  98. package/widgets/EodashMap.vue +98 -122
  99. package/widgets/EodashMapBtns.vue +24 -7
  100. package/widgets/EodashProcess.vue +151 -0
  101. package/widgets/ExportState.vue +15 -11
  102. package/core/client/SuspensedDashboard.ce.vue +0 -105
  103. package/dist/client/DashboardLayout-CKOExc7r.js +0 -156
  104. package/dist/client/DynamicWebComponent-m1Zbbw6n.js +0 -57
  105. package/dist/client/EodashDatePicker-CGdJRGZJ.js +0 -252
  106. package/dist/client/EodashItemFilter-BjM_LHaE.js +0 -63
  107. package/dist/client/EodashMap-61UMC8sv.js +0 -86917
  108. package/dist/client/EodashMapBtns-DVITfAFx.js +0 -36
  109. package/dist/client/ExportState-DhpK09GR.js +0 -558
  110. package/dist/client/Footer-CIwjaddz.js +0 -115
  111. package/dist/client/Header-BcM-pZFi.js +0 -350
  112. package/dist/client/IframeWrapper-CAe6HPqe.js +0 -19
  113. package/dist/client/MobileLayout-DcZOQX8r.js +0 -945
  114. package/dist/client/PopUp-DCaITceG.js +0 -300
  115. package/dist/client/VImg-C-I_7puM.js +0 -291
  116. package/dist/client/VMain-Cd3P0YTG.js +0 -39
  117. package/dist/client/VOverlay-AcvFgk39.js +0 -967
  118. package/dist/client/WidgetsContainer-B0-q0EMO.js +0 -129
  119. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  120. package/dist/client/asWebComponent-zuKR9I1w.js +0 -20361
  121. package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
  122. package/dist/client/decoder-CP4lv0Kb-DdKalImK.js +0 -10
  123. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
  124. package/dist/client/eodashSTAC-DGB50vNk.js +0 -2788
  125. package/dist/client/eox-itemfilter-TaBxgqq_.js +0 -7565
  126. package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
  127. package/dist/client/forwardRefs-BnxE4iKQ.js +0 -185
  128. package/dist/client/index-hSIi5Ygk.js +0 -153
  129. package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
  130. package/dist/client/lerc-DzVumYtB-cTUap6k_.js +0 -1027
  131. package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
  132. package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
  133. package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
  134. package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
  135. package/dist/client/ssrBoot-D3KF5Thc.js +0 -17
  136. package/dist/client/transition-D3a4tiJv.js +0 -34
  137. package/dist/client/webfontloader-qotgY98I.js +0 -435
  138. package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
@@ -1,300 +0,0 @@
1
- import { g as E, 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 T, D as q, ak as I, N, ae as U, e as W, ac as j, af as X, aU as Y, aV as z, ag as H, f as Q, h as Z, i as G, Q as J, R as K, ah as _, ad as ee, ai as te, aZ as ae, a_ as oe, aj as se, b1 as ne, b2 as re, X as ie, $ as P, a6 as k, a1 as S, a0 as le, a3 as V, a4 as ce, a5 as C, bd as ue } from "./asWebComponent-zuKR9I1w.js";
2
- import { m as de, V as B } from "./VOverlay-AcvFgk39.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-BnxE4iKQ.js";
4
- const ye = b({
5
- target: [Object, Array]
6
- }, "v-dialog-transition"), Pe = E()({
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
- } = L(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
- A(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
- } = L(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()), A(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 A(e) {
91
- const i = e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")?.children;
92
- return i && [...i];
93
- }
94
- function L(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 Ve = 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"), Ee = E()({
125
- name: "VDialog",
126
- props: Ve(),
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
- }), T(() => {
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
- ...U(),
208
- ...W(),
209
- ...j(),
210
- ...X(),
211
- ...Y(),
212
- ...z(),
213
- ...H(),
214
- ...Q(),
215
- ...Z()
216
- }, "VSheet"), we = E()({
217
- name: "VSheet",
218
- props: be(),
219
- setup(e, i) {
220
- let {
221
- slots: o
222
- } = i;
223
- const {
224
- themeClasses: r
225
- } = G(e), {
226
- backgroundColorClasses: t,
227
- backgroundColorStyles: c
228
- } = J(K(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 T(() => 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(Ee, {
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(V(r).component),
277
- h({
278
- key: V(r).id
279
- }, V(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
- };
@@ -1,291 +0,0 @@
1
- import { b8 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, b9 as p, s as f, r as ee, w as C, ba 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-zuKR9I1w.js";
2
- import { m as ue, M as b } from "./transition-D3a4tiJv.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,39 +0,0 @@
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-zuKR9I1w.js";
2
- import { u as V } from "./ssrBoot-D3KF5Thc.js";
3
- const b = i({
4
- scrollable: Boolean,
5
- ...m(),
6
- ...c(),
7
- ...u({
8
- tag: "main"
9
- })
10
- }, "VMain"), k = d()({
11
- name: "VMain",
12
- props: b(),
13
- setup(a, o) {
14
- let {
15
- slots: s
16
- } = o;
17
- const {
18
- dimensionStyles: l
19
- } = y(a), {
20
- mainStyles: t,
21
- layoutIsReady: n
22
- } = v(), {
23
- ssrBootStyles: r
24
- } = V();
25
- return f(() => e(a.tag, {
26
- class: ["v-main", {
27
- "v-main--scrollable": a.scrollable
28
- }, a.class],
29
- style: [t.value, r.value, l.value, a.style]
30
- }, {
31
- default: () => [a.scrollable ? e("div", {
32
- class: "v-main__scroller"
33
- }, [s.default?.()]) : s.default?.()]
34
- })), n;
35
- }
36
- });
37
- export {
38
- k as V
39
- };