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