@rzl-zone/utils-js 3.10.0 → 3.11.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.
Files changed (122) hide show
  1. package/README.md +36 -18
  2. package/dist/assertions/index.cjs +11 -11
  3. package/dist/assertions/index.d.ts +487 -215
  4. package/dist/assertions/index.js +5 -5
  5. package/dist/{chunk-SN5HAK3Y.js → chunk-22V4WP3H.js} +4 -4
  6. package/dist/{chunk-EJV5AF4L.js → chunk-2XSZ2ANI.js} +2 -2
  7. package/dist/{chunk-OSSFLQDD.js → chunk-3T6VSWYX.js} +2 -2
  8. package/dist/{chunk-3LE6NX57.js → chunk-5WIEDF2J.js} +4 -4
  9. package/dist/{chunk-WLEZ2KSG.cjs → chunk-6EDFZJZ5.cjs} +126 -126
  10. package/dist/{chunk-GHU356XQ.js → chunk-6LXWT2I5.js} +3 -3
  11. package/dist/{chunk-GKDSBOYE.js → chunk-6YGBRENU.js} +3 -3
  12. package/dist/{chunk-NAOVH4OH.cjs → chunk-7FGNVDEV.cjs} +7 -7
  13. package/dist/{chunk-X6ULJZ3X.js → chunk-AXDYWO67.js} +2 -2
  14. package/dist/{chunk-UV5BKAYW.cjs → chunk-B6PMNZ4M.cjs} +7 -7
  15. package/dist/chunk-BAV5T2E3.cjs +1 -1
  16. package/dist/{chunk-YHFRCVTN.js → chunk-BLF7SD66.js} +3 -3
  17. package/dist/{chunk-QZI5PVCI.cjs → chunk-BMZZXZJ2.cjs} +4 -4
  18. package/dist/{chunk-DXPM4NOU.js → chunk-BOYP3ARU.js} +4 -4
  19. package/dist/{chunk-UXT4XSUK.js → chunk-BPYW5YL7.js} +2 -2
  20. package/dist/{chunk-QGTFQ7RO.cjs → chunk-C2PV3VWC.cjs} +6 -6
  21. package/dist/{chunk-MZ3T6L7Z.js → chunk-CCJ2MSN7.js} +2 -2
  22. package/dist/{chunk-H44QVAZL.cjs → chunk-DAPAK2W3.cjs} +31 -31
  23. package/dist/{chunk-OYFUBKEG.cjs → chunk-DLS3G6WQ.cjs} +4 -4
  24. package/dist/{chunk-MS2KSKD7.js → chunk-DNMCR5JH.js} +9 -9
  25. package/dist/chunk-DVMHRLKP.cjs +1 -1
  26. package/dist/{chunk-IX6PF5ZP.cjs → chunk-EBYFYZW4.cjs} +4 -4
  27. package/dist/{chunk-5Y6JL47L.js → chunk-ENMRZ4BE.js} +3 -3
  28. package/dist/{chunk-7EIFPHV3.js → chunk-FJ4BQFVO.js} +8 -8
  29. package/dist/{chunk-TJ5OY6MC.cjs → chunk-GIKL4PUF.cjs} +10 -10
  30. package/dist/{chunk-M5QB2GM5.js → chunk-GOFINGT6.js} +2 -2
  31. package/dist/{chunk-J6VLFVIL.js → chunk-GXKQ3LHF.js} +3 -3
  32. package/dist/{chunk-5KDVIEVO.js → chunk-HNBRGN4R.js} +2 -2
  33. package/dist/{chunk-OCTHWEZK.cjs → chunk-HYN6FC5A.cjs} +34 -34
  34. package/dist/{chunk-MBFVTGYS.js → chunk-IZGVBYFN.js} +4 -4
  35. package/dist/{chunk-QXTJVDWE.js → chunk-JIE447J5.js} +3 -3
  36. package/dist/{chunk-UFYMRRJH.cjs → chunk-JXEIJM5M.cjs} +61 -61
  37. package/dist/{chunk-WB3FT62A.js → chunk-K47GZDBH.js} +3 -3
  38. package/dist/{chunk-KUVRZ2JW.cjs → chunk-K5536YHG.cjs} +50 -50
  39. package/dist/chunk-KHO2SBNA.cjs +1 -1
  40. package/dist/{chunk-NJ24M6ZH.cjs → chunk-KXJ7X325.cjs} +37 -37
  41. package/dist/chunk-L5RDAVVH.js +1 -1
  42. package/dist/{chunk-SRWL4YCP.js → chunk-LJHPTLWB.js} +7 -7
  43. package/dist/{chunk-6AMDHVS2.cjs → chunk-M7ELWZXM.cjs} +9 -9
  44. package/dist/chunk-MSUW5VHZ.js +1590 -0
  45. package/dist/{chunk-2XGQQZ6A.cjs → chunk-MUHRPRR7.cjs} +3 -3
  46. package/dist/{chunk-XYWC4EQ3.cjs → chunk-MV3TSQSH.cjs} +71 -71
  47. package/dist/{chunk-VCYXNIZ2.cjs → chunk-NLZLXWAU.cjs} +9 -9
  48. package/dist/{chunk-76ATVDCR.cjs → chunk-NVRZPF5M.cjs} +3 -3
  49. package/dist/chunk-ONZFBJVW.js +1 -1
  50. package/dist/{chunk-62FS7WMB.cjs → chunk-PGNL7JXO.cjs} +31 -31
  51. package/dist/{chunk-JI57K7D4.cjs → chunk-Q4GEQS7X.cjs} +161 -161
  52. package/dist/chunk-QNKGP5DY.js +1 -1
  53. package/dist/{chunk-ZTHJQJ5F.cjs → chunk-QYI2VJLS.cjs} +9 -9
  54. package/dist/{chunk-C7GC2PFX.js → chunk-RBWZII5I.js} +3 -3
  55. package/dist/{chunk-MMRHKYT6.cjs → chunk-RMP7VMPB.cjs} +12 -12
  56. package/dist/{chunk-TXOVQZPU.js → chunk-RZOGBYIS.js} +2 -2
  57. package/dist/{chunk-ALRISPTL.cjs → chunk-SU3UELUB.cjs} +3 -3
  58. package/dist/chunk-SYHPSOUU.cjs +1626 -0
  59. package/dist/{chunk-R2DR7SPJ.js → chunk-SZUNAEMR.js} +6 -6
  60. package/dist/{chunk-YVRUY4EW.cjs → chunk-TER22LO4.cjs} +8 -8
  61. package/dist/{chunk-WRGN6UBK.js → chunk-TJHGRQ4P.js} +2 -2
  62. package/dist/{chunk-I33PB44Q.cjs → chunk-U23I7JPB.cjs} +15 -15
  63. package/dist/{chunk-VBSLIIDB.js → chunk-U7HHN47R.js} +10 -10
  64. package/dist/chunk-UDA26MCU.cjs +1 -1
  65. package/dist/{chunk-44X74C26.js → chunk-UIAWUZ4H.js} +4 -4
  66. package/dist/{chunk-5O66AUEC.js → chunk-ULQPCIA2.js} +2 -2
  67. package/dist/chunk-VJDDGRIK.cjs +1 -1
  68. package/dist/{chunk-6WVOUVWD.js → chunk-WETQI6HM.js} +9 -9
  69. package/dist/{chunk-FWWPEL7J.cjs → chunk-WLOQQFDS.cjs} +3 -3
  70. package/dist/chunk-WVSPXFTY.js +1 -1
  71. package/dist/{chunk-WKM6UVMG.cjs → chunk-WXFTVXBF.cjs} +4 -4
  72. package/dist/{chunk-YQHJB7KR.cjs → chunk-XPVTIGU2.cjs} +26 -26
  73. package/dist/{chunk-PWKOFPAH.cjs → chunk-XX6RUGTM.cjs} +3 -3
  74. package/dist/chunk-YWHHVDT4.js +1 -1
  75. package/dist/{chunk-7NXFGJJE.cjs → chunk-ZPDMWDGZ.cjs} +14 -14
  76. package/dist/{chunk-JYOCB6OV.js → chunk-ZVWZEGQP.js} +2 -2
  77. package/dist/conversions/index.cjs +34 -34
  78. package/dist/conversions/index.d.ts +489 -333
  79. package/dist/conversions/index.js +15 -15
  80. package/dist/events/index.cjs +8 -8
  81. package/dist/events/index.d.ts +35 -29
  82. package/dist/events/index.js +4 -4
  83. package/dist/formatters/index.cjs +19 -19
  84. package/dist/formatters/index.d.ts +917 -873
  85. package/dist/formatters/index.js +9 -9
  86. package/dist/generators/index.cjs +9 -9
  87. package/dist/generators/index.d.ts +104 -86
  88. package/dist/generators/index.js +4 -4
  89. package/dist/index.d.ts +1 -1
  90. package/dist/isPlainObject-0p3VveWr.d.ts +534 -0
  91. package/dist/next/index.cjs +37 -37
  92. package/dist/next/index.d.ts +36 -21
  93. package/dist/next/index.js +9 -9
  94. package/dist/next/server/index.cjs +4 -4
  95. package/dist/next/server/index.d.ts +6 -3
  96. package/dist/next/server/index.js +2 -2
  97. package/dist/operations/index.cjs +11 -11
  98. package/dist/operations/index.d.ts +14 -5
  99. package/dist/operations/index.js +8 -8
  100. package/dist/parsers/index.cjs +6 -6
  101. package/dist/parsers/index.d.ts +68 -65
  102. package/dist/parsers/index.js +5 -5
  103. package/dist/predicates/index.cjs +77 -77
  104. package/dist/predicates/index.d.ts +442 -258
  105. package/dist/predicates/index.js +14 -14
  106. package/dist/promises/index.cjs +6 -6
  107. package/dist/promises/index.d.ts +28 -16
  108. package/dist/promises/index.js +4 -4
  109. package/dist/rzl-utils.global.js +2 -2
  110. package/dist/strings/index.cjs +23 -23
  111. package/dist/strings/index.d.ts +82 -54
  112. package/dist/strings/index.js +7 -7
  113. package/dist/tailwind/index.cjs +13 -13
  114. package/dist/tailwind/index.d.ts +186 -169
  115. package/dist/tailwind/index.js +5 -5
  116. package/dist/urls/index.cjs +23 -23
  117. package/dist/urls/index.d.ts +252 -229
  118. package/dist/urls/index.js +16 -16
  119. package/package.json +2 -2
  120. package/dist/chunk-7C7TQC5J.cjs +0 -620
  121. package/dist/chunk-J4TT33ZX.js +0 -584
  122. package/dist/isPlainObject-BTPjv6zB.d.ts +0 -178
@@ -2,12 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isArray, isObject, assertIsPlainObject, hasOwnProp, assertIsBoolean } from './chunk-J4TT33ZX.js';
10
+ import { isArray, isObject, assertIsPlainObject, hasOwnProp, assertIsBoolean } from './chunk-MSUW5VHZ.js';
11
11
 
12
12
  var isEmptyArray = (value) => {
13
13
  if (!isArray(value)) return true;
@@ -2,13 +2,13 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isDate, isMap } from './chunk-X6ULJZ3X.js';
11
- import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-J4TT33ZX.js';
10
+ import { isDate, isMap } from './chunk-AXDYWO67.js';
11
+ import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-MSUW5VHZ.js';
12
12
 
13
13
  var isRegExp = (value) => {
14
14
  return value instanceof RegExp;
@@ -2,12 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isNonEmptyString, isPlainObject } from './chunk-J4TT33ZX.js';
10
+ import { isNonEmptyString, isPlainObject } from './chunk-MSUW5VHZ.js';
11
11
 
12
12
  var removeSpaces = (value, options = {
13
13
  trimOnly: false
@@ -2,18 +2,18 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
10
  'use strict';
11
11
 
12
- var chunk6AMDHVS2_cjs = require('./chunk-6AMDHVS2.cjs');
13
- var chunkIX6PF5ZP_cjs = require('./chunk-IX6PF5ZP.cjs');
14
- var chunkFWWPEL7J_cjs = require('./chunk-FWWPEL7J.cjs');
15
- var chunkH44QVAZL_cjs = require('./chunk-H44QVAZL.cjs');
16
- var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
12
+ var chunkM7ELWZXM_cjs = require('./chunk-M7ELWZXM.cjs');
13
+ var chunkEBYFYZW4_cjs = require('./chunk-EBYFYZW4.cjs');
14
+ var chunkWLOQQFDS_cjs = require('./chunk-WLOQQFDS.cjs');
15
+ var chunkDAPAK2W3_cjs = require('./chunk-DAPAK2W3.cjs');
16
+ var chunkSYHPSOUU_cjs = require('./chunk-SYHPSOUU.cjs');
17
17
 
18
18
  var NormalizePathnameError = class _NormalizePathnameError extends Error {
19
19
  /** * ***The original error that triggered this normalization failure.***
@@ -22,10 +22,10 @@ var NormalizePathnameError = class _NormalizePathnameError extends Error {
22
22
  */
23
23
  originalError;
24
24
  constructor(message, originalError) {
25
- super(message, chunk7C7TQC5J_cjs.isFunction(Error) ? { cause: originalError } : void 0);
25
+ super(message, chunkSYHPSOUU_cjs.isFunction(Error) ? { cause: originalError } : void 0);
26
26
  this.name = "NormalizePathnameError";
27
27
  this.originalError = originalError;
28
- if (chunk7C7TQC5J_cjs.isFunction(Error.captureStackTrace)) {
28
+ if (chunkSYHPSOUU_cjs.isFunction(Error.captureStackTrace)) {
29
29
  Error.captureStackTrace(this, _NormalizePathnameError);
30
30
  } else {
31
31
  this.stack = new Error(message).stack;
@@ -50,7 +50,7 @@ function normalizePathname(pathname, options = {
50
50
  defaultPath: "/",
51
51
  keepNullable: false
52
52
  }) {
53
- chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
53
+ chunkSYHPSOUU_cjs.assertIsPlainObject(options, {
54
54
  message({ currentType, validType }) {
55
55
  return `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
56
56
  }
@@ -62,45 +62,45 @@ function normalizePathname(pathname, options = {
62
62
  localhostDomain = false,
63
63
  ignoreDomainExtensions = void 0
64
64
  } = options;
65
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(defaultPath)) {
65
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(defaultPath)) {
66
66
  throw new TypeError(
67
- `Parameter \`defaultPath\` property of the \`options\` (second parameter) must be of type \`string\` and not empty-string, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
67
+ `Parameter \`defaultPath\` property of the \`options\` (second parameter) must be of type \`string\` and not empty-string, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
68
68
  defaultPath
69
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(defaultPath, {
69
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(defaultPath, {
70
70
  keepUndefined: true
71
71
  })}\`.`
72
72
  );
73
73
  }
74
- chunk7C7TQC5J_cjs.assertIsBoolean(keepNullable, {
74
+ chunkSYHPSOUU_cjs.assertIsBoolean(keepNullable, {
75
75
  message({ currentType, validType }) {
76
76
  return `Parameter \`keepNullable\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
77
77
  }
78
78
  });
79
- chunk7C7TQC5J_cjs.assertIsBoolean(keepTrailingSlash, {
79
+ chunkSYHPSOUU_cjs.assertIsBoolean(keepTrailingSlash, {
80
80
  message({ currentType, validType }) {
81
81
  return `Parameter \`keepTrailingSlash\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
82
82
  }
83
83
  });
84
- chunk7C7TQC5J_cjs.assertIsBoolean(localhostDomain, {
84
+ chunkSYHPSOUU_cjs.assertIsBoolean(localhostDomain, {
85
85
  message({ currentType, validType }) {
86
86
  return `Parameter \`localhostDomain\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
87
87
  }
88
88
  });
89
89
  let ignoreDomainExtsSet;
90
- if (!chunk7C7TQC5J_cjs.isUndefined(ignoreDomainExtensions)) {
91
- if (!chunk7C7TQC5J_cjs.isSet(ignoreDomainExtensions) && !chunk7C7TQC5J_cjs.isArray(ignoreDomainExtensions)) {
90
+ if (!chunkSYHPSOUU_cjs.isUndefined(ignoreDomainExtensions)) {
91
+ if (!chunkSYHPSOUU_cjs.isSet(ignoreDomainExtensions) && !chunkSYHPSOUU_cjs.isArray(ignoreDomainExtensions)) {
92
92
  throw new TypeError(
93
- `Parameter \`ignoreDomainExtensions\` must be of type a \`Set<string>\` or \`string[]\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
93
+ `Parameter \`ignoreDomainExtensions\` must be of type a \`Set<string>\` or \`string[]\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
94
94
  ignoreDomainExtensions
95
95
  )}\`.`
96
96
  );
97
97
  }
98
- ignoreDomainExtsSet = chunk7C7TQC5J_cjs.isSet(ignoreDomainExtensions) ? ignoreDomainExtensions : new Set(ignoreDomainExtensions);
98
+ ignoreDomainExtsSet = chunkSYHPSOUU_cjs.isSet(ignoreDomainExtensions) ? ignoreDomainExtensions : new Set(ignoreDomainExtensions);
99
99
  let idx = 0;
100
100
  for (const ext of ignoreDomainExtsSet) {
101
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(ext)) {
101
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(ext)) {
102
102
  throw new TypeError(
103
- `Parameter \`ignoreDomainExtensions[${idx}]\` must be a \`string\` and \`non-empty string\`, but received: \`${chunkH44QVAZL_cjs.safeStableStringify(
103
+ `Parameter \`ignoreDomainExtensions[${idx}]\` must be a \`string\` and \`non-empty string\`, but received: \`${chunkDAPAK2W3_cjs.safeStableStringify(
104
104
  ext,
105
105
  { keepUndefined: true }
106
106
  )}\`.`
@@ -108,7 +108,7 @@ function normalizePathname(pathname, options = {
108
108
  }
109
109
  if (!ext.startsWith(".")) {
110
110
  throw new TypeError(
111
- `Parameter \`ignoreDomainExtensions[${idx}]\` must start with a dot (.), but received: ${chunkH44QVAZL_cjs.safeStableStringify(
111
+ `Parameter \`ignoreDomainExtensions[${idx}]\` must start with a dot (.), but received: ${chunkDAPAK2W3_cjs.safeStableStringify(
112
112
  ext,
113
113
  { keepUndefined: true }
114
114
  )}`
@@ -118,12 +118,12 @@ function normalizePathname(pathname, options = {
118
118
  }
119
119
  }
120
120
  try {
121
- if (keepNullable && (chunk7C7TQC5J_cjs.isNil(pathname) || !chunk7C7TQC5J_cjs.isString(pathname))) {
122
- if (chunk7C7TQC5J_cjs.isNull(pathname)) return null;
121
+ if (keepNullable && (chunkSYHPSOUU_cjs.isNil(pathname) || !chunkSYHPSOUU_cjs.isString(pathname))) {
122
+ if (chunkSYHPSOUU_cjs.isNull(pathname)) return null;
123
123
  return void 0;
124
124
  }
125
- let currentPathName = chunk7C7TQC5J_cjs.isNonEmptyString(pathname) ? pathname : defaultPath;
126
- currentPathName = chunkIX6PF5ZP_cjs.removeSpaces(currentPathName, { trimOnly: true }).replace(
125
+ let currentPathName = chunkSYHPSOUU_cjs.isNonEmptyString(pathname) ? pathname : defaultPath;
126
+ currentPathName = chunkEBYFYZW4_cjs.removeSpaces(currentPathName, { trimOnly: true }).replace(
127
127
  /\s+/g,
128
128
  ""
129
129
  );
@@ -192,7 +192,7 @@ var stripLeadingDomain = (path, options) => {
192
192
  const segments = currentPath.split("/");
193
193
  const firstPart = segments[0];
194
194
  const domainPart = firstPart.split(":")[0];
195
- const isDomain = chunk6AMDHVS2_cjs.isValidDomain(domainPart, {
195
+ const isDomain = chunkM7ELWZXM_cjs.isValidDomain(domainPart, {
196
196
  subdomain: true,
197
197
  allowUnicode: true,
198
198
  wildcard: true,
@@ -220,7 +220,7 @@ var ensureLeadingSlash = (path) => {
220
220
  return path;
221
221
  };
222
222
  var throwError = (error) => {
223
- const err = chunk7C7TQC5J_cjs.isError(error) ? error : new Error("Unknown error from function `normalizePathname()`.");
223
+ const err = chunkSYHPSOUU_cjs.isError(error) ? error : new Error("Unknown error from function `normalizePathname()`.");
224
224
  throw new NormalizePathnameError(
225
225
  `Failed to normalize pathname in function \`normalizePathname()\`: ${err.message}`,
226
226
  err
@@ -228,20 +228,20 @@ var throwError = (error) => {
228
228
  };
229
229
 
230
230
  var formatEnvPort = (envVar, options = {}) => {
231
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(envVar)) return "";
232
- chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
231
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(envVar)) return "";
232
+ chunkSYHPSOUU_cjs.assertIsPlainObject(options, {
233
233
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
234
234
  });
235
- const prefixColon = chunk7C7TQC5J_cjs.hasOwnProp(options, "prefixColon") ? options.prefixColon : false;
236
- if (!chunk7C7TQC5J_cjs.isBoolean(prefixColon)) {
235
+ const prefixColon = chunkSYHPSOUU_cjs.hasOwnProp(options, "prefixColon") ? options.prefixColon : false;
236
+ if (!chunkSYHPSOUU_cjs.isBoolean(prefixColon)) {
237
237
  throw new TypeError(
238
- `Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
238
+ `Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
239
239
  prefixColon
240
240
  )}\`.`
241
241
  );
242
242
  }
243
243
  const digitsOnly = envVar.replace(/\D+/g, "");
244
- if (chunkFWWPEL7J_cjs.isEmptyString(digitsOnly)) return "";
244
+ if (chunkWLOQQFDS_cjs.isEmptyString(digitsOnly)) return "";
245
245
  return prefixColon ? `:${digitsOnly}` : digitsOnly;
246
246
  };
247
247
 
@@ -2,14 +2,14 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isEmptyString } from './chunk-5O66AUEC.js';
11
- import { assertIsArray } from './chunk-TXOVQZPU.js';
12
- import { isPlainObject, isNumber, isNonEmptyString, isFunction, hasOwnProp, isNonEmptyArray, getPreciseType, isString, isObjectOrArray, isStringObject, isNumberObject, isBooleanObject, isArray } from './chunk-J4TT33ZX.js';
10
+ import { isEmptyString } from './chunk-ULQPCIA2.js';
11
+ import { assertIsArray } from './chunk-RZOGBYIS.js';
12
+ import { isPlainObject, isNumber, isNonEmptyString, isFunction, hasOwnProp, isNonEmptyArray, getPreciseType, isString, isObjectOrArray, isStringObject, isNumberObject, isBooleanObject, isArray } from './chunk-MSUW5VHZ.js';
13
13
  import { getDefaultConfig, extendTailwindMerge } from 'tailwind-merge-v3';
14
14
  import { getDefaultConfig as getDefaultConfig$1, extendTailwindMerge as extendTailwindMerge$1 } from 'tailwind-merge-v4';
15
15
 
@@ -2,13 +2,13 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { punycodeUtilsJS } from './chunk-GKDSBOYE.js';
11
- import { isNonEmptyString, assertIsPlainObject, assertIsBoolean } from './chunk-J4TT33ZX.js';
10
+ import { punycodeUtilsJS } from './chunk-6YGBRENU.js';
11
+ import { isNonEmptyString, assertIsPlainObject, assertIsBoolean } from './chunk-MSUW5VHZ.js';
12
12
 
13
13
  var EXTENSIONS_FILE = /* @__PURE__ */ new Set([
14
14
  // 📄 Text & Document
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -10,62 +10,62 @@
10
10
  'use strict';
11
11
 
12
12
  var chunkKHO2SBNA_cjs = require('./chunk-KHO2SBNA.cjs');
13
- var chunk76ATVDCR_cjs = require('./chunk-76ATVDCR.cjs');
14
- var chunkI33PB44Q_cjs = require('./chunk-I33PB44Q.cjs');
15
- var chunkMMRHKYT6_cjs = require('./chunk-MMRHKYT6.cjs');
13
+ var chunkNVRZPF5M_cjs = require('./chunk-NVRZPF5M.cjs');
14
+ var chunkU23I7JPB_cjs = require('./chunk-U23I7JPB.cjs');
15
+ var chunkRMP7VMPB_cjs = require('./chunk-RMP7VMPB.cjs');
16
16
  var chunkDVMHRLKP_cjs = require('./chunk-DVMHRLKP.cjs');
17
- var chunkOCTHWEZK_cjs = require('./chunk-OCTHWEZK.cjs');
18
- var chunkFWWPEL7J_cjs = require('./chunk-FWWPEL7J.cjs');
19
- var chunkOYFUBKEG_cjs = require('./chunk-OYFUBKEG.cjs');
20
- var chunkH44QVAZL_cjs = require('./chunk-H44QVAZL.cjs');
21
- var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
17
+ var chunkHYN6FC5A_cjs = require('./chunk-HYN6FC5A.cjs');
18
+ var chunkWLOQQFDS_cjs = require('./chunk-WLOQQFDS.cjs');
19
+ var chunkDLS3G6WQ_cjs = require('./chunk-DLS3G6WQ.cjs');
20
+ var chunkDAPAK2W3_cjs = require('./chunk-DAPAK2W3.cjs');
21
+ var chunkSYHPSOUU_cjs = require('./chunk-SYHPSOUU.cjs');
22
22
 
23
23
  var constructURL = (baseUrl, queryParams, removeParams) => {
24
- if (chunk7C7TQC5J_cjs.isString(baseUrl)) {
25
- if (chunkFWWPEL7J_cjs.isEmptyString(baseUrl)) {
24
+ if (chunkSYHPSOUU_cjs.isString(baseUrl)) {
25
+ if (chunkWLOQQFDS_cjs.isEmptyString(baseUrl)) {
26
26
  throw new TypeError(`First parameter (\`baseUrl\`) cannot be an empty-string.`);
27
27
  }
28
- baseUrl = chunk76ATVDCR_cjs.normalizeString(baseUrl);
28
+ baseUrl = chunkNVRZPF5M_cjs.normalizeString(baseUrl);
29
29
  } else if (!chunkKHO2SBNA_cjs.isURL(baseUrl)) {
30
30
  throw new TypeError(
31
- `First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
31
+ `First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
32
32
  baseUrl
33
- )}\`, with current value: \`${chunkH44QVAZL_cjs.safeStableStringify(baseUrl, {
33
+ )}\`, with current value: \`${chunkDAPAK2W3_cjs.safeStableStringify(baseUrl, {
34
34
  keepUndefined: true
35
35
  })}\`.`
36
36
  );
37
37
  }
38
- if (!chunk7C7TQC5J_cjs.isUndefined(removeParams)) {
39
- chunkOYFUBKEG_cjs.assertIsArray(removeParams, {
38
+ if (!chunkSYHPSOUU_cjs.isUndefined(removeParams)) {
39
+ chunkDLS3G6WQ_cjs.assertIsArray(removeParams, {
40
40
  message: ({ currentType, validType }) => `Third parameter (\`removeParams\`) must be of type \`${validType} of strings\`, but received: \`${currentType}\`.`
41
41
  });
42
- if (!removeParams.every((param) => chunk7C7TQC5J_cjs.isNonEmptyString(param))) {
42
+ if (!removeParams.every((param) => chunkSYHPSOUU_cjs.isNonEmptyString(param))) {
43
43
  throw new TypeError(
44
44
  `Third parameter (\`removeParams\`) must be of type \`array\` and contains \`string\` only and non empty-string.`
45
45
  );
46
46
  }
47
47
  }
48
48
  try {
49
- if (!chunk7C7TQC5J_cjs.isUndefined(queryParams) && !chunk7C7TQC5J_cjs.isFunction(queryParams[Symbol.iterator])) {
49
+ if (!chunkSYHPSOUU_cjs.isUndefined(queryParams) && !chunkSYHPSOUU_cjs.isFunction(queryParams[Symbol.iterator])) {
50
50
  throw new TypeError(
51
- `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
51
+ `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
52
52
  queryParams
53
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(queryParams, {
53
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(queryParams, {
54
54
  keepUndefined: true
55
55
  })}\`.`
56
56
  );
57
57
  }
58
58
  const urlInstance = new URL(baseUrl);
59
- if (!chunk7C7TQC5J_cjs.isUndefined(queryParams)) {
59
+ if (!chunkSYHPSOUU_cjs.isUndefined(queryParams)) {
60
60
  const paramObject = Object.fromEntries(queryParams);
61
- if (!chunkMMRHKYT6_cjs.isEmptyValue(paramObject)) {
61
+ if (!chunkRMP7VMPB_cjs.isEmptyValue(paramObject)) {
62
62
  const mergedParams = new URLSearchParams(urlInstance.search);
63
63
  for (const [key, value] of Object.entries(paramObject)) {
64
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(value) && !chunk7C7TQC5J_cjs.isNumber(value, { includeNaN: true })) {
64
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(value) && !chunkSYHPSOUU_cjs.isNumber(value, { includeNaN: true })) {
65
65
  throw new TypeError(
66
- `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
66
+ `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
67
67
  queryParams
68
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(queryParams, {
68
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(queryParams, {
69
69
  keepUndefined: true
70
70
  })}\`.`
71
71
  );
@@ -73,7 +73,7 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
73
73
  mergedParams.set(key, String(value));
74
74
  }
75
75
  if (removeParams?.length) {
76
- chunkI33PB44Q_cjs.toStringArrayUnRecursive(removeParams).map((paramKey) => {
76
+ chunkU23I7JPB_cjs.toStringArrayUnRecursive(removeParams).map((paramKey) => {
77
77
  mergedParams.delete(paramKey);
78
78
  });
79
79
  }
@@ -83,7 +83,7 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
83
83
  removeParams?.forEach((param) => urlInstance.searchParams.delete(param));
84
84
  return urlInstance;
85
85
  } catch (error) {
86
- if (chunk7C7TQC5J_cjs.isError(error)) throw error;
86
+ if (chunkSYHPSOUU_cjs.isError(error)) throw error;
87
87
  throw new Error(
88
88
  "Failed to construct a valid URL in `constructURL()`, Error:" + error
89
89
  );
@@ -91,7 +91,7 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
91
91
  };
92
92
 
93
93
  var extractURLs = (url) => {
94
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(url)) return null;
94
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(url)) return null;
95
95
  let decoded;
96
96
  try {
97
97
  decoded = decodeURIComponent(url);
@@ -113,66 +113,66 @@ var extractURLs = (url) => {
113
113
  };
114
114
 
115
115
  var getFirstPrefixPathname = (result, defaultValue = "/") => {
116
- if (!chunk7C7TQC5J_cjs.isNonEmptyString(defaultValue)) {
116
+ if (!chunkSYHPSOUU_cjs.isNonEmptyString(defaultValue)) {
117
117
  throw new TypeError(
118
- `Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
118
+ `Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
119
119
  defaultValue
120
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(defaultValue, {
120
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(defaultValue, {
121
121
  keepUndefined: true
122
122
  })}\`.`
123
123
  );
124
124
  }
125
- if (chunk7C7TQC5J_cjs.isArray(result)) {
126
- if (!result.every((item) => chunk7C7TQC5J_cjs.isString(item))) {
125
+ if (chunkSYHPSOUU_cjs.isArray(result)) {
126
+ if (!result.every((item) => chunkSYHPSOUU_cjs.isString(item))) {
127
127
  throw new TypeError(
128
- `First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
128
+ `First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
129
129
  result
130
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(result, {
130
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(result, {
131
131
  keepUndefined: true
132
132
  })}\`.`
133
133
  );
134
134
  }
135
135
  for (const item of result) {
136
- const normalized = chunkOCTHWEZK_cjs.normalizePathname(item);
136
+ const normalized = chunkHYN6FC5A_cjs.normalizePathname(item);
137
137
  if (normalized !== "/") {
138
138
  return normalized;
139
139
  }
140
140
  }
141
- return chunkOCTHWEZK_cjs.normalizePathname(defaultValue);
141
+ return chunkHYN6FC5A_cjs.normalizePathname(defaultValue);
142
142
  }
143
- if (chunk7C7TQC5J_cjs.isString(result)) {
144
- const normalized = chunkOCTHWEZK_cjs.normalizePathname(result);
145
- return normalized !== "/" ? normalized : chunkOCTHWEZK_cjs.normalizePathname(defaultValue);
143
+ if (chunkSYHPSOUU_cjs.isString(result)) {
144
+ const normalized = chunkHYN6FC5A_cjs.normalizePathname(result);
145
+ return normalized !== "/" ? normalized : chunkHYN6FC5A_cjs.normalizePathname(defaultValue);
146
146
  }
147
- if (!chunk7C7TQC5J_cjs.isNil(result)) {
147
+ if (!chunkSYHPSOUU_cjs.isNil(result)) {
148
148
  throw new TypeError(
149
- `First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
149
+ `First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
150
150
  result
151
151
  )}\`.`
152
152
  );
153
153
  }
154
- return chunkOCTHWEZK_cjs.normalizePathname(defaultValue);
154
+ return chunkHYN6FC5A_cjs.normalizePathname(defaultValue);
155
155
  };
156
156
 
157
157
  var getPrefixPathname = (url, base = null, options = {}) => {
158
158
  const errors = [];
159
- if (!chunk7C7TQC5J_cjs.isString(url) && !chunk7C7TQC5J_cjs.isArray(url)) {
159
+ if (!chunkSYHPSOUU_cjs.isString(url) && !chunkSYHPSOUU_cjs.isArray(url)) {
160
160
  errors.push(
161
- `First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
161
+ `First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
162
162
  url
163
163
  )}\`.`
164
164
  );
165
165
  }
166
- if (!chunk7C7TQC5J_cjs.isString(base) && !chunk7C7TQC5J_cjs.isArray(base) && !chunk7C7TQC5J_cjs.isNull(base)) {
166
+ if (!chunkSYHPSOUU_cjs.isString(base) && !chunkSYHPSOUU_cjs.isArray(base) && !chunkSYHPSOUU_cjs.isNull(base)) {
167
167
  errors.push(
168
- `Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
168
+ `Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
169
169
  base
170
170
  )}\`.`
171
171
  );
172
172
  }
173
- if (!chunk7C7TQC5J_cjs.isPlainObject(options)) {
173
+ if (!chunkSYHPSOUU_cjs.isPlainObject(options)) {
174
174
  errors.push(
175
- `Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
175
+ `Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
176
176
  options
177
177
  )}\`.`
178
178
  );
@@ -180,48 +180,48 @@ var getPrefixPathname = (url, base = null, options = {}) => {
180
180
  const { levels = 1, removeDuplicates = true } = options;
181
181
  if (!chunkDVMHRLKP_cjs.isInteger(levels) || chunkDVMHRLKP_cjs.isInteger(levels) && levels < 0) {
182
182
  errors.push(
183
- `Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
183
+ `Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
184
184
  levels
185
- )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(levels, {
185
+ )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(levels, {
186
186
  keepUndefined: true
187
187
  })}\`.`
188
188
  );
189
189
  }
190
- if (!chunk7C7TQC5J_cjs.isBoolean(removeDuplicates)) {
190
+ if (!chunkSYHPSOUU_cjs.isBoolean(removeDuplicates)) {
191
191
  errors.push(
192
- `Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
192
+ `Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
193
193
  removeDuplicates
194
194
  )}\`.`
195
195
  );
196
196
  }
197
- if (chunk7C7TQC5J_cjs.isNonEmptyArray(errors)) {
197
+ if (chunkSYHPSOUU_cjs.isNonEmptyArray(errors)) {
198
198
  throw new TypeError(
199
199
  `Invalid parameter(s) in \`getPrefixPathname\` function:
200
200
  - ${errors.join("\n- ")}`
201
201
  );
202
202
  }
203
203
  function getLevel(singleUrl) {
204
- const parts = chunkOCTHWEZK_cjs.normalizePathname(singleUrl).split("/").filter(Boolean);
204
+ const parts = chunkHYN6FC5A_cjs.normalizePathname(singleUrl).split("/").filter(Boolean);
205
205
  return `/${parts.slice(0, levels).join("/")}`;
206
206
  }
207
207
  function processUrl(singleUrl) {
208
208
  if (base) {
209
- singleUrl = chunkOCTHWEZK_cjs.normalizePathname(singleUrl);
210
- if (chunk7C7TQC5J_cjs.isArray(base)) {
209
+ singleUrl = chunkHYN6FC5A_cjs.normalizePathname(singleUrl);
210
+ if (chunkSYHPSOUU_cjs.isArray(base)) {
211
211
  for (const b of base) {
212
- if (singleUrl.startsWith(chunkOCTHWEZK_cjs.normalizePathname(b))) {
212
+ if (singleUrl.startsWith(chunkHYN6FC5A_cjs.normalizePathname(b))) {
213
213
  return getLevel(singleUrl);
214
214
  }
215
215
  }
216
- } else if (chunk7C7TQC5J_cjs.isNonEmptyString(base) && singleUrl.startsWith(chunkOCTHWEZK_cjs.normalizePathname(base))) {
216
+ } else if (chunkSYHPSOUU_cjs.isNonEmptyString(base) && singleUrl.startsWith(chunkHYN6FC5A_cjs.normalizePathname(base))) {
217
217
  return getLevel(singleUrl);
218
218
  }
219
219
  return null;
220
220
  }
221
221
  return getLevel(singleUrl);
222
222
  }
223
- if (chunk7C7TQC5J_cjs.isArray(url)) {
224
- const result = url.map(processUrl).filter((r) => !chunk7C7TQC5J_cjs.isNull(r));
223
+ if (chunkSYHPSOUU_cjs.isArray(url)) {
224
+ const result = url.map(processUrl).filter((r) => !chunkSYHPSOUU_cjs.isNull(r));
225
225
  const uniqueResult = removeDuplicates ? [...new Set(result)] : result;
226
226
  if (uniqueResult.length === 1) {
227
227
  return uniqueResult[0];
@@ -2,14 +2,14 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.10.0.
5
+ * Version: 3.11.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
10
  import { isInteger } from './chunk-WVSPXFTY.js';
11
- import { safeStableStringify } from './chunk-X6ULJZ3X.js';
12
- import { getPreciseType, isNull } from './chunk-J4TT33ZX.js';
11
+ import { safeStableStringify } from './chunk-AXDYWO67.js';
12
+ import { getPreciseType, isNull } from './chunk-MSUW5VHZ.js';
13
13
 
14
14
  var CustomPromise = class extends Promise {
15
15
  _value;