@stryke/hash 0.12.37 → 0.12.39

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/_virtual/rolldown_runtime.cjs +29 -1
  3. package/dist/convert/src/array-buffer-to-string.cjs +19 -1
  4. package/dist/convert/src/array-buffer-to-string.mjs +18 -1
  5. package/dist/convert/src/array-buffer-to-string.mjs.map +1 -1
  6. package/dist/convert/src/neutral.cjs +5 -1
  7. package/dist/convert/src/neutral.mjs +7 -1
  8. package/dist/convert/src/parse-type-definition.cjs +1 -1
  9. package/dist/convert/src/parse-type-definition.mjs +3 -1
  10. package/dist/convert/src/string-to-uint8-array.cjs +14 -1
  11. package/dist/convert/src/string-to-uint8-array.mjs +13 -1
  12. package/dist/convert/src/string-to-uint8-array.mjs.map +1 -1
  13. package/dist/convert/src/string-to-utf8-array.cjs +5 -1
  14. package/dist/convert/src/string-to-utf8-array.mjs +5 -1
  15. package/dist/convert/src/string-to-utf8-array.mjs.map +1 -1
  16. package/dist/convert/src/utf8-array-to-string.cjs +5 -1
  17. package/dist/convert/src/utf8-array-to-string.mjs +5 -1
  18. package/dist/convert/src/utf8-array-to-string.mjs.map +1 -1
  19. package/dist/digest.cjs +56 -1
  20. package/dist/digest.mjs +53 -1
  21. package/dist/digest.mjs.map +1 -1
  22. package/dist/etag.cjs +53 -1
  23. package/dist/etag.mjs +51 -1
  24. package/dist/etag.mjs.map +1 -1
  25. package/dist/fs/src/list-files.cjs +36 -1
  26. package/dist/fs/src/list-files.mjs +34 -1
  27. package/dist/fs/src/list-files.mjs.map +1 -1
  28. package/dist/fs/src/read-file.cjs +16 -1
  29. package/dist/fs/src/read-file.mjs +15 -1
  30. package/dist/fs/src/read-file.mjs.map +1 -1
  31. package/dist/hash-files.cjs +41 -1
  32. package/dist/hash-files.mjs +40 -1
  33. package/dist/hash-files.mjs.map +1 -1
  34. package/dist/index.cjs +20 -1
  35. package/dist/index.mjs +8 -1
  36. package/dist/md5.cjs +17 -1
  37. package/dist/md5.mjs +16 -1
  38. package/dist/md5.mjs.map +1 -1
  39. package/dist/murmurhash.cjs +22 -1
  40. package/dist/murmurhash.mjs +21 -1
  41. package/dist/murmurhash.mjs.map +1 -1
  42. package/dist/neutral.cjs +15 -1
  43. package/dist/neutral.mjs +6 -1
  44. package/dist/path/src/is-type.cjs +28 -1
  45. package/dist/path/src/is-type.mjs +28 -1
  46. package/dist/path/src/is-type.mjs.map +1 -1
  47. package/dist/path/src/join-paths.cjs +106 -1
  48. package/dist/path/src/join-paths.mjs +106 -1
  49. package/dist/path/src/join-paths.mjs.map +1 -1
  50. package/dist/path/src/regex.cjs +12 -1
  51. package/dist/path/src/regex.mjs +8 -1
  52. package/dist/path/src/regex.mjs.map +1 -1
  53. package/dist/path/src/slash.cjs +15 -1
  54. package/dist/path/src/slash.mjs +14 -1
  55. package/dist/path/src/slash.mjs.map +1 -1
  56. package/dist/type-checks/src/index.cjs +4 -1
  57. package/dist/type-checks/src/index.mjs +6 -1
  58. package/dist/type-checks/src/is-buffer.cjs +12 -1
  59. package/dist/type-checks/src/is-buffer.mjs +11 -1
  60. package/dist/type-checks/src/is-buffer.mjs.map +1 -1
  61. package/dist/type-checks/src/is-collection.cjs +1 -1
  62. package/dist/type-checks/src/is-collection.mjs +3 -1
  63. package/dist/type-checks/src/is-string.cjs +12 -1
  64. package/dist/type-checks/src/is-string.mjs +11 -1
  65. package/dist/type-checks/src/is-string.mjs.map +1 -1
  66. package/dist/type-checks/src/type-detect.cjs +15 -1
  67. package/dist/type-checks/src/type-detect.mjs +16 -1
  68. package/dist/type-checks/src/type-detect.mjs.map +1 -1
  69. package/dist/xx-hash.cjs +25 -1
  70. package/dist/xx-hash.mjs +22 -1
  71. package/dist/xx-hash.mjs.map +1 -1
  72. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  # Changelog for Stryke - Hash
4
4
 
5
+ ## [0.12.38](https://github.com/storm-software/stryke/releases/tag/hash%400.12.38) (01/16/2026)
6
+
7
+ ### Updated Dependencies
8
+
9
+ - Updated **fs** to **v0.33.32**
10
+
11
+ ## [0.12.37](https://github.com/storm-software/stryke/releases/tag/hash%400.12.37) (01/16/2026)
12
+
13
+ ### Updated Dependencies
14
+
15
+ - Updated **convert** to **v0.6.33**
16
+ - Updated **fs** to **v0.33.31**
17
+
5
18
  ## [0.12.36](https://github.com/storm-software/stryke/releases/tag/hash%400.12.36) (01/15/2026)
6
19
 
7
20
  ### Updated Dependencies
@@ -1 +1,29 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ exports.__toESM = __toESM;
@@ -1 +1,19 @@
1
- function e(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.byteLength;if(n<65535)return String.fromCharCode.apply(null,t);let r=``;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return r}exports.arrayBufferToString=e;
1
+
2
+ //#region ../convert/src/array-buffer-to-string.ts
3
+ /**
4
+ * Convert an ArrayBuffer or Uint8Array to a string
5
+ *
6
+ * @param buffer - The ArrayBuffer or Uint8Array to convert
7
+ * @returns The converted string
8
+ */
9
+ function arrayBufferToString(buffer) {
10
+ const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
11
+ const len = bytes.byteLength;
12
+ if (len < 65535) return String.fromCharCode.apply(null, bytes);
13
+ let binary = "";
14
+ for (let i = 0; i < len; i++) binary += String.fromCharCode(bytes[i]);
15
+ return binary;
16
+ }
17
+
18
+ //#endregion
19
+ exports.arrayBufferToString = arrayBufferToString;
@@ -1,2 +1,19 @@
1
- function e(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=t.byteLength;if(n<65535)return String.fromCharCode.apply(null,t);let r=``;for(let e=0;e<n;e++)r+=String.fromCharCode(t[e]);return r}export{e as arrayBufferToString};
1
+ //#region ../convert/src/array-buffer-to-string.ts
2
+ /**
3
+ * Convert an ArrayBuffer or Uint8Array to a string
4
+ *
5
+ * @param buffer - The ArrayBuffer or Uint8Array to convert
6
+ * @returns The converted string
7
+ */
8
+ function arrayBufferToString(buffer) {
9
+ const bytes = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
10
+ const len = bytes.byteLength;
11
+ if (len < 65535) return String.fromCharCode.apply(null, bytes);
12
+ let binary = "";
13
+ for (let i = 0; i < len; i++) binary += String.fromCharCode(bytes[i]);
14
+ return binary;
15
+ }
16
+
17
+ //#endregion
18
+ export { arrayBufferToString };
2
19
  //# sourceMappingURL=array-buffer-to-string.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"array-buffer-to-string.mjs","names":[],"sources":["../../../../convert/src/array-buffer-to-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert an ArrayBuffer or Uint8Array to a string\n *\n * @param buffer - The ArrayBuffer or Uint8Array to convert\n * @returns The converted string\n */\nexport function arrayBufferToString(\n buffer: ArrayBuffer | ArrayBufferLike | Uint8Array\n): string {\n const bytes =\n buffer instanceof Uint8Array\n ? buffer\n : new Uint8Array(buffer as ArrayBufferLike);\n const len = bytes.byteLength;\n if (len < 65535) {\n return String.fromCharCode.apply(null, bytes as unknown as number[]);\n }\n let binary = \"\";\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]!);\n }\n return binary;\n}\n"],"mappings":"AAwBA,SAAgB,EACd,EACQ,CACR,IAAM,EACJ,aAAkB,WACd,EACA,IAAI,WAAW,EAA0B,CACzC,EAAM,EAAM,WAClB,GAAI,EAAM,MACR,OAAO,OAAO,aAAa,MAAM,KAAM,EAA6B,CAEtE,IAAI,EAAS,GACb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAK,IACvB,GAAU,OAAO,aAAa,EAAM,GAAI,CAE1C,OAAO"}
1
+ {"version":3,"file":"array-buffer-to-string.mjs","names":[],"sources":["../../../../convert/src/array-buffer-to-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert an ArrayBuffer or Uint8Array to a string\n *\n * @param buffer - The ArrayBuffer or Uint8Array to convert\n * @returns The converted string\n */\nexport function arrayBufferToString(\n buffer: ArrayBuffer | ArrayBufferLike | Uint8Array\n): string {\n const bytes =\n buffer instanceof Uint8Array\n ? buffer\n : new Uint8Array(buffer as ArrayBufferLike);\n const len = bytes.byteLength;\n if (len < 65535) {\n return String.fromCharCode.apply(null, bytes as unknown as number[]);\n }\n let binary = \"\";\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]!);\n }\n return binary;\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,oBACd,QACQ;CACR,MAAM,QACJ,kBAAkB,aACd,SACA,IAAI,WAAW,OAA0B;CAC/C,MAAM,MAAM,MAAM;AAClB,KAAI,MAAM,MACR,QAAO,OAAO,aAAa,MAAM,MAAM,MAA6B;CAEtE,IAAI,SAAS;AACb,MAAK,IAAI,IAAI,GAAG,IAAI,KAAK,IACvB,WAAU,OAAO,aAAa,MAAM,GAAI;AAE1C,QAAO"}
@@ -1 +1,5 @@
1
- const e=require(`./array-buffer-to-string.cjs`);require(`./parse-type-definition.cjs`);const t=require(`./string-to-uint8-array.cjs`);require(`./string-to-utf8-array.cjs`),require(`./utf8-array-to-string.cjs`);
1
+ const require_array_buffer_to_string = require('./array-buffer-to-string.cjs');
2
+ require('./parse-type-definition.cjs');
3
+ const require_string_to_uint8_array = require('./string-to-uint8-array.cjs');
4
+ require('./string-to-utf8-array.cjs');
5
+ require('./utf8-array-to-string.cjs');
@@ -1 +1,7 @@
1
- import{arrayBufferToString as e}from"./array-buffer-to-string.mjs";import"./parse-type-definition.mjs";import{stringToUint8Array as t}from"./string-to-uint8-array.mjs";import"./string-to-utf8-array.mjs";import"./utf8-array-to-string.mjs";export{};
1
+ import { arrayBufferToString } from "./array-buffer-to-string.mjs";
2
+ import "./parse-type-definition.mjs";
3
+ import { stringToUint8Array } from "./string-to-uint8-array.mjs";
4
+ import "./string-to-utf8-array.mjs";
5
+ import "./utf8-array-to-string.mjs";
6
+
7
+ export { };
@@ -1 +1 @@
1
- require(`../../type-checks/src/index.cjs`);
1
+ require('../../type-checks/src/index.cjs');
@@ -1 +1,3 @@
1
- import"../../type-checks/src/index.mjs";export{};
1
+ import "../../type-checks/src/index.mjs";
2
+
3
+ export { };
@@ -1 +1,14 @@
1
- function e(e){return Uint8Array.from([...encodeURIComponent(e)].map(e=>e.codePointAt(0)))}exports.stringToUint8Array=e;
1
+
2
+ //#region ../convert/src/string-to-uint8-array.ts
3
+ /**
4
+ * Convert a string to Uint8Array
5
+ *
6
+ * @param text - The text to convert
7
+ * @returns The converted Uint8Array
8
+ */
9
+ function stringToUint8Array(text) {
10
+ return Uint8Array.from([...encodeURIComponent(text)].map((letter) => letter.codePointAt(0)));
11
+ }
12
+
13
+ //#endregion
14
+ exports.stringToUint8Array = stringToUint8Array;
@@ -1,2 +1,14 @@
1
- function e(e){return Uint8Array.from([...encodeURIComponent(e)].map(e=>e.codePointAt(0)))}export{e as stringToUint8Array};
1
+ //#region ../convert/src/string-to-uint8-array.ts
2
+ /**
3
+ * Convert a string to Uint8Array
4
+ *
5
+ * @param text - The text to convert
6
+ * @returns The converted Uint8Array
7
+ */
8
+ function stringToUint8Array(text) {
9
+ return Uint8Array.from([...encodeURIComponent(text)].map((letter) => letter.codePointAt(0)));
10
+ }
11
+
12
+ //#endregion
13
+ export { stringToUint8Array };
2
14
  //# sourceMappingURL=string-to-uint8-array.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"string-to-uint8-array.mjs","names":[],"sources":["../../../../convert/src/string-to-uint8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a string to Uint8Array\n *\n * @param text - The text to convert\n * @returns The converted Uint8Array\n */\nexport function stringToUint8Array(text: string): Uint8Array {\n return Uint8Array.from(\n [...encodeURIComponent(text)].map(letter => letter.codePointAt(0)!)\n );\n}\n\n/**\n * Convert a binary string to Uint8Array\n *\n * @param binary - The binary string to convert\n * @returns The converted Uint8Array\n */\nexport function binaryStringToUint8Array(binary: string): Uint8Array {\n const len = binary.length;\n const arr = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n arr[i] = binary.charCodeAt(i);\n }\n return arr;\n}\n\n/**\n * Convert a base64 string to a Uint8Array\n *\n * @param data - The base64 string to convert\n * @returns The converted Uint8Array\n */\nexport function base64StringToUint8Array(data: string): Uint8Array {\n return stringToUint8Array(atob(data));\n}\n"],"mappings":"AAwBA,SAAgB,EAAmB,EAA0B,CAC3D,OAAO,WAAW,KAChB,CAAC,GAAG,mBAAmB,EAAK,CAAC,CAAC,IAAI,GAAU,EAAO,YAAY,EAAE,CAAE,CACpE"}
1
+ {"version":3,"file":"string-to-uint8-array.mjs","names":[],"sources":["../../../../convert/src/string-to-uint8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Convert a string to Uint8Array\n *\n * @param text - The text to convert\n * @returns The converted Uint8Array\n */\nexport function stringToUint8Array(text: string): Uint8Array {\n return Uint8Array.from(\n [...encodeURIComponent(text)].map(letter => letter.codePointAt(0)!)\n );\n}\n\n/**\n * Convert a binary string to Uint8Array\n *\n * @param binary - The binary string to convert\n * @returns The converted Uint8Array\n */\nexport function binaryStringToUint8Array(binary: string): Uint8Array {\n const len = binary.length;\n const arr = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n arr[i] = binary.charCodeAt(i);\n }\n return arr;\n}\n\n/**\n * Convert a base64 string to a Uint8Array\n *\n * @param data - The base64 string to convert\n * @returns The converted Uint8Array\n */\nexport function base64StringToUint8Array(data: string): Uint8Array {\n return stringToUint8Array(atob(data));\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,mBAAmB,MAA0B;AAC3D,QAAO,WAAW,KAChB,CAAC,GAAG,mBAAmB,KAAK,CAAC,CAAC,KAAI,WAAU,OAAO,YAAY,EAAE,CAAE,CACpE"}
@@ -1 +1,5 @@
1
- const e=new TextEncoder;
1
+
2
+ //#region ../convert/src/string-to-utf8-array.ts
3
+ const encoder = new TextEncoder();
4
+
5
+ //#endregion
@@ -1,2 +1,6 @@
1
- new TextEncoder;export{};
1
+ //#region ../convert/src/string-to-utf8-array.ts
2
+ const encoder = new TextEncoder();
3
+
4
+ //#endregion
5
+ export { };
2
6
  //# sourceMappingURL=string-to-utf8-array.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"string-to-utf8-array.mjs","names":[],"sources":["../../../../convert/src/string-to-utf8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst encoder = new TextEncoder();\n\n/**\n * Convert a string to a utf-8 array\n *\n * @param input - The string to convert\n * @returns The converted utf-8 array\n */\nexport function stringToUtf8Array(input: string): Uint8Array {\n return encoder.encode(input);\n}\n"],"mappings":"AAkBgB,IAAI"}
1
+ {"version":3,"file":"string-to-utf8-array.mjs","names":[],"sources":["../../../../convert/src/string-to-utf8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst encoder = new TextEncoder();\n\n/**\n * Convert a string to a utf-8 array\n *\n * @param input - The string to convert\n * @returns The converted utf-8 array\n */\nexport function stringToUtf8Array(input: string): Uint8Array {\n return encoder.encode(input);\n}\n"],"mappings":";AAkBA,MAAM,UAAU,IAAI,aAAa"}
@@ -1 +1,5 @@
1
- const e=new TextDecoder;
1
+
2
+ //#region ../convert/src/utf8-array-to-string.ts
3
+ const decoder = new TextDecoder();
4
+
5
+ //#endregion
@@ -1,2 +1,6 @@
1
- new TextDecoder;export{};
1
+ //#region ../convert/src/utf8-array-to-string.ts
2
+ const decoder = new TextDecoder();
3
+
4
+ //#endregion
5
+ export { };
2
6
  //# sourceMappingURL=utf8-array-to-string.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utf8-array-to-string.mjs","names":[],"sources":["../../../../convert/src/utf8-array-to-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst decoder = new TextDecoder();\n\n/**\n * Convert a utf-8 array to string\n *\n * @param input - Utf-8 Array\n * @returns The converted string\n */\nexport function utf8ArrayToString(\n input: NodeJS.ArrayBufferView | ArrayBuffer\n): string {\n return decoder.decode(input);\n}\n"],"mappings":"AAkBgB,IAAI"}
1
+ {"version":3,"file":"utf8-array-to-string.mjs","names":[],"sources":["../../../../convert/src/utf8-array-to-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst decoder = new TextDecoder();\n\n/**\n * Convert a utf-8 array to string\n *\n * @param input - Utf-8 Array\n * @returns The converted string\n */\nexport function utf8ArrayToString(\n input: NodeJS.ArrayBufferView | ArrayBuffer\n): string {\n return decoder.decode(input);\n}\n"],"mappings":";AAkBA,MAAM,UAAU,IAAI,aAAa"}
package/dist/digest.cjs CHANGED
@@ -1 +1,56 @@
1
- const e=require(`./convert/src/array-buffer-to-string.cjs`),t=require(`./convert/src/string-to-uint8-array.cjs`);require(`./convert/src/neutral.cjs`);function n(e){return new a(e)}async function r(n,r=`SHA-512`){return e.arrayBufferToString(await globalThis.crypto.subtle.digest(r,t.stringToUint8Array(n)))}const i=r;var a=class{#e=[];#t;constructor(e){this.#t=e}update(e){this.#e.push(e)}async digest(){let e=new Uint8Array(this.#e.reduce((e,t)=>e+t.length,0)),t=0;for(let n of this.#e)e.set(n,t),t+=n.length;let n=await globalThis.crypto.subtle.digest(this.#t,e);return new Uint8Array(n)}};exports.Hasher=a,exports.createHasher=n,exports.digest=r,exports.hash=i;
1
+ const require_array_buffer_to_string = require('./convert/src/array-buffer-to-string.cjs');
2
+ const require_string_to_uint8_array = require('./convert/src/string-to-uint8-array.cjs');
3
+ require('./convert/src/neutral.cjs');
4
+
5
+ //#region src/digest.ts
6
+ /**
7
+ * Creates a new hash object for the specified algorithm.
8
+ *
9
+ * @param algorithm - The algorithm to use for the hash.
10
+ * @returns A new hash object.
11
+ */
12
+ function createHasher(algorithm) {
13
+ return new Hasher(algorithm);
14
+ }
15
+ /**
16
+ * Creates a new hash object for the specified algorithm.
17
+ *
18
+ * @remarks
19
+ * This function uses the Web Crypto API to create a hash of the input data.
20
+ *
21
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
22
+ *
23
+ * @param data - The data to hash.
24
+ * @param algorithm - The algorithm to use for the hash.
25
+ * @returns A hash string representation of the `data` parameter.
26
+ */
27
+ async function digest(data, algorithm = "SHA-512") {
28
+ return require_array_buffer_to_string.arrayBufferToString(await globalThis.crypto.subtle.digest(algorithm, require_string_to_uint8_array.stringToUint8Array(data)));
29
+ }
30
+ const hash = digest;
31
+ var Hasher = class {
32
+ #chunks = [];
33
+ #algorithm;
34
+ constructor(algorithm) {
35
+ this.#algorithm = algorithm;
36
+ }
37
+ update(data) {
38
+ this.#chunks.push(data);
39
+ }
40
+ async digest() {
41
+ const data = new Uint8Array(this.#chunks.reduce((acc, chunk) => acc + chunk.length, 0));
42
+ let offset = 0;
43
+ for (const chunk of this.#chunks) {
44
+ data.set(chunk, offset);
45
+ offset += chunk.length;
46
+ }
47
+ const arrayBuffer = await globalThis.crypto.subtle.digest(this.#algorithm, data);
48
+ return new Uint8Array(arrayBuffer);
49
+ }
50
+ };
51
+
52
+ //#endregion
53
+ exports.Hasher = Hasher;
54
+ exports.createHasher = createHasher;
55
+ exports.digest = digest;
56
+ exports.hash = hash;
package/dist/digest.mjs CHANGED
@@ -1,2 +1,54 @@
1
- import{arrayBufferToString as e}from"./convert/src/array-buffer-to-string.mjs";import{stringToUint8Array as t}from"./convert/src/string-to-uint8-array.mjs";import"./convert/src/neutral.mjs";function n(e){return new a(e)}async function r(n,r=`SHA-512`){return e(await globalThis.crypto.subtle.digest(r,t(n)))}const i=r;var a=class{#e=[];#t;constructor(e){this.#t=e}update(e){this.#e.push(e)}async digest(){let e=new Uint8Array(this.#e.reduce((e,t)=>e+t.length,0)),t=0;for(let n of this.#e)e.set(n,t),t+=n.length;let n=await globalThis.crypto.subtle.digest(this.#t,e);return new Uint8Array(n)}};export{a as Hasher,n as createHasher,r as digest,i as hash};
1
+ import { arrayBufferToString } from "./convert/src/array-buffer-to-string.mjs";
2
+ import { stringToUint8Array } from "./convert/src/string-to-uint8-array.mjs";
3
+ import "./convert/src/neutral.mjs";
4
+
5
+ //#region src/digest.ts
6
+ /**
7
+ * Creates a new hash object for the specified algorithm.
8
+ *
9
+ * @param algorithm - The algorithm to use for the hash.
10
+ * @returns A new hash object.
11
+ */
12
+ function createHasher(algorithm) {
13
+ return new Hasher(algorithm);
14
+ }
15
+ /**
16
+ * Creates a new hash object for the specified algorithm.
17
+ *
18
+ * @remarks
19
+ * This function uses the Web Crypto API to create a hash of the input data.
20
+ *
21
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
22
+ *
23
+ * @param data - The data to hash.
24
+ * @param algorithm - The algorithm to use for the hash.
25
+ * @returns A hash string representation of the `data` parameter.
26
+ */
27
+ async function digest(data, algorithm = "SHA-512") {
28
+ return arrayBufferToString(await globalThis.crypto.subtle.digest(algorithm, stringToUint8Array(data)));
29
+ }
30
+ const hash = digest;
31
+ var Hasher = class {
32
+ #chunks = [];
33
+ #algorithm;
34
+ constructor(algorithm) {
35
+ this.#algorithm = algorithm;
36
+ }
37
+ update(data) {
38
+ this.#chunks.push(data);
39
+ }
40
+ async digest() {
41
+ const data = new Uint8Array(this.#chunks.reduce((acc, chunk) => acc + chunk.length, 0));
42
+ let offset = 0;
43
+ for (const chunk of this.#chunks) {
44
+ data.set(chunk, offset);
45
+ offset += chunk.length;
46
+ }
47
+ const arrayBuffer = await globalThis.crypto.subtle.digest(this.#algorithm, data);
48
+ return new Uint8Array(arrayBuffer);
49
+ }
50
+ };
51
+
52
+ //#endregion
53
+ export { Hasher, createHasher, digest, hash };
2
54
  //# sourceMappingURL=digest.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"digest.mjs","names":["#algorithm","#chunks"],"sources":["../src/digest.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n arrayBufferToString,\n stringToUint8Array\n} from \"@stryke/convert/neutral\";\n\nexport type AlgorithmIdentifier = \"SHA-256\" | \"SHA-384\" | \"SHA-512\";\n\n/**\n * Creates a new hash object for the specified algorithm.\n *\n * @param algorithm - The algorithm to use for the hash.\n * @returns A new hash object.\n */\nexport function createHasher(algorithm: AlgorithmIdentifier): Hasher {\n return new Hasher(algorithm);\n}\n\n/**\n * Creates a new hash object for the specified algorithm.\n *\n * @remarks\n * This function uses the Web Crypto API to create a hash of the input data.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest\n *\n * @param data - The data to hash.\n * @param algorithm - The algorithm to use for the hash.\n * @returns A hash string representation of the `data` parameter.\n */\nexport async function digest(\n data: string,\n algorithm: AlgorithmIdentifier = \"SHA-512\"\n): Promise<string> {\n const arrayBuffer = await globalThis.crypto.subtle.digest(\n algorithm,\n stringToUint8Array(data) as BufferSource\n );\n\n return arrayBufferToString(arrayBuffer);\n}\n\nexport const hash = digest;\n\nexport class Hasher {\n #chunks: Uint8Array[] = [];\n\n #algorithm: AlgorithmIdentifier;\n\n constructor(algorithm: AlgorithmIdentifier) {\n this.#algorithm = algorithm;\n }\n\n update(data: Uint8Array): void {\n this.#chunks.push(data);\n }\n\n async digest(): Promise<Uint8Array> {\n const data = new Uint8Array(\n this.#chunks.reduce((acc, chunk) => acc + chunk.length, 0)\n );\n let offset = 0;\n for (const chunk of this.#chunks) {\n data.set(chunk, offset);\n offset += chunk.length;\n }\n const arrayBuffer = await globalThis.crypto.subtle.digest(\n this.#algorithm,\n data\n );\n\n return new Uint8Array(arrayBuffer);\n }\n}\n"],"mappings":"8LA+BA,SAAgB,EAAa,EAAwC,CACnE,OAAO,IAAI,EAAO,EAAU,CAe9B,eAAsB,EACpB,EACA,EAAiC,UAChB,CAMjB,OAAO,EALa,MAAM,WAAW,OAAO,OAAO,OACjD,EACA,EAAmB,EAAK,CACzB,CAEsC,CAGzC,MAAa,EAAO,EAEpB,IAAa,EAAb,KAAoB,CAClB,GAAwB,EAAE,CAE1B,GAEA,YAAY,EAAgC,CAC1C,MAAA,EAAkB,EAGpB,OAAO,EAAwB,CAC7B,MAAA,EAAa,KAAK,EAAK,CAGzB,MAAM,QAA8B,CAClC,IAAM,EAAO,IAAI,WACf,MAAA,EAAa,QAAQ,EAAK,IAAU,EAAM,EAAM,OAAQ,EAAE,CAC3D,CACG,EAAS,EACb,IAAK,IAAM,KAAS,MAAA,EAClB,EAAK,IAAI,EAAO,EAAO,CACvB,GAAU,EAAM,OAElB,IAAM,EAAc,MAAM,WAAW,OAAO,OAAO,OACjD,MAAA,EACA,EACD,CAED,OAAO,IAAI,WAAW,EAAY"}
1
+ {"version":3,"file":"digest.mjs","names":["#algorithm","#chunks"],"sources":["../src/digest.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n arrayBufferToString,\n stringToUint8Array\n} from \"@stryke/convert/neutral\";\n\nexport type AlgorithmIdentifier = \"SHA-256\" | \"SHA-384\" | \"SHA-512\";\n\n/**\n * Creates a new hash object for the specified algorithm.\n *\n * @param algorithm - The algorithm to use for the hash.\n * @returns A new hash object.\n */\nexport function createHasher(algorithm: AlgorithmIdentifier): Hasher {\n return new Hasher(algorithm);\n}\n\n/**\n * Creates a new hash object for the specified algorithm.\n *\n * @remarks\n * This function uses the Web Crypto API to create a hash of the input data.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest\n *\n * @param data - The data to hash.\n * @param algorithm - The algorithm to use for the hash.\n * @returns A hash string representation of the `data` parameter.\n */\nexport async function digest(\n data: string,\n algorithm: AlgorithmIdentifier = \"SHA-512\"\n): Promise<string> {\n const arrayBuffer = await globalThis.crypto.subtle.digest(\n algorithm,\n stringToUint8Array(data) as BufferSource\n );\n\n return arrayBufferToString(arrayBuffer);\n}\n\nexport const hash = digest;\n\nexport class Hasher {\n #chunks: Uint8Array[] = [];\n\n #algorithm: AlgorithmIdentifier;\n\n constructor(algorithm: AlgorithmIdentifier) {\n this.#algorithm = algorithm;\n }\n\n update(data: Uint8Array): void {\n this.#chunks.push(data);\n }\n\n async digest(): Promise<Uint8Array> {\n const data = new Uint8Array(\n this.#chunks.reduce((acc, chunk) => acc + chunk.length, 0)\n );\n let offset = 0;\n for (const chunk of this.#chunks) {\n data.set(chunk, offset);\n offset += chunk.length;\n }\n const arrayBuffer = await globalThis.crypto.subtle.digest(\n this.#algorithm,\n data\n );\n\n return new Uint8Array(arrayBuffer);\n }\n}\n"],"mappings":";;;;;;;;;;;AA+BA,SAAgB,aAAa,WAAwC;AACnE,QAAO,IAAI,OAAO,UAAU;;;;;;;;;;;;;;AAe9B,eAAsB,OACpB,MACA,YAAiC,WAChB;AAMjB,QAAO,oBALa,MAAM,WAAW,OAAO,OAAO,OACjD,WACA,mBAAmB,KAAK,CACzB,CAEsC;;AAGzC,MAAa,OAAO;AAEpB,IAAa,SAAb,MAAoB;CAClB,UAAwB,EAAE;CAE1B;CAEA,YAAY,WAAgC;AAC1C,QAAKA,YAAa;;CAGpB,OAAO,MAAwB;AAC7B,QAAKC,OAAQ,KAAK,KAAK;;CAGzB,MAAM,SAA8B;EAClC,MAAM,OAAO,IAAI,WACf,MAAKA,OAAQ,QAAQ,KAAK,UAAU,MAAM,MAAM,QAAQ,EAAE,CAC3D;EACD,IAAI,SAAS;AACb,OAAK,MAAM,SAAS,MAAKA,QAAS;AAChC,QAAK,IAAI,OAAO,OAAO;AACvB,aAAU,MAAM;;EAElB,MAAM,cAAc,MAAM,WAAW,OAAO,OAAO,OACjD,MAAKD,WACL,KACD;AAED,SAAO,IAAI,WAAW,YAAY"}
package/dist/etag.cjs CHANGED
@@ -1 +1,53 @@
1
- const e=e=>{let t=e.length,n=0,r=0,i=8997,a=0,o=33826,s=0,c=40164,l=0,u=52210;for(;n<t;)i^=e.charCodeAt(n++),r=i*435,a=o*435,s=c*435,l=u*435,s+=i<<8,l+=o<<8,a+=r>>>16,i=r&65535,s+=a>>>16,o=a&65535,u=l+(s>>>16)&65535,c=s&65535;return(u&15)*281474976710656+c*4294967296+o*65536+(i^u>>4)},t=(t,n=!1)=>`${(n?`W/"`:`"`)+e(t).toString(36)+t.length.toString(36)}"`;exports.fnv1a52=e,exports.generateETag=t;
1
+
2
+ //#region src/etag.ts
3
+ /**
4
+ * FNV-1a Hash implementation
5
+ *
6
+ * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js
7
+ *
8
+ * @remarks
9
+ * Simplified, optimized and add modified for 52 bit, which provides a larger hash space
10
+ * and still making use of Javascript's 53-bit integer space.
11
+ */
12
+ const fnv1a52 = (str) => {
13
+ const len = str.length;
14
+ let i = 0;
15
+ let t0 = 0;
16
+ let v0 = 8997;
17
+ let t1 = 0;
18
+ let v1 = 33826;
19
+ let t2 = 0;
20
+ let v2 = 40164;
21
+ let t3 = 0;
22
+ let v3 = 52210;
23
+ while (i < len) {
24
+ v0 ^= str.charCodeAt(i++);
25
+ t0 = v0 * 435;
26
+ t1 = v1 * 435;
27
+ t2 = v2 * 435;
28
+ t3 = v3 * 435;
29
+ t2 += v0 << 8;
30
+ t3 += v1 << 8;
31
+ t1 += t0 >>> 16;
32
+ v0 = t0 & 65535;
33
+ t2 += t1 >>> 16;
34
+ v1 = t1 & 65535;
35
+ v3 = t3 + (t2 >>> 16) & 65535;
36
+ v2 = t2 & 65535;
37
+ }
38
+ return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);
39
+ };
40
+ /**
41
+ * Generates an ETag for the given payload.
42
+ *
43
+ * @param payload - The payload to generate an ETag for.
44
+ * @param weak - Whether to generate a weak ETag.
45
+ * @returns The generated ETag.
46
+ */
47
+ const generateETag = (payload, weak = false) => {
48
+ return `${(weak ? "W/\"" : "\"") + fnv1a52(payload).toString(36) + payload.length.toString(36)}"`;
49
+ };
50
+
51
+ //#endregion
52
+ exports.fnv1a52 = fnv1a52;
53
+ exports.generateETag = generateETag;
package/dist/etag.mjs CHANGED
@@ -1,2 +1,52 @@
1
- const e=e=>{let t=e.length,n=0,r=0,i=8997,a=0,o=33826,s=0,c=40164,l=0,u=52210;for(;n<t;)i^=e.charCodeAt(n++),r=i*435,a=o*435,s=c*435,l=u*435,s+=i<<8,l+=o<<8,a+=r>>>16,i=r&65535,s+=a>>>16,o=a&65535,u=l+(s>>>16)&65535,c=s&65535;return(u&15)*281474976710656+c*4294967296+o*65536+(i^u>>4)},t=(t,n=!1)=>`${(n?`W/"`:`"`)+e(t).toString(36)+t.length.toString(36)}"`;export{e as fnv1a52,t as generateETag};
1
+ //#region src/etag.ts
2
+ /**
3
+ * FNV-1a Hash implementation
4
+ *
5
+ * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js
6
+ *
7
+ * @remarks
8
+ * Simplified, optimized and add modified for 52 bit, which provides a larger hash space
9
+ * and still making use of Javascript's 53-bit integer space.
10
+ */
11
+ const fnv1a52 = (str) => {
12
+ const len = str.length;
13
+ let i = 0;
14
+ let t0 = 0;
15
+ let v0 = 8997;
16
+ let t1 = 0;
17
+ let v1 = 33826;
18
+ let t2 = 0;
19
+ let v2 = 40164;
20
+ let t3 = 0;
21
+ let v3 = 52210;
22
+ while (i < len) {
23
+ v0 ^= str.charCodeAt(i++);
24
+ t0 = v0 * 435;
25
+ t1 = v1 * 435;
26
+ t2 = v2 * 435;
27
+ t3 = v3 * 435;
28
+ t2 += v0 << 8;
29
+ t3 += v1 << 8;
30
+ t1 += t0 >>> 16;
31
+ v0 = t0 & 65535;
32
+ t2 += t1 >>> 16;
33
+ v1 = t1 & 65535;
34
+ v3 = t3 + (t2 >>> 16) & 65535;
35
+ v2 = t2 & 65535;
36
+ }
37
+ return (v3 & 15) * 281474976710656 + v2 * 4294967296 + v1 * 65536 + (v0 ^ v3 >> 4);
38
+ };
39
+ /**
40
+ * Generates an ETag for the given payload.
41
+ *
42
+ * @param payload - The payload to generate an ETag for.
43
+ * @param weak - Whether to generate a weak ETag.
44
+ * @returns The generated ETag.
45
+ */
46
+ const generateETag = (payload, weak = false) => {
47
+ return `${(weak ? "W/\"" : "\"") + fnv1a52(payload).toString(36) + payload.length.toString(36)}"`;
48
+ };
49
+
50
+ //#endregion
51
+ export { fnv1a52, generateETag };
2
52
  //# sourceMappingURL=etag.mjs.map
package/dist/etag.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"etag.mjs","names":[],"sources":["../src/etag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * FNV-1a Hash implementation\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * @remarks\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */\nexport const fnv1a52 = (str: string) => {\n const len = str.length;\n let i = 0;\n let t0 = 0;\n let v0 = 0x2325;\n let t1 = 0;\n let v1 = 0x8422;\n let t2 = 0;\n let v2 = 0x9ce4;\n let t3 = 0;\n let v3 = 0xcbf2;\n\n while (i < len) {\n v0 ^= str.charCodeAt(i++);\n t0 = v0 * 435;\n t1 = v1 * 435;\n t2 = v2 * 435;\n t3 = v3 * 435;\n t2 += v0 << 8;\n t3 += v1 << 8;\n t1 += t0 >>> 16;\n v0 = t0 & 65535;\n t2 += t1 >>> 16;\n v1 = t1 & 65535;\n v3 = (t3 + (t2 >>> 16)) & 65535;\n v2 = t2 & 65535;\n }\n\n return (\n (v3 & 15) * 281474976710656 +\n v2 * 4294967296 +\n v1 * 65536 +\n (v0 ^ (v3 >> 4))\n );\n};\n\n/**\n * Generates an ETag for the given payload.\n *\n * @param payload - The payload to generate an ETag for.\n * @param weak - Whether to generate a weak ETag.\n * @returns The generated ETag.\n */\nexport const generateETag = (payload: string, weak = false) => {\n const prefix = weak ? 'W/\"' : '\"';\n\n return `${prefix + fnv1a52(payload).toString(36) + payload.length.toString(36)}\"`;\n};\n"],"mappings":"AA2BA,MAAa,EAAW,GAAgB,CACtC,IAAM,EAAM,EAAI,OACZ,EAAI,EACJ,EAAK,EACL,EAAK,KACL,EAAK,EACL,EAAK,MACL,EAAK,EACL,EAAK,MACL,EAAK,EACL,EAAK,MAET,KAAO,EAAI,GACT,GAAM,EAAI,WAAW,IAAI,CACzB,EAAK,EAAK,IACV,EAAK,EAAK,IACV,EAAK,EAAK,IACV,EAAK,EAAK,IACV,GAAM,GAAM,EACZ,GAAM,GAAM,EACZ,GAAM,IAAO,GACb,EAAK,EAAK,MACV,GAAM,IAAO,GACb,EAAK,EAAK,MACV,EAAM,GAAM,IAAO,IAAO,MAC1B,EAAK,EAAK,MAGZ,OACG,EAAK,IAAM,gBACZ,EAAK,WACL,EAAK,OACJ,EAAM,GAAM,IAWJ,GAAgB,EAAiB,EAAO,KAG5C,IAFQ,EAAO,MAAQ,KAEX,EAAQ,EAAQ,CAAC,SAAS,GAAG,CAAG,EAAQ,OAAO,SAAS,GAAG,CAAC"}
1
+ {"version":3,"file":"etag.mjs","names":[],"sources":["../src/etag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * FNV-1a Hash implementation\n *\n * Ported from https://github.com/tjwebb/fnv-plus/blob/master/index.js\n *\n * @remarks\n * Simplified, optimized and add modified for 52 bit, which provides a larger hash space\n * and still making use of Javascript's 53-bit integer space.\n */\nexport const fnv1a52 = (str: string) => {\n const len = str.length;\n let i = 0;\n let t0 = 0;\n let v0 = 0x2325;\n let t1 = 0;\n let v1 = 0x8422;\n let t2 = 0;\n let v2 = 0x9ce4;\n let t3 = 0;\n let v3 = 0xcbf2;\n\n while (i < len) {\n v0 ^= str.charCodeAt(i++);\n t0 = v0 * 435;\n t1 = v1 * 435;\n t2 = v2 * 435;\n t3 = v3 * 435;\n t2 += v0 << 8;\n t3 += v1 << 8;\n t1 += t0 >>> 16;\n v0 = t0 & 65535;\n t2 += t1 >>> 16;\n v1 = t1 & 65535;\n v3 = (t3 + (t2 >>> 16)) & 65535;\n v2 = t2 & 65535;\n }\n\n return (\n (v3 & 15) * 281474976710656 +\n v2 * 4294967296 +\n v1 * 65536 +\n (v0 ^ (v3 >> 4))\n );\n};\n\n/**\n * Generates an ETag for the given payload.\n *\n * @param payload - The payload to generate an ETag for.\n * @param weak - Whether to generate a weak ETag.\n * @returns The generated ETag.\n */\nexport const generateETag = (payload: string, weak = false) => {\n const prefix = weak ? 'W/\"' : '\"';\n\n return `${prefix + fnv1a52(payload).toString(36) + payload.length.toString(36)}\"`;\n};\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,WAAW,QAAgB;CACtC,MAAM,MAAM,IAAI;CAChB,IAAI,IAAI;CACR,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;CACT,IAAI,KAAK;AAET,QAAO,IAAI,KAAK;AACd,QAAM,IAAI,WAAW,IAAI;AACzB,OAAK,KAAK;AACV,OAAK,KAAK;AACV,OAAK,KAAK;AACV,OAAK,KAAK;AACV,QAAM,MAAM;AACZ,QAAM,MAAM;AACZ,QAAM,OAAO;AACb,OAAK,KAAK;AACV,QAAM,OAAO;AACb,OAAK,KAAK;AACV,OAAM,MAAM,OAAO,MAAO;AAC1B,OAAK,KAAK;;AAGZ,SACG,KAAK,MAAM,kBACZ,KAAK,aACL,KAAK,SACJ,KAAM,MAAM;;;;;;;;;AAWjB,MAAa,gBAAgB,SAAiB,OAAO,UAAU;AAG7D,QAAO,IAFQ,OAAO,SAAQ,QAEX,QAAQ,QAAQ,CAAC,SAAS,GAAG,GAAG,QAAQ,OAAO,SAAS,GAAG,CAAC"}
@@ -1 +1,36 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../type-checks/src/is-string.cjs`);require(`../../type-checks/src/index.cjs`);const n=require(`../../path/src/join-paths.cjs`);let r=require(`defu`);r=e.__toESM(r);let i=require(`glob`);const a={dot:!0};async function o(e,o){return(0,i.glob)(t.isString(e)?e.includes(`*`)?e:n.joinPaths(e,`**/*`):e.input?n.joinPaths(e.input,e.glob):e.glob,(0,r.default)(t.isString(e)?{}:{dot:e.dot,ignore:e.ignore},o??{},a))}async function s(e,t){let n=(await o(e,(0,r.default)({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?n:n.map(e=>e.fullpath())}exports.listFiles=s;
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_is_string = require('../../type-checks/src/is-string.cjs');
3
+ require('../../type-checks/src/index.cjs');
4
+ const require_join_paths = require('../../path/src/join-paths.cjs');
5
+ let defu = require("defu");
6
+ defu = require_rolldown_runtime.__toESM(defu);
7
+ let glob = require("glob");
8
+
9
+ //#region ../fs/src/list-files.ts
10
+ const DEFAULT_OPTIONS = { dot: true };
11
+ /**
12
+ * A files and directories listing helper function
13
+ *
14
+ * @param filesGlob - A glob pattern to match files
15
+ * @returns A list of file paths
16
+ */
17
+ async function list(filesGlob, options) {
18
+ return (0, glob.glob)(require_is_string.isString(filesGlob) ? filesGlob.includes("*") ? filesGlob : require_join_paths.joinPaths(filesGlob, "**/*") : filesGlob.input ? require_join_paths.joinPaths(filesGlob.input, filesGlob.glob) : filesGlob.glob, (0, defu.default)(require_is_string.isString(filesGlob) ? {} : {
19
+ dot: filesGlob.dot,
20
+ ignore: filesGlob.ignore
21
+ }, options ?? {}, DEFAULT_OPTIONS));
22
+ }
23
+ /**
24
+ * A file listing helper function
25
+ *
26
+ * @param filesGlob - A glob pattern to match files
27
+ * @returns A list of file paths
28
+ */
29
+ async function listFiles(filesGlob, options) {
30
+ const result = (await list(filesGlob, (0, defu.default)({ withFileTypes: true }, options ?? {}))).filter((ret) => ret.isFile());
31
+ if (!options?.withFileTypes) return result.map((file) => file.fullpath());
32
+ return result;
33
+ }
34
+
35
+ //#endregion
36
+ exports.listFiles = listFiles;
@@ -1,2 +1,35 @@
1
- import{isString as e}from"../../type-checks/src/is-string.mjs";import"../../type-checks/src/index.mjs";import{joinPaths as t}from"../../path/src/join-paths.mjs";import n from"defu";import{glob as r}from"glob";const i={dot:!0};async function a(a,o){return r(e(a)?a.includes(`*`)?a:t(a,`**/*`):a.input?t(a.input,a.glob):a.glob,n(e(a)?{}:{dot:a.dot,ignore:a.ignore},o??{},i))}async function o(e,t){let r=(await a(e,n({withFileTypes:!0},t??{}))).filter(e=>e.isFile());return t?.withFileTypes?r:r.map(e=>e.fullpath())}export{o as listFiles};
1
+ import { isString } from "../../type-checks/src/is-string.mjs";
2
+ import "../../type-checks/src/index.mjs";
3
+ import { joinPaths } from "../../path/src/join-paths.mjs";
4
+ import defu from "defu";
5
+ import { glob } from "glob";
6
+
7
+ //#region ../fs/src/list-files.ts
8
+ const DEFAULT_OPTIONS = { dot: true };
9
+ /**
10
+ * A files and directories listing helper function
11
+ *
12
+ * @param filesGlob - A glob pattern to match files
13
+ * @returns A list of file paths
14
+ */
15
+ async function list(filesGlob, options) {
16
+ return glob(isString(filesGlob) ? filesGlob.includes("*") ? filesGlob : joinPaths(filesGlob, "**/*") : filesGlob.input ? joinPaths(filesGlob.input, filesGlob.glob) : filesGlob.glob, defu(isString(filesGlob) ? {} : {
17
+ dot: filesGlob.dot,
18
+ ignore: filesGlob.ignore
19
+ }, options ?? {}, DEFAULT_OPTIONS));
20
+ }
21
+ /**
22
+ * A file listing helper function
23
+ *
24
+ * @param filesGlob - A glob pattern to match files
25
+ * @returns A list of file paths
26
+ */
27
+ async function listFiles(filesGlob, options) {
28
+ const result = (await list(filesGlob, defu({ withFileTypes: true }, options ?? {}))).filter((ret) => ret.isFile());
29
+ if (!options?.withFileTypes) return result.map((file) => file.fullpath());
30
+ return result;
31
+ }
32
+
33
+ //#endregion
34
+ export { listFiles };
2
35
  //# sourceMappingURL=list-files.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-files.mjs","names":["DEFAULT_OPTIONS: ListOptions"],"sources":["../../../../fs/src/list-files.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path\";\nimport { isString } from \"@stryke/type-checks\";\nimport type { AssetGlob } from \"@stryke/types/file\";\nimport defu from \"defu\";\nimport type { GlobOptions, GlobOptionsWithFileTypesTrue, Path } from \"glob\";\nimport { glob } from \"glob\";\n\nexport type ListOptions = GlobOptions;\nexport type InferListReturnType<TOptions extends GlobOptions> =\n TOptions[\"withFileTypes\"] extends true ? Path[] : string[];\n\nconst DEFAULT_OPTIONS: ListOptions = {\n dot: true\n};\n\n/**\n * A files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function list<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): Promise<InferListReturnType<TOptions>> {\n return glob(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as Promise<InferListReturnType<TOptions>>;\n}\n\n/**\n * A synchronous files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): InferListReturnType<TOptions> {\n return glob.sync(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as InferListReturnType<TOptions>;\n}\n\n/**\n * A file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listFiles<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listFilesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listDirectories<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listDirectoriesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n"],"mappings":"iNA6BA,MAAMA,EAA+B,CACnC,IAAK,GACN,CAQD,eAAsB,EACpB,EACA,EACwC,CACxC,OAAO,EACL,EAAS,EAAU,CACf,EAAU,SAAS,IAAI,CACrB,EACA,EAAU,EAAW,OAAO,CAC9B,EAAU,MACR,EAAU,EAAU,MAAO,EAAU,KAAK,CAC1C,EAAU,KAChB,EACE,EAAS,EAAU,CACf,EAAE,CACF,CAAE,IAAK,EAAU,IAAK,OAAQ,EAAU,OAAQ,CACpD,GAAW,EAAE,CACb,EACD,CACF,CAqCH,eAAsB,EACpB,EACA,EACA,CACA,IAAM,GACJ,MAAM,EACJ,EACA,EACE,CAAE,cAAe,GAAM,CACvB,GAAW,EAAE,CACd,CACF,EACD,OAAO,GAAO,EAAI,QAAQ,CAAC,CAK7B,OAJK,GAAS,cAIP,EAHE,EAAO,IAAI,GAAQ,EAAK,UAAU,CAAC"}
1
+ {"version":3,"file":"list-files.mjs","names":["DEFAULT_OPTIONS: ListOptions"],"sources":["../../../../fs/src/list-files.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path\";\nimport { isString } from \"@stryke/type-checks\";\nimport type { AssetGlob } from \"@stryke/types/file\";\nimport defu from \"defu\";\nimport type { GlobOptions, GlobOptionsWithFileTypesTrue, Path } from \"glob\";\nimport { glob } from \"glob\";\n\nexport type ListOptions = GlobOptions;\nexport type InferListReturnType<TOptions extends GlobOptions> =\n TOptions[\"withFileTypes\"] extends true ? Path[] : string[];\n\nconst DEFAULT_OPTIONS: ListOptions = {\n dot: true\n};\n\n/**\n * A files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function list<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): Promise<InferListReturnType<TOptions>> {\n return glob(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as Promise<InferListReturnType<TOptions>>;\n}\n\n/**\n * A synchronous files and directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n): InferListReturnType<TOptions> {\n return glob.sync(\n isString(filesGlob)\n ? filesGlob.includes(\"*\")\n ? filesGlob\n : joinPaths(filesGlob, \"**/*\")\n : filesGlob.input\n ? joinPaths(filesGlob.input, filesGlob.glob)\n : filesGlob.glob,\n defu(\n isString(filesGlob)\n ? {}\n : { dot: filesGlob.dot, ignore: filesGlob.ignore },\n options ?? {},\n DEFAULT_OPTIONS\n )\n ) as InferListReturnType<TOptions>;\n}\n\n/**\n * A file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listFiles<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous file listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listFilesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isFile());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport async function listDirectories<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = (\n await list(\n filesGlob,\n defu(\n { withFileTypes: true },\n options ?? {}\n ) as GlobOptionsWithFileTypesTrue\n )\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n\n/**\n * A synchronous directories listing helper function\n *\n * @param filesGlob - A glob pattern to match files\n * @returns A list of file paths\n */\nexport function listDirectoriesSync<TOptions extends ListOptions>(\n filesGlob: string | Omit<AssetGlob, \"output\">,\n options?: TOptions\n) {\n const result = listSync(\n filesGlob,\n defu({ withFileTypes: true }, options ?? {}) as GlobOptionsWithFileTypesTrue\n ).filter(ret => ret.isDirectory());\n if (!options?.withFileTypes) {\n return result.map(file => file.fullpath()) as InferListReturnType<TOptions>;\n }\n\n return result as InferListReturnType<TOptions>;\n}\n"],"mappings":";;;;;;;AA6BA,MAAMA,kBAA+B,EACnC,KAAK,MACN;;;;;;;AAQD,eAAsB,KACpB,WACA,SACwC;AACxC,QAAO,KACL,SAAS,UAAU,GACf,UAAU,SAAS,IAAI,GACrB,YACA,UAAU,WAAW,OAAO,GAC9B,UAAU,QACR,UAAU,UAAU,OAAO,UAAU,KAAK,GAC1C,UAAU,MAChB,KACE,SAAS,UAAU,GACf,EAAE,GACF;EAAE,KAAK,UAAU;EAAK,QAAQ,UAAU;EAAQ,EACpD,WAAW,EAAE,EACb,gBACD,CACF;;;;;;;;AAqCH,eAAsB,UACpB,WACA,SACA;CACA,MAAM,UACJ,MAAM,KACJ,WACA,KACE,EAAE,eAAe,MAAM,EACvB,WAAW,EAAE,CACd,CACF,EACD,QAAO,QAAO,IAAI,QAAQ,CAAC;AAC7B,KAAI,CAAC,SAAS,cACZ,QAAO,OAAO,KAAI,SAAQ,KAAK,UAAU,CAAC;AAG5C,QAAO"}