@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1399.g35c3eb9f
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/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
- package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-CQNxPvZt.js} +1 -1
- package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
- package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-DbkBb47d.js} +1 -1
- package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-Ba-_lUCj.js} +2 -2
- package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
- package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
- package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-BsJGdnP2.js} +7 -7
- package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
- package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-CJbZbXds.js} +3 -3
- package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-sY8nI3Lv.js} +1 -1
- package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-Wea3YvTU.js} +9997 -9276
- package/dist/{PreviewError-EeaGx3SL.js → PreviewError-BzUvwX47.js} +329 -290
- package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CwOJqQSn.js} +1 -1
- package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
- package/dist/Tile-DfivRbb3.js +479 -0
- package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
- package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
- package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
- package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-xXdnrUCW.js} +2 -2
- package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +11889 -10504
- package/dist/components.css +2 -2
- package/dist/{france-BtSQqcqV.js → france-BYzDEL-I.js} +23 -23
- package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
- package/dist/purify.es-D-UgLNEK.js +848 -0
- package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
- package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
- package/package.json +18 -18
- package/src/components/AccessTypeBadge.vue +46 -0
- package/src/components/Badge.vue +74 -0
- package/src/components/ChartBadge.vue +17 -0
- package/src/components/ChartCard.vue +4 -17
- package/src/components/DataserviceBadge.vue +17 -0
- package/src/components/DataserviceCard.vue +12 -31
- package/src/components/DatasetBadge.vue +17 -0
- package/src/components/DatasetCard.vue +11 -15
- package/src/components/DatasetInformation/DatasetInformationSection.vue +3 -7
- package/src/components/DatasetInformation/DatasetSchemaSection.vue +1 -4
- package/src/components/DatasetLabelTag.vue +4 -15
- package/src/components/Form/SelectGroup.vue +0 -2
- package/src/components/LicenseBadge.vue +7 -12
- package/src/components/ObjectStatusBadge.vue +47 -0
- package/src/components/OrganizationBadge.vue +24 -0
- package/src/components/OrganizationTypeBadge.vue +5 -4
- package/src/components/ResourceAccordion/SchemaBadge.vue +6 -2
- package/src/components/ReuseBadge.vue +17 -0
- package/src/components/ReuseCard.vue +5 -20
- package/src/components/SchemaCard.vue +1 -5
- package/src/components/StatBox.vue +5 -3
- package/src/components/Tag.vue +61 -15
- package/src/functions/objectStatus.ts +34 -0
- package/src/main.ts +25 -3
- package/src/types/ui.ts +2 -0
- package/dist/Tile-Bu5lF4M5.js +0 -463
- package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
- package/dist/purify.es-eElsWhh7.js +0 -876
- package/src/components/ObjectCardBadge.vue +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, i as r, l as i, s as a, t as o, u as s } from "./Tile-
|
|
2
|
-
import { c, l, s as u, w as d } from "./Image-
|
|
3
|
-
import { B as f,
|
|
4
|
-
import { S as k, g as re } from "./transform-
|
|
1
|
+
import { c as e, d as t, f as n, i as r, l as i, s as a, t as o, u as s } from "./Tile-DfivRbb3.js";
|
|
2
|
+
import { c, l, s as u, w as d } from "./Image-umPJvSA8.js";
|
|
3
|
+
import { B as f, Dt as p, H as m, O as h, Ut as ee, V as g, W as _, Xt as v, Yt as te, ct as y, f as b, in as x, kt as S, rn as C, rt as w, s as T, sn as E, wt as D, xt as O, zt as ne } from "./proj-0ED4AWuV.js";
|
|
4
|
+
import { S as k, g as re } from "./transform-bRfffInI.js";
|
|
5
5
|
// ../node_modules/ol/tilegrid/TileGrid.js
|
|
6
6
|
var A = [
|
|
7
7
|
0,
|
|
@@ -10,7 +10,7 @@ var A = [
|
|
|
10
10
|
], j = 5, M = class {
|
|
11
11
|
constructor(e) {
|
|
12
12
|
let n = e.minZoom, r = e.resolutions;
|
|
13
|
-
n === void 0 && r && (n = r.findIndex((e) => e !== void 0)), this.minZoom = n === void 0 ? 0 : n, this.resolutions_ = r, k(
|
|
13
|
+
n === void 0 && r && (n = r.findIndex((e) => e !== void 0)), this.minZoom = n === void 0 ? 0 : n, this.resolutions_ = r, k(C(this.resolutions_, (e, t) => t - e, !0), "`resolutions` must be sorted in descending order");
|
|
14
14
|
let i;
|
|
15
15
|
if (!e.origins) {
|
|
16
16
|
for (let e = 0, t = this.resolutions_.length - 1; e < t; ++e) if (!i) i = this.resolutions_[e] / this.resolutions_[e + 1];
|
|
@@ -21,7 +21,7 @@ var A = [
|
|
|
21
21
|
}
|
|
22
22
|
this.zoomFactor_ = i, this.maxZoom = this.resolutions_.length - 1, this.origin_ = e.origin === void 0 ? null : e.origin, this.origins_ = null, e.origins !== void 0 && (this.origins_ = e.origins, k(this.origins_.length == this.resolutions_.length, "Number of `origins` and `resolutions` must be equal"));
|
|
23
23
|
let a = e.extent;
|
|
24
|
-
a !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ =
|
|
24
|
+
a !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = p(a)), k(!this.origin_ && this.origins_ || this.origin_ && !this.origins_, "Either `origin` or `origins` must be configured, never both"), this.tileSizes_ = null, e.tileSizes !== void 0 && (this.tileSizes_ = e.tileSizes, k(this.tileSizes_.length == this.resolutions_.length, "Number of `tileSizes` and `resolutions` must be equal")), this.tileSize_ = e.tileSize === void 0 ? this.tileSizes_ ? null : 256 : e.tileSize, k(!this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, "Either `tileSize` or `tileSizes` must be configured, never both"), this.extent_ = a === void 0 ? null : a, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [
|
|
25
25
|
0,
|
|
26
26
|
0,
|
|
27
27
|
0,
|
|
@@ -61,7 +61,7 @@ var A = [
|
|
|
61
61
|
return this.minZoom;
|
|
62
62
|
}
|
|
63
63
|
getOrigin(e) {
|
|
64
|
-
return this.origin_ ? this.origin_ : this.origins_[e];
|
|
64
|
+
return this.origin_ ? this.origin_ : this.origins_ ? this.origins_[e] : [0, 0];
|
|
65
65
|
}
|
|
66
66
|
getOrigins() {
|
|
67
67
|
return this.origins_;
|
|
@@ -86,7 +86,7 @@ var A = [
|
|
|
86
86
|
getTileRangeForTileCoordAndZ(e, t, r) {
|
|
87
87
|
if (t > this.maxZoom || t < this.minZoom) return null;
|
|
88
88
|
let i = e[0], a = e[1], o = e[2];
|
|
89
|
-
if (t === i) return n(a,
|
|
89
|
+
if (t === i) return n(a, a, o, o, r);
|
|
90
90
|
if (this.zoomFactor_) {
|
|
91
91
|
let e = this.zoomFactor_ ** +(t - i), s = Math.floor(a * e), c = Math.floor(o * e);
|
|
92
92
|
if (t < i) return n(s, s, c, c, r);
|
|
@@ -109,18 +109,18 @@ var A = [
|
|
|
109
109
|
}
|
|
110
110
|
getTileCoordExtent(e, t) {
|
|
111
111
|
let n = this.getOrigin(e[0]), r = this.getResolution(e[0]), i = c(this.getTileSize(e[0]), this.tmpSize_), a = n[0] + e[1] * i[0] * r, o = n[1] - (e[2] + 1) * i[1] * r, s = a + i[0] * r, l = o + i[1] * r;
|
|
112
|
-
return
|
|
112
|
+
return y(a, o, s, l, t);
|
|
113
113
|
}
|
|
114
114
|
getTileCoordForCoordAndResolution(e, t, n) {
|
|
115
115
|
return this.getTileCoordForXYAndResolution_(e[0], e[1], t, !1, n);
|
|
116
116
|
}
|
|
117
117
|
getTileCoordForXYAndResolution_(e, t, n, r, i) {
|
|
118
|
-
let o = this.getZForResolution(n), s = n / this.getResolution(o), l = this.getOrigin(o), u = c(this.getTileSize(o), this.tmpSize_), d = s * (e - l[0]) / n / u[0],
|
|
119
|
-
return r ? (d =
|
|
118
|
+
let o = this.getZForResolution(n), s = n / this.getResolution(o), l = this.getOrigin(o), u = c(this.getTileSize(o), this.tmpSize_), d = s * (e - l[0]) / n / u[0], p = s * (l[1] - t) / n / u[1];
|
|
119
|
+
return r ? (d = f(d, j) - 1, p = f(p, j) - 1) : (d = m(d, j), p = m(p, j)), a(o, d, p, i);
|
|
120
120
|
}
|
|
121
121
|
getTileCoordForXYAndZ_(e, t, n, r, i) {
|
|
122
122
|
let o = this.getOrigin(n), s = this.getResolution(n), l = c(this.getTileSize(n), this.tmpSize_), u = (e - o[0]) / s / l[0], d = (o[1] - t) / s / l[1];
|
|
123
|
-
return r ? (u =
|
|
123
|
+
return r ? (u = f(u, j) - 1, d = f(d, j) - 1) : (u = m(u, j), d = m(d, j)), a(n, u, d, i);
|
|
124
124
|
}
|
|
125
125
|
getTileCoordForCoordAndZ(e, t, n) {
|
|
126
126
|
return this.getTileCoordForXYAndZ_(e[0], e[1], t, !1, n);
|
|
@@ -129,14 +129,14 @@ var A = [
|
|
|
129
129
|
return this.resolutions_[e[0]];
|
|
130
130
|
}
|
|
131
131
|
getTileSize(e) {
|
|
132
|
-
return this.tileSize_ ? this.tileSize_ : this.tileSizes_[e];
|
|
132
|
+
return this.tileSize_ ? this.tileSize_ : this.tileSizes_ ? this.tileSizes_[e] : 256;
|
|
133
133
|
}
|
|
134
134
|
getFullTileRange(e) {
|
|
135
135
|
return this.fullTileRanges_ ? this.fullTileRanges_[e] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, e) : null;
|
|
136
136
|
}
|
|
137
137
|
getZForResolution(e, t) {
|
|
138
|
-
let n =
|
|
139
|
-
return
|
|
138
|
+
let n = x(this.resolutions_, e, t || 0);
|
|
139
|
+
return g(n, this.minZoom, this.maxZoom);
|
|
140
140
|
}
|
|
141
141
|
tileCoordIntersectsViewport(e, t) {
|
|
142
142
|
return re(t, 0, t.length, 2, this.getTileCoordExtent(e));
|
|
@@ -154,8 +154,8 @@ function N(e) {
|
|
|
154
154
|
}
|
|
155
155
|
function P(e, t, n) {
|
|
156
156
|
let r = t[0], i = e.getTileCoordCenter(t), a = z(n);
|
|
157
|
-
if (!
|
|
158
|
-
let t =
|
|
157
|
+
if (!w(a, i)) {
|
|
158
|
+
let t = S(a), n = Math.ceil((a[0] - i[0]) / t);
|
|
159
159
|
return i[0] += t * n, e.getTileCoordForCoordAndZ(i, r);
|
|
160
160
|
}
|
|
161
161
|
return t;
|
|
@@ -165,13 +165,14 @@ function F(e, t, n, r) {
|
|
|
165
165
|
let i = L(e, t, n);
|
|
166
166
|
return new M({
|
|
167
167
|
extent: e,
|
|
168
|
-
origin:
|
|
168
|
+
origin: O(e, r),
|
|
169
169
|
resolutions: i,
|
|
170
170
|
tileSize: n
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
function I(e) {
|
|
174
|
-
let t = e || {}, n = t.extent ||
|
|
174
|
+
let t = e || {}, n = t.extent || b("EPSG:3857")?.getExtent();
|
|
175
|
+
if (!n) throw Error("Unable to determine extent for XYZ tile grid");
|
|
175
176
|
return new M({
|
|
176
177
|
extent: n,
|
|
177
178
|
minZoom: t.minZoom,
|
|
@@ -181,8 +182,8 @@ function I(e) {
|
|
|
181
182
|
}
|
|
182
183
|
function L(e, t, n, r) {
|
|
183
184
|
t = t === void 0 ? 42 : t, n = c(n === void 0 ? 256 : n);
|
|
184
|
-
let i =
|
|
185
|
-
r = r > 0 ? r : Math.max(a / n[0], i / n[1]);
|
|
185
|
+
let i = D(e), a = S(e);
|
|
186
|
+
r = r !== void 0 && r > 0 ? r : Math.max(a / n[0], i / n[1]);
|
|
186
187
|
let o = t + 1, s = Array(o);
|
|
187
188
|
for (let e = 0; e < o; ++e) s[e] = r / 2 ** e;
|
|
188
189
|
return s;
|
|
@@ -191,13 +192,16 @@ function R(e, t, n, r) {
|
|
|
191
192
|
return F(z(e), t, n, r);
|
|
192
193
|
}
|
|
193
194
|
function z(e) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
let t = b(e);
|
|
196
|
+
if (!t) throw Error("Unable to determine extent from unknown projection");
|
|
197
|
+
let n = t.getExtent();
|
|
198
|
+
if (!n) {
|
|
199
|
+
let e = t.getMetersPerUnit();
|
|
200
|
+
if (e === void 0) throw Error("Unable to determine extent from projection without units");
|
|
201
|
+
let r = 180 * h.degrees / e;
|
|
202
|
+
n = y(-r, -r, r, r);
|
|
203
|
+
}
|
|
204
|
+
return n;
|
|
201
205
|
}
|
|
202
206
|
// ../node_modules/ol/uri.js
|
|
203
207
|
function B(e, t) {
|
|
@@ -250,13 +254,13 @@ function Y(e) {
|
|
|
250
254
|
return e.length === 1 ? e[0] : (function(t, n, r) {
|
|
251
255
|
if (!t) return;
|
|
252
256
|
let a = i(t);
|
|
253
|
-
return e[
|
|
257
|
+
return e[_(a, e.length)](t, n, r);
|
|
254
258
|
});
|
|
255
259
|
}
|
|
256
260
|
// ../node_modules/ol/source/Source.js
|
|
257
|
-
var X = class extends
|
|
261
|
+
var X = class extends ne {
|
|
258
262
|
constructor(e) {
|
|
259
|
-
super(), this.projection =
|
|
263
|
+
super(), this.projection = b(e.projection), this.attributions_ = Z(e.attributions), this.attributionsCollapsible_ = e.attributionsCollapsible ?? !0, this.loading = !1, this.canRotate = !1, this.state_ = e.state === void 0 ? "ready" : e.state, this.wrapX_ = e.wrapX !== void 0 && e.wrapX, this.interpolate_ = !!e.interpolate, this.viewResolver = null, this.viewRejector = null;
|
|
260
264
|
let t = this;
|
|
261
265
|
this.viewPromise_ = new Promise(function(e, n) {
|
|
262
266
|
t.viewResolver = e, t.viewRejector = n;
|
|
@@ -319,7 +323,7 @@ var ie = class extends X {
|
|
|
319
323
|
state: e.state,
|
|
320
324
|
wrapX: e.wrapX,
|
|
321
325
|
interpolate: e.interpolate
|
|
322
|
-
}), this.on, this.once, this.un, this.tilePixelRatio_ = e.tilePixelRatio === void 0 ? 1 : e.tilePixelRatio, this.tileGrid = e.tileGrid === void 0 ? null : e.tileGrid, this.tileGrid && c(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), [256, 256]), this.tmpSize = [0, 0], this.key_ = e.key ||
|
|
326
|
+
}), this.on, this.once, this.un, this.tilePixelRatio_ = e.tilePixelRatio === void 0 ? 1 : e.tilePixelRatio, this.tileGrid = e.tileGrid === void 0 ? null : e.tileGrid, this.tileGrid && c(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), [256, 256]), this.tmpSize = [0, 0], this.key_ = e.key || v(this), this.tileOptions = {
|
|
323
327
|
transition: e.transition,
|
|
324
328
|
interpolate: e.interpolate
|
|
325
329
|
}, this.zDirection = e.zDirection ? e.zDirection : 0;
|
|
@@ -338,7 +342,7 @@ var ie = class extends X {
|
|
|
338
342
|
return t ? t.getResolutions() : null;
|
|
339
343
|
}
|
|
340
344
|
getTile(e, t, n, r, i, a) {
|
|
341
|
-
return
|
|
345
|
+
return te();
|
|
342
346
|
}
|
|
343
347
|
getTileGrid() {
|
|
344
348
|
return this.tileGrid;
|
|
@@ -361,7 +365,7 @@ var ie = class extends X {
|
|
|
361
365
|
refresh() {
|
|
362
366
|
this.clear(), super.refresh();
|
|
363
367
|
}
|
|
364
|
-
}, ae = class extends
|
|
368
|
+
}, ae = class extends ee {
|
|
365
369
|
constructor(e, t) {
|
|
366
370
|
super(e), this.tile = t;
|
|
367
371
|
}
|
|
@@ -396,7 +400,7 @@ var ie = class extends X {
|
|
|
396
400
|
return this.urls;
|
|
397
401
|
}
|
|
398
402
|
handleTileChange(e) {
|
|
399
|
-
let t = e.target, n =
|
|
403
|
+
let t = e.target, n = v(t), r = t.getState(), i;
|
|
400
404
|
r == l.LOADING ? (this.tileLoadingKeys_[n] = !0, i = Q.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], i = r == l.ERROR ? Q.TILELOADERROR : r == l.LOADED ? Q.TILELOADEND : void 0), i != null && this.dispatchEvent(new ae(i, t));
|
|
401
405
|
}
|
|
402
406
|
setTileLoadFunction(e) {
|
|
@@ -437,7 +441,8 @@ var ie = class extends X {
|
|
|
437
441
|
}), this.crossOrigin = e.crossOrigin === void 0 ? null : e.crossOrigin, this.referrerPolicy = e.referrerPolicy, this.tileClass = e.tileClass === void 0 ? r : e.tileClass, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = e.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1;
|
|
438
442
|
}
|
|
439
443
|
getGutterForProjection(e) {
|
|
440
|
-
|
|
444
|
+
let t = this.getProjection();
|
|
445
|
+
return t && e && !T(t, e) ? 0 : this.getGutter();
|
|
441
446
|
}
|
|
442
447
|
getGutter() {
|
|
443
448
|
return 0;
|
|
@@ -448,8 +453,8 @@ var ie = class extends X {
|
|
|
448
453
|
}
|
|
449
454
|
getTileGridForProjection(e) {
|
|
450
455
|
let t = this.getProjection();
|
|
451
|
-
if (this.tileGrid && (!t ||
|
|
452
|
-
let n =
|
|
456
|
+
if (this.tileGrid && (!t || T(t, e))) return this.tileGrid;
|
|
457
|
+
let n = v(e);
|
|
453
458
|
return n in this.tileGridForProjection || (this.tileGridForProjection[n] = N(e)), this.tileGridForProjection[n];
|
|
454
459
|
}
|
|
455
460
|
createTile_(e, t, n, r, i, a) {
|
|
@@ -461,16 +466,16 @@ var ie = class extends X {
|
|
|
461
466
|
crossOrigin: this.crossOrigin,
|
|
462
467
|
referrerPolicy: this.referrerPolicy
|
|
463
468
|
}, this.tileLoadFunction, this.tileOptions);
|
|
464
|
-
return u.key = a, u.addEventListener(
|
|
469
|
+
return u.key = a, u.addEventListener(E.CHANGE, this.handleTileChange.bind(this)), u;
|
|
465
470
|
}
|
|
466
471
|
getTile(e, t, n, r, i, a) {
|
|
467
472
|
let s = this.getProjection();
|
|
468
|
-
if (!s || !i ||
|
|
473
|
+
if (!s || !i || T(s, i)) return this.getTileInternal(e, t, n, r, s || i);
|
|
469
474
|
let c = [
|
|
470
475
|
e,
|
|
471
476
|
t,
|
|
472
477
|
n
|
|
473
|
-
], l = this.getKey(), u = this.getTileGridForProjection(s), d = this.getTileGridForProjection(i), f = this.getTileCoordForTileUrlFunction(c, i), p = new o(s, u, i, d, c, f, this.getTilePixelRatio(r), this.getGutter(), (e, t, n, r) => this.getTileInternal(e, t, n, r, s, a), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.tileOptions);
|
|
478
|
+
], l = this.getKey(), u = this.getTileGridForProjection(s), d = this.getTileGridForProjection(i), f = this.getTileCoordForTileUrlFunction(c, i) || c, p = new o(s, u, i, d, c, f, this.getTilePixelRatio(r), this.getGutter(), (e, t, n, r) => this.getTileInternal(e, t, n, r, s, a), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.tileOptions);
|
|
474
479
|
return p.key = l, p;
|
|
475
480
|
}
|
|
476
481
|
getTileInternal(t, n, r, i, a, o) {
|
|
@@ -483,9 +488,9 @@ var ie = class extends X {
|
|
|
483
488
|
this.renderReprojectionEdges_ != e && (this.renderReprojectionEdges_ = e, this.changed());
|
|
484
489
|
}
|
|
485
490
|
setTileGridForProjection(e, t) {
|
|
486
|
-
let n =
|
|
491
|
+
let n = b(e);
|
|
487
492
|
if (n) {
|
|
488
|
-
let e =
|
|
493
|
+
let e = v(n);
|
|
489
494
|
e in this.tileGridForProjection || (this.tileGridForProjection[e] = t);
|
|
490
495
|
}
|
|
491
496
|
}
|
|
@@ -504,9 +509,12 @@ function se(e, t) {
|
|
|
504
509
|
return e.blob();
|
|
505
510
|
}).then((e) => createImageBitmap(e)).then((t) => {
|
|
506
511
|
let n = e.getImage();
|
|
507
|
-
|
|
512
|
+
if (!n) return;
|
|
513
|
+
n.width = t.width, n.height = t.height;
|
|
514
|
+
let r = n.getContext("2d");
|
|
515
|
+
r && (r.drawImage(t, 0, 0), t.close?.(), n.dispatchEvent(new Event("load")));
|
|
508
516
|
}).catch(() => {
|
|
509
|
-
e.getImage()
|
|
517
|
+
e.getImage()?.dispatchEvent(new Event("error"));
|
|
510
518
|
});
|
|
511
519
|
} else e.getImage().src = t;
|
|
512
520
|
}
|