jww-parser 2025.12.13 → 2026.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +400 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +400 -284
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1002,8 +1002,8 @@ const moonbitlang$core$builtin$$wasm_helper_cache = {
|
|
|
1002
1002
|
};
|
|
1003
1003
|
const moonbitlang$core$builtin$$output$46$42$bind$124$8198 = "/";
|
|
1004
1004
|
const moonbitlang$core$builtin$$output$46$42$bind$124$8192 = "/";
|
|
1005
|
-
const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$
|
|
1006
|
-
const moonbitlang$core$builtin$$brute_force_find$46$constr$47$
|
|
1005
|
+
const moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$65 = 0;
|
|
1006
|
+
const moonbitlang$core$builtin$$brute_force_find$46$constr$47$79 = 0;
|
|
1007
1007
|
const moonbitlang$core$double$internal$ryu$$gDOUBLE_POW5_INV_SPLIT2 = [
|
|
1008
1008
|
$1L,
|
|
1009
1009
|
$2305843009213693952L,
|
|
@@ -1136,7 +1136,7 @@ const moonbitlang$core$double$internal$ryu$$gDOUBLE_POW5_TABLE = [
|
|
|
1136
1136
|
$59604644775390625L,
|
|
1137
1137
|
$298023223876953125L
|
|
1138
1138
|
];
|
|
1139
|
-
const moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$
|
|
1139
|
+
const moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$864 = {
|
|
1140
1140
|
mantissa: $0L,
|
|
1141
1141
|
exponent: 0
|
|
1142
1142
|
};
|
|
@@ -1473,17 +1473,17 @@ const moonbitlang$core$strconv$$table = [
|
|
|
1473
1473
|
];
|
|
1474
1474
|
const moonbitlang$core$strconv$$max_exponent_disguised_fast_path = $37L;
|
|
1475
1475
|
const moonbitlang$core$strconv$$min_exponent_fast_path = $_22L;
|
|
1476
|
-
const moonbitlang$core$strconv$$checked_mul$46$constr$47$
|
|
1477
|
-
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
1478
|
-
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
1479
|
-
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
1480
|
-
const f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$
|
|
1481
|
-
const f4ah6o$jww_parser$core$$default$46$record$47$
|
|
1476
|
+
const moonbitlang$core$strconv$$checked_mul$46$constr$47$1337 = $0L;
|
|
1477
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$940 = "Printer_";
|
|
1478
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$941 = "Draw_";
|
|
1479
|
+
const f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$942 = "View_";
|
|
1480
|
+
const f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$945 = "%temp%";
|
|
1481
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1387 = {
|
|
1482
1482
|
state: 2,
|
|
1483
1483
|
protect: 0,
|
|
1484
1484
|
name: ""
|
|
1485
1485
|
};
|
|
1486
|
-
const f4ah6o$jww_parser$core$$default$46$record$47$
|
|
1486
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1391 = {
|
|
1487
1487
|
printer_paper_size: "",
|
|
1488
1488
|
draw_bmp_touka: "",
|
|
1489
1489
|
view_direct2d: "",
|
|
@@ -1491,64 +1491,73 @@ const f4ah6o$jww_parser$core$$default$46$record$47$1385 = {
|
|
|
1491
1491
|
printer_orientation: "",
|
|
1492
1492
|
printer_d2d_bmp: ""
|
|
1493
1493
|
};
|
|
1494
|
-
const f4ah6o$jww_parser$core$$default$46$record$47$
|
|
1494
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1392 = {
|
|
1495
|
+
sunpou1: 0,
|
|
1496
|
+
sunpou2: 0,
|
|
1497
|
+
sunpou3: 0,
|
|
1498
|
+
sunpou4: 0,
|
|
1499
|
+
sunpou5: 0,
|
|
1500
|
+
dummy: 0,
|
|
1501
|
+
max_line_width: 0
|
|
1502
|
+
};
|
|
1503
|
+
const f4ah6o$jww_parser$core$$default$46$record$47$1393 = {
|
|
1495
1504
|
origin_x: 0,
|
|
1496
1505
|
origin_y: 0,
|
|
1497
1506
|
scale: 1,
|
|
1498
1507
|
rotation_setting: 0
|
|
1499
1508
|
};
|
|
1500
|
-
const f4ah6o$jww_parser$core$$parse$46$constr$47$
|
|
1501
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1509
|
+
const f4ah6o$jww_parser$core$$parse$46$constr$47$1778 = 8;
|
|
1510
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1820 = {
|
|
1502
1511
|
_0: "CONTINUOUS",
|
|
1503
1512
|
_1: "Solid line",
|
|
1504
1513
|
_2: ""
|
|
1505
1514
|
};
|
|
1506
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1515
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1821 = {
|
|
1507
1516
|
_0: "DASHED",
|
|
1508
1517
|
_1: "Dashed",
|
|
1509
1518
|
_2: ""
|
|
1510
1519
|
};
|
|
1511
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1520
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1822 = {
|
|
1512
1521
|
_0: "DOTTED",
|
|
1513
1522
|
_1: "Dotted",
|
|
1514
1523
|
_2: ""
|
|
1515
1524
|
};
|
|
1516
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1525
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1823 = {
|
|
1517
1526
|
_0: "DASHDOT",
|
|
1518
1527
|
_1: "Dash dot",
|
|
1519
1528
|
_2: ""
|
|
1520
1529
|
};
|
|
1521
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1530
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1824 = {
|
|
1522
1531
|
_0: "DOT2",
|
|
1523
1532
|
_1: "Dot (small)",
|
|
1524
1533
|
_2: ""
|
|
1525
1534
|
};
|
|
1526
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1535
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1825 = {
|
|
1527
1536
|
_0: "DASHDOT2",
|
|
1528
1537
|
_1: "Dash dot (small)",
|
|
1529
1538
|
_2: ""
|
|
1530
1539
|
};
|
|
1531
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1540
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1826 = {
|
|
1532
1541
|
_0: "DASHDOTDOT",
|
|
1533
1542
|
_1: "Dash dot dot",
|
|
1534
1543
|
_2: ""
|
|
1535
1544
|
};
|
|
1536
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1545
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1827 = {
|
|
1537
1546
|
_0: "DIVIDE",
|
|
1538
1547
|
_1: "Divide",
|
|
1539
1548
|
_2: ""
|
|
1540
1549
|
};
|
|
1541
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1550
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1828 = {
|
|
1542
1551
|
_0: "CENTER",
|
|
1543
1552
|
_1: "Center",
|
|
1544
1553
|
_2: ""
|
|
1545
1554
|
};
|
|
1546
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1555
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1829 = {
|
|
1547
1556
|
_0: "BORDER",
|
|
1548
1557
|
_1: "Border",
|
|
1549
1558
|
_2: ""
|
|
1550
1559
|
};
|
|
1551
|
-
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
1560
|
+
const f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1830 = {
|
|
1552
1561
|
_0: "HIDDEN",
|
|
1553
1562
|
_1: "Hidden",
|
|
1554
1563
|
_2: ""
|
|
@@ -1636,21 +1645,28 @@ function moonbitlang$core$array$$Array$at$13$(self, index) {
|
|
|
1636
1645
|
return self[index];
|
|
1637
1646
|
} else return $panic();
|
|
1638
1647
|
}
|
|
1639
|
-
function moonbitlang$core$array$$Array$at$
|
|
1648
|
+
function moonbitlang$core$array$$Array$at$14$(self, index) {
|
|
1640
1649
|
const len = self.length;
|
|
1641
1650
|
if (index >= 0 && index < len) {
|
|
1642
1651
|
$bound_check(self, index);
|
|
1643
1652
|
return self[index];
|
|
1644
1653
|
} else return $panic();
|
|
1645
1654
|
}
|
|
1646
|
-
function moonbitlang$core$array$$Array$at$
|
|
1655
|
+
function moonbitlang$core$array$$Array$at$15$(self, index) {
|
|
1647
1656
|
const len = self.length;
|
|
1648
1657
|
if (index >= 0 && index < len) {
|
|
1649
1658
|
$bound_check(self, index);
|
|
1650
1659
|
return self[index];
|
|
1651
1660
|
} else return $panic();
|
|
1652
1661
|
}
|
|
1653
|
-
function moonbitlang$core$array$$Array$at$
|
|
1662
|
+
function moonbitlang$core$array$$Array$at$4$(self, index) {
|
|
1663
|
+
const len = self.length;
|
|
1664
|
+
if (index >= 0 && index < len) {
|
|
1665
|
+
$bound_check(self, index);
|
|
1666
|
+
return self[index];
|
|
1667
|
+
} else return $panic();
|
|
1668
|
+
}
|
|
1669
|
+
function moonbitlang$core$array$$Array$at$16$(self, index) {
|
|
1654
1670
|
const len = self.length;
|
|
1655
1671
|
if (index >= 0 && index < len) {
|
|
1656
1672
|
$bound_check(self, index);
|
|
@@ -1707,7 +1723,7 @@ function moonbitlang$core$builtin$$boyer_moore_horspool_find(haystack, needle) {
|
|
|
1707
1723
|
}
|
|
1708
1724
|
return;
|
|
1709
1725
|
} else return;
|
|
1710
|
-
else return moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$
|
|
1726
|
+
else return moonbitlang$core$builtin$$boyer_moore_horspool_find$46$constr$47$65;
|
|
1711
1727
|
}
|
|
1712
1728
|
function moonbitlang$core$builtin$$brute_force_find(haystack, needle) {
|
|
1713
1729
|
const haystack_len = haystack.end - haystack.start | 0;
|
|
@@ -1755,7 +1771,7 @@ function moonbitlang$core$builtin$$brute_force_find(haystack, needle) {
|
|
|
1755
1771
|
} else break;
|
|
1756
1772
|
return;
|
|
1757
1773
|
} else return;
|
|
1758
|
-
else return moonbitlang$core$builtin$$brute_force_find$46$constr$47$
|
|
1774
|
+
else return moonbitlang$core$builtin$$brute_force_find$46$constr$47$79;
|
|
1759
1775
|
}
|
|
1760
1776
|
function moonbitlang$core$string$$StringView$find(self, str) {
|
|
1761
1777
|
return (str.end - str.start | 0) <= 4 ? moonbitlang$core$builtin$$brute_force_find(self, str) : moonbitlang$core$builtin$$boyer_moore_horspool_find(self, str);
|
|
@@ -1979,31 +1995,31 @@ function moonbitlang$core$builtin$$MyInt64$from_int(value) {
|
|
|
1979
1995
|
function moonbitlang$core$int$$Int$to_int64(self) {
|
|
1980
1996
|
return moonbitlang$core$builtin$$MyInt64$from_int(self);
|
|
1981
1997
|
}
|
|
1982
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
1998
|
+
function moonbitlang$core$builtin$$Compare$op_lt$17$(x, y) {
|
|
1983
1999
|
return $compare_int(x, y) < 0;
|
|
1984
2000
|
}
|
|
1985
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
2001
|
+
function moonbitlang$core$builtin$$Compare$op_lt$18$(x, y) {
|
|
1986
2002
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) < 0;
|
|
1987
2003
|
}
|
|
1988
|
-
function moonbitlang$core$builtin$$Compare$op_lt$
|
|
1989
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2004
|
+
function moonbitlang$core$builtin$$Compare$op_lt$19$(x, y) {
|
|
2005
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) < 0;
|
|
1990
2006
|
}
|
|
1991
|
-
function moonbitlang$core$builtin$$Compare$op_gt$
|
|
2007
|
+
function moonbitlang$core$builtin$$Compare$op_gt$18$(x, y) {
|
|
1992
2008
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) > 0;
|
|
1993
2009
|
}
|
|
1994
|
-
function moonbitlang$core$builtin$$Compare$op_gt$
|
|
1995
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2010
|
+
function moonbitlang$core$builtin$$Compare$op_gt$19$(x, y) {
|
|
2011
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) > 0;
|
|
1996
2012
|
}
|
|
1997
|
-
function moonbitlang$core$builtin$$Compare$op_le$
|
|
2013
|
+
function moonbitlang$core$builtin$$Compare$op_le$18$(x, y) {
|
|
1998
2014
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) <= 0;
|
|
1999
2015
|
}
|
|
2000
|
-
function moonbitlang$core$builtin$$Compare$op_le$
|
|
2001
|
-
return moonbitlang$core$builtin$$Compare$compare$
|
|
2016
|
+
function moonbitlang$core$builtin$$Compare$op_le$19$(x, y) {
|
|
2017
|
+
return moonbitlang$core$builtin$$Compare$compare$20$(x, y) <= 0;
|
|
2002
2018
|
}
|
|
2003
|
-
function moonbitlang$core$builtin$$Compare$op_ge$
|
|
2019
|
+
function moonbitlang$core$builtin$$Compare$op_ge$17$(x, y) {
|
|
2004
2020
|
return $compare_int(x, y) >= 0;
|
|
2005
2021
|
}
|
|
2006
|
-
function moonbitlang$core$builtin$$Compare$op_ge$
|
|
2022
|
+
function moonbitlang$core$builtin$$Compare$op_ge$18$(x, y) {
|
|
2007
2023
|
return moonbitlang$core$builtin$$Compare$compare$2$(x, y) >= 0;
|
|
2008
2024
|
}
|
|
2009
2025
|
function moonbitlang$core$string$$String$sub$46$inner(self, start, end) {
|
|
@@ -2051,7 +2067,7 @@ function moonbitlang$core$builtin$$Logger$write_substring$1$(self, value, start,
|
|
|
2051
2067
|
}
|
|
2052
2068
|
moonbitlang$core$builtin$$Logger$write_view$0$(self, _tmp);
|
|
2053
2069
|
}
|
|
2054
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2070
|
+
function moonbitlang$core$builtin$$Show$to_string$21$(self) {
|
|
2055
2071
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2056
2072
|
moonbitlang$core$builtin$$Show$output$8$(self, {
|
|
2057
2073
|
self: logger,
|
|
@@ -2061,13 +2077,13 @@ function moonbitlang$core$builtin$$Show$to_string$20$(self) {
|
|
|
2061
2077
|
}
|
|
2062
2078
|
function moonbitlang$core$builtin$$Show$to_string$10$(self) {
|
|
2063
2079
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2064
|
-
moonbitlang$core$builtin$$Show$output$
|
|
2080
|
+
moonbitlang$core$builtin$$Show$output$22$(self, {
|
|
2065
2081
|
self: logger,
|
|
2066
2082
|
method_table: $$$64$moonbitlang$47$core$47$builtin$46$StringBuilder$36$as$36$64$moonbitlang$47$core$47$builtin$46$Logger
|
|
2067
2083
|
});
|
|
2068
2084
|
return logger.val;
|
|
2069
2085
|
}
|
|
2070
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2086
|
+
function moonbitlang$core$builtin$$Show$to_string$18$(self) {
|
|
2071
2087
|
const logger = moonbitlang$core$builtin$$StringBuilder$new$46$inner(0);
|
|
2072
2088
|
moonbitlang$core$builtin$$Show$output$2$(self, {
|
|
2073
2089
|
self: logger,
|
|
@@ -2090,13 +2106,13 @@ function moonbitlang$core$uint16$$UInt16$to_string$46$inner(self, radix) {
|
|
|
2090
2106
|
function moonbitlang$core$builtin$$Show$to_string$6$(self) {
|
|
2091
2107
|
return self.str.substring(self.start, self.end);
|
|
2092
2108
|
}
|
|
2093
|
-
function moonbitlang$core$builtin$$Iterator$next$
|
|
2109
|
+
function moonbitlang$core$builtin$$Iterator$next$16$(self) {
|
|
2094
2110
|
return self();
|
|
2095
2111
|
}
|
|
2096
|
-
function moonbitlang$core$builtin$$Iterator$iter$
|
|
2112
|
+
function moonbitlang$core$builtin$$Iterator$iter$16$(self) {
|
|
2097
2113
|
return (yield_) => {
|
|
2098
2114
|
while (true) {
|
|
2099
|
-
const _bind = moonbitlang$core$builtin$$Iterator$next$
|
|
2115
|
+
const _bind = moonbitlang$core$builtin$$Iterator$next$16$(self);
|
|
2100
2116
|
if (_bind === -1) return 1;
|
|
2101
2117
|
else {
|
|
2102
2118
|
if (yield_(_bind) === 1) {} else return 0;
|
|
@@ -2225,10 +2241,7 @@ function moonbitlang$core$string$$String$has_prefix(self, str) {
|
|
|
2225
2241
|
function moonbitlang$core$array$$Array$new$46$inner$12$(capacity) {
|
|
2226
2242
|
return [];
|
|
2227
2243
|
}
|
|
2228
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2229
|
-
return [];
|
|
2230
|
-
}
|
|
2231
|
-
function moonbitlang$core$array$$Array$new$46$inner$22$(capacity) {
|
|
2244
|
+
function moonbitlang$core$array$$Array$new$46$inner$14$(capacity) {
|
|
2232
2245
|
return [];
|
|
2233
2246
|
}
|
|
2234
2247
|
function moonbitlang$core$array$$Array$new$46$inner$23$(capacity) {
|
|
@@ -2237,10 +2250,13 @@ function moonbitlang$core$array$$Array$new$46$inner$23$(capacity) {
|
|
|
2237
2250
|
function moonbitlang$core$array$$Array$new$46$inner$24$(capacity) {
|
|
2238
2251
|
return [];
|
|
2239
2252
|
}
|
|
2240
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2253
|
+
function moonbitlang$core$array$$Array$new$46$inner$25$(capacity) {
|
|
2241
2254
|
return [];
|
|
2242
2255
|
}
|
|
2243
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2256
|
+
function moonbitlang$core$array$$Array$new$46$inner$15$(capacity) {
|
|
2257
|
+
return [];
|
|
2258
|
+
}
|
|
2259
|
+
function moonbitlang$core$array$$Array$new$46$inner$13$(capacity) {
|
|
2244
2260
|
return [];
|
|
2245
2261
|
}
|
|
2246
2262
|
function moonbitlang$core$array$$Array$new$46$inner$26$(capacity) {
|
|
@@ -2249,19 +2265,22 @@ function moonbitlang$core$array$$Array$new$46$inner$26$(capacity) {
|
|
|
2249
2265
|
function moonbitlang$core$array$$Array$new$46$inner$27$(capacity) {
|
|
2250
2266
|
return [];
|
|
2251
2267
|
}
|
|
2252
|
-
function moonbitlang$core$array$$Array$new$46$inner$
|
|
2268
|
+
function moonbitlang$core$array$$Array$new$46$inner$28$(capacity) {
|
|
2253
2269
|
return [];
|
|
2254
2270
|
}
|
|
2255
|
-
function moonbitlang$core$array$$Array$
|
|
2271
|
+
function moonbitlang$core$array$$Array$new$46$inner$16$(capacity) {
|
|
2272
|
+
return [];
|
|
2273
|
+
}
|
|
2274
|
+
function moonbitlang$core$array$$Array$push$14$(self, value) {
|
|
2256
2275
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2257
2276
|
}
|
|
2258
2277
|
function moonbitlang$core$array$$Array$push$12$(self, value) {
|
|
2259
2278
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2260
2279
|
}
|
|
2261
|
-
function moonbitlang$core$array$$Array$push$
|
|
2280
|
+
function moonbitlang$core$array$$Array$push$13$(self, value) {
|
|
2262
2281
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2263
2282
|
}
|
|
2264
|
-
function moonbitlang$core$array$$Array$push$
|
|
2283
|
+
function moonbitlang$core$array$$Array$push$15$(self, value) {
|
|
2265
2284
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2266
2285
|
}
|
|
2267
2286
|
function moonbitlang$core$array$$Array$push$23$(self, value) {
|
|
@@ -2279,7 +2298,10 @@ function moonbitlang$core$array$$Array$push$26$(self, value) {
|
|
|
2279
2298
|
function moonbitlang$core$array$$Array$push$27$(self, value) {
|
|
2280
2299
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2281
2300
|
}
|
|
2282
|
-
function moonbitlang$core$array$$Array$push$
|
|
2301
|
+
function moonbitlang$core$array$$Array$push$28$(self, value) {
|
|
2302
|
+
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2303
|
+
}
|
|
2304
|
+
function moonbitlang$core$array$$Array$push$16$(self, value) {
|
|
2283
2305
|
moonbitlang$core$builtin$$JSArray$push(self, value);
|
|
2284
2306
|
}
|
|
2285
2307
|
function moonbitlang$core$string$$StringView$is_empty(self) {
|
|
@@ -2308,12 +2330,12 @@ function moonbitlang$core$string$$String$iterator(self) {
|
|
|
2308
2330
|
return _p;
|
|
2309
2331
|
}
|
|
2310
2332
|
function moonbitlang$core$string$$String$iter(self) {
|
|
2311
|
-
return moonbitlang$core$builtin$$Iterator$iter$
|
|
2333
|
+
return moonbitlang$core$builtin$$Iterator$iter$16$(moonbitlang$core$string$$String$iterator(self));
|
|
2312
2334
|
}
|
|
2313
|
-
function moonbitlang$core$builtin$$Show$to_string$
|
|
2335
|
+
function moonbitlang$core$builtin$$Show$to_string$16$(self) {
|
|
2314
2336
|
return String.fromCodePoint(self);
|
|
2315
2337
|
}
|
|
2316
|
-
function moonbitlang$core$builtin$$Iter$each$
|
|
2338
|
+
function moonbitlang$core$builtin$$Iter$each$29$(self, f) {
|
|
2317
2339
|
const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$2$ };
|
|
2318
2340
|
self((a) => {
|
|
2319
2341
|
f(a);
|
|
@@ -2334,20 +2356,20 @@ function moonbitlang$core$builtin$$Iter$each$28$(self, f) {
|
|
|
2334
2356
|
return;
|
|
2335
2357
|
}
|
|
2336
2358
|
}
|
|
2337
|
-
function moonbitlang$core$builtin$$Iter$collect$
|
|
2359
|
+
function moonbitlang$core$builtin$$Iter$collect$16$(self) {
|
|
2338
2360
|
const result = [];
|
|
2339
|
-
moonbitlang$core$builtin$$Iter$each$
|
|
2340
|
-
moonbitlang$core$array$$Array$push$
|
|
2361
|
+
moonbitlang$core$builtin$$Iter$each$29$(self, (e) => {
|
|
2362
|
+
moonbitlang$core$array$$Array$push$16$(result, e);
|
|
2341
2363
|
});
|
|
2342
2364
|
return result;
|
|
2343
2365
|
}
|
|
2344
2366
|
function moonbitlang$core$string$$String$to_array(self) {
|
|
2345
2367
|
const _p = moonbitlang$core$string$$String$iter(self);
|
|
2346
|
-
const _p$3 = { val: moonbitlang$core$array$$Array$new$46$inner$
|
|
2368
|
+
const _p$3 = { val: moonbitlang$core$array$$Array$new$46$inner$16$(self.length) };
|
|
2347
2369
|
const _p$4 = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$1$ };
|
|
2348
2370
|
_p((_p$5) => {
|
|
2349
2371
|
const _p$6 = _p$3.val;
|
|
2350
|
-
moonbitlang$core$array$$Array$push$
|
|
2372
|
+
moonbitlang$core$array$$Array$push$16$(_p$6, _p$5);
|
|
2351
2373
|
_p$3.val = _p$6;
|
|
2352
2374
|
return 1;
|
|
2353
2375
|
});
|
|
@@ -2371,7 +2393,7 @@ function moonbitlang$core$builtin$$Show$output$8$(self, logger) {
|
|
|
2371
2393
|
function moonbitlang$core$builtin$$Show$output$2$(self, logger) {
|
|
2372
2394
|
logger.method_table.method_0(logger.self, moonbitlang$core$uint64$$UInt64$to_string$46$inner(self, 10));
|
|
2373
2395
|
}
|
|
2374
|
-
function moonbitlang$core$array$$ArrayView$iterator$
|
|
2396
|
+
function moonbitlang$core$array$$ArrayView$iterator$16$(self) {
|
|
2375
2397
|
const i = { val: 0 };
|
|
2376
2398
|
const _p = () => {
|
|
2377
2399
|
if (i.val < (self.end - self.start | 0)) {
|
|
@@ -2382,8 +2404,8 @@ function moonbitlang$core$array$$ArrayView$iterator$15$(self) {
|
|
|
2382
2404
|
};
|
|
2383
2405
|
return _p;
|
|
2384
2406
|
}
|
|
2385
|
-
function moonbitlang$core$array$$ArrayView$iter$
|
|
2386
|
-
return moonbitlang$core$builtin$$Iterator$iter$
|
|
2407
|
+
function moonbitlang$core$array$$ArrayView$iter$16$(self) {
|
|
2408
|
+
return moonbitlang$core$builtin$$Iterator$iter$16$(moonbitlang$core$array$$ArrayView$iterator$16$(self));
|
|
2387
2409
|
}
|
|
2388
2410
|
function moonbitlang$core$array$$ArrayView$at$4$(self, index) {
|
|
2389
2411
|
if (index >= 0 && index < (self.end - self.start | 0)) {
|
|
@@ -2391,7 +2413,7 @@ function moonbitlang$core$array$$ArrayView$at$4$(self, index) {
|
|
|
2391
2413
|
const _tmp$2 = self.start + index | 0;
|
|
2392
2414
|
$bound_check(_tmp, _tmp$2);
|
|
2393
2415
|
return _tmp[_tmp$2];
|
|
2394
|
-
} else return moonbitlang$core$builtin$$abort$4$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$
|
|
2416
|
+
} else return moonbitlang$core$builtin$$abort$4$(`index out of bounds: the len is from 0 to ${moonbitlang$core$builtin$$Show$to_string$21$(self.end - self.start | 0)} but the index is ${moonbitlang$core$builtin$$Show$to_string$21$(index)}`, "@moonbitlang/core/builtin:arrayview.mbt:101:5-103:6");
|
|
2395
2417
|
}
|
|
2396
2418
|
function moonbitlang$core$builtin$$MyInt64$extend_i32_u(value) {
|
|
2397
2419
|
return {
|
|
@@ -2420,7 +2442,7 @@ function moonbitlang$core$uint64$$UInt64$to_byte(self) {
|
|
|
2420
2442
|
function moonbitlang$core$byte$$Byte$to_int64(self) {
|
|
2421
2443
|
return moonbitlang$core$int$$Int$to_int64(self);
|
|
2422
2444
|
}
|
|
2423
|
-
function moonbitlang$core$builtin$$Neg$neg$
|
|
2445
|
+
function moonbitlang$core$builtin$$Neg$neg$30$(self) {
|
|
2424
2446
|
return self.lo === 0 ? {
|
|
2425
2447
|
hi: ~self.hi + 1 | 0,
|
|
2426
2448
|
lo: 0
|
|
@@ -2442,16 +2464,16 @@ function moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, bhi, blo) {
|
|
|
2442
2464
|
lo
|
|
2443
2465
|
};
|
|
2444
2466
|
}
|
|
2445
|
-
function moonbitlang$core$builtin$$Add$add$
|
|
2467
|
+
function moonbitlang$core$builtin$$Add$add$30$(self, other) {
|
|
2446
2468
|
return moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, other.hi, other.lo);
|
|
2447
2469
|
}
|
|
2448
|
-
function moonbitlang$core$builtin$$Sub$sub$
|
|
2470
|
+
function moonbitlang$core$builtin$$Sub$sub$30$(self, other) {
|
|
2449
2471
|
return other.lo === 0 ? {
|
|
2450
2472
|
hi: self.hi - other.hi | 0,
|
|
2451
2473
|
lo: self.lo
|
|
2452
2474
|
} : moonbitlang$core$builtin$$MyInt64$add_hi_lo(self, ~other.hi, ~other.lo + 1 | 0);
|
|
2453
2475
|
}
|
|
2454
|
-
function moonbitlang$core$builtin$$Mul$mul$
|
|
2476
|
+
function moonbitlang$core$builtin$$Mul$mul$30$(self, other) {
|
|
2455
2477
|
const _ahi = self.hi;
|
|
2456
2478
|
const _alo = self.lo;
|
|
2457
2479
|
const _bhi = other.hi;
|
|
@@ -2494,7 +2516,7 @@ function moonbitlang$core$builtin$$try_get_int64_wasm_helper() {
|
|
|
2494
2516
|
moonbitlang$core$builtin$$wasm_helper_cache.exports = moonbitlang$core$builtin$$try_init_wasm_helper();
|
|
2495
2517
|
return !(moonbitlang$core$builtin$$wasm_helper_cache.exports === void 0);
|
|
2496
2518
|
}
|
|
2497
|
-
function moonbitlang$core$builtin$$Div$div$
|
|
2519
|
+
function moonbitlang$core$builtin$$Div$div$30$(self, other) {
|
|
2498
2520
|
if (!(other.hi === 0 && other.lo === 0)) {
|
|
2499
2521
|
if (!moonbitlang$core$builtin$$try_get_int64_wasm_helper()) return moonbitlang$core$builtin$$MyInt64$div_bigint(self, other);
|
|
2500
2522
|
const _bind = moonbitlang$core$builtin$$wasm_helper_cache.exports;
|
|
@@ -2606,39 +2628,39 @@ function moonbitlang$core$builtin$$MyInt64$asr(self, shift) {
|
|
|
2606
2628
|
lo: self.hi >> (shift$2 - 32 | 0)
|
|
2607
2629
|
};
|
|
2608
2630
|
}
|
|
2609
|
-
function moonbitlang$core$builtin$$Neg$neg$
|
|
2610
|
-
return moonbitlang$core$builtin$$Neg$neg$
|
|
2631
|
+
function moonbitlang$core$builtin$$Neg$neg$20$(self) {
|
|
2632
|
+
return moonbitlang$core$builtin$$Neg$neg$30$(self);
|
|
2611
2633
|
}
|
|
2612
|
-
function moonbitlang$core$builtin$$Add$add$
|
|
2613
|
-
return moonbitlang$core$builtin$$Add$add$
|
|
2634
|
+
function moonbitlang$core$builtin$$Add$add$20$(self, other) {
|
|
2635
|
+
return moonbitlang$core$builtin$$Add$add$30$(self, other);
|
|
2614
2636
|
}
|
|
2615
|
-
function moonbitlang$core$builtin$$Sub$sub$
|
|
2616
|
-
return moonbitlang$core$builtin$$Sub$sub$
|
|
2637
|
+
function moonbitlang$core$builtin$$Sub$sub$20$(self, other) {
|
|
2638
|
+
return moonbitlang$core$builtin$$Sub$sub$30$(self, other);
|
|
2617
2639
|
}
|
|
2618
|
-
function moonbitlang$core$builtin$$Mul$mul$
|
|
2619
|
-
return moonbitlang$core$builtin$$Mul$mul$
|
|
2640
|
+
function moonbitlang$core$builtin$$Mul$mul$20$(self, other) {
|
|
2641
|
+
return moonbitlang$core$builtin$$Mul$mul$30$(self, other);
|
|
2620
2642
|
}
|
|
2621
|
-
function moonbitlang$core$builtin$$Div$div$
|
|
2622
|
-
return moonbitlang$core$builtin$$Div$div$
|
|
2643
|
+
function moonbitlang$core$builtin$$Div$div$20$(self, other) {
|
|
2644
|
+
return moonbitlang$core$builtin$$Div$div$30$(self, other);
|
|
2623
2645
|
}
|
|
2624
|
-
function moonbitlang$core$builtin$$BitAnd$land$
|
|
2646
|
+
function moonbitlang$core$builtin$$BitAnd$land$20$(self, other) {
|
|
2625
2647
|
return moonbitlang$core$builtin$$MyInt64$land(self, other);
|
|
2626
2648
|
}
|
|
2627
|
-
function moonbitlang$core$builtin$$BitOr$lor$
|
|
2649
|
+
function moonbitlang$core$builtin$$BitOr$lor$20$(self, other) {
|
|
2628
2650
|
return moonbitlang$core$builtin$$MyInt64$lor(self, other);
|
|
2629
2651
|
}
|
|
2630
|
-
function moonbitlang$core$builtin$$Shr$shr$
|
|
2652
|
+
function moonbitlang$core$builtin$$Shr$shr$20$(self, other) {
|
|
2631
2653
|
return moonbitlang$core$builtin$$MyInt64$asr(self, other);
|
|
2632
2654
|
}
|
|
2633
|
-
function moonbitlang$core$builtin$$Shl$shl$
|
|
2655
|
+
function moonbitlang$core$builtin$$Shl$shl$20$(self, other) {
|
|
2634
2656
|
return moonbitlang$core$builtin$$MyInt64$lsl(self, other);
|
|
2635
2657
|
}
|
|
2636
|
-
function moonbitlang$core$builtin$$Eq$equal$
|
|
2658
|
+
function moonbitlang$core$builtin$$Eq$equal$20$(self, other) {
|
|
2637
2659
|
const _p = self;
|
|
2638
2660
|
const _p$2 = other;
|
|
2639
2661
|
return _p.hi === _p$2.hi && _p.lo === _p$2.lo;
|
|
2640
2662
|
}
|
|
2641
|
-
function moonbitlang$core$builtin$$Compare$compare$
|
|
2663
|
+
function moonbitlang$core$builtin$$Compare$compare$20$(self, other) {
|
|
2642
2664
|
return moonbitlang$core$builtin$$MyInt64$compare(self, other);
|
|
2643
2665
|
}
|
|
2644
2666
|
function moonbitlang$core$int64$$Int64$to_int(self) {
|
|
@@ -2648,13 +2670,13 @@ function moonbitlang$core$double$$Double$reinterpret_as_uint64(self) {
|
|
|
2648
2670
|
return moonbitlang$core$builtin$$MyInt64$reinterpret_double(self);
|
|
2649
2671
|
}
|
|
2650
2672
|
function moonbitlang$core$builtin$$Add$add$2$(self, other) {
|
|
2651
|
-
return moonbitlang$core$builtin$$Add$add$
|
|
2673
|
+
return moonbitlang$core$builtin$$Add$add$30$(self, other);
|
|
2652
2674
|
}
|
|
2653
2675
|
function moonbitlang$core$builtin$$Sub$sub$2$(self, other) {
|
|
2654
|
-
return moonbitlang$core$builtin$$Sub$sub$
|
|
2676
|
+
return moonbitlang$core$builtin$$Sub$sub$30$(self, other);
|
|
2655
2677
|
}
|
|
2656
2678
|
function moonbitlang$core$builtin$$Mul$mul$2$(self, other) {
|
|
2657
|
-
return moonbitlang$core$builtin$$Mul$mul$
|
|
2679
|
+
return moonbitlang$core$builtin$$Mul$mul$30$(self, other);
|
|
2658
2680
|
}
|
|
2659
2681
|
function moonbitlang$core$builtin$$Div$div$2$(self, other) {
|
|
2660
2682
|
return moonbitlang$core$builtin$$MyInt64$div_u(self, other);
|
|
@@ -2686,7 +2708,7 @@ function moonbitlang$core$uint64$$UInt64$clz(self) {
|
|
|
2686
2708
|
const _p = self;
|
|
2687
2709
|
return _p.hi !== 0 ? Math.clz32(_p.hi) : 32 + Math.clz32(_p.lo) | 0;
|
|
2688
2710
|
}
|
|
2689
|
-
function moonbitlang$core$bytes$$Bytes$makei$
|
|
2711
|
+
function moonbitlang$core$bytes$$Bytes$makei$31$(length, value) {
|
|
2690
2712
|
if (length <= 0) return $bytes_literal$0;
|
|
2691
2713
|
const arr = $makebytes(length, value(0));
|
|
2692
2714
|
let _tmp = 1;
|
|
@@ -2720,7 +2742,7 @@ function moonbitlang$core$builtin$$Eq$equal$11$(self, other) {
|
|
|
2720
2742
|
}
|
|
2721
2743
|
}
|
|
2722
2744
|
function moonbitlang$core$bytes$$Bytes$from_array(arr) {
|
|
2723
|
-
return moonbitlang$core$bytes$$Bytes$makei$
|
|
2745
|
+
return moonbitlang$core$bytes$$Bytes$makei$31$(arr.end - arr.start | 0, (i) => moonbitlang$core$array$$ArrayView$at$4$(arr, i));
|
|
2724
2746
|
}
|
|
2725
2747
|
function moonbitlang$core$array$$Array$make$4$(len, elem) {
|
|
2726
2748
|
const arr = new Array(len);
|
|
@@ -2746,7 +2768,7 @@ function moonbitlang$core$array$$Array$set$4$(self, index, value) {
|
|
|
2746
2768
|
return;
|
|
2747
2769
|
}
|
|
2748
2770
|
}
|
|
2749
|
-
function moonbitlang$core$array$$Array$set$
|
|
2771
|
+
function moonbitlang$core$array$$Array$set$13$(self, index, value) {
|
|
2750
2772
|
const len = self.length;
|
|
2751
2773
|
if (index >= 0 && index < len) {
|
|
2752
2774
|
$bound_check(self, index);
|
|
@@ -2772,7 +2794,7 @@ function moonbitlang$core$bytes$$Bytes$to_array(self) {
|
|
|
2772
2794
|
}
|
|
2773
2795
|
return rv;
|
|
2774
2796
|
}
|
|
2775
|
-
function moonbitlang$core$builtin$$Show$output$
|
|
2797
|
+
function moonbitlang$core$builtin$$Show$output$32$(self, logger) {
|
|
2776
2798
|
const pkg = self.pkg;
|
|
2777
2799
|
const _bind = moonbitlang$core$string$$StringView$find(pkg, {
|
|
2778
2800
|
str: moonbitlang$core$builtin$$output$46$42$bind$124$8198,
|
|
@@ -2823,8 +2845,8 @@ function moonbitlang$core$builtin$$Show$output$31$(self, logger) {
|
|
|
2823
2845
|
logger.method_table.method_3(logger.self, 64);
|
|
2824
2846
|
logger.method_table.method_2(logger.self, _module_name);
|
|
2825
2847
|
}
|
|
2826
|
-
function moonbitlang$core$builtin$$Show$output$
|
|
2827
|
-
moonbitlang$core$builtin$$Show$output$
|
|
2848
|
+
function moonbitlang$core$builtin$$Show$output$22$(self, logger) {
|
|
2849
|
+
moonbitlang$core$builtin$$Show$output$32$(moonbitlang$core$builtin$$SourceLocRepr$parse(self), logger);
|
|
2828
2850
|
}
|
|
2829
2851
|
function moonbitlang$core$array$$Array$sub$46$inner$4$(self, start, end) {
|
|
2830
2852
|
const len = self.length;
|
|
@@ -2841,7 +2863,7 @@ function moonbitlang$core$array$$Array$sub$46$inner$4$(self, start, end) {
|
|
|
2841
2863
|
end: end$2
|
|
2842
2864
|
} : moonbitlang$core$builtin$$abort$3$("View index out of bounds", "@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38");
|
|
2843
2865
|
}
|
|
2844
|
-
function moonbitlang$core$array$$Array$sub$46$inner$
|
|
2866
|
+
function moonbitlang$core$array$$Array$sub$46$inner$16$(self, start, end) {
|
|
2845
2867
|
const len = self.length;
|
|
2846
2868
|
let end$2;
|
|
2847
2869
|
if (end === void 0) end$2 = len;
|
|
@@ -2856,8 +2878,8 @@ function moonbitlang$core$array$$Array$sub$46$inner$15$(self, start, end) {
|
|
|
2856
2878
|
end: end$2
|
|
2857
2879
|
} : moonbitlang$core$builtin$$abort$5$("View index out of bounds", "@moonbitlang/core/builtin:arrayview.mbt:200:5-200:38");
|
|
2858
2880
|
}
|
|
2859
|
-
function moonbitlang$core$array$$Array$from_iter$
|
|
2860
|
-
return moonbitlang$core$builtin$$Iter$collect$
|
|
2881
|
+
function moonbitlang$core$array$$Array$from_iter$16$(iter) {
|
|
2882
|
+
return moonbitlang$core$builtin$$Iter$collect$16$(iter);
|
|
2861
2883
|
}
|
|
2862
2884
|
function moonbitlang$core$double$internal$ryu$$copy_special_str(sign, exponent, mantissa) {
|
|
2863
2885
|
if (mantissa) return "NaN";
|
|
@@ -2904,13 +2926,13 @@ function moonbitlang$core$double$internal$ryu$$pow5Factor(value) {
|
|
|
2904
2926
|
if (moonbitlang$core$builtin$$op_notequal$2$(moonbitlang$core$builtin$$Mod$mod$2$(value, $625L), $0L)) return 3;
|
|
2905
2927
|
let count = 4;
|
|
2906
2928
|
let value$2 = moonbitlang$core$builtin$$Div$div$2$(value, $625L);
|
|
2907
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
2929
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$18$(value$2, $0L)) {
|
|
2908
2930
|
if (moonbitlang$core$builtin$$op_notequal$2$(moonbitlang$core$builtin$$Mod$mod$2$(value$2, $5L), $0L)) return count;
|
|
2909
2931
|
value$2 = moonbitlang$core$builtin$$Div$div$2$(value$2, $5L);
|
|
2910
2932
|
count = count + 1 | 0;
|
|
2911
2933
|
continue;
|
|
2912
2934
|
} else break;
|
|
2913
|
-
return moonbitlang$core$builtin$$abort$8$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$
|
|
2935
|
+
return moonbitlang$core$builtin$$abort$8$(`IllegalArgumentException ${moonbitlang$core$builtin$$Show$to_string$18$(value$2)}`, "@moonbitlang/core/double/internal/ryu:ryu.mbt:116:3-116:45");
|
|
2914
2936
|
}
|
|
2915
2937
|
function moonbitlang$core$double$internal$ryu$$multipleOfPowerOf5(value, p) {
|
|
2916
2938
|
return moonbitlang$core$double$internal$ryu$$pow5Factor(value) >= p;
|
|
@@ -2929,22 +2951,22 @@ function moonbitlang$core$double$internal$ryu$$mulShiftAll64(m, mul, j, mmShift)
|
|
|
2929
2951
|
const _lo2 = _bind$2._0;
|
|
2930
2952
|
const _hi2 = _bind$2._1;
|
|
2931
2953
|
const mid = moonbitlang$core$builtin$$Add$add$2$(_tmp, _lo2);
|
|
2932
|
-
const hi = moonbitlang$core$builtin$$Add$add$2$(_hi2, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2954
|
+
const hi = moonbitlang$core$builtin$$Add$add$2$(_hi2, moonbitlang$core$builtin$$Compare$op_lt$18$(mid, _tmp) ? $1L : $0L);
|
|
2933
2955
|
const lo2 = moonbitlang$core$builtin$$Add$add$2$(_lo, _mul0);
|
|
2934
|
-
const mid2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2935
|
-
const vp = moonbitlang$core$double$internal$ryu$$shiftright128(mid2, moonbitlang$core$builtin$$Add$add$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2956
|
+
const mid2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(lo2, _lo) ? $1L : $0L);
|
|
2957
|
+
const vp = moonbitlang$core$double$internal$ryu$$shiftright128(mid2, moonbitlang$core$builtin$$Add$add$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$18$(mid2, mid) ? $1L : $0L), (j - 64 | 0) - 1 | 0);
|
|
2936
2958
|
let vm = $0L;
|
|
2937
2959
|
if (mmShift) {
|
|
2938
2960
|
const lo3 = moonbitlang$core$builtin$$Sub$sub$2$(_lo, _mul0);
|
|
2939
|
-
const mid3 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2940
|
-
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid3, moonbitlang$core$builtin$$Sub$sub$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2961
|
+
const mid3 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(_lo, lo3) ? $1L : $0L);
|
|
2962
|
+
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid3, moonbitlang$core$builtin$$Sub$sub$2$(hi, moonbitlang$core$builtin$$Compare$op_lt$18$(mid, mid3) ? $1L : $0L), (j - 64 | 0) - 1 | 0);
|
|
2941
2963
|
} else {
|
|
2942
2964
|
const lo3 = moonbitlang$core$builtin$$Add$add$2$(_lo, _lo);
|
|
2943
|
-
const mid3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, mid), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2944
|
-
const hi3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(hi, hi), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2965
|
+
const mid3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(mid, mid), moonbitlang$core$builtin$$Compare$op_lt$18$(lo3, _lo) ? $1L : $0L);
|
|
2966
|
+
const hi3 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Add$add$2$(hi, hi), moonbitlang$core$builtin$$Compare$op_lt$18$(mid3, mid) ? $1L : $0L);
|
|
2945
2967
|
const lo4 = moonbitlang$core$builtin$$Sub$sub$2$(lo3, _mul0);
|
|
2946
|
-
const mid4 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid3, _mul1), moonbitlang$core$builtin$$Compare$op_lt$
|
|
2947
|
-
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid4, moonbitlang$core$builtin$$Sub$sub$2$(hi3, moonbitlang$core$builtin$$Compare$op_lt$
|
|
2968
|
+
const mid4 = moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Sub$sub$2$(mid3, _mul1), moonbitlang$core$builtin$$Compare$op_lt$18$(lo3, lo4) ? $1L : $0L);
|
|
2969
|
+
vm = moonbitlang$core$double$internal$ryu$$shiftright128(mid4, moonbitlang$core$builtin$$Sub$sub$2$(hi3, moonbitlang$core$builtin$$Compare$op_lt$18$(mid3, mid4) ? $1L : $0L), j - 64 | 0);
|
|
2948
2970
|
}
|
|
2949
2971
|
return {
|
|
2950
2972
|
_0: moonbitlang$core$double$internal$ryu$$shiftright128(mid, hi, (j - 64 | 0) - 1 | 0),
|
|
@@ -2976,7 +2998,7 @@ function moonbitlang$core$double$internal$ryu$$double_computePow5(i) {
|
|
|
2976
2998
|
const _high0 = _bind$2._1;
|
|
2977
2999
|
const sum = moonbitlang$core$builtin$$Add$add$2$(_high0, _low1);
|
|
2978
3000
|
let high1 = _high1;
|
|
2979
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
3001
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(sum, _high0)) high1 = moonbitlang$core$builtin$$Add$add$2$(high1, $1L);
|
|
2980
3002
|
const delta = (((Math.imul(i, 1217359) | 0) >>> 19 | 0) + 1 | 0) - (((Math.imul(base2, 1217359) | 0) >>> 19 | 0) + 1 | 0) | 0;
|
|
2981
3003
|
const _tmp = moonbitlang$core$double$internal$ryu$$shiftright128(_low0, sum, delta);
|
|
2982
3004
|
const _p$3 = i / 16 | 0;
|
|
@@ -3010,7 +3032,7 @@ function moonbitlang$core$double$internal$ryu$$double_computeInvPow5(i) {
|
|
|
3010
3032
|
const _high0 = _bind$2._1;
|
|
3011
3033
|
const sum = moonbitlang$core$builtin$$Add$add$2$(_high0, _low1);
|
|
3012
3034
|
let high1 = _high1;
|
|
3013
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
3035
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(sum, _high0)) high1 = moonbitlang$core$builtin$$Add$add$2$(high1, $1L);
|
|
3014
3036
|
const delta = (((Math.imul(base2, 1217359) | 0) >>> 19 | 0) + 1 | 0) - (((Math.imul(i, 1217359) | 0) >>> 19 | 0) + 1 | 0) | 0;
|
|
3015
3037
|
const _tmp = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$double$internal$ryu$$shiftright128(_low0, sum, delta), $1L);
|
|
3016
3038
|
const _p$3 = i / 16 | 0;
|
|
@@ -3021,22 +3043,22 @@ function moonbitlang$core$double$internal$ryu$$double_computeInvPow5(i) {
|
|
|
3021
3043
|
};
|
|
3022
3044
|
}
|
|
3023
3045
|
function moonbitlang$core$double$internal$ryu$$decimal_length17(v) {
|
|
3024
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3025
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3026
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3027
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3028
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3029
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3030
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3031
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3032
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3033
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3034
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3035
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3036
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3037
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3038
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3039
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
3046
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000000000L)) return 17;
|
|
3047
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000000000L)) return 16;
|
|
3048
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000000000L)) return 15;
|
|
3049
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000000L)) return 14;
|
|
3050
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000000L)) return 13;
|
|
3051
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000000L)) return 12;
|
|
3052
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000000L)) return 11;
|
|
3053
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000000L)) return 10;
|
|
3054
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000000L)) return 9;
|
|
3055
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000000L)) return 8;
|
|
3056
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000000L)) return 7;
|
|
3057
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100000L)) return 6;
|
|
3058
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10000L)) return 5;
|
|
3059
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $1000L)) return 4;
|
|
3060
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $100L)) return 3;
|
|
3061
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(v, $10L)) return 2;
|
|
3040
3062
|
return 1;
|
|
3041
3063
|
}
|
|
3042
3064
|
function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
@@ -3102,7 +3124,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3102
3124
|
while (true) {
|
|
3103
3125
|
const vpDiv10 = moonbitlang$core$builtin$$Div$div$2$(vp, $10L);
|
|
3104
3126
|
const vmDiv10 = moonbitlang$core$builtin$$Div$div$2$(vm, $10L);
|
|
3105
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
3127
|
+
if (moonbitlang$core$builtin$$Compare$op_le$18$(vpDiv10, vmDiv10)) break;
|
|
3106
3128
|
const vmMod10 = moonbitlang$core$uint64$$UInt64$to_int(vm) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vmDiv10)) | 0) | 0;
|
|
3107
3129
|
const vrDiv10 = moonbitlang$core$builtin$$Div$div$2$(vr, $10L);
|
|
3108
3130
|
const vrMod10 = moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vrDiv10)) | 0) | 0;
|
|
@@ -3135,7 +3157,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3135
3157
|
let roundUp = false;
|
|
3136
3158
|
const vpDiv100 = moonbitlang$core$builtin$$Div$div$2$(vp, $100L);
|
|
3137
3159
|
const vmDiv100 = moonbitlang$core$builtin$$Div$div$2$(vm, $100L);
|
|
3138
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
3160
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(vpDiv100, vmDiv100)) {
|
|
3139
3161
|
const vrDiv100 = moonbitlang$core$builtin$$Div$div$2$(vr, $100L);
|
|
3140
3162
|
roundUp = (moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(100, moonbitlang$core$uint64$$UInt64$to_int(vrDiv100)) | 0) | 0) >= 50;
|
|
3141
3163
|
vr = vrDiv100;
|
|
@@ -3146,7 +3168,7 @@ function moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent) {
|
|
|
3146
3168
|
while (true) {
|
|
3147
3169
|
const vpDiv10 = moonbitlang$core$builtin$$Div$div$2$(vp, $10L);
|
|
3148
3170
|
const vmDiv10 = moonbitlang$core$builtin$$Div$div$2$(vm, $10L);
|
|
3149
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
3171
|
+
if (moonbitlang$core$builtin$$Compare$op_le$18$(vpDiv10, vmDiv10)) break;
|
|
3150
3172
|
const vrDiv10 = moonbitlang$core$builtin$$Div$div$2$(vr, $10L);
|
|
3151
3173
|
roundUp = (moonbitlang$core$uint64$$UInt64$to_int(vr) - (Math.imul(10, moonbitlang$core$uint64$$UInt64$to_int(vrDiv10)) | 0) | 0) >= 5;
|
|
3152
3174
|
vr = vrDiv10;
|
|
@@ -3352,7 +3374,7 @@ function moonbitlang$core$double$internal$ryu$$ryu_to_string(val) {
|
|
|
3352
3374
|
const ieeeMantissa = moonbitlang$core$builtin$$BitAnd$land$2$(bits, moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Shl$shl$2$($1L, 52), $1L));
|
|
3353
3375
|
const ieeeExponent = moonbitlang$core$uint64$$UInt64$to_int(moonbitlang$core$builtin$$BitAnd$land$2$(moonbitlang$core$builtin$$Shr$shr$2$(bits, 52), moonbitlang$core$builtin$$Sub$sub$2$(moonbitlang$core$builtin$$Shl$shl$2$($1L, 11), $1L)));
|
|
3354
3376
|
if (ieeeExponent === 2047 || ieeeExponent === 0 && moonbitlang$core$builtin$$Eq$equal$2$(ieeeMantissa, $0L)) return moonbitlang$core$double$internal$ryu$$copy_special_str(ieeeSign, ieeeExponent !== 0, moonbitlang$core$builtin$$op_notequal$2$(ieeeMantissa, $0L));
|
|
3355
|
-
let v = moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$
|
|
3377
|
+
let v = moonbitlang$core$double$internal$ryu$$ryu_to_string$46$record$47$864;
|
|
3356
3378
|
const small = moonbitlang$core$double$internal$ryu$$d2d_small_int(ieeeMantissa, ieeeExponent);
|
|
3357
3379
|
if (small === void 0) v = moonbitlang$core$double$internal$ryu$$d2d(ieeeMantissa, ieeeExponent);
|
|
3358
3380
|
else {
|
|
@@ -3376,16 +3398,16 @@ function moonbitlang$core$double$$Double$to_string(self) {
|
|
|
3376
3398
|
function moonbitlang$core$strconv$$range_err$7$() {
|
|
3377
3399
|
return new Result$Err$3$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$range_err_str));
|
|
3378
3400
|
}
|
|
3379
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3401
|
+
function moonbitlang$core$strconv$$syntax_err$33$() {
|
|
3380
3402
|
return new Result$Err$4$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3381
3403
|
}
|
|
3382
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3404
|
+
function moonbitlang$core$strconv$$syntax_err$34$() {
|
|
3383
3405
|
return new Result$Err$5$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3384
3406
|
}
|
|
3385
3407
|
function moonbitlang$core$strconv$$syntax_err$6$() {
|
|
3386
3408
|
return new Result$Err$6$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3387
3409
|
}
|
|
3388
|
-
function moonbitlang$core$strconv$$syntax_err$
|
|
3410
|
+
function moonbitlang$core$strconv$$syntax_err$35$() {
|
|
3389
3411
|
return new Result$Err$7$(new Error$moonbitlang$47$core$47$strconv$46$StrConvError$46$StrConvError(moonbitlang$core$strconv$$syntax_err_str));
|
|
3390
3412
|
}
|
|
3391
3413
|
function moonbitlang$core$strconv$$check_underscore(str) {
|
|
@@ -3911,8 +3933,8 @@ function moonbitlang$core$strconv$$parse_decimal_from_view(str) {
|
|
|
3911
3933
|
if (moonbitlang$core$string$$String$char_length_eq$46$inner(rest$3.str, 0, rest$3.start, rest$3.end)) {
|
|
3912
3934
|
moonbitlang$core$strconv$$Decimal$trim(d);
|
|
3913
3935
|
return new Result$Ok$7$(d);
|
|
3914
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
3915
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
3936
|
+
} else return moonbitlang$core$strconv$$syntax_err$35$();
|
|
3937
|
+
} else return moonbitlang$core$strconv$$syntax_err$35$();
|
|
3916
3938
|
}
|
|
3917
3939
|
function moonbitlang$core$strconv$$parse_decimal_priv(str) {
|
|
3918
3940
|
return moonbitlang$core$strconv$$parse_decimal_from_view(str);
|
|
@@ -4381,9 +4403,9 @@ function moonbitlang$core$strconv$$parse_inf_nan(rest) {
|
|
|
4381
4403
|
else break _L$4;
|
|
4382
4404
|
return _pos ? new Result$Ok$4$(moonbitlang$core$double$$infinity) : new Result$Ok$4$(moonbitlang$core$double$$neg_infinity);
|
|
4383
4405
|
}
|
|
4384
|
-
return moonbitlang$core$strconv$$syntax_err$
|
|
4406
|
+
return moonbitlang$core$strconv$$syntax_err$33$();
|
|
4385
4407
|
}
|
|
4386
|
-
return moonbitlang$core$strconv$$syntax_err$
|
|
4408
|
+
return moonbitlang$core$strconv$$syntax_err$33$();
|
|
4387
4409
|
}
|
|
4388
4410
|
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$2$(self, init, f) {
|
|
4389
4411
|
let ret = init;
|
|
@@ -4417,7 +4439,7 @@ function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_dig
|
|
|
4417
4439
|
_2: len
|
|
4418
4440
|
};
|
|
4419
4441
|
}
|
|
4420
|
-
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$
|
|
4442
|
+
function $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$20$(self, init, f) {
|
|
4421
4443
|
let ret = init;
|
|
4422
4444
|
let len = 0;
|
|
4423
4445
|
let str = self;
|
|
@@ -4503,12 +4525,12 @@ function moonbitlang$core$strconv$$parse_scientific(s) {
|
|
|
4503
4525
|
if (moonbitlang$core$string$$String$char_length_ge$46$inner(_bind.str, 1, _bind.start, _bind.end)) {
|
|
4504
4526
|
const _x = moonbitlang$core$string$$String$unsafe_char_at(_bind.str, moonbitlang$core$string$$String$offset_of_nth_char$46$inner(_bind.str, 0, _bind.start, _bind.end));
|
|
4505
4527
|
if (_x >= 48 && _x <= 57) {
|
|
4506
|
-
const _bind$2 = $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$
|
|
4528
|
+
const _bind$2 = $moonbitlang$core$strconv$$moonbitlang$core$string$$StringView$fold_digits$20$(s$2, moonbitlang$core$strconv$$parse_scientific$46$exp_num$124$306, (digit, exp_num) => moonbitlang$core$builtin$$Compare$op_lt$19$(exp_num, $65536L) ? moonbitlang$core$builtin$$Add$add$20$(moonbitlang$core$builtin$$Mul$mul$20$($10L, exp_num), moonbitlang$core$int$$Int$to_int64(digit)) : exp_num);
|
|
4507
4529
|
const _s = _bind$2._0;
|
|
4508
4530
|
const _exp_num = _bind$2._1;
|
|
4509
4531
|
return neg_exp ? {
|
|
4510
4532
|
_0: _s,
|
|
4511
|
-
_1: moonbitlang$core$builtin$$Neg$neg$
|
|
4533
|
+
_1: moonbitlang$core$builtin$$Neg$neg$20$(_exp_num)
|
|
4512
4534
|
} : {
|
|
4513
4535
|
_0: _s,
|
|
4514
4536
|
_1: _exp_num
|
|
@@ -4537,7 +4559,7 @@ function moonbitlang$core$strconv$$try_parse_19digits(s, x) {
|
|
|
4537
4559
|
start: _tmp$3,
|
|
4538
4560
|
end: _param.end
|
|
4539
4561
|
};
|
|
4540
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
4562
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$18$(x$2, moonbitlang$core$strconv$$min_19digit_int)) {
|
|
4541
4563
|
len = len + 1 | 0;
|
|
4542
4564
|
x$2 = moonbitlang$core$builtin$$Add$add$2$(moonbitlang$core$builtin$$Mul$mul$2$(x$2, $10L), moonbitlang$core$uint64$$UInt64$extend_uint(_x - 48 | 0));
|
|
4543
4565
|
_tmp = _x$2;
|
|
@@ -4655,7 +4677,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4655
4677
|
s$2 = _new_s;
|
|
4656
4678
|
mantissa = _new_mantissa;
|
|
4657
4679
|
n_after_dot = _consumed_digit;
|
|
4658
|
-
exponent = moonbitlang$core$builtin$$Neg$neg$
|
|
4680
|
+
exponent = moonbitlang$core$builtin$$Neg$neg$20$(moonbitlang$core$int$$Int$to_int64(n_after_dot));
|
|
4659
4681
|
}
|
|
4660
4682
|
}
|
|
4661
4683
|
n_digits = n_digits + n_after_dot | 0;
|
|
@@ -4701,7 +4723,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4701
4723
|
const _new_s = _bind$5._0;
|
|
4702
4724
|
const _exp_number = _bind$5._1;
|
|
4703
4725
|
s$2 = _new_s;
|
|
4704
|
-
exponent = moonbitlang$core$builtin$$Add$add$
|
|
4726
|
+
exponent = moonbitlang$core$builtin$$Add$add$20$(exponent, _exp_number);
|
|
4705
4727
|
}
|
|
4706
4728
|
const _bind$4 = s$2;
|
|
4707
4729
|
if (moonbitlang$core$string$$String$char_length_eq$46$inner(_bind$4.str, 0, _bind$4.start, _bind$4.end)) {
|
|
@@ -4770,7 +4792,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4770
4792
|
const _consumed_digit = _bind$5._2;
|
|
4771
4793
|
mantissa$2 = _new_mantissa;
|
|
4772
4794
|
let _tmp$4;
|
|
4773
|
-
if (moonbitlang$core$builtin$$Compare$op_ge$
|
|
4795
|
+
if (moonbitlang$core$builtin$$Compare$op_ge$18$(mantissa$2, moonbitlang$core$strconv$$min_19digit_int)) _tmp$4 = _consumed_digit;
|
|
4774
4796
|
else if (moonbitlang$core$string$$String$char_length_ge$46$inner(_s$3.str, 1, _s$3.start, _s$3.end)) {
|
|
4775
4797
|
const _tmp$5 = _s$3.str;
|
|
4776
4798
|
const _bind$6 = moonbitlang$core$string$$String$offset_of_nth_char$46$inner(_s$3.str, 1, _s$3.start, _s$3.end);
|
|
@@ -4788,7 +4810,7 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4788
4810
|
_tmp$4 = _consumed_digit$2;
|
|
4789
4811
|
} else return new Result$Ok$5$(void 0);
|
|
4790
4812
|
exponent = moonbitlang$core$int$$Int$to_int64(_tmp$4);
|
|
4791
|
-
exponent = moonbitlang$core$builtin$$Add$add$
|
|
4813
|
+
exponent = moonbitlang$core$builtin$$Add$add$20$(exponent, moonbitlang$core$strconv$$parse_number$46$exp_number$124$287);
|
|
4792
4814
|
}
|
|
4793
4815
|
return new Result$Ok$5$({
|
|
4794
4816
|
exponent,
|
|
@@ -4796,14 +4818,14 @@ function moonbitlang$core$strconv$$parse_number(s) {
|
|
|
4796
4818
|
negative: _negative,
|
|
4797
4819
|
many_digits
|
|
4798
4820
|
});
|
|
4799
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
4821
|
+
} else return moonbitlang$core$strconv$$syntax_err$34$();
|
|
4800
4822
|
}
|
|
4801
4823
|
function moonbitlang$core$strconv$$assemble_bits(mantissa, exponent, negative) {
|
|
4802
4824
|
const biased_exp = exponent - moonbitlang$core$strconv$$double_info.bias | 0;
|
|
4803
|
-
let bits = moonbitlang$core$builtin$$BitAnd$land$
|
|
4825
|
+
let bits = moonbitlang$core$builtin$$BitAnd$land$20$(mantissa, moonbitlang$core$builtin$$Sub$sub$20$(moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits), $1L));
|
|
4804
4826
|
const exp_bits = moonbitlang$core$int$$Int$to_int64(biased_exp & ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0));
|
|
4805
|
-
bits = moonbitlang$core$builtin$$BitOr$lor$
|
|
4806
|
-
if (negative) bits = moonbitlang$core$builtin$$BitOr$lor$
|
|
4827
|
+
bits = moonbitlang$core$builtin$$BitOr$lor$20$(bits, moonbitlang$core$builtin$$Shl$shl$20$(exp_bits, moonbitlang$core$strconv$$double_info.mantissa_bits));
|
|
4828
|
+
if (negative) bits = moonbitlang$core$builtin$$BitOr$lor$20$(bits, moonbitlang$core$builtin$$Shl$shl$20$(moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits), moonbitlang$core$strconv$$double_info.exponent_bits));
|
|
4807
4829
|
return bits;
|
|
4808
4830
|
}
|
|
4809
4831
|
function moonbitlang$core$strconv$$Decimal$should_round_up(self, d) {
|
|
@@ -4833,20 +4855,20 @@ function moonbitlang$core$strconv$$Decimal$rounded_integer(self) {
|
|
|
4833
4855
|
let n = $0L;
|
|
4834
4856
|
let i = 0;
|
|
4835
4857
|
while (true) if (i < self.decimal_point && i < self.digits_num) {
|
|
4836
|
-
const _tmp = moonbitlang$core$builtin$$Mul$mul$
|
|
4858
|
+
const _tmp = moonbitlang$core$builtin$$Mul$mul$20$(n, $10L);
|
|
4837
4859
|
const _tmp$2 = self.digits;
|
|
4838
4860
|
const _tmp$3 = i;
|
|
4839
4861
|
$bound_check(_tmp$2, _tmp$3);
|
|
4840
|
-
n = moonbitlang$core$builtin$$Add$add$
|
|
4862
|
+
n = moonbitlang$core$builtin$$Add$add$20$(_tmp, moonbitlang$core$byte$$Byte$to_int64(_tmp$2[_tmp$3]));
|
|
4841
4863
|
i = i + 1 | 0;
|
|
4842
4864
|
continue;
|
|
4843
4865
|
} else break;
|
|
4844
4866
|
while (true) if (i < self.decimal_point) {
|
|
4845
|
-
n = moonbitlang$core$builtin$$Mul$mul$
|
|
4867
|
+
n = moonbitlang$core$builtin$$Mul$mul$20$(n, $10L);
|
|
4846
4868
|
i = i + 1 | 0;
|
|
4847
4869
|
continue;
|
|
4848
4870
|
} else break;
|
|
4849
|
-
if (moonbitlang$core$strconv$$Decimal$should_round_up(self, self.decimal_point)) n = moonbitlang$core$builtin$$Add$add$
|
|
4871
|
+
if (moonbitlang$core$strconv$$Decimal$should_round_up(self, self.decimal_point)) n = moonbitlang$core$builtin$$Add$add$20$(n, $1L);
|
|
4850
4872
|
return n;
|
|
4851
4873
|
}
|
|
4852
4874
|
function moonbitlang$core$strconv$$Decimal$new_digits(self, s) {
|
|
@@ -4890,9 +4912,9 @@ function moonbitlang$core$strconv$$Decimal$left_shift(self, s) {
|
|
|
4890
4912
|
const _tmp$2 = read_index;
|
|
4891
4913
|
$bound_check(_tmp, _tmp$2);
|
|
4892
4914
|
const d = moonbitlang$core$byte$$Byte$to_int64(_tmp[_tmp$2]);
|
|
4893
|
-
acc = moonbitlang$core$builtin$$Add$add$
|
|
4894
|
-
const quo = moonbitlang$core$builtin$$Div$div$
|
|
4895
|
-
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$
|
|
4915
|
+
acc = moonbitlang$core$builtin$$Add$add$20$(acc, moonbitlang$core$builtin$$Shl$shl$20$(d, s));
|
|
4916
|
+
const quo = moonbitlang$core$builtin$$Div$div$20$(acc, $10L);
|
|
4917
|
+
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$20$(acc, moonbitlang$core$builtin$$Mul$mul$20$(quo, $10L)));
|
|
4896
4918
|
write_index = write_index - 1 | 0;
|
|
4897
4919
|
if (write_index < self.digits.length) {
|
|
4898
4920
|
const _tmp$3 = self.digits;
|
|
@@ -4904,9 +4926,9 @@ function moonbitlang$core$strconv$$Decimal$left_shift(self, s) {
|
|
|
4904
4926
|
read_index = read_index - 1 | 0;
|
|
4905
4927
|
continue;
|
|
4906
4928
|
} else break;
|
|
4907
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4908
|
-
const quo = moonbitlang$core$builtin$$Div$div$
|
|
4909
|
-
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$
|
|
4929
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$19$(acc, $0L)) {
|
|
4930
|
+
const quo = moonbitlang$core$builtin$$Div$div$20$(acc, $10L);
|
|
4931
|
+
const rem = moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$builtin$$Sub$sub$20$(acc, moonbitlang$core$builtin$$Mul$mul$20$($10L, quo)));
|
|
4910
4932
|
write_index = write_index - 1 | 0;
|
|
4911
4933
|
if (write_index < self.digits.length) {
|
|
4912
4934
|
const _tmp = self.digits;
|
|
@@ -4961,7 +4983,7 @@ function moonbitlang$core$strconv$$Decimal$right_shift(self, s) {
|
|
|
4961
4983
|
read_index = read_index + 1 | 0;
|
|
4962
4984
|
continue;
|
|
4963
4985
|
} else break;
|
|
4964
|
-
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4986
|
+
while (true) if (moonbitlang$core$builtin$$Compare$op_gt$18$(acc, $0L)) {
|
|
4965
4987
|
const out = moonbitlang$core$builtin$$Shr$shr$2$(acc, s);
|
|
4966
4988
|
if (write_index < self.digits.length) {
|
|
4967
4989
|
const _tmp = self.digits;
|
|
@@ -4969,7 +4991,7 @@ function moonbitlang$core$strconv$$Decimal$right_shift(self, s) {
|
|
|
4969
4991
|
$bound_check(_tmp, _tmp$2);
|
|
4970
4992
|
_tmp[_tmp$2] = moonbitlang$core$uint64$$UInt64$to_byte(out);
|
|
4971
4993
|
write_index = write_index + 1 | 0;
|
|
4972
|
-
} else if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
4994
|
+
} else if (moonbitlang$core$builtin$$Compare$op_gt$18$(out, $0L)) self.truncated = true;
|
|
4973
4995
|
acc = moonbitlang$core$builtin$$BitAnd$land$2$(acc, mask);
|
|
4974
4996
|
acc = moonbitlang$core$builtin$$Mul$mul$2$(acc, $10L);
|
|
4975
4997
|
continue;
|
|
@@ -5061,8 +5083,8 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
|
|
|
5061
5083
|
}
|
|
5062
5084
|
moonbitlang$core$strconv$$Decimal$shift_priv(self, moonbitlang$core$strconv$$double_info.mantissa_bits + 1 | 0);
|
|
5063
5085
|
mantissa = moonbitlang$core$strconv$$Decimal$rounded_integer(self);
|
|
5064
|
-
if (moonbitlang$core$builtin$$Eq$equal$
|
|
5065
|
-
mantissa = moonbitlang$core$builtin$$Shr$shr$
|
|
5086
|
+
if (moonbitlang$core$builtin$$Eq$equal$20$(mantissa, moonbitlang$core$builtin$$Shl$shl$20$($2L, moonbitlang$core$strconv$$double_info.mantissa_bits))) {
|
|
5087
|
+
mantissa = moonbitlang$core$builtin$$Shr$shr$20$(mantissa, 1);
|
|
5066
5088
|
exponent = exponent + 1 | 0;
|
|
5067
5089
|
if ((exponent - moonbitlang$core$strconv$$double_info.bias | 0) >= ((1 << moonbitlang$core$strconv$$double_info.exponent_bits) - 1 | 0)) {
|
|
5068
5090
|
const _bind = moonbitlang$core$strconv$$range_err$7$();
|
|
@@ -5070,15 +5092,15 @@ function moonbitlang$core$strconv$$Decimal$to_double_priv(self) {
|
|
|
5070
5092
|
else return _bind;
|
|
5071
5093
|
}
|
|
5072
5094
|
}
|
|
5073
|
-
if (moonbitlang$core$builtin$$Eq$equal$
|
|
5095
|
+
if (moonbitlang$core$builtin$$Eq$equal$20$(moonbitlang$core$builtin$$BitAnd$land$20$(mantissa, moonbitlang$core$builtin$$Shl$shl$20$($1L, moonbitlang$core$strconv$$double_info.mantissa_bits)), $0L)) exponent = moonbitlang$core$strconv$$double_info.bias;
|
|
5074
5096
|
return new Result$Ok$4$(moonbitlang$core$int64$$Int64$reinterpret_as_double(moonbitlang$core$strconv$$assemble_bits(mantissa, exponent, self.negative)));
|
|
5075
5097
|
}
|
|
5076
5098
|
function moonbitlang$core$strconv$$checked_mul(a, b) {
|
|
5077
|
-
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $0L) || moonbitlang$core$builtin$$Eq$equal$2$(b, $0L)) return moonbitlang$core$strconv$$checked_mul$46$constr$47$
|
|
5099
|
+
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $0L) || moonbitlang$core$builtin$$Eq$equal$2$(b, $0L)) return moonbitlang$core$strconv$$checked_mul$46$constr$47$1337;
|
|
5078
5100
|
if (moonbitlang$core$builtin$$Eq$equal$2$(a, $1L)) return b;
|
|
5079
5101
|
if (moonbitlang$core$builtin$$Eq$equal$2$(b, $1L)) return a;
|
|
5080
5102
|
if (moonbitlang$core$uint64$$UInt64$clz(b) === 0 || moonbitlang$core$uint64$$UInt64$clz(a) === 0) return;
|
|
5081
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
5103
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(a, moonbitlang$core$builtin$$Div$div$2$(moonbitlang$core$uint64$$max_value, b))) return;
|
|
5082
5104
|
return moonbitlang$core$builtin$$Mul$mul$2$(a, b);
|
|
5083
5105
|
}
|
|
5084
5106
|
function moonbitlang$core$strconv$$pow10_fast_path(exponent) {
|
|
@@ -5087,16 +5109,16 @@ function moonbitlang$core$strconv$$pow10_fast_path(exponent) {
|
|
|
5087
5109
|
return moonbitlang$core$strconv$$table[_p];
|
|
5088
5110
|
}
|
|
5089
5111
|
function moonbitlang$core$strconv$$Number$is_fast_path(self) {
|
|
5090
|
-
return moonbitlang$core$builtin$$Compare$op_le$
|
|
5112
|
+
return moonbitlang$core$builtin$$Compare$op_le$19$(moonbitlang$core$strconv$$min_exponent_fast_path, self.exponent) && moonbitlang$core$builtin$$Compare$op_le$19$(self.exponent, moonbitlang$core$strconv$$max_exponent_disguised_fast_path) && moonbitlang$core$builtin$$Compare$op_le$18$(self.mantissa, moonbitlang$core$strconv$$max_mantissa_fast_path) && !self.many_digits;
|
|
5091
5113
|
}
|
|
5092
5114
|
function moonbitlang$core$strconv$$Number$try_fast_path(self) {
|
|
5093
5115
|
if (moonbitlang$core$strconv$$Number$is_fast_path(self)) {
|
|
5094
5116
|
let value;
|
|
5095
|
-
if (moonbitlang$core$builtin$$Compare$op_le$
|
|
5117
|
+
if (moonbitlang$core$builtin$$Compare$op_le$19$(self.exponent, moonbitlang$core$strconv$$max_exponent_fast_path)) {
|
|
5096
5118
|
const value$2 = moonbitlang$core$double$$Double$convert_uint64(self.mantissa);
|
|
5097
|
-
value = moonbitlang$core$builtin$$Compare$op_lt$
|
|
5119
|
+
value = moonbitlang$core$builtin$$Compare$op_lt$19$(self.exponent, $0L) ? value$2 / moonbitlang$core$strconv$$pow10_fast_path(-moonbitlang$core$int64$$Int64$to_int(self.exponent) | 0) : value$2 * moonbitlang$core$strconv$$pow10_fast_path(moonbitlang$core$int64$$Int64$to_int(self.exponent));
|
|
5098
5120
|
} else {
|
|
5099
|
-
const shift = moonbitlang$core$builtin$$Sub$sub$
|
|
5121
|
+
const shift = moonbitlang$core$builtin$$Sub$sub$20$(self.exponent, moonbitlang$core$strconv$$max_exponent_fast_path);
|
|
5100
5122
|
const _tmp = self.mantissa;
|
|
5101
5123
|
const _p = moonbitlang$core$int64$$Int64$to_int(shift);
|
|
5102
5124
|
$bound_check(moonbitlang$core$strconv$$int_pow10, _p);
|
|
@@ -5104,7 +5126,7 @@ function moonbitlang$core$strconv$$Number$try_fast_path(self) {
|
|
|
5104
5126
|
let mantissa;
|
|
5105
5127
|
if (_bind === void 0) return Option$None$8$;
|
|
5106
5128
|
else mantissa = _bind;
|
|
5107
|
-
if (moonbitlang$core$builtin$$Compare$op_gt$
|
|
5129
|
+
if (moonbitlang$core$builtin$$Compare$op_gt$18$(mantissa, moonbitlang$core$strconv$$max_mantissa_fast_path)) return Option$None$8$;
|
|
5108
5130
|
value = moonbitlang$core$double$$Double$convert_uint64(mantissa) * moonbitlang$core$strconv$$pow10_fast_path(moonbitlang$core$int64$$Int64$to_int(moonbitlang$core$strconv$$max_exponent_fast_path));
|
|
5109
5131
|
}
|
|
5110
5132
|
if (self.negative) value = -value;
|
|
@@ -5131,8 +5153,8 @@ function moonbitlang$core$strconv$$parse_double(str) {
|
|
|
5131
5153
|
return moonbitlang$core$strconv$$Decimal$to_double_priv(_tmp);
|
|
5132
5154
|
}
|
|
5133
5155
|
}
|
|
5134
|
-
} else return moonbitlang$core$strconv$$syntax_err$
|
|
5135
|
-
else return moonbitlang$core$strconv$$syntax_err$
|
|
5156
|
+
} else return moonbitlang$core$strconv$$syntax_err$33$();
|
|
5157
|
+
else return moonbitlang$core$strconv$$syntax_err$33$();
|
|
5136
5158
|
}
|
|
5137
5159
|
function f4ah6o$encoding_sjis$$decode_jis_x_0208(code) {
|
|
5138
5160
|
switch (code) {
|
|
@@ -12033,7 +12055,7 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12033
12055
|
const len = src.length;
|
|
12034
12056
|
if (self.pending_first_byte !== 0) if (len === 0) {
|
|
12035
12057
|
if (last) {
|
|
12036
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12058
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12037
12059
|
self.had_replacements = true;
|
|
12038
12060
|
self.pending_first_byte = 0;
|
|
12039
12061
|
}
|
|
@@ -12044,12 +12066,12 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12044
12066
|
if (b2 >= 64 && b2 <= 252 && b2 !== 127) {
|
|
12045
12067
|
const _bind = f4ah6o$encoding_sjis$$decode_jis_x_0208(b1 << 8 | b2);
|
|
12046
12068
|
if (_bind === -1) {
|
|
12047
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12069
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12048
12070
|
self.had_replacements = true;
|
|
12049
|
-
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12071
|
+
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(_bind)}`;
|
|
12050
12072
|
i = 1;
|
|
12051
12073
|
} else {
|
|
12052
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12074
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12053
12075
|
self.had_replacements = true;
|
|
12054
12076
|
i = 0;
|
|
12055
12077
|
}
|
|
@@ -12060,11 +12082,11 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12060
12082
|
$bound_check(src, _tmp);
|
|
12061
12083
|
const b1 = src[_tmp];
|
|
12062
12084
|
if (b1 < 128) {
|
|
12063
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12085
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(b1)}`;
|
|
12064
12086
|
i = i + 1 | 0;
|
|
12065
12087
|
} else if (b1 >= 161 && b1 <= 223) {
|
|
12066
12088
|
const ch = 65377 + (b1 - 161 | 0) | 0;
|
|
12067
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12089
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(ch)}`;
|
|
12068
12090
|
i = i + 1 | 0;
|
|
12069
12091
|
} else if (b1 >= 129 && b1 <= 159 || b1 >= 224 && b1 <= 239) if ((i + 1 | 0) < len) {
|
|
12070
12092
|
const _tmp$2 = i + 1 | 0;
|
|
@@ -12073,17 +12095,17 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12073
12095
|
if (b2 >= 64 && b2 <= 252 && b2 !== 127) {
|
|
12074
12096
|
const _bind = f4ah6o$encoding_sjis$$decode_jis_x_0208(b1 << 8 | b2);
|
|
12075
12097
|
if (_bind === -1) {
|
|
12076
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12098
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12077
12099
|
self.had_replacements = true;
|
|
12078
|
-
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12100
|
+
} else result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(_bind)}`;
|
|
12079
12101
|
i = i + 2 | 0;
|
|
12080
12102
|
} else {
|
|
12081
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12103
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12082
12104
|
self.had_replacements = true;
|
|
12083
12105
|
i = i + 1 | 0;
|
|
12084
12106
|
}
|
|
12085
12107
|
} else if (last) {
|
|
12086
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12108
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12087
12109
|
self.had_replacements = true;
|
|
12088
12110
|
i = i + 1 | 0;
|
|
12089
12111
|
} else {
|
|
@@ -12091,7 +12113,7 @@ function f4ah6o$encoding_sjis$$Decoder$decode_to_string(self, src, last) {
|
|
|
12091
12113
|
i = i + 1 | 0;
|
|
12092
12114
|
}
|
|
12093
12115
|
else {
|
|
12094
|
-
result = `${result}${moonbitlang$core$builtin$$Show$to_string$
|
|
12116
|
+
result = `${result}${moonbitlang$core$builtin$$Show$to_string$16$(65533)}`;
|
|
12095
12117
|
self.had_replacements = true;
|
|
12096
12118
|
i = i + 1 | 0;
|
|
12097
12119
|
}
|
|
@@ -12110,12 +12132,12 @@ function f4ah6o$encoding_sjis$$shift_jis_to_utf8(data) {
|
|
|
12110
12132
|
return f4ah6o$encoding_sjis$$decode(data)._0;
|
|
12111
12133
|
}
|
|
12112
12134
|
function f4ah6o$jww_parser$core$$LayerGroup$default() {
|
|
12113
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
12135
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12114
12136
|
let _tmp = 0;
|
|
12115
12137
|
while (true) {
|
|
12116
12138
|
const _ = _tmp;
|
|
12117
12139
|
if (_ < 16) {
|
|
12118
|
-
moonbitlang$core$array$$Array$push$
|
|
12140
|
+
moonbitlang$core$array$$Array$push$14$(layers, f4ah6o$jww_parser$core$$default$46$record$47$1387);
|
|
12119
12141
|
_tmp = _ + 1 | 0;
|
|
12120
12142
|
continue;
|
|
12121
12143
|
} else break;
|
|
@@ -12146,11 +12168,12 @@ function f4ah6o$jww_parser$core$$Document$default() {
|
|
|
12146
12168
|
paper_size: 0,
|
|
12147
12169
|
write_layer_group: 0,
|
|
12148
12170
|
layer_groups,
|
|
12149
|
-
entities: moonbitlang$core$array$$Array$new$46$inner$
|
|
12150
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12151
|
-
embedded_images: moonbitlang$core$array$$Array$new$46$inner$
|
|
12152
|
-
print_settings: f4ah6o$jww_parser$core$$default$46$record$47$
|
|
12153
|
-
|
|
12171
|
+
entities: moonbitlang$core$array$$Array$new$46$inner$23$(0),
|
|
12172
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12173
|
+
embedded_images: moonbitlang$core$array$$Array$new$46$inner$25$(0),
|
|
12174
|
+
print_settings: f4ah6o$jww_parser$core$$default$46$record$47$1393,
|
|
12175
|
+
sunpou_settings: f4ah6o$jww_parser$core$$default$46$record$47$1392,
|
|
12176
|
+
metadata_settings: f4ah6o$jww_parser$core$$default$46$record$47$1391
|
|
12154
12177
|
};
|
|
12155
12178
|
}
|
|
12156
12179
|
function f4ah6o$jww_parser$core$$Entity$base(self) {
|
|
@@ -12210,6 +12233,111 @@ function f4ah6o$jww_parser$core$$parse_print_settings(reader) {
|
|
|
12210
12233
|
rotation_setting: f4ah6o$jww_parser$core$$Reader$read_dword(reader)
|
|
12211
12234
|
};
|
|
12212
12235
|
}
|
|
12236
|
+
function f4ah6o$jww_parser$core$$parse_sunpou_settings(reader) {
|
|
12237
|
+
let _tmp = 0;
|
|
12238
|
+
while (true) {
|
|
12239
|
+
const _ = _tmp;
|
|
12240
|
+
if (_ < 14) {
|
|
12241
|
+
f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12242
|
+
_tmp = _ + 1 | 0;
|
|
12243
|
+
continue;
|
|
12244
|
+
} else break;
|
|
12245
|
+
}
|
|
12246
|
+
return {
|
|
12247
|
+
sunpou1: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12248
|
+
sunpou2: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12249
|
+
sunpou3: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12250
|
+
sunpou4: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12251
|
+
sunpou5: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12252
|
+
dummy: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12253
|
+
max_line_width: f4ah6o$jww_parser$core$$Reader$read_dword(reader)
|
|
12254
|
+
};
|
|
12255
|
+
}
|
|
12256
|
+
function f4ah6o$jww_parser$core$$read_cstring(reader) {
|
|
12257
|
+
const len_byte = f4ah6o$jww_parser$core$$Reader$read_byte(reader);
|
|
12258
|
+
let length;
|
|
12259
|
+
if (len_byte < 255) length = len_byte;
|
|
12260
|
+
else {
|
|
12261
|
+
const len_word = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12262
|
+
if (len_word < 65535) length = len_word;
|
|
12263
|
+
else {
|
|
12264
|
+
const len_dword = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12265
|
+
length = len_dword < 0 || len_dword > 1e6 ? 0 : len_dword;
|
|
12266
|
+
}
|
|
12267
|
+
}
|
|
12268
|
+
if (length <= 0 || length > 1e6) return "";
|
|
12269
|
+
return f4ah6o$encoding_sjis$$shift_jis_to_utf8(f4ah6o$jww_parser$core$$Reader$read_bytes(reader, (reader.data.length - reader.pos | 0) < length ? reader.data.length - reader.pos | 0 : length));
|
|
12270
|
+
}
|
|
12271
|
+
function f4ah6o$jww_parser$core$$parse_layer_names(reader, layer_groups) {
|
|
12272
|
+
const layer_names = moonbitlang$core$array$$Array$new$46$inner$15$(0);
|
|
12273
|
+
let _tmp = 0;
|
|
12274
|
+
while (true) {
|
|
12275
|
+
const _g_idx = _tmp;
|
|
12276
|
+
if (_g_idx < 16) {
|
|
12277
|
+
const group_layer_names = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12278
|
+
let _tmp$2$1 = 0;
|
|
12279
|
+
while (true) {
|
|
12280
|
+
const _l_idx = _tmp$2$1;
|
|
12281
|
+
if (_l_idx < 16) {
|
|
12282
|
+
moonbitlang$core$array$$Array$push$13$(group_layer_names, f4ah6o$jww_parser$core$$read_cstring(reader));
|
|
12283
|
+
_tmp$2$1 = _l_idx + 1 | 0;
|
|
12284
|
+
continue;
|
|
12285
|
+
} else break;
|
|
12286
|
+
}
|
|
12287
|
+
moonbitlang$core$array$$Array$push$15$(layer_names, group_layer_names);
|
|
12288
|
+
_tmp = _g_idx + 1 | 0;
|
|
12289
|
+
continue;
|
|
12290
|
+
} else break;
|
|
12291
|
+
}
|
|
12292
|
+
const group_names = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12293
|
+
let _tmp$2 = 0;
|
|
12294
|
+
while (true) {
|
|
12295
|
+
const _g_idx = _tmp$2;
|
|
12296
|
+
if (_g_idx < 16) {
|
|
12297
|
+
moonbitlang$core$array$$Array$push$13$(group_names, f4ah6o$jww_parser$core$$read_cstring(reader));
|
|
12298
|
+
_tmp$2 = _g_idx + 1 | 0;
|
|
12299
|
+
continue;
|
|
12300
|
+
} else break;
|
|
12301
|
+
}
|
|
12302
|
+
const result = moonbitlang$core$array$$Array$new$46$inner$12$(0);
|
|
12303
|
+
const _end375 = layer_groups.length;
|
|
12304
|
+
let _tmp$3 = 0;
|
|
12305
|
+
while (true) {
|
|
12306
|
+
const g_idx = _tmp$3;
|
|
12307
|
+
if (g_idx < _end375) {
|
|
12308
|
+
const lg = moonbitlang$core$array$$Array$at$12$(layer_groups, g_idx);
|
|
12309
|
+
const group_name = moonbitlang$core$array$$Array$at$13$(group_names, g_idx);
|
|
12310
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12311
|
+
const _end383 = lg.layers.length;
|
|
12312
|
+
let _tmp$4 = 0;
|
|
12313
|
+
while (true) {
|
|
12314
|
+
const l_idx = _tmp$4;
|
|
12315
|
+
if (l_idx < _end383) {
|
|
12316
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
12317
|
+
const layer_name = moonbitlang$core$array$$Array$at$13$(moonbitlang$core$array$$Array$at$15$(layer_names, g_idx), l_idx);
|
|
12318
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12319
|
+
state: l.state,
|
|
12320
|
+
protect: l.protect,
|
|
12321
|
+
name: layer_name
|
|
12322
|
+
});
|
|
12323
|
+
_tmp$4 = l_idx + 1 | 0;
|
|
12324
|
+
continue;
|
|
12325
|
+
} else break;
|
|
12326
|
+
}
|
|
12327
|
+
moonbitlang$core$array$$Array$push$12$(result, {
|
|
12328
|
+
state: lg.state,
|
|
12329
|
+
write_layer: lg.write_layer,
|
|
12330
|
+
scale: lg.scale,
|
|
12331
|
+
protect: lg.protect,
|
|
12332
|
+
layers,
|
|
12333
|
+
name: group_name
|
|
12334
|
+
});
|
|
12335
|
+
_tmp$3 = g_idx + 1 | 0;
|
|
12336
|
+
continue;
|
|
12337
|
+
} else break;
|
|
12338
|
+
}
|
|
12339
|
+
return result;
|
|
12340
|
+
}
|
|
12213
12341
|
function f4ah6o$jww_parser$core$$find_entity_list_offset(data, version) {
|
|
12214
12342
|
const schema_low = version & 255;
|
|
12215
12343
|
const schema_high = version >>> 8 & 255;
|
|
@@ -12277,22 +12405,22 @@ function f4ah6o$jww_parser$core$$find_bm_marker(content) {
|
|
|
12277
12405
|
if (len < 4) return;
|
|
12278
12406
|
let i = 0;
|
|
12279
12407
|
while (true) if (i < (len - 3 | 0)) {
|
|
12280
|
-
if (moonbitlang$core$array$$Array$at$
|
|
12408
|
+
if (moonbitlang$core$array$$Array$at$16$(chars, i) === 94 && moonbitlang$core$array$$Array$at$16$(chars, i + 1 | 0) === 64 && moonbitlang$core$array$$Array$at$16$(chars, i + 2 | 0) === 66 && moonbitlang$core$array$$Array$at$16$(chars, i + 3 | 0) === 77) return i;
|
|
12281
12409
|
i = i + 1 | 0;
|
|
12282
12410
|
continue;
|
|
12283
12411
|
} else break;
|
|
12284
12412
|
}
|
|
12285
12413
|
function f4ah6o$jww_parser$core$$is_metadata_text(content) {
|
|
12286
12414
|
return moonbitlang$core$string$$String$has_prefix(content, {
|
|
12287
|
-
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
12415
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$940,
|
|
12288
12416
|
start: 0,
|
|
12289
12417
|
end: 8
|
|
12290
12418
|
}) || moonbitlang$core$string$$String$has_prefix(content, {
|
|
12291
|
-
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
12419
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$941,
|
|
12292
12420
|
start: 0,
|
|
12293
12421
|
end: 5
|
|
12294
12422
|
}) || moonbitlang$core$string$$String$has_prefix(content, {
|
|
12295
|
-
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$
|
|
12423
|
+
str: f4ah6o$jww_parser$core$$is_metadata_text$46$42$bind$124$942,
|
|
12296
12424
|
start: 0,
|
|
12297
12425
|
end: 5
|
|
12298
12426
|
});
|
|
@@ -12300,10 +12428,10 @@ function f4ah6o$jww_parser$core$$is_metadata_text(content) {
|
|
|
12300
12428
|
function f4ah6o$jww_parser$core$$normalize_image_path(raw_path) {
|
|
12301
12429
|
const all_chars = moonbitlang$core$string$$String$to_array(raw_path);
|
|
12302
12430
|
const chars = moonbitlang$core$string$$String$has_prefix(raw_path, {
|
|
12303
|
-
str: f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$
|
|
12431
|
+
str: f4ah6o$jww_parser$core$$normalize_image_path$46$42$bind$124$945,
|
|
12304
12432
|
start: 0,
|
|
12305
12433
|
end: 6
|
|
12306
|
-
}) && all_chars.length > 6 ? moonbitlang$core$array$$Array$from_iter$
|
|
12434
|
+
}) && all_chars.length > 6 ? moonbitlang$core$array$$Array$from_iter$16$(moonbitlang$core$array$$ArrayView$iter$16$(moonbitlang$core$array$$Array$sub$46$inner$16$(all_chars, 6, void 0))) : all_chars;
|
|
12307
12435
|
let normalized = "";
|
|
12308
12436
|
let prev_was_letter = false;
|
|
12309
12437
|
const _len = chars.length;
|
|
@@ -12316,7 +12444,7 @@ function f4ah6o$jww_parser$core$$normalize_image_path(raw_path) {
|
|
|
12316
12444
|
normalized = `${normalized}/`;
|
|
12317
12445
|
prev_was_letter = false;
|
|
12318
12446
|
} else {
|
|
12319
|
-
normalized = `${normalized}${moonbitlang$core$builtin$$Show$to_string$
|
|
12447
|
+
normalized = `${normalized}${moonbitlang$core$builtin$$Show$to_string$16$(c)}`;
|
|
12320
12448
|
prev_was_letter = c >= 65 && c <= 90 || c >= 97 && c <= 122;
|
|
12321
12449
|
}
|
|
12322
12450
|
_tmp = _i + 1 | 0;
|
|
@@ -12341,22 +12469,22 @@ function f4ah6o$jww_parser$core$$parse_double_or_default(s, default_) {
|
|
|
12341
12469
|
return default_;
|
|
12342
12470
|
}
|
|
12343
12471
|
function f4ah6o$jww_parser$core$$split_by_comma(path_and_params) {
|
|
12344
|
-
const result = moonbitlang$core$array$$Array$new$46$inner$
|
|
12472
|
+
const result = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12345
12473
|
let current = "";
|
|
12346
12474
|
const _it = moonbitlang$core$string$$String$iterator(path_and_params);
|
|
12347
12475
|
while (true) {
|
|
12348
|
-
const _bind = moonbitlang$core$builtin$$Iterator$next$
|
|
12476
|
+
const _bind = moonbitlang$core$builtin$$Iterator$next$16$(_it);
|
|
12349
12477
|
if (_bind === -1) break;
|
|
12350
12478
|
else {
|
|
12351
12479
|
const _c = _bind;
|
|
12352
12480
|
if (_c === 44) {
|
|
12353
|
-
moonbitlang$core$array$$Array$push$
|
|
12481
|
+
moonbitlang$core$array$$Array$push$13$(result, current);
|
|
12354
12482
|
current = "";
|
|
12355
|
-
} else current = `${current}${moonbitlang$core$builtin$$Show$to_string$
|
|
12483
|
+
} else current = `${current}${moonbitlang$core$builtin$$Show$to_string$16$(_c)}`;
|
|
12356
12484
|
continue;
|
|
12357
12485
|
}
|
|
12358
12486
|
}
|
|
12359
|
-
if (!(current === "")) moonbitlang$core$array$$Array$push$
|
|
12487
|
+
if (!(current === "")) moonbitlang$core$array$$Array$push$13$(result, current);
|
|
12360
12488
|
return result;
|
|
12361
12489
|
}
|
|
12362
12490
|
function f4ah6o$jww_parser$core$$parse_image_from_bm_string(content, base, start_x, start_y, angle, size_x, size_y) {
|
|
@@ -12366,33 +12494,18 @@ function f4ah6o$jww_parser$core$$parse_image_from_bm_string(content, base, start
|
|
|
12366
12494
|
else bm_offset = _bind;
|
|
12367
12495
|
const chars = moonbitlang$core$string$$String$to_array(content);
|
|
12368
12496
|
if (chars.length <= (bm_offset + 4 | 0)) return;
|
|
12369
|
-
const parts = f4ah6o$jww_parser$core$$split_by_comma(moonbitlang$core$string$$String$from_array(moonbitlang$core$array$$Array$sub$46$inner$
|
|
12497
|
+
const parts = f4ah6o$jww_parser$core$$split_by_comma(moonbitlang$core$string$$String$from_array(moonbitlang$core$array$$Array$sub$46$inner$16$(chars, bm_offset + 4 | 0, void 0)));
|
|
12370
12498
|
if (parts.length < 1) return;
|
|
12371
12499
|
return {
|
|
12372
12500
|
base,
|
|
12373
|
-
image_path: f4ah6o$jww_parser$core$$normalize_image_path(moonbitlang$core$array$$Array$at$
|
|
12501
|
+
image_path: f4ah6o$jww_parser$core$$normalize_image_path(moonbitlang$core$array$$Array$at$13$(parts, 0)),
|
|
12374
12502
|
x: start_x,
|
|
12375
12503
|
y: start_y,
|
|
12376
|
-
width: parts.length >= 2 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$
|
|
12377
|
-
height: parts.length >= 3 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$
|
|
12504
|
+
width: parts.length >= 2 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$13$(parts, 1), size_x) : size_x,
|
|
12505
|
+
height: parts.length >= 3 ? f4ah6o$jww_parser$core$$parse_double_or_default(moonbitlang$core$array$$Array$at$13$(parts, 2), size_y) : size_y,
|
|
12378
12506
|
rotation: angle
|
|
12379
12507
|
};
|
|
12380
12508
|
}
|
|
12381
|
-
function f4ah6o$jww_parser$core$$read_cstring(reader) {
|
|
12382
|
-
const len_byte = f4ah6o$jww_parser$core$$Reader$read_byte(reader);
|
|
12383
|
-
let length;
|
|
12384
|
-
if (len_byte < 255) length = len_byte;
|
|
12385
|
-
else {
|
|
12386
|
-
const len_word = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12387
|
-
if (len_word < 65535) length = len_word;
|
|
12388
|
-
else {
|
|
12389
|
-
const len_dword = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12390
|
-
length = len_dword < 0 || len_dword > 1e6 ? 0 : len_dword;
|
|
12391
|
-
}
|
|
12392
|
-
}
|
|
12393
|
-
if (length <= 0 || length > 1e6) return "";
|
|
12394
|
-
return f4ah6o$encoding_sjis$$shift_jis_to_utf8(f4ah6o$jww_parser$core$$Reader$read_bytes(reader, (reader.data.length - reader.pos | 0) < length ? reader.data.length - reader.pos | 0 : length));
|
|
12395
|
-
}
|
|
12396
12509
|
function f4ah6o$jww_parser$core$$parse_entity_by_class(class_name, reader, version) {
|
|
12397
12510
|
if (class_name === "CDataSen") return new $64$f4ah6o$47$jww_parser$47$core$46$Entity$Line({
|
|
12398
12511
|
base: f4ah6o$jww_parser$core$$parse_entity_base(reader, version),
|
|
@@ -12585,14 +12698,14 @@ function f4ah6o$jww_parser$core$$parse_entity_with_pid_tracking(reader, version,
|
|
|
12585
12698
|
const _tmp$2 = name_chars;
|
|
12586
12699
|
$bound_check(name_bytes, i);
|
|
12587
12700
|
const _p = name_bytes[i];
|
|
12588
|
-
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$
|
|
12701
|
+
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$16$(_p)}`;
|
|
12589
12702
|
_tmp = i + 1 | 0;
|
|
12590
12703
|
continue;
|
|
12591
12704
|
} else break;
|
|
12592
12705
|
}
|
|
12593
12706
|
class_name = name_chars;
|
|
12594
12707
|
const pid = updated_next_pid;
|
|
12595
|
-
if (pid < 65536) moonbitlang$core$array$$Array$set$
|
|
12708
|
+
if (pid < 65536) moonbitlang$core$array$$Array$set$13$(pid_to_class, pid, class_name);
|
|
12596
12709
|
updated_next_pid = (pid >>> 0) + 1 | 0;
|
|
12597
12710
|
} else if (class_id === 32768) return {
|
|
12598
12711
|
entity: void 0,
|
|
@@ -12602,7 +12715,7 @@ function f4ah6o$jww_parser$core$$parse_entity_with_pid_tracking(reader, version,
|
|
|
12602
12715
|
else {
|
|
12603
12716
|
const class_pid = class_id & 32767;
|
|
12604
12717
|
if (class_pid < 65536) {
|
|
12605
|
-
const name = moonbitlang$core$array$$Array$at$
|
|
12718
|
+
const name = moonbitlang$core$array$$Array$at$13$(pid_to_class, class_pid);
|
|
12606
12719
|
if (name === "") {
|
|
12607
12720
|
f4ah6o$jww_parser$core$$parse_entity_base(reader, version);
|
|
12608
12721
|
f4ah6o$jww_parser$core$Reader$read_double(reader);
|
|
@@ -12639,13 +12752,13 @@ function f4ah6o$jww_parser$core$$parse_entity_list(data, offset, version) {
|
|
|
12639
12752
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12640
12753
|
const start_pos = reader.pos;
|
|
12641
12754
|
const count = f4ah6o$jww_parser$core$$Reader$read_word(reader);
|
|
12642
|
-
const entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
12643
|
-
let pid_to_class = moonbitlang$core$array$$Array$new$46$inner$
|
|
12755
|
+
const entities = moonbitlang$core$array$$Array$new$46$inner$23$(0);
|
|
12756
|
+
let pid_to_class = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12644
12757
|
let _tmp = 0;
|
|
12645
12758
|
while (true) {
|
|
12646
12759
|
const _ = _tmp;
|
|
12647
12760
|
if (_ < 65536) {
|
|
12648
|
-
moonbitlang$core$array$$Array$push$
|
|
12761
|
+
moonbitlang$core$array$$Array$push$13$(pid_to_class, "");
|
|
12649
12762
|
_tmp = _ + 1 | 0;
|
|
12650
12763
|
continue;
|
|
12651
12764
|
} else break;
|
|
@@ -12667,7 +12780,7 @@ function f4ah6o$jww_parser$core$$parse_entity_list(data, offset, version) {
|
|
|
12667
12780
|
const _ent = _x;
|
|
12668
12781
|
const _p2c = result.pid_to_class;
|
|
12669
12782
|
const _npid = result.next_pid;
|
|
12670
|
-
moonbitlang$core$array$$Array$push$
|
|
12783
|
+
moonbitlang$core$array$$Array$push$23$(entities, _ent);
|
|
12671
12784
|
pid_to_class = _p2c;
|
|
12672
12785
|
next_pid = _npid;
|
|
12673
12786
|
}
|
|
@@ -12695,14 +12808,14 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12695
12808
|
const _tmp$2 = name_chars;
|
|
12696
12809
|
$bound_check(name_bytes, i);
|
|
12697
12810
|
const _p = name_bytes[i];
|
|
12698
|
-
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$
|
|
12811
|
+
name_chars = `${_tmp$2}${moonbitlang$core$builtin$$Show$to_string$16$(_p)}`;
|
|
12699
12812
|
_tmp = i + 1 | 0;
|
|
12700
12813
|
continue;
|
|
12701
12814
|
} else break;
|
|
12702
12815
|
}
|
|
12703
12816
|
const class_name = name_chars;
|
|
12704
12817
|
const id_int = next_id;
|
|
12705
|
-
if (id_int < 256) moonbitlang$core$array$$Array$set$
|
|
12818
|
+
if (id_int < 256) moonbitlang$core$array$$Array$set$13$(class_map, id_int, class_name);
|
|
12706
12819
|
_bind = {
|
|
12707
12820
|
_0: class_map,
|
|
12708
12821
|
_1: (next_id + 1 | 0) & 65535
|
|
@@ -12715,7 +12828,7 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12715
12828
|
else {
|
|
12716
12829
|
const class_pid = class_id & 32767;
|
|
12717
12830
|
if (class_pid < 256) {
|
|
12718
|
-
moonbitlang$core$array$$Array$at$
|
|
12831
|
+
moonbitlang$core$array$$Array$at$13$(class_map, class_pid);
|
|
12719
12832
|
_bind = {
|
|
12720
12833
|
_0: class_map,
|
|
12721
12834
|
_1: next_id
|
|
@@ -12753,27 +12866,27 @@ function f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version,
|
|
|
12753
12866
|
}
|
|
12754
12867
|
function f4ah6o$jww_parser$core$$parse_block_def_list(data, offset, version) {
|
|
12755
12868
|
if (offset >= data.length) return {
|
|
12756
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12869
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12757
12870
|
end_offset: offset
|
|
12758
12871
|
};
|
|
12759
12872
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12760
12873
|
const start_pos = reader.pos;
|
|
12761
12874
|
if ((reader.data.length - reader.pos | 0) < 4) return {
|
|
12762
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12875
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12763
12876
|
end_offset: offset
|
|
12764
12877
|
};
|
|
12765
12878
|
const count = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12766
12879
|
if (count >>> 0 > 1e4) return {
|
|
12767
|
-
block_defs: moonbitlang$core$array$$Array$new$46$inner$
|
|
12880
|
+
block_defs: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12768
12881
|
end_offset: offset
|
|
12769
12882
|
};
|
|
12770
|
-
const block_defs = moonbitlang$core$array$$Array$new$46$inner$
|
|
12771
|
-
let class_map = moonbitlang$core$array$$Array$new$46$inner$
|
|
12883
|
+
const block_defs = moonbitlang$core$array$$Array$new$46$inner$24$(0);
|
|
12884
|
+
let class_map = moonbitlang$core$array$$Array$new$46$inner$13$(0);
|
|
12772
12885
|
let _tmp = 0;
|
|
12773
12886
|
while (true) {
|
|
12774
12887
|
const _ = _tmp;
|
|
12775
12888
|
if (_ < 256) {
|
|
12776
|
-
moonbitlang$core$array$$Array$push$
|
|
12889
|
+
moonbitlang$core$array$$Array$push$13$(class_map, "");
|
|
12777
12890
|
_tmp = _ + 1 | 0;
|
|
12778
12891
|
continue;
|
|
12779
12892
|
} else break;
|
|
@@ -12787,7 +12900,7 @@ function f4ah6o$jww_parser$core$$parse_block_def_list(data, offset, version) {
|
|
|
12787
12900
|
if ((reader.data.length - reader.pos | 0) < 8) break;
|
|
12788
12901
|
const result = f4ah6o$jww_parser$core$$parse_block_def_with_tracking(reader, version, class_map, next_id);
|
|
12789
12902
|
const _bind = result.block_def;
|
|
12790
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
12903
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$24$(block_defs, _bind);
|
|
12791
12904
|
class_map = result.class_map;
|
|
12792
12905
|
next_id = result.next_id;
|
|
12793
12906
|
_tmp$2 = _ + 1 | 0;
|
|
@@ -12831,20 +12944,20 @@ function f4ah6o$jww_parser$core$$parse_single_embedded_image(reader, index) {
|
|
|
12831
12944
|
};
|
|
12832
12945
|
}
|
|
12833
12946
|
function f4ah6o$jww_parser$core$$parse_embedded_images(data, offset, version) {
|
|
12834
|
-
if (version >>> 0 < 700) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12835
|
-
if (offset >= data.length) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12947
|
+
if (version >>> 0 < 700) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12948
|
+
if (offset >= data.length) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12836
12949
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), offset, data.length)));
|
|
12837
|
-
if ((reader.data.length - reader.pos | 0) < 4) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12950
|
+
if ((reader.data.length - reader.pos | 0) < 4) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12838
12951
|
const count = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12839
|
-
if (count >>> 0 > 1e3) return moonbitlang$core$array$$Array$new$46$inner$
|
|
12840
|
-
const embedded_images = moonbitlang$core$array$$Array$new$46$inner$
|
|
12952
|
+
if (count >>> 0 > 1e3) return moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12953
|
+
const embedded_images = moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12841
12954
|
const _end15 = count;
|
|
12842
12955
|
let _tmp = 0;
|
|
12843
12956
|
while (true) {
|
|
12844
12957
|
const i = _tmp;
|
|
12845
12958
|
if (i < _end15) {
|
|
12846
12959
|
const result = f4ah6o$jww_parser$core$$parse_single_embedded_image(reader, i);
|
|
12847
|
-
if (result === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
12960
|
+
if (result === void 0) {} else moonbitlang$core$array$$Array$push$25$(embedded_images, result);
|
|
12848
12961
|
_tmp = i + 1 | 0;
|
|
12849
12962
|
continue;
|
|
12850
12963
|
} else break;
|
|
@@ -12860,15 +12973,15 @@ function f4ah6o$jww_parser$core$$set_layer_names(layer_groups) {
|
|
|
12860
12973
|
if (g_idx < _end290) {
|
|
12861
12974
|
const lg = moonbitlang$core$array$$Array$at$12$(layer_groups, g_idx);
|
|
12862
12975
|
const group_name = lg.name === "" ? `Group${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}` : lg.name;
|
|
12863
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
12976
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12864
12977
|
const _end298 = lg.layers.length;
|
|
12865
12978
|
let _tmp$2 = 0;
|
|
12866
12979
|
while (true) {
|
|
12867
12980
|
const l_idx = _tmp$2;
|
|
12868
12981
|
if (l_idx < _end298) {
|
|
12869
|
-
const l = moonbitlang$core$array$$Array$at$
|
|
12982
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
12870
12983
|
const layer_name = l.name === "" ? `${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}-${moonbitlang$core$int$$Int$to_string$46$inner(l_idx, 10)}` : l.name;
|
|
12871
|
-
moonbitlang$core$array$$Array$push$
|
|
12984
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12872
12985
|
state: l.state,
|
|
12873
12986
|
protect: l.protect,
|
|
12874
12987
|
name: layer_name
|
|
@@ -12893,7 +13006,7 @@ function f4ah6o$jww_parser$core$$set_layer_names(layer_groups) {
|
|
|
12893
13006
|
}
|
|
12894
13007
|
function f4ah6o$jww_parser$core$$parse(data) {
|
|
12895
13008
|
if (data.length < 8) return f4ah6o$jww_parser$core$$Document$default();
|
|
12896
|
-
if (moonbitlang$core$builtin$$op_notequal$11$(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 0, f4ah6o$jww_parser$core$$parse$46$constr$47$
|
|
13009
|
+
if (moonbitlang$core$builtin$$op_notequal$11$(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 0, f4ah6o$jww_parser$core$$parse$46$constr$47$1778)), $bytes_literal$1)) return f4ah6o$jww_parser$core$$Document$default();
|
|
12897
13010
|
const reader = f4ah6o$jww_parser$core$$Reader$new(moonbitlang$core$bytes$$Bytes$from_array(moonbitlang$core$array$$Array$sub$46$inner$4$(moonbitlang$core$bytes$$Bytes$to_array(data), 8, data.length)));
|
|
12898
13011
|
const version = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12899
13012
|
const memo = f4ah6o$jww_parser$core$$read_cstring(reader);
|
|
@@ -12908,12 +13021,12 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12908
13021
|
const write_layer = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12909
13022
|
const scale = f4ah6o$jww_parser$core$Reader$read_double(reader);
|
|
12910
13023
|
const protect = f4ah6o$jww_parser$core$$Reader$read_dword(reader);
|
|
12911
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
13024
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$14$(0);
|
|
12912
13025
|
let _tmp$2 = 0;
|
|
12913
13026
|
while (true) {
|
|
12914
13027
|
const _l_idx = _tmp$2;
|
|
12915
13028
|
if (_l_idx < 16) {
|
|
12916
|
-
moonbitlang$core$array$$Array$push$
|
|
13029
|
+
moonbitlang$core$array$$Array$push$14$(layers, {
|
|
12917
13030
|
state: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12918
13031
|
protect: f4ah6o$jww_parser$core$$Reader$read_dword(reader),
|
|
12919
13032
|
name: ""
|
|
@@ -12935,11 +13048,13 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12935
13048
|
} else break;
|
|
12936
13049
|
}
|
|
12937
13050
|
const print_settings = f4ah6o$jww_parser$core$$parse_print_settings(reader);
|
|
13051
|
+
const sunpou_settings = f4ah6o$jww_parser$core$$parse_sunpou_settings(reader);
|
|
13052
|
+
const layer_groups$2 = f4ah6o$jww_parser$core$$parse_layer_names(reader, layer_groups);
|
|
12938
13053
|
const entity_offset = f4ah6o$jww_parser$core$$find_entity_list_offset(data, version);
|
|
12939
13054
|
let _bind;
|
|
12940
13055
|
if (entity_offset === void 0) _bind = {
|
|
12941
|
-
_0: moonbitlang$core$array$$Array$new$46$inner$
|
|
12942
|
-
_1: moonbitlang$core$array$$Array$new$46$inner$
|
|
13056
|
+
_0: moonbitlang$core$array$$Array$new$46$inner$23$(0),
|
|
13057
|
+
_1: moonbitlang$core$array$$Array$new$46$inner$24$(0),
|
|
12943
13058
|
_2: 0
|
|
12944
13059
|
};
|
|
12945
13060
|
else {
|
|
@@ -12955,18 +13070,19 @@ function f4ah6o$jww_parser$core$$parse(data) {
|
|
|
12955
13070
|
const _entities = _bind._0;
|
|
12956
13071
|
const _block_defs = _bind._1;
|
|
12957
13072
|
const _block_end_offset = _bind._2;
|
|
12958
|
-
const embedded_images = version >>> 0 >= 700 ? f4ah6o$jww_parser$core$$parse_embedded_images(data, _block_end_offset, version) : moonbitlang$core$array$$Array$new$46$inner$
|
|
13073
|
+
const embedded_images = version >>> 0 >= 700 ? f4ah6o$jww_parser$core$$parse_embedded_images(data, _block_end_offset, version) : moonbitlang$core$array$$Array$new$46$inner$25$(0);
|
|
12959
13074
|
return {
|
|
12960
13075
|
version,
|
|
12961
13076
|
memo,
|
|
12962
13077
|
paper_size,
|
|
12963
13078
|
write_layer_group,
|
|
12964
|
-
layer_groups: f4ah6o$jww_parser$core$$set_layer_names(layer_groups),
|
|
13079
|
+
layer_groups: f4ah6o$jww_parser$core$$set_layer_names(layer_groups$2),
|
|
12965
13080
|
entities: _entities,
|
|
12966
13081
|
block_defs: _block_defs,
|
|
12967
13082
|
embedded_images,
|
|
12968
13083
|
print_settings,
|
|
12969
|
-
|
|
13084
|
+
sunpou_settings,
|
|
13085
|
+
metadata_settings: f4ah6o$jww_parser$core$$default$46$record$47$1391
|
|
12970
13086
|
};
|
|
12971
13087
|
}
|
|
12972
13088
|
function f4ah6o$jww_parser$dxf$$layer_table(doc) {
|
|
@@ -13004,17 +13120,17 @@ function f4ah6o$jww_parser$dxf$$ltype_table() {
|
|
|
13004
13120
|
output = `${output}2\nLTYPE\n`;
|
|
13005
13121
|
output = `${output}70\n11\n`;
|
|
13006
13122
|
const ltypes = [
|
|
13007
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13008
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13009
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13010
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13011
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13012
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13013
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13014
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13015
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13016
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13017
|
-
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$
|
|
13123
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1820,
|
|
13124
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1821,
|
|
13125
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1822,
|
|
13126
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1823,
|
|
13127
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1824,
|
|
13128
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1825,
|
|
13129
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1826,
|
|
13130
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1827,
|
|
13131
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1828,
|
|
13132
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1829,
|
|
13133
|
+
f4ah6o$jww_parser$dxf$$ltype_table$46$tuple$47$1830
|
|
13018
13134
|
];
|
|
13019
13135
|
const _len = ltypes.length;
|
|
13020
13136
|
let _tmp = 0;
|
|
@@ -13327,8 +13443,8 @@ function f4ah6o$jww_parser$dxf$$get_block_name(jww_doc, def_number) {
|
|
|
13327
13443
|
return `BLOCK_${moonbitlang$core$uint$$UInt$to_string$46$inner(def_number, 10)}`;
|
|
13328
13444
|
}
|
|
13329
13445
|
function f4ah6o$jww_parser$dxf$$get_layer_name(jww_doc, layer_group, layer) {
|
|
13330
|
-
if (moonbitlang$core$builtin$$Compare$op_lt$
|
|
13331
|
-
const layer_data = moonbitlang$core$array$$Array$at$
|
|
13446
|
+
if (moonbitlang$core$builtin$$Compare$op_lt$17$(layer_group, 16) && moonbitlang$core$builtin$$Compare$op_lt$17$(layer, 16)) {
|
|
13447
|
+
const layer_data = moonbitlang$core$array$$Array$at$14$(moonbitlang$core$array$$Array$at$12$(jww_doc.layer_groups, layer_group).layers, layer);
|
|
13332
13448
|
if (!(layer_data.name === "")) return layer_data.name;
|
|
13333
13449
|
}
|
|
13334
13450
|
return `${moonbitlang$core$uint16$$UInt16$to_string$46$inner(layer_group, 10)}-${moonbitlang$core$uint16$$UInt16$to_string$46$inner(layer, 10)}`;
|
|
@@ -13345,7 +13461,7 @@ function f4ah6o$jww_parser$dxf$$map_color(jww_color) {
|
|
|
13345
13461
|
case 7: return 7;
|
|
13346
13462
|
case 8: return 1;
|
|
13347
13463
|
case 9: return 8;
|
|
13348
|
-
default: return moonbitlang$core$builtin$$Compare$op_ge$
|
|
13464
|
+
default: return moonbitlang$core$builtin$$Compare$op_ge$17$(jww_color, 100) ? (jww_color - 100 | 0) + 10 | 0 : jww_color;
|
|
13349
13465
|
}
|
|
13350
13466
|
}
|
|
13351
13467
|
function f4ah6o$jww_parser$dxf$$map_line_type(pen_style) {
|
|
@@ -13521,7 +13637,7 @@ function f4ah6o$jww_parser$dxf$$convert_entity(entity, jww_doc) {
|
|
|
13521
13637
|
}
|
|
13522
13638
|
}
|
|
13523
13639
|
function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
13524
|
-
const blocks = moonbitlang$core$array$$Array$new$46$inner$
|
|
13640
|
+
const blocks = moonbitlang$core$array$$Array$new$46$inner$28$(0);
|
|
13525
13641
|
const _arr = jww_doc.block_defs;
|
|
13526
13642
|
const _len = _arr.length;
|
|
13527
13643
|
let _tmp = 0;
|
|
@@ -13529,7 +13645,7 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13529
13645
|
const _i = _tmp;
|
|
13530
13646
|
if (_i < _len) {
|
|
13531
13647
|
const bd = _arr[_i];
|
|
13532
|
-
const block_entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
13648
|
+
const block_entities = moonbitlang$core$array$$Array$new$46$inner$27$(0);
|
|
13533
13649
|
const _arr$2 = bd.entities;
|
|
13534
13650
|
const _len$2 = _arr$2.length;
|
|
13535
13651
|
let _tmp$2 = 0;
|
|
@@ -13538,12 +13654,12 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13538
13654
|
if (_i$2 < _len$2) {
|
|
13539
13655
|
const e = _arr$2[_i$2];
|
|
13540
13656
|
const _bind = f4ah6o$jww_parser$dxf$$convert_entity(e, jww_doc);
|
|
13541
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
13657
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$27$(block_entities, _bind);
|
|
13542
13658
|
_tmp$2 = _i$2 + 1 | 0;
|
|
13543
13659
|
continue;
|
|
13544
13660
|
} else break;
|
|
13545
13661
|
}
|
|
13546
|
-
moonbitlang$core$array$$Array$push$
|
|
13662
|
+
moonbitlang$core$array$$Array$push$28$(blocks, {
|
|
13547
13663
|
name: bd.name,
|
|
13548
13664
|
base_x: 0,
|
|
13549
13665
|
base_y: 0,
|
|
@@ -13556,7 +13672,7 @@ function f4ah6o$jww_parser$dxf$$convert_blocks(jww_doc) {
|
|
|
13556
13672
|
return blocks;
|
|
13557
13673
|
}
|
|
13558
13674
|
function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
13559
|
-
const entities = moonbitlang$core$array$$Array$new$46$inner$
|
|
13675
|
+
const entities = moonbitlang$core$array$$Array$new$46$inner$27$(0);
|
|
13560
13676
|
const _arr = jww_doc.entities;
|
|
13561
13677
|
const _len = _arr.length;
|
|
13562
13678
|
let _tmp = 0;
|
|
@@ -13565,7 +13681,7 @@ function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
|
13565
13681
|
if (_i < _len) {
|
|
13566
13682
|
const jww_entity = _arr[_i];
|
|
13567
13683
|
const _bind = f4ah6o$jww_parser$dxf$$convert_entity(jww_entity, jww_doc);
|
|
13568
|
-
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$
|
|
13684
|
+
if (_bind === void 0) {} else moonbitlang$core$array$$Array$push$27$(entities, _bind);
|
|
13569
13685
|
_tmp = _i + 1 | 0;
|
|
13570
13686
|
continue;
|
|
13571
13687
|
} else break;
|
|
@@ -13573,7 +13689,7 @@ function f4ah6o$jww_parser$dxf$$convert_entities(jww_doc) {
|
|
|
13573
13689
|
return entities;
|
|
13574
13690
|
}
|
|
13575
13691
|
function f4ah6o$jww_parser$dxf$$convert_layers(jww_doc) {
|
|
13576
|
-
const layers = moonbitlang$core$array$$Array$new$46$inner$
|
|
13692
|
+
const layers = moonbitlang$core$array$$Array$new$46$inner$26$(0);
|
|
13577
13693
|
let _tmp = 0;
|
|
13578
13694
|
while (true) {
|
|
13579
13695
|
const g_idx = _tmp;
|
|
@@ -13583,8 +13699,8 @@ function f4ah6o$jww_parser$dxf$$convert_layers(jww_doc) {
|
|
|
13583
13699
|
while (true) {
|
|
13584
13700
|
const l_idx = _tmp$2;
|
|
13585
13701
|
if (l_idx < 16) {
|
|
13586
|
-
const l = moonbitlang$core$array$$Array$at$
|
|
13587
|
-
moonbitlang$core$array$$Array$push$
|
|
13702
|
+
const l = moonbitlang$core$array$$Array$at$14$(lg.layers, l_idx);
|
|
13703
|
+
moonbitlang$core$array$$Array$push$26$(layers, {
|
|
13588
13704
|
name: l.name === "" ? `${moonbitlang$core$int$$Int$to_string$46$inner(g_idx, 10)}-${moonbitlang$core$int$$Int$to_string$46$inner(l_idx, 10)}` : l.name,
|
|
13589
13705
|
color: (((Math.imul(g_idx, 16) | 0) + l_idx | 0) % 255 | 0) + 1 | 0,
|
|
13590
13706
|
line_type: "CONTINUOUS",
|