dl-common-util 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/88b0986a7186d029-atomicfu-js-ir.js +15 -0
- package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -0
- package/buffer-kt.js +266 -0
- package/buffer-kt.js.map +1 -0
- package/dl-common-util.d.ts +162 -62
- package/dl-common-util.js +2269 -528
- package/dl-common-util.js.map +1 -1
- package/kotlin-js.js +15 -0
- package/kotlin-js.js.map +1 -0
- package/kotlin-kotlin-stdlib-js-ir.js +2186 -1189
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +5711 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js +15 -0
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map +1 -0
- package/kotlin-web.js +15 -0
- package/kotlin-web.js.map +1 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +15 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -0
- package/package.json +1 -1
package/dl-common-util.js
CHANGED
|
@@ -1,83 +1,119 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib
|
|
3
|
+
define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib.js', './buffer-kt.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib
|
|
5
|
+
factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib.js'), require('./buffer-kt.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof PinyinPro === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module '
|
|
8
|
+
throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'pinyin-pro' was not found. Please, check whether 'pinyin-pro' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
|
|
9
9
|
}
|
|
10
|
-
if (typeof this['kotlin-kotlin-stdlib
|
|
11
|
-
throw new Error("Error loading module '
|
|
10
|
+
if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
if (typeof this['buffer-kt'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'com.github.D10NGYANG:DLCommonUtil'. Its dependency 'buffer-kt' was not found. Please, check whether 'buffer-kt' is loaded prior to 'com.github.D10NGYANG:DLCommonUtil'.");
|
|
15
|
+
}
|
|
16
|
+
root['com.github.D10NGYANG:DLCommonUtil'] = factory(typeof this['com.github.D10NGYANG:DLCommonUtil'] === 'undefined' ? {} : this['com.github.D10NGYANG:DLCommonUtil'], PinyinPro, this['kotlin-kotlin-stdlib'], this['buffer-kt']);
|
|
14
17
|
}
|
|
15
|
-
}(this, function (_, PinyinPro, kotlin_kotlin) {
|
|
18
|
+
}(this, function (_, PinyinPro, kotlin_kotlin, kotlin_com_ditchoom_buffer) {
|
|
16
19
|
'use strict';
|
|
17
20
|
//region block: imports
|
|
18
21
|
var imul = Math.imul;
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.
|
|
34
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
22
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
23
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f;
|
|
24
|
+
var Unit_instance = kotlin_kotlin.$_$.s;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.e3;
|
|
26
|
+
var isCharSequence = kotlin_kotlin.$_$.o1;
|
|
27
|
+
var trim = kotlin_kotlin.$_$.b3;
|
|
28
|
+
var toString = kotlin_kotlin.$_$.x1;
|
|
29
|
+
var Long = kotlin_kotlin.$_$.d3;
|
|
30
|
+
var Companion_instance = kotlin_com_ditchoom_buffer.$_$.c;
|
|
31
|
+
var wrap = kotlin_com_ditchoom_buffer.$_$.b;
|
|
32
|
+
var toLong = kotlin_kotlin.$_$.v1;
|
|
33
|
+
var indexOf = kotlin_kotlin.$_$.y;
|
|
34
|
+
var copyOfRange = kotlin_kotlin.$_$.w;
|
|
35
|
+
var allocate = kotlin_com_ditchoom_buffer.$_$.a;
|
|
36
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.n;
|
|
37
|
+
var toString_0 = kotlin_kotlin.$_$.z2;
|
|
38
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.k;
|
|
39
|
+
var padStart = kotlin_kotlin.$_$.n2;
|
|
40
|
+
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.o;
|
|
41
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
42
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
43
|
+
var indexOf_0 = kotlin_kotlin.$_$.k2;
|
|
44
|
+
var numberToInt = kotlin_kotlin.$_$.q1;
|
|
45
|
+
var toByte = kotlin_kotlin.$_$.u1;
|
|
46
|
+
var toInt = kotlin_kotlin.$_$.x2;
|
|
47
|
+
var charSequenceLength = kotlin_kotlin.$_$.f1;
|
|
48
|
+
var hexToByte = kotlin_kotlin.$_$.j2;
|
|
49
|
+
var hexToByteArray = kotlin_kotlin.$_$.i2;
|
|
50
|
+
var iterator = kotlin_kotlin.$_$.l2;
|
|
51
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.l;
|
|
52
|
+
var charSequenceGet = kotlin_kotlin.$_$.e1;
|
|
53
|
+
var toString_1 = kotlin_kotlin.$_$.m;
|
|
54
|
+
var numberToChar = kotlin_kotlin.$_$.p1;
|
|
55
|
+
var THROW_IAE = kotlin_kotlin.$_$.f3;
|
|
56
|
+
var Enum = kotlin_kotlin.$_$.c3;
|
|
57
|
+
var protoOf = kotlin_kotlin.$_$.s1;
|
|
58
|
+
var defineProp = kotlin_kotlin.$_$.i1;
|
|
59
|
+
var classMeta = kotlin_kotlin.$_$.g1;
|
|
60
|
+
var setMetadataFor = kotlin_kotlin.$_$.t1;
|
|
61
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.g3;
|
|
57
62
|
var primitiveArrayConcat = kotlin_kotlin.$_$.a;
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
63
|
+
var roundToInt = kotlin_kotlin.$_$.z1;
|
|
64
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
|
|
65
|
+
var until = kotlin_kotlin.$_$.b2;
|
|
66
|
+
var step = kotlin_kotlin.$_$.a2;
|
|
67
|
+
var slice = kotlin_kotlin.$_$.r2;
|
|
68
|
+
var toUInt = kotlin_kotlin.$_$.a3;
|
|
69
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.p;
|
|
70
|
+
var copyToArray = kotlin_kotlin.$_$.x;
|
|
71
|
+
var toString_2 = kotlin_kotlin.$_$.y2;
|
|
72
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.e;
|
|
73
|
+
var map = kotlin_kotlin.$_$.d2;
|
|
74
|
+
var joinToString = kotlin_kotlin.$_$.c2;
|
|
75
|
+
var getNumberHashCode = kotlin_kotlin.$_$.l1;
|
|
76
|
+
var equals = kotlin_kotlin.$_$.j1;
|
|
77
|
+
var get_PI = kotlin_kotlin.$_$.y1;
|
|
78
|
+
var objectMeta = kotlin_kotlin.$_$.r1;
|
|
79
|
+
var toList = kotlin_kotlin.$_$.e2;
|
|
80
|
+
var replaceRange = kotlin_kotlin.$_$.o2;
|
|
81
|
+
var contains = kotlin_kotlin.$_$.f2;
|
|
82
|
+
var println = kotlin_kotlin.$_$.d1;
|
|
83
|
+
var toCharArray = kotlin_kotlin.$_$.t2;
|
|
84
|
+
var replaceRange_0 = kotlin_kotlin.$_$.p2;
|
|
85
|
+
var substring = kotlin_kotlin.$_$.s2;
|
|
86
|
+
var toDouble = kotlin_kotlin.$_$.u2;
|
|
87
|
+
var toInt_0 = kotlin_kotlin.$_$.w2;
|
|
88
|
+
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.j;
|
|
89
|
+
var removeLast = kotlin_kotlin.$_$.a1;
|
|
90
|
+
var Default_getInstance = kotlin_kotlin.$_$.r;
|
|
91
|
+
var to = kotlin_kotlin.$_$.h3;
|
|
92
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.t;
|
|
93
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.c;
|
|
94
|
+
var copyOfRange_0 = kotlin_kotlin.$_$.v;
|
|
95
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
96
|
+
var compareTo = kotlin_kotlin.$_$.h1;
|
|
97
|
+
var encodeToByteArray = kotlin_kotlin.$_$.h2;
|
|
98
|
+
var decodeToString = kotlin_kotlin.$_$.g2;
|
|
99
|
+
var replace = kotlin_kotlin.$_$.q2;
|
|
100
|
+
var padEnd = kotlin_kotlin.$_$.m2;
|
|
101
|
+
var getProgressionLastElement = kotlin_kotlin.$_$.c1;
|
|
102
|
+
var toIntOrNull = kotlin_kotlin.$_$.v2;
|
|
103
|
+
var toShort = kotlin_kotlin.$_$.w1;
|
|
104
|
+
var toTypedArray = kotlin_kotlin.$_$.b1;
|
|
105
|
+
var joinToString_0 = kotlin_kotlin.$_$.z;
|
|
69
106
|
//endregion
|
|
70
107
|
//region block: pre-declaration
|
|
71
108
|
setMetadataFor(ChecksumType, 'ChecksumType', classMeta, Enum);
|
|
109
|
+
setMetadataFor(Coordinate, 'Coordinate', classMeta, VOID, VOID, Coordinate);
|
|
110
|
+
setMetadataFor(CoordinateConvert, 'CoordinateConvert', objectMeta);
|
|
111
|
+
setMetadataFor(CoordinateSystemType, 'CoordinateSystemType', classMeta, Enum);
|
|
112
|
+
setMetadataFor(DMS, 'DMS', classMeta, VOID, VOID, DMS);
|
|
113
|
+
setMetadataFor(DistanceAndBearing, 'DistanceAndBearing', classMeta, VOID, VOID, DistanceAndBearing);
|
|
72
114
|
setMetadataFor(GBKHelper, 'GBKHelper', objectMeta);
|
|
73
115
|
//endregion
|
|
74
|
-
function
|
|
75
|
-
return toInt(toHexString(_this__u8e3s4), 16);
|
|
76
|
-
}
|
|
77
|
-
function toUnsignedLong(_this__u8e3s4) {
|
|
78
|
-
return toLong(toHexString(_this__u8e3s4), 16);
|
|
79
|
-
}
|
|
80
|
-
function toBinString(_this__u8e3s4, space) {
|
|
116
|
+
function byteArrayToBinString(_this__u8e3s4, space) {
|
|
81
117
|
space = space === VOID ? false : space;
|
|
82
118
|
var builder = StringBuilder_init_$Create$();
|
|
83
119
|
var inductionVariable = 0;
|
|
@@ -85,32 +121,32 @@
|
|
|
85
121
|
while (inductionVariable < last) {
|
|
86
122
|
var byte = _this__u8e3s4[inductionVariable];
|
|
87
123
|
inductionVariable = inductionVariable + 1 | 0;
|
|
88
|
-
builder.
|
|
124
|
+
builder.f3(byteToBinString(byte));
|
|
89
125
|
if (space) {
|
|
90
|
-
builder.
|
|
126
|
+
builder.f3(' ');
|
|
91
127
|
}
|
|
92
128
|
}
|
|
93
129
|
// Inline function 'kotlin.text.trim' call
|
|
94
|
-
var
|
|
95
|
-
return toString(trim(isCharSequence(
|
|
130
|
+
var this_0 = builder.toString();
|
|
131
|
+
return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
96
132
|
}
|
|
97
|
-
function
|
|
133
|
+
function byteArrayToHexString(_this__u8e3s4, space, uppercase) {
|
|
98
134
|
space = space === VOID ? false : space;
|
|
99
|
-
uppercase = uppercase === VOID ?
|
|
135
|
+
uppercase = uppercase === VOID ? true : uppercase;
|
|
100
136
|
var builder = StringBuilder_init_$Create$();
|
|
101
137
|
var inductionVariable = 0;
|
|
102
138
|
var last = _this__u8e3s4.length;
|
|
103
139
|
while (inductionVariable < last) {
|
|
104
140
|
var byte = _this__u8e3s4[inductionVariable];
|
|
105
141
|
inductionVariable = inductionVariable + 1 | 0;
|
|
106
|
-
builder.
|
|
142
|
+
builder.f3(byteToHexString(byte));
|
|
107
143
|
if (space) {
|
|
108
|
-
builder.
|
|
144
|
+
builder.f3(' ');
|
|
109
145
|
}
|
|
110
146
|
}
|
|
111
147
|
// Inline function 'kotlin.text.trim' call
|
|
112
|
-
var
|
|
113
|
-
var result = toString(trim(isCharSequence(
|
|
148
|
+
var this_0 = builder.toString();
|
|
149
|
+
var result = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
114
150
|
var tmp;
|
|
115
151
|
if (uppercase) {
|
|
116
152
|
// Inline function 'kotlin.text.uppercase' call
|
|
@@ -123,64 +159,99 @@
|
|
|
123
159
|
}
|
|
124
160
|
return tmp;
|
|
125
161
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
162
|
+
function byteArrayToUnsignedInt(_this__u8e3s4) {
|
|
163
|
+
return byteArrayToUnsignedLong(_this__u8e3s4).j7();
|
|
164
|
+
}
|
|
165
|
+
function byteArrayToUnsignedLong(_this__u8e3s4) {
|
|
166
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
167
|
+
if (_this__u8e3s4.length === 0)
|
|
168
|
+
return new Long(0, 0);
|
|
169
|
+
var buffer = wrap(Companion_instance, _this__u8e3s4);
|
|
170
|
+
var temp = toLong(byteToUnsignedInt(buffer.t(0)));
|
|
171
|
+
var inductionVariable = 1;
|
|
172
|
+
var last = buffer.la();
|
|
173
|
+
if (inductionVariable < last)
|
|
174
|
+
do {
|
|
175
|
+
var i = inductionVariable;
|
|
176
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
177
|
+
temp = temp.f7(8).h7(toLong(byteToUnsignedInt(buffer.t(i))));
|
|
178
|
+
}
|
|
179
|
+
while (inductionVariable < last);
|
|
180
|
+
return temp;
|
|
181
|
+
}
|
|
182
|
+
function indexOfByteArray(_this__u8e3s4, bs) {
|
|
183
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
184
|
+
if (bs.length === 0)
|
|
185
|
+
return -1;
|
|
186
|
+
if (bs.length > _this__u8e3s4.length)
|
|
187
|
+
return -1;
|
|
188
|
+
if (bs.length === 1)
|
|
189
|
+
return indexOf(_this__u8e3s4, bs[0]);
|
|
190
|
+
var buffer = wrap(Companion_instance, _this__u8e3s4);
|
|
191
|
+
while (buffer.z9()) {
|
|
192
|
+
if (buffer.y9() < bs.length)
|
|
135
193
|
return -1;
|
|
136
|
-
|
|
137
|
-
|
|
194
|
+
var idx = 0;
|
|
195
|
+
$l$loop: while (idx < bs.length && buffer.ma() === bs[idx]) {
|
|
196
|
+
idx = idx + 1 | 0;
|
|
138
197
|
}
|
|
198
|
+
if (idx === bs.length)
|
|
199
|
+
return buffer.w9() - idx | 0;
|
|
200
|
+
buffer.x9((buffer.w9() - idx | 0) + 1 | 0);
|
|
139
201
|
}
|
|
202
|
+
return -1;
|
|
140
203
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
204
|
+
function byteArrayPadStart(_this__u8e3s4, length, padByte) {
|
|
205
|
+
padByte = padByte === VOID ? 0 : padByte;
|
|
206
|
+
if (_this__u8e3s4.length >= length)
|
|
207
|
+
return copyOfRange(_this__u8e3s4, _this__u8e3s4.length - length | 0, _this__u8e3s4.length);
|
|
208
|
+
var buf = allocate(Companion_instance, length);
|
|
209
|
+
var inductionVariable = 0;
|
|
210
|
+
var last = length - _this__u8e3s4.length | 0;
|
|
211
|
+
if (inductionVariable < last)
|
|
212
|
+
do {
|
|
213
|
+
var i = inductionVariable;
|
|
214
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
215
|
+
buf.aa(i, padByte);
|
|
216
|
+
}
|
|
217
|
+
while (inductionVariable < last);
|
|
218
|
+
buf.x9(length - _this__u8e3s4.length | 0);
|
|
219
|
+
buf.ba(_this__u8e3s4);
|
|
220
|
+
buf.x9(0);
|
|
221
|
+
return buf.na(length);
|
|
222
|
+
}
|
|
223
|
+
function byteArrayPadEnd(_this__u8e3s4, length, padByte) {
|
|
224
|
+
padByte = padByte === VOID ? 0 : padByte;
|
|
225
|
+
if (_this__u8e3s4.length >= length)
|
|
226
|
+
return copyOfRange(_this__u8e3s4, 0, length);
|
|
227
|
+
var buf = allocate(Companion_instance, length);
|
|
228
|
+
buf.ba(_this__u8e3s4);
|
|
229
|
+
var inductionVariable = 0;
|
|
230
|
+
var last = length - _this__u8e3s4.length | 0;
|
|
231
|
+
if (inductionVariable < last)
|
|
232
|
+
do {
|
|
233
|
+
var i = inductionVariable;
|
|
234
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
235
|
+
buf.aa(i + _this__u8e3s4.length | 0, padByte);
|
|
236
|
+
}
|
|
237
|
+
while (inductionVariable < last);
|
|
238
|
+
buf.x9(0);
|
|
239
|
+
return buf.na(length);
|
|
171
240
|
}
|
|
172
|
-
function
|
|
173
|
-
var
|
|
241
|
+
function byteArrayGetBitRange(_this__u8e3s4, start, length) {
|
|
242
|
+
var buf = wrap(Companion_instance, _this__u8e3s4);
|
|
243
|
+
return getBitRange(buf, start, length);
|
|
244
|
+
}
|
|
245
|
+
function byteToBinString(_this__u8e3s4) {
|
|
174
246
|
// Inline function 'kotlin.toUByte' call
|
|
175
|
-
tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
176
|
-
return
|
|
247
|
+
var tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
248
|
+
return padStart(toString_0(tmp$ret$0, 2), 8, _Char___init__impl__6a9atx(48));
|
|
177
249
|
}
|
|
178
|
-
function
|
|
179
|
-
uppercase = uppercase === VOID ?
|
|
180
|
-
var tmp$ret$0;
|
|
250
|
+
function byteToHexString(_this__u8e3s4, uppercase) {
|
|
251
|
+
uppercase = uppercase === VOID ? true : uppercase;
|
|
181
252
|
// Inline function 'kotlin.toUByte' call
|
|
182
|
-
tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
183
|
-
var result =
|
|
253
|
+
var tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
254
|
+
var result = padStart(toString_0(tmp$ret$0, 16), 2, _Char___init__impl__6a9atx(48));
|
|
184
255
|
var tmp;
|
|
185
256
|
if (uppercase) {
|
|
186
257
|
// Inline function 'kotlin.text.uppercase' call
|
|
@@ -193,150 +264,215 @@
|
|
|
193
264
|
}
|
|
194
265
|
return tmp;
|
|
195
266
|
}
|
|
196
|
-
function
|
|
267
|
+
function byteToUnsignedInt(_this__u8e3s4) {
|
|
197
268
|
// Inline function 'kotlin.UByte.toInt' call
|
|
198
269
|
// Inline function 'kotlin.toUByte' call
|
|
199
|
-
var
|
|
200
|
-
return _UByte___get_data__impl__jof9qr(
|
|
201
|
-
}
|
|
202
|
-
function toByteArrayByCharArray(_this__u8e3s4) {
|
|
203
|
-
// Inline function 'kotlin.collections.mutableListOf' call
|
|
204
|
-
var byteList = ArrayList_init_$Create$();
|
|
205
|
-
var inductionVariable = 0;
|
|
206
|
-
var last = _this__u8e3s4.length;
|
|
207
|
-
while (inductionVariable < last) {
|
|
208
|
-
var char = _this__u8e3s4[inductionVariable];
|
|
209
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
210
|
-
var tmp$ret$1;
|
|
211
|
-
// Inline function 'kotlin.code' call
|
|
212
|
-
tmp$ret$1 = Char__toInt_impl_vasixd(char);
|
|
213
|
-
byteList.d(toByte(tmp$ret$1));
|
|
214
|
-
}
|
|
215
|
-
return toByteArray(byteList);
|
|
216
|
-
}
|
|
217
|
-
function encodeGBK(_this__u8e3s4) {
|
|
218
|
-
return encodeGBKDo(_this__u8e3s4);
|
|
219
|
-
}
|
|
220
|
-
function decodeGBK(_this__u8e3s4) {
|
|
221
|
-
return decodeGBKDo(_this__u8e3s4);
|
|
270
|
+
var this_0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
271
|
+
return _UByte___get_data__impl__jof9qr(this_0) & 255;
|
|
222
272
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
273
|
+
function byteGetBit(_this__u8e3s4, bitIndex) {
|
|
274
|
+
if (!(0 <= bitIndex ? bitIndex <= 7 : false))
|
|
275
|
+
throw IndexOutOfBoundsException_init_$Create$('bitIndex must be in 0..7');
|
|
276
|
+
return byteToUnsignedInt(_this__u8e3s4) >> bitIndex & 1;
|
|
225
277
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
278
|
+
function keep(_this__u8e3s4, maxDecimalCount) {
|
|
279
|
+
if (maxDecimalCount < 0)
|
|
280
|
+
throw IllegalArgumentException_init_$Create$('maxDecimalCount must be greater than or equal to 0');
|
|
281
|
+
var pointIndex = indexOf_0(_this__u8e3s4, '.');
|
|
282
|
+
var tmp;
|
|
283
|
+
if (pointIndex === -1) {
|
|
284
|
+
tmp = _this__u8e3s4;
|
|
285
|
+
} else if (maxDecimalCount === 0) {
|
|
286
|
+
// Inline function 'kotlin.text.substring' call
|
|
287
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
288
|
+
tmp = _this__u8e3s4.substring(0, pointIndex);
|
|
289
|
+
} else {
|
|
290
|
+
var decimalCount = (_this__u8e3s4.length - pointIndex | 0) - 1 | 0;
|
|
291
|
+
var tmp_0;
|
|
292
|
+
if (decimalCount > maxDecimalCount) {
|
|
293
|
+
// Inline function 'kotlin.text.substring' call
|
|
294
|
+
var endIndex = (pointIndex + maxDecimalCount | 0) + 1 | 0;
|
|
295
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
296
|
+
tmp_0 = _this__u8e3s4.substring(0, endIndex);
|
|
297
|
+
} else {
|
|
298
|
+
tmp_0 = _this__u8e3s4;
|
|
299
|
+
}
|
|
300
|
+
tmp = tmp_0;
|
|
301
|
+
}
|
|
302
|
+
return tmp;
|
|
228
303
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
304
|
+
function toByteArray(_this__u8e3s4, size) {
|
|
305
|
+
size = size === VOID ? 0 : size;
|
|
306
|
+
if (_this__u8e3s4 < 0)
|
|
307
|
+
throw IllegalArgumentException_init_$Create$('Int must be unsigned');
|
|
308
|
+
var hex = numberToString(_this__u8e3s4, 16);
|
|
309
|
+
var tmp;
|
|
310
|
+
if (size <= 0) {
|
|
311
|
+
// Inline function 'kotlin.math.ceil' call
|
|
312
|
+
var x = hex.length / 2.0;
|
|
313
|
+
var tmp$ret$0 = Math.ceil(x);
|
|
314
|
+
tmp = numberToInt(tmp$ret$0);
|
|
315
|
+
} else {
|
|
316
|
+
tmp = size;
|
|
317
|
+
}
|
|
318
|
+
var length = tmp;
|
|
319
|
+
return hexStringToByteArray(padStart(hex, imul(length, 2), _Char___init__impl__6a9atx(48)));
|
|
320
|
+
}
|
|
321
|
+
function toByteArray_0(_this__u8e3s4, size) {
|
|
322
|
+
size = size === VOID ? 0 : size;
|
|
323
|
+
if (_this__u8e3s4.y6(new Long(0, 0)) < 0)
|
|
324
|
+
throw IllegalArgumentException_init_$Create$('Long must be unsigned');
|
|
325
|
+
var hex = numberToString(_this__u8e3s4, 16);
|
|
326
|
+
var tmp;
|
|
327
|
+
if (size <= 0) {
|
|
328
|
+
// Inline function 'kotlin.math.ceil' call
|
|
329
|
+
var x = hex.length / 2.0;
|
|
330
|
+
var tmp$ret$0 = Math.ceil(x);
|
|
331
|
+
tmp = numberToInt(tmp$ret$0);
|
|
332
|
+
} else {
|
|
333
|
+
tmp = size;
|
|
334
|
+
}
|
|
335
|
+
var length = tmp;
|
|
336
|
+
return hexStringToByteArray(padStart(hex, imul(length, 2), _Char___init__impl__6a9atx(48)));
|
|
232
337
|
}
|
|
233
|
-
function
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
while (tmp0_iterator.g()) {
|
|
238
|
-
var c = tmp0_iterator.h().p2_1;
|
|
239
|
-
var tmp$ret$1;
|
|
240
|
-
// Inline function 'kotlin.code' call
|
|
241
|
-
tmp$ret$1 = Char__toInt_impl_vasixd(c);
|
|
242
|
-
var item = toString_1(tmp$ret$1, 16);
|
|
243
|
-
if (isNeedU) {
|
|
244
|
-
builder.o6('\\u');
|
|
245
|
-
}
|
|
246
|
-
builder.o6(fillLength(item, 4));
|
|
338
|
+
function getBitRange(_this__u8e3s4, start, length) {
|
|
339
|
+
if (length <= 0) {
|
|
340
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
341
|
+
return new Int8Array([]);
|
|
247
342
|
}
|
|
248
|
-
|
|
343
|
+
if (start < 0)
|
|
344
|
+
throw IllegalArgumentException_init_$Create$('start must be greater than 0');
|
|
345
|
+
if ((start + length | 0) > imul(_this__u8e3s4.la(), 8))
|
|
346
|
+
throw IllegalArgumentException_init_$Create$('start + offset must be less than capacity * 8');
|
|
347
|
+
var right = (8 - ((start + length | 0) % 8 | 0) | 0) % 8 | 0;
|
|
348
|
+
var left = (8 - (length % 8 | 0) | 0) % 8 | 0;
|
|
349
|
+
// Inline function 'kotlin.math.ceil' call
|
|
350
|
+
var x = length / 8.0;
|
|
351
|
+
var tmp$ret$1 = Math.ceil(x);
|
|
352
|
+
var resSize = numberToInt(tmp$ret$1);
|
|
353
|
+
var result = new Int8Array(resSize);
|
|
354
|
+
var startByteIdx = start / 8 | 0;
|
|
355
|
+
// Inline function 'kotlin.math.ceil' call
|
|
356
|
+
var x_0 = (start + length | 0) / 8.0;
|
|
357
|
+
var tmp$ret$2 = Math.ceil(x_0);
|
|
358
|
+
var endByteIdx = numberToInt(tmp$ret$2);
|
|
359
|
+
var buf = _this__u8e3s4;
|
|
360
|
+
var originSize = endByteIdx - startByteIdx | 0;
|
|
361
|
+
var idx = originSize - 1 | 0;
|
|
362
|
+
while ((resSize - (originSize - idx | 0) | 0) >= 0) {
|
|
363
|
+
var temp = byteToUnsignedInt(buf.t(idx + startByteIdx | 0)) >> right;
|
|
364
|
+
if (idx > 0)
|
|
365
|
+
temp = temp | byteToUnsignedInt(buf.t((idx + startByteIdx | 0) - 1 | 0)) << (8 - right | 0);
|
|
366
|
+
result[resSize - (originSize - idx | 0) | 0] = toByte(temp);
|
|
367
|
+
idx = idx - 1 | 0;
|
|
368
|
+
}
|
|
369
|
+
result[0] = toByte((byteToUnsignedInt(result[0]) << left & 255) >> left);
|
|
370
|
+
return result;
|
|
249
371
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
372
|
+
function binStringToByte(_this__u8e3s4) {
|
|
373
|
+
var value = keepByRegexStr(_this__u8e3s4, '[01]+');
|
|
374
|
+
var str = padStart(value, 8, _Char___init__impl__6a9atx(48));
|
|
375
|
+
return toByte(toInt(str, 2));
|
|
252
376
|
}
|
|
253
|
-
function
|
|
254
|
-
var value =
|
|
255
|
-
// Inline function 'kotlin.text.
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return
|
|
260
|
-
var builder = StringBuilder_init_$Create$();
|
|
261
|
-
var str = value;
|
|
262
|
-
if (!((value.length % 4 | 0) === 0)) {
|
|
263
|
-
str = fillLength(value, imul((value.length / 4 | 0) + 1 | 0, 4), _Char___init__impl__6a9atx(48), false);
|
|
377
|
+
function binStringToByteArray(_this__u8e3s4) {
|
|
378
|
+
var value = keepByRegexStr(_this__u8e3s4, '[01]+');
|
|
379
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
380
|
+
var this_0 = value;
|
|
381
|
+
if (charSequenceLength(this_0) === 0) {
|
|
382
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
383
|
+
return new Int8Array([]);
|
|
264
384
|
}
|
|
265
|
-
|
|
385
|
+
// Inline function 'kotlin.math.ceil' call
|
|
386
|
+
var x = value.length / 8.0;
|
|
387
|
+
var tmp$ret$2 = Math.ceil(x);
|
|
388
|
+
var length = numberToInt(tmp$ret$2);
|
|
389
|
+
value = padStart(value, imul(length, 8), _Char___init__impl__6a9atx(48));
|
|
390
|
+
var result = new Int8Array(length);
|
|
266
391
|
var inductionVariable = 0;
|
|
267
|
-
|
|
268
|
-
if (inductionVariable <= last)
|
|
392
|
+
if (inductionVariable < length)
|
|
269
393
|
do {
|
|
270
394
|
var i = inductionVariable;
|
|
271
|
-
inductionVariable = inductionVariable +
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (!(data === 0)) {
|
|
280
|
-
builder.q2(numberToChar(data));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
395
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
396
|
+
// Inline function 'kotlin.text.substring' call
|
|
397
|
+
var this_1 = value;
|
|
398
|
+
var startIndex = imul(i, 8);
|
|
399
|
+
var endIndex = imul(i, 8) + 8 | 0;
|
|
400
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
401
|
+
var tmp$ret$4 = this_1.substring(startIndex, endIndex);
|
|
402
|
+
result[i] = binStringToByte(tmp$ret$4);
|
|
283
403
|
}
|
|
284
|
-
while (
|
|
285
|
-
return
|
|
404
|
+
while (inductionVariable < length);
|
|
405
|
+
return result;
|
|
286
406
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
407
|
+
function hexStringToByte(_this__u8e3s4) {
|
|
408
|
+
var value = keepByRegexStr(_this__u8e3s4, '[A-Fa-f0-9]+');
|
|
409
|
+
var str = padStart(value, 2, _Char___init__impl__6a9atx(48));
|
|
410
|
+
return hexToByte(str);
|
|
289
411
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
var
|
|
294
|
-
if (
|
|
295
|
-
|
|
296
|
-
|
|
412
|
+
function hexStringToByteArray(_this__u8e3s4) {
|
|
413
|
+
var value = keepByRegexStr(_this__u8e3s4, '[A-Fa-f0-9]+');
|
|
414
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
415
|
+
var this_0 = value;
|
|
416
|
+
if (charSequenceLength(this_0) === 0) {
|
|
417
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
418
|
+
return new Int8Array([]);
|
|
419
|
+
}
|
|
420
|
+
// Inline function 'kotlin.math.ceil' call
|
|
421
|
+
var x = value.length / 2.0;
|
|
422
|
+
var tmp$ret$2 = Math.ceil(x);
|
|
423
|
+
var length = numberToInt(tmp$ret$2);
|
|
424
|
+
value = padStart(value, imul(length, 2), _Char___init__impl__6a9atx(48));
|
|
425
|
+
return hexToByteArray(value);
|
|
426
|
+
}
|
|
427
|
+
function getStringByteLength(_this__u8e3s4) {
|
|
428
|
+
var length = 0;
|
|
297
429
|
// Inline function 'kotlin.collections.iterator' call
|
|
298
430
|
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
299
|
-
while (tmp0_iterator.
|
|
300
|
-
var
|
|
301
|
-
var tmp$ret$2;
|
|
431
|
+
while (tmp0_iterator.r()) {
|
|
432
|
+
var i = tmp0_iterator.s().x5_1;
|
|
302
433
|
// Inline function 'kotlin.code' call
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
434
|
+
var ascii = Char__toInt_impl_vasixd(i);
|
|
435
|
+
if (0 <= ascii ? ascii <= 255 : false) {
|
|
436
|
+
length = length + 1 | 0;
|
|
437
|
+
} else
|
|
438
|
+
length = length + 2 | 0;
|
|
306
439
|
}
|
|
307
|
-
return
|
|
440
|
+
return length;
|
|
308
441
|
}
|
|
309
|
-
function
|
|
310
|
-
var
|
|
311
|
-
// Inline function 'kotlin.text.
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
442
|
+
function getStringFirstUpperCase(_this__u8e3s4) {
|
|
443
|
+
var tmp;
|
|
444
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
445
|
+
if (charSequenceLength(_this__u8e3s4) === 0) {
|
|
446
|
+
tmp = '';
|
|
447
|
+
} else {
|
|
448
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
449
|
+
var this_0 = charSequenceGet(_this__u8e3s4, 0);
|
|
450
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
451
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
452
|
+
tmp = toString_1(this_0).toUpperCase();
|
|
320
453
|
}
|
|
321
|
-
|
|
454
|
+
return tmp;
|
|
455
|
+
}
|
|
456
|
+
function stringToFullWidthString(_this__u8e3s4) {
|
|
457
|
+
var sb = StringBuilder_init_$Create$();
|
|
322
458
|
var inductionVariable = 0;
|
|
323
|
-
var last =
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
459
|
+
var last = _this__u8e3s4.length;
|
|
460
|
+
while (inductionVariable < last) {
|
|
461
|
+
var c = charSequenceGet(_this__u8e3s4, inductionVariable);
|
|
462
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
463
|
+
// Inline function 'kotlin.code' call
|
|
464
|
+
var tmp1_subject = Char__toInt_impl_vasixd(c);
|
|
465
|
+
if (33 <= tmp1_subject ? tmp1_subject <= 126 : false) {
|
|
466
|
+
// Inline function 'kotlin.code' call
|
|
467
|
+
var tmp$ret$1 = Char__toInt_impl_vasixd(c);
|
|
468
|
+
sb.g3(numberToChar(tmp$ret$1 + 65248 | 0));
|
|
469
|
+
} else if (tmp1_subject === 32) {
|
|
470
|
+
sb.f3('\u3000');
|
|
471
|
+
} else {
|
|
472
|
+
sb.g3(c);
|
|
334
473
|
}
|
|
335
|
-
|
|
336
|
-
return
|
|
337
|
-
}
|
|
338
|
-
function decodeASCIIByByteArray(_this__u8e3s4) {
|
|
339
|
-
return decodeASCII(toHexString(_this__u8e3s4));
|
|
474
|
+
}
|
|
475
|
+
return sb.toString();
|
|
340
476
|
}
|
|
341
477
|
var ChecksumType_AND_instance;
|
|
342
478
|
var ChecksumType_OR_instance;
|
|
@@ -354,14 +490,14 @@
|
|
|
354
490
|
return ChecksumType_XOR_getInstance();
|
|
355
491
|
default:
|
|
356
492
|
ChecksumType_initEntries();
|
|
357
|
-
|
|
493
|
+
THROW_IAE('No enum constant value.');
|
|
358
494
|
break;
|
|
359
495
|
}
|
|
360
496
|
}
|
|
361
497
|
var ChecksumType_entriesInitialized;
|
|
362
498
|
function ChecksumType_initEntries() {
|
|
363
499
|
if (ChecksumType_entriesInitialized)
|
|
364
|
-
return
|
|
500
|
+
return Unit_instance;
|
|
365
501
|
ChecksumType_entriesInitialized = true;
|
|
366
502
|
ChecksumType_AND_instance = new ChecksumType('AND', 0);
|
|
367
503
|
ChecksumType_OR_instance = new ChecksumType('OR', 1);
|
|
@@ -378,34 +514,38 @@
|
|
|
378
514
|
var num = getChecksum(_this__u8e3s4, type, 0, end);
|
|
379
515
|
return num === _this__u8e3s4[end];
|
|
380
516
|
}
|
|
381
|
-
function getChecksum(_this__u8e3s4, type, start,
|
|
517
|
+
function getChecksum(_this__u8e3s4, type, start, length) {
|
|
382
518
|
type = type === VOID ? ChecksumType_XOR_getInstance() : type;
|
|
383
519
|
start = start === VOID ? 0 : start;
|
|
384
|
-
|
|
520
|
+
length = length === VOID ? _this__u8e3s4.length - start | 0 : length;
|
|
385
521
|
var num = 0;
|
|
522
|
+
// Inline function 'kotlin.math.min' call
|
|
523
|
+
var a = start + length | 0;
|
|
524
|
+
var b = _this__u8e3s4.length;
|
|
525
|
+
var end = Math.min(a, b);
|
|
386
526
|
var inductionVariable = start;
|
|
387
527
|
if (inductionVariable < end)
|
|
388
528
|
do {
|
|
389
529
|
var i = inductionVariable;
|
|
390
530
|
inductionVariable = inductionVariable + 1 | 0;
|
|
391
531
|
var tmp;
|
|
392
|
-
switch (type.
|
|
532
|
+
switch (type.l6_1) {
|
|
393
533
|
case 0:
|
|
394
534
|
tmp = toByte(num + _this__u8e3s4[i]);
|
|
395
535
|
break;
|
|
396
536
|
case 1:
|
|
397
537
|
// Inline function 'kotlin.experimental.or' call
|
|
398
538
|
|
|
399
|
-
var
|
|
400
|
-
var
|
|
401
|
-
tmp = toByte(
|
|
539
|
+
var this_0 = num;
|
|
540
|
+
var other = _this__u8e3s4[i];
|
|
541
|
+
tmp = toByte(this_0 | other);
|
|
402
542
|
break;
|
|
403
543
|
case 2:
|
|
404
544
|
// Inline function 'kotlin.experimental.xor' call
|
|
405
545
|
|
|
406
|
-
var
|
|
407
|
-
var
|
|
408
|
-
tmp = toByte(
|
|
546
|
+
var this_1 = num;
|
|
547
|
+
var other_0 = _this__u8e3s4[i];
|
|
548
|
+
tmp = toByte(this_1 ^ other_0);
|
|
409
549
|
break;
|
|
410
550
|
default:
|
|
411
551
|
noWhenBranchMatchedException();
|
|
@@ -419,11 +559,11 @@
|
|
|
419
559
|
function addChecksum(_this__u8e3s4, type) {
|
|
420
560
|
type = type === VOID ? ChecksumType_XOR_getInstance() : type;
|
|
421
561
|
// Inline function 'kotlin.collections.plus' call
|
|
422
|
-
var
|
|
562
|
+
var element = getChecksum(_this__u8e3s4, type);
|
|
423
563
|
// Inline function 'kotlin.collections.plus' call
|
|
424
564
|
// Inline function 'kotlin.byteArrayOf' call
|
|
425
|
-
var
|
|
426
|
-
return primitiveArrayConcat([_this__u8e3s4,
|
|
565
|
+
var elements = new Int8Array([element]);
|
|
566
|
+
return primitiveArrayConcat([_this__u8e3s4, elements]);
|
|
427
567
|
}
|
|
428
568
|
function ChecksumType_AND_getInstance() {
|
|
429
569
|
ChecksumType_initEntries();
|
|
@@ -437,55 +577,88 @@
|
|
|
437
577
|
ChecksumType_initEntries();
|
|
438
578
|
return ChecksumType_XOR_instance;
|
|
439
579
|
}
|
|
440
|
-
function
|
|
441
|
-
|
|
580
|
+
function isDarkColor(color) {
|
|
581
|
+
var rgb = getRgbValueArrayFromHexColorString(color);
|
|
582
|
+
return rgb[0] * 8.337E-4 + rgb[1] * 0.0028047 + rgb[2] * 2.831E-4 <= 0.5;
|
|
583
|
+
}
|
|
584
|
+
function getNextLevelColor(color, level) {
|
|
585
|
+
var target = level > 0.0 ? '#FFFFFF' : '#000000';
|
|
586
|
+
// Inline function 'kotlin.math.abs' call
|
|
587
|
+
var tmp$ret$0 = Math.abs(level);
|
|
588
|
+
return getMiddleColor(color, target, tmp$ret$0);
|
|
589
|
+
}
|
|
590
|
+
function getMiddleColor(color1, color2, present) {
|
|
591
|
+
var startColorNumbers = getRgbValueArrayFromHexColorString(color1);
|
|
592
|
+
var endColorNumbers = getRgbValueArrayFromHexColorString(color2);
|
|
593
|
+
var redRange = endColorNumbers[0] - startColorNumbers[0] | 0;
|
|
594
|
+
var greenRange = endColorNumbers[1] - startColorNumbers[1] | 0;
|
|
595
|
+
var blueRange = endColorNumbers[2] - startColorNumbers[2] | 0;
|
|
596
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
597
|
+
var this_0 = redRange * present;
|
|
598
|
+
var red = roundToInt(this_0) + startColorNumbers[0] | 0;
|
|
599
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
600
|
+
var this_1 = greenRange * present;
|
|
601
|
+
var green = roundToInt(this_1) + startColorNumbers[1] | 0;
|
|
602
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
603
|
+
var this_2 = blueRange * present;
|
|
604
|
+
var blue = roundToInt(this_2) + startColorNumbers[2] | 0;
|
|
605
|
+
// Inline function 'kotlin.arrayOf' call
|
|
606
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
607
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
608
|
+
var tmp$ret$5 = [red, green, blue];
|
|
609
|
+
return getHexColorStringFromRgbValueArray(tmp$ret$5);
|
|
442
610
|
}
|
|
443
|
-
function
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
var decimalCount = (_this__u8e3s4.length - pointIndex | 0) - 1 | 0;
|
|
450
|
-
var tmp_0;
|
|
451
|
-
if (decimalCount > maxDecimalCount) {
|
|
452
|
-
// Inline function 'kotlin.text.substring' call
|
|
453
|
-
var tmp0_substring = (pointIndex + maxDecimalCount | 0) + 1 | 0;
|
|
454
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
455
|
-
tmp_0 = _this__u8e3s4.substring(0, tmp0_substring);
|
|
456
|
-
} else {
|
|
457
|
-
tmp_0 = _this__u8e3s4;
|
|
458
|
-
}
|
|
459
|
-
tmp = tmp_0;
|
|
611
|
+
function getRgbValueArrayFromHexColorString(str) {
|
|
612
|
+
if (!get_colorRegex().o4(str)) {
|
|
613
|
+
// Inline function 'kotlin.arrayOf' call
|
|
614
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
615
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
616
|
+
return [0, 0, 0];
|
|
460
617
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
618
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
619
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
620
|
+
var hexColor = str.toLowerCase();
|
|
621
|
+
if (str.length === 4) {
|
|
622
|
+
var t = '#';
|
|
623
|
+
var inductionVariable = 1;
|
|
624
|
+
var last = hexColor.length;
|
|
625
|
+
if (inductionVariable < last)
|
|
626
|
+
do {
|
|
627
|
+
var i = inductionVariable;
|
|
628
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
629
|
+
t = t + (toString_1(charSequenceGet(hexColor, i)) + toString_1(charSequenceGet(hexColor, i)));
|
|
630
|
+
}
|
|
631
|
+
while (inductionVariable < last);
|
|
632
|
+
hexColor = t;
|
|
476
633
|
}
|
|
477
|
-
|
|
634
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
635
|
+
var arr = ArrayList_init_$Create$();
|
|
636
|
+
var progression = step(until(1, hexColor.length), 2);
|
|
637
|
+
var inductionVariable_0 = progression.u5_1;
|
|
638
|
+
var last_0 = progression.v5_1;
|
|
639
|
+
var step_0 = progression.w5_1;
|
|
640
|
+
if ((step_0 > 0 ? inductionVariable_0 <= last_0 : false) ? true : step_0 < 0 ? last_0 <= inductionVariable_0 : false)
|
|
641
|
+
do {
|
|
642
|
+
var i_0 = inductionVariable_0;
|
|
643
|
+
inductionVariable_0 = inductionVariable_0 + step_0 | 0;
|
|
644
|
+
var s = slice(hexColor, until(i_0, i_0 + 2 | 0));
|
|
645
|
+
// Inline function 'kotlin.UInt.toInt' call
|
|
646
|
+
var this_0 = toUInt(s, 16);
|
|
647
|
+
var tmp$ret$6 = _UInt___get_data__impl__f0vqqw(this_0);
|
|
648
|
+
arr.h(tmp$ret$6);
|
|
649
|
+
}
|
|
650
|
+
while (!(i_0 === last_0));
|
|
651
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
652
|
+
return copyToArray(arr);
|
|
478
653
|
}
|
|
479
|
-
function
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
return toByteArrayFromHex(hex);
|
|
654
|
+
function getHexColorStringFromRgbValueArray(rgb) {
|
|
655
|
+
if (!(rgb.length === 3))
|
|
656
|
+
return '#000000';
|
|
657
|
+
var getHex = getHexColorStringFromRgbValueArray$lambda;
|
|
658
|
+
return '#' + getHex(rgb[0]) + getHex(rgb[1]) + getHex(rgb[2]);
|
|
485
659
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
488
|
-
return toPinYinDo(_this__u8e3s4, separator);
|
|
660
|
+
function getHexColorStringFromRgbValueArray$lambda(num) {
|
|
661
|
+
return padStart(toString_2(num, 16), 2, _Char___init__impl__6a9atx(48));
|
|
489
662
|
}
|
|
490
663
|
function get_numberRegex() {
|
|
491
664
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
@@ -522,84 +695,94 @@
|
|
|
522
695
|
return chSymbolRegex;
|
|
523
696
|
}
|
|
524
697
|
var chSymbolRegex;
|
|
698
|
+
function get_idCardRegex() {
|
|
699
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
700
|
+
return idCardRegex;
|
|
701
|
+
}
|
|
702
|
+
var idCardRegex;
|
|
703
|
+
function get_mobileNumberRegex() {
|
|
704
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
705
|
+
return mobileNumberRegex;
|
|
706
|
+
}
|
|
707
|
+
var mobileNumberRegex;
|
|
708
|
+
function get_emailRegex() {
|
|
709
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
710
|
+
return emailRegex;
|
|
711
|
+
}
|
|
712
|
+
var emailRegex;
|
|
713
|
+
function get_colorRegex() {
|
|
714
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
715
|
+
return colorRegex;
|
|
716
|
+
}
|
|
717
|
+
var colorRegex;
|
|
525
718
|
function keepByRegexStr(_this__u8e3s4, regStr) {
|
|
526
719
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
527
|
-
var tmp$ret$0;
|
|
528
720
|
// Inline function 'kotlin.text.toRegex' call
|
|
529
|
-
tmp$ret$0 = Regex_init_$Create$(regStr);
|
|
721
|
+
var tmp$ret$0 = Regex_init_$Create$(regStr);
|
|
530
722
|
return keep_0(_this__u8e3s4, tmp$ret$0);
|
|
531
723
|
}
|
|
532
724
|
function filterByRegexStr(_this__u8e3s4, regStr) {
|
|
533
725
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
534
|
-
var tmp$ret$0;
|
|
535
726
|
// Inline function 'kotlin.text.toRegex' call
|
|
536
|
-
tmp$ret$0 = Regex_init_$Create$(regStr);
|
|
727
|
+
var tmp$ret$0 = Regex_init_$Create$(regStr);
|
|
537
728
|
return filter(_this__u8e3s4, tmp$ret$0);
|
|
538
729
|
}
|
|
539
730
|
function isIdCard(_this__u8e3s4) {
|
|
540
731
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
541
|
-
|
|
542
|
-
return Regex_init_$Create$('(^\\d{15}$)|(^\\d{17}([0-9]|X)$)').a7(_this__u8e3s4);
|
|
732
|
+
return get_idCardRegex().o4(_this__u8e3s4);
|
|
543
733
|
}
|
|
544
734
|
function isMobileNumber(_this__u8e3s4) {
|
|
545
735
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
546
|
-
|
|
547
|
-
return Regex_init_$Create$('^1[1-9]\\d{9}$').a7(_this__u8e3s4);
|
|
736
|
+
return get_mobileNumberRegex().o4(_this__u8e3s4);
|
|
548
737
|
}
|
|
549
738
|
function isEmail(_this__u8e3s4) {
|
|
550
739
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
551
|
-
|
|
552
|
-
return Regex_init_$Create$('^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$').a7(_this__u8e3s4);
|
|
740
|
+
return get_emailRegex().o4(_this__u8e3s4);
|
|
553
741
|
}
|
|
554
742
|
function isOnlyChEnNum(_this__u8e3s4) {
|
|
555
743
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
556
|
-
return get_chEnNumRegex().
|
|
744
|
+
return get_chEnNumRegex().o4(_this__u8e3s4);
|
|
557
745
|
}
|
|
558
746
|
function isOnlyEnNum(_this__u8e3s4) {
|
|
559
747
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
560
|
-
return get_numEnRegex().
|
|
748
|
+
return get_numEnRegex().o4(_this__u8e3s4);
|
|
561
749
|
}
|
|
562
750
|
function isOnlyChinese(_this__u8e3s4) {
|
|
563
751
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
564
|
-
return get_chineseRegex().
|
|
752
|
+
return get_chineseRegex().o4(_this__u8e3s4);
|
|
565
753
|
}
|
|
566
754
|
function isOnlyLetter(_this__u8e3s4) {
|
|
567
755
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
568
|
-
return get_letterRegex().
|
|
756
|
+
return get_letterRegex().o4(_this__u8e3s4);
|
|
569
757
|
}
|
|
570
758
|
function isOnlyNumber(_this__u8e3s4) {
|
|
571
759
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
572
|
-
return get_numberRegex().
|
|
760
|
+
return get_numberRegex().o4(_this__u8e3s4);
|
|
573
761
|
}
|
|
574
762
|
function isOnlyCode(_this__u8e3s4) {
|
|
575
763
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
576
|
-
return get_codeRegex().
|
|
764
|
+
return get_codeRegex().o4(_this__u8e3s4);
|
|
577
765
|
}
|
|
578
766
|
function isOnlyChSymbol(_this__u8e3s4) {
|
|
579
767
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
580
|
-
return get_chSymbolRegex().
|
|
768
|
+
return get_chSymbolRegex().o4(_this__u8e3s4);
|
|
769
|
+
}
|
|
770
|
+
function isColor(_this__u8e3s4) {
|
|
771
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
772
|
+
return get_colorRegex().o4(_this__u8e3s4);
|
|
581
773
|
}
|
|
582
774
|
function keep_0(_this__u8e3s4, reg) {
|
|
583
775
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
584
|
-
var tmp = reg.
|
|
585
|
-
|
|
586
|
-
var text = new StringBuilder('');
|
|
587
|
-
// Inline function 'kotlin.sequences.forEach' call
|
|
588
|
-
var tmp0_iterator = ls.f();
|
|
589
|
-
while (tmp0_iterator.g()) {
|
|
590
|
-
var element = tmp0_iterator.h();
|
|
591
|
-
// Inline function 'com.d10ng.common.keep.<anonymous>' call
|
|
592
|
-
text.o6(element);
|
|
593
|
-
}
|
|
594
|
-
return text.toString();
|
|
776
|
+
var tmp = reg.r4(_this__u8e3s4);
|
|
777
|
+
return joinToString(map(tmp, keep$lambda), '');
|
|
595
778
|
}
|
|
596
779
|
function filter(_this__u8e3s4, reg) {
|
|
597
780
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
598
|
-
return reg.
|
|
781
|
+
return reg.s4(_this__u8e3s4, '');
|
|
599
782
|
}
|
|
600
783
|
function keep$lambda(it) {
|
|
601
784
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
602
|
-
return it.
|
|
785
|
+
return it.k3();
|
|
603
786
|
}
|
|
604
787
|
var properties_initialized_RegexUtils_kt_8e1sdo;
|
|
605
788
|
function _init_properties_RegexUtils_kt__b9v9ti() {
|
|
@@ -608,87 +791,1620 @@
|
|
|
608
791
|
// Inline function 'kotlin.text.toRegex' call
|
|
609
792
|
numberRegex = Regex_init_$Create$('[0-9]+');
|
|
610
793
|
// Inline function 'kotlin.text.toRegex' call
|
|
611
|
-
|
|
794
|
+
var this_0 = '[a-zA-Z]+';
|
|
795
|
+
letterRegex = Regex_init_$Create$(this_0);
|
|
796
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
797
|
+
var this_1 = '[a-zA-Z0-9]+';
|
|
798
|
+
numEnRegex = Regex_init_$Create$(this_1);
|
|
799
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
800
|
+
var this_2 = '[a-fA-F0-9]+';
|
|
801
|
+
codeRegex = Regex_init_$Create$(this_2);
|
|
802
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
803
|
+
var this_3 = '[\u4E00-\u9FA5]+';
|
|
804
|
+
chineseRegex = Regex_init_$Create$(this_3);
|
|
612
805
|
// Inline function 'kotlin.text.toRegex' call
|
|
613
|
-
|
|
806
|
+
var this_4 = '[a-zA-Z0-9\u4E00-\u9FA5]+';
|
|
807
|
+
chEnNumRegex = Regex_init_$Create$(this_4);
|
|
614
808
|
// Inline function 'kotlin.text.toRegex' call
|
|
615
|
-
|
|
809
|
+
var this_5 = '[\xA4\xA7-\xA8\xB0-\xB1\xB7\xD7\xE0-\xE1\xE8-\xEA\xEC-\xED\xF2-\xF3\xF7\xF9-\xFA\xFC\u0101\u0113\u011B\u012B\u0144\u0148\u014D\u016B\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u0251\u0261\u02C7\u02C9\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C1\u03C3-\u03C9\u0401\u0410-\u044F\u0451\u2014\u2016\u2018-\u2019\u201C-\u201D\u2026\u2030\u2032-\u2033\u203B\u20AC\u2103\u2116\u2160-\u216B\u2170-\u2179\u2190-\u2193\u2208\u220F\u2211\u221A\u221D-\u221E\u2220\u2225\u2227-\u222B\u222E\u2234-\u2237\u223D\u2248\u224C\u2260-\u2261\u2264-\u2265\u226E-\u226F\u2299\u22A5\u2312\u2460-\u2469\u2474-\u249B\u2500-\u254B\u25A0-\u25A1\u25B2-\u25B3\u25C6-\u25C7\u25CB\u25CE-\u25CF\u2605-\u2606\u2640\u2642\u3000-\u3003\u3005\u3008-\u3011\u3013-\u3017\u3041-\u3093\u30A1-\u30F6\u3105-\u3129\u3220-\u3229\uE766-\uE76B\uE76D-\uE7BB\uE7C7-\uE7E1\uE7FE-\uE80F\uFE31\uFE33-\uFE44\uFF01-\uFF5E\uFFE0-\uFFE1\uFFE3\uFFE5\uFF00-\uFFFF\u4E00-\u9FA5]+';
|
|
810
|
+
chSymbolRegex = Regex_init_$Create$(this_5);
|
|
616
811
|
// Inline function 'kotlin.text.toRegex' call
|
|
617
|
-
|
|
812
|
+
var this_6 = '^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[0-9Xx]$';
|
|
813
|
+
idCardRegex = Regex_init_$Create$(this_6);
|
|
618
814
|
// Inline function 'kotlin.text.toRegex' call
|
|
619
|
-
|
|
815
|
+
var this_7 = '^1[1-9]\\d{9}$';
|
|
816
|
+
mobileNumberRegex = Regex_init_$Create$(this_7);
|
|
620
817
|
// Inline function 'kotlin.text.toRegex' call
|
|
621
|
-
|
|
818
|
+
var this_8 = '^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(?:\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$';
|
|
819
|
+
emailRegex = Regex_init_$Create$(this_8);
|
|
820
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
821
|
+
var this_9 = '^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$';
|
|
822
|
+
colorRegex = Regex_init_$Create$(this_9);
|
|
622
823
|
}
|
|
623
824
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
if (!isMatch)
|
|
630
|
-
return 0;
|
|
631
|
-
var str = fillLength(value, 8);
|
|
632
|
-
return toByte(toInt(str, 2));
|
|
825
|
+
function Coordinate(lat, lng) {
|
|
826
|
+
lat = lat === VOID ? 0.0 : lat;
|
|
827
|
+
lng = lng === VOID ? 0.0 : lng;
|
|
828
|
+
this.lat = lat;
|
|
829
|
+
this.lng = lng;
|
|
633
830
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
831
|
+
protoOf(Coordinate).qa = function (_set____db54di) {
|
|
832
|
+
this.lat = _set____db54di;
|
|
833
|
+
};
|
|
834
|
+
protoOf(Coordinate).ra = function () {
|
|
835
|
+
return this.lat;
|
|
836
|
+
};
|
|
837
|
+
protoOf(Coordinate).sa = function (_set____db54di) {
|
|
838
|
+
this.lng = _set____db54di;
|
|
839
|
+
};
|
|
840
|
+
protoOf(Coordinate).ta = function () {
|
|
841
|
+
return this.lng;
|
|
842
|
+
};
|
|
843
|
+
protoOf(Coordinate).ua = function () {
|
|
844
|
+
return this.lat;
|
|
845
|
+
};
|
|
846
|
+
protoOf(Coordinate).va = function () {
|
|
847
|
+
return this.lng;
|
|
848
|
+
};
|
|
849
|
+
protoOf(Coordinate).wa = function (lat, lng) {
|
|
850
|
+
return new Coordinate(lat, lng);
|
|
851
|
+
};
|
|
852
|
+
protoOf(Coordinate).copy = function (lat, lng, $super) {
|
|
853
|
+
lat = lat === VOID ? this.lat : lat;
|
|
854
|
+
lng = lng === VOID ? this.lng : lng;
|
|
855
|
+
return this.wa(lat, lng);
|
|
856
|
+
};
|
|
857
|
+
protoOf(Coordinate).toString = function () {
|
|
858
|
+
return 'Coordinate(lat=' + this.lat + ', lng=' + this.lng + ')';
|
|
859
|
+
};
|
|
860
|
+
protoOf(Coordinate).hashCode = function () {
|
|
861
|
+
var result = getNumberHashCode(this.lat);
|
|
862
|
+
result = imul(result, 31) + getNumberHashCode(this.lng) | 0;
|
|
863
|
+
return result;
|
|
864
|
+
};
|
|
865
|
+
protoOf(Coordinate).equals = function (other) {
|
|
866
|
+
if (this === other)
|
|
867
|
+
return true;
|
|
868
|
+
if (!(other instanceof Coordinate))
|
|
869
|
+
return false;
|
|
870
|
+
var tmp0_other_with_cast = other instanceof Coordinate ? other : THROW_CCE();
|
|
871
|
+
if (!equals(this.lat, tmp0_other_with_cast.lat))
|
|
872
|
+
return false;
|
|
873
|
+
if (!equals(this.lng, tmp0_other_with_cast.lng))
|
|
874
|
+
return false;
|
|
875
|
+
return true;
|
|
876
|
+
};
|
|
877
|
+
function transformLat($this, lng, lat) {
|
|
878
|
+
var tmp = -100 + 2 * lng + 3 * lat + 0.2 * lat * lat + 0.1 * lng * lat;
|
|
879
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
880
|
+
// Inline function 'kotlin.math.abs' call
|
|
881
|
+
var x = Math.abs(lng);
|
|
882
|
+
var ret = tmp + 0.2 * Math.sqrt(x);
|
|
883
|
+
var tmp_0 = ret;
|
|
884
|
+
// Inline function 'kotlin.math.sin' call
|
|
885
|
+
var x_0 = 6 * lng * get_PI();
|
|
886
|
+
var tmp_1 = 20 * Math.sin(x_0);
|
|
887
|
+
// Inline function 'kotlin.math.sin' call
|
|
888
|
+
var x_1 = 2 * lng * get_PI();
|
|
889
|
+
ret = tmp_0 + (tmp_1 + 20 * Math.sin(x_1)) * 2 / 3;
|
|
890
|
+
var tmp_2 = ret;
|
|
891
|
+
// Inline function 'kotlin.math.sin' call
|
|
892
|
+
var x_2 = lat * get_PI();
|
|
893
|
+
var tmp_3 = 20 * Math.sin(x_2);
|
|
894
|
+
// Inline function 'kotlin.math.sin' call
|
|
895
|
+
var x_3 = lat / 3.0 * get_PI();
|
|
896
|
+
ret = tmp_2 + (tmp_3 + 40 * Math.sin(x_3)) * 2 / 3;
|
|
897
|
+
var tmp_4 = ret;
|
|
898
|
+
// Inline function 'kotlin.math.sin' call
|
|
899
|
+
var x_4 = lat / 12 * get_PI();
|
|
900
|
+
var tmp_5 = 160 * Math.sin(x_4);
|
|
901
|
+
// Inline function 'kotlin.math.sin' call
|
|
902
|
+
var x_5 = lat * get_PI() / 30;
|
|
903
|
+
ret = tmp_4 + (tmp_5 + 320 * Math.sin(x_5)) * 2 / 3;
|
|
904
|
+
return ret;
|
|
905
|
+
}
|
|
906
|
+
function transformLng($this, lng, lat) {
|
|
907
|
+
var tmp = 300 + lng + 2 * lat + 0.1 * lng * lng + 0.1 * lng * lat;
|
|
908
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
909
|
+
// Inline function 'kotlin.math.abs' call
|
|
910
|
+
var x = Math.abs(lng);
|
|
911
|
+
var ret = tmp + 0.1 * Math.sqrt(x);
|
|
912
|
+
var tmp_0 = ret;
|
|
913
|
+
// Inline function 'kotlin.math.sin' call
|
|
914
|
+
var x_0 = 6 * lng * get_PI();
|
|
915
|
+
var tmp_1 = 20 * Math.sin(x_0);
|
|
916
|
+
// Inline function 'kotlin.math.sin' call
|
|
917
|
+
var x_1 = 2 * lng * get_PI();
|
|
918
|
+
ret = tmp_0 + (tmp_1 + 20 * Math.sin(x_1)) * 2 / 3;
|
|
919
|
+
var tmp_2 = ret;
|
|
920
|
+
// Inline function 'kotlin.math.sin' call
|
|
921
|
+
var x_2 = lng * get_PI();
|
|
922
|
+
var tmp_3 = 20 * Math.sin(x_2);
|
|
923
|
+
// Inline function 'kotlin.math.sin' call
|
|
924
|
+
var x_3 = lng / 3 * get_PI();
|
|
925
|
+
ret = tmp_2 + (tmp_3 + 40 * Math.sin(x_3)) * 2 / 3;
|
|
926
|
+
var tmp_4 = ret;
|
|
927
|
+
// Inline function 'kotlin.math.sin' call
|
|
928
|
+
var x_4 = lng / 12 * get_PI();
|
|
929
|
+
var tmp_5 = 150 * Math.sin(x_4);
|
|
930
|
+
// Inline function 'kotlin.math.sin' call
|
|
931
|
+
var x_5 = lng / 30 * get_PI();
|
|
932
|
+
ret = tmp_4 + (tmp_5 + 300 * Math.sin(x_5)) * 2 / 3;
|
|
933
|
+
return ret;
|
|
934
|
+
}
|
|
935
|
+
function outOfChina($this, lng, lat) {
|
|
936
|
+
return ((lng < 72.004 ? true : lng > 137.8347) ? true : lat < 0.8293) ? true : lat > 55.8271;
|
|
937
|
+
}
|
|
938
|
+
function CoordinateConvert() {
|
|
939
|
+
this.xa_1 = 52.35987755982988;
|
|
940
|
+
this.ya_1 = 6378245;
|
|
941
|
+
this.za_1 = 0.006693421622965943;
|
|
942
|
+
}
|
|
943
|
+
protoOf(CoordinateConvert).ab = function (lng, lat) {
|
|
944
|
+
var x = lng - 0.0065;
|
|
945
|
+
var y = lat - 0.006;
|
|
946
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
947
|
+
var x_0 = x * x + y * y;
|
|
948
|
+
var tmp = Math.sqrt(x_0);
|
|
949
|
+
// Inline function 'kotlin.math.sin' call
|
|
950
|
+
var x_1 = y * 52.35987755982988;
|
|
951
|
+
var z = tmp - 2.0E-5 * Math.sin(x_1);
|
|
952
|
+
// Inline function 'kotlin.math.atan2' call
|
|
953
|
+
var tmp_0 = Math.atan2(y, x);
|
|
954
|
+
// Inline function 'kotlin.math.cos' call
|
|
955
|
+
var x_2 = x * 52.35987755982988;
|
|
956
|
+
var theta = tmp_0 - 3.0E-6 * Math.cos(x_2);
|
|
957
|
+
// Inline function 'kotlin.math.cos' call
|
|
958
|
+
var gcjLng = z * Math.cos(theta);
|
|
959
|
+
// Inline function 'kotlin.math.sin' call
|
|
960
|
+
var gcjLat = z * Math.sin(theta);
|
|
961
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
962
|
+
return new Float64Array([gcjLng, gcjLat]);
|
|
963
|
+
};
|
|
964
|
+
protoOf(CoordinateConvert).bb = function (lng, lat) {
|
|
965
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
966
|
+
var x = lng * lng + lat * lat;
|
|
967
|
+
var tmp = Math.sqrt(x);
|
|
968
|
+
// Inline function 'kotlin.math.sin' call
|
|
969
|
+
var x_0 = lat * 52.35987755982988;
|
|
970
|
+
var z = tmp + 2.0E-5 * Math.sin(x_0);
|
|
971
|
+
// Inline function 'kotlin.math.atan2' call
|
|
972
|
+
var tmp_0 = Math.atan2(lat, lng);
|
|
973
|
+
// Inline function 'kotlin.math.cos' call
|
|
974
|
+
var x_1 = lng * 52.35987755982988;
|
|
975
|
+
var theta = tmp_0 + 3.0E-6 * Math.cos(x_1);
|
|
976
|
+
// Inline function 'kotlin.math.cos' call
|
|
977
|
+
var bdLng = z * Math.cos(theta) + 0.0065;
|
|
978
|
+
// Inline function 'kotlin.math.sin' call
|
|
979
|
+
var bdLat = z * Math.sin(theta) + 0.006;
|
|
980
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
981
|
+
return new Float64Array([bdLng, bdLat]);
|
|
982
|
+
};
|
|
983
|
+
protoOf(CoordinateConvert).cb = function (lng, lat) {
|
|
984
|
+
var tmp;
|
|
985
|
+
if (outOfChina(this, lng, lat)) {
|
|
986
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
987
|
+
tmp = new Float64Array([lng, lat]);
|
|
988
|
+
} else {
|
|
989
|
+
var dLat = transformLat(this, lng - 105, lat - 35);
|
|
990
|
+
var dLng = transformLng(this, lng - 105, lat - 35);
|
|
991
|
+
var radLat = lat / 180 * get_PI();
|
|
992
|
+
// Inline function 'kotlin.math.sin' call
|
|
993
|
+
var magic = Math.sin(radLat);
|
|
994
|
+
magic = 1 - 0.006693421622965943 * magic * magic;
|
|
995
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
996
|
+
var x = magic;
|
|
997
|
+
var sqrtMagic = Math.sqrt(x);
|
|
998
|
+
dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
|
|
999
|
+
var tmp_0 = dLng * 180;
|
|
1000
|
+
var tmp_1 = 6378245 / sqrtMagic;
|
|
1001
|
+
// Inline function 'kotlin.math.cos' call
|
|
1002
|
+
dLng = tmp_0 / (tmp_1 * Math.cos(radLat) * get_PI());
|
|
1003
|
+
var mgLat = lat + dLat;
|
|
1004
|
+
var mgLng = lng + dLng;
|
|
1005
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1006
|
+
tmp = new Float64Array([lng * 2 - mgLng, lat * 2 - mgLat]);
|
|
642
1007
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
1008
|
+
return tmp;
|
|
1009
|
+
};
|
|
1010
|
+
protoOf(CoordinateConvert).db = function (lng, lat) {
|
|
1011
|
+
var tmp;
|
|
1012
|
+
if (outOfChina(this, lng, lat)) {
|
|
1013
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1014
|
+
tmp = new Float64Array([lng, lat]);
|
|
1015
|
+
} else {
|
|
1016
|
+
var dLat = transformLat(this, lng - 105, lat - 35);
|
|
1017
|
+
var dLng = transformLng(this, lng - 105, lat - 35);
|
|
1018
|
+
var redLat = lat / 180 * get_PI();
|
|
1019
|
+
// Inline function 'kotlin.math.sin' call
|
|
1020
|
+
var magic = Math.sin(redLat);
|
|
1021
|
+
magic = 1 - 0.006693421622965943 * magic * magic;
|
|
1022
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1023
|
+
var x = magic;
|
|
1024
|
+
var sqrtMagic = Math.sqrt(x);
|
|
1025
|
+
dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
|
|
1026
|
+
var tmp_0 = dLng * 180;
|
|
1027
|
+
var tmp_1 = 6378245 / sqrtMagic;
|
|
1028
|
+
// Inline function 'kotlin.math.cos' call
|
|
1029
|
+
dLng = tmp_0 / (tmp_1 * Math.cos(redLat) * get_PI());
|
|
1030
|
+
var mgLat = lat + dLat;
|
|
1031
|
+
var mgLng = lng + dLng;
|
|
1032
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1033
|
+
tmp = new Float64Array([mgLng, mgLat]);
|
|
1034
|
+
}
|
|
1035
|
+
return tmp;
|
|
1036
|
+
};
|
|
1037
|
+
protoOf(CoordinateConvert).eb = function (lng, lat) {
|
|
1038
|
+
var lngLat = this.ab(lng, lat);
|
|
1039
|
+
return this.cb(lngLat[0], lngLat[1]);
|
|
1040
|
+
};
|
|
1041
|
+
protoOf(CoordinateConvert).fb = function (lng, lat) {
|
|
1042
|
+
var lngLat = this.db(lng, lat);
|
|
1043
|
+
return this.bb(lngLat[0], lngLat[1]);
|
|
1044
|
+
};
|
|
1045
|
+
var CoordinateConvert_instance;
|
|
1046
|
+
function CoordinateConvert_getInstance() {
|
|
1047
|
+
return CoordinateConvert_instance;
|
|
1048
|
+
}
|
|
1049
|
+
var CoordinateSystemType_WGS84_instance;
|
|
1050
|
+
var CoordinateSystemType_GCJ02_instance;
|
|
1051
|
+
var CoordinateSystemType_BD09_instance;
|
|
1052
|
+
function values_0() {
|
|
1053
|
+
return [CoordinateSystemType_WGS84_getInstance(), CoordinateSystemType_GCJ02_getInstance(), CoordinateSystemType_BD09_getInstance()];
|
|
1054
|
+
}
|
|
1055
|
+
function valueOf_0(value) {
|
|
1056
|
+
switch (value) {
|
|
1057
|
+
case 'WGS84':
|
|
1058
|
+
return CoordinateSystemType_WGS84_getInstance();
|
|
1059
|
+
case 'GCJ02':
|
|
1060
|
+
return CoordinateSystemType_GCJ02_getInstance();
|
|
1061
|
+
case 'BD09':
|
|
1062
|
+
return CoordinateSystemType_BD09_getInstance();
|
|
1063
|
+
default:
|
|
1064
|
+
CoordinateSystemType_initEntries();
|
|
1065
|
+
THROW_IAE('No enum constant value.');
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
var CoordinateSystemType_entriesInitialized;
|
|
1070
|
+
function CoordinateSystemType_initEntries() {
|
|
1071
|
+
if (CoordinateSystemType_entriesInitialized)
|
|
1072
|
+
return Unit_instance;
|
|
1073
|
+
CoordinateSystemType_entriesInitialized = true;
|
|
1074
|
+
CoordinateSystemType_WGS84_instance = new CoordinateSystemType('WGS84', 0);
|
|
1075
|
+
CoordinateSystemType_GCJ02_instance = new CoordinateSystemType('GCJ02', 1);
|
|
1076
|
+
CoordinateSystemType_BD09_instance = new CoordinateSystemType('BD09', 2);
|
|
1077
|
+
}
|
|
1078
|
+
function CoordinateSystemType(name, ordinal) {
|
|
1079
|
+
Enum.call(this, name, ordinal);
|
|
1080
|
+
}
|
|
1081
|
+
function CoordinateSystemType_WGS84_getInstance() {
|
|
1082
|
+
CoordinateSystemType_initEntries();
|
|
1083
|
+
return CoordinateSystemType_WGS84_instance;
|
|
1084
|
+
}
|
|
1085
|
+
function CoordinateSystemType_GCJ02_getInstance() {
|
|
1086
|
+
CoordinateSystemType_initEntries();
|
|
1087
|
+
return CoordinateSystemType_GCJ02_instance;
|
|
1088
|
+
}
|
|
1089
|
+
function CoordinateSystemType_BD09_getInstance() {
|
|
1090
|
+
CoordinateSystemType_initEntries();
|
|
1091
|
+
return CoordinateSystemType_BD09_instance;
|
|
1092
|
+
}
|
|
1093
|
+
function convert(_this__u8e3s4, from, to) {
|
|
1094
|
+
var tmp;
|
|
1095
|
+
switch (from.l6_1) {
|
|
1096
|
+
case 0:
|
|
1097
|
+
var tmp_0;
|
|
1098
|
+
switch (to.l6_1) {
|
|
1099
|
+
case 1:
|
|
1100
|
+
// Inline function 'kotlin.let' call
|
|
1101
|
+
|
|
1102
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1103
|
+
|
|
1104
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1105
|
+
|
|
1106
|
+
var it = CoordinateConvert_instance.db(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1107
|
+
tmp_0 = new Coordinate(it[1], it[0]);
|
|
1108
|
+
break;
|
|
1109
|
+
case 2:
|
|
1110
|
+
// Inline function 'kotlin.let' call
|
|
1111
|
+
|
|
1112
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1113
|
+
|
|
1114
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1115
|
+
|
|
1116
|
+
var it_0 = CoordinateConvert_instance.fb(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1117
|
+
tmp_0 = new Coordinate(it_0[1], it_0[0]);
|
|
1118
|
+
break;
|
|
1119
|
+
default:
|
|
1120
|
+
tmp_0 = _this__u8e3s4.copy();
|
|
1121
|
+
break;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
tmp = tmp_0;
|
|
1125
|
+
break;
|
|
1126
|
+
case 1:
|
|
1127
|
+
var tmp_1;
|
|
1128
|
+
switch (to.l6_1) {
|
|
1129
|
+
case 0:
|
|
1130
|
+
// Inline function 'kotlin.let' call
|
|
1131
|
+
|
|
1132
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1133
|
+
|
|
1134
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1135
|
+
|
|
1136
|
+
var it_1 = CoordinateConvert_instance.cb(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1137
|
+
tmp_1 = new Coordinate(it_1[1], it_1[0]);
|
|
1138
|
+
break;
|
|
1139
|
+
case 2:
|
|
1140
|
+
// Inline function 'kotlin.let' call
|
|
1141
|
+
|
|
1142
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1143
|
+
|
|
1144
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1145
|
+
|
|
1146
|
+
var it_2 = CoordinateConvert_instance.bb(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1147
|
+
tmp_1 = new Coordinate(it_2[1], it_2[0]);
|
|
1148
|
+
break;
|
|
1149
|
+
default:
|
|
1150
|
+
tmp_1 = _this__u8e3s4.copy();
|
|
1151
|
+
break;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
tmp = tmp_1;
|
|
1155
|
+
break;
|
|
1156
|
+
case 2:
|
|
1157
|
+
var tmp_2;
|
|
1158
|
+
switch (to.l6_1) {
|
|
1159
|
+
case 0:
|
|
1160
|
+
// Inline function 'kotlin.let' call
|
|
1161
|
+
|
|
1162
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1163
|
+
|
|
1164
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1165
|
+
|
|
1166
|
+
var it_3 = CoordinateConvert_instance.eb(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1167
|
+
tmp_2 = new Coordinate(it_3[1], it_3[0]);
|
|
1168
|
+
break;
|
|
1169
|
+
case 1:
|
|
1170
|
+
// Inline function 'kotlin.let' call
|
|
1171
|
+
|
|
1172
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1173
|
+
|
|
1174
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1175
|
+
|
|
1176
|
+
var it_4 = CoordinateConvert_instance.ab(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1177
|
+
tmp_2 = new Coordinate(it_4[1], it_4[0]);
|
|
1178
|
+
break;
|
|
1179
|
+
default:
|
|
1180
|
+
tmp_2 = _this__u8e3s4.copy();
|
|
1181
|
+
break;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
tmp = tmp_2;
|
|
1185
|
+
break;
|
|
1186
|
+
default:
|
|
1187
|
+
noWhenBranchMatchedException();
|
|
1188
|
+
break;
|
|
1189
|
+
}
|
|
1190
|
+
return tmp;
|
|
1191
|
+
}
|
|
1192
|
+
function isEastLongitude(_this__u8e3s4) {
|
|
1193
|
+
return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 180.0 : false;
|
|
1194
|
+
}
|
|
1195
|
+
function isNorthLatitude(_this__u8e3s4) {
|
|
1196
|
+
return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 90.0 : false;
|
|
1197
|
+
}
|
|
1198
|
+
function toLongitudeNoPre(_this__u8e3s4) {
|
|
1199
|
+
var tmp;
|
|
1200
|
+
if (_this__u8e3s4 > 180.0) {
|
|
1201
|
+
tmp = 360;
|
|
1202
|
+
} else if (_this__u8e3s4 < 0.0) {
|
|
1203
|
+
tmp = 0;
|
|
1204
|
+
} else {
|
|
1205
|
+
return _this__u8e3s4;
|
|
1206
|
+
}
|
|
1207
|
+
var base = tmp;
|
|
1208
|
+
return base - _this__u8e3s4;
|
|
1209
|
+
}
|
|
1210
|
+
function toLatitudeNoPre(_this__u8e3s4) {
|
|
1211
|
+
var tmp;
|
|
1212
|
+
if (_this__u8e3s4 > 90.0) {
|
|
1213
|
+
tmp = 180;
|
|
1214
|
+
} else if (_this__u8e3s4 < 0.0) {
|
|
1215
|
+
tmp = 0;
|
|
1216
|
+
} else {
|
|
1217
|
+
return _this__u8e3s4;
|
|
1218
|
+
}
|
|
1219
|
+
var base = tmp;
|
|
1220
|
+
return base - _this__u8e3s4;
|
|
1221
|
+
}
|
|
1222
|
+
function toFullLongitude(_this__u8e3s4, isEast, isPositive) {
|
|
1223
|
+
isPositive = isPositive === VOID ? true : isPositive;
|
|
1224
|
+
if (!isEastLongitude(_this__u8e3s4)) {
|
|
1225
|
+
if (isPositive) {
|
|
1226
|
+
var tmp;
|
|
1227
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1228
|
+
tmp = _this__u8e3s4;
|
|
1229
|
+
} else {
|
|
1230
|
+
tmp = 360 + _this__u8e3s4;
|
|
1231
|
+
}
|
|
1232
|
+
return tmp;
|
|
1233
|
+
} else {
|
|
1234
|
+
var tmp_0;
|
|
1235
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1236
|
+
tmp_0 = _this__u8e3s4 - 360;
|
|
1237
|
+
} else {
|
|
1238
|
+
tmp_0 = _this__u8e3s4;
|
|
1239
|
+
}
|
|
1240
|
+
return tmp_0;
|
|
1241
|
+
}
|
|
1242
|
+
} else if (isEast) {
|
|
1243
|
+
return _this__u8e3s4;
|
|
1244
|
+
} else {
|
|
1245
|
+
var tmp_1;
|
|
1246
|
+
if (isPositive) {
|
|
1247
|
+
tmp_1 = 360 - _this__u8e3s4;
|
|
1248
|
+
} else {
|
|
1249
|
+
tmp_1 = -_this__u8e3s4;
|
|
1250
|
+
}
|
|
1251
|
+
return tmp_1;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
function toFullLatitude(_this__u8e3s4, isNorth, isPositive) {
|
|
1255
|
+
isPositive = isPositive === VOID ? true : isPositive;
|
|
1256
|
+
if (!isNorthLatitude(_this__u8e3s4)) {
|
|
1257
|
+
if (isPositive) {
|
|
1258
|
+
var tmp;
|
|
1259
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1260
|
+
tmp = _this__u8e3s4;
|
|
1261
|
+
} else {
|
|
1262
|
+
tmp = 90 + _this__u8e3s4;
|
|
1263
|
+
}
|
|
1264
|
+
return tmp;
|
|
1265
|
+
} else {
|
|
1266
|
+
var tmp_0;
|
|
1267
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1268
|
+
tmp_0 = _this__u8e3s4 - 90;
|
|
1269
|
+
} else {
|
|
1270
|
+
tmp_0 = _this__u8e3s4;
|
|
1271
|
+
}
|
|
1272
|
+
return tmp_0;
|
|
1273
|
+
}
|
|
1274
|
+
} else if (isNorth) {
|
|
1275
|
+
return _this__u8e3s4;
|
|
1276
|
+
} else {
|
|
1277
|
+
var tmp_1;
|
|
1278
|
+
if (isPositive) {
|
|
1279
|
+
tmp_1 = 90 - _this__u8e3s4;
|
|
1280
|
+
} else {
|
|
1281
|
+
tmp_1 = -_this__u8e3s4;
|
|
1282
|
+
}
|
|
1283
|
+
return tmp_1;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
function toDMS(_this__u8e3s4, isLongitude) {
|
|
1287
|
+
var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
|
|
1288
|
+
var dValue = numberToInt(value);
|
|
1289
|
+
var m = (value - dValue) * 60.0;
|
|
1290
|
+
var mValue = numberToInt(m);
|
|
1291
|
+
var s = (m - mValue) * 60.0;
|
|
1292
|
+
return new DMS(dValue, mValue, s);
|
|
1293
|
+
}
|
|
1294
|
+
function toLatLng(_this__u8e3s4) {
|
|
1295
|
+
return (_this__u8e3s4.seconds / 60 + _this__u8e3s4.minutes) / 60.0 + _this__u8e3s4.degrees;
|
|
1296
|
+
}
|
|
1297
|
+
function toLatLngString(_this__u8e3s4, isLongitude, pattern) {
|
|
1298
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1299
|
+
var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
|
|
1300
|
+
var string = pattern;
|
|
1301
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1302
|
+
var tmp$ret$0 = Regex_init_$Create$('CH');
|
|
1303
|
+
var reg = toList(tmp$ret$0.r4(string));
|
|
1304
|
+
var tmp;
|
|
1305
|
+
if (isLongitude) {
|
|
1306
|
+
tmp = isEastLongitude(_this__u8e3s4) ? '\u4E1C\u7ECF' : '\u897F\u7ECF';
|
|
1307
|
+
} else {
|
|
1308
|
+
tmp = isNorthLatitude(_this__u8e3s4) ? '\u5317\u7EAC' : '\u5357\u7EAC';
|
|
1309
|
+
}
|
|
1310
|
+
var faxiang = tmp;
|
|
1311
|
+
var tmp0_iterator = reg.k();
|
|
1312
|
+
while (tmp0_iterator.r()) {
|
|
1313
|
+
var item = tmp0_iterator.s();
|
|
1314
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1315
|
+
var this_0 = string;
|
|
1316
|
+
var range = item.u4();
|
|
1317
|
+
var replacement = faxiang;
|
|
1318
|
+
string = toString(replaceRange(isCharSequence(this_0) ? this_0 : THROW_CCE(), range, replacement));
|
|
1319
|
+
}
|
|
1320
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1321
|
+
var tmp$ret$2 = Regex_init_$Create$('F');
|
|
1322
|
+
reg = toList(tmp$ret$2.r4(string));
|
|
1323
|
+
var tmp_0;
|
|
1324
|
+
if (isLongitude) {
|
|
1325
|
+
tmp_0 = isEastLongitude(_this__u8e3s4) ? 'E' : 'W';
|
|
1326
|
+
} else {
|
|
1327
|
+
tmp_0 = isNorthLatitude(_this__u8e3s4) ? 'N' : 'S';
|
|
1328
|
+
}
|
|
1329
|
+
faxiang = tmp_0;
|
|
1330
|
+
var tmp1_iterator = reg.k();
|
|
1331
|
+
while (tmp1_iterator.r()) {
|
|
1332
|
+
var item_0 = tmp1_iterator.s();
|
|
1333
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1334
|
+
var this_1 = string;
|
|
1335
|
+
var range_0 = item_0.u4();
|
|
1336
|
+
var replacement_0 = faxiang;
|
|
1337
|
+
string = toString(replaceRange(isCharSequence(this_1) ? this_1 : THROW_CCE(), range_0, replacement_0));
|
|
1338
|
+
}
|
|
1339
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1340
|
+
var tmp$ret$4 = Regex_init_$Create$('d+');
|
|
1341
|
+
reg = toList(tmp$ret$4.r4(string));
|
|
1342
|
+
var dValue = numberToInt(value);
|
|
1343
|
+
var tmp2_iterator = reg.k();
|
|
1344
|
+
while (tmp2_iterator.r()) {
|
|
1345
|
+
var item_1 = tmp2_iterator.s();
|
|
1346
|
+
var tmp_1;
|
|
1347
|
+
if (item_1.k3().length === 1) {
|
|
1348
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1349
|
+
var this_2 = string;
|
|
1350
|
+
var range_1 = item_1.u4();
|
|
1351
|
+
var replacement_1 = dValue.toString();
|
|
1352
|
+
tmp_1 = toString(replaceRange(isCharSequence(this_2) ? this_2 : THROW_CCE(), range_1, replacement_1));
|
|
1353
|
+
} else {
|
|
1354
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1355
|
+
var this_3 = string;
|
|
1356
|
+
var range_2 = item_1.u4();
|
|
1357
|
+
var replacement_2 = padStart(dValue.toString(), item_1.k3().length, _Char___init__impl__6a9atx(48));
|
|
1358
|
+
tmp_1 = toString(replaceRange(isCharSequence(this_3) ? this_3 : THROW_CCE(), range_2, replacement_2));
|
|
1359
|
+
}
|
|
1360
|
+
string = tmp_1;
|
|
1361
|
+
}
|
|
1362
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1363
|
+
var tmp$ret$7 = Regex_init_$Create$('m+');
|
|
1364
|
+
reg = toList(tmp$ret$7.r4(string));
|
|
1365
|
+
var m = (value - dValue) * 60.0;
|
|
1366
|
+
var mValue = numberToInt(m);
|
|
1367
|
+
var tmp3_iterator = reg.k();
|
|
1368
|
+
while (tmp3_iterator.r()) {
|
|
1369
|
+
var item_2 = tmp3_iterator.s();
|
|
1370
|
+
var tmp_2;
|
|
1371
|
+
if (item_2.k3().length === 1) {
|
|
1372
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1373
|
+
var this_4 = string;
|
|
1374
|
+
var range_3 = item_2.u4();
|
|
1375
|
+
var replacement_3 = mValue.toString();
|
|
1376
|
+
tmp_2 = toString(replaceRange(isCharSequence(this_4) ? this_4 : THROW_CCE(), range_3, replacement_3));
|
|
1377
|
+
} else {
|
|
1378
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1379
|
+
var this_5 = string;
|
|
1380
|
+
var range_4 = item_2.u4();
|
|
1381
|
+
var replacement_4 = padStart(mValue.toString(), item_2.k3().length, _Char___init__impl__6a9atx(48));
|
|
1382
|
+
tmp_2 = toString(replaceRange(isCharSequence(this_5) ? this_5 : THROW_CCE(), range_4, replacement_4));
|
|
1383
|
+
}
|
|
1384
|
+
string = tmp_2;
|
|
1385
|
+
}
|
|
1386
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1387
|
+
var tmp$ret$10 = Regex_init_$Create$('S+');
|
|
1388
|
+
reg = toList(tmp$ret$10.r4(string));
|
|
1389
|
+
var S = (m - mValue) * 60.0;
|
|
1390
|
+
var SValue = numberToInt(S);
|
|
1391
|
+
var tmp4_iterator = reg.k();
|
|
1392
|
+
while (tmp4_iterator.r()) {
|
|
1393
|
+
var item_3 = tmp4_iterator.s();
|
|
1394
|
+
var tmp_3;
|
|
1395
|
+
if (item_3.k3().length === 1) {
|
|
1396
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1397
|
+
var this_6 = string;
|
|
1398
|
+
var range_5 = item_3.u4();
|
|
1399
|
+
var replacement_5 = SValue.toString();
|
|
1400
|
+
tmp_3 = toString(replaceRange(isCharSequence(this_6) ? this_6 : THROW_CCE(), range_5, replacement_5));
|
|
1401
|
+
} else {
|
|
1402
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1403
|
+
var this_7 = string;
|
|
1404
|
+
var range_6 = item_3.u4();
|
|
1405
|
+
var replacement_6 = padStart(SValue.toString(), item_3.k3().length, _Char___init__impl__6a9atx(48));
|
|
1406
|
+
tmp_3 = toString(replaceRange(isCharSequence(this_7) ? this_7 : THROW_CCE(), range_6, replacement_6));
|
|
1407
|
+
}
|
|
1408
|
+
string = tmp_3;
|
|
1409
|
+
}
|
|
1410
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1411
|
+
var tmp$ret$13 = Regex_init_$Create$('s+');
|
|
1412
|
+
reg = toList(tmp$ret$13.r4(string));
|
|
1413
|
+
var tmp5_iterator = reg.k();
|
|
1414
|
+
while (tmp5_iterator.r()) {
|
|
1415
|
+
var item_4 = tmp5_iterator.s();
|
|
1416
|
+
var tmp_4 = S - SValue;
|
|
1417
|
+
// Inline function 'kotlin.math.pow' call
|
|
1418
|
+
var n = item_4.k3().length;
|
|
1419
|
+
var tmp$ret$14 = Math.pow(10.0, n);
|
|
1420
|
+
var sValue = roundToInt(tmp_4 * tmp$ret$14);
|
|
1421
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1422
|
+
var this_8 = string;
|
|
1423
|
+
var range_7 = item_4.u4();
|
|
1424
|
+
var replacement_7 = padStart(sValue.toString(), item_4.k3().length, _Char___init__impl__6a9atx(48));
|
|
1425
|
+
string = toString(replaceRange(isCharSequence(this_8) ? this_8 : THROW_CCE(), range_7, replacement_7));
|
|
1426
|
+
}
|
|
1427
|
+
return string;
|
|
1428
|
+
}
|
|
1429
|
+
function toLongitudeString(_this__u8e3s4, pattern) {
|
|
1430
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1431
|
+
return toLatLngString(_this__u8e3s4, true, pattern);
|
|
1432
|
+
}
|
|
1433
|
+
function toLatitudeString(_this__u8e3s4, pattern) {
|
|
1434
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1435
|
+
return toLatLngString(_this__u8e3s4, false, pattern);
|
|
1436
|
+
}
|
|
1437
|
+
function toLatLngByString(_this__u8e3s4, pattern) {
|
|
1438
|
+
var string = _this__u8e3s4 + '*';
|
|
1439
|
+
var index = 0;
|
|
1440
|
+
var tempPattern = pattern + '*';
|
|
1441
|
+
while (index < (string.length - 1 | 0)) {
|
|
1442
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1443
|
+
var this_0 = '[^dmSs]+';
|
|
1444
|
+
var tmp$ret$0 = Regex_init_$Create$(this_0);
|
|
1445
|
+
var list = toList(tmp$ret$0.r4(tempPattern));
|
|
1446
|
+
var tmp0_iterator = list.k();
|
|
1447
|
+
$l$loop_2: while (tmp0_iterator.r()) {
|
|
1448
|
+
var item = tmp0_iterator.s();
|
|
1449
|
+
if (item.u4().u5_1 < index)
|
|
1450
|
+
continue $l$loop_2;
|
|
1451
|
+
if (contains(item.k3(), 'CH') ? true : contains(item.k3(), 'F')) {
|
|
1452
|
+
index = item.u4().v5_1;
|
|
1453
|
+
continue $l$loop_2;
|
|
1454
|
+
}
|
|
1455
|
+
var pos = indexOf_0(string, item.k3());
|
|
1456
|
+
if (pos < item.u4().u5_1) {
|
|
1457
|
+
println('ERROR, pos=' + pos + ', range.first=' + item.u4().u5_1);
|
|
1458
|
+
return 0.0;
|
|
1459
|
+
}
|
|
1460
|
+
if (pos === item.u4().u5_1) {
|
|
1461
|
+
index = item.u4().v5_1;
|
|
1462
|
+
continue $l$loop_2;
|
|
1463
|
+
} else {
|
|
1464
|
+
// Inline function 'kotlin.text.substring' call
|
|
1465
|
+
var this_1 = tempPattern;
|
|
1466
|
+
var startIndex = item.u4().u5_1 - 1 | 0;
|
|
1467
|
+
var endIndex = item.u4().u5_1;
|
|
1468
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1469
|
+
var lastStr = this_1.substring(startIndex, endIndex);
|
|
1470
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1471
|
+
var this_2 = tempPattern;
|
|
1472
|
+
var startIndex_0 = item.u4().u5_1 - 1 | 0;
|
|
1473
|
+
var endIndex_0 = item.u4().u5_1;
|
|
1474
|
+
var replacement = padStart(lastStr, (pos - item.u4().u5_1 | 0) + 1 | 0, toCharArray(lastStr)[0]);
|
|
1475
|
+
tempPattern = toString(replaceRange_0(isCharSequence(this_2) ? this_2 : THROW_CCE(), startIndex_0, endIndex_0, replacement));
|
|
1476
|
+
index = pos + item.k3().length | 0;
|
|
1477
|
+
break $l$loop_2;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1482
|
+
var tmp$ret$4 = Regex_init_$Create$('CH');
|
|
1483
|
+
var reg = toList(tmp$ret$4.r4(tempPattern));
|
|
1484
|
+
var tmp;
|
|
1485
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1486
|
+
if (!reg.n()) {
|
|
1487
|
+
tmp = substring(string, reg.t(0).u4());
|
|
1488
|
+
} else {
|
|
1489
|
+
tmp = null;
|
|
1490
|
+
}
|
|
1491
|
+
var faxiang = tmp;
|
|
1492
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1493
|
+
var tmp$ret$6 = Regex_init_$Create$('F');
|
|
1494
|
+
reg = toList(tmp$ret$6.r4(tempPattern));
|
|
1495
|
+
var tmp_0;
|
|
1496
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1497
|
+
if (!reg.n()) {
|
|
1498
|
+
tmp_0 = substring(string, reg.t(0).u4());
|
|
1499
|
+
} else {
|
|
1500
|
+
tmp_0 = faxiang;
|
|
1501
|
+
}
|
|
1502
|
+
faxiang = tmp_0;
|
|
1503
|
+
var isLongitude;
|
|
1504
|
+
switch (faxiang) {
|
|
1505
|
+
case '\u4E1C\u7ECF':
|
|
1506
|
+
case '\u897F\u7ECF':
|
|
1507
|
+
case 'E':
|
|
1508
|
+
case 'W':
|
|
1509
|
+
isLongitude = true;
|
|
1510
|
+
break;
|
|
1511
|
+
default:
|
|
1512
|
+
isLongitude = false;
|
|
1513
|
+
break;
|
|
1514
|
+
}
|
|
1515
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1516
|
+
var tmp$ret$8 = Regex_init_$Create$('[d]+');
|
|
1517
|
+
reg = toList(tmp$ret$8.r4(tempPattern));
|
|
1518
|
+
var dStr = '';
|
|
1519
|
+
var tmp2_iterator = reg.k();
|
|
1520
|
+
while (tmp2_iterator.r()) {
|
|
1521
|
+
var item_0 = tmp2_iterator.s();
|
|
1522
|
+
dStr = dStr + substring(string, item_0.u4());
|
|
1523
|
+
}
|
|
1524
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1525
|
+
var tmp$ret$9 = Regex_init_$Create$('[m]+');
|
|
1526
|
+
reg = toList(tmp$ret$9.r4(tempPattern));
|
|
1527
|
+
var mStr = '';
|
|
1528
|
+
var tmp3_iterator = reg.k();
|
|
1529
|
+
while (tmp3_iterator.r()) {
|
|
1530
|
+
var item_1 = tmp3_iterator.s();
|
|
1531
|
+
mStr = mStr + substring(string, item_1.u4());
|
|
1532
|
+
}
|
|
1533
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1534
|
+
var tmp$ret$10 = Regex_init_$Create$('[S]+');
|
|
1535
|
+
reg = toList(tmp$ret$10.r4(tempPattern));
|
|
1536
|
+
var SStr = '';
|
|
1537
|
+
var tmp4_iterator = reg.k();
|
|
1538
|
+
while (tmp4_iterator.r()) {
|
|
1539
|
+
var item_2 = tmp4_iterator.s();
|
|
1540
|
+
SStr = SStr + substring(string, item_2.u4());
|
|
1541
|
+
}
|
|
1542
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1543
|
+
var this_3 = SStr;
|
|
1544
|
+
if (charSequenceLength(this_3) === 0)
|
|
1545
|
+
SStr = '0';
|
|
1546
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1547
|
+
var tmp$ret$12 = Regex_init_$Create$('[s]+');
|
|
1548
|
+
reg = toList(tmp$ret$12.r4(tempPattern));
|
|
1549
|
+
var sStr = '';
|
|
1550
|
+
var tmp5_iterator = reg.k();
|
|
1551
|
+
while (tmp5_iterator.r()) {
|
|
1552
|
+
var item_3 = tmp5_iterator.s();
|
|
1553
|
+
sStr = sStr + substring(string, item_3.u4());
|
|
1554
|
+
}
|
|
1555
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1556
|
+
var this_4 = sStr;
|
|
1557
|
+
if (charSequenceLength(this_4) === 0)
|
|
1558
|
+
sStr = '0';
|
|
1559
|
+
var s = toDouble(SStr + '.' + sStr) / 60.0;
|
|
1560
|
+
var m = (toInt_0(mStr) + s) / 60.0;
|
|
1561
|
+
var d = toInt_0(dStr) + m;
|
|
1562
|
+
var tmp_1;
|
|
1563
|
+
if (isLongitude) {
|
|
1564
|
+
var isEast;
|
|
1565
|
+
switch (faxiang) {
|
|
1566
|
+
case '\u4E1C\u7ECF':
|
|
1567
|
+
case 'E':
|
|
1568
|
+
isEast = true;
|
|
1569
|
+
break;
|
|
1570
|
+
default:
|
|
1571
|
+
isEast = false;
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
tmp_1 = toFullLongitude(d, isEast, false);
|
|
1575
|
+
} else {
|
|
1576
|
+
var isNorth;
|
|
1577
|
+
switch (faxiang) {
|
|
1578
|
+
case '\u5317\u7EAC':
|
|
1579
|
+
case 'N':
|
|
1580
|
+
isNorth = true;
|
|
1581
|
+
break;
|
|
1582
|
+
default:
|
|
1583
|
+
isNorth = false;
|
|
1584
|
+
break;
|
|
1585
|
+
}
|
|
1586
|
+
tmp_1 = toFullLatitude(d, isNorth, false);
|
|
1587
|
+
}
|
|
1588
|
+
return tmp_1;
|
|
1589
|
+
}
|
|
1590
|
+
function toLongitude(_this__u8e3s4, pattern) {
|
|
1591
|
+
return toLatLngByString('E' + _this__u8e3s4, 'F' + pattern);
|
|
1592
|
+
}
|
|
1593
|
+
function toLatitude(_this__u8e3s4, pattern) {
|
|
1594
|
+
return toLatLngByString('N' + _this__u8e3s4, 'F' + pattern);
|
|
1595
|
+
}
|
|
1596
|
+
function ddmmpmmmm2LatLng(_this__u8e3s4) {
|
|
1597
|
+
var temp = _this__u8e3s4 / 100;
|
|
1598
|
+
var z = numberToInt(temp);
|
|
1599
|
+
var end = (temp - z) * 100.0 / 60;
|
|
1600
|
+
return z + end;
|
|
1601
|
+
}
|
|
1602
|
+
function latLng2ddmmpmmmm(_this__u8e3s4) {
|
|
1603
|
+
var z = numberToInt(_this__u8e3s4);
|
|
1604
|
+
var end = (_this__u8e3s4 - z) * 60.0 / 100.0;
|
|
1605
|
+
return (z + end) * 100;
|
|
1606
|
+
}
|
|
1607
|
+
function DMS(degrees, minutes, seconds) {
|
|
1608
|
+
degrees = degrees === VOID ? 0 : degrees;
|
|
1609
|
+
minutes = minutes === VOID ? 0 : minutes;
|
|
1610
|
+
seconds = seconds === VOID ? 0.0 : seconds;
|
|
1611
|
+
this.degrees = degrees;
|
|
1612
|
+
this.minutes = minutes;
|
|
1613
|
+
this.seconds = seconds;
|
|
1614
|
+
}
|
|
1615
|
+
protoOf(DMS).ib = function (_set____db54di) {
|
|
1616
|
+
this.degrees = _set____db54di;
|
|
1617
|
+
};
|
|
1618
|
+
protoOf(DMS).jb = function () {
|
|
1619
|
+
return this.degrees;
|
|
1620
|
+
};
|
|
1621
|
+
protoOf(DMS).kb = function (_set____db54di) {
|
|
1622
|
+
this.minutes = _set____db54di;
|
|
1623
|
+
};
|
|
1624
|
+
protoOf(DMS).lb = function () {
|
|
1625
|
+
return this.minutes;
|
|
1626
|
+
};
|
|
1627
|
+
protoOf(DMS).mb = function (_set____db54di) {
|
|
1628
|
+
this.seconds = _set____db54di;
|
|
1629
|
+
};
|
|
1630
|
+
protoOf(DMS).nb = function () {
|
|
1631
|
+
return this.seconds;
|
|
1632
|
+
};
|
|
1633
|
+
protoOf(DMS).toString = function () {
|
|
1634
|
+
return '' + this.degrees + '\xB0' + this.minutes + '\u2032' + this.seconds + '\u2033';
|
|
1635
|
+
};
|
|
1636
|
+
protoOf(DMS).ua = function () {
|
|
1637
|
+
return this.degrees;
|
|
1638
|
+
};
|
|
1639
|
+
protoOf(DMS).va = function () {
|
|
1640
|
+
return this.minutes;
|
|
1641
|
+
};
|
|
1642
|
+
protoOf(DMS).ob = function () {
|
|
1643
|
+
return this.seconds;
|
|
1644
|
+
};
|
|
1645
|
+
protoOf(DMS).pb = function (degrees, minutes, seconds) {
|
|
1646
|
+
return new DMS(degrees, minutes, seconds);
|
|
1647
|
+
};
|
|
1648
|
+
protoOf(DMS).copy = function (degrees, minutes, seconds, $super) {
|
|
1649
|
+
degrees = degrees === VOID ? this.degrees : degrees;
|
|
1650
|
+
minutes = minutes === VOID ? this.minutes : minutes;
|
|
1651
|
+
seconds = seconds === VOID ? this.seconds : seconds;
|
|
1652
|
+
return this.pb(degrees, minutes, seconds);
|
|
1653
|
+
};
|
|
1654
|
+
protoOf(DMS).hashCode = function () {
|
|
1655
|
+
var result = this.degrees;
|
|
1656
|
+
result = imul(result, 31) + this.minutes | 0;
|
|
1657
|
+
result = imul(result, 31) + getNumberHashCode(this.seconds) | 0;
|
|
1658
|
+
return result;
|
|
1659
|
+
};
|
|
1660
|
+
protoOf(DMS).equals = function (other) {
|
|
1661
|
+
if (this === other)
|
|
1662
|
+
return true;
|
|
1663
|
+
if (!(other instanceof DMS))
|
|
1664
|
+
return false;
|
|
1665
|
+
var tmp0_other_with_cast = other instanceof DMS ? other : THROW_CCE();
|
|
1666
|
+
if (!(this.degrees === tmp0_other_with_cast.degrees))
|
|
1667
|
+
return false;
|
|
1668
|
+
if (!(this.minutes === tmp0_other_with_cast.minutes))
|
|
1669
|
+
return false;
|
|
1670
|
+
if (!equals(this.seconds, tmp0_other_with_cast.seconds))
|
|
1671
|
+
return false;
|
|
1672
|
+
return true;
|
|
1673
|
+
};
|
|
1674
|
+
function DistanceAndBearing(distance, initialBearing, finalBearing) {
|
|
1675
|
+
distance = distance === VOID ? 0.0 : distance;
|
|
1676
|
+
initialBearing = initialBearing === VOID ? 0.0 : initialBearing;
|
|
1677
|
+
finalBearing = finalBearing === VOID ? 0.0 : finalBearing;
|
|
1678
|
+
this.distance = distance;
|
|
1679
|
+
this.initialBearing = initialBearing;
|
|
1680
|
+
this.finalBearing = finalBearing;
|
|
1681
|
+
}
|
|
1682
|
+
protoOf(DistanceAndBearing).qb = function (_set____db54di) {
|
|
1683
|
+
this.distance = _set____db54di;
|
|
1684
|
+
};
|
|
1685
|
+
protoOf(DistanceAndBearing).rb = function () {
|
|
1686
|
+
return this.distance;
|
|
1687
|
+
};
|
|
1688
|
+
protoOf(DistanceAndBearing).sb = function (_set____db54di) {
|
|
1689
|
+
this.initialBearing = _set____db54di;
|
|
1690
|
+
};
|
|
1691
|
+
protoOf(DistanceAndBearing).tb = function () {
|
|
1692
|
+
return this.initialBearing;
|
|
1693
|
+
};
|
|
1694
|
+
protoOf(DistanceAndBearing).ub = function (_set____db54di) {
|
|
1695
|
+
this.finalBearing = _set____db54di;
|
|
1696
|
+
};
|
|
1697
|
+
protoOf(DistanceAndBearing).vb = function () {
|
|
1698
|
+
return this.finalBearing;
|
|
1699
|
+
};
|
|
1700
|
+
protoOf(DistanceAndBearing).ua = function () {
|
|
1701
|
+
return this.distance;
|
|
1702
|
+
};
|
|
1703
|
+
protoOf(DistanceAndBearing).va = function () {
|
|
1704
|
+
return this.initialBearing;
|
|
1705
|
+
};
|
|
1706
|
+
protoOf(DistanceAndBearing).ob = function () {
|
|
1707
|
+
return this.finalBearing;
|
|
1708
|
+
};
|
|
1709
|
+
protoOf(DistanceAndBearing).wb = function (distance, initialBearing, finalBearing) {
|
|
1710
|
+
return new DistanceAndBearing(distance, initialBearing, finalBearing);
|
|
1711
|
+
};
|
|
1712
|
+
protoOf(DistanceAndBearing).copy = function (distance, initialBearing, finalBearing, $super) {
|
|
1713
|
+
distance = distance === VOID ? this.distance : distance;
|
|
1714
|
+
initialBearing = initialBearing === VOID ? this.initialBearing : initialBearing;
|
|
1715
|
+
finalBearing = finalBearing === VOID ? this.finalBearing : finalBearing;
|
|
1716
|
+
return this.wb(distance, initialBearing, finalBearing);
|
|
1717
|
+
};
|
|
1718
|
+
protoOf(DistanceAndBearing).toString = function () {
|
|
1719
|
+
return 'DistanceAndBearing(distance=' + this.distance + ', initialBearing=' + this.initialBearing + ', finalBearing=' + this.finalBearing + ')';
|
|
1720
|
+
};
|
|
1721
|
+
protoOf(DistanceAndBearing).hashCode = function () {
|
|
1722
|
+
var result = getNumberHashCode(this.distance);
|
|
1723
|
+
result = imul(result, 31) + getNumberHashCode(this.initialBearing) | 0;
|
|
1724
|
+
result = imul(result, 31) + getNumberHashCode(this.finalBearing) | 0;
|
|
1725
|
+
return result;
|
|
1726
|
+
};
|
|
1727
|
+
protoOf(DistanceAndBearing).equals = function (other) {
|
|
1728
|
+
if (this === other)
|
|
1729
|
+
return true;
|
|
1730
|
+
if (!(other instanceof DistanceAndBearing))
|
|
1731
|
+
return false;
|
|
1732
|
+
var tmp0_other_with_cast = other instanceof DistanceAndBearing ? other : THROW_CCE();
|
|
1733
|
+
if (!equals(this.distance, tmp0_other_with_cast.distance))
|
|
1734
|
+
return false;
|
|
1735
|
+
if (!equals(this.initialBearing, tmp0_other_with_cast.initialBearing))
|
|
1736
|
+
return false;
|
|
1737
|
+
if (!equals(this.finalBearing, tmp0_other_with_cast.finalBearing))
|
|
1738
|
+
return false;
|
|
1739
|
+
return true;
|
|
1740
|
+
};
|
|
1741
|
+
function getDistanceAndBearing(point1, point2) {
|
|
1742
|
+
var radLon1 = toRadians(point1.lng);
|
|
1743
|
+
var radLat1 = toRadians(point1.lat);
|
|
1744
|
+
var radLon2 = toRadians(point2.lng);
|
|
1745
|
+
var radLat2 = toRadians(point2.lat);
|
|
1746
|
+
var L = radLon2 - radLon1;
|
|
1747
|
+
// Inline function 'kotlin.math.tan' call
|
|
1748
|
+
var tanU1 = 0.9966471893352525 * Math.tan(radLat1);
|
|
1749
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1750
|
+
var x = 1 + tanU1 * tanU1;
|
|
1751
|
+
var cosU1 = 1 / Math.sqrt(x);
|
|
1752
|
+
var sinU1 = tanU1 * cosU1;
|
|
1753
|
+
// Inline function 'kotlin.math.tan' call
|
|
1754
|
+
var tanU2 = 0.9966471893352525 * Math.tan(radLat2);
|
|
1755
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1756
|
+
var x_0 = 1 + tanU2 * tanU2;
|
|
1757
|
+
var cosU2 = 1 / Math.sqrt(x_0);
|
|
1758
|
+
var sinU2 = tanU2 * cosU2;
|
|
1759
|
+
var tmp;
|
|
1760
|
+
// Inline function 'kotlin.math.abs' call
|
|
1761
|
+
if (Math.abs(L) > get_PI() / 2) {
|
|
1762
|
+
tmp = true;
|
|
1763
|
+
} else {
|
|
1764
|
+
// Inline function 'kotlin.math.abs' call
|
|
1765
|
+
var x_1 = radLat2 - radLat1;
|
|
1766
|
+
tmp = Math.abs(x_1) > get_PI() / 2;
|
|
1767
|
+
}
|
|
1768
|
+
var antipodal = tmp;
|
|
1769
|
+
var f9 = L;
|
|
1770
|
+
var sinF9;
|
|
1771
|
+
var cosF9;
|
|
1772
|
+
var fq = antipodal ? get_PI() : 0.0;
|
|
1773
|
+
var sinFq = 0.0;
|
|
1774
|
+
var cosFq = antipodal ? -1.0 : 1.0;
|
|
1775
|
+
var sinSFqFa;
|
|
1776
|
+
var cos2Fqm = 1.0;
|
|
1777
|
+
var cosSFqFa = 1.0;
|
|
1778
|
+
var iterations = 0;
|
|
1779
|
+
var f91;
|
|
1780
|
+
$l$1: do {
|
|
1781
|
+
$l$0: do {
|
|
1782
|
+
// Inline function 'kotlin.math.sin' call
|
|
1783
|
+
var x_2 = f9;
|
|
1784
|
+
sinF9 = Math.sin(x_2);
|
|
1785
|
+
// Inline function 'kotlin.math.cos' call
|
|
1786
|
+
var x_3 = f9;
|
|
1787
|
+
cosF9 = Math.cos(x_3);
|
|
1788
|
+
sinSFqFa = cosU2 * sinF9 * (cosU2 * sinF9) + (cosU1 * sinU2 - sinU1 * cosU2 * cosF9) * (cosU1 * sinU2 - sinU1 * cosU2 * cosF9);
|
|
1789
|
+
// Inline function 'kotlin.math.abs' call
|
|
1790
|
+
var x_4 = sinSFqFa;
|
|
1791
|
+
if (Math.abs(x_4) < 1.0E-24)
|
|
1792
|
+
break $l$1;
|
|
1793
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1794
|
+
var x_5 = sinSFqFa;
|
|
1795
|
+
sinFq = Math.sqrt(x_5);
|
|
1796
|
+
cosFq = sinU1 * sinU2 + cosU1 * cosU2 * cosF9;
|
|
1797
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1798
|
+
var y = sinFq;
|
|
1799
|
+
var x_6 = cosFq;
|
|
1800
|
+
fq = Math.atan2(y, x_6);
|
|
1801
|
+
var sinFa = cosU1 * cosU2 * sinF9 / sinFq;
|
|
1802
|
+
cosSFqFa = 1 - sinFa * sinFa;
|
|
1803
|
+
cos2Fqm = !(cosSFqFa === 0.0) ? cosFq - 2 * sinU1 * sinU2 / cosSFqFa : 0.0;
|
|
1804
|
+
var C = 2.0955066654671756E-4 * cosSFqFa * (4 + 0.003352810664747481 * (4 - 3 * cosSFqFa));
|
|
1805
|
+
f91 = f9;
|
|
1806
|
+
f9 = L + (1 - C) * 0.003352810664747481 * sinFa * (fq + C * sinFq * (cos2Fqm + C * cosFq * (-1 + 2 * cos2Fqm * cos2Fqm)));
|
|
1807
|
+
var tmp_0;
|
|
1808
|
+
if (antipodal) {
|
|
1809
|
+
// Inline function 'kotlin.math.abs' call
|
|
1810
|
+
var x_7 = f9;
|
|
1811
|
+
tmp_0 = Math.abs(x_7) - get_PI();
|
|
1812
|
+
} else {
|
|
1813
|
+
// Inline function 'kotlin.math.abs' call
|
|
1814
|
+
var x_8 = f9;
|
|
1815
|
+
tmp_0 = Math.abs(x_8);
|
|
1816
|
+
}
|
|
1817
|
+
var iterationCheck = tmp_0;
|
|
1818
|
+
if (iterationCheck > get_PI())
|
|
1819
|
+
throw RuntimeException_init_$Create$('\u03BB > \u03C0');
|
|
1820
|
+
}
|
|
1821
|
+
while (false);
|
|
1822
|
+
var tmp_1;
|
|
1823
|
+
// Inline function 'kotlin.math.abs' call
|
|
1824
|
+
var x_9 = f9 - f91;
|
|
1825
|
+
if (Math.abs(x_9) > 1.0E-12) {
|
|
1826
|
+
iterations = iterations + 1 | 0;
|
|
1827
|
+
tmp_1 = iterations < 100;
|
|
1828
|
+
} else {
|
|
1829
|
+
tmp_1 = false;
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
while (tmp_1);
|
|
1833
|
+
var uSq = cosSFqFa * 2.7233160610984375E11 / 4.040829998465916E13;
|
|
1834
|
+
var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
|
1835
|
+
var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
|
1836
|
+
var deltaFq = B * sinFq * (cos2Fqm + B / 4 * (cosFq * (-1 + 2 * cos2Fqm * cos2Fqm) - B / 6 * cos2Fqm * (-3 + 4 * sinFq * sinFq) * (-3 + 4 * cos2Fqm * cos2Fqm)));
|
|
1837
|
+
var s = 6356752.314245 * A * (fq - deltaFq);
|
|
1838
|
+
var tmp_2;
|
|
1839
|
+
// Inline function 'kotlin.math.abs' call
|
|
1840
|
+
var x_10 = sinSFqFa;
|
|
1841
|
+
if (Math.abs(x_10) < 1.0E-12) {
|
|
1842
|
+
tmp_2 = 0.0;
|
|
1843
|
+
} else {
|
|
1844
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1845
|
+
var y_0 = cosU2 * sinF9;
|
|
1846
|
+
var x_11 = cosU1 * sinU2 - sinU1 * cosU2 * cosF9;
|
|
1847
|
+
tmp_2 = Math.atan2(y_0, x_11);
|
|
1848
|
+
}
|
|
1849
|
+
var alpha1 = tmp_2;
|
|
1850
|
+
var tmp_3;
|
|
1851
|
+
// Inline function 'kotlin.math.abs' call
|
|
1852
|
+
var x_12 = sinSFqFa;
|
|
1853
|
+
if (Math.abs(x_12) < 1.0E-12) {
|
|
1854
|
+
tmp_3 = get_PI();
|
|
1855
|
+
} else {
|
|
1856
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1857
|
+
var y_1 = cosU1 * sinF9;
|
|
1858
|
+
var x_13 = -sinU1 * cosU2 + cosU1 * sinU2 * cosF9;
|
|
1859
|
+
tmp_3 = Math.atan2(y_1, x_13);
|
|
1860
|
+
}
|
|
1861
|
+
var alpha2 = tmp_3;
|
|
1862
|
+
return new DistanceAndBearing(s, toDegrees(alpha1), toDegrees(alpha2));
|
|
1863
|
+
}
|
|
1864
|
+
function getDistanceOn2Points(point1, point2, highPrecision) {
|
|
1865
|
+
highPrecision = highPrecision === VOID ? false : highPrecision;
|
|
1866
|
+
if (highPrecision)
|
|
1867
|
+
return getDistanceAndBearing(point1, point2).distance;
|
|
1868
|
+
var lat1Rad = toRadians(point1.lat);
|
|
1869
|
+
var lat2Rad = toRadians(point2.lat);
|
|
1870
|
+
var a = lat1Rad - lat2Rad;
|
|
1871
|
+
var b = toRadians(point1.lng) - toRadians(point2.lng);
|
|
1872
|
+
// Inline function 'kotlin.math.sin' call
|
|
1873
|
+
var x = a / 2;
|
|
1874
|
+
var sa2 = Math.sin(x);
|
|
1875
|
+
// Inline function 'kotlin.math.sin' call
|
|
1876
|
+
var x_0 = b / 2;
|
|
1877
|
+
var sb2 = Math.sin(x_0);
|
|
1878
|
+
// Inline function 'kotlin.math.asin' call
|
|
1879
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1880
|
+
var tmp = sa2 * sa2;
|
|
1881
|
+
// Inline function 'kotlin.math.cos' call
|
|
1882
|
+
var tmp_0 = Math.cos(lat1Rad);
|
|
1883
|
+
// Inline function 'kotlin.math.cos' call
|
|
1884
|
+
var x_1 = tmp + tmp_0 * Math.cos(lat2Rad) * sb2 * sb2;
|
|
1885
|
+
var x_2 = Math.sqrt(x_1);
|
|
1886
|
+
return 1.2756274E7 * Math.asin(x_2);
|
|
1887
|
+
}
|
|
1888
|
+
function toRadians(degree) {
|
|
1889
|
+
return degree * get_PI() / 180;
|
|
1890
|
+
}
|
|
1891
|
+
function toDegrees(radian) {
|
|
1892
|
+
return radian * 180 / get_PI();
|
|
1893
|
+
}
|
|
1894
|
+
function isPointInCircle(point, center, radius) {
|
|
1895
|
+
return getDistanceOn2Points(point, center) <= radius;
|
|
1896
|
+
}
|
|
1897
|
+
function getAngleOn2Points(point1, point2, highPrecision) {
|
|
1898
|
+
highPrecision = highPrecision === VOID ? false : highPrecision;
|
|
1899
|
+
if (highPrecision) {
|
|
1900
|
+
var bearing = getDistanceAndBearing(point1, point2).finalBearing;
|
|
1901
|
+
return bearing < 0.0 ? bearing + 360 : bearing === 180.0 ? 0.0 : bearing;
|
|
1902
|
+
}
|
|
1903
|
+
var lat1 = toRadians(point1.lat);
|
|
1904
|
+
var lon1 = toRadians(point1.lng);
|
|
1905
|
+
var lat2 = toRadians(point2.lat);
|
|
1906
|
+
var lon2 = toRadians(point2.lng);
|
|
1907
|
+
var dLon = lon2 - lon1;
|
|
1908
|
+
// Inline function 'kotlin.math.sin' call
|
|
1909
|
+
var tmp = Math.sin(dLon);
|
|
1910
|
+
// Inline function 'kotlin.math.cos' call
|
|
1911
|
+
var y = tmp * Math.cos(lat2);
|
|
1912
|
+
// Inline function 'kotlin.math.cos' call
|
|
1913
|
+
var tmp_0 = Math.cos(lat1);
|
|
1914
|
+
// Inline function 'kotlin.math.sin' call
|
|
1915
|
+
var tmp_1 = tmp_0 * Math.sin(lat2);
|
|
1916
|
+
// Inline function 'kotlin.math.sin' call
|
|
1917
|
+
var tmp_2 = Math.sin(lat1);
|
|
1918
|
+
// Inline function 'kotlin.math.cos' call
|
|
1919
|
+
var tmp_3 = tmp_2 * Math.cos(lat2);
|
|
1920
|
+
// Inline function 'kotlin.math.cos' call
|
|
1921
|
+
var x = tmp_1 - tmp_3 * Math.cos(dLon);
|
|
1922
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1923
|
+
var tmp$ret$7 = Math.atan2(y, x);
|
|
1924
|
+
var angle = toDegrees(tmp$ret$7);
|
|
1925
|
+
angle = (angle + 360) % 360;
|
|
1926
|
+
return angle;
|
|
1927
|
+
}
|
|
1928
|
+
function getPointOn2Points(point1, point2, present) {
|
|
1929
|
+
if (present <= 0.0)
|
|
1930
|
+
return point1.copy();
|
|
1931
|
+
if (present >= 1.0)
|
|
1932
|
+
return point2.copy();
|
|
1933
|
+
var distanceAndBearing = getDistanceAndBearing(point1, point2);
|
|
1934
|
+
var newDistance = distanceAndBearing.distance * present;
|
|
1935
|
+
return getPointByBasePoint(point1, newDistance, distanceAndBearing.finalBearing);
|
|
1936
|
+
}
|
|
1937
|
+
function getTotalDistance(points) {
|
|
1938
|
+
var total = 0.0;
|
|
1939
|
+
var inductionVariable = 0;
|
|
1940
|
+
var last = points.length - 1 | 0;
|
|
1941
|
+
if (inductionVariable < last)
|
|
1942
|
+
do {
|
|
1943
|
+
var i = inductionVariable;
|
|
1944
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1945
|
+
total = total + getDistanceOn2Points(points[i], points[i + 1 | 0]);
|
|
1946
|
+
}
|
|
1947
|
+
while (inductionVariable < last);
|
|
1948
|
+
return total;
|
|
1949
|
+
}
|
|
1950
|
+
function getPointsOnDistance(points, distance) {
|
|
1951
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1952
|
+
var result = ArrayList_init_$Create$();
|
|
1953
|
+
var totalDistance = 0.0;
|
|
1954
|
+
// Inline function 'kotlin.collections.forEachIndexed' call
|
|
1955
|
+
var index = 0;
|
|
1956
|
+
var inductionVariable = 0;
|
|
1957
|
+
var last = points.length;
|
|
1958
|
+
while (inductionVariable < last) {
|
|
1959
|
+
var item = points[inductionVariable];
|
|
1960
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1961
|
+
// Inline function 'com.d10ng.common.coordinate.getPointsOnDistance.<anonymous>' call
|
|
1962
|
+
var tmp1 = index;
|
|
1963
|
+
index = tmp1 + 1 | 0;
|
|
1964
|
+
if (tmp1 === 0) {
|
|
1965
|
+
totalDistance = 0.0;
|
|
1966
|
+
} else {
|
|
1967
|
+
var lastPoint = points[tmp1 - 1 | 0];
|
|
1968
|
+
var lastDistance = totalDistance;
|
|
1969
|
+
var curDistance = getDistanceOn2Points(lastPoint, item);
|
|
1970
|
+
var newDistance = lastDistance + curDistance;
|
|
1971
|
+
// Inline function 'kotlin.math.floor' call
|
|
1972
|
+
var x = newDistance / distance;
|
|
1973
|
+
var tmp$ret$1 = Math.floor(x);
|
|
1974
|
+
var totalCount = numberToInt(tmp$ret$1);
|
|
1975
|
+
if (totalCount > result.j()) {
|
|
1976
|
+
var count = totalCount - result.j() | 0;
|
|
1977
|
+
var hasHandleDistance = lastDistance;
|
|
1978
|
+
var noHandleDistance = curDistance;
|
|
1979
|
+
var p0 = lastPoint;
|
|
1980
|
+
var inductionVariable_0 = 0;
|
|
1981
|
+
if (inductionVariable_0 < count)
|
|
1982
|
+
do {
|
|
1983
|
+
var i = inductionVariable_0;
|
|
1984
|
+
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1985
|
+
var lessDistance = distance - hasHandleDistance % distance;
|
|
1986
|
+
var present = lessDistance / noHandleDistance;
|
|
1987
|
+
p0 = getPointOn2Points(p0, item, present);
|
|
1988
|
+
result.h(p0);
|
|
1989
|
+
hasHandleDistance = hasHandleDistance + lessDistance;
|
|
1990
|
+
noHandleDistance = noHandleDistance - lessDistance;
|
|
1991
|
+
}
|
|
1992
|
+
while (inductionVariable_0 < count);
|
|
1993
|
+
}
|
|
1994
|
+
totalDistance = newDistance;
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
result.d1(0, points[0]);
|
|
1998
|
+
result.h(points[points.length - 1 | 0]);
|
|
1999
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
2000
|
+
return copyToArray(result);
|
|
2001
|
+
}
|
|
2002
|
+
function compressTrack(points) {
|
|
2003
|
+
if (points.length <= 10) {
|
|
2004
|
+
// Inline function 'kotlin.collections.copyOf' call
|
|
2005
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2006
|
+
return points.slice();
|
|
646
2007
|
}
|
|
647
2008
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
648
|
-
var
|
|
2009
|
+
var result = ArrayList_init_$Create$();
|
|
2010
|
+
var a = points[0];
|
|
2011
|
+
var b = points[1];
|
|
2012
|
+
var inductionVariable = 0;
|
|
2013
|
+
var last = points.length - 1 | 0;
|
|
2014
|
+
if (inductionVariable <= last)
|
|
2015
|
+
$l$loop: do {
|
|
2016
|
+
var i = inductionVariable;
|
|
2017
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2018
|
+
if (i < 2) {
|
|
2019
|
+
result.h(points[i]);
|
|
2020
|
+
continue $l$loop;
|
|
2021
|
+
}
|
|
2022
|
+
var c = points[i];
|
|
2023
|
+
var distance = getDistanceOn2Points(a, b) + getDistanceOn2Points(b, c);
|
|
2024
|
+
var tmp;
|
|
2025
|
+
if (distance <= 10.0) {
|
|
2026
|
+
tmp = 90;
|
|
2027
|
+
} else if (distance > 50.0) {
|
|
2028
|
+
tmp = 5;
|
|
2029
|
+
} else {
|
|
2030
|
+
// Inline function 'kotlin.math.max' call
|
|
2031
|
+
var a_0 = numberToInt((1 - distance / 50) * 90);
|
|
2032
|
+
tmp = Math.max(a_0, 5);
|
|
2033
|
+
}
|
|
2034
|
+
var x = tmp;
|
|
2035
|
+
var j1 = getAngleOn2Points(a, b);
|
|
2036
|
+
var j2 = getAngleOn2Points(b, c);
|
|
2037
|
+
// Inline function 'kotlin.math.abs' call
|
|
2038
|
+
var x_0 = j1 - j2;
|
|
2039
|
+
if (Math.abs(x_0) < x) {
|
|
2040
|
+
removeLast(result);
|
|
2041
|
+
} else {
|
|
2042
|
+
a = b;
|
|
2043
|
+
}
|
|
2044
|
+
result.h(c);
|
|
2045
|
+
b = c;
|
|
2046
|
+
}
|
|
2047
|
+
while (inductionVariable <= last);
|
|
2048
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
2049
|
+
return copyToArray(result);
|
|
2050
|
+
}
|
|
2051
|
+
function getPointByBasePoint(point, distance, angle) {
|
|
2052
|
+
if (distance === 0.0)
|
|
2053
|
+
return point.copy();
|
|
2054
|
+
var radLat = toRadians(point.lat);
|
|
2055
|
+
var radLng = toRadians(point.lng);
|
|
2056
|
+
var radAngle = toRadians(angle);
|
|
2057
|
+
// Inline function 'kotlin.math.sin' call
|
|
2058
|
+
var sinRadAngle = Math.sin(radAngle);
|
|
2059
|
+
// Inline function 'kotlin.math.cos' call
|
|
2060
|
+
var cosRadAngle = Math.cos(radAngle);
|
|
2061
|
+
// Inline function 'kotlin.math.tan' call
|
|
2062
|
+
var tanU1 = 0.9966471893352525 * Math.tan(radLat);
|
|
2063
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
2064
|
+
var x = 1 + tanU1 * tanU1;
|
|
2065
|
+
var cosU1 = 1 / Math.sqrt(x);
|
|
2066
|
+
var sinU1 = tanU1 * cosU1;
|
|
2067
|
+
// Inline function 'kotlin.math.atan2' call
|
|
2068
|
+
var sigma1 = Math.atan2(tanU1, cosRadAngle);
|
|
2069
|
+
var sinAlpha = cosU1 * sinRadAngle;
|
|
2070
|
+
var cosSqAlpha = 1 - sinAlpha * sinAlpha;
|
|
2071
|
+
var uSq = cosSqAlpha * 2.7233160610984375E11 / 4.040829998465916E13;
|
|
2072
|
+
var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
|
2073
|
+
var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
|
2074
|
+
var sigma = distance / (6356752.314245 * A);
|
|
2075
|
+
var sinSigma;
|
|
2076
|
+
var cosSigma;
|
|
2077
|
+
var cos2SigmaM;
|
|
2078
|
+
var sigmaP;
|
|
2079
|
+
var iterations = 0.0;
|
|
2080
|
+
$l$1: do {
|
|
2081
|
+
$l$0: do {
|
|
2082
|
+
// Inline function 'kotlin.math.cos' call
|
|
2083
|
+
var x_0 = 2 * sigma1 + sigma;
|
|
2084
|
+
cos2SigmaM = Math.cos(x_0);
|
|
2085
|
+
// Inline function 'kotlin.math.sin' call
|
|
2086
|
+
var x_1 = sigma;
|
|
2087
|
+
sinSigma = Math.sin(x_1);
|
|
2088
|
+
// Inline function 'kotlin.math.cos' call
|
|
2089
|
+
var x_2 = sigma;
|
|
2090
|
+
cosSigma = Math.cos(x_2);
|
|
2091
|
+
var deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
|
|
2092
|
+
sigmaP = sigma;
|
|
2093
|
+
sigma = distance / (6356752.314245 * A) + deltaSigma;
|
|
2094
|
+
}
|
|
2095
|
+
while (false);
|
|
2096
|
+
var tmp;
|
|
2097
|
+
// Inline function 'kotlin.math.abs' call
|
|
2098
|
+
var x_3 = sigma - sigmaP;
|
|
2099
|
+
if (Math.abs(x_3) > 1.0E-12) {
|
|
2100
|
+
iterations = iterations + 1;
|
|
2101
|
+
tmp = iterations < 100.0;
|
|
2102
|
+
} else {
|
|
2103
|
+
tmp = false;
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
while (tmp);
|
|
2107
|
+
if (iterations >= 100.0)
|
|
2108
|
+
throw RuntimeException_init_$Create$('Vincenty formula failed to converge');
|
|
2109
|
+
var x_4 = sinU1 * sinSigma - cosU1 * cosSigma * cosRadAngle;
|
|
2110
|
+
// Inline function 'kotlin.math.atan2' call
|
|
2111
|
+
var y = sinU1 * cosSigma + cosU1 * sinSigma * cosRadAngle;
|
|
2112
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
2113
|
+
var x_5 = sinAlpha * sinAlpha + x_4 * x_4;
|
|
2114
|
+
var x_6 = 0.9966471893352525 * Math.sqrt(x_5);
|
|
2115
|
+
var lat2 = Math.atan2(y, x_6);
|
|
2116
|
+
// Inline function 'kotlin.math.atan2' call
|
|
2117
|
+
var y_0 = sinSigma * sinRadAngle;
|
|
2118
|
+
var x_7 = cosU1 * cosSigma - sinU1 * sinSigma * cosRadAngle;
|
|
2119
|
+
var lambda = Math.atan2(y_0, x_7);
|
|
2120
|
+
var C = 2.0955066654671756E-4 * cosSqAlpha * (4 + 0.003352810664747481 * (4 - 3 * cosSqAlpha));
|
|
2121
|
+
var L = lambda - (1 - C) * 0.003352810664747481 * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
|
|
2122
|
+
var lng2 = radLng + L;
|
|
2123
|
+
return new Coordinate(toDegrees(lat2), toDegrees(lng2));
|
|
2124
|
+
}
|
|
2125
|
+
function getRandomPoint(point, radius) {
|
|
2126
|
+
var randomAngle = Default_getInstance().i8() * get_PI() * 2;
|
|
2127
|
+
var randomDistance = Default_getInstance().i8() * radius;
|
|
2128
|
+
return getPointByBasePoint(point, randomDistance, randomAngle);
|
|
2129
|
+
}
|
|
2130
|
+
function getNearPartsOnLine(point, line, offset) {
|
|
2131
|
+
offset = offset === VOID ? 10.0 : offset;
|
|
2132
|
+
if (line.length < 2)
|
|
2133
|
+
throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
|
|
2134
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
2135
|
+
var ls = ArrayList_init_$Create$();
|
|
2136
|
+
var inductionVariable = 0;
|
|
2137
|
+
var last = line.length - 1 | 0;
|
|
2138
|
+
if (inductionVariable < last)
|
|
2139
|
+
$l$loop: do {
|
|
2140
|
+
var i = inductionVariable;
|
|
2141
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2142
|
+
var distance = getDistanceOn2Points(point, line[i]) + getDistanceOn2Points(point, line[i + 1 | 0]);
|
|
2143
|
+
if (ls.n()) {
|
|
2144
|
+
ls.h(to(i, distance));
|
|
2145
|
+
} else if (distance > ls.t(0).o9_1 + offset)
|
|
2146
|
+
continue $l$loop;
|
|
2147
|
+
else if (distance < ls.t(0).o9_1 - offset) {
|
|
2148
|
+
ls.e1();
|
|
2149
|
+
ls.h(to(i, distance));
|
|
2150
|
+
} else {
|
|
2151
|
+
var inductionVariable_0 = 0;
|
|
2152
|
+
var last_0 = ls.j();
|
|
2153
|
+
if (inductionVariable_0 < last_0)
|
|
2154
|
+
$l$loop_0: do {
|
|
2155
|
+
var j = inductionVariable_0;
|
|
2156
|
+
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
2157
|
+
if (distance < ls.t(j).o9_1) {
|
|
2158
|
+
ls.d1(j, to(i, distance));
|
|
2159
|
+
break $l$loop_0;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
while (inductionVariable_0 < last_0);
|
|
2163
|
+
if (ls.j() > 3) {
|
|
2164
|
+
ls.w(3);
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
while (inductionVariable < last);
|
|
2169
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
2170
|
+
// Inline function 'kotlin.collections.map' call
|
|
2171
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2172
|
+
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(ls, 10));
|
|
2173
|
+
var tmp0_iterator = ls.k();
|
|
2174
|
+
while (tmp0_iterator.r()) {
|
|
2175
|
+
var item = tmp0_iterator.s();
|
|
2176
|
+
// Inline function 'com.d10ng.common.coordinate.getNearPartsOnLine.<anonymous>' call
|
|
2177
|
+
var tmp$ret$1 = item.n9_1;
|
|
2178
|
+
destination.h(tmp$ret$1);
|
|
2179
|
+
}
|
|
2180
|
+
return copyToArray(destination);
|
|
2181
|
+
}
|
|
2182
|
+
function getProjectionPointOnLinePart(point, part) {
|
|
2183
|
+
if (!(part.length === 2))
|
|
2184
|
+
throw RuntimeException_init_$Create$('\u7EBF\u6BB5\u5FC5\u987B\u662F\u4E24\u4E2A\u70B9');
|
|
2185
|
+
var start = part[0];
|
|
2186
|
+
var end = part[1];
|
|
2187
|
+
var p2s = getDistanceOn2Points(point, start);
|
|
2188
|
+
var p2e = getDistanceOn2Points(point, end);
|
|
2189
|
+
var s2e = getDistanceOn2Points(start, end);
|
|
2190
|
+
return p2s - p2e > s2e ? end : p2e - p2s > s2e ? start : getPointOn2Points(start, end, p2s / (p2s + p2e));
|
|
2191
|
+
}
|
|
2192
|
+
function getProjectionPointOnLine(point, line) {
|
|
2193
|
+
if (line.length < 2)
|
|
2194
|
+
throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
|
|
2195
|
+
var nearParts = getNearPartsOnLine(point, line);
|
|
2196
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2197
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2198
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2199
|
+
var tmp$ret$2 = [line[nearParts[0]], line[nearParts[0] + 1 | 0]];
|
|
2200
|
+
return getProjectionPointOnLinePart(point, tmp$ret$2);
|
|
2201
|
+
}
|
|
2202
|
+
function getProjectionLineOnLineWithPoint(point, targetLine) {
|
|
2203
|
+
var nearParts = getNearPartsOnLine(point, targetLine);
|
|
2204
|
+
var nearIndex = nearParts[0];
|
|
2205
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2206
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2207
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2208
|
+
var tmp$ret$2 = [targetLine[nearIndex], targetLine[nearIndex + 1 | 0]];
|
|
2209
|
+
var projectionPoint = getProjectionPointOnLinePart(point, tmp$ret$2);
|
|
2210
|
+
// Inline function 'kotlin.collections.plus' call
|
|
2211
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2212
|
+
var tmp$ret$3 = copyOfRange_0(targetLine, 0, nearIndex + 1 | 0);
|
|
2213
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2214
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2215
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2216
|
+
var tmp$ret$6 = [projectionPoint];
|
|
2217
|
+
return tmp$ret$3.concat(tmp$ret$6);
|
|
2218
|
+
}
|
|
2219
|
+
function getProjectionLineOnLineWithLine(line, targetLine, offset) {
|
|
2220
|
+
offset = offset === VOID ? 10.0 : offset;
|
|
2221
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
2222
|
+
if (line.length === 0) {
|
|
2223
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2224
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2225
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2226
|
+
return [targetLine[0]];
|
|
2227
|
+
}
|
|
2228
|
+
var compressLine = compressTrack(line);
|
|
2229
|
+
var newPoint = compressLine[compressLine.length - 1 | 0];
|
|
2230
|
+
var nearParts = getNearPartsOnLine(newPoint, targetLine, offset);
|
|
2231
|
+
var tmp;
|
|
2232
|
+
if (compressLine.length === 1 ? true : nearParts.length === 1) {
|
|
2233
|
+
tmp = 0;
|
|
2234
|
+
} else {
|
|
2235
|
+
var lastPoint = compressLine[compressLine.length - 2 | 0];
|
|
2236
|
+
var newAngle = getAngleOn2Points(lastPoint, newPoint);
|
|
2237
|
+
// Inline function 'kotlin.collections.map' call
|
|
2238
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2239
|
+
var destination = ArrayList_init_$Create$_0(nearParts.length);
|
|
2240
|
+
var inductionVariable = 0;
|
|
2241
|
+
var last = nearParts.length;
|
|
2242
|
+
while (inductionVariable < last) {
|
|
2243
|
+
var item = nearParts[inductionVariable];
|
|
2244
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
2245
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
2246
|
+
var tmp$ret$4 = getAngleOn2Points(targetLine[item], targetLine[item + 1 | 0]);
|
|
2247
|
+
destination.h(tmp$ret$4);
|
|
2248
|
+
}
|
|
2249
|
+
var nearAngles = destination;
|
|
2250
|
+
var tmp$ret$7;
|
|
2251
|
+
$l$block: {
|
|
2252
|
+
// Inline function 'kotlin.collections.minBy' call
|
|
2253
|
+
var iterator = nearAngles.k();
|
|
2254
|
+
if (!iterator.r())
|
|
2255
|
+
throw NoSuchElementException_init_$Create$();
|
|
2256
|
+
var minElem = iterator.s();
|
|
2257
|
+
if (!iterator.r()) {
|
|
2258
|
+
tmp$ret$7 = minElem;
|
|
2259
|
+
break $l$block;
|
|
2260
|
+
}
|
|
2261
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
2262
|
+
// Inline function 'kotlin.math.abs' call
|
|
2263
|
+
var x = minElem - newAngle;
|
|
2264
|
+
var minValue = Math.abs(x);
|
|
2265
|
+
do {
|
|
2266
|
+
var e = iterator.s();
|
|
2267
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
2268
|
+
// Inline function 'kotlin.math.abs' call
|
|
2269
|
+
var x_0 = e - newAngle;
|
|
2270
|
+
var v = Math.abs(x_0);
|
|
2271
|
+
if (compareTo(minValue, v) > 0) {
|
|
2272
|
+
minElem = e;
|
|
2273
|
+
minValue = v;
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
while (iterator.r());
|
|
2277
|
+
tmp$ret$7 = minElem;
|
|
2278
|
+
}
|
|
2279
|
+
var nearAngle = tmp$ret$7;
|
|
2280
|
+
tmp = nearAngles.g1(nearAngle);
|
|
2281
|
+
}
|
|
2282
|
+
var nearIndex = tmp;
|
|
2283
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2284
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2285
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2286
|
+
var part = [targetLine[nearParts[nearIndex]], targetLine[nearParts[nearIndex] + 1 | 0]];
|
|
2287
|
+
var projectionPoint = getProjectionPointOnLinePart(newPoint, part);
|
|
2288
|
+
// Inline function 'kotlin.collections.plus' call
|
|
2289
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2290
|
+
var tmp$ret$15 = copyOfRange_0(targetLine, 0, nearParts[nearIndex] + 1 | 0);
|
|
2291
|
+
// Inline function 'kotlin.arrayOf' call
|
|
2292
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
2293
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2294
|
+
var tmp$ret$18 = [projectionPoint];
|
|
2295
|
+
return tmp$ret$15.concat(tmp$ret$18);
|
|
2296
|
+
}
|
|
2297
|
+
function encodeGBK(_this__u8e3s4) {
|
|
2298
|
+
return encodeGBKDo(_this__u8e3s4);
|
|
2299
|
+
}
|
|
2300
|
+
function decodeGBK(_this__u8e3s4) {
|
|
2301
|
+
return decodeGBKDo(_this__u8e3s4);
|
|
2302
|
+
}
|
|
2303
|
+
function encodeUTF8(_this__u8e3s4) {
|
|
2304
|
+
return encodeToByteArray(_this__u8e3s4);
|
|
2305
|
+
}
|
|
2306
|
+
function decodeUTF8(_this__u8e3s4) {
|
|
2307
|
+
return decodeToString(_this__u8e3s4);
|
|
2308
|
+
}
|
|
2309
|
+
function encodeUnicode(_this__u8e3s4) {
|
|
2310
|
+
var hex = encodeUnicodeString(_this__u8e3s4, false);
|
|
2311
|
+
return hexStringToByteArray(hex);
|
|
2312
|
+
}
|
|
2313
|
+
function encodeUnicodeString(_this__u8e3s4, isNeedU) {
|
|
2314
|
+
isNeedU = isNeedU === VOID ? true : isNeedU;
|
|
2315
|
+
var builder = StringBuilder_init_$Create$();
|
|
2316
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2317
|
+
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
2318
|
+
while (tmp0_iterator.r()) {
|
|
2319
|
+
var c = tmp0_iterator.s().x5_1;
|
|
2320
|
+
// Inline function 'kotlin.code' call
|
|
2321
|
+
var tmp$ret$1 = Char__toInt_impl_vasixd(c);
|
|
2322
|
+
var item = toString_2(tmp$ret$1, 16);
|
|
2323
|
+
if (isNeedU) {
|
|
2324
|
+
builder.f3('\\u');
|
|
2325
|
+
}
|
|
2326
|
+
builder.f3(padStart(item, 4, _Char___init__impl__6a9atx(48)));
|
|
2327
|
+
}
|
|
2328
|
+
return builder.toString();
|
|
2329
|
+
}
|
|
2330
|
+
function decodeUnicode(_this__u8e3s4) {
|
|
2331
|
+
return decodeUnicodeString(byteArrayToHexString(_this__u8e3s4));
|
|
2332
|
+
}
|
|
2333
|
+
function decodeUnicodeString(_this__u8e3s4) {
|
|
2334
|
+
var value = replace(replace(_this__u8e3s4, '\\u', ''), ' ', '');
|
|
2335
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2336
|
+
var this_0 = '[A-Fa-f0-9]+';
|
|
2337
|
+
var regex = Regex_init_$Create$(this_0);
|
|
2338
|
+
var isMatch = regex.o4(value);
|
|
2339
|
+
if (!isMatch)
|
|
2340
|
+
return '';
|
|
2341
|
+
var builder = StringBuilder_init_$Create$();
|
|
2342
|
+
var str = value;
|
|
2343
|
+
if (!((value.length % 4 | 0) === 0)) {
|
|
2344
|
+
str = padEnd(value, imul((value.length / 4 | 0) + 1 | 0, 4), _Char___init__impl__6a9atx(48));
|
|
2345
|
+
}
|
|
649
2346
|
var nestedLast = charSequenceLength(str) - 1 | 0;
|
|
650
2347
|
var inductionVariable = 0;
|
|
651
|
-
var last = getProgressionLastElement(0, nestedLast,
|
|
2348
|
+
var last = getProgressionLastElement(0, nestedLast, 4);
|
|
652
2349
|
if (inductionVariable <= last)
|
|
653
2350
|
do {
|
|
654
2351
|
var i = inductionVariable;
|
|
655
|
-
inductionVariable = inductionVariable +
|
|
656
|
-
var
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
2352
|
+
inductionVariable = inductionVariable + 4 | 0;
|
|
2353
|
+
var end = i + 4 | 0;
|
|
2354
|
+
if (str.length >= end) {
|
|
2355
|
+
// Inline function 'kotlin.text.substring' call
|
|
2356
|
+
var this_1 = str;
|
|
2357
|
+
var startIndex = i;
|
|
2358
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2359
|
+
var item = this_1.substring(startIndex, end);
|
|
2360
|
+
var tmp1_elvis_lhs = toIntOrNull(item, 16);
|
|
2361
|
+
var data = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
|
|
2362
|
+
if (!(data === 0)) {
|
|
2363
|
+
builder.g3(numberToChar(data));
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
663
2366
|
}
|
|
664
2367
|
while (!(i === last));
|
|
665
|
-
return
|
|
2368
|
+
return builder.toString();
|
|
666
2369
|
}
|
|
667
|
-
function
|
|
668
|
-
|
|
2370
|
+
function encodeASCII(_this__u8e3s4) {
|
|
2371
|
+
return hexStringToByteArray(encodeASCIIString(_this__u8e3s4));
|
|
2372
|
+
}
|
|
2373
|
+
function encodeASCIIString(_this__u8e3s4) {
|
|
669
2374
|
// Inline function 'kotlin.text.toRegex' call
|
|
670
|
-
var
|
|
671
|
-
var
|
|
2375
|
+
var this_0 = '[\\u0020-\\u007e]+';
|
|
2376
|
+
var regex = Regex_init_$Create$(this_0);
|
|
2377
|
+
var isMatch = regex.o4(_this__u8e3s4);
|
|
672
2378
|
if (!isMatch)
|
|
673
|
-
return
|
|
674
|
-
var
|
|
675
|
-
|
|
2379
|
+
return '';
|
|
2380
|
+
var builder = StringBuilder_init_$Create$();
|
|
2381
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2382
|
+
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
2383
|
+
while (tmp0_iterator.r()) {
|
|
2384
|
+
var c = tmp0_iterator.s().x5_1;
|
|
2385
|
+
// Inline function 'kotlin.code' call
|
|
2386
|
+
var tmp$ret$2 = Char__toInt_impl_vasixd(c);
|
|
2387
|
+
var item = toString_2(tmp$ret$2, 16);
|
|
2388
|
+
builder.f3(padStart(item, 2, _Char___init__impl__6a9atx(48)));
|
|
2389
|
+
}
|
|
2390
|
+
return builder.toString();
|
|
676
2391
|
}
|
|
677
|
-
function
|
|
2392
|
+
function decodeASCII(_this__u8e3s4) {
|
|
2393
|
+
return decodeASCIIString(byteArrayToHexString(_this__u8e3s4));
|
|
2394
|
+
}
|
|
2395
|
+
function decodeASCIIString(_this__u8e3s4) {
|
|
678
2396
|
var value = replace(_this__u8e3s4, ' ', '');
|
|
679
2397
|
// Inline function 'kotlin.text.toRegex' call
|
|
680
|
-
var
|
|
681
|
-
var
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
return
|
|
685
|
-
|
|
2398
|
+
var this_0 = '[A-Fa-f0-9]+';
|
|
2399
|
+
var regex = Regex_init_$Create$(this_0);
|
|
2400
|
+
var isMatch = regex.o4(value);
|
|
2401
|
+
if (!isMatch)
|
|
2402
|
+
return '';
|
|
2403
|
+
var builder = StringBuilder_init_$Create$();
|
|
686
2404
|
var str = value;
|
|
687
2405
|
if (!((value.length % 2 | 0) === 0)) {
|
|
688
|
-
str =
|
|
2406
|
+
str = padEnd(value, imul((value.length / 2 | 0) + 1 | 0, 2), _Char___init__impl__6a9atx(48));
|
|
689
2407
|
}
|
|
690
|
-
// Inline function 'kotlin.collections.mutableListOf' call
|
|
691
|
-
var list = ArrayList_init_$Create$();
|
|
692
2408
|
var nestedLast = charSequenceLength(str) - 1 | 0;
|
|
693
2409
|
var inductionVariable = 0;
|
|
694
2410
|
var last = getProgressionLastElement(0, nestedLast, 2);
|
|
@@ -696,94 +2412,43 @@
|
|
|
696
2412
|
do {
|
|
697
2413
|
var i = inductionVariable;
|
|
698
2414
|
inductionVariable = inductionVariable + 2 | 0;
|
|
699
|
-
var tmp$ret$4;
|
|
700
2415
|
// Inline function 'kotlin.text.substring' call
|
|
701
|
-
var
|
|
702
|
-
var
|
|
2416
|
+
var this_1 = str;
|
|
2417
|
+
var startIndex = i;
|
|
2418
|
+
var endIndex = i + 2 | 0;
|
|
703
2419
|
// Inline function 'kotlin.js.asDynamic' call
|
|
704
|
-
|
|
705
|
-
|
|
2420
|
+
var temp = this_1.substring(startIndex, endIndex);
|
|
2421
|
+
builder.g3(numberToChar(toInt(temp, 16)));
|
|
706
2422
|
}
|
|
707
2423
|
while (!(i === last));
|
|
708
|
-
return
|
|
2424
|
+
return builder.toString();
|
|
709
2425
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
isForced = isForced === VOID ? true : isForced;
|
|
714
|
-
var result = StringBuilder_init_$Create$();
|
|
715
|
-
if (!isInStart) {
|
|
716
|
-
result.o6(_this__u8e3s4);
|
|
717
|
-
}
|
|
718
|
-
if (_this__u8e3s4.length < length) {
|
|
719
|
-
var inductionVariable = 0;
|
|
720
|
-
var last = length - _this__u8e3s4.length | 0;
|
|
721
|
-
if (inductionVariable < last)
|
|
722
|
-
do {
|
|
723
|
-
var i = inductionVariable;
|
|
724
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
725
|
-
result.q2(filler);
|
|
726
|
-
}
|
|
727
|
-
while (inductionVariable < last);
|
|
728
|
-
}
|
|
729
|
-
if (isInStart) {
|
|
730
|
-
result.o6(_this__u8e3s4);
|
|
731
|
-
}
|
|
732
|
-
var tmp;
|
|
733
|
-
if (isForced) {
|
|
734
|
-
var tmp_0;
|
|
735
|
-
if (isInStart) {
|
|
736
|
-
// Inline function 'kotlin.text.substring' call
|
|
737
|
-
var tmp0_substring = result.toString();
|
|
738
|
-
var tmp1_substring = result.c3() - length | 0;
|
|
739
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
740
|
-
tmp_0 = tmp0_substring.substring(tmp1_substring);
|
|
741
|
-
} else {
|
|
742
|
-
// Inline function 'kotlin.text.substring' call
|
|
743
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
744
|
-
tmp_0 = result.toString().substring(0, length);
|
|
745
|
-
}
|
|
746
|
-
tmp = tmp_0;
|
|
747
|
-
} else {
|
|
748
|
-
tmp = result.toString();
|
|
749
|
-
}
|
|
750
|
-
return tmp;
|
|
2426
|
+
function toPinYin(_this__u8e3s4, separator) {
|
|
2427
|
+
separator = separator === VOID ? '' : separator;
|
|
2428
|
+
return toPinYinDo(_this__u8e3s4, separator);
|
|
751
2429
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
754
|
-
var chars = toCharArray(_this__u8e3s4);
|
|
755
|
-
// Inline function 'kotlin.collections.iterator' call
|
|
756
|
-
var tmp0_iterator = charArrayIterator(chars);
|
|
757
|
-
while (tmp0_iterator.g()) {
|
|
758
|
-
var i = tmp0_iterator.h().p2_1;
|
|
759
|
-
// Inline function 'kotlin.code' call
|
|
760
|
-
var ascii = Char__toInt_impl_vasixd(i);
|
|
761
|
-
if (0 <= ascii ? ascii <= 255 : false) {
|
|
762
|
-
length = length + 1 | 0;
|
|
763
|
-
} else
|
|
764
|
-
length = length + 2 | 0;
|
|
765
|
-
}
|
|
766
|
-
return length;
|
|
2430
|
+
function numberToString(_this__u8e3s4, maxDecimalCount) {
|
|
2431
|
+
return keep(toString(_this__u8e3s4), maxDecimalCount);
|
|
767
2432
|
}
|
|
768
|
-
function
|
|
2433
|
+
function numberToByteArray(_this__u8e3s4, size) {
|
|
2434
|
+
size = size === VOID ? 0 : size;
|
|
769
2435
|
var tmp;
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
tmp = '';
|
|
2436
|
+
if (typeof _this__u8e3s4 === 'number') {
|
|
2437
|
+
tmp = toByteArray(_this__u8e3s4, size);
|
|
773
2438
|
} else {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
2439
|
+
if (_this__u8e3s4 instanceof Long) {
|
|
2440
|
+
tmp = toByteArray_0(_this__u8e3s4, size);
|
|
2441
|
+
} else {
|
|
2442
|
+
throw IllegalArgumentException_init_$Create$('Number must be Int or Long');
|
|
2443
|
+
}
|
|
779
2444
|
}
|
|
780
2445
|
return tmp;
|
|
781
2446
|
}
|
|
782
2447
|
function encodeGBKDo(_this__u8e3s4) {
|
|
783
|
-
return GBKHelper_getInstance().
|
|
2448
|
+
return GBKHelper_getInstance().yb(_this__u8e3s4);
|
|
784
2449
|
}
|
|
785
2450
|
function decodeGBKDo(_this__u8e3s4) {
|
|
786
|
-
return GBKHelper_getInstance().
|
|
2451
|
+
return GBKHelper_getInstance().zb(_this__u8e3s4);
|
|
787
2452
|
}
|
|
788
2453
|
function getCharGBKByteArray($this, char) {
|
|
789
2454
|
// Inline function 'kotlin.code' call
|
|
@@ -795,7 +2460,7 @@
|
|
|
795
2460
|
} else {
|
|
796
2461
|
// Inline function 'org.khronos.webgl.get' call
|
|
797
2462
|
// Inline function 'kotlin.js.asDynamic' call
|
|
798
|
-
var gbk = $this.
|
|
2463
|
+
var gbk = $this.xb_1[code];
|
|
799
2464
|
// Inline function 'kotlin.byteArrayOf' call
|
|
800
2465
|
tmp = new Int8Array([toByte(gbk & 255), toByte(gbk >> 8)]);
|
|
801
2466
|
}
|
|
@@ -803,7 +2468,7 @@
|
|
|
803
2468
|
}
|
|
804
2469
|
function GBKHelper() {
|
|
805
2470
|
GBKHelper_instance = this;
|
|
806
|
-
this.
|
|
2471
|
+
this.xb_1 = new Uint16Array(65536);
|
|
807
2472
|
// Inline function 'kotlin.arrayOf' call
|
|
808
2473
|
// Inline function 'kotlin.arrayOf' call
|
|
809
2474
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -880,17 +2545,17 @@
|
|
|
880
2545
|
var j = inductionVariable_2;
|
|
881
2546
|
inductionVariable_2 = inductionVariable_2 + 1 | 0;
|
|
882
2547
|
// Inline function 'org.khronos.webgl.set' call
|
|
883
|
-
var
|
|
2548
|
+
var this_0 = this.xb_1;
|
|
884
2549
|
// Inline function 'kotlin.code' call
|
|
885
|
-
var
|
|
2550
|
+
var this_1 = charSequenceGet(str, j);
|
|
886
2551
|
// Inline function 'org.khronos.webgl.get' call
|
|
887
2552
|
// Inline function 'kotlin.js.asDynamic' call
|
|
888
2553
|
// Inline function 'kotlin.js.asDynamic' call
|
|
889
|
-
|
|
2554
|
+
this_0[Char__toInt_impl_vasixd(this_1)] = codes[j];
|
|
890
2555
|
}
|
|
891
2556
|
while (inductionVariable_2 <= last_2);
|
|
892
2557
|
}
|
|
893
|
-
protoOf(GBKHelper).
|
|
2558
|
+
protoOf(GBKHelper).yb = function (str) {
|
|
894
2559
|
// Inline function 'kotlin.byteArrayOf' call
|
|
895
2560
|
var bytes = new Int8Array([]);
|
|
896
2561
|
var indexedObject = toCharArray(str);
|
|
@@ -900,13 +2565,13 @@
|
|
|
900
2565
|
var char = indexedObject[inductionVariable];
|
|
901
2566
|
inductionVariable = inductionVariable + 1 | 0;
|
|
902
2567
|
// Inline function 'kotlin.collections.plus' call
|
|
903
|
-
var
|
|
904
|
-
var
|
|
905
|
-
bytes = primitiveArrayConcat([
|
|
2568
|
+
var this_0 = bytes;
|
|
2569
|
+
var elements = getCharGBKByteArray(this, char);
|
|
2570
|
+
bytes = primitiveArrayConcat([this_0, elements]);
|
|
906
2571
|
}
|
|
907
2572
|
return bytes;
|
|
908
2573
|
};
|
|
909
|
-
protoOf(GBKHelper).
|
|
2574
|
+
protoOf(GBKHelper).zb = function (byteArray) {
|
|
910
2575
|
var decoder = new TextDecoder('gbk');
|
|
911
2576
|
var tmp = decoder.decode(new Uint8Array(toTypedArray(byteArray)));
|
|
912
2577
|
return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
|
|
@@ -920,107 +2585,183 @@
|
|
|
920
2585
|
function toPinYinDo(_this__u8e3s4, separator) {
|
|
921
2586
|
// Inline function 'kotlin.text.uppercase' call
|
|
922
2587
|
// Inline function 'kotlin.js.asDynamic' call
|
|
923
|
-
return
|
|
2588
|
+
return joinToString_0(PinyinPro.pinyin(_this__u8e3s4, {type: 'array', toneType: 'none'}), separator).toUpperCase();
|
|
924
2589
|
}
|
|
925
2590
|
//region block: post-declaration
|
|
926
|
-
defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).
|
|
927
|
-
defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).
|
|
2591
|
+
defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).m6);
|
|
2592
|
+
defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).n6);
|
|
2593
|
+
defineProp(protoOf(CoordinateSystemType), 'name', protoOf(CoordinateSystemType).m6);
|
|
2594
|
+
defineProp(protoOf(CoordinateSystemType), 'ordinal', protoOf(CoordinateSystemType).n6);
|
|
2595
|
+
//endregion
|
|
2596
|
+
//region block: init
|
|
2597
|
+
CoordinateConvert_instance = new CoordinateConvert();
|
|
928
2598
|
//endregion
|
|
929
2599
|
//region block: exports
|
|
930
2600
|
function $jsExportAll$(_) {
|
|
931
2601
|
var $com = _.com || (_.com = {});
|
|
932
2602
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
933
2603
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
934
|
-
$com$d10ng$common.
|
|
935
|
-
$com$d10ng$common.
|
|
936
|
-
$com$d10ng$common.
|
|
937
|
-
$com$d10ng$common.
|
|
938
|
-
$com$d10ng$common.
|
|
939
|
-
$com$d10ng$common.
|
|
2604
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2605
|
+
$com$d10ng$common$base.byteArrayToBinString = byteArrayToBinString;
|
|
2606
|
+
$com$d10ng$common$base.byteArrayToHexString = byteArrayToHexString;
|
|
2607
|
+
$com$d10ng$common$base.byteArrayToUnsignedInt = byteArrayToUnsignedInt;
|
|
2608
|
+
$com$d10ng$common$base.byteArrayToUnsignedLong = byteArrayToUnsignedLong;
|
|
2609
|
+
$com$d10ng$common$base.indexOfByteArray = indexOfByteArray;
|
|
2610
|
+
$com$d10ng$common$base.byteArrayPadStart = byteArrayPadStart;
|
|
2611
|
+
$com$d10ng$common$base.byteArrayPadEnd = byteArrayPadEnd;
|
|
2612
|
+
$com$d10ng$common$base.byteArrayGetBitRange = byteArrayGetBitRange;
|
|
2613
|
+
var $com = _.com || (_.com = {});
|
|
2614
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2615
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2616
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2617
|
+
$com$d10ng$common$base.byteToBinString = byteToBinString;
|
|
2618
|
+
$com$d10ng$common$base.byteToHexString = byteToHexString;
|
|
2619
|
+
$com$d10ng$common$base.byteToUnsignedInt = byteToUnsignedInt;
|
|
2620
|
+
$com$d10ng$common$base.byteGetBit = byteGetBit;
|
|
2621
|
+
var $com = _.com || (_.com = {});
|
|
2622
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2623
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2624
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2625
|
+
$com$d10ng$common$base.binStringToByte = binStringToByte;
|
|
2626
|
+
$com$d10ng$common$base.binStringToByteArray = binStringToByteArray;
|
|
2627
|
+
$com$d10ng$common$base.hexStringToByte = hexStringToByte;
|
|
2628
|
+
$com$d10ng$common$base.hexStringToByteArray = hexStringToByteArray;
|
|
2629
|
+
$com$d10ng$common$base.getStringByteLength = getStringByteLength;
|
|
2630
|
+
$com$d10ng$common$base.getStringFirstUpperCase = getStringFirstUpperCase;
|
|
2631
|
+
$com$d10ng$common$base.stringToFullWidthString = stringToFullWidthString;
|
|
2632
|
+
var $com = _.com || (_.com = {});
|
|
2633
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2634
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2635
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2636
|
+
$com$d10ng$common$calculate.ChecksumType = ChecksumType;
|
|
2637
|
+
$com$d10ng$common$calculate.ChecksumType.values = values;
|
|
2638
|
+
$com$d10ng$common$calculate.ChecksumType.valueOf = valueOf;
|
|
2639
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'AND', ChecksumType_AND_getInstance);
|
|
2640
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'OR', ChecksumType_OR_getInstance);
|
|
2641
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'XOR', ChecksumType_XOR_getInstance);
|
|
2642
|
+
$com$d10ng$common$calculate.assertChecksum = assertChecksum;
|
|
2643
|
+
$com$d10ng$common$calculate.getChecksum = getChecksum;
|
|
2644
|
+
$com$d10ng$common$calculate.addChecksum = addChecksum;
|
|
940
2645
|
var $com = _.com || (_.com = {});
|
|
941
2646
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
942
2647
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
943
|
-
$com$d10ng$common.
|
|
944
|
-
$com$d10ng$common.
|
|
945
|
-
$com$d10ng$common.
|
|
2648
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2649
|
+
$com$d10ng$common$calculate.isDarkColor = isDarkColor;
|
|
2650
|
+
$com$d10ng$common$calculate.getNextLevelColor = getNextLevelColor;
|
|
2651
|
+
$com$d10ng$common$calculate.getMiddleColor = getMiddleColor;
|
|
2652
|
+
$com$d10ng$common$calculate.getRgbValueArrayFromHexColorString = getRgbValueArrayFromHexColorString;
|
|
2653
|
+
$com$d10ng$common$calculate.getHexColorStringFromRgbValueArray = getHexColorStringFromRgbValueArray;
|
|
946
2654
|
var $com = _.com || (_.com = {});
|
|
947
2655
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
948
2656
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
949
|
-
$com$d10ng$common.
|
|
2657
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2658
|
+
$com$d10ng$common$calculate.keepByRegexStr = keepByRegexStr;
|
|
2659
|
+
$com$d10ng$common$calculate.filterByRegexStr = filterByRegexStr;
|
|
2660
|
+
$com$d10ng$common$calculate.isIdCard = isIdCard;
|
|
2661
|
+
$com$d10ng$common$calculate.isMobileNumber = isMobileNumber;
|
|
2662
|
+
$com$d10ng$common$calculate.isEmail = isEmail;
|
|
2663
|
+
$com$d10ng$common$calculate.isOnlyChEnNum = isOnlyChEnNum;
|
|
2664
|
+
$com$d10ng$common$calculate.isOnlyEnNum = isOnlyEnNum;
|
|
2665
|
+
$com$d10ng$common$calculate.isOnlyChinese = isOnlyChinese;
|
|
2666
|
+
$com$d10ng$common$calculate.isOnlyLetter = isOnlyLetter;
|
|
2667
|
+
$com$d10ng$common$calculate.isOnlyNumber = isOnlyNumber;
|
|
2668
|
+
$com$d10ng$common$calculate.isOnlyCode = isOnlyCode;
|
|
2669
|
+
$com$d10ng$common$calculate.isOnlyChSymbol = isOnlyChSymbol;
|
|
2670
|
+
$com$d10ng$common$calculate.isColor = isColor;
|
|
950
2671
|
var $com = _.com || (_.com = {});
|
|
951
2672
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
952
2673
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
953
|
-
$com$d10ng$common.
|
|
954
|
-
$com$d10ng$common.
|
|
955
|
-
$com$d10ng$common.encodeUTF8 = encodeUTF8;
|
|
956
|
-
$com$d10ng$common.decodeUTF8 = decodeUTF8;
|
|
957
|
-
$com$d10ng$common.encodeUnicode = encodeUnicode;
|
|
958
|
-
$com$d10ng$common.encodeUnicodeString = encodeUnicodeString;
|
|
959
|
-
$com$d10ng$common.decodeUnicodeByByteArray = decodeUnicodeByByteArray;
|
|
960
|
-
$com$d10ng$common.decodeUnicode = decodeUnicode;
|
|
961
|
-
$com$d10ng$common.encodeASCII = encodeASCII;
|
|
962
|
-
$com$d10ng$common.encodeASCIIString = encodeASCIIString;
|
|
963
|
-
$com$d10ng$common.decodeASCII = decodeASCII;
|
|
964
|
-
$com$d10ng$common.decodeASCIIByByteArray = decodeASCIIByByteArray;
|
|
2674
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2675
|
+
$com$d10ng$common$coordinate.Coordinate = Coordinate;
|
|
965
2676
|
var $com = _.com || (_.com = {});
|
|
966
2677
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
967
2678
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
968
|
-
$com$d10ng$common.
|
|
969
|
-
$com$d10ng$common.
|
|
970
|
-
$com$d10ng$common.
|
|
971
|
-
|
|
972
|
-
defineProp($com$d10ng$common.
|
|
973
|
-
defineProp($com$d10ng$common.
|
|
974
|
-
$com$d10ng$common.
|
|
975
|
-
$com$d10ng$common.getChecksum = getChecksum;
|
|
976
|
-
$com$d10ng$common.addChecksum = addChecksum;
|
|
2679
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2680
|
+
$com$d10ng$common$coordinate.CoordinateSystemType = CoordinateSystemType;
|
|
2681
|
+
$com$d10ng$common$coordinate.CoordinateSystemType.values = values_0;
|
|
2682
|
+
$com$d10ng$common$coordinate.CoordinateSystemType.valueOf = valueOf_0;
|
|
2683
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'WGS84', CoordinateSystemType_WGS84_getInstance);
|
|
2684
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'GCJ02', CoordinateSystemType_GCJ02_getInstance);
|
|
2685
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'BD09', CoordinateSystemType_BD09_getInstance);
|
|
977
2686
|
var $com = _.com || (_.com = {});
|
|
978
2687
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
979
2688
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
980
|
-
$com$d10ng$common.
|
|
2689
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2690
|
+
$com$d10ng$common$coordinate.convert = convert;
|
|
2691
|
+
$com$d10ng$common$coordinate.isEastLongitude = isEastLongitude;
|
|
2692
|
+
$com$d10ng$common$coordinate.isNorthLatitude = isNorthLatitude;
|
|
2693
|
+
$com$d10ng$common$coordinate.toLongitudeNoPre = toLongitudeNoPre;
|
|
2694
|
+
$com$d10ng$common$coordinate.toLatitudeNoPre = toLatitudeNoPre;
|
|
2695
|
+
$com$d10ng$common$coordinate.toFullLongitude = toFullLongitude;
|
|
2696
|
+
$com$d10ng$common$coordinate.toFullLatitude = toFullLatitude;
|
|
2697
|
+
$com$d10ng$common$coordinate.toDMS = toDMS;
|
|
2698
|
+
$com$d10ng$common$coordinate.toLatLng = toLatLng;
|
|
2699
|
+
$com$d10ng$common$coordinate.toLatLngString = toLatLngString;
|
|
2700
|
+
$com$d10ng$common$coordinate.toLongitudeString = toLongitudeString;
|
|
2701
|
+
$com$d10ng$common$coordinate.toLatitudeString = toLatitudeString;
|
|
2702
|
+
$com$d10ng$common$coordinate.toLatLngByString = toLatLngByString;
|
|
2703
|
+
$com$d10ng$common$coordinate.toLongitude = toLongitude;
|
|
2704
|
+
$com$d10ng$common$coordinate.toLatitude = toLatitude;
|
|
2705
|
+
$com$d10ng$common$coordinate.ddmmpmmmm2LatLng = ddmmpmmmm2LatLng;
|
|
2706
|
+
$com$d10ng$common$coordinate.latLng2ddmmpmmmm = latLng2ddmmpmmmm;
|
|
981
2707
|
var $com = _.com || (_.com = {});
|
|
982
2708
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
983
2709
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
984
|
-
$com$d10ng$common.
|
|
2710
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2711
|
+
$com$d10ng$common$coordinate.DMS = DMS;
|
|
985
2712
|
var $com = _.com || (_.com = {});
|
|
986
2713
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
987
2714
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
988
|
-
$com$d10ng$common.
|
|
989
|
-
$com$d10ng$common.
|
|
990
|
-
$com$d10ng$common.toByteArray = toByteArray_0;
|
|
2715
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2716
|
+
$com$d10ng$common$coordinate.DistanceAndBearing = DistanceAndBearing;
|
|
991
2717
|
var $com = _.com || (_.com = {});
|
|
992
2718
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
993
2719
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
994
|
-
$com$d10ng$common.
|
|
2720
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2721
|
+
$com$d10ng$common$coordinate.getDistanceAndBearing = getDistanceAndBearing;
|
|
2722
|
+
$com$d10ng$common$coordinate.getDistanceOn2Points = getDistanceOn2Points;
|
|
2723
|
+
$com$d10ng$common$coordinate.toRadians = toRadians;
|
|
2724
|
+
$com$d10ng$common$coordinate.toDegrees = toDegrees;
|
|
2725
|
+
$com$d10ng$common$coordinate.isPointInCircle = isPointInCircle;
|
|
2726
|
+
$com$d10ng$common$coordinate.getAngleOn2Points = getAngleOn2Points;
|
|
2727
|
+
$com$d10ng$common$coordinate.getPointOn2Points = getPointOn2Points;
|
|
2728
|
+
$com$d10ng$common$coordinate.getTotalDistance = getTotalDistance;
|
|
2729
|
+
$com$d10ng$common$coordinate.getPointsOnDistance = getPointsOnDistance;
|
|
2730
|
+
$com$d10ng$common$coordinate.compressTrack = compressTrack;
|
|
2731
|
+
$com$d10ng$common$coordinate.getPointByBasePoint = getPointByBasePoint;
|
|
2732
|
+
$com$d10ng$common$coordinate.getRandomPoint = getRandomPoint;
|
|
2733
|
+
$com$d10ng$common$coordinate.getNearPartsOnLine = getNearPartsOnLine;
|
|
2734
|
+
$com$d10ng$common$coordinate.getProjectionPointOnLinePart = getProjectionPointOnLinePart;
|
|
2735
|
+
$com$d10ng$common$coordinate.getProjectionPointOnLine = getProjectionPointOnLine;
|
|
2736
|
+
$com$d10ng$common$coordinate.getProjectionLineOnLineWithPoint = getProjectionLineOnLineWithPoint;
|
|
2737
|
+
$com$d10ng$common$coordinate.getProjectionLineOnLineWithLine = getProjectionLineOnLineWithLine;
|
|
995
2738
|
var $com = _.com || (_.com = {});
|
|
996
2739
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
997
2740
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
998
|
-
$com$d10ng$common.
|
|
2741
|
+
var $com$d10ng$common$transform = $com$d10ng$common.transform || ($com$d10ng$common.transform = {});
|
|
2742
|
+
$com$d10ng$common$transform.encodeGBK = encodeGBK;
|
|
2743
|
+
$com$d10ng$common$transform.decodeGBK = decodeGBK;
|
|
2744
|
+
$com$d10ng$common$transform.encodeUTF8 = encodeUTF8;
|
|
2745
|
+
$com$d10ng$common$transform.decodeUTF8 = decodeUTF8;
|
|
2746
|
+
$com$d10ng$common$transform.encodeUnicode = encodeUnicode;
|
|
2747
|
+
$com$d10ng$common$transform.encodeUnicodeString = encodeUnicodeString;
|
|
2748
|
+
$com$d10ng$common$transform.decodeUnicode = decodeUnicode;
|
|
2749
|
+
$com$d10ng$common$transform.decodeUnicodeString = decodeUnicodeString;
|
|
2750
|
+
$com$d10ng$common$transform.encodeASCII = encodeASCII;
|
|
2751
|
+
$com$d10ng$common$transform.encodeASCIIString = encodeASCIIString;
|
|
2752
|
+
$com$d10ng$common$transform.decodeASCII = decodeASCII;
|
|
2753
|
+
$com$d10ng$common$transform.decodeASCIIString = decodeASCIIString;
|
|
999
2754
|
var $com = _.com || (_.com = {});
|
|
1000
2755
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
1001
2756
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
1002
|
-
$com$d10ng$common.
|
|
1003
|
-
$com$d10ng$common.
|
|
1004
|
-
$com$d10ng$common.isIdCard = isIdCard;
|
|
1005
|
-
$com$d10ng$common.isMobileNumber = isMobileNumber;
|
|
1006
|
-
$com$d10ng$common.isEmail = isEmail;
|
|
1007
|
-
$com$d10ng$common.isOnlyChEnNum = isOnlyChEnNum;
|
|
1008
|
-
$com$d10ng$common.isOnlyEnNum = isOnlyEnNum;
|
|
1009
|
-
$com$d10ng$common.isOnlyChinese = isOnlyChinese;
|
|
1010
|
-
$com$d10ng$common.isOnlyLetter = isOnlyLetter;
|
|
1011
|
-
$com$d10ng$common.isOnlyNumber = isOnlyNumber;
|
|
1012
|
-
$com$d10ng$common.isOnlyCode = isOnlyCode;
|
|
1013
|
-
$com$d10ng$common.isOnlyChSymbol = isOnlyChSymbol;
|
|
2757
|
+
var $com$d10ng$common$transform = $com$d10ng$common.transform || ($com$d10ng$common.transform = {});
|
|
2758
|
+
$com$d10ng$common$transform.toPinYin = toPinYin;
|
|
1014
2759
|
var $com = _.com || (_.com = {});
|
|
1015
2760
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
1016
2761
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
1017
|
-
$com$d10ng$common.
|
|
1018
|
-
$com$d10ng$common.
|
|
1019
|
-
$com$d10ng$common.
|
|
1020
|
-
$com$d10ng$common.toByteArrayFromHex = toByteArrayFromHex;
|
|
1021
|
-
$com$d10ng$common.fillLength = fillLength;
|
|
1022
|
-
$com$d10ng$common.getByteLength = getByteLength;
|
|
1023
|
-
$com$d10ng$common.getFirstUpperCase = getFirstUpperCase;
|
|
2762
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2763
|
+
$com$d10ng$common$base.numberToString = numberToString;
|
|
2764
|
+
$com$d10ng$common$base.numberToByteArray = numberToByteArray;
|
|
1024
2765
|
}
|
|
1025
2766
|
$jsExportAll$(_);
|
|
1026
2767
|
//endregion
|