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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports);
|
|
6
|
+
else
|
|
7
|
+
root['88b0986a7186d029-atomicfu-js-ir'] = factory(typeof this['88b0986a7186d029-atomicfu-js-ir'] === 'undefined' ? {} : this['88b0986a7186d029-atomicfu-js-ir']);
|
|
8
|
+
}(this, function (_) {
|
|
9
|
+
'use strict';
|
|
10
|
+
//region block: pre-declaration
|
|
11
|
+
//endregion
|
|
12
|
+
return _;
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=88b0986a7186d029-atomicfu-js-ir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
package/buffer-kt.js
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'buffer-kt'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'buffer-kt'.");
|
|
9
|
+
}
|
|
10
|
+
root['buffer-kt'] = factory(typeof this['buffer-kt'] === 'undefined' ? {} : this['buffer-kt'], this['kotlin-kotlin-stdlib']);
|
|
11
|
+
}
|
|
12
|
+
}(this, function (_, kotlin_kotlin) {
|
|
13
|
+
'use strict';
|
|
14
|
+
//region block: imports
|
|
15
|
+
var imul = Math.imul;
|
|
16
|
+
var protoOf = kotlin_kotlin.$_$.s1;
|
|
17
|
+
var objectMeta = kotlin_kotlin.$_$.r1;
|
|
18
|
+
var setMetadataFor = kotlin_kotlin.$_$.t1;
|
|
19
|
+
var classMeta = kotlin_kotlin.$_$.g1;
|
|
20
|
+
var Unit_instance = kotlin_kotlin.$_$.s;
|
|
21
|
+
var Enum = kotlin_kotlin.$_$.c3;
|
|
22
|
+
var interfaceMeta = kotlin_kotlin.$_$.n1;
|
|
23
|
+
var VOID = kotlin_kotlin.$_$.b;
|
|
24
|
+
var ByteCompanionObject_instance = kotlin_kotlin.$_$.q;
|
|
25
|
+
var THROW_CCE = kotlin_kotlin.$_$.e3;
|
|
26
|
+
var contentEquals = kotlin_kotlin.$_$.u;
|
|
27
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.k1;
|
|
28
|
+
var hashCode = kotlin_kotlin.$_$.m1;
|
|
29
|
+
//endregion
|
|
30
|
+
//region block: pre-declaration
|
|
31
|
+
setMetadataFor(AllocationZone, 'AllocationZone', classMeta);
|
|
32
|
+
setMetadataFor(Heap, 'Heap', objectMeta, AllocationZone);
|
|
33
|
+
setMetadataFor(SharedMemory, 'SharedMemory', objectMeta, AllocationZone);
|
|
34
|
+
setMetadataFor(Custom, 'Custom', classMeta, AllocationZone);
|
|
35
|
+
setMetadataFor(ByteOrder, 'ByteOrder', classMeta, Enum);
|
|
36
|
+
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
37
|
+
function remaining() {
|
|
38
|
+
return this.v9() - this.w9() | 0;
|
|
39
|
+
}
|
|
40
|
+
function hasRemaining() {
|
|
41
|
+
return this.w9() < this.v9();
|
|
42
|
+
}
|
|
43
|
+
setMetadataFor(PositionBuffer, 'PositionBuffer', interfaceMeta);
|
|
44
|
+
function writeBytes(bytes) {
|
|
45
|
+
return this.ca(bytes, 0, bytes.length);
|
|
46
|
+
}
|
|
47
|
+
setMetadataFor(WriteBuffer, 'WriteBuffer', interfaceMeta, VOID, [PositionBuffer]);
|
|
48
|
+
setMetadataFor(JsBuffer, 'JsBuffer', classMeta, VOID, [WriteBuffer, PositionBuffer], VOID, VOID, VOID, [0]);
|
|
49
|
+
//endregion
|
|
50
|
+
function Heap() {
|
|
51
|
+
Heap_instance = this;
|
|
52
|
+
AllocationZone.call(this);
|
|
53
|
+
}
|
|
54
|
+
var Heap_instance;
|
|
55
|
+
function Heap_getInstance() {
|
|
56
|
+
if (Heap_instance == null)
|
|
57
|
+
new Heap();
|
|
58
|
+
return Heap_instance;
|
|
59
|
+
}
|
|
60
|
+
function SharedMemory() {
|
|
61
|
+
}
|
|
62
|
+
function Custom() {
|
|
63
|
+
}
|
|
64
|
+
function AllocationZone() {
|
|
65
|
+
}
|
|
66
|
+
var ByteOrder_BIG_ENDIAN_instance;
|
|
67
|
+
var ByteOrder_LITTLE_ENDIAN_instance;
|
|
68
|
+
var ByteOrder_entriesInitialized;
|
|
69
|
+
function ByteOrder_initEntries() {
|
|
70
|
+
if (ByteOrder_entriesInitialized)
|
|
71
|
+
return Unit_instance;
|
|
72
|
+
ByteOrder_entriesInitialized = true;
|
|
73
|
+
ByteOrder_BIG_ENDIAN_instance = new ByteOrder('BIG_ENDIAN', 0);
|
|
74
|
+
ByteOrder_LITTLE_ENDIAN_instance = new ByteOrder('LITTLE_ENDIAN', 1);
|
|
75
|
+
}
|
|
76
|
+
function ByteOrder(name, ordinal) {
|
|
77
|
+
Enum.call(this, name, ordinal);
|
|
78
|
+
}
|
|
79
|
+
function ByteOrder_BIG_ENDIAN_getInstance() {
|
|
80
|
+
ByteOrder_initEntries();
|
|
81
|
+
return ByteOrder_BIG_ENDIAN_instance;
|
|
82
|
+
}
|
|
83
|
+
function ByteOrder_LITTLE_ENDIAN_getInstance() {
|
|
84
|
+
ByteOrder_initEntries();
|
|
85
|
+
return ByteOrder_LITTLE_ENDIAN_instance;
|
|
86
|
+
}
|
|
87
|
+
function Companion() {
|
|
88
|
+
}
|
|
89
|
+
var Companion_instance;
|
|
90
|
+
function Companion_getInstance() {
|
|
91
|
+
return Companion_instance;
|
|
92
|
+
}
|
|
93
|
+
function PositionBuffer() {
|
|
94
|
+
}
|
|
95
|
+
function WriteBuffer() {
|
|
96
|
+
}
|
|
97
|
+
function wrap(_this__u8e3s4, array, byteOrder) {
|
|
98
|
+
byteOrder = byteOrder === VOID ? ByteOrder_BIG_ENDIAN_getInstance() : byteOrder;
|
|
99
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
100
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
101
|
+
return new JsBuffer(array, byteOrder.equals(ByteOrder_LITTLE_ENDIAN_getInstance()));
|
|
102
|
+
}
|
|
103
|
+
function allocate(_this__u8e3s4, size, zone, byteOrder) {
|
|
104
|
+
zone = zone === VOID ? Heap_getInstance() : zone;
|
|
105
|
+
byteOrder = byteOrder === VOID ? ByteOrder_BIG_ENDIAN_getInstance() : byteOrder;
|
|
106
|
+
if (zone instanceof Custom) {
|
|
107
|
+
return zone.da_1(size);
|
|
108
|
+
}
|
|
109
|
+
var tmp;
|
|
110
|
+
try {
|
|
111
|
+
var tmp_0;
|
|
112
|
+
if (zone instanceof SharedMemory) {
|
|
113
|
+
tmp_0 = new SharedArrayBuffer(size);
|
|
114
|
+
} else {
|
|
115
|
+
tmp_0 = null;
|
|
116
|
+
}
|
|
117
|
+
tmp = tmp_0;
|
|
118
|
+
} catch ($p) {
|
|
119
|
+
var tmp_1;
|
|
120
|
+
if ($p instanceof Error) {
|
|
121
|
+
var t = $p;
|
|
122
|
+
tmp_1 = null;
|
|
123
|
+
} else {
|
|
124
|
+
throw $p;
|
|
125
|
+
}
|
|
126
|
+
tmp = tmp_1;
|
|
127
|
+
}
|
|
128
|
+
var sharedArrayBuffer = tmp;
|
|
129
|
+
var tmp_2;
|
|
130
|
+
if (sharedArrayBuffer == null) {
|
|
131
|
+
tmp_2 = zone instanceof SharedMemory;
|
|
132
|
+
} else {
|
|
133
|
+
tmp_2 = false;
|
|
134
|
+
}
|
|
135
|
+
if (tmp_2) {
|
|
136
|
+
console.warn('Failed to allocate shared buffer in BufferFactory.kt. Please check and validate the appropriate headers are set on the http request as defined in the SharedArrayBuffer MDN docs.see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements');
|
|
137
|
+
}
|
|
138
|
+
var tmp_3;
|
|
139
|
+
if (!(sharedArrayBuffer == null)) {
|
|
140
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
141
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
142
|
+
var arrayBuffer = sharedArrayBuffer.slice(0, size);
|
|
143
|
+
tmp_3 = new JsBuffer(new Uint8Array(arrayBuffer), byteOrder.equals(ByteOrder_LITTLE_ENDIAN_getInstance()), VOID, VOID, VOID, sharedArrayBuffer);
|
|
144
|
+
} else {
|
|
145
|
+
tmp_3 = new JsBuffer(new Uint8Array(size), byteOrder.equals(ByteOrder_LITTLE_ENDIAN_getInstance()));
|
|
146
|
+
}
|
|
147
|
+
return tmp_3;
|
|
148
|
+
}
|
|
149
|
+
function JsBuffer(buffer, littleEndian, position, limit, capacity, sharedArrayBuffer) {
|
|
150
|
+
littleEndian = littleEndian === VOID ? false : littleEndian;
|
|
151
|
+
position = position === VOID ? 0 : position;
|
|
152
|
+
limit = limit === VOID ? 0 : limit;
|
|
153
|
+
capacity = capacity === VOID ? buffer.byteLength : capacity;
|
|
154
|
+
sharedArrayBuffer = sharedArrayBuffer === VOID ? null : sharedArrayBuffer;
|
|
155
|
+
this.ea_1 = buffer;
|
|
156
|
+
this.fa_1 = littleEndian;
|
|
157
|
+
this.ga_1 = position;
|
|
158
|
+
this.ha_1 = limit;
|
|
159
|
+
this.ia_1 = capacity;
|
|
160
|
+
this.ja_1 = sharedArrayBuffer;
|
|
161
|
+
this.ka_1 = this.fa_1 ? ByteOrder_LITTLE_ENDIAN_getInstance() : ByteOrder_BIG_ENDIAN_getInstance();
|
|
162
|
+
this.ha_1 = this.ea_1.length;
|
|
163
|
+
}
|
|
164
|
+
protoOf(JsBuffer).la = function () {
|
|
165
|
+
return this.ia_1;
|
|
166
|
+
};
|
|
167
|
+
protoOf(JsBuffer).ma = function () {
|
|
168
|
+
var tmp = this.ea_1.buffer;
|
|
169
|
+
var tmp1 = this.ga_1;
|
|
170
|
+
this.ga_1 = tmp1 + 1 | 0;
|
|
171
|
+
var dataView = new DataView(tmp, tmp1, 1);
|
|
172
|
+
return dataView.getInt8(0);
|
|
173
|
+
};
|
|
174
|
+
protoOf(JsBuffer).t = function (index) {
|
|
175
|
+
var dataView = new DataView(this.ea_1.buffer, index, 1);
|
|
176
|
+
return dataView.getInt8(0);
|
|
177
|
+
};
|
|
178
|
+
protoOf(JsBuffer).na = function (size) {
|
|
179
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
180
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
181
|
+
var byteArray = new Int8Array(this.ea_1.buffer, this.ga_1, size);
|
|
182
|
+
this.ga_1 = this.ga_1 + size | 0;
|
|
183
|
+
return byteArray;
|
|
184
|
+
};
|
|
185
|
+
protoOf(JsBuffer).aa = function (index, byte) {
|
|
186
|
+
var tmp = this.ea_1.buffer;
|
|
187
|
+
var dataView = new DataView(tmp, index, 1);
|
|
188
|
+
dataView.setInt8(0, byte);
|
|
189
|
+
return this;
|
|
190
|
+
};
|
|
191
|
+
protoOf(JsBuffer).ca = function (bytes, offset, length) {
|
|
192
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
193
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
194
|
+
var uint8Array = bytes.subarray(offset, offset + length | 0);
|
|
195
|
+
this.ea_1.set(uint8Array, this.ga_1);
|
|
196
|
+
this.ga_1 = this.ga_1 + uint8Array.length | 0;
|
|
197
|
+
return this;
|
|
198
|
+
};
|
|
199
|
+
protoOf(JsBuffer).v9 = function () {
|
|
200
|
+
return this.ha_1;
|
|
201
|
+
};
|
|
202
|
+
protoOf(JsBuffer).w9 = function () {
|
|
203
|
+
return this.ga_1;
|
|
204
|
+
};
|
|
205
|
+
protoOf(JsBuffer).x9 = function (newPosition) {
|
|
206
|
+
this.ga_1 = newPosition;
|
|
207
|
+
};
|
|
208
|
+
protoOf(JsBuffer).equals = function (other) {
|
|
209
|
+
if (this === other)
|
|
210
|
+
return true;
|
|
211
|
+
if (other == null ? true : !(this.constructor == other.constructor))
|
|
212
|
+
return false;
|
|
213
|
+
if (!(other instanceof JsBuffer))
|
|
214
|
+
THROW_CCE();
|
|
215
|
+
if (!(this.fa_1 === other.fa_1))
|
|
216
|
+
return false;
|
|
217
|
+
if (!(this.ga_1 === other.ga_1))
|
|
218
|
+
return false;
|
|
219
|
+
if (!(this.ha_1 === other.ha_1))
|
|
220
|
+
return false;
|
|
221
|
+
if (!(this.ia_1 === other.ia_1))
|
|
222
|
+
return false;
|
|
223
|
+
var size = this.y9();
|
|
224
|
+
try {
|
|
225
|
+
if (!contentEquals(this.na(size), other.na(size)))
|
|
226
|
+
return false;
|
|
227
|
+
}finally {
|
|
228
|
+
this.ga_1 = this.ga_1 - size | 0;
|
|
229
|
+
other.ga_1 = other.ga_1 - size | 0;
|
|
230
|
+
}
|
|
231
|
+
return true;
|
|
232
|
+
};
|
|
233
|
+
protoOf(JsBuffer).hashCode = function () {
|
|
234
|
+
var result = getBooleanHashCode(this.fa_1);
|
|
235
|
+
result = imul(31, result) + this.ga_1 | 0;
|
|
236
|
+
result = imul(31, result) + this.ha_1 | 0;
|
|
237
|
+
result = imul(31, result) + this.ia_1 | 0;
|
|
238
|
+
var size = this.y9();
|
|
239
|
+
try {
|
|
240
|
+
result = imul(31, result) + hashCode(this.na(size)) | 0;
|
|
241
|
+
}finally {
|
|
242
|
+
this.ga_1 = this.ga_1 - size | 0;
|
|
243
|
+
}
|
|
244
|
+
return result;
|
|
245
|
+
};
|
|
246
|
+
protoOf(JsBuffer).toString = function () {
|
|
247
|
+
return 'JsBuffer(buffer=' + this.ea_1 + ', littleEndian=' + this.fa_1 + ', position=' + this.ga_1 + ', limit=' + this.ha_1 + ', capacity=' + this.ia_1 + ', sharedArrayBuffer=' + this.ja_1 + ')';
|
|
248
|
+
};
|
|
249
|
+
//region block: post-declaration
|
|
250
|
+
protoOf(JsBuffer).y9 = remaining;
|
|
251
|
+
protoOf(JsBuffer).z9 = hasRemaining;
|
|
252
|
+
protoOf(JsBuffer).ba = writeBytes;
|
|
253
|
+
//endregion
|
|
254
|
+
//region block: init
|
|
255
|
+
Companion_instance = new Companion();
|
|
256
|
+
//endregion
|
|
257
|
+
//region block: exports
|
|
258
|
+
_.$_$ = _.$_$ || {};
|
|
259
|
+
_.$_$.a = allocate;
|
|
260
|
+
_.$_$.b = wrap;
|
|
261
|
+
_.$_$.c = Companion_instance;
|
|
262
|
+
//endregion
|
|
263
|
+
return _;
|
|
264
|
+
}));
|
|
265
|
+
|
|
266
|
+
//# sourceMappingURL=buffer-kt.js.map
|
package/buffer-kt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../runner/work/buffer/buffer/src/commonMain/kotlin/com/ditchoom/buffer/PositionBuffer.kt","../../../../../../../../../../runner/work/buffer/buffer/src/commonMain/kotlin/com/ditchoom/buffer/WriteBuffer.kt","../../../../../../../../../../runner/work/buffer/buffer/src/commonMain/kotlin/com/ditchoom/buffer/AllocationZone.kt","../../../../../../../../../../runner/work/buffer/buffer/src/commonMain/kotlin/com/ditchoom/buffer/ByteOrder.kt","../../../../../../../../../../runner/work/buffer/buffer/src/commonMain/kotlin/com/ditchoom/buffer/PlatformBuffer.kt","../../../../../../../../../../runner/work/buffer/buffer/src/jsMain/kotlin/com/ditchoom/buffer/BufferFactory.kt","src/jsMainSources/libraries/stdlib/js/src/kotlin/dynamic.kt","../../../../../../../../../../runner/work/buffer/buffer/src/jsMain/kotlin/com/ditchoom/buffer/JsBuffer.kt"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["remaining","hasRemaining","writeBytes","bytes","<init>","wrap","<this>","array","byteOrder","allocate","size","zone","t","sharedArrayBuffer","arrayBuffer","buffer","littleEndian","position","limit","capacity","<get-capacity>","readByte","dataView","get","index","readByteArray","byteArray","set","byte","offset","length","uint8Array","newPosition","equals","other","hashCode","result","toString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAQIA,CAAAA,EAAkB;A,IAAoB,OAApB,YAAU,SAAU,I;EAAD,C;uBACrCC,CAAAA,EAAqB;A,IAAoB,OAApB,YAAa,S;EAAM,C;;qBCKxCC,CAAeC,KAAfD,EAAgD;A,IAAgC,OAAhC,QAAW,KAAX,EAAkB,CAAlB,EAAqB,KAArB,CAA2B,MAA3B,C;EAA+B,C;;;;eCT/EE,CAAAA,EAAA;A;IAAc,yB;EAAd,C;;;;;;;;;;;yBAHGA,CAAAA,EAAP;A,EAAA,C;;;;;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AAgC,OAAO,K;IACvC,IAAI,gBAAS,KAAT,CAAe,IAAf,CAAJ,C;MAA0B,OAAO,K;IACjC,IAAI,gBAAY,KAAZ,CAAkB,IAAlB,CAAJ,C;MAAgC,OAAO,K;QACvCvB,OAAW,S;IACX,IAAI;A,MACA,IAAI,CAAqB,cAApB,QAAc,IAAd,CAAoB,EAAc,KAAM,IAAc,IAAd,CAApB,CAAzB,C;QAAmE,OAAO,K;IAC9E,C,QAAU;A,MACN,wBAAY,IAAZ,I;MACA,0BAAkB,IAAlB,I;IACJ,C;IACA,OAAO,I;EACX,C;wCAESyB,CAAAA,EAAoB;A,QACzBC,SAA0B,mBAAb,IAAa,CAAb,IAAa,C;IAC1B,SAAS,SAAK,MAAL,IAAc,IAAd,CAAc,IAAvB,I;IACA,SAAS,SAAK,MAAL,IAAc,IAAd,CAAc,IAAvB,I;IACA,SAAS,SAAK,MAAL,IAAc,IAAd,CAAc,IAAvB,I;QACA1B,OAAW,S;IACX,IAAI;A,MACA,SAAS,SAAK,MAAL,IAAkC,SAApB,QAAc,IAAd,CAAoB,CAA3C,I;IACJ,C,QAAU;A,MACN,wBAAY,IAAZ,I;IACJ,C;IACA,OAAO,M;EACX,C;wCA7PJ2B,CAAAA,EAAA;A,IAAA,iM;EAAA,C;;;;;;;;;;;;;;;;;"}
|
package/dl-common-util.d.ts
CHANGED
|
@@ -1,76 +1,61 @@
|
|
|
1
1
|
type Nullable<T> = T | null | undefined
|
|
2
|
-
export declare namespace com.d10ng.common {
|
|
3
|
-
function
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
function
|
|
8
|
-
function
|
|
2
|
+
export declare namespace com.d10ng.common.base {
|
|
3
|
+
function byteArrayToBinString(_this_: Int8Array, space?: boolean): string;
|
|
4
|
+
function byteArrayToHexString(_this_: Int8Array, space?: boolean, uppercase?: boolean): string;
|
|
5
|
+
function byteArrayToUnsignedInt(_this_: Int8Array): number;
|
|
6
|
+
function byteArrayToUnsignedLong(_this_: Int8Array): any/* kotlin.Long */;
|
|
7
|
+
function indexOfByteArray(_this_: Int8Array, bs: Int8Array): number;
|
|
8
|
+
function byteArrayPadStart(_this_: Int8Array, length: number, padByte?: number): Int8Array;
|
|
9
|
+
function byteArrayPadEnd(_this_: Int8Array, length: number, padByte?: number): Int8Array;
|
|
10
|
+
function byteArrayGetBitRange(_this_: Int8Array, start: number, length: number): Int8Array;
|
|
9
11
|
}
|
|
10
|
-
export declare namespace com.d10ng.common {
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
12
|
+
export declare namespace com.d10ng.common.base {
|
|
13
|
+
function byteToBinString(_this_: number): string;
|
|
14
|
+
function byteToHexString(_this_: number, uppercase?: boolean): string;
|
|
15
|
+
function byteToUnsignedInt(_this_: number): number;
|
|
16
|
+
function byteGetBit(_this_: number, bitIndex: number): number;
|
|
14
17
|
}
|
|
15
|
-
export declare namespace com.d10ng.common {
|
|
16
|
-
function
|
|
18
|
+
export declare namespace com.d10ng.common.base {
|
|
19
|
+
function binStringToByte(_this_: string): number;
|
|
20
|
+
function binStringToByteArray(_this_: string): Int8Array;
|
|
21
|
+
function hexStringToByte(_this_: string): number;
|
|
22
|
+
function hexStringToByteArray(_this_: string): Int8Array;
|
|
23
|
+
function getStringByteLength(_this_: string): number;
|
|
24
|
+
function getStringFirstUpperCase(_this_: string): string;
|
|
25
|
+
function stringToFullWidthString(_this_: string): string;
|
|
17
26
|
}
|
|
18
|
-
export declare namespace com.d10ng.common {
|
|
19
|
-
function encodeGBK(_this_: string): Int8Array;
|
|
20
|
-
function decodeGBK(_this_: Int8Array): string;
|
|
21
|
-
function encodeUTF8(_this_: string): Int8Array;
|
|
22
|
-
function decodeUTF8(_this_: Int8Array): string;
|
|
23
|
-
function encodeUnicode(_this_: string): Int8Array;
|
|
24
|
-
function encodeUnicodeString(_this_: string, isNeedU: boolean): string;
|
|
25
|
-
function decodeUnicodeByByteArray(_this_: Int8Array): string;
|
|
26
|
-
function decodeUnicode(_this_: string): string;
|
|
27
|
-
function encodeASCII(_this_: string): Int8Array;
|
|
28
|
-
function encodeASCIIString(_this_: string): string;
|
|
29
|
-
function decodeASCII(_this_: string): string;
|
|
30
|
-
function decodeASCIIByByteArray(_this_: Int8Array): string;
|
|
31
|
-
}
|
|
32
|
-
export declare namespace com.d10ng.common {
|
|
27
|
+
export declare namespace com.d10ng.common.calculate {
|
|
33
28
|
abstract class ChecksumType {
|
|
34
29
|
private constructor();
|
|
35
|
-
static get AND(): com.d10ng.common.ChecksumType & {
|
|
30
|
+
static get AND(): com.d10ng.common.calculate.ChecksumType & {
|
|
36
31
|
get name(): "AND";
|
|
37
32
|
get ordinal(): 0;
|
|
38
33
|
};
|
|
39
|
-
static get OR(): com.d10ng.common.ChecksumType & {
|
|
34
|
+
static get OR(): com.d10ng.common.calculate.ChecksumType & {
|
|
40
35
|
get name(): "OR";
|
|
41
36
|
get ordinal(): 1;
|
|
42
37
|
};
|
|
43
|
-
static get XOR(): com.d10ng.common.ChecksumType & {
|
|
38
|
+
static get XOR(): com.d10ng.common.calculate.ChecksumType & {
|
|
44
39
|
get name(): "XOR";
|
|
45
40
|
get ordinal(): 2;
|
|
46
41
|
};
|
|
47
|
-
static values(): Array<com.d10ng.common.ChecksumType>;
|
|
48
|
-
static valueOf(value: string): com.d10ng.common.ChecksumType;
|
|
42
|
+
static values(): Array<com.d10ng.common.calculate.ChecksumType>;
|
|
43
|
+
static valueOf(value: string): com.d10ng.common.calculate.ChecksumType;
|
|
49
44
|
get name(): "AND" | "OR" | "XOR";
|
|
50
45
|
get ordinal(): 0 | 1 | 2;
|
|
51
46
|
}
|
|
52
|
-
function assertChecksum(_this_: Int8Array, type?: com.d10ng.common.ChecksumType): boolean;
|
|
53
|
-
function getChecksum(_this_: Int8Array, type?: com.d10ng.common.ChecksumType, start?: number,
|
|
54
|
-
function addChecksum(_this_: Int8Array, type?: com.d10ng.common.ChecksumType): Int8Array;
|
|
55
|
-
}
|
|
56
|
-
export declare namespace com.d10ng.common {
|
|
57
|
-
function toStringByDouble(_this_: number, maxDecimalCount: number): string;
|
|
58
|
-
}
|
|
59
|
-
export declare namespace com.d10ng.common {
|
|
60
|
-
function toString(_this_: number, maxDecimalCount: number): string;
|
|
61
|
-
}
|
|
62
|
-
export declare namespace com.d10ng.common {
|
|
63
|
-
function takeHighByte(_this_: number): number;
|
|
64
|
-
function takeLowByte(_this_: number): number;
|
|
65
|
-
function toByteArray(_this_: number): Int8Array;
|
|
47
|
+
function assertChecksum(_this_: Int8Array, type?: com.d10ng.common.calculate.ChecksumType): boolean;
|
|
48
|
+
function getChecksum(_this_: Int8Array, type?: com.d10ng.common.calculate.ChecksumType, start?: number, length?: number): number;
|
|
49
|
+
function addChecksum(_this_: Int8Array, type?: com.d10ng.common.calculate.ChecksumType): Int8Array;
|
|
66
50
|
}
|
|
67
|
-
export declare namespace com.d10ng.common {
|
|
68
|
-
function
|
|
51
|
+
export declare namespace com.d10ng.common.calculate {
|
|
52
|
+
function isDarkColor(color: string): boolean;
|
|
53
|
+
function getNextLevelColor(color: string, level: number): string;
|
|
54
|
+
function getMiddleColor(color1: string, color2: string, present: number): string;
|
|
55
|
+
function getRgbValueArrayFromHexColorString(str: string): Array<number>;
|
|
56
|
+
function getHexColorStringFromRgbValueArray(rgb: Array<number>): string;
|
|
69
57
|
}
|
|
70
|
-
export declare namespace com.d10ng.common {
|
|
71
|
-
function toPinYin(_this_: string, separator?: string): string;
|
|
72
|
-
}
|
|
73
|
-
export declare namespace com.d10ng.common {
|
|
58
|
+
export declare namespace com.d10ng.common.calculate {
|
|
74
59
|
function keepByRegexStr(_this_: string, regStr: string): string;
|
|
75
60
|
function filterByRegexStr(_this_: string, regStr: string): string;
|
|
76
61
|
function isIdCard(_this_: string): boolean;
|
|
@@ -83,14 +68,129 @@ export declare namespace com.d10ng.common {
|
|
|
83
68
|
function isOnlyNumber(_this_: string): boolean;
|
|
84
69
|
function isOnlyCode(_this_: string): boolean;
|
|
85
70
|
function isOnlyChSymbol(_this_: string): boolean;
|
|
71
|
+
function isColor(_this_: string): boolean;
|
|
72
|
+
}
|
|
73
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
74
|
+
class Coordinate {
|
|
75
|
+
constructor(lat?: number, lng?: number);
|
|
76
|
+
get lat(): number;
|
|
77
|
+
set lat(value: number);
|
|
78
|
+
get lng(): number;
|
|
79
|
+
set lng(value: number);
|
|
80
|
+
copy(lat?: number, lng?: number): com.d10ng.common.coordinate.Coordinate;
|
|
81
|
+
toString(): string;
|
|
82
|
+
hashCode(): number;
|
|
83
|
+
equals(other: Nullable<any>): boolean;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
87
|
+
abstract class CoordinateSystemType {
|
|
88
|
+
private constructor();
|
|
89
|
+
static get WGS84(): com.d10ng.common.coordinate.CoordinateSystemType & {
|
|
90
|
+
get name(): "WGS84";
|
|
91
|
+
get ordinal(): 0;
|
|
92
|
+
};
|
|
93
|
+
static get GCJ02(): com.d10ng.common.coordinate.CoordinateSystemType & {
|
|
94
|
+
get name(): "GCJ02";
|
|
95
|
+
get ordinal(): 1;
|
|
96
|
+
};
|
|
97
|
+
static get BD09(): com.d10ng.common.coordinate.CoordinateSystemType & {
|
|
98
|
+
get name(): "BD09";
|
|
99
|
+
get ordinal(): 2;
|
|
100
|
+
};
|
|
101
|
+
static values(): Array<com.d10ng.common.coordinate.CoordinateSystemType>;
|
|
102
|
+
static valueOf(value: string): com.d10ng.common.coordinate.CoordinateSystemType;
|
|
103
|
+
get name(): "WGS84" | "GCJ02" | "BD09";
|
|
104
|
+
get ordinal(): 0 | 1 | 2;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
108
|
+
function convert(_this_: com.d10ng.common.coordinate.Coordinate, from: com.d10ng.common.coordinate.CoordinateSystemType, to: com.d10ng.common.coordinate.CoordinateSystemType): com.d10ng.common.coordinate.Coordinate;
|
|
109
|
+
function isEastLongitude(_this_: number): boolean;
|
|
110
|
+
function isNorthLatitude(_this_: number): boolean;
|
|
111
|
+
function toLongitudeNoPre(_this_: number): number;
|
|
112
|
+
function toLatitudeNoPre(_this_: number): number;
|
|
113
|
+
function toFullLongitude(_this_: number, isEast: boolean, isPositive?: boolean): number;
|
|
114
|
+
function toFullLatitude(_this_: number, isNorth: boolean, isPositive?: boolean): number;
|
|
115
|
+
function toDMS(_this_: number, isLongitude: boolean): com.d10ng.common.coordinate.DMS;
|
|
116
|
+
function toLatLng(_this_: com.d10ng.common.coordinate.DMS): number;
|
|
117
|
+
function toLatLngString(_this_: number, isLongitude: boolean, pattern?: string): string;
|
|
118
|
+
function toLongitudeString(_this_: number, pattern?: string): string;
|
|
119
|
+
function toLatitudeString(_this_: number, pattern?: string): string;
|
|
120
|
+
function toLatLngByString(_this_: string, pattern: string): number;
|
|
121
|
+
function toLongitude(_this_: string, pattern: string): number;
|
|
122
|
+
function toLatitude(_this_: string, pattern: string): number;
|
|
123
|
+
function ddmmpmmmm2LatLng(_this_: number): number;
|
|
124
|
+
function latLng2ddmmpmmmm(_this_: number): number;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
127
|
+
class DMS {
|
|
128
|
+
constructor(degrees?: number, minutes?: number, seconds?: number);
|
|
129
|
+
get degrees(): number;
|
|
130
|
+
set degrees(value: number);
|
|
131
|
+
get minutes(): number;
|
|
132
|
+
set minutes(value: number);
|
|
133
|
+
get seconds(): number;
|
|
134
|
+
set seconds(value: number);
|
|
135
|
+
toString(): string;
|
|
136
|
+
copy(degrees?: number, minutes?: number, seconds?: number): com.d10ng.common.coordinate.DMS;
|
|
137
|
+
hashCode(): number;
|
|
138
|
+
equals(other: Nullable<any>): boolean;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
142
|
+
class DistanceAndBearing {
|
|
143
|
+
constructor(distance?: number, initialBearing?: number, finalBearing?: number);
|
|
144
|
+
get distance(): number;
|
|
145
|
+
set distance(value: number);
|
|
146
|
+
get initialBearing(): number;
|
|
147
|
+
set initialBearing(value: number);
|
|
148
|
+
get finalBearing(): number;
|
|
149
|
+
set finalBearing(value: number);
|
|
150
|
+
copy(distance?: number, initialBearing?: number, finalBearing?: number): com.d10ng.common.coordinate.DistanceAndBearing;
|
|
151
|
+
toString(): string;
|
|
152
|
+
hashCode(): number;
|
|
153
|
+
equals(other: Nullable<any>): boolean;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
export declare namespace com.d10ng.common.coordinate {
|
|
157
|
+
function getDistanceAndBearing(point1: com.d10ng.common.coordinate.Coordinate, point2: com.d10ng.common.coordinate.Coordinate): com.d10ng.common.coordinate.DistanceAndBearing;
|
|
158
|
+
function getDistanceOn2Points(point1: com.d10ng.common.coordinate.Coordinate, point2: com.d10ng.common.coordinate.Coordinate, highPrecision?: boolean): number;
|
|
159
|
+
function toRadians(degree: number): number;
|
|
160
|
+
function toDegrees(radian: number): number;
|
|
161
|
+
function isPointInCircle(point: com.d10ng.common.coordinate.Coordinate, center: com.d10ng.common.coordinate.Coordinate, radius: number): boolean;
|
|
162
|
+
function getAngleOn2Points(point1: com.d10ng.common.coordinate.Coordinate, point2: com.d10ng.common.coordinate.Coordinate, highPrecision?: boolean): number;
|
|
163
|
+
function getPointOn2Points(point1: com.d10ng.common.coordinate.Coordinate, point2: com.d10ng.common.coordinate.Coordinate, present: number): com.d10ng.common.coordinate.Coordinate;
|
|
164
|
+
function getTotalDistance(points: Array<com.d10ng.common.coordinate.Coordinate>): number;
|
|
165
|
+
function getPointsOnDistance(points: Array<com.d10ng.common.coordinate.Coordinate>, distance: number): Array<com.d10ng.common.coordinate.Coordinate>;
|
|
166
|
+
function compressTrack(points: Array<com.d10ng.common.coordinate.Coordinate>): Array<com.d10ng.common.coordinate.Coordinate>;
|
|
167
|
+
function getPointByBasePoint(point: com.d10ng.common.coordinate.Coordinate, distance: number, angle: number): com.d10ng.common.coordinate.Coordinate;
|
|
168
|
+
function getRandomPoint(point: com.d10ng.common.coordinate.Coordinate, radius: number): com.d10ng.common.coordinate.Coordinate;
|
|
169
|
+
function getNearPartsOnLine(point: com.d10ng.common.coordinate.Coordinate, line: Array<com.d10ng.common.coordinate.Coordinate>, offset?: number): Array<number>;
|
|
170
|
+
function getProjectionPointOnLinePart(point: com.d10ng.common.coordinate.Coordinate, part: Array<com.d10ng.common.coordinate.Coordinate>): com.d10ng.common.coordinate.Coordinate;
|
|
171
|
+
function getProjectionPointOnLine(point: com.d10ng.common.coordinate.Coordinate, line: Array<com.d10ng.common.coordinate.Coordinate>): com.d10ng.common.coordinate.Coordinate;
|
|
172
|
+
function getProjectionLineOnLineWithPoint(point: com.d10ng.common.coordinate.Coordinate, targetLine: Array<com.d10ng.common.coordinate.Coordinate>): Array<com.d10ng.common.coordinate.Coordinate>;
|
|
173
|
+
function getProjectionLineOnLineWithLine(line: Array<com.d10ng.common.coordinate.Coordinate>, targetLine: Array<com.d10ng.common.coordinate.Coordinate>, offset?: number): Array<com.d10ng.common.coordinate.Coordinate>;
|
|
174
|
+
}
|
|
175
|
+
export declare namespace com.d10ng.common.transform {
|
|
176
|
+
function encodeGBK(_this_: string): Int8Array;
|
|
177
|
+
function decodeGBK(_this_: Int8Array): string;
|
|
178
|
+
function encodeUTF8(_this_: string): Int8Array;
|
|
179
|
+
function decodeUTF8(_this_: Int8Array): string;
|
|
180
|
+
function encodeUnicode(_this_: string): Int8Array;
|
|
181
|
+
function encodeUnicodeString(_this_: string, isNeedU?: boolean): string;
|
|
182
|
+
function decodeUnicode(_this_: Int8Array): string;
|
|
183
|
+
function decodeUnicodeString(_this_: string): string;
|
|
184
|
+
function encodeASCII(_this_: string): Int8Array;
|
|
185
|
+
function encodeASCIIString(_this_: string): string;
|
|
186
|
+
function decodeASCII(_this_: Int8Array): string;
|
|
187
|
+
function decodeASCIIString(_this_: string): string;
|
|
188
|
+
}
|
|
189
|
+
export declare namespace com.d10ng.common.transform {
|
|
190
|
+
function toPinYin(_this_: string, separator?: string): string;
|
|
86
191
|
}
|
|
87
|
-
export declare namespace com.d10ng.common {
|
|
88
|
-
function
|
|
89
|
-
function
|
|
90
|
-
function toByteFromHex(_this_: string): number;
|
|
91
|
-
function toByteArrayFromHex(_this_: string): Int8Array;
|
|
92
|
-
function fillLength(_this_: string, length: number, filler?: any/* kotlin.Char */, isInStart?: boolean, isForced?: boolean): string;
|
|
93
|
-
function getByteLength(_this_: string): number;
|
|
94
|
-
function getFirstUpperCase(_this_: string): string;
|
|
192
|
+
export declare namespace com.d10ng.common.base {
|
|
193
|
+
function numberToString(_this_: any/* kotlin.Number */, maxDecimalCount: number): string;
|
|
194
|
+
function numberToByteArray(_this_: any/* kotlin.Number */, size?: number): Int8Array;
|
|
95
195
|
}
|
|
96
|
-
export as namespace
|
|
196
|
+
export as namespace com_github_D10NGYANG_DLCommonUtil;
|