@datagouv/components-next 1.4.1-dev.1374.g4dfe0257 → 1.4.1-dev.1376.g1ed2bc83

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 (41) hide show
  1. package/dist/{Control-CeBb5PEu.js → Control-DPuXeUqi.js} +3 -12
  2. package/dist/{Datafair.client-LChXlMI3.js → Datafair.client-LlEgG7WU.js} +2 -3
  3. package/dist/{Image-CBQwYbQB.js → Image-DVWRoLLI.js} +7 -22
  4. package/dist/{ImagePreview.client-DWNGZghK.js → ImagePreview.client-Db5dmxMP.js} +2 -3
  5. package/dist/{JsonPreview.client-DCklbUyJ.js → JsonPreview.client-DKy2AexC.js} +4 -6
  6. package/dist/{Layer-BPuffNS-.js → Layer-D_5tYbVm.js} +7 -9
  7. package/dist/{Map-QeL96qbQ.js → Map-CTBJEae_.js} +937 -967
  8. package/dist/{MapContainer.client-B-aQhH35.js → MapContainer.client-Clk9_bbS.js} +8 -10
  9. package/dist/{OSM-DT4I7v8A.js → OSM-B5Zc3qAf.js} +2 -3
  10. package/dist/{PdfPreview.client-1WFiBcXh.js → PdfPreview.client-D3wHTDb9.js} +130 -378
  11. package/dist/{PdfSkeleton-BvU7ERD1.js → PdfSkeleton-nas5Pmia.js} +2 -3
  12. package/dist/{Pmtiles.client-BlbOlwyy.js → Pmtiles.client-NGYdeSJY.js} +151 -350
  13. package/dist/{PreviewError-BfBCBDEx.js → PreviewError-EeaGx3SL.js} +6854 -6849
  14. package/dist/{PreviewWrapper-DvycGC7l.js → PreviewWrapper-BhldDdXK.js} +2 -3
  15. package/dist/{ScaleLine-Cwwk9wJo.js → ScaleLine-C_tuJ6VG.js} +3 -4
  16. package/dist/Tile-8nHSuqcv.js +571 -0
  17. package/dist/{Tile-4WpHaLOZ.js → Tile-Bu5lF4M5.js} +8 -13
  18. package/dist/{TileImage-CZZ4lgsm.js → TileImage-CgO5alXc.js} +105 -113
  19. package/dist/{View-DWqx4Jqr.js → View-Dad8DfSD.js} +25 -51
  20. package/dist/{XmlPreview.client-ClFD8R3a.js → XmlPreview.client-CmGbc3c3.js} +5 -7
  21. package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +10 -0
  22. package/dist/components-next.js +9634 -10210
  23. package/dist/{en-C_qOt4Jn.js → en-OIaJCts4.js} +1 -2
  24. package/dist/{france-JfC0dOuE.js → france-BtSQqcqV.js} +5 -9
  25. package/dist/{hvd-ZlsiTVFh.js → hvd-CTia2VCz.js} +1 -2
  26. package/dist/{inspire-DZQ-yA5f.js → inspire-Cc-Kc4K-.js} +1 -2
  27. package/dist/{leaflet-src-lLkzhpcP.js → leaflet-src-BY_Zq0V0.js} +77 -126
  28. package/dist/{proj-DM6GW1n3.js → proj-COhZ08DR.js} +19 -37
  29. package/dist/{purify.es-D6pPunDo.js → purify.es-CGAWnSTR.js} +4 -27
  30. package/dist/{rolldown-runtime-CEFd7nDs.js → rolldown-runtime-DsPmjQRF.js} +2 -3
  31. package/dist/{sl-BxQ_ZY_w.js → sl-CKkMwQhf.js} +1 -2
  32. package/dist/{spd-Cs37HjuR.js → spd-Djcs02gw.js} +1 -2
  33. package/dist/{sr-JDtennFO.js → sr-DabGmchD.js} +1 -2
  34. package/dist/{src-D_UE0st7.js → src-D_o-aUzl.js} +1612 -2428
  35. package/dist/{text-clamp.esm-DRvX2Gzm.js → text-clamp.esm-DE3022VR.js} +3 -5
  36. package/dist/{transform-Ct1GejD-.js → transform-CNeEnSK9.js} +7 -13
  37. package/dist/{vue3-json-viewer-BJgUfh-l.js → vue3-json-viewer-CUx5EFVA.js} +1 -2
  38. package/dist/{vue3-xml-viewer.common-DbJwzvCC.js → vue3-xml-viewer.common-C0bbtsGT.js} +2 -3
  39. package/package.json +2 -2
  40. package/dist/Tile-BV44yf69.js +0 -574
  41. package/dist/assets/maplibre-gl-worker-C24SsKwV.js +0 -10
@@ -1,16 +1,16 @@
1
- import { B as e, Bt as t, Ct as n, Et as r, O as i, Ot as a, Rt as o, U as s, V as c, Wt as l, an as u, bt as d, f, nn as p, nt as m, s as h, st as g, tn as _, z as v, zt as ee } from "./proj-DM6GW1n3.js";
2
- import { c as y, l as b, s as x, w as S } from "./Image-CBQwYbQB.js";
3
- import { S as C, g as w } from "./transform-Ct1GejD-.js";
4
- import { c as te, d as T, f as E, i as D, l as O, s as k, t as ne, u as re } from "./Tile-4WpHaLOZ.js";
5
- //#region ../node_modules/ol/tilegrid/TileGrid.js
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-Bu5lF4M5.js";
2
+ import { c, l, s as u, w as d } from "./Image-DVWRoLLI.js";
3
+ import { B as f, Bt as p, Ct as ee, Et as m, O as h, Ot as g, Rt as _, U as v, V as y, Wt as te, an as b, bt as x, f as S, nn as ne, nt as C, s as w, st as T, tn as E, z as D, zt as O } from "./proj-COhZ08DR.js";
4
+ import { S as k, g as re } from "./transform-CNeEnSK9.js";
5
+ // ../node_modules/ol/tilegrid/TileGrid.js
6
6
  var A = [
7
7
  0,
8
8
  0,
9
9
  0
10
10
  ], j = 5, M = class {
11
11
  constructor(e) {
12
- let t = e.minZoom, n = e.resolutions;
13
- t === void 0 && n && (t = n.findIndex((e) => e !== void 0)), this.minZoom = t === void 0 ? 0 : t, this.resolutions_ = n, C(_(this.resolutions_, (e, t) => t - e, !0), "`resolutions` must be sorted in descending order");
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(E(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];
@@ -19,20 +19,20 @@ var A = [
19
19
  break;
20
20
  }
21
21
  }
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, C(this.origins_.length == this.resolutions_.length, "Number of `origins` and `resolutions` must be equal"));
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_ = r(a)), C(!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, C(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, C(!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_ = [
24
+ a !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = m(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,
28
28
  0
29
- ], e.tileRanges === void 0 ? e.sizes === void 0 ? a && this.calculateTileRanges_(a) : this.fullTileRanges_ = e.sizes.map((e, t) => {
30
- let n = new T(Math.min(0, e[0]), Math.max(e[0] - 1, -1), Math.min(0, e[1]), Math.max(e[1] - 1, -1));
29
+ ], e.tileRanges === void 0 ? e.sizes === void 0 ? a && this.calculateTileRanges_(a) : this.fullTileRanges_ = e.sizes.map((e, n) => {
30
+ let r = new t(Math.min(0, e[0]), Math.max(e[0] - 1, -1), Math.min(0, e[1]), Math.max(e[1] - 1, -1));
31
31
  if (a) {
32
- let e = this.getTileRangeForExtentAndZ(a, t);
33
- n.minX = Math.max(e.minX, n.minX), n.maxX = Math.min(e.maxX, n.maxX), n.minY = Math.max(e.minY, n.minY), n.maxY = Math.min(e.maxY, n.maxY);
32
+ let e = this.getTileRangeForExtentAndZ(a, n);
33
+ r.minX = Math.max(e.minX, r.minX), r.maxX = Math.min(e.maxX, r.maxX), r.minY = Math.max(e.minY, r.minY), r.maxY = Math.min(e.maxY, r.maxY);
34
34
  }
35
- return n;
35
+ return r;
36
36
  }) : this.fullTileRanges_ = e.tileRanges;
37
37
  }
38
38
  forEachTileCoord(e, t, n) {
@@ -43,11 +43,11 @@ var A = [
43
43
  i
44
44
  ]);
45
45
  }
46
- forEachTileCoordParentTileRange(e, t, n, r) {
47
- let i, a, o, s = null, c = e[0] - 1;
48
- for (this.zoomFactor_ === 2 ? (a = e[1], o = e[2]) : s = this.getTileCoordExtent(e, r); c >= this.minZoom;) {
49
- if (a !== void 0 && o !== void 0 ? (a = Math.floor(a / 2), o = Math.floor(o / 2), i = E(a, a, o, o, n)) : i = this.getTileRangeForExtentAndZ(s, c, n), t(c, i)) return !0;
50
- --c;
46
+ forEachTileCoordParentTileRange(e, t, r, i) {
47
+ let a, o, s, c = null, l = e[0] - 1;
48
+ for (this.zoomFactor_ === 2 ? (o = e[1], s = e[2]) : c = this.getTileCoordExtent(e, i); l >= this.minZoom;) {
49
+ if (o !== void 0 && s !== void 0 ? (o = Math.floor(o / 2), s = Math.floor(s / 2), a = n(o, o, s, s, r)) : a = this.getTileRangeForExtentAndZ(c, l, r), t(l, a)) return !0;
50
+ --l;
51
51
  }
52
52
  return !1;
53
53
  }
@@ -72,55 +72,55 @@ var A = [
72
72
  getResolutions() {
73
73
  return this.resolutions_;
74
74
  }
75
- getTileCoordChildTileRange(e, t, n) {
75
+ getTileCoordChildTileRange(e, t, r) {
76
76
  if (e[0] < this.maxZoom) {
77
77
  if (this.zoomFactor_ === 2) {
78
- let n = e[1] * 2, r = e[2] * 2;
79
- return E(n, n + 1, r, r + 1, t);
78
+ let r = e[1] * 2, i = e[2] * 2;
79
+ return n(r, r + 1, i, i + 1, t);
80
80
  }
81
- let r = this.getTileCoordExtent(e, n || this.tmpExtent_);
82
- return this.getTileRangeForExtentAndZ(r, e[0] + 1, t);
81
+ let i = this.getTileCoordExtent(e, r || this.tmpExtent_);
82
+ return this.getTileRangeForExtentAndZ(i, e[0] + 1, t);
83
83
  }
84
84
  return null;
85
85
  }
86
- getTileRangeForTileCoordAndZ(e, t, n) {
86
+ getTileRangeForTileCoordAndZ(e, t, r) {
87
87
  if (t > this.maxZoom || t < this.minZoom) return null;
88
- let r = e[0], i = e[1], a = e[2];
89
- if (t === r) return E(i, a, i, a, n);
88
+ let i = e[0], a = e[1], o = e[2];
89
+ if (t === i) return n(a, o, a, o, r);
90
90
  if (this.zoomFactor_) {
91
- let e = this.zoomFactor_ ** +(t - r), o = Math.floor(i * e), s = Math.floor(a * e);
92
- if (t < r) return E(o, o, s, s, n);
93
- let c = Math.floor(e * (i + 1)) - 1, l = Math.floor(e * (a + 1)) - 1;
94
- return E(o, c, s, l, n);
91
+ let e = this.zoomFactor_ ** +(t - i), s = Math.floor(a * e), c = Math.floor(o * e);
92
+ if (t < i) return n(s, s, c, c, r);
93
+ let l = Math.floor(e * (a + 1)) - 1, u = Math.floor(e * (o + 1)) - 1;
94
+ return n(s, l, c, u, r);
95
95
  }
96
- let o = this.getTileCoordExtent(e, this.tmpExtent_);
97
- return this.getTileRangeForExtentAndZ(o, t, n);
96
+ let s = this.getTileCoordExtent(e, this.tmpExtent_);
97
+ return this.getTileRangeForExtentAndZ(s, t, r);
98
98
  }
99
- getTileRangeForExtentAndZ(e, t, n) {
99
+ getTileRangeForExtentAndZ(e, t, r) {
100
100
  this.getTileCoordForXYAndZ_(e[0], e[3], t, !1, A);
101
- let r = A[1], i = A[2];
101
+ let i = A[1], a = A[2];
102
102
  this.getTileCoordForXYAndZ_(e[2], e[1], t, !0, A);
103
- let a = A[1], o = A[2];
104
- return E(r, a, i, o, n);
103
+ let o = A[1], s = A[2];
104
+ return n(i, o, a, s, r);
105
105
  }
106
106
  getTileCoordCenter(e) {
107
- let t = this.getOrigin(e[0]), n = this.getResolution(e[0]), r = y(this.getTileSize(e[0]), this.tmpSize_);
107
+ let t = this.getOrigin(e[0]), n = this.getResolution(e[0]), r = c(this.getTileSize(e[0]), this.tmpSize_);
108
108
  return [t[0] + (e[1] + .5) * r[0] * n, t[1] - (e[2] + .5) * r[1] * n];
109
109
  }
110
110
  getTileCoordExtent(e, t) {
111
- let n = this.getOrigin(e[0]), r = this.getResolution(e[0]), i = y(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, c = o + i[1] * r;
112
- return g(a, o, s, c, t);
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 T(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 a = this.getZForResolution(n), o = n / this.getResolution(a), s = this.getOrigin(a), l = y(this.getTileSize(a), this.tmpSize_), u = o * (e - s[0]) / n / l[0], d = o * (s[1] - t) / n / l[1];
119
- return r ? (u = v(u, j) - 1, d = v(d, j) - 1) : (u = c(u, j), d = c(d, j)), k(a, u, d, 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], f = s * (l[1] - t) / n / u[1];
119
+ return r ? (d = D(d, j) - 1, f = D(f, j) - 1) : (d = y(d, j), f = y(f, j)), a(o, d, f, i);
120
120
  }
121
121
  getTileCoordForXYAndZ_(e, t, n, r, i) {
122
- let a = this.getOrigin(n), o = this.getResolution(n), s = y(this.getTileSize(n), this.tmpSize_), l = (e - a[0]) / o / s[0], u = (a[1] - t) / o / s[1];
123
- return r ? (l = v(l, j) - 1, u = v(u, j) - 1) : (l = c(l, j), u = c(u, j)), k(n, l, u, i);
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 = D(u, j) - 1, d = D(d, j) - 1) : (u = y(u, j), d = y(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);
@@ -134,12 +134,12 @@ var A = [
134
134
  getFullTileRange(e) {
135
135
  return this.fullTileRanges_ ? this.fullTileRanges_[e] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, e) : null;
136
136
  }
137
- getZForResolution(t, n) {
138
- let r = p(this.resolutions_, t, n || 0);
139
- return e(r, this.minZoom, this.maxZoom);
137
+ getZForResolution(e, t) {
138
+ let n = ne(this.resolutions_, e, t || 0);
139
+ return f(n, this.minZoom, this.maxZoom);
140
140
  }
141
141
  tileCoordIntersectsViewport(e, t) {
142
- return w(t, 0, t.length, 2, this.getTileCoordExtent(e));
142
+ return re(t, 0, t.length, 2, this.getTileCoordExtent(e));
143
143
  }
144
144
  calculateTileRanges_(e) {
145
145
  let t = this.resolutions_.length, n = Array(t);
@@ -147,16 +147,15 @@ var A = [
147
147
  this.fullTileRanges_ = n;
148
148
  }
149
149
  };
150
- //#endregion
151
- //#region ../node_modules/ol/tilegrid.js
150
+ // ../node_modules/ol/tilegrid.js
152
151
  function N(e) {
153
152
  let t = e.getDefaultTileGrid();
154
153
  return t || (t = R(e), e.setDefaultTileGrid(t)), t;
155
154
  }
156
155
  function P(e, t, n) {
157
- let r = t[0], i = e.getTileCoordCenter(t), o = z(n);
158
- if (!m(o, i)) {
159
- let t = a(o), n = Math.ceil((o[0] - i[0]) / t);
156
+ let r = t[0], i = e.getTileCoordCenter(t), a = z(n);
157
+ if (!C(a, i)) {
158
+ let t = g(a), n = Math.ceil((a[0] - i[0]) / t);
160
159
  return i[0] += t * n, e.getTileCoordForCoordAndZ(i, r);
161
160
  }
162
161
  return t;
@@ -166,13 +165,13 @@ function F(e, t, n, r) {
166
165
  let i = L(e, t, n);
167
166
  return new M({
168
167
  extent: e,
169
- origin: d(e, r),
168
+ origin: x(e, r),
170
169
  resolutions: i,
171
170
  tileSize: n
172
171
  });
173
172
  }
174
173
  function I(e) {
175
- let t = e || {}, n = t.extent || f("EPSG:3857").getExtent();
174
+ let t = e || {}, n = t.extent || S("EPSG:3857").getExtent();
176
175
  return new M({
177
176
  extent: n,
178
177
  minZoom: t.minZoom,
@@ -180,28 +179,27 @@ function I(e) {
180
179
  resolutions: L(n, t.maxZoom, t.tileSize, t.maxResolution)
181
180
  });
182
181
  }
183
- function L(e, t, r, i) {
184
- t = t === void 0 ? 42 : t, r = y(r === void 0 ? 256 : r);
185
- let o = n(e), s = a(e);
186
- i = i > 0 ? i : Math.max(s / r[0], o / r[1]);
187
- let c = t + 1, l = Array(c);
188
- for (let e = 0; e < c; ++e) l[e] = i / 2 ** e;
189
- return l;
182
+ function L(e, t, n, r) {
183
+ t = t === void 0 ? 42 : t, n = c(n === void 0 ? 256 : n);
184
+ let i = ee(e), a = g(e);
185
+ r = r > 0 ? r : Math.max(a / n[0], i / n[1]);
186
+ let o = t + 1, s = Array(o);
187
+ for (let e = 0; e < o; ++e) s[e] = r / 2 ** e;
188
+ return s;
190
189
  }
191
190
  function R(e, t, n, r) {
192
191
  return F(z(e), t, n, r);
193
192
  }
194
193
  function z(e) {
195
- e = f(e);
194
+ e = S(e);
196
195
  let t = e.getExtent();
197
196
  if (!t) {
198
- let n = 180 * i.degrees / e.getMetersPerUnit();
199
- t = g(-n, -n, n, n);
197
+ let n = 180 * h.degrees / e.getMetersPerUnit();
198
+ t = T(-n, -n, n, n);
200
199
  }
201
200
  return t;
202
201
  }
203
- //#endregion
204
- //#region ../node_modules/ol/uri.js
202
+ // ../node_modules/ol/uri.js
205
203
  function B(e, t) {
206
204
  let n = [];
207
205
  Object.keys(t).forEach(function(e) {
@@ -231,8 +229,7 @@ function K(e) {
231
229
  }
232
230
  return t.push(e), t;
233
231
  }
234
- //#endregion
235
- //#region ../node_modules/ol/tileurlfunction.js
232
+ // ../node_modules/ol/tileurlfunction.js
236
233
  function q(e, t) {
237
234
  return (function(n, r, i) {
238
235
  if (!n) return;
@@ -252,15 +249,14 @@ function J(e, t) {
252
249
  function Y(e) {
253
250
  return e.length === 1 ? e[0] : (function(t, n, r) {
254
251
  if (!t) return;
255
- let i = O(t);
256
- return e[s(i, e.length)](t, n, r);
252
+ let a = i(t);
253
+ return e[v(a, e.length)](t, n, r);
257
254
  });
258
255
  }
259
- //#endregion
260
- //#region ../node_modules/ol/source/Source.js
261
- var X = class extends o {
256
+ // ../node_modules/ol/source/Source.js
257
+ var X = class extends _ {
262
258
  constructor(e) {
263
- super(), this.projection = f(e.projection), this.attributions_ = Z(e.attributions), this.attributionsCollapsible_ = e.attributionsCollapsible ?? !0, this.loading = !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;
259
+ super(), this.projection = S(e.projection), this.attributions_ = Z(e.attributions), this.attributionsCollapsible_ = e.attributionsCollapsible ?? !0, this.loading = !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;
264
260
  let t = this;
265
261
  this.viewPromise_ = new Promise(function(e, n) {
266
262
  t.viewResolver = e, t.viewRejector = n;
@@ -313,8 +309,7 @@ var X = class extends o {
313
309
  function Z(e) {
314
310
  return e ? typeof e == "function" ? e : (Array.isArray(e) || (e = [e]), (t) => e) : null;
315
311
  }
316
- //#endregion
317
- //#region ../node_modules/ol/source/Tile.js
312
+ // ../node_modules/ol/source/Tile.js
318
313
  var ie = class extends X {
319
314
  constructor(e) {
320
315
  super({
@@ -324,7 +319,7 @@ var ie = class extends X {
324
319
  state: e.state,
325
320
  wrapX: e.wrapX,
326
321
  interpolate: e.interpolate
327
- }), 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 && y(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), [256, 256]), this.tmpSize = [0, 0], this.key_ = e.key || t(this), this.tileOptions = {
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 || p(this), this.tileOptions = {
328
323
  transition: e.transition,
329
324
  interpolate: e.interpolate
330
325
  }, this.zDirection = e.zDirection ? e.zDirection : 0;
@@ -343,7 +338,7 @@ var ie = class extends X {
343
338
  return t ? t.getResolutions() : null;
344
339
  }
345
340
  getTile(e, t, n, r, i, a) {
346
- return ee();
341
+ return O();
347
342
  }
348
343
  getTileGrid() {
349
344
  return this.tileGrid;
@@ -355,18 +350,18 @@ var ie = class extends X {
355
350
  return this.tilePixelRatio_;
356
351
  }
357
352
  getTilePixelSize(e, t, n) {
358
- let r = this.getTileGridForProjection(n), i = this.getTilePixelRatio(t), a = y(r.getTileSize(e), this.tmpSize);
359
- return i == 1 ? a : x(a, i, this.tmpSize);
353
+ let r = this.getTileGridForProjection(n), i = this.getTilePixelRatio(t), a = c(r.getTileSize(e), this.tmpSize);
354
+ return i == 1 ? a : u(a, i, this.tmpSize);
360
355
  }
361
356
  getTileCoordForTileUrlFunction(e, t) {
362
357
  let n = t === void 0 ? this.getProjection() : t, r = t === void 0 && this.tileGrid || this.getTileGridForProjection(n);
363
- return this.getWrapX() && n.isGlobal() && (e = P(r, e, n)), re(e, r) ? e : null;
358
+ return this.getWrapX() && n.isGlobal() && (e = P(r, e, n)), s(e, r) ? e : null;
364
359
  }
365
360
  clear() {}
366
361
  refresh() {
367
362
  this.clear(), super.refresh();
368
363
  }
369
- }, ae = class extends l {
364
+ }, ae = class extends te {
370
365
  constructor(e, t) {
371
366
  super(e), this.tile = t;
372
367
  }
@@ -401,8 +396,8 @@ var ie = class extends X {
401
396
  return this.urls;
402
397
  }
403
398
  handleTileChange(e) {
404
- let n = e.target, r = t(n), i = n.getState(), a;
405
- i == b.LOADING ? (this.tileLoadingKeys_[r] = !0, a = Q.TILELOADSTART) : r in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[r], a = i == b.ERROR ? Q.TILELOADERROR : i == b.LOADED ? Q.TILELOADEND : void 0), a != null && this.dispatchEvent(new ae(a, n));
399
+ let t = e.target, n = p(t), r = t.getState(), i;
400
+ 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));
406
401
  }
407
402
  setTileLoadFunction(e) {
408
403
  this.tileLoadFunction = e, this.changed();
@@ -439,10 +434,10 @@ var ie = class extends X {
439
434
  key: e.key,
440
435
  attributionsCollapsible: e.attributionsCollapsible,
441
436
  zDirection: e.zDirection
442
- }), this.crossOrigin = e.crossOrigin === void 0 ? null : e.crossOrigin, this.referrerPolicy = e.referrerPolicy, this.tileClass = e.tileClass === void 0 ? D : e.tileClass, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = e.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1;
437
+ }), 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;
443
438
  }
444
439
  getGutterForProjection(e) {
445
- return this.getProjection() && e && !h(this.getProjection(), e) ? 0 : this.getGutter();
440
+ return this.getProjection() && e && !w(this.getProjection(), e) ? 0 : this.getGutter();
446
441
  }
447
442
  getGutter() {
448
443
  return 0;
@@ -452,51 +447,51 @@ var ie = class extends X {
452
447
  return this.getInterpolate() || (e += ":disable-interpolation"), e;
453
448
  }
454
449
  getTileGridForProjection(e) {
455
- let n = this.getProjection();
456
- if (this.tileGrid && (!n || h(n, e))) return this.tileGrid;
457
- let r = t(e);
458
- return r in this.tileGridForProjection || (this.tileGridForProjection[r] = N(e)), this.tileGridForProjection[r];
450
+ let t = this.getProjection();
451
+ if (this.tileGrid && (!t || w(t, e))) return this.tileGrid;
452
+ let n = p(e);
453
+ return n in this.tileGridForProjection || (this.tileGridForProjection[n] = N(e)), this.tileGridForProjection[n];
459
454
  }
460
455
  createTile_(e, t, n, r, i, a) {
461
456
  let o = [
462
457
  e,
463
458
  t,
464
459
  n
465
- ], s = this.getTileCoordForTileUrlFunction(o, i), c = s ? this.tileUrlFunction(s, r, i) : void 0, l = new this.tileClass(o, c === void 0 ? b.EMPTY : b.IDLE, c === void 0 ? "" : c, {
460
+ ], s = this.getTileCoordForTileUrlFunction(o, i), c = s ? this.tileUrlFunction(s, r, i) : void 0, u = new this.tileClass(o, c === void 0 ? l.EMPTY : l.IDLE, c === void 0 ? "" : c, {
466
461
  crossOrigin: this.crossOrigin,
467
462
  referrerPolicy: this.referrerPolicy
468
463
  }, this.tileLoadFunction, this.tileOptions);
469
- return l.key = a, l.addEventListener(u.CHANGE, this.handleTileChange.bind(this)), l;
464
+ return u.key = a, u.addEventListener(b.CHANGE, this.handleTileChange.bind(this)), u;
470
465
  }
471
466
  getTile(e, t, n, r, i, a) {
472
- let o = this.getProjection();
473
- if (!o || !i || h(o, i)) return this.getTileInternal(e, t, n, r, o || i);
474
- let s = [
467
+ let s = this.getProjection();
468
+ if (!s || !i || w(s, i)) return this.getTileInternal(e, t, n, r, s || i);
469
+ let c = [
475
470
  e,
476
471
  t,
477
472
  n
478
- ], c = this.getKey(), l = this.getTileGridForProjection(o), u = this.getTileGridForProjection(i), d = this.getTileCoordForTileUrlFunction(s, i), f = new ne(o, l, i, u, s, d, this.getTilePixelRatio(r), this.getGutter(), (e, t, n, r) => this.getTileInternal(e, t, n, r, o, a), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.tileOptions);
479
- return f.key = c, f;
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);
474
+ return p.key = l, p;
480
475
  }
481
- getTileInternal(e, t, n, r, i, a) {
482
- let o = this.getKey(), s = te(this, o, e, t, n);
483
- if (a && a.containsKey(s)) return a.get(s);
484
- let c = this.createTile_(e, t, n, r, i, o);
485
- return a?.set(s, c), c;
476
+ getTileInternal(t, n, r, i, a, o) {
477
+ let s = this.getKey(), c = e(this, s, t, n, r);
478
+ if (o && o.containsKey(c)) return o.get(c);
479
+ let l = this.createTile_(t, n, r, i, a, s);
480
+ return o?.set(c, l), l;
486
481
  }
487
482
  setRenderReprojectionEdges(e) {
488
483
  this.renderReprojectionEdges_ != e && (this.renderReprojectionEdges_ = e, this.changed());
489
484
  }
490
- setTileGridForProjection(e, n) {
491
- let r = f(e);
492
- if (r) {
493
- let e = t(r);
494
- e in this.tileGridForProjection || (this.tileGridForProjection[e] = n);
485
+ setTileGridForProjection(e, t) {
486
+ let n = S(e);
487
+ if (n) {
488
+ let e = p(n);
489
+ e in this.tileGridForProjection || (this.tileGridForProjection[e] = t);
495
490
  }
496
491
  }
497
492
  };
498
493
  function se(e, t) {
499
- if (S) {
494
+ if (d) {
500
495
  let n = e.getCrossOrigin(), r = "same-origin", i = "same-origin";
501
496
  n === "anonymous" || n === "" ? (r = "cors", i = "omit") : n === "use-credentials" && (r = "cors", i = "include");
502
497
  let a = {
@@ -513,9 +508,6 @@ function se(e, t) {
513
508
  }).catch(() => {
514
509
  e.getImage().dispatchEvent(new Event("error"));
515
510
  });
516
- return;
517
- }
518
- e.getImage().src = t;
511
+ } else e.getImage().src = t;
519
512
  }
520
- //#endregion
521
513
  export { Y as a, I as c, M as d, J as i, z as l, $ as n, B as o, X as r, K as s, oe as t, N as u };