marko 6.0.21 → 6.0.22

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.
@@ -1618,19 +1618,13 @@ function nextRefAccess(state) {
1618
1618
  return "_." + nextId(state);
1619
1619
  }
1620
1620
  function nextId(state) {
1621
- const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
1622
- const encodeLen = encodeChars.length;
1623
- const encodeStartLen = encodeLen - 11;
1624
- let index = state.ids++;
1625
- let mod = index % encodeStartLen;
1626
- let id = encodeChars[mod];
1627
- index = (index - mod) / encodeStartLen;
1628
- while (index > 0) {
1629
- mod = index % encodeLen;
1630
- id += encodeChars[mod];
1631
- index = (index - mod) / encodeLen;
1632
- }
1633
- return id;
1621
+ const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
1622
+ let n = state.ids++;
1623
+ let r = c[n % 53];
1624
+ for (n = n / 53 | 0; n; n >>>= 6) {
1625
+ r += c[n & 63];
1626
+ }
1627
+ return r;
1634
1628
  }
1635
1629
  function hasSymbolIterator(value) {
1636
1630
  return Symbol.iterator in value;
@@ -2211,19 +2205,13 @@ var State2 = class {
2211
2205
  }
2212
2206
  }
2213
2207
  nextReorderId() {
2214
- const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
2215
- const encodeLen = encodeChars.length;
2216
- const encodeStartLen = encodeLen - 10;
2217
- let index = this.reorderId++;
2218
- let mod = index % encodeStartLen;
2219
- let id = encodeChars[mod];
2220
- index = (index - mod) / encodeStartLen;
2221
- while (index > 0) {
2222
- mod = index % encodeLen;
2223
- id += encodeChars[mod];
2224
- index = (index - mod) / encodeLen;
2225
- }
2226
- return id;
2208
+ const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
2209
+ let n = this.reorderId++;
2210
+ let r = c[n % 54];
2211
+ for (n = n / 54 | 0; n; n >>>= 6) {
2212
+ r += c[n & 63];
2213
+ }
2214
+ return r;
2227
2215
  }
2228
2216
  mark(code, str) {
2229
2217
  return "<!--" + this.commentPrefix + code + str + "-->";
@@ -1537,19 +1537,13 @@ function nextRefAccess(state) {
1537
1537
  return "_." + nextId(state);
1538
1538
  }
1539
1539
  function nextId(state) {
1540
- const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
1541
- const encodeLen = encodeChars.length;
1542
- const encodeStartLen = encodeLen - 11;
1543
- let index = state.ids++;
1544
- let mod = index % encodeStartLen;
1545
- let id = encodeChars[mod];
1546
- index = (index - mod) / encodeStartLen;
1547
- while (index > 0) {
1548
- mod = index % encodeLen;
1549
- id += encodeChars[mod];
1550
- index = (index - mod) / encodeLen;
1551
- }
1552
- return id;
1540
+ const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
1541
+ let n = state.ids++;
1542
+ let r = c[n % 53];
1543
+ for (n = n / 53 | 0; n; n >>>= 6) {
1544
+ r += c[n & 63];
1545
+ }
1546
+ return r;
1553
1547
  }
1554
1548
  function hasSymbolIterator(value) {
1555
1549
  return Symbol.iterator in value;
@@ -2130,19 +2124,13 @@ var State2 = class {
2130
2124
  }
2131
2125
  }
2132
2126
  nextReorderId() {
2133
- const encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
2134
- const encodeLen = encodeChars.length;
2135
- const encodeStartLen = encodeLen - 10;
2136
- let index = this.reorderId++;
2137
- let mod = index % encodeStartLen;
2138
- let id = encodeChars[mod];
2139
- index = (index - mod) / encodeStartLen;
2140
- while (index > 0) {
2141
- mod = index % encodeLen;
2142
- id += encodeChars[mod];
2143
- index = (index - mod) / encodeLen;
2144
- }
2145
- return id;
2127
+ const c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";
2128
+ let n = this.reorderId++;
2129
+ let r = c[n % 54];
2130
+ for (n = n / 54 | 0; n; n >>>= 6) {
2131
+ r += c[n & 63];
2132
+ }
2133
+ return r;
2146
2134
  }
2147
2135
  mark(code, str) {
2148
2136
  return "<!--" + this.commentPrefix + code + str + "-->";
package/dist/html.js CHANGED
@@ -1037,10 +1037,10 @@ function nextRefAccess(state) {
1037
1037
  return "_." + nextId(state);
1038
1038
  }
1039
1039
  function nextId(state) {
1040
- let encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", encodeLen = encodeChars.length, encodeStartLen = encodeLen - 11, index = state.ids++, mod = index % encodeStartLen, id = encodeChars[mod];
1041
- for (index = (index - mod) / encodeStartLen; index > 0; )
1042
- mod = index % encodeLen, id += encodeChars[mod], index = (index - mod) / encodeLen;
1043
- return id;
1040
+ let c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", n = state.ids++, r = c[n % 53];
1041
+ for (n = n / 53 | 0; n; n >>>= 6)
1042
+ r += c[n & 63];
1043
+ return r;
1044
1044
  }
1045
1045
  function hasSymbolIterator(value) {
1046
1046
  return Symbol.iterator in value;
@@ -1424,10 +1424,10 @@ var State2 = class {
1424
1424
  this.writeReorders ? this.writeReorders.push(chunk) : (this.needsMainRuntime = !0, this.writeReorders = [chunk]);
1425
1425
  }
1426
1426
  nextReorderId() {
1427
- let encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", encodeLen = encodeChars.length, encodeStartLen = encodeLen - 10, index = this.reorderId++, mod = index % encodeStartLen, id = encodeChars[mod];
1428
- for (index = (index - mod) / encodeStartLen; index > 0; )
1429
- mod = index % encodeLen, id += encodeChars[mod], index = (index - mod) / encodeLen;
1430
- return id;
1427
+ let c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", n = this.reorderId++, r = c[n % 54];
1428
+ for (n = n / 54 | 0; n; n >>>= 6)
1429
+ r += c[n & 63];
1430
+ return r;
1431
1431
  }
1432
1432
  mark(code, str) {
1433
1433
  return "<!--" + this.commentPrefix + code + str + "-->";
package/dist/html.mjs CHANGED
@@ -959,10 +959,10 @@ function nextRefAccess(state) {
959
959
  return "_." + nextId(state);
960
960
  }
961
961
  function nextId(state) {
962
- let encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", encodeLen = encodeChars.length, encodeStartLen = encodeLen - 11, index = state.ids++, mod = index % encodeStartLen, id = encodeChars[mod];
963
- for (index = (index - mod) / encodeStartLen; index > 0; )
964
- mod = index % encodeLen, id += encodeChars[mod], index = (index - mod) / encodeLen;
965
- return id;
962
+ let c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", n = state.ids++, r = c[n % 53];
963
+ for (n = n / 53 | 0; n; n >>>= 6)
964
+ r += c[n & 63];
965
+ return r;
966
966
  }
967
967
  function hasSymbolIterator(value) {
968
968
  return Symbol.iterator in value;
@@ -1346,10 +1346,10 @@ var State2 = class {
1346
1346
  this.writeReorders ? this.writeReorders.push(chunk) : (this.needsMainRuntime = !0, this.writeReorders = [chunk]);
1347
1347
  }
1348
1348
  nextReorderId() {
1349
- let encodeChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", encodeLen = encodeChars.length, encodeStartLen = encodeLen - 10, index = this.reorderId++, mod = index % encodeStartLen, id = encodeChars[mod];
1350
- for (index = (index - mod) / encodeStartLen; index > 0; )
1351
- mod = index % encodeLen, id += encodeChars[mod], index = (index - mod) / encodeLen;
1352
- return id;
1349
+ let c = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789", n = this.reorderId++, r = c[n % 54];
1350
+ for (n = n / 54 | 0; n; n >>>= 6)
1351
+ r += c[n & 63];
1352
+ return r;
1353
1353
  }
1354
1354
  mark(code, str) {
1355
1355
  return "<!--" + this.commentPrefix + code + str + "-->";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.21",
3
+ "version": "6.0.22",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",
@@ -48,7 +48,7 @@
48
48
  "build": "node -r ~ts ./scripts/bundle.ts"
49
49
  },
50
50
  "dependencies": {
51
- "@marko/compiler": "^5.39.21",
51
+ "@marko/compiler": "^5.39.22",
52
52
  "csstype": "^3.1.3",
53
53
  "magic-string": "^0.30.17"
54
54
  },