@glandais/vcyclist-engine 3.0.0 → 3.1.1

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