@datagouv/components-next 1.0.2-dev.112 → 1.0.2-dev.114

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 (31) hide show
  1. package/dist/{Control-ZFh5ta_U.js → Control-b-43UT2B.js} +10 -10
  2. package/dist/{Datafair.client-CKB2P_X1.js → Datafair.client-BH351yV9.js} +4 -4
  3. package/dist/{Event-DSQcW7OF.js → Event-py_AAwJY.js} +18 -18
  4. package/dist/{Image-BijNEG0p.js → Image-BHQYZWzH.js} +23 -23
  5. package/dist/{JsonPreview.client-Bx11-jfT.js → JsonPreview.client-CawLfTe_.js} +5 -5
  6. package/dist/{Map-BUtPf5GN.js → Map-CtP7leHl.js} +1313 -1173
  7. package/dist/{MapContainer.client-CdZSeT_L.js → MapContainer.client-DN8kHTOA.js} +17 -17
  8. package/dist/{OSM-D4MTdBtk.js → OSM-gdDSIsDA.js} +15 -23
  9. package/dist/{PdfPreview.client-Bh9lP-qU.js → PdfPreview.client-BGOycK0h.js} +6 -10
  10. package/dist/Pmtiles.client-CRaI4U8S.js +26123 -0
  11. package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-BnC7vWGP.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-DAddoRna.js} +2 -2
  12. package/dist/{ScaleLine-hJQIqcZm.js → ScaleLine-hG-FhNqy.js} +2 -2
  13. package/dist/{Tile-Dcl7oIVu.js → Tile-D6rFonpT.js} +163 -166
  14. package/dist/{TileImage-BJeHipMX.js → TileImage-cfrEgz5y.js} +131 -119
  15. package/dist/{View-xp_P_OHw.js → View-vp7vDb9q.js} +169 -119
  16. package/dist/{XmlPreview.client-oFAOv828.js → XmlPreview.client-Dyv0J4kw.js} +5 -5
  17. package/dist/{common-BjQlan3k.js → common-C8efyyuc.js} +49 -49
  18. package/dist/components-next.css +1 -52
  19. package/dist/components-next.js +36 -36
  20. package/dist/components.css +2 -2
  21. package/dist/{index-CxCuKQ81.js → index-_qLRU0Z5.js} +6382 -6057
  22. package/dist/{leaflet-src-7m1mB8LI.js → leaflet-src-D_sX6kLJ.js} +162 -164
  23. package/dist/{main-CQ9ZQG7n.js → main-CR8bhz_w.js} +19161 -20321
  24. package/dist/{proj-CsNo9yH1.js → proj-CsjVeojN.js} +322 -306
  25. package/dist/{text-clamp.esm-B5kW_XMt.js → text-clamp.esm-DVseBqZZ.js} +4 -4
  26. package/dist/{tilecoord-A0fLnBZr.js → tilecoord-CPcQJnrF.js} +270 -261
  27. package/dist/{vue3-json-viewer-BXwup7nO.js → vue3-json-viewer-CJLQFzXZ.js} +10 -16
  28. package/dist/{vue3-xml-viewer.common-B9qp90K_.js → vue3-xml-viewer.common-DRgxPToX.js} +1 -1
  29. package/package.json +34 -34
  30. package/src/components/ResourceAccordion/Pmtiles.client.vue +3 -1
  31. package/dist/Pmtiles.client-Bi46wN14.js +0 -25185
@@ -1,5 +1,5 @@
1
- import { a7 as p, B as it, n as Ft, G as Tt, al as x, v as Et, aM as vt, D as St, F, ak as W, m as Zt, x as Z, z as j, o as zt, aN as Pt, s as st, C as Xt, A as Yt, a2 as bt, K as ot, y as rt, aO as Gt, N as at, L as G, am as Lt, aP as L, M as Ot, af as Y, ac as y, j as v, W as q, aF as Vt, aQ as kt, ah as K, k as Ut, Q as Dt, V as Ht, aR as Wt } from "./proj-CsNo9yH1.js";
2
- import { d as qt, e as Kt, u as lt, v as $t, w as Bt, a as N, j as Qt, x as Jt } from "./common-BjQlan3k.js";
1
+ import { p as y, a as it, y as Ft, az as Tt, d as x, A as Et, aC as St, a4 as vt, ae as F, ak as W, G as Zt, aa as T, aJ as j, av as zt, aM as Pt, t as st, C as Xt, w as Yt, k as bt, at as ot, W as rt, aB as Gt, aw as at, ao as G, aP as Lt, H as L, M as Ot, a1 as p, a2 as v, aA as q, aE as Vt, e as kt, aQ as K, aR as Ut, ad as Dt, V as Ht, S as Y, K as Wt } from "./proj-CsjVeojN.js";
2
+ import { d as qt, e as Kt, r as lt, o as $t, k as Bt, c as N, g as Jt, a as Qt } from "./common-C8efyyuc.js";
3
3
  const I = {
4
4
  ANIMATING: 0,
5
5
  INTERACTING: 1
@@ -26,7 +26,7 @@ function $(s, t, e) {
26
26
  const a = t ? 0 : o[0] * i, c = t ? 0 : o[1] * i, h = l ? l[0] : 0, u = l ? l[1] : 0;
27
27
  let g = s[0] + a / 2 + h, d = s[2] - a / 2 + h, f = s[1] + c / 2 + u, R = s[3] - c / 2 + u;
28
28
  g > d && (g = (d + g) / 2, d = g), f > R && (f = (R + f) / 2, R = f);
29
- let _ = p(n[0], g, d), C = p(n[1], f, R);
29
+ let _ = y(n[0], g, d), C = y(n[1], f, R);
30
30
  if (r && e && i) {
31
31
  const m = 30 * i;
32
32
  _ += -m * Math.log(1 + Math.max(0, g - n[0]) / m) + m * Math.log(1 + Math.max(0, n[0] - d) / m), C += -m * Math.log(1 + Math.max(0, f - n[1]) / m) + m * Math.log(1 + Math.max(0, n[1] - R) / m);
@@ -177,7 +177,7 @@ class oe extends it {
177
177
  const e = this.computeExtent(this.extent_);
178
178
  (isNaN(e[0]) || isNaN(e[1])) && Et(e), this.extentRevision_ = this.getRevision();
179
179
  }
180
- return vt(this.extent_, t);
180
+ return St(this.extent_, t);
181
181
  }
182
182
  /**
183
183
  * Rotate the geometry around a given coordinate. This modifies the geometry
@@ -282,7 +282,7 @@ class oe extends it {
282
282
  * @api
283
283
  */
284
284
  transform(t, e) {
285
- const n = St(t), i = n.getUnits() == "tile-pixels" ? function(o, r, l) {
285
+ const n = vt(t), i = n.getUnits() == "tile-pixels" ? function(o, r, l) {
286
286
  const a = n.getExtent(), c = n.getWorldExtent(), h = F(c) / F(a);
287
287
  qt(
288
288
  B,
@@ -396,7 +396,7 @@ class O extends oe {
396
396
  * @param {Array<number>} flatCoordinates Flat coordinates.
397
397
  */
398
398
  setFlatCoordinates(t, e) {
399
- this.stride = Q(t), this.layout = t, this.flatCoordinates = e;
399
+ this.stride = J(t), this.layout = t, this.flatCoordinates = e;
400
400
  }
401
401
  /**
402
402
  * @abstract
@@ -415,7 +415,7 @@ class O extends oe {
415
415
  setLayout(t, e, n) {
416
416
  let i;
417
417
  if (t)
418
- i = Q(t);
418
+ i = J(t);
419
419
  else {
420
420
  for (let o = 0; o < n; ++o) {
421
421
  if (e.length === 0) {
@@ -481,7 +481,7 @@ class O extends oe {
481
481
  * @override
482
482
  */
483
483
  scale(t, e, n) {
484
- e === void 0 && (e = t), n || (n = Z(this.getExtent()));
484
+ e === void 0 && (e = t), n || (n = T(this.getExtent()));
485
485
  const i = this.getFlatCoordinates();
486
486
  if (i) {
487
487
  const o = this.getStride();
@@ -526,12 +526,12 @@ function re(s) {
526
526
  return s == 2 ? t = "XY" : s == 3 ? t = "XYZ" : s == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
527
527
  t;
528
528
  }
529
- function Q(s) {
529
+ function J(s) {
530
530
  let t;
531
531
  return s == "XY" ? t = 2 : s == "XYZ" || s == "XYM" ? t = 3 : s == "XYZM" && (t = 4), /** @type {number} */
532
532
  t;
533
533
  }
534
- function Ce(s, t, e) {
534
+ function Ie(s, t, e) {
535
535
  const n = s.getFlatCoordinates();
536
536
  if (!n)
537
537
  return null;
@@ -563,7 +563,7 @@ function ct(s, t, e, n) {
563
563
  }
564
564
  return i;
565
565
  }
566
- function xe(s, t, e, n) {
566
+ function we(s, t, e, n) {
567
567
  let i = 0;
568
568
  for (let o = 0, r = e.length; o < r; ++o) {
569
569
  const l = e[o];
@@ -571,7 +571,7 @@ function xe(s, t, e, n) {
571
571
  }
572
572
  return i;
573
573
  }
574
- function J(s, t, e, n, i, o, r) {
574
+ function Q(s, t, e, n, i, o, r) {
575
575
  const l = s[t], a = s[t + 1], c = s[e] - l, h = s[e + 1] - a;
576
576
  let u;
577
577
  if (c === 0 && h === 0)
@@ -611,7 +611,7 @@ function dt(s, t, e, n, i) {
611
611
  }
612
612
  return i;
613
613
  }
614
- function Me(s, t, e, n, i) {
614
+ function Ae(s, t, e, n, i) {
615
615
  for (let o = 0, r = e.length; o < r; ++o) {
616
616
  const l = e[o];
617
617
  i = dt(s, t, l, n, i), t = l[l.length - 1];
@@ -638,7 +638,7 @@ function ft(s, t, e, n, i, o, r, l, a, c, h) {
638
638
  h = h || [NaN, NaN];
639
639
  let d = t + n;
640
640
  for (; d < e; )
641
- if (J(
641
+ if (Q(
642
642
  s,
643
643
  d - n,
644
644
  d,
@@ -655,7 +655,7 @@ function ft(s, t, e, n, i, o, r, l, a, c, h) {
655
655
  (Math.sqrt(g) - Math.sqrt(c)) / i | 0,
656
656
  1
657
657
  );
658
- if (o && (J(
658
+ if (o && (Q(
659
659
  s,
660
660
  e - n,
661
661
  t,
@@ -690,7 +690,7 @@ function Rt(s, t, e, n, i, o, r, l, a, c, h) {
690
690
  }
691
691
  return c;
692
692
  }
693
- function pe(s, t, e, n, i, o, r, l, a, c, h) {
693
+ function Ne(s, t, e, n, i, o, r, l, a, c, h) {
694
694
  h = h || [NaN, NaN];
695
695
  for (let u = 0, g = e.length; u < g; ++u) {
696
696
  const d = e[u];
@@ -737,7 +737,7 @@ function mt(s, t, e, n, i) {
737
737
  }
738
738
  return i.length = o, i;
739
739
  }
740
- function ye(s, t, e, n, i) {
740
+ function je(s, t, e, n, i) {
741
741
  i = i || [];
742
742
  let o = 0;
743
743
  for (let r = 0, l = e.length; r < l; ++r) {
@@ -774,7 +774,7 @@ function xt(s, t, e, n, i) {
774
774
  }
775
775
  return i.length = o, i;
776
776
  }
777
- function Ie(s, t, e, n, i) {
777
+ function Fe(s, t, e, n, i) {
778
778
  i = i !== void 0 ? i : [];
779
779
  let o = 0;
780
780
  for (let r = 0, l = e.length; r < l; ++r) {
@@ -805,7 +805,7 @@ function Mt(s, t, e, n, i, o, r) {
805
805
  let d = 0;
806
806
  const f = s[g], R = s[g + 1], _ = s[u], C = s[u + 1];
807
807
  for (let m = g + n; m < u; m += n) {
808
- const z = s[m], w = s[m + 1], H = Pt(z, w, f, R, _, C);
808
+ const z = s[m], A = s[m + 1], H = Pt(z, A, f, R, _, C);
809
809
  H > d && (h = m, d = H);
810
810
  }
811
811
  d > i && (a[(h - t) / n] = 1, g + n < h && c.push(g, h), h + n < u && c.push(h, u));
@@ -814,7 +814,7 @@ function Mt(s, t, e, n, i, o, r) {
814
814
  a[u] && (o[r++] = s[t + u * n], o[r++] = s[t + u * n + 1]);
815
815
  return r;
816
816
  }
817
- function Ae(s, t, e, n, i, o, r, l) {
817
+ function Te(s, t, e, n, i, o, r, l) {
818
818
  for (let a = 0, c = e.length; a < c; ++a) {
819
819
  const h = e[a];
820
820
  r = Mt(
@@ -829,21 +829,21 @@ function Ae(s, t, e, n, i, o, r, l) {
829
829
  }
830
830
  return r;
831
831
  }
832
- function A(s, t) {
832
+ function w(s, t) {
833
833
  return t * Math.round(s / t);
834
834
  }
835
835
  function le(s, t, e, n, i, o, r) {
836
836
  if (t == e)
837
837
  return r;
838
- let l = A(s[t], i), a = A(s[t + 1], i);
838
+ let l = w(s[t], i), a = w(s[t + 1], i);
839
839
  t += n, o[r++] = l, o[r++] = a;
840
840
  let c, h;
841
841
  do
842
- if (c = A(s[t], i), h = A(s[t + 1], i), t += n, t == e)
842
+ if (c = w(s[t], i), h = w(s[t + 1], i), t += n, t == e)
843
843
  return o[r++] = c, o[r++] = h, r;
844
844
  while (c == l && h == a);
845
845
  for (; t < e; ) {
846
- const u = A(s[t], i), g = A(s[t + 1], i);
846
+ const u = w(s[t], i), g = w(s[t + 1], i);
847
847
  if (t += n, u == c && g == h)
848
848
  continue;
849
849
  const d = c - l, f = h - a, R = u - l, _ = g - a;
@@ -855,7 +855,7 @@ function le(s, t, e, n, i, o, r) {
855
855
  }
856
856
  return o[r++] = c, o[r++] = h, r;
857
857
  }
858
- function pt(s, t, e, n, i, o, r, l) {
858
+ function yt(s, t, e, n, i, o, r, l) {
859
859
  for (let a = 0, c = e.length; a < c; ++a) {
860
860
  const h = e[a];
861
861
  r = le(
@@ -870,10 +870,10 @@ function pt(s, t, e, n, i, o, r, l) {
870
870
  }
871
871
  return r;
872
872
  }
873
- function we(s, t, e, n, i, o, r, l) {
873
+ function Ee(s, t, e, n, i, o, r, l) {
874
874
  for (let a = 0, c = e.length; a < c; ++a) {
875
875
  const h = e[a], u = [];
876
- r = pt(
876
+ r = yt(
877
877
  s,
878
878
  t,
879
879
  h,
@@ -886,7 +886,7 @@ function we(s, t, e, n, i, o, r, l) {
886
886
  }
887
887
  return r;
888
888
  }
889
- class T extends O {
889
+ class E extends O {
890
890
  /**
891
891
  * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
892
892
  * For internal use, flat coordinates in combination with `layout` are also accepted.
@@ -910,7 +910,7 @@ class T extends O {
910
910
  * @override
911
911
  */
912
912
  clone() {
913
- return new T(this.flatCoordinates.slice(), this.layout);
913
+ return new E(this.flatCoordinates.slice(), this.layout);
914
914
  }
915
915
  /**
916
916
  * @param {number} x X.
@@ -985,7 +985,7 @@ class T extends O {
985
985
  t,
986
986
  e,
987
987
  0
988
- ), new T(e, "XY");
988
+ ), new E(e, "XY");
989
989
  }
990
990
  /**
991
991
  * Get the type of this geometry.
@@ -1115,12 +1115,12 @@ class V extends O {
1115
1115
  ), this.changed();
1116
1116
  }
1117
1117
  }
1118
- function yt(s, t, e, n, i, o, r) {
1118
+ function pt(s, t, e, n, i, o, r) {
1119
1119
  let l, a, c, h, u, g, d;
1120
1120
  const f = i[o + 1], R = [];
1121
1121
  for (let m = 0, z = e.length; m < z; ++m) {
1122
- const w = e[m];
1123
- for (h = s[w - n], g = s[w - n + 1], l = t; l < w; l += n)
1122
+ const A = e[m];
1123
+ for (h = s[A - n], g = s[A - n + 1], l = t; l < A; l += n)
1124
1124
  u = s[l], d = s[l + 1], (f <= g && d <= f || g <= f && f <= d) && (c = (f - g) / (d - g) * (u - h) + h, R.push(c)), h = u, g = d;
1125
1125
  }
1126
1126
  let _ = NaN, C = -1 / 0;
@@ -1131,11 +1131,11 @@ function yt(s, t, e, n, i, o, r) {
1131
1131
  }
1132
1132
  return isNaN(_) && (_ = i[o]), r ? (r.push(_, f, C), r) : [_, f, C];
1133
1133
  }
1134
- function Ne(s, t, e, n, i) {
1134
+ function Se(s, t, e, n, i) {
1135
1135
  let o = [];
1136
1136
  for (let r = 0, l = e.length; r < l; ++r) {
1137
1137
  const a = e[r];
1138
- o = yt(
1138
+ o = pt(
1139
1139
  s,
1140
1140
  t,
1141
1141
  a,
@@ -1182,7 +1182,7 @@ function It(s, t, e, n, i) {
1182
1182
  }
1183
1183
  return !0;
1184
1184
  }
1185
- function je(s, t, e, n, i) {
1185
+ function ve(s, t, e, n, i) {
1186
1186
  for (let o = 0, r = e.length; o < r; ++o) {
1187
1187
  const l = e[o];
1188
1188
  if (!It(s, t, l, n, i))
@@ -1204,7 +1204,7 @@ function b(s, t, e, n, i) {
1204
1204
  }
1205
1205
  return t;
1206
1206
  }
1207
- function Fe(s, t, e, n, i) {
1207
+ function Ze(s, t, e, n, i) {
1208
1208
  for (let o = 0, r = e.length; o < r; ++o)
1209
1209
  t = b(
1210
1210
  s,
@@ -1215,7 +1215,7 @@ function Fe(s, t, e, n, i) {
1215
1215
  );
1216
1216
  return t;
1217
1217
  }
1218
- function Te(s, t) {
1218
+ function ze(s, t) {
1219
1219
  const e = [];
1220
1220
  let n = 0, i = 0, o;
1221
1221
  for (let r = 0, l = t.length; r < l; ++r) {
@@ -1231,7 +1231,7 @@ function Te(s, t) {
1231
1231
  }
1232
1232
  return e;
1233
1233
  }
1234
- class E extends O {
1234
+ class S extends O {
1235
1235
  /**
1236
1236
  * @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
1237
1237
  * Array of linear rings that define the polygon. The first linear ring of the
@@ -1269,7 +1269,7 @@ class E extends O {
1269
1269
  * @override
1270
1270
  */
1271
1271
  clone() {
1272
- const t = new E(
1272
+ const t = new S(
1273
1273
  this.flatCoordinates.slice(),
1274
1274
  this.layout,
1275
1275
  this.ends_.slice()
@@ -1364,8 +1364,8 @@ class E extends O {
1364
1364
  */
1365
1365
  getFlatInteriorPoint() {
1366
1366
  if (this.flatInteriorPointRevision_ != this.getRevision()) {
1367
- const t = Z(this.getExtent());
1368
- this.flatInteriorPoint_ = yt(
1367
+ const t = T(this.getExtent());
1368
+ this.flatInteriorPoint_ = pt(
1369
1369
  this.getOrientedFlatCoordinates(),
1370
1370
  0,
1371
1371
  this.ends_,
@@ -1409,7 +1409,7 @@ class E extends O {
1409
1409
  * @api
1410
1410
  */
1411
1411
  getLinearRing(t) {
1412
- return t < 0 || this.ends_.length <= t ? null : new T(
1412
+ return t < 0 || this.ends_.length <= t ? null : new E(
1413
1413
  this.flatCoordinates.slice(
1414
1414
  t === 0 ? 0 : this.ends_[t - 1],
1415
1415
  this.ends_[t]
@@ -1426,7 +1426,7 @@ class E extends O {
1426
1426
  const t = this.layout, e = this.flatCoordinates, n = this.ends_, i = [];
1427
1427
  let o = 0;
1428
1428
  for (let r = 0, l = n.length; r < l; ++r) {
1429
- const a = n[r], c = new T(
1429
+ const a = n[r], c = new E(
1430
1430
  e.slice(o, a),
1431
1431
  t
1432
1432
  );
@@ -1460,7 +1460,7 @@ class E extends O {
1460
1460
  */
1461
1461
  getSimplifiedGeometryInternal(t) {
1462
1462
  const e = [], n = [];
1463
- return e.length = pt(
1463
+ return e.length = yt(
1464
1464
  this.flatCoordinates,
1465
1465
  0,
1466
1466
  this.ends_,
@@ -1469,7 +1469,7 @@ class E extends O {
1469
1469
  e,
1470
1470
  0,
1471
1471
  n
1472
- ), new E(e, "XY", n);
1472
+ ), new S(e, "XY", n);
1473
1473
  }
1474
1474
  /**
1475
1475
  * Get the type of this geometry.
@@ -1515,7 +1515,7 @@ class E extends O {
1515
1515
  this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed();
1516
1516
  }
1517
1517
  }
1518
- function Ee(s, t, e, n) {
1518
+ function Pe(s, t, e, n) {
1519
1519
  e = e || 32;
1520
1520
  const i = [];
1521
1521
  for (let o = 0; o < e; ++o)
@@ -1523,7 +1523,7 @@ function Ee(s, t, e, n) {
1523
1523
  i,
1524
1524
  Gt(s, t, 2 * Math.PI * o / e, n)
1525
1525
  );
1526
- return i.push(i[0], i[1]), new E(i, "XY", [i.length]);
1526
+ return i.push(i[0], i[1]), new S(i, "XY", [i.length]);
1527
1527
  }
1528
1528
  function tt(s) {
1529
1529
  if (ot(s))
@@ -1540,7 +1540,7 @@ function tt(s) {
1540
1540
  t,
1541
1541
  e
1542
1542
  ];
1543
- return new E(o, "XY", [o.length]);
1543
+ return new S(o, "XY", [o.length]);
1544
1544
  }
1545
1545
  function U(s, t, e, n) {
1546
1546
  const i = G(t) / e[0], o = F(t) / e[1];
@@ -1549,7 +1549,7 @@ function U(s, t, e, n) {
1549
1549
  function D(s, t, e) {
1550
1550
  let n = Math.min(s, t);
1551
1551
  const i = 50;
1552
- return n *= Math.log(1 + i * Math.max(0, s / t - 1)) / i + 1, e && (n = Math.max(n, e), n /= Math.log(1 + i * Math.max(0, e / s - 1)) / i + 1), p(n, e / 2, t * 2);
1552
+ return n *= Math.log(1 + i * Math.max(0, s / t - 1)) / i + 1, e && (n = Math.max(n, e), n /= Math.log(1 + i * Math.max(0, e / s - 1)) / i + 1), y(n, e / 2, t * 2);
1553
1553
  }
1554
1554
  function ue(s, t, e, n) {
1555
1555
  return t = t !== void 0 ? t : !0, /**
@@ -1572,7 +1572,7 @@ function ue(s, t, e, n) {
1572
1572
  i,
1573
1573
  h,
1574
1574
  c
1575
- ) : p(i, c, h);
1575
+ ) : y(i, c, h);
1576
1576
  const u = Math.min(h, i), g = Math.floor(at(s, u, o));
1577
1577
  return s[g] > h && g < s.length - 1 ? s[g + 1] : s[g];
1578
1578
  }
@@ -1599,13 +1599,13 @@ function ce(s, t, e, n, i, o) {
1599
1599
  r,
1600
1600
  h,
1601
1601
  e
1602
- ) : p(r, e, h);
1602
+ ) : y(r, e, h);
1603
1603
  const u = 1e-9, g = Math.ceil(
1604
1604
  Math.log(t / h) / Math.log(s) - u
1605
1605
  ), d = -l * (0.5 - u) + 0.5, f = Math.min(h, r), R = Math.floor(
1606
1606
  Math.log(t / f) / Math.log(s) + d
1607
1607
  ), _ = Math.max(g, R), C = t / Math.pow(s, _);
1608
- return p(C, e, h);
1608
+ return y(C, e, h);
1609
1609
  }
1610
1610
  });
1611
1611
  }
@@ -1625,7 +1625,7 @@ function et(s, t, e, n, i) {
1625
1625
  l,
1626
1626
  i
1627
1627
  ) : s;
1628
- return !e || !a ? p(o, t, c) : D(
1628
+ return !e || !a ? y(o, t, c) : D(
1629
1629
  o,
1630
1630
  c,
1631
1631
  t
@@ -1676,7 +1676,7 @@ class Re extends it {
1676
1676
  * @param {ViewOptions} [options] View options.
1677
1677
  */
1678
1678
  constructor(t) {
1679
- super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = L(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Wt(), t.center && (t.center = y(t.center, this.projection_)), t.extent && (t.extent = v(t.extent, this.projection_)), this.applyOptions_(t);
1679
+ super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = L(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Wt(), t.center && (t.center = p(t.center, this.projection_)), t.extent && (t.extent = v(t.extent, this.projection_)), this.applyOptions_(t);
1680
1680
  }
1681
1681
  /**
1682
1682
  * Set up the view with the given options.
@@ -1687,9 +1687,9 @@ class Re extends it {
1687
1687
  for (const l in M)
1688
1688
  delete e[l];
1689
1689
  this.setProperties(e, !0);
1690
- const n = wt(t);
1690
+ const n = At(t);
1691
1691
  this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom;
1692
- const i = At(t), o = n.constraint, r = Nt(t);
1692
+ const i = wt(t), o = n.constraint, r = Nt(t);
1693
1693
  this.constraints_ = {
1694
1694
  center: i,
1695
1695
  resolution: o,
@@ -1771,10 +1771,10 @@ class Re extends it {
1771
1771
  const e = new Array(arguments.length);
1772
1772
  for (let n = 0; n < e.length; ++n) {
1773
1773
  let i = arguments[n];
1774
- i.center && (i = Object.assign({}, i), i.center = y(
1774
+ i.center && (i = Object.assign({}, i), i.center = p(
1775
1775
  i.center,
1776
1776
  this.getProjection()
1777
- )), i.anchor && (i = Object.assign({}, i), i.anchor = y(
1777
+ )), i.anchor && (i = Object.assign({}, i), i.anchor = p(
1778
1778
  i.anchor,
1779
1779
  this.getProjection()
1780
1780
  )), e[n] = i;
@@ -1793,7 +1793,7 @@ class Re extends it {
1793
1793
  h.center && this.setCenterInternal(h.center), h.zoom !== void 0 ? this.setZoom(h.zoom) : h.resolution && this.setResolution(h.resolution), h.rotation !== void 0 && this.setRotation(h.rotation);
1794
1794
  }
1795
1795
  if (i === e) {
1796
- n && S(n, !0);
1796
+ n && Z(n, !0);
1797
1797
  return;
1798
1798
  }
1799
1799
  let o = Date.now(), r = this.targetCenter_.slice(), l = this.targetResolution_, a = this.targetRotation_;
@@ -1844,7 +1844,7 @@ class Re extends it {
1844
1844
  let t;
1845
1845
  for (let e = 0, n = this.animations_.length; e < n; ++e) {
1846
1846
  const i = this.animations_[e];
1847
- if (i[0].callback && S(i[0].callback, !1), !t)
1847
+ if (i[0].callback && Z(i[0].callback, !1), !t)
1848
1848
  for (let o = 0, r = i.length; o < r; ++o) {
1849
1849
  const l = i[o];
1850
1850
  if (!l.complete) {
@@ -1916,7 +1916,7 @@ class Re extends it {
1916
1916
  if (o) {
1917
1917
  this.animations_[n] = null, this.setHint(I.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN;
1918
1918
  const r = i[0].callback;
1919
- r && S(r, !0);
1919
+ r && Z(r, !0);
1920
1920
  }
1921
1921
  }
1922
1922
  this.animations_ = this.animations_.filter(Boolean), e && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame(
@@ -2307,12 +2307,12 @@ class Re extends it {
2307
2307
  if (this.resolutions_?.length) {
2308
2308
  if (this.resolutions_.length === 1)
2309
2309
  return this.resolutions_[0];
2310
- const e = p(
2310
+ const e = y(
2311
2311
  Math.floor(t),
2312
2312
  0,
2313
2313
  this.resolutions_.length - 2
2314
2314
  ), n = this.resolutions_[e] / this.resolutions_[e + 1];
2315
- return this.resolutions_[e] / Math.pow(n, p(t - e, 0, 1));
2315
+ return this.resolutions_[e] / Math.pow(n, y(t - e, 0, 1));
2316
2316
  }
2317
2317
  return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_);
2318
2318
  }
@@ -2344,7 +2344,7 @@ class Re extends it {
2344
2344
  t.getExtent(),
2345
2345
  this.getProjection()
2346
2346
  );
2347
- n = tt(i), n.rotate(this.getRotation(), Z(i));
2347
+ n = tt(i), n.rotate(this.getRotation(), T(i));
2348
2348
  } else
2349
2349
  n = t;
2350
2350
  this.fitInternal(n, e);
@@ -2352,7 +2352,7 @@ class Re extends it {
2352
2352
  /**
2353
2353
  * Calculate rotated extent
2354
2354
  * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry.
2355
- * @return {import("./extent").Extent} The rotated extent for the geometry.
2355
+ * @return {import("./extent.js").Extent} The rotated extent for the geometry.
2356
2356
  */
2357
2357
  rotatedExtentForGeometry(t) {
2358
2358
  const e = this.getRotation(), n = Math.cos(e), i = Math.sin(-e), o = t.getFlatCoordinates(), r = t.getStride();
@@ -2380,7 +2380,7 @@ class Re extends it {
2380
2380
  n[1] - i[0] - i[2]
2381
2381
  ]);
2382
2382
  a = isNaN(a) ? r : Math.max(a, r), a = this.getConstrainedResolution(a, o ? 0 : 1);
2383
- const c = this.getRotation(), h = Math.sin(c), u = Math.cos(c), g = Z(l);
2383
+ const c = this.getRotation(), h = Math.sin(c), u = Math.cos(c), g = T(l);
2384
2384
  g[0] += (i[1] - i[3]) / 2 * a, g[1] += (i[0] - i[2]) / 2 * a;
2385
2385
  const d = g[0] * u - g[1] * h, f = g[1] * u + g[0] * h, R = this.getConstrainedCenter([d, f], a), _ = e.callback ? e.callback : Ht;
2386
2386
  e.duration !== void 0 ? this.animateInternal(
@@ -2391,7 +2391,7 @@ class Re extends it {
2391
2391
  easing: e.easing
2392
2392
  },
2393
2393
  _
2394
- ) : (this.targetResolution_ = a, this.targetCenter_ = R, this.applyTargetState_(!1, !0), S(_, !0));
2394
+ ) : (this.targetResolution_ = a, this.targetCenter_ = R, this.applyTargetState_(!1, !0), Z(_, !0));
2395
2395
  }
2396
2396
  /**
2397
2397
  * Center on coordinate and view position.
@@ -2402,7 +2402,7 @@ class Re extends it {
2402
2402
  */
2403
2403
  centerOn(t, e, n) {
2404
2404
  this.centerOnInternal(
2405
- y(t, this.getProjection()),
2405
+ p(t, this.getProjection()),
2406
2406
  e,
2407
2407
  n
2408
2408
  );
@@ -2486,7 +2486,7 @@ class Re extends it {
2486
2486
  * @api
2487
2487
  */
2488
2488
  adjustResolution(t, e) {
2489
- e = e && y(e, this.getProjection()), this.adjustResolutionInternal(t, e);
2489
+ e = e && p(e, this.getProjection()), this.adjustResolutionInternal(t, e);
2490
2490
  }
2491
2491
  /**
2492
2492
  * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution
@@ -2521,7 +2521,7 @@ class Re extends it {
2521
2521
  * @api
2522
2522
  */
2523
2523
  adjustRotation(t, e) {
2524
- e && (e = y(e, this.getProjection())), this.adjustRotationInternal(t, e);
2524
+ e && (e = p(e, this.getProjection())), this.adjustRotationInternal(t, e);
2525
2525
  }
2526
2526
  /**
2527
2527
  * @param {number} delta Relative value to add to the zoom rotation, in radians.
@@ -2542,7 +2542,7 @@ class Re extends it {
2542
2542
  */
2543
2543
  setCenter(t) {
2544
2544
  this.setCenterInternal(
2545
- t && y(t, this.getProjection())
2545
+ t && p(t, this.getProjection())
2546
2546
  );
2547
2547
  }
2548
2548
  /**
@@ -2653,7 +2653,7 @@ class Re extends it {
2653
2653
  center: a,
2654
2654
  resolution: l,
2655
2655
  duration: t,
2656
- easing: Qt,
2656
+ easing: Jt,
2657
2657
  anchor: n
2658
2658
  }));
2659
2659
  }
@@ -2675,7 +2675,7 @@ class Re extends it {
2675
2675
  * @api
2676
2676
  */
2677
2677
  endInteraction(t, e, n) {
2678
- n = n && y(n, this.getProjection()), this.endInteractionInternal(t, e, n);
2678
+ n = n && p(n, this.getProjection()), this.endInteractionInternal(t, e, n);
2679
2679
  }
2680
2680
  /**
2681
2681
  * Notify the View that an interaction has ended. The view state will be resolved
@@ -2732,12 +2732,12 @@ class Re extends it {
2732
2732
  return this.constraints_.resolution(t, e, n);
2733
2733
  }
2734
2734
  }
2735
- function S(s, t) {
2735
+ function Z(s, t) {
2736
2736
  setTimeout(function() {
2737
2737
  s(t);
2738
2738
  }, 0);
2739
2739
  }
2740
- function At(s) {
2740
+ function wt(s) {
2741
2741
  if (s.extent !== void 0) {
2742
2742
  const e = s.smoothExtentConstraint !== void 0 ? s.smoothExtentConstraint : !0;
2743
2743
  return $(s.extent, s.constrainOnlyCenter, e);
@@ -2749,7 +2749,7 @@ function At(s) {
2749
2749
  }
2750
2750
  return te;
2751
2751
  }
2752
- function wt(s) {
2752
+ function At(s) {
2753
2753
  let t, e, n, r = s.minZoom !== void 0 ? s.minZoom : P, l = s.maxZoom !== void 0 ? s.maxZoom : 28;
2754
2754
  const a = s.zoomFactor !== void 0 ? s.zoomFactor : 2, c = s.multiWorld !== void 0 ? s.multiWorld : !1, h = s.smoothResolutionConstraint !== void 0 ? s.smoothResolutionConstraint : !0, u = s.showFullExtent !== void 0 ? s.showFullExtent : !1, g = L(s.projection, "EPSG:3857"), d = g.getExtent();
2755
2755
  let f = s.constrainOnlyCenter, R = s.extent;
@@ -2771,7 +2771,7 @@ function wt(s) {
2771
2771
  const C = (d ? Math.max(G(d), F(d)) : (
2772
2772
  // use an extent that can fit the whole world if need be
2773
2773
  360 * Ot.degrees / g.getMetersPerUnit()
2774
- )) / Jt / Math.pow(2, P), m = C / Math.pow(2, 28 - P);
2774
+ )) / Qt / Math.pow(2, P), m = C / Math.pow(2, 28 - P);
2775
2775
  e = s.maxResolution, e !== void 0 ? r = 0 : e = C / Math.pow(a, r), n = s.minResolution, n === void 0 && (s.maxZoom !== void 0 ? s.maxResolution !== void 0 ? n = e / Math.pow(a, l) : n = C / Math.pow(a, l) : n = m), l = r + Math.floor(
2776
2776
  Math.log(e / n) / Math.log(a)
2777
2777
  ), n = e / Math.pow(a, l - r), s.constrainResolution ? t = ce(
@@ -2814,56 +2814,106 @@ function X(s, t, e, n, i) {
2814
2814
  const c = l * o - a * r, h = a * o + l * r;
2815
2815
  return [c, h];
2816
2816
  }
2817
- const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2817
+ function _e(s) {
2818
+ return function(t) {
2819
+ if (!t.resolutions)
2820
+ return t;
2821
+ const e = [...t.resolutions], n = e[e.length - 1];
2822
+ for (let i = 0; i < s; ++i)
2823
+ e.push(n / Math.pow(2, i + 1));
2824
+ return {
2825
+ ...t,
2826
+ resolutions: e
2827
+ };
2828
+ };
2829
+ }
2830
+ function me(s) {
2831
+ return function(t) {
2832
+ if (!t.resolutions)
2833
+ return t;
2834
+ const e = [...t.resolutions], n = e[0];
2835
+ for (let i = 0; i < s; ++i)
2836
+ e.unshift(n * Math.pow(2, i + 1));
2837
+ return {
2838
+ ...t,
2839
+ resolutions: e
2840
+ };
2841
+ };
2842
+ }
2843
+ function Ce() {
2844
+ return function(s) {
2845
+ if (!s.extent)
2846
+ return s;
2847
+ const t = T(s.extent), e = { ...s, center: t };
2848
+ return delete e.extent, e;
2849
+ };
2850
+ }
2851
+ function xe(s) {
2852
+ return function(t) {
2853
+ return { ...t, zoom: s };
2854
+ };
2855
+ }
2856
+ async function Me(s, ...t) {
2857
+ let e = await s.getView();
2858
+ for (const n of t)
2859
+ e = n(e);
2860
+ return e;
2861
+ }
2862
+ const Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2818
2863
  __proto__: null,
2819
- createCenterConstraint: At,
2820
- createResolutionConstraint: wt,
2864
+ createCenterConstraint: wt,
2865
+ createResolutionConstraint: At,
2821
2866
  createRotationConstraint: Nt,
2822
2867
  default: Re,
2823
- isNoopAnimation: jt
2868
+ getView: Me,
2869
+ isNoopAnimation: jt,
2870
+ withExtentCenter: Ce,
2871
+ withHigherResolutions: _e,
2872
+ withLowerResolutions: me,
2873
+ withZoom: xe
2824
2874
  }, Symbol.toStringTag, { value: "Module" }));
2825
2875
  export {
2826
- A,
2827
- Ce as B,
2828
- Q as C,
2829
- It as D,
2876
+ we as A,
2877
+ ve as B,
2878
+ gt as C,
2879
+ Ae as D,
2830
2880
  b as E,
2831
- re as F,
2881
+ Ze as F,
2832
2882
  oe as G,
2833
- Ee as H,
2834
- Re as I,
2835
- M as J,
2836
- tt as K,
2837
- T as L,
2838
- ge as M,
2839
- ve as N,
2883
+ yt as H,
2884
+ Ee as I,
2885
+ ee as J,
2886
+ w as K,
2887
+ E as L,
2888
+ ht as M,
2889
+ Ie as N,
2840
2890
  V as P,
2841
2891
  O as S,
2842
- I as V,
2843
- ft as a,
2844
- Mt as b,
2845
- _t as c,
2846
- ae as d,
2892
+ Re as V,
2893
+ S as a,
2894
+ Xe as b,
2895
+ I as c,
2896
+ M as d,
2847
2897
  dt as e,
2848
2898
  Rt as f,
2849
- xt as g,
2850
- Ae as h,
2851
- Ct as i,
2852
- mt as j,
2853
- Me as k,
2854
- pe as l,
2855
- gt as m,
2856
- xe as n,
2857
- Fe as o,
2858
- Ie as p,
2859
- Ne as q,
2860
- ee as r,
2861
- je as s,
2862
- we as t,
2863
- E as u,
2864
- ye as v,
2865
- yt as w,
2866
- Te as x,
2867
- ht as y,
2868
- pt as z
2899
+ Ne as g,
2900
+ ft as h,
2901
+ Pe as i,
2902
+ ae as j,
2903
+ _t as k,
2904
+ mt as l,
2905
+ je as m,
2906
+ ge as n,
2907
+ Mt as o,
2908
+ Te as p,
2909
+ tt as q,
2910
+ pt as r,
2911
+ Se as s,
2912
+ re as t,
2913
+ J as u,
2914
+ Ct as v,
2915
+ xt as w,
2916
+ ze as x,
2917
+ Fe as y,
2918
+ It as z
2869
2919
  };