node-red-contrib-tak-registration 0.13.0 → 0.14.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/node_modules/@turf/along/README.md +3 -5
- package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/along/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/along/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/along/package.json +13 -13
- package/node_modules/@turf/angle/dist/cjs/index.cjs +10 -7
- package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/angle/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/angle/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/angle/dist/esm/index.js +10 -7
- package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/angle/package.json +15 -15
- package/node_modules/@turf/area/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/area/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/area/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/area/dist/esm/index.js +1 -2
- package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/area/package.json +10 -10
- package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox/package.json +10 -10
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +9 -18
- package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-clip/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bbox-clip/dist/esm/index.js +9 -18
- package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-clip/package.json +11 -11
- package/node_modules/@turf/bbox-polygon/README.md +6 -6
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bbox-polygon/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bbox-polygon/package.json +9 -9
- package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bearing/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bearing/package.json +11 -11
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/bezier-spline/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/bezier-spline/package.json +10 -10
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-clockwise/package.json +10 -10
- package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-concave/package.json +10 -10
- package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-contains/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-contains/package.json +13 -13
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-crosses/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-crosses/package.json +13 -13
- package/node_modules/@turf/boolean-disjoint/README.md +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-disjoint/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +3 -3
- package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-disjoint/package.json +13 -13
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-equal/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-equal/dist/esm/index.js +1 -2
- package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-equal/package.json +11 -11
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +3 -3
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-intersects/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js +3 -3
- package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-intersects/package.json +11 -11
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-overlap/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js +3 -6
- package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-overlap/package.json +13 -13
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +7 -14
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-parallel/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js +7 -14
- package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-parallel/package.json +12 -12
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -4
- package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-in-polygon/package.json +10 -10
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +10 -0
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +10 -0
- package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-point-on-line/package.json +10 -10
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-touches/dist/cjs/index.d.cts +2 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.d.ts +2 -1
- package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -4
- package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-touches/package.json +12 -12
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +14 -28
- package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-valid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-valid/dist/esm/index.js +14 -28
- package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-valid/package.json +17 -17
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/boolean-within/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/boolean-within/dist/esm/index.js +4 -8
- package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/boolean-within/package.json +13 -13
- package/node_modules/@turf/buffer/dist/cjs/index.cjs +12 -24
- package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/buffer/dist/esm/index.js +12 -24
- package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/buffer/package.json +12 -12
- package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center/package.json +12 -12
- package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-mean/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-mean/package.json +13 -13
- package/node_modules/@turf/center-median/dist/cjs/index.cjs +5 -10
- package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-median/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-median/dist/esm/index.js +5 -10
- package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-median/package.json +17 -17
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/center-of-mass/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -4
- package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/center-of-mass/package.json +13 -13
- package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/centroid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/centroid/package.json +10 -10
- package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/circle/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/circle/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/circle/package.json +11 -11
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clean-coords/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clean-coords/dist/esm/index.js +4 -8
- package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clean-coords/package.json +11 -11
- package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clone/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clone/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clone/package.json +10 -10
- package/node_modules/@turf/clusters/README.md +8 -2
- package/node_modules/@turf/clusters/dist/cjs/index.cjs +9 -18
- package/node_modules/@turf/clusters/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters/dist/cjs/index.d.cts +9 -8
- package/node_modules/@turf/clusters/dist/esm/index.d.ts +9 -8
- package/node_modules/@turf/clusters/dist/esm/index.js +9 -18
- package/node_modules/@turf/clusters/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters/package.json +10 -10
- package/node_modules/@turf/clusters-dbscan/README.md +38 -15
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +16 -3
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +16 -3
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +2 -4
- package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-dbscan/package.json +14 -14
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -4
- package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/clusters-kmeans/package.json +15 -15
- package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/collect/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/collect/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/collect/package.json +11 -11
- package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/combine/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/combine/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/combine/package.json +10 -10
- package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/concave/package.json +14 -14
- package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/convex/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/convex/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/convex/package.json +10 -10
- package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/destination/package.json +11 -11
- package/node_modules/@turf/difference/dist/cjs/index.cjs +8 -10
- package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/difference/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/difference/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/difference/dist/esm/index.js +7 -9
- package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/difference/package.json +11 -11
- package/node_modules/@turf/dissolve/README.md +11 -12
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs +5 -6
- package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/dissolve/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/dissolve/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/dissolve/dist/esm/index.js +4 -5
- package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/dissolve/package.json +13 -13
- package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance/package.json +10 -10
- package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/distance-weight/dist/cjs/index.d.cts +3 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.d.ts +3 -1
- package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/distance-weight/package.json +12 -12
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs +8 -16
- package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/ellipse/dist/esm/index.js +8 -16
- package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/ellipse/package.json +16 -16
- package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/envelope/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/envelope/package.json +11 -11
- package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/explode/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/explode/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/explode/package.json +10 -10
- package/node_modules/@turf/flatten/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flatten/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/flatten/dist/esm/index.js +1 -2
- package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flatten/package.json +10 -10
- package/node_modules/@turf/flip/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/flip/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/flip/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/flip/dist/esm/index.js +3 -6
- package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/flip/package.json +11 -11
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +9 -18
- package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js +9 -18
- package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/geojson-rbush/package.json +11 -11
- package/node_modules/@turf/great-circle/README.md +2 -1
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs +7 -2
- package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/great-circle/dist/esm/index.js +7 -2
- package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/great-circle/package.json +9 -9
- package/node_modules/@turf/helpers/README.md +199 -154
- package/node_modules/@turf/helpers/dist/cjs/index.cjs +10 -7
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/helpers/dist/cjs/index.d.cts +149 -110
- package/node_modules/@turf/helpers/dist/esm/index.d.ts +149 -110
- package/node_modules/@turf/helpers/dist/esm/index.js +10 -7
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/helpers/package.json +8 -8
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -4
- package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/hex-grid/package.json +14 -14
- package/node_modules/@turf/interpolate/README.md +5 -2
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs +10 -15
- package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/interpolate/dist/cjs/index.d.cts +3 -1
- package/node_modules/@turf/interpolate/dist/esm/index.d.ts +3 -1
- package/node_modules/@turf/interpolate/dist/esm/index.js +11 -16
- package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/interpolate/package.json +18 -18
- package/node_modules/@turf/intersect/dist/cjs/index.cjs +7 -11
- package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/intersect/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/intersect/dist/esm/index.js +6 -10
- package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/intersect/package.json +11 -11
- package/node_modules/@turf/invariant/README.md +4 -0
- package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/invariant/dist/cjs/index.d.cts +6 -6
- package/node_modules/@turf/invariant/dist/esm/index.d.ts +6 -6
- package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/invariant/package.json +9 -9
- package/node_modules/@turf/isobands/dist/cjs/index.cjs +10 -20
- package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isobands/dist/esm/index.js +10 -20
- package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isobands/package.json +20 -20
- package/node_modules/@turf/isolines/dist/cjs/index.cjs +10 -20
- package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/isolines/dist/esm/index.js +10 -20
- package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/isolines/package.json +17 -17
- package/node_modules/@turf/jsts/dist/jsts.min.js +1 -1
- package/node_modules/@turf/jsts/dist/jsts.min.js.map +1 -0
- package/node_modules/@turf/jsts/package.json +17 -17
- package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/kinks/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/kinks/package.json +10 -10
- package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/length/package.json +11 -11
- package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-arc/package.json +12 -12
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-chunk/dist/esm/index.js +3 -6
- package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-chunk/package.json +11 -11
- package/node_modules/@turf/line-intersect/README.md +1 -1
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +3 -5
- package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-intersect/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/line-intersect/dist/esm/index.js +3 -5
- package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-intersect/package.json +10 -10
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-offset/dist/esm/index.js +3 -6
- package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-offset/package.json +10 -10
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +10 -20
- package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-overlap/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-overlap/dist/esm/index.js +10 -20
- package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-overlap/package.json +15 -15
- package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-segment/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-segment/package.json +11 -11
- package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice/package.json +10 -10
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +5 -10
- package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-slice-along/dist/esm/index.js +5 -10
- package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-slice-along/package.json +12 -12
- package/node_modules/@turf/line-split/dist/cjs/index.cjs +7 -14
- package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-split/dist/esm/index.js +7 -14
- package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-split/package.json +16 -16
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/line-to-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js +4 -8
- package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/line-to-polygon/package.json +12 -12
- package/node_modules/@turf/mask/dist/cjs/index.cjs +7 -7
- package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/mask/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/mask/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/mask/dist/esm/index.js +6 -6
- package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/mask/package.json +11 -11
- package/node_modules/@turf/meta/README.md +145 -93
- package/node_modules/@turf/meta/dist/cjs/index.cjs +22 -44
- package/node_modules/@turf/meta/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/meta/dist/esm/index.js +22 -44
- package/node_modules/@turf/meta/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/meta/package.json +7 -7
- package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/midpoint/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/midpoint/package.json +12 -12
- package/node_modules/@turf/moran-index/README.md +25 -47
- package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/moran-index/dist/cjs/index.d.cts +16 -8
- package/node_modules/@turf/moran-index/dist/esm/index.d.ts +16 -8
- package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/moran-index/package.json +11 -11
- package/node_modules/@turf/nearest-neighbor-analysis/README.md +50 -21
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +25 -6
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +25 -6
- package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -4
- package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point/package.json +12 -12
- package/node_modules/@turf/nearest-point-on-line/README.md +9 -9
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +97 -53
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +99 -55
- package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-on-line/package.json +15 -18
- package/node_modules/@turf/nearest-point-to-line/README.md +1 -9
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
- package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/planepoint/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/planepoint/package.json +10 -10
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -4
- package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/point-grid/dist/esm/index.js +2 -4
- package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-grid/package.json +14 -14
- package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-on-feature/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-on-feature/package.json +15 -15
- package/node_modules/@turf/point-to-line-distance/README.md +10 -10
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +21 -19
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +3 -3
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +3 -3
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +22 -20
- package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/point-to-line-distance/package.json +18 -17
- package/node_modules/@turf/point-to-polygon-distance/LICENSE +20 -0
- package/node_modules/@turf/point-to-polygon-distance/README.md +61 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +49 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.d.cts +23 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.d.ts +23 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +49 -0
- package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/point-to-polygon-distance/package.json +80 -0
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/points-within-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/points-within-polygon/package.json +11 -11
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js +1 -2
- package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-smooth/package.json +10 -10
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-tangents/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js +1 -2
- package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-tangents/package.json +14 -14
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygon-to-line/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygon-to-line/package.json +10 -10
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs +20 -40
- package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/polygonize/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/polygonize/dist/esm/index.js +20 -40
- package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/polygonize/package.json +13 -13
- package/node_modules/@turf/projection/README.md +2 -2
- package/node_modules/@turf/projection/dist/cjs/index.cjs +6 -12
- package/node_modules/@turf/projection/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/projection/dist/cjs/index.d.cts +2 -2
- package/node_modules/@turf/projection/dist/esm/index.d.ts +2 -2
- package/node_modules/@turf/projection/dist/esm/index.js +6 -12
- package/node_modules/@turf/projection/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/projection/package.json +12 -12
- package/node_modules/@turf/quadrat-analysis/README.md +10 -10
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/quadrat-analysis/dist/cjs/index.d.cts +4 -4
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.d.ts +4 -4
- package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/quadrat-analysis/package.json +18 -18
- package/node_modules/@turf/random/README.md +27 -29
- package/node_modules/@turf/random/dist/cjs/index.cjs +1 -3
- package/node_modules/@turf/random/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/random/dist/cjs/index.d.cts +11 -11
- package/node_modules/@turf/random/dist/esm/index.d.ts +11 -11
- package/node_modules/@turf/random/dist/esm/index.js +1 -3
- package/node_modules/@turf/random/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/random/package.json +9 -9
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rectangle-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rectangle-grid/package.json +13 -13
- package/node_modules/@turf/rewind/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rewind/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rewind/dist/esm/index.js +3 -6
- package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rewind/package.json +13 -13
- package/node_modules/@turf/rhumb-bearing/README.md +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-bearing/package.json +11 -11
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js +1 -2
- package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-destination/package.json +11 -11
- package/node_modules/@turf/rhumb-distance/README.md +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/rhumb-distance/package.json +11 -11
- package/node_modules/@turf/sample/README.md +2 -1
- package/node_modules/@turf/sample/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sample/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sample/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sample/dist/esm/index.js +3 -6
- package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sample/package.json +9 -9
- package/node_modules/@turf/sector/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/sector/dist/esm/index.js +4 -8
- package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/sector/package.json +14 -14
- package/node_modules/@turf/shortest-path/README.md +13 -19
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +5 -5
- package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +5 -5
- package/node_modules/@turf/shortest-path/dist/esm/index.js +3 -6
- package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/shortest-path/package.json +18 -18
- package/node_modules/@turf/simplify/dist/cjs/index.cjs +8 -16
- package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/simplify/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/simplify/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/simplify/dist/esm/index.js +8 -16
- package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/simplify/package.json +13 -13
- package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/square/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square/package.json +10 -10
- package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/square-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/square-grid/package.json +12 -12
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +3 -6
- package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
- package/node_modules/@turf/tag/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tag/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tag/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tag/dist/esm/index.js +1 -2
- package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tag/package.json +12 -12
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs +1 -2
- package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tesselate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tesselate/dist/esm/index.js +1 -2
- package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tesselate/package.json +9 -9
- package/node_modules/@turf/tin/dist/cjs/index.cjs +13 -14
- package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/tin/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/tin/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/tin/dist/esm/index.js +13 -14
- package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/tin/package.json +9 -9
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-rotate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-rotate/dist/esm/index.js +4 -8
- package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-rotate/package.json +17 -17
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +18 -12
- package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-scale/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-scale/dist/esm/index.js +18 -12
- package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-scale/package.json +21 -21
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +4 -8
- package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/transform-translate/dist/esm/index.js +4 -8
- package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/transform-translate/package.json +14 -14
- package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/triangle-grid/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/triangle-grid/package.json +13 -13
- package/node_modules/@turf/truncate/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/truncate/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/truncate/dist/esm/index.js +3 -6
- package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/truncate/package.json +10 -10
- package/node_modules/@turf/turf/dist/cjs/index.cjs +3 -1
- package/node_modules/@turf/turf/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/turf/dist/cjs/index.d.cts +1 -0
- package/node_modules/@turf/turf/dist/esm/index.d.ts +1 -0
- package/node_modules/@turf/turf/dist/esm/index.js +2 -0
- package/node_modules/@turf/turf/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/turf/package.json +126 -125
- package/node_modules/@turf/turf/turf.min.js +3 -26
- package/node_modules/@turf/union/README.md +44 -24
- package/node_modules/@turf/union/dist/cjs/index.cjs +9 -12
- package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/union/dist/cjs/index.d.cts +40 -21
- package/node_modules/@turf/union/dist/esm/index.d.ts +40 -21
- package/node_modules/@turf/union/dist/esm/index.js +8 -11
- package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/union/package.json +11 -11
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +14 -28
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/unkink-polygon/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js +14 -28
- package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/unkink-polygon/package.json +13 -13
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs +3 -6
- package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
- package/node_modules/@turf/voronoi/dist/cjs/index.d.cts +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.d.ts +1 -1
- package/node_modules/@turf/voronoi/dist/esm/index.js +3 -6
- package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
- package/node_modules/@turf/voronoi/package.json +11 -11
- package/node_modules/@types/geojson/README.md +1 -1
- package/node_modules/@types/geojson/index.d.ts +4 -1
- package/node_modules/@types/geojson/package.json +4 -3
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +33 -9
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/fs/promises.d.ts +16 -5
- package/node_modules/@types/node/fs.d.ts +14 -8
- package/node_modules/@types/node/globals.d.ts +25 -54
- package/node_modules/@types/node/http.d.ts +38 -1
- package/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/node/https.d.ts +0 -1
- package/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/node/module.d.ts +112 -4
- package/node_modules/@types/node/net.d.ts +3 -0
- package/node_modules/@types/node/package.json +5 -9
- package/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/node/process.d.ts +96 -12
- package/node_modules/@types/node/readline/promises.d.ts +14 -2
- package/node_modules/@types/node/readline.d.ts +58 -9
- package/node_modules/@types/node/sqlite.d.ts +30 -9
- package/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/node/test.d.ts +155 -5
- package/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/node/tls.d.ts +6 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/node/util.d.ts +80 -10
- package/node_modules/@types/node/v8.d.ts +1 -1
- package/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/node/worker_threads.d.ts +34 -1
- package/node_modules/axios/CHANGELOG.md +49 -0
- package/node_modules/axios/README.md +20 -8
- package/node_modules/axios/dist/axios.js +34 -63
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +40 -71
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +40 -71
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +45 -75
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +5 -1
- package/node_modules/axios/index.d.ts +8 -1
- package/node_modules/axios/lib/adapters/http.js +4 -4
- package/node_modules/axios/lib/core/Axios.js +7 -2
- package/node_modules/axios/lib/core/mergeConfig.js +5 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +7 -1
- package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +12 -65
- package/node_modules/axios/lib/helpers/validator.js +8 -0
- package/node_modules/axios/package.json +3 -3
- package/node_modules/bignumber.js/CHANGELOG.md +295 -0
- package/node_modules/bignumber.js/LICENCE.md +26 -0
- package/node_modules/bignumber.js/README.md +286 -0
- package/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- package/node_modules/bignumber.js/bignumber.js +2922 -0
- package/node_modules/bignumber.js/bignumber.mjs +2907 -0
- package/node_modules/bignumber.js/doc/API.html +2249 -0
- package/node_modules/bignumber.js/package.json +50 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +4 -0
- package/node_modules/fast-xml-parser/README.md +3 -2
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +21 -17
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -0
- package/node_modules/long/index.d.ts +1 -456
- package/node_modules/long/package.json +1 -1
- package/node_modules/long/umd/index.d.ts +456 -1
- package/node_modules/point-in-polygon-hao/README.md +8 -7
- package/node_modules/point-in-polygon-hao/dist/cjs/index.cjs +322 -0
- package/node_modules/point-in-polygon-hao/dist/esm/index.d.ts +10 -0
- package/node_modules/point-in-polygon-hao/dist/esm/index.js +56 -0
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.js +286 -42
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.min.js +1 -1
- package/node_modules/point-in-polygon-hao/package.json +24 -20
- package/node_modules/polyclip-ts/LICENSE +21 -0
- package/node_modules/{polygon-clipping → polyclip-ts}/README.md +35 -36
- package/node_modules/polyclip-ts/dist/cjs/index.cjs +1179 -0
- package/node_modules/polyclip-ts/dist/cjs/index.cjs.map +1 -0
- package/node_modules/polyclip-ts/dist/cjs/index.d.cts +12 -0
- package/node_modules/polyclip-ts/dist/esm/index.d.ts +12 -0
- package/node_modules/polyclip-ts/dist/esm/index.js +1138 -0
- package/node_modules/polyclip-ts/dist/esm/index.js.map +1 -0
- package/node_modules/polyclip-ts/dist/polyclip-ts.umd.js +4811 -0
- package/node_modules/polyclip-ts/dist/polyclip-ts.umd.min.js +2 -0
- package/node_modules/polyclip-ts/package.json +72 -0
- package/node_modules/splaytree-ts/LICENSE +29 -0
- package/node_modules/splaytree-ts/README.md +296 -0
- package/node_modules/splaytree-ts/dist/cjs/index.cjs +714 -0
- package/node_modules/splaytree-ts/dist/cjs/index.cjs.map +1 -0
- package/node_modules/splaytree-ts/dist/cjs/index.d.cts +105 -0
- package/node_modules/splaytree-ts/dist/esm/index.d.ts +105 -0
- package/node_modules/splaytree-ts/dist/esm/index.js +688 -0
- package/node_modules/splaytree-ts/dist/esm/index.js.map +1 -0
- package/node_modules/splaytree-ts/dist/splaytree-ts.umd.js +736 -0
- package/node_modules/splaytree-ts/dist/splaytree-ts.umd.min.js +2 -0
- package/node_modules/splaytree-ts/package.json +59 -0
- package/node_modules/tslib/modules/index.d.ts +1 -0
- package/node_modules/tslib/modules/index.js +2 -0
- package/node_modules/tslib/package.json +1 -1
- package/node_modules/tslib/tslib.d.ts +7 -0
- package/node_modules/tslib/tslib.es6.js +24 -1
- package/node_modules/tslib/tslib.es6.mjs +24 -1
- package/node_modules/tslib/tslib.js +56 -1
- package/node_modules/undici-types/eventsource.d.ts +0 -2
- package/node_modules/undici-types/filereader.d.ts +1 -1
- package/node_modules/undici-types/interceptors.d.ts +3 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +0 -38
- package/node_modules/undici-types/websocket.d.ts +0 -2
- package/node_modules/uuid/README.md +82 -156
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/{esm-node → esm}/index.js +1 -1
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/{esm-node → esm}/regex.js +1 -1
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +36 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +17 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +1 -1
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -1
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +113 -172
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -4
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +6 -34
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +8 -14
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +62 -68
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +29 -25
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +75 -117
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +6 -16
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +28 -47
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +21 -19
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +13 -32
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +5 -15
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +58 -139
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +2 -2
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +5 -5
- package/node_modules/uuid/package.json +65 -75
- package/package.json +6 -6
- package/tak-registration.js +1 -4
- package/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/point-in-polygon-hao/.eslintrc +0 -10
- package/node_modules/point-in-polygon-hao/CHANGES.md +0 -8
- package/node_modules/point-in-polygon-hao/FUNDING.yml +0 -2
- package/node_modules/point-in-polygon-hao/dist/pointInPolygon.mjs +0 -76
- package/node_modules/point-in-polygon-hao/rollup.config.js +0 -19
- package/node_modules/point-in-polygon-hao/src/index.js +0 -74
- package/node_modules/polygon-clipping/LICENSE.md +0 -11
- package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +0 -1803
- package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +0 -14
- package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +0 -1532
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +0 -2496
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +0 -24
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +0 -1
- package/node_modules/polygon-clipping/package.json +0 -79
- package/node_modules/splaytree/Readme.md +0 -222
- package/node_modules/splaytree/dist/splay.esm.js +0 -686
- package/node_modules/splaytree/dist/splay.esm.js.map +0 -1
- package/node_modules/splaytree/dist/splay.js +0 -694
- package/node_modules/splaytree/dist/splay.js.map +0 -1
- package/node_modules/splaytree/package.json +0 -91
- package/node_modules/splaytree/src/index.ts +0 -679
- package/node_modules/splaytree/src/node.ts +0 -15
- package/node_modules/splaytree/src/types.ts +0 -2
- package/node_modules/splaytree/typings/index.d.ts +0 -82
- package/node_modules/splaytree/typings/node.d.ts +0 -8
- package/node_modules/splaytree/typings/types.d.ts +0 -2
- package/node_modules/uuid/CHANGELOG.md +0 -292
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/commonjs-browser/index.js +0 -104
- package/node_modules/uuid/dist/commonjs-browser/max.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -200
- package/node_modules/uuid/dist/commonjs-browser/native.js +0 -10
- package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -44
- package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -7
- package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -23
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -82
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -38
- package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -131
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +0 -26
- package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -11
- package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -63
- package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -32
- package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -11
- package/node_modules/uuid/dist/commonjs-browser/v6.js +0 -42
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +0 -26
- package/node_modules/uuid/dist/commonjs-browser/v7.js +0 -152
- package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -12
- package/node_modules/uuid/dist/commonjs-browser/version.js +0 -15
- package/node_modules/uuid/dist/esm-node/max.js +0 -1
- package/node_modules/uuid/dist/esm-node/md5.js +0 -10
- package/node_modules/uuid/dist/esm-node/native.js +0 -4
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -37
- package/node_modules/uuid/dist/esm-node/rng.js +0 -10
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -10
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -31
- package/node_modules/uuid/dist/esm-node/v1.js +0 -125
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +0 -20
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -55
- package/node_modules/uuid/dist/esm-node/v4.js +0 -25
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/v6.js +0 -32
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +0 -20
- package/node_modules/uuid/dist/esm-node/v7.js +0 -146
- package/node_modules/uuid/dist/esm-node/validate.js +0 -5
- package/node_modules/uuid/dist/esm-node/version.js +0 -8
- package/node_modules/uuid/dist/index.js +0 -104
- package/node_modules/uuid/dist/max.js +0 -7
- package/node_modules/uuid/dist/md5-browser.js +0 -200
- package/node_modules/uuid/dist/md5.js +0 -17
- package/node_modules/uuid/dist/native-browser.js +0 -10
- package/node_modules/uuid/dist/native.js +0 -11
- package/node_modules/uuid/dist/nil.js +0 -7
- package/node_modules/uuid/dist/parse.js +0 -44
- package/node_modules/uuid/dist/regex.js +0 -7
- package/node_modules/uuid/dist/rng-browser.js +0 -23
- package/node_modules/uuid/dist/rng.js +0 -17
- package/node_modules/uuid/dist/sha1-browser.js +0 -82
- package/node_modules/uuid/dist/sha1.js +0 -17
- package/node_modules/uuid/dist/stringify.js +0 -38
- package/node_modules/uuid/dist/uuid-bin.js +0 -75
- package/node_modules/uuid/dist/v1.js +0 -131
- package/node_modules/uuid/dist/v1ToV6.js +0 -26
- package/node_modules/uuid/dist/v3.js +0 -11
- package/node_modules/uuid/dist/v35.js +0 -63
- package/node_modules/uuid/dist/v4.js +0 -32
- package/node_modules/uuid/dist/v5.js +0 -11
- package/node_modules/uuid/dist/v6.js +0 -38
- package/node_modules/uuid/dist/v6ToV1.js +0 -26
- package/node_modules/uuid/dist/v7.js +0 -152
- package/node_modules/uuid/dist/validate.js +0 -12
- package/node_modules/uuid/dist/version.js +0 -15
- package/node_modules/uuid/wrapper.mjs +0 -15
- /package/node_modules/point-in-polygon-hao/{index.d.ts → dist/cjs/index.d.cts} +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/LICENSE +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/README.md +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/incircle.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/insphere.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient2d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/orient3d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/esm/util.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.d.ts +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/index.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/package.json +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/incircle.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/insphere.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient2d.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/orient3d.min.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.js +0 -0
- /package/node_modules/{polygon-clipping → point-in-polygon-hao}/node_modules/robust-predicates/umd/predicates.min.js +0 -0
|
@@ -0,0 +1,1179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var src_exports = {};
|
|
32
|
+
__export(src_exports, {
|
|
33
|
+
difference: () => difference,
|
|
34
|
+
intersection: () => intersection2,
|
|
35
|
+
setPrecision: () => setPrecision,
|
|
36
|
+
union: () => union,
|
|
37
|
+
xor: () => xor
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(src_exports);
|
|
40
|
+
|
|
41
|
+
// src/geom-in.ts
|
|
42
|
+
var import_bignumber2 = __toESM(require("bignumber.js"), 1);
|
|
43
|
+
|
|
44
|
+
// src/constant.ts
|
|
45
|
+
var constant_default = (x) => {
|
|
46
|
+
return () => {
|
|
47
|
+
return x;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// src/compare.ts
|
|
52
|
+
var compare_default = (eps) => {
|
|
53
|
+
const almostEqual = eps ? (a, b) => b.minus(a).abs().isLessThanOrEqualTo(eps) : constant_default(false);
|
|
54
|
+
return (a, b) => {
|
|
55
|
+
if (almostEqual(a, b)) return 0;
|
|
56
|
+
return a.comparedTo(b);
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// src/orient.ts
|
|
61
|
+
function orient_default(eps) {
|
|
62
|
+
const almostCollinear = eps ? (area2, ax, ay, cx, cy) => area2.exponentiatedBy(2).isLessThanOrEqualTo(
|
|
63
|
+
cx.minus(ax).exponentiatedBy(2).plus(cy.minus(ay).exponentiatedBy(2)).times(eps)
|
|
64
|
+
) : constant_default(false);
|
|
65
|
+
return (a, b, c) => {
|
|
66
|
+
const ax = a.x, ay = a.y, cx = c.x, cy = c.y;
|
|
67
|
+
const area2 = ay.minus(cy).times(b.x.minus(cx)).minus(ax.minus(cx).times(b.y.minus(cy)));
|
|
68
|
+
if (almostCollinear(area2, ax, ay, cx, cy)) return 0;
|
|
69
|
+
return area2.comparedTo(0);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// src/snap.ts
|
|
74
|
+
var import_bignumber = __toESM(require("bignumber.js"), 1);
|
|
75
|
+
var import_splaytree_ts = require("splaytree-ts");
|
|
76
|
+
|
|
77
|
+
// src/identity.ts
|
|
78
|
+
var identity_default = (x) => {
|
|
79
|
+
return x;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// src/snap.ts
|
|
83
|
+
var snap_default = (eps) => {
|
|
84
|
+
if (eps) {
|
|
85
|
+
const xTree = new import_splaytree_ts.SplayTreeSet(compare_default(eps));
|
|
86
|
+
const yTree = new import_splaytree_ts.SplayTreeSet(compare_default(eps));
|
|
87
|
+
const snapCoord = (coord, tree) => {
|
|
88
|
+
return tree.addAndReturn(coord);
|
|
89
|
+
};
|
|
90
|
+
const snap = (v) => {
|
|
91
|
+
return {
|
|
92
|
+
x: snapCoord(v.x, xTree),
|
|
93
|
+
y: snapCoord(v.y, yTree)
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
snap({ x: new import_bignumber.default(0), y: new import_bignumber.default(0) });
|
|
97
|
+
return snap;
|
|
98
|
+
}
|
|
99
|
+
return identity_default;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/precision.ts
|
|
103
|
+
var set = (eps) => {
|
|
104
|
+
return {
|
|
105
|
+
set: (eps2) => {
|
|
106
|
+
precision = set(eps2);
|
|
107
|
+
},
|
|
108
|
+
reset: () => set(eps),
|
|
109
|
+
compare: compare_default(eps),
|
|
110
|
+
snap: snap_default(eps),
|
|
111
|
+
orient: orient_default(eps)
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
var precision = set();
|
|
115
|
+
|
|
116
|
+
// src/bbox.ts
|
|
117
|
+
var isInBbox = (bbox, point) => {
|
|
118
|
+
return bbox.ll.x.isLessThanOrEqualTo(point.x) && point.x.isLessThanOrEqualTo(bbox.ur.x) && bbox.ll.y.isLessThanOrEqualTo(point.y) && point.y.isLessThanOrEqualTo(bbox.ur.y);
|
|
119
|
+
};
|
|
120
|
+
var getBboxOverlap = (b1, b2) => {
|
|
121
|
+
if (b2.ur.x.isLessThan(b1.ll.x) || b1.ur.x.isLessThan(b2.ll.x) || b2.ur.y.isLessThan(b1.ll.y) || b1.ur.y.isLessThan(b2.ll.y))
|
|
122
|
+
return null;
|
|
123
|
+
const lowerX = b1.ll.x.isLessThan(b2.ll.x) ? b2.ll.x : b1.ll.x;
|
|
124
|
+
const upperX = b1.ur.x.isLessThan(b2.ur.x) ? b1.ur.x : b2.ur.x;
|
|
125
|
+
const lowerY = b1.ll.y.isLessThan(b2.ll.y) ? b2.ll.y : b1.ll.y;
|
|
126
|
+
const upperY = b1.ur.y.isLessThan(b2.ur.y) ? b1.ur.y : b2.ur.y;
|
|
127
|
+
return { ll: { x: lowerX, y: lowerY }, ur: { x: upperX, y: upperY } };
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/operation.ts
|
|
131
|
+
var import_splaytree_ts3 = require("splaytree-ts");
|
|
132
|
+
|
|
133
|
+
// src/vector.ts
|
|
134
|
+
var crossProduct = (a, b) => a.x.times(b.y).minus(a.y.times(b.x));
|
|
135
|
+
var dotProduct = (a, b) => a.x.times(b.x).plus(a.y.times(b.y));
|
|
136
|
+
var length = (v) => dotProduct(v, v).sqrt();
|
|
137
|
+
var sineOfAngle = (pShared, pBase, pAngle) => {
|
|
138
|
+
const vBase = { x: pBase.x.minus(pShared.x), y: pBase.y.minus(pShared.y) };
|
|
139
|
+
const vAngle = { x: pAngle.x.minus(pShared.x), y: pAngle.y.minus(pShared.y) };
|
|
140
|
+
return crossProduct(vAngle, vBase).div(length(vAngle)).div(length(vBase));
|
|
141
|
+
};
|
|
142
|
+
var cosineOfAngle = (pShared, pBase, pAngle) => {
|
|
143
|
+
const vBase = { x: pBase.x.minus(pShared.x), y: pBase.y.minus(pShared.y) };
|
|
144
|
+
const vAngle = { x: pAngle.x.minus(pShared.x), y: pAngle.y.minus(pShared.y) };
|
|
145
|
+
return dotProduct(vAngle, vBase).div(length(vAngle)).div(length(vBase));
|
|
146
|
+
};
|
|
147
|
+
var horizontalIntersection = (pt, v, y) => {
|
|
148
|
+
if (v.y.isZero()) return null;
|
|
149
|
+
return { x: pt.x.plus(v.x.div(v.y).times(y.minus(pt.y))), y };
|
|
150
|
+
};
|
|
151
|
+
var verticalIntersection = (pt, v, x) => {
|
|
152
|
+
if (v.x.isZero()) return null;
|
|
153
|
+
return { x, y: pt.y.plus(v.y.div(v.x).times(x.minus(pt.x))) };
|
|
154
|
+
};
|
|
155
|
+
var intersection = (pt1, v1, pt2, v2) => {
|
|
156
|
+
if (v1.x.isZero()) return verticalIntersection(pt2, v2, pt1.x);
|
|
157
|
+
if (v2.x.isZero()) return verticalIntersection(pt1, v1, pt2.x);
|
|
158
|
+
if (v1.y.isZero()) return horizontalIntersection(pt2, v2, pt1.y);
|
|
159
|
+
if (v2.y.isZero()) return horizontalIntersection(pt1, v1, pt2.y);
|
|
160
|
+
const kross = crossProduct(v1, v2);
|
|
161
|
+
if (kross.isZero()) return null;
|
|
162
|
+
const ve = { x: pt2.x.minus(pt1.x), y: pt2.y.minus(pt1.y) };
|
|
163
|
+
const d1 = crossProduct(ve, v1).div(kross);
|
|
164
|
+
const d2 = crossProduct(ve, v2).div(kross);
|
|
165
|
+
const x1 = pt1.x.plus(d2.times(v1.x)), x2 = pt2.x.plus(d1.times(v2.x));
|
|
166
|
+
const y1 = pt1.y.plus(d2.times(v1.y)), y2 = pt2.y.plus(d1.times(v2.y));
|
|
167
|
+
const x = x1.plus(x2).div(2);
|
|
168
|
+
const y = y1.plus(y2).div(2);
|
|
169
|
+
return { x, y };
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// src/sweep-event.ts
|
|
173
|
+
var SweepEvent = class _SweepEvent {
|
|
174
|
+
point;
|
|
175
|
+
isLeft;
|
|
176
|
+
segment;
|
|
177
|
+
otherSE;
|
|
178
|
+
consumedBy;
|
|
179
|
+
// for ordering sweep events in the sweep event queue
|
|
180
|
+
static compare(a, b) {
|
|
181
|
+
const ptCmp = _SweepEvent.comparePoints(a.point, b.point);
|
|
182
|
+
if (ptCmp !== 0) return ptCmp;
|
|
183
|
+
if (a.point !== b.point) a.link(b);
|
|
184
|
+
if (a.isLeft !== b.isLeft) return a.isLeft ? 1 : -1;
|
|
185
|
+
return Segment.compare(a.segment, b.segment);
|
|
186
|
+
}
|
|
187
|
+
// for ordering points in sweep line order
|
|
188
|
+
static comparePoints(aPt, bPt) {
|
|
189
|
+
if (aPt.x.isLessThan(bPt.x)) return -1;
|
|
190
|
+
if (aPt.x.isGreaterThan(bPt.x)) return 1;
|
|
191
|
+
if (aPt.y.isLessThan(bPt.y)) return -1;
|
|
192
|
+
if (aPt.y.isGreaterThan(bPt.y)) return 1;
|
|
193
|
+
return 0;
|
|
194
|
+
}
|
|
195
|
+
// Warning: 'point' input will be modified and re-used (for performance)
|
|
196
|
+
constructor(point, isLeft) {
|
|
197
|
+
if (point.events === void 0) point.events = [this];
|
|
198
|
+
else point.events.push(this);
|
|
199
|
+
this.point = point;
|
|
200
|
+
this.isLeft = isLeft;
|
|
201
|
+
}
|
|
202
|
+
link(other) {
|
|
203
|
+
if (other.point === this.point) {
|
|
204
|
+
throw new Error("Tried to link already linked events");
|
|
205
|
+
}
|
|
206
|
+
const otherEvents = other.point.events;
|
|
207
|
+
for (let i = 0, iMax = otherEvents.length; i < iMax; i++) {
|
|
208
|
+
const evt = otherEvents[i];
|
|
209
|
+
this.point.events.push(evt);
|
|
210
|
+
evt.point = this.point;
|
|
211
|
+
}
|
|
212
|
+
this.checkForConsuming();
|
|
213
|
+
}
|
|
214
|
+
/* Do a pass over our linked events and check to see if any pair
|
|
215
|
+
* of segments match, and should be consumed. */
|
|
216
|
+
checkForConsuming() {
|
|
217
|
+
const numEvents = this.point.events.length;
|
|
218
|
+
for (let i = 0; i < numEvents; i++) {
|
|
219
|
+
const evt1 = this.point.events[i];
|
|
220
|
+
if (evt1.segment.consumedBy !== void 0) continue;
|
|
221
|
+
for (let j = i + 1; j < numEvents; j++) {
|
|
222
|
+
const evt2 = this.point.events[j];
|
|
223
|
+
if (evt2.consumedBy !== void 0) continue;
|
|
224
|
+
if (evt1.otherSE.point.events !== evt2.otherSE.point.events) continue;
|
|
225
|
+
evt1.segment.consume(evt2.segment);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
getAvailableLinkedEvents() {
|
|
230
|
+
const events = [];
|
|
231
|
+
for (let i = 0, iMax = this.point.events.length; i < iMax; i++) {
|
|
232
|
+
const evt = this.point.events[i];
|
|
233
|
+
if (evt !== this && !evt.segment.ringOut && evt.segment.isInResult()) {
|
|
234
|
+
events.push(evt);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return events;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Returns a comparator function for sorting linked events that will
|
|
241
|
+
* favor the event that will give us the smallest left-side angle.
|
|
242
|
+
* All ring construction starts as low as possible heading to the right,
|
|
243
|
+
* so by always turning left as sharp as possible we'll get polygons
|
|
244
|
+
* without uncessary loops & holes.
|
|
245
|
+
*
|
|
246
|
+
* The comparator function has a compute cache such that it avoids
|
|
247
|
+
* re-computing already-computed values.
|
|
248
|
+
*/
|
|
249
|
+
getLeftmostComparator(baseEvent) {
|
|
250
|
+
const cache = /* @__PURE__ */ new Map();
|
|
251
|
+
const fillCache = (linkedEvent) => {
|
|
252
|
+
const nextEvent = linkedEvent.otherSE;
|
|
253
|
+
cache.set(linkedEvent, {
|
|
254
|
+
sine: sineOfAngle(this.point, baseEvent.point, nextEvent.point),
|
|
255
|
+
cosine: cosineOfAngle(this.point, baseEvent.point, nextEvent.point)
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
return (a, b) => {
|
|
259
|
+
if (!cache.has(a)) fillCache(a);
|
|
260
|
+
if (!cache.has(b)) fillCache(b);
|
|
261
|
+
const { sine: asine, cosine: acosine } = cache.get(a);
|
|
262
|
+
const { sine: bsine, cosine: bcosine } = cache.get(b);
|
|
263
|
+
if (asine.isGreaterThanOrEqualTo(0) && bsine.isGreaterThanOrEqualTo(0)) {
|
|
264
|
+
if (acosine.isLessThan(bcosine)) return 1;
|
|
265
|
+
if (acosine.isGreaterThan(bcosine)) return -1;
|
|
266
|
+
return 0;
|
|
267
|
+
}
|
|
268
|
+
if (asine.isLessThan(0) && bsine.isLessThan(0)) {
|
|
269
|
+
if (acosine.isLessThan(bcosine)) return -1;
|
|
270
|
+
if (acosine.isGreaterThan(bcosine)) return 1;
|
|
271
|
+
return 0;
|
|
272
|
+
}
|
|
273
|
+
if (bsine.isLessThan(asine)) return -1;
|
|
274
|
+
if (bsine.isGreaterThan(asine)) return 1;
|
|
275
|
+
return 0;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// src/geom-out.ts
|
|
281
|
+
var RingOut = class _RingOut {
|
|
282
|
+
events;
|
|
283
|
+
poly;
|
|
284
|
+
_isExteriorRing;
|
|
285
|
+
_enclosingRing;
|
|
286
|
+
/* Given the segments from the sweep line pass, compute & return a series
|
|
287
|
+
* of closed rings from all the segments marked to be part of the result */
|
|
288
|
+
static factory(allSegments) {
|
|
289
|
+
const ringsOut = [];
|
|
290
|
+
for (let i = 0, iMax = allSegments.length; i < iMax; i++) {
|
|
291
|
+
const segment = allSegments[i];
|
|
292
|
+
if (!segment.isInResult() || segment.ringOut) continue;
|
|
293
|
+
let prevEvent = null;
|
|
294
|
+
let event = segment.leftSE;
|
|
295
|
+
let nextEvent = segment.rightSE;
|
|
296
|
+
const events = [event];
|
|
297
|
+
const startingPoint = event.point;
|
|
298
|
+
const intersectionLEs = [];
|
|
299
|
+
while (true) {
|
|
300
|
+
prevEvent = event;
|
|
301
|
+
event = nextEvent;
|
|
302
|
+
events.push(event);
|
|
303
|
+
if (event.point === startingPoint) break;
|
|
304
|
+
while (true) {
|
|
305
|
+
const availableLEs = event.getAvailableLinkedEvents();
|
|
306
|
+
if (availableLEs.length === 0) {
|
|
307
|
+
const firstPt = events[0].point;
|
|
308
|
+
const lastPt = events[events.length - 1].point;
|
|
309
|
+
throw new Error(
|
|
310
|
+
`Unable to complete output ring starting at [${firstPt.x}, ${firstPt.y}]. Last matching segment found ends at [${lastPt.x}, ${lastPt.y}].`
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
if (availableLEs.length === 1) {
|
|
314
|
+
nextEvent = availableLEs[0].otherSE;
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
let indexLE = null;
|
|
318
|
+
for (let j = 0, jMax = intersectionLEs.length; j < jMax; j++) {
|
|
319
|
+
if (intersectionLEs[j].point === event.point) {
|
|
320
|
+
indexLE = j;
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (indexLE !== null) {
|
|
325
|
+
const intersectionLE = intersectionLEs.splice(indexLE)[0];
|
|
326
|
+
const ringEvents = events.splice(intersectionLE.index);
|
|
327
|
+
ringEvents.unshift(ringEvents[0].otherSE);
|
|
328
|
+
ringsOut.push(new _RingOut(ringEvents.reverse()));
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
intersectionLEs.push({
|
|
332
|
+
index: events.length,
|
|
333
|
+
point: event.point
|
|
334
|
+
});
|
|
335
|
+
const comparator = event.getLeftmostComparator(prevEvent);
|
|
336
|
+
nextEvent = availableLEs.sort(comparator)[0].otherSE;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
ringsOut.push(new _RingOut(events));
|
|
341
|
+
}
|
|
342
|
+
return ringsOut;
|
|
343
|
+
}
|
|
344
|
+
constructor(events) {
|
|
345
|
+
this.events = events;
|
|
346
|
+
for (let i = 0, iMax = events.length; i < iMax; i++) {
|
|
347
|
+
events[i].segment.ringOut = this;
|
|
348
|
+
}
|
|
349
|
+
this.poly = null;
|
|
350
|
+
}
|
|
351
|
+
getGeom() {
|
|
352
|
+
let prevPt = this.events[0].point;
|
|
353
|
+
const points = [prevPt];
|
|
354
|
+
for (let i = 1, iMax = this.events.length - 1; i < iMax; i++) {
|
|
355
|
+
const pt2 = this.events[i].point;
|
|
356
|
+
const nextPt2 = this.events[i + 1].point;
|
|
357
|
+
if (precision.orient(pt2, prevPt, nextPt2) === 0) continue;
|
|
358
|
+
points.push(pt2);
|
|
359
|
+
prevPt = pt2;
|
|
360
|
+
}
|
|
361
|
+
if (points.length === 1) return null;
|
|
362
|
+
const pt = points[0];
|
|
363
|
+
const nextPt = points[1];
|
|
364
|
+
if (precision.orient(pt, prevPt, nextPt) === 0) points.shift();
|
|
365
|
+
points.push(points[0]);
|
|
366
|
+
const step = this.isExteriorRing() ? 1 : -1;
|
|
367
|
+
const iStart = this.isExteriorRing() ? 0 : points.length - 1;
|
|
368
|
+
const iEnd = this.isExteriorRing() ? points.length : -1;
|
|
369
|
+
const orderedPoints = [];
|
|
370
|
+
for (let i = iStart; i != iEnd; i += step)
|
|
371
|
+
orderedPoints.push([points[i].x.toNumber(), points[i].y.toNumber()]);
|
|
372
|
+
return orderedPoints;
|
|
373
|
+
}
|
|
374
|
+
isExteriorRing() {
|
|
375
|
+
if (this._isExteriorRing === void 0) {
|
|
376
|
+
const enclosing = this.enclosingRing();
|
|
377
|
+
this._isExteriorRing = enclosing ? !enclosing.isExteriorRing() : true;
|
|
378
|
+
}
|
|
379
|
+
return this._isExteriorRing;
|
|
380
|
+
}
|
|
381
|
+
enclosingRing() {
|
|
382
|
+
if (this._enclosingRing === void 0) {
|
|
383
|
+
this._enclosingRing = this._calcEnclosingRing();
|
|
384
|
+
}
|
|
385
|
+
return this._enclosingRing;
|
|
386
|
+
}
|
|
387
|
+
/* Returns the ring that encloses this one, if any */
|
|
388
|
+
_calcEnclosingRing() {
|
|
389
|
+
let leftMostEvt = this.events[0];
|
|
390
|
+
for (let i = 1, iMax = this.events.length; i < iMax; i++) {
|
|
391
|
+
const evt = this.events[i];
|
|
392
|
+
if (SweepEvent.compare(leftMostEvt, evt) > 0) leftMostEvt = evt;
|
|
393
|
+
}
|
|
394
|
+
let prevSeg = leftMostEvt.segment.prevInResult();
|
|
395
|
+
let prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;
|
|
396
|
+
while (true) {
|
|
397
|
+
if (!prevSeg) return null;
|
|
398
|
+
if (!prevPrevSeg) return prevSeg.ringOut;
|
|
399
|
+
if (prevPrevSeg.ringOut !== prevSeg.ringOut) {
|
|
400
|
+
if (prevPrevSeg.ringOut?.enclosingRing() !== prevSeg.ringOut) {
|
|
401
|
+
return prevSeg.ringOut;
|
|
402
|
+
} else return prevSeg.ringOut?.enclosingRing();
|
|
403
|
+
}
|
|
404
|
+
prevSeg = prevPrevSeg.prevInResult();
|
|
405
|
+
prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
var PolyOut = class {
|
|
410
|
+
exteriorRing;
|
|
411
|
+
interiorRings;
|
|
412
|
+
constructor(exteriorRing) {
|
|
413
|
+
this.exteriorRing = exteriorRing;
|
|
414
|
+
exteriorRing.poly = this;
|
|
415
|
+
this.interiorRings = [];
|
|
416
|
+
}
|
|
417
|
+
addInterior(ring) {
|
|
418
|
+
this.interiorRings.push(ring);
|
|
419
|
+
ring.poly = this;
|
|
420
|
+
}
|
|
421
|
+
getGeom() {
|
|
422
|
+
const geom0 = this.exteriorRing.getGeom();
|
|
423
|
+
if (geom0 === null) return null;
|
|
424
|
+
const geom = [geom0];
|
|
425
|
+
for (let i = 0, iMax = this.interiorRings.length; i < iMax; i++) {
|
|
426
|
+
const ringGeom = this.interiorRings[i].getGeom();
|
|
427
|
+
if (ringGeom === null) continue;
|
|
428
|
+
geom.push(ringGeom);
|
|
429
|
+
}
|
|
430
|
+
return geom;
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
var MultiPolyOut = class {
|
|
434
|
+
rings;
|
|
435
|
+
polys;
|
|
436
|
+
constructor(rings) {
|
|
437
|
+
this.rings = rings;
|
|
438
|
+
this.polys = this._composePolys(rings);
|
|
439
|
+
}
|
|
440
|
+
getGeom() {
|
|
441
|
+
const geom = [];
|
|
442
|
+
for (let i = 0, iMax = this.polys.length; i < iMax; i++) {
|
|
443
|
+
const polyGeom = this.polys[i].getGeom();
|
|
444
|
+
if (polyGeom === null) continue;
|
|
445
|
+
geom.push(polyGeom);
|
|
446
|
+
}
|
|
447
|
+
return geom;
|
|
448
|
+
}
|
|
449
|
+
_composePolys(rings) {
|
|
450
|
+
const polys = [];
|
|
451
|
+
for (let i = 0, iMax = rings.length; i < iMax; i++) {
|
|
452
|
+
const ring = rings[i];
|
|
453
|
+
if (ring.poly) continue;
|
|
454
|
+
if (ring.isExteriorRing()) polys.push(new PolyOut(ring));
|
|
455
|
+
else {
|
|
456
|
+
const enclosingRing = ring.enclosingRing();
|
|
457
|
+
if (!enclosingRing?.poly) polys.push(new PolyOut(enclosingRing));
|
|
458
|
+
enclosingRing?.poly?.addInterior(ring);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
return polys;
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
// src/sweep-line.ts
|
|
466
|
+
var import_splaytree_ts2 = require("splaytree-ts");
|
|
467
|
+
var SweepLine = class {
|
|
468
|
+
queue;
|
|
469
|
+
tree;
|
|
470
|
+
segments;
|
|
471
|
+
constructor(queue, comparator = Segment.compare) {
|
|
472
|
+
this.queue = queue;
|
|
473
|
+
this.tree = new import_splaytree_ts2.SplayTreeSet(comparator);
|
|
474
|
+
this.segments = [];
|
|
475
|
+
}
|
|
476
|
+
process(event) {
|
|
477
|
+
const segment = event.segment;
|
|
478
|
+
const newEvents = [];
|
|
479
|
+
if (event.consumedBy) {
|
|
480
|
+
if (event.isLeft) this.queue.delete(event.otherSE);
|
|
481
|
+
else this.tree.delete(segment);
|
|
482
|
+
return newEvents;
|
|
483
|
+
}
|
|
484
|
+
if (event.isLeft) this.tree.add(segment);
|
|
485
|
+
let prevSeg = segment;
|
|
486
|
+
let nextSeg = segment;
|
|
487
|
+
do {
|
|
488
|
+
prevSeg = this.tree.lastBefore(prevSeg);
|
|
489
|
+
} while (prevSeg != null && prevSeg.consumedBy != void 0);
|
|
490
|
+
do {
|
|
491
|
+
nextSeg = this.tree.firstAfter(nextSeg);
|
|
492
|
+
} while (nextSeg != null && nextSeg.consumedBy != void 0);
|
|
493
|
+
if (event.isLeft) {
|
|
494
|
+
let prevMySplitter = null;
|
|
495
|
+
if (prevSeg) {
|
|
496
|
+
const prevInter = prevSeg.getIntersection(segment);
|
|
497
|
+
if (prevInter !== null) {
|
|
498
|
+
if (!segment.isAnEndpoint(prevInter)) prevMySplitter = prevInter;
|
|
499
|
+
if (!prevSeg.isAnEndpoint(prevInter)) {
|
|
500
|
+
const newEventsFromSplit = this._splitSafely(prevSeg, prevInter);
|
|
501
|
+
for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
|
|
502
|
+
newEvents.push(newEventsFromSplit[i]);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
let nextMySplitter = null;
|
|
508
|
+
if (nextSeg) {
|
|
509
|
+
const nextInter = nextSeg.getIntersection(segment);
|
|
510
|
+
if (nextInter !== null) {
|
|
511
|
+
if (!segment.isAnEndpoint(nextInter)) nextMySplitter = nextInter;
|
|
512
|
+
if (!nextSeg.isAnEndpoint(nextInter)) {
|
|
513
|
+
const newEventsFromSplit = this._splitSafely(nextSeg, nextInter);
|
|
514
|
+
for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
|
|
515
|
+
newEvents.push(newEventsFromSplit[i]);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (prevMySplitter !== null || nextMySplitter !== null) {
|
|
521
|
+
let mySplitter = null;
|
|
522
|
+
if (prevMySplitter === null) mySplitter = nextMySplitter;
|
|
523
|
+
else if (nextMySplitter === null) mySplitter = prevMySplitter;
|
|
524
|
+
else {
|
|
525
|
+
const cmpSplitters = SweepEvent.comparePoints(
|
|
526
|
+
prevMySplitter,
|
|
527
|
+
nextMySplitter
|
|
528
|
+
);
|
|
529
|
+
mySplitter = cmpSplitters <= 0 ? prevMySplitter : nextMySplitter;
|
|
530
|
+
}
|
|
531
|
+
this.queue.delete(segment.rightSE);
|
|
532
|
+
newEvents.push(segment.rightSE);
|
|
533
|
+
const newEventsFromSplit = segment.split(mySplitter);
|
|
534
|
+
for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
|
|
535
|
+
newEvents.push(newEventsFromSplit[i]);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (newEvents.length > 0) {
|
|
539
|
+
this.tree.delete(segment);
|
|
540
|
+
newEvents.push(event);
|
|
541
|
+
} else {
|
|
542
|
+
this.segments.push(segment);
|
|
543
|
+
segment.prev = prevSeg;
|
|
544
|
+
}
|
|
545
|
+
} else {
|
|
546
|
+
if (prevSeg && nextSeg) {
|
|
547
|
+
const inter = prevSeg.getIntersection(nextSeg);
|
|
548
|
+
if (inter !== null) {
|
|
549
|
+
if (!prevSeg.isAnEndpoint(inter)) {
|
|
550
|
+
const newEventsFromSplit = this._splitSafely(prevSeg, inter);
|
|
551
|
+
for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
|
|
552
|
+
newEvents.push(newEventsFromSplit[i]);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (!nextSeg.isAnEndpoint(inter)) {
|
|
556
|
+
const newEventsFromSplit = this._splitSafely(nextSeg, inter);
|
|
557
|
+
for (let i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {
|
|
558
|
+
newEvents.push(newEventsFromSplit[i]);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
this.tree.delete(segment);
|
|
564
|
+
}
|
|
565
|
+
return newEvents;
|
|
566
|
+
}
|
|
567
|
+
/* Safely split a segment that is currently in the datastructures
|
|
568
|
+
* IE - a segment other than the one that is currently being processed. */
|
|
569
|
+
_splitSafely(seg, pt) {
|
|
570
|
+
this.tree.delete(seg);
|
|
571
|
+
const rightSE = seg.rightSE;
|
|
572
|
+
this.queue.delete(rightSE);
|
|
573
|
+
const newEvents = seg.split(pt);
|
|
574
|
+
newEvents.push(rightSE);
|
|
575
|
+
if (seg.consumedBy === void 0) this.tree.add(seg);
|
|
576
|
+
return newEvents;
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
// src/operation.ts
|
|
581
|
+
var Operation = class {
|
|
582
|
+
type;
|
|
583
|
+
numMultiPolys;
|
|
584
|
+
run(type, geom, moreGeoms) {
|
|
585
|
+
operation.type = type;
|
|
586
|
+
const multipolys = [new MultiPolyIn(geom, true)];
|
|
587
|
+
for (let i = 0, iMax = moreGeoms.length; i < iMax; i++) {
|
|
588
|
+
multipolys.push(new MultiPolyIn(moreGeoms[i], false));
|
|
589
|
+
}
|
|
590
|
+
operation.numMultiPolys = multipolys.length;
|
|
591
|
+
if (operation.type === "difference") {
|
|
592
|
+
const subject = multipolys[0];
|
|
593
|
+
let i = 1;
|
|
594
|
+
while (i < multipolys.length) {
|
|
595
|
+
if (getBboxOverlap(multipolys[i].bbox, subject.bbox) !== null) i++;
|
|
596
|
+
else multipolys.splice(i, 1);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (operation.type === "intersection") {
|
|
600
|
+
for (let i = 0, iMax = multipolys.length; i < iMax; i++) {
|
|
601
|
+
const mpA = multipolys[i];
|
|
602
|
+
for (let j = i + 1, jMax = multipolys.length; j < jMax; j++) {
|
|
603
|
+
if (getBboxOverlap(mpA.bbox, multipolys[j].bbox) === null) return [];
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
const queue = new import_splaytree_ts3.SplayTreeSet(SweepEvent.compare);
|
|
608
|
+
for (let i = 0, iMax = multipolys.length; i < iMax; i++) {
|
|
609
|
+
const sweepEvents = multipolys[i].getSweepEvents();
|
|
610
|
+
for (let j = 0, jMax = sweepEvents.length; j < jMax; j++) {
|
|
611
|
+
queue.add(sweepEvents[j]);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
const sweepLine = new SweepLine(queue);
|
|
615
|
+
let evt = null;
|
|
616
|
+
if (queue.size != 0) {
|
|
617
|
+
evt = queue.first();
|
|
618
|
+
queue.delete(evt);
|
|
619
|
+
}
|
|
620
|
+
while (evt) {
|
|
621
|
+
const newEvents = sweepLine.process(evt);
|
|
622
|
+
for (let i = 0, iMax = newEvents.length; i < iMax; i++) {
|
|
623
|
+
const evt2 = newEvents[i];
|
|
624
|
+
if (evt2.consumedBy === void 0) queue.add(evt2);
|
|
625
|
+
}
|
|
626
|
+
if (queue.size != 0) {
|
|
627
|
+
evt = queue.first();
|
|
628
|
+
queue.delete(evt);
|
|
629
|
+
} else {
|
|
630
|
+
evt = null;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
precision.reset();
|
|
634
|
+
const ringsOut = RingOut.factory(sweepLine.segments);
|
|
635
|
+
const result = new MultiPolyOut(ringsOut);
|
|
636
|
+
return result.getGeom();
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
var operation = new Operation();
|
|
640
|
+
var operation_default = operation;
|
|
641
|
+
|
|
642
|
+
// src/segment.ts
|
|
643
|
+
var segmentId = 0;
|
|
644
|
+
var Segment = class _Segment {
|
|
645
|
+
id;
|
|
646
|
+
leftSE;
|
|
647
|
+
rightSE;
|
|
648
|
+
rings;
|
|
649
|
+
windings;
|
|
650
|
+
ringOut;
|
|
651
|
+
consumedBy;
|
|
652
|
+
prev;
|
|
653
|
+
_prevInResult;
|
|
654
|
+
_beforeState;
|
|
655
|
+
_afterState;
|
|
656
|
+
_isInResult;
|
|
657
|
+
/* This compare() function is for ordering segments in the sweep
|
|
658
|
+
* line tree, and does so according to the following criteria:
|
|
659
|
+
*
|
|
660
|
+
* Consider the vertical line that lies an infinestimal step to the
|
|
661
|
+
* right of the right-more of the two left endpoints of the input
|
|
662
|
+
* segments. Imagine slowly moving a point up from negative infinity
|
|
663
|
+
* in the increasing y direction. Which of the two segments will that
|
|
664
|
+
* point intersect first? That segment comes 'before' the other one.
|
|
665
|
+
*
|
|
666
|
+
* If neither segment would be intersected by such a line, (if one
|
|
667
|
+
* or more of the segments are vertical) then the line to be considered
|
|
668
|
+
* is directly on the right-more of the two left inputs.
|
|
669
|
+
*/
|
|
670
|
+
static compare(a, b) {
|
|
671
|
+
const alx = a.leftSE.point.x;
|
|
672
|
+
const blx = b.leftSE.point.x;
|
|
673
|
+
const arx = a.rightSE.point.x;
|
|
674
|
+
const brx = b.rightSE.point.x;
|
|
675
|
+
if (brx.isLessThan(alx)) return 1;
|
|
676
|
+
if (arx.isLessThan(blx)) return -1;
|
|
677
|
+
const aly = a.leftSE.point.y;
|
|
678
|
+
const bly = b.leftSE.point.y;
|
|
679
|
+
const ary = a.rightSE.point.y;
|
|
680
|
+
const bry = b.rightSE.point.y;
|
|
681
|
+
if (alx.isLessThan(blx)) {
|
|
682
|
+
if (bly.isLessThan(aly) && bly.isLessThan(ary)) return 1;
|
|
683
|
+
if (bly.isGreaterThan(aly) && bly.isGreaterThan(ary)) return -1;
|
|
684
|
+
const aCmpBLeft = a.comparePoint(b.leftSE.point);
|
|
685
|
+
if (aCmpBLeft < 0) return 1;
|
|
686
|
+
if (aCmpBLeft > 0) return -1;
|
|
687
|
+
const bCmpARight = b.comparePoint(a.rightSE.point);
|
|
688
|
+
if (bCmpARight !== 0) return bCmpARight;
|
|
689
|
+
return -1;
|
|
690
|
+
}
|
|
691
|
+
if (alx.isGreaterThan(blx)) {
|
|
692
|
+
if (aly.isLessThan(bly) && aly.isLessThan(bry)) return -1;
|
|
693
|
+
if (aly.isGreaterThan(bly) && aly.isGreaterThan(bry)) return 1;
|
|
694
|
+
const bCmpALeft = b.comparePoint(a.leftSE.point);
|
|
695
|
+
if (bCmpALeft !== 0) return bCmpALeft;
|
|
696
|
+
const aCmpBRight = a.comparePoint(b.rightSE.point);
|
|
697
|
+
if (aCmpBRight < 0) return 1;
|
|
698
|
+
if (aCmpBRight > 0) return -1;
|
|
699
|
+
return 1;
|
|
700
|
+
}
|
|
701
|
+
if (aly.isLessThan(bly)) return -1;
|
|
702
|
+
if (aly.isGreaterThan(bly)) return 1;
|
|
703
|
+
if (arx.isLessThan(brx)) {
|
|
704
|
+
const bCmpARight = b.comparePoint(a.rightSE.point);
|
|
705
|
+
if (bCmpARight !== 0) return bCmpARight;
|
|
706
|
+
}
|
|
707
|
+
if (arx.isGreaterThan(brx)) {
|
|
708
|
+
const aCmpBRight = a.comparePoint(b.rightSE.point);
|
|
709
|
+
if (aCmpBRight < 0) return 1;
|
|
710
|
+
if (aCmpBRight > 0) return -1;
|
|
711
|
+
}
|
|
712
|
+
if (!arx.eq(brx)) {
|
|
713
|
+
const ay = ary.minus(aly);
|
|
714
|
+
const ax = arx.minus(alx);
|
|
715
|
+
const by = bry.minus(bly);
|
|
716
|
+
const bx = brx.minus(blx);
|
|
717
|
+
if (ay.isGreaterThan(ax) && by.isLessThan(bx)) return 1;
|
|
718
|
+
if (ay.isLessThan(ax) && by.isGreaterThan(bx)) return -1;
|
|
719
|
+
}
|
|
720
|
+
if (arx.isGreaterThan(brx)) return 1;
|
|
721
|
+
if (arx.isLessThan(brx)) return -1;
|
|
722
|
+
if (ary.isLessThan(bry)) return -1;
|
|
723
|
+
if (ary.isGreaterThan(bry)) return 1;
|
|
724
|
+
if (a.id < b.id) return -1;
|
|
725
|
+
if (a.id > b.id) return 1;
|
|
726
|
+
return 0;
|
|
727
|
+
}
|
|
728
|
+
/* Warning: a reference to ringWindings input will be stored,
|
|
729
|
+
* and possibly will be later modified */
|
|
730
|
+
constructor(leftSE, rightSE, rings, windings) {
|
|
731
|
+
this.id = ++segmentId;
|
|
732
|
+
this.leftSE = leftSE;
|
|
733
|
+
leftSE.segment = this;
|
|
734
|
+
leftSE.otherSE = rightSE;
|
|
735
|
+
this.rightSE = rightSE;
|
|
736
|
+
rightSE.segment = this;
|
|
737
|
+
rightSE.otherSE = leftSE;
|
|
738
|
+
this.rings = rings;
|
|
739
|
+
this.windings = windings;
|
|
740
|
+
}
|
|
741
|
+
static fromRing(pt1, pt2, ring) {
|
|
742
|
+
let leftPt, rightPt, winding;
|
|
743
|
+
const cmpPts = SweepEvent.comparePoints(pt1, pt2);
|
|
744
|
+
if (cmpPts < 0) {
|
|
745
|
+
leftPt = pt1;
|
|
746
|
+
rightPt = pt2;
|
|
747
|
+
winding = 1;
|
|
748
|
+
} else if (cmpPts > 0) {
|
|
749
|
+
leftPt = pt2;
|
|
750
|
+
rightPt = pt1;
|
|
751
|
+
winding = -1;
|
|
752
|
+
} else
|
|
753
|
+
throw new Error(
|
|
754
|
+
`Tried to create degenerate segment at [${pt1.x}, ${pt1.y}]`
|
|
755
|
+
);
|
|
756
|
+
const leftSE = new SweepEvent(leftPt, true);
|
|
757
|
+
const rightSE = new SweepEvent(rightPt, false);
|
|
758
|
+
return new _Segment(leftSE, rightSE, [ring], [winding]);
|
|
759
|
+
}
|
|
760
|
+
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
761
|
+
replaceRightSE(newRightSE) {
|
|
762
|
+
this.rightSE = newRightSE;
|
|
763
|
+
this.rightSE.segment = this;
|
|
764
|
+
this.rightSE.otherSE = this.leftSE;
|
|
765
|
+
this.leftSE.otherSE = this.rightSE;
|
|
766
|
+
}
|
|
767
|
+
bbox() {
|
|
768
|
+
const y1 = this.leftSE.point.y;
|
|
769
|
+
const y2 = this.rightSE.point.y;
|
|
770
|
+
return {
|
|
771
|
+
ll: { x: this.leftSE.point.x, y: y1.isLessThan(y2) ? y1 : y2 },
|
|
772
|
+
ur: { x: this.rightSE.point.x, y: y1.isGreaterThan(y2) ? y1 : y2 }
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
/* A vector from the left point to the right */
|
|
776
|
+
vector() {
|
|
777
|
+
return {
|
|
778
|
+
x: this.rightSE.point.x.minus(this.leftSE.point.x),
|
|
779
|
+
y: this.rightSE.point.y.minus(this.leftSE.point.y)
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
isAnEndpoint(pt) {
|
|
783
|
+
return pt.x.eq(this.leftSE.point.x) && pt.y.eq(this.leftSE.point.y) || pt.x.eq(this.rightSE.point.x) && pt.y.eq(this.rightSE.point.y);
|
|
784
|
+
}
|
|
785
|
+
/* Compare this segment with a point.
|
|
786
|
+
*
|
|
787
|
+
* A point P is considered to be colinear to a segment if there
|
|
788
|
+
* exists a distance D such that if we travel along the segment
|
|
789
|
+
* from one * endpoint towards the other a distance D, we find
|
|
790
|
+
* ourselves at point P.
|
|
791
|
+
*
|
|
792
|
+
* Return value indicates:
|
|
793
|
+
*
|
|
794
|
+
* 1: point lies above the segment (to the left of vertical)
|
|
795
|
+
* 0: point is colinear to segment
|
|
796
|
+
* -1: point lies below the segment (to the right of vertical)
|
|
797
|
+
*/
|
|
798
|
+
comparePoint(point) {
|
|
799
|
+
return precision.orient(this.leftSE.point, point, this.rightSE.point);
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Given another segment, returns the first non-trivial intersection
|
|
803
|
+
* between the two segments (in terms of sweep line ordering), if it exists.
|
|
804
|
+
*
|
|
805
|
+
* A 'non-trivial' intersection is one that will cause one or both of the
|
|
806
|
+
* segments to be split(). As such, 'trivial' vs. 'non-trivial' intersection:
|
|
807
|
+
*
|
|
808
|
+
* * endpoint of segA with endpoint of segB --> trivial
|
|
809
|
+
* * endpoint of segA with point along segB --> non-trivial
|
|
810
|
+
* * endpoint of segB with point along segA --> non-trivial
|
|
811
|
+
* * point along segA with point along segB --> non-trivial
|
|
812
|
+
*
|
|
813
|
+
* If no non-trivial intersection exists, return null
|
|
814
|
+
* Else, return null.
|
|
815
|
+
*/
|
|
816
|
+
getIntersection(other) {
|
|
817
|
+
const tBbox = this.bbox();
|
|
818
|
+
const oBbox = other.bbox();
|
|
819
|
+
const bboxOverlap = getBboxOverlap(tBbox, oBbox);
|
|
820
|
+
if (bboxOverlap === null) return null;
|
|
821
|
+
const tlp = this.leftSE.point;
|
|
822
|
+
const trp = this.rightSE.point;
|
|
823
|
+
const olp = other.leftSE.point;
|
|
824
|
+
const orp = other.rightSE.point;
|
|
825
|
+
const touchesOtherLSE = isInBbox(tBbox, olp) && this.comparePoint(olp) === 0;
|
|
826
|
+
const touchesThisLSE = isInBbox(oBbox, tlp) && other.comparePoint(tlp) === 0;
|
|
827
|
+
const touchesOtherRSE = isInBbox(tBbox, orp) && this.comparePoint(orp) === 0;
|
|
828
|
+
const touchesThisRSE = isInBbox(oBbox, trp) && other.comparePoint(trp) === 0;
|
|
829
|
+
if (touchesThisLSE && touchesOtherLSE) {
|
|
830
|
+
if (touchesThisRSE && !touchesOtherRSE) return trp;
|
|
831
|
+
if (!touchesThisRSE && touchesOtherRSE) return orp;
|
|
832
|
+
return null;
|
|
833
|
+
}
|
|
834
|
+
if (touchesThisLSE) {
|
|
835
|
+
if (touchesOtherRSE) {
|
|
836
|
+
if (tlp.x.eq(orp.x) && tlp.y.eq(orp.y)) return null;
|
|
837
|
+
}
|
|
838
|
+
return tlp;
|
|
839
|
+
}
|
|
840
|
+
if (touchesOtherLSE) {
|
|
841
|
+
if (touchesThisRSE) {
|
|
842
|
+
if (trp.x.eq(olp.x) && trp.y.eq(olp.y)) return null;
|
|
843
|
+
}
|
|
844
|
+
return olp;
|
|
845
|
+
}
|
|
846
|
+
if (touchesThisRSE && touchesOtherRSE) return null;
|
|
847
|
+
if (touchesThisRSE) return trp;
|
|
848
|
+
if (touchesOtherRSE) return orp;
|
|
849
|
+
const pt = intersection(tlp, this.vector(), olp, other.vector());
|
|
850
|
+
if (pt === null) return null;
|
|
851
|
+
if (!isInBbox(bboxOverlap, pt)) return null;
|
|
852
|
+
return precision.snap(pt);
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* Split the given segment into multiple segments on the given points.
|
|
856
|
+
* * Each existing segment will retain its leftSE and a new rightSE will be
|
|
857
|
+
* generated for it.
|
|
858
|
+
* * A new segment will be generated which will adopt the original segment's
|
|
859
|
+
* rightSE, and a new leftSE will be generated for it.
|
|
860
|
+
* * If there are more than two points given to split on, new segments
|
|
861
|
+
* in the middle will be generated with new leftSE and rightSE's.
|
|
862
|
+
* * An array of the newly generated SweepEvents will be returned.
|
|
863
|
+
*
|
|
864
|
+
* Warning: input array of points is modified
|
|
865
|
+
*/
|
|
866
|
+
split(point) {
|
|
867
|
+
const newEvents = [];
|
|
868
|
+
const alreadyLinked = point.events !== void 0;
|
|
869
|
+
const newLeftSE = new SweepEvent(point, true);
|
|
870
|
+
const newRightSE = new SweepEvent(point, false);
|
|
871
|
+
const oldRightSE = this.rightSE;
|
|
872
|
+
this.replaceRightSE(newRightSE);
|
|
873
|
+
newEvents.push(newRightSE);
|
|
874
|
+
newEvents.push(newLeftSE);
|
|
875
|
+
const newSeg = new _Segment(
|
|
876
|
+
newLeftSE,
|
|
877
|
+
oldRightSE,
|
|
878
|
+
this.rings.slice(),
|
|
879
|
+
this.windings.slice()
|
|
880
|
+
);
|
|
881
|
+
if (SweepEvent.comparePoints(newSeg.leftSE.point, newSeg.rightSE.point) > 0) {
|
|
882
|
+
newSeg.swapEvents();
|
|
883
|
+
}
|
|
884
|
+
if (SweepEvent.comparePoints(this.leftSE.point, this.rightSE.point) > 0) {
|
|
885
|
+
this.swapEvents();
|
|
886
|
+
}
|
|
887
|
+
if (alreadyLinked) {
|
|
888
|
+
newLeftSE.checkForConsuming();
|
|
889
|
+
newRightSE.checkForConsuming();
|
|
890
|
+
}
|
|
891
|
+
return newEvents;
|
|
892
|
+
}
|
|
893
|
+
/* Swap which event is left and right */
|
|
894
|
+
swapEvents() {
|
|
895
|
+
const tmpEvt = this.rightSE;
|
|
896
|
+
this.rightSE = this.leftSE;
|
|
897
|
+
this.leftSE = tmpEvt;
|
|
898
|
+
this.leftSE.isLeft = true;
|
|
899
|
+
this.rightSE.isLeft = false;
|
|
900
|
+
for (let i = 0, iMax = this.windings.length; i < iMax; i++) {
|
|
901
|
+
this.windings[i] *= -1;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
/* Consume another segment. We take their rings under our wing
|
|
905
|
+
* and mark them as consumed. Use for perfectly overlapping segments */
|
|
906
|
+
consume(other) {
|
|
907
|
+
let consumer = this;
|
|
908
|
+
let consumee = other;
|
|
909
|
+
while (consumer.consumedBy) consumer = consumer.consumedBy;
|
|
910
|
+
while (consumee.consumedBy) consumee = consumee.consumedBy;
|
|
911
|
+
const cmp = _Segment.compare(consumer, consumee);
|
|
912
|
+
if (cmp === 0) return;
|
|
913
|
+
if (cmp > 0) {
|
|
914
|
+
const tmp = consumer;
|
|
915
|
+
consumer = consumee;
|
|
916
|
+
consumee = tmp;
|
|
917
|
+
}
|
|
918
|
+
if (consumer.prev === consumee) {
|
|
919
|
+
const tmp = consumer;
|
|
920
|
+
consumer = consumee;
|
|
921
|
+
consumee = tmp;
|
|
922
|
+
}
|
|
923
|
+
for (let i = 0, iMax = consumee.rings.length; i < iMax; i++) {
|
|
924
|
+
const ring = consumee.rings[i];
|
|
925
|
+
const winding = consumee.windings[i];
|
|
926
|
+
const index = consumer.rings.indexOf(ring);
|
|
927
|
+
if (index === -1) {
|
|
928
|
+
consumer.rings.push(ring);
|
|
929
|
+
consumer.windings.push(winding);
|
|
930
|
+
} else consumer.windings[index] += winding;
|
|
931
|
+
}
|
|
932
|
+
consumee.rings = null;
|
|
933
|
+
consumee.windings = null;
|
|
934
|
+
consumee.consumedBy = consumer;
|
|
935
|
+
consumee.leftSE.consumedBy = consumer.leftSE;
|
|
936
|
+
consumee.rightSE.consumedBy = consumer.rightSE;
|
|
937
|
+
}
|
|
938
|
+
/* The first segment previous segment chain that is in the result */
|
|
939
|
+
prevInResult() {
|
|
940
|
+
if (this._prevInResult !== void 0) return this._prevInResult;
|
|
941
|
+
if (!this.prev) this._prevInResult = null;
|
|
942
|
+
else if (this.prev.isInResult()) this._prevInResult = this.prev;
|
|
943
|
+
else this._prevInResult = this.prev.prevInResult();
|
|
944
|
+
return this._prevInResult;
|
|
945
|
+
}
|
|
946
|
+
beforeState() {
|
|
947
|
+
if (this._beforeState !== void 0) return this._beforeState;
|
|
948
|
+
if (!this.prev)
|
|
949
|
+
this._beforeState = {
|
|
950
|
+
rings: [],
|
|
951
|
+
windings: [],
|
|
952
|
+
multiPolys: []
|
|
953
|
+
};
|
|
954
|
+
else {
|
|
955
|
+
const seg = this.prev.consumedBy || this.prev;
|
|
956
|
+
this._beforeState = seg.afterState();
|
|
957
|
+
}
|
|
958
|
+
return this._beforeState;
|
|
959
|
+
}
|
|
960
|
+
afterState() {
|
|
961
|
+
if (this._afterState !== void 0) return this._afterState;
|
|
962
|
+
const beforeState = this.beforeState();
|
|
963
|
+
this._afterState = {
|
|
964
|
+
rings: beforeState.rings.slice(0),
|
|
965
|
+
windings: beforeState.windings.slice(0),
|
|
966
|
+
multiPolys: []
|
|
967
|
+
};
|
|
968
|
+
const ringsAfter = this._afterState.rings;
|
|
969
|
+
const windingsAfter = this._afterState.windings;
|
|
970
|
+
const mpsAfter = this._afterState.multiPolys;
|
|
971
|
+
for (let i = 0, iMax = this.rings.length; i < iMax; i++) {
|
|
972
|
+
const ring = this.rings[i];
|
|
973
|
+
const winding = this.windings[i];
|
|
974
|
+
const index = ringsAfter.indexOf(ring);
|
|
975
|
+
if (index === -1) {
|
|
976
|
+
ringsAfter.push(ring);
|
|
977
|
+
windingsAfter.push(winding);
|
|
978
|
+
} else windingsAfter[index] += winding;
|
|
979
|
+
}
|
|
980
|
+
const polysAfter = [];
|
|
981
|
+
const polysExclude = [];
|
|
982
|
+
for (let i = 0, iMax = ringsAfter.length; i < iMax; i++) {
|
|
983
|
+
if (windingsAfter[i] === 0) continue;
|
|
984
|
+
const ring = ringsAfter[i];
|
|
985
|
+
const poly = ring.poly;
|
|
986
|
+
if (polysExclude.indexOf(poly) !== -1) continue;
|
|
987
|
+
if (ring.isExterior) polysAfter.push(poly);
|
|
988
|
+
else {
|
|
989
|
+
if (polysExclude.indexOf(poly) === -1) polysExclude.push(poly);
|
|
990
|
+
const index = polysAfter.indexOf(ring.poly);
|
|
991
|
+
if (index !== -1) polysAfter.splice(index, 1);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
for (let i = 0, iMax = polysAfter.length; i < iMax; i++) {
|
|
995
|
+
const mp = polysAfter[i].multiPoly;
|
|
996
|
+
if (mpsAfter.indexOf(mp) === -1) mpsAfter.push(mp);
|
|
997
|
+
}
|
|
998
|
+
return this._afterState;
|
|
999
|
+
}
|
|
1000
|
+
/* Is this segment part of the final result? */
|
|
1001
|
+
isInResult() {
|
|
1002
|
+
if (this.consumedBy) return false;
|
|
1003
|
+
if (this._isInResult !== void 0) return this._isInResult;
|
|
1004
|
+
const mpsBefore = this.beforeState().multiPolys;
|
|
1005
|
+
const mpsAfter = this.afterState().multiPolys;
|
|
1006
|
+
switch (operation_default.type) {
|
|
1007
|
+
case "union": {
|
|
1008
|
+
const noBefores = mpsBefore.length === 0;
|
|
1009
|
+
const noAfters = mpsAfter.length === 0;
|
|
1010
|
+
this._isInResult = noBefores !== noAfters;
|
|
1011
|
+
break;
|
|
1012
|
+
}
|
|
1013
|
+
case "intersection": {
|
|
1014
|
+
let least;
|
|
1015
|
+
let most;
|
|
1016
|
+
if (mpsBefore.length < mpsAfter.length) {
|
|
1017
|
+
least = mpsBefore.length;
|
|
1018
|
+
most = mpsAfter.length;
|
|
1019
|
+
} else {
|
|
1020
|
+
least = mpsAfter.length;
|
|
1021
|
+
most = mpsBefore.length;
|
|
1022
|
+
}
|
|
1023
|
+
this._isInResult = most === operation_default.numMultiPolys && least < most;
|
|
1024
|
+
break;
|
|
1025
|
+
}
|
|
1026
|
+
case "xor": {
|
|
1027
|
+
const diff = Math.abs(mpsBefore.length - mpsAfter.length);
|
|
1028
|
+
this._isInResult = diff % 2 === 1;
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
case "difference": {
|
|
1032
|
+
const isJustSubject = (mps) => mps.length === 1 && mps[0].isSubject;
|
|
1033
|
+
this._isInResult = isJustSubject(mpsBefore) !== isJustSubject(mpsAfter);
|
|
1034
|
+
break;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
return this._isInResult;
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
// src/geom-in.ts
|
|
1042
|
+
var RingIn = class {
|
|
1043
|
+
poly;
|
|
1044
|
+
isExterior;
|
|
1045
|
+
segments;
|
|
1046
|
+
bbox;
|
|
1047
|
+
constructor(geomRing, poly, isExterior) {
|
|
1048
|
+
if (!Array.isArray(geomRing) || geomRing.length === 0) {
|
|
1049
|
+
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1050
|
+
}
|
|
1051
|
+
this.poly = poly;
|
|
1052
|
+
this.isExterior = isExterior;
|
|
1053
|
+
this.segments = [];
|
|
1054
|
+
if (typeof geomRing[0][0] !== "number" || typeof geomRing[0][1] !== "number") {
|
|
1055
|
+
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1056
|
+
}
|
|
1057
|
+
const firstPoint = precision.snap({ x: new import_bignumber2.default(geomRing[0][0]), y: new import_bignumber2.default(geomRing[0][1]) });
|
|
1058
|
+
this.bbox = {
|
|
1059
|
+
ll: { x: firstPoint.x, y: firstPoint.y },
|
|
1060
|
+
ur: { x: firstPoint.x, y: firstPoint.y }
|
|
1061
|
+
};
|
|
1062
|
+
let prevPoint = firstPoint;
|
|
1063
|
+
for (let i = 1, iMax = geomRing.length; i < iMax; i++) {
|
|
1064
|
+
if (typeof geomRing[i][0] !== "number" || typeof geomRing[i][1] !== "number") {
|
|
1065
|
+
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1066
|
+
}
|
|
1067
|
+
const point = precision.snap({ x: new import_bignumber2.default(geomRing[i][0]), y: new import_bignumber2.default(geomRing[i][1]) });
|
|
1068
|
+
if (point.x.eq(prevPoint.x) && point.y.eq(prevPoint.y)) continue;
|
|
1069
|
+
this.segments.push(Segment.fromRing(prevPoint, point, this));
|
|
1070
|
+
if (point.x.isLessThan(this.bbox.ll.x)) this.bbox.ll.x = point.x;
|
|
1071
|
+
if (point.y.isLessThan(this.bbox.ll.y)) this.bbox.ll.y = point.y;
|
|
1072
|
+
if (point.x.isGreaterThan(this.bbox.ur.x)) this.bbox.ur.x = point.x;
|
|
1073
|
+
if (point.y.isGreaterThan(this.bbox.ur.y)) this.bbox.ur.y = point.y;
|
|
1074
|
+
prevPoint = point;
|
|
1075
|
+
}
|
|
1076
|
+
if (!firstPoint.x.eq(prevPoint.x) || !firstPoint.y.eq(prevPoint.y)) {
|
|
1077
|
+
this.segments.push(Segment.fromRing(prevPoint, firstPoint, this));
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
getSweepEvents() {
|
|
1081
|
+
const sweepEvents = [];
|
|
1082
|
+
for (let i = 0, iMax = this.segments.length; i < iMax; i++) {
|
|
1083
|
+
const segment = this.segments[i];
|
|
1084
|
+
sweepEvents.push(segment.leftSE);
|
|
1085
|
+
sweepEvents.push(segment.rightSE);
|
|
1086
|
+
}
|
|
1087
|
+
return sweepEvents;
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
var PolyIn = class {
|
|
1091
|
+
multiPoly;
|
|
1092
|
+
exteriorRing;
|
|
1093
|
+
interiorRings;
|
|
1094
|
+
bbox;
|
|
1095
|
+
constructor(geomPoly, multiPoly) {
|
|
1096
|
+
if (!Array.isArray(geomPoly)) {
|
|
1097
|
+
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1098
|
+
}
|
|
1099
|
+
this.exteriorRing = new RingIn(geomPoly[0], this, true);
|
|
1100
|
+
this.bbox = {
|
|
1101
|
+
ll: { x: this.exteriorRing.bbox.ll.x, y: this.exteriorRing.bbox.ll.y },
|
|
1102
|
+
ur: { x: this.exteriorRing.bbox.ur.x, y: this.exteriorRing.bbox.ur.y }
|
|
1103
|
+
};
|
|
1104
|
+
this.interiorRings = [];
|
|
1105
|
+
for (let i = 1, iMax = geomPoly.length; i < iMax; i++) {
|
|
1106
|
+
const ring = new RingIn(geomPoly[i], this, false);
|
|
1107
|
+
if (ring.bbox.ll.x.isLessThan(this.bbox.ll.x)) this.bbox.ll.x = ring.bbox.ll.x;
|
|
1108
|
+
if (ring.bbox.ll.y.isLessThan(this.bbox.ll.y)) this.bbox.ll.y = ring.bbox.ll.y;
|
|
1109
|
+
if (ring.bbox.ur.x.isGreaterThan(this.bbox.ur.x)) this.bbox.ur.x = ring.bbox.ur.x;
|
|
1110
|
+
if (ring.bbox.ur.y.isGreaterThan(this.bbox.ur.y)) this.bbox.ur.y = ring.bbox.ur.y;
|
|
1111
|
+
this.interiorRings.push(ring);
|
|
1112
|
+
}
|
|
1113
|
+
this.multiPoly = multiPoly;
|
|
1114
|
+
}
|
|
1115
|
+
getSweepEvents() {
|
|
1116
|
+
const sweepEvents = this.exteriorRing.getSweepEvents();
|
|
1117
|
+
for (let i = 0, iMax = this.interiorRings.length; i < iMax; i++) {
|
|
1118
|
+
const ringSweepEvents = this.interiorRings[i].getSweepEvents();
|
|
1119
|
+
for (let j = 0, jMax = ringSweepEvents.length; j < jMax; j++) {
|
|
1120
|
+
sweepEvents.push(ringSweepEvents[j]);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
return sweepEvents;
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
var MultiPolyIn = class {
|
|
1127
|
+
isSubject;
|
|
1128
|
+
polys;
|
|
1129
|
+
bbox;
|
|
1130
|
+
constructor(geom, isSubject) {
|
|
1131
|
+
if (!Array.isArray(geom)) {
|
|
1132
|
+
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
1133
|
+
}
|
|
1134
|
+
try {
|
|
1135
|
+
if (typeof geom[0][0][0] === "number") geom = [geom];
|
|
1136
|
+
} catch (ex) {
|
|
1137
|
+
}
|
|
1138
|
+
this.polys = [];
|
|
1139
|
+
this.bbox = {
|
|
1140
|
+
ll: { x: new import_bignumber2.default(Number.POSITIVE_INFINITY), y: new import_bignumber2.default(Number.POSITIVE_INFINITY) },
|
|
1141
|
+
ur: { x: new import_bignumber2.default(Number.NEGATIVE_INFINITY), y: new import_bignumber2.default(Number.NEGATIVE_INFINITY) }
|
|
1142
|
+
};
|
|
1143
|
+
for (let i = 0, iMax = geom.length; i < iMax; i++) {
|
|
1144
|
+
const poly = new PolyIn(geom[i], this);
|
|
1145
|
+
if (poly.bbox.ll.x.isLessThan(this.bbox.ll.x)) this.bbox.ll.x = poly.bbox.ll.x;
|
|
1146
|
+
if (poly.bbox.ll.y.isLessThan(this.bbox.ll.y)) this.bbox.ll.y = poly.bbox.ll.y;
|
|
1147
|
+
if (poly.bbox.ur.x.isGreaterThan(this.bbox.ur.x)) this.bbox.ur.x = poly.bbox.ur.x;
|
|
1148
|
+
if (poly.bbox.ur.y.isGreaterThan(this.bbox.ur.y)) this.bbox.ur.y = poly.bbox.ur.y;
|
|
1149
|
+
this.polys.push(poly);
|
|
1150
|
+
}
|
|
1151
|
+
this.isSubject = isSubject;
|
|
1152
|
+
}
|
|
1153
|
+
getSweepEvents() {
|
|
1154
|
+
const sweepEvents = [];
|
|
1155
|
+
for (let i = 0, iMax = this.polys.length; i < iMax; i++) {
|
|
1156
|
+
const polySweepEvents = this.polys[i].getSweepEvents();
|
|
1157
|
+
for (let j = 0, jMax = polySweepEvents.length; j < jMax; j++) {
|
|
1158
|
+
sweepEvents.push(polySweepEvents[j]);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
return sweepEvents;
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
// src/index.ts
|
|
1166
|
+
var union = (geom, ...moreGeoms) => operation_default.run("union", geom, moreGeoms);
|
|
1167
|
+
var intersection2 = (geom, ...moreGeoms) => operation_default.run("intersection", geom, moreGeoms);
|
|
1168
|
+
var xor = (geom, ...moreGeoms) => operation_default.run("xor", geom, moreGeoms);
|
|
1169
|
+
var difference = (geom, ...moreGeoms) => operation_default.run("difference", geom, moreGeoms);
|
|
1170
|
+
var setPrecision = precision.set;
|
|
1171
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1172
|
+
0 && (module.exports = {
|
|
1173
|
+
difference,
|
|
1174
|
+
intersection,
|
|
1175
|
+
setPrecision,
|
|
1176
|
+
union,
|
|
1177
|
+
xor
|
|
1178
|
+
});
|
|
1179
|
+
//# sourceMappingURL=index.cjs.map
|