slimsdk 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- export { cfg } from '../mod/config/index.js';
2
- export { i as page } from '../index-DCw_tM-R.js';
3
- export { i as apiHub, d as docs, a as oauth, b as wssHub } from '../index-3POan8Vl.js';
4
- export { i as lib } from '../index-DWqF-tKY.js';
1
+ export { i as apiHub, c as cfg, a as oauth, b as wssHub } from '../index-D_o5c-YA.js';
2
+ export { i as page } from '../index-COGi5mfY.js';
3
+ export { d as docs } from '../docs-BHtSyl34.js';
4
+ export { i as lib } from '../index-Cvng8f_u.js';
5
5
  export { i as mod } from '../index-jVam7Sxi.js';
6
6
  export { i as info, a as init } from '../index-BMqjxP9I.js';
7
7
  import '../page/index.js';
8
- import '../mod/hwlink/index.js';
8
+ import '../index-COUeXLOQ.js';
9
9
  import '../index-BAQxKstM.js';
10
10
  import '../index-Dm_WTy_S.js';
11
11
  import '../index-D5CUpF9v.js';
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // package.json
8
- var version = "0.2.0";
8
+ var version = "0.2.1";
9
9
 
10
10
  // src/config/global.ts
11
11
  var info = () => `sdk ${version}`;
@@ -951,6 +951,7 @@ __export(lib_exports, {
951
951
  getAge: () => getAge,
952
952
  isToday: () => isToday,
953
953
  jwtParse: () => jwtParse,
954
+ md5Hash: () => md5Hash,
954
955
  numFormat: () => numFormat,
955
956
  setYear: () => setYear,
956
957
  shiftIndex: () => shiftIndex,
@@ -1434,6 +1435,198 @@ function ThaiBahtText(input) {
1434
1435
  }
1435
1436
  var thbText = ThaiBahtText;
1436
1437
 
1438
+ // src/lib/md5.ts
1439
+ function safeAdd(x, y) {
1440
+ const lsw = (x & 65535) + (y & 65535);
1441
+ const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
1442
+ return msw << 16 | lsw & 65535;
1443
+ }
1444
+ function bitRotateLeft(num, cnt) {
1445
+ return num << cnt | num >>> 32 - cnt;
1446
+ }
1447
+ function md5cmn(q, a, b, x, s, t) {
1448
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
1449
+ }
1450
+ function md5ff(a, b, c, d, x, s, t) {
1451
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
1452
+ }
1453
+ function md5gg(a, b, c, d, x, s, t) {
1454
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
1455
+ }
1456
+ function md5hh(a, b, c, d, x, s, t) {
1457
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
1458
+ }
1459
+ function md5ii(a, b, c, d, x, s, t) {
1460
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
1461
+ }
1462
+ function binlMD5(x, len) {
1463
+ x[len >> 5] |= 128 << len % 32;
1464
+ x[(len + 64 >>> 9 << 4) + 14] = len;
1465
+ let i;
1466
+ let olda;
1467
+ let oldb;
1468
+ let oldc;
1469
+ let oldd;
1470
+ let a = 1732584193;
1471
+ let b = -271733879;
1472
+ let c = -1732584194;
1473
+ let d = 271733878;
1474
+ for (i = 0; i < x.length; i += 16) {
1475
+ olda = a;
1476
+ oldb = b;
1477
+ oldc = c;
1478
+ oldd = d;
1479
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
1480
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
1481
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
1482
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
1483
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
1484
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
1485
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
1486
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
1487
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
1488
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
1489
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
1490
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
1491
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
1492
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
1493
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
1494
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
1495
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
1496
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
1497
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
1498
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
1499
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
1500
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
1501
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
1502
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
1503
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
1504
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
1505
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
1506
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
1507
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
1508
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
1509
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
1510
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
1511
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
1512
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
1513
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
1514
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
1515
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
1516
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
1517
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
1518
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
1519
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
1520
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
1521
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
1522
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
1523
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
1524
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
1525
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
1526
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
1527
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
1528
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
1529
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
1530
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
1531
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
1532
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
1533
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
1534
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
1535
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
1536
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
1537
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
1538
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
1539
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
1540
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
1541
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
1542
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
1543
+ a = safeAdd(a, olda);
1544
+ b = safeAdd(b, oldb);
1545
+ c = safeAdd(c, oldc);
1546
+ d = safeAdd(d, oldd);
1547
+ }
1548
+ return [a, b, c, d];
1549
+ }
1550
+ function binl2rstr(input) {
1551
+ let i;
1552
+ let output = "";
1553
+ const length32 = input.length * 32;
1554
+ for (i = 0; i < length32; i += 8) {
1555
+ output += String.fromCharCode(input[i >> 5] >>> i % 32 & 255);
1556
+ }
1557
+ return output;
1558
+ }
1559
+ function rstr2binl(input) {
1560
+ let i;
1561
+ const output = [];
1562
+ output[(input.length >> 2) - 1] = void 0;
1563
+ for (i = 0; i < output.length; i += 1) {
1564
+ output[i] = 0;
1565
+ }
1566
+ const length8 = input.length * 8;
1567
+ for (i = 0; i < length8; i += 8) {
1568
+ output[i >> 5] |= (input.charCodeAt(i / 8) & 255) << i % 32;
1569
+ }
1570
+ return output;
1571
+ }
1572
+ function rstrMD5(s) {
1573
+ return binl2rstr(binlMD5(rstr2binl(s), s.length * 8));
1574
+ }
1575
+ function rstrHMACMD5(key, data) {
1576
+ let i;
1577
+ let bkey = rstr2binl(key);
1578
+ const ipad = [];
1579
+ const opad = [];
1580
+ ipad[15] = opad[15] = void 0;
1581
+ if (bkey.length > 16) {
1582
+ bkey = binlMD5(bkey, key.length * 8);
1583
+ }
1584
+ for (i = 0; i < 16; i += 1) {
1585
+ ipad[i] = bkey[i] ^ 909522486;
1586
+ opad[i] = bkey[i] ^ 1549556828;
1587
+ }
1588
+ const hash = binlMD5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
1589
+ return binl2rstr(binlMD5(opad.concat(hash), 512 + 128));
1590
+ }
1591
+ function rstr2hex(input) {
1592
+ const hexTab = "0123456789abcdef";
1593
+ let output = "";
1594
+ let x;
1595
+ let i;
1596
+ for (i = 0; i < input.length; i += 1) {
1597
+ x = input.charCodeAt(i);
1598
+ output += hexTab.charAt(x >>> 4 & 15) + hexTab.charAt(x & 15);
1599
+ }
1600
+ return output;
1601
+ }
1602
+ function str2rstrUTF8(input) {
1603
+ return decodeURIComponent(encodeURIComponent(input));
1604
+ }
1605
+ function rawMD5(s) {
1606
+ return rstrMD5(str2rstrUTF8(s));
1607
+ }
1608
+ function hexMD5(s) {
1609
+ return rstr2hex(rawMD5(s));
1610
+ }
1611
+ function rawHMACMD5(k, d) {
1612
+ return rstrHMACMD5(str2rstrUTF8(k), str2rstrUTF8(d));
1613
+ }
1614
+ function hexHMACMD5(k, d) {
1615
+ return rstr2hex(rawHMACMD5(k, d));
1616
+ }
1617
+ function md5Hash(string, key, raw) {
1618
+ if (!key) {
1619
+ if (!raw) {
1620
+ return hexMD5(string);
1621
+ }
1622
+ return rawMD5(string);
1623
+ }
1624
+ if (!raw) {
1625
+ return hexHMACMD5(key, string);
1626
+ }
1627
+ return rawHMACMD5(key, string);
1628
+ }
1629
+
1437
1630
  // src/mod/index.ts
1438
1631
  var mod_exports = {};
1439
1632
  __export(mod_exports, {
@@ -2042,6 +2235,56 @@ var tempLogout = (
2042
2235
  <!-- loader -->
2043
2236
  <div id="loader"></div>
2044
2237
  </div>
2238
+ <style>
2239
+ #app:has(#page-logout) {
2240
+ padding: 0;
2241
+ }
2242
+ #page-logout {
2243
+ width: 100%;
2244
+ height: 100%;
2245
+ position: fixed;
2246
+ display: flex;
2247
+ flex-direction: column;
2248
+ justify-content: center;
2249
+ align-items: center;
2250
+ background-position: center;
2251
+ background-repeat: no-repeat;
2252
+ background-size: cover;
2253
+ background-image: url('https://cdn.jsdelivr.net/npm/slimsdk/dist/assets/bg/bg-01.jpg');
2254
+ }
2255
+ #page-logout #content {
2256
+ display: none;
2257
+ text-align: center;
2258
+ animation: fadeIn 0.4s;
2259
+ }
2260
+ #page-logout #content .logo {
2261
+ margin: auto;
2262
+ width: 150px;
2263
+ height: 150px;
2264
+ margin-bottom: 20px;
2265
+ border-radius: 50%;
2266
+ background-color: rgba(255, 255, 255, 0.2);
2267
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2),
2268
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
2269
+ }
2270
+ #page-logout #content .logo img {
2271
+ width: 100%;
2272
+ height: 100%;
2273
+ border-radius: 50%;
2274
+ }
2275
+ #page-logout #content #btn-login {
2276
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px,
2277
+ rgba(0, 0, 0, 0.23) 0px 3px 6px;
2278
+ }
2279
+ #page-logout #loader {
2280
+ width: 110px;
2281
+ height: 110px;
2282
+ border-radius: 50%;
2283
+ border: 11px solid #E5E7EB;
2284
+ border-color: #E5E7EB #06B6D4 #E5E7EB #06B6D4;
2285
+ animation: spin 2s linear infinite;
2286
+ }
2287
+ </style>
2045
2288
  `
2046
2289
  );
2047
2290