geo-polygonize 0.34.0 → 0.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -18
- package/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/index_slim.d.ts +1 -1
- package/dist/slim/cjs/index_slim.js +19 -850
- package/dist/slim/es/index_slim.d.ts +1 -1
- package/dist/slim/es/index_slim.js +11 -842
- package/dist/slim/pkg-scalar/geo_polygonize.d.ts +119 -0
- package/dist/slim/pkg-scalar/geo_polygonize_bg.wasm.d.ts +37 -0
- package/dist/slim/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/slim/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/slim/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/slim/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/slim/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/slim/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/slim/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/dist/standard/cjs/index.js +3 -3
- package/dist/standard/cjs/index_slim.d.ts +1 -1
- package/dist/standard/es/index.js +3 -3
- package/dist/standard/es/index_slim.d.ts +1 -1
- package/dist/standard/pkg-scalar/geo_polygonize.d.ts +119 -0
- package/dist/standard/pkg-scalar/geo_polygonize_bg.wasm.d.ts +37 -0
- package/dist/standard/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/standard/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/standard/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/standard/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/standard/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/standard/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/standard/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/dist/threads/es/index.js +1 -1
- package/dist/threads/es/index_slim.d.ts +1 -1
- package/dist/threads/pkg-threads/geo_polygonize.d.ts +139 -0
- package/dist/threads/pkg-threads/geo_polygonize_bg.wasm.d.ts +44 -0
- package/dist/threads/pkg-wrapper/bindings/ContainmentOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/DedupPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/DeterminismOptions.d.ts +5 -0
- package/dist/threads/pkg-wrapper/bindings/DiagnosticsOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/IndexBackend.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/NodingBackend.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/NodingOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/PolygonizerOptions.d.ts +92 -0
- package/dist/threads/pkg-wrapper/bindings/ProvenanceOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/SnapMode.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/SnapStrategy.d.ts +25 -0
- package/dist/threads/pkg-wrapper/bindings/TargetProfile.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/TileOwnershipPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/TilingOptions.d.ts +6 -0
- package/dist/threads/pkg-wrapper/bindings/TouchPolicy.d.ts +1 -0
- package/dist/threads/pkg-wrapper/bindings/ZOptions.d.ts +4 -0
- package/dist/threads/pkg-wrapper/bindings/ZPolicy.d.ts +5 -0
- package/package.json +1 -1
|
@@ -3,837 +3,6 @@
|
|
|
3
3
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
4
4
|
/* @ts-self-types="./geo_polygonize.d.ts" */
|
|
5
5
|
|
|
6
|
-
let PolygonizerWasmError$1 = class PolygonizerWasmError {
|
|
7
|
-
static __wrap(ptr) {
|
|
8
|
-
ptr = ptr >>> 0;
|
|
9
|
-
const obj = Object.create(PolygonizerWasmError.prototype);
|
|
10
|
-
obj.__wbg_ptr = ptr;
|
|
11
|
-
PolygonizerWasmErrorFinalization$1.register(obj, obj.__wbg_ptr, obj);
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
__destroy_into_raw() {
|
|
15
|
-
const ptr = this.__wbg_ptr;
|
|
16
|
-
this.__wbg_ptr = 0;
|
|
17
|
-
PolygonizerWasmErrorFinalization$1.unregister(this);
|
|
18
|
-
return ptr;
|
|
19
|
-
}
|
|
20
|
-
free() {
|
|
21
|
-
const ptr = this.__destroy_into_raw();
|
|
22
|
-
wasm$1.__wbg_polygonizerwasmerror_free(ptr, 0);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @returns {string}
|
|
26
|
-
*/
|
|
27
|
-
get message() {
|
|
28
|
-
let deferred1_0;
|
|
29
|
-
let deferred1_1;
|
|
30
|
-
try {
|
|
31
|
-
const ret = wasm$1.polygonizerwasmerror_message(this.__wbg_ptr);
|
|
32
|
-
deferred1_0 = ret[0];
|
|
33
|
-
deferred1_1 = ret[1];
|
|
34
|
-
return getStringFromWasm0$1(ret[0], ret[1]);
|
|
35
|
-
} finally {
|
|
36
|
-
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @returns {string}
|
|
41
|
-
*/
|
|
42
|
-
get name() {
|
|
43
|
-
let deferred1_0;
|
|
44
|
-
let deferred1_1;
|
|
45
|
-
try {
|
|
46
|
-
const ret = wasm$1.polygonizerwasmerror_name(this.__wbg_ptr);
|
|
47
|
-
deferred1_0 = ret[0];
|
|
48
|
-
deferred1_1 = ret[1];
|
|
49
|
-
return getStringFromWasm0$1(ret[0], ret[1]);
|
|
50
|
-
} finally {
|
|
51
|
-
wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* @param {string} name
|
|
56
|
-
* @param {string} message
|
|
57
|
-
*/
|
|
58
|
-
constructor(name, message) {
|
|
59
|
-
const ptr0 = passStringToWasm0$1(name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
60
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
61
|
-
const ptr1 = passStringToWasm0$1(message, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
62
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
63
|
-
const ret = wasm$1.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
|
|
64
|
-
this.__wbg_ptr = ret >>> 0;
|
|
65
|
-
PolygonizerWasmErrorFinalization$1.register(this, this.__wbg_ptr, this);
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
if (Symbol.dispose) PolygonizerWasmError$1.prototype[Symbol.dispose] = PolygonizerWasmError$1.prototype.free;
|
|
70
|
-
|
|
71
|
-
let WasmPolygonResult$1 = class WasmPolygonResult {
|
|
72
|
-
static __wrap(ptr) {
|
|
73
|
-
ptr = ptr >>> 0;
|
|
74
|
-
const obj = Object.create(WasmPolygonResult.prototype);
|
|
75
|
-
obj.__wbg_ptr = ptr;
|
|
76
|
-
WasmPolygonResultFinalization$1.register(obj, obj.__wbg_ptr, obj);
|
|
77
|
-
return obj;
|
|
78
|
-
}
|
|
79
|
-
__destroy_into_raw() {
|
|
80
|
-
const ptr = this.__wbg_ptr;
|
|
81
|
-
this.__wbg_ptr = 0;
|
|
82
|
-
WasmPolygonResultFinalization$1.unregister(this);
|
|
83
|
-
return ptr;
|
|
84
|
-
}
|
|
85
|
-
free() {
|
|
86
|
-
const ptr = this.__destroy_into_raw();
|
|
87
|
-
wasm$1.__wbg_wasmpolygonresult_free(ptr, 0);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* @returns {number}
|
|
91
|
-
*/
|
|
92
|
-
coords_len() {
|
|
93
|
-
const ret = wasm$1.wasmpolygonresult_coords_len(this.__wbg_ptr);
|
|
94
|
-
return ret >>> 0;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* @returns {number}
|
|
98
|
-
*/
|
|
99
|
-
coords_ptr() {
|
|
100
|
-
const ret = wasm$1.wasmpolygonresult_coords_ptr(this.__wbg_ptr);
|
|
101
|
-
return ret >>> 0;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* @returns {any}
|
|
105
|
-
*/
|
|
106
|
-
get cut_edges() {
|
|
107
|
-
const ret = wasm$1.wasmpolygonresult_cut_edges(this.__wbg_ptr);
|
|
108
|
-
return ret;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @returns {any}
|
|
112
|
-
*/
|
|
113
|
-
get dangles() {
|
|
114
|
-
const ret = wasm$1.wasmpolygonresult_dangles(this.__wbg_ptr);
|
|
115
|
-
return ret;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @returns {any}
|
|
119
|
-
*/
|
|
120
|
-
get diagnostics() {
|
|
121
|
-
const ret = wasm$1.wasmpolygonresult_diagnostics(this.__wbg_ptr);
|
|
122
|
-
return ret;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* @returns {number}
|
|
126
|
-
*/
|
|
127
|
-
flat_line_ids_len() {
|
|
128
|
-
const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
|
|
129
|
-
return ret >>> 0;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @returns {number}
|
|
133
|
-
*/
|
|
134
|
-
flat_line_ids_ptr() {
|
|
135
|
-
const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
|
|
136
|
-
return ret >>> 0;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @returns {any}
|
|
140
|
-
*/
|
|
141
|
-
get invalid_rings() {
|
|
142
|
-
const ret = wasm$1.wasmpolygonresult_invalid_rings(this.__wbg_ptr);
|
|
143
|
-
return ret;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @returns {number}
|
|
147
|
-
*/
|
|
148
|
-
polygon_offsets_len() {
|
|
149
|
-
const ret = wasm$1.wasmpolygonresult_polygon_offsets_len(this.__wbg_ptr);
|
|
150
|
-
return ret >>> 0;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* @returns {number}
|
|
154
|
-
*/
|
|
155
|
-
polygon_offsets_ptr() {
|
|
156
|
-
const ret = wasm$1.wasmpolygonresult_polygon_offsets_ptr(this.__wbg_ptr);
|
|
157
|
-
return ret >>> 0;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* @returns {any}
|
|
161
|
-
*/
|
|
162
|
-
get provenance() {
|
|
163
|
-
const ret = wasm$1.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
164
|
-
return ret;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* @returns {number}
|
|
168
|
-
*/
|
|
169
|
-
ring_offsets_len() {
|
|
170
|
-
const ret = wasm$1.wasmpolygonresult_ring_offsets_len(this.__wbg_ptr);
|
|
171
|
-
return ret >>> 0;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* @returns {number}
|
|
175
|
-
*/
|
|
176
|
-
ring_offsets_ptr() {
|
|
177
|
-
const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
|
|
178
|
-
return ret >>> 0;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* @returns {number}
|
|
182
|
-
*/
|
|
183
|
-
stride() {
|
|
184
|
-
const ret = wasm$1.wasmpolygonresult_stride(this.__wbg_ptr);
|
|
185
|
-
return ret;
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
if (Symbol.dispose) WasmPolygonResult$1.prototype[Symbol.dispose] = WasmPolygonResult$1.prototype.free;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* @param {string} geojson_str
|
|
192
|
-
* @param {boolean | null} [node_input]
|
|
193
|
-
* @param {number | null} [snap_grid_size]
|
|
194
|
-
* @param {boolean | null} [extract_only_polygonal]
|
|
195
|
-
* @param {boolean | null} [report_mode]
|
|
196
|
-
* @returns {string}
|
|
197
|
-
*/
|
|
198
|
-
function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_polygonal, report_mode) {
|
|
199
|
-
let deferred3_0;
|
|
200
|
-
let deferred3_1;
|
|
201
|
-
try {
|
|
202
|
-
const ptr0 = passStringToWasm0$1(geojson_str, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
203
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
204
|
-
const ret = wasm$1.polygonize(ptr0, len0, isLikeNone$1(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone$1(snap_grid_size), isLikeNone$1(snap_grid_size) ? 0 : snap_grid_size, isLikeNone$1(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0, isLikeNone$1(report_mode) ? 0xFFFFFF : report_mode ? 1 : 0);
|
|
205
|
-
var ptr2 = ret[0];
|
|
206
|
-
var len2 = ret[1];
|
|
207
|
-
if (ret[3]) {
|
|
208
|
-
ptr2 = 0; len2 = 0;
|
|
209
|
-
throw takeFromExternrefTable0$1(ret[2]);
|
|
210
|
-
}
|
|
211
|
-
deferred3_0 = ptr2;
|
|
212
|
-
deferred3_1 = len2;
|
|
213
|
-
return getStringFromWasm0$1(ptr2, len2);
|
|
214
|
-
} finally {
|
|
215
|
-
wasm$1.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Polygonizes an Arrow IPC stream containing a GeoArrow LineString array.
|
|
221
|
-
*
|
|
222
|
-
* This zero-copy path avoids JSON serialization overhead and returns a binary
|
|
223
|
-
* Arrow IPC stream containing a GeoArrow Polygon array. Requires the options
|
|
224
|
-
* to be passed as a parsed JS object.
|
|
225
|
-
* @param {Uint8Array} ipc_bytes
|
|
226
|
-
* @param {any} options_val
|
|
227
|
-
* @returns {Uint8Array}
|
|
228
|
-
*/
|
|
229
|
-
function polygonizeGeoArrowWithOptions$1(ipc_bytes, options_val) {
|
|
230
|
-
const ptr0 = passArray8ToWasm0$1(ipc_bytes, wasm$1.__wbindgen_malloc);
|
|
231
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
232
|
-
const ret = wasm$1.polygonizeGeoArrowWithOptions(ptr0, len0, options_val);
|
|
233
|
-
if (ret[3]) {
|
|
234
|
-
throw takeFromExternrefTable0$1(ret[2]);
|
|
235
|
-
}
|
|
236
|
-
var v2 = getArrayU8FromWasm0$1(ret[0], ret[1]).slice();
|
|
237
|
-
wasm$1.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
238
|
-
return v2;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Polygonizes a GeoJSON FeatureCollection using the canonical `PolygonizerOptions`.
|
|
243
|
-
*
|
|
244
|
-
* This is the primary entry point for JavaScript users. It accepts a JSON string
|
|
245
|
-
* of options and returns a JSON string representing the result, including faces,
|
|
246
|
-
* dangles, cut-lines, and (optionally) provenance/diagnostics.
|
|
247
|
-
* @param {string} geojson_str
|
|
248
|
-
* @param {any} options_val
|
|
249
|
-
* @returns {string}
|
|
250
|
-
*/
|
|
251
|
-
function polygonizeWithOptions$1(geojson_str, options_val) {
|
|
252
|
-
let deferred3_0;
|
|
253
|
-
let deferred3_1;
|
|
254
|
-
try {
|
|
255
|
-
const ptr0 = passStringToWasm0$1(geojson_str, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
256
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
257
|
-
const ret = wasm$1.polygonizeWithOptions(ptr0, len0, options_val);
|
|
258
|
-
var ptr2 = ret[0];
|
|
259
|
-
var len2 = ret[1];
|
|
260
|
-
if (ret[3]) {
|
|
261
|
-
ptr2 = 0; len2 = 0;
|
|
262
|
-
throw takeFromExternrefTable0$1(ret[2]);
|
|
263
|
-
}
|
|
264
|
-
deferred3_0 = ptr2;
|
|
265
|
-
deferred3_1 = len2;
|
|
266
|
-
return getStringFromWasm0$1(ptr2, len2);
|
|
267
|
-
} finally {
|
|
268
|
-
wasm$1.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @param {Float64Array} coords
|
|
274
|
-
* @param {Uint32Array} offsets
|
|
275
|
-
* @param {number} stride
|
|
276
|
-
* @param {any} options_val
|
|
277
|
-
* @param {Uint32Array | null} [line_ids]
|
|
278
|
-
* @returns {WasmPolygonResult}
|
|
279
|
-
*/
|
|
280
|
-
function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val, line_ids) {
|
|
281
|
-
const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
|
|
282
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
283
|
-
const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
|
|
284
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
285
|
-
var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
|
|
286
|
-
var len2 = WASM_VECTOR_LEN$1;
|
|
287
|
-
const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
|
|
288
|
-
if (ret[2]) {
|
|
289
|
-
throw takeFromExternrefTable0$1(ret[1]);
|
|
290
|
-
}
|
|
291
|
-
return WasmPolygonResult$1.__wrap(ret[0]);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @param {Float64Array} coords
|
|
296
|
-
* @param {Uint32Array} offsets
|
|
297
|
-
* @param {number} stride
|
|
298
|
-
* @param {boolean} node_input
|
|
299
|
-
* @param {number} snap_grid_size
|
|
300
|
-
* @param {Uint32Array | null} [line_ids]
|
|
301
|
-
* @returns {WasmPolygonResult}
|
|
302
|
-
*/
|
|
303
|
-
function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
|
|
304
|
-
const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
|
|
305
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
306
|
-
const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
|
|
307
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
308
|
-
var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
|
|
309
|
-
var len2 = WASM_VECTOR_LEN$1;
|
|
310
|
-
const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
|
|
311
|
-
if (ret[2]) {
|
|
312
|
-
throw takeFromExternrefTable0$1(ret[1]);
|
|
313
|
-
}
|
|
314
|
-
return WasmPolygonResult$1.__wrap(ret[0]);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* @param {Uint8Array} ipc_bytes
|
|
319
|
-
* @param {boolean} node_input
|
|
320
|
-
* @param {number} snap_grid_size
|
|
321
|
-
* @param {boolean} extract_only_polygonal
|
|
322
|
-
* @returns {Uint8Array}
|
|
323
|
-
*/
|
|
324
|
-
function polygonize_geoarrow$1(ipc_bytes, node_input, snap_grid_size, extract_only_polygonal) {
|
|
325
|
-
const ptr0 = passArray8ToWasm0$1(ipc_bytes, wasm$1.__wbindgen_malloc);
|
|
326
|
-
const len0 = WASM_VECTOR_LEN$1;
|
|
327
|
-
const ret = wasm$1.polygonize_geoarrow(ptr0, len0, node_input, snap_grid_size, extract_only_polygonal);
|
|
328
|
-
if (ret[3]) {
|
|
329
|
-
throw takeFromExternrefTable0$1(ret[2]);
|
|
330
|
-
}
|
|
331
|
-
var v2 = getArrayU8FromWasm0$1(ret[0], ret[1]).slice();
|
|
332
|
-
wasm$1.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
333
|
-
return v2;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
function __wbg_get_imports$1() {
|
|
337
|
-
const import0 = {
|
|
338
|
-
__proto__: null,
|
|
339
|
-
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
340
|
-
const ret = Error(getStringFromWasm0$1(arg0, arg1));
|
|
341
|
-
return ret;
|
|
342
|
-
},
|
|
343
|
-
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
344
|
-
const ret = String(arg1);
|
|
345
|
-
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
346
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
347
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
348
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
349
|
-
},
|
|
350
|
-
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
351
|
-
const v = arg0;
|
|
352
|
-
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
353
|
-
return isLikeNone$1(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
354
|
-
},
|
|
355
|
-
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
356
|
-
const ret = debugString$1(arg1);
|
|
357
|
-
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
358
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
359
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
360
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
361
|
-
},
|
|
362
|
-
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
363
|
-
const ret = arg0 in arg1;
|
|
364
|
-
return ret;
|
|
365
|
-
},
|
|
366
|
-
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
367
|
-
const val = arg0;
|
|
368
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
369
|
-
return ret;
|
|
370
|
-
},
|
|
371
|
-
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
372
|
-
const ret = typeof(arg0) === 'string';
|
|
373
|
-
return ret;
|
|
374
|
-
},
|
|
375
|
-
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
376
|
-
const ret = arg0 === undefined;
|
|
377
|
-
return ret;
|
|
378
|
-
},
|
|
379
|
-
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
380
|
-
const ret = arg0 == arg1;
|
|
381
|
-
return ret;
|
|
382
|
-
},
|
|
383
|
-
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
384
|
-
const obj = arg1;
|
|
385
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
386
|
-
getDataViewMemory0$1().setFloat64(arg0 + 8 * 1, isLikeNone$1(ret) ? 0 : ret, true);
|
|
387
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, !isLikeNone$1(ret), true);
|
|
388
|
-
},
|
|
389
|
-
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
390
|
-
const obj = arg1;
|
|
391
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
392
|
-
var ptr1 = isLikeNone$1(ret) ? 0 : passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
393
|
-
var len1 = WASM_VECTOR_LEN$1;
|
|
394
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
395
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
396
|
-
},
|
|
397
|
-
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
398
|
-
throw new Error(getStringFromWasm0$1(arg0, arg1));
|
|
399
|
-
},
|
|
400
|
-
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
401
|
-
const ret = Object.entries(arg0);
|
|
402
|
-
return ret;
|
|
403
|
-
},
|
|
404
|
-
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
405
|
-
let deferred0_0;
|
|
406
|
-
let deferred0_1;
|
|
407
|
-
try {
|
|
408
|
-
deferred0_0 = arg0;
|
|
409
|
-
deferred0_1 = arg1;
|
|
410
|
-
console.error(getStringFromWasm0$1(arg0, arg1));
|
|
411
|
-
} finally {
|
|
412
|
-
wasm$1.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
416
|
-
const ret = arg0[arg1 >>> 0];
|
|
417
|
-
return ret;
|
|
418
|
-
},
|
|
419
|
-
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
420
|
-
const ret = arg0[arg1];
|
|
421
|
-
return ret;
|
|
422
|
-
},
|
|
423
|
-
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
424
|
-
let result;
|
|
425
|
-
try {
|
|
426
|
-
result = arg0 instanceof ArrayBuffer;
|
|
427
|
-
} catch (_) {
|
|
428
|
-
result = false;
|
|
429
|
-
}
|
|
430
|
-
const ret = result;
|
|
431
|
-
return ret;
|
|
432
|
-
},
|
|
433
|
-
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
434
|
-
let result;
|
|
435
|
-
try {
|
|
436
|
-
result = arg0 instanceof Uint8Array;
|
|
437
|
-
} catch (_) {
|
|
438
|
-
result = false;
|
|
439
|
-
}
|
|
440
|
-
const ret = result;
|
|
441
|
-
return ret;
|
|
442
|
-
},
|
|
443
|
-
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
444
|
-
const ret = arg0.length;
|
|
445
|
-
return ret;
|
|
446
|
-
},
|
|
447
|
-
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
448
|
-
const ret = arg0.length;
|
|
449
|
-
return ret;
|
|
450
|
-
},
|
|
451
|
-
__wbg_new_227d7c05414eb861: function() {
|
|
452
|
-
const ret = new Error();
|
|
453
|
-
return ret;
|
|
454
|
-
},
|
|
455
|
-
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
456
|
-
const ret = new Uint8Array(arg0);
|
|
457
|
-
return ret;
|
|
458
|
-
},
|
|
459
|
-
__wbg_new_a70fbab9066b301f: function() {
|
|
460
|
-
const ret = new Array();
|
|
461
|
-
return ret;
|
|
462
|
-
},
|
|
463
|
-
__wbg_new_ab79df5bd7c26067: function() {
|
|
464
|
-
const ret = new Object();
|
|
465
|
-
return ret;
|
|
466
|
-
},
|
|
467
|
-
__wbg_polygonizerwasmerror_new: function(arg0) {
|
|
468
|
-
const ret = PolygonizerWasmError$1.__wrap(arg0);
|
|
469
|
-
return ret;
|
|
470
|
-
},
|
|
471
|
-
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
472
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0$1(arg0, arg1), arg2);
|
|
473
|
-
},
|
|
474
|
-
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
475
|
-
arg0[arg1 >>> 0] = arg2;
|
|
476
|
-
},
|
|
477
|
-
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
478
|
-
arg0[arg1] = arg2;
|
|
479
|
-
},
|
|
480
|
-
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
481
|
-
const ret = arg1.stack;
|
|
482
|
-
const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
|
|
483
|
-
const len1 = WASM_VECTOR_LEN$1;
|
|
484
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
|
|
485
|
-
getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
486
|
-
},
|
|
487
|
-
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
488
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
489
|
-
const ret = arg0;
|
|
490
|
-
return ret;
|
|
491
|
-
},
|
|
492
|
-
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
493
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
494
|
-
const ret = getStringFromWasm0$1(arg0, arg1);
|
|
495
|
-
return ret;
|
|
496
|
-
},
|
|
497
|
-
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
498
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
499
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
500
|
-
return ret;
|
|
501
|
-
},
|
|
502
|
-
__wbindgen_init_externref_table: function() {
|
|
503
|
-
const table = wasm$1.__wbindgen_externrefs;
|
|
504
|
-
const offset = table.grow(4);
|
|
505
|
-
table.set(0, undefined);
|
|
506
|
-
table.set(offset + 0, undefined);
|
|
507
|
-
table.set(offset + 1, null);
|
|
508
|
-
table.set(offset + 2, true);
|
|
509
|
-
table.set(offset + 3, false);
|
|
510
|
-
},
|
|
511
|
-
};
|
|
512
|
-
return {
|
|
513
|
-
__proto__: null,
|
|
514
|
-
"./geo_polygonize_bg.js": import0,
|
|
515
|
-
};
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
const PolygonizerWasmErrorFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
519
|
-
? { register: () => {}, unregister: () => {} }
|
|
520
|
-
: new FinalizationRegistry(ptr => wasm$1.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
|
|
521
|
-
const WasmPolygonResultFinalization$1 = (typeof FinalizationRegistry === 'undefined')
|
|
522
|
-
? { register: () => {}, unregister: () => {} }
|
|
523
|
-
: new FinalizationRegistry(ptr => wasm$1.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
|
|
524
|
-
|
|
525
|
-
function debugString$1(val) {
|
|
526
|
-
// primitive types
|
|
527
|
-
const type = typeof val;
|
|
528
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
529
|
-
return `${val}`;
|
|
530
|
-
}
|
|
531
|
-
if (type == 'string') {
|
|
532
|
-
return `"${val}"`;
|
|
533
|
-
}
|
|
534
|
-
if (type == 'symbol') {
|
|
535
|
-
const description = val.description;
|
|
536
|
-
if (description == null) {
|
|
537
|
-
return 'Symbol';
|
|
538
|
-
} else {
|
|
539
|
-
return `Symbol(${description})`;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
if (type == 'function') {
|
|
543
|
-
const name = val.name;
|
|
544
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
545
|
-
return `Function(${name})`;
|
|
546
|
-
} else {
|
|
547
|
-
return 'Function';
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
// objects
|
|
551
|
-
if (Array.isArray(val)) {
|
|
552
|
-
const length = val.length;
|
|
553
|
-
let debug = '[';
|
|
554
|
-
if (length > 0) {
|
|
555
|
-
debug += debugString$1(val[0]);
|
|
556
|
-
}
|
|
557
|
-
for(let i = 1; i < length; i++) {
|
|
558
|
-
debug += ', ' + debugString$1(val[i]);
|
|
559
|
-
}
|
|
560
|
-
debug += ']';
|
|
561
|
-
return debug;
|
|
562
|
-
}
|
|
563
|
-
// Test for built-in
|
|
564
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
565
|
-
let className;
|
|
566
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
567
|
-
className = builtInMatches[1];
|
|
568
|
-
} else {
|
|
569
|
-
// Failed to match the standard '[object ClassName]'
|
|
570
|
-
return toString.call(val);
|
|
571
|
-
}
|
|
572
|
-
if (className == 'Object') {
|
|
573
|
-
// we're a user defined class or Object
|
|
574
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
575
|
-
// easier than looping through ownProperties of `val`.
|
|
576
|
-
try {
|
|
577
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
578
|
-
} catch (_) {
|
|
579
|
-
return 'Object';
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
// errors
|
|
583
|
-
if (val instanceof Error) {
|
|
584
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
585
|
-
}
|
|
586
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
587
|
-
return className;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
function getArrayU8FromWasm0$1(ptr, len) {
|
|
591
|
-
ptr = ptr >>> 0;
|
|
592
|
-
return getUint8ArrayMemory0$1().subarray(ptr / 1, ptr / 1 + len);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
let cachedDataViewMemory0$1 = null;
|
|
596
|
-
function getDataViewMemory0$1() {
|
|
597
|
-
if (cachedDataViewMemory0$1 === null || cachedDataViewMemory0$1.buffer.detached === true || (cachedDataViewMemory0$1.buffer.detached === undefined && cachedDataViewMemory0$1.buffer !== wasm$1.memory.buffer)) {
|
|
598
|
-
cachedDataViewMemory0$1 = new DataView(wasm$1.memory.buffer);
|
|
599
|
-
}
|
|
600
|
-
return cachedDataViewMemory0$1;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
let cachedFloat64ArrayMemory0$1 = null;
|
|
604
|
-
function getFloat64ArrayMemory0$1() {
|
|
605
|
-
if (cachedFloat64ArrayMemory0$1 === null || cachedFloat64ArrayMemory0$1.byteLength === 0) {
|
|
606
|
-
cachedFloat64ArrayMemory0$1 = new Float64Array(wasm$1.memory.buffer);
|
|
607
|
-
}
|
|
608
|
-
return cachedFloat64ArrayMemory0$1;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
function getStringFromWasm0$1(ptr, len) {
|
|
612
|
-
ptr = ptr >>> 0;
|
|
613
|
-
return decodeText$1(ptr, len);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
let cachedUint32ArrayMemory0$1 = null;
|
|
617
|
-
function getUint32ArrayMemory0$1() {
|
|
618
|
-
if (cachedUint32ArrayMemory0$1 === null || cachedUint32ArrayMemory0$1.byteLength === 0) {
|
|
619
|
-
cachedUint32ArrayMemory0$1 = new Uint32Array(wasm$1.memory.buffer);
|
|
620
|
-
}
|
|
621
|
-
return cachedUint32ArrayMemory0$1;
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
let cachedUint8ArrayMemory0$1 = null;
|
|
625
|
-
function getUint8ArrayMemory0$1() {
|
|
626
|
-
if (cachedUint8ArrayMemory0$1 === null || cachedUint8ArrayMemory0$1.byteLength === 0) {
|
|
627
|
-
cachedUint8ArrayMemory0$1 = new Uint8Array(wasm$1.memory.buffer);
|
|
628
|
-
}
|
|
629
|
-
return cachedUint8ArrayMemory0$1;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
function isLikeNone$1(x) {
|
|
633
|
-
return x === undefined || x === null;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
function passArray32ToWasm0$1(arg, malloc) {
|
|
637
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
638
|
-
getUint32ArrayMemory0$1().set(arg, ptr / 4);
|
|
639
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
640
|
-
return ptr;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
function passArray8ToWasm0$1(arg, malloc) {
|
|
644
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
645
|
-
getUint8ArrayMemory0$1().set(arg, ptr / 1);
|
|
646
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
647
|
-
return ptr;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
function passArrayF64ToWasm0$1(arg, malloc) {
|
|
651
|
-
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
652
|
-
getFloat64ArrayMemory0$1().set(arg, ptr / 8);
|
|
653
|
-
WASM_VECTOR_LEN$1 = arg.length;
|
|
654
|
-
return ptr;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
function passStringToWasm0$1(arg, malloc, realloc) {
|
|
658
|
-
if (realloc === undefined) {
|
|
659
|
-
const buf = cachedTextEncoder$1.encode(arg);
|
|
660
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
661
|
-
getUint8ArrayMemory0$1().subarray(ptr, ptr + buf.length).set(buf);
|
|
662
|
-
WASM_VECTOR_LEN$1 = buf.length;
|
|
663
|
-
return ptr;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
let len = arg.length;
|
|
667
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
668
|
-
|
|
669
|
-
const mem = getUint8ArrayMemory0$1();
|
|
670
|
-
|
|
671
|
-
let offset = 0;
|
|
672
|
-
|
|
673
|
-
for (; offset < len; offset++) {
|
|
674
|
-
const code = arg.charCodeAt(offset);
|
|
675
|
-
if (code > 0x7F) break;
|
|
676
|
-
mem[ptr + offset] = code;
|
|
677
|
-
}
|
|
678
|
-
if (offset !== len) {
|
|
679
|
-
if (offset !== 0) {
|
|
680
|
-
arg = arg.slice(offset);
|
|
681
|
-
}
|
|
682
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
683
|
-
const view = getUint8ArrayMemory0$1().subarray(ptr + offset, ptr + len);
|
|
684
|
-
const ret = cachedTextEncoder$1.encodeInto(arg, view);
|
|
685
|
-
|
|
686
|
-
offset += ret.written;
|
|
687
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
WASM_VECTOR_LEN$1 = offset;
|
|
691
|
-
return ptr;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
function takeFromExternrefTable0$1(idx) {
|
|
695
|
-
const value = wasm$1.__wbindgen_externrefs.get(idx);
|
|
696
|
-
wasm$1.__externref_table_dealloc(idx);
|
|
697
|
-
return value;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
let cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
701
|
-
cachedTextDecoder$1.decode();
|
|
702
|
-
const MAX_SAFARI_DECODE_BYTES$1 = 2146435072;
|
|
703
|
-
let numBytesDecoded$1 = 0;
|
|
704
|
-
function decodeText$1(ptr, len) {
|
|
705
|
-
numBytesDecoded$1 += len;
|
|
706
|
-
if (numBytesDecoded$1 >= MAX_SAFARI_DECODE_BYTES$1) {
|
|
707
|
-
cachedTextDecoder$1 = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
708
|
-
cachedTextDecoder$1.decode();
|
|
709
|
-
numBytesDecoded$1 = len;
|
|
710
|
-
}
|
|
711
|
-
return cachedTextDecoder$1.decode(getUint8ArrayMemory0$1().subarray(ptr, ptr + len));
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
const cachedTextEncoder$1 = new TextEncoder();
|
|
715
|
-
|
|
716
|
-
if (!('encodeInto' in cachedTextEncoder$1)) {
|
|
717
|
-
cachedTextEncoder$1.encodeInto = function (arg, view) {
|
|
718
|
-
const buf = cachedTextEncoder$1.encode(arg);
|
|
719
|
-
view.set(buf);
|
|
720
|
-
return {
|
|
721
|
-
read: arg.length,
|
|
722
|
-
written: buf.length
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
let WASM_VECTOR_LEN$1 = 0;
|
|
728
|
-
|
|
729
|
-
let wasm$1;
|
|
730
|
-
function __wbg_finalize_init$1(instance, module) {
|
|
731
|
-
wasm$1 = instance.exports;
|
|
732
|
-
cachedDataViewMemory0$1 = null;
|
|
733
|
-
cachedFloat64ArrayMemory0$1 = null;
|
|
734
|
-
cachedUint32ArrayMemory0$1 = null;
|
|
735
|
-
cachedUint8ArrayMemory0$1 = null;
|
|
736
|
-
wasm$1.__wbindgen_start();
|
|
737
|
-
return wasm$1;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
async function __wbg_load$1(module, imports) {
|
|
741
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
742
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
743
|
-
try {
|
|
744
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
745
|
-
} catch (e) {
|
|
746
|
-
const validResponse = module.ok && expectedResponseType(module.type);
|
|
747
|
-
|
|
748
|
-
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
749
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
750
|
-
|
|
751
|
-
} else { throw e; }
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
const bytes = await module.arrayBuffer();
|
|
756
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
757
|
-
} else {
|
|
758
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
759
|
-
|
|
760
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
761
|
-
return { instance, module };
|
|
762
|
-
} else {
|
|
763
|
-
return instance;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
function expectedResponseType(type) {
|
|
768
|
-
switch (type) {
|
|
769
|
-
case 'basic': case 'cors': case 'default': return true;
|
|
770
|
-
}
|
|
771
|
-
return false;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
function initSync$1(module) {
|
|
776
|
-
if (wasm$1 !== undefined) return wasm$1;
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
if (module !== undefined) {
|
|
780
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
781
|
-
({module} = module);
|
|
782
|
-
} else {
|
|
783
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
const imports = __wbg_get_imports$1();
|
|
788
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
789
|
-
module = new WebAssembly.Module(module);
|
|
790
|
-
}
|
|
791
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
792
|
-
return __wbg_finalize_init$1(instance);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
async function __wbg_init$1(module_or_path) {
|
|
796
|
-
if (wasm$1 !== undefined) return wasm$1;
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
if (module_or_path !== undefined) {
|
|
800
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
801
|
-
({module_or_path} = module_or_path);
|
|
802
|
-
} else {
|
|
803
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead');
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
if (module_or_path === undefined) {
|
|
808
|
-
module_or_path = new URL('geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
809
|
-
}
|
|
810
|
-
const imports = __wbg_get_imports$1();
|
|
811
|
-
|
|
812
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
813
|
-
module_or_path = fetch(module_or_path);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
const { instance, module } = await __wbg_load$1(await module_or_path, imports);
|
|
817
|
-
|
|
818
|
-
return __wbg_finalize_init$1(instance);
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
var scalarExports = /*#__PURE__*/Object.freeze({
|
|
822
|
-
__proto__: null,
|
|
823
|
-
PolygonizerWasmError: PolygonizerWasmError$1,
|
|
824
|
-
WasmPolygonResult: WasmPolygonResult$1,
|
|
825
|
-
default: __wbg_init$1,
|
|
826
|
-
initSync: initSync$1,
|
|
827
|
-
polygonize: polygonize$1,
|
|
828
|
-
polygonizeGeoArrowWithOptions: polygonizeGeoArrowWithOptions$1,
|
|
829
|
-
polygonizeWithOptions: polygonizeWithOptions$1,
|
|
830
|
-
polygonizeWithOptionsBuffer: polygonizeWithOptionsBuffer$1,
|
|
831
|
-
polygonize_buffers: polygonize_buffers$1,
|
|
832
|
-
polygonize_geoarrow: polygonize_geoarrow$1
|
|
833
|
-
});
|
|
834
|
-
|
|
835
|
-
/* @ts-self-types="./geo_polygonize.d.ts" */
|
|
836
|
-
|
|
837
6
|
class PolygonizerWasmError {
|
|
838
7
|
static __wrap(ptr) {
|
|
839
8
|
ptr = ptr >>> 0;
|
|
@@ -1636,7 +805,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1636
805
|
}
|
|
1637
806
|
|
|
1638
807
|
if (module_or_path === undefined) {
|
|
1639
|
-
module_or_path = new URL('geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
808
|
+
module_or_path = new URL(/* @vite-ignore */ 'geo_polygonize_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index_slim.js', document.baseURI).href)));
|
|
1640
809
|
}
|
|
1641
810
|
const imports = __wbg_get_imports();
|
|
1642
811
|
|
|
@@ -1649,7 +818,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1649
818
|
return __wbg_finalize_init(instance);
|
|
1650
819
|
}
|
|
1651
820
|
|
|
1652
|
-
var
|
|
821
|
+
var scalarExports = /*#__PURE__*/Object.freeze({
|
|
1653
822
|
__proto__: null,
|
|
1654
823
|
PolygonizerWasmError: PolygonizerWasmError,
|
|
1655
824
|
WasmPolygonResult: WasmPolygonResult,
|
|
@@ -1699,6 +868,12 @@ const cfbRobustOptions = {
|
|
|
1699
868
|
// We provide a helper to choose based on feature detection if the user wants to use it
|
|
1700
869
|
let isSimdSupported;
|
|
1701
870
|
const SIMD_TEST_BYTES = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11]);
|
|
871
|
+
function normalizeInitInput(input) {
|
|
872
|
+
if (input && typeof input === "object" && "module" in input && !("module_or_path" in input)) {
|
|
873
|
+
return { ...input, module_or_path: input.module };
|
|
874
|
+
}
|
|
875
|
+
return input;
|
|
876
|
+
}
|
|
1702
877
|
async function initBest(scalarModule, simdModule) {
|
|
1703
878
|
if (isSimdSupported === undefined) {
|
|
1704
879
|
try {
|
|
@@ -1708,24 +883,18 @@ async function initBest(scalarModule, simdModule) {
|
|
|
1708
883
|
isSimdSupported = false;
|
|
1709
884
|
}
|
|
1710
885
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
return simdExports;
|
|
1714
|
-
}
|
|
1715
|
-
else {
|
|
1716
|
-
await __wbg_init$1(scalarModule);
|
|
1717
|
-
return scalarExports;
|
|
1718
|
-
}
|
|
886
|
+
await __wbg_init(normalizeInitInput(isSimdSupported && simdModule ? simdModule : scalarModule));
|
|
887
|
+
return scalarExports;
|
|
1719
888
|
}
|
|
1720
889
|
|
|
1721
|
-
exports.PolygonizerWasmError = PolygonizerWasmError
|
|
1722
|
-
exports.WasmPolygonResult = WasmPolygonResult
|
|
890
|
+
exports.PolygonizerWasmError = PolygonizerWasmError;
|
|
891
|
+
exports.WasmPolygonResult = WasmPolygonResult;
|
|
1723
892
|
exports.cfbRobustOptions = cfbRobustOptions;
|
|
1724
893
|
exports.initBest = initBest;
|
|
1725
|
-
exports.initSync = initSync
|
|
1726
|
-
exports.polygonize = polygonize
|
|
1727
|
-
exports.polygonizeGeoArrowWithOptions = polygonizeGeoArrowWithOptions
|
|
1728
|
-
exports.polygonizeWithOptions = polygonizeWithOptions
|
|
1729
|
-
exports.polygonizeWithOptionsBuffer = polygonizeWithOptionsBuffer
|
|
1730
|
-
exports.polygonize_buffers = polygonize_buffers
|
|
1731
|
-
exports.polygonize_geoarrow = polygonize_geoarrow
|
|
894
|
+
exports.initSync = initSync;
|
|
895
|
+
exports.polygonize = polygonize;
|
|
896
|
+
exports.polygonizeGeoArrowWithOptions = polygonizeGeoArrowWithOptions;
|
|
897
|
+
exports.polygonizeWithOptions = polygonizeWithOptions;
|
|
898
|
+
exports.polygonizeWithOptionsBuffer = polygonizeWithOptionsBuffer;
|
|
899
|
+
exports.polygonize_buffers = polygonize_buffers;
|
|
900
|
+
exports.polygonize_geoarrow = polygonize_geoarrow;
|