@glandais/vcyclist-engine 3.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.
@@ -27,87 +27,87 @@
27
27
  var imul = Math.imul;
28
28
  var hypot = Math.hypot;
29
29
  var sign = Math.sign;
30
- var protoOf = kotlin_kotlin.$_$.a6;
31
- var initMetadataForCompanion = kotlin_kotlin.$_$.m5;
30
+ var protoOf = kotlin_kotlin.$_$.t6;
31
+ var initMetadataForCompanion = kotlin_kotlin.$_$.f6;
32
32
  var VOID = kotlin_kotlin.$_$.a;
33
- var getNumberHashCode = kotlin_kotlin.$_$.h5;
34
- var equals = kotlin_kotlin.$_$.f5;
35
- var initMetadataForClass = kotlin_kotlin.$_$.l5;
36
- var toString = kotlin_kotlin.$_$.c6;
37
- var hashCode = kotlin_kotlin.$_$.k5;
38
- var getBooleanHashCode = kotlin_kotlin.$_$.g5;
39
- var CoroutineImpl = kotlin_kotlin.$_$.f4;
40
- var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.h;
41
- var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.e;
42
- var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.q3;
43
- var Unit_instance = kotlin_kotlin.$_$.t;
44
- var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.i;
45
- var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.f;
46
- var initMetadataForCoroutine = kotlin_kotlin.$_$.n5;
47
- var initMetadataForObject = kotlin_kotlin.$_$.r5;
48
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.x;
49
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.m1;
50
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.w;
51
- var last = kotlin_kotlin.$_$.y2;
52
- var toIntArray = kotlin_kotlin.$_$.j3;
53
- var sortedWith = kotlin_kotlin.$_$.h3;
54
- var toMutableList = kotlin_kotlin.$_$.m3;
55
- var first = kotlin_kotlin.$_$.s2;
56
- var removeAll = kotlin_kotlin.$_$.c3;
57
- var numberRangeToNumber = kotlin_kotlin.$_$.w5;
58
- var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
33
+ var getNumberHashCode = kotlin_kotlin.$_$.a6;
34
+ var equals = kotlin_kotlin.$_$.x5;
35
+ var initMetadataForClass = kotlin_kotlin.$_$.e6;
36
+ var toString = kotlin_kotlin.$_$.w6;
37
+ var hashCode = kotlin_kotlin.$_$.d6;
38
+ var getBooleanHashCode = kotlin_kotlin.$_$.z5;
39
+ var CoroutineImpl = kotlin_kotlin.$_$.s4;
40
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y1;
41
+ var Unit_instance = kotlin_kotlin.$_$.f1;
42
+ var PointPerDistance_instance = kotlin_io_github_glandais_gpx.$_$.k;
43
+ var ElevationStep_instance = kotlin_io_github_glandais_gpx.$_$.h;
44
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.d4;
45
+ var PointPerSecond_instance = kotlin_io_github_glandais_gpx.$_$.l;
46
+ var PathSimplifier_instance = kotlin_io_github_glandais_gpx.$_$.i;
47
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.g6;
48
+ var initMetadataForObject = kotlin_kotlin.$_$.k6;
49
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i1;
50
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h1;
51
+ var last = kotlin_kotlin.$_$.l3;
52
+ var toIntArray = kotlin_kotlin.$_$.w3;
53
+ var sortedWith = kotlin_kotlin.$_$.u3;
54
+ var toMutableList = kotlin_kotlin.$_$.z3;
55
+ var first = kotlin_kotlin.$_$.f3;
56
+ var removeAll = kotlin_kotlin.$_$.p3;
57
+ var numberRangeToNumber = kotlin_kotlin.$_$.p6;
58
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.v2;
59
59
  var Vector3D = kotlin_io_github_glandais_elevation.$_$.g;
60
- var emptyList = kotlin_kotlin.$_$.p2;
61
- var coerceIn = kotlin_kotlin.$_$.j6;
60
+ var emptyList = kotlin_kotlin.$_$.c3;
61
+ var coerceIn = kotlin_kotlin.$_$.d7;
62
62
  var DouglasPeucker_instance = kotlin_io_github_glandais_elevation.$_$.b;
63
- var FunctionAdapter = kotlin_kotlin.$_$.v4;
64
- var isInterface = kotlin_kotlin.$_$.t5;
65
- var Comparator = kotlin_kotlin.$_$.y7;
66
- var compareValues = kotlin_kotlin.$_$.o3;
67
- var until = kotlin_kotlin.$_$.n6;
68
- var Pair = kotlin_kotlin.$_$.f8;
69
- var listOf = kotlin_kotlin.$_$.z2;
70
- var Default_getInstance = kotlin_kotlin.$_$.p;
71
- var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.l;
72
- var isNaN_0 = kotlin_kotlin.$_$.p8;
63
+ var FunctionAdapter = kotlin_kotlin.$_$.l5;
64
+ var isInterface = kotlin_kotlin.$_$.m6;
65
+ var Comparator = kotlin_kotlin.$_$.u8;
66
+ var compareValues = kotlin_kotlin.$_$.b4;
67
+ var until = kotlin_kotlin.$_$.h7;
68
+ var Pair = kotlin_kotlin.$_$.b9;
69
+ var listOf = kotlin_kotlin.$_$.m3;
70
+ var Default_getInstance = kotlin_kotlin.$_$.a1;
71
+ var PointField_TEMPERATURE_getInstance = kotlin_io_github_glandais_gpx.$_$.c;
72
+ var isNaN_0 = kotlin_kotlin.$_$.p9;
73
73
  var get_entries = kotlin_io_github_glandais_gpx.$_$.u;
74
74
  var Path = kotlin_io_github_glandais_gpx.$_$.t;
75
- var GpxParser_instance = kotlin_io_github_glandais_gpx.$_$.a;
76
- var copyToArray = kotlin_kotlin.$_$.o2;
75
+ var GpxParser_instance = kotlin_io_github_glandais_gpx.$_$.d;
76
+ var copyToArray = kotlin_kotlin.$_$.b3;
77
77
  var firstTrackAsPath = kotlin_io_github_glandais_gpx.$_$.n;
78
78
  var tracksAsPaths = kotlin_io_github_glandais_gpx.$_$.q;
79
79
  var segmentsAsPaths = kotlin_io_github_glandais_gpx.$_$.o;
80
- var GpxPathKind_TRACK_getInstance = kotlin_io_github_glandais_gpx.$_$.k;
81
- var setOf = kotlin_kotlin.$_$.f3;
82
- var GpxPathKind_ROUTE_getInstance = kotlin_io_github_glandais_gpx.$_$.j;
83
- var GpxWriter_instance = kotlin_io_github_glandais_gpx.$_$.b;
84
- var toList = kotlin_kotlin.$_$.l3;
80
+ var GpxPathKind_TRACK_getInstance = kotlin_io_github_glandais_gpx.$_$.b;
81
+ var setOf = kotlin_kotlin.$_$.s3;
82
+ var GpxPathKind_ROUTE_getInstance = kotlin_io_github_glandais_gpx.$_$.a;
83
+ var GpxWriter_instance = kotlin_io_github_glandais_gpx.$_$.e;
84
+ var toList = kotlin_kotlin.$_$.y3;
85
85
  var toGpxDocument = kotlin_io_github_glandais_gpx.$_$.p;
86
- var Companion_getInstance = kotlin_kotlin.$_$.r;
87
- var numberToLong = kotlin_kotlin.$_$.s4;
86
+ var Companion_getInstance = kotlin_kotlin.$_$.c1;
87
+ var numberToLong = kotlin_kotlin.$_$.h5;
88
88
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
89
89
  var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
90
- var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.g;
91
- var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.o1;
92
- var CsvWriter_instance = kotlin_io_github_glandais_gpx.$_$.c;
93
- var firstOrNull = kotlin_kotlin.$_$.b7;
90
+ var Companion_getInstance_0 = kotlin_io_github_glandais_gpx.$_$.j;
91
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
92
+ var CsvWriter_instance = kotlin_io_github_glandais_gpx.$_$.f;
93
+ var firstOrNull = kotlin_kotlin.$_$.w7;
94
94
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.b;
95
- var Char = kotlin_kotlin.$_$.x7;
95
+ var Char = kotlin_kotlin.$_$.t8;
96
96
  var CsvOptions = kotlin_io_github_glandais_gpx.$_$.r;
97
- var JsonWriter_instance = kotlin_io_github_glandais_gpx.$_$.d;
97
+ var JsonWriter_instance = kotlin_io_github_glandais_gpx.$_$.g;
98
98
  var JsonOptions = kotlin_io_github_glandais_gpx.$_$.s;
99
99
  var toFitBytes = kotlin_io_github_glandais_fit.$_$.a;
100
- var Companion_getInstance_1 = kotlin_kotlin.$_$.q;
101
- var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.u;
102
- var toDuration = kotlin_kotlin.$_$.w7;
100
+ var Companion_getInstance_1 = kotlin_kotlin.$_$.b1;
101
+ var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.v;
102
+ var toDuration = kotlin_kotlin.$_$.s8;
103
103
  var toFitBytes_0 = kotlin_io_github_glandais_fit.$_$.b;
104
- var toNumber = kotlin_kotlin.$_$.u4;
104
+ var toNumber = kotlin_kotlin.$_$.k5;
105
105
  var GpxWaypoint = kotlin_io_github_glandais_gpx.$_$.m;
106
- var THROW_CCE = kotlin_kotlin.$_$.i8;
106
+ var THROW_CCE = kotlin_kotlin.$_$.e9;
107
107
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
108
108
  var ElevationProvider = kotlin_io_github_glandais_elevation.$_$.d;
109
- var initMetadataForLambda = kotlin_kotlin.$_$.q5;
110
- var constructCallableReference = kotlin_kotlin.$_$.d5;
109
+ var initMetadataForLambda = kotlin_kotlin.$_$.j6;
110
+ var constructCallableReference = kotlin_kotlin.$_$.u5;
111
111
  //endregion
112
112
  //region block: pre-declaration
113
113
  initMetadataForCompanion(Companion);
@@ -158,7 +158,7 @@
158
158
  //endregion
159
159
  function Companion() {
160
160
  Companion_instance = this;
161
- this.y1y_1 = new Bike();
161
+ this.DEFAULT_1 = new Bike();
162
162
  }
163
163
  var Companion_instance;
164
164
  function Companion_getInstance_2() {
@@ -173,21 +173,21 @@
173
173
  inertiaRear = inertiaRear === VOID ? 0.07 : inertiaRear;
174
174
  wheelRadiusM = wheelRadiusM === VOID ? 0.7 : wheelRadiusM;
175
175
  efficiency = efficiency === VOID ? 0.976 : efficiency;
176
- this.z1y_1 = crr;
177
- this.a1z_1 = inertiaFront;
178
- this.b1z_1 = inertiaRear;
179
- this.c1z_1 = wheelRadiusM;
180
- this.d1z_1 = efficiency;
176
+ this.crr_1 = crr;
177
+ this.inertiaFront_1 = inertiaFront;
178
+ this.inertiaRear_1 = inertiaRear;
179
+ this.wheelRadiusM_1 = wheelRadiusM;
180
+ this.efficiency_1 = efficiency;
181
181
  }
182
182
  protoOf(Bike).toString = function () {
183
- return 'Bike(crr=' + this.z1y_1 + ', inertiaFront=' + this.a1z_1 + ', inertiaRear=' + this.b1z_1 + ', wheelRadiusM=' + this.c1z_1 + ', efficiency=' + this.d1z_1 + ')';
183
+ return 'Bike(crr=' + this.crr_1 + ', inertiaFront=' + this.inertiaFront_1 + ', inertiaRear=' + this.inertiaRear_1 + ', wheelRadiusM=' + this.wheelRadiusM_1 + ', efficiency=' + this.efficiency_1 + ')';
184
184
  };
185
185
  protoOf(Bike).hashCode = function () {
186
- var result = getNumberHashCode(this.z1y_1);
187
- result = imul(result, 31) + getNumberHashCode(this.a1z_1) | 0;
188
- result = imul(result, 31) + getNumberHashCode(this.b1z_1) | 0;
189
- result = imul(result, 31) + getNumberHashCode(this.c1z_1) | 0;
190
- result = imul(result, 31) + getNumberHashCode(this.d1z_1) | 0;
186
+ var result = getNumberHashCode(this.crr_1);
187
+ result = imul(result, 31) + getNumberHashCode(this.inertiaFront_1) | 0;
188
+ result = imul(result, 31) + getNumberHashCode(this.inertiaRear_1) | 0;
189
+ result = imul(result, 31) + getNumberHashCode(this.wheelRadiusM_1) | 0;
190
+ result = imul(result, 31) + getNumberHashCode(this.efficiency_1) | 0;
191
191
  return result;
192
192
  };
193
193
  protoOf(Bike).equals = function (other) {
@@ -195,41 +195,41 @@
195
195
  return true;
196
196
  if (!(other instanceof Bike))
197
197
  return false;
198
- if (!equals(this.z1y_1, other.z1y_1))
198
+ if (!equals(this.crr_1, other.crr_1))
199
199
  return false;
200
- if (!equals(this.a1z_1, other.a1z_1))
200
+ if (!equals(this.inertiaFront_1, other.inertiaFront_1))
201
201
  return false;
202
- if (!equals(this.b1z_1, other.b1z_1))
202
+ if (!equals(this.inertiaRear_1, other.inertiaRear_1))
203
203
  return false;
204
- if (!equals(this.c1z_1, other.c1z_1))
204
+ if (!equals(this.wheelRadiusM_1, other.wheelRadiusM_1))
205
205
  return false;
206
- if (!equals(this.d1z_1, other.d1z_1))
206
+ if (!equals(this.efficiency_1, other.efficiency_1))
207
207
  return false;
208
208
  return true;
209
209
  };
210
210
  function Course(path, cyclist, bike) {
211
- cyclist = cyclist === VOID ? Companion_getInstance_4().e1z_1 : cyclist;
212
- bike = bike === VOID ? Companion_getInstance_2().y1y_1 : bike;
213
- this.f1z_1 = path;
214
- this.g1z_1 = cyclist;
215
- this.h1z_1 = bike;
211
+ cyclist = cyclist === VOID ? Companion_getInstance_4().DEFAULT_1 : cyclist;
212
+ bike = bike === VOID ? Companion_getInstance_2().DEFAULT_1 : bike;
213
+ this.path_1 = path;
214
+ this.cyclist_1 = cyclist;
215
+ this.bike_1 = bike;
216
216
  }
217
- protoOf(Course).i1z = function (path, cyclist, bike) {
217
+ protoOf(Course).copy_yzntdp_k$ = function (path, cyclist, bike) {
218
218
  return new Course(path, cyclist, bike);
219
219
  };
220
- protoOf(Course).j1z = function (path, cyclist, bike, $super) {
221
- path = path === VOID ? this.f1z_1 : path;
222
- cyclist = cyclist === VOID ? this.g1z_1 : cyclist;
223
- bike = bike === VOID ? this.h1z_1 : bike;
224
- return $super === VOID ? this.i1z(path, cyclist, bike) : $super.i1z.call(this, path, cyclist, bike);
220
+ protoOf(Course).copy$default_mmxsnj_k$ = function (path, cyclist, bike, $super) {
221
+ path = path === VOID ? this.path_1 : path;
222
+ cyclist = cyclist === VOID ? this.cyclist_1 : cyclist;
223
+ bike = bike === VOID ? this.bike_1 : bike;
224
+ return $super === VOID ? this.copy_yzntdp_k$(path, cyclist, bike) : $super.copy_yzntdp_k$.call(this, path, cyclist, bike);
225
225
  };
226
226
  protoOf(Course).toString = function () {
227
- return 'Course(path=' + toString(this.f1z_1) + ', cyclist=' + this.g1z_1.toString() + ', bike=' + this.h1z_1.toString() + ')';
227
+ return 'Course(path=' + toString(this.path_1) + ', cyclist=' + this.cyclist_1.toString() + ', bike=' + this.bike_1.toString() + ')';
228
228
  };
229
229
  protoOf(Course).hashCode = function () {
230
- var result = hashCode(this.f1z_1);
231
- result = imul(result, 31) + this.g1z_1.hashCode() | 0;
232
- result = imul(result, 31) + this.h1z_1.hashCode() | 0;
230
+ var result = hashCode(this.path_1);
231
+ result = imul(result, 31) + this.cyclist_1.hashCode() | 0;
232
+ result = imul(result, 31) + this.bike_1.hashCode() | 0;
233
233
  return result;
234
234
  };
235
235
  protoOf(Course).equals = function (other) {
@@ -237,17 +237,17 @@
237
237
  return true;
238
238
  if (!(other instanceof Course))
239
239
  return false;
240
- if (!equals(this.f1z_1, other.f1z_1))
240
+ if (!equals(this.path_1, other.path_1))
241
241
  return false;
242
- if (!this.g1z_1.equals(other.g1z_1))
242
+ if (!this.cyclist_1.equals(other.cyclist_1))
243
243
  return false;
244
- if (!this.h1z_1.equals(other.h1z_1))
244
+ if (!this.bike_1.equals(other.bike_1))
245
245
  return false;
246
246
  return true;
247
247
  };
248
248
  function Companion_0() {
249
249
  Companion_instance_0 = this;
250
- this.k1z_1 = new PowerProviderConstant(280.0);
250
+ this.DEFAULT_CYCLIST_POWER_PROVIDER_1 = new PowerProviderConstant(280.0);
251
251
  }
252
252
  var Companion_instance_0;
253
253
  function Companion_getInstance_3() {
@@ -260,42 +260,42 @@
260
260
  rhoProvider = rhoProvider === VOID ? RhoProviderDefault_instance : rhoProvider;
261
261
  aeroProvider = aeroProvider === VOID ? AeroProviderConstant_instance : aeroProvider;
262
262
  windProvider = windProvider === VOID ? WindProviderNone_instance : windProvider;
263
- cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_3().k1z_1 : cyclistPowerProvider;
264
- this.l1z_1 = course;
265
- this.m1z_1 = rhoProvider;
266
- this.n1z_1 = aeroProvider;
267
- this.o1z_1 = windProvider;
268
- this.p1z_1 = cyclistPowerProvider;
263
+ cyclistPowerProvider = cyclistPowerProvider === VOID ? Companion_getInstance_3().DEFAULT_CYCLIST_POWER_PROVIDER_1 : cyclistPowerProvider;
264
+ this.course_1 = course;
265
+ this.rhoProvider_1 = rhoProvider;
266
+ this.aeroProvider_1 = aeroProvider;
267
+ this.windProvider_1 = windProvider;
268
+ this.cyclistPowerProvider_1 = cyclistPowerProvider;
269
269
  }
270
- protoOf(CoursePhysics).q1z = function () {
271
- return this.l1z_1.f1z_1;
270
+ protoOf(CoursePhysics).get_path_wos8ry_k$ = function () {
271
+ return this.course_1.path_1;
272
272
  };
273
- protoOf(CoursePhysics).r1z = function () {
274
- return this.l1z_1.g1z_1;
273
+ protoOf(CoursePhysics).get_cyclist_lkc0de_k$ = function () {
274
+ return this.course_1.cyclist_1;
275
275
  };
276
- protoOf(CoursePhysics).s1z = function () {
277
- return this.l1z_1.h1z_1;
276
+ protoOf(CoursePhysics).get_bike_wojgoa_k$ = function () {
277
+ return this.course_1.bike_1;
278
278
  };
279
- protoOf(CoursePhysics).t1z = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
279
+ protoOf(CoursePhysics).copy_ulppn1_k$ = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) {
280
280
  return new CoursePhysics(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
281
281
  };
282
- protoOf(CoursePhysics).u1z = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider, $super) {
283
- course = course === VOID ? this.l1z_1 : course;
284
- rhoProvider = rhoProvider === VOID ? this.m1z_1 : rhoProvider;
285
- aeroProvider = aeroProvider === VOID ? this.n1z_1 : aeroProvider;
286
- windProvider = windProvider === VOID ? this.o1z_1 : windProvider;
287
- cyclistPowerProvider = cyclistPowerProvider === VOID ? this.p1z_1 : cyclistPowerProvider;
288
- return $super === VOID ? this.t1z(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) : $super.t1z.call(this, course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
282
+ protoOf(CoursePhysics).copy$default_a3dskc_k$ = function (course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider, $super) {
283
+ course = course === VOID ? this.course_1 : course;
284
+ rhoProvider = rhoProvider === VOID ? this.rhoProvider_1 : rhoProvider;
285
+ aeroProvider = aeroProvider === VOID ? this.aeroProvider_1 : aeroProvider;
286
+ windProvider = windProvider === VOID ? this.windProvider_1 : windProvider;
287
+ cyclistPowerProvider = cyclistPowerProvider === VOID ? this.cyclistPowerProvider_1 : cyclistPowerProvider;
288
+ return $super === VOID ? this.copy_ulppn1_k$(course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider) : $super.copy_ulppn1_k$.call(this, course, rhoProvider, aeroProvider, windProvider, cyclistPowerProvider);
289
289
  };
290
290
  protoOf(CoursePhysics).toString = function () {
291
- return 'CoursePhysics(course=' + this.l1z_1.toString() + ', rhoProvider=' + toString(this.m1z_1) + ', aeroProvider=' + toString(this.n1z_1) + ', windProvider=' + toString(this.o1z_1) + ', cyclistPowerProvider=' + toString(this.p1z_1) + ')';
291
+ return 'CoursePhysics(course=' + this.course_1.toString() + ', rhoProvider=' + toString(this.rhoProvider_1) + ', aeroProvider=' + toString(this.aeroProvider_1) + ', windProvider=' + toString(this.windProvider_1) + ', cyclistPowerProvider=' + toString(this.cyclistPowerProvider_1) + ')';
292
292
  };
293
293
  protoOf(CoursePhysics).hashCode = function () {
294
- var result = this.l1z_1.hashCode();
295
- result = imul(result, 31) + hashCode(this.m1z_1) | 0;
296
- result = imul(result, 31) + hashCode(this.n1z_1) | 0;
297
- result = imul(result, 31) + hashCode(this.o1z_1) | 0;
298
- result = imul(result, 31) + hashCode(this.p1z_1) | 0;
294
+ var result = this.course_1.hashCode();
295
+ result = imul(result, 31) + hashCode(this.rhoProvider_1) | 0;
296
+ result = imul(result, 31) + hashCode(this.aeroProvider_1) | 0;
297
+ result = imul(result, 31) + hashCode(this.windProvider_1) | 0;
298
+ result = imul(result, 31) + hashCode(this.cyclistPowerProvider_1) | 0;
299
299
  return result;
300
300
  };
301
301
  protoOf(CoursePhysics).equals = function (other) {
@@ -303,21 +303,21 @@
303
303
  return true;
304
304
  if (!(other instanceof CoursePhysics))
305
305
  return false;
306
- if (!this.l1z_1.equals(other.l1z_1))
306
+ if (!this.course_1.equals(other.course_1))
307
307
  return false;
308
- if (!equals(this.m1z_1, other.m1z_1))
308
+ if (!equals(this.rhoProvider_1, other.rhoProvider_1))
309
309
  return false;
310
- if (!equals(this.n1z_1, other.n1z_1))
310
+ if (!equals(this.aeroProvider_1, other.aeroProvider_1))
311
311
  return false;
312
- if (!equals(this.o1z_1, other.o1z_1))
312
+ if (!equals(this.windProvider_1, other.windProvider_1))
313
313
  return false;
314
- if (!equals(this.p1z_1, other.p1z_1))
314
+ if (!equals(this.cyclistPowerProvider_1, other.cyclistPowerProvider_1))
315
315
  return false;
316
316
  return true;
317
317
  };
318
318
  function Companion_1() {
319
319
  Companion_instance_1 = this;
320
- this.e1z_1 = new Cyclist();
320
+ this.DEFAULT_1 = new Cyclist();
321
321
  }
322
322
  var Companion_instance_1;
323
323
  function Companion_getInstance_4() {
@@ -333,34 +333,34 @@
333
333
  frontalAreaM2 = frontalAreaM2 === VOID ? 0.5 : frontalAreaM2;
334
334
  maxLeanAngleDeg = maxLeanAngleDeg === VOID ? 35.0 : maxLeanAngleDeg;
335
335
  maxSpeedKmH = maxSpeedKmH === VOID ? 100.0 : maxSpeedKmH;
336
- this.v1z_1 = massKg;
337
- this.w1z_1 = maxBrakeG;
338
- this.x1z_1 = cd;
339
- this.y1z_1 = frontalAreaM2;
340
- this.z1z_1 = maxLeanAngleDeg;
341
- this.a20_1 = maxSpeedKmH;
342
- }
343
- protoOf(Cyclist).b20 = function () {
336
+ this.massKg_1 = massKg;
337
+ this.maxBrakeG_1 = maxBrakeG;
338
+ this.cd_1 = cd;
339
+ this.frontalAreaM2__1 = frontalAreaM2;
340
+ this.maxLeanAngleDeg_1 = maxLeanAngleDeg;
341
+ this.maxSpeedKmH_1 = maxSpeedKmH;
342
+ }
343
+ protoOf(Cyclist).get_tanMaxLeanAngle_qqiag1_k$ = function () {
344
344
  // Inline function 'kotlin.math.tan' call
345
- var x = this.z1z_1 * 3.141592653589793 / 180.0;
345
+ var x = this.maxLeanAngleDeg_1 * 3.141592653589793 / 180.0;
346
346
  return Math.tan(x);
347
347
  };
348
- protoOf(Cyclist).c20 = function () {
349
- return this.w1z_1 * 9.8;
348
+ protoOf(Cyclist).get_maxBrakeMS2_nzouxw_k$ = function () {
349
+ return this.maxBrakeG_1 * 9.8;
350
350
  };
351
- protoOf(Cyclist).d20 = function () {
352
- return this.a20_1 / 3.6;
351
+ protoOf(Cyclist).get_maxSpeedMS_xz2r7y_k$ = function () {
352
+ return this.maxSpeedKmH_1 / 3.6;
353
353
  };
354
354
  protoOf(Cyclist).toString = function () {
355
- return 'Cyclist(massKg=' + this.v1z_1 + ', maxBrakeG=' + this.w1z_1 + ', cd=' + this.x1z_1 + ', frontalAreaM2=' + this.y1z_1 + ', maxLeanAngleDeg=' + this.z1z_1 + ', maxSpeedKmH=' + this.a20_1 + ')';
355
+ return 'Cyclist(massKg=' + this.massKg_1 + ', maxBrakeG=' + this.maxBrakeG_1 + ', cd=' + this.cd_1 + ', frontalAreaM2=' + this.frontalAreaM2__1 + ', maxLeanAngleDeg=' + this.maxLeanAngleDeg_1 + ', maxSpeedKmH=' + this.maxSpeedKmH_1 + ')';
356
356
  };
357
357
  protoOf(Cyclist).hashCode = function () {
358
- var result = getNumberHashCode(this.v1z_1);
359
- result = imul(result, 31) + getNumberHashCode(this.w1z_1) | 0;
360
- result = imul(result, 31) + getNumberHashCode(this.x1z_1) | 0;
361
- result = imul(result, 31) + getNumberHashCode(this.y1z_1) | 0;
362
- result = imul(result, 31) + getNumberHashCode(this.z1z_1) | 0;
363
- result = imul(result, 31) + getNumberHashCode(this.a20_1) | 0;
358
+ var result = getNumberHashCode(this.massKg_1);
359
+ result = imul(result, 31) + getNumberHashCode(this.maxBrakeG_1) | 0;
360
+ result = imul(result, 31) + getNumberHashCode(this.cd_1) | 0;
361
+ result = imul(result, 31) + getNumberHashCode(this.frontalAreaM2__1) | 0;
362
+ result = imul(result, 31) + getNumberHashCode(this.maxLeanAngleDeg_1) | 0;
363
+ result = imul(result, 31) + getNumberHashCode(this.maxSpeedKmH_1) | 0;
364
364
  return result;
365
365
  };
366
366
  protoOf(Cyclist).equals = function (other) {
@@ -368,17 +368,17 @@
368
368
  return true;
369
369
  if (!(other instanceof Cyclist))
370
370
  return false;
371
- if (!equals(this.v1z_1, other.v1z_1))
371
+ if (!equals(this.massKg_1, other.massKg_1))
372
372
  return false;
373
- if (!equals(this.w1z_1, other.w1z_1))
373
+ if (!equals(this.maxBrakeG_1, other.maxBrakeG_1))
374
374
  return false;
375
- if (!equals(this.x1z_1, other.x1z_1))
375
+ if (!equals(this.cd_1, other.cd_1))
376
376
  return false;
377
- if (!equals(this.y1z_1, other.y1z_1))
377
+ if (!equals(this.frontalAreaM2__1, other.frontalAreaM2__1))
378
378
  return false;
379
- if (!equals(this.z1z_1, other.z1z_1))
379
+ if (!equals(this.maxLeanAngleDeg_1, other.maxLeanAngleDeg_1))
380
380
  return false;
381
- if (!equals(this.a20_1, other.a20_1))
381
+ if (!equals(this.maxSpeedKmH_1, other.maxSpeedKmH_1))
382
382
  return false;
383
383
  return true;
384
384
  };
@@ -386,17 +386,17 @@
386
386
  enabled = enabled === VOID ? true : enabled;
387
387
  toleranceM = toleranceM === VOID ? 10.0 : toleranceM;
388
388
  zExaggeration = zExaggeration === VOID ? 3.0 : zExaggeration;
389
- this.e20_1 = enabled;
390
- this.f20_1 = toleranceM;
391
- this.g20_1 = zExaggeration;
389
+ this.enabled_1 = enabled;
390
+ this.toleranceM_1 = toleranceM;
391
+ this.zExaggeration_1 = zExaggeration;
392
392
  }
393
393
  protoOf(SimplifyPathOptions).toString = function () {
394
- return 'SimplifyPathOptions(enabled=' + this.e20_1 + ', toleranceM=' + this.f20_1 + ', zExaggeration=' + this.g20_1 + ')';
394
+ return 'SimplifyPathOptions(enabled=' + this.enabled_1 + ', toleranceM=' + this.toleranceM_1 + ', zExaggeration=' + this.zExaggeration_1 + ')';
395
395
  };
396
396
  protoOf(SimplifyPathOptions).hashCode = function () {
397
- var result = getBooleanHashCode(this.e20_1);
398
- result = imul(result, 31) + getNumberHashCode(this.f20_1) | 0;
399
- result = imul(result, 31) + getNumberHashCode(this.g20_1) | 0;
397
+ var result = getBooleanHashCode(this.enabled_1);
398
+ result = imul(result, 31) + getNumberHashCode(this.toleranceM_1) | 0;
399
+ result = imul(result, 31) + getNumberHashCode(this.zExaggeration_1) | 0;
400
400
  return result;
401
401
  };
402
402
  protoOf(SimplifyPathOptions).equals = function (other) {
@@ -404,17 +404,17 @@
404
404
  return true;
405
405
  if (!(other instanceof SimplifyPathOptions))
406
406
  return false;
407
- if (!(this.e20_1 === other.e20_1))
407
+ if (!(this.enabled_1 === other.enabled_1))
408
408
  return false;
409
- if (!equals(this.f20_1, other.f20_1))
409
+ if (!equals(this.toleranceM_1, other.toleranceM_1))
410
410
  return false;
411
- if (!equals(this.g20_1, other.g20_1))
411
+ if (!equals(this.zExaggeration_1, other.zExaggeration_1))
412
412
  return false;
413
413
  return true;
414
414
  };
415
415
  function Companion_2() {
416
416
  Companion_instance_2 = this;
417
- this.h20_1 = new EnhanceOptions();
417
+ this.DEFAULT_1 = new EnhanceOptions();
418
418
  }
419
419
  var Companion_instance_2;
420
420
  function Companion_getInstance_5() {
@@ -429,21 +429,32 @@
429
429
  virtualizeTrack = virtualizeTrack === VOID ? true : virtualizeTrack;
430
430
  computeOnePointPerSecond = computeOnePointPerSecond === VOID ? true : computeOnePointPerSecond;
431
431
  simplifyPath = simplifyPath === VOID ? new SimplifyPathOptions() : simplifyPath;
432
- this.i20_1 = fixElevation;
433
- this.j20_1 = computeMaxSpeeds;
434
- this.k20_1 = virtualizeTrack;
435
- this.l20_1 = computeOnePointPerSecond;
436
- this.m20_1 = simplifyPath;
437
- }
432
+ this.fixElevation_1 = fixElevation;
433
+ this.computeMaxSpeeds_1 = computeMaxSpeeds;
434
+ this.virtualizeTrack_1 = virtualizeTrack;
435
+ this.computeOnePointPerSecond_1 = computeOnePointPerSecond;
436
+ this.simplifyPath_1 = simplifyPath;
437
+ }
438
+ protoOf(EnhanceOptions).copy_8buhav_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath) {
439
+ return new EnhanceOptions(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath);
440
+ };
441
+ protoOf(EnhanceOptions).copy$default_9zz8ww_k$ = function (fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath, $super) {
442
+ fixElevation = fixElevation === VOID ? this.fixElevation_1 : fixElevation;
443
+ computeMaxSpeeds = computeMaxSpeeds === VOID ? this.computeMaxSpeeds_1 : computeMaxSpeeds;
444
+ virtualizeTrack = virtualizeTrack === VOID ? this.virtualizeTrack_1 : virtualizeTrack;
445
+ computeOnePointPerSecond = computeOnePointPerSecond === VOID ? this.computeOnePointPerSecond_1 : computeOnePointPerSecond;
446
+ simplifyPath = simplifyPath === VOID ? this.simplifyPath_1 : simplifyPath;
447
+ return $super === VOID ? this.copy_8buhav_k$(fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath) : $super.copy_8buhav_k$.call(this, fixElevation, computeMaxSpeeds, virtualizeTrack, computeOnePointPerSecond, simplifyPath);
448
+ };
438
449
  protoOf(EnhanceOptions).toString = function () {
439
- return 'EnhanceOptions(fixElevation=' + this.i20_1 + ', computeMaxSpeeds=' + this.j20_1 + ', virtualizeTrack=' + this.k20_1 + ', computeOnePointPerSecond=' + this.l20_1 + ', simplifyPath=' + this.m20_1.toString() + ')';
450
+ return 'EnhanceOptions(fixElevation=' + this.fixElevation_1 + ', computeMaxSpeeds=' + this.computeMaxSpeeds_1 + ', virtualizeTrack=' + this.virtualizeTrack_1 + ', computeOnePointPerSecond=' + this.computeOnePointPerSecond_1 + ', simplifyPath=' + this.simplifyPath_1.toString() + ')';
440
451
  };
441
452
  protoOf(EnhanceOptions).hashCode = function () {
442
- var result = getBooleanHashCode(this.i20_1);
443
- result = imul(result, 31) + getBooleanHashCode(this.j20_1) | 0;
444
- result = imul(result, 31) + getBooleanHashCode(this.k20_1) | 0;
445
- result = imul(result, 31) + getBooleanHashCode(this.l20_1) | 0;
446
- result = imul(result, 31) + this.m20_1.hashCode() | 0;
453
+ var result = getBooleanHashCode(this.fixElevation_1);
454
+ result = imul(result, 31) + getBooleanHashCode(this.computeMaxSpeeds_1) | 0;
455
+ result = imul(result, 31) + getBooleanHashCode(this.virtualizeTrack_1) | 0;
456
+ result = imul(result, 31) + getBooleanHashCode(this.computeOnePointPerSecond_1) | 0;
457
+ result = imul(result, 31) + this.simplifyPath_1.hashCode() | 0;
447
458
  return result;
448
459
  };
449
460
  protoOf(EnhanceOptions).equals = function (other) {
@@ -451,161 +462,166 @@
451
462
  return true;
452
463
  if (!(other instanceof EnhanceOptions))
453
464
  return false;
454
- if (!(this.i20_1 === other.i20_1))
465
+ if (!(this.fixElevation_1 === other.fixElevation_1))
455
466
  return false;
456
- if (!(this.j20_1 === other.j20_1))
467
+ if (!(this.computeMaxSpeeds_1 === other.computeMaxSpeeds_1))
457
468
  return false;
458
- if (!(this.k20_1 === other.k20_1))
469
+ if (!(this.virtualizeTrack_1 === other.virtualizeTrack_1))
459
470
  return false;
460
- if (!(this.l20_1 === other.l20_1))
471
+ if (!(this.computeOnePointPerSecond_1 === other.computeOnePointPerSecond_1))
461
472
  return false;
462
- if (!this.m20_1.equals(other.m20_1))
473
+ if (!this.simplifyPath_1.equals(other.simplifyPath_1))
463
474
  return false;
464
475
  return true;
465
476
  };
466
477
  function $enhanceCourseCOROUTINE$(_this__u8e3s4, course, options, elevationProvider, resultContinuation) {
467
478
  CoroutineImpl.call(this, resultContinuation);
468
- this.v20_1 = _this__u8e3s4;
469
- this.w20_1 = course;
470
- this.x20_1 = options;
471
- this.y20_1 = elevationProvider;
479
+ this._this__u8e3s4__1 = _this__u8e3s4;
480
+ this.course_1 = course;
481
+ this.options_1 = options;
482
+ this.elevationProvider_1 = elevationProvider;
472
483
  }
473
- protoOf($enhanceCourseCOROUTINE$).p6 = function () {
474
- var suspendResult = this.j6_1;
484
+ protoOf($enhanceCourseCOROUTINE$).doResume_5yljmg_k$ = function () {
485
+ var suspendResult = this.result_1;
475
486
  $sm: do
476
487
  try {
477
- var tmp = this.h6_1;
488
+ var tmp = this.state_1;
478
489
  switch (tmp) {
479
490
  case 0:
480
- this.i6_1 = 3;
481
- this.z20_1 = this.w20_1.q1z();
482
- this.z20_1 = PointPerDistance_instance.a1x(this.z20_1, -1.0, 30.0);
483
- if (this.x20_1.i20_1 && !(this.y20_1 == null)) {
484
- this.h6_1 = 1;
485
- suspendResult = ElevationStep_instance.s1u(this.z20_1, this.y20_1, this);
491
+ this.exceptionState_1 = 3;
492
+ if (!(!this.options_1.fixElevation_1 || !(this.elevationProvider_1 == null))) {
493
+ var message = 'fixElevation = true but elevationProvider is null. Pass a provider, or set fixElevation = false (enhanceCourseDefault resolves this automatically).';
494
+ throw IllegalArgumentException_init_$Create$(toString(message));
495
+ }
496
+
497
+ this.path0__1 = this.course_1.get_path_wos8ry_k$();
498
+ this.path0__1 = PointPerDistance_instance.compute_7vlifv_k$(this.path0__1, -1.0, 30.0);
499
+ if (this.options_1.fixElevation_1 && !(this.elevationProvider_1 == null)) {
500
+ this.state_1 = 1;
501
+ suspendResult = ElevationStep_instance.fixElevation_nhpf8r_k$(this.path0__1, this.elevationProvider_1, this);
486
502
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
487
503
  return suspendResult;
488
504
  }
489
505
  continue $sm;
490
506
  } else {
491
- this.h6_1 = 2;
507
+ this.state_1 = 2;
492
508
  continue $sm;
493
509
  }
494
510
 
495
511
  case 1:
496
- this.z20_1 = suspendResult;
497
- this.h6_1 = 2;
512
+ this.path0__1 = suspendResult;
513
+ this.state_1 = 2;
498
514
  continue $sm;
499
515
  case 2:
500
- this.z20_1 = PointPerDistance_instance.a1x(this.z20_1, 1.0, 2.0);
501
- this.z20_1 = ElevationStep_instance.v1u(this.z20_1);
502
- var working = this.w20_1.u1z(this.w20_1.l1z_1.j1z(this.z20_1));
503
- if (this.x20_1.j20_1 || this.x20_1.k20_1) {
504
- MaxSpeedComputer_instance.f21(working.l1z_1);
516
+ this.path0__1 = PointPerDistance_instance.compute_7vlifv_k$(this.path0__1, 1.0, 2.0);
517
+ this.path0__1 = ElevationStep_instance.smoothElevation$default_3c035p_k$(this.path0__1);
518
+ var working = this.course_1.copy$default_a3dskc_k$(this.course_1.course_1.copy$default_mmxsnj_k$(this.path0__1));
519
+ if (this.options_1.computeMaxSpeeds_1 || this.options_1.virtualizeTrack_1) {
520
+ MaxSpeedComputer_instance.computeMaxSpeeds_jc4v4o_k$(working.course_1);
505
521
  }
506
522
 
507
- if (this.x20_1.k20_1) {
508
- this.z20_1 = VirtualizeService_instance.h21(working);
509
- working = working.u1z(working.l1z_1.j1z(this.z20_1));
523
+ if (this.options_1.virtualizeTrack_1) {
524
+ this.path0__1 = VirtualizeService_instance.virtualizeTrack_tp3afi_k$(working);
525
+ working = working.copy$default_a3dskc_k$(working.course_1.copy$default_mmxsnj_k$(this.path0__1));
510
526
  }
511
527
 
512
- if (this.x20_1.l20_1) {
513
- this.z20_1 = PointPerSecond_instance.g1x(this.z20_1);
528
+ if (this.options_1.computeOnePointPerSecond_1) {
529
+ this.path0__1 = PointPerSecond_instance.computeOnePointPerSecond_7sah9a_k$(this.path0__1);
514
530
  }
515
531
 
516
- if (this.x20_1.m20_1.e20_1) {
517
- this.z20_1 = PathSimplifier_instance.o1w(this.z20_1, this.x20_1.m20_1.f20_1, this.x20_1.m20_1.g20_1);
532
+ if (this.options_1.simplifyPath_1.enabled_1) {
533
+ this.path0__1 = PathSimplifier_instance.simplify_gxhj7b_k$(this.path0__1, this.options_1.simplifyPath_1.toleranceM_1, this.options_1.simplifyPath_1.zExaggeration_1);
518
534
  }
519
535
 
520
- return this.z20_1;
536
+ return this.path0__1;
521
537
  case 3:
522
- throw this.k6_1;
538
+ throw this.exception_1;
523
539
  }
524
540
  } catch ($p) {
525
541
  var e = $p;
526
- if (this.i6_1 === 3) {
542
+ if (this.exceptionState_1 === 3) {
527
543
  throw e;
528
544
  } else {
529
- this.h6_1 = this.i6_1;
530
- this.k6_1 = e;
545
+ this.state_1 = this.exceptionState_1;
546
+ this.exception_1 = e;
531
547
  }
532
548
  }
533
549
  while (true);
534
550
  };
535
551
  function Enhancer() {
536
552
  }
537
- protoOf(Enhancer).i21 = function (path) {
553
+ protoOf(Enhancer).getDefaultCourse_gqi1xw_k$ = function (path) {
538
554
  return new CoursePhysics(new Course(path), RhoProviderEstimate_instance, AeroProviderConstant_instance, WindProviderNone_instance, new PowerProviderConstant(280.0));
539
555
  };
540
- protoOf(Enhancer).j21 = function (path, elevationProvider, options, $completion) {
541
- return this.k21(this.i21(path), options, elevationProvider, $completion);
556
+ protoOf(Enhancer).enhanceCourseDefault_jm937y_k$ = function (path, elevationProvider, options, $completion) {
557
+ return this.enhanceCourse_mout3j_k$(this.getDefaultCourse_gqi1xw_k$(path), options.copy$default_9zz8ww_k$(options.fixElevation_1 && !(elevationProvider == null)), elevationProvider, $completion);
542
558
  };
543
- protoOf(Enhancer).k21 = function (course, options, elevationProvider, $completion) {
559
+ protoOf(Enhancer).enhanceCourse_mout3j_k$ = function (course, options, elevationProvider, $completion) {
544
560
  var tmp = new $enhanceCourseCOROUTINE$(this, course, options, elevationProvider, $completion);
545
- tmp.j6_1 = Unit_instance;
546
- tmp.k6_1 = null;
547
- return tmp.p6();
561
+ tmp.result_1 = Unit_instance;
562
+ tmp.exception_1 = null;
563
+ return tmp.doResume_5yljmg_k$();
548
564
  };
549
565
  var Enhancer_instance;
550
566
  function Enhancer_getInstance() {
551
567
  return Enhancer_instance;
552
568
  }
553
569
  function Climb(startIndex, endIndex, startDistanceM, endDistanceM, startElevationM, endElevationM, positiveElevationM, negativeElevationM, parts) {
554
- this.l21_1 = startIndex;
555
- this.m21_1 = endIndex;
556
- this.n21_1 = startDistanceM;
557
- this.o21_1 = endDistanceM;
558
- this.p21_1 = startElevationM;
559
- this.q21_1 = endElevationM;
560
- this.r21_1 = positiveElevationM;
561
- this.s21_1 = negativeElevationM;
562
- this.t21_1 = parts;
563
- }
564
- protoOf(Climb).u21 = function () {
565
- return this.o21_1 - this.n21_1;
566
- };
567
- protoOf(Climb).v21 = function () {
568
- return this.q21_1 - this.p21_1;
569
- };
570
- protoOf(Climb).w21 = function () {
571
- return this.u21() === 0.0 ? 0.0 : this.v21() / this.u21();
572
- };
573
- protoOf(Climb).x21 = function () {
570
+ this.startIndex_1 = startIndex;
571
+ this.endIndex_1 = endIndex;
572
+ this.startDistanceM_1 = startDistanceM;
573
+ this.endDistanceM_1 = endDistanceM;
574
+ this.startElevationM_1 = startElevationM;
575
+ this.endElevationM_1 = endElevationM;
576
+ this.positiveElevationM_1 = positiveElevationM;
577
+ this.negativeElevationM_1 = negativeElevationM;
578
+ this.parts_1 = parts;
579
+ }
580
+ protoOf(Climb).get_lengthM_2aqrzy_k$ = function () {
581
+ return this.endDistanceM_1 - this.startDistanceM_1;
582
+ };
583
+ protoOf(Climb).get_elevationGainM_6kg9eu_k$ = function () {
584
+ return this.endElevationM_1 - this.startElevationM_1;
585
+ };
586
+ protoOf(Climb).get_averageGrade_oooweb_k$ = function () {
587
+ return this.get_lengthM_2aqrzy_k$() === 0.0 ? 0.0 : this.get_elevationGainM_6kg9eu_k$() / this.get_lengthM_2aqrzy_k$();
588
+ };
589
+ protoOf(Climb).get_climbingGrade_olocdd_k$ = function () {
574
590
  // Inline function 'kotlin.collections.filter' call
575
- var tmp0 = this.t21_1;
591
+ var tmp0 = this.parts_1;
576
592
  // Inline function 'kotlin.collections.filterTo' call
577
593
  var destination = ArrayList_init_$Create$();
578
- var _iterator__ex2g4s = tmp0.i();
579
- while (_iterator__ex2g4s.j()) {
580
- var element = _iterator__ex2g4s.k();
581
- if (element.v21() > 0) {
582
- destination.h(element);
594
+ var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
595
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
596
+ var element = _iterator__ex2g4s.next_20eer_k$();
597
+ if (element.get_elevationGainM_6kg9eu_k$() > 0) {
598
+ destination.add_utx5q5_k$(element);
583
599
  }
584
600
  }
585
601
  // Inline function 'kotlin.collections.sumOf' call
586
602
  var sum = 0;
587
- var _iterator__ex2g4s_0 = destination.i();
588
- while (_iterator__ex2g4s_0.j()) {
589
- var element_0 = _iterator__ex2g4s_0.k();
603
+ var _iterator__ex2g4s_0 = destination.iterator_jk1svi_k$();
604
+ while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
605
+ var element_0 = _iterator__ex2g4s_0.next_20eer_k$();
590
606
  var tmp = sum;
591
- sum = tmp + element_0.u21();
607
+ sum = tmp + element_0.get_lengthM_2aqrzy_k$();
592
608
  }
593
609
  var climbingLength = sum;
594
- return climbingLength === 0.0 ? 0.0 : this.r21_1 / climbingLength;
610
+ return climbingLength === 0.0 ? 0.0 : this.positiveElevationM_1 / climbingLength;
595
611
  };
596
612
  protoOf(Climb).toString = function () {
597
- return 'Climb(startIndex=' + this.l21_1 + ', endIndex=' + this.m21_1 + ', startDistanceM=' + this.n21_1 + ', endDistanceM=' + this.o21_1 + ', startElevationM=' + this.p21_1 + ', endElevationM=' + this.q21_1 + ', positiveElevationM=' + this.r21_1 + ', negativeElevationM=' + this.s21_1 + ', parts=' + toString(this.t21_1) + ')';
613
+ return 'Climb(startIndex=' + this.startIndex_1 + ', endIndex=' + this.endIndex_1 + ', startDistanceM=' + this.startDistanceM_1 + ', endDistanceM=' + this.endDistanceM_1 + ', startElevationM=' + this.startElevationM_1 + ', endElevationM=' + this.endElevationM_1 + ', positiveElevationM=' + this.positiveElevationM_1 + ', negativeElevationM=' + this.negativeElevationM_1 + ', parts=' + toString(this.parts_1) + ')';
598
614
  };
599
615
  protoOf(Climb).hashCode = function () {
600
- var result = this.l21_1;
601
- result = imul(result, 31) + this.m21_1 | 0;
602
- result = imul(result, 31) + getNumberHashCode(this.n21_1) | 0;
603
- result = imul(result, 31) + getNumberHashCode(this.o21_1) | 0;
604
- result = imul(result, 31) + getNumberHashCode(this.p21_1) | 0;
605
- result = imul(result, 31) + getNumberHashCode(this.q21_1) | 0;
606
- result = imul(result, 31) + getNumberHashCode(this.r21_1) | 0;
607
- result = imul(result, 31) + getNumberHashCode(this.s21_1) | 0;
608
- result = imul(result, 31) + hashCode(this.t21_1) | 0;
616
+ var result = this.startIndex_1;
617
+ result = imul(result, 31) + this.endIndex_1 | 0;
618
+ result = imul(result, 31) + getNumberHashCode(this.startDistanceM_1) | 0;
619
+ result = imul(result, 31) + getNumberHashCode(this.endDistanceM_1) | 0;
620
+ result = imul(result, 31) + getNumberHashCode(this.startElevationM_1) | 0;
621
+ result = imul(result, 31) + getNumberHashCode(this.endElevationM_1) | 0;
622
+ result = imul(result, 31) + getNumberHashCode(this.positiveElevationM_1) | 0;
623
+ result = imul(result, 31) + getNumberHashCode(this.negativeElevationM_1) | 0;
624
+ result = imul(result, 31) + hashCode(this.parts_1) | 0;
609
625
  return result;
610
626
  };
611
627
  protoOf(Climb).equals = function (other) {
@@ -613,49 +629,49 @@
613
629
  return true;
614
630
  if (!(other instanceof Climb))
615
631
  return false;
616
- if (!(this.l21_1 === other.l21_1))
632
+ if (!(this.startIndex_1 === other.startIndex_1))
617
633
  return false;
618
- if (!(this.m21_1 === other.m21_1))
634
+ if (!(this.endIndex_1 === other.endIndex_1))
619
635
  return false;
620
- if (!equals(this.n21_1, other.n21_1))
636
+ if (!equals(this.startDistanceM_1, other.startDistanceM_1))
621
637
  return false;
622
- if (!equals(this.o21_1, other.o21_1))
638
+ if (!equals(this.endDistanceM_1, other.endDistanceM_1))
623
639
  return false;
624
- if (!equals(this.p21_1, other.p21_1))
640
+ if (!equals(this.startElevationM_1, other.startElevationM_1))
625
641
  return false;
626
- if (!equals(this.q21_1, other.q21_1))
642
+ if (!equals(this.endElevationM_1, other.endElevationM_1))
627
643
  return false;
628
- if (!equals(this.r21_1, other.r21_1))
644
+ if (!equals(this.positiveElevationM_1, other.positiveElevationM_1))
629
645
  return false;
630
- if (!equals(this.s21_1, other.s21_1))
646
+ if (!equals(this.negativeElevationM_1, other.negativeElevationM_1))
631
647
  return false;
632
- if (!equals(this.t21_1, other.t21_1))
648
+ if (!equals(this.parts_1, other.parts_1))
633
649
  return false;
634
650
  return true;
635
651
  };
636
652
  function ClimbPart(startDistanceM, endDistanceM, startElevationM, endElevationM) {
637
- this.y21_1 = startDistanceM;
638
- this.z21_1 = endDistanceM;
639
- this.a22_1 = startElevationM;
640
- this.b22_1 = endElevationM;
653
+ this.startDistanceM_1 = startDistanceM;
654
+ this.endDistanceM_1 = endDistanceM;
655
+ this.startElevationM_1 = startElevationM;
656
+ this.endElevationM_1 = endElevationM;
641
657
  }
642
- protoOf(ClimbPart).u21 = function () {
643
- return this.z21_1 - this.y21_1;
658
+ protoOf(ClimbPart).get_lengthM_2aqrzy_k$ = function () {
659
+ return this.endDistanceM_1 - this.startDistanceM_1;
644
660
  };
645
- protoOf(ClimbPart).v21 = function () {
646
- return this.b22_1 - this.a22_1;
661
+ protoOf(ClimbPart).get_elevationGainM_6kg9eu_k$ = function () {
662
+ return this.endElevationM_1 - this.startElevationM_1;
647
663
  };
648
- protoOf(ClimbPart).c22 = function () {
649
- return this.u21() === 0.0 ? 0.0 : this.v21() / this.u21();
664
+ protoOf(ClimbPart).get_grade_is33qm_k$ = function () {
665
+ return this.get_lengthM_2aqrzy_k$() === 0.0 ? 0.0 : this.get_elevationGainM_6kg9eu_k$() / this.get_lengthM_2aqrzy_k$();
650
666
  };
651
667
  protoOf(ClimbPart).toString = function () {
652
- return 'ClimbPart(startDistanceM=' + this.y21_1 + ', endDistanceM=' + this.z21_1 + ', startElevationM=' + this.a22_1 + ', endElevationM=' + this.b22_1 + ')';
668
+ return 'ClimbPart(startDistanceM=' + this.startDistanceM_1 + ', endDistanceM=' + this.endDistanceM_1 + ', startElevationM=' + this.startElevationM_1 + ', endElevationM=' + this.endElevationM_1 + ')';
653
669
  };
654
670
  protoOf(ClimbPart).hashCode = function () {
655
- var result = getNumberHashCode(this.y21_1);
656
- result = imul(result, 31) + getNumberHashCode(this.z21_1) | 0;
657
- result = imul(result, 31) + getNumberHashCode(this.a22_1) | 0;
658
- result = imul(result, 31) + getNumberHashCode(this.b22_1) | 0;
671
+ var result = getNumberHashCode(this.startDistanceM_1);
672
+ result = imul(result, 31) + getNumberHashCode(this.endDistanceM_1) | 0;
673
+ result = imul(result, 31) + getNumberHashCode(this.startElevationM_1) | 0;
674
+ result = imul(result, 31) + getNumberHashCode(this.endElevationM_1) | 0;
659
675
  return result;
660
676
  };
661
677
  protoOf(ClimbPart).equals = function (other) {
@@ -663,19 +679,19 @@
663
679
  return true;
664
680
  if (!(other instanceof ClimbPart))
665
681
  return false;
666
- if (!equals(this.y21_1, other.y21_1))
682
+ if (!equals(this.startDistanceM_1, other.startDistanceM_1))
667
683
  return false;
668
- if (!equals(this.z21_1, other.z21_1))
684
+ if (!equals(this.endDistanceM_1, other.endDistanceM_1))
669
685
  return false;
670
- if (!equals(this.a22_1, other.a22_1))
686
+ if (!equals(this.startElevationM_1, other.startElevationM_1))
671
687
  return false;
672
- if (!equals(this.b22_1, other.b22_1))
688
+ if (!equals(this.endElevationM_1, other.endElevationM_1))
673
689
  return false;
674
690
  return true;
675
691
  };
676
692
  function Companion_3() {
677
693
  Companion_instance_3 = this;
678
- this.d22_1 = new ClimbOptions();
694
+ this.DEFAULT_1 = new ClimbOptions();
679
695
  }
680
696
  var Companion_instance_3;
681
697
  function Companion_getInstance_6() {
@@ -692,30 +708,30 @@
692
708
  maxDiffRealGradeRatio = maxDiffRealGradeRatio === VOID ? 1.3 : maxDiffRealGradeRatio;
693
709
  booster = booster === VOID ? 1.3 : booster;
694
710
  maxAnalysisPoints = maxAnalysisPoints === VOID ? 3000 : maxAnalysisPoints;
695
- this.e22_1 = minMinClimbElevationM;
696
- this.f22_1 = maxMinClimbElevationM;
697
- this.g22_1 = minClimbElevationRatio;
698
- this.h22_1 = minGradePercent;
699
- this.i22_1 = maxDiffRealGradeRatio;
700
- this.j22_1 = booster;
701
- this.k22_1 = maxAnalysisPoints;
711
+ this.minMinClimbElevationM_1 = minMinClimbElevationM;
712
+ this.maxMinClimbElevationM_1 = maxMinClimbElevationM;
713
+ this.minClimbElevationRatio_1 = minClimbElevationRatio;
714
+ this.minGradePercent_1 = minGradePercent;
715
+ this.maxDiffRealGradeRatio_1 = maxDiffRealGradeRatio;
716
+ this.booster_1 = booster;
717
+ this.maxAnalysisPoints_1 = maxAnalysisPoints;
702
718
  // Inline function 'kotlin.require' call
703
- if (!(this.k22_1 >= 2)) {
719
+ if (!(this.maxAnalysisPoints_1 >= 2)) {
704
720
  var message = 'maxAnalysisPoints must be at least 2';
705
721
  throw IllegalArgumentException_init_$Create$(toString(message));
706
722
  }
707
723
  }
708
724
  protoOf(ClimbOptions).toString = function () {
709
- return 'ClimbOptions(minMinClimbElevationM=' + this.e22_1 + ', maxMinClimbElevationM=' + this.f22_1 + ', minClimbElevationRatio=' + this.g22_1 + ', minGradePercent=' + this.h22_1 + ', maxDiffRealGradeRatio=' + this.i22_1 + ', booster=' + this.j22_1 + ', maxAnalysisPoints=' + this.k22_1 + ')';
725
+ return 'ClimbOptions(minMinClimbElevationM=' + this.minMinClimbElevationM_1 + ', maxMinClimbElevationM=' + this.maxMinClimbElevationM_1 + ', minClimbElevationRatio=' + this.minClimbElevationRatio_1 + ', minGradePercent=' + this.minGradePercent_1 + ', maxDiffRealGradeRatio=' + this.maxDiffRealGradeRatio_1 + ', booster=' + this.booster_1 + ', maxAnalysisPoints=' + this.maxAnalysisPoints_1 + ')';
710
726
  };
711
727
  protoOf(ClimbOptions).hashCode = function () {
712
- var result = getNumberHashCode(this.e22_1);
713
- result = imul(result, 31) + getNumberHashCode(this.f22_1) | 0;
714
- result = imul(result, 31) + getNumberHashCode(this.g22_1) | 0;
715
- result = imul(result, 31) + getNumberHashCode(this.h22_1) | 0;
716
- result = imul(result, 31) + getNumberHashCode(this.i22_1) | 0;
717
- result = imul(result, 31) + getNumberHashCode(this.j22_1) | 0;
718
- result = imul(result, 31) + this.k22_1 | 0;
728
+ var result = getNumberHashCode(this.minMinClimbElevationM_1);
729
+ result = imul(result, 31) + getNumberHashCode(this.maxMinClimbElevationM_1) | 0;
730
+ result = imul(result, 31) + getNumberHashCode(this.minClimbElevationRatio_1) | 0;
731
+ result = imul(result, 31) + getNumberHashCode(this.minGradePercent_1) | 0;
732
+ result = imul(result, 31) + getNumberHashCode(this.maxDiffRealGradeRatio_1) | 0;
733
+ result = imul(result, 31) + getNumberHashCode(this.booster_1) | 0;
734
+ result = imul(result, 31) + this.maxAnalysisPoints_1 | 0;
719
735
  return result;
720
736
  };
721
737
  protoOf(ClimbOptions).equals = function (other) {
@@ -723,29 +739,29 @@
723
739
  return true;
724
740
  if (!(other instanceof ClimbOptions))
725
741
  return false;
726
- if (!equals(this.e22_1, other.e22_1))
742
+ if (!equals(this.minMinClimbElevationM_1, other.minMinClimbElevationM_1))
727
743
  return false;
728
- if (!equals(this.f22_1, other.f22_1))
744
+ if (!equals(this.maxMinClimbElevationM_1, other.maxMinClimbElevationM_1))
729
745
  return false;
730
- if (!equals(this.g22_1, other.g22_1))
746
+ if (!equals(this.minClimbElevationRatio_1, other.minClimbElevationRatio_1))
731
747
  return false;
732
- if (!equals(this.h22_1, other.h22_1))
748
+ if (!equals(this.minGradePercent_1, other.minGradePercent_1))
733
749
  return false;
734
- if (!equals(this.i22_1, other.i22_1))
750
+ if (!equals(this.maxDiffRealGradeRatio_1, other.maxDiffRealGradeRatio_1))
735
751
  return false;
736
- if (!equals(this.j22_1, other.j22_1))
752
+ if (!equals(this.booster_1, other.booster_1))
737
753
  return false;
738
- if (!(this.k22_1 === other.k22_1))
754
+ if (!(this.maxAnalysisPoints_1 === other.maxAnalysisPoints_1))
739
755
  return false;
740
756
  return true;
741
757
  };
742
758
  function Companion_4() {
743
759
  }
744
- protoOf(Companion_4).l22 = function (path, maxPoints) {
760
+ protoOf(Companion_4).of_tmvbpf_k$ = function (path, maxPoints) {
745
761
  var tmp;
746
- if (path.f1r_1 <= maxPoints) {
762
+ if (path.size_1 <= maxPoints) {
747
763
  var tmp_0 = 0;
748
- var tmp_1 = path.f1r_1;
764
+ var tmp_1 = path.size_1;
749
765
  var tmp_2 = new Int32Array(tmp_1);
750
766
  while (tmp_0 < tmp_1) {
751
767
  var tmp_3 = tmp_0;
@@ -754,15 +770,15 @@
754
770
  }
755
771
  tmp = tmp_2;
756
772
  } else {
757
- var stride = ((path.f1r_1 + maxPoints | 0) - 1 | 0) / maxPoints | 0;
773
+ var stride = ((path.size_1 + maxPoints | 0) - 1 | 0) / maxPoints | 0;
758
774
  var kept = ArrayList_init_$Create$_0(maxPoints + 1 | 0);
759
775
  var i = 0;
760
- while (i < path.f1r_1) {
761
- kept.h(i);
776
+ while (i < path.size_1) {
777
+ kept.add_utx5q5_k$(i);
762
778
  i = i + stride | 0;
763
779
  }
764
- if (!(last(kept) === (path.f1r_1 - 1 | 0))) {
765
- kept.h(path.f1r_1 - 1 | 0);
780
+ if (!(last(kept) === (path.size_1 - 1 | 0))) {
781
+ kept.add_utx5q5_k$(path.size_1 - 1 | 0);
766
782
  }
767
783
  tmp = toIntArray(kept);
768
784
  }
@@ -772,7 +788,7 @@
772
788
  var tmp_6 = new Float64Array(tmp_5);
773
789
  while (tmp_4 < tmp_5) {
774
790
  var tmp_7 = tmp_4;
775
- tmp_6[tmp_7] = path.w1u(indices[tmp_7]);
791
+ tmp_6[tmp_7] = path.distance_5s4s77_k$(indices[tmp_7]);
776
792
  tmp_4 = tmp_4 + 1 | 0;
777
793
  }
778
794
  var tmp_8 = 0;
@@ -780,7 +796,7 @@
780
796
  var tmp_10 = new Float64Array(tmp_9);
781
797
  while (tmp_8 < tmp_9) {
782
798
  var tmp_11 = tmp_8;
783
- tmp_10[tmp_11] = path.j1r(indices[tmp_11]);
799
+ tmp_10[tmp_11] = path.elevation_iziwkb_k$(indices[tmp_11]);
784
800
  tmp_8 = tmp_8 + 1 | 0;
785
801
  }
786
802
  return new Profile(tmp_6, tmp_10, indices);
@@ -790,33 +806,33 @@
790
806
  return Companion_instance_4;
791
807
  }
792
808
  function Profile(distance, elevation, sourceIndex) {
793
- this.m22_1 = distance;
794
- this.n22_1 = elevation;
795
- this.o22_1 = sourceIndex;
809
+ this.distance_1 = distance;
810
+ this.elevation_1 = elevation;
811
+ this.sourceIndex_1 = sourceIndex;
796
812
  }
797
- protoOf(Profile).l = function () {
798
- return this.m22_1.length;
813
+ protoOf(Profile).get_size_woubt6_k$ = function () {
814
+ return this.distance_1.length;
799
815
  };
800
816
  function bestCandidateFrom($this, profile, i, minClimbElevation, options) {
801
- var startDist = profile.m22_1[i];
802
- var startEle = profile.n22_1[i];
817
+ var startDist = profile.distance_1[i];
818
+ var startEle = profile.elevation_1[i];
803
819
  var positiveElevation = 0.0;
804
820
  var negativeElevation = 0.0;
805
821
  var distClimbing = 0.0;
806
822
  var bestScore = 0.0;
807
823
  var best = null;
808
824
  var inductionVariable = i + 1 | 0;
809
- var last = profile.l();
825
+ var last = profile.get_size_woubt6_k$();
810
826
  if (inductionVariable < last)
811
827
  $l$loop: do {
812
828
  var j = inductionVariable;
813
829
  inductionVariable = inductionVariable + 1 | 0;
814
- var endDist = profile.m22_1[j];
815
- var endEle = profile.n22_1[j];
816
- var dEle = endEle - profile.n22_1[j - 1 | 0];
830
+ var endDist = profile.distance_1[j];
831
+ var endEle = profile.elevation_1[j];
832
+ var dEle = endEle - profile.elevation_1[j - 1 | 0];
817
833
  if (dEle > 0) {
818
834
  positiveElevation = positiveElevation + dEle;
819
- distClimbing = distClimbing + (endDist - profile.m22_1[j - 1 | 0]);
835
+ distClimbing = distClimbing + (endDist - profile.distance_1[j - 1 | 0]);
820
836
  } else {
821
837
  negativeElevation = negativeElevation + dEle;
822
838
  }
@@ -827,9 +843,9 @@
827
843
  var gradePercent = 100.0 * netElevation / length;
828
844
  var climbingGradePercent = distClimbing > 0 ? 100.0 * positiveElevation / distClimbing : 0.0;
829
845
  // Inline function 'kotlin.math.pow' call
830
- var x = options.j22_1;
846
+ var x = options.booster_1;
831
847
  var score = length * Math.pow(gradePercent, x);
832
- var qualifies = gradePercent >= options.h22_1 && netElevation >= minClimbElevation && score >= bestScore && climbingGradePercent / gradePercent <= options.i22_1;
848
+ var qualifies = gradePercent >= options.minGradePercent_1 && netElevation >= minClimbElevation && score >= bestScore && climbingGradePercent / gradePercent <= options.maxDiffRealGradeRatio_1;
833
849
  if (qualifies) {
834
850
  bestScore = score;
835
851
  best = new Candidate(i, j, score, positiveElevation, negativeElevation);
@@ -849,60 +865,60 @@
849
865
  var kept = ArrayList_init_$Create$();
850
866
  $l$loop: while (true) {
851
867
  // Inline function 'kotlin.collections.isNotEmpty' call
852
- if (!!remaining.n()) {
868
+ if (!!remaining.isEmpty_y1axqb_k$()) {
853
869
  break $l$loop;
854
870
  }
855
871
  var best = first(remaining);
856
- kept.h(best);
872
+ kept.add_utx5q5_k$(best);
857
873
  removeAll(remaining, ClimbDetector$dedupeByScore$lambda_0(best));
858
874
  }
859
875
  return kept;
860
876
  }
861
877
  function toClimb($this, $receiver, path, profile) {
862
- return new Climb(profile.o22_1[$receiver.p22_1], profile.o22_1[$receiver.q22_1], profile.m22_1[$receiver.p22_1], profile.m22_1[$receiver.q22_1], profile.n22_1[$receiver.p22_1], profile.n22_1[$receiver.q22_1], $receiver.s22_1, $receiver.t22_1, splitIntoParts($this, profile, $receiver.p22_1, $receiver.q22_1));
878
+ return new Climb(profile.sourceIndex_1[$receiver.startIndex_1], profile.sourceIndex_1[$receiver.endIndex_1], profile.distance_1[$receiver.startIndex_1], profile.distance_1[$receiver.endIndex_1], profile.elevation_1[$receiver.startIndex_1], profile.elevation_1[$receiver.endIndex_1], $receiver.positiveElevationM_1, $receiver.negativeElevationM_1, splitIntoParts($this, profile, $receiver.startIndex_1, $receiver.endIndex_1));
863
879
  }
864
880
  function splitIntoParts($this, profile, startIndex, endIndex) {
865
881
  // Inline function 'kotlin.collections.map' call
866
882
  var this_0 = numberRangeToNumber(startIndex, endIndex);
867
883
  // Inline function 'kotlin.collections.mapTo' call
868
884
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
869
- var inductionVariable = this_0.lc_1;
870
- var last = this_0.mc_1;
885
+ var inductionVariable = this_0.first_1;
886
+ var last = this_0.last_1;
871
887
  if (inductionVariable <= last)
872
888
  do {
873
889
  var item = inductionVariable;
874
890
  inductionVariable = inductionVariable + 1 | 0;
875
891
  var i = item;
876
- var tmp$ret$2 = new Vector3D(profile.m22_1[i], profile.n22_1[i], 0.0);
877
- destination.h(tmp$ret$2);
892
+ var tmp$ret$2 = new Vector3D(profile.distance_1[i], profile.elevation_1[i], 0.0);
893
+ destination.add_utx5q5_k$(tmp$ret$2);
878
894
  }
879
895
  while (!(item === last));
880
896
  var points = destination;
881
- if (points.l() < 2)
897
+ if (points.get_size_woubt6_k$() < 2)
882
898
  return emptyList();
883
- var elevationGain = profile.n22_1[endIndex] - profile.n22_1[startIndex];
899
+ var elevationGain = profile.elevation_1[endIndex] - profile.elevation_1[startIndex];
884
900
  var tolerance = coerceIn(elevationGain / 50.0, 10.0, 50.0);
885
- var keptIndices = DouglasPeucker_instance.gx(points, tolerance);
901
+ var keptIndices = DouglasPeucker_instance.simplifyIndices_1yk9dd_k$(points, tolerance);
886
902
  var tmp$ret$3;
887
903
  $l$block: {
888
904
  // Inline function 'kotlin.collections.zipWithNext' call
889
- var iterator = keptIndices.i();
890
- if (!iterator.j()) {
905
+ var iterator = keptIndices.iterator_jk1svi_k$();
906
+ if (!iterator.hasNext_bitz1p_k$()) {
891
907
  tmp$ret$3 = emptyList();
892
908
  break $l$block;
893
909
  }
894
910
  // Inline function 'kotlin.collections.mutableListOf' call
895
911
  var result = ArrayList_init_$Create$();
896
- var current = iterator.k();
897
- while (iterator.j()) {
898
- var next = iterator.k();
912
+ var current = iterator.next_20eer_k$();
913
+ while (iterator.hasNext_bitz1p_k$()) {
914
+ var next = iterator.next_20eer_k$();
899
915
  var a = current;
900
- var tmp0_startDistanceM = points.m(a).bx_1;
901
- var tmp1_startElevationM = points.m(a).cx_1;
902
- var tmp2_endDistanceM = points.m(next).bx_1;
903
- var tmp3_endElevationM = points.m(next).cx_1;
916
+ var tmp0_startDistanceM = points.get_c1px32_k$(a).x_1;
917
+ var tmp1_startElevationM = points.get_c1px32_k$(a).y_1;
918
+ var tmp2_endDistanceM = points.get_c1px32_k$(next).x_1;
919
+ var tmp3_endElevationM = points.get_c1px32_k$(next).y_1;
904
920
  var tmp$ret$5 = new ClimbPart(tmp0_startDistanceM, tmp2_endDistanceM, tmp1_startElevationM, tmp3_endElevationM);
905
- result.h(tmp$ret$5);
921
+ result.add_utx5q5_k$(tmp$ret$5);
906
922
  current = next;
907
923
  }
908
924
  tmp$ret$3 = result;
@@ -910,24 +926,24 @@
910
926
  return tmp$ret$3;
911
927
  }
912
928
  function Candidate(startIndex, endIndex, score, positiveElevationM, negativeElevationM) {
913
- this.p22_1 = startIndex;
914
- this.q22_1 = endIndex;
915
- this.r22_1 = score;
916
- this.s22_1 = positiveElevationM;
917
- this.t22_1 = negativeElevationM;
929
+ this.startIndex_1 = startIndex;
930
+ this.endIndex_1 = endIndex;
931
+ this.score_1 = score;
932
+ this.positiveElevationM_1 = positiveElevationM;
933
+ this.negativeElevationM_1 = negativeElevationM;
918
934
  }
919
- protoOf(Candidate).u22 = function (other) {
920
- return other.p22_1 <= this.p22_1 && this.p22_1 <= other.q22_1 || (other.p22_1 <= this.q22_1 && this.q22_1 <= other.q22_1) || (this.p22_1 <= other.p22_1 && other.q22_1 <= this.q22_1);
935
+ protoOf(Candidate).overlaps_wp0rru_k$ = function (other) {
936
+ return other.startIndex_1 <= this.startIndex_1 && this.startIndex_1 <= other.endIndex_1 || (other.startIndex_1 <= this.endIndex_1 && this.endIndex_1 <= other.endIndex_1) || (this.startIndex_1 <= other.startIndex_1 && other.endIndex_1 <= this.endIndex_1);
921
937
  };
922
938
  protoOf(Candidate).toString = function () {
923
- return 'Candidate(startIndex=' + this.p22_1 + ', endIndex=' + this.q22_1 + ', score=' + this.r22_1 + ', positiveElevationM=' + this.s22_1 + ', negativeElevationM=' + this.t22_1 + ')';
939
+ return 'Candidate(startIndex=' + this.startIndex_1 + ', endIndex=' + this.endIndex_1 + ', score=' + this.score_1 + ', positiveElevationM=' + this.positiveElevationM_1 + ', negativeElevationM=' + this.negativeElevationM_1 + ')';
924
940
  };
925
941
  protoOf(Candidate).hashCode = function () {
926
- var result = this.p22_1;
927
- result = imul(result, 31) + this.q22_1 | 0;
928
- result = imul(result, 31) + getNumberHashCode(this.r22_1) | 0;
929
- result = imul(result, 31) + getNumberHashCode(this.s22_1) | 0;
930
- result = imul(result, 31) + getNumberHashCode(this.t22_1) | 0;
942
+ var result = this.startIndex_1;
943
+ result = imul(result, 31) + this.endIndex_1 | 0;
944
+ result = imul(result, 31) + getNumberHashCode(this.score_1) | 0;
945
+ result = imul(result, 31) + getNumberHashCode(this.positiveElevationM_1) | 0;
946
+ result = imul(result, 31) + getNumberHashCode(this.negativeElevationM_1) | 0;
931
947
  return result;
932
948
  };
933
949
  protoOf(Candidate).equals = function (other) {
@@ -935,36 +951,36 @@
935
951
  return true;
936
952
  if (!(other instanceof Candidate))
937
953
  return false;
938
- if (!(this.p22_1 === other.p22_1))
954
+ if (!(this.startIndex_1 === other.startIndex_1))
939
955
  return false;
940
- if (!(this.q22_1 === other.q22_1))
956
+ if (!(this.endIndex_1 === other.endIndex_1))
941
957
  return false;
942
- if (!equals(this.r22_1, other.r22_1))
958
+ if (!equals(this.score_1, other.score_1))
943
959
  return false;
944
- if (!equals(this.s22_1, other.s22_1))
960
+ if (!equals(this.positiveElevationM_1, other.positiveElevationM_1))
945
961
  return false;
946
- if (!equals(this.t22_1, other.t22_1))
962
+ if (!equals(this.negativeElevationM_1, other.negativeElevationM_1))
947
963
  return false;
948
964
  return true;
949
965
  };
950
966
  function sam$kotlin_Comparator$0(function_0) {
951
- this.v22_1 = function_0;
967
+ this.function_1 = function_0;
952
968
  }
953
- protoOf(sam$kotlin_Comparator$0).l9 = function (a, b) {
954
- return this.v22_1(a, b);
969
+ protoOf(sam$kotlin_Comparator$0).compare_bczr_k$ = function (a, b) {
970
+ return this.function_1(a, b);
955
971
  };
956
972
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
957
- return this.l9(a, b);
973
+ return this.compare_bczr_k$(a, b);
958
974
  };
959
- protoOf(sam$kotlin_Comparator$0).x1 = function () {
960
- return this.v22_1;
975
+ protoOf(sam$kotlin_Comparator$0).getFunctionDelegate_jtodtf_k$ = function () {
976
+ return this.function_1;
961
977
  };
962
978
  protoOf(sam$kotlin_Comparator$0).equals = function (other) {
963
979
  var tmp;
964
980
  if (!(other == null) ? isInterface(other, Comparator) : false) {
965
981
  var tmp_0;
966
982
  if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
967
- tmp_0 = equals(this.x1(), other.x1());
983
+ tmp_0 = equals(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
968
984
  } else {
969
985
  tmp_0 = false;
970
986
  }
@@ -975,26 +991,26 @@
975
991
  return tmp;
976
992
  };
977
993
  protoOf(sam$kotlin_Comparator$0).hashCode = function () {
978
- return hashCode(this.x1());
994
+ return hashCode(this.getFunctionDelegate_jtodtf_k$());
979
995
  };
980
996
  function sam$kotlin_Comparator$0_0(function_0) {
981
- this.w22_1 = function_0;
997
+ this.function_1 = function_0;
982
998
  }
983
- protoOf(sam$kotlin_Comparator$0_0).l9 = function (a, b) {
984
- return this.w22_1(a, b);
999
+ protoOf(sam$kotlin_Comparator$0_0).compare_bczr_k$ = function (a, b) {
1000
+ return this.function_1(a, b);
985
1001
  };
986
1002
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
987
- return this.l9(a, b);
1003
+ return this.compare_bczr_k$(a, b);
988
1004
  };
989
- protoOf(sam$kotlin_Comparator$0_0).x1 = function () {
990
- return this.w22_1;
1005
+ protoOf(sam$kotlin_Comparator$0_0).getFunctionDelegate_jtodtf_k$ = function () {
1006
+ return this.function_1;
991
1007
  };
992
1008
  protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
993
1009
  var tmp;
994
1010
  if (!(other == null) ? isInterface(other, Comparator) : false) {
995
1011
  var tmp_0;
996
1012
  if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
997
- tmp_0 = equals(this.x1(), other.x1());
1013
+ tmp_0 = equals(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
998
1014
  } else {
999
1015
  tmp_0 = false;
1000
1016
  }
@@ -1005,49 +1021,49 @@
1005
1021
  return tmp;
1006
1022
  };
1007
1023
  protoOf(sam$kotlin_Comparator$0_0).hashCode = function () {
1008
- return hashCode(this.x1());
1024
+ return hashCode(this.getFunctionDelegate_jtodtf_k$());
1009
1025
  };
1010
1026
  function ClimbDetector$detect$lambda(a, b) {
1011
1027
  // Inline function 'kotlin.comparisons.compareValuesBy' call
1012
- var tmp = a.p22_1;
1013
- var tmp$ret$2 = b.p22_1;
1028
+ var tmp = a.startIndex_1;
1029
+ var tmp$ret$2 = b.startIndex_1;
1014
1030
  return compareValues(tmp, tmp$ret$2);
1015
1031
  }
1016
1032
  function ClimbDetector$dedupeByScore$lambda(a, b) {
1017
1033
  // Inline function 'kotlin.comparisons.compareValuesBy' call
1018
- var tmp = b.r22_1;
1019
- var tmp$ret$2 = a.r22_1;
1034
+ var tmp = b.score_1;
1035
+ var tmp$ret$2 = a.score_1;
1020
1036
  return compareValues(tmp, tmp$ret$2);
1021
1037
  }
1022
1038
  function ClimbDetector$dedupeByScore$lambda_0($best) {
1023
1039
  return function (it) {
1024
- return it.u22($best);
1040
+ return it.overlaps_wp0rru_k$($best);
1025
1041
  };
1026
1042
  }
1027
1043
  function ClimbDetector() {
1028
- this.x22_1 = 10.0;
1029
- this.y22_1 = 10.0;
1030
- this.z22_1 = 50.0;
1031
- this.a23_1 = 50.0;
1044
+ this.MIN_CANDIDATE_LENGTH_M_1 = 10.0;
1045
+ this.MIN_PART_TOLERANCE_M_1 = 10.0;
1046
+ this.MAX_PART_TOLERANCE_M_1 = 50.0;
1047
+ this.PART_TOLERANCE_DIVISOR_1 = 50.0;
1032
1048
  }
1033
- protoOf(ClimbDetector).b23 = function (path, options) {
1034
- if (path.f1r_1 < 2)
1049
+ protoOf(ClimbDetector).detect_llooq2_k$ = function (path, options) {
1050
+ if (path.size_1 < 2)
1035
1051
  return emptyList();
1036
- var tmp0 = options.e22_1;
1037
- var tmp0_0 = options.f22_1;
1052
+ var tmp0 = options.minMinClimbElevationM_1;
1053
+ var tmp0_0 = options.maxMinClimbElevationM_1;
1038
1054
  // Inline function 'kotlin.comparisons.minOf' call
1039
- var b = path.m1s_1 / options.g22_1;
1055
+ var b = path.elevationGain_1 / options.minClimbElevationRatio_1;
1040
1056
  // Inline function 'kotlin.comparisons.maxOf' call
1041
1057
  var b_0 = Math.min(tmp0_0, b);
1042
1058
  var minClimbElevation = Math.max(tmp0, b_0);
1043
- var profile = Companion_instance_4.l22(path, options.k22_1);
1059
+ var profile = Companion_instance_4.of_tmvbpf_k$(path, options.maxAnalysisPoints_1);
1044
1060
  // Inline function 'kotlin.collections.mapNotNull' call
1045
- var tmp0_1 = until(0, profile.l());
1061
+ var tmp0_1 = until(0, profile.get_size_woubt6_k$());
1046
1062
  // Inline function 'kotlin.collections.mapNotNullTo' call
1047
1063
  var destination = ArrayList_init_$Create$();
1048
1064
  // Inline function 'kotlin.collections.forEach' call
1049
- var inductionVariable = tmp0_1.lc_1;
1050
- var last = tmp0_1.mc_1;
1065
+ var inductionVariable = tmp0_1.first_1;
1066
+ var last = tmp0_1.last_1;
1051
1067
  if (inductionVariable <= last)
1052
1068
  do {
1053
1069
  var element = inductionVariable;
@@ -1058,7 +1074,7 @@
1058
1074
  null;
1059
1075
  else {
1060
1076
  // Inline function 'kotlin.let' call
1061
- destination.h(tmp0_safe_receiver);
1077
+ destination.add_utx5q5_k$(tmp0_safe_receiver);
1062
1078
  }
1063
1079
  }
1064
1080
  while (!(element === last));
@@ -1072,17 +1088,17 @@
1072
1088
  var this_1 = sortedWith(this_0, tmp$ret$10);
1073
1089
  // Inline function 'kotlin.collections.mapTo' call
1074
1090
  var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
1075
- var _iterator__ex2g4s = this_1.i();
1076
- while (_iterator__ex2g4s.j()) {
1077
- var item = _iterator__ex2g4s.k();
1091
+ var _iterator__ex2g4s = this_1.iterator_jk1svi_k$();
1092
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1093
+ var item = _iterator__ex2g4s.next_20eer_k$();
1078
1094
  var tmp$ret$13 = toClimb(ClimbDetector_instance, item, path, profile);
1079
- destination_0.h(tmp$ret$13);
1095
+ destination_0.add_utx5q5_k$(tmp$ret$13);
1080
1096
  }
1081
1097
  return destination_0;
1082
1098
  };
1083
- protoOf(ClimbDetector).c23 = function (path, options, $super) {
1084
- options = options === VOID ? Companion_getInstance_6().d22_1 : options;
1085
- return $super === VOID ? this.b23(path, options) : $super.b23.call(this, path, options);
1099
+ protoOf(ClimbDetector).detect$default_6ml3ny_k$ = function (path, options, $super) {
1100
+ options = options === VOID ? Companion_getInstance_6().DEFAULT_1 : options;
1101
+ return $super === VOID ? this.detect_llooq2_k$(path, options) : $super.detect_llooq2_k$.call(this, path, options);
1086
1102
  };
1087
1103
  var ClimbDetector_instance;
1088
1104
  function ClimbDetector_getInstance() {
@@ -1092,9 +1108,9 @@
1092
1108
  var sumX = 0.0;
1093
1109
  var sumY = 0.0;
1094
1110
  var contributing = 0;
1095
- var _iterator__ex2g4s = _this__u8e3s4.i();
1096
- $l$loop: while (_iterator__ex2g4s.j()) {
1097
- var path = _iterator__ex2g4s.k();
1111
+ var _iterator__ex2g4s = _this__u8e3s4.iterator_jk1svi_k$();
1112
+ $l$loop: while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1113
+ var path = _iterator__ex2g4s.next_20eer_k$();
1098
1114
  var tmp0_elvis_lhs = meanDirectionFromStart(path);
1099
1115
  var tmp;
1100
1116
  if (tmp0_elvis_lhs == null) {
@@ -1103,8 +1119,8 @@
1103
1119
  tmp = tmp0_elvis_lhs;
1104
1120
  }
1105
1121
  var mean = tmp;
1106
- sumX = sumX + mean.oe_1;
1107
- sumY = sumY + mean.pe_1;
1122
+ sumX = sumX + mean.first_1;
1123
+ sumY = sumY + mean.second_1;
1108
1124
  contributing = contributing + 1 | 0;
1109
1125
  }
1110
1126
  if (contributing === 0)
@@ -1118,22 +1134,22 @@
1118
1134
  return new Vector3D(-sumX / magnitude, -sumY / magnitude, 0.0);
1119
1135
  }
1120
1136
  function meanDirectionFromStart(_this__u8e3s4) {
1121
- if (_this__u8e3s4.f1r_1 <= 3)
1137
+ if (_this__u8e3s4.size_1 <= 3)
1122
1138
  return null;
1123
- var lat0 = _this__u8e3s4.h1r(0);
1124
- var lon0 = _this__u8e3s4.i1r(0);
1139
+ var lat0 = _this__u8e3s4.latitude_gb4iok_k$(0);
1140
+ var lon0 = _this__u8e3s4.longitude_a9xl_k$(0);
1125
1141
  // Inline function 'kotlin.math.cos' call
1126
1142
  var cosLat0 = Math.cos(lat0);
1127
1143
  var sumX = 0.0;
1128
1144
  var sumY = 0.0;
1129
1145
  var inductionVariable = 1;
1130
- var last = _this__u8e3s4.f1r_1;
1146
+ var last = _this__u8e3s4.size_1;
1131
1147
  if (inductionVariable < last)
1132
1148
  $l$loop: do {
1133
1149
  var i = inductionVariable;
1134
1150
  inductionVariable = inductionVariable + 1 | 0;
1135
- var dx = (_this__u8e3s4.i1r(i) - lon0) * cosLat0;
1136
- var dy = _this__u8e3s4.h1r(i) - lat0;
1151
+ var dx = (_this__u8e3s4.longitude_a9xl_k$(i) - lon0) * cosLat0;
1152
+ var dy = _this__u8e3s4.latitude_gb4iok_k$(i) - lat0;
1137
1153
  // Inline function 'kotlin.math.hypot' call
1138
1154
  var length = hypot(dx, dy);
1139
1155
  if (length < 1.0E-12)
@@ -1142,7 +1158,7 @@
1142
1158
  sumY = sumY + dy / length;
1143
1159
  }
1144
1160
  while (inductionVariable < last);
1145
- var n = _this__u8e3s4.f1r_1 - 1 | 0;
1161
+ var n = _this__u8e3s4.size_1 - 1 | 0;
1146
1162
  return new Pair(sumX / n, sumY / n);
1147
1163
  }
1148
1164
  function dominantHeadwindAzimuthDeg(_this__u8e3s4) {
@@ -1157,9 +1173,9 @@
1157
1173
  tmp = tmp0_elvis_lhs;
1158
1174
  }
1159
1175
  var direction = tmp;
1160
- var tmp0 = direction.bx_1;
1176
+ var tmp0 = direction.x_1;
1161
1177
  // Inline function 'kotlin.math.atan2' call
1162
- var x = direction.cx_1;
1178
+ var x = direction.y_1;
1163
1179
  // Inline function 'kotlin.mod' call
1164
1180
  var r = Math.atan2(tmp0, x) * 57.29577951308232 % 360.0;
1165
1181
  var tmp_0;
@@ -1180,15 +1196,15 @@
1180
1196
  return tmp_0;
1181
1197
  }
1182
1198
  function computeWithWind($this, path, i, aeroCoef, wind) {
1183
- var speed = path.x1v(i);
1184
- var bearing = path.d1v(i);
1185
- path.d1w(i, wind.d23_1);
1186
- path.e1w(i, wind.e23_1);
1187
- var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.e23_1;
1188
- path.j1v(i, windDirectionAsBearing);
1199
+ var speed = path.speed_npav2n_k$(i);
1200
+ var bearing = path.bearing_fz5vxm_k$(i);
1201
+ path.setWindSpeed_ggaslh_k$(i, wind.speedMS_1);
1202
+ path.setWindDirection_86vnxv_k$(i, wind.directionRad_1);
1203
+ var windDirectionAsBearing = 3.141592653589793 / 2.0 - wind.directionRad_1;
1204
+ path.setWindBearing_44dbry_k$(i, windDirectionAsBearing);
1189
1205
  var alpha = windDirectionAsBearing - bearing;
1190
- path.k1v(i, alpha);
1191
- var v = wind.d23_1;
1206
+ path.setWindAlpha_xkbtf2_k$(i, alpha);
1207
+ var v = wind.speedMS_1;
1192
1208
  // Inline function 'kotlin.math.cos' call
1193
1209
  var l1 = speed + v * Math.cos(alpha);
1194
1210
  var l2 = l1 * l1;
@@ -1203,21 +1219,21 @@
1203
1219
  return tmp_1 * Math.sqrt(l3) * l1 * speed;
1204
1220
  }
1205
1221
  function AeroPowerProvider() {
1206
- this.f23_1 = 1.2;
1222
+ this.MU_1 = 1.2;
1207
1223
  }
1208
- protoOf(AeroPowerProvider).g23 = function (course, path, pointIndex) {
1209
- var aeroCoef = course.n1z_1.h23(course, path, pointIndex);
1210
- path.i1v(pointIndex, aeroCoef);
1211
- var wind = course.o1z_1.i23(course.l1z_1, path, pointIndex);
1224
+ protoOf(AeroPowerProvider).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1225
+ var aeroCoef = course.aeroProvider_1.aeroCoef_5n4cco_k$(course, path, pointIndex);
1226
+ path.setAeroCoef_tmjifm_k$(pointIndex, aeroCoef);
1227
+ var wind = course.windProvider_1.wind_umf2tf_k$(course.course_1, path, pointIndex);
1212
1228
  var tmp;
1213
- if (wind.d23_1 === 0.0) {
1214
- var v = path.x1v(pointIndex);
1229
+ if (wind.speedMS_1 === 0.0) {
1230
+ var v = path.speed_npav2n_k$(pointIndex);
1215
1231
  tmp = -aeroCoef * v * v * v;
1216
1232
  } else {
1217
1233
  tmp = computeWithWind(this, path, pointIndex, aeroCoef, wind);
1218
1234
  }
1219
1235
  var pAir = tmp;
1220
- path.l1v(pointIndex, pAir);
1236
+ path.setPAero_mmc4mr_k$(pointIndex, pAir);
1221
1237
  return pAir;
1222
1238
  };
1223
1239
  var AeroPowerProvider_instance;
@@ -1226,17 +1242,17 @@
1226
1242
  }
1227
1243
  function AeroProviderConstant() {
1228
1244
  }
1229
- protoOf(AeroProviderConstant).h23 = function (course, path, pointIndex) {
1230
- var rho = course.m1z_1.j23(course.l1z_1, path, pointIndex);
1231
- return course.r1z().x1z_1 * course.r1z().y1z_1 * rho / 2.0;
1245
+ protoOf(AeroProviderConstant).aeroCoef_5n4cco_k$ = function (course, path, pointIndex) {
1246
+ var rho = course.rhoProvider_1.rho_pwqvzi_k$(course.course_1, path, pointIndex);
1247
+ return course.get_cyclist_lkc0de_k$().cd_1 * course.get_cyclist_lkc0de_k$().frontalAreaM2__1 * rho / 2.0;
1232
1248
  };
1233
1249
  var AeroProviderConstant_instance;
1234
1250
  function AeroProviderConstant_getInstance() {
1235
1251
  return AeroProviderConstant_instance;
1236
1252
  }
1237
1253
  function Companion_5() {
1238
- this.k23_1 = 0.05;
1239
- this.l23_1 = 3.0;
1254
+ this.TOLERANCE_1 = 0.05;
1255
+ this.MAX_MULTIPLIER_1 = 3.0;
1240
1256
  }
1241
1257
  var Companion_instance_5;
1242
1258
  function Companion_getInstance_8() {
@@ -1244,10 +1260,10 @@
1244
1260
  }
1245
1261
  function CyclistPowerProviderBase(useHarmonics, random) {
1246
1262
  random = random === VOID ? Default_getInstance() : random;
1247
- this.m23_1 = useHarmonics;
1263
+ this.useHarmonics_1 = useHarmonics;
1248
1264
  var tmp = this;
1249
1265
  var tmp_0;
1250
- if (this.m23_1) {
1266
+ if (this.useHarmonics_1) {
1251
1267
  // Inline function 'kotlin.collections.List' call
1252
1268
  // Inline function 'kotlin.collections.MutableList' call
1253
1269
  var list = ArrayList_init_$Create$_0(20);
@@ -1257,48 +1273,48 @@
1257
1273
  do {
1258
1274
  var index = inductionVariable;
1259
1275
  inductionVariable = inductionVariable + 1 | 0;
1260
- var tmp$ret$4 = new Harmonic(1.0 + random.zb() * 9.0, random.zb() * 3.141592653589793, random.zb() * 0.01);
1261
- list.h(tmp$ret$4);
1276
+ var tmp$ret$4 = new Harmonic(1.0 + random.nextDouble_s2xvfg_k$() * 9.0, random.nextDouble_s2xvfg_k$() * 3.141592653589793, random.nextDouble_s2xvfg_k$() * 0.01);
1277
+ list.add_utx5q5_k$(tmp$ret$4);
1262
1278
  }
1263
1279
  while (inductionVariable < 20);
1264
1280
  tmp_0 = list;
1265
1281
  } else {
1266
1282
  tmp_0 = emptyList();
1267
1283
  }
1268
- tmp.n23_1 = tmp_0;
1269
- }
1270
- protoOf(CyclistPowerProviderBase).g23 = function (course, path, pointIndex) {
1271
- var power = this.o23(course, path, pointIndex);
1272
- path.p1v(pointIndex, power);
1273
- if (this.m23_1) {
1274
- var x = path.k1r(pointIndex) / 10000.0;
1275
- var _iterator__ex2g4s = this.n23_1.i();
1276
- while (_iterator__ex2g4s.j()) {
1277
- var h = _iterator__ex2g4s.k();
1284
+ tmp.harmonics_1 = tmp_0;
1285
+ }
1286
+ protoOf(CyclistPowerProviderBase).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1287
+ var power = this.optimalPower_36kg19_k$(course, path, pointIndex);
1288
+ path.setPCyclistProvidedOptimalPower_gha9up_k$(pointIndex, power);
1289
+ if (this.useHarmonics_1) {
1290
+ var x = path.time_ryc845_k$(pointIndex) / 10000.0;
1291
+ var _iterator__ex2g4s = this.harmonics_1.iterator_jk1svi_k$();
1292
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1293
+ var h = _iterator__ex2g4s.next_20eer_k$();
1278
1294
  var tmp = power;
1279
- var tmp_0 = h.r23_1 * power;
1295
+ var tmp_0 = h.amp_1 * power;
1280
1296
  // Inline function 'kotlin.math.cos' call
1281
- var x_0 = h.p23_1 * x - h.q23_1;
1297
+ var x_0 = h.freqRadS_1 * x - h.phaseRad_1;
1282
1298
  power = tmp + tmp_0 * Math.cos(x_0);
1283
1299
  }
1284
1300
  }
1285
- path.q1v(pointIndex, power);
1286
- var powerNeeded = -PowerComputer_instance.s23(course, path, pointIndex, false);
1287
- path.r1v(pointIndex, powerNeeded);
1301
+ path.setPCyclistProvidedOptimalPowerWithHarmonics_tg3fol_k$(pointIndex, power);
1302
+ var powerNeeded = -PowerComputer_instance.getNewPower_puvq9i_k$(course, path, pointIndex, false);
1303
+ path.setPCyclistPowerNeeded_54po1x_k$(pointIndex, powerNeeded);
1288
1304
  return power;
1289
1305
  };
1290
1306
  function GravPowerProvider() {
1291
1307
  }
1292
- protoOf(GravPowerProvider).g23 = function (course, path, pointIndex) {
1293
- var m = course.r1z().v1z_1;
1294
- var grade = path.f1v(pointIndex);
1295
- var speed = path.x1v(pointIndex);
1308
+ protoOf(GravPowerProvider).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1309
+ var m = course.get_cyclist_lkc0de_k$().massKg_1;
1310
+ var grade = path.grade_c4yjz5_k$(pointIndex);
1311
+ var speed = path.speed_npav2n_k$(pointIndex);
1296
1312
  var tmp = -m * 9.8 * speed;
1297
1313
  // Inline function 'kotlin.math.atan' call
1298
1314
  // Inline function 'kotlin.math.sin' call
1299
1315
  var x = Math.atan(grade);
1300
1316
  var p = tmp * Math.sin(x);
1301
- path.m1v(pointIndex, p);
1317
+ path.setPGravity_tegtcu_k$(pointIndex, p);
1302
1318
  return p;
1303
1319
  };
1304
1320
  var GravPowerProvider_instance;
@@ -1306,17 +1322,17 @@
1306
1322
  return GravPowerProvider_instance;
1307
1323
  }
1308
1324
  function Harmonic(freqRadS, phaseRad, amp) {
1309
- this.p23_1 = freqRadS;
1310
- this.q23_1 = phaseRad;
1311
- this.r23_1 = amp;
1325
+ this.freqRadS_1 = freqRadS;
1326
+ this.phaseRad_1 = phaseRad;
1327
+ this.amp_1 = amp;
1312
1328
  }
1313
1329
  protoOf(Harmonic).toString = function () {
1314
- return 'Harmonic(freqRadS=' + this.p23_1 + ', phaseRad=' + this.q23_1 + ', amp=' + this.r23_1 + ')';
1330
+ return 'Harmonic(freqRadS=' + this.freqRadS_1 + ', phaseRad=' + this.phaseRad_1 + ', amp=' + this.amp_1 + ')';
1315
1331
  };
1316
1332
  protoOf(Harmonic).hashCode = function () {
1317
- var result = getNumberHashCode(this.p23_1);
1318
- result = imul(result, 31) + getNumberHashCode(this.q23_1) | 0;
1319
- result = imul(result, 31) + getNumberHashCode(this.r23_1) | 0;
1333
+ var result = getNumberHashCode(this.freqRadS_1);
1334
+ result = imul(result, 31) + getNumberHashCode(this.phaseRad_1) | 0;
1335
+ result = imul(result, 31) + getNumberHashCode(this.amp_1) | 0;
1320
1336
  return result;
1321
1337
  };
1322
1338
  protoOf(Harmonic).equals = function (other) {
@@ -1324,39 +1340,39 @@
1324
1340
  return true;
1325
1341
  if (!(other instanceof Harmonic))
1326
1342
  return false;
1327
- if (!equals(this.p23_1, other.p23_1))
1343
+ if (!equals(this.freqRadS_1, other.freqRadS_1))
1328
1344
  return false;
1329
- if (!equals(this.q23_1, other.q23_1))
1345
+ if (!equals(this.phaseRad_1, other.phaseRad_1))
1330
1346
  return false;
1331
- if (!equals(this.r23_1, other.r23_1))
1347
+ if (!equals(this.amp_1, other.amp_1))
1332
1348
  return false;
1333
1349
  return true;
1334
1350
  };
1335
1351
  function computeCorneringLimit($this, course, currentIndex, window_0) {
1336
- var path = course.f1z_1;
1352
+ var path = course.path_1;
1337
1353
  var radius = computeRadiusWindowed($this, path, currentIndex, window_0);
1338
1354
  // Inline function 'kotlin.math.sqrt' call
1339
- var x = 9.8 * radius * course.g1z_1.b20();
1355
+ var x = 9.8 * radius * course.cyclist_1.get_tanMaxLeanAngle_qqiag1_k$();
1340
1356
  var vMax = Math.sqrt(x);
1341
1357
  // Inline function 'kotlin.math.min' call
1342
- var a = course.g1z_1.d20();
1358
+ var a = course.cyclist_1.get_maxSpeedMS_xz2r7y_k$();
1343
1359
  var result = Math.min(a, vMax);
1344
- path.b1w(currentIndex, result);
1360
+ path.setSpeedMaxIncline_8l69w1_k$(currentIndex, result);
1345
1361
  return result;
1346
1362
  }
1347
1363
  function computeRadiusWindowed($this, path, i, k) {
1348
1364
  // Inline function 'kotlin.math.max' call
1349
1365
  var b = i - k | 0;
1350
1366
  var mini = Math.max(0, b);
1351
- var tmp0 = path.f1r_1 - 1 | 0;
1367
+ var tmp0 = path.size_1 - 1 | 0;
1352
1368
  // Inline function 'kotlin.math.min' call
1353
1369
  var b_0 = i + k | 0;
1354
1370
  var maxi = Math.min(tmp0, b_0);
1355
- var totalBearingChange = $this.t23(path.d1v(maxi) - path.d1v(mini));
1356
- var totalDistance = path.w1u(maxi) - path.w1u(mini);
1371
+ var totalBearingChange = $this.normalizeAngleDiff_6gshzi_k$(path.bearing_fz5vxm_k$(maxi) - path.bearing_fz5vxm_k$(mini));
1372
+ var totalDistance = path.distance_5s4s77_k$(maxi) - path.distance_5s4s77_k$(mini);
1357
1373
  // Inline function 'kotlin.math.abs' call
1358
1374
  if (Math.abs(totalBearingChange) < 0.001) {
1359
- path.h1v(i, 200.0);
1375
+ path.setRadius_p1cueq_k$(i, 200.0);
1360
1376
  return 200.0;
1361
1377
  }
1362
1378
  // Inline function 'kotlin.math.abs' call
@@ -1365,47 +1381,47 @@
1365
1381
  // Inline function 'kotlin.math.max' call
1366
1382
  var b_1 = Math.min(200.0, raw);
1367
1383
  var clamped = Math.max(5.0, b_1);
1368
- path.h1v(i, clamped);
1384
+ path.setRadius_p1cueq_k$(i, clamped);
1369
1385
  return clamped;
1370
1386
  }
1371
1387
  function computeBrakingLimit($this, course, currentIndex, nextIndex) {
1372
- var path = course.f1z_1;
1373
- var vf = path.z1v(nextIndex);
1374
- var a = course.g1z_1.c20();
1375
- var d = path.w1u(nextIndex) - path.w1u(currentIndex);
1388
+ var path = course.path_1;
1389
+ var vf = path.speedMax_mjo2cl_k$(nextIndex);
1390
+ var a = course.cyclist_1.get_maxBrakeMS2_nzouxw_k$();
1391
+ var d = path.distance_5s4s77_k$(nextIndex) - path.distance_5s4s77_k$(currentIndex);
1376
1392
  // Inline function 'kotlin.math.sqrt' call
1377
1393
  var x = vf * vf + 2.0 * a * d;
1378
1394
  return Math.sqrt(x);
1379
1395
  }
1380
1396
  function MaxSpeedComputer() {
1381
- this.a21_1 = 200.0;
1382
- this.b21_1 = 5.0;
1383
- this.c21_1 = 2.0;
1384
- this.d21_1 = 0.001;
1385
- this.e21_1 = 10;
1386
- }
1387
- protoOf(MaxSpeedComputer).f21 = function (course) {
1388
- var path = course.f1z_1;
1389
- var n = path.f1r_1;
1397
+ this.MAX_RADIUS_M_1 = 200.0;
1398
+ this.MIN_RADIUS_M_1 = 5.0;
1399
+ this.END_SPEED_MS_1 = 2.0;
1400
+ this.BEARING_THRESHOLD_1 = 0.001;
1401
+ this.DEFAULT_WINDOW_1 = 10;
1402
+ }
1403
+ protoOf(MaxSpeedComputer).computeMaxSpeeds_jc4v4o_k$ = function (course) {
1404
+ var path = course.path_1;
1405
+ var n = path.size_1;
1390
1406
  var inductionVariable = n - 1 | 0;
1391
1407
  if (0 <= inductionVariable)
1392
1408
  do {
1393
1409
  var i = inductionVariable;
1394
1410
  inductionVariable = inductionVariable + -1 | 0;
1395
1411
  if (i === (n - 1 | 0)) {
1396
- path.a1w(i, 2.0);
1412
+ path.setSpeedMax_7xvqir_k$(i, 2.0);
1397
1413
  } else {
1398
1414
  var cornering = computeCorneringLimit(this, course, i, 10);
1399
1415
  var braking = computeBrakingLimit(this, course, i, i + 1 | 0);
1400
1416
  // Inline function 'kotlin.math.min' call
1401
1417
  var tmp$ret$0 = Math.min(cornering, braking);
1402
- path.a1w(i, tmp$ret$0);
1418
+ path.setSpeedMax_7xvqir_k$(i, tmp$ret$0);
1403
1419
  }
1404
1420
  }
1405
1421
  while (0 <= inductionVariable);
1406
- path.q1s();
1422
+ path.computeDerivedData_uoxpeo_k$();
1407
1423
  };
1408
- protoOf(MaxSpeedComputer).t23 = function (angleIn) {
1424
+ protoOf(MaxSpeedComputer).normalizeAngleDiff_6gshzi_k$ = function (angleIn) {
1409
1425
  var a = angleIn;
1410
1426
  while (a > 3.141592653589793)
1411
1427
  a = a - 2.0 * 3.141592653589793;
@@ -1419,11 +1435,11 @@
1419
1435
  }
1420
1436
  function MuscularPowerProvider() {
1421
1437
  }
1422
- protoOf(MuscularPowerProvider).g23 = function (course, path, pointIndex) {
1423
- var muscular = course.p1z_1.g23(course, path, pointIndex);
1424
- path.s1v(pointIndex, muscular);
1425
- var wheel = muscular * course.s1z().d1z_1;
1426
- path.t1v(pointIndex, wheel);
1438
+ protoOf(MuscularPowerProvider).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1439
+ var muscular = course.cyclistPowerProvider_1.powerAt_ejucaq_k$(course, path, pointIndex);
1440
+ path.setPCyclistProvidedMuscular_aori9q_k$(pointIndex, muscular);
1441
+ var wheel = muscular * course.get_bike_wojgoa_k$().efficiency_1;
1442
+ path.setPCyclistProvidedWheel_ofsihz_k$(pointIndex, wheel);
1427
1443
  return wheel;
1428
1444
  };
1429
1445
  var MuscularPowerProvider_instance;
@@ -1436,7 +1452,7 @@
1436
1452
  var tol = dx / 1.0E7;
1437
1453
  while (dt2 - dt1 >= tol) {
1438
1454
  var dtMid = (dt1 + dt2) / 2.0;
1439
- var dxMid = $this.u23(pSum, equivalentMass, currentSpeed, dtMid);
1455
+ var dxMid = $this.getDx_xtszre_k$(pSum, equivalentMass, currentSpeed, dtMid);
1440
1456
  if (dxMid < dx)
1441
1457
  dt1 = dtMid;
1442
1458
  else
@@ -1446,18 +1462,18 @@
1446
1462
  }
1447
1463
  function PowerComputer() {
1448
1464
  }
1449
- protoOf(PowerComputer).s23 = function (course, path, pointIndex, withCyclist) {
1465
+ protoOf(PowerComputer).getNewPower_puvq9i_k$ = function (course, path, pointIndex, withCyclist) {
1450
1466
  var pSum = 0.0;
1451
- pSum = pSum + WheelBearingsPowerProvider_instance.g23(course, path, pointIndex);
1452
- pSum = pSum + RollingResistancePowerProvider_instance.g23(course, path, pointIndex);
1453
- pSum = pSum + AeroPowerProvider_instance.g23(course, path, pointIndex);
1454
- pSum = pSum + GravPowerProvider_instance.g23(course, path, pointIndex);
1467
+ pSum = pSum + WheelBearingsPowerProvider_instance.powerAt_ejucaq_k$(course, path, pointIndex);
1468
+ pSum = pSum + RollingResistancePowerProvider_instance.powerAt_ejucaq_k$(course, path, pointIndex);
1469
+ pSum = pSum + AeroPowerProvider_instance.powerAt_ejucaq_k$(course, path, pointIndex);
1470
+ pSum = pSum + GravPowerProvider_instance.powerAt_ejucaq_k$(course, path, pointIndex);
1455
1471
  if (withCyclist) {
1456
- pSum = pSum + MuscularPowerProvider_instance.g23(course, path, pointIndex);
1472
+ pSum = pSum + MuscularPowerProvider_instance.powerAt_ejucaq_k$(course, path, pointIndex);
1457
1473
  }
1458
1474
  return pSum;
1459
1475
  };
1460
- protoOf(PowerComputer).u23 = function (pSum, equivalentMass, currentSpeed, dt) {
1476
+ protoOf(PowerComputer).getDx_xtszre_k$ = function (pSum, equivalentMass, currentSpeed, dt) {
1461
1477
  // Inline function 'kotlin.math.sqrt' call
1462
1478
  var x = dt * pSum / (0.5 * equivalentMass) + currentSpeed * currentSpeed;
1463
1479
  var tmp0 = Math.sqrt(x);
@@ -1466,40 +1482,40 @@
1466
1482
  var newSpeed = Math.max(tmp0, b);
1467
1483
  return (currentSpeed + newSpeed) * dt / 2.0;
1468
1484
  };
1469
- protoOf(PowerComputer).v23 = function (equivalentMass, s1, s2, dt) {
1485
+ protoOf(PowerComputer).getTotPower_kfbciq_k$ = function (equivalentMass, s1, s2, dt) {
1470
1486
  return 0.5 * equivalentMass * (s2 * s2 - s1 * s1) / dt;
1471
1487
  };
1472
- protoOf(PowerComputer).w23 = function (pSum, equivalentMass, currentSpeed, dx) {
1488
+ protoOf(PowerComputer).getDt_t0pcee_k$ = function (pSum, equivalentMass, currentSpeed, dx) {
1473
1489
  var dt = 0.1;
1474
- while (this.u23(pSum, equivalentMass, currentSpeed, dt) <= dx) {
1490
+ while (this.getDx_xtszre_k$(pSum, equivalentMass, currentSpeed, dt) <= dx) {
1475
1491
  dt = dt + 0.1;
1476
1492
  }
1477
1493
  return getDtInner(this, pSum, equivalentMass, currentSpeed, dx, dt - 0.1, dt);
1478
1494
  };
1479
- protoOf(PowerComputer).x23 = function (course, path, equivalentMass, i) {
1495
+ protoOf(PowerComputer).computeCyclistPower_kgcsa3_k$ = function (course, path, equivalentMass, i) {
1480
1496
  if (i === 0) {
1481
- path.w1v(i, 0.0);
1497
+ path.setPComputedPower_c3m6yw_k$(i, 0.0);
1482
1498
  return Unit_instance;
1483
1499
  }
1484
- var resistive = this.s23(course, path, i - 1 | 0, false);
1485
- var s1 = path.x1v(i - 1 | 0);
1486
- var s2 = path.x1v(i);
1487
- var dtSeconds = path.b1v(i) / 1000.0;
1488
- var totPower = this.v23(equivalentMass, s1, s2, dtSeconds);
1489
- path.u1v(i, totPower);
1500
+ var resistive = this.getNewPower_puvq9i_k$(course, path, i - 1 | 0, false);
1501
+ var s1 = path.speed_npav2n_k$(i - 1 | 0);
1502
+ var s2 = path.speed_npav2n_k$(i);
1503
+ var dtSeconds = path.dt_17uzp4_k$(i) / 1000.0;
1504
+ var totPower = this.getTotPower_kfbciq_k$(equivalentMass, s1, s2, dtSeconds);
1505
+ path.setPComputedTotalPower_wm6di_k$(i, totPower);
1490
1506
  var powerWheel = totPower - resistive;
1491
- path.v1v(i, powerWheel);
1507
+ path.setPComputedWheelPower_qplog3_k$(i, powerWheel);
1492
1508
  // Inline function 'kotlin.math.max' call
1493
- var computed = Math.max(0.0, powerWheel) / course.s1z().d1z_1;
1494
- path.w1v(i, computed);
1509
+ var computed = Math.max(0.0, powerWheel) / course.get_bike_wojgoa_k$().efficiency_1;
1510
+ path.setPComputedPower_c3m6yw_k$(i, computed);
1495
1511
  };
1496
- protoOf(PowerComputer).y23 = function (course) {
1497
- var m = course.g1z_1.v1z_1;
1498
- var totalInertia = course.h1z_1.a1z_1 + course.h1z_1.b1z_1;
1499
- return m + totalInertia / (course.h1z_1.c1z_1 * course.h1z_1.c1z_1);
1512
+ protoOf(PowerComputer).equivalentMass_3uxz65_k$ = function (course) {
1513
+ var m = course.cyclist_1.massKg_1;
1514
+ var totalInertia = course.bike_1.inertiaFront_1 + course.bike_1.inertiaRear_1;
1515
+ return m + totalInertia / (course.bike_1.wheelRadiusM_1 * course.bike_1.wheelRadiusM_1);
1500
1516
  };
1501
- protoOf(PowerComputer).z23 = function (course) {
1502
- return this.y23(course.l1z_1);
1517
+ protoOf(PowerComputer).equivalentMass_e3djhu_k$ = function (course) {
1518
+ return this.equivalentMass_3uxz65_k$(course.course_1);
1503
1519
  };
1504
1520
  var PowerComputer_instance;
1505
1521
  function PowerComputer_getInstance() {
@@ -1509,34 +1525,34 @@
1509
1525
  useHarmonics = useHarmonics === VOID ? false : useHarmonics;
1510
1526
  random = random === VOID ? Default_getInstance() : random;
1511
1527
  CyclistPowerProviderBase.call(this, useHarmonics, random);
1512
- this.c24_1 = power;
1528
+ this.power_1 = power;
1513
1529
  }
1514
- protoOf(PowerProviderConstant).o23 = function (course, path, pointIndex) {
1515
- return this.c24_1;
1530
+ protoOf(PowerProviderConstant).optimalPower_36kg19_k$ = function (course, path, pointIndex) {
1531
+ return this.power_1;
1516
1532
  };
1517
1533
  function PowerProviderConstantWithTiring(power, useHarmonics, durationSeconds, random) {
1518
1534
  useHarmonics = useHarmonics === VOID ? false : useHarmonics;
1519
1535
  random = random === VOID ? Default_getInstance() : random;
1520
1536
  CyclistPowerProviderBase.call(this, useHarmonics, random);
1521
- this.f24_1 = power;
1522
- this.g24_1 = durationSeconds;
1537
+ this.power_1 = power;
1538
+ this.durationSeconds_1 = durationSeconds;
1523
1539
  // Inline function 'kotlin.require' call
1524
- if (!(this.g24_1 > 0.0)) {
1525
- var message = 'durationSeconds must be > 0, got ' + this.g24_1;
1540
+ if (!(this.durationSeconds_1 > 0.0)) {
1541
+ var message = 'durationSeconds must be > 0, got ' + this.durationSeconds_1;
1526
1542
  throw IllegalArgumentException_init_$Create$(toString(message));
1527
1543
  }
1528
1544
  }
1529
- protoOf(PowerProviderConstantWithTiring).o23 = function (course, path, pointIndex) {
1530
- var elapsedS = path.z1u(pointIndex) / 1000.0;
1545
+ protoOf(PowerProviderConstantWithTiring).optimalPower_36kg19_k$ = function (course, path, pointIndex) {
1546
+ var elapsedS = path.elapsed_7307rw_k$(pointIndex) / 1000.0;
1531
1547
  // Inline function 'kotlin.math.max' call
1532
- var b = 1.0 - 0.6 * elapsedS / this.g24_1;
1548
+ var b = 1.0 - 0.6 * elapsedS / this.durationSeconds_1;
1533
1549
  var c = Math.max(0.5, b);
1534
- return this.f24_1 * c;
1550
+ return this.power_1 * c;
1535
1551
  };
1536
1552
  function PowerProviderFromData() {
1537
1553
  }
1538
- protoOf(PowerProviderFromData).g23 = function (course, path, pointIndex) {
1539
- return path.o1r(pointIndex);
1554
+ protoOf(PowerProviderFromData).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1555
+ return path.pInputPower_ybhudp_k$(pointIndex);
1540
1556
  };
1541
1557
  var PowerProviderFromData_instance;
1542
1558
  function PowerProviderFromData_getInstance() {
@@ -1544,7 +1560,7 @@
1544
1560
  }
1545
1561
  function RhoProviderDefault() {
1546
1562
  }
1547
- protoOf(RhoProviderDefault).j23 = function (course, path, pointIndex) {
1563
+ protoOf(RhoProviderDefault).rho_pwqvzi_k$ = function (course, path, pointIndex) {
1548
1564
  return 1.225;
1549
1565
  };
1550
1566
  var RhoProviderDefault_instance;
@@ -1552,16 +1568,16 @@
1552
1568
  return RhoProviderDefault_instance;
1553
1569
  }
1554
1570
  function RhoProviderEstimate() {
1555
- this.h24_1 = 101325.0;
1556
- this.i24_1 = 288.15;
1557
- this.j24_1 = 9.80665;
1558
- this.k24_1 = 0.0065;
1559
- this.l24_1 = 287.05;
1560
- }
1561
- protoOf(RhoProviderEstimate).j23 = function (course, path, pointIndex) {
1562
- var providedTemp = path.y1t(pointIndex, PointField_TEMPERATURE_getInstance());
1571
+ this.P0__1 = 101325.0;
1572
+ this.T0__1 = 288.15;
1573
+ this.G_ISA_1 = 9.80665;
1574
+ this.L_1 = 0.0065;
1575
+ this.R_1 = 287.05;
1576
+ }
1577
+ protoOf(RhoProviderEstimate).rho_pwqvzi_k$ = function (course, path, pointIndex) {
1578
+ var providedTemp = path.get_z3le6l_k$(pointIndex, PointField_TEMPERATURE_getInstance());
1563
1579
  var temperatureC = isNaN_0(providedTemp) ? 15.0 : providedTemp;
1564
- var providedElevation = path.j1r(pointIndex);
1580
+ var providedElevation = path.elevation_iziwkb_k$(pointIndex);
1565
1581
  var altitude = isNaN_0(providedElevation) ? 0.0 : providedElevation;
1566
1582
  var tKelvin = temperatureC + 273.15;
1567
1583
  var tmp0 = 1.0 - 0.0065 * altitude / 288.15;
@@ -1576,17 +1592,17 @@
1576
1592
  }
1577
1593
  function RollingResistancePowerProvider() {
1578
1594
  }
1579
- protoOf(RollingResistancePowerProvider).g23 = function (course, path, pointIndex) {
1580
- var m = course.r1z().v1z_1;
1581
- var crr = course.s1z().z1y_1;
1582
- var grade = path.f1v(pointIndex);
1583
- var speed = path.x1v(pointIndex);
1595
+ protoOf(RollingResistancePowerProvider).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1596
+ var m = course.get_cyclist_lkc0de_k$().massKg_1;
1597
+ var crr = course.get_bike_wojgoa_k$().crr_1;
1598
+ var grade = path.grade_c4yjz5_k$(pointIndex);
1599
+ var speed = path.speed_npav2n_k$(pointIndex);
1584
1600
  // Inline function 'kotlin.math.atan' call
1585
1601
  // Inline function 'kotlin.math.cos' call
1586
1602
  var x = Math.atan(grade);
1587
1603
  var coef = Math.cos(x);
1588
1604
  var p = -coef * m * 9.8 * speed * crr;
1589
- path.n1v(pointIndex, p);
1605
+ path.setPRollingResistance_h04uz6_k$(pointIndex, p);
1590
1606
  return p;
1591
1607
  };
1592
1608
  var RollingResistancePowerProvider_instance;
@@ -1594,18 +1610,18 @@
1594
1610
  return RollingResistancePowerProvider_instance;
1595
1611
  }
1596
1612
  function copyAllFields($this, src, i, dst, j) {
1597
- var _iterator__ex2g4s = get_entries().i();
1598
- while (_iterator__ex2g4s.j()) {
1599
- var field = _iterator__ex2g4s.k();
1600
- dst.f1u(j, field, src.y1t(i, field));
1613
+ var _iterator__ex2g4s = get_entries().iterator_jk1svi_k$();
1614
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1615
+ var field = _iterator__ex2g4s.next_20eer_k$();
1616
+ dst.set_b3ze83_k$(j, field, src.get_z3le6l_k$(i, field));
1601
1617
  }
1602
1618
  }
1603
1619
  function VirtualizeService() {
1604
- this.g21_1 = 100000;
1620
+ this.MAX_ITERATIONS_1 = 100000;
1605
1621
  }
1606
- protoOf(VirtualizeService).h21 = function (course) {
1607
- var input = course.q1z();
1608
- var n = input.f1r_1;
1622
+ protoOf(VirtualizeService).virtualizeTrack_tp3afi_k$ = function (course) {
1623
+ var input = course.get_path_wos8ry_k$();
1624
+ var n = input.size_1;
1609
1625
  if (n === 0)
1610
1626
  return new Path(0);
1611
1627
  if (n === 1) {
@@ -1613,54 +1629,54 @@
1613
1629
  copyAllFields(this, input, 0, singleton, 0);
1614
1630
  return singleton;
1615
1631
  }
1616
- var mEq = PowerComputer_instance.z23(course);
1632
+ var mEq = PowerComputer_instance.equivalentMass_e3djhu_k$(course);
1617
1633
  var out = new Path(n);
1618
1634
  copyAllFields(this, input, 0, out, 0);
1619
1635
  var speed = 0.5555555555555556;
1620
1636
  var startTimeMs = 0.0;
1621
1637
  var timeMs = startTimeMs;
1622
- out.c1s(0, timeMs);
1623
- out.a1v(0, 0.0);
1624
- out.y1v(0, speed);
1625
- out.c1w(0, speed);
1638
+ out.setTime_rfmvcd_k$(0, timeMs);
1639
+ out.setElapsed_916ug_k$(0, 0.0);
1640
+ out.setSpeed_1slan1_k$(0, speed);
1641
+ out.setVirtSpeedCurrent_kvg8yv_k$(0, speed);
1626
1642
  var i = 1;
1627
1643
  var iter = 0;
1628
1644
  $l$loop: while (i < n) {
1629
- var dx = input.w1u(i) - input.w1u(i - 1 | 0);
1630
- var pSum = PowerComputer_instance.s23(course, out, i - 1 | 0, true);
1631
- var dt = PowerComputer_instance.w23(pSum, mEq, speed, dx);
1645
+ var dx = input.distance_5s4s77_k$(i) - input.distance_5s4s77_k$(i - 1 | 0);
1646
+ var pSum = PowerComputer_instance.getNewPower_puvq9i_k$(course, out, i - 1 | 0, true);
1647
+ var dt = PowerComputer_instance.getDt_t0pcee_k$(pSum, mEq, speed, dx);
1632
1648
  var speedNew = 2.0 * dx / dt - speed;
1633
1649
  copyAllFields(this, input, i, out, i);
1634
- var speedMax = input.z1v(i);
1650
+ var speedMax = input.speedMax_mjo2cl_k$(i);
1635
1651
  if (speedNew > speedMax) {
1636
1652
  speedNew = speedMax;
1637
1653
  dt = 2.0 * dx / (speedNew + speed);
1638
1654
  }
1639
1655
  speed = speedNew;
1640
1656
  timeMs = timeMs + dt * 1000.0;
1641
- out.c1s(i, timeMs);
1642
- out.a1v(i, timeMs - startTimeMs);
1643
- out.y1u(i, dx);
1644
- out.c1v(i, dt * 1000.0);
1645
- out.y1v(i, speed);
1646
- out.c1w(i, speed);
1657
+ out.setTime_rfmvcd_k$(i, timeMs);
1658
+ out.setElapsed_916ug_k$(i, timeMs - startTimeMs);
1659
+ out.setDx_uk0ky4_k$(i, dx);
1660
+ out.setDt_sgarxs_k$(i, dt * 1000.0);
1661
+ out.setSpeed_1slan1_k$(i, speed);
1662
+ out.setVirtSpeedCurrent_kvg8yv_k$(i, speed);
1647
1663
  i = i + 1 | 0;
1648
1664
  var _unary__edvuaz = iter;
1649
1665
  iter = _unary__edvuaz + 1 | 0;
1650
1666
  if (_unary__edvuaz > 100000)
1651
1667
  break $l$loop;
1652
1668
  }
1653
- var progression = out.k1w();
1654
- var inductionVariable = progression.lc_1;
1655
- var last = progression.mc_1;
1669
+ var progression = out.get_indices_xelk8u_k$();
1670
+ var inductionVariable = progression.first_1;
1671
+ var last = progression.last_1;
1656
1672
  if (inductionVariable <= last)
1657
1673
  do {
1658
1674
  var j = inductionVariable;
1659
1675
  inductionVariable = inductionVariable + 1 | 0;
1660
- PowerComputer_instance.x23(course, out, mEq, j);
1676
+ PowerComputer_instance.computeCyclistPower_kgcsa3_k$(course, out, mEq, j);
1661
1677
  }
1662
1678
  while (!(j === last));
1663
- out.q1s();
1679
+ out.computeDerivedData_uoxpeo_k$();
1664
1680
  return out;
1665
1681
  };
1666
1682
  var VirtualizeService_instance;
@@ -1669,10 +1685,10 @@
1669
1685
  }
1670
1686
  function WheelBearingsPowerProvider() {
1671
1687
  }
1672
- protoOf(WheelBearingsPowerProvider).g23 = function (course, path, pointIndex) {
1673
- var speed = path.x1v(pointIndex);
1688
+ protoOf(WheelBearingsPowerProvider).powerAt_ejucaq_k$ = function (course, path, pointIndex) {
1689
+ var speed = path.speed_npav2n_k$(pointIndex);
1674
1690
  var p = -speed * (91.0 + 8.7 * speed) / 1000.0;
1675
- path.o1v(pointIndex, p);
1691
+ path.setPWheelBearings_djmhww_k$(pointIndex, p);
1676
1692
  return p;
1677
1693
  };
1678
1694
  var WheelBearingsPowerProvider_instance;
@@ -1681,7 +1697,7 @@
1681
1697
  }
1682
1698
  function Companion_6() {
1683
1699
  Companion_instance_6 = this;
1684
- this.m24_1 = new Wind(0.0, 0.0);
1700
+ this.NONE_1 = new Wind(0.0, 0.0);
1685
1701
  }
1686
1702
  var Companion_instance_6;
1687
1703
  function Companion_getInstance_9() {
@@ -1691,15 +1707,15 @@
1691
1707
  }
1692
1708
  function Wind(speedMS, directionRad) {
1693
1709
  Companion_getInstance_9();
1694
- this.d23_1 = speedMS;
1695
- this.e23_1 = directionRad;
1710
+ this.speedMS_1 = speedMS;
1711
+ this.directionRad_1 = directionRad;
1696
1712
  }
1697
1713
  protoOf(Wind).toString = function () {
1698
- return 'Wind(speedMS=' + this.d23_1 + ', directionRad=' + this.e23_1 + ')';
1714
+ return 'Wind(speedMS=' + this.speedMS_1 + ', directionRad=' + this.directionRad_1 + ')';
1699
1715
  };
1700
1716
  protoOf(Wind).hashCode = function () {
1701
- var result = getNumberHashCode(this.d23_1);
1702
- result = imul(result, 31) + getNumberHashCode(this.e23_1) | 0;
1717
+ var result = getNumberHashCode(this.speedMS_1);
1718
+ result = imul(result, 31) + getNumberHashCode(this.directionRad_1) | 0;
1703
1719
  return result;
1704
1720
  };
1705
1721
  protoOf(Wind).equals = function (other) {
@@ -1707,62 +1723,62 @@
1707
1723
  return true;
1708
1724
  if (!(other instanceof Wind))
1709
1725
  return false;
1710
- if (!equals(this.d23_1, other.d23_1))
1726
+ if (!equals(this.speedMS_1, other.speedMS_1))
1711
1727
  return false;
1712
- if (!equals(this.e23_1, other.e23_1))
1728
+ if (!equals(this.directionRad_1, other.directionRad_1))
1713
1729
  return false;
1714
1730
  return true;
1715
1731
  };
1716
1732
  function WindProviderNone() {
1717
1733
  }
1718
- protoOf(WindProviderNone).i23 = function (course, path, pointIndex) {
1719
- return Companion_getInstance_9().m24_1;
1734
+ protoOf(WindProviderNone).wind_umf2tf_k$ = function (course, path, pointIndex) {
1735
+ return Companion_getInstance_9().NONE_1;
1720
1736
  };
1721
1737
  var WindProviderNone_instance;
1722
1738
  function WindProviderNone_getInstance() {
1723
1739
  return WindProviderNone_instance;
1724
1740
  }
1725
1741
  function WindProviderConstant(wind) {
1726
- this.n24_1 = wind;
1742
+ this.wind_1 = wind;
1727
1743
  }
1728
- protoOf(WindProviderConstant).i23 = function (course, path, pointIndex) {
1729
- return this.n24_1;
1744
+ protoOf(WindProviderConstant).wind_umf2tf_k$ = function (course, path, pointIndex) {
1745
+ return this.wind_1;
1730
1746
  };
1731
1747
  function parseGpxWaypoints(xml) {
1732
1748
  // Inline function 'kotlin.collections.map' call
1733
- var this_0 = GpxParser_instance.y1r(xml).n1q_1;
1749
+ var this_0 = GpxParser_instance.parse$default_ez0f31_k$(xml).waypoints_1;
1734
1750
  // Inline function 'kotlin.collections.mapTo' call
1735
1751
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1736
- var _iterator__ex2g4s = this_0.i();
1737
- while (_iterator__ex2g4s.j()) {
1738
- var item = _iterator__ex2g4s.k();
1752
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1753
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1754
+ var item = _iterator__ex2g4s.next_20eer_k$();
1739
1755
  var tmp$ret$2 = waypointObj(item);
1740
- destination.h(tmp$ret$2);
1756
+ destination.add_utx5q5_k$(tmp$ret$2);
1741
1757
  }
1742
1758
  // Inline function 'kotlin.collections.toTypedArray' call
1743
1759
  return copyToArray(destination);
1744
1760
  }
1745
1761
  function parseGpx(xml) {
1746
- return firstTrackAsPath(GpxParser_instance.y1r(xml));
1762
+ return firstTrackAsPath(GpxParser_instance.parse$default_ez0f31_k$(xml));
1747
1763
  }
1748
1764
  function parseGpxTracks(xml) {
1749
1765
  // Inline function 'kotlin.collections.toTypedArray' call
1750
- var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml));
1766
+ var this_0 = tracksAsPaths(GpxParser_instance.parse$default_ez0f31_k$(xml));
1751
1767
  return copyToArray(this_0);
1752
1768
  }
1753
1769
  function parseGpxSegments(xml) {
1754
1770
  // Inline function 'kotlin.collections.toTypedArray' call
1755
- var this_0 = segmentsAsPaths(GpxParser_instance.y1r(xml));
1771
+ var this_0 = segmentsAsPaths(GpxParser_instance.parse$default_ez0f31_k$(xml));
1756
1772
  return copyToArray(this_0);
1757
1773
  }
1758
1774
  function parseGpxTracksOnly(xml) {
1759
1775
  // Inline function 'kotlin.collections.toTypedArray' call
1760
- var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml), setOf(GpxPathKind_TRACK_getInstance()));
1776
+ var this_0 = tracksAsPaths(GpxParser_instance.parse$default_ez0f31_k$(xml), setOf(GpxPathKind_TRACK_getInstance()));
1761
1777
  return copyToArray(this_0);
1762
1778
  }
1763
1779
  function parseGpxRoutesOnly(xml) {
1764
1780
  // Inline function 'kotlin.collections.toTypedArray' call
1765
- var this_0 = tracksAsPaths(GpxParser_instance.y1r(xml), setOf(GpxPathKind_ROUTE_getInstance()));
1781
+ var this_0 = tracksAsPaths(GpxParser_instance.parse$default_ez0f31_k$(xml), setOf(GpxPathKind_ROUTE_getInstance()));
1766
1782
  return copyToArray(this_0);
1767
1783
  }
1768
1784
  function writeGpxTracks(paths, waypoints, writeExtensions) {
@@ -1786,35 +1802,35 @@
1786
1802
  var item = waypoints[inductionVariable];
1787
1803
  inductionVariable = inductionVariable + 1 | 0;
1788
1804
  var tmp$ret$3 = toGpxWaypoint(item);
1789
- destination.h(tmp$ret$3);
1805
+ destination.add_utx5q5_k$(tmp$ret$3);
1790
1806
  }
1791
- return tmp_0.a1t(tmp_1, VOID, VOID, destination, VOID, writeExtensions);
1807
+ return tmp_0.write$default_koqy5u_k$(tmp_1, VOID, VOID, destination, VOID, writeExtensions);
1792
1808
  }
1793
1809
  function pathSize(path) {
1794
- return path.f1r_1;
1810
+ return path.size_1;
1795
1811
  }
1796
1812
  function pathTotalDistance(path) {
1797
- return path.j1s_1;
1813
+ return path.totalDistance_1;
1798
1814
  }
1799
1815
  function pathDurationMs(path) {
1800
- return path.o1s_1;
1816
+ return path.durationMs_1;
1801
1817
  }
1802
1818
  function pathElevationGain(path) {
1803
- return path.m1s_1;
1819
+ return path.elevationGain_1;
1804
1820
  }
1805
1821
  function pathElevationLoss(path) {
1806
- return path.n1s_1;
1822
+ return path.elevationLoss_1;
1807
1823
  }
1808
1824
  function pointAt(path, i) {
1809
- return pointObj(path.l1w(i), path.m1w(i), path.j1r(i), path.k1r(i), path.x1v(i), path.p1r(i), path.w1u(i), path.f1v(i));
1825
+ return pointObj(path.latitudeDeg_i25sm6_k$(i), path.longitudeDeg_ikk1un_k$(i), path.elevation_iziwkb_k$(i), path.time_ryc845_k$(i), path.speed_npav2n_k$(i), path.pComputedPower_g6dnn4_k$(i), path.distance_5s4s77_k$(i), path.grade_c4yjz5_k$(i));
1810
1826
  }
1811
1827
  function writeGpx(path, writeExtensions) {
1812
1828
  writeExtensions = writeExtensions === VOID ? true : writeExtensions;
1813
- return GpxWriter_instance.y1s(toGpxDocument(path, VOID, 'virtualized'), writeExtensions);
1829
+ return GpxWriter_instance.write_7y52k2_k$(toGpxDocument(path, VOID, 'virtualized'), writeExtensions);
1814
1830
  }
1815
1831
  function writeGpxAt(path, startTimeEpochMs, writeExtensions) {
1816
1832
  writeExtensions = writeExtensions === VOID ? true : writeExtensions;
1817
- return GpxWriter_instance.y1s(toGpxDocument(path, VOID, 'virtualized', Companion_getInstance().nd(numberToLong(startTimeEpochMs))), writeExtensions);
1833
+ return GpxWriter_instance.write_7y52k2_k$(toGpxDocument(path, VOID, 'virtualized', Companion_getInstance().fromEpochMilliseconds_uaz65_k$(numberToLong(startTimeEpochMs))), writeExtensions);
1818
1834
  }
1819
1835
  function enhance(path, options) {
1820
1836
  var tmp = GlobalScope_instance;
@@ -1825,7 +1841,7 @@
1825
1841
  return promise(tmp, VOID, VOID, enhanceWithCourse$slambda_0(options, path, cyclist, bike, wind, power, null));
1826
1842
  }
1827
1843
  function getField(path, i, fieldProp) {
1828
- var tmp0_elvis_lhs = Companion_getInstance_0().r1w(fieldProp);
1844
+ var tmp0_elvis_lhs = Companion_getInstance_0().byProp_kdf1eo_k$(fieldProp);
1829
1845
  var tmp;
1830
1846
  if (tmp0_elvis_lhs == null) {
1831
1847
  // Inline function 'kotlin.error' call
@@ -1835,35 +1851,35 @@
1835
1851
  tmp = tmp0_elvis_lhs;
1836
1852
  }
1837
1853
  var field = tmp;
1838
- return path.y1t(i, field);
1854
+ return path.get_z3le6l_k$(i, field);
1839
1855
  }
1840
1856
  function fieldDefinitions() {
1841
1857
  // Inline function 'kotlin.collections.map' call
1842
1858
  var this_0 = get_entries();
1843
1859
  // Inline function 'kotlin.collections.mapTo' call
1844
1860
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1845
- var _iterator__ex2g4s = this_0.i();
1846
- while (_iterator__ex2g4s.j()) {
1847
- var item = _iterator__ex2g4s.k();
1861
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1862
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1863
+ var item = _iterator__ex2g4s.next_20eer_k$();
1848
1864
  var o = {};
1849
- o.prop = item.m1t_1;
1850
- o.unit = item.n1t_1;
1851
- o.shortDescription = item.o1t_1;
1852
- o.categoryId = item.p1t_1.u1w_1;
1853
- o.categoryName = item.p1t_1.v1w_1;
1854
- o.notSelectable = item.q1t_1;
1855
- o.anglesInRadians = item.r1t_1;
1865
+ o.prop = item.prop_1;
1866
+ o.unit = item.unit_1;
1867
+ o.shortDescription = item.shortDescription_1;
1868
+ o.categoryId = item.category_1.id_1;
1869
+ o.categoryName = item.category_1.displayName_1;
1870
+ o.notSelectable = item.notSelectable_1;
1871
+ o.anglesInRadians = item.anglesInRadians_1;
1856
1872
  // Inline function 'kotlin.js.unsafeCast' call
1857
- destination.h(o);
1873
+ destination.add_utx5q5_k$(o);
1858
1874
  }
1859
1875
  // Inline function 'kotlin.collections.toTypedArray' call
1860
1876
  return copyToArray(destination);
1861
1877
  }
1862
1878
  function pathLatitudeDeg(path, i) {
1863
- return path.l1w(i);
1879
+ return path.latitudeDeg_i25sm6_k$(i);
1864
1880
  }
1865
1881
  function pathLongitudeDeg(path, i) {
1866
- return path.m1w(i);
1882
+ return path.longitudeDeg_ikk1un_k$(i);
1867
1883
  }
1868
1884
  function pathToCsv(path, separator, unitsInHeader) {
1869
1885
  var tmp = CsvWriter_instance;
@@ -1875,18 +1891,18 @@
1875
1891
  } else {
1876
1892
  tmp_0 = tmp0_elvis_lhs;
1877
1893
  }
1878
- return tmp.x1t(path, new CsvOptions(VOID, tmp_0, unitsInHeader));
1894
+ return tmp.write_p5vnh4_k$(path, new CsvOptions(VOID, tmp_0, unitsInHeader));
1879
1895
  }
1880
1896
  function pathToJson(path, pretty) {
1881
- return JsonWriter_instance.e1u(path, new JsonOptions(VOID, pretty));
1897
+ return JsonWriter_instance.write_lwqeog_k$(path, new JsonOptions(VOID, pretty));
1882
1898
  }
1883
1899
  function pathToFit(path, name, startTimeEpochMs) {
1884
- return toFitBytes(path, name, Companion_getInstance().nd(numberToLong(startTimeEpochMs)));
1900
+ return toFitBytes(path, name, Companion_getInstance().fromEpochMilliseconds_uaz65_k$(numberToLong(startTimeEpochMs)));
1885
1901
  }
1886
1902
  function pathsToFit(paths, name, startTimeEpochMs, interPathGapMs) {
1887
1903
  interPathGapMs = interPathGapMs === VOID ? 0.0 : interPathGapMs;
1888
1904
  var tmp = toList(paths);
1889
- var tmp_0 = Companion_getInstance().nd(numberToLong(startTimeEpochMs));
1905
+ var tmp_0 = Companion_getInstance().fromEpochMilliseconds_uaz65_k$(numberToLong(startTimeEpochMs));
1890
1906
  Companion_getInstance_1();
1891
1907
  // Inline function 'kotlin.time.Companion.milliseconds' call
1892
1908
  var this_0 = numberToLong(interPathGapMs);
@@ -1901,42 +1917,42 @@
1901
1917
  }
1902
1918
  function detectClimbs(path) {
1903
1919
  // Inline function 'kotlin.collections.map' call
1904
- var this_0 = ClimbDetector_instance.c23(path);
1920
+ var this_0 = ClimbDetector_instance.detect$default_6ml3ny_k$(path);
1905
1921
  // Inline function 'kotlin.collections.mapTo' call
1906
1922
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1907
- var _iterator__ex2g4s = this_0.i();
1908
- while (_iterator__ex2g4s.j()) {
1909
- var item = _iterator__ex2g4s.k();
1923
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1924
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1925
+ var item = _iterator__ex2g4s.next_20eer_k$();
1910
1926
  var tmp$ret$2 = toDto_0(item);
1911
- destination.h(tmp$ret$2);
1927
+ destination.add_utx5q5_k$(tmp$ret$2);
1912
1928
  }
1913
1929
  // Inline function 'kotlin.collections.toTypedArray' call
1914
1930
  return copyToArray(destination);
1915
1931
  }
1916
1932
  function detectClimbsWithOptions(path, minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster) {
1917
1933
  // Inline function 'kotlin.collections.map' call
1918
- var this_0 = ClimbDetector_instance.b23(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster));
1934
+ var this_0 = ClimbDetector_instance.detect_llooq2_k$(path, new ClimbOptions(minMinClimbElevationM, maxMinClimbElevationM, minClimbElevationRatio, minGradePercent, maxDiffRealGrade, booster));
1919
1935
  // Inline function 'kotlin.collections.mapTo' call
1920
1936
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
1921
- var _iterator__ex2g4s = this_0.i();
1922
- while (_iterator__ex2g4s.j()) {
1923
- var item = _iterator__ex2g4s.k();
1937
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
1938
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
1939
+ var item = _iterator__ex2g4s.next_20eer_k$();
1924
1940
  var tmp$ret$2 = toDto_0(item);
1925
- destination.h(tmp$ret$2);
1941
+ destination.add_utx5q5_k$(tmp$ret$2);
1926
1942
  }
1927
1943
  // Inline function 'kotlin.collections.toTypedArray' call
1928
1944
  return copyToArray(destination);
1929
1945
  }
1930
1946
  function waypointObj(w) {
1931
1947
  var o = {};
1932
- o.latitudeDeg = w.d1q_1;
1933
- o.longitudeDeg = w.e1q_1;
1934
- o.elevationM = w.f1q_1;
1935
- o.name = w.g1q_1;
1936
- o.description = w.h1q_1;
1937
- o.symbol = w.i1q_1;
1938
- o.type = w.j1q_1;
1939
- var tmp0_safe_receiver = w.k1q_1;
1948
+ o.latitudeDeg = w.latitudeDeg_1;
1949
+ o.longitudeDeg = w.longitudeDeg_1;
1950
+ o.elevationM = w.elevationM_1;
1951
+ o.name = w.name_1;
1952
+ o.description = w.description_1;
1953
+ o.symbol = w.symbol_1;
1954
+ o.type = w.type_1;
1955
+ var tmp0_safe_receiver = w.timeEpochMs_1;
1940
1956
  o.timeEpochMs = tmp0_safe_receiver == null ? null : toNumber(tmp0_safe_receiver);
1941
1957
  // Inline function 'kotlin.js.unsafeCast' call
1942
1958
  return o;
@@ -2033,39 +2049,39 @@
2033
2049
  }
2034
2050
  function toDto(_this__u8e3s4) {
2035
2051
  var o = {};
2036
- o.startDistanceM = _this__u8e3s4.y21_1;
2037
- o.endDistanceM = _this__u8e3s4.z21_1;
2038
- o.startElevationM = _this__u8e3s4.a22_1;
2039
- o.endElevationM = _this__u8e3s4.b22_1;
2040
- o.lengthM = _this__u8e3s4.u21();
2041
- o.elevationGainM = _this__u8e3s4.v21();
2042
- o.grade = _this__u8e3s4.c22();
2052
+ o.startDistanceM = _this__u8e3s4.startDistanceM_1;
2053
+ o.endDistanceM = _this__u8e3s4.endDistanceM_1;
2054
+ o.startElevationM = _this__u8e3s4.startElevationM_1;
2055
+ o.endElevationM = _this__u8e3s4.endElevationM_1;
2056
+ o.lengthM = _this__u8e3s4.get_lengthM_2aqrzy_k$();
2057
+ o.elevationGainM = _this__u8e3s4.get_elevationGainM_6kg9eu_k$();
2058
+ o.grade = _this__u8e3s4.get_grade_is33qm_k$();
2043
2059
  // Inline function 'kotlin.js.unsafeCast' call
2044
2060
  return o;
2045
2061
  }
2046
2062
  function toDto_0(_this__u8e3s4) {
2047
2063
  var o = {};
2048
- o.startIndex = _this__u8e3s4.l21_1;
2049
- o.endIndex = _this__u8e3s4.m21_1;
2050
- o.startDistanceM = _this__u8e3s4.n21_1;
2051
- o.endDistanceM = _this__u8e3s4.o21_1;
2052
- o.startElevationM = _this__u8e3s4.p21_1;
2053
- o.endElevationM = _this__u8e3s4.q21_1;
2054
- o.lengthM = _this__u8e3s4.u21();
2055
- o.elevationGainM = _this__u8e3s4.v21();
2056
- o.averageGrade = _this__u8e3s4.w21();
2057
- o.climbingGrade = _this__u8e3s4.x21();
2058
- o.positiveElevationM = _this__u8e3s4.r21_1;
2059
- o.negativeElevationM = _this__u8e3s4.s21_1;
2064
+ o.startIndex = _this__u8e3s4.startIndex_1;
2065
+ o.endIndex = _this__u8e3s4.endIndex_1;
2066
+ o.startDistanceM = _this__u8e3s4.startDistanceM_1;
2067
+ o.endDistanceM = _this__u8e3s4.endDistanceM_1;
2068
+ o.startElevationM = _this__u8e3s4.startElevationM_1;
2069
+ o.endElevationM = _this__u8e3s4.endElevationM_1;
2070
+ o.lengthM = _this__u8e3s4.get_lengthM_2aqrzy_k$();
2071
+ o.elevationGainM = _this__u8e3s4.get_elevationGainM_6kg9eu_k$();
2072
+ o.averageGrade = _this__u8e3s4.get_averageGrade_oooweb_k$();
2073
+ o.climbingGrade = _this__u8e3s4.get_climbingGrade_olocdd_k$();
2074
+ o.positiveElevationM = _this__u8e3s4.positiveElevationM_1;
2075
+ o.negativeElevationM = _this__u8e3s4.negativeElevationM_1;
2060
2076
  // Inline function 'kotlin.collections.map' call
2061
- var this_0 = _this__u8e3s4.t21_1;
2077
+ var this_0 = _this__u8e3s4.parts_1;
2062
2078
  // Inline function 'kotlin.collections.mapTo' call
2063
2079
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2064
- var _iterator__ex2g4s = this_0.i();
2065
- while (_iterator__ex2g4s.j()) {
2066
- var item = _iterator__ex2g4s.k();
2080
+ var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
2081
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
2082
+ var item = _iterator__ex2g4s.next_20eer_k$();
2067
2083
  var tmp$ret$2 = toDto(item);
2068
- destination.h(tmp$ret$2);
2084
+ destination.add_utx5q5_k$(tmp$ret$2);
2069
2085
  }
2070
2086
  // Inline function 'kotlin.collections.toTypedArray' call
2071
2087
  o.parts = copyToArray(destination);
@@ -2073,31 +2089,31 @@
2073
2089
  return o;
2074
2090
  }
2075
2091
  function enhance$slambda($options, $path, resultContinuation) {
2076
- this.w24_1 = $options;
2077
- this.x24_1 = $path;
2092
+ this.$options_1 = $options;
2093
+ this.$path_1 = $path;
2078
2094
  CoroutineImpl.call(this, resultContinuation);
2079
2095
  }
2080
- protoOf(enhance$slambda).z24 = function ($this$promise, $completion) {
2081
- var tmp = this.l11($this$promise, $completion);
2082
- tmp.j6_1 = Unit_instance;
2083
- tmp.k6_1 = null;
2084
- return tmp.p6();
2096
+ protoOf(enhance$slambda).invoke_jiwoso_k$ = function ($this$promise, $completion) {
2097
+ var tmp = this.create_rcuf4x_k$($this$promise, $completion);
2098
+ tmp.result_1 = Unit_instance;
2099
+ tmp.exception_1 = null;
2100
+ return tmp.doResume_5yljmg_k$();
2085
2101
  };
2086
- protoOf(enhance$slambda).x6 = function (p1, $completion) {
2087
- return this.z24((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2102
+ protoOf(enhance$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
2103
+ return this.invoke_jiwoso_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2088
2104
  };
2089
- protoOf(enhance$slambda).p6 = function () {
2090
- var suspendResult = this.j6_1;
2105
+ protoOf(enhance$slambda).doResume_5yljmg_k$ = function () {
2106
+ var suspendResult = this.result_1;
2091
2107
  $sm: do
2092
2108
  try {
2093
- var tmp = this.h6_1;
2109
+ var tmp = this.state_1;
2094
2110
  switch (tmp) {
2095
2111
  case 0:
2096
- this.i6_1 = 2;
2097
- var opts = toEnhanceOptions(this.w24_1);
2098
- var provider = opts.i20_1 ? new ElevationProvider() : null;
2099
- this.h6_1 = 1;
2100
- suspendResult = Enhancer_instance.j21(this.x24_1, provider, opts, this);
2112
+ this.exceptionState_1 = 2;
2113
+ var opts = toEnhanceOptions(this.$options_1);
2114
+ var provider = opts.fixElevation_1 ? new ElevationProvider() : null;
2115
+ this.state_1 = 1;
2116
+ suspendResult = Enhancer_instance.enhanceCourseDefault_jm937y_k$(this.$path_1, provider, opts, this);
2101
2117
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2102
2118
  return suspendResult;
2103
2119
  }
@@ -2106,61 +2122,61 @@
2106
2122
  case 1:
2107
2123
  return suspendResult;
2108
2124
  case 2:
2109
- throw this.k6_1;
2125
+ throw this.exception_1;
2110
2126
  }
2111
2127
  } catch ($p) {
2112
2128
  var e = $p;
2113
- if (this.i6_1 === 2) {
2129
+ if (this.exceptionState_1 === 2) {
2114
2130
  throw e;
2115
2131
  } else {
2116
- this.h6_1 = this.i6_1;
2117
- this.k6_1 = e;
2132
+ this.state_1 = this.exceptionState_1;
2133
+ this.exception_1 = e;
2118
2134
  }
2119
2135
  }
2120
2136
  while (true);
2121
2137
  };
2122
- protoOf(enhance$slambda).l11 = function ($this$promise, completion) {
2123
- var i = new enhance$slambda(this.w24_1, this.x24_1, completion);
2124
- i.y24_1 = $this$promise;
2138
+ protoOf(enhance$slambda).create_rcuf4x_k$ = function ($this$promise, completion) {
2139
+ var i = new enhance$slambda(this.$options_1, this.$path_1, completion);
2140
+ i.$this$promise_1 = $this$promise;
2125
2141
  return i;
2126
2142
  };
2127
2143
  function enhance$slambda_0($options, $path, resultContinuation) {
2128
2144
  var i = new enhance$slambda($options, $path, resultContinuation);
2129
2145
  return constructCallableReference(function ($this$promise, $completion) {
2130
- return i.z24($this$promise, $completion);
2146
+ return i.invoke_jiwoso_k$($this$promise, $completion);
2131
2147
  }, 1);
2132
2148
  }
2133
2149
  function enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
2134
- this.i25_1 = $options;
2135
- this.j25_1 = $path;
2136
- this.k25_1 = $cyclist;
2137
- this.l25_1 = $bike;
2138
- this.m25_1 = $wind;
2139
- this.n25_1 = $power;
2150
+ this.$options_1 = $options;
2151
+ this.$path_1 = $path;
2152
+ this.$cyclist_1 = $cyclist;
2153
+ this.$bike_1 = $bike;
2154
+ this.$wind_1 = $wind;
2155
+ this.$power_1 = $power;
2140
2156
  CoroutineImpl.call(this, resultContinuation);
2141
2157
  }
2142
- protoOf(enhanceWithCourse$slambda).z24 = function ($this$promise, $completion) {
2143
- var tmp = this.l11($this$promise, $completion);
2144
- tmp.j6_1 = Unit_instance;
2145
- tmp.k6_1 = null;
2146
- return tmp.p6();
2158
+ protoOf(enhanceWithCourse$slambda).invoke_jiwoso_k$ = function ($this$promise, $completion) {
2159
+ var tmp = this.create_rcuf4x_k$($this$promise, $completion);
2160
+ tmp.result_1 = Unit_instance;
2161
+ tmp.exception_1 = null;
2162
+ return tmp.doResume_5yljmg_k$();
2147
2163
  };
2148
- protoOf(enhanceWithCourse$slambda).x6 = function (p1, $completion) {
2149
- return this.z24((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2164
+ protoOf(enhanceWithCourse$slambda).invoke_qns8j1_k$ = function (p1, $completion) {
2165
+ return this.invoke_jiwoso_k$((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2150
2166
  };
2151
- protoOf(enhanceWithCourse$slambda).p6 = function () {
2152
- var suspendResult = this.j6_1;
2167
+ protoOf(enhanceWithCourse$slambda).doResume_5yljmg_k$ = function () {
2168
+ var suspendResult = this.result_1;
2153
2169
  $sm: do
2154
2170
  try {
2155
- var tmp = this.h6_1;
2171
+ var tmp = this.state_1;
2156
2172
  switch (tmp) {
2157
2173
  case 0:
2158
- this.i6_1 = 2;
2159
- var opts = toEnhanceOptions(this.i25_1);
2160
- var provider = opts.i20_1 ? new ElevationProvider() : null;
2161
- var course = new CoursePhysics(new Course(this.j25_1, toCyclist(this.k25_1), toBike(this.l25_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.m25_1), toCyclistPowerProvider(this.n25_1));
2162
- this.h6_1 = 1;
2163
- suspendResult = Enhancer_instance.k21(course, opts, provider, this);
2174
+ this.exceptionState_1 = 2;
2175
+ var opts = toEnhanceOptions(this.$options_1);
2176
+ var provider = opts.fixElevation_1 ? new ElevationProvider() : null;
2177
+ var course = new CoursePhysics(new Course(this.$path_1, toCyclist(this.$cyclist_1), toBike(this.$bike_1)), RhoProviderEstimate_instance, AeroProviderConstant_instance, toWindProvider(this.$wind_1), toCyclistPowerProvider(this.$power_1));
2178
+ this.state_1 = 1;
2179
+ suspendResult = Enhancer_instance.enhanceCourse_mout3j_k$(course, opts, provider, this);
2164
2180
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2165
2181
  return suspendResult;
2166
2182
  }
@@ -2169,28 +2185,28 @@
2169
2185
  case 1:
2170
2186
  return suspendResult;
2171
2187
  case 2:
2172
- throw this.k6_1;
2188
+ throw this.exception_1;
2173
2189
  }
2174
2190
  } catch ($p) {
2175
2191
  var e = $p;
2176
- if (this.i6_1 === 2) {
2192
+ if (this.exceptionState_1 === 2) {
2177
2193
  throw e;
2178
2194
  } else {
2179
- this.h6_1 = this.i6_1;
2180
- this.k6_1 = e;
2195
+ this.state_1 = this.exceptionState_1;
2196
+ this.exception_1 = e;
2181
2197
  }
2182
2198
  }
2183
2199
  while (true);
2184
2200
  };
2185
- protoOf(enhanceWithCourse$slambda).l11 = function ($this$promise, completion) {
2186
- var i = new enhanceWithCourse$slambda(this.i25_1, this.j25_1, this.k25_1, this.l25_1, this.m25_1, this.n25_1, completion);
2187
- i.o25_1 = $this$promise;
2201
+ protoOf(enhanceWithCourse$slambda).create_rcuf4x_k$ = function ($this$promise, completion) {
2202
+ var i = new enhanceWithCourse$slambda(this.$options_1, this.$path_1, this.$cyclist_1, this.$bike_1, this.$wind_1, this.$power_1, completion);
2203
+ i.$this$promise_1 = $this$promise;
2188
2204
  return i;
2189
2205
  };
2190
2206
  function enhanceWithCourse$slambda_0($options, $path, $cyclist, $bike, $wind, $power, resultContinuation) {
2191
2207
  var i = new enhanceWithCourse$slambda($options, $path, $cyclist, $bike, $wind, $power, resultContinuation);
2192
2208
  return constructCallableReference(function ($this$promise, $completion) {
2193
- return i.z24($this$promise, $completion);
2209
+ return i.invoke_jiwoso_k$($this$promise, $completion);
2194
2210
  }, 1);
2195
2211
  }
2196
2212
  //region block: init