@datagouv/components-next 1.3.0 → 1.4.0
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-b-43UT2B.js → Control-B9WQxlpJ.js} +10 -10
- package/dist/{Datafair.client-BrjISlaZ.js → Datafair.client-D_6yzJUG.js} +9 -9
- package/dist/{Event-py_AAwJY.js → Event-iXDrp-fy.js} +15 -15
- package/dist/{Image-BHQYZWzH.js → Image-mNMBOofs.js} +22 -22
- package/dist/ImagePreview.client-B0iPhFm3.js +36 -0
- package/dist/{JsonPreview.client-DivFAnbN.js → JsonPreview.client-DSl1kiwC.js} +2 -2
- package/dist/{Map-CtP7leHl.js → Map-BfqKMw0S.js} +165 -165
- package/dist/{MapContainer.client-Cq8tNLZZ.js → MapContainer.client-BSfpk_rT.js} +17 -17
- package/dist/{OSM-gdDSIsDA.js → OSM-CcrUhItr.js} +1 -1
- package/dist/{PdfPreview.client-BNBgLsK2.js → PdfPreview.client-BANFeM6K.js} +438 -427
- package/dist/{Pmtiles.client-CQi5Rw8W.js → Pmtiles.client-DH9ZrsZR.js} +6177 -5967
- package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-I8EZCgzp.js +60 -0
- package/dist/{ScaleLine-hG-FhNqy.js → ScaleLine-VGQ7nkMS.js} +2 -2
- package/dist/{Tile-D6rFonpT.js → Tile-CSpn0Ca8.js} +47 -47
- package/dist/{TileImage-cfrEgz5y.js → TileImage-CpbaEFwd.js} +44 -44
- package/dist/{View-vp7vDb9q.js → View-BYBpt-AU.js} +58 -58
- package/dist/{XmlPreview.client-XCsNvnsZ.js → XmlPreview.client-KCB5mwVf.js} +3 -3
- package/dist/{common-C8efyyuc.js → common-BoeTUnDZ.js} +58 -58
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +199 -172
- package/dist/components.css +1 -1
- package/dist/{index-CXUamc8Z.js → index-DHWzX5vK.js} +4668 -4466
- package/dist/{leaflet-src-BRKv9Ksv.js → leaflet-src-pVQfonBI.js} +1 -1
- package/dist/{main-DKu5SOAl.js → main-BDcYkhOc.js} +41684 -33432
- package/dist/{proj-CsjVeojN.js → proj-DxGbobp7.js} +110 -110
- package/dist/{tilecoord-CPcQJnrF.js → tilecoord-DvX7WWiA.js} +94 -94
- package/dist/{vue3-xml-viewer.common-BIaEIFYG.js → vue3-xml-viewer.common-Bdcn54ST.js} +1 -1
- package/package.json +28 -27
- package/src/components/ActivityList/ActivityList.vue +21 -12
- package/src/components/AppLink.vue +3 -0
- package/src/components/BannerAction.vue +6 -2
- package/src/components/Chart/ChartViewer.vue +111 -17
- package/src/components/Chart/ChartViewerWrapper.vue +28 -16
- package/src/components/ChartCard.vue +112 -0
- package/src/components/CopyButton.vue +6 -2
- package/src/components/DataserviceCard.vue +23 -6
- package/src/components/DataserviceQuality.vue +82 -0
- package/src/components/DataserviceQualityInline.vue +31 -0
- package/src/components/DataserviceQualityTooltipContent.vue +79 -0
- package/src/components/DatasetCard.vue +17 -6
- package/src/components/DatasetInformation/DatasetTemporalitySection.vue +7 -4
- package/src/components/DatasetQuality.vue +11 -11
- package/src/components/DatasetQualityInline.vue +2 -2
- package/src/components/DatasetQualityTooltipContent.vue +1 -1
- package/src/components/DiscussionMessageCard.vue +14 -15
- package/src/components/Form/SchemaSelect.vue +2 -0
- package/src/components/FormattedDate.vue +69 -0
- package/src/components/LoadingBlock.vue +4 -1
- package/src/components/ObjectCard.vue +4 -1
- package/src/components/ObjectCardOwner.vue +13 -1
- package/src/components/Pagination.vue +18 -58
- package/src/components/Placeholder.vue +3 -2
- package/src/components/PostCard.vue +13 -15
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/Downloads.vue +19 -7
- package/src/components/ResourceAccordion/ImagePreview.client.vue +48 -0
- package/src/components/ResourceAccordion/MapContainer.client.vue +1 -8
- package/src/components/ResourceAccordion/Metadata.vue +21 -5
- package/src/components/ResourceAccordion/PdfPreview.client.vue +36 -12
- package/src/components/ResourceAccordion/PdfSkeleton.vue +44 -0
- package/src/components/ResourceAccordion/Pmtiles.client.vue +27 -18
- package/src/components/ResourceAccordion/Preview.vue +8 -4
- package/src/components/ResourceAccordion/PreviewWrapper.vue +17 -10
- package/src/components/ResourceAccordion/ResourceAccordion.vue +29 -9
- package/src/components/ResourceExplorer/ResourceExplorer.vue +105 -209
- package/src/components/ResourceExplorer/ResourceExplorerHeader.vue +79 -0
- package/src/components/ResourceExplorer/ResourceExplorerSidebar.vue +104 -71
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +136 -183
- package/src/components/ResourceExplorer/ResourceMainAction.vue +240 -0
- package/src/components/ResourceExplorer/ResourceSelector.vue +24 -86
- package/src/components/ResourceExplorer/ResourceViewerHeader.vue +124 -0
- package/src/components/ResourceExplorer/ResourceViewerSkeleton.vue +96 -0
- package/src/components/ResourceListItem.vue +168 -0
- package/src/components/ReuseCard.vue +18 -6
- package/src/components/ReuseDetails.vue +2 -2
- package/src/components/ReuseHorizontalCard.vue +4 -3
- package/src/components/SchemaCard.vue +10 -1
- package/src/components/Search/Filter/AccessTypeFilter.vue +2 -2
- package/src/components/Search/GlobalSearch.vue +12 -8
- package/src/components/Search/SearchInput.vue +1 -1
- package/src/components/Search/Sidemenu.vue +4 -3
- package/src/components/SmallChart.vue +11 -10
- package/src/components/StatBox.vue +13 -5
- package/src/components/TabularExplorer/TabularActiveFilters.vue +79 -0
- package/src/components/TabularExplorer/TabularCell.vue +7 -8
- package/src/components/TabularExplorer/TabularCellPopover.vue +19 -3
- package/src/components/TabularExplorer/TabularColumnsMenu.vue +112 -0
- package/src/components/TabularExplorer/TabularDateField.vue +41 -0
- package/src/components/TabularExplorer/TabularDateFilter.vue +403 -0
- package/src/components/TabularExplorer/TabularExplorer.vue +122 -913
- package/src/components/TabularExplorer/TabularFilterContent.vue +33 -25
- package/src/components/TabularExplorer/TabularFilterPopover.vue +7 -7
- package/src/components/TabularExplorer/TabularMobileFilterButton.vue +21 -0
- package/src/components/TabularExplorer/TabularMobileFilters.vue +150 -0
- package/src/components/TabularExplorer/TabularRowsInfo.vue +31 -0
- package/src/components/TabularExplorer/TabularSkeleton.vue +92 -0
- package/src/components/TabularExplorer/TabularTable.vue +484 -0
- package/src/components/TabularExplorer/TabularToolbar.vue +25 -0
- package/src/components/TabularExplorer/types.ts +32 -20
- package/src/components/TabularExplorer/useColumnMetadata.ts +98 -0
- package/src/components/TabularExplorer/useTabularContext.ts +82 -0
- package/src/components/TopicCard.vue +15 -14
- package/src/composables/useActiveDescendant.ts +5 -0
- package/src/composables/useDatasetResources.ts +164 -0
- package/src/composables/useHasTabularData.ts +2 -1
- package/src/composables/useResizable.ts +46 -0
- package/src/composables/useResourceCapabilities.ts +47 -39
- package/src/composables/useTranslation.ts +24 -9
- package/src/config.ts +1 -0
- package/src/functions/charts.ts +32 -1
- package/src/functions/dates.ts +26 -7
- package/src/functions/helpers.ts +15 -0
- package/src/functions/metrics.ts +57 -56
- package/src/functions/owned.ts +21 -0
- package/src/functions/paginate.ts +46 -0
- package/src/functions/resourceCapabilities.ts +34 -0
- package/src/functions/resources.ts +83 -0
- package/src/functions/schemas.ts +27 -0
- package/src/functions/scroll.ts +20 -0
- package/src/functions/tabular.ts +119 -4
- package/src/functions/tabularApi.ts +1 -43
- package/src/main.ts +32 -6
- package/src/types/dataservices.ts +15 -0
- package/src/types/organizations.ts +10 -0
- package/src/types/reuses.ts +12 -1
- package/src/types/search.ts +2 -2
- package/src/types/visualizations.ts +5 -0
- package/dist/PreviewWrapper.vue_vue_type_script_setup_true_lang-C3dDzrIr.js +0 -61
- /package/src/components/{DatasetQualityItem.vue → QualityItem.vue} +0 -0
- /package/src/components/{DatasetQualityItemWarning.vue → QualityItemWarning.vue} +0 -0
- /package/src/components/{DatasetQualityScore.vue → QualityScore.vue} +0 -0
|
@@ -1501,120 +1501,120 @@ function Vt() {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
Vt();
|
|
1503
1503
|
export {
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1504
|
+
Xs as $,
|
|
1505
|
+
ts as A,
|
|
1506
|
+
es as B,
|
|
1507
|
+
ws as C,
|
|
1508
|
+
B as D,
|
|
1509
1509
|
Vn as E,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1510
|
+
Ls as F,
|
|
1511
|
+
On as G,
|
|
1512
|
+
bn as H,
|
|
1513
|
+
G as I,
|
|
1514
|
+
zt as J,
|
|
1515
|
+
us as K,
|
|
1516
|
+
Ss as L,
|
|
1517
1517
|
J as M,
|
|
1518
|
-
|
|
1518
|
+
ls as N,
|
|
1519
1519
|
Hn as O,
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1520
|
+
fs as P,
|
|
1521
|
+
Ht as Q,
|
|
1522
|
+
as as R,
|
|
1523
|
+
ys as S,
|
|
1524
1524
|
xt as T,
|
|
1525
|
-
|
|
1525
|
+
Ms as U,
|
|
1526
1526
|
gn as V,
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1527
|
+
En as W,
|
|
1528
|
+
E as X,
|
|
1529
|
+
Jt as Y,
|
|
1530
|
+
kn as Z,
|
|
1531
|
+
ds as _,
|
|
1532
|
+
Zn as a,
|
|
1533
|
+
rt as a0,
|
|
1534
|
+
In as a1,
|
|
1535
|
+
kt as a2,
|
|
1536
|
+
nn as a3,
|
|
1537
|
+
cn as a4,
|
|
1538
|
+
Vs as a5,
|
|
1539
|
+
xn as a6,
|
|
1540
|
+
Fs as a7,
|
|
1541
|
+
ut as a8,
|
|
1542
|
+
tn as a9,
|
|
1543
|
+
An as aA,
|
|
1544
|
+
Os as aB,
|
|
1545
|
+
un as aC,
|
|
1546
|
+
zn as aD,
|
|
1547
|
+
Cn as aE,
|
|
1548
|
+
ps as aF,
|
|
1549
|
+
Us as aG,
|
|
1550
|
+
jn as aH,
|
|
1551
|
+
Mt as aI,
|
|
1552
|
+
q as aJ,
|
|
1553
|
+
pn as aK,
|
|
1554
|
+
Ln as aL,
|
|
1555
|
+
at as aM,
|
|
1556
|
+
Is as aN,
|
|
1557
|
+
is as aO,
|
|
1558
|
+
Ws as aP,
|
|
1559
|
+
qs as aQ,
|
|
1560
|
+
As as aR,
|
|
1561
|
+
qt as aS,
|
|
1562
|
+
Zt as aT,
|
|
1563
|
+
Rs as aU,
|
|
1564
|
+
os as aV,
|
|
1565
|
+
Sn as aW,
|
|
1566
|
+
vs as aX,
|
|
1567
|
+
et as aY,
|
|
1568
|
+
Gs as aZ,
|
|
1569
|
+
Ts as aa,
|
|
1570
|
+
bs as ab,
|
|
1571
|
+
ns as ac,
|
|
1572
|
+
ks as ad,
|
|
1573
|
+
Nn as ae,
|
|
1574
|
+
hs as af,
|
|
1575
|
+
gt as ag,
|
|
1576
|
+
ht as ah,
|
|
1577
|
+
js as ai,
|
|
1578
|
+
Ns as aj,
|
|
1579
1579
|
qn as ak,
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1580
|
+
rs as al,
|
|
1581
|
+
M as am,
|
|
1582
|
+
Un as an,
|
|
1583
|
+
ft as ao,
|
|
1584
|
+
rn as ap,
|
|
1585
|
+
Ds as aq,
|
|
1586
|
+
ss as ar,
|
|
1587
|
+
Ys as as,
|
|
1588
|
+
Jn as at,
|
|
1589
|
+
x as au,
|
|
1590
|
+
V as av,
|
|
1591
|
+
Rn as aw,
|
|
1592
|
+
Bs as ax,
|
|
1593
|
+
Et as ay,
|
|
1594
|
+
Mn as az,
|
|
1595
|
+
gs as b,
|
|
1596
|
+
Ps as c,
|
|
1597
|
+
Cs as d,
|
|
1598
|
+
Hs as e,
|
|
1599
|
+
Kn as f,
|
|
1600
|
+
$s as g,
|
|
1601
|
+
Qs as h,
|
|
1602
|
+
lt as i,
|
|
1603
|
+
Js as j,
|
|
1604
|
+
zs as k,
|
|
1605
|
+
k as l,
|
|
1606
|
+
cs as m,
|
|
1607
|
+
jt as n,
|
|
1608
|
+
Qt as o,
|
|
1609
|
+
Es as p,
|
|
1610
|
+
st as q,
|
|
1611
|
+
ms as r,
|
|
1612
|
+
nt as s,
|
|
1613
|
+
Ks as t,
|
|
1614
|
+
hn as u,
|
|
1615
|
+
Gn as v,
|
|
1616
|
+
_s as w,
|
|
1617
|
+
ot as x,
|
|
1618
|
+
w as y,
|
|
1619
|
+
ct as z
|
|
1620
1620
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as d,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { T as d, i as nt, n as xt, c as b, b as st } from "./Image-mNMBOofs.js";
|
|
2
|
+
import { z as Tt, g as pt } from "./common-BoeTUnDZ.js";
|
|
3
|
+
import { aD as It, E as ft, al as Xt, Q as _t, g as rt, U as vt, aa as Mt, z as H, I as y, an as dt, aV as Wt, v as gt, x as Yt, S as yt, aW as Lt, ak as Pt, aK as Ft, aA as Ot, aL as wt, aX as et, af as ot, i as Dt, R as z, a0 as $, d as V, l as Ct, u as at, a6 as ht, F as At, a as Rt } from "./proj-DxGbobp7.js";
|
|
4
4
|
class mt extends It {
|
|
5
5
|
/**
|
|
6
6
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
@@ -108,7 +108,7 @@ class mt extends It {
|
|
|
108
108
|
this.release(), super.disposeInternal();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
class
|
|
111
|
+
class zt extends mt {
|
|
112
112
|
/**
|
|
113
113
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
114
114
|
* @param {import("./TileState.js").default} state State.
|
|
@@ -234,7 +234,7 @@ class $t extends mt {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
function kt() {
|
|
237
|
-
const n =
|
|
237
|
+
const n = b(1, 1);
|
|
238
238
|
return n.fillStyle = "rgba(0,0,0,0)", n.fillRect(0, 0, 1, 1), n.canvas;
|
|
239
239
|
}
|
|
240
240
|
class Bt {
|
|
@@ -308,7 +308,7 @@ class Bt {
|
|
|
308
308
|
return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function $t(n, t, s, e, r) {
|
|
312
312
|
return r !== void 0 ? (r.minX = n, r.maxX = t, r.minY = s, r.maxY = e, r) : new Bt(n, t, s, e);
|
|
313
313
|
}
|
|
314
314
|
let J;
|
|
@@ -321,7 +321,7 @@ function tt(n, t) {
|
|
|
321
321
|
}
|
|
322
322
|
function Gt() {
|
|
323
323
|
if (J === void 0) {
|
|
324
|
-
const n =
|
|
324
|
+
const n = b(6, 6, B);
|
|
325
325
|
n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", ct(n, 4, 5, 4, 0), ct(n, 4, 5, 0, 5);
|
|
326
326
|
const t = n.getImageData(0, 0, 3, 3).data;
|
|
327
327
|
J = tt(t, 0) || tt(t, 4) || tt(t, 8), st(n), B.push(n.canvas);
|
|
@@ -340,13 +340,13 @@ function ut(n, t, s, e) {
|
|
|
340
340
|
const m = n.getMetersPerUnit();
|
|
341
341
|
m !== void 0 && (i /= m);
|
|
342
342
|
const g = n.getExtent();
|
|
343
|
-
if (!g ||
|
|
343
|
+
if (!g || vt(g, r)) {
|
|
344
344
|
const T = rt(n, i, r) / i;
|
|
345
345
|
isFinite(T) && T > 0 && (i /= T);
|
|
346
346
|
}
|
|
347
347
|
return i;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Kt(n, t, s, e) {
|
|
350
350
|
const r = Yt(s);
|
|
351
351
|
let i = ut(
|
|
352
352
|
n,
|
|
@@ -363,8 +363,8 @@ function Nt(n, t, s, e) {
|
|
|
363
363
|
), isFinite(i) && i > 0;
|
|
364
364
|
}), i;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
const a =
|
|
366
|
+
function Nt(n, t, s, e, r, i, c, m, g, T, X, x, L, P) {
|
|
367
|
+
const a = b(
|
|
368
368
|
Math.round(s * n),
|
|
369
369
|
Math.round(s * t),
|
|
370
370
|
B
|
|
@@ -377,28 +377,28 @@ function St(n, t, s, e, r, i, c, m, g, T, X, x, P, L) {
|
|
|
377
377
|
}
|
|
378
378
|
a.globalCompositeOperation = "lighter";
|
|
379
379
|
const E = gt();
|
|
380
|
-
g.forEach(function(o,
|
|
381
|
-
|
|
380
|
+
g.forEach(function(o, F, w) {
|
|
381
|
+
Mt(E, o.extent);
|
|
382
382
|
});
|
|
383
383
|
let l;
|
|
384
384
|
const f = s / e, _ = (x ? 1 : 1 + Math.pow(2, -24)) / f;
|
|
385
|
-
(!
|
|
385
|
+
(!L || g.length !== 1 || T !== 0) && (l = b(
|
|
386
386
|
Math.round(y(E) * f),
|
|
387
|
-
Math.round(
|
|
387
|
+
Math.round(H(E) * f),
|
|
388
388
|
B
|
|
389
|
-
), x || (l.imageSmoothingEnabled = !1), g.forEach(function(o,
|
|
389
|
+
), x || (l.imageSmoothingEnabled = !1), g.forEach(function(o, F, w) {
|
|
390
390
|
if (o.image.width > 0 && o.image.height > 0) {
|
|
391
391
|
if (o.clipExtent) {
|
|
392
392
|
l.save();
|
|
393
|
-
const
|
|
393
|
+
const v = (o.clipExtent[0] - E[0]) * f, W = -(o.clipExtent[3] - E[3]) * f, D = y(o.clipExtent) * f, A = H(o.clipExtent) * f;
|
|
394
394
|
l.rect(
|
|
395
|
-
x ?
|
|
395
|
+
x ? v : Math.round(v),
|
|
396
396
|
x ? W : Math.round(W),
|
|
397
|
-
x ? D : Math.round(
|
|
397
|
+
x ? D : Math.round(v + D) - Math.round(v),
|
|
398
398
|
x ? A : Math.round(W + A) - Math.round(W)
|
|
399
399
|
), l.clip();
|
|
400
400
|
}
|
|
401
|
-
const p = (o.extent[0] - E[0]) * f, I = -(o.extent[3] - E[3]) * f,
|
|
401
|
+
const p = (o.extent[0] - E[0]) * f, I = -(o.extent[3] - E[3]) * f, M = y(o.extent) * f, Y = H(o.extent) * f;
|
|
402
402
|
l.drawImage(
|
|
403
403
|
o.image,
|
|
404
404
|
T,
|
|
@@ -407,74 +407,74 @@ function St(n, t, s, e, r, i, c, m, g, T, X, x, P, L) {
|
|
|
407
407
|
o.image.height - 2 * T,
|
|
408
408
|
x ? p : Math.round(p),
|
|
409
409
|
x ? I : Math.round(I),
|
|
410
|
-
x ?
|
|
410
|
+
x ? M : Math.round(p + M) - Math.round(p),
|
|
411
411
|
x ? Y : Math.round(I + Y) - Math.round(I)
|
|
412
412
|
), o.clipExtent && l.restore();
|
|
413
413
|
}
|
|
414
414
|
}));
|
|
415
415
|
const u = dt(c);
|
|
416
|
-
return m.getTriangles().forEach(function(o,
|
|
416
|
+
return m.getTriangles().forEach(function(o, F, w) {
|
|
417
417
|
const p = o.source, I = o.target;
|
|
418
|
-
let
|
|
419
|
-
const G = h((I[0][0] - u[0]) / i),
|
|
418
|
+
let M = p[0][0], Y = p[0][1], v = p[1][0], W = p[1][1], D = p[2][0], A = p[2][1];
|
|
419
|
+
const G = h((I[0][0] - u[0]) / i), K = h(
|
|
420
420
|
-(I[0][1] - u[1]) / i
|
|
421
421
|
), R = h((I[1][0] - u[0]) / i), k = h(
|
|
422
422
|
-(I[1][1] - u[1]) / i
|
|
423
423
|
), Q = h((I[2][0] - u[0]) / i), U = h(
|
|
424
424
|
-(I[2][1] - u[1]) / i
|
|
425
|
-
), j =
|
|
426
|
-
|
|
425
|
+
), j = M, q = Y;
|
|
426
|
+
M = 0, Y = 0, v -= j, W -= q, D -= j, A -= q;
|
|
427
427
|
const Et = [
|
|
428
|
-
[
|
|
428
|
+
[v, W, 0, 0, R - G],
|
|
429
429
|
[D, A, 0, 0, Q - G],
|
|
430
|
-
[0, 0,
|
|
431
|
-
[0, 0, D, A, U -
|
|
432
|
-
],
|
|
433
|
-
if (!
|
|
430
|
+
[0, 0, v, W, k - K],
|
|
431
|
+
[0, 0, D, A, U - K]
|
|
432
|
+
], N = Wt(Et);
|
|
433
|
+
if (!N)
|
|
434
434
|
return;
|
|
435
435
|
if (a.save(), a.beginPath(), Gt() || !x) {
|
|
436
436
|
a.moveTo(R, k);
|
|
437
|
-
const
|
|
438
|
-
for (let C = 0; C <
|
|
437
|
+
const O = 4, Z = G - R, it = K - k;
|
|
438
|
+
for (let C = 0; C < O; C++)
|
|
439
439
|
a.lineTo(
|
|
440
|
-
R + h((C + 1) *
|
|
441
|
-
k + h(C * it / (
|
|
442
|
-
), C !=
|
|
443
|
-
R + h((C + 1) *
|
|
444
|
-
k + h((C + 1) * it / (
|
|
440
|
+
R + h((C + 1) * Z / O),
|
|
441
|
+
k + h(C * it / (O - 1))
|
|
442
|
+
), C != O - 1 && a.lineTo(
|
|
443
|
+
R + h((C + 1) * Z / O),
|
|
444
|
+
k + h((C + 1) * it / (O - 1))
|
|
445
445
|
);
|
|
446
446
|
a.lineTo(Q, U);
|
|
447
447
|
} else
|
|
448
|
-
a.moveTo(R, k), a.lineTo(G,
|
|
448
|
+
a.moveTo(R, k), a.lineTo(G, K), a.lineTo(Q, U);
|
|
449
449
|
a.clip(), a.transform(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
450
|
+
N[0],
|
|
451
|
+
N[2],
|
|
452
|
+
N[1],
|
|
453
|
+
N[3],
|
|
454
454
|
G,
|
|
455
|
-
|
|
455
|
+
K
|
|
456
456
|
), a.translate(
|
|
457
457
|
E[0] - j,
|
|
458
458
|
E[3] - q
|
|
459
459
|
);
|
|
460
|
-
let
|
|
460
|
+
let S;
|
|
461
461
|
if (l)
|
|
462
|
-
|
|
462
|
+
S = l.canvas, a.scale(_, -_);
|
|
463
463
|
else {
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
y(
|
|
467
|
-
-
|
|
464
|
+
const O = g[0], Z = O.extent;
|
|
465
|
+
S = O.image, a.scale(
|
|
466
|
+
y(Z) / S.width,
|
|
467
|
+
-H(Z) / S.height
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
|
-
a.drawImage(
|
|
471
|
-
}), l && (st(l), B.push(l.canvas)), X && (a.save(), a.globalCompositeOperation = "source-over", a.strokeStyle = "black", a.lineWidth = 1, m.getTriangles().forEach(function(o,
|
|
472
|
-
const p = o.target, I = (p[0][0] - u[0]) / i,
|
|
473
|
-
a.beginPath(), a.moveTo(Y,
|
|
470
|
+
a.drawImage(S, 0, 0), a.restore();
|
|
471
|
+
}), l && (st(l), B.push(l.canvas)), X && (a.save(), a.globalCompositeOperation = "source-over", a.strokeStyle = "black", a.lineWidth = 1, m.getTriangles().forEach(function(o, F, w) {
|
|
472
|
+
const p = o.target, I = (p[0][0] - u[0]) / i, M = -(p[0][1] - u[1]) / i, Y = (p[1][0] - u[0]) / i, v = -(p[1][1] - u[1]) / i, W = (p[2][0] - u[0]) / i, D = -(p[2][1] - u[1]) / i;
|
|
473
|
+
a.beginPath(), a.moveTo(Y, v), a.lineTo(I, M), a.lineTo(W, D), a.closePath(), a.stroke();
|
|
474
474
|
}), a.restore()), a.canvas;
|
|
475
475
|
}
|
|
476
|
-
const
|
|
477
|
-
class
|
|
476
|
+
const St = 10, lt = 0.25;
|
|
477
|
+
class Zt {
|
|
478
478
|
/**
|
|
479
479
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
480
480
|
* @param {import("../proj/Projection.js").default} targetProj Target projection.
|
|
@@ -487,17 +487,17 @@ class Kt {
|
|
|
487
487
|
constructor(t, s, e, r, i, c, m) {
|
|
488
488
|
this.sourceProj_ = t, this.targetProj_ = s;
|
|
489
489
|
let g = {};
|
|
490
|
-
const T = m ?
|
|
490
|
+
const T = m ? Lt(
|
|
491
491
|
(_) => pt(
|
|
492
492
|
m,
|
|
493
493
|
_t(_, this.targetProj_, this.sourceProj_)
|
|
494
494
|
)
|
|
495
|
-
) :
|
|
495
|
+
) : Pt(this.targetProj_, this.sourceProj_);
|
|
496
496
|
this.transformInv_ = function(_) {
|
|
497
497
|
const u = _[0] + "/" + _[1];
|
|
498
498
|
return g[u] || (g[u] = T(_)), g[u];
|
|
499
499
|
}, this.maxSourceExtent_ = r, this.errorThresholdSquared_ = i * i, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!r && !!this.sourceProj_.getExtent() && y(r) >= y(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? y(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? y(this.targetProj_.getExtent()) : null;
|
|
500
|
-
const X = dt(e), x =
|
|
500
|
+
const X = dt(e), x = Ft(e), L = Ot(e), P = wt(e), a = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(L), l = this.transformInv_(P), f = St + (c ? Math.max(
|
|
501
501
|
0,
|
|
502
502
|
Math.ceil(
|
|
503
503
|
Math.log2(
|
|
@@ -508,8 +508,8 @@ class Kt {
|
|
|
508
508
|
if (this.addQuad_(
|
|
509
509
|
X,
|
|
510
510
|
x,
|
|
511
|
-
P,
|
|
512
511
|
L,
|
|
512
|
+
P,
|
|
513
513
|
a,
|
|
514
514
|
h,
|
|
515
515
|
E,
|
|
@@ -517,7 +517,7 @@ class Kt {
|
|
|
517
517
|
f
|
|
518
518
|
), this.wrapsXInSource_) {
|
|
519
519
|
let _ = 1 / 0;
|
|
520
|
-
this.triangles_.forEach(function(u, o,
|
|
520
|
+
this.triangles_.forEach(function(u, o, F) {
|
|
521
521
|
_ = Math.min(
|
|
522
522
|
_,
|
|
523
523
|
u.source[0][0],
|
|
@@ -536,7 +536,7 @@ class Kt {
|
|
|
536
536
|
[u.source[2][0], u.source[2][1]]
|
|
537
537
|
];
|
|
538
538
|
o[0][0] - _ > this.sourceWorldWidth_ / 2 && (o[0][0] -= this.sourceWorldWidth_), o[1][0] - _ > this.sourceWorldWidth_ / 2 && (o[1][0] -= this.sourceWorldWidth_), o[2][0] - _ > this.sourceWorldWidth_ / 2 && (o[2][0] -= this.sourceWorldWidth_);
|
|
539
|
-
const
|
|
539
|
+
const F = Math.min(
|
|
540
540
|
o[0][0],
|
|
541
541
|
o[1][0],
|
|
542
542
|
o[2][0]
|
|
@@ -545,7 +545,7 @@ class Kt {
|
|
|
545
545
|
o[0][0],
|
|
546
546
|
o[1][0],
|
|
547
547
|
o[2][0]
|
|
548
|
-
) -
|
|
548
|
+
) - F < this.sourceWorldWidth_ / 2 && (u.source = o);
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
551
|
}
|
|
@@ -584,17 +584,17 @@ class Kt {
|
|
|
584
584
|
* @private
|
|
585
585
|
*/
|
|
586
586
|
addQuad_(t, s, e, r, i, c, m, g, T) {
|
|
587
|
-
const X = ot([i, c, m, g]), x = this.sourceWorldWidth_ ? y(X) / this.sourceWorldWidth_ : null,
|
|
587
|
+
const X = ot([i, c, m, g]), x = this.sourceWorldWidth_ ? y(X) / this.sourceWorldWidth_ : null, L = (
|
|
588
588
|
/** @type {number} */
|
|
589
589
|
this.sourceWorldWidth_
|
|
590
|
-
),
|
|
590
|
+
), P = this.sourceProj_.canWrapX() && x > 0.5 && x < 1;
|
|
591
591
|
let a = !1;
|
|
592
592
|
if (T > 0) {
|
|
593
593
|
if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
|
|
594
594
|
const E = ot([t, s, e, r]);
|
|
595
595
|
a = y(E) / this.targetWorldWidth_ > lt || a;
|
|
596
596
|
}
|
|
597
|
-
!
|
|
597
|
+
!P && this.sourceProj_.isGlobal() && x && (a = x > lt || a);
|
|
598
598
|
}
|
|
599
599
|
if (!a && this.maxSourceExtent_ && isFinite(X[0]) && isFinite(X[1]) && isFinite(X[2]) && isFinite(X[3]) && !Dt(X, this.maxSourceExtent_))
|
|
600
600
|
return;
|
|
@@ -609,7 +609,7 @@ class Kt {
|
|
|
609
609
|
if (!a) {
|
|
610
610
|
const E = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], l = this.transformInv_(E);
|
|
611
611
|
let f;
|
|
612
|
-
|
|
612
|
+
P ? f = (z(i[0], L) + z(m[0], L)) / 2 - z(l[0], L) : f = (i[0] + m[0]) / 2 - l[0];
|
|
613
613
|
const _ = (i[1] + m[1]) / 2 - l[1];
|
|
614
614
|
a = f * f + _ * _ > this.errorThresholdSquared_;
|
|
615
615
|
}
|
|
@@ -664,7 +664,7 @@ class Kt {
|
|
|
664
664
|
return;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
if (
|
|
667
|
+
if (P) {
|
|
668
668
|
if (!this.canWrapXInSource_)
|
|
669
669
|
return;
|
|
670
670
|
this.wrapsXInSource_ = !0;
|
|
@@ -680,7 +680,7 @@ class Kt {
|
|
|
680
680
|
const t = gt();
|
|
681
681
|
return this.triangles_.forEach(function(s, e, r) {
|
|
682
682
|
const i = s.source;
|
|
683
|
-
|
|
683
|
+
$(t, i[0]), $(t, i[1]), $(t, i[2]);
|
|
684
684
|
}), t;
|
|
685
685
|
}
|
|
686
686
|
/**
|
|
@@ -690,7 +690,7 @@ class Kt {
|
|
|
690
690
|
return this.triangles_;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const Ht = 0.5;
|
|
694
694
|
class Vt extends mt {
|
|
695
695
|
/**
|
|
696
696
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
@@ -707,13 +707,13 @@ class Vt extends mt {
|
|
|
707
707
|
* @param {boolean} [renderEdges] Render reprojection edges.
|
|
708
708
|
* @param {import("../Tile.js").Options} [options] Tile options.
|
|
709
709
|
*/
|
|
710
|
-
constructor(t, s, e, r, i, c, m, g, T, X, x,
|
|
711
|
-
super(i, d.IDLE,
|
|
712
|
-
const
|
|
710
|
+
constructor(t, s, e, r, i, c, m, g, T, X, x, L) {
|
|
711
|
+
super(i, d.IDLE, L), this.renderEdges_ = x !== void 0 ? x : !1, this.pixelRatio_ = m, this.gutter_ = g, this.canvas_ = null, this.sourceTileGrid_ = s, this.targetTileGrid_ = r, this.wrappedTileCoord_ = c || i, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0, this.clipExtent_ = t.canWrapX() ? t.getExtent() : void 0;
|
|
712
|
+
const P = r.getTileCoordExtent(
|
|
713
713
|
this.wrappedTileCoord_
|
|
714
714
|
), a = this.targetTileGrid_.getExtent();
|
|
715
715
|
let h = this.sourceTileGrid_.getExtent();
|
|
716
|
-
const E = a ? V(
|
|
716
|
+
const E = a ? V(P, a) : P;
|
|
717
717
|
if (et(E) === 0) {
|
|
718
718
|
this.state = d.EMPTY;
|
|
719
719
|
return;
|
|
@@ -722,7 +722,7 @@ class Vt extends mt {
|
|
|
722
722
|
l && (h ? h = V(h, l) : h = l);
|
|
723
723
|
const f = r.getResolution(
|
|
724
724
|
this.wrappedTileCoord_[0]
|
|
725
|
-
), _ =
|
|
725
|
+
), _ = Kt(
|
|
726
726
|
t,
|
|
727
727
|
e,
|
|
728
728
|
E,
|
|
@@ -732,8 +732,8 @@ class Vt extends mt {
|
|
|
732
732
|
this.state = d.EMPTY;
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
const u = X !== void 0 ? X :
|
|
736
|
-
if (this.triangulation_ = new
|
|
735
|
+
const u = X !== void 0 ? X : Ht;
|
|
736
|
+
if (this.triangulation_ = new Zt(
|
|
737
737
|
t,
|
|
738
738
|
e,
|
|
739
739
|
E,
|
|
@@ -757,23 +757,23 @@ class Vt extends mt {
|
|
|
757
757
|
)) : o = V(o, h)), !et(o))
|
|
758
758
|
this.state = d.EMPTY;
|
|
759
759
|
else {
|
|
760
|
-
let
|
|
761
|
-
t.canWrapX() && (
|
|
762
|
-
(o[0] - l[0]) /
|
|
760
|
+
let F = 0, w = 0;
|
|
761
|
+
t.canWrapX() && (F = y(l), w = Math.floor(
|
|
762
|
+
(o[0] - l[0]) / F
|
|
763
763
|
)), At(
|
|
764
764
|
o.slice(),
|
|
765
765
|
t,
|
|
766
766
|
!0
|
|
767
767
|
).forEach((I) => {
|
|
768
|
-
const
|
|
768
|
+
const M = s.getTileRangeForExtentAndZ(
|
|
769
769
|
I,
|
|
770
770
|
this.sourceZ_
|
|
771
771
|
);
|
|
772
|
-
for (let Y =
|
|
773
|
-
for (let
|
|
774
|
-
const W = w *
|
|
772
|
+
for (let Y = M.minX; Y <= M.maxX; Y++)
|
|
773
|
+
for (let v = M.minY; v <= M.maxY; v++) {
|
|
774
|
+
const W = w * F;
|
|
775
775
|
this.sourceTiles_.push({
|
|
776
|
-
getTile: () => T(this.sourceZ_, Y,
|
|
776
|
+
getTile: () => T(this.sourceZ_, Y, v, m),
|
|
777
777
|
offset: W
|
|
778
778
|
});
|
|
779
779
|
}
|
|
@@ -813,7 +813,7 @@ class Vt extends mt {
|
|
|
813
813
|
), g = this.targetTileGrid_.getTileCoordExtent(
|
|
814
814
|
this.wrappedTileCoord_
|
|
815
815
|
);
|
|
816
|
-
this.canvas_ =
|
|
816
|
+
this.canvas_ = Nt(
|
|
817
817
|
r,
|
|
818
818
|
i,
|
|
819
819
|
this.pixelRatio_,
|
|
@@ -875,11 +875,11 @@ class Vt extends mt {
|
|
|
875
875
|
function Jt(n, t, s, e) {
|
|
876
876
|
return e !== void 0 ? (e[0] = n, e[1] = t, e[2] = s, e) : [n, t, s];
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function bt(n, t, s) {
|
|
879
879
|
return n + "/" + t + "/" + s;
|
|
880
880
|
}
|
|
881
881
|
function te(n, t, s, e, r) {
|
|
882
|
-
return `${Rt(n)},${t},${
|
|
882
|
+
return `${Rt(n)},${t},${bt(s, e, r)}`;
|
|
883
883
|
}
|
|
884
884
|
function ee(n) {
|
|
885
885
|
return Qt(n[0], n[1], n[2]);
|
|
@@ -895,17 +895,17 @@ function se(n, t) {
|
|
|
895
895
|
return i ? i.containsXY(e, r) : !0;
|
|
896
896
|
}
|
|
897
897
|
export {
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
Ht as E,
|
|
899
|
+
zt as I,
|
|
900
900
|
Vt as R,
|
|
901
901
|
mt as T,
|
|
902
|
-
|
|
903
|
-
|
|
902
|
+
Zt as a,
|
|
903
|
+
Bt as b,
|
|
904
904
|
ut as c,
|
|
905
905
|
Jt as d,
|
|
906
|
-
|
|
906
|
+
$t as e,
|
|
907
907
|
te as g,
|
|
908
908
|
ee as h,
|
|
909
|
-
|
|
909
|
+
Nt as r,
|
|
910
910
|
se as w
|
|
911
911
|
};
|