@glandais/vcyclist-engine 1.2.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -28
- package/kotlin-kotlin-stdlib.js +2778 -1761
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +1218 -1211
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +1 -1
- package/package.json +3 -2
- package/vcyclist-elevation.js +1051 -961
- package/vcyclist-elevation.js.map +1 -1
- package/vcyclist-engine.d.ts +16 -1
- package/vcyclist-engine.js +1290 -2522
- package/vcyclist-engine.js.map +1 -1
- package/vcyclist-fit.js +811 -0
- package/vcyclist-fit.js.map +1 -0
- package/vcyclist-gpx.js +3636 -0
- package/vcyclist-gpx.js.map +1 -0
- package/xmlutil-core.js +2717 -2718
- package/xmlutil-core.js.map +1 -1
package/vcyclist-elevation.js
CHANGED
|
@@ -18,66 +18,68 @@
|
|
|
18
18
|
var imul = Math.imul;
|
|
19
19
|
var hypot = Math.hypot;
|
|
20
20
|
var VOID = kotlin_kotlin.$_$.a;
|
|
21
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
22
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
23
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
24
|
-
var equals = kotlin_kotlin.$_$.
|
|
25
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
26
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
27
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
28
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
29
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
31
|
-
var MutableEntry = kotlin_kotlin.$_$.
|
|
32
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
33
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
35
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
36
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
37
|
-
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.
|
|
38
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
39
|
-
var toList = kotlin_kotlin.$_$.
|
|
40
|
-
var KtList = kotlin_kotlin.$_$.
|
|
41
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
42
|
-
var toString = kotlin_kotlin.$_$.
|
|
43
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
44
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
45
|
-
var listOf = kotlin_kotlin.$_$.
|
|
46
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
47
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
48
|
-
var toList_0 = kotlin_kotlin.$_$.
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
21
|
+
var protoOf = kotlin_kotlin.$_$.a6;
|
|
22
|
+
var getNumberHashCode = kotlin_kotlin.$_$.h5;
|
|
23
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.g5;
|
|
24
|
+
var equals = kotlin_kotlin.$_$.f5;
|
|
25
|
+
var initMetadataForClass = kotlin_kotlin.$_$.l5;
|
|
26
|
+
var numberToLong = kotlin_kotlin.$_$.s4;
|
|
27
|
+
var toNumber = kotlin_kotlin.$_$.u4;
|
|
28
|
+
var CoroutineImpl = kotlin_kotlin.$_$.f4;
|
|
29
|
+
var Unit_instance = kotlin_kotlin.$_$.t;
|
|
30
|
+
var THROW_CCE = kotlin_kotlin.$_$.i8;
|
|
31
|
+
var MutableEntry = kotlin_kotlin.$_$.d2;
|
|
32
|
+
var isInterface = kotlin_kotlin.$_$.t5;
|
|
33
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q3;
|
|
34
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.q5;
|
|
35
|
+
var constructCallableReference = kotlin_kotlin.$_$.d5;
|
|
36
|
+
var emptyList = kotlin_kotlin.$_$.p2;
|
|
37
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
38
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
39
|
+
var toList = kotlin_kotlin.$_$.l3;
|
|
40
|
+
var KtList = kotlin_kotlin.$_$.a2;
|
|
41
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.n5;
|
|
42
|
+
var toString = kotlin_kotlin.$_$.c6;
|
|
43
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.m1;
|
|
44
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.w;
|
|
45
|
+
var listOf = kotlin_kotlin.$_$.a3;
|
|
46
|
+
var numberToInt = kotlin_kotlin.$_$.y5;
|
|
47
|
+
var initMetadataForObject = kotlin_kotlin.$_$.r5;
|
|
48
|
+
var toList_0 = kotlin_kotlin.$_$.k3;
|
|
49
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
|
|
50
|
+
var get_indices = kotlin_kotlin.$_$.u2;
|
|
51
|
+
var get_lastIndex = kotlin_kotlin.$_$.w2;
|
|
52
|
+
var checkBuilderCapacity = kotlin_kotlin.$_$.h2;
|
|
53
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
54
|
+
var coerceIn = kotlin_kotlin.$_$.k6;
|
|
55
|
+
var KFunctionImpl = kotlin_kotlin.$_$.o6;
|
|
56
|
+
var initMetadataForFunctionReference = kotlin_kotlin.$_$.o5;
|
|
57
|
+
var getStringHashCode = kotlin_kotlin.$_$.j5;
|
|
56
58
|
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
57
59
|
var Semaphore = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
|
|
58
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.e2;
|
|
59
60
|
var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
|
|
60
61
|
var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
|
|
61
62
|
var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
|
|
62
63
|
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
|
|
63
|
-
var KtMap = kotlin_kotlin.$_$.
|
|
64
|
+
var KtMap = kotlin_kotlin.$_$.b2;
|
|
64
65
|
var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
|
|
65
|
-
var contentEquals = kotlin_kotlin.$_$.
|
|
66
|
-
var contentHashCode = kotlin_kotlin.$_$.
|
|
67
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
68
|
-
var round = kotlin_kotlin.$_$.
|
|
69
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
70
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
71
|
-
var replace = kotlin_kotlin.$_$.
|
|
72
|
-
var coerceIn_0 = kotlin_kotlin.$_$.
|
|
66
|
+
var contentEquals = kotlin_kotlin.$_$.k2;
|
|
67
|
+
var contentHashCode = kotlin_kotlin.$_$.l2;
|
|
68
|
+
var objectCreate = kotlin_kotlin.$_$.z5;
|
|
69
|
+
var round = kotlin_kotlin.$_$.f6;
|
|
70
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.m5;
|
|
71
|
+
var isNaN_0 = kotlin_kotlin.$_$.p8;
|
|
72
|
+
var replace = kotlin_kotlin.$_$.k7;
|
|
73
|
+
var coerceIn_0 = kotlin_kotlin.$_$.j6;
|
|
73
74
|
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
74
75
|
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
|
|
75
|
-
var KProperty0 = kotlin_kotlin.$_$.
|
|
76
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
76
|
+
var KProperty0 = kotlin_kotlin.$_$.q6;
|
|
77
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.i5;
|
|
78
|
+
var isNumber = kotlin_kotlin.$_$.u5;
|
|
77
79
|
var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
78
|
-
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
79
|
-
var
|
|
80
|
-
var lazy = kotlin_kotlin.$_$.
|
|
80
|
+
var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.o1;
|
|
81
|
+
var charSequenceLength = kotlin_kotlin.$_$.b5;
|
|
82
|
+
var lazy = kotlin_kotlin.$_$.q8;
|
|
81
83
|
//endregion
|
|
82
84
|
//region block: pre-declaration
|
|
83
85
|
initMetadataForClass(SmoothingOptions, 'SmoothingOptions', SmoothingOptions);
|
|
@@ -86,7 +88,6 @@
|
|
|
86
88
|
initMetadataForCoroutine($setElevationsCOROUTINE$, CoroutineImpl);
|
|
87
89
|
initMetadataForCoroutine($getElevationsAlongCOROUTINE$, CoroutineImpl);
|
|
88
90
|
initMetadataForClass(BatchCalculator, 'BatchCalculator', VOID, VOID, VOID, [4, 7]);
|
|
89
|
-
initMetadataForObject(MathConstants, 'MathConstants');
|
|
90
91
|
initMetadataForClass(LatLon, 'LatLon');
|
|
91
92
|
initMetadataForClass(LatLonElevation, 'LatLonElevation');
|
|
92
93
|
initMetadataForObject(Distance, 'Distance');
|
|
@@ -126,19 +127,20 @@
|
|
|
126
127
|
initMetadataForCoroutine($decodeNodeCOROUTINE$, CoroutineImpl);
|
|
127
128
|
initMetadataForCoroutine($decodeBrowserCOROUTINE$, CoroutineImpl);
|
|
128
129
|
initMetadataForCoroutine($decodeWebpNodeCOROUTINE$, CoroutineImpl);
|
|
130
|
+
initMetadataForCoroutine($decodeBlobCOROUTINE$, CoroutineImpl);
|
|
129
131
|
//endregion
|
|
130
132
|
function SmoothingOptions(windowSize, enabled) {
|
|
131
133
|
windowSize = windowSize === VOID ? 50.0 : windowSize;
|
|
132
134
|
enabled = enabled === VOID ? false : enabled;
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
135
|
+
this.yt_1 = windowSize;
|
|
136
|
+
this.zt_1 = enabled;
|
|
135
137
|
}
|
|
136
138
|
protoOf(SmoothingOptions).toString = function () {
|
|
137
|
-
return 'SmoothingOptions(windowSize=' + this.
|
|
139
|
+
return 'SmoothingOptions(windowSize=' + this.yt_1 + ', enabled=' + this.zt_1 + ')';
|
|
138
140
|
};
|
|
139
141
|
protoOf(SmoothingOptions).hashCode = function () {
|
|
140
|
-
var result = this.
|
|
141
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
142
|
+
var result = this.yt_1 == null ? 0 : getNumberHashCode(this.yt_1);
|
|
143
|
+
result = imul(result, 31) + getBooleanHashCode(this.zt_1) | 0;
|
|
142
144
|
return result;
|
|
143
145
|
};
|
|
144
146
|
protoOf(SmoothingOptions).equals = function (other) {
|
|
@@ -146,9 +148,9 @@
|
|
|
146
148
|
return true;
|
|
147
149
|
if (!(other instanceof SmoothingOptions))
|
|
148
150
|
return false;
|
|
149
|
-
if (!equals(this.
|
|
151
|
+
if (!equals(this.yt_1, other.yt_1))
|
|
150
152
|
return false;
|
|
151
|
-
if (!(this.
|
|
153
|
+
if (!(this.zt_1 === other.zt_1))
|
|
152
154
|
return false;
|
|
153
155
|
return true;
|
|
154
156
|
};
|
|
@@ -156,17 +158,17 @@
|
|
|
156
158
|
tolerance = tolerance === VOID ? 10.0 : tolerance;
|
|
157
159
|
zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
|
|
158
160
|
enabled = enabled === VOID ? false : enabled;
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
161
|
+
this.au_1 = tolerance;
|
|
162
|
+
this.bu_1 = zExaggeration;
|
|
163
|
+
this.cu_1 = enabled;
|
|
162
164
|
}
|
|
163
165
|
protoOf(FilterOptions).toString = function () {
|
|
164
|
-
return 'FilterOptions(tolerance=' + this.
|
|
166
|
+
return 'FilterOptions(tolerance=' + this.au_1 + ', zExaggeration=' + this.bu_1 + ', enabled=' + this.cu_1 + ')';
|
|
165
167
|
};
|
|
166
168
|
protoOf(FilterOptions).hashCode = function () {
|
|
167
|
-
var result = this.
|
|
168
|
-
result = imul(result, 31) + (this.
|
|
169
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
169
|
+
var result = this.au_1 == null ? 0 : getNumberHashCode(this.au_1);
|
|
170
|
+
result = imul(result, 31) + (this.bu_1 == null ? 0 : getNumberHashCode(this.bu_1)) | 0;
|
|
171
|
+
result = imul(result, 31) + getBooleanHashCode(this.cu_1) | 0;
|
|
170
172
|
return result;
|
|
171
173
|
};
|
|
172
174
|
protoOf(FilterOptions).equals = function (other) {
|
|
@@ -174,11 +176,11 @@
|
|
|
174
176
|
return true;
|
|
175
177
|
if (!(other instanceof FilterOptions))
|
|
176
178
|
return false;
|
|
177
|
-
if (!equals(this.
|
|
179
|
+
if (!equals(this.au_1, other.au_1))
|
|
178
180
|
return false;
|
|
179
|
-
if (!equals(this.
|
|
181
|
+
if (!equals(this.bu_1, other.bu_1))
|
|
180
182
|
return false;
|
|
181
|
-
if (!(this.
|
|
183
|
+
if (!(this.cu_1 === other.cu_1))
|
|
182
184
|
return false;
|
|
183
185
|
return true;
|
|
184
186
|
};
|
|
@@ -187,44 +189,44 @@
|
|
|
187
189
|
return toNumber(asLong) === d ? asLong.toString() : d.toString();
|
|
188
190
|
}
|
|
189
191
|
function BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
190
|
-
this.
|
|
191
|
-
this.
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
192
|
+
this.lu_1 = $coordinates;
|
|
193
|
+
this.mu_1 = this$0;
|
|
194
|
+
this.nu_1 = $zoomLevel;
|
|
195
|
+
this.ou_1 = $interpolation;
|
|
196
|
+
this.pu_1 = $results;
|
|
195
197
|
CoroutineImpl.call(this, resultContinuation);
|
|
196
198
|
}
|
|
197
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
198
|
-
var tmp = this.
|
|
199
|
-
tmp.
|
|
200
|
-
tmp.
|
|
201
|
-
return tmp.
|
|
199
|
+
protoOf(BatchCalculator$setElevations$slambda).uu = function (_destruct__k2r9zo, $completion) {
|
|
200
|
+
var tmp = this.vu(_destruct__k2r9zo, $completion);
|
|
201
|
+
tmp.j6_1 = Unit_instance;
|
|
202
|
+
tmp.k6_1 = null;
|
|
203
|
+
return tmp.p6();
|
|
202
204
|
};
|
|
203
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
204
|
-
return this.
|
|
205
|
+
protoOf(BatchCalculator$setElevations$slambda).x6 = function (p1, $completion) {
|
|
206
|
+
return this.uu((!(p1 == null) ? isInterface(p1, MutableEntry) : false) ? p1 : THROW_CCE(), $completion);
|
|
205
207
|
};
|
|
206
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
207
|
-
var suspendResult = this.
|
|
208
|
+
protoOf(BatchCalculator$setElevations$slambda).p6 = function () {
|
|
209
|
+
var suspendResult = this.j6_1;
|
|
208
210
|
$sm: do
|
|
209
211
|
try {
|
|
210
|
-
var tmp = this.
|
|
212
|
+
var tmp = this.h6_1;
|
|
211
213
|
switch (tmp) {
|
|
212
214
|
case 0:
|
|
213
|
-
this.
|
|
214
|
-
var indices = this.
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
215
|
+
this.i6_1 = 4;
|
|
216
|
+
var indices = this.qu_1.i1();
|
|
217
|
+
this.tu_1 = indices.i();
|
|
218
|
+
this.h6_1 = 1;
|
|
217
219
|
continue $sm;
|
|
218
220
|
case 1:
|
|
219
|
-
if (!this.
|
|
220
|
-
this.
|
|
221
|
+
if (!this.tu_1.j()) {
|
|
222
|
+
this.h6_1 = 3;
|
|
221
223
|
continue $sm;
|
|
222
224
|
}
|
|
223
225
|
|
|
224
|
-
this.
|
|
225
|
-
this.
|
|
226
|
-
this.
|
|
227
|
-
suspendResult = this.
|
|
226
|
+
this.su_1 = this.tu_1.k();
|
|
227
|
+
this.ru_1 = this.lu_1.m(this.su_1);
|
|
228
|
+
this.h6_1 = 2;
|
|
229
|
+
suspendResult = this.mu_1.wu_1.zu(this.ru_1, this.nu_1, this.ou_1, this);
|
|
228
230
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
229
231
|
return suspendResult;
|
|
230
232
|
}
|
|
@@ -232,136 +234,136 @@
|
|
|
232
234
|
continue $sm;
|
|
233
235
|
case 2:
|
|
234
236
|
var ele = suspendResult;
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
237
|
+
this.pu_1[this.su_1] = new LatLonElevation(this.ru_1.av(), this.ru_1.bv(), ele);
|
|
238
|
+
this.h6_1 = 1;
|
|
237
239
|
continue $sm;
|
|
238
240
|
case 3:
|
|
239
241
|
return Unit_instance;
|
|
240
242
|
case 4:
|
|
241
|
-
throw this.
|
|
243
|
+
throw this.k6_1;
|
|
242
244
|
}
|
|
243
245
|
} catch ($p) {
|
|
244
246
|
var e = $p;
|
|
245
|
-
if (this.
|
|
247
|
+
if (this.i6_1 === 4) {
|
|
246
248
|
throw e;
|
|
247
249
|
} else {
|
|
248
|
-
this.
|
|
249
|
-
this.
|
|
250
|
+
this.h6_1 = this.i6_1;
|
|
251
|
+
this.k6_1 = e;
|
|
250
252
|
}
|
|
251
253
|
}
|
|
252
254
|
while (true);
|
|
253
255
|
};
|
|
254
|
-
protoOf(BatchCalculator$setElevations$slambda).
|
|
255
|
-
var i = new BatchCalculator$setElevations$slambda(this.
|
|
256
|
-
i.
|
|
256
|
+
protoOf(BatchCalculator$setElevations$slambda).vu = function (_destruct__k2r9zo, completion) {
|
|
257
|
+
var i = new BatchCalculator$setElevations$slambda(this.lu_1, this.mu_1, this.nu_1, this.ou_1, this.pu_1, completion);
|
|
258
|
+
i.qu_1 = _destruct__k2r9zo;
|
|
257
259
|
return i;
|
|
258
260
|
};
|
|
259
261
|
function BatchCalculator$setElevations$slambda_0($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation) {
|
|
260
262
|
var i = new BatchCalculator$setElevations$slambda($coordinates, this$0, $zoomLevel, $interpolation, $results, resultContinuation);
|
|
261
263
|
return constructCallableReference(function (_destruct__k2r9zo, $completion) {
|
|
262
|
-
return i.
|
|
264
|
+
return i.uu(_destruct__k2r9zo, $completion);
|
|
263
265
|
}, 1);
|
|
264
266
|
}
|
|
265
267
|
function $setElevationsCOROUTINE$(_this__u8e3s4, coordinates, zoomLevel, interpolation, maxParallelTiles, resultContinuation) {
|
|
266
268
|
CoroutineImpl.call(this, resultContinuation);
|
|
267
|
-
this.
|
|
268
|
-
this.
|
|
269
|
-
this.
|
|
270
|
-
this.
|
|
271
|
-
this.
|
|
272
|
-
}
|
|
273
|
-
protoOf($setElevationsCOROUTINE$).
|
|
274
|
-
var suspendResult = this.
|
|
269
|
+
this.kv_1 = _this__u8e3s4;
|
|
270
|
+
this.lv_1 = coordinates;
|
|
271
|
+
this.mv_1 = zoomLevel;
|
|
272
|
+
this.nv_1 = interpolation;
|
|
273
|
+
this.ov_1 = maxParallelTiles;
|
|
274
|
+
}
|
|
275
|
+
protoOf($setElevationsCOROUTINE$).p6 = function () {
|
|
276
|
+
var suspendResult = this.j6_1;
|
|
275
277
|
$sm: do
|
|
276
278
|
try {
|
|
277
|
-
var tmp = this.
|
|
279
|
+
var tmp = this.h6_1;
|
|
278
280
|
switch (tmp) {
|
|
279
281
|
case 0:
|
|
280
|
-
this.
|
|
281
|
-
if (this.
|
|
282
|
+
this.i6_1 = 2;
|
|
283
|
+
if (this.lv_1.n())
|
|
282
284
|
return emptyList();
|
|
283
285
|
var tmp_0 = this;
|
|
284
|
-
var size = this.
|
|
285
|
-
tmp_0.
|
|
286
|
+
var size = this.lv_1.l();
|
|
287
|
+
tmp_0.pv_1 = Array(size);
|
|
286
288
|
var byTile = LinkedHashMap_init_$Create$();
|
|
287
|
-
var iterator = this.
|
|
289
|
+
var iterator = this.lv_1.i();
|
|
288
290
|
var index = 0;
|
|
289
|
-
while (iterator.
|
|
291
|
+
while (iterator.j()) {
|
|
290
292
|
var i = index;
|
|
291
293
|
index = index + 1 | 0;
|
|
292
|
-
var p = iterator.
|
|
293
|
-
var tile = ElevationFunctions_instance.
|
|
294
|
-
var key = '' + tile.
|
|
295
|
-
var value = byTile.
|
|
294
|
+
var p = iterator.k();
|
|
295
|
+
var tile = ElevationFunctions_instance.qv(p, this.mv_1);
|
|
296
|
+
var key = '' + tile.tv_1 + '/' + tile.rv_1 + '/' + tile.sv_1;
|
|
297
|
+
var value = byTile.k1(key);
|
|
296
298
|
var tmp_1;
|
|
297
299
|
if (value == null) {
|
|
298
300
|
var answer = ArrayList_init_$Create$();
|
|
299
|
-
byTile.
|
|
301
|
+
byTile.c3(key, answer);
|
|
300
302
|
tmp_1 = answer;
|
|
301
303
|
} else {
|
|
302
304
|
tmp_1 = value;
|
|
303
305
|
}
|
|
304
|
-
tmp_1.
|
|
306
|
+
tmp_1.h(i);
|
|
305
307
|
}
|
|
306
308
|
|
|
307
|
-
this.
|
|
309
|
+
this.h6_1 = 1;
|
|
308
310
|
var tmp_2 = Flux_instance;
|
|
309
|
-
var tmp_3 = byTile.
|
|
310
|
-
suspendResult = tmp_2.
|
|
311
|
+
var tmp_3 = byTile.m1();
|
|
312
|
+
suspendResult = tmp_2.uv(tmp_3, this.ov_1, BatchCalculator$setElevations$slambda_0(this.lv_1, this.kv_1, this.mv_1, this.nv_1, this.pv_1, null), this);
|
|
311
313
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
312
314
|
return suspendResult;
|
|
313
315
|
}
|
|
314
316
|
|
|
315
317
|
continue $sm;
|
|
316
318
|
case 1:
|
|
317
|
-
var tmp_4 = toList(this.
|
|
319
|
+
var tmp_4 = toList(this.pv_1);
|
|
318
320
|
return isInterface(tmp_4, KtList) ? tmp_4 : THROW_CCE();
|
|
319
321
|
case 2:
|
|
320
|
-
throw this.
|
|
322
|
+
throw this.k6_1;
|
|
321
323
|
}
|
|
322
324
|
} catch ($p) {
|
|
323
325
|
var e = $p;
|
|
324
|
-
if (this.
|
|
326
|
+
if (this.i6_1 === 2) {
|
|
325
327
|
throw e;
|
|
326
328
|
} else {
|
|
327
|
-
this.
|
|
328
|
-
this.
|
|
329
|
+
this.h6_1 = this.i6_1;
|
|
330
|
+
this.k6_1 = e;
|
|
329
331
|
}
|
|
330
332
|
}
|
|
331
333
|
while (true);
|
|
332
334
|
};
|
|
333
335
|
function $getElevationsAlongCOROUTINE$(_this__u8e3s4, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, resultContinuation) {
|
|
334
336
|
CoroutineImpl.call(this, resultContinuation);
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
337
|
-
this.
|
|
338
|
-
this.
|
|
339
|
-
this.
|
|
340
|
-
this.
|
|
341
|
-
this.
|
|
342
|
-
this.
|
|
343
|
-
}
|
|
344
|
-
protoOf($getElevationsAlongCOROUTINE$).
|
|
345
|
-
var suspendResult = this.
|
|
337
|
+
this.dw_1 = _this__u8e3s4;
|
|
338
|
+
this.ew_1 = path;
|
|
339
|
+
this.fw_1 = zoomLevel;
|
|
340
|
+
this.gw_1 = step;
|
|
341
|
+
this.hw_1 = minDistance;
|
|
342
|
+
this.iw_1 = interpolation;
|
|
343
|
+
this.jw_1 = smoothingOptions;
|
|
344
|
+
this.kw_1 = filterOptions;
|
|
345
|
+
}
|
|
346
|
+
protoOf($getElevationsAlongCOROUTINE$).p6 = function () {
|
|
347
|
+
var suspendResult = this.j6_1;
|
|
346
348
|
$sm: do
|
|
347
349
|
try {
|
|
348
|
-
var tmp = this.
|
|
350
|
+
var tmp = this.h6_1;
|
|
349
351
|
switch (tmp) {
|
|
350
352
|
case 0:
|
|
351
|
-
this.
|
|
352
|
-
if (!(this.
|
|
353
|
+
this.i6_1 = 2;
|
|
354
|
+
if (!(this.ew_1.l() >= 2)) {
|
|
353
355
|
var message = 'Path must contain at least 2 coordinates';
|
|
354
356
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
355
357
|
}
|
|
356
358
|
|
|
357
|
-
if (!(this.
|
|
358
|
-
var message_0 = 'Step is too small: ' + formatNumber(this.
|
|
359
|
+
if (!(this.gw_1 > 1.0)) {
|
|
360
|
+
var message_0 = 'Step is too small: ' + formatNumber(this.dw_1, this.gw_1) + ' meters';
|
|
359
361
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
360
362
|
}
|
|
361
363
|
|
|
362
|
-
var densified = this.
|
|
363
|
-
this.
|
|
364
|
-
suspendResult = this.
|
|
364
|
+
var densified = this.dw_1.lw(this.ew_1, this.gw_1, this.hw_1);
|
|
365
|
+
this.h6_1 = 1;
|
|
366
|
+
suspendResult = this.dw_1.mw(densified, this.fw_1, this.iw_1, VOID, this);
|
|
365
367
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
366
368
|
return suspendResult;
|
|
367
369
|
}
|
|
@@ -370,9 +372,9 @@
|
|
|
370
372
|
case 1:
|
|
371
373
|
var withElevation = suspendResult;
|
|
372
374
|
var tmp_0;
|
|
373
|
-
var tmp1_safe_receiver = this.
|
|
374
|
-
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
375
|
-
tmp_0 = withElevation.
|
|
375
|
+
var tmp1_safe_receiver = this.jw_1;
|
|
376
|
+
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zt_1) === true) {
|
|
377
|
+
tmp_0 = withElevation.l() >= 3;
|
|
376
378
|
} else {
|
|
377
379
|
tmp_0 = false;
|
|
378
380
|
}
|
|
@@ -380,14 +382,14 @@
|
|
|
380
382
|
if (tmp_0) {
|
|
381
383
|
var tmp_1 = ElevationSmoother_instance;
|
|
382
384
|
var tmp_2 = withElevation;
|
|
383
|
-
var tmp0_elvis_lhs = this.
|
|
384
|
-
withElevation = tmp_1.
|
|
385
|
+
var tmp0_elvis_lhs = this.jw_1.yt_1;
|
|
386
|
+
withElevation = tmp_1.nw(tmp_2, tmp0_elvis_lhs == null ? 50.0 : tmp0_elvis_lhs);
|
|
385
387
|
}
|
|
386
388
|
|
|
387
389
|
var tmp_3;
|
|
388
|
-
var tmp4_safe_receiver = this.
|
|
389
|
-
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.
|
|
390
|
-
tmp_3 = withElevation.
|
|
390
|
+
var tmp4_safe_receiver = this.kw_1;
|
|
391
|
+
if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.cu_1) === true) {
|
|
392
|
+
tmp_3 = withElevation.l() > 2;
|
|
391
393
|
} else {
|
|
392
394
|
tmp_3 = false;
|
|
393
395
|
}
|
|
@@ -395,89 +397,89 @@
|
|
|
395
397
|
if (tmp_3) {
|
|
396
398
|
var tmp_4 = DouglasPeucker_instance;
|
|
397
399
|
var tmp_5 = withElevation;
|
|
398
|
-
var tmp2_elvis_lhs = this.
|
|
400
|
+
var tmp2_elvis_lhs = this.kw_1.au_1;
|
|
399
401
|
var tmp_6 = tmp2_elvis_lhs == null ? 10.0 : tmp2_elvis_lhs;
|
|
400
|
-
var tmp3_elvis_lhs = this.
|
|
401
|
-
withElevation = tmp_4.
|
|
402
|
+
var tmp3_elvis_lhs = this.kw_1.bu_1;
|
|
403
|
+
withElevation = tmp_4.ow(tmp_5, tmp_6, tmp3_elvis_lhs == null ? 3.0 : tmp3_elvis_lhs);
|
|
402
404
|
}
|
|
403
405
|
|
|
404
406
|
return withElevation;
|
|
405
407
|
case 2:
|
|
406
|
-
throw this.
|
|
408
|
+
throw this.k6_1;
|
|
407
409
|
}
|
|
408
410
|
} catch ($p) {
|
|
409
411
|
var e = $p;
|
|
410
|
-
if (this.
|
|
412
|
+
if (this.i6_1 === 2) {
|
|
411
413
|
throw e;
|
|
412
414
|
} else {
|
|
413
|
-
this.
|
|
414
|
-
this.
|
|
415
|
+
this.h6_1 = this.i6_1;
|
|
416
|
+
this.k6_1 = e;
|
|
415
417
|
}
|
|
416
418
|
}
|
|
417
419
|
while (true);
|
|
418
420
|
};
|
|
419
421
|
function BatchCalculator(calculator) {
|
|
420
|
-
this.
|
|
422
|
+
this.wu_1 = calculator;
|
|
421
423
|
}
|
|
422
|
-
protoOf(BatchCalculator).
|
|
424
|
+
protoOf(BatchCalculator).pw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) {
|
|
423
425
|
var tmp = new $setElevationsCOROUTINE$(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
424
|
-
tmp.
|
|
425
|
-
tmp.
|
|
426
|
-
return tmp.
|
|
426
|
+
tmp.j6_1 = Unit_instance;
|
|
427
|
+
tmp.k6_1 = null;
|
|
428
|
+
return tmp.p6();
|
|
427
429
|
};
|
|
428
|
-
protoOf(BatchCalculator).
|
|
430
|
+
protoOf(BatchCalculator).mw = function (coordinates, zoomLevel, interpolation, maxParallelTiles, $completion, $super) {
|
|
429
431
|
maxParallelTiles = maxParallelTiles === VOID ? 10 : maxParallelTiles;
|
|
430
|
-
return $super === VOID ? this.
|
|
432
|
+
return $super === VOID ? this.pw(coordinates, zoomLevel, interpolation, maxParallelTiles, $completion) : $super.pw.call(this, coordinates, zoomLevel, interpolation, maxParallelTiles, $completion);
|
|
431
433
|
};
|
|
432
|
-
protoOf(BatchCalculator).
|
|
434
|
+
protoOf(BatchCalculator).qw = function (path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
433
435
|
var tmp = new $getElevationsAlongCOROUTINE$(this, path, zoomLevel, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
434
|
-
tmp.
|
|
435
|
-
tmp.
|
|
436
|
-
return tmp.
|
|
436
|
+
tmp.j6_1 = Unit_instance;
|
|
437
|
+
tmp.k6_1 = null;
|
|
438
|
+
return tmp.p6();
|
|
437
439
|
};
|
|
438
|
-
protoOf(BatchCalculator).
|
|
439
|
-
if (path.
|
|
440
|
+
protoOf(BatchCalculator).lw = function (path, step, minDistance) {
|
|
441
|
+
if (path.n())
|
|
440
442
|
return emptyList();
|
|
441
|
-
var out = ArrayList_init_$Create$_0(imul(path.
|
|
443
|
+
var out = ArrayList_init_$Create$_0(imul(path.l(), 2));
|
|
442
444
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
443
|
-
var element = path.
|
|
444
|
-
out.
|
|
445
|
+
var element = path.m(0);
|
|
446
|
+
out.h(element);
|
|
445
447
|
var inductionVariable = 0;
|
|
446
|
-
var last = path.
|
|
448
|
+
var last = path.l() - 1 | 0;
|
|
447
449
|
if (inductionVariable < last)
|
|
448
450
|
$l$loop: do {
|
|
449
451
|
var i = inductionVariable;
|
|
450
452
|
inductionVariable = inductionVariable + 1 | 0;
|
|
451
|
-
var a = path.
|
|
452
|
-
var b = path.
|
|
453
|
-
var d = Distance_instance.
|
|
453
|
+
var a = path.m(i);
|
|
454
|
+
var b = path.m(i + 1 | 0);
|
|
455
|
+
var d = Distance_instance.rw(a, b);
|
|
454
456
|
if (d < minDistance)
|
|
455
457
|
continue $l$loop;
|
|
456
|
-
var between = this.
|
|
458
|
+
var between = this.sw(a, b, step, d);
|
|
457
459
|
var inductionVariable_0 = 1;
|
|
458
|
-
var last_0 = between.
|
|
460
|
+
var last_0 = between.l();
|
|
459
461
|
if (inductionVariable_0 < last_0)
|
|
460
462
|
do {
|
|
461
463
|
var j = inductionVariable_0;
|
|
462
464
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
463
465
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
464
|
-
var element_0 = between.
|
|
465
|
-
out.
|
|
466
|
+
var element_0 = between.m(j);
|
|
467
|
+
out.h(element_0);
|
|
466
468
|
}
|
|
467
469
|
while (inductionVariable_0 < last_0);
|
|
468
470
|
}
|
|
469
471
|
while (inductionVariable < last);
|
|
470
472
|
return out;
|
|
471
473
|
};
|
|
472
|
-
protoOf(BatchCalculator).
|
|
474
|
+
protoOf(BatchCalculator).sw = function (a, b, step, distance) {
|
|
473
475
|
if (distance <= step)
|
|
474
476
|
return listOf([a, b]);
|
|
475
477
|
var numSteps = numberToInt(distance / step);
|
|
476
478
|
var out = ArrayList_init_$Create$_0(numSteps + 2 | 0);
|
|
477
479
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
478
|
-
out.
|
|
479
|
-
var latDiff = b.
|
|
480
|
-
var lonDiff = b.
|
|
480
|
+
out.h(a);
|
|
481
|
+
var latDiff = b.av() - a.av();
|
|
482
|
+
var lonDiff = b.bv() - a.bv();
|
|
481
483
|
var inductionVariable = 1;
|
|
482
484
|
if (inductionVariable <= numSteps)
|
|
483
485
|
do {
|
|
@@ -485,47 +487,36 @@
|
|
|
485
487
|
inductionVariable = inductionVariable + 1 | 0;
|
|
486
488
|
var f = i * step / distance;
|
|
487
489
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
488
|
-
var element = new LatLon(a.
|
|
489
|
-
out.
|
|
490
|
+
var element = new LatLon(a.av() + latDiff * f, a.bv() + lonDiff * f);
|
|
491
|
+
out.h(element);
|
|
490
492
|
}
|
|
491
493
|
while (!(i === numSteps));
|
|
492
494
|
// Inline function 'kotlin.collections.plusAssign' call
|
|
493
|
-
out.
|
|
495
|
+
out.h(b);
|
|
494
496
|
return out;
|
|
495
497
|
};
|
|
496
|
-
function MathConstants() {
|
|
497
|
-
MathConstants_instance = this;
|
|
498
|
-
this.xv_1 = 3.141592653589793 / 180.0;
|
|
499
|
-
this.yv_1 = 180.0 / 3.141592653589793;
|
|
500
|
-
}
|
|
501
|
-
var MathConstants_instance;
|
|
502
|
-
function MathConstants_getInstance() {
|
|
503
|
-
if (MathConstants_instance == null)
|
|
504
|
-
new MathConstants();
|
|
505
|
-
return MathConstants_instance;
|
|
506
|
-
}
|
|
507
498
|
function LatLon(latitude, longitude, elevation) {
|
|
508
499
|
elevation = elevation === VOID ? null : elevation;
|
|
509
|
-
this.
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
500
|
+
this.tw_1 = latitude;
|
|
501
|
+
this.uw_1 = longitude;
|
|
502
|
+
this.vw_1 = elevation;
|
|
512
503
|
}
|
|
513
|
-
protoOf(LatLon).
|
|
514
|
-
return this.
|
|
504
|
+
protoOf(LatLon).av = function () {
|
|
505
|
+
return this.tw_1;
|
|
515
506
|
};
|
|
516
|
-
protoOf(LatLon).
|
|
517
|
-
return this.
|
|
507
|
+
protoOf(LatLon).bv = function () {
|
|
508
|
+
return this.uw_1;
|
|
518
509
|
};
|
|
519
|
-
protoOf(LatLon).
|
|
520
|
-
return this.
|
|
510
|
+
protoOf(LatLon).ww = function () {
|
|
511
|
+
return this.vw_1;
|
|
521
512
|
};
|
|
522
513
|
protoOf(LatLon).toString = function () {
|
|
523
|
-
return 'LatLon(latitude=' + this.
|
|
514
|
+
return 'LatLon(latitude=' + this.tw_1 + ', longitude=' + this.uw_1 + ', elevation=' + this.vw_1 + ')';
|
|
524
515
|
};
|
|
525
516
|
protoOf(LatLon).hashCode = function () {
|
|
526
|
-
var result = getNumberHashCode(this.
|
|
527
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
528
|
-
result = imul(result, 31) + (this.
|
|
517
|
+
var result = getNumberHashCode(this.tw_1);
|
|
518
|
+
result = imul(result, 31) + getNumberHashCode(this.uw_1) | 0;
|
|
519
|
+
result = imul(result, 31) + (this.vw_1 == null ? 0 : getNumberHashCode(this.vw_1)) | 0;
|
|
529
520
|
return result;
|
|
530
521
|
};
|
|
531
522
|
protoOf(LatLon).equals = function (other) {
|
|
@@ -533,35 +524,35 @@
|
|
|
533
524
|
return true;
|
|
534
525
|
if (!(other instanceof LatLon))
|
|
535
526
|
return false;
|
|
536
|
-
if (!equals(this.
|
|
527
|
+
if (!equals(this.tw_1, other.tw_1))
|
|
537
528
|
return false;
|
|
538
|
-
if (!equals(this.
|
|
529
|
+
if (!equals(this.uw_1, other.uw_1))
|
|
539
530
|
return false;
|
|
540
|
-
if (!equals(this.
|
|
531
|
+
if (!equals(this.vw_1, other.vw_1))
|
|
541
532
|
return false;
|
|
542
533
|
return true;
|
|
543
534
|
};
|
|
544
535
|
function LatLonElevation(latitude, longitude, elevation) {
|
|
545
|
-
this.
|
|
546
|
-
this.
|
|
547
|
-
this.
|
|
536
|
+
this.xw_1 = latitude;
|
|
537
|
+
this.yw_1 = longitude;
|
|
538
|
+
this.zw_1 = elevation;
|
|
548
539
|
}
|
|
549
|
-
protoOf(LatLonElevation).
|
|
550
|
-
return this.
|
|
540
|
+
protoOf(LatLonElevation).av = function () {
|
|
541
|
+
return this.xw_1;
|
|
551
542
|
};
|
|
552
|
-
protoOf(LatLonElevation).
|
|
553
|
-
return this.
|
|
543
|
+
protoOf(LatLonElevation).bv = function () {
|
|
544
|
+
return this.yw_1;
|
|
554
545
|
};
|
|
555
|
-
protoOf(LatLonElevation).
|
|
556
|
-
return this.
|
|
546
|
+
protoOf(LatLonElevation).ww = function () {
|
|
547
|
+
return this.zw_1;
|
|
557
548
|
};
|
|
558
549
|
protoOf(LatLonElevation).toString = function () {
|
|
559
|
-
return 'LatLonElevation(latitude=' + this.
|
|
550
|
+
return 'LatLonElevation(latitude=' + this.xw_1 + ', longitude=' + this.yw_1 + ', elevation=' + this.zw_1 + ')';
|
|
560
551
|
};
|
|
561
552
|
protoOf(LatLonElevation).hashCode = function () {
|
|
562
|
-
var result = getNumberHashCode(this.
|
|
563
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
564
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
553
|
+
var result = getNumberHashCode(this.xw_1);
|
|
554
|
+
result = imul(result, 31) + getNumberHashCode(this.yw_1) | 0;
|
|
555
|
+
result = imul(result, 31) + getNumberHashCode(this.zw_1) | 0;
|
|
565
556
|
return result;
|
|
566
557
|
};
|
|
567
558
|
protoOf(LatLonElevation).equals = function (other) {
|
|
@@ -569,21 +560,21 @@
|
|
|
569
560
|
return true;
|
|
570
561
|
if (!(other instanceof LatLonElevation))
|
|
571
562
|
return false;
|
|
572
|
-
if (!equals(this.
|
|
563
|
+
if (!equals(this.xw_1, other.xw_1))
|
|
573
564
|
return false;
|
|
574
|
-
if (!equals(this.
|
|
565
|
+
if (!equals(this.yw_1, other.yw_1))
|
|
575
566
|
return false;
|
|
576
|
-
if (!equals(this.
|
|
567
|
+
if (!equals(this.zw_1, other.zw_1))
|
|
577
568
|
return false;
|
|
578
569
|
return true;
|
|
579
570
|
};
|
|
580
571
|
function Distance() {
|
|
581
572
|
}
|
|
582
|
-
protoOf(Distance).
|
|
583
|
-
var lat1Rad = coord1.
|
|
584
|
-
var lat2Rad = coord2.
|
|
585
|
-
var deltaLat = (coord2.
|
|
586
|
-
var deltaLon = (coord2.
|
|
573
|
+
protoOf(Distance).rw = function (coord1, coord2) {
|
|
574
|
+
var lat1Rad = coord1.av() * 0.017453292519943295;
|
|
575
|
+
var lat2Rad = coord2.av() * 0.017453292519943295;
|
|
576
|
+
var deltaLat = (coord2.av() - coord1.av()) * 0.017453292519943295;
|
|
577
|
+
var deltaLon = (coord2.bv() - coord1.bv()) * 0.017453292519943295;
|
|
587
578
|
// Inline function 'kotlin.math.sin' call
|
|
588
579
|
var x = deltaLat / 2.0;
|
|
589
580
|
var sinHalfLat = Math.sin(x);
|
|
@@ -604,19 +595,19 @@
|
|
|
604
595
|
var c = 2.0 * Math.atan2(tmp0, x_2);
|
|
605
596
|
return 6371000.0 * c;
|
|
606
597
|
};
|
|
607
|
-
protoOf(Distance).
|
|
608
|
-
if (points.
|
|
598
|
+
protoOf(Distance).ax = function (points) {
|
|
599
|
+
if (points.n()) {
|
|
609
600
|
// Inline function 'kotlin.doubleArrayOf' call
|
|
610
601
|
return new Float64Array([0.0]);
|
|
611
602
|
}
|
|
612
|
-
var out = new Float64Array(points.
|
|
603
|
+
var out = new Float64Array(points.l());
|
|
613
604
|
var inductionVariable = 1;
|
|
614
|
-
var last = points.
|
|
605
|
+
var last = points.l();
|
|
615
606
|
if (inductionVariable < last)
|
|
616
607
|
do {
|
|
617
608
|
var i = inductionVariable;
|
|
618
609
|
inductionVariable = inductionVariable + 1 | 0;
|
|
619
|
-
out[i] = out[i - 1 | 0] + this.
|
|
610
|
+
out[i] = out[i - 1 | 0] + this.rw(points.m(i - 1 | 0), points.m(i));
|
|
620
611
|
}
|
|
621
612
|
while (inductionVariable < last);
|
|
622
613
|
return out;
|
|
@@ -625,9 +616,9 @@
|
|
|
625
616
|
function Distance_getInstance() {
|
|
626
617
|
return Distance_instance;
|
|
627
618
|
}
|
|
628
|
-
function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance,
|
|
629
|
-
var
|
|
630
|
-
var
|
|
619
|
+
function simplifyRecursive($this, points, firstIndex, lastIndex, tolerance, out) {
|
|
620
|
+
var first = points.m(firstIndex);
|
|
621
|
+
var last = points.m(lastIndex);
|
|
631
622
|
var maxDistance = 0.0;
|
|
632
623
|
var maxIndex = -1;
|
|
633
624
|
var inductionVariable = firstIndex + 1 | 0;
|
|
@@ -635,7 +626,7 @@
|
|
|
635
626
|
do {
|
|
636
627
|
var i = inductionVariable;
|
|
637
628
|
inductionVariable = inductionVariable + 1 | 0;
|
|
638
|
-
var d =
|
|
629
|
+
var d = points.m(i).ex(first, last);
|
|
639
630
|
if (d > maxDistance) {
|
|
640
631
|
maxDistance = d;
|
|
641
632
|
maxIndex = i;
|
|
@@ -644,30 +635,55 @@
|
|
|
644
635
|
while (inductionVariable < lastIndex);
|
|
645
636
|
if (maxDistance > tolerance && !(maxIndex === -1)) {
|
|
646
637
|
if ((maxIndex - firstIndex | 0) > 1) {
|
|
647
|
-
simplifyRecursive($this, points, firstIndex, maxIndex, tolerance,
|
|
638
|
+
simplifyRecursive($this, points, firstIndex, maxIndex, tolerance, out);
|
|
648
639
|
}
|
|
649
|
-
out.
|
|
640
|
+
out.h(maxIndex);
|
|
650
641
|
if ((lastIndex - maxIndex | 0) > 1) {
|
|
651
|
-
simplifyRecursive($this, points, maxIndex, lastIndex, tolerance,
|
|
642
|
+
simplifyRecursive($this, points, maxIndex, lastIndex, tolerance, out);
|
|
652
643
|
}
|
|
653
644
|
}
|
|
654
645
|
}
|
|
655
646
|
function DouglasPeucker() {
|
|
656
647
|
}
|
|
657
|
-
protoOf(DouglasPeucker).
|
|
658
|
-
if (points.
|
|
648
|
+
protoOf(DouglasPeucker).ow = function (points, tolerance, zExaggeration) {
|
|
649
|
+
if (points.l() <= 2)
|
|
659
650
|
return toList_0(points);
|
|
651
|
+
// Inline function 'kotlin.collections.map' call
|
|
652
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
653
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(points, 10));
|
|
654
|
+
var _iterator__ex2g4s = points.i();
|
|
655
|
+
while (_iterator__ex2g4s.j()) {
|
|
656
|
+
var item = _iterator__ex2g4s.k();
|
|
657
|
+
var tmp$ret$2 = EcefConverter_instance.fx(item, zExaggeration);
|
|
658
|
+
destination.h(tmp$ret$2);
|
|
659
|
+
}
|
|
660
|
+
var ecef = destination;
|
|
661
|
+
// Inline function 'kotlin.collections.map' call
|
|
662
|
+
var this_0 = this.gx(ecef, tolerance);
|
|
663
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
664
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
665
|
+
var _iterator__ex2g4s_0 = this_0.i();
|
|
666
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
667
|
+
var item_0 = _iterator__ex2g4s_0.k();
|
|
668
|
+
var tmp$ret$5 = points.m(item_0);
|
|
669
|
+
destination_0.h(tmp$ret$5);
|
|
670
|
+
}
|
|
671
|
+
return destination_0;
|
|
672
|
+
};
|
|
673
|
+
protoOf(DouglasPeucker).gx = function (points, tolerance) {
|
|
674
|
+
if (points.l() <= 2)
|
|
675
|
+
return toList_0(get_indices(points));
|
|
660
676
|
var lastIndex = get_lastIndex(points);
|
|
661
677
|
// Inline function 'kotlin.collections.buildList' call
|
|
662
678
|
// Inline function 'kotlin.collections.buildListInternal' call
|
|
663
|
-
var capacity = points.
|
|
679
|
+
var capacity = points.l();
|
|
664
680
|
checkBuilderCapacity(capacity);
|
|
665
681
|
// Inline function 'kotlin.apply' call
|
|
666
682
|
var this_0 = ArrayList_init_$Create$_0(capacity);
|
|
667
|
-
this_0.
|
|
668
|
-
simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance,
|
|
669
|
-
this_0.
|
|
670
|
-
return this_0.
|
|
683
|
+
this_0.h(0);
|
|
684
|
+
simplifyRecursive(DouglasPeucker_instance, points, 0, lastIndex, tolerance, this_0);
|
|
685
|
+
this_0.h(lastIndex);
|
|
686
|
+
return this_0.o3();
|
|
671
687
|
};
|
|
672
688
|
var DouglasPeucker_instance;
|
|
673
689
|
function DouglasPeucker_getInstance() {
|
|
@@ -675,10 +691,10 @@
|
|
|
675
691
|
}
|
|
676
692
|
function EcefConverter() {
|
|
677
693
|
}
|
|
678
|
-
protoOf(EcefConverter).
|
|
679
|
-
var latRad = coordinates.
|
|
680
|
-
var lonRad = coordinates.
|
|
681
|
-
var tmp0_elvis_lhs = coordinates.
|
|
694
|
+
protoOf(EcefConverter).fx = function (coordinates, zExaggeration) {
|
|
695
|
+
var latRad = coordinates.av() * 0.017453292519943295;
|
|
696
|
+
var lonRad = coordinates.bv() * 0.017453292519943295;
|
|
697
|
+
var tmp0_elvis_lhs = coordinates.ww();
|
|
682
698
|
var elevationExaggerated = zExaggeration * (tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs);
|
|
683
699
|
// Inline function 'kotlin.math.sin' call
|
|
684
700
|
var sinLat = Math.sin(latRad);
|
|
@@ -702,43 +718,43 @@
|
|
|
702
718
|
}
|
|
703
719
|
function getInterpolatedElevation($this, coords, zoomLevel, $completion) {
|
|
704
720
|
var tmp = new $getInterpolatedElevationCOROUTINE$($this, coords, zoomLevel, $completion);
|
|
705
|
-
tmp.
|
|
706
|
-
tmp.
|
|
707
|
-
return tmp.
|
|
721
|
+
tmp.j6_1 = Unit_instance;
|
|
722
|
+
tmp.k6_1 = null;
|
|
723
|
+
return tmp.p6();
|
|
708
724
|
}
|
|
709
725
|
function elevationFromPixel($this, pixel, $completion) {
|
|
710
726
|
var tmp = new $elevationFromPixelCOROUTINE$($this, pixel, $completion);
|
|
711
|
-
tmp.
|
|
712
|
-
tmp.
|
|
713
|
-
return tmp.
|
|
727
|
+
tmp.j6_1 = Unit_instance;
|
|
728
|
+
tmp.k6_1 = null;
|
|
729
|
+
return tmp.p6();
|
|
714
730
|
}
|
|
715
731
|
function $getElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, interpolation, resultContinuation) {
|
|
716
732
|
CoroutineImpl.call(this, resultContinuation);
|
|
717
|
-
this.
|
|
718
|
-
this.
|
|
719
|
-
this.
|
|
720
|
-
this.
|
|
733
|
+
this.uy_1 = _this__u8e3s4;
|
|
734
|
+
this.vy_1 = coords;
|
|
735
|
+
this.wy_1 = zoomLevel;
|
|
736
|
+
this.xy_1 = interpolation;
|
|
721
737
|
}
|
|
722
|
-
protoOf($getElevationCOROUTINE$).
|
|
723
|
-
var suspendResult = this.
|
|
738
|
+
protoOf($getElevationCOROUTINE$).p6 = function () {
|
|
739
|
+
var suspendResult = this.j6_1;
|
|
724
740
|
$sm: do
|
|
725
741
|
try {
|
|
726
|
-
var tmp = this.
|
|
742
|
+
var tmp = this.h6_1;
|
|
727
743
|
switch (tmp) {
|
|
728
744
|
case 0:
|
|
729
|
-
this.
|
|
730
|
-
this.
|
|
731
|
-
if (this.
|
|
732
|
-
this.
|
|
733
|
-
suspendResult = getInterpolatedElevation(this.
|
|
745
|
+
this.i6_1 = 5;
|
|
746
|
+
this.i6_1 = 4;
|
|
747
|
+
if (this.xy_1) {
|
|
748
|
+
this.h6_1 = 2;
|
|
749
|
+
suspendResult = getInterpolatedElevation(this.uy_1, this.vy_1, this.wy_1, this);
|
|
734
750
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
735
751
|
return suspendResult;
|
|
736
752
|
}
|
|
737
753
|
continue $sm;
|
|
738
754
|
} else {
|
|
739
|
-
var pixel = ElevationFunctions_instance.
|
|
740
|
-
this.
|
|
741
|
-
suspendResult = elevationFromPixel(this.
|
|
755
|
+
var pixel = ElevationFunctions_instance.az(this.vy_1, this.wy_1, this.uy_1.yu_1);
|
|
756
|
+
this.h6_1 = 1;
|
|
757
|
+
suspendResult = elevationFromPixel(this.uy_1, pixel, this);
|
|
742
758
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
743
759
|
return suspendResult;
|
|
744
760
|
}
|
|
@@ -746,100 +762,100 @@
|
|
|
746
762
|
}
|
|
747
763
|
|
|
748
764
|
case 1:
|
|
749
|
-
this.
|
|
750
|
-
this.
|
|
765
|
+
this.zy_1 = suspendResult;
|
|
766
|
+
this.h6_1 = 3;
|
|
751
767
|
continue $sm;
|
|
752
768
|
case 2:
|
|
753
|
-
this.
|
|
754
|
-
this.
|
|
769
|
+
this.zy_1 = suspendResult;
|
|
770
|
+
this.h6_1 = 3;
|
|
755
771
|
continue $sm;
|
|
756
772
|
case 3:
|
|
757
|
-
this.
|
|
758
|
-
this.
|
|
759
|
-
this.
|
|
773
|
+
this.yy_1 = this.zy_1;
|
|
774
|
+
this.i6_1 = 5;
|
|
775
|
+
this.h6_1 = 6;
|
|
760
776
|
continue $sm;
|
|
761
777
|
case 4:
|
|
762
|
-
this.
|
|
763
|
-
var tmp_0 = this.
|
|
778
|
+
this.i6_1 = 5;
|
|
779
|
+
var tmp_0 = this.k6_1;
|
|
764
780
|
if (tmp_0 instanceof Error) {
|
|
765
|
-
var t = this.
|
|
781
|
+
var t = this.k6_1;
|
|
766
782
|
var tmp_1 = this;
|
|
767
783
|
throw IllegalStateException_init_$Create$('Failed to get elevation: ' + t.message, t);
|
|
768
784
|
} else {
|
|
769
|
-
throw this.
|
|
785
|
+
throw this.k6_1;
|
|
770
786
|
}
|
|
771
787
|
|
|
772
788
|
case 5:
|
|
773
|
-
throw this.
|
|
789
|
+
throw this.k6_1;
|
|
774
790
|
case 6:
|
|
775
|
-
this.
|
|
776
|
-
return this.
|
|
791
|
+
this.i6_1 = 5;
|
|
792
|
+
return this.yy_1;
|
|
777
793
|
}
|
|
778
794
|
} catch ($p) {
|
|
779
795
|
var e = $p;
|
|
780
|
-
if (this.
|
|
796
|
+
if (this.i6_1 === 5) {
|
|
781
797
|
throw e;
|
|
782
798
|
} else {
|
|
783
|
-
this.
|
|
784
|
-
this.
|
|
799
|
+
this.h6_1 = this.i6_1;
|
|
800
|
+
this.k6_1 = e;
|
|
785
801
|
}
|
|
786
802
|
}
|
|
787
803
|
while (true);
|
|
788
804
|
};
|
|
789
805
|
function $getInterpolatedElevationCOROUTINE$(_this__u8e3s4, coords, zoomLevel, resultContinuation) {
|
|
790
806
|
CoroutineImpl.call(this, resultContinuation);
|
|
791
|
-
this.
|
|
792
|
-
this.
|
|
793
|
-
this.
|
|
807
|
+
this.px_1 = _this__u8e3s4;
|
|
808
|
+
this.qx_1 = coords;
|
|
809
|
+
this.rx_1 = zoomLevel;
|
|
794
810
|
}
|
|
795
|
-
protoOf($getInterpolatedElevationCOROUTINE$).
|
|
796
|
-
var suspendResult = this.
|
|
811
|
+
protoOf($getInterpolatedElevationCOROUTINE$).p6 = function () {
|
|
812
|
+
var suspendResult = this.j6_1;
|
|
797
813
|
$sm: do
|
|
798
814
|
try {
|
|
799
|
-
var tmp = this.
|
|
815
|
+
var tmp = this.h6_1;
|
|
800
816
|
switch (tmp) {
|
|
801
817
|
case 0:
|
|
802
|
-
this.
|
|
803
|
-
this.
|
|
818
|
+
this.i6_1 = 5;
|
|
819
|
+
this.zx_1 = ElevationFunctions_instance.bz(this.qx_1, this.rx_1, this.px_1.yu_1);
|
|
804
820
|
var tmp_0 = this;
|
|
805
|
-
var x = this.
|
|
806
|
-
tmp_0.
|
|
821
|
+
var x = this.zx_1.dz_1;
|
|
822
|
+
tmp_0.ay_1 = numberToInt(Math.floor(x));
|
|
807
823
|
var tmp_1 = this;
|
|
808
|
-
var x_0 = this.
|
|
809
|
-
tmp_1.
|
|
810
|
-
this.
|
|
811
|
-
this.
|
|
812
|
-
this.
|
|
813
|
-
this.
|
|
814
|
-
this.
|
|
815
|
-
suspendResult = elevationFromPixel(this.
|
|
824
|
+
var x_0 = this.zx_1.ez_1;
|
|
825
|
+
tmp_1.by_1 = numberToInt(Math.floor(x_0));
|
|
826
|
+
this.yx_1 = this.ay_1 + 1 | 0;
|
|
827
|
+
this.xx_1 = this.by_1 + 1 | 0;
|
|
828
|
+
this.tx_1 = this.zx_1.dz_1 - this.ay_1;
|
|
829
|
+
this.sx_1 = this.zx_1.ez_1 - this.by_1;
|
|
830
|
+
this.h6_1 = 1;
|
|
831
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.by_1), this.px_1.yu_1), this);
|
|
816
832
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
817
833
|
return suspendResult;
|
|
818
834
|
}
|
|
819
835
|
|
|
820
836
|
continue $sm;
|
|
821
837
|
case 1:
|
|
822
|
-
this.
|
|
823
|
-
this.
|
|
824
|
-
suspendResult = elevationFromPixel(this.
|
|
838
|
+
this.wx_1 = suspendResult;
|
|
839
|
+
this.h6_1 = 2;
|
|
840
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.by_1), this.px_1.yu_1), this);
|
|
825
841
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
826
842
|
return suspendResult;
|
|
827
843
|
}
|
|
828
844
|
|
|
829
845
|
continue $sm;
|
|
830
846
|
case 2:
|
|
831
|
-
this.
|
|
832
|
-
this.
|
|
833
|
-
suspendResult = elevationFromPixel(this.
|
|
847
|
+
this.vx_1 = suspendResult;
|
|
848
|
+
this.h6_1 = 3;
|
|
849
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.ay_1, this.xx_1), this.px_1.yu_1), this);
|
|
834
850
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
835
851
|
return suspendResult;
|
|
836
852
|
}
|
|
837
853
|
|
|
838
854
|
continue $sm;
|
|
839
855
|
case 3:
|
|
840
|
-
this.
|
|
841
|
-
this.
|
|
842
|
-
suspendResult = elevationFromPixel(this.
|
|
856
|
+
this.ux_1 = suspendResult;
|
|
857
|
+
this.h6_1 = 4;
|
|
858
|
+
suspendResult = elevationFromPixel(this.px_1, ElevationFunctions_instance.fz(new Pixel(this.zx_1.cz_1, this.yx_1, this.xx_1), this.px_1.yu_1), this);
|
|
843
859
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
844
860
|
return suspendResult;
|
|
845
861
|
}
|
|
@@ -847,69 +863,69 @@
|
|
|
847
863
|
continue $sm;
|
|
848
864
|
case 4:
|
|
849
865
|
var p11 = suspendResult;
|
|
850
|
-
var top = this.
|
|
851
|
-
var bottom = this.
|
|
852
|
-
return top * (1.0 - this.
|
|
866
|
+
var top = this.wx_1 * (1.0 - this.tx_1) + this.vx_1 * this.tx_1;
|
|
867
|
+
var bottom = this.ux_1 * (1.0 - this.tx_1) + p11 * this.tx_1;
|
|
868
|
+
return top * (1.0 - this.sx_1) + bottom * this.sx_1;
|
|
853
869
|
case 5:
|
|
854
|
-
throw this.
|
|
870
|
+
throw this.k6_1;
|
|
855
871
|
}
|
|
856
872
|
} catch ($p) {
|
|
857
873
|
var e = $p;
|
|
858
|
-
if (this.
|
|
874
|
+
if (this.i6_1 === 5) {
|
|
859
875
|
throw e;
|
|
860
876
|
} else {
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
877
|
+
this.h6_1 = this.i6_1;
|
|
878
|
+
this.k6_1 = e;
|
|
863
879
|
}
|
|
864
880
|
}
|
|
865
881
|
while (true);
|
|
866
882
|
};
|
|
867
883
|
function $elevationFromPixelCOROUTINE$(_this__u8e3s4, pixel, resultContinuation) {
|
|
868
884
|
CoroutineImpl.call(this, resultContinuation);
|
|
869
|
-
this.
|
|
870
|
-
this.
|
|
885
|
+
this.ky_1 = _this__u8e3s4;
|
|
886
|
+
this.ly_1 = pixel;
|
|
871
887
|
}
|
|
872
|
-
protoOf($elevationFromPixelCOROUTINE$).
|
|
873
|
-
var suspendResult = this.
|
|
888
|
+
protoOf($elevationFromPixelCOROUTINE$).p6 = function () {
|
|
889
|
+
var suspendResult = this.j6_1;
|
|
874
890
|
$sm: do
|
|
875
891
|
try {
|
|
876
|
-
var tmp = this.
|
|
892
|
+
var tmp = this.h6_1;
|
|
877
893
|
switch (tmp) {
|
|
878
894
|
case 0:
|
|
879
|
-
this.
|
|
880
|
-
this.
|
|
881
|
-
suspendResult = this.
|
|
895
|
+
this.i6_1 = 2;
|
|
896
|
+
this.h6_1 = 1;
|
|
897
|
+
suspendResult = this.ky_1.xu_1.mz(this.ly_1.gz_1, this);
|
|
882
898
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
883
899
|
return suspendResult;
|
|
884
900
|
}
|
|
885
901
|
|
|
886
902
|
continue $sm;
|
|
887
903
|
case 1:
|
|
888
|
-
return suspendResult.
|
|
904
|
+
return suspendResult.sz(this.ly_1);
|
|
889
905
|
case 2:
|
|
890
|
-
throw this.
|
|
906
|
+
throw this.k6_1;
|
|
891
907
|
}
|
|
892
908
|
} catch ($p) {
|
|
893
909
|
var e = $p;
|
|
894
|
-
if (this.
|
|
910
|
+
if (this.i6_1 === 2) {
|
|
895
911
|
throw e;
|
|
896
912
|
} else {
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
913
|
+
this.h6_1 = this.i6_1;
|
|
914
|
+
this.k6_1 = e;
|
|
899
915
|
}
|
|
900
916
|
}
|
|
901
917
|
while (true);
|
|
902
918
|
};
|
|
903
919
|
function ElevationCalculator(tileManager, tileSize) {
|
|
904
920
|
tileSize = tileSize === VOID ? 256 : tileSize;
|
|
905
|
-
this.
|
|
906
|
-
this.
|
|
921
|
+
this.xu_1 = tileManager;
|
|
922
|
+
this.yu_1 = tileSize;
|
|
907
923
|
}
|
|
908
|
-
protoOf(ElevationCalculator).
|
|
924
|
+
protoOf(ElevationCalculator).zu = function (coords, zoomLevel, interpolation, $completion) {
|
|
909
925
|
var tmp = new $getElevationCOROUTINE$(this, coords, zoomLevel, interpolation, $completion);
|
|
910
|
-
tmp.
|
|
911
|
-
tmp.
|
|
912
|
-
return tmp.
|
|
926
|
+
tmp.j6_1 = Unit_instance;
|
|
927
|
+
tmp.k6_1 = null;
|
|
928
|
+
return tmp.p6();
|
|
913
929
|
};
|
|
914
930
|
function formatNumber_0($this, d) {
|
|
915
931
|
var asLong = numberToLong(d);
|
|
@@ -917,24 +933,24 @@
|
|
|
917
933
|
}
|
|
918
934
|
function ElevationFunctions() {
|
|
919
935
|
}
|
|
920
|
-
protoOf(ElevationFunctions).
|
|
921
|
-
return degrees *
|
|
936
|
+
protoOf(ElevationFunctions).tz = function (degrees) {
|
|
937
|
+
return degrees * 0.017453292519943295;
|
|
922
938
|
};
|
|
923
|
-
protoOf(ElevationFunctions).
|
|
939
|
+
protoOf(ElevationFunctions).uz = function (lat) {
|
|
924
940
|
return lat >= -85.0511 && lat <= 85.0511;
|
|
925
941
|
};
|
|
926
|
-
protoOf(ElevationFunctions).
|
|
942
|
+
protoOf(ElevationFunctions).vz = function (lon) {
|
|
927
943
|
return -180.0 <= lon ? lon <= 180.0 : false;
|
|
928
944
|
};
|
|
929
|
-
protoOf(ElevationFunctions).
|
|
945
|
+
protoOf(ElevationFunctions).wz = function (zoom) {
|
|
930
946
|
return 0 <= zoom ? zoom <= 15 : false;
|
|
931
947
|
};
|
|
932
|
-
protoOf(ElevationFunctions).
|
|
933
|
-
var x = pixel.
|
|
934
|
-
var y = pixel.
|
|
935
|
-
var tileX = pixel.
|
|
936
|
-
var tileY = pixel.
|
|
937
|
-
var z = pixel.
|
|
948
|
+
protoOf(ElevationFunctions).fz = function (pixel, tileSize) {
|
|
949
|
+
var x = pixel.hz_1;
|
|
950
|
+
var y = pixel.iz_1;
|
|
951
|
+
var tileX = pixel.gz_1.rv_1;
|
|
952
|
+
var tileY = pixel.gz_1.sv_1;
|
|
953
|
+
var z = pixel.gz_1.tv_1;
|
|
938
954
|
if (x < 0) {
|
|
939
955
|
x = x + tileSize | 0;
|
|
940
956
|
tileX = tileX - 1 | 0;
|
|
@@ -956,25 +972,25 @@
|
|
|
956
972
|
tileY = coerceIn(tileY, 0, maxTile);
|
|
957
973
|
return new Pixel(new TileCoordinates(tileX, tileY, z), x, y);
|
|
958
974
|
};
|
|
959
|
-
protoOf(ElevationFunctions).
|
|
975
|
+
protoOf(ElevationFunctions).xz = function (coords, z) {
|
|
960
976
|
// Inline function 'kotlin.require' call
|
|
961
|
-
if (!this.
|
|
962
|
-
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
977
|
+
if (!this.uz(coords.av())) {
|
|
978
|
+
var message = 'Invalid latitude: ' + formatNumber_0(ElevationFunctions_instance, coords.av()) + '. Must be between -85.0511 and 85.0511';
|
|
963
979
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
964
980
|
}
|
|
965
981
|
// Inline function 'kotlin.require' call
|
|
966
|
-
if (!this.
|
|
967
|
-
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.
|
|
982
|
+
if (!this.vz(coords.bv())) {
|
|
983
|
+
var message_0 = 'Invalid longitude: ' + formatNumber_0(ElevationFunctions_instance, coords.bv()) + '. Must be between -180 and 180';
|
|
968
984
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
969
985
|
}
|
|
970
986
|
// Inline function 'kotlin.require' call
|
|
971
|
-
if (!this.
|
|
987
|
+
if (!this.wz(z)) {
|
|
972
988
|
var message_1 = 'Invalid zoom level: ' + z + '. Must be between 0 and 15';
|
|
973
989
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
974
990
|
}
|
|
975
|
-
var lat = this.
|
|
991
|
+
var lat = this.tz(coords.av());
|
|
976
992
|
var n = 1 << z;
|
|
977
|
-
var xFloat = (coords.
|
|
993
|
+
var xFloat = (coords.bv() + 180.0) / 360.0 * n;
|
|
978
994
|
// Inline function 'kotlin.math.tan' call
|
|
979
995
|
var tmp = Math.tan(lat);
|
|
980
996
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -990,27 +1006,27 @@
|
|
|
990
1006
|
var y = coerceIn(numberToInt(tmp$ret$10), 0, maxTile);
|
|
991
1007
|
return new TileCoordinatesFloat(x_0, y, xFloat, yFloat, z);
|
|
992
1008
|
};
|
|
993
|
-
protoOf(ElevationFunctions).
|
|
994
|
-
var tile = this.
|
|
995
|
-
return new TileCoordinates(tile.
|
|
1009
|
+
protoOf(ElevationFunctions).qv = function (coords, z) {
|
|
1010
|
+
var tile = this.xz(coords, z);
|
|
1011
|
+
return new TileCoordinates(tile.yz_1, tile.zz_1, tile.c10_1);
|
|
996
1012
|
};
|
|
997
|
-
protoOf(ElevationFunctions).
|
|
998
|
-
var tile = this.
|
|
1013
|
+
protoOf(ElevationFunctions).az = function (coords, z, tileSize) {
|
|
1014
|
+
var tile = this.xz(coords, z);
|
|
999
1015
|
// Inline function 'kotlin.math.floor' call
|
|
1000
|
-
var x = (tile.
|
|
1016
|
+
var x = (tile.a10_1 - tile.yz_1) * tileSize;
|
|
1001
1017
|
var tmp$ret$0 = Math.floor(x);
|
|
1002
1018
|
var px = coerceIn(numberToInt(tmp$ret$0), 0, tileSize - 1 | 0);
|
|
1003
1019
|
// Inline function 'kotlin.math.floor' call
|
|
1004
|
-
var x_0 = (tile.
|
|
1020
|
+
var x_0 = (tile.b10_1 - tile.zz_1) * tileSize;
|
|
1005
1021
|
var tmp$ret$1 = Math.floor(x_0);
|
|
1006
1022
|
var py = coerceIn(numberToInt(tmp$ret$1), 0, tileSize - 1 | 0);
|
|
1007
|
-
return new Pixel(new TileCoordinates(tile.
|
|
1023
|
+
return new Pixel(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
|
|
1008
1024
|
};
|
|
1009
|
-
protoOf(ElevationFunctions).
|
|
1010
|
-
var tile = this.
|
|
1011
|
-
var px = (tile.
|
|
1012
|
-
var py = (tile.
|
|
1013
|
-
return new PixelFloat(new TileCoordinates(tile.
|
|
1025
|
+
protoOf(ElevationFunctions).bz = function (coords, z, tileSize) {
|
|
1026
|
+
var tile = this.xz(coords, z);
|
|
1027
|
+
var px = (tile.a10_1 - tile.yz_1) * tileSize;
|
|
1028
|
+
var py = (tile.b10_1 - tile.zz_1) * tileSize;
|
|
1029
|
+
return new PixelFloat(new TileCoordinates(tile.yz_1, tile.zz_1, z), px, py);
|
|
1014
1030
|
};
|
|
1015
1031
|
var ElevationFunctions_instance;
|
|
1016
1032
|
function ElevationFunctions_getInstance() {
|
|
@@ -1019,11 +1035,11 @@
|
|
|
1019
1035
|
function fetchAndDecodeTile$ref() {
|
|
1020
1036
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1021
1037
|
}
|
|
1022
|
-
protoOf(fetchAndDecodeTile$ref).
|
|
1038
|
+
protoOf(fetchAndDecodeTile$ref).g10 = function (p0, $completion) {
|
|
1023
1039
|
return fetchAndDecodeTile(p0, $completion);
|
|
1024
1040
|
};
|
|
1025
|
-
protoOf(fetchAndDecodeTile$ref).
|
|
1026
|
-
return this.
|
|
1041
|
+
protoOf(fetchAndDecodeTile$ref).x6 = function (p1, $completion) {
|
|
1042
|
+
return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1027
1043
|
};
|
|
1028
1044
|
function ElevationProvider(config, fetcher) {
|
|
1029
1045
|
config = config === VOID ? new ElevationProviderConfig() : config;
|
|
@@ -1034,39 +1050,39 @@
|
|
|
1034
1050
|
tmp = fetcher;
|
|
1035
1051
|
}
|
|
1036
1052
|
fetcher = tmp;
|
|
1037
|
-
this.
|
|
1038
|
-
var containsArg = this.
|
|
1053
|
+
this.h10_1 = config;
|
|
1054
|
+
var containsArg = this.h10_1.l10_1;
|
|
1039
1055
|
// Inline function 'kotlin.require' call
|
|
1040
1056
|
if (!(0 <= containsArg ? containsArg <= 15 : false)) {
|
|
1041
|
-
var message = 'Invalid zoom level: ' + this.
|
|
1057
|
+
var message = 'Invalid zoom level: ' + this.h10_1.l10_1 + '. Must be an integer between 0 and 15';
|
|
1042
1058
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1043
1059
|
}
|
|
1044
1060
|
// Inline function 'kotlin.require' call
|
|
1045
|
-
if (!(this.
|
|
1046
|
-
var message_0 = 'Invalid cache size: ' + this.
|
|
1061
|
+
if (!(this.h10_1.m10_1 > 0)) {
|
|
1062
|
+
var message_0 = 'Invalid cache size: ' + this.h10_1.m10_1 + '. Must be a positive integer';
|
|
1047
1063
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1048
1064
|
}
|
|
1049
1065
|
// Inline function 'kotlin.require' call
|
|
1050
|
-
if (!(this.
|
|
1051
|
-
var message_1 = 'Invalid tile size: ' + this.
|
|
1066
|
+
if (!(this.h10_1.o10_1 > 0 && (this.h10_1.o10_1 & (this.h10_1.o10_1 - 1 | 0)) === 0)) {
|
|
1067
|
+
var message_1 = 'Invalid tile size: ' + this.h10_1.o10_1 + '. Must be a positive power of 2';
|
|
1052
1068
|
throw IllegalArgumentException_init_$Create$(toString(message_1));
|
|
1053
1069
|
}
|
|
1054
|
-
this.
|
|
1055
|
-
this.
|
|
1056
|
-
this.
|
|
1070
|
+
this.i10_1 = new TileManager(this.h10_1.n10_1, this.h10_1.m10_1, fetcher);
|
|
1071
|
+
this.j10_1 = new ElevationCalculator(this.i10_1, this.h10_1.o10_1);
|
|
1072
|
+
this.k10_1 = new BatchCalculator(this.j10_1);
|
|
1057
1073
|
}
|
|
1058
|
-
protoOf(ElevationProvider).
|
|
1059
|
-
return this.
|
|
1074
|
+
protoOf(ElevationProvider).q10 = function (latitude, longitude, interpolation, $completion) {
|
|
1075
|
+
return this.j10_1.zu(new LatLon(latitude, longitude), this.h10_1.l10_1, interpolation, $completion);
|
|
1060
1076
|
};
|
|
1061
|
-
protoOf(ElevationProvider).
|
|
1062
|
-
return this.
|
|
1077
|
+
protoOf(ElevationProvider).r10 = function (coordinates, interpolation, $completion) {
|
|
1078
|
+
return this.k10_1.mw(coordinates, this.h10_1.l10_1, interpolation, VOID, $completion);
|
|
1063
1079
|
};
|
|
1064
|
-
protoOf(ElevationProvider).
|
|
1080
|
+
protoOf(ElevationProvider).s10 = function (coordinates, interpolation, $completion, $super) {
|
|
1065
1081
|
interpolation = interpolation === VOID ? true : interpolation;
|
|
1066
|
-
return $super === VOID ? this.
|
|
1082
|
+
return $super === VOID ? this.r10(coordinates, interpolation, $completion) : $super.r10.call(this, coordinates, interpolation, $completion);
|
|
1067
1083
|
};
|
|
1068
|
-
protoOf(ElevationProvider).
|
|
1069
|
-
return this.
|
|
1084
|
+
protoOf(ElevationProvider).t10 = function (path, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion) {
|
|
1085
|
+
return this.k10_1.qw(path, this.h10_1.l10_1, step, minDistance, interpolation, smoothingOptions, filterOptions, $completion);
|
|
1070
1086
|
};
|
|
1071
1087
|
function ElevationProviderConfig(zoomLevel, cacheSize, tileUrlTemplate, tileSize, attribution) {
|
|
1072
1088
|
zoomLevel = zoomLevel === VOID ? 12 : zoomLevel;
|
|
@@ -1074,21 +1090,21 @@
|
|
|
1074
1090
|
tileUrlTemplate = tileUrlTemplate === VOID ? 'https://tiles.mapterhorn.com/{z}/{x}/{y}.webp' : tileUrlTemplate;
|
|
1075
1091
|
tileSize = tileSize === VOID ? 512 : tileSize;
|
|
1076
1092
|
attribution = attribution === VOID ? new Attribution('Mapterhorn elevation data. See mapterhorn.com/attribution/ for details.', 'https://mapterhorn.com/attribution/') : attribution;
|
|
1077
|
-
this.
|
|
1078
|
-
this.
|
|
1079
|
-
this.
|
|
1080
|
-
this.
|
|
1081
|
-
this.
|
|
1093
|
+
this.l10_1 = zoomLevel;
|
|
1094
|
+
this.m10_1 = cacheSize;
|
|
1095
|
+
this.n10_1 = tileUrlTemplate;
|
|
1096
|
+
this.o10_1 = tileSize;
|
|
1097
|
+
this.p10_1 = attribution;
|
|
1082
1098
|
}
|
|
1083
1099
|
protoOf(ElevationProviderConfig).toString = function () {
|
|
1084
|
-
return 'ElevationProviderConfig(zoomLevel=' + this.
|
|
1100
|
+
return 'ElevationProviderConfig(zoomLevel=' + this.l10_1 + ', cacheSize=' + this.m10_1 + ', tileUrlTemplate=' + this.n10_1 + ', tileSize=' + this.o10_1 + ', attribution=' + this.p10_1.toString() + ')';
|
|
1085
1101
|
};
|
|
1086
1102
|
protoOf(ElevationProviderConfig).hashCode = function () {
|
|
1087
|
-
var result = this.
|
|
1088
|
-
result = imul(result, 31) + this.
|
|
1089
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
1090
|
-
result = imul(result, 31) + this.
|
|
1091
|
-
result = imul(result, 31) + this.
|
|
1103
|
+
var result = this.l10_1;
|
|
1104
|
+
result = imul(result, 31) + this.m10_1 | 0;
|
|
1105
|
+
result = imul(result, 31) + getStringHashCode(this.n10_1) | 0;
|
|
1106
|
+
result = imul(result, 31) + this.o10_1 | 0;
|
|
1107
|
+
result = imul(result, 31) + this.p10_1.hashCode() | 0;
|
|
1092
1108
|
return result;
|
|
1093
1109
|
};
|
|
1094
1110
|
protoOf(ElevationProviderConfig).equals = function (other) {
|
|
@@ -1096,29 +1112,29 @@
|
|
|
1096
1112
|
return true;
|
|
1097
1113
|
if (!(other instanceof ElevationProviderConfig))
|
|
1098
1114
|
return false;
|
|
1099
|
-
if (!(this.
|
|
1115
|
+
if (!(this.l10_1 === other.l10_1))
|
|
1100
1116
|
return false;
|
|
1101
|
-
if (!(this.
|
|
1117
|
+
if (!(this.m10_1 === other.m10_1))
|
|
1102
1118
|
return false;
|
|
1103
|
-
if (!(this.
|
|
1119
|
+
if (!(this.n10_1 === other.n10_1))
|
|
1104
1120
|
return false;
|
|
1105
|
-
if (!(this.
|
|
1121
|
+
if (!(this.o10_1 === other.o10_1))
|
|
1106
1122
|
return false;
|
|
1107
|
-
if (!this.
|
|
1123
|
+
if (!this.p10_1.equals(other.p10_1))
|
|
1108
1124
|
return false;
|
|
1109
1125
|
return true;
|
|
1110
1126
|
};
|
|
1111
1127
|
function Attribution(text, url) {
|
|
1112
1128
|
url = url === VOID ? null : url;
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1129
|
+
this.u10_1 = text;
|
|
1130
|
+
this.v10_1 = url;
|
|
1115
1131
|
}
|
|
1116
1132
|
protoOf(Attribution).toString = function () {
|
|
1117
|
-
return 'Attribution(text=' + this.
|
|
1133
|
+
return 'Attribution(text=' + this.u10_1 + ', url=' + this.v10_1 + ')';
|
|
1118
1134
|
};
|
|
1119
1135
|
protoOf(Attribution).hashCode = function () {
|
|
1120
|
-
var result = getStringHashCode(this.
|
|
1121
|
-
result = imul(result, 31) + (this.
|
|
1136
|
+
var result = getStringHashCode(this.u10_1);
|
|
1137
|
+
result = imul(result, 31) + (this.v10_1 == null ? 0 : getStringHashCode(this.v10_1)) | 0;
|
|
1122
1138
|
return result;
|
|
1123
1139
|
};
|
|
1124
1140
|
protoOf(Attribution).equals = function (other) {
|
|
@@ -1126,9 +1142,9 @@
|
|
|
1126
1142
|
return true;
|
|
1127
1143
|
if (!(other instanceof Attribution))
|
|
1128
1144
|
return false;
|
|
1129
|
-
if (!(this.
|
|
1145
|
+
if (!(this.u10_1 === other.u10_1))
|
|
1130
1146
|
return false;
|
|
1131
|
-
if (!(this.
|
|
1147
|
+
if (!(this.v10_1 == other.v10_1))
|
|
1132
1148
|
return false;
|
|
1133
1149
|
return true;
|
|
1134
1150
|
};
|
|
@@ -1139,7 +1155,7 @@
|
|
|
1139
1155
|
startIndex = startIndex - 1 | 0;
|
|
1140
1156
|
}
|
|
1141
1157
|
var endIndex = index;
|
|
1142
|
-
while (endIndex < (points.
|
|
1158
|
+
while (endIndex < (points.l() - 1 | 0) && distances[endIndex + 1 | 0] - current <= windowSize) {
|
|
1143
1159
|
endIndex = endIndex + 1 | 0;
|
|
1144
1160
|
}
|
|
1145
1161
|
var totalWeight = 0.0;
|
|
@@ -1155,10 +1171,10 @@
|
|
|
1155
1171
|
var d = Math.abs(this_0);
|
|
1156
1172
|
var weight = 1.0 - d / windowSize;
|
|
1157
1173
|
totalWeight = totalWeight + weight;
|
|
1158
|
-
weightedSum = weightedSum + points.
|
|
1174
|
+
weightedSum = weightedSum + points.m(j).ww() * weight;
|
|
1159
1175
|
}
|
|
1160
1176
|
while (!(j === last));
|
|
1161
|
-
return totalWeight > 0.0 ? weightedSum / totalWeight : points.
|
|
1177
|
+
return totalWeight > 0.0 ? weightedSum / totalWeight : points.m(index).ww();
|
|
1162
1178
|
}
|
|
1163
1179
|
function formatWindow($this, w) {
|
|
1164
1180
|
var asLong = numberToLong(w);
|
|
@@ -1166,18 +1182,18 @@
|
|
|
1166
1182
|
}
|
|
1167
1183
|
function ElevationSmoother() {
|
|
1168
1184
|
}
|
|
1169
|
-
protoOf(ElevationSmoother).
|
|
1170
|
-
if (points.
|
|
1185
|
+
protoOf(ElevationSmoother).nw = function (points, windowSize) {
|
|
1186
|
+
if (points.l() < 3)
|
|
1171
1187
|
return points;
|
|
1172
1188
|
// Inline function 'kotlin.require' call
|
|
1173
1189
|
if (!(windowSize > 0.0)) {
|
|
1174
1190
|
var message = 'Invalid window size: ' + formatWindow(ElevationSmoother_instance, windowSize) + '. Must be positive';
|
|
1175
1191
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1176
1192
|
}
|
|
1177
|
-
var distances = Distance_instance.
|
|
1193
|
+
var distances = Distance_instance.ax(points);
|
|
1178
1194
|
// Inline function 'kotlin.collections.List' call
|
|
1179
1195
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1180
|
-
var size = points.
|
|
1196
|
+
var size = points.l();
|
|
1181
1197
|
var list = ArrayList_init_$Create$_0(size);
|
|
1182
1198
|
// Inline function 'kotlin.repeat' call
|
|
1183
1199
|
var inductionVariable = 0;
|
|
@@ -1186,8 +1202,8 @@
|
|
|
1186
1202
|
var index = inductionVariable;
|
|
1187
1203
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1188
1204
|
var smoothed = computeSmoothedValue(ElevationSmoother_instance, index, points, distances, windowSize);
|
|
1189
|
-
var tmp$ret$6 = new LatLonElevation(points.
|
|
1190
|
-
list.
|
|
1205
|
+
var tmp$ret$6 = new LatLonElevation(points.m(index).av(), points.m(index).bv(), smoothed);
|
|
1206
|
+
list.h(tmp$ret$6);
|
|
1191
1207
|
}
|
|
1192
1208
|
while (inductionVariable < size);
|
|
1193
1209
|
return list;
|
|
@@ -1197,120 +1213,120 @@
|
|
|
1197
1213
|
return ElevationSmoother_instance;
|
|
1198
1214
|
}
|
|
1199
1215
|
function Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation) {
|
|
1200
|
-
this.
|
|
1201
|
-
this.
|
|
1202
|
-
this.
|
|
1216
|
+
this.e11_1 = $semaphore;
|
|
1217
|
+
this.f11_1 = $action;
|
|
1218
|
+
this.g11_1 = $item;
|
|
1203
1219
|
CoroutineImpl.call(this, resultContinuation);
|
|
1204
1220
|
}
|
|
1205
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1206
|
-
var tmp = this.
|
|
1207
|
-
tmp.
|
|
1208
|
-
tmp.
|
|
1209
|
-
return tmp.
|
|
1221
|
+
protoOf(Flux$forEachParallel$slambda$slambda).k11 = function ($this$async, $completion) {
|
|
1222
|
+
var tmp = this.l11($this$async, $completion);
|
|
1223
|
+
tmp.j6_1 = Unit_instance;
|
|
1224
|
+
tmp.k6_1 = null;
|
|
1225
|
+
return tmp.p6();
|
|
1210
1226
|
};
|
|
1211
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1212
|
-
return this.
|
|
1227
|
+
protoOf(Flux$forEachParallel$slambda$slambda).x6 = function (p1, $completion) {
|
|
1228
|
+
return this.k11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1213
1229
|
};
|
|
1214
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1215
|
-
var suspendResult = this.
|
|
1230
|
+
protoOf(Flux$forEachParallel$slambda$slambda).p6 = function () {
|
|
1231
|
+
var suspendResult = this.j6_1;
|
|
1216
1232
|
$sm: do
|
|
1217
1233
|
try {
|
|
1218
|
-
var tmp = this.
|
|
1234
|
+
var tmp = this.h6_1;
|
|
1219
1235
|
switch (tmp) {
|
|
1220
1236
|
case 0:
|
|
1221
|
-
this.
|
|
1222
|
-
this.
|
|
1223
|
-
this.
|
|
1224
|
-
suspendResult = this.
|
|
1237
|
+
this.i6_1 = 6;
|
|
1238
|
+
this.i11_1 = this.e11_1;
|
|
1239
|
+
this.h6_1 = 1;
|
|
1240
|
+
suspendResult = this.i11_1.bs(this);
|
|
1225
1241
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1226
1242
|
return suspendResult;
|
|
1227
1243
|
}
|
|
1228
1244
|
|
|
1229
1245
|
continue $sm;
|
|
1230
1246
|
case 1:
|
|
1231
|
-
this.
|
|
1232
|
-
this.
|
|
1247
|
+
this.j11_1 = Unit_instance;
|
|
1248
|
+
this.h6_1 = 2;
|
|
1233
1249
|
continue $sm;
|
|
1234
1250
|
case 2:
|
|
1235
|
-
this.
|
|
1236
|
-
this.
|
|
1237
|
-
suspendResult = this.
|
|
1251
|
+
this.i6_1 = 5;
|
|
1252
|
+
this.h6_1 = 3;
|
|
1253
|
+
suspendResult = this.f11_1(this.g11_1, this);
|
|
1238
1254
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1239
1255
|
return suspendResult;
|
|
1240
1256
|
}
|
|
1241
1257
|
|
|
1242
1258
|
continue $sm;
|
|
1243
1259
|
case 3:
|
|
1244
|
-
this.
|
|
1245
|
-
this.
|
|
1246
|
-
this.
|
|
1260
|
+
this.j11_1 = Unit_instance;
|
|
1261
|
+
this.i6_1 = 6;
|
|
1262
|
+
this.h6_1 = 4;
|
|
1247
1263
|
continue $sm;
|
|
1248
1264
|
case 4:
|
|
1249
|
-
this.
|
|
1250
|
-
this.
|
|
1251
|
-
this.
|
|
1265
|
+
this.j11_1;
|
|
1266
|
+
this.i6_1 = 6;
|
|
1267
|
+
this.i11_1.vr();
|
|
1252
1268
|
return Unit_instance;
|
|
1253
1269
|
case 5:
|
|
1254
|
-
this.
|
|
1255
|
-
var t = this.
|
|
1256
|
-
this.
|
|
1270
|
+
this.i6_1 = 6;
|
|
1271
|
+
var t = this.k6_1;
|
|
1272
|
+
this.i11_1.vr();
|
|
1257
1273
|
throw t;
|
|
1258
1274
|
case 6:
|
|
1259
|
-
throw this.
|
|
1275
|
+
throw this.k6_1;
|
|
1260
1276
|
}
|
|
1261
1277
|
} catch ($p) {
|
|
1262
1278
|
var e = $p;
|
|
1263
|
-
if (this.
|
|
1279
|
+
if (this.i6_1 === 6) {
|
|
1264
1280
|
throw e;
|
|
1265
1281
|
} else {
|
|
1266
|
-
this.
|
|
1267
|
-
this.
|
|
1282
|
+
this.h6_1 = this.i6_1;
|
|
1283
|
+
this.k6_1 = e;
|
|
1268
1284
|
}
|
|
1269
1285
|
}
|
|
1270
1286
|
while (true);
|
|
1271
1287
|
};
|
|
1272
|
-
protoOf(Flux$forEachParallel$slambda$slambda).
|
|
1273
|
-
var i = new Flux$forEachParallel$slambda$slambda(this.
|
|
1274
|
-
i.
|
|
1288
|
+
protoOf(Flux$forEachParallel$slambda$slambda).l11 = function ($this$async, completion) {
|
|
1289
|
+
var i = new Flux$forEachParallel$slambda$slambda(this.e11_1, this.f11_1, this.g11_1, completion);
|
|
1290
|
+
i.h11_1 = $this$async;
|
|
1275
1291
|
return i;
|
|
1276
1292
|
};
|
|
1277
1293
|
function Flux$forEachParallel$slambda$slambda_0($semaphore, $action, $item, resultContinuation) {
|
|
1278
1294
|
var i = new Flux$forEachParallel$slambda$slambda($semaphore, $action, $item, resultContinuation);
|
|
1279
1295
|
return constructCallableReference(function ($this$async, $completion) {
|
|
1280
|
-
return i.
|
|
1296
|
+
return i.k11($this$async, $completion);
|
|
1281
1297
|
}, 1);
|
|
1282
1298
|
}
|
|
1283
1299
|
function Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation) {
|
|
1284
|
-
this.
|
|
1285
|
-
this.
|
|
1286
|
-
this.
|
|
1300
|
+
this.u11_1 = $maxParallel;
|
|
1301
|
+
this.v11_1 = $items;
|
|
1302
|
+
this.w11_1 = $action;
|
|
1287
1303
|
CoroutineImpl.call(this, resultContinuation);
|
|
1288
1304
|
}
|
|
1289
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1290
|
-
var tmp = this.
|
|
1291
|
-
tmp.
|
|
1292
|
-
tmp.
|
|
1293
|
-
return tmp.
|
|
1305
|
+
protoOf(Flux$forEachParallel$slambda).y11 = function ($this$coroutineScope, $completion) {
|
|
1306
|
+
var tmp = this.l11($this$coroutineScope, $completion);
|
|
1307
|
+
tmp.j6_1 = Unit_instance;
|
|
1308
|
+
tmp.k6_1 = null;
|
|
1309
|
+
return tmp.p6();
|
|
1294
1310
|
};
|
|
1295
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1296
|
-
return this.
|
|
1311
|
+
protoOf(Flux$forEachParallel$slambda).x6 = function (p1, $completion) {
|
|
1312
|
+
return this.y11((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1297
1313
|
};
|
|
1298
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1299
|
-
var suspendResult = this.
|
|
1314
|
+
protoOf(Flux$forEachParallel$slambda).p6 = function () {
|
|
1315
|
+
var suspendResult = this.j6_1;
|
|
1300
1316
|
$sm: do
|
|
1301
1317
|
try {
|
|
1302
|
-
var tmp = this.
|
|
1318
|
+
var tmp = this.h6_1;
|
|
1303
1319
|
switch (tmp) {
|
|
1304
1320
|
case 0:
|
|
1305
|
-
this.
|
|
1306
|
-
var semaphore = Semaphore(this.
|
|
1307
|
-
this.
|
|
1308
|
-
var this_0 = this.
|
|
1321
|
+
this.i6_1 = 2;
|
|
1322
|
+
var semaphore = Semaphore(this.u11_1);
|
|
1323
|
+
this.h6_1 = 1;
|
|
1324
|
+
var this_0 = this.v11_1;
|
|
1309
1325
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1310
|
-
var _iterator__ex2g4s = this_0.
|
|
1311
|
-
while (_iterator__ex2g4s.
|
|
1312
|
-
var item = _iterator__ex2g4s.
|
|
1313
|
-
destination.
|
|
1326
|
+
var _iterator__ex2g4s = this_0.i();
|
|
1327
|
+
while (_iterator__ex2g4s.j()) {
|
|
1328
|
+
var item = _iterator__ex2g4s.k();
|
|
1329
|
+
destination.h(async(this.x11_1, VOID, VOID, Flux$forEachParallel$slambda$slambda_0(semaphore, this.w11_1, item, null)));
|
|
1314
1330
|
}
|
|
1315
1331
|
|
|
1316
1332
|
suspendResult = awaitAll(destination, this);
|
|
@@ -1322,52 +1338,52 @@
|
|
|
1322
1338
|
case 1:
|
|
1323
1339
|
return suspendResult;
|
|
1324
1340
|
case 2:
|
|
1325
|
-
throw this.
|
|
1341
|
+
throw this.k6_1;
|
|
1326
1342
|
}
|
|
1327
1343
|
} catch ($p) {
|
|
1328
1344
|
var e = $p;
|
|
1329
|
-
if (this.
|
|
1345
|
+
if (this.i6_1 === 2) {
|
|
1330
1346
|
throw e;
|
|
1331
1347
|
} else {
|
|
1332
|
-
this.
|
|
1333
|
-
this.
|
|
1348
|
+
this.h6_1 = this.i6_1;
|
|
1349
|
+
this.k6_1 = e;
|
|
1334
1350
|
}
|
|
1335
1351
|
}
|
|
1336
1352
|
while (true);
|
|
1337
1353
|
};
|
|
1338
|
-
protoOf(Flux$forEachParallel$slambda).
|
|
1339
|
-
var i = new Flux$forEachParallel$slambda(this.
|
|
1340
|
-
i.
|
|
1354
|
+
protoOf(Flux$forEachParallel$slambda).l11 = function ($this$coroutineScope, completion) {
|
|
1355
|
+
var i = new Flux$forEachParallel$slambda(this.u11_1, this.v11_1, this.w11_1, completion);
|
|
1356
|
+
i.x11_1 = $this$coroutineScope;
|
|
1341
1357
|
return i;
|
|
1342
1358
|
};
|
|
1343
1359
|
function Flux$forEachParallel$slambda_0($maxParallel, $items, $action, resultContinuation) {
|
|
1344
1360
|
var i = new Flux$forEachParallel$slambda($maxParallel, $items, $action, resultContinuation);
|
|
1345
1361
|
return constructCallableReference(function ($this$coroutineScope, $completion) {
|
|
1346
|
-
return i.
|
|
1362
|
+
return i.y11($this$coroutineScope, $completion);
|
|
1347
1363
|
}, 1);
|
|
1348
1364
|
}
|
|
1349
1365
|
function $forEachParallelCOROUTINE$(_this__u8e3s4, items, maxParallel, action, resultContinuation) {
|
|
1350
1366
|
CoroutineImpl.call(this, resultContinuation);
|
|
1351
|
-
this.
|
|
1352
|
-
this.
|
|
1353
|
-
this.
|
|
1354
|
-
this.
|
|
1367
|
+
this.h12_1 = _this__u8e3s4;
|
|
1368
|
+
this.i12_1 = items;
|
|
1369
|
+
this.j12_1 = maxParallel;
|
|
1370
|
+
this.k12_1 = action;
|
|
1355
1371
|
}
|
|
1356
|
-
protoOf($forEachParallelCOROUTINE$).
|
|
1357
|
-
var suspendResult = this.
|
|
1372
|
+
protoOf($forEachParallelCOROUTINE$).p6 = function () {
|
|
1373
|
+
var suspendResult = this.j6_1;
|
|
1358
1374
|
$sm: do
|
|
1359
1375
|
try {
|
|
1360
|
-
var tmp = this.
|
|
1376
|
+
var tmp = this.h6_1;
|
|
1361
1377
|
switch (tmp) {
|
|
1362
1378
|
case 0:
|
|
1363
|
-
this.
|
|
1364
|
-
if (!(this.
|
|
1365
|
-
var message = 'maxParallel must be >= 1, got ' + this.
|
|
1379
|
+
this.i6_1 = 2;
|
|
1380
|
+
if (!(this.j12_1 >= 1)) {
|
|
1381
|
+
var message = 'maxParallel must be >= 1, got ' + this.j12_1;
|
|
1366
1382
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1367
1383
|
}
|
|
1368
1384
|
|
|
1369
|
-
this.
|
|
1370
|
-
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.
|
|
1385
|
+
this.h6_1 = 1;
|
|
1386
|
+
suspendResult = coroutineScope(Flux$forEachParallel$slambda_0(this.j12_1, this.i12_1, this.k12_1, null), this);
|
|
1371
1387
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1372
1388
|
return suspendResult;
|
|
1373
1389
|
}
|
|
@@ -1376,26 +1392,26 @@
|
|
|
1376
1392
|
case 1:
|
|
1377
1393
|
return Unit_instance;
|
|
1378
1394
|
case 2:
|
|
1379
|
-
throw this.
|
|
1395
|
+
throw this.k6_1;
|
|
1380
1396
|
}
|
|
1381
1397
|
} catch ($p) {
|
|
1382
1398
|
var e = $p;
|
|
1383
|
-
if (this.
|
|
1399
|
+
if (this.i6_1 === 2) {
|
|
1384
1400
|
throw e;
|
|
1385
1401
|
} else {
|
|
1386
|
-
this.
|
|
1387
|
-
this.
|
|
1402
|
+
this.h6_1 = this.i6_1;
|
|
1403
|
+
this.k6_1 = e;
|
|
1388
1404
|
}
|
|
1389
1405
|
}
|
|
1390
1406
|
while (true);
|
|
1391
1407
|
};
|
|
1392
1408
|
function Flux() {
|
|
1393
1409
|
}
|
|
1394
|
-
protoOf(Flux).
|
|
1410
|
+
protoOf(Flux).uv = function (items, maxParallel, action, $completion) {
|
|
1395
1411
|
var tmp = new $forEachParallelCOROUTINE$(this, items, maxParallel, action, $completion);
|
|
1396
|
-
tmp.
|
|
1397
|
-
tmp.
|
|
1398
|
-
return tmp.
|
|
1412
|
+
tmp.j6_1 = Unit_instance;
|
|
1413
|
+
tmp.k6_1 = null;
|
|
1414
|
+
return tmp.p6();
|
|
1399
1415
|
};
|
|
1400
1416
|
var Flux_instance;
|
|
1401
1417
|
function Flux_getInstance() {
|
|
@@ -1403,21 +1419,21 @@
|
|
|
1403
1419
|
}
|
|
1404
1420
|
function $getCOROUTINE$(_this__u8e3s4, key, resultContinuation) {
|
|
1405
1421
|
CoroutineImpl.call(this, resultContinuation);
|
|
1406
|
-
this.
|
|
1407
|
-
this.
|
|
1422
|
+
this.t12_1 = _this__u8e3s4;
|
|
1423
|
+
this.u12_1 = key;
|
|
1408
1424
|
}
|
|
1409
|
-
protoOf($getCOROUTINE$).
|
|
1410
|
-
var suspendResult = this.
|
|
1425
|
+
protoOf($getCOROUTINE$).p6 = function () {
|
|
1426
|
+
var suspendResult = this.j6_1;
|
|
1411
1427
|
$sm: do
|
|
1412
1428
|
try {
|
|
1413
|
-
var tmp = this.
|
|
1429
|
+
var tmp = this.h6_1;
|
|
1414
1430
|
switch (tmp) {
|
|
1415
1431
|
case 0:
|
|
1416
|
-
this.
|
|
1417
|
-
this.
|
|
1418
|
-
this.
|
|
1419
|
-
this.
|
|
1420
|
-
suspendResult = this.
|
|
1432
|
+
this.i6_1 = 12;
|
|
1433
|
+
this.g13_1 = this.t12_1.k13_1;
|
|
1434
|
+
this.f13_1 = null;
|
|
1435
|
+
this.h6_1 = 1;
|
|
1436
|
+
suspendResult = this.g13_1.tr(this.f13_1, this);
|
|
1421
1437
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1422
1438
|
return suspendResult;
|
|
1423
1439
|
}
|
|
@@ -1430,52 +1446,52 @@
|
|
|
1430
1446
|
l$ret$1: do {
|
|
1431
1447
|
var tmp_0;
|
|
1432
1448
|
try {
|
|
1433
|
-
var tmp0_safe_receiver = this.
|
|
1449
|
+
var tmp0_safe_receiver = this.t12_1.l13_1.d3(this.u12_1);
|
|
1434
1450
|
if (tmp0_safe_receiver == null)
|
|
1435
1451
|
null;
|
|
1436
1452
|
else {
|
|
1437
|
-
var tmp0 = this.
|
|
1438
|
-
var key = this.
|
|
1439
|
-
tmp0.
|
|
1453
|
+
var tmp0 = this.t12_1.l13_1;
|
|
1454
|
+
var key = this.u12_1;
|
|
1455
|
+
tmp0.c3(key, tmp0_safe_receiver);
|
|
1440
1456
|
tmp$ret$0 = tmp0_safe_receiver;
|
|
1441
1457
|
break l$ret$1;
|
|
1442
1458
|
}
|
|
1443
|
-
tmp$ret$2 = this.
|
|
1459
|
+
tmp$ret$2 = this.t12_1.m13_1.k1(this.u12_1);
|
|
1444
1460
|
break l$ret$3;
|
|
1445
1461
|
} catch ($p) {
|
|
1446
1462
|
var tmp_1;
|
|
1447
1463
|
var t = $p;
|
|
1448
|
-
this.
|
|
1464
|
+
this.g13_1.fr(this.f13_1);
|
|
1449
1465
|
throw t;
|
|
1450
1466
|
}
|
|
1451
1467
|
}
|
|
1452
1468
|
while (false);
|
|
1453
1469
|
var tmp_2 = tmp$ret$0;
|
|
1454
|
-
this.
|
|
1470
|
+
this.g13_1.fr(this.f13_1);
|
|
1455
1471
|
return tmp_2;
|
|
1456
1472
|
}
|
|
1457
1473
|
while (false);
|
|
1458
1474
|
var tmp_3 = tmp$ret$2;
|
|
1459
|
-
this.
|
|
1475
|
+
this.g13_1.fr(this.f13_1);
|
|
1460
1476
|
var existing = tmp_3;
|
|
1461
1477
|
if (!(existing == null)) {
|
|
1462
|
-
this.
|
|
1463
|
-
suspendResult = existing.
|
|
1478
|
+
this.h6_1 = 11;
|
|
1479
|
+
suspendResult = existing.nj(this);
|
|
1464
1480
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1465
1481
|
return suspendResult;
|
|
1466
1482
|
}
|
|
1467
1483
|
continue $sm;
|
|
1468
1484
|
} else {
|
|
1469
|
-
this.
|
|
1485
|
+
this.h6_1 = 2;
|
|
1470
1486
|
continue $sm;
|
|
1471
1487
|
}
|
|
1472
1488
|
|
|
1473
1489
|
case 2:
|
|
1474
|
-
this.
|
|
1475
|
-
this.
|
|
1476
|
-
this.
|
|
1477
|
-
this.
|
|
1478
|
-
suspendResult = this.
|
|
1490
|
+
this.w12_1 = CompletableDeferred();
|
|
1491
|
+
this.e13_1 = this.t12_1.k13_1;
|
|
1492
|
+
this.d13_1 = null;
|
|
1493
|
+
this.h6_1 = 3;
|
|
1494
|
+
suspendResult = this.e13_1.tr(this.d13_1, this);
|
|
1479
1495
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1480
1496
|
return suspendResult;
|
|
1481
1497
|
}
|
|
@@ -1488,25 +1504,25 @@
|
|
|
1488
1504
|
l$ret$5: do {
|
|
1489
1505
|
var tmp_4;
|
|
1490
1506
|
try {
|
|
1491
|
-
var tmp0_safe_receiver_0 = this.
|
|
1507
|
+
var tmp0_safe_receiver_0 = this.t12_1.l13_1.d3(this.u12_1);
|
|
1492
1508
|
if (tmp0_safe_receiver_0 == null)
|
|
1493
1509
|
null;
|
|
1494
1510
|
else {
|
|
1495
|
-
var tmp0_0 = this.
|
|
1496
|
-
var key_0 = this.
|
|
1497
|
-
tmp0_0.
|
|
1511
|
+
var tmp0_0 = this.t12_1.l13_1;
|
|
1512
|
+
var key_0 = this.u12_1;
|
|
1513
|
+
tmp0_0.c3(key_0, tmp0_safe_receiver_0);
|
|
1498
1514
|
tmp$ret$4 = tmp0_safe_receiver_0;
|
|
1499
1515
|
break l$ret$5;
|
|
1500
1516
|
}
|
|
1501
|
-
var raced = this.
|
|
1517
|
+
var raced = this.t12_1.m13_1.k1(this.u12_1);
|
|
1502
1518
|
var tmp_5;
|
|
1503
1519
|
if (!(raced == null)) {
|
|
1504
1520
|
tmp_5 = raced;
|
|
1505
1521
|
} else {
|
|
1506
|
-
var tmp0_1 = this.
|
|
1507
|
-
var tmp2 = this.
|
|
1508
|
-
var value = this.
|
|
1509
|
-
tmp0_1.
|
|
1522
|
+
var tmp0_1 = this.t12_1.m13_1;
|
|
1523
|
+
var tmp2 = this.u12_1;
|
|
1524
|
+
var value = this.w12_1;
|
|
1525
|
+
tmp0_1.c3(tmp2, value);
|
|
1510
1526
|
tmp_5 = null;
|
|
1511
1527
|
}
|
|
1512
1528
|
tmp$ret$6 = tmp_5;
|
|
@@ -1514,87 +1530,87 @@
|
|
|
1514
1530
|
} catch ($p_0) {
|
|
1515
1531
|
var tmp_6;
|
|
1516
1532
|
var t_0 = $p_0;
|
|
1517
|
-
this.
|
|
1533
|
+
this.e13_1.fr(this.d13_1);
|
|
1518
1534
|
throw t_0;
|
|
1519
1535
|
}
|
|
1520
1536
|
}
|
|
1521
1537
|
while (false);
|
|
1522
1538
|
var tmp_7 = tmp$ret$4;
|
|
1523
|
-
this.
|
|
1539
|
+
this.e13_1.fr(this.d13_1);
|
|
1524
1540
|
return tmp_7;
|
|
1525
1541
|
}
|
|
1526
1542
|
while (false);
|
|
1527
1543
|
var tmp_8 = tmp$ret$6;
|
|
1528
|
-
this.
|
|
1544
|
+
this.e13_1.fr(this.d13_1);
|
|
1529
1545
|
var awaitInstead = tmp_8;
|
|
1530
1546
|
if (!(awaitInstead == null)) {
|
|
1531
|
-
this.
|
|
1532
|
-
suspendResult = awaitInstead.
|
|
1547
|
+
this.h6_1 = 10;
|
|
1548
|
+
suspendResult = awaitInstead.nj(this);
|
|
1533
1549
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1534
1550
|
return suspendResult;
|
|
1535
1551
|
}
|
|
1536
1552
|
continue $sm;
|
|
1537
1553
|
} else {
|
|
1538
|
-
this.
|
|
1554
|
+
this.h6_1 = 4;
|
|
1539
1555
|
continue $sm;
|
|
1540
1556
|
}
|
|
1541
1557
|
|
|
1542
1558
|
case 4:
|
|
1543
|
-
this.
|
|
1544
|
-
this.
|
|
1545
|
-
suspendResult = this.
|
|
1559
|
+
this.i6_1 = 6;
|
|
1560
|
+
this.h6_1 = 5;
|
|
1561
|
+
suspendResult = this.t12_1.i13_1(this.u12_1, this);
|
|
1546
1562
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1547
1563
|
return suspendResult;
|
|
1548
1564
|
}
|
|
1549
1565
|
|
|
1550
1566
|
continue $sm;
|
|
1551
1567
|
case 5:
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1568
|
+
this.z12_1 = suspendResult;
|
|
1569
|
+
this.i6_1 = 12;
|
|
1570
|
+
this.h6_1 = 8;
|
|
1555
1571
|
continue $sm;
|
|
1556
1572
|
case 6:
|
|
1557
|
-
this.
|
|
1558
|
-
var tmp_9 = this.
|
|
1573
|
+
this.i6_1 = 12;
|
|
1574
|
+
var tmp_9 = this.k6_1;
|
|
1559
1575
|
if (tmp_9 instanceof Error) {
|
|
1560
|
-
this.
|
|
1561
|
-
this.
|
|
1562
|
-
this.
|
|
1563
|
-
this.
|
|
1564
|
-
suspendResult = this.
|
|
1576
|
+
this.a13_1 = this.k6_1;
|
|
1577
|
+
this.c13_1 = this.t12_1.k13_1;
|
|
1578
|
+
this.b13_1 = null;
|
|
1579
|
+
this.h6_1 = 7;
|
|
1580
|
+
suspendResult = this.c13_1.tr(this.b13_1, this);
|
|
1565
1581
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1566
1582
|
return suspendResult;
|
|
1567
1583
|
}
|
|
1568
1584
|
continue $sm;
|
|
1569
1585
|
} else {
|
|
1570
|
-
throw this.
|
|
1586
|
+
throw this.k6_1;
|
|
1571
1587
|
}
|
|
1572
1588
|
|
|
1573
1589
|
case 7:
|
|
1574
1590
|
l$ret$9: do {
|
|
1575
1591
|
var tmp_10;
|
|
1576
1592
|
try {
|
|
1577
|
-
this.
|
|
1593
|
+
this.t12_1.m13_1.d3(this.u12_1);
|
|
1578
1594
|
break l$ret$9;
|
|
1579
1595
|
} catch ($p_1) {
|
|
1580
1596
|
var tmp_11;
|
|
1581
1597
|
var t_1 = $p_1;
|
|
1582
|
-
this.
|
|
1598
|
+
this.c13_1.fr(this.b13_1);
|
|
1583
1599
|
throw t_1;
|
|
1584
1600
|
}
|
|
1585
1601
|
}
|
|
1586
1602
|
while (false);
|
|
1587
|
-
this.
|
|
1588
|
-
this.
|
|
1603
|
+
this.c13_1.fr(this.b13_1);
|
|
1604
|
+
this.w12_1.lm(this.a13_1);
|
|
1589
1605
|
var tmp_12 = this;
|
|
1590
|
-
throw this.
|
|
1606
|
+
throw this.a13_1;
|
|
1591
1607
|
case 8:
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
suspendResult = this.
|
|
1608
|
+
this.i6_1 = 12;
|
|
1609
|
+
this.v12_1 = this.z12_1;
|
|
1610
|
+
this.y12_1 = this.t12_1.k13_1;
|
|
1611
|
+
this.x12_1 = null;
|
|
1612
|
+
this.h6_1 = 9;
|
|
1613
|
+
suspendResult = this.y12_1.tr(this.x12_1, this);
|
|
1598
1614
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1599
1615
|
return suspendResult;
|
|
1600
1616
|
}
|
|
@@ -1604,89 +1620,89 @@
|
|
|
1604
1620
|
l$ret$11: do {
|
|
1605
1621
|
var tmp_13;
|
|
1606
1622
|
try {
|
|
1607
|
-
this.
|
|
1623
|
+
this.t12_1.m13_1.d3(this.u12_1);
|
|
1608
1624
|
var tmp_14;
|
|
1609
|
-
if (this.
|
|
1610
|
-
var tmp0_2 = this.
|
|
1611
|
-
var key_1 = this.
|
|
1612
|
-
tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).
|
|
1625
|
+
if (this.t12_1.l13_1.l() >= this.t12_1.h13_1) {
|
|
1626
|
+
var tmp0_2 = this.t12_1.l13_1;
|
|
1627
|
+
var key_1 = this.u12_1;
|
|
1628
|
+
tmp_14 = !(isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).j1(key_1);
|
|
1613
1629
|
} else {
|
|
1614
1630
|
tmp_14 = false;
|
|
1615
1631
|
}
|
|
1616
1632
|
if (tmp_14) {
|
|
1617
|
-
var iter = this.
|
|
1618
|
-
var oldest = iter.
|
|
1619
|
-
var oldestValue = oldest.
|
|
1620
|
-
iter.
|
|
1621
|
-
var tmp0_safe_receiver_1 = this.
|
|
1633
|
+
var iter = this.t12_1.l13_1.m1().i();
|
|
1634
|
+
var oldest = iter.k();
|
|
1635
|
+
var oldestValue = oldest.i1();
|
|
1636
|
+
iter.e2();
|
|
1637
|
+
var tmp0_safe_receiver_1 = this.t12_1.j13_1;
|
|
1622
1638
|
if (tmp0_safe_receiver_1 == null)
|
|
1623
1639
|
null;
|
|
1624
1640
|
else
|
|
1625
1641
|
tmp0_safe_receiver_1(oldestValue);
|
|
1626
1642
|
}
|
|
1627
|
-
var tmp0_3 = this.
|
|
1628
|
-
var tmp2_0 = this.
|
|
1629
|
-
var value_0 = this.
|
|
1630
|
-
tmp0_3.
|
|
1643
|
+
var tmp0_3 = this.t12_1.l13_1;
|
|
1644
|
+
var tmp2_0 = this.u12_1;
|
|
1645
|
+
var value_0 = this.v12_1;
|
|
1646
|
+
tmp0_3.c3(tmp2_0, value_0);
|
|
1631
1647
|
break l$ret$11;
|
|
1632
1648
|
} catch ($p_2) {
|
|
1633
1649
|
var tmp_15;
|
|
1634
1650
|
var t_2 = $p_2;
|
|
1635
|
-
this.
|
|
1651
|
+
this.y12_1.fr(this.x12_1);
|
|
1636
1652
|
throw t_2;
|
|
1637
1653
|
}
|
|
1638
1654
|
}
|
|
1639
1655
|
while (false);
|
|
1640
|
-
this.
|
|
1641
|
-
this.
|
|
1642
|
-
return this.
|
|
1656
|
+
this.y12_1.fr(this.x12_1);
|
|
1657
|
+
this.w12_1.km(this.v12_1);
|
|
1658
|
+
return this.v12_1;
|
|
1643
1659
|
case 10:
|
|
1644
1660
|
return suspendResult;
|
|
1645
1661
|
case 11:
|
|
1646
1662
|
return suspendResult;
|
|
1647
1663
|
case 12:
|
|
1648
|
-
throw this.
|
|
1664
|
+
throw this.k6_1;
|
|
1649
1665
|
}
|
|
1650
1666
|
} catch ($p_3) {
|
|
1651
1667
|
var e = $p_3;
|
|
1652
|
-
if (this.
|
|
1668
|
+
if (this.i6_1 === 12) {
|
|
1653
1669
|
throw e;
|
|
1654
1670
|
} else {
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1671
|
+
this.h6_1 = this.i6_1;
|
|
1672
|
+
this.k6_1 = e;
|
|
1657
1673
|
}
|
|
1658
1674
|
}
|
|
1659
1675
|
while (true);
|
|
1660
1676
|
};
|
|
1661
1677
|
function LruCache(maxSize, loader, onEvict) {
|
|
1662
1678
|
onEvict = onEvict === VOID ? null : onEvict;
|
|
1663
|
-
this.
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1679
|
+
this.h13_1 = maxSize;
|
|
1680
|
+
this.i13_1 = loader;
|
|
1681
|
+
this.j13_1 = onEvict;
|
|
1666
1682
|
// Inline function 'kotlin.require' call
|
|
1667
|
-
if (!(this.
|
|
1683
|
+
if (!(this.h13_1 > 0)) {
|
|
1668
1684
|
var message = 'Cache size must be greater than 0';
|
|
1669
1685
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1670
1686
|
}
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1687
|
+
this.k13_1 = Mutex();
|
|
1688
|
+
this.l13_1 = LinkedHashMap_init_$Create$();
|
|
1673
1689
|
var tmp = this;
|
|
1674
1690
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1675
|
-
tmp.
|
|
1691
|
+
tmp.m13_1 = LinkedHashMap_init_$Create$();
|
|
1676
1692
|
}
|
|
1677
|
-
protoOf(LruCache).
|
|
1693
|
+
protoOf(LruCache).n13 = function (key, $completion) {
|
|
1678
1694
|
var tmp = new $getCOROUTINE$(this, key, $completion);
|
|
1679
|
-
tmp.
|
|
1680
|
-
tmp.
|
|
1681
|
-
return tmp.
|
|
1695
|
+
tmp.j6_1 = Unit_instance;
|
|
1696
|
+
tmp.k6_1 = null;
|
|
1697
|
+
return tmp.p6();
|
|
1682
1698
|
};
|
|
1683
1699
|
function RawTile(width, height, rgba) {
|
|
1684
|
-
this.
|
|
1685
|
-
this.
|
|
1686
|
-
this.
|
|
1700
|
+
this.o13_1 = width;
|
|
1701
|
+
this.p13_1 = height;
|
|
1702
|
+
this.q13_1 = rgba;
|
|
1687
1703
|
// Inline function 'kotlin.require' call
|
|
1688
|
-
if (!(this.
|
|
1689
|
-
var message = 'rgba size ' + this.
|
|
1704
|
+
if (!(this.q13_1.length === imul(imul(this.o13_1, this.p13_1), 4))) {
|
|
1705
|
+
var message = 'rgba size ' + this.q13_1.length + ' does not match width*height*4 (' + imul(imul(this.o13_1, this.p13_1), 4) + ')';
|
|
1690
1706
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1691
1707
|
}
|
|
1692
1708
|
}
|
|
@@ -1695,16 +1711,16 @@
|
|
|
1695
1711
|
return true;
|
|
1696
1712
|
if (!(other instanceof RawTile))
|
|
1697
1713
|
return false;
|
|
1698
|
-
return this.
|
|
1714
|
+
return this.o13_1 === other.o13_1 && this.p13_1 === other.p13_1 && contentEquals(this.q13_1, other.q13_1);
|
|
1699
1715
|
};
|
|
1700
1716
|
protoOf(RawTile).hashCode = function () {
|
|
1701
|
-
var result = this.
|
|
1702
|
-
result = imul(31, result) + this.
|
|
1703
|
-
result = imul(31, result) + contentHashCode(this.
|
|
1717
|
+
var result = this.o13_1;
|
|
1718
|
+
result = imul(31, result) + this.p13_1 | 0;
|
|
1719
|
+
result = imul(31, result) + contentHashCode(this.q13_1) | 0;
|
|
1704
1720
|
return result;
|
|
1705
1721
|
};
|
|
1706
1722
|
function Tile_init_$Init$(raw, $this) {
|
|
1707
|
-
Tile.call($this, raw.
|
|
1723
|
+
Tile.call($this, raw.o13_1, raw.p13_1, raw.q13_1);
|
|
1708
1724
|
return $this;
|
|
1709
1725
|
}
|
|
1710
1726
|
function Tile_init_$Create$(raw) {
|
|
@@ -1712,7 +1728,7 @@
|
|
|
1712
1728
|
}
|
|
1713
1729
|
function Companion() {
|
|
1714
1730
|
}
|
|
1715
|
-
protoOf(Companion).
|
|
1731
|
+
protoOf(Companion).r13 = function (r, g, b) {
|
|
1716
1732
|
var raw = r * 256.0 + g + b / 256.0 - 32768.0;
|
|
1717
1733
|
return round(raw * 100.0) / 100.0;
|
|
1718
1734
|
};
|
|
@@ -1721,83 +1737,83 @@
|
|
|
1721
1737
|
return Companion_instance;
|
|
1722
1738
|
}
|
|
1723
1739
|
function Tile(width, height, rgba) {
|
|
1724
|
-
this.
|
|
1725
|
-
this.
|
|
1726
|
-
this.
|
|
1740
|
+
this.nz_1 = width;
|
|
1741
|
+
this.oz_1 = height;
|
|
1742
|
+
this.pz_1 = rgba;
|
|
1727
1743
|
var tmp = this;
|
|
1728
1744
|
var tmp_0 = 0;
|
|
1729
|
-
var tmp_1 = imul(this.
|
|
1745
|
+
var tmp_1 = imul(this.nz_1, this.oz_1);
|
|
1730
1746
|
var tmp_2 = new Float64Array(tmp_1);
|
|
1731
1747
|
while (tmp_0 < tmp_1) {
|
|
1732
1748
|
tmp_2[tmp_0] = NaN;
|
|
1733
1749
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1734
1750
|
}
|
|
1735
|
-
tmp.
|
|
1736
|
-
this.
|
|
1751
|
+
tmp.qz_1 = tmp_2;
|
|
1752
|
+
this.rz_1 = 0;
|
|
1737
1753
|
}
|
|
1738
|
-
protoOf(Tile).
|
|
1739
|
-
var containsUpper = this.
|
|
1740
|
-
var containsArg = pixel.
|
|
1754
|
+
protoOf(Tile).sz = function (pixel) {
|
|
1755
|
+
var containsUpper = this.nz_1;
|
|
1756
|
+
var containsArg = pixel.hz_1;
|
|
1741
1757
|
// Inline function 'kotlin.require' call
|
|
1742
1758
|
if (!(0 <= containsArg ? containsArg < containsUpper : false)) {
|
|
1743
|
-
var message = 'Invalid x position: ' + pixel.
|
|
1759
|
+
var message = 'Invalid x position: ' + pixel.hz_1 + '. Must be between 0 and ' + (this.nz_1 - 1 | 0);
|
|
1744
1760
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1745
1761
|
}
|
|
1746
|
-
var containsUpper_0 = this.
|
|
1747
|
-
var containsArg_0 = pixel.
|
|
1762
|
+
var containsUpper_0 = this.oz_1;
|
|
1763
|
+
var containsArg_0 = pixel.iz_1;
|
|
1748
1764
|
// Inline function 'kotlin.require' call
|
|
1749
1765
|
if (!(0 <= containsArg_0 ? containsArg_0 < containsUpper_0 : false)) {
|
|
1750
|
-
var message_0 = 'Invalid y position: ' + pixel.
|
|
1766
|
+
var message_0 = 'Invalid y position: ' + pixel.iz_1 + '. Must be between 0 and ' + (this.oz_1 - 1 | 0);
|
|
1751
1767
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1752
1768
|
}
|
|
1753
|
-
var idx = imul(pixel.
|
|
1754
|
-
var cached = this.
|
|
1769
|
+
var idx = imul(pixel.iz_1, this.nz_1) + pixel.hz_1 | 0;
|
|
1770
|
+
var cached = this.qz_1[idx];
|
|
1755
1771
|
if (!isNaN_0(cached))
|
|
1756
1772
|
return cached;
|
|
1757
1773
|
var byteOffset = imul(idx, 4);
|
|
1758
|
-
var r = this.
|
|
1759
|
-
var g = this.
|
|
1760
|
-
var b = this.
|
|
1761
|
-
var elevation = Companion_instance.
|
|
1762
|
-
this.
|
|
1763
|
-
this.
|
|
1774
|
+
var r = this.pz_1[byteOffset] & 255;
|
|
1775
|
+
var g = this.pz_1[byteOffset + 1 | 0] & 255;
|
|
1776
|
+
var b = this.pz_1[byteOffset + 2 | 0] & 255;
|
|
1777
|
+
var elevation = Companion_instance.r13(r, g, b);
|
|
1778
|
+
this.qz_1[idx] = elevation;
|
|
1779
|
+
this.rz_1 = this.rz_1 + 1 | 0;
|
|
1764
1780
|
return elevation;
|
|
1765
1781
|
};
|
|
1766
1782
|
function buildUrl($this, tc) {
|
|
1767
|
-
return replace(replace(replace($this.
|
|
1783
|
+
return replace(replace(replace($this.jz_1, '{z}', tc.tv_1.toString()), '{x}', tc.rv_1.toString()), '{y}', tc.sv_1.toString());
|
|
1768
1784
|
}
|
|
1769
1785
|
function fetchAndDecodeTile$ref_0() {
|
|
1770
1786
|
KFunctionImpl.call(this, 1, 2, 2);
|
|
1771
1787
|
}
|
|
1772
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
1788
|
+
protoOf(fetchAndDecodeTile$ref_0).g10 = function (p0, $completion) {
|
|
1773
1789
|
return fetchAndDecodeTile(p0, $completion);
|
|
1774
1790
|
};
|
|
1775
|
-
protoOf(fetchAndDecodeTile$ref_0).
|
|
1776
|
-
return this.
|
|
1791
|
+
protoOf(fetchAndDecodeTile$ref_0).x6 = function (p1, $completion) {
|
|
1792
|
+
return this.g10((!(p1 == null) ? typeof p1 === 'string' : false) ? p1 : THROW_CCE(), $completion);
|
|
1777
1793
|
};
|
|
1778
1794
|
function TileManager$cache$slambda(this$0, resultContinuation) {
|
|
1779
|
-
this.
|
|
1795
|
+
this.d14_1 = this$0;
|
|
1780
1796
|
CoroutineImpl.call(this, resultContinuation);
|
|
1781
1797
|
}
|
|
1782
|
-
protoOf(TileManager$cache$slambda).
|
|
1783
|
-
var tmp = this.
|
|
1784
|
-
tmp.
|
|
1785
|
-
tmp.
|
|
1786
|
-
return tmp.
|
|
1798
|
+
protoOf(TileManager$cache$slambda).f14 = function (tc, $completion) {
|
|
1799
|
+
var tmp = this.g14(tc, $completion);
|
|
1800
|
+
tmp.j6_1 = Unit_instance;
|
|
1801
|
+
tmp.k6_1 = null;
|
|
1802
|
+
return tmp.p6();
|
|
1787
1803
|
};
|
|
1788
|
-
protoOf(TileManager$cache$slambda).
|
|
1789
|
-
return this.
|
|
1804
|
+
protoOf(TileManager$cache$slambda).x6 = function (p1, $completion) {
|
|
1805
|
+
return this.f14(p1 instanceof TileCoordinates ? p1 : THROW_CCE(), $completion);
|
|
1790
1806
|
};
|
|
1791
|
-
protoOf(TileManager$cache$slambda).
|
|
1792
|
-
var suspendResult = this.
|
|
1807
|
+
protoOf(TileManager$cache$slambda).p6 = function () {
|
|
1808
|
+
var suspendResult = this.j6_1;
|
|
1793
1809
|
$sm: do
|
|
1794
1810
|
try {
|
|
1795
|
-
var tmp = this.
|
|
1811
|
+
var tmp = this.h6_1;
|
|
1796
1812
|
switch (tmp) {
|
|
1797
1813
|
case 0:
|
|
1798
|
-
this.
|
|
1799
|
-
this.
|
|
1800
|
-
suspendResult = this.
|
|
1814
|
+
this.i6_1 = 2;
|
|
1815
|
+
this.h6_1 = 1;
|
|
1816
|
+
suspendResult = this.d14_1.kz_1(buildUrl(this.d14_1, this.e14_1), this);
|
|
1801
1817
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1802
1818
|
return suspendResult;
|
|
1803
1819
|
}
|
|
@@ -1807,28 +1823,28 @@
|
|
|
1807
1823
|
var ARGUMENT = suspendResult;
|
|
1808
1824
|
return Tile_init_$Create$(ARGUMENT);
|
|
1809
1825
|
case 2:
|
|
1810
|
-
throw this.
|
|
1826
|
+
throw this.k6_1;
|
|
1811
1827
|
}
|
|
1812
1828
|
} catch ($p) {
|
|
1813
1829
|
var e = $p;
|
|
1814
|
-
if (this.
|
|
1830
|
+
if (this.i6_1 === 2) {
|
|
1815
1831
|
throw e;
|
|
1816
1832
|
} else {
|
|
1817
|
-
this.
|
|
1818
|
-
this.
|
|
1833
|
+
this.h6_1 = this.i6_1;
|
|
1834
|
+
this.k6_1 = e;
|
|
1819
1835
|
}
|
|
1820
1836
|
}
|
|
1821
1837
|
while (true);
|
|
1822
1838
|
};
|
|
1823
|
-
protoOf(TileManager$cache$slambda).
|
|
1824
|
-
var i = new TileManager$cache$slambda(this.
|
|
1825
|
-
i.
|
|
1839
|
+
protoOf(TileManager$cache$slambda).g14 = function (tc, completion) {
|
|
1840
|
+
var i = new TileManager$cache$slambda(this.d14_1, completion);
|
|
1841
|
+
i.e14_1 = tc;
|
|
1826
1842
|
return i;
|
|
1827
1843
|
};
|
|
1828
1844
|
function TileManager$cache$slambda_0(this$0, resultContinuation) {
|
|
1829
1845
|
var i = new TileManager$cache$slambda(this$0, resultContinuation);
|
|
1830
1846
|
return constructCallableReference(function (tc, $completion) {
|
|
1831
|
-
return i.
|
|
1847
|
+
return i.f14(tc, $completion);
|
|
1832
1848
|
}, 1);
|
|
1833
1849
|
}
|
|
1834
1850
|
function TileManager(urlTemplate, cacheSize, fetcher) {
|
|
@@ -1839,26 +1855,26 @@
|
|
|
1839
1855
|
tmp = fetcher;
|
|
1840
1856
|
}
|
|
1841
1857
|
fetcher = tmp;
|
|
1842
|
-
this.
|
|
1843
|
-
this.
|
|
1858
|
+
this.jz_1 = urlTemplate;
|
|
1859
|
+
this.kz_1 = fetcher;
|
|
1844
1860
|
var tmp_0 = this;
|
|
1845
|
-
tmp_0.
|
|
1861
|
+
tmp_0.lz_1 = new LruCache(cacheSize, TileManager$cache$slambda_0(this, null));
|
|
1846
1862
|
}
|
|
1847
|
-
protoOf(TileManager).
|
|
1848
|
-
return this.
|
|
1863
|
+
protoOf(TileManager).mz = function (tileCoords, $completion) {
|
|
1864
|
+
return this.lz_1.n13(tileCoords, $completion);
|
|
1849
1865
|
};
|
|
1850
1866
|
function TileCoordinates(x, y, z) {
|
|
1851
|
-
this.
|
|
1852
|
-
this.
|
|
1853
|
-
this.
|
|
1867
|
+
this.rv_1 = x;
|
|
1868
|
+
this.sv_1 = y;
|
|
1869
|
+
this.tv_1 = z;
|
|
1854
1870
|
}
|
|
1855
1871
|
protoOf(TileCoordinates).toString = function () {
|
|
1856
|
-
return 'TileCoordinates(x=' + this.
|
|
1872
|
+
return 'TileCoordinates(x=' + this.rv_1 + ', y=' + this.sv_1 + ', z=' + this.tv_1 + ')';
|
|
1857
1873
|
};
|
|
1858
1874
|
protoOf(TileCoordinates).hashCode = function () {
|
|
1859
|
-
var result = this.
|
|
1860
|
-
result = imul(result, 31) + this.
|
|
1861
|
-
result = imul(result, 31) + this.
|
|
1875
|
+
var result = this.rv_1;
|
|
1876
|
+
result = imul(result, 31) + this.sv_1 | 0;
|
|
1877
|
+
result = imul(result, 31) + this.tv_1 | 0;
|
|
1862
1878
|
return result;
|
|
1863
1879
|
};
|
|
1864
1880
|
protoOf(TileCoordinates).equals = function (other) {
|
|
@@ -1866,26 +1882,26 @@
|
|
|
1866
1882
|
return true;
|
|
1867
1883
|
if (!(other instanceof TileCoordinates))
|
|
1868
1884
|
return false;
|
|
1869
|
-
if (!(this.
|
|
1885
|
+
if (!(this.rv_1 === other.rv_1))
|
|
1870
1886
|
return false;
|
|
1871
|
-
if (!(this.
|
|
1887
|
+
if (!(this.sv_1 === other.sv_1))
|
|
1872
1888
|
return false;
|
|
1873
|
-
if (!(this.
|
|
1889
|
+
if (!(this.tv_1 === other.tv_1))
|
|
1874
1890
|
return false;
|
|
1875
1891
|
return true;
|
|
1876
1892
|
};
|
|
1877
1893
|
function Pixel(tile, x, y) {
|
|
1878
|
-
this.
|
|
1879
|
-
this.
|
|
1880
|
-
this.
|
|
1894
|
+
this.gz_1 = tile;
|
|
1895
|
+
this.hz_1 = x;
|
|
1896
|
+
this.iz_1 = y;
|
|
1881
1897
|
}
|
|
1882
1898
|
protoOf(Pixel).toString = function () {
|
|
1883
|
-
return 'Pixel(tile=' + this.
|
|
1899
|
+
return 'Pixel(tile=' + this.gz_1.toString() + ', x=' + this.hz_1 + ', y=' + this.iz_1 + ')';
|
|
1884
1900
|
};
|
|
1885
1901
|
protoOf(Pixel).hashCode = function () {
|
|
1886
|
-
var result = this.
|
|
1887
|
-
result = imul(result, 31) + this.
|
|
1888
|
-
result = imul(result, 31) + this.
|
|
1902
|
+
var result = this.gz_1.hashCode();
|
|
1903
|
+
result = imul(result, 31) + this.hz_1 | 0;
|
|
1904
|
+
result = imul(result, 31) + this.iz_1 | 0;
|
|
1889
1905
|
return result;
|
|
1890
1906
|
};
|
|
1891
1907
|
protoOf(Pixel).equals = function (other) {
|
|
@@ -1893,26 +1909,26 @@
|
|
|
1893
1909
|
return true;
|
|
1894
1910
|
if (!(other instanceof Pixel))
|
|
1895
1911
|
return false;
|
|
1896
|
-
if (!this.
|
|
1912
|
+
if (!this.gz_1.equals(other.gz_1))
|
|
1897
1913
|
return false;
|
|
1898
|
-
if (!(this.
|
|
1914
|
+
if (!(this.hz_1 === other.hz_1))
|
|
1899
1915
|
return false;
|
|
1900
|
-
if (!(this.
|
|
1916
|
+
if (!(this.iz_1 === other.iz_1))
|
|
1901
1917
|
return false;
|
|
1902
1918
|
return true;
|
|
1903
1919
|
};
|
|
1904
1920
|
function PixelFloat(tile, x, y) {
|
|
1905
|
-
this.
|
|
1906
|
-
this.
|
|
1907
|
-
this.
|
|
1921
|
+
this.cz_1 = tile;
|
|
1922
|
+
this.dz_1 = x;
|
|
1923
|
+
this.ez_1 = y;
|
|
1908
1924
|
}
|
|
1909
1925
|
protoOf(PixelFloat).toString = function () {
|
|
1910
|
-
return 'PixelFloat(tile=' + this.
|
|
1926
|
+
return 'PixelFloat(tile=' + this.cz_1.toString() + ', x=' + this.dz_1 + ', y=' + this.ez_1 + ')';
|
|
1911
1927
|
};
|
|
1912
1928
|
protoOf(PixelFloat).hashCode = function () {
|
|
1913
|
-
var result = this.
|
|
1914
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1915
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1929
|
+
var result = this.cz_1.hashCode();
|
|
1930
|
+
result = imul(result, 31) + getNumberHashCode(this.dz_1) | 0;
|
|
1931
|
+
result = imul(result, 31) + getNumberHashCode(this.ez_1) | 0;
|
|
1916
1932
|
return result;
|
|
1917
1933
|
};
|
|
1918
1934
|
protoOf(PixelFloat).equals = function (other) {
|
|
@@ -1920,30 +1936,30 @@
|
|
|
1920
1936
|
return true;
|
|
1921
1937
|
if (!(other instanceof PixelFloat))
|
|
1922
1938
|
return false;
|
|
1923
|
-
if (!this.
|
|
1939
|
+
if (!this.cz_1.equals(other.cz_1))
|
|
1924
1940
|
return false;
|
|
1925
|
-
if (!equals(this.
|
|
1941
|
+
if (!equals(this.dz_1, other.dz_1))
|
|
1926
1942
|
return false;
|
|
1927
|
-
if (!equals(this.
|
|
1943
|
+
if (!equals(this.ez_1, other.ez_1))
|
|
1928
1944
|
return false;
|
|
1929
1945
|
return true;
|
|
1930
1946
|
};
|
|
1931
1947
|
function TileCoordinatesFloat(x, y, xFloat, yFloat, z) {
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1935
|
-
this.
|
|
1936
|
-
this.
|
|
1948
|
+
this.yz_1 = x;
|
|
1949
|
+
this.zz_1 = y;
|
|
1950
|
+
this.a10_1 = xFloat;
|
|
1951
|
+
this.b10_1 = yFloat;
|
|
1952
|
+
this.c10_1 = z;
|
|
1937
1953
|
}
|
|
1938
1954
|
protoOf(TileCoordinatesFloat).toString = function () {
|
|
1939
|
-
return 'TileCoordinatesFloat(x=' + this.
|
|
1955
|
+
return 'TileCoordinatesFloat(x=' + this.yz_1 + ', y=' + this.zz_1 + ', xFloat=' + this.a10_1 + ', yFloat=' + this.b10_1 + ', z=' + this.c10_1 + ')';
|
|
1940
1956
|
};
|
|
1941
1957
|
protoOf(TileCoordinatesFloat).hashCode = function () {
|
|
1942
|
-
var result = this.
|
|
1943
|
-
result = imul(result, 31) + this.
|
|
1944
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1945
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1946
|
-
result = imul(result, 31) + this.
|
|
1958
|
+
var result = this.yz_1;
|
|
1959
|
+
result = imul(result, 31) + this.zz_1 | 0;
|
|
1960
|
+
result = imul(result, 31) + getNumberHashCode(this.a10_1) | 0;
|
|
1961
|
+
result = imul(result, 31) + getNumberHashCode(this.b10_1) | 0;
|
|
1962
|
+
result = imul(result, 31) + this.c10_1 | 0;
|
|
1947
1963
|
return result;
|
|
1948
1964
|
};
|
|
1949
1965
|
protoOf(TileCoordinatesFloat).equals = function (other) {
|
|
@@ -1951,21 +1967,21 @@
|
|
|
1951
1967
|
return true;
|
|
1952
1968
|
if (!(other instanceof TileCoordinatesFloat))
|
|
1953
1969
|
return false;
|
|
1954
|
-
if (!(this.
|
|
1970
|
+
if (!(this.yz_1 === other.yz_1))
|
|
1955
1971
|
return false;
|
|
1956
|
-
if (!(this.
|
|
1972
|
+
if (!(this.zz_1 === other.zz_1))
|
|
1957
1973
|
return false;
|
|
1958
|
-
if (!equals(this.
|
|
1974
|
+
if (!equals(this.a10_1, other.a10_1))
|
|
1959
1975
|
return false;
|
|
1960
|
-
if (!equals(this.
|
|
1976
|
+
if (!equals(this.b10_1, other.b10_1))
|
|
1961
1977
|
return false;
|
|
1962
|
-
if (!(this.
|
|
1978
|
+
if (!(this.c10_1 === other.c10_1))
|
|
1963
1979
|
return false;
|
|
1964
1980
|
return true;
|
|
1965
1981
|
};
|
|
1966
1982
|
function Companion_0() {
|
|
1967
1983
|
Companion_instance_0 = this;
|
|
1968
|
-
this.
|
|
1984
|
+
this.h14_1 = new Vector3D(0.0, 0.0, 0.0);
|
|
1969
1985
|
}
|
|
1970
1986
|
var Companion_instance_0;
|
|
1971
1987
|
function Companion_getInstance_0() {
|
|
@@ -1975,49 +1991,49 @@
|
|
|
1975
1991
|
}
|
|
1976
1992
|
function Vector3D(x, y, z) {
|
|
1977
1993
|
Companion_getInstance_0();
|
|
1978
|
-
this.
|
|
1979
|
-
this.
|
|
1980
|
-
this.
|
|
1994
|
+
this.bx_1 = x;
|
|
1995
|
+
this.cx_1 = y;
|
|
1996
|
+
this.dx_1 = z;
|
|
1981
1997
|
}
|
|
1982
|
-
protoOf(Vector3D).
|
|
1983
|
-
var tmp0 = this.
|
|
1998
|
+
protoOf(Vector3D).i14 = function (other) {
|
|
1999
|
+
var tmp0 = this.bx_1 - other.bx_1;
|
|
1984
2000
|
// Inline function 'kotlin.math.hypot' call
|
|
1985
|
-
var y = this.
|
|
2001
|
+
var y = this.cx_1 - other.cx_1;
|
|
1986
2002
|
var tmp0_0 = hypot(tmp0, y);
|
|
1987
2003
|
// Inline function 'kotlin.math.hypot' call
|
|
1988
|
-
var y_0 = this.
|
|
2004
|
+
var y_0 = this.dx_1 - other.dx_1;
|
|
1989
2005
|
return hypot(tmp0_0, y_0);
|
|
1990
2006
|
};
|
|
1991
|
-
protoOf(Vector3D).
|
|
1992
|
-
return new Vector3D(this.
|
|
2007
|
+
protoOf(Vector3D).j14 = function (other) {
|
|
2008
|
+
return new Vector3D(this.bx_1 - other.bx_1, this.cx_1 - other.cx_1, this.dx_1 - other.dx_1);
|
|
1993
2009
|
};
|
|
1994
|
-
protoOf(Vector3D).
|
|
1995
|
-
return new Vector3D(this.
|
|
2010
|
+
protoOf(Vector3D).k14 = function (other) {
|
|
2011
|
+
return new Vector3D(this.bx_1 + other.bx_1, this.cx_1 + other.cx_1, this.dx_1 + other.dx_1);
|
|
1996
2012
|
};
|
|
1997
|
-
protoOf(Vector3D).
|
|
1998
|
-
return new Vector3D(this.
|
|
2013
|
+
protoOf(Vector3D).l14 = function (scalar) {
|
|
2014
|
+
return new Vector3D(this.bx_1 * scalar, this.cx_1 * scalar, this.dx_1 * scalar);
|
|
1999
2015
|
};
|
|
2000
|
-
protoOf(Vector3D).
|
|
2001
|
-
return this.
|
|
2016
|
+
protoOf(Vector3D).m14 = function (other) {
|
|
2017
|
+
return this.bx_1 * other.bx_1 + this.cx_1 * other.cx_1 + this.dx_1 * other.dx_1;
|
|
2002
2018
|
};
|
|
2003
|
-
protoOf(Vector3D).
|
|
2004
|
-
var segmentVector = segmentEnd.
|
|
2005
|
-
var segmentLengthSq = segmentVector.
|
|
2019
|
+
protoOf(Vector3D).ex = function (segmentStart, segmentEnd) {
|
|
2020
|
+
var segmentVector = segmentEnd.j14(segmentStart);
|
|
2021
|
+
var segmentLengthSq = segmentVector.m14(segmentVector);
|
|
2006
2022
|
if (segmentLengthSq === 0.0)
|
|
2007
|
-
return this.
|
|
2008
|
-
var pointVector = this.
|
|
2009
|
-
var projection = pointVector.
|
|
2023
|
+
return this.i14(segmentStart);
|
|
2024
|
+
var pointVector = this.j14(segmentStart);
|
|
2025
|
+
var projection = pointVector.m14(segmentVector) / segmentLengthSq;
|
|
2010
2026
|
var clamped = coerceIn_0(projection, 0.0, 1.0);
|
|
2011
|
-
var closest = segmentStart.
|
|
2012
|
-
return this.
|
|
2027
|
+
var closest = segmentStart.k14(segmentVector.l14(clamped));
|
|
2028
|
+
return this.i14(closest);
|
|
2013
2029
|
};
|
|
2014
2030
|
protoOf(Vector3D).toString = function () {
|
|
2015
|
-
return 'Vector3D(x=' + this.
|
|
2031
|
+
return 'Vector3D(x=' + this.bx_1 + ', y=' + this.cx_1 + ', z=' + this.dx_1 + ')';
|
|
2016
2032
|
};
|
|
2017
2033
|
protoOf(Vector3D).hashCode = function () {
|
|
2018
|
-
var result = getNumberHashCode(this.
|
|
2019
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2020
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2034
|
+
var result = getNumberHashCode(this.bx_1);
|
|
2035
|
+
result = imul(result, 31) + getNumberHashCode(this.cx_1) | 0;
|
|
2036
|
+
result = imul(result, 31) + getNumberHashCode(this.dx_1) | 0;
|
|
2021
2037
|
return result;
|
|
2022
2038
|
};
|
|
2023
2039
|
protoOf(Vector3D).equals = function (other) {
|
|
@@ -2025,24 +2041,24 @@
|
|
|
2025
2041
|
return true;
|
|
2026
2042
|
if (!(other instanceof Vector3D))
|
|
2027
2043
|
return false;
|
|
2028
|
-
if (!equals(this.
|
|
2044
|
+
if (!equals(this.bx_1, other.bx_1))
|
|
2029
2045
|
return false;
|
|
2030
|
-
if (!equals(this.
|
|
2046
|
+
if (!equals(this.cx_1, other.cx_1))
|
|
2031
2047
|
return false;
|
|
2032
|
-
if (!equals(this.
|
|
2048
|
+
if (!equals(this.dx_1, other.dx_1))
|
|
2033
2049
|
return false;
|
|
2034
2050
|
return true;
|
|
2035
2051
|
};
|
|
2036
2052
|
function newElevationProvider(configDto) {
|
|
2037
2053
|
var defaults = new ElevationProviderConfig();
|
|
2038
2054
|
var tmp1_elvis_lhs = configDto == null ? null : configDto.zoomLevel;
|
|
2039
|
-
var tmp = tmp1_elvis_lhs == null ? defaults.
|
|
2055
|
+
var tmp = tmp1_elvis_lhs == null ? defaults.l10_1 : tmp1_elvis_lhs;
|
|
2040
2056
|
var tmp3_elvis_lhs = configDto == null ? null : configDto.cacheSize;
|
|
2041
|
-
var tmp_0 = tmp3_elvis_lhs == null ? defaults.
|
|
2057
|
+
var tmp_0 = tmp3_elvis_lhs == null ? defaults.m10_1 : tmp3_elvis_lhs;
|
|
2042
2058
|
var tmp5_elvis_lhs = configDto == null ? null : configDto.tileUrlTemplate;
|
|
2043
|
-
var tmp_1 = tmp5_elvis_lhs == null ? defaults.
|
|
2059
|
+
var tmp_1 = tmp5_elvis_lhs == null ? defaults.n10_1 : tmp5_elvis_lhs;
|
|
2044
2060
|
var tmp7_elvis_lhs = configDto == null ? null : configDto.tileSize;
|
|
2045
|
-
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.
|
|
2061
|
+
var cfg = new ElevationProviderConfig(tmp, tmp_0, tmp_1, tmp7_elvis_lhs == null ? defaults.o10_1 : tmp7_elvis_lhs, defaults.p10_1);
|
|
2046
2062
|
return new ElevationProvider(cfg);
|
|
2047
2063
|
}
|
|
2048
2064
|
function getElevation(provider, latitude, longitude, interpolation) {
|
|
@@ -2068,31 +2084,31 @@
|
|
|
2068
2084
|
return o;
|
|
2069
2085
|
}
|
|
2070
2086
|
function getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2071
|
-
this.
|
|
2072
|
-
this.
|
|
2073
|
-
this.
|
|
2074
|
-
this.
|
|
2087
|
+
this.v14_1 = $provider;
|
|
2088
|
+
this.w14_1 = $latitude;
|
|
2089
|
+
this.x14_1 = $longitude;
|
|
2090
|
+
this.y14_1 = $interpolation;
|
|
2075
2091
|
CoroutineImpl.call(this, resultContinuation);
|
|
2076
2092
|
}
|
|
2077
|
-
protoOf(getElevation$slambda).
|
|
2078
|
-
var tmp = this.
|
|
2079
|
-
tmp.
|
|
2080
|
-
tmp.
|
|
2081
|
-
return tmp.
|
|
2093
|
+
protoOf(getElevation$slambda).a15 = function ($this$promise, $completion) {
|
|
2094
|
+
var tmp = this.l11($this$promise, $completion);
|
|
2095
|
+
tmp.j6_1 = Unit_instance;
|
|
2096
|
+
tmp.k6_1 = null;
|
|
2097
|
+
return tmp.p6();
|
|
2082
2098
|
};
|
|
2083
|
-
protoOf(getElevation$slambda).
|
|
2084
|
-
return this.
|
|
2099
|
+
protoOf(getElevation$slambda).x6 = function (p1, $completion) {
|
|
2100
|
+
return this.a15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2085
2101
|
};
|
|
2086
|
-
protoOf(getElevation$slambda).
|
|
2087
|
-
var suspendResult = this.
|
|
2102
|
+
protoOf(getElevation$slambda).p6 = function () {
|
|
2103
|
+
var suspendResult = this.j6_1;
|
|
2088
2104
|
$sm: do
|
|
2089
2105
|
try {
|
|
2090
|
-
var tmp = this.
|
|
2106
|
+
var tmp = this.h6_1;
|
|
2091
2107
|
switch (tmp) {
|
|
2092
2108
|
case 0:
|
|
2093
|
-
this.
|
|
2094
|
-
this.
|
|
2095
|
-
suspendResult = this.
|
|
2109
|
+
this.i6_1 = 2;
|
|
2110
|
+
this.h6_1 = 1;
|
|
2111
|
+
suspendResult = this.v14_1.q10(this.w14_1, this.x14_1, this.y14_1, this);
|
|
2096
2112
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2097
2113
|
return suspendResult;
|
|
2098
2114
|
}
|
|
@@ -2101,80 +2117,80 @@
|
|
|
2101
2117
|
case 1:
|
|
2102
2118
|
return suspendResult;
|
|
2103
2119
|
case 2:
|
|
2104
|
-
throw this.
|
|
2120
|
+
throw this.k6_1;
|
|
2105
2121
|
}
|
|
2106
2122
|
} catch ($p) {
|
|
2107
2123
|
var e = $p;
|
|
2108
|
-
if (this.
|
|
2124
|
+
if (this.i6_1 === 2) {
|
|
2109
2125
|
throw e;
|
|
2110
2126
|
} else {
|
|
2111
|
-
this.
|
|
2112
|
-
this.
|
|
2127
|
+
this.h6_1 = this.i6_1;
|
|
2128
|
+
this.k6_1 = e;
|
|
2113
2129
|
}
|
|
2114
2130
|
}
|
|
2115
2131
|
while (true);
|
|
2116
2132
|
};
|
|
2117
|
-
protoOf(getElevation$slambda).
|
|
2118
|
-
var i = new getElevation$slambda(this.
|
|
2119
|
-
i.
|
|
2133
|
+
protoOf(getElevation$slambda).l11 = function ($this$promise, completion) {
|
|
2134
|
+
var i = new getElevation$slambda(this.v14_1, this.w14_1, this.x14_1, this.y14_1, completion);
|
|
2135
|
+
i.z14_1 = $this$promise;
|
|
2120
2136
|
return i;
|
|
2121
2137
|
};
|
|
2122
2138
|
function getElevation$slambda_0($provider, $latitude, $longitude, $interpolation, resultContinuation) {
|
|
2123
2139
|
var i = new getElevation$slambda($provider, $latitude, $longitude, $interpolation, resultContinuation);
|
|
2124
2140
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2125
|
-
return i.
|
|
2141
|
+
return i.a15($this$promise, $completion);
|
|
2126
2142
|
}, 1);
|
|
2127
2143
|
}
|
|
2128
2144
|
function getElevationsAlong$slambda($path, $provider, $options, resultContinuation) {
|
|
2129
|
-
this.
|
|
2130
|
-
this.
|
|
2131
|
-
this.
|
|
2145
|
+
this.j15_1 = $path;
|
|
2146
|
+
this.k15_1 = $provider;
|
|
2147
|
+
this.l15_1 = $options;
|
|
2132
2148
|
CoroutineImpl.call(this, resultContinuation);
|
|
2133
2149
|
}
|
|
2134
|
-
protoOf(getElevationsAlong$slambda).
|
|
2135
|
-
var tmp = this.
|
|
2136
|
-
tmp.
|
|
2137
|
-
tmp.
|
|
2138
|
-
return tmp.
|
|
2150
|
+
protoOf(getElevationsAlong$slambda).n15 = function ($this$promise, $completion) {
|
|
2151
|
+
var tmp = this.l11($this$promise, $completion);
|
|
2152
|
+
tmp.j6_1 = Unit_instance;
|
|
2153
|
+
tmp.k6_1 = null;
|
|
2154
|
+
return tmp.p6();
|
|
2139
2155
|
};
|
|
2140
|
-
protoOf(getElevationsAlong$slambda).
|
|
2141
|
-
return this.
|
|
2156
|
+
protoOf(getElevationsAlong$slambda).x6 = function (p1, $completion) {
|
|
2157
|
+
return this.n15((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2142
2158
|
};
|
|
2143
|
-
protoOf(getElevationsAlong$slambda).
|
|
2144
|
-
var suspendResult = this.
|
|
2159
|
+
protoOf(getElevationsAlong$slambda).p6 = function () {
|
|
2160
|
+
var suspendResult = this.j6_1;
|
|
2145
2161
|
$sm: do
|
|
2146
2162
|
try {
|
|
2147
|
-
var tmp = this.
|
|
2163
|
+
var tmp = this.h6_1;
|
|
2148
2164
|
switch (tmp) {
|
|
2149
2165
|
case 0:
|
|
2150
|
-
this.
|
|
2151
|
-
var this_0 = this.
|
|
2166
|
+
this.i6_1 = 2;
|
|
2167
|
+
var this_0 = this.j15_1;
|
|
2152
2168
|
var destination = ArrayList_init_$Create$_0(this_0.length);
|
|
2153
2169
|
var inductionVariable = 0;
|
|
2154
2170
|
var last = this_0.length;
|
|
2155
2171
|
while (inductionVariable < last) {
|
|
2156
2172
|
var item = this_0[inductionVariable];
|
|
2157
2173
|
inductionVariable = inductionVariable + 1 | 0;
|
|
2158
|
-
destination.
|
|
2174
|
+
destination.h(new LatLon(item.latitude, item.longitude));
|
|
2159
2175
|
}
|
|
2160
2176
|
|
|
2161
2177
|
var coords = destination;
|
|
2162
|
-
this.
|
|
2163
|
-
var tmp0_safe_receiver = this.
|
|
2178
|
+
this.h6_1 = 1;
|
|
2179
|
+
var tmp0_safe_receiver = this.l15_1;
|
|
2164
2180
|
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.step;
|
|
2165
2181
|
var tmp_0 = tmp1_elvis_lhs == null ? 10.0 : tmp1_elvis_lhs;
|
|
2166
|
-
var tmp2_safe_receiver = this.
|
|
2182
|
+
var tmp2_safe_receiver = this.l15_1;
|
|
2167
2183
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.minDistance;
|
|
2168
2184
|
var tmp_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
|
|
2169
|
-
var tmp4_safe_receiver = this.
|
|
2185
|
+
var tmp4_safe_receiver = this.l15_1;
|
|
2170
2186
|
var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.interpolation;
|
|
2171
2187
|
var tmp_2 = tmp5_elvis_lhs == null ? true : tmp5_elvis_lhs;
|
|
2172
|
-
var tmp6_safe_receiver = this.
|
|
2188
|
+
var tmp6_safe_receiver = this.l15_1;
|
|
2173
2189
|
var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.smoothingOptions;
|
|
2174
2190
|
var tmp_3 = tmp7_safe_receiver == null ? null : toKotlin(tmp7_safe_receiver);
|
|
2175
|
-
var tmp8_safe_receiver = this.
|
|
2191
|
+
var tmp8_safe_receiver = this.l15_1;
|
|
2176
2192
|
var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.filterOptions;
|
|
2177
|
-
suspendResult = this.
|
|
2193
|
+
suspendResult = this.k15_1.t10(coords, tmp_0, tmp_1, tmp_2, tmp_3, tmp9_safe_receiver == null ? null : toKotlin_0(tmp9_safe_receiver), this);
|
|
2178
2194
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2179
2195
|
return suspendResult;
|
|
2180
2196
|
}
|
|
@@ -2183,39 +2199,39 @@
|
|
|
2183
2199
|
case 1:
|
|
2184
2200
|
var results = suspendResult;
|
|
2185
2201
|
var tmp_4 = 0;
|
|
2186
|
-
var tmp_5 = results.
|
|
2202
|
+
var tmp_5 = results.l();
|
|
2187
2203
|
var tmp_6 = Array(tmp_5);
|
|
2188
2204
|
while (tmp_4 < tmp_5) {
|
|
2189
2205
|
var tmp_7 = tmp_4;
|
|
2190
|
-
var c = results.
|
|
2191
|
-
tmp_6[tmp_7] = coordsEle(c.
|
|
2206
|
+
var c = results.m(tmp_7);
|
|
2207
|
+
tmp_6[tmp_7] = coordsEle(c.av(), c.bv(), c.ww());
|
|
2192
2208
|
tmp_4 = tmp_4 + 1 | 0;
|
|
2193
2209
|
}
|
|
2194
2210
|
|
|
2195
2211
|
return tmp_6;
|
|
2196
2212
|
case 2:
|
|
2197
|
-
throw this.
|
|
2213
|
+
throw this.k6_1;
|
|
2198
2214
|
}
|
|
2199
2215
|
} catch ($p) {
|
|
2200
2216
|
var e = $p;
|
|
2201
|
-
if (this.
|
|
2217
|
+
if (this.i6_1 === 2) {
|
|
2202
2218
|
throw e;
|
|
2203
2219
|
} else {
|
|
2204
|
-
this.
|
|
2205
|
-
this.
|
|
2220
|
+
this.h6_1 = this.i6_1;
|
|
2221
|
+
this.k6_1 = e;
|
|
2206
2222
|
}
|
|
2207
2223
|
}
|
|
2208
2224
|
while (true);
|
|
2209
2225
|
};
|
|
2210
|
-
protoOf(getElevationsAlong$slambda).
|
|
2211
|
-
var i = new getElevationsAlong$slambda(this.
|
|
2212
|
-
i.
|
|
2226
|
+
protoOf(getElevationsAlong$slambda).l11 = function ($this$promise, completion) {
|
|
2227
|
+
var i = new getElevationsAlong$slambda(this.j15_1, this.k15_1, this.l15_1, completion);
|
|
2228
|
+
i.m15_1 = $this$promise;
|
|
2213
2229
|
return i;
|
|
2214
2230
|
};
|
|
2215
2231
|
function getElevationsAlong$slambda_0($path, $provider, $options, resultContinuation) {
|
|
2216
2232
|
var i = new getElevationsAlong$slambda($path, $provider, $options, resultContinuation);
|
|
2217
2233
|
return constructCallableReference(function ($this$promise, $completion) {
|
|
2218
|
-
return i.
|
|
2234
|
+
return i.n15($this$promise, $completion);
|
|
2219
2235
|
}, 1);
|
|
2220
2236
|
}
|
|
2221
2237
|
function get_isNode() {
|
|
@@ -2229,26 +2245,26 @@
|
|
|
2229
2245
|
var tmp = KProperty0;
|
|
2230
2246
|
// Inline function 'kotlin.getValue' call
|
|
2231
2247
|
getPropertyCallableRef('nodeWebpDecoderPromise', 0, tmp, _get_nodeWebpDecoderPromise_$ref_s562t(), null);
|
|
2232
|
-
return tmp0.
|
|
2248
|
+
return tmp0.i1();
|
|
2233
2249
|
}
|
|
2234
2250
|
var nodeWebpDecoderPromise$delegate;
|
|
2235
2251
|
function fetchAndDecodeTile(url, $completion) {
|
|
2236
2252
|
var tmp = new $fetchAndDecodeTileCOROUTINE$(url, $completion);
|
|
2237
|
-
tmp.
|
|
2238
|
-
tmp.
|
|
2239
|
-
return tmp.
|
|
2253
|
+
tmp.j6_1 = Unit_instance;
|
|
2254
|
+
tmp.k6_1 = null;
|
|
2255
|
+
return tmp.p6();
|
|
2240
2256
|
}
|
|
2241
2257
|
function decodeNode(url, $completion) {
|
|
2242
2258
|
var tmp = new $decodeNodeCOROUTINE$(url, $completion);
|
|
2243
|
-
tmp.
|
|
2244
|
-
tmp.
|
|
2245
|
-
return tmp.
|
|
2259
|
+
tmp.j6_1 = Unit_instance;
|
|
2260
|
+
tmp.k6_1 = null;
|
|
2261
|
+
return tmp.p6();
|
|
2246
2262
|
}
|
|
2247
2263
|
function decodeBrowser(url, $completion) {
|
|
2248
2264
|
var tmp = new $decodeBrowserCOROUTINE$(url, $completion);
|
|
2249
|
-
tmp.
|
|
2250
|
-
tmp.
|
|
2251
|
-
return tmp.
|
|
2265
|
+
tmp.j6_1 = Unit_instance;
|
|
2266
|
+
tmp.k6_1 = null;
|
|
2267
|
+
return tmp.p6();
|
|
2252
2268
|
}
|
|
2253
2269
|
function fetchUrlNode(url) {
|
|
2254
2270
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
@@ -2260,17 +2276,40 @@
|
|
|
2260
2276
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2261
2277
|
return res.arrayBuffer();
|
|
2262
2278
|
}
|
|
2279
|
+
function rawTileFromJsquash(image) {
|
|
2280
|
+
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2281
|
+
var tmp = image.width;
|
|
2282
|
+
var width = numberToInt(isNumber(tmp) ? tmp : THROW_CCE());
|
|
2283
|
+
var tmp_0 = image.height;
|
|
2284
|
+
var height = numberToInt(isNumber(tmp_0) ? tmp_0 : THROW_CCE());
|
|
2285
|
+
var src = image.data;
|
|
2286
|
+
var tmp_1 = src.buffer;
|
|
2287
|
+
var tmp_2 = src.byteOffset;
|
|
2288
|
+
var tmp_3 = numberToInt(isNumber(tmp_2) ? tmp_2 : THROW_CCE());
|
|
2289
|
+
var tmp_4 = src.byteLength;
|
|
2290
|
+
var int8 = new Int8Array(tmp_1, tmp_3, numberToInt(isNumber(tmp_4) ? tmp_4 : THROW_CCE()));
|
|
2291
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2292
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2293
|
+
var rgba = int8;
|
|
2294
|
+
return new RawTile(width, height, rgba);
|
|
2295
|
+
}
|
|
2263
2296
|
function decodeWebpNode(buffer, $completion) {
|
|
2264
2297
|
var tmp = new $decodeWebpNodeCOROUTINE$(buffer, $completion);
|
|
2265
|
-
tmp.
|
|
2266
|
-
tmp.
|
|
2267
|
-
return tmp.
|
|
2298
|
+
tmp.j6_1 = Unit_instance;
|
|
2299
|
+
tmp.k6_1 = null;
|
|
2300
|
+
return tmp.p6();
|
|
2268
2301
|
}
|
|
2269
2302
|
function fetchUrlBrowser(url) {
|
|
2270
2303
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2271
2304
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2272
2305
|
return fetch(url);
|
|
2273
2306
|
}
|
|
2307
|
+
function decodeBlob(blob, sourceUrl, $completion) {
|
|
2308
|
+
var tmp = new $decodeBlobCOROUTINE$(blob, sourceUrl, $completion);
|
|
2309
|
+
tmp.j6_1 = Unit_instance;
|
|
2310
|
+
tmp.k6_1 = null;
|
|
2311
|
+
return tmp.p6();
|
|
2312
|
+
}
|
|
2274
2313
|
function nodeWebpDecoderPromise$delegate$lambda() {
|
|
2275
2314
|
_init_properties_TileFetcher_js_kt__7a2f1e();
|
|
2276
2315
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -2296,26 +2335,26 @@
|
|
|
2296
2335
|
}
|
|
2297
2336
|
function $fetchAndDecodeTileCOROUTINE$(url, resultContinuation) {
|
|
2298
2337
|
CoroutineImpl.call(this, resultContinuation);
|
|
2299
|
-
this.
|
|
2338
|
+
this.w15_1 = url;
|
|
2300
2339
|
}
|
|
2301
|
-
protoOf($fetchAndDecodeTileCOROUTINE$).
|
|
2302
|
-
var suspendResult = this.
|
|
2340
|
+
protoOf($fetchAndDecodeTileCOROUTINE$).p6 = function () {
|
|
2341
|
+
var suspendResult = this.j6_1;
|
|
2303
2342
|
$sm: do
|
|
2304
2343
|
try {
|
|
2305
|
-
var tmp = this.
|
|
2344
|
+
var tmp = this.h6_1;
|
|
2306
2345
|
switch (tmp) {
|
|
2307
2346
|
case 0:
|
|
2308
|
-
this.
|
|
2347
|
+
this.i6_1 = 4;
|
|
2309
2348
|
if (get_isNode()) {
|
|
2310
|
-
this.
|
|
2311
|
-
suspendResult = decodeNode(this.
|
|
2349
|
+
this.h6_1 = 2;
|
|
2350
|
+
suspendResult = decodeNode(this.w15_1, this);
|
|
2312
2351
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2313
2352
|
return suspendResult;
|
|
2314
2353
|
}
|
|
2315
2354
|
continue $sm;
|
|
2316
2355
|
} else {
|
|
2317
|
-
this.
|
|
2318
|
-
suspendResult = decodeBrowser(this.
|
|
2356
|
+
this.h6_1 = 1;
|
|
2357
|
+
suspendResult = decodeBrowser(this.w15_1, this);
|
|
2319
2358
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2320
2359
|
return suspendResult;
|
|
2321
2360
|
}
|
|
@@ -2323,43 +2362,43 @@
|
|
|
2323
2362
|
}
|
|
2324
2363
|
|
|
2325
2364
|
case 1:
|
|
2326
|
-
this.
|
|
2327
|
-
this.
|
|
2365
|
+
this.x15_1 = suspendResult;
|
|
2366
|
+
this.h6_1 = 3;
|
|
2328
2367
|
continue $sm;
|
|
2329
2368
|
case 2:
|
|
2330
|
-
this.
|
|
2331
|
-
this.
|
|
2369
|
+
this.x15_1 = suspendResult;
|
|
2370
|
+
this.h6_1 = 3;
|
|
2332
2371
|
continue $sm;
|
|
2333
2372
|
case 3:
|
|
2334
|
-
return this.
|
|
2373
|
+
return this.x15_1;
|
|
2335
2374
|
case 4:
|
|
2336
|
-
throw this.
|
|
2375
|
+
throw this.k6_1;
|
|
2337
2376
|
}
|
|
2338
2377
|
} catch ($p) {
|
|
2339
2378
|
var e = $p;
|
|
2340
|
-
if (this.
|
|
2379
|
+
if (this.i6_1 === 4) {
|
|
2341
2380
|
throw e;
|
|
2342
2381
|
} else {
|
|
2343
|
-
this.
|
|
2344
|
-
this.
|
|
2382
|
+
this.h6_1 = this.i6_1;
|
|
2383
|
+
this.k6_1 = e;
|
|
2345
2384
|
}
|
|
2346
2385
|
}
|
|
2347
2386
|
while (true);
|
|
2348
2387
|
};
|
|
2349
2388
|
function $decodeNodeCOROUTINE$(url, resultContinuation) {
|
|
2350
2389
|
CoroutineImpl.call(this, resultContinuation);
|
|
2351
|
-
this.
|
|
2390
|
+
this.g16_1 = url;
|
|
2352
2391
|
}
|
|
2353
|
-
protoOf($decodeNodeCOROUTINE$).
|
|
2354
|
-
var suspendResult = this.
|
|
2392
|
+
protoOf($decodeNodeCOROUTINE$).p6 = function () {
|
|
2393
|
+
var suspendResult = this.j6_1;
|
|
2355
2394
|
$sm: do
|
|
2356
2395
|
try {
|
|
2357
|
-
var tmp = this.
|
|
2396
|
+
var tmp = this.h6_1;
|
|
2358
2397
|
switch (tmp) {
|
|
2359
2398
|
case 0:
|
|
2360
|
-
this.
|
|
2361
|
-
this.
|
|
2362
|
-
suspendResult = await_0(fetchUrlNode(this.
|
|
2399
|
+
this.i6_1 = 4;
|
|
2400
|
+
this.h6_1 = 1;
|
|
2401
|
+
suspendResult = await_0(fetchUrlNode(this.g16_1), this);
|
|
2363
2402
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2364
2403
|
return suspendResult;
|
|
2365
2404
|
}
|
|
@@ -2368,11 +2407,11 @@
|
|
|
2368
2407
|
case 1:
|
|
2369
2408
|
var res = suspendResult;
|
|
2370
2409
|
if (!res.ok) {
|
|
2371
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2410
|
+
var message = 'Tile fetch failed for ' + this.g16_1 + ': HTTP ' + res.status;
|
|
2372
2411
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2373
2412
|
}
|
|
2374
2413
|
|
|
2375
|
-
this.
|
|
2414
|
+
this.h6_1 = 2;
|
|
2376
2415
|
suspendResult = await_0(responseArrayBuffer(res), this);
|
|
2377
2416
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2378
2417
|
return suspendResult;
|
|
@@ -2381,7 +2420,7 @@
|
|
|
2381
2420
|
continue $sm;
|
|
2382
2421
|
case 2:
|
|
2383
2422
|
var ab = suspendResult;
|
|
2384
|
-
this.
|
|
2423
|
+
this.h6_1 = 3;
|
|
2385
2424
|
suspendResult = decodeWebpNode(ab, this);
|
|
2386
2425
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2387
2426
|
return suspendResult;
|
|
@@ -2389,47 +2428,36 @@
|
|
|
2389
2428
|
|
|
2390
2429
|
continue $sm;
|
|
2391
2430
|
case 3:
|
|
2392
|
-
var
|
|
2393
|
-
|
|
2394
|
-
var width = numberToInt(isNumber(tmp_0) ? tmp_0 : THROW_CCE());
|
|
2395
|
-
var tmp_1 = image.height;
|
|
2396
|
-
var height = numberToInt(isNumber(tmp_1) ? tmp_1 : THROW_CCE());
|
|
2397
|
-
var src = image.data;
|
|
2398
|
-
var tmp_2 = src.buffer;
|
|
2399
|
-
var tmp_3 = src.byteOffset;
|
|
2400
|
-
var tmp_4 = numberToInt(isNumber(tmp_3) ? tmp_3 : THROW_CCE());
|
|
2401
|
-
var tmp_5 = src.byteLength;
|
|
2402
|
-
var int8 = new Int8Array(tmp_2, tmp_4, numberToInt(isNumber(tmp_5) ? tmp_5 : THROW_CCE()));
|
|
2403
|
-
var rgba = int8;
|
|
2404
|
-
return new RawTile(width, height, rgba);
|
|
2431
|
+
var ARGUMENT = suspendResult;
|
|
2432
|
+
return rawTileFromJsquash(ARGUMENT);
|
|
2405
2433
|
case 4:
|
|
2406
|
-
throw this.
|
|
2434
|
+
throw this.k6_1;
|
|
2407
2435
|
}
|
|
2408
2436
|
} catch ($p) {
|
|
2409
2437
|
var e = $p;
|
|
2410
|
-
if (this.
|
|
2438
|
+
if (this.i6_1 === 4) {
|
|
2411
2439
|
throw e;
|
|
2412
2440
|
} else {
|
|
2413
|
-
this.
|
|
2414
|
-
this.
|
|
2441
|
+
this.h6_1 = this.i6_1;
|
|
2442
|
+
this.k6_1 = e;
|
|
2415
2443
|
}
|
|
2416
2444
|
}
|
|
2417
2445
|
while (true);
|
|
2418
2446
|
};
|
|
2419
2447
|
function $decodeBrowserCOROUTINE$(url, resultContinuation) {
|
|
2420
2448
|
CoroutineImpl.call(this, resultContinuation);
|
|
2421
|
-
this.
|
|
2449
|
+
this.p16_1 = url;
|
|
2422
2450
|
}
|
|
2423
|
-
protoOf($decodeBrowserCOROUTINE$).
|
|
2424
|
-
var suspendResult = this.
|
|
2451
|
+
protoOf($decodeBrowserCOROUTINE$).p6 = function () {
|
|
2452
|
+
var suspendResult = this.j6_1;
|
|
2425
2453
|
$sm: do
|
|
2426
2454
|
try {
|
|
2427
|
-
var tmp = this.
|
|
2455
|
+
var tmp = this.h6_1;
|
|
2428
2456
|
switch (tmp) {
|
|
2429
2457
|
case 0:
|
|
2430
|
-
this.
|
|
2431
|
-
this.
|
|
2432
|
-
suspendResult = await_0(fetchUrlBrowser(this.
|
|
2458
|
+
this.i6_1 = 4;
|
|
2459
|
+
this.h6_1 = 1;
|
|
2460
|
+
suspendResult = await_0(fetchUrlBrowser(this.p16_1), this);
|
|
2433
2461
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2434
2462
|
return suspendResult;
|
|
2435
2463
|
}
|
|
@@ -2438,11 +2466,11 @@
|
|
|
2438
2466
|
case 1:
|
|
2439
2467
|
var res = suspendResult;
|
|
2440
2468
|
if (!res.ok) {
|
|
2441
|
-
var message = 'Tile fetch failed for ' + this.
|
|
2469
|
+
var message = 'Tile fetch failed for ' + this.p16_1 + ': HTTP ' + res.status;
|
|
2442
2470
|
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2443
2471
|
}
|
|
2444
2472
|
|
|
2445
|
-
this.
|
|
2473
|
+
this.h6_1 = 2;
|
|
2446
2474
|
suspendResult = await_0(res.blob(), this);
|
|
2447
2475
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2448
2476
|
return suspendResult;
|
|
@@ -2450,76 +2478,43 @@
|
|
|
2450
2478
|
|
|
2451
2479
|
continue $sm;
|
|
2452
2480
|
case 2:
|
|
2453
|
-
var
|
|
2454
|
-
this.
|
|
2455
|
-
suspendResult =
|
|
2481
|
+
var ARGUMENT = suspendResult;
|
|
2482
|
+
this.h6_1 = 3;
|
|
2483
|
+
suspendResult = decodeBlob(ARGUMENT, this.p16_1, this);
|
|
2456
2484
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2457
2485
|
return suspendResult;
|
|
2458
2486
|
}
|
|
2459
2487
|
|
|
2460
2488
|
continue $sm;
|
|
2461
2489
|
case 3:
|
|
2462
|
-
|
|
2463
|
-
l$ret$3: do {
|
|
2464
|
-
var tmp$ret$0;
|
|
2465
|
-
l$ret$1: do {
|
|
2466
|
-
var tmp_0;
|
|
2467
|
-
try {
|
|
2468
|
-
var tmp_1 = document.createElement('canvas');
|
|
2469
|
-
var canvas = tmp_1 instanceof HTMLCanvasElement ? tmp_1 : THROW_CCE();
|
|
2470
|
-
canvas.width = bitmap.width;
|
|
2471
|
-
canvas.height = bitmap.height;
|
|
2472
|
-
var tmp_2 = canvas.getContext('2d');
|
|
2473
|
-
var ctx = tmp_2 instanceof CanvasRenderingContext2D ? tmp_2 : THROW_CCE();
|
|
2474
|
-
ctx.drawImage(bitmap, 0.0, 0.0);
|
|
2475
|
-
var data = ctx.getImageData(0.0, 0.0, bitmap.width, bitmap.height);
|
|
2476
|
-
var src = data.data;
|
|
2477
|
-
var int8 = new Int8Array(src.buffer, src.byteOffset, src.byteLength);
|
|
2478
|
-
var rgba = int8;
|
|
2479
|
-
tmp$ret$0 = new RawTile(bitmap.width, bitmap.height, rgba);
|
|
2480
|
-
break l$ret$1;
|
|
2481
|
-
} catch ($p) {
|
|
2482
|
-
var tmp_3;
|
|
2483
|
-
var t = $p;
|
|
2484
|
-
bitmap.close();
|
|
2485
|
-
throw t;
|
|
2486
|
-
}
|
|
2487
|
-
}
|
|
2488
|
-
while (false);
|
|
2489
|
-
var tmp_4 = tmp$ret$0;
|
|
2490
|
-
bitmap.close();
|
|
2491
|
-
return tmp_4;
|
|
2492
|
-
}
|
|
2493
|
-
while (false);
|
|
2494
|
-
bitmap.close();
|
|
2495
|
-
return Unit_instance;
|
|
2490
|
+
return suspendResult;
|
|
2496
2491
|
case 4:
|
|
2497
|
-
throw this.
|
|
2492
|
+
throw this.k6_1;
|
|
2498
2493
|
}
|
|
2499
|
-
} catch ($
|
|
2500
|
-
var e = $
|
|
2501
|
-
if (this.
|
|
2494
|
+
} catch ($p) {
|
|
2495
|
+
var e = $p;
|
|
2496
|
+
if (this.i6_1 === 4) {
|
|
2502
2497
|
throw e;
|
|
2503
2498
|
} else {
|
|
2504
|
-
this.
|
|
2505
|
-
this.
|
|
2499
|
+
this.h6_1 = this.i6_1;
|
|
2500
|
+
this.k6_1 = e;
|
|
2506
2501
|
}
|
|
2507
2502
|
}
|
|
2508
2503
|
while (true);
|
|
2509
2504
|
};
|
|
2510
2505
|
function $decodeWebpNodeCOROUTINE$(buffer, resultContinuation) {
|
|
2511
2506
|
CoroutineImpl.call(this, resultContinuation);
|
|
2512
|
-
this.
|
|
2507
|
+
this.y16_1 = buffer;
|
|
2513
2508
|
}
|
|
2514
|
-
protoOf($decodeWebpNodeCOROUTINE$).
|
|
2515
|
-
var suspendResult = this.
|
|
2509
|
+
protoOf($decodeWebpNodeCOROUTINE$).p6 = function () {
|
|
2510
|
+
var suspendResult = this.j6_1;
|
|
2516
2511
|
$sm: do
|
|
2517
2512
|
try {
|
|
2518
|
-
var tmp = this.
|
|
2513
|
+
var tmp = this.h6_1;
|
|
2519
2514
|
switch (tmp) {
|
|
2520
2515
|
case 0:
|
|
2521
|
-
this.
|
|
2522
|
-
this.
|
|
2516
|
+
this.i6_1 = 3;
|
|
2517
|
+
this.h6_1 = 1;
|
|
2523
2518
|
suspendResult = await_0(get_nodeWebpDecoderPromise(), this);
|
|
2524
2519
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2525
2520
|
return suspendResult;
|
|
@@ -2528,8 +2523,8 @@
|
|
|
2528
2523
|
continue $sm;
|
|
2529
2524
|
case 1:
|
|
2530
2525
|
var decode = suspendResult;
|
|
2531
|
-
var resultPromise = decode(this.
|
|
2532
|
-
this.
|
|
2526
|
+
var resultPromise = decode(this.y16_1);
|
|
2527
|
+
this.h6_1 = 2;
|
|
2533
2528
|
suspendResult = await_0(resultPromise, this);
|
|
2534
2529
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2535
2530
|
return suspendResult;
|
|
@@ -2539,15 +2534,110 @@
|
|
|
2539
2534
|
case 2:
|
|
2540
2535
|
return suspendResult;
|
|
2541
2536
|
case 3:
|
|
2542
|
-
throw this.
|
|
2537
|
+
throw this.k6_1;
|
|
2543
2538
|
}
|
|
2544
2539
|
} catch ($p) {
|
|
2545
2540
|
var e = $p;
|
|
2546
|
-
if (this.
|
|
2541
|
+
if (this.i6_1 === 3) {
|
|
2547
2542
|
throw e;
|
|
2548
2543
|
} else {
|
|
2549
|
-
this.
|
|
2550
|
-
this.
|
|
2544
|
+
this.h6_1 = this.i6_1;
|
|
2545
|
+
this.k6_1 = e;
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
while (true);
|
|
2549
|
+
};
|
|
2550
|
+
function $decodeBlobCOROUTINE$(blob, sourceUrl, resultContinuation) {
|
|
2551
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2552
|
+
this.h17_1 = blob;
|
|
2553
|
+
this.i17_1 = sourceUrl;
|
|
2554
|
+
}
|
|
2555
|
+
protoOf($decodeBlobCOROUTINE$).p6 = function () {
|
|
2556
|
+
var suspendResult = this.j6_1;
|
|
2557
|
+
$sm: do
|
|
2558
|
+
try {
|
|
2559
|
+
var tmp = this.h6_1;
|
|
2560
|
+
switch (tmp) {
|
|
2561
|
+
case 0:
|
|
2562
|
+
this.i6_1 = 3;
|
|
2563
|
+
this.i6_1 = 2;
|
|
2564
|
+
this.h6_1 = 1;
|
|
2565
|
+
suspendResult = await_0(window.createImageBitmap(this.h17_1), this);
|
|
2566
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2567
|
+
return suspendResult;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
continue $sm;
|
|
2571
|
+
case 1:
|
|
2572
|
+
this.j17_1 = suspendResult;
|
|
2573
|
+
this.i6_1 = 3;
|
|
2574
|
+
this.h6_1 = 4;
|
|
2575
|
+
continue $sm;
|
|
2576
|
+
case 2:
|
|
2577
|
+
this.i6_1 = 3;
|
|
2578
|
+
var tmp_0 = this.k6_1;
|
|
2579
|
+
if (tmp_0 instanceof Error) {
|
|
2580
|
+
var e = this.k6_1;
|
|
2581
|
+
var tmp_1 = this;
|
|
2582
|
+
var this_0 = this.i17_1;
|
|
2583
|
+
var tmp_2;
|
|
2584
|
+
if (charSequenceLength(this_0) === 0) {
|
|
2585
|
+
tmp_2 = '<unnamed bytes>';
|
|
2586
|
+
} else {
|
|
2587
|
+
tmp_2 = this_0;
|
|
2588
|
+
}
|
|
2589
|
+
var message = 'Cannot decode tile at ' + tmp_2 + ': ' + e.message;
|
|
2590
|
+
throw IllegalStateException_init_$Create$_0(toString(message));
|
|
2591
|
+
} else {
|
|
2592
|
+
throw this.k6_1;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
case 3:
|
|
2596
|
+
throw this.k6_1;
|
|
2597
|
+
case 4:
|
|
2598
|
+
this.i6_1 = 3;
|
|
2599
|
+
var bitmap = this.j17_1;
|
|
2600
|
+
l$ret$3: do {
|
|
2601
|
+
var tmp$ret$0;
|
|
2602
|
+
l$ret$1: do {
|
|
2603
|
+
var tmp_3;
|
|
2604
|
+
try {
|
|
2605
|
+
var tmp_4 = document.createElement('canvas');
|
|
2606
|
+
var canvas = tmp_4 instanceof HTMLCanvasElement ? tmp_4 : THROW_CCE();
|
|
2607
|
+
canvas.width = bitmap.width;
|
|
2608
|
+
canvas.height = bitmap.height;
|
|
2609
|
+
var tmp_5 = canvas.getContext('2d');
|
|
2610
|
+
var ctx = tmp_5 instanceof CanvasRenderingContext2D ? tmp_5 : THROW_CCE();
|
|
2611
|
+
ctx.drawImage(bitmap, 0.0, 0.0);
|
|
2612
|
+
var data = ctx.getImageData(0.0, 0.0, bitmap.width, bitmap.height);
|
|
2613
|
+
var src = data.data;
|
|
2614
|
+
var int8 = new Int8Array(src.buffer, src.byteOffset, src.byteLength);
|
|
2615
|
+
var rgba = int8;
|
|
2616
|
+
tmp$ret$0 = new RawTile(bitmap.width, bitmap.height, rgba);
|
|
2617
|
+
break l$ret$1;
|
|
2618
|
+
} catch ($p) {
|
|
2619
|
+
var tmp_6;
|
|
2620
|
+
var t = $p;
|
|
2621
|
+
bitmap.close();
|
|
2622
|
+
throw t;
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
while (false);
|
|
2626
|
+
var tmp_7 = tmp$ret$0;
|
|
2627
|
+
bitmap.close();
|
|
2628
|
+
return tmp_7;
|
|
2629
|
+
}
|
|
2630
|
+
while (false);
|
|
2631
|
+
bitmap.close();
|
|
2632
|
+
return Unit_instance;
|
|
2633
|
+
}
|
|
2634
|
+
} catch ($p_0) {
|
|
2635
|
+
var e_0 = $p_0;
|
|
2636
|
+
if (this.i6_1 === 3) {
|
|
2637
|
+
throw e_0;
|
|
2638
|
+
} else {
|
|
2639
|
+
this.h6_1 = this.i6_1;
|
|
2640
|
+
this.k6_1 = e_0;
|
|
2551
2641
|
}
|
|
2552
2642
|
}
|
|
2553
2643
|
while (true);
|
|
@@ -2564,7 +2654,7 @@
|
|
|
2564
2654
|
function fetchAndDecodeTile$ref_1() {
|
|
2565
2655
|
var i = new fetchAndDecodeTile$ref();
|
|
2566
2656
|
return constructCallableReference(function (p0, $completion) {
|
|
2567
|
-
return i.
|
|
2657
|
+
return i.g10(p0, $completion);
|
|
2568
2658
|
}, 1, 1, 2, 'fetchAndDecodeTile');
|
|
2569
2659
|
}
|
|
2570
2660
|
//region block: init
|
|
@@ -2592,10 +2682,10 @@
|
|
|
2592
2682
|
_.$_$.a = Distance_instance;
|
|
2593
2683
|
_.$_$.b = DouglasPeucker_instance;
|
|
2594
2684
|
_.$_$.c = ElevationSmoother_instance;
|
|
2595
|
-
_.$_$.d =
|
|
2596
|
-
_.$_$.e =
|
|
2597
|
-
_.$_$.f =
|
|
2598
|
-
_.$_$.g =
|
|
2685
|
+
_.$_$.d = ElevationProvider;
|
|
2686
|
+
_.$_$.e = LatLonElevation;
|
|
2687
|
+
_.$_$.f = LatLon;
|
|
2688
|
+
_.$_$.g = Vector3D;
|
|
2599
2689
|
//endregion
|
|
2600
2690
|
return _;
|
|
2601
2691
|
}));
|