@datagouv/components-next 1.0.1 → 1.0.2-dev.1
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-BNCDn-8E.js → Control-DuZJdKV_.js} +1 -1
- package/dist/{Datafair.client-B5lBpOl8.js → Datafair.client-E5D6ePRC.js} +1 -1
- package/dist/{Event-BOgJUhNR.js → Event--kp8kMdJ.js} +21 -21
- package/dist/{Image-BN-4XkIn.js → Image-34hvypZI.js} +114 -58
- package/dist/{JsonPreview.client-Doz1Z0BS.js → JsonPreview.client-C-6eBbPw.js} +1 -1
- package/dist/{Map-BdT3i2C4.js → Map-BjUnLyj8.js} +1534 -1466
- package/dist/{MapContainer.client-oiieO8H-.js → MapContainer.client-DRkAmdOc.js} +7 -7
- package/dist/{OSM-CamriM9b.js → OSM-s40W6sQ2.js} +22 -12
- package/dist/{PdfPreview.client-CdAhkDFJ.js → PdfPreview.client-C-w6-w44.js} +1 -1
- package/dist/Pmtiles.client-BR7_ldHY.js +25190 -0
- package/dist/{ScaleLine-BiesrgOv.js → ScaleLine-KW-nXqp3.js} +2 -2
- package/dist/Swagger.client-D4-F6yEf.js +4 -0
- package/dist/{Tile-DCuqwNOI.js → Tile-DbNFNPfU.js} +189 -172
- package/dist/{TileImage-CmZf8EdU.js → TileImage-BsXBxMtq.js} +132 -102
- package/dist/{View-DcDc7N2K.js → View-BR92hTWP.js} +8 -8
- package/dist/{XmlPreview.client-CrjHf74q.js → XmlPreview.client-Dl2VCgXF.js} +2 -2
- package/dist/{common-C4rDcQpp.js → common-PJfpC179.js} +34 -33
- package/dist/components-next.css +4 -4
- package/dist/components-next.js +1 -1
- package/dist/components.css +1 -1
- package/dist/{index-Bbu9rOHt.js → index-SrYZwgCT.js} +11105 -6743
- package/dist/{main-CiH8ZmBI.js → main-B2kXxWRG.js} +28459 -28404
- package/dist/{proj-CKwYjU38.js → proj-DsetBcW7.js} +513 -498
- package/dist/{tilecoord-YW3qEH_j.js → tilecoord-Db24Px13.js} +242 -224
- package/dist/{vue3-xml-viewer.common-Bi_bsV6C.js → vue3-xml-viewer.common-BRxsqI9j.js} +1 -1
- package/package.json +2 -1
- package/dist/Pmtiles.client-B0v8tGJQ.js +0 -22812
- package/dist/Swagger.client-CsK65JnG.js +0 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { b as Y, e as f, d as
|
|
2
|
-
import { t as g, s as
|
|
3
|
-
import { aQ as
|
|
4
|
-
import { a as m,
|
|
1
|
+
import { b as Y, e as f, d as b, h as D, w as v, I as K, R as N, g as k } from "./tilecoord-Db24Px13.js";
|
|
2
|
+
import { t as g, s as W, T as _, W as q } from "./Image-34hvypZI.js";
|
|
3
|
+
import { aQ as H, an as $, q as j, N as V, a7 as B, P as F, S as x, D as E, M as J, F as Q, L as w, X as tt, aR as et, W as it, B as nt, a as R, al as rt, J as st, e as z, E as ot } from "./proj-DsetBcW7.js";
|
|
4
|
+
import { a as m, x as A, y as lt, D as at } from "./common-PJfpC179.js";
|
|
5
5
|
const T = [0, 0, 0], d = 5;
|
|
6
|
-
class
|
|
6
|
+
class X {
|
|
7
7
|
/**
|
|
8
8
|
* @param {Options} options Tile grid options.
|
|
9
9
|
*/
|
|
10
10
|
constructor(t) {
|
|
11
11
|
this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, m(
|
|
12
|
-
|
|
12
|
+
H(
|
|
13
13
|
this.resolutions_,
|
|
14
14
|
/**
|
|
15
15
|
* @param {number} a First resolution
|
|
@@ -35,7 +35,7 @@ class p {
|
|
|
35
35
|
"Number of `origins` and `resolutions` must be equal"
|
|
36
36
|
));
|
|
37
37
|
const i = t.extent;
|
|
38
|
-
i !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ =
|
|
38
|
+
i !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = $(i)), m(
|
|
39
39
|
!this.origin_ && this.origins_ || this.origin_ && !this.origins_,
|
|
40
40
|
"Either `origin` or `origins` must be configured, never both"
|
|
41
41
|
), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, m(
|
|
@@ -194,8 +194,8 @@ class p {
|
|
|
194
194
|
const a = Math.pow(this.zoomFactor_, e - n), h = Math.floor(r * a), u = Math.floor(s * a);
|
|
195
195
|
if (e < n)
|
|
196
196
|
return f(h, h, u, u, i);
|
|
197
|
-
const c = Math.floor(a * (r + 1)) - 1,
|
|
198
|
-
return f(h, c, u,
|
|
197
|
+
const c = Math.floor(a * (r + 1)) - 1, S = Math.floor(a * (s + 1)) - 1;
|
|
198
|
+
return f(h, c, u, S, i);
|
|
199
199
|
}
|
|
200
200
|
const l = this.getTileCoordExtent(t, this.tmpExtent_);
|
|
201
201
|
return this.getTileRangeForExtentAndZ(l, e, i);
|
|
@@ -235,7 +235,7 @@ class p {
|
|
|
235
235
|
*/
|
|
236
236
|
getTileCoordExtent(t, e) {
|
|
237
237
|
const i = this.getOrigin(t[0]), n = this.getResolution(t[0]), r = g(this.getTileSize(t[0]), this.tmpSize_), s = i[0] + t[1] * r[0] * n, l = i[1] - (t[2] + 1) * r[1] * n, a = s + r[0] * n, h = l + r[1] * n;
|
|
238
|
-
return
|
|
238
|
+
return j(s, l, a, h, e);
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
241
241
|
* Get the tile coordinate for the given map coordinate and resolution. This
|
|
@@ -273,7 +273,7 @@ class p {
|
|
|
273
273
|
getTileCoordForXYAndResolution_(t, e, i, n, r) {
|
|
274
274
|
const s = this.getZForResolution(i), l = i / this.getResolution(s), a = this.getOrigin(s), h = g(this.getTileSize(s), this.tmpSize_);
|
|
275
275
|
let u = l * (t - a[0]) / i / h[0], c = l * (a[1] - e) / i / h[1];
|
|
276
|
-
return n ? (u =
|
|
276
|
+
return n ? (u = F(u, d) - 1, c = F(c, d) - 1) : (u = x(u, d), c = x(c, d)), b(s, u, c, r);
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
279
|
* Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
|
|
@@ -293,7 +293,7 @@ class p {
|
|
|
293
293
|
getTileCoordForXYAndZ_(t, e, i, n, r) {
|
|
294
294
|
const s = this.getOrigin(i), l = this.getResolution(i), a = g(this.getTileSize(i), this.tmpSize_);
|
|
295
295
|
let h = (t - s[0]) / l / a[0], u = (s[1] - e) / l / a[1];
|
|
296
|
-
return n ? (h =
|
|
296
|
+
return n ? (h = F(h, d) - 1, u = F(u, d) - 1) : (h = x(h, d), u = x(u, d)), b(i, h, u, r);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
* Get a tile coordinate given a map coordinate and zoom level.
|
|
@@ -355,7 +355,7 @@ class p {
|
|
|
355
355
|
* @api
|
|
356
356
|
*/
|
|
357
357
|
getZForResolution(t, e) {
|
|
358
|
-
const i =
|
|
358
|
+
const i = V(
|
|
359
359
|
this.resolutions_,
|
|
360
360
|
t,
|
|
361
361
|
e || 0
|
|
@@ -369,7 +369,7 @@ class p {
|
|
|
369
369
|
* @return {boolean} The tile with the provided tile coordinate intersects the given viewport.
|
|
370
370
|
*/
|
|
371
371
|
tileCoordIntersectsViewport(t, e) {
|
|
372
|
-
return
|
|
372
|
+
return lt(
|
|
373
373
|
e,
|
|
374
374
|
0,
|
|
375
375
|
e.length,
|
|
@@ -388,67 +388,67 @@ class p {
|
|
|
388
388
|
this.fullTileRanges_ = i;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function U(o) {
|
|
392
392
|
let t = o.getDefaultTileGrid();
|
|
393
|
-
return t || (t =
|
|
393
|
+
return t || (t = ct(o), o.setDefaultTileGrid(t)), t;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
const i = t[0], n = o.getTileCoordCenter(t), r =
|
|
397
|
-
if (!
|
|
398
|
-
const s =
|
|
395
|
+
function ht(o, t, e) {
|
|
396
|
+
const i = t[0], n = o.getTileCoordCenter(t), r = Z(e);
|
|
397
|
+
if (!tt(r, n)) {
|
|
398
|
+
const s = w(r), l = Math.ceil(
|
|
399
399
|
(r[0] - n[0]) / s
|
|
400
400
|
);
|
|
401
401
|
return n[0] += s * l, o.getTileCoordForCoordAndZ(n, i);
|
|
402
402
|
}
|
|
403
403
|
return t;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ut(o, t, e, i) {
|
|
406
406
|
i = i !== void 0 ? i : "top-left";
|
|
407
|
-
const n =
|
|
408
|
-
return new
|
|
407
|
+
const n = p(o, t, e);
|
|
408
|
+
return new X({
|
|
409
409
|
extent: o,
|
|
410
|
-
origin:
|
|
410
|
+
origin: et(o, i),
|
|
411
411
|
resolutions: n,
|
|
412
412
|
tileSize: e
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
const t = o || {}, e = t.extent ||
|
|
415
|
+
function jt(o) {
|
|
416
|
+
const t = o || {}, e = t.extent || E("EPSG:3857").getExtent(), i = {
|
|
417
417
|
extent: e,
|
|
418
418
|
minZoom: t.minZoom,
|
|
419
419
|
tileSize: t.tileSize,
|
|
420
|
-
resolutions:
|
|
420
|
+
resolutions: p(
|
|
421
421
|
e,
|
|
422
422
|
t.maxZoom,
|
|
423
423
|
t.tileSize,
|
|
424
424
|
t.maxResolution
|
|
425
425
|
)
|
|
426
426
|
};
|
|
427
|
-
return new
|
|
427
|
+
return new X(i);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
t = t !== void 0 ? t :
|
|
431
|
-
const n =
|
|
429
|
+
function p(o, t, e, i) {
|
|
430
|
+
t = t !== void 0 ? t : at, e = g(e !== void 0 ? e : A);
|
|
431
|
+
const n = Q(o), r = w(o);
|
|
432
432
|
i = i > 0 ? i : Math.max(r / e[0], n / e[1]);
|
|
433
433
|
const s = t + 1, l = new Array(s);
|
|
434
434
|
for (let a = 0; a < s; ++a)
|
|
435
435
|
l[a] = i / Math.pow(2, a);
|
|
436
436
|
return l;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
const n =
|
|
440
|
-
return
|
|
438
|
+
function ct(o, t, e, i) {
|
|
439
|
+
const n = Z(o);
|
|
440
|
+
return ut(n, t, e, i);
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
o =
|
|
442
|
+
function Z(o) {
|
|
443
|
+
o = E(o);
|
|
444
444
|
let t = o.getExtent();
|
|
445
445
|
if (!t) {
|
|
446
|
-
const e = 180 *
|
|
447
|
-
t =
|
|
446
|
+
const e = 180 * J.degrees / o.getMetersPerUnit();
|
|
447
|
+
t = j(-e, -e, e, e);
|
|
448
448
|
}
|
|
449
449
|
return t;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function wt(o, t) {
|
|
452
452
|
const e = [];
|
|
453
453
|
Object.keys(t).forEach(function(n) {
|
|
454
454
|
t[n] !== null && t[n] !== void 0 && e.push(n + "=" + encodeURIComponent(t[n]));
|
|
@@ -456,9 +456,9 @@ function jt(o, t) {
|
|
|
456
456
|
const i = e.join("&");
|
|
457
457
|
return o = o.replace(/[?&]$/, ""), o += o.includes("?") ? "&" : "?", o + i;
|
|
458
458
|
}
|
|
459
|
-
const
|
|
460
|
-
function
|
|
461
|
-
return o.replace(
|
|
459
|
+
const dt = /\{z\}/g, gt = /\{x\}/g, ft = /\{y\}/g, Tt = /\{-y\}/g;
|
|
460
|
+
function mt(o, t, e, i, n) {
|
|
461
|
+
return o.replace(dt, t.toString()).replace(gt, e.toString()).replace(ft, i.toString()).replace(Tt, function() {
|
|
462
462
|
if (n === void 0)
|
|
463
463
|
throw new Error(
|
|
464
464
|
"If the URL template has a {-y} placeholder, the grid extent must be known"
|
|
@@ -466,7 +466,7 @@ function gt(o, t, e, i, n) {
|
|
|
466
466
|
return (n - i).toString();
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function _t(o) {
|
|
470
470
|
const t = [];
|
|
471
471
|
let e = /\{([a-z])-([a-z])\}/.exec(o);
|
|
472
472
|
if (e) {
|
|
@@ -484,7 +484,7 @@ function ft(o) {
|
|
|
484
484
|
}
|
|
485
485
|
return t.push(o), t;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Ft(o, t) {
|
|
488
488
|
return (
|
|
489
489
|
/**
|
|
490
490
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
|
|
@@ -501,17 +501,17 @@ function Tt(o, t) {
|
|
|
501
501
|
const l = t.getFullTileRange(s);
|
|
502
502
|
l && (r = l.getHeight() - 1);
|
|
503
503
|
}
|
|
504
|
-
return
|
|
504
|
+
return mt(o, s, e[1], e[2], r);
|
|
505
505
|
})
|
|
506
506
|
);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function xt(o, t) {
|
|
509
509
|
const e = o.length, i = new Array(e);
|
|
510
510
|
for (let n = 0; n < e; ++n)
|
|
511
|
-
i[n] =
|
|
512
|
-
return
|
|
511
|
+
i[n] = Ft(o[n], t);
|
|
512
|
+
return Rt(i);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function Rt(o) {
|
|
515
515
|
return o.length === 1 ? o[0] : (
|
|
516
516
|
/**
|
|
517
517
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile Coordinate.
|
|
@@ -522,17 +522,17 @@ function _t(o) {
|
|
|
522
522
|
(function(t, e, i) {
|
|
523
523
|
if (!t)
|
|
524
524
|
return;
|
|
525
|
-
const n =
|
|
525
|
+
const n = D(t), r = it(n, o.length);
|
|
526
526
|
return o[r](t, e, i);
|
|
527
527
|
})
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class Et extends nt {
|
|
531
531
|
/**
|
|
532
532
|
* @param {Options} options Source options.
|
|
533
533
|
*/
|
|
534
534
|
constructor(t) {
|
|
535
|
-
super(), this.projection =
|
|
535
|
+
super(), this.projection = E(t.projection), this.attributions_ = G(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible ?? !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null;
|
|
536
536
|
const e = this;
|
|
537
537
|
this.viewPromise_ = new Promise(function(i, n) {
|
|
538
538
|
e.viewResolver = i, e.viewRejector = n;
|
|
@@ -609,7 +609,7 @@ class Ft extends tt {
|
|
|
609
609
|
* @api
|
|
610
610
|
*/
|
|
611
611
|
setAttributions(t) {
|
|
612
|
-
this.attributions_ =
|
|
612
|
+
this.attributions_ = G(t), this.changed();
|
|
613
613
|
}
|
|
614
614
|
/**
|
|
615
615
|
* Set the state of the source.
|
|
@@ -619,10 +619,10 @@ class Ft extends tt {
|
|
|
619
619
|
this.state_ = t, this.changed();
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function G(o) {
|
|
623
623
|
return o ? typeof o == "function" ? o : (Array.isArray(o) || (o = [o]), (t) => o) : null;
|
|
624
624
|
}
|
|
625
|
-
class
|
|
625
|
+
class St extends Et {
|
|
626
626
|
/**
|
|
627
627
|
* @param {Options} options SourceTile source options.
|
|
628
628
|
*/
|
|
@@ -636,7 +636,7 @@ class xt extends Ft {
|
|
|
636
636
|
interpolate: t.interpolate
|
|
637
637
|
}), this.on, this.once, this.un, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null;
|
|
638
638
|
const e = [256, 256];
|
|
639
|
-
this.tileGrid && g(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tmpSize = [0, 0], this.key_ = t.key ||
|
|
639
|
+
this.tileGrid && g(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tmpSize = [0, 0], this.key_ = t.key || R(this), this.tileOptions = {
|
|
640
640
|
transition: t.transition,
|
|
641
641
|
interpolate: t.interpolate
|
|
642
642
|
}, this.zDirection = t.zDirection ? t.zDirection : 0;
|
|
@@ -679,10 +679,11 @@ class xt extends Ft {
|
|
|
679
679
|
* @param {number} y Tile coordinate y.
|
|
680
680
|
* @param {number} pixelRatio Pixel ratio.
|
|
681
681
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
682
|
+
* @param {import("../structs/LRUCache.js").default<import("../Tile.js").default>} [tileCache] Tile cache.
|
|
682
683
|
* @return {TileType|null} Tile.
|
|
683
684
|
*/
|
|
684
|
-
getTile(t, e, i, n, r) {
|
|
685
|
-
return
|
|
685
|
+
getTile(t, e, i, n, r, s) {
|
|
686
|
+
return rt();
|
|
686
687
|
}
|
|
687
688
|
/**
|
|
688
689
|
* Return the tile grid of the tile source.
|
|
@@ -697,7 +698,7 @@ class xt extends Ft {
|
|
|
697
698
|
* @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
|
|
698
699
|
*/
|
|
699
700
|
getTileGridForProjection(t) {
|
|
700
|
-
return this.tileGrid ? this.tileGrid :
|
|
701
|
+
return this.tileGrid ? this.tileGrid : U(t);
|
|
701
702
|
}
|
|
702
703
|
/**
|
|
703
704
|
* Get the tile pixel ratio for this source. Subclasses may override this
|
|
@@ -717,7 +718,7 @@ class xt extends Ft {
|
|
|
717
718
|
*/
|
|
718
719
|
getTilePixelSize(t, e, i) {
|
|
719
720
|
const n = this.getTileGridForProjection(i), r = this.getTilePixelRatio(e), s = g(n.getTileSize(t), this.tmpSize);
|
|
720
|
-
return r == 1 ? s :
|
|
721
|
+
return r == 1 ? s : W(s, r, this.tmpSize);
|
|
721
722
|
}
|
|
722
723
|
/**
|
|
723
724
|
* Returns a tile coordinate wrapped around the x-axis. When the tile coordinate
|
|
@@ -730,7 +731,7 @@ class xt extends Ft {
|
|
|
730
731
|
*/
|
|
731
732
|
getTileCoordForTileUrlFunction(t, e) {
|
|
732
733
|
const i = e !== void 0 ? e : this.getProjection(), n = e !== void 0 ? this.getTileGridForProjection(i) : this.tileGrid || this.getTileGridForProjection(i);
|
|
733
|
-
return this.getWrapX() && i.isGlobal() && (t =
|
|
734
|
+
return this.getWrapX() && i.isGlobal() && (t = ht(n, t, i)), v(t, n) ? t : null;
|
|
734
735
|
}
|
|
735
736
|
/**
|
|
736
737
|
* Remove all cached reprojected tiles from the source. The next render cycle will create new tiles.
|
|
@@ -745,7 +746,7 @@ class xt extends Ft {
|
|
|
745
746
|
this.clear(), super.refresh();
|
|
746
747
|
}
|
|
747
748
|
}
|
|
748
|
-
class
|
|
749
|
+
class zt extends st {
|
|
749
750
|
/**
|
|
750
751
|
* @param {string} type Type.
|
|
751
752
|
* @param {import("../Tile.js").default} tile The tile.
|
|
@@ -777,7 +778,7 @@ const P = {
|
|
|
777
778
|
*/
|
|
778
779
|
TILELOADERROR: "tileloaderror"
|
|
779
780
|
};
|
|
780
|
-
class
|
|
781
|
+
class y extends St {
|
|
781
782
|
/**
|
|
782
783
|
* @param {Options} options Image tile options.
|
|
783
784
|
*/
|
|
@@ -795,7 +796,7 @@ class C extends xt {
|
|
|
795
796
|
key: t.key,
|
|
796
797
|
attributionsCollapsible: t.attributionsCollapsible,
|
|
797
798
|
zDirection: t.zDirection
|
|
798
|
-
}), this.generateTileUrlFunction_ = this.tileUrlFunction ===
|
|
799
|
+
}), this.generateTileUrlFunction_ = this.tileUrlFunction === y.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {};
|
|
799
800
|
}
|
|
800
801
|
/**
|
|
801
802
|
* Deprecated. Use an ImageTile source instead.
|
|
@@ -835,9 +836,9 @@ class C extends xt {
|
|
|
835
836
|
const e = (
|
|
836
837
|
/** @type {import("../Tile.js").default} */
|
|
837
838
|
t.target
|
|
838
|
-
), i =
|
|
839
|
+
), i = R(e), n = e.getState();
|
|
839
840
|
let r;
|
|
840
|
-
n == _.LOADING ? (this.tileLoadingKeys_[i] = !0, r = P.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], r = n == _.ERROR ? P.TILELOADERROR : n == _.LOADED ? P.TILELOADEND : void 0), r != null && this.dispatchEvent(new
|
|
841
|
+
n == _.LOADING ? (this.tileLoadingKeys_[i] = !0, r = P.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], r = n == _.ERROR ? P.TILELOADERROR : n == _.LOADED ? P.TILELOADEND : void 0), r != null && this.dispatchEvent(new zt(r, e));
|
|
841
842
|
}
|
|
842
843
|
/**
|
|
843
844
|
* Deprecated. Use an ImageTile source instead.
|
|
@@ -864,7 +865,7 @@ class C extends xt {
|
|
|
864
865
|
* @api
|
|
865
866
|
*/
|
|
866
867
|
setUrl(t) {
|
|
867
|
-
const e =
|
|
868
|
+
const e = _t(t);
|
|
868
869
|
this.urls = e, this.setUrls(e);
|
|
869
870
|
}
|
|
870
871
|
/**
|
|
@@ -877,7 +878,7 @@ class C extends xt {
|
|
|
877
878
|
this.urls = t;
|
|
878
879
|
const e = t.join(`
|
|
879
880
|
`);
|
|
880
|
-
this.generateTileUrlFunction_ ? this.setTileUrlFunction(
|
|
881
|
+
this.generateTileUrlFunction_ ? this.setTileUrlFunction(xt(t, this.tileGrid), e) : this.setKey(e);
|
|
881
882
|
}
|
|
882
883
|
/**
|
|
883
884
|
* @param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
@@ -888,7 +889,7 @@ class C extends xt {
|
|
|
888
889
|
tileUrlFunction(t, e, i) {
|
|
889
890
|
}
|
|
890
891
|
}
|
|
891
|
-
class
|
|
892
|
+
class At extends y {
|
|
892
893
|
/**
|
|
893
894
|
* @param {!Options} options Image tile options.
|
|
894
895
|
*/
|
|
@@ -899,7 +900,7 @@ class bt extends C {
|
|
|
899
900
|
projection: t.projection,
|
|
900
901
|
state: t.state,
|
|
901
902
|
tileGrid: t.tileGrid,
|
|
902
|
-
tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction :
|
|
903
|
+
tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : Pt,
|
|
903
904
|
tilePixelRatio: t.tilePixelRatio,
|
|
904
905
|
tileUrlFunction: t.tileUrlFunction,
|
|
905
906
|
url: t.url,
|
|
@@ -910,7 +911,7 @@ class bt extends C {
|
|
|
910
911
|
key: t.key,
|
|
911
912
|
attributionsCollapsible: t.attributionsCollapsible,
|
|
912
913
|
zDirection: t.zDirection
|
|
913
|
-
}), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass :
|
|
914
|
+
}), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : K, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1;
|
|
914
915
|
}
|
|
915
916
|
/**
|
|
916
917
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
@@ -944,8 +945,8 @@ class bt extends C {
|
|
|
944
945
|
const e = this.getProjection();
|
|
945
946
|
if (this.tileGrid && (!e || z(e, t)))
|
|
946
947
|
return this.tileGrid;
|
|
947
|
-
const i =
|
|
948
|
-
return i in this.tileGridForProjection || (this.tileGridForProjection[i] =
|
|
948
|
+
const i = R(t);
|
|
949
|
+
return i in this.tileGridForProjection || (this.tileGridForProjection[i] = U(t)), this.tileGridForProjection[i];
|
|
949
950
|
}
|
|
950
951
|
/**
|
|
951
952
|
* @param {number} z Tile coordinate z.
|
|
@@ -969,7 +970,7 @@ class bt extends C {
|
|
|
969
970
|
this.tileLoadFunction,
|
|
970
971
|
this.tileOptions
|
|
971
972
|
);
|
|
972
|
-
return u.key = s, u.addEventListener(
|
|
973
|
+
return u.key = s, u.addEventListener(ot.CHANGE, this.handleTileChange.bind(this)), u;
|
|
973
974
|
}
|
|
974
975
|
/**
|
|
975
976
|
* @param {number} z Tile coordinate z.
|
|
@@ -977,37 +978,38 @@ class bt extends C {
|
|
|
977
978
|
* @param {number} y Tile coordinate y.
|
|
978
979
|
* @param {number} pixelRatio Pixel ratio.
|
|
979
980
|
* @param {import("../proj/Projection.js").default} projection Projection.
|
|
981
|
+
* @param {import("../structs/LRUCache.js").default<import("../Tile.js").default>} [tileCache] Tile cache.
|
|
980
982
|
* @return {!(ImageTile|ReprojTile)} Tile.
|
|
981
983
|
* @override
|
|
982
984
|
*/
|
|
983
|
-
getTile(t, e, i, n, r) {
|
|
984
|
-
const
|
|
985
|
-
if (!
|
|
985
|
+
getTile(t, e, i, n, r, s) {
|
|
986
|
+
const l = this.getProjection();
|
|
987
|
+
if (!l || !r || z(l, r))
|
|
986
988
|
return this.getTileInternal(
|
|
987
989
|
t,
|
|
988
990
|
e,
|
|
989
991
|
i,
|
|
990
992
|
n,
|
|
991
|
-
|
|
993
|
+
l || r
|
|
992
994
|
);
|
|
993
|
-
const
|
|
994
|
-
|
|
995
|
+
const a = [t, e, i], h = this.getKey(), u = this.getTileGridForProjection(l), c = this.getTileGridForProjection(r), S = this.getTileCoordForTileUrlFunction(
|
|
996
|
+
a,
|
|
995
997
|
r
|
|
996
|
-
),
|
|
997
|
-
s,
|
|
998
|
-
h,
|
|
999
|
-
r,
|
|
1000
|
-
u,
|
|
998
|
+
), C = new N(
|
|
1001
999
|
l,
|
|
1000
|
+
u,
|
|
1001
|
+
r,
|
|
1002
1002
|
c,
|
|
1003
|
+
a,
|
|
1004
|
+
S,
|
|
1003
1005
|
this.getTilePixelRatio(n),
|
|
1004
1006
|
this.getGutter(),
|
|
1005
|
-
(
|
|
1007
|
+
(O, L, I, M) => this.getTileInternal(O, L, I, M, l, s),
|
|
1006
1008
|
this.reprojectionErrorThreshold_,
|
|
1007
1009
|
this.renderReprojectionEdges_,
|
|
1008
1010
|
this.tileOptions
|
|
1009
1011
|
);
|
|
1010
|
-
return
|
|
1012
|
+
return C.key = h, C;
|
|
1011
1013
|
}
|
|
1012
1014
|
/**
|
|
1013
1015
|
* @param {number} z Tile coordinate z.
|
|
@@ -1015,12 +1017,19 @@ class bt extends C {
|
|
|
1015
1017
|
* @param {number} y Tile coordinate y.
|
|
1016
1018
|
* @param {number} pixelRatio Pixel ratio.
|
|
1017
1019
|
* @param {!import("../proj/Projection.js").default} projection Projection.
|
|
1020
|
+
* @param {import("../structs/LRUCache.js").default<import("../Tile.js").default>} [tileCache] Tile cache.
|
|
1018
1021
|
* @return {!ImageTile} Tile.
|
|
1019
1022
|
* @protected
|
|
1020
1023
|
*/
|
|
1021
|
-
getTileInternal(t, e, i, n, r) {
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
+
getTileInternal(t, e, i, n, r, s) {
|
|
1025
|
+
const l = this.getKey(), a = k(this, l, t, e, i);
|
|
1026
|
+
if (s && s.containsKey(a))
|
|
1027
|
+
return (
|
|
1028
|
+
/** @type {!ImageTile} */
|
|
1029
|
+
s.get(a)
|
|
1030
|
+
);
|
|
1031
|
+
const h = this.createTile_(t, e, i, n, r, l);
|
|
1032
|
+
return s?.set(a, h), h;
|
|
1024
1033
|
}
|
|
1025
1034
|
/**
|
|
1026
1035
|
* Sets whether to render reprojection edges or not (usually for debugging).
|
|
@@ -1043,25 +1052,46 @@ class bt extends C {
|
|
|
1043
1052
|
* @api
|
|
1044
1053
|
*/
|
|
1045
1054
|
setTileGridForProjection(t, e) {
|
|
1046
|
-
const i =
|
|
1055
|
+
const i = E(t);
|
|
1047
1056
|
if (i) {
|
|
1048
|
-
const n =
|
|
1057
|
+
const n = R(i);
|
|
1049
1058
|
n in this.tileGridForProjection || (this.tileGridForProjection[n] = e);
|
|
1050
1059
|
}
|
|
1051
1060
|
}
|
|
1052
1061
|
}
|
|
1053
|
-
function
|
|
1062
|
+
function Pt(o, t) {
|
|
1063
|
+
if (q) {
|
|
1064
|
+
const e = o.getCrossOrigin();
|
|
1065
|
+
let i = "same-origin", n = "same-origin";
|
|
1066
|
+
e === "anonymous" || e === "" ? (i = "cors", n = "omit") : e === "use-credentials" && (i = "cors", n = "include"), fetch(t, {
|
|
1067
|
+
mode: i,
|
|
1068
|
+
credentials: n
|
|
1069
|
+
}).then((r) => {
|
|
1070
|
+
if (!r.ok)
|
|
1071
|
+
throw new Error(`HTTP ${r.status}`);
|
|
1072
|
+
return r.blob();
|
|
1073
|
+
}).then((r) => createImageBitmap(r)).then((r) => {
|
|
1074
|
+
const s = o.getImage();
|
|
1075
|
+
s.width = r.width, s.height = r.height, /** @type {OffscreenCanvas} */
|
|
1076
|
+
s.getContext("2d").drawImage(r, 0, 0), r.close?.(), s.dispatchEvent(new Event("load"));
|
|
1077
|
+
}).catch(() => {
|
|
1078
|
+
o.getImage().dispatchEvent(new Event("error"));
|
|
1079
|
+
});
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1054
1082
|
o.getImage().src = t;
|
|
1055
1083
|
}
|
|
1056
1084
|
export {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1085
|
+
Et as S,
|
|
1086
|
+
At as T,
|
|
1087
|
+
y as U,
|
|
1088
|
+
X as a,
|
|
1089
|
+
wt as b,
|
|
1090
|
+
jt as c,
|
|
1091
|
+
Pt as d,
|
|
1092
|
+
Z as e,
|
|
1065
1093
|
_t as f,
|
|
1066
|
-
|
|
1094
|
+
U as g,
|
|
1095
|
+
Rt as h,
|
|
1096
|
+
xt as i
|
|
1067
1097
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as
|
|
1
|
+
import { a7 as p, B as it, n as jt, G as Ft, al as x, v as Tt, aL as Et, D as vt, F, ak as W, m as St, x as S, z as j, o as Zt, aM as zt, s as st, C as Pt, A as Xt, a2 as Yt, K as ot, y as bt, N as rt, L as G, am as Gt, aN as L, M as Lt, af as Y, ac as y, j as E, W as q, aE as Ot, aO as Vt, ah as K, k as kt, Q as Ut, V as Dt, aP as Ht } from "./proj-DsetBcW7.js";
|
|
2
|
+
import { d as Wt, e as qt, u as at, v as Kt, w as $t, a as N, j as Bt, x as Jt } from "./common-PJfpC179.js";
|
|
3
3
|
const I = {
|
|
4
4
|
ANIMATING: 0,
|
|
5
5
|
INTERACTING: 1
|
|
@@ -83,7 +83,7 @@ function ne(s, t, e, n, i, r, o) {
|
|
|
83
83
|
}
|
|
84
84
|
return o && o.length != l && (o.length = l), o;
|
|
85
85
|
}
|
|
86
|
-
const B =
|
|
86
|
+
const B = qt(), ie = [NaN, NaN];
|
|
87
87
|
class se extends it {
|
|
88
88
|
constructor() {
|
|
89
89
|
super(), this.extent_ = jt(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ft(
|
|
@@ -284,7 +284,7 @@ class se extends it {
|
|
|
284
284
|
transform(t, e) {
|
|
285
285
|
const n = vt(t), i = n.getUnits() == "tile-pixels" ? function(r, o, l) {
|
|
286
286
|
const a = n.getExtent(), c = n.getWorldExtent(), h = F(c) / F(a);
|
|
287
|
-
|
|
287
|
+
Wt(
|
|
288
288
|
B,
|
|
289
289
|
c[0],
|
|
290
290
|
c[3],
|
|
@@ -301,9 +301,9 @@ class se extends it {
|
|
|
301
301
|
l,
|
|
302
302
|
B,
|
|
303
303
|
o
|
|
304
|
-
), g =
|
|
304
|
+
), g = W(n, e);
|
|
305
305
|
return g ? g(u, u, l) : u;
|
|
306
|
-
} :
|
|
306
|
+
} : W(n, e);
|
|
307
307
|
return this.applyTransform(i), this;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
@@ -1802,7 +1802,7 @@ class fe extends it {
|
|
|
1802
1802
|
};
|
|
1803
1803
|
if (h.center && (u.sourceCenter = o, u.targetCenter = h.center.slice(), o = u.targetCenter), h.zoom !== void 0 ? (u.sourceResolution = l, u.targetResolution = this.getResolutionForZoom(h.zoom), l = u.targetResolution) : h.resolution && (u.sourceResolution = l, u.targetResolution = h.resolution, l = u.targetResolution), h.rotation !== void 0) {
|
|
1804
1804
|
u.sourceRotation = a;
|
|
1805
|
-
const g =
|
|
1805
|
+
const g = q(h.rotation - a + Math.PI, 2 * Math.PI) - Math.PI;
|
|
1806
1806
|
u.targetRotation = a + g, a = u.targetRotation;
|
|
1807
1807
|
}
|
|
1808
1808
|
Nt(u) ? u.complete = !0 : r += u.duration, c.push(u);
|
|
@@ -1887,7 +1887,7 @@ class fe extends it {
|
|
|
1887
1887
|
this.nextResolution_ = a.targetResolution, this.targetResolution_ = g, this.applyTargetState_(!0);
|
|
1888
1888
|
}
|
|
1889
1889
|
if (a.sourceRotation !== void 0 && a.targetRotation !== void 0) {
|
|
1890
|
-
const g = u === 1 ?
|
|
1890
|
+
const g = u === 1 ? q(a.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : a.sourceRotation + u * (a.targetRotation - a.sourceRotation);
|
|
1891
1891
|
if (a.anchor) {
|
|
1892
1892
|
const d = this.constraints_.rotation(
|
|
1893
1893
|
g,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as b, defineAsyncComponent as L, ref as o, computed as w, onMounted as T, createElementBlock as p, openBlock as r, createBlock as m, createCommentVNode as P, createVNode as u, unref as t, toDisplayString as i, withCtx as f, createElementVNode as d } from "vue";
|
|
2
|
-
import { u as E, a as M, g as q, _ as h, F as v } from "./main-
|
|
2
|
+
import { u as E, a as M, g as q, _ as h, F as v } from "./main-B2kXxWRG.js";
|
|
3
3
|
const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-gray-medium"
|
|
@@ -10,7 +10,7 @@ const B = { class: "fr-text--xs" }, S = { key: 0 }, V = {
|
|
|
10
10
|
},
|
|
11
11
|
setup(k) {
|
|
12
12
|
const z = L(
|
|
13
|
-
() => import("./vue3-xml-viewer.common-
|
|
13
|
+
() => import("./vue3-xml-viewer.common-BRxsqI9j.js").then((e) => e.v).then((e) => e.default || e.XmlViewer)
|
|
14
14
|
), g = k, x = E(), { t: l } = M(), n = o(null), c = o(!1), s = o(null), _ = o(!1), y = w(() => q(g.resource)), X = w(() => {
|
|
15
15
|
const e = y.value;
|
|
16
16
|
if (!e || !x.maxXmlPreviewCharSize)
|