@dra2020/baseclient 1.0.153 → 1.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseclient.js +844 -487
- package/dist/baseclient.js.map +1 -1
- package/package.json +6 -4
package/dist/baseclient.js
CHANGED
|
@@ -35,13 +35,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
35
35
|
}) : function(o, v) {
|
|
36
36
|
o["default"] = v;
|
|
37
37
|
});
|
|
38
|
-
var __importStar = (this && this.__importStar) || function (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
45
55
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46
56
|
exports.Detail = exports.DataFlow = exports.Colors = exports.CSV = exports.Emit = exports.G = exports.FilterExpr = exports.OTE = exports.OT = exports.LogClient = exports.LogAbstract = exports.Poly = exports.FSM = exports.Context = exports.Util = void 0;
|
|
47
57
|
// Client and Server
|
|
@@ -102,15 +112,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
102
112
|
}) : function(o, v) {
|
|
103
113
|
o["default"] = v;
|
|
104
114
|
});
|
|
105
|
-
var __importStar = (this && this.__importStar) || function (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
};
|
|
115
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
116
|
+
var ownKeys = function(o) {
|
|
117
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
118
|
+
var ar = [];
|
|
119
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
120
|
+
return ar;
|
|
121
|
+
};
|
|
122
|
+
return ownKeys(o);
|
|
123
|
+
};
|
|
124
|
+
return function (mod) {
|
|
125
|
+
if (mod && mod.__esModule) return mod;
|
|
126
|
+
var result = {};
|
|
127
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
128
|
+
__setModuleDefault(result, mod);
|
|
129
|
+
return result;
|
|
130
|
+
};
|
|
131
|
+
})();
|
|
112
132
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
113
|
-
exports.
|
|
133
|
+
exports.defaultDistrictsPalette = exports.EthnicBackgroundColor = exports.CountEthnicBackgroundColor = exports.PartisanDistrictClassicColors = exports.CountPartisanDistrictClassicColors = exports.PartisanPrecinctClassicColors = exports.CountPartisanPrecinctClassicColors = exports.EthnicFewClassicColors = exports.CountEthnicFewClassicColors = exports.ColorValues = exports.DefaultColorNames = exports.MaxClassicColors = exports.MaxColors = exports.MaxOrderedColors = void 0;
|
|
134
|
+
exports.genColor = genColor;
|
|
135
|
+
exports.orderedColors = orderedColors;
|
|
136
|
+
exports.getPalette = getPalette;
|
|
114
137
|
const JsColorMapsData = __importStar(__webpack_require__(/*! ./jscolormapsdata */ "./lib/colors/jscolormapsdata.ts"));
|
|
115
138
|
const all_1 = __webpack_require__(/*! ../all/all */ "./lib/all/all.ts");
|
|
116
139
|
exports.MaxOrderedColors = 50;
|
|
@@ -392,7 +415,6 @@ function genColor(i, useFirstColor, palette) {
|
|
|
392
415
|
// Unexpected to get here, but something in case of an error
|
|
393
416
|
return genDRAColor(i, useFirstColor);
|
|
394
417
|
}
|
|
395
|
-
exports.genColor = genColor;
|
|
396
418
|
// DRA classic color palette
|
|
397
419
|
function genDRAColor(i, useFirstColor) {
|
|
398
420
|
// i is district number, 0 => District[0] (unassigned), so subtract 1 to access ColorTable
|
|
@@ -425,7 +447,6 @@ function orderedColors(palette) {
|
|
|
425
447
|
}
|
|
426
448
|
return OrderedColorTable[palette];
|
|
427
449
|
}
|
|
428
|
-
exports.orderedColors = orderedColors;
|
|
429
450
|
function getPalette(palette) {
|
|
430
451
|
if (palette === 'draclassic') {
|
|
431
452
|
// return draclassic palette with only 50 colors
|
|
@@ -436,7 +457,6 @@ function getPalette(palette) {
|
|
|
436
457
|
}
|
|
437
458
|
return getColorTable(palette);
|
|
438
459
|
}
|
|
439
|
-
exports.getPalette = getPalette;
|
|
440
460
|
// Generate table for palette
|
|
441
461
|
function getColorTable(palette) {
|
|
442
462
|
if (palette === 'demographicsclassic') {
|
|
@@ -795,15 +815,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
795
815
|
}) : function(o, v) {
|
|
796
816
|
o["default"] = v;
|
|
797
817
|
});
|
|
798
|
-
var __importStar = (this && this.__importStar) || function (
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
};
|
|
818
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
819
|
+
var ownKeys = function(o) {
|
|
820
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
821
|
+
var ar = [];
|
|
822
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
823
|
+
return ar;
|
|
824
|
+
};
|
|
825
|
+
return ownKeys(o);
|
|
826
|
+
};
|
|
827
|
+
return function (mod) {
|
|
828
|
+
if (mod && mod.__esModule) return mod;
|
|
829
|
+
var result = {};
|
|
830
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
831
|
+
__setModuleDefault(result, mod);
|
|
832
|
+
return result;
|
|
833
|
+
};
|
|
834
|
+
})();
|
|
805
835
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
806
|
-
exports.create =
|
|
836
|
+
exports.create = create;
|
|
807
837
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
808
838
|
class Context {
|
|
809
839
|
constructor() {
|
|
@@ -852,7 +882,6 @@ class Context {
|
|
|
852
882
|
function create() {
|
|
853
883
|
return new Context();
|
|
854
884
|
}
|
|
855
|
-
exports.create = create;
|
|
856
885
|
|
|
857
886
|
|
|
858
887
|
/***/ }),
|
|
@@ -908,13 +937,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
908
937
|
}) : function(o, v) {
|
|
909
938
|
o["default"] = v;
|
|
910
939
|
});
|
|
911
|
-
var __importStar = (this && this.__importStar) || function (
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
};
|
|
940
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
941
|
+
var ownKeys = function(o) {
|
|
942
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
943
|
+
var ar = [];
|
|
944
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
945
|
+
return ar;
|
|
946
|
+
};
|
|
947
|
+
return ownKeys(o);
|
|
948
|
+
};
|
|
949
|
+
return function (mod) {
|
|
950
|
+
if (mod && mod.__esModule) return mod;
|
|
951
|
+
var result = {};
|
|
952
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
953
|
+
__setModuleDefault(result, mod);
|
|
954
|
+
return result;
|
|
955
|
+
};
|
|
956
|
+
})();
|
|
918
957
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
919
958
|
exports.ParseOne = exports.ParseMany = void 0;
|
|
920
959
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
@@ -1060,7 +1099,7 @@ exports.ParseOne = ParseOne;
|
|
|
1060
1099
|
|
|
1061
1100
|
|
|
1062
1101
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1063
|
-
exports.csvParseLine =
|
|
1102
|
+
exports.csvParseLine = csvParseLine;
|
|
1064
1103
|
const reField = /^\s*("([^"]*(?:""[^"]*)*)"|[^,|]*)\s*[|,]?/;
|
|
1065
1104
|
const reQuote = /^"/;
|
|
1066
1105
|
const reAddOne = /[|,]$/;
|
|
@@ -1089,7 +1128,6 @@ function csvParseLine(s) {
|
|
|
1089
1128
|
fields.push('');
|
|
1090
1129
|
return fields;
|
|
1091
1130
|
}
|
|
1092
|
-
exports.csvParseLine = csvParseLine;
|
|
1093
1131
|
|
|
1094
1132
|
|
|
1095
1133
|
/***/ }),
|
|
@@ -1278,13 +1316,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
1278
1316
|
}) : function(o, v) {
|
|
1279
1317
|
o["default"] = v;
|
|
1280
1318
|
});
|
|
1281
|
-
var __importStar = (this && this.__importStar) || function (
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
};
|
|
1319
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
1320
|
+
var ownKeys = function(o) {
|
|
1321
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
1322
|
+
var ar = [];
|
|
1323
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
1324
|
+
return ar;
|
|
1325
|
+
};
|
|
1326
|
+
return ownKeys(o);
|
|
1327
|
+
};
|
|
1328
|
+
return function (mod) {
|
|
1329
|
+
if (mod && mod.__esModule) return mod;
|
|
1330
|
+
var result = {};
|
|
1331
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
1332
|
+
__setModuleDefault(result, mod);
|
|
1333
|
+
return result;
|
|
1334
|
+
};
|
|
1335
|
+
})();
|
|
1288
1336
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1289
1337
|
exports.FormatDetail = void 0;
|
|
1290
1338
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
@@ -1549,13 +1597,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
1549
1597
|
}) : function(o, v) {
|
|
1550
1598
|
o["default"] = v;
|
|
1551
1599
|
});
|
|
1552
|
-
var __importStar = (this && this.__importStar) || function (
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
};
|
|
1600
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
1601
|
+
var ownKeys = function(o) {
|
|
1602
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
1603
|
+
var ar = [];
|
|
1604
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
1605
|
+
return ar;
|
|
1606
|
+
};
|
|
1607
|
+
return ownKeys(o);
|
|
1608
|
+
};
|
|
1609
|
+
return function (mod) {
|
|
1610
|
+
if (mod && mod.__esModule) return mod;
|
|
1611
|
+
var result = {};
|
|
1612
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
1613
|
+
__setModuleDefault(result, mod);
|
|
1614
|
+
return result;
|
|
1615
|
+
};
|
|
1616
|
+
})();
|
|
1559
1617
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1560
1618
|
exports.FilterExpr = void 0;
|
|
1561
1619
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
@@ -2202,13 +2260,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
2202
2260
|
}) : function(o, v) {
|
|
2203
2261
|
o["default"] = v;
|
|
2204
2262
|
});
|
|
2205
|
-
var __importStar = (this && this.__importStar) || function (
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
};
|
|
2263
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
2264
|
+
var ownKeys = function(o) {
|
|
2265
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
2266
|
+
var ar = [];
|
|
2267
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2268
|
+
return ar;
|
|
2269
|
+
};
|
|
2270
|
+
return ownKeys(o);
|
|
2271
|
+
};
|
|
2272
|
+
return function (mod) {
|
|
2273
|
+
if (mod && mod.__esModule) return mod;
|
|
2274
|
+
var result = {};
|
|
2275
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2276
|
+
__setModuleDefault(result, mod);
|
|
2277
|
+
return result;
|
|
2278
|
+
};
|
|
2279
|
+
})();
|
|
2212
2280
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2213
2281
|
exports.FsmArray = exports.FsmLoop = exports.DefaultLoopOptions = exports.FsmTracker = exports.FsmSerializer = exports.FsmSleep = exports.FsmOnDone = exports.Fsm = exports.FsmManager = exports.FSM_CUSTOM9 = exports.FSM_CUSTOM8 = exports.FSM_CUSTOM7 = exports.FSM_CUSTOM6 = exports.FSM_CUSTOM5 = exports.FSM_CUSTOM4 = exports.FSM_CUSTOM3 = exports.FSM_CUSTOM2 = exports.FSM_CUSTOM1 = exports.FSM_RELEASED = exports.FSM_CANCEL = exports.FSM_ERROR = exports.FSM_DONE = exports.FSM_PENDING = exports.FSM_STARTING = void 0;
|
|
2214
2282
|
// Shared libraries
|
|
@@ -2614,7 +2682,7 @@ __exportStar(__webpack_require__(/*! ./multiblockmapping */ "./lib/geo/multibloc
|
|
|
2614
2682
|
|
|
2615
2683
|
|
|
2616
2684
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2617
|
-
exports.flexName =
|
|
2685
|
+
exports.flexName = flexName;
|
|
2618
2686
|
function flexName(f) {
|
|
2619
2687
|
if (!f || !f.properties)
|
|
2620
2688
|
return null;
|
|
@@ -2638,7 +2706,6 @@ function flexName(f) {
|
|
|
2638
2706
|
}
|
|
2639
2707
|
return `${f.properties.id}`;
|
|
2640
2708
|
}
|
|
2641
|
-
exports.flexName = flexName;
|
|
2642
2709
|
|
|
2643
2710
|
|
|
2644
2711
|
/***/ }),
|
|
@@ -2666,15 +2733,42 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
2666
2733
|
}) : function(o, v) {
|
|
2667
2734
|
o["default"] = v;
|
|
2668
2735
|
});
|
|
2669
|
-
var __importStar = (this && this.__importStar) || function (
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
};
|
|
2736
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
2737
|
+
var ownKeys = function(o) {
|
|
2738
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
2739
|
+
var ar = [];
|
|
2740
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2741
|
+
return ar;
|
|
2742
|
+
};
|
|
2743
|
+
return ownKeys(o);
|
|
2744
|
+
};
|
|
2745
|
+
return function (mod) {
|
|
2746
|
+
if (mod && mod.__esModule) return mod;
|
|
2747
|
+
var result = {};
|
|
2748
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2749
|
+
__setModuleDefault(result, mod);
|
|
2750
|
+
return result;
|
|
2751
|
+
};
|
|
2752
|
+
})();
|
|
2676
2753
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2677
|
-
exports.
|
|
2754
|
+
exports.geoIntersectOptions = exports.GeoMultiCollection = void 0;
|
|
2755
|
+
exports.dumpMetrics = dumpMetrics;
|
|
2756
|
+
exports.hidemapConcat = hidemapConcat;
|
|
2757
|
+
exports.applyCanonicalID = applyCanonicalID;
|
|
2758
|
+
exports.isValidId = isValidId;
|
|
2759
|
+
exports.geoEnsureID = geoEnsureID;
|
|
2760
|
+
exports.geoNormalizeFeature = geoNormalizeFeature;
|
|
2761
|
+
exports.geoNormalizeCollection = geoNormalizeCollection;
|
|
2762
|
+
exports.geoCollectionToMap = geoCollectionToMap;
|
|
2763
|
+
exports.geoMapToCollection = geoMapToCollection;
|
|
2764
|
+
exports.geoMapToCollectionNonNull = geoMapToCollectionNonNull;
|
|
2765
|
+
exports.geoCollectionToTopo = geoCollectionToTopo;
|
|
2766
|
+
exports.geoCollectionToTopoNonNull = geoCollectionToTopoNonNull;
|
|
2767
|
+
exports.geoTopoToCollection = geoTopoToCollection;
|
|
2768
|
+
exports.geoTopoToCollectionNonNull = geoTopoToCollectionNonNull;
|
|
2769
|
+
exports.geoEqual = geoEqual;
|
|
2770
|
+
exports.geoMapEqual = geoMapEqual;
|
|
2771
|
+
exports.geoIntersect = geoIntersect;
|
|
2678
2772
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
2679
2773
|
const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
|
|
2680
2774
|
// Tracing/debugging aid
|
|
@@ -2690,7 +2784,6 @@ function dumpMetrics() {
|
|
|
2690
2784
|
console.log(`G.${action}: count: ${metrics[action].count}, total: ${metrics[action].total}`);
|
|
2691
2785
|
});
|
|
2692
2786
|
}
|
|
2693
|
-
exports.dumpMetrics = dumpMetrics;
|
|
2694
2787
|
function hidemapConcat(...args) {
|
|
2695
2788
|
let hm = {};
|
|
2696
2789
|
for (let i = 0; i < args.length; i++)
|
|
@@ -2698,13 +2791,11 @@ function hidemapConcat(...args) {
|
|
|
2698
2791
|
Object.keys(args[i]).forEach(id => hm[id] = true);
|
|
2699
2792
|
return hm;
|
|
2700
2793
|
}
|
|
2701
|
-
exports.hidemapConcat = hidemapConcat;
|
|
2702
2794
|
const NormalizeAll = { joinPolygons: true, checkRewind: true, ensureID: true };
|
|
2703
2795
|
function applyCanonicalID(col) {
|
|
2704
2796
|
if (col && Array.isArray(col.features))
|
|
2705
2797
|
col.features.forEach((f, n) => { f.properties.id = String(n + 1); });
|
|
2706
2798
|
}
|
|
2707
|
-
exports.applyCanonicalID = applyCanonicalID;
|
|
2708
2799
|
function isValidId(col) {
|
|
2709
2800
|
if (!col || !Array.isArray(col.features))
|
|
2710
2801
|
return true;
|
|
@@ -2721,7 +2812,6 @@ function isValidId(col) {
|
|
|
2721
2812
|
}
|
|
2722
2813
|
return true;
|
|
2723
2814
|
}
|
|
2724
|
-
exports.isValidId = isValidId;
|
|
2725
2815
|
// set the canonical 'id' property from the best property value.
|
|
2726
2816
|
// if joinPolygons is true, we do not enforce uniqueness.
|
|
2727
2817
|
//
|
|
@@ -2750,14 +2840,12 @@ function geoEnsureID(col, options) {
|
|
|
2750
2840
|
applyCanonicalID(col);
|
|
2751
2841
|
}
|
|
2752
2842
|
}
|
|
2753
|
-
exports.geoEnsureID = geoEnsureID;
|
|
2754
2843
|
function geoNormalizeFeature(f, options) {
|
|
2755
2844
|
options = Util.shallowAssignImmutable({}, options);
|
|
2756
2845
|
if (options.checkRewind)
|
|
2757
2846
|
Poly.featureRewind(f);
|
|
2758
2847
|
return f;
|
|
2759
2848
|
}
|
|
2760
|
-
exports.geoNormalizeFeature = geoNormalizeFeature;
|
|
2761
2849
|
function onlyPolygons(col) {
|
|
2762
2850
|
if (col && Array.isArray(col.features))
|
|
2763
2851
|
for (let i = 0; i < col.features.length; i++) {
|
|
@@ -2809,7 +2897,6 @@ function geoNormalizeCollection(col, options) {
|
|
|
2809
2897
|
}
|
|
2810
2898
|
return col;
|
|
2811
2899
|
}
|
|
2812
|
-
exports.geoNormalizeCollection = geoNormalizeCollection;
|
|
2813
2900
|
function geoCollectionToMap(col) {
|
|
2814
2901
|
if (col == null)
|
|
2815
2902
|
return null;
|
|
@@ -2817,13 +2904,11 @@ function geoCollectionToMap(col) {
|
|
|
2817
2904
|
col.features.forEach((f) => { map[String(f.properties.id)] = f; });
|
|
2818
2905
|
return map;
|
|
2819
2906
|
}
|
|
2820
|
-
exports.geoCollectionToMap = geoCollectionToMap;
|
|
2821
2907
|
function geoMapToCollection(map) {
|
|
2822
2908
|
if (Util.countKeys(map) == 0)
|
|
2823
2909
|
return null;
|
|
2824
2910
|
return geoMapToCollectionNonNull(map);
|
|
2825
2911
|
}
|
|
2826
|
-
exports.geoMapToCollection = geoMapToCollection;
|
|
2827
2912
|
function geoMapToCollectionNonNull(map) {
|
|
2828
2913
|
if (map == null)
|
|
2829
2914
|
return null;
|
|
@@ -2831,7 +2916,6 @@ function geoMapToCollectionNonNull(map) {
|
|
|
2831
2916
|
Object.keys(map).forEach((geoid) => { col.features.push(map[geoid]); });
|
|
2832
2917
|
return col;
|
|
2833
2918
|
}
|
|
2834
|
-
exports.geoMapToCollectionNonNull = geoMapToCollectionNonNull;
|
|
2835
2919
|
function geoCollectionToTopo(col) {
|
|
2836
2920
|
let topo = Poly.topoFromCollection(col);
|
|
2837
2921
|
Poly.topoPack(topo);
|
|
@@ -2840,11 +2924,9 @@ function geoCollectionToTopo(col) {
|
|
|
2840
2924
|
topo.datasets = col.datasets;
|
|
2841
2925
|
return topo;
|
|
2842
2926
|
}
|
|
2843
|
-
exports.geoCollectionToTopo = geoCollectionToTopo;
|
|
2844
2927
|
function geoCollectionToTopoNonNull(col) {
|
|
2845
2928
|
return geoCollectionToTopo(col);
|
|
2846
2929
|
}
|
|
2847
|
-
exports.geoCollectionToTopoNonNull = geoCollectionToTopoNonNull;
|
|
2848
2930
|
function geoTopoToCollection(topo) {
|
|
2849
2931
|
let col = Poly.topoToCollection(topo);
|
|
2850
2932
|
Poly.featurePack(col);
|
|
@@ -2853,11 +2935,9 @@ function geoTopoToCollection(topo) {
|
|
|
2853
2935
|
col.datasets = topo.datasets;
|
|
2854
2936
|
return col;
|
|
2855
2937
|
}
|
|
2856
|
-
exports.geoTopoToCollection = geoTopoToCollection;
|
|
2857
2938
|
function geoTopoToCollectionNonNull(topo) {
|
|
2858
2939
|
return geoTopoToCollection(topo);
|
|
2859
2940
|
}
|
|
2860
|
-
exports.geoTopoToCollectionNonNull = geoTopoToCollectionNonNull;
|
|
2861
2941
|
function geoEqual(m1, m2) {
|
|
2862
2942
|
let n1 = m1 ? m1.length : 0;
|
|
2863
2943
|
let n2 = m2 ? m2.length : 0;
|
|
@@ -2871,7 +2951,6 @@ function geoEqual(m1, m2) {
|
|
|
2871
2951
|
eq = false; });
|
|
2872
2952
|
return eq;
|
|
2873
2953
|
}
|
|
2874
|
-
exports.geoEqual = geoEqual;
|
|
2875
2954
|
function geoMapEqual(m1, m2) {
|
|
2876
2955
|
if (m1 == null)
|
|
2877
2956
|
return Util.isEmpty(m2);
|
|
@@ -2888,7 +2967,6 @@ function geoMapEqual(m1, m2) {
|
|
|
2888
2967
|
return false;
|
|
2889
2968
|
return true;
|
|
2890
2969
|
}
|
|
2891
|
-
exports.geoMapEqual = geoMapEqual;
|
|
2892
2970
|
class GeoMultiCollection {
|
|
2893
2971
|
constructor(tag, topo, col, map) {
|
|
2894
2972
|
this.stamp = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER / 2);
|
|
@@ -3297,7 +3375,6 @@ function geoIntersect(multi, bbox, opt) {
|
|
|
3297
3375
|
result.add('result', null, null, m);
|
|
3298
3376
|
return result;
|
|
3299
3377
|
}
|
|
3300
|
-
exports.geoIntersect = geoIntersect;
|
|
3301
3378
|
|
|
3302
3379
|
|
|
3303
3380
|
/***/ }),
|
|
@@ -3310,7 +3387,8 @@ exports.geoIntersect = geoIntersect;
|
|
|
3310
3387
|
|
|
3311
3388
|
|
|
3312
3389
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3313
|
-
exports.MultiBlockMapping =
|
|
3390
|
+
exports.MultiBlockMapping = void 0;
|
|
3391
|
+
exports.reverseBlockMapping = reverseBlockMapping;
|
|
3314
3392
|
function reverseBlockMapping(bm) {
|
|
3315
3393
|
let rev = {};
|
|
3316
3394
|
if (bm)
|
|
@@ -3323,7 +3401,6 @@ function reverseBlockMapping(bm) {
|
|
|
3323
3401
|
Object.values(rev).forEach((a) => a.sort());
|
|
3324
3402
|
return rev;
|
|
3325
3403
|
}
|
|
3326
|
-
exports.reverseBlockMapping = reverseBlockMapping;
|
|
3327
3404
|
class MultiBlockMapping {
|
|
3328
3405
|
constructor(tag, bm) {
|
|
3329
3406
|
this.entries = [];
|
|
@@ -3429,15 +3506,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
3429
3506
|
}) : function(o, v) {
|
|
3430
3507
|
o["default"] = v;
|
|
3431
3508
|
});
|
|
3432
|
-
var __importStar = (this && this.__importStar) || function (
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
};
|
|
3509
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
3510
|
+
var ownKeys = function(o) {
|
|
3511
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
3512
|
+
var ar = [];
|
|
3513
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3514
|
+
return ar;
|
|
3515
|
+
};
|
|
3516
|
+
return ownKeys(o);
|
|
3517
|
+
};
|
|
3518
|
+
return function (mod) {
|
|
3519
|
+
if (mod && mod.__esModule) return mod;
|
|
3520
|
+
var result = {};
|
|
3521
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3522
|
+
__setModuleDefault(result, mod);
|
|
3523
|
+
return result;
|
|
3524
|
+
};
|
|
3525
|
+
})();
|
|
3439
3526
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3440
|
-
exports.computeVFeature =
|
|
3527
|
+
exports.computeVFeature = computeVFeature;
|
|
3441
3528
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
3442
3529
|
const Poly = __importStar(__webpack_require__(/*! ../poly/all */ "./lib/poly/all.ts"));
|
|
3443
3530
|
// Given the topology for a precinct, the bintrie mapping and the list of blocks, construct the
|
|
@@ -3466,7 +3553,6 @@ function computeVFeature(topoPrecinct, bintrie, blocks) {
|
|
|
3466
3553
|
f.properties.blocks = blocks;
|
|
3467
3554
|
return f;
|
|
3468
3555
|
}
|
|
3469
|
-
exports.computeVFeature = computeVFeature;
|
|
3470
3556
|
|
|
3471
3557
|
|
|
3472
3558
|
/***/ }),
|
|
@@ -3521,13 +3607,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
3521
3607
|
}) : function(o, v) {
|
|
3522
3608
|
o["default"] = v;
|
|
3523
3609
|
});
|
|
3524
|
-
var __importStar = (this && this.__importStar) || function (
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
};
|
|
3610
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
3611
|
+
var ownKeys = function(o) {
|
|
3612
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
3613
|
+
var ar = [];
|
|
3614
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3615
|
+
return ar;
|
|
3616
|
+
};
|
|
3617
|
+
return ownKeys(o);
|
|
3618
|
+
};
|
|
3619
|
+
return function (mod) {
|
|
3620
|
+
if (mod && mod.__esModule) return mod;
|
|
3621
|
+
var result = {};
|
|
3622
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3623
|
+
__setModuleDefault(result, mod);
|
|
3624
|
+
return result;
|
|
3625
|
+
};
|
|
3626
|
+
})();
|
|
3531
3627
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3532
3628
|
exports.SyncTimer = exports.AsyncTimer = exports.Timer = void 0;
|
|
3533
3629
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
@@ -3614,15 +3710,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
3614
3710
|
}) : function(o, v) {
|
|
3615
3711
|
o["default"] = v;
|
|
3616
3712
|
});
|
|
3617
|
-
var __importStar = (this && this.__importStar) || function (
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
};
|
|
3713
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
3714
|
+
var ownKeys = function(o) {
|
|
3715
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
3716
|
+
var ar = [];
|
|
3717
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3718
|
+
return ar;
|
|
3719
|
+
};
|
|
3720
|
+
return ownKeys(o);
|
|
3721
|
+
};
|
|
3722
|
+
return function (mod) {
|
|
3723
|
+
if (mod && mod.__esModule) return mod;
|
|
3724
|
+
var result = {};
|
|
3725
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3726
|
+
__setModuleDefault(result, mod);
|
|
3727
|
+
return result;
|
|
3728
|
+
};
|
|
3729
|
+
})();
|
|
3624
3730
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3625
|
-
exports.create =
|
|
3731
|
+
exports.create = create;
|
|
3626
3732
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
3627
3733
|
class LogManager {
|
|
3628
3734
|
constructor(env) {
|
|
@@ -3691,7 +3797,6 @@ class LogManager {
|
|
|
3691
3797
|
function create(env) {
|
|
3692
3798
|
return new LogManager(env);
|
|
3693
3799
|
}
|
|
3694
|
-
exports.create = create;
|
|
3695
3800
|
|
|
3696
3801
|
|
|
3697
3802
|
/***/ }),
|
|
@@ -3747,13 +3852,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
3747
3852
|
}) : function(o, v) {
|
|
3748
3853
|
o["default"] = v;
|
|
3749
3854
|
});
|
|
3750
|
-
var __importStar = (this && this.__importStar) || function (
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
};
|
|
3855
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
3856
|
+
var ownKeys = function(o) {
|
|
3857
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
3858
|
+
var ar = [];
|
|
3859
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3860
|
+
return ar;
|
|
3861
|
+
};
|
|
3862
|
+
return ownKeys(o);
|
|
3863
|
+
};
|
|
3864
|
+
return function (mod) {
|
|
3865
|
+
if (mod && mod.__esModule) return mod;
|
|
3866
|
+
var result = {};
|
|
3867
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3868
|
+
__setModuleDefault(result, mod);
|
|
3869
|
+
return result;
|
|
3870
|
+
};
|
|
3871
|
+
})();
|
|
3757
3872
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3758
3873
|
exports.OTEditUtil = void 0;
|
|
3759
3874
|
const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
|
|
@@ -3936,13 +4051,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
3936
4051
|
}) : function(o, v) {
|
|
3937
4052
|
o["default"] = v;
|
|
3938
4053
|
});
|
|
3939
|
-
var __importStar = (this && this.__importStar) || function (
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
};
|
|
4054
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
4055
|
+
var ownKeys = function(o) {
|
|
4056
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
4057
|
+
var ar = [];
|
|
4058
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
4059
|
+
return ar;
|
|
4060
|
+
};
|
|
4061
|
+
return ownKeys(o);
|
|
4062
|
+
};
|
|
4063
|
+
return function (mod) {
|
|
4064
|
+
if (mod && mod.__esModule) return mod;
|
|
4065
|
+
var result = {};
|
|
4066
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
4067
|
+
__setModuleDefault(result, mod);
|
|
4068
|
+
return result;
|
|
4069
|
+
};
|
|
4070
|
+
})();
|
|
3946
4071
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3947
4072
|
exports.Editor = exports.REPLACE = exports.MERGE = void 0;
|
|
3948
4073
|
const OT = __importStar(__webpack_require__(/*! ../ot-js/all */ "./lib/ot-js/all.ts"));
|
|
@@ -4162,13 +4287,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
4162
4287
|
}) : function(o, v) {
|
|
4163
4288
|
o["default"] = v;
|
|
4164
4289
|
});
|
|
4165
|
-
var __importStar = (this && this.__importStar) || function (
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
};
|
|
4290
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
4291
|
+
var ownKeys = function(o) {
|
|
4292
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
4293
|
+
var ar = [];
|
|
4294
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
4295
|
+
return ar;
|
|
4296
|
+
};
|
|
4297
|
+
return ownKeys(o);
|
|
4298
|
+
};
|
|
4299
|
+
return function (mod) {
|
|
4300
|
+
if (mod && mod.__esModule) return mod;
|
|
4301
|
+
var result = {};
|
|
4302
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
4303
|
+
__setModuleDefault(result, mod);
|
|
4304
|
+
return result;
|
|
4305
|
+
};
|
|
4306
|
+
})();
|
|
4172
4307
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4173
4308
|
exports.OTArrayResource = exports.OTStringResource = exports.OTArrayLikeResource = exports.OTArrayOperations = exports.OTStringOperations = exports.OTSingleArrayEditor = exports.OpTmpRetain = exports.OpSet = exports.OpCursor = exports.OpRetain = exports.OpDelete = exports.OpInsert = void 0;
|
|
4174
4309
|
const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
|
|
@@ -5134,13 +5269,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
5134
5269
|
}) : function(o, v) {
|
|
5135
5270
|
o["default"] = v;
|
|
5136
5271
|
});
|
|
5137
|
-
var __importStar = (this && this.__importStar) || function (
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
};
|
|
5272
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
5273
|
+
var ownKeys = function(o) {
|
|
5274
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
5275
|
+
var ar = [];
|
|
5276
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
5277
|
+
return ar;
|
|
5278
|
+
};
|
|
5279
|
+
return ownKeys(o);
|
|
5280
|
+
};
|
|
5281
|
+
return function (mod) {
|
|
5282
|
+
if (mod && mod.__esModule) return mod;
|
|
5283
|
+
var result = {};
|
|
5284
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
5285
|
+
__setModuleDefault(result, mod);
|
|
5286
|
+
return result;
|
|
5287
|
+
};
|
|
5288
|
+
})();
|
|
5144
5289
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5145
5290
|
exports.OTClientEngine = void 0;
|
|
5146
5291
|
const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
|
|
@@ -5412,13 +5557,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
5412
5557
|
}) : function(o, v) {
|
|
5413
5558
|
o["default"] = v;
|
|
5414
5559
|
});
|
|
5415
|
-
var __importStar = (this && this.__importStar) || function (
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
};
|
|
5560
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
5561
|
+
var ownKeys = function(o) {
|
|
5562
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
5563
|
+
var ar = [];
|
|
5564
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
5565
|
+
return ar;
|
|
5566
|
+
};
|
|
5567
|
+
return ownKeys(o);
|
|
5568
|
+
};
|
|
5569
|
+
return function (mod) {
|
|
5570
|
+
if (mod && mod.__esModule) return mod;
|
|
5571
|
+
var result = {};
|
|
5572
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
5573
|
+
__setModuleDefault(result, mod);
|
|
5574
|
+
return result;
|
|
5575
|
+
};
|
|
5576
|
+
})();
|
|
5422
5577
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5423
5578
|
exports.OTCompositeResource = exports.clockSeenValue = exports.clockUndoValue = exports.clockInitializeValue = exports.clockFailureValue = exports.clockRandomizeValue = exports.clockTerminateValue = exports.clockInitialValue = void 0;
|
|
5424
5579
|
const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
|
|
@@ -5654,13 +5809,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
5654
5809
|
}) : function(o, v) {
|
|
5655
5810
|
o["default"] = v;
|
|
5656
5811
|
});
|
|
5657
|
-
var __importStar = (this && this.__importStar) || function (
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
};
|
|
5812
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
5813
|
+
var ownKeys = function(o) {
|
|
5814
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
5815
|
+
var ar = [];
|
|
5816
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
5817
|
+
return ar;
|
|
5818
|
+
};
|
|
5819
|
+
return ownKeys(o);
|
|
5820
|
+
};
|
|
5821
|
+
return function (mod) {
|
|
5822
|
+
if (mod && mod.__esModule) return mod;
|
|
5823
|
+
var result = {};
|
|
5824
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
5825
|
+
__setModuleDefault(result, mod);
|
|
5826
|
+
return result;
|
|
5827
|
+
};
|
|
5828
|
+
})();
|
|
5664
5829
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5665
5830
|
exports.OTCounterResource = exports.OpCounterDel = exports.OpCounterAdd = void 0;
|
|
5666
5831
|
const OT = __importStar(__webpack_require__(/*! ./ottypes */ "./lib/ot-js/ottypes.ts"));
|
|
@@ -5852,13 +6017,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
5852
6017
|
}) : function(o, v) {
|
|
5853
6018
|
o["default"] = v;
|
|
5854
6019
|
});
|
|
5855
|
-
var __importStar = (this && this.__importStar) || function (
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
};
|
|
6020
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
6021
|
+
var ownKeys = function(o) {
|
|
6022
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
6023
|
+
var ar = [];
|
|
6024
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
6025
|
+
return ar;
|
|
6026
|
+
};
|
|
6027
|
+
return ownKeys(o);
|
|
6028
|
+
};
|
|
6029
|
+
return function (mod) {
|
|
6030
|
+
if (mod && mod.__esModule) return mod;
|
|
6031
|
+
var result = {};
|
|
6032
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6033
|
+
__setModuleDefault(result, mod);
|
|
6034
|
+
return result;
|
|
6035
|
+
};
|
|
6036
|
+
})();
|
|
5862
6037
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5863
6038
|
exports.OTMapResource = exports.OpMapDel = exports.OpMapSet = void 0;
|
|
5864
6039
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
@@ -5995,13 +6170,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
5995
6170
|
}) : function(o, v) {
|
|
5996
6171
|
o["default"] = v;
|
|
5997
6172
|
});
|
|
5998
|
-
var __importStar = (this && this.__importStar) || function (
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
};
|
|
6173
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
6174
|
+
var ownKeys = function(o) {
|
|
6175
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
6176
|
+
var ar = [];
|
|
6177
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
6178
|
+
return ar;
|
|
6179
|
+
};
|
|
6180
|
+
return ownKeys(o);
|
|
6181
|
+
};
|
|
6182
|
+
return function (mod) {
|
|
6183
|
+
if (mod && mod.__esModule) return mod;
|
|
6184
|
+
var result = {};
|
|
6185
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6186
|
+
__setModuleDefault(result, mod);
|
|
6187
|
+
return result;
|
|
6188
|
+
};
|
|
6189
|
+
})();
|
|
6005
6190
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6006
6191
|
exports.OTServerEngine = exports.ClientIDForServer = void 0;
|
|
6007
6192
|
const OTC = __importStar(__webpack_require__(/*! ./otcomposite */ "./lib/ot-js/otcomposite.ts"));
|
|
@@ -6271,7 +6456,10 @@ exports.OTServerEngine = OTServerEngine;
|
|
|
6271
6456
|
|
|
6272
6457
|
|
|
6273
6458
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6274
|
-
exports.
|
|
6459
|
+
exports.ServerStateMaintenance = exports.ServerStateRunning = exports.PermAll = exports.PermEdit = exports.PermVersion = exports.PermAdmin = exports.PermOwner = exports.PermWrite = exports.PermRead = exports.PermNone = exports.FilterCount = exports.FilterMyGroupDatasets = exports.FilterPublicDatasets = exports.FilterMyDatasets = exports.FilterMyGroups = exports.FilterMyGroupMaps = exports.FilterCOI = exports.FilterOfficial = exports.FilterPublic = exports.FilterTrash = exports.FilterRecent = exports.FilterMyPublic = exports.FilterSharedWithMe = exports.FilterMyMaps = exports.EClockAnomaly = exports.EMaintenance = exports.ENoAccess = exports.ENoPerm = exports.ELoadFailed = exports.EBadRequest = exports.ENoUser = exports.EClockReset = exports.EClockFailure = exports.EClockSeen = exports.ENoSession = exports.ERetry = exports.EFull = exports.EFail = exports.ESuccess = void 0;
|
|
6460
|
+
exports.accessFindUser = accessFindUser;
|
|
6461
|
+
exports.accessMapFindUser = accessMapFindUser;
|
|
6462
|
+
exports.SessionFilterFunction = SessionFilterFunction;
|
|
6275
6463
|
// Errors
|
|
6276
6464
|
exports.ESuccess = 0; // Generic success
|
|
6277
6465
|
exports.EFail = 1; // Generic failure
|
|
@@ -6330,7 +6518,6 @@ function accessFindUser(a, uid) {
|
|
|
6330
6518
|
return a.perm;
|
|
6331
6519
|
return exports.PermNone;
|
|
6332
6520
|
}
|
|
6333
|
-
exports.accessFindUser = accessFindUser;
|
|
6334
6521
|
function accessMapFindUser(accessMap, uid, aid) {
|
|
6335
6522
|
if (aid !== undefined)
|
|
6336
6523
|
return accessFindUser(accessMap[aid], uid);
|
|
@@ -6348,7 +6535,6 @@ function accessMapFindUser(accessMap, uid, aid) {
|
|
|
6348
6535
|
return perm;
|
|
6349
6536
|
}
|
|
6350
6537
|
}
|
|
6351
|
-
exports.accessMapFindUser = accessMapFindUser;
|
|
6352
6538
|
function SessionFilterFunction(p, uid, f) {
|
|
6353
6539
|
if (f === exports.FilterPublic)
|
|
6354
6540
|
return p.published !== undefined;
|
|
@@ -6369,7 +6555,6 @@ function SessionFilterFunction(p, uid, f) {
|
|
|
6369
6555
|
}
|
|
6370
6556
|
return !p.deleted;
|
|
6371
6557
|
}
|
|
6372
|
-
exports.SessionFilterFunction = SessionFilterFunction;
|
|
6373
6558
|
|
|
6374
6559
|
|
|
6375
6560
|
/***/ }),
|
|
@@ -6505,15 +6690,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
6505
6690
|
}) : function(o, v) {
|
|
6506
6691
|
o["default"] = v;
|
|
6507
6692
|
});
|
|
6508
|
-
var __importStar = (this && this.__importStar) || function (
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
};
|
|
6693
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
6694
|
+
var ownKeys = function(o) {
|
|
6695
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
6696
|
+
var ar = [];
|
|
6697
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
6698
|
+
return ar;
|
|
6699
|
+
};
|
|
6700
|
+
return ownKeys(o);
|
|
6701
|
+
};
|
|
6702
|
+
return function (mod) {
|
|
6703
|
+
if (mod && mod.__esModule) return mod;
|
|
6704
|
+
var result = {};
|
|
6705
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6706
|
+
__setModuleDefault(result, mod);
|
|
6707
|
+
return result;
|
|
6708
|
+
};
|
|
6709
|
+
})();
|
|
6515
6710
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6516
|
-
exports.blend =
|
|
6711
|
+
exports.blend = blend;
|
|
6517
6712
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
6518
6713
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
6519
6714
|
// Takes array of polygon or multi-polygon coordinate structures and returns a single multi-polygon
|
|
@@ -6535,7 +6730,6 @@ function blend(polys) {
|
|
|
6535
6730
|
}
|
|
6536
6731
|
return result;
|
|
6537
6732
|
}
|
|
6538
|
-
exports.blend = blend;
|
|
6539
6733
|
|
|
6540
6734
|
|
|
6541
6735
|
/***/ }),
|
|
@@ -6563,26 +6757,42 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
6563
6757
|
}) : function(o, v) {
|
|
6564
6758
|
o["default"] = v;
|
|
6565
6759
|
});
|
|
6566
|
-
var __importStar = (this && this.__importStar) || function (
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
};
|
|
6760
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
6761
|
+
var ownKeys = function(o) {
|
|
6762
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
6763
|
+
var ar = [];
|
|
6764
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
6765
|
+
return ar;
|
|
6766
|
+
};
|
|
6767
|
+
return ownKeys(o);
|
|
6768
|
+
};
|
|
6769
|
+
return function (mod) {
|
|
6770
|
+
if (mod && mod.__esModule) return mod;
|
|
6771
|
+
var result = {};
|
|
6772
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6773
|
+
__setModuleDefault(result, mod);
|
|
6774
|
+
return result;
|
|
6775
|
+
};
|
|
6776
|
+
})();
|
|
6573
6777
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6574
|
-
exports.
|
|
6778
|
+
exports.boundboxWidth = boundboxWidth;
|
|
6779
|
+
exports.boundboxHeight = boundboxHeight;
|
|
6780
|
+
exports.boundboxCX = boundboxCX;
|
|
6781
|
+
exports.boundboxCY = boundboxCY;
|
|
6782
|
+
exports.clipLon = clipLon;
|
|
6783
|
+
exports.boundboxExtend = boundboxExtend;
|
|
6784
|
+
exports.boundbox = boundbox;
|
|
6785
|
+
exports.boundboxPoly = boundboxPoly;
|
|
6786
|
+
exports.boundboxEmpty = boundboxEmpty;
|
|
6787
|
+
exports.boundboxArea = boundboxArea;
|
|
6788
|
+
exports.boundboxIntersects = boundboxIntersects;
|
|
6789
|
+
exports.boundboxContains = boundboxContains;
|
|
6575
6790
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
6576
6791
|
function boundboxWidth(bb) { return Math.abs(bb.right - bb.left); }
|
|
6577
|
-
exports.boundboxWidth = boundboxWidth;
|
|
6578
6792
|
function boundboxHeight(bb) { return Math.abs(bb.bottom - bb.top); }
|
|
6579
|
-
exports.boundboxHeight = boundboxHeight;
|
|
6580
6793
|
function boundboxCX(bb) { return bb.left + (bb.right - bb.left) / 2; }
|
|
6581
|
-
exports.boundboxCX = boundboxCX;
|
|
6582
6794
|
function boundboxCY(bb) { return bb.top + (bb.bottom - bb.top) / 2; }
|
|
6583
|
-
exports.boundboxCY = boundboxCY;
|
|
6584
6795
|
function clipLon(lon) { return lon <= 0 ? lon : -179; }
|
|
6585
|
-
exports.clipLon = clipLon;
|
|
6586
6796
|
function boundboxExtend(bbox, x, y) {
|
|
6587
6797
|
x = clipLon(x);
|
|
6588
6798
|
if (bbox.left === undefined || x < bbox.left)
|
|
@@ -6594,7 +6804,6 @@ function boundboxExtend(bbox, x, y) {
|
|
|
6594
6804
|
if (bbox.bottom === undefined || y < bbox.bottom)
|
|
6595
6805
|
bbox.bottom = y;
|
|
6596
6806
|
}
|
|
6597
|
-
exports.boundboxExtend = boundboxExtend;
|
|
6598
6807
|
function boundboxExtendPacked(pp, bbox) {
|
|
6599
6808
|
let buffer = pp.buffer;
|
|
6600
6809
|
let offset = pp.buffer[pp.offset + 1] + pp.offset;
|
|
@@ -6633,27 +6842,21 @@ function boundbox(poly, bbox) {
|
|
|
6633
6842
|
}
|
|
6634
6843
|
return bbox;
|
|
6635
6844
|
}
|
|
6636
|
-
exports.boundbox = boundbox;
|
|
6637
6845
|
function boundboxPoly(bb) {
|
|
6638
6846
|
return [[[bb.left, bb.top], [bb.left, bb.bottom], [bb.right, bb.bottom], [bb.right, bb.top], [bb.left, bb.top]]];
|
|
6639
6847
|
}
|
|
6640
|
-
exports.boundboxPoly = boundboxPoly;
|
|
6641
6848
|
function boundboxEmpty(bb) {
|
|
6642
6849
|
return !bb || bb.left === undefined || P.polyArea(boundboxPoly(bb)) == 0;
|
|
6643
6850
|
}
|
|
6644
|
-
exports.boundboxEmpty = boundboxEmpty;
|
|
6645
6851
|
function boundboxArea(poly) {
|
|
6646
6852
|
return P.polyArea(boundboxPoly(boundbox(poly)));
|
|
6647
6853
|
}
|
|
6648
|
-
exports.boundboxArea = boundboxArea;
|
|
6649
6854
|
function boundboxIntersects(bb1, bb2) {
|
|
6650
6855
|
return !(bb1.left > bb2.right || bb1.right < bb2.left || bb1.top < bb2.bottom || bb1.bottom > bb2.top);
|
|
6651
6856
|
}
|
|
6652
|
-
exports.boundboxIntersects = boundboxIntersects;
|
|
6653
6857
|
function boundboxContains(bb, x, y) {
|
|
6654
6858
|
return !(bb.left >= x || bb.right < x || bb.top <= y || bb.bottom > y);
|
|
6655
6859
|
}
|
|
6656
|
-
exports.boundboxContains = boundboxContains;
|
|
6657
6860
|
|
|
6658
6861
|
|
|
6659
6862
|
/***/ }),
|
|
@@ -6684,15 +6887,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
6684
6887
|
}) : function(o, v) {
|
|
6685
6888
|
o["default"] = v;
|
|
6686
6889
|
});
|
|
6687
|
-
var __importStar = (this && this.__importStar) || function (
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
};
|
|
6890
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
6891
|
+
var ownKeys = function(o) {
|
|
6892
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
6893
|
+
var ar = [];
|
|
6894
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
6895
|
+
return ar;
|
|
6896
|
+
};
|
|
6897
|
+
return ownKeys(o);
|
|
6898
|
+
};
|
|
6899
|
+
return function (mod) {
|
|
6900
|
+
if (mod && mod.__esModule) return mod;
|
|
6901
|
+
var result = {};
|
|
6902
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
6903
|
+
__setModuleDefault(result, mod);
|
|
6904
|
+
return result;
|
|
6905
|
+
};
|
|
6906
|
+
})();
|
|
6694
6907
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6695
|
-
exports.
|
|
6908
|
+
exports.polyParts = polyParts;
|
|
6909
|
+
exports.polyAreaFlat = polyAreaFlat;
|
|
6910
|
+
exports.polyPerimeterFlat = polyPerimeterFlat;
|
|
6911
|
+
exports.polyDiameterFlat = polyDiameterFlat;
|
|
6696
6912
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
6697
6913
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
6698
6914
|
// HELPER
|
|
@@ -6721,7 +6937,6 @@ function polyParts(poly) {
|
|
|
6721
6937
|
});
|
|
6722
6938
|
return parts;
|
|
6723
6939
|
}
|
|
6724
|
-
exports.polyParts = polyParts;
|
|
6725
6940
|
// CARTESIAN ("FLAT") AREA, PERIMETER, AND DIAMETER
|
|
6726
6941
|
function polyAreaFlat(poly) {
|
|
6727
6942
|
let pp = P.polyNormalize(poly);
|
|
@@ -6731,7 +6946,6 @@ function polyAreaFlat(poly) {
|
|
|
6731
6946
|
});
|
|
6732
6947
|
return a;
|
|
6733
6948
|
}
|
|
6734
|
-
exports.polyAreaFlat = polyAreaFlat;
|
|
6735
6949
|
// Algorithm for the area of a simple/single planar polygon:
|
|
6736
6950
|
// https://algorithmtutor.com/Computational-Geometry/Area-of-a-polygon-given-a-set-of-points/
|
|
6737
6951
|
// https://mathopenref.com/coordpolygonarea2.html
|
|
@@ -6776,7 +6990,6 @@ function polyPerimeterFlat(poly) {
|
|
|
6776
6990
|
});
|
|
6777
6991
|
return perimeter;
|
|
6778
6992
|
}
|
|
6779
|
-
exports.polyPerimeterFlat = polyPerimeterFlat;
|
|
6780
6993
|
function _distance(x1, y1, x2, y2) {
|
|
6781
6994
|
const dLat = y2 - y1;
|
|
6782
6995
|
const dLon = x2 - x1;
|
|
@@ -6790,7 +7003,6 @@ function polyDiameterFlat(poly) {
|
|
|
6790
7003
|
let circle = P.polyToCircle(poly);
|
|
6791
7004
|
return circle ? circle.r * 2 : 0;
|
|
6792
7005
|
}
|
|
6793
|
-
exports.polyDiameterFlat = polyDiameterFlat;
|
|
6794
7006
|
|
|
6795
7007
|
|
|
6796
7008
|
/***/ }),
|
|
@@ -6803,7 +7015,7 @@ exports.polyDiameterFlat = polyDiameterFlat;
|
|
|
6803
7015
|
|
|
6804
7016
|
|
|
6805
7017
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6806
|
-
exports.featureCleanHoles =
|
|
7018
|
+
exports.featureCleanHoles = featureCleanHoles;
|
|
6807
7019
|
const union_1 = __webpack_require__(/*! ./union */ "./lib/poly/union.ts");
|
|
6808
7020
|
const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
|
|
6809
7021
|
function flattenMultiPoly(polys) {
|
|
@@ -6881,7 +7093,6 @@ function featureCleanHoles(f) {
|
|
|
6881
7093
|
}
|
|
6882
7094
|
return f;
|
|
6883
7095
|
}
|
|
6884
|
-
exports.featureCleanHoles = featureCleanHoles;
|
|
6885
7096
|
|
|
6886
7097
|
|
|
6887
7098
|
/***/ }),
|
|
@@ -6917,15 +7128,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
6917
7128
|
}) : function(o, v) {
|
|
6918
7129
|
o["default"] = v;
|
|
6919
7130
|
});
|
|
6920
|
-
var __importStar = (this && this.__importStar) || function (
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
};
|
|
7131
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
7132
|
+
var ownKeys = function(o) {
|
|
7133
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
7134
|
+
var ar = [];
|
|
7135
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
7136
|
+
return ar;
|
|
7137
|
+
};
|
|
7138
|
+
return ownKeys(o);
|
|
7139
|
+
};
|
|
7140
|
+
return function (mod) {
|
|
7141
|
+
if (mod && mod.__esModule) return mod;
|
|
7142
|
+
var result = {};
|
|
7143
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
7144
|
+
__setModuleDefault(result, mod);
|
|
7145
|
+
return result;
|
|
7146
|
+
};
|
|
7147
|
+
})();
|
|
6927
7148
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6928
|
-
exports.makeConvexHullGrahamScan =
|
|
7149
|
+
exports.makeConvexHullGrahamScan = makeConvexHullGrahamScan;
|
|
6929
7150
|
const poly_1 = __webpack_require__(/*! ./poly */ "./lib/poly/poly.ts");
|
|
6930
7151
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
6931
7152
|
function makeConvexHullGrahamScan(poly, options) {
|
|
@@ -6939,7 +7160,6 @@ function makeConvexHullGrahamScan(poly, options) {
|
|
|
6939
7160
|
const ch = scanner.getHull();
|
|
6940
7161
|
return [ch];
|
|
6941
7162
|
}
|
|
6942
|
-
exports.makeConvexHullGrahamScan = makeConvexHullGrahamScan;
|
|
6943
7163
|
// NOTE - This finds the exterior points of a polygon in standard form and returns
|
|
6944
7164
|
// it as an array if [x, y] points, in contrast to polyToExteriorPoints() which
|
|
6945
7165
|
// uses the packed format and the poly.ts-private point form.
|
|
@@ -7288,15 +7508,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
7288
7508
|
}) : function(o, v) {
|
|
7289
7509
|
o["default"] = v;
|
|
7290
7510
|
});
|
|
7291
|
-
var __importStar = (this && this.__importStar) || function (
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
};
|
|
7511
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
7512
|
+
var ownKeys = function(o) {
|
|
7513
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
7514
|
+
var ar = [];
|
|
7515
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
7516
|
+
return ar;
|
|
7517
|
+
};
|
|
7518
|
+
return ownKeys(o);
|
|
7519
|
+
};
|
|
7520
|
+
return function (mod) {
|
|
7521
|
+
if (mod && mod.__esModule) return mod;
|
|
7522
|
+
var result = {};
|
|
7523
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
7524
|
+
__setModuleDefault(result, mod);
|
|
7525
|
+
return result;
|
|
7526
|
+
};
|
|
7527
|
+
})();
|
|
7298
7528
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7299
|
-
exports.
|
|
7529
|
+
exports.polyMapToByCentroid = polyMapToByCentroid;
|
|
7530
|
+
exports.polyMapTo = polyMapTo;
|
|
7300
7531
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
7301
7532
|
const PL = __importStar(__webpack_require__(/*! ./polylabel */ "./lib/poly/polylabel.ts"));
|
|
7302
7533
|
const BB = __importStar(__webpack_require__(/*! ./boundbox */ "./lib/poly/boundbox.ts"));
|
|
@@ -7357,7 +7588,6 @@ function polyMapToByCentroid(districts, centroids) {
|
|
|
7357
7588
|
});
|
|
7358
7589
|
return map;
|
|
7359
7590
|
}
|
|
7360
|
-
exports.polyMapToByCentroid = polyMapToByCentroid;
|
|
7361
7591
|
function polyMapTo(districts, blocks) {
|
|
7362
7592
|
// Cache labelx, labely if necessary
|
|
7363
7593
|
setLabels(blocks);
|
|
@@ -7367,7 +7597,6 @@ function polyMapTo(districts, blocks) {
|
|
|
7367
7597
|
});
|
|
7368
7598
|
return polyMapToByCentroid(districts, centroids);
|
|
7369
7599
|
}
|
|
7370
|
-
exports.polyMapTo = polyMapTo;
|
|
7371
7600
|
|
|
7372
7601
|
|
|
7373
7602
|
/***/ }),
|
|
@@ -7383,20 +7612,33 @@ exports.polyMapTo = polyMapTo;
|
|
|
7383
7612
|
// SOME BASIC MATRIX OPERATIONS FOR MBR
|
|
7384
7613
|
//
|
|
7385
7614
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7386
|
-
exports.dotProduct = exports.subset = exports.range = exports.index = exports.dotMultiply = exports.subtract = exports.column = exports.row = exports.concat = exports.max = exports.min = exports.apply = exports.transpose = exports.multiply = exports.matrix = void 0;
|
|
7387
|
-
function matrix(a) {
|
|
7388
|
-
return a;
|
|
7389
|
-
}
|
|
7390
7615
|
exports.matrix = matrix;
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7616
|
+
exports.multiply = multiply;
|
|
7617
|
+
exports.transpose = transpose;
|
|
7618
|
+
exports.apply = apply;
|
|
7619
|
+
exports.min = min;
|
|
7620
|
+
exports.max = max;
|
|
7621
|
+
exports.concat = concat;
|
|
7622
|
+
exports.row = row;
|
|
7623
|
+
exports.column = column;
|
|
7624
|
+
exports.subtract = subtract;
|
|
7625
|
+
exports.dotMultiply = dotMultiply;
|
|
7626
|
+
exports.index = index;
|
|
7627
|
+
exports.range = range;
|
|
7628
|
+
exports.subset = subset;
|
|
7629
|
+
exports.dotProduct = dotProduct;
|
|
7630
|
+
function matrix(a) {
|
|
7631
|
+
return a;
|
|
7632
|
+
}
|
|
7633
|
+
function multiply(a, b) {
|
|
7634
|
+
protect((nRows(a) > 0), "In multiply, input matrix 'a' has no rows. ");
|
|
7635
|
+
protect((nCols(a) > 0), "In multiply, input matrix 'a' has no columns. ");
|
|
7636
|
+
protect((nRows(b) > 0), "In multiply, input matrix 'b' has no rows. ");
|
|
7637
|
+
protect((nCols(b) > 0), "In multiply, input matrix 'b' has no columns. ");
|
|
7638
|
+
const m = nRows(a);
|
|
7639
|
+
const n = nCols(a);
|
|
7640
|
+
const p = nRows(b);
|
|
7641
|
+
const q = nCols(b);
|
|
7400
7642
|
protect((p == n), "In multiply, the # rows in matrix 'b' doesn't match the number of columns in matrix 'a'.");
|
|
7401
7643
|
let c = initialize(m, n);
|
|
7402
7644
|
for (let i = 0; i < m; i++) {
|
|
@@ -7408,7 +7650,6 @@ function multiply(a, b) {
|
|
|
7408
7650
|
}
|
|
7409
7651
|
return c;
|
|
7410
7652
|
}
|
|
7411
|
-
exports.multiply = multiply;
|
|
7412
7653
|
function transpose(a) {
|
|
7413
7654
|
protect((nRows(a) > 0), "In transpose, input matrix has no rows. ");
|
|
7414
7655
|
protect((nCols(a) > 0), "In transpose, input matrix has no columns. ");
|
|
@@ -7422,7 +7663,6 @@ function transpose(a) {
|
|
|
7422
7663
|
}
|
|
7423
7664
|
return b;
|
|
7424
7665
|
}
|
|
7425
|
-
exports.transpose = transpose;
|
|
7426
7666
|
function apply(a, over, cb) {
|
|
7427
7667
|
protect((nRows(a) > 0), "In apply, input matrix has no rows. ");
|
|
7428
7668
|
protect((nCols(a) > 0), "In apply, input matrix has no columns. ");
|
|
@@ -7437,15 +7677,12 @@ function apply(a, over, cb) {
|
|
|
7437
7677
|
}
|
|
7438
7678
|
return result;
|
|
7439
7679
|
}
|
|
7440
|
-
exports.apply = apply;
|
|
7441
7680
|
function min(v) {
|
|
7442
7681
|
return Math.min(...v);
|
|
7443
7682
|
}
|
|
7444
|
-
exports.min = min;
|
|
7445
7683
|
function max(v) {
|
|
7446
7684
|
return Math.max(...v);
|
|
7447
7685
|
}
|
|
7448
|
-
exports.max = max;
|
|
7449
7686
|
function concat(a, b, by) {
|
|
7450
7687
|
protect((nRows(a) > 0), "In concat, input matrix 'a' has no rows. ");
|
|
7451
7688
|
protect((nCols(a) > 0), "In concat, input matrix 'a' has no columns. ");
|
|
@@ -7477,14 +7714,12 @@ function concat(a, b, by) {
|
|
|
7477
7714
|
}
|
|
7478
7715
|
return c;
|
|
7479
7716
|
}
|
|
7480
|
-
exports.concat = concat;
|
|
7481
7717
|
function row(a, i) {
|
|
7482
7718
|
protect((nRows(a) > 0), "In row, input matrix has no rows. ");
|
|
7483
7719
|
protect((nCols(a) > 0), "In row, input matrix has no columns. ");
|
|
7484
7720
|
protect((i >= 0), "In row, invalid row index.");
|
|
7485
7721
|
return a[i];
|
|
7486
7722
|
}
|
|
7487
|
-
exports.row = row;
|
|
7488
7723
|
function column(a, j) {
|
|
7489
7724
|
protect((nRows(a) > 0), "In column, input matrix has no rows. ");
|
|
7490
7725
|
protect((nCols(a) > 0), "In column, input matrix has no columns. ");
|
|
@@ -7495,7 +7730,6 @@ function column(a, j) {
|
|
|
7495
7730
|
}
|
|
7496
7731
|
return v;
|
|
7497
7732
|
}
|
|
7498
|
-
exports.column = column;
|
|
7499
7733
|
function subtract(a, b) {
|
|
7500
7734
|
protect((a.length == b.length), "In subtract, the input vectors have different lengths.");
|
|
7501
7735
|
let c = [];
|
|
@@ -7504,7 +7738,6 @@ function subtract(a, b) {
|
|
|
7504
7738
|
}
|
|
7505
7739
|
return c;
|
|
7506
7740
|
}
|
|
7507
|
-
exports.subtract = subtract;
|
|
7508
7741
|
function dotMultiply(a, b) {
|
|
7509
7742
|
protect((a.length > 0) && (a.length == b.length), "In dotMultiply, the vectors aren't the same length. ");
|
|
7510
7743
|
let c = [];
|
|
@@ -7513,11 +7746,9 @@ function dotMultiply(a, b) {
|
|
|
7513
7746
|
}
|
|
7514
7747
|
return c;
|
|
7515
7748
|
}
|
|
7516
|
-
exports.dotMultiply = dotMultiply;
|
|
7517
7749
|
function index(a, b) {
|
|
7518
7750
|
return [a, b];
|
|
7519
7751
|
}
|
|
7520
|
-
exports.index = index;
|
|
7521
7752
|
function range(start, end, includeEnd = false) {
|
|
7522
7753
|
let r = [];
|
|
7523
7754
|
end += includeEnd ? 1 : 0;
|
|
@@ -7526,7 +7757,6 @@ function range(start, end, includeEnd = false) {
|
|
|
7526
7757
|
}
|
|
7527
7758
|
return r;
|
|
7528
7759
|
}
|
|
7529
|
-
exports.range = range;
|
|
7530
7760
|
function subset(a, select) {
|
|
7531
7761
|
protect((nRows(a) > 0), "In subset, input matrix has no rows. ");
|
|
7532
7762
|
protect((nCols(a) > 0), "In subset, input matrix has no columns. ");
|
|
@@ -7546,7 +7776,6 @@ function subset(a, select) {
|
|
|
7546
7776
|
}
|
|
7547
7777
|
return b;
|
|
7548
7778
|
}
|
|
7549
|
-
exports.subset = subset;
|
|
7550
7779
|
// HELPERS
|
|
7551
7780
|
function initialize(rows, cols) {
|
|
7552
7781
|
protect(((rows > 0) || (cols > 0)), "In initialize, the # of rows or columns is not positive. ");
|
|
@@ -7559,7 +7788,6 @@ function dotProduct(a, b) {
|
|
|
7559
7788
|
protect((a.length > 0) && (a.length == b.length), "In dotProduct, the vectors aren't the same length. ");
|
|
7560
7789
|
return a.map((value, i) => value * b[i]).reduce((acc, val) => acc + val, 0);
|
|
7561
7790
|
}
|
|
7562
|
-
exports.dotProduct = dotProduct;
|
|
7563
7791
|
;
|
|
7564
7792
|
function protect(condition, message) {
|
|
7565
7793
|
if (!condition)
|
|
@@ -7595,15 +7823,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
7595
7823
|
}) : function(o, v) {
|
|
7596
7824
|
o["default"] = v;
|
|
7597
7825
|
});
|
|
7598
|
-
var __importStar = (this && this.__importStar) || function (
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
};
|
|
7826
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
7827
|
+
var ownKeys = function(o) {
|
|
7828
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
7829
|
+
var ar = [];
|
|
7830
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
7831
|
+
return ar;
|
|
7832
|
+
};
|
|
7833
|
+
return ownKeys(o);
|
|
7834
|
+
};
|
|
7835
|
+
return function (mod) {
|
|
7836
|
+
if (mod && mod.__esModule) return mod;
|
|
7837
|
+
var result = {};
|
|
7838
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
7839
|
+
__setModuleDefault(result, mod);
|
|
7840
|
+
return result;
|
|
7841
|
+
};
|
|
7842
|
+
})();
|
|
7605
7843
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7606
|
-
exports.minimumBoundingRectangle =
|
|
7844
|
+
exports.minimumBoundingRectangle = minimumBoundingRectangle;
|
|
7607
7845
|
//
|
|
7608
7846
|
// WHUBER'S ELEGANT, TRIG-FREE SOLUTION IN R
|
|
7609
7847
|
//
|
|
@@ -7687,7 +7925,6 @@ function minimumBoundingRectangle(poly) {
|
|
|
7687
7925
|
// Convert to standard polygon form
|
|
7688
7926
|
return [points];
|
|
7689
7927
|
}
|
|
7690
|
-
exports.minimumBoundingRectangle = minimumBoundingRectangle;
|
|
7691
7928
|
//
|
|
7692
7929
|
// THIS RE-IMPLEMENTS THE R IN TYPESCRIPT, USING MATHJS FOR MATRIX OPERATIONS
|
|
7693
7930
|
//
|
|
@@ -7810,15 +8047,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
7810
8047
|
}) : function(o, v) {
|
|
7811
8048
|
o["default"] = v;
|
|
7812
8049
|
});
|
|
7813
|
-
var __importStar = (this && this.__importStar) || function (
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
};
|
|
8050
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
8051
|
+
var ownKeys = function(o) {
|
|
8052
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
8053
|
+
var ar = [];
|
|
8054
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
8055
|
+
return ar;
|
|
8056
|
+
};
|
|
8057
|
+
return ownKeys(o);
|
|
8058
|
+
};
|
|
8059
|
+
return function (mod) {
|
|
8060
|
+
if (mod && mod.__esModule) return mod;
|
|
8061
|
+
var result = {};
|
|
8062
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
8063
|
+
__setModuleDefault(result, mod);
|
|
8064
|
+
return result;
|
|
8065
|
+
};
|
|
8066
|
+
})();
|
|
7820
8067
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7821
|
-
exports.polyContainsPoint =
|
|
8068
|
+
exports.polyContainsPoint = polyContainsPoint;
|
|
7822
8069
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
7823
8070
|
function polyContainsPoint(poly, x, y) {
|
|
7824
8071
|
let pp = PP.polyPack(poly);
|
|
@@ -7851,7 +8098,6 @@ function polyContainsPoint(poly, x, y) {
|
|
|
7851
8098
|
bInside = true;
|
|
7852
8099
|
return bInside;
|
|
7853
8100
|
}
|
|
7854
|
-
exports.polyContainsPoint = polyContainsPoint;
|
|
7855
8101
|
|
|
7856
8102
|
|
|
7857
8103
|
/***/ }),
|
|
@@ -7879,15 +8125,45 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
7879
8125
|
}) : function(o, v) {
|
|
7880
8126
|
o["default"] = v;
|
|
7881
8127
|
});
|
|
7882
|
-
var __importStar = (this && this.__importStar) || function (
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
};
|
|
8128
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
8129
|
+
var ownKeys = function(o) {
|
|
8130
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
8131
|
+
var ar = [];
|
|
8132
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
8133
|
+
return ar;
|
|
8134
|
+
};
|
|
8135
|
+
return ownKeys(o);
|
|
8136
|
+
};
|
|
8137
|
+
return function (mod) {
|
|
8138
|
+
if (mod && mod.__esModule) return mod;
|
|
8139
|
+
var result = {};
|
|
8140
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
8141
|
+
__setModuleDefault(result, mod);
|
|
8142
|
+
return result;
|
|
8143
|
+
};
|
|
8144
|
+
})();
|
|
7889
8145
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7890
|
-
exports.
|
|
8146
|
+
exports.Circle = exports.DefaultOptions = exports.EARTH_RADIUS = exports.DefaultTickOptions = void 0;
|
|
8147
|
+
exports.polySimpleArea = polySimpleArea;
|
|
8148
|
+
exports.polyNormalize = polyNormalize;
|
|
8149
|
+
exports.polyNull = polyNull;
|
|
8150
|
+
exports.polyArea = polyArea;
|
|
8151
|
+
exports.polyDiameter = polyDiameter;
|
|
8152
|
+
exports.polyPerimeter = polyPerimeter;
|
|
8153
|
+
exports.polyToCircle = polyToCircle;
|
|
8154
|
+
exports.polyToPolsbyPopperCircle = polyToPolsbyPopperCircle;
|
|
8155
|
+
exports.polyFromCircle = polyFromCircle;
|
|
8156
|
+
exports.polyToExteriorPoints = polyToExteriorPoints;
|
|
8157
|
+
exports.polyConvexHull = polyConvexHull;
|
|
8158
|
+
exports.makeConvexHullMonotoneChain2D = makeConvexHullMonotoneChain2D;
|
|
8159
|
+
exports.polyCompactness = polyCompactness;
|
|
8160
|
+
exports.polyDescribe = polyDescribe;
|
|
8161
|
+
exports.npoints = npoints;
|
|
8162
|
+
exports.polyTransform = polyTransform;
|
|
8163
|
+
exports.polyRingWindings = polyRingWindings;
|
|
8164
|
+
exports.featureRewind = featureRewind;
|
|
8165
|
+
exports.polyRewindRings = polyRewindRings;
|
|
8166
|
+
exports.polyBadCoordinates = polyBadCoordinates;
|
|
7891
8167
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
7892
8168
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
7893
8169
|
const graham_scan_1 = __webpack_require__(/*! ./graham-scan */ "./lib/poly/graham-scan.ts");
|
|
@@ -7941,18 +8217,15 @@ function polySimpleArea(b, iOffset, n) {
|
|
|
7941
8217
|
}
|
|
7942
8218
|
return Math.abs(total);
|
|
7943
8219
|
}
|
|
7944
|
-
exports.polySimpleArea = polySimpleArea;
|
|
7945
8220
|
// Allow bare polygon coordinates array or GeoJSON feature.
|
|
7946
8221
|
// Normalize to multipolygon points array.
|
|
7947
8222
|
function polyNormalize(poly) {
|
|
7948
8223
|
return PP.polyPack(poly);
|
|
7949
8224
|
}
|
|
7950
|
-
exports.polyNormalize = polyNormalize;
|
|
7951
8225
|
function polyNull(poly) {
|
|
7952
8226
|
let pp = PP.polyPack(poly);
|
|
7953
8227
|
return pp == null || pp.length == 2;
|
|
7954
8228
|
}
|
|
7955
|
-
exports.polyNull = polyNull;
|
|
7956
8229
|
// Area of geodesic polygon
|
|
7957
8230
|
function polyArea(poly) {
|
|
7958
8231
|
let pp = polyNormalize(poly);
|
|
@@ -7963,7 +8236,6 @@ function polyArea(poly) {
|
|
|
7963
8236
|
});
|
|
7964
8237
|
return a;
|
|
7965
8238
|
}
|
|
7966
|
-
exports.polyArea = polyArea;
|
|
7967
8239
|
// NOTE - COMPACTNESS: Added the diameter of the geodesic polygon in meters
|
|
7968
8240
|
function polyDiameter(poly, options) {
|
|
7969
8241
|
if (options === undefined)
|
|
@@ -7978,7 +8250,6 @@ function polyDiameter(poly, options) {
|
|
|
7978
8250
|
const diameter = Math.max(lonDistance, latDistance);
|
|
7979
8251
|
return diameter;
|
|
7980
8252
|
}
|
|
7981
|
-
exports.polyDiameter = polyDiameter;
|
|
7982
8253
|
// Return distance in meters given two lat/lon points
|
|
7983
8254
|
function haversine(x1, y1, x2, y2, options) {
|
|
7984
8255
|
let dLat = Util.deg2rad(y2 - y1);
|
|
@@ -8015,7 +8286,6 @@ function polyPerimeter(poly, options) {
|
|
|
8015
8286
|
});
|
|
8016
8287
|
return perimeter;
|
|
8017
8288
|
}
|
|
8018
|
-
exports.polyPerimeter = polyPerimeter;
|
|
8019
8289
|
class Point {
|
|
8020
8290
|
constructor(x, y) {
|
|
8021
8291
|
this.x = x;
|
|
@@ -8039,7 +8309,6 @@ exports.Circle = Circle;
|
|
|
8039
8309
|
function polyToCircle(poly) {
|
|
8040
8310
|
return makeCircle(polyToExteriorPoints(poly));
|
|
8041
8311
|
}
|
|
8042
|
-
exports.polyToCircle = polyToCircle;
|
|
8043
8312
|
//
|
|
8044
8313
|
// Returns the circle whose perimeter is equal to the perimeter of the bounding perimeter
|
|
8045
8314
|
// of the polygon. Use binary search to find an approximation.
|
|
@@ -8053,7 +8322,6 @@ function polyToPolsbyPopperCircle(poly, options) {
|
|
|
8053
8322
|
c.r = (p / (2 * Math.PI)) / 111139;
|
|
8054
8323
|
return c;
|
|
8055
8324
|
}
|
|
8056
|
-
exports.polyToPolsbyPopperCircle = polyToPolsbyPopperCircle;
|
|
8057
8325
|
function makeCircle(points) {
|
|
8058
8326
|
if (points == null)
|
|
8059
8327
|
return null;
|
|
@@ -8216,7 +8484,6 @@ function polyFromCircle(c, nSegments) {
|
|
|
8216
8484
|
// return multi-polygon
|
|
8217
8485
|
return [[poly]];
|
|
8218
8486
|
}
|
|
8219
|
-
exports.polyFromCircle = polyFromCircle;
|
|
8220
8487
|
// isLeft(): tests if a point is Left|On|Right of an infinite line.
|
|
8221
8488
|
// Input: three points P0, P1, and P2
|
|
8222
8489
|
// Return: >0 for P2 left of the line through P0 and P1
|
|
@@ -8244,7 +8511,6 @@ function polyToExteriorPoints(poly) {
|
|
|
8244
8511
|
});
|
|
8245
8512
|
return points.length > 0 ? points : null;
|
|
8246
8513
|
}
|
|
8247
|
-
exports.polyToExteriorPoints = polyToExteriorPoints;
|
|
8248
8514
|
//
|
|
8249
8515
|
// polyConvexHull() - Two algorithms:
|
|
8250
8516
|
// * Gram Scan (default) - in graham-scan.ts
|
|
@@ -8255,7 +8521,6 @@ function polyConvexHull(poly, altAlgorithm) {
|
|
|
8255
8521
|
return makeConvexHullMonotoneChain2D(poly);
|
|
8256
8522
|
return (0, graham_scan_1.makeConvexHullGrahamScan)(poly);
|
|
8257
8523
|
}
|
|
8258
|
-
exports.polyConvexHull = polyConvexHull;
|
|
8259
8524
|
function makeConvexHullMonotoneChain2D(poly) {
|
|
8260
8525
|
// Normalize input
|
|
8261
8526
|
let points = polyToExteriorPoints(poly);
|
|
@@ -8332,7 +8597,6 @@ function makeConvexHullMonotoneChain2D(poly) {
|
|
|
8332
8597
|
H[++top] = points[minmin]; // push joining endpoint onto stack
|
|
8333
8598
|
return pointsToPoly(H);
|
|
8334
8599
|
}
|
|
8335
|
-
exports.makeConvexHullMonotoneChain2D = makeConvexHullMonotoneChain2D;
|
|
8336
8600
|
function polyCompactness(poly, options) {
|
|
8337
8601
|
if (options === undefined)
|
|
8338
8602
|
options = exports.DefaultOptions;
|
|
@@ -8354,7 +8618,6 @@ function polyCompactness(poly, options) {
|
|
|
8354
8618
|
result.value = Math.trunc(((result.reock + result.polsby_popper) / 2) * 100);
|
|
8355
8619
|
return result;
|
|
8356
8620
|
}
|
|
8357
|
-
exports.polyCompactness = polyCompactness;
|
|
8358
8621
|
const EmptyPolyDescription = { npoly: 0, nhole: 0, npoint: 0 };
|
|
8359
8622
|
function polyDescribe(poly) {
|
|
8360
8623
|
let pp = polyNormalize(poly);
|
|
@@ -8368,12 +8631,10 @@ function polyDescribe(poly) {
|
|
|
8368
8631
|
});
|
|
8369
8632
|
return d;
|
|
8370
8633
|
}
|
|
8371
|
-
exports.polyDescribe = polyDescribe;
|
|
8372
8634
|
function npoints(poly) {
|
|
8373
8635
|
let d = polyDescribe(poly);
|
|
8374
8636
|
return d.npoint;
|
|
8375
8637
|
}
|
|
8376
|
-
exports.npoints = npoints;
|
|
8377
8638
|
//
|
|
8378
8639
|
// polyTransform: transform each point. Called for all polygons and all rings.
|
|
8379
8640
|
// point, by point. Returns a packed structure.
|
|
@@ -8391,7 +8652,6 @@ function polyTransform(poly, transformFn) {
|
|
|
8391
8652
|
});
|
|
8392
8653
|
return pp;
|
|
8393
8654
|
}
|
|
8394
|
-
exports.polyTransform = polyTransform;
|
|
8395
8655
|
function identityTransform(pt) {
|
|
8396
8656
|
return [pt[0], pt[1]];
|
|
8397
8657
|
}
|
|
@@ -8451,7 +8711,6 @@ function polyRingWindings(poly) {
|
|
|
8451
8711
|
});
|
|
8452
8712
|
return windings;
|
|
8453
8713
|
}
|
|
8454
|
-
exports.polyRingWindings = polyRingWindings;
|
|
8455
8714
|
function flattenMultiPoly(polys) {
|
|
8456
8715
|
let c = [];
|
|
8457
8716
|
polys.forEach((poly) => {
|
|
@@ -8503,7 +8762,6 @@ function featureRewind(f, options) {
|
|
|
8503
8762
|
});
|
|
8504
8763
|
return f;
|
|
8505
8764
|
}
|
|
8506
|
-
exports.featureRewind = featureRewind;
|
|
8507
8765
|
//
|
|
8508
8766
|
// polyRewindRings: Check the winding order of the polygon's ring. Rewind them,
|
|
8509
8767
|
// if necessary. Return a packed polygon.
|
|
@@ -8550,7 +8808,6 @@ function polyRewindRings(pp, bLog = false) {
|
|
|
8550
8808
|
});
|
|
8551
8809
|
return pp;
|
|
8552
8810
|
}
|
|
8553
|
-
exports.polyRewindRings = polyRewindRings;
|
|
8554
8811
|
//
|
|
8555
8812
|
// To figure out which way a ring is wound:
|
|
8556
8813
|
//
|
|
@@ -8584,7 +8841,6 @@ function polyBadCoordinates(f) {
|
|
|
8584
8841
|
}
|
|
8585
8842
|
return bad;
|
|
8586
8843
|
}
|
|
8587
|
-
exports.polyBadCoordinates = polyBadCoordinates;
|
|
8588
8844
|
|
|
8589
8845
|
|
|
8590
8846
|
/***/ }),
|
|
@@ -8612,15 +8868,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
8612
8868
|
}) : function(o, v) {
|
|
8613
8869
|
o["default"] = v;
|
|
8614
8870
|
});
|
|
8615
|
-
var __importStar = (this && this.__importStar) || function (
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
};
|
|
8871
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
8872
|
+
var ownKeys = function(o) {
|
|
8873
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
8874
|
+
var ar = [];
|
|
8875
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
8876
|
+
return ar;
|
|
8877
|
+
};
|
|
8878
|
+
return ownKeys(o);
|
|
8879
|
+
};
|
|
8880
|
+
return function (mod) {
|
|
8881
|
+
if (mod && mod.__esModule) return mod;
|
|
8882
|
+
var result = {};
|
|
8883
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
8884
|
+
__setModuleDefault(result, mod);
|
|
8885
|
+
return result;
|
|
8886
|
+
};
|
|
8887
|
+
})();
|
|
8622
8888
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8623
|
-
exports.
|
|
8889
|
+
exports.packCollection = packCollection;
|
|
8890
|
+
exports.unpackCollection = unpackCollection;
|
|
8891
|
+
exports.topoToBuffer = topoToBuffer;
|
|
8892
|
+
exports.topoFromBuffer = topoFromBuffer;
|
|
8624
8893
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
8625
8894
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
8626
8895
|
const T = __importStar(__webpack_require__(/*! ./topo */ "./lib/poly/topo.ts"));
|
|
@@ -8701,7 +8970,6 @@ function packCollection(coder, col) {
|
|
|
8701
8970
|
PP.featureUnpack(col);
|
|
8702
8971
|
return ab;
|
|
8703
8972
|
}
|
|
8704
|
-
exports.packCollection = packCollection;
|
|
8705
8973
|
function reverse(buf8, s, n) {
|
|
8706
8974
|
let e = s + n - 1;
|
|
8707
8975
|
while (s < e) {
|
|
@@ -8753,7 +9021,6 @@ function unpackCollection(coder, ab) {
|
|
|
8753
9021
|
f.geometry.packed.buffer = buf64; });
|
|
8754
9022
|
return col;
|
|
8755
9023
|
}
|
|
8756
|
-
exports.unpackCollection = unpackCollection;
|
|
8757
9024
|
// Format of packed buffer:
|
|
8758
9025
|
// [Size of JSON string] [4 bytes]
|
|
8759
9026
|
// [Size of packedarcs] [4 bytes]
|
|
@@ -8802,7 +9069,6 @@ function topoToBuffer(coder, topo) {
|
|
|
8802
9069
|
topo.packed = savepack;
|
|
8803
9070
|
return ab;
|
|
8804
9071
|
}
|
|
8805
|
-
exports.topoToBuffer = topoToBuffer;
|
|
8806
9072
|
function topoFromBuffer(coder, ab) {
|
|
8807
9073
|
let buf8 = new Uint8Array(ab);
|
|
8808
9074
|
let buf32 = new Int32Array(ab);
|
|
@@ -8816,7 +9082,6 @@ function topoFromBuffer(coder, ab) {
|
|
|
8816
9082
|
topo.packed.arcindices = new Int32Array(ab, stringLength + HeaderSize + arcsByteLength, arcindicesByteLength / 4);
|
|
8817
9083
|
return topo;
|
|
8818
9084
|
}
|
|
8819
|
-
exports.topoFromBuffer = topoFromBuffer;
|
|
8820
9085
|
|
|
8821
9086
|
|
|
8822
9087
|
/***/ }),
|
|
@@ -8844,18 +9109,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
8844
9109
|
}) : function(o, v) {
|
|
8845
9110
|
o["default"] = v;
|
|
8846
9111
|
});
|
|
8847
|
-
var __importStar = (this && this.__importStar) || function (
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
};
|
|
9112
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
9113
|
+
var ownKeys = function(o) {
|
|
9114
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
9115
|
+
var ar = [];
|
|
9116
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
9117
|
+
return ar;
|
|
9118
|
+
};
|
|
9119
|
+
return ownKeys(o);
|
|
9120
|
+
};
|
|
9121
|
+
return function (mod) {
|
|
9122
|
+
if (mod && mod.__esModule) return mod;
|
|
9123
|
+
var result = {};
|
|
9124
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
9125
|
+
__setModuleDefault(result, mod);
|
|
9126
|
+
return result;
|
|
9127
|
+
};
|
|
9128
|
+
})();
|
|
8854
9129
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8855
9130
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8856
9131
|
};
|
|
8857
9132
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8858
|
-
exports.
|
|
9133
|
+
exports.polyDistance = polyDistance;
|
|
9134
|
+
exports.polyLabel = polyLabel;
|
|
8859
9135
|
const tinyqueue_1 = __importDefault(__webpack_require__(/*! tinyqueue */ "tinyqueue"));
|
|
8860
9136
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
8861
9137
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
@@ -8930,7 +9206,6 @@ function polyDistance(poly, x, y) {
|
|
|
8930
9206
|
});
|
|
8931
9207
|
return minInside;
|
|
8932
9208
|
}
|
|
8933
|
-
exports.polyDistance = polyDistance;
|
|
8934
9209
|
//
|
|
8935
9210
|
// polyLabel: given polygon, return contained point furthest from any edge, and that distance
|
|
8936
9211
|
//
|
|
@@ -9028,7 +9303,6 @@ function polyLabel(poly, precision, debug) {
|
|
|
9028
9303
|
}
|
|
9029
9304
|
return { x: bestCell.x, y: bestCell.y, d: bestCell.d };
|
|
9030
9305
|
}
|
|
9031
|
-
exports.polyLabel = polyLabel;
|
|
9032
9306
|
function compareMax(a, b) { return b.max - a.max; }
|
|
9033
9307
|
class Cell {
|
|
9034
9308
|
constructor(x, y, h, forEachPointPair) {
|
|
@@ -9115,15 +9389,45 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
9115
9389
|
}) : function(o, v) {
|
|
9116
9390
|
o["default"] = v;
|
|
9117
9391
|
});
|
|
9118
|
-
var __importStar = (this && this.__importStar) || function (
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
};
|
|
9392
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
9393
|
+
var ownKeys = function(o) {
|
|
9394
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
9395
|
+
var ar = [];
|
|
9396
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
9397
|
+
return ar;
|
|
9398
|
+
};
|
|
9399
|
+
return ownKeys(o);
|
|
9400
|
+
};
|
|
9401
|
+
return function (mod) {
|
|
9402
|
+
if (mod && mod.__esModule) return mod;
|
|
9403
|
+
var result = {};
|
|
9404
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
9405
|
+
__setModuleDefault(result, mod);
|
|
9406
|
+
return result;
|
|
9407
|
+
};
|
|
9408
|
+
})();
|
|
9125
9409
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9126
|
-
exports.
|
|
9410
|
+
exports.polyPackSize = polyPackSize;
|
|
9411
|
+
exports.polyPackEachRing = polyPackEachRing;
|
|
9412
|
+
exports.polyPackEachPoint = polyPackEachPoint;
|
|
9413
|
+
exports.polyPackCountPoints = polyPackCountPoints;
|
|
9414
|
+
exports.polyPacked = polyPacked;
|
|
9415
|
+
exports.normalizeArcs = normalizeArcs;
|
|
9416
|
+
exports.countArcPolygons = countArcPolygons;
|
|
9417
|
+
exports.countArcRings = countArcRings;
|
|
9418
|
+
exports.countOneArcPoints = countOneArcPoints;
|
|
9419
|
+
exports.countArcPoints = countArcPoints;
|
|
9420
|
+
exports.polyPackTopoArcs = polyPackTopoArcs;
|
|
9421
|
+
exports.polyPack = polyPack;
|
|
9422
|
+
exports.polyPackCopy = polyPackCopy;
|
|
9423
|
+
exports.polyUnpack = polyUnpack;
|
|
9424
|
+
exports.featurePackSize = featurePackSize;
|
|
9425
|
+
exports.featurePack = featurePack;
|
|
9426
|
+
exports.featureUnpack = featureUnpack;
|
|
9427
|
+
exports.featureUnpackTemporarily = featureUnpackTemporarily;
|
|
9428
|
+
exports.featureRepack = featureRepack;
|
|
9429
|
+
exports.featurePackString = featurePackString;
|
|
9430
|
+
exports.featureUnpackString = featureUnpackString;
|
|
9127
9431
|
// Shared libraries
|
|
9128
9432
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
9129
9433
|
function polyPackSize(coords) {
|
|
@@ -9151,7 +9455,6 @@ function polyPackSize(coords) {
|
|
|
9151
9455
|
}
|
|
9152
9456
|
return nFloats;
|
|
9153
9457
|
}
|
|
9154
|
-
exports.polyPackSize = polyPackSize;
|
|
9155
9458
|
function polyPackEachRing(pack, cb) {
|
|
9156
9459
|
if (pack == null || pack.buffer == null)
|
|
9157
9460
|
return;
|
|
@@ -9176,7 +9479,6 @@ function polyPackEachRing(pack, cb) {
|
|
|
9176
9479
|
}
|
|
9177
9480
|
}
|
|
9178
9481
|
}
|
|
9179
|
-
exports.polyPackEachRing = polyPackEachRing;
|
|
9180
9482
|
function polyPackEachPoint(pack, cb) {
|
|
9181
9483
|
polyPackEachRing(pack, (b, iPoly, iRing, iOffset, nPoints) => {
|
|
9182
9484
|
let iEnd = iOffset + (nPoints * 2);
|
|
@@ -9184,13 +9486,11 @@ function polyPackEachPoint(pack, cb) {
|
|
|
9184
9486
|
cb(b, iPoly, iRing, iOffset);
|
|
9185
9487
|
});
|
|
9186
9488
|
}
|
|
9187
|
-
exports.polyPackEachPoint = polyPackEachPoint;
|
|
9188
9489
|
function polyPackCountPoints(pack) {
|
|
9189
9490
|
let n = 0;
|
|
9190
9491
|
polyPackEachRing(pack, (b, iPoly, iRing, iOffset, nPoints) => { n += nPoints; });
|
|
9191
9492
|
return n;
|
|
9192
9493
|
}
|
|
9193
|
-
exports.polyPackCountPoints = polyPackCountPoints;
|
|
9194
9494
|
function polyPacked(f) {
|
|
9195
9495
|
if (f == null)
|
|
9196
9496
|
return false;
|
|
@@ -9202,7 +9502,6 @@ function polyPacked(f) {
|
|
|
9202
9502
|
return polyPacked(f.features[0]);
|
|
9203
9503
|
return false;
|
|
9204
9504
|
}
|
|
9205
|
-
exports.polyPacked = polyPacked;
|
|
9206
9505
|
// Convert to multi-polygon format if necessary
|
|
9207
9506
|
function normalizeArcs(arcs) {
|
|
9208
9507
|
let d = Util.depthof(arcs);
|
|
@@ -9211,12 +9510,10 @@ function normalizeArcs(arcs) {
|
|
|
9211
9510
|
} // note that depth is n-1 compared to coords because leaf is just number, not [x,y]
|
|
9212
9511
|
return arcs;
|
|
9213
9512
|
}
|
|
9214
|
-
exports.normalizeArcs = normalizeArcs;
|
|
9215
9513
|
function countArcPolygons(arcs) {
|
|
9216
9514
|
arcs = normalizeArcs(arcs);
|
|
9217
9515
|
return arcs.length;
|
|
9218
9516
|
}
|
|
9219
|
-
exports.countArcPolygons = countArcPolygons;
|
|
9220
9517
|
function countArcRings(arcs, iPoly) {
|
|
9221
9518
|
arcs = normalizeArcs(arcs);
|
|
9222
9519
|
let r = 0;
|
|
@@ -9224,7 +9521,6 @@ function countArcRings(arcs, iPoly) {
|
|
|
9224
9521
|
r += a.length; });
|
|
9225
9522
|
return r;
|
|
9226
9523
|
}
|
|
9227
|
-
exports.countArcRings = countArcRings;
|
|
9228
9524
|
function countOneArcPoints(topo, ring) {
|
|
9229
9525
|
// for each ring
|
|
9230
9526
|
let n = 0;
|
|
@@ -9239,7 +9535,6 @@ function countOneArcPoints(topo, ring) {
|
|
|
9239
9535
|
n = 4;
|
|
9240
9536
|
return n;
|
|
9241
9537
|
}
|
|
9242
|
-
exports.countOneArcPoints = countOneArcPoints;
|
|
9243
9538
|
function countArcPoints(topo, arcs, iPoly) {
|
|
9244
9539
|
arcs = normalizeArcs(arcs);
|
|
9245
9540
|
let npoints = 0;
|
|
@@ -9249,7 +9544,6 @@ function countArcPoints(topo, arcs, iPoly) {
|
|
|
9249
9544
|
});
|
|
9250
9545
|
return npoints;
|
|
9251
9546
|
}
|
|
9252
|
-
exports.countArcPoints = countArcPoints;
|
|
9253
9547
|
// This packs the TopoJSON arc format into a PolyPack. Basics:
|
|
9254
9548
|
// 1) Negative indices indicate arc should be traversed backward.
|
|
9255
9549
|
// 2) First and last point of sequential arcs are duplicated, so only include one instance. Easiest way
|
|
@@ -9311,7 +9605,6 @@ function polyPackTopoArcs(topo, arcs, iPoly) {
|
|
|
9311
9605
|
});
|
|
9312
9606
|
return prepack;
|
|
9313
9607
|
}
|
|
9314
|
-
exports.polyPackTopoArcs = polyPackTopoArcs;
|
|
9315
9608
|
function polyPack(coords, prepack) {
|
|
9316
9609
|
// Null feature?
|
|
9317
9610
|
if (coords == null || (coords.length !== undefined && coords.length == 0))
|
|
@@ -9376,7 +9669,6 @@ function polyPack(coords, prepack) {
|
|
|
9376
9669
|
}
|
|
9377
9670
|
return prepack;
|
|
9378
9671
|
}
|
|
9379
|
-
exports.polyPack = polyPack;
|
|
9380
9672
|
function polyPackCopy(coords) {
|
|
9381
9673
|
let pp = polyPack(coords);
|
|
9382
9674
|
if (pp == null)
|
|
@@ -9390,7 +9682,6 @@ function polyPackCopy(coords) {
|
|
|
9390
9682
|
afDst[i] = afSrc[i + pp.offset];
|
|
9391
9683
|
return copy;
|
|
9392
9684
|
}
|
|
9393
|
-
exports.polyPackCopy = polyPackCopy;
|
|
9394
9685
|
function polyUnpack(prepack) {
|
|
9395
9686
|
// Check if not packed
|
|
9396
9687
|
if (prepack == null)
|
|
@@ -9419,13 +9710,11 @@ function polyUnpack(prepack) {
|
|
|
9419
9710
|
}
|
|
9420
9711
|
return coords.length > 1 ? coords : coords[0];
|
|
9421
9712
|
}
|
|
9422
|
-
exports.polyUnpack = polyUnpack;
|
|
9423
9713
|
function featurePackSize(f) {
|
|
9424
9714
|
if (f && f.geometry && f.geometry.coordinates && f.geometry.type !== 'Point')
|
|
9425
9715
|
return polyPackSize(f.geometry.coordinates);
|
|
9426
9716
|
return 0;
|
|
9427
9717
|
}
|
|
9428
|
-
exports.featurePackSize = featurePackSize;
|
|
9429
9718
|
function featurePack(f, prepack) {
|
|
9430
9719
|
if (f && f.type === 'Feature') {
|
|
9431
9720
|
if (f.geometry && f.geometry.type === 'Point')
|
|
@@ -9476,7 +9765,6 @@ function featurePack(f, prepack) {
|
|
|
9476
9765
|
}
|
|
9477
9766
|
return null;
|
|
9478
9767
|
}
|
|
9479
|
-
exports.featurePack = featurePack;
|
|
9480
9768
|
function featureUnpack(f) {
|
|
9481
9769
|
if (f && f.geometry && f.geometry.packed !== undefined) {
|
|
9482
9770
|
f.geometry.coordinates = polyUnpack(f.geometry.packed);
|
|
@@ -9498,7 +9786,6 @@ function featureUnpack(f) {
|
|
|
9498
9786
|
}
|
|
9499
9787
|
return f;
|
|
9500
9788
|
}
|
|
9501
|
-
exports.featureUnpack = featureUnpack;
|
|
9502
9789
|
function featureUnpackTemporarily(f, save) {
|
|
9503
9790
|
if (save === undefined)
|
|
9504
9791
|
save = new WeakMap();
|
|
@@ -9517,7 +9804,6 @@ function featureUnpackTemporarily(f, save) {
|
|
|
9517
9804
|
}
|
|
9518
9805
|
return save;
|
|
9519
9806
|
}
|
|
9520
|
-
exports.featureUnpackTemporarily = featureUnpackTemporarily;
|
|
9521
9807
|
function featureRepack(f, save) {
|
|
9522
9808
|
if (f && f.type === 'Feature') {
|
|
9523
9809
|
if (f.geometry) {
|
|
@@ -9533,7 +9819,6 @@ function featureRepack(f, save) {
|
|
|
9533
9819
|
}
|
|
9534
9820
|
return f;
|
|
9535
9821
|
}
|
|
9536
|
-
exports.featureRepack = featureRepack;
|
|
9537
9822
|
function featurePackString(f) {
|
|
9538
9823
|
let packed = f.offset ? f : (f.geometry.packed ? f.geometry.packed : polyPack(f.geometry.coordinates));
|
|
9539
9824
|
let af = packed.buffer;
|
|
@@ -9542,7 +9827,6 @@ function featurePackString(f) {
|
|
|
9542
9827
|
a.push(String(af[i]));
|
|
9543
9828
|
return a.join(' ');
|
|
9544
9829
|
}
|
|
9545
|
-
exports.featurePackString = featurePackString;
|
|
9546
9830
|
function featureUnpackString(s) {
|
|
9547
9831
|
let a = s.split(' ');
|
|
9548
9832
|
let ab = new ArrayBuffer(a.length * 8);
|
|
@@ -9555,7 +9839,6 @@ function featureUnpackString(s) {
|
|
|
9555
9839
|
f.geometry.type = 'MultiPolygon';
|
|
9556
9840
|
return f;
|
|
9557
9841
|
}
|
|
9558
|
-
exports.featureUnpackString = featureUnpackString;
|
|
9559
9842
|
|
|
9560
9843
|
|
|
9561
9844
|
/***/ }),
|
|
@@ -9583,15 +9866,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
9583
9866
|
}) : function(o, v) {
|
|
9584
9867
|
o["default"] = v;
|
|
9585
9868
|
});
|
|
9586
|
-
var __importStar = (this && this.__importStar) || function (
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
};
|
|
9869
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
9870
|
+
var ownKeys = function(o) {
|
|
9871
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
9872
|
+
var ar = [];
|
|
9873
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
9874
|
+
return ar;
|
|
9875
|
+
};
|
|
9876
|
+
return ownKeys(o);
|
|
9877
|
+
};
|
|
9878
|
+
return function (mod) {
|
|
9879
|
+
if (mod && mod.__esModule) return mod;
|
|
9880
|
+
var result = {};
|
|
9881
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
9882
|
+
__setModuleDefault(result, mod);
|
|
9883
|
+
return result;
|
|
9884
|
+
};
|
|
9885
|
+
})();
|
|
9593
9886
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9594
|
-
exports.polyRound =
|
|
9887
|
+
exports.polyRound = polyRound;
|
|
9595
9888
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
9596
9889
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
9597
9890
|
// Round feature geometry to 6 decimal precision
|
|
@@ -9617,7 +9910,6 @@ function polyRound(o) {
|
|
|
9617
9910
|
}
|
|
9618
9911
|
return o;
|
|
9619
9912
|
}
|
|
9620
|
-
exports.polyRound = polyRound;
|
|
9621
9913
|
|
|
9622
9914
|
|
|
9623
9915
|
/***/ }),
|
|
@@ -9645,15 +9937,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
9645
9937
|
}) : function(o, v) {
|
|
9646
9938
|
o["default"] = v;
|
|
9647
9939
|
});
|
|
9648
|
-
var __importStar = (this && this.__importStar) || function (
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
};
|
|
9940
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
9941
|
+
var ownKeys = function(o) {
|
|
9942
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
9943
|
+
var ar = [];
|
|
9944
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
9945
|
+
return ar;
|
|
9946
|
+
};
|
|
9947
|
+
return ownKeys(o);
|
|
9948
|
+
};
|
|
9949
|
+
return function (mod) {
|
|
9950
|
+
if (mod && mod.__esModule) return mod;
|
|
9951
|
+
var result = {};
|
|
9952
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
9953
|
+
__setModuleDefault(result, mod);
|
|
9954
|
+
return result;
|
|
9955
|
+
};
|
|
9956
|
+
})();
|
|
9655
9957
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9656
|
-
exports.polySimplify =
|
|
9958
|
+
exports.polySimplify = polySimplify;
|
|
9657
9959
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
9658
9960
|
const simplify_1 = __webpack_require__(/*! ./simplify */ "./lib/poly/simplify.ts");
|
|
9659
9961
|
function polySimplify(poly, tolerance = 0.0001) {
|
|
@@ -9674,7 +9976,6 @@ function polySimplify(poly, tolerance = 0.0001) {
|
|
|
9674
9976
|
p[j] = (0, simplify_1.simplify)(p[j], tolerance, true);
|
|
9675
9977
|
}
|
|
9676
9978
|
}
|
|
9677
|
-
exports.polySimplify = polySimplify;
|
|
9678
9979
|
|
|
9679
9980
|
|
|
9680
9981
|
/***/ }),
|
|
@@ -9702,15 +10003,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
9702
10003
|
}) : function(o, v) {
|
|
9703
10004
|
o["default"] = v;
|
|
9704
10005
|
});
|
|
9705
|
-
var __importStar = (this && this.__importStar) || function (
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
};
|
|
10006
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
10007
|
+
var ownKeys = function(o) {
|
|
10008
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
10009
|
+
var ar = [];
|
|
10010
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10011
|
+
return ar;
|
|
10012
|
+
};
|
|
10013
|
+
return ownKeys(o);
|
|
10014
|
+
};
|
|
10015
|
+
return function (mod) {
|
|
10016
|
+
if (mod && mod.__esModule) return mod;
|
|
10017
|
+
var result = {};
|
|
10018
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
10019
|
+
__setModuleDefault(result, mod);
|
|
10020
|
+
return result;
|
|
10021
|
+
};
|
|
10022
|
+
})();
|
|
9712
10023
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9713
|
-
exports.FsmQuadTree = exports.DefaultQuadOptions =
|
|
10024
|
+
exports.FsmQuadTree = exports.DefaultQuadOptions = void 0;
|
|
10025
|
+
exports.unionPolys = unionPolys;
|
|
9714
10026
|
// Public libraries
|
|
9715
10027
|
const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
|
|
9716
10028
|
// Shared libraries
|
|
@@ -9756,7 +10068,6 @@ function unionPolys(polys) {
|
|
|
9756
10068
|
let poly = cleanPolys.pop();
|
|
9757
10069
|
return PR.polyRound(_union(poly, ...cleanPolys));
|
|
9758
10070
|
}
|
|
9759
|
-
exports.unionPolys = unionPolys;
|
|
9760
10071
|
exports.DefaultQuadOptions = { maxLeafCount: 20, maxDepth: 20, tickStep: 1 };
|
|
9761
10072
|
;
|
|
9762
10073
|
// Use geo orientation for t/b (that is, t > b)
|
|
@@ -9938,15 +10249,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
9938
10249
|
}) : function(o, v) {
|
|
9939
10250
|
o["default"] = v;
|
|
9940
10251
|
});
|
|
9941
|
-
var __importStar = (this && this.__importStar) || function (
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
};
|
|
10252
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
10253
|
+
var ownKeys = function(o) {
|
|
10254
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
10255
|
+
var ar = [];
|
|
10256
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10257
|
+
return ar;
|
|
10258
|
+
};
|
|
10259
|
+
return ownKeys(o);
|
|
10260
|
+
};
|
|
10261
|
+
return function (mod) {
|
|
10262
|
+
if (mod && mod.__esModule) return mod;
|
|
10263
|
+
var result = {};
|
|
10264
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
10265
|
+
__setModuleDefault(result, mod);
|
|
10266
|
+
return result;
|
|
10267
|
+
};
|
|
10268
|
+
})();
|
|
9948
10269
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
9949
|
-
exports.selfIntersect =
|
|
10270
|
+
exports.selfIntersect = selfIntersect;
|
|
9950
10271
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
9951
10272
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
9952
10273
|
// Given three colinear points p, q, r, the function checks if
|
|
@@ -10021,7 +10342,6 @@ function selfIntersect(poly) {
|
|
|
10021
10342
|
});
|
|
10022
10343
|
return bIntersect;
|
|
10023
10344
|
}
|
|
10024
|
-
exports.selfIntersect = selfIntersect;
|
|
10025
10345
|
|
|
10026
10346
|
|
|
10027
10347
|
/***/ }),
|
|
@@ -10049,18 +10369,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
10049
10369
|
}) : function(o, v) {
|
|
10050
10370
|
o["default"] = v;
|
|
10051
10371
|
});
|
|
10052
|
-
var __importStar = (this && this.__importStar) || function (
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
};
|
|
10372
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
10373
|
+
var ownKeys = function(o) {
|
|
10374
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
10375
|
+
var ar = [];
|
|
10376
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10377
|
+
return ar;
|
|
10378
|
+
};
|
|
10379
|
+
return ownKeys(o);
|
|
10380
|
+
};
|
|
10381
|
+
return function (mod) {
|
|
10382
|
+
if (mod && mod.__esModule) return mod;
|
|
10383
|
+
var result = {};
|
|
10384
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
10385
|
+
__setModuleDefault(result, mod);
|
|
10386
|
+
return result;
|
|
10387
|
+
};
|
|
10388
|
+
})();
|
|
10059
10389
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10060
10390
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10061
10391
|
};
|
|
10062
10392
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10063
|
-
exports.selfIntersectFast =
|
|
10393
|
+
exports.selfIntersectFast = selfIntersectFast;
|
|
10064
10394
|
const P = __importStar(__webpack_require__(/*! ./poly */ "./lib/poly/poly.ts"));
|
|
10065
10395
|
const PP = __importStar(__webpack_require__(/*! ./polypack */ "./lib/poly/polypack.ts"));
|
|
10066
10396
|
// Adapted from rowanwins/shamos-hoey
|
|
@@ -10285,7 +10615,6 @@ function selfIntersectFast(poly) {
|
|
|
10285
10615
|
});
|
|
10286
10616
|
return runCheck(eventQueue);
|
|
10287
10617
|
}
|
|
10288
|
-
exports.selfIntersectFast = selfIntersectFast;
|
|
10289
10618
|
|
|
10290
10619
|
|
|
10291
10620
|
/***/ }),
|
|
@@ -10304,7 +10633,7 @@ exports.selfIntersectFast = selfIntersectFast;
|
|
|
10304
10633
|
mourner.github.io/simplify-js
|
|
10305
10634
|
*/
|
|
10306
10635
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10307
|
-
exports.simplify =
|
|
10636
|
+
exports.simplify = simplify;
|
|
10308
10637
|
// square distance between 2 points
|
|
10309
10638
|
function getSqDist(p1, p2) {
|
|
10310
10639
|
var dx = p1[0] - p2[0], dy = p1[1] - p2[1];
|
|
@@ -10377,7 +10706,6 @@ function simplify(points, tolerance = 1, highestQuality = false) {
|
|
|
10377
10706
|
points = simplifyDouglasPeucker(points, sqTolerance);
|
|
10378
10707
|
return points;
|
|
10379
10708
|
}
|
|
10380
|
-
exports.simplify = simplify;
|
|
10381
10709
|
|
|
10382
10710
|
|
|
10383
10711
|
/***/ }),
|
|
@@ -10405,15 +10733,36 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
10405
10733
|
}) : function(o, v) {
|
|
10406
10734
|
o["default"] = v;
|
|
10407
10735
|
});
|
|
10408
|
-
var __importStar = (this && this.__importStar) || function (
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
};
|
|
10736
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
10737
|
+
var ownKeys = function(o) {
|
|
10738
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
10739
|
+
var ar = [];
|
|
10740
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10741
|
+
return ar;
|
|
10742
|
+
};
|
|
10743
|
+
return ownKeys(o);
|
|
10744
|
+
};
|
|
10745
|
+
return function (mod) {
|
|
10746
|
+
if (mod && mod.__esModule) return mod;
|
|
10747
|
+
var result = {};
|
|
10748
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
10749
|
+
__setModuleDefault(result, mod);
|
|
10750
|
+
return result;
|
|
10751
|
+
};
|
|
10752
|
+
})();
|
|
10415
10753
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10416
|
-
exports.
|
|
10754
|
+
exports.FsmTopoUnion = void 0;
|
|
10755
|
+
exports.topoFromCollection = topoFromCollection;
|
|
10756
|
+
exports.topoContiguity = topoContiguity;
|
|
10757
|
+
exports.topoToFeature = topoToFeature;
|
|
10758
|
+
exports.topoSplice = topoSplice;
|
|
10759
|
+
exports.topoToCollection = topoToCollection;
|
|
10760
|
+
exports.topoSimplifyCollection = topoSimplifyCollection;
|
|
10761
|
+
exports.topoMerge = topoMerge;
|
|
10762
|
+
exports.topoMergeFeatures = topoMergeFeatures;
|
|
10763
|
+
exports.topoPacked = topoPacked;
|
|
10764
|
+
exports.topoPack = topoPack;
|
|
10765
|
+
exports.topoUnpack = topoUnpack;
|
|
10417
10766
|
// Forked version that supports packing
|
|
10418
10767
|
const TopoClient = __importStar(__webpack_require__(/*! @dra2020/topojson-client */ "@dra2020/topojson-client"));
|
|
10419
10768
|
// Forked version that fixes self-looping hole problem
|
|
@@ -10458,7 +10807,6 @@ function topoFromCollection(col) {
|
|
|
10458
10807
|
topo.datasets = col.datasets;
|
|
10459
10808
|
return topo;
|
|
10460
10809
|
}
|
|
10461
|
-
exports.topoFromCollection = topoFromCollection;
|
|
10462
10810
|
function ringsCancel(outerPoly, innerRing) {
|
|
10463
10811
|
if (outerPoly.length != 1)
|
|
10464
10812
|
return false;
|
|
@@ -10494,17 +10842,14 @@ function topoContiguity(topo) {
|
|
|
10494
10842
|
});
|
|
10495
10843
|
return result;
|
|
10496
10844
|
}
|
|
10497
|
-
exports.topoContiguity = topoContiguity;
|
|
10498
10845
|
function topoToFeature(topo, geoid) {
|
|
10499
10846
|
return correctGeometry(TopoClient.feature(topo, topo.objects[geoid]));
|
|
10500
10847
|
}
|
|
10501
|
-
exports.topoToFeature = topoToFeature;
|
|
10502
10848
|
function topoSplice(topoarray) {
|
|
10503
10849
|
if (topoarray)
|
|
10504
10850
|
topoarray.forEach(e => topoPack(e.topology));
|
|
10505
10851
|
return TopoClient.splice(topoarray);
|
|
10506
10852
|
}
|
|
10507
|
-
exports.topoSplice = topoSplice;
|
|
10508
10853
|
function topoToCollection(topo) {
|
|
10509
10854
|
let col = { type: 'FeatureCollection', features: [] };
|
|
10510
10855
|
if (topo)
|
|
@@ -10515,7 +10860,6 @@ function topoToCollection(topo) {
|
|
|
10515
10860
|
col.datasets = topo.datasets;
|
|
10516
10861
|
return col;
|
|
10517
10862
|
}
|
|
10518
|
-
exports.topoToCollection = topoToCollection;
|
|
10519
10863
|
function keepArcs(topo, arcs, keepweight) {
|
|
10520
10864
|
arcs.forEach((a) => {
|
|
10521
10865
|
if (Array.isArray(a))
|
|
@@ -10706,7 +11050,6 @@ function topoSimplifyCollection(col, options) {
|
|
|
10706
11050
|
log(options.log, `topoSimplifyCollection: total elapsed time: ${bigTimeString(elapsedTotal.ms())}`);
|
|
10707
11051
|
return col;
|
|
10708
11052
|
}
|
|
10709
|
-
exports.topoSimplifyCollection = topoSimplifyCollection;
|
|
10710
11053
|
function topoMerge(topo, geoids) {
|
|
10711
11054
|
if (geoids == null || geoids.length == 0)
|
|
10712
11055
|
return null;
|
|
@@ -10714,14 +11057,12 @@ function topoMerge(topo, geoids) {
|
|
|
10714
11057
|
geoids.forEach((geoid) => objects.push(topo.objects[geoid]));
|
|
10715
11058
|
return correctGeometry({ type: 'Feature', properties: {}, geometry: TopoClient.merge(topo, objects) });
|
|
10716
11059
|
}
|
|
10717
|
-
exports.topoMerge = topoMerge;
|
|
10718
11060
|
function topoMergeFeatures(topo, features) {
|
|
10719
11061
|
if (features == null || features.length == 0)
|
|
10720
11062
|
return null;
|
|
10721
11063
|
let prop = getGEOID(features);
|
|
10722
11064
|
return topoMerge(topo, features.map(f => f.properties[prop]));
|
|
10723
11065
|
}
|
|
10724
|
-
exports.topoMergeFeatures = topoMergeFeatures;
|
|
10725
11066
|
let UniqueState = FSM.FSM_CUSTOM1;
|
|
10726
11067
|
let FSM_COMPUTING = UniqueState++;
|
|
10727
11068
|
class FsmIncrementalUnion extends FSM.Fsm {
|
|
@@ -10829,20 +11170,17 @@ exports.FsmTopoUnion = FsmTopoUnion;
|
|
|
10829
11170
|
function topoPacked(topo) {
|
|
10830
11171
|
return topo.packed !== undefined;
|
|
10831
11172
|
}
|
|
10832
|
-
exports.topoPacked = topoPacked;
|
|
10833
11173
|
function topoPack(topo) {
|
|
10834
11174
|
let tc = TopoClient;
|
|
10835
11175
|
TopoClient.packArcs(topo);
|
|
10836
11176
|
TopoClient.packArcIndices(topo);
|
|
10837
11177
|
return topo;
|
|
10838
11178
|
}
|
|
10839
|
-
exports.topoPack = topoPack;
|
|
10840
11179
|
function topoUnpack(topo) {
|
|
10841
11180
|
TopoClient.unpackArcs(topo);
|
|
10842
11181
|
TopoClient.unpackArcIndices(topo);
|
|
10843
11182
|
return topo;
|
|
10844
11183
|
}
|
|
10845
|
-
exports.topoUnpack = topoUnpack;
|
|
10846
11184
|
|
|
10847
11185
|
|
|
10848
11186
|
/***/ }),
|
|
@@ -10870,15 +11208,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
10870
11208
|
}) : function(o, v) {
|
|
10871
11209
|
o["default"] = v;
|
|
10872
11210
|
});
|
|
10873
|
-
var __importStar = (this && this.__importStar) || function (
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
};
|
|
11211
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
11212
|
+
var ownKeys = function(o) {
|
|
11213
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
11214
|
+
var ar = [];
|
|
11215
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
11216
|
+
return ar;
|
|
11217
|
+
};
|
|
11218
|
+
return ownKeys(o);
|
|
11219
|
+
};
|
|
11220
|
+
return function (mod) {
|
|
11221
|
+
if (mod && mod.__esModule) return mod;
|
|
11222
|
+
var result = {};
|
|
11223
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
11224
|
+
__setModuleDefault(result, mod);
|
|
11225
|
+
return result;
|
|
11226
|
+
};
|
|
11227
|
+
})();
|
|
10880
11228
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10881
|
-
exports.FsmUnion =
|
|
11229
|
+
exports.FsmUnion = void 0;
|
|
11230
|
+
exports.polyIntersects = polyIntersects;
|
|
11231
|
+
exports.polyIntersectArea = polyIntersectArea;
|
|
11232
|
+
exports.polyDifference = polyDifference;
|
|
10882
11233
|
const PC = __importStar(__webpack_require__(/*! polygon-clipping */ "polygon-clipping"));
|
|
10883
11234
|
const Util = __importStar(__webpack_require__(/*! ../util/all */ "./lib/util/all.ts"));
|
|
10884
11235
|
const FSM = __importStar(__webpack_require__(/*! ../fsm/all */ "./lib/fsm/all.ts"));
|
|
@@ -10936,7 +11287,6 @@ function polyIntersects(p1, p2) {
|
|
|
10936
11287
|
});
|
|
10937
11288
|
return bIntersects;
|
|
10938
11289
|
}
|
|
10939
|
-
exports.polyIntersects = polyIntersects;
|
|
10940
11290
|
function polyIntersectArea(p1, p2) {
|
|
10941
11291
|
let pp1 = Poly.polyNormalize(p1);
|
|
10942
11292
|
let pp2 = Poly.polyNormalize(p2);
|
|
@@ -10952,7 +11302,6 @@ function polyIntersectArea(p1, p2) {
|
|
|
10952
11302
|
});
|
|
10953
11303
|
return area;
|
|
10954
11304
|
}
|
|
10955
|
-
exports.polyIntersectArea = polyIntersectArea;
|
|
10956
11305
|
function polyDifference(main, parts) {
|
|
10957
11306
|
main = PP.polyUnpack(coords(main));
|
|
10958
11307
|
// need to explode multipolygon so that "exploded" is a valid multipolygon input to underlying difference routine
|
|
@@ -10966,7 +11315,6 @@ function polyDifference(main, parts) {
|
|
|
10966
11315
|
});
|
|
10967
11316
|
return PR.polyRound(_difference(main, exploded));
|
|
10968
11317
|
}
|
|
10969
|
-
exports.polyDifference = polyDifference;
|
|
10970
11318
|
class FsmDifference extends FSM.Fsm {
|
|
10971
11319
|
constructor(env, accum, polys) {
|
|
10972
11320
|
super(env);
|
|
@@ -11253,15 +11601,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
11253
11601
|
}) : function(o, v) {
|
|
11254
11602
|
o["default"] = v;
|
|
11255
11603
|
});
|
|
11256
|
-
var __importStar = (this && this.__importStar) || function (
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
};
|
|
11604
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
11605
|
+
var ownKeys = function(o) {
|
|
11606
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
11607
|
+
var ar = [];
|
|
11608
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
11609
|
+
return ar;
|
|
11610
|
+
};
|
|
11611
|
+
return ownKeys(o);
|
|
11612
|
+
};
|
|
11613
|
+
return function (mod) {
|
|
11614
|
+
if (mod && mod.__esModule) return mod;
|
|
11615
|
+
var result = {};
|
|
11616
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
11617
|
+
__setModuleDefault(result, mod);
|
|
11618
|
+
return result;
|
|
11619
|
+
};
|
|
11620
|
+
})();
|
|
11263
11621
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11264
|
-
exports.BinTrieBuilder = exports.BinTrie =
|
|
11622
|
+
exports.BinTrieBuilder = exports.BinTrie = void 0;
|
|
11623
|
+
exports.s2u8 = s2u8;
|
|
11624
|
+
exports.u82s = u82s;
|
|
11265
11625
|
const U = __importStar(__webpack_require__(/*! ./util */ "./lib/util/util.ts"));
|
|
11266
11626
|
/*
|
|
11267
11627
|
-- For Node
|
|
@@ -11275,11 +11635,9 @@ const MaxKeyLength = 128;
|
|
|
11275
11635
|
function s2u8(coder, s) {
|
|
11276
11636
|
return coder.encoder.encode(s);
|
|
11277
11637
|
}
|
|
11278
|
-
exports.s2u8 = s2u8;
|
|
11279
11638
|
function u82s(coder, u8, offset, n) {
|
|
11280
11639
|
return coder.decoder.decode(u8.subarray(offset, offset + n));
|
|
11281
11640
|
}
|
|
11282
|
-
exports.u82s = u82s;
|
|
11283
11641
|
const NullFragment = { count: 0, used: 0, offset: 0, s: '' };
|
|
11284
11642
|
function sortBestPair(p1, p2) {
|
|
11285
11643
|
let d = (p1.f1.count + p1.f2.count) - (p2.f1.count + p2.f2.count);
|
|
@@ -11865,7 +12223,9 @@ exports.CountedHash = CountedHash;
|
|
|
11865
12223
|
|
|
11866
12224
|
|
|
11867
12225
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
11868
|
-
exports.
|
|
12226
|
+
exports.execGradient = execGradient;
|
|
12227
|
+
exports.parseGradient = parseGradient;
|
|
12228
|
+
exports.asCSSGradient = asCSSGradient;
|
|
11869
12229
|
function parseStops(stops) {
|
|
11870
12230
|
if (stops[0].rgb)
|
|
11871
12231
|
return;
|
|
@@ -11902,7 +12262,6 @@ function execGradient(stops, value) {
|
|
|
11902
12262
|
}
|
|
11903
12263
|
return toHexColor(r, g, b);
|
|
11904
12264
|
}
|
|
11905
|
-
exports.execGradient = execGradient;
|
|
11906
12265
|
function parseGradient(sStops) {
|
|
11907
12266
|
let stops = [];
|
|
11908
12267
|
let re = / ?([^ ]+) ([^ ,]+%?),?(.*)/;
|
|
@@ -11929,7 +12288,6 @@ function parseGradient(sStops) {
|
|
|
11929
12288
|
}
|
|
11930
12289
|
return stops;
|
|
11931
12290
|
}
|
|
11932
|
-
exports.parseGradient = parseGradient;
|
|
11933
12291
|
function asCSSGradient(stops) {
|
|
11934
12292
|
parseStops(stops);
|
|
11935
12293
|
let a = [];
|
|
@@ -11939,7 +12297,6 @@ function asCSSGradient(stops) {
|
|
|
11939
12297
|
});
|
|
11940
12298
|
return `linear-gradient(to right, ${a.join(', ')})`;
|
|
11941
12299
|
}
|
|
11942
|
-
exports.asCSSGradient = asCSSGradient;
|
|
11943
12300
|
|
|
11944
12301
|
|
|
11945
12302
|
/***/ }),
|
|
@@ -12021,9 +12378,46 @@ exports.IndexedArray = IndexedArray;
|
|
|
12021
12378
|
|
|
12022
12379
|
|
|
12023
12380
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12024
|
-
exports.
|
|
12025
|
-
function Now() { return (new Date()).toJSON(); }
|
|
12381
|
+
exports.Deadline = exports.MultiTimer = exports.Elapsed = void 0;
|
|
12026
12382
|
exports.Now = Now;
|
|
12383
|
+
exports.createGuid = createGuid;
|
|
12384
|
+
exports.isGuid = isGuid;
|
|
12385
|
+
exports.createKeyedGuid = createKeyedGuid;
|
|
12386
|
+
exports.guidKey = guidKey;
|
|
12387
|
+
exports.sizeof = sizeof;
|
|
12388
|
+
exports.depthof = depthof;
|
|
12389
|
+
exports.isEmpty = isEmpty;
|
|
12390
|
+
exports.countKeys = countKeys;
|
|
12391
|
+
exports.nthProperty = nthProperty;
|
|
12392
|
+
exports.nthKey = nthKey;
|
|
12393
|
+
exports.partialEqual = partialEqual;
|
|
12394
|
+
exports.deepEqual = deepEqual;
|
|
12395
|
+
exports.prettyDate = prettyDate;
|
|
12396
|
+
exports.relativeDate = relativeDate;
|
|
12397
|
+
exports.recentDate = recentDate;
|
|
12398
|
+
exports.textToHtml = textToHtml;
|
|
12399
|
+
exports.shallowCopy = shallowCopy;
|
|
12400
|
+
exports.shallowAssign = shallowAssign;
|
|
12401
|
+
exports.shallowDelete = shallowDelete;
|
|
12402
|
+
exports.shallowAssignImmutable = shallowAssignImmutable;
|
|
12403
|
+
exports.shallowEqual = shallowEqual;
|
|
12404
|
+
exports.deepCopy = deepCopy;
|
|
12405
|
+
exports.deepAccum = deepAccum;
|
|
12406
|
+
exports.precisionRound = precisionRound;
|
|
12407
|
+
exports.percentString = percentString;
|
|
12408
|
+
exports.hash = hash;
|
|
12409
|
+
exports.hashObject = hashObject;
|
|
12410
|
+
exports.toHex = toHex;
|
|
12411
|
+
exports.toRGBA = toRGBA;
|
|
12412
|
+
exports.toRGBAIntensity = toRGBAIntensity;
|
|
12413
|
+
exports.distance = distance;
|
|
12414
|
+
exports.deg2rad = deg2rad;
|
|
12415
|
+
exports.rad2deg = rad2deg;
|
|
12416
|
+
exports.wrapLon = wrapLon;
|
|
12417
|
+
exports.isNumber = isNumber;
|
|
12418
|
+
exports.toNumber = toNumber;
|
|
12419
|
+
exports.toSafeNumber = toSafeNumber;
|
|
12420
|
+
function Now() { return (new Date()).toJSON(); }
|
|
12027
12421
|
// polyfill
|
|
12028
12422
|
let hrtime = global && global.process && global.process.hrtime ? global.process.hrtime : null;
|
|
12029
12423
|
class Elapsed {
|
|
@@ -12119,23 +12513,19 @@ function createGuid() {
|
|
|
12119
12513
|
return v.toString(16);
|
|
12120
12514
|
});
|
|
12121
12515
|
}
|
|
12122
|
-
exports.createGuid = createGuid;
|
|
12123
12516
|
const reGuid = /.*-.*-.*-.*-/;
|
|
12124
12517
|
function isGuid(s) {
|
|
12125
12518
|
return reGuid.test(s) && s.length >= 36;
|
|
12126
12519
|
}
|
|
12127
|
-
exports.isGuid = isGuid;
|
|
12128
12520
|
function createKeyedGuid(key) {
|
|
12129
12521
|
return `xxxxxxxx-xxxx-${key}xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g, function (c) {
|
|
12130
12522
|
var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
12131
12523
|
return v.toString(16);
|
|
12132
12524
|
});
|
|
12133
12525
|
}
|
|
12134
|
-
exports.createKeyedGuid = createKeyedGuid;
|
|
12135
12526
|
function guidKey(guid) {
|
|
12136
12527
|
return guid.substr(14, 1); // See above
|
|
12137
12528
|
}
|
|
12138
|
-
exports.guidKey = guidKey;
|
|
12139
12529
|
function _sizeof(a, loops) {
|
|
12140
12530
|
if (a === null || a === undefined)
|
|
12141
12531
|
return 0;
|
|
@@ -12178,7 +12568,6 @@ function sizeof(a) {
|
|
|
12178
12568
|
let n = _sizeof(a, loops);
|
|
12179
12569
|
return n;
|
|
12180
12570
|
}
|
|
12181
|
-
exports.sizeof = sizeof;
|
|
12182
12571
|
function depthof(a) {
|
|
12183
12572
|
if (a === null || a === undefined)
|
|
12184
12573
|
return 1;
|
|
@@ -12205,7 +12594,6 @@ function depthof(a) {
|
|
|
12205
12594
|
}
|
|
12206
12595
|
}
|
|
12207
12596
|
}
|
|
12208
|
-
exports.depthof = depthof;
|
|
12209
12597
|
function isEmpty(o) {
|
|
12210
12598
|
if (o === null || o === undefined)
|
|
12211
12599
|
return true;
|
|
@@ -12214,7 +12602,6 @@ function isEmpty(o) {
|
|
|
12214
12602
|
return false;
|
|
12215
12603
|
return true;
|
|
12216
12604
|
}
|
|
12217
|
-
exports.isEmpty = isEmpty;
|
|
12218
12605
|
function countKeys(o) {
|
|
12219
12606
|
if (o === undefined || typeof o !== 'object')
|
|
12220
12607
|
return -1;
|
|
@@ -12224,7 +12611,6 @@ function countKeys(o) {
|
|
|
12224
12611
|
count++;
|
|
12225
12612
|
return count;
|
|
12226
12613
|
}
|
|
12227
|
-
exports.countKeys = countKeys;
|
|
12228
12614
|
function nthProperty(o, n = 0) {
|
|
12229
12615
|
for (let p in o)
|
|
12230
12616
|
if (o.hasOwnProperty(p)) {
|
|
@@ -12234,7 +12620,6 @@ function nthProperty(o, n = 0) {
|
|
|
12234
12620
|
}
|
|
12235
12621
|
return undefined;
|
|
12236
12622
|
}
|
|
12237
|
-
exports.nthProperty = nthProperty;
|
|
12238
12623
|
function nthKey(o, n = 0) {
|
|
12239
12624
|
for (let p in o)
|
|
12240
12625
|
if (o.hasOwnProperty(p)) {
|
|
@@ -12244,7 +12629,6 @@ function nthKey(o, n = 0) {
|
|
|
12244
12629
|
}
|
|
12245
12630
|
return undefined;
|
|
12246
12631
|
}
|
|
12247
|
-
exports.nthKey = nthKey;
|
|
12248
12632
|
function partialEqual(o, subset) {
|
|
12249
12633
|
for (let p in subset)
|
|
12250
12634
|
if (subset.hasOwnProperty(p))
|
|
@@ -12252,7 +12636,6 @@ function partialEqual(o, subset) {
|
|
|
12252
12636
|
return false;
|
|
12253
12637
|
return true;
|
|
12254
12638
|
}
|
|
12255
|
-
exports.partialEqual = partialEqual;
|
|
12256
12639
|
function exactEqual(o1, o2, options) {
|
|
12257
12640
|
if (o1 === o2)
|
|
12258
12641
|
return true;
|
|
@@ -12312,7 +12695,6 @@ function deepEqual(o1, o2, options) {
|
|
|
12312
12695
|
}
|
|
12313
12696
|
return true;
|
|
12314
12697
|
}
|
|
12315
|
-
exports.deepEqual = deepEqual;
|
|
12316
12698
|
const Months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
12317
12699
|
function prettyDate(d) {
|
|
12318
12700
|
if (d == null)
|
|
@@ -12328,7 +12710,6 @@ function prettyDate(d) {
|
|
|
12328
12710
|
hh -= 12;
|
|
12329
12711
|
return `${mmm} ${dd}, ${yyyy} at ${hh}:${mm} ${ampm}`;
|
|
12330
12712
|
}
|
|
12331
|
-
exports.prettyDate = prettyDate;
|
|
12332
12713
|
function relativeDate(d) {
|
|
12333
12714
|
if (d == null)
|
|
12334
12715
|
return 'unknown';
|
|
@@ -12352,7 +12733,6 @@ function relativeDate(d) {
|
|
|
12352
12733
|
else
|
|
12353
12734
|
return `${mmm} ${dd}, ${yyyy}`;
|
|
12354
12735
|
}
|
|
12355
|
-
exports.relativeDate = relativeDate;
|
|
12356
12736
|
const OneMinute = 1000 * 60;
|
|
12357
12737
|
const OneHour = OneMinute * 60;
|
|
12358
12738
|
const OneDay = OneHour * 24;
|
|
@@ -12373,7 +12753,6 @@ function recentDate(d) {
|
|
|
12373
12753
|
else
|
|
12374
12754
|
return relativeDate(d);
|
|
12375
12755
|
}
|
|
12376
|
-
exports.recentDate = recentDate;
|
|
12377
12756
|
function textToHtml(sText) {
|
|
12378
12757
|
let lines = sText.split('\n');
|
|
12379
12758
|
let aHtml = [];
|
|
@@ -12407,7 +12786,6 @@ function textToHtml(sText) {
|
|
|
12407
12786
|
aHtml.push('</body>');
|
|
12408
12787
|
return aHtml.join('');
|
|
12409
12788
|
}
|
|
12410
|
-
exports.textToHtml = textToHtml;
|
|
12411
12789
|
function shallowCopy(src) {
|
|
12412
12790
|
if (src === null || src === undefined)
|
|
12413
12791
|
return src;
|
|
@@ -12431,7 +12809,6 @@ function shallowCopy(src) {
|
|
|
12431
12809
|
}
|
|
12432
12810
|
}
|
|
12433
12811
|
}
|
|
12434
|
-
exports.shallowCopy = shallowCopy;
|
|
12435
12812
|
function shallowAssign(o1, o2) {
|
|
12436
12813
|
if (o1 === null || o1 === undefined)
|
|
12437
12814
|
o1 = {};
|
|
@@ -12444,7 +12821,6 @@ function shallowAssign(o1, o2) {
|
|
|
12444
12821
|
o1[p] = o2[p];
|
|
12445
12822
|
return o1;
|
|
12446
12823
|
}
|
|
12447
|
-
exports.shallowAssign = shallowAssign;
|
|
12448
12824
|
function shallowDelete(o1, o2) {
|
|
12449
12825
|
if (o1 == null || o2 == null)
|
|
12450
12826
|
return o1;
|
|
@@ -12455,7 +12831,6 @@ function shallowDelete(o1, o2) {
|
|
|
12455
12831
|
delete o1[p];
|
|
12456
12832
|
return o1;
|
|
12457
12833
|
}
|
|
12458
|
-
exports.shallowDelete = shallowDelete;
|
|
12459
12834
|
function shallowAssignImmutable(o1, o2) {
|
|
12460
12835
|
if (o1 === null || o1 === undefined)
|
|
12461
12836
|
o1 = {};
|
|
@@ -12476,7 +12851,6 @@ function shallowAssignImmutable(o1, o2) {
|
|
|
12476
12851
|
shallowAssign(oNew, o2);
|
|
12477
12852
|
return oNew;
|
|
12478
12853
|
}
|
|
12479
|
-
exports.shallowAssignImmutable = shallowAssignImmutable;
|
|
12480
12854
|
function shallowEqual(o1, o2) {
|
|
12481
12855
|
if (o1 === undefined || o2 === undefined || typeof o1 !== 'object' || typeof o2 !== 'object')
|
|
12482
12856
|
return o1 === o2;
|
|
@@ -12501,7 +12875,6 @@ function shallowEqual(o1, o2) {
|
|
|
12501
12875
|
return true;
|
|
12502
12876
|
}
|
|
12503
12877
|
}
|
|
12504
|
-
exports.shallowEqual = shallowEqual;
|
|
12505
12878
|
function deepCopy(src) {
|
|
12506
12879
|
// Beware typeof oddities
|
|
12507
12880
|
if (src === null || src === undefined)
|
|
@@ -12526,7 +12899,6 @@ function deepCopy(src) {
|
|
|
12526
12899
|
else
|
|
12527
12900
|
return src;
|
|
12528
12901
|
}
|
|
12529
|
-
exports.deepCopy = deepCopy;
|
|
12530
12902
|
function deepAccum(accum, o) {
|
|
12531
12903
|
if (accum == null)
|
|
12532
12904
|
accum = {};
|
|
@@ -12561,19 +12933,16 @@ function deepAccum(accum, o) {
|
|
|
12561
12933
|
}
|
|
12562
12934
|
return accum;
|
|
12563
12935
|
}
|
|
12564
|
-
exports.deepAccum = deepAccum;
|
|
12565
12936
|
function precisionRound(n, p) {
|
|
12566
12937
|
let f = Math.pow(10, p);
|
|
12567
12938
|
return Math.round(n * f) / f;
|
|
12568
12939
|
}
|
|
12569
|
-
exports.precisionRound = precisionRound;
|
|
12570
12940
|
function percentString(num, den, precision = 0) {
|
|
12571
12941
|
if (den == 0)
|
|
12572
12942
|
return '(-)';
|
|
12573
12943
|
let p = precisionRound((num / den) * 100, precision);
|
|
12574
12944
|
return String(p) + '%';
|
|
12575
12945
|
}
|
|
12576
|
-
exports.percentString = percentString;
|
|
12577
12946
|
function hash(s) {
|
|
12578
12947
|
let hash = 5381;
|
|
12579
12948
|
let i = s.length;
|
|
@@ -12584,11 +12953,9 @@ function hash(s) {
|
|
|
12584
12953
|
* signed int to an unsigned by doing an unsigned bitshift. */
|
|
12585
12954
|
return hash >>> 0;
|
|
12586
12955
|
}
|
|
12587
|
-
exports.hash = hash;
|
|
12588
12956
|
function hashObject(o) {
|
|
12589
12957
|
return hash(o ? JSON.stringify(o) : '');
|
|
12590
12958
|
}
|
|
12591
|
-
exports.hashObject = hashObject;
|
|
12592
12959
|
const HexTable = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
|
|
12593
12960
|
function toHex(n) {
|
|
12594
12961
|
if (n < 0 || n > 255)
|
|
@@ -12596,7 +12963,6 @@ function toHex(n) {
|
|
|
12596
12963
|
n = Math.floor(n);
|
|
12597
12964
|
return HexTable[n >> 4] + HexTable[n & 15];
|
|
12598
12965
|
}
|
|
12599
|
-
exports.toHex = toHex;
|
|
12600
12966
|
function toRGBA(color, alpha) {
|
|
12601
12967
|
// Allow passing rgba in rather than only '#ffffff' form
|
|
12602
12968
|
if (color.indexOf('rgba') === 0)
|
|
@@ -12623,31 +12989,24 @@ function toRGBA(color, alpha) {
|
|
|
12623
12989
|
}
|
|
12624
12990
|
return `rgba(${String(r)}, ${String(g)}, ${String(b)}, ${String(alpha)})`;
|
|
12625
12991
|
}
|
|
12626
|
-
exports.toRGBA = toRGBA;
|
|
12627
12992
|
function toRGBAIntensity(color, intensity, alpha) {
|
|
12628
12993
|
// for now assume color is black
|
|
12629
12994
|
let g = precisionRound(255 * intensity, 0);
|
|
12630
12995
|
return `rgba(${String(g)}, ${String(g)}, ${String(g)}, ${String(alpha)})`;
|
|
12631
12996
|
}
|
|
12632
|
-
exports.toRGBAIntensity = toRGBAIntensity;
|
|
12633
12997
|
// Geo functions
|
|
12634
12998
|
function distance(x0, y0, x1, y1) {
|
|
12635
12999
|
return Math.hypot(x0 - x1, y0 - y1);
|
|
12636
13000
|
}
|
|
12637
|
-
exports.distance = distance;
|
|
12638
13001
|
function deg2rad(num) { return num * Math.PI / 180; }
|
|
12639
|
-
exports.deg2rad = deg2rad;
|
|
12640
13002
|
function rad2deg(num) { return num / Math.PI * 180; }
|
|
12641
|
-
exports.rad2deg = rad2deg;
|
|
12642
13003
|
// Restricts lon to range [-180..180]
|
|
12643
13004
|
function wrapLon(lon) {
|
|
12644
13005
|
let worlds = Math.floor((lon + 180) / 360);
|
|
12645
13006
|
return lon - (worlds * 360);
|
|
12646
13007
|
}
|
|
12647
|
-
exports.wrapLon = wrapLon;
|
|
12648
13008
|
let reNumber = /^\s*-?\d+(\.\d+)?([eE][+-]?\d+)?\s*$/;
|
|
12649
13009
|
function isNumber(s) { return !!s && reNumber.test(s); }
|
|
12650
|
-
exports.isNumber = isNumber;
|
|
12651
13010
|
function toNumber(a) {
|
|
12652
13011
|
if (typeof a === 'number')
|
|
12653
13012
|
return a;
|
|
@@ -12655,12 +13014,10 @@ function toNumber(a) {
|
|
|
12655
13014
|
return NaN;
|
|
12656
13015
|
return Number(a);
|
|
12657
13016
|
}
|
|
12658
|
-
exports.toNumber = toNumber;
|
|
12659
13017
|
function toSafeNumber(a) {
|
|
12660
13018
|
let n = toNumber(a);
|
|
12661
13019
|
return (isNaN(n) || typeof n !== 'number') ? 0 : n;
|
|
12662
13020
|
}
|
|
12663
|
-
exports.toSafeNumber = toSafeNumber;
|
|
12664
13021
|
|
|
12665
13022
|
|
|
12666
13023
|
/***/ }),
|