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