@rzl-zone/utils-js 3.11.1 → 3.12.1-beta.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 (286) hide show
  1. package/{LICENSE.md → LICENSE} +3 -3
  2. package/README.md +62 -89
  3. package/dist/.references/index.d.cts +25 -0
  4. package/dist/.references/index.d.ts +25 -0
  5. package/dist/assertIsArray-BChqwPiP.cjs +26 -0
  6. package/dist/assertIsArray-BChqwPiP.cjs.map +1 -0
  7. package/dist/assertIsArray-BfAbIUfa.js +20 -0
  8. package/dist/assertIsArray-BfAbIUfa.js.map +1 -0
  9. package/dist/assertIsBoolean-BlBct0Fc.js +1073 -0
  10. package/dist/assertIsBoolean-BlBct0Fc.js.map +1 -0
  11. package/dist/assertIsBoolean-DozdtbNi.cjs +1283 -0
  12. package/dist/assertIsBoolean-DozdtbNi.cjs.map +1 -0
  13. package/dist/assertIsString-Bvk7bUL7.cjs +26 -0
  14. package/dist/assertIsString-Bvk7bUL7.cjs.map +1 -0
  15. package/dist/assertIsString-DqV9NwbI.js +20 -0
  16. package/dist/assertIsString-DqV9NwbI.js.map +1 -0
  17. package/dist/assertions/index.cjs +37 -40
  18. package/dist/assertions/index.cjs.map +1 -0
  19. package/dist/assertions/index.d.cts +12 -0
  20. package/dist/assertions/index.d.ts +10 -824
  21. package/dist/assertions/index.js +30 -13
  22. package/dist/assertions/index.js.map +1 -0
  23. package/dist/conversions/index.cjs +34 -103
  24. package/dist/conversions/index.d.cts +12 -0
  25. package/dist/conversions/index.d.ts +10 -1791
  26. package/dist/conversions/index.js +14 -24
  27. package/dist/conversions-CBs8-REq.cjs +448 -0
  28. package/dist/conversions-CBs8-REq.cjs.map +1 -0
  29. package/dist/conversions-EMJa3g-D.js +382 -0
  30. package/dist/conversions-EMJa3g-D.js.map +1 -0
  31. package/dist/events/index.cjs +55 -31
  32. package/dist/events/index.cjs.map +1 -0
  33. package/dist/events/index.d.cts +174 -0
  34. package/dist/events/index.d.ts +31 -35
  35. package/dist/events/index.js +50 -12
  36. package/dist/events/index.js.map +1 -0
  37. package/dist/formatEnvPort-DpIXzPAZ.js +159 -0
  38. package/dist/formatEnvPort-DpIXzPAZ.js.map +1 -0
  39. package/dist/formatEnvPort-hHNvOim-.cjs +171 -0
  40. package/dist/formatEnvPort-hHNvOim-.cjs.map +1 -0
  41. package/dist/formatters/index.cjs +21 -61
  42. package/dist/formatters/index.d.cts +12 -0
  43. package/dist/formatters/index.d.ts +10 -2152
  44. package/dist/formatters/index.js +10 -18
  45. package/dist/formatters-QcZO_Cpx.js +367 -0
  46. package/dist/formatters-QcZO_Cpx.js.map +1 -0
  47. package/dist/formatters-lAYgA11L.cjs +427 -0
  48. package/dist/formatters-lAYgA11L.cjs.map +1 -0
  49. package/dist/generators/index.cjs +161 -41
  50. package/dist/generators/index.cjs.map +1 -0
  51. package/dist/generators/index.d.cts +12 -0
  52. package/dist/generators/index.d.ts +10 -338
  53. package/dist/generators/index.js +154 -14
  54. package/dist/generators/index.js.map +1 -0
  55. package/dist/index-26W7ItWx.d.ts +760 -0
  56. package/dist/index-BPPQjAfs.d.cts +2359 -0
  57. package/dist/index-BXjlgBLz.d.cts +2139 -0
  58. package/dist/index-B_Wwo91H.d.ts +2359 -0
  59. package/dist/index-CpufydcI.d.cts +704 -0
  60. package/dist/index-Czc4O526.d.ts +333 -0
  61. package/dist/index-DPs1_p5G.d.cts +760 -0
  62. package/dist/index-DRpOyBSC.d.ts +1703 -0
  63. package/dist/index-DWWvtHUn.d.cts +822 -0
  64. package/dist/index-DnM0LD0n.d.cts +333 -0
  65. package/dist/index-GUZ9fK6T.d.ts +2139 -0
  66. package/dist/index-I4fAzwXV.d.ts +704 -0
  67. package/dist/index-JDrOl_19.d.ts +822 -0
  68. package/dist/index-b66P49Qe.d.cts +1703 -0
  69. package/dist/isBigInt-B1cijjqm.cjs +20 -0
  70. package/dist/isBigInt-B1cijjqm.cjs.map +1 -0
  71. package/dist/isBigInt-C0bN0Rhu.js +14 -0
  72. package/dist/isBigInt-C0bN0Rhu.js.map +1 -0
  73. package/dist/isEmptyObject-DI42NEo0.cjs +37 -0
  74. package/dist/isEmptyObject-DI42NEo0.cjs.map +1 -0
  75. package/dist/isEmptyObject-DeLVIJpl.js +25 -0
  76. package/dist/isEmptyObject-DeLVIJpl.js.map +1 -0
  77. package/dist/isEmptyString-BTUWYTbw.js +15 -0
  78. package/dist/isEmptyString-BTUWYTbw.js.map +1 -0
  79. package/dist/isEmptyString-CCK3bP74.cjs +21 -0
  80. package/dist/isEmptyString-CCK3bP74.cjs.map +1 -0
  81. package/dist/isEmptyValue-DMSMFTU8.cjs +30 -0
  82. package/dist/isEmptyValue-DMSMFTU8.cjs.map +1 -0
  83. package/dist/isEmptyValue-fjnfQnt5.js +24 -0
  84. package/dist/isEmptyValue-fjnfQnt5.js.map +1 -0
  85. package/dist/isEqual-B1fRgEuU.cjs +111 -0
  86. package/dist/isEqual-B1fRgEuU.cjs.map +1 -0
  87. package/dist/isEqual-DhyP8fB_.js +87 -0
  88. package/dist/isEqual-DhyP8fB_.js.map +1 -0
  89. package/dist/isFinite-BYMOo0os.js +15 -0
  90. package/dist/isFinite-BYMOo0os.js.map +1 -0
  91. package/dist/isFinite-sFkps2TY.cjs +21 -0
  92. package/dist/isFinite-sFkps2TY.cjs.map +1 -0
  93. package/dist/isInteger-DS9V7l_f.js +14 -0
  94. package/dist/isInteger-DS9V7l_f.js.map +1 -0
  95. package/dist/isInteger-FTCthMre.cjs +20 -0
  96. package/dist/isInteger-FTCthMre.cjs.map +1 -0
  97. package/dist/isPlainObject-DcFGh3_5.d.ts +530 -0
  98. package/dist/isPlainObject-doTI11Ib.d.cts +530 -0
  99. package/dist/isServer-D1TXfOs3.js +14 -0
  100. package/dist/isServer-D1TXfOs3.js.map +1 -0
  101. package/dist/isServer-q-QLFCqE.cjs +20 -0
  102. package/dist/isServer-q-QLFCqE.cjs.map +1 -0
  103. package/dist/isTypedArray-47R0wdrc.js +31 -0
  104. package/dist/isTypedArray-47R0wdrc.js.map +1 -0
  105. package/dist/isTypedArray-DiCoqffZ.cjs +43 -0
  106. package/dist/isTypedArray-DiCoqffZ.cjs.map +1 -0
  107. package/dist/isURL-CQiowFq2.js +14 -0
  108. package/dist/isURL-CQiowFq2.js.map +1 -0
  109. package/dist/isURL-WZypXsax.cjs +20 -0
  110. package/dist/isURL-WZypXsax.cjs.map +1 -0
  111. package/dist/isValidDomain-BSXshgkC.cjs +1788 -0
  112. package/dist/isValidDomain-BSXshgkC.cjs.map +1 -0
  113. package/dist/isValidDomain-DwA2EN79.js +1782 -0
  114. package/dist/isValidDomain-DwA2EN79.js.map +1 -0
  115. package/dist/next/index.cjs +119 -212
  116. package/dist/next/index.cjs.map +1 -0
  117. package/dist/next/index.d.cts +226 -0
  118. package/dist/next/index.d.ts +26 -31
  119. package/dist/next/index.js +117 -210
  120. package/dist/next/index.js.map +1 -0
  121. package/dist/next/server/index.cjs +25 -40
  122. package/dist/next/server/index.cjs.map +1 -0
  123. package/dist/next/server/index.d.cts +39 -0
  124. package/dist/next/server/index.d.ts +9 -10
  125. package/dist/next/server/index.js +23 -38
  126. package/dist/next/server/index.js.map +1 -0
  127. package/dist/noop-B2mTBhW-.cjs +18 -0
  128. package/dist/noop-B2mTBhW-.cjs.map +1 -0
  129. package/dist/noop-BzktGBVz.js +12 -0
  130. package/dist/noop-BzktGBVz.js.map +1 -0
  131. package/dist/normalizeSpaces-DQHR3Tlr.cjs +29 -0
  132. package/dist/normalizeSpaces-DQHR3Tlr.cjs.map +1 -0
  133. package/dist/normalizeSpaces-WS_iERJk.js +23 -0
  134. package/dist/normalizeSpaces-WS_iERJk.js.map +1 -0
  135. package/dist/normalizeString-2WLth_Gj.js +15 -0
  136. package/dist/normalizeString-2WLth_Gj.js.map +1 -0
  137. package/dist/normalizeString-D8euBcRD.cjs +21 -0
  138. package/dist/normalizeString-D8euBcRD.cjs.map +1 -0
  139. package/dist/operations/index.cjs +65 -32
  140. package/dist/operations/index.cjs.map +1 -0
  141. package/dist/operations/index.d.cts +139 -0
  142. package/dist/operations/index.d.ts +10 -15
  143. package/dist/operations/index.js +61 -17
  144. package/dist/operations/index.js.map +1 -0
  145. package/dist/parsers/index.cjs +12 -19
  146. package/dist/parsers/index.d.cts +239 -0
  147. package/dist/parsers/index.d.ts +71 -72
  148. package/dist/parsers/index.js +10 -12
  149. package/dist/parsers-DXtpsDyj.cjs +649 -0
  150. package/dist/parsers-DXtpsDyj.cjs.map +1 -0
  151. package/dist/parsers-Dpuq-V4u.js +643 -0
  152. package/dist/parsers-Dpuq-V4u.js.map +1 -0
  153. package/dist/parsing-B43x1sxn.js +50 -0
  154. package/dist/parsing-B43x1sxn.js.map +1 -0
  155. package/dist/parsing-lRoxn1Nz.cjs +56 -0
  156. package/dist/parsing-lRoxn1Nz.cjs.map +1 -0
  157. package/dist/predicates/index.cjs +91 -296
  158. package/dist/predicates/index.d.cts +13 -0
  159. package/dist/predicates/index.d.ts +12 -2482
  160. package/dist/predicates/index.js +23 -25
  161. package/dist/predicates-DiaYA7Ps.cjs +413 -0
  162. package/dist/predicates-DiaYA7Ps.cjs.map +1 -0
  163. package/dist/predicates-gNepszvo.js +257 -0
  164. package/dist/predicates-gNepszvo.js.map +1 -0
  165. package/dist/promises/index.cjs +76 -24
  166. package/dist/promises/index.cjs.map +1 -0
  167. package/dist/promises/index.d.cts +123 -0
  168. package/dist/promises/index.d.ts +28 -31
  169. package/dist/promises/index.js +73 -13
  170. package/dist/promises/index.js.map +1 -0
  171. package/dist/punyCode-CTWXVVFo.cjs +185 -0
  172. package/dist/punyCode-CTWXVVFo.cjs.map +1 -0
  173. package/dist/punyCode-hmiFzLWT.js +179 -0
  174. package/dist/punyCode-hmiFzLWT.js.map +1 -0
  175. package/dist/removeSpaces-BE8lfh-4.js +19 -0
  176. package/dist/removeSpaces-BE8lfh-4.js.map +1 -0
  177. package/dist/removeSpaces-DRRxNWlb.cjs +25 -0
  178. package/dist/removeSpaces-DRRxNWlb.cjs.map +1 -0
  179. package/dist/safeJsonParse-BBnQElk8.cjs +208 -0
  180. package/dist/safeJsonParse-BBnQElk8.cjs.map +1 -0
  181. package/dist/safeJsonParse-CXruaP0p.js +184 -0
  182. package/dist/safeJsonParse-CXruaP0p.js.map +1 -0
  183. package/dist/safeStableStringify-BNh3D0K0.js +88 -0
  184. package/dist/safeStableStringify-BNh3D0K0.js.map +1 -0
  185. package/dist/safeStableStringify-Cc62pfRp.cjs +106 -0
  186. package/dist/safeStableStringify-Cc62pfRp.cjs.map +1 -0
  187. package/dist/strings/index.cjs +76 -81
  188. package/dist/strings/index.cjs.map +1 -0
  189. package/dist/strings/index.d.cts +12 -0
  190. package/dist/strings/index.d.ts +10 -775
  191. package/dist/strings/index.js +59 -14
  192. package/dist/strings/index.js.map +1 -0
  193. package/dist/tailwind/index.cjs +19 -47
  194. package/dist/tailwind/index.d.cts +12 -0
  195. package/dist/tailwind/index.d.ts +11 -712
  196. package/dist/tailwind/index.js +10 -12
  197. package/dist/tailwind-DJ4cmLUw.cjs +247 -0
  198. package/dist/tailwind-DJ4cmLUw.cjs.map +1 -0
  199. package/dist/tailwind-IJvOdkZp.js +199 -0
  200. package/dist/tailwind-IJvOdkZp.js.map +1 -0
  201. package/dist/toStringArrayUnRecursive-CFs0jTEg.js +39 -0
  202. package/dist/toStringArrayUnRecursive-CFs0jTEg.js.map +1 -0
  203. package/dist/toStringArrayUnRecursive-xUaU8Ot9.cjs +51 -0
  204. package/dist/toStringArrayUnRecursive-xUaU8Ot9.cjs.map +1 -0
  205. package/dist/urls/index.cjs +129 -57
  206. package/dist/urls/index.cjs.map +1 -0
  207. package/dist/urls/index.d.cts +740 -0
  208. package/dist/urls/index.d.ts +218 -224
  209. package/dist/urls/index.js +121 -26
  210. package/dist/urls/index.js.map +1 -0
  211. package/package.json +203 -194
  212. package/dist/chunk-22V4WP3H.js +0 -53
  213. package/dist/chunk-2XSZ2ANI.js +0 -63
  214. package/dist/chunk-3T6VSWYX.js +0 -21
  215. package/dist/chunk-5WIEDF2J.js +0 -1823
  216. package/dist/chunk-6EDFZJZ5.cjs +0 -598
  217. package/dist/chunk-6LXWT2I5.js +0 -32
  218. package/dist/chunk-6YGBRENU.js +0 -209
  219. package/dist/chunk-7FGNVDEV.cjs +0 -38
  220. package/dist/chunk-AXDYWO67.js +0 -119
  221. package/dist/chunk-B6PMNZ4M.cjs +0 -35
  222. package/dist/chunk-BAV5T2E3.cjs +0 -15
  223. package/dist/chunk-BLF7SD66.js +0 -95
  224. package/dist/chunk-BMZZXZJ2.cjs +0 -30
  225. package/dist/chunk-BOYP3ARU.js +0 -264
  226. package/dist/chunk-BPYW5YL7.js +0 -16
  227. package/dist/chunk-C2PV3VWC.cjs +0 -118
  228. package/dist/chunk-CCJ2MSN7.js +0 -16
  229. package/dist/chunk-DAPAK2W3.cjs +0 -123
  230. package/dist/chunk-DLS3G6WQ.cjs +0 -23
  231. package/dist/chunk-DNMCR5JH.js +0 -370
  232. package/dist/chunk-DVMHRLKP.cjs +0 -16
  233. package/dist/chunk-EBYFYZW4.cjs +0 -26
  234. package/dist/chunk-ENMRZ4BE.js +0 -302
  235. package/dist/chunk-FJ4BQFVO.js +0 -587
  236. package/dist/chunk-GIKL4PUF.cjs +0 -106
  237. package/dist/chunk-GOFINGT6.js +0 -35
  238. package/dist/chunk-GXKQ3LHF.js +0 -101
  239. package/dist/chunk-HNBRGN4R.js +0 -24
  240. package/dist/chunk-HYN6FC5A.cjs +0 -249
  241. package/dist/chunk-IZGVBYFN.js +0 -242
  242. package/dist/chunk-JIE447J5.js +0 -676
  243. package/dist/chunk-JXEIJM5M.cjs +0 -237
  244. package/dist/chunk-K47GZDBH.js +0 -115
  245. package/dist/chunk-K5536YHG.cjs +0 -269
  246. package/dist/chunk-KHO2SBNA.cjs +0 -16
  247. package/dist/chunk-KXJ7X325.cjs +0 -308
  248. package/dist/chunk-L5RDAVVH.js +0 -14
  249. package/dist/chunk-LJHPTLWB.js +0 -109
  250. package/dist/chunk-M7ELWZXM.cjs +0 -1825
  251. package/dist/chunk-MSUW5VHZ.js +0 -1590
  252. package/dist/chunk-MUHRPRR7.cjs +0 -65
  253. package/dist/chunk-MV3TSQSH.cjs +0 -397
  254. package/dist/chunk-NLZLXWAU.cjs +0 -678
  255. package/dist/chunk-NVRZPF5M.cjs +0 -18
  256. package/dist/chunk-ONZFBJVW.js +0 -14
  257. package/dist/chunk-PGNL7JXO.cjs +0 -251
  258. package/dist/chunk-Q4GEQS7X.cjs +0 -564
  259. package/dist/chunk-QNKGP5DY.js +0 -14
  260. package/dist/chunk-QYI2VJLS.cjs +0 -211
  261. package/dist/chunk-RBWZII5I.js +0 -59
  262. package/dist/chunk-RMP7VMPB.cjs +0 -33
  263. package/dist/chunk-RZOGBYIS.js +0 -21
  264. package/dist/chunk-SU3UELUB.cjs +0 -36
  265. package/dist/chunk-SYHPSOUU.cjs +0 -1626
  266. package/dist/chunk-SZUNAEMR.js +0 -246
  267. package/dist/chunk-TER22LO4.cjs +0 -64
  268. package/dist/chunk-TJHGRQ4P.js +0 -33
  269. package/dist/chunk-U23I7JPB.cjs +0 -56
  270. package/dist/chunk-U7HHN47R.js +0 -552
  271. package/dist/chunk-UDA26MCU.cjs +0 -16
  272. package/dist/chunk-UIAWUZ4H.js +0 -31
  273. package/dist/chunk-ULQPCIA2.js +0 -16
  274. package/dist/chunk-VJDDGRIK.cjs +0 -16
  275. package/dist/chunk-WETQI6HM.js +0 -232
  276. package/dist/chunk-WLOQQFDS.cjs +0 -18
  277. package/dist/chunk-WVSPXFTY.js +0 -14
  278. package/dist/chunk-WXFTVXBF.cjs +0 -23
  279. package/dist/chunk-XPVTIGU2.cjs +0 -113
  280. package/dist/chunk-XX6RUGTM.cjs +0 -18
  281. package/dist/chunk-YWHHVDT4.js +0 -13
  282. package/dist/chunk-ZPDMWDGZ.cjs +0 -101
  283. package/dist/chunk-ZVWZEGQP.js +0 -28
  284. package/dist/index.d.ts +0 -24
  285. package/dist/isPlainObject-0p3VveWr.d.ts +0 -534
  286. package/dist/rzl-utils.global.js +0 -10
@@ -1,35 +0,0 @@
1
- /*!
2
- * ====================================================
3
- * Rzl Utils-JS.
4
- * ----------------------------------------------------
5
- * Version: 3.11.1.
6
- * Author: Rizalvin Dwiky.
7
- * Repository: https://github.com/rzl-zone/utils-js.
8
- * ====================================================
9
- */
10
- import { isArray, isObject, assertIsPlainObject, hasOwnProp, assertIsBoolean } from './chunk-MSUW5VHZ.js';
11
-
12
- var isEmptyArray = (value) => {
13
- if (!isArray(value)) return true;
14
- return value.length === 0;
15
- };
16
-
17
- function isEmptyObject(value, options = {}) {
18
- if (!isObject(value)) {
19
- return true;
20
- }
21
- assertIsPlainObject(options, {
22
- message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
23
- });
24
- const checkSymbols = hasOwnProp(options, "checkSymbols") ? options.checkSymbols : false;
25
- assertIsBoolean(checkSymbols, {
26
- message: ({ currentType, validType }) => `Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
27
- });
28
- const hasNoKeys = Object.keys(value).length === 0;
29
- if (checkSymbols) {
30
- return hasNoKeys && Object.getOwnPropertySymbols(value).length === 0;
31
- }
32
- return hasNoKeys;
33
- }
34
-
35
- export { isEmptyArray, isEmptyObject };
@@ -1,101 +0,0 @@
1
- /*!
2
- * ====================================================
3
- * Rzl Utils-JS.
4
- * ----------------------------------------------------
5
- * Version: 3.11.1.
6
- * Author: Rizalvin Dwiky.
7
- * Repository: https://github.com/rzl-zone/utils-js.
8
- * ====================================================
9
- */
10
- import { isDate, isMap } from './chunk-AXDYWO67.js';
11
- import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-MSUW5VHZ.js';
12
-
13
- var isRegExp = (value) => {
14
- return value instanceof RegExp;
15
- };
16
-
17
- function isArrayBuffer(value) {
18
- return value instanceof ArrayBuffer;
19
- }
20
-
21
- function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new WeakMap()) {
22
- if (value === other) return true;
23
- if (value !== value && other !== other) return true;
24
- if (!isObjectOrArray(value) || !isObjectOrArray(other)) {
25
- return false;
26
- }
27
- if (seen.get(value) === other) return true;
28
- seen.set(value, other);
29
- const callCustomizer = (v, o, key, valObj, othObj) => {
30
- if (customizer) {
31
- const result = customizer(v, o, key, valObj, othObj, seen);
32
- if (!isUndefined(result)) return result;
33
- }
34
- return baseDeepEqual(v, o, customizer, seen);
35
- };
36
- if (isDate(value) && isDate(other)) return value.getTime() === other.getTime();
37
- if (isRegExp(value) && isRegExp(other))
38
- return value.source === other.source && value.flags === other.flags;
39
- if (isError(value) && isError(other))
40
- return value.name === other.name && value.message === other.message;
41
- if (ArrayBuffer.isView(value) && ArrayBuffer.isView(other)) {
42
- const v = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
43
- const o = new Uint8Array(other.buffer, other.byteOffset, other.byteLength);
44
- if (v.length !== o.length) return false;
45
- for (let i = 0; i < v.length; i++) if (v[i] !== o[i]) return false;
46
- return true;
47
- }
48
- if (isArrayBuffer(value) && isArrayBuffer(other)) {
49
- if (value.byteLength !== other.byteLength) return false;
50
- const v = new Uint8Array(value), o = new Uint8Array(other);
51
- for (let i = 0; i < v.length; i++) if (v[i] !== o[i]) return false;
52
- return true;
53
- }
54
- if (isMap(value) && isMap(other)) {
55
- if (value.size !== other.size) return false;
56
- for (const [k, v] of value) {
57
- if (!other.has(k)) return false;
58
- if (!baseDeepEqual(v, other.get(k), customizer, seen)) return false;
59
- }
60
- return true;
61
- }
62
- if (isSet(value) && isSet(other)) {
63
- if (value.size !== other.size) return false;
64
- for (const v of value) {
65
- let matched = false;
66
- for (const o of other) {
67
- if (baseDeepEqual(v, o, customizer, seen)) {
68
- matched = true;
69
- break;
70
- }
71
- }
72
- if (!matched) return false;
73
- }
74
- return true;
75
- }
76
- if (isArray(value) && isArray(other)) {
77
- if (value.length !== other.length) return false;
78
- for (let i = 0; i < value.length; i++) {
79
- if (!callCustomizer(value[i], other[i], i, value, other)) return false;
80
- }
81
- return true;
82
- }
83
- if (Object.getPrototypeOf(value) !== Object.getPrototypeOf(other)) {
84
- return false;
85
- }
86
- const vKeys = Reflect.ownKeys(value);
87
- const oKeys = Reflect.ownKeys(other);
88
- if (vKeys.length !== oKeys.length) return false;
89
- for (const key of vKeys) {
90
- const vVal = value[key];
91
- const oVal = other[key];
92
- if (!callCustomizer(vVal, oVal, key, value, other)) return false;
93
- }
94
- return true;
95
- }
96
-
97
- function isEqual(value, other) {
98
- return baseDeepEqual(value, other, void 0, /* @__PURE__ */ new WeakMap());
99
- }
100
-
101
- export { baseDeepEqual, isArrayBuffer, isEqual, isRegExp };
@@ -1,24 +0,0 @@
1
- /*!
2
- * ====================================================
3
- * Rzl Utils-JS.
4
- * ----------------------------------------------------
5
- * Version: 3.11.1.
6
- * Author: Rizalvin Dwiky.
7
- * Repository: https://github.com/rzl-zone/utils-js.
8
- * ====================================================
9
- */
10
- import { isNonEmptyString, isPlainObject } from './chunk-MSUW5VHZ.js';
11
-
12
- var removeSpaces = (value, options = {
13
- trimOnly: false
14
- }) => {
15
- if (!isNonEmptyString(value)) return "";
16
- if (!isPlainObject(options)) {
17
- options = {};
18
- }
19
- const { trimOnly = false } = options;
20
- if (trimOnly) return value.trim();
21
- return value.replace(/\s+/g, "");
22
- };
23
-
24
- export { removeSpaces };
@@ -1,249 +0,0 @@
1
- /*!
2
- * ====================================================
3
- * Rzl Utils-JS.
4
- * ----------------------------------------------------
5
- * Version: 3.11.1.
6
- * Author: Rizalvin Dwiky.
7
- * Repository: https://github.com/rzl-zone/utils-js.
8
- * ====================================================
9
- */
10
- 'use strict';
11
-
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
-
18
- var NormalizePathnameError = class _NormalizePathnameError extends Error {
19
- /** * ***The original error that triggered this normalization failure.***
20
- *
21
- * **Always available for backward compatibility.**
22
- */
23
- originalError;
24
- constructor(message, originalError) {
25
- super(message, chunkSYHPSOUU_cjs.isFunction(Error) ? { cause: originalError } : void 0);
26
- this.name = "NormalizePathnameError";
27
- this.originalError = originalError;
28
- if (chunkSYHPSOUU_cjs.isFunction(Error.captureStackTrace)) {
29
- Error.captureStackTrace(this, _NormalizePathnameError);
30
- } else {
31
- this.stack = new Error(message).stack;
32
- }
33
- }
34
- /** * ***Safe JSON representation for logging or IPC.*** */
35
- toJSON() {
36
- return {
37
- name: this.name,
38
- message: this.message,
39
- stack: this.stack,
40
- originalError: {
41
- name: this.originalError.name,
42
- message: this.originalError.message,
43
- stack: this.originalError.stack
44
- }
45
- };
46
- }
47
- };
48
-
49
- function normalizePathname(pathname, options = {
50
- defaultPath: "/",
51
- keepNullable: false
52
- }) {
53
- chunkSYHPSOUU_cjs.assertIsPlainObject(options, {
54
- message({ currentType, validType }) {
55
- return `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
56
- }
57
- });
58
- const {
59
- defaultPath = "/",
60
- keepNullable = false,
61
- keepTrailingSlash = false,
62
- localhostDomain = false,
63
- ignoreDomainExtensions = void 0
64
- } = options;
65
- if (!chunkSYHPSOUU_cjs.isNonEmptyString(defaultPath)) {
66
- throw new TypeError(
67
- `Parameter \`defaultPath\` property of the \`options\` (second parameter) must be of type \`string\` and not empty-string, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
68
- defaultPath
69
- )}\`, with value: \`${chunkDAPAK2W3_cjs.safeStableStringify(defaultPath, {
70
- keepUndefined: true
71
- })}\`.`
72
- );
73
- }
74
- chunkSYHPSOUU_cjs.assertIsBoolean(keepNullable, {
75
- message({ currentType, validType }) {
76
- return `Parameter \`keepNullable\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
77
- }
78
- });
79
- chunkSYHPSOUU_cjs.assertIsBoolean(keepTrailingSlash, {
80
- message({ currentType, validType }) {
81
- return `Parameter \`keepTrailingSlash\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
82
- }
83
- });
84
- chunkSYHPSOUU_cjs.assertIsBoolean(localhostDomain, {
85
- message({ currentType, validType }) {
86
- return `Parameter \`localhostDomain\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
87
- }
88
- });
89
- let ignoreDomainExtsSet;
90
- if (!chunkSYHPSOUU_cjs.isUndefined(ignoreDomainExtensions)) {
91
- if (!chunkSYHPSOUU_cjs.isSet(ignoreDomainExtensions) && !chunkSYHPSOUU_cjs.isArray(ignoreDomainExtensions)) {
92
- throw new TypeError(
93
- `Parameter \`ignoreDomainExtensions\` must be of type a \`Set<string>\` or \`string[]\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
94
- ignoreDomainExtensions
95
- )}\`.`
96
- );
97
- }
98
- ignoreDomainExtsSet = chunkSYHPSOUU_cjs.isSet(ignoreDomainExtensions) ? ignoreDomainExtensions : new Set(ignoreDomainExtensions);
99
- let idx = 0;
100
- for (const ext of ignoreDomainExtsSet) {
101
- if (!chunkSYHPSOUU_cjs.isNonEmptyString(ext)) {
102
- throw new TypeError(
103
- `Parameter \`ignoreDomainExtensions[${idx}]\` must be a \`string\` and \`non-empty string\`, but received: \`${chunkDAPAK2W3_cjs.safeStableStringify(
104
- ext,
105
- { keepUndefined: true }
106
- )}\`.`
107
- );
108
- }
109
- if (!ext.startsWith(".")) {
110
- throw new TypeError(
111
- `Parameter \`ignoreDomainExtensions[${idx}]\` must start with a dot (.), but received: ${chunkDAPAK2W3_cjs.safeStableStringify(
112
- ext,
113
- { keepUndefined: true }
114
- )}`
115
- );
116
- }
117
- idx++;
118
- }
119
- }
120
- try {
121
- if (keepNullable && (chunkSYHPSOUU_cjs.isNil(pathname) || !chunkSYHPSOUU_cjs.isString(pathname))) {
122
- if (chunkSYHPSOUU_cjs.isNull(pathname)) return null;
123
- return void 0;
124
- }
125
- let currentPathName = chunkSYHPSOUU_cjs.isNonEmptyString(pathname) ? pathname : defaultPath;
126
- currentPathName = chunkEBYFYZW4_cjs.removeSpaces(currentPathName, { trimOnly: true }).replace(
127
- /\s+/g,
128
- ""
129
- );
130
- currentPathName = stripLeadingDomain(currentPathName, {
131
- keepTrailingSlash,
132
- localhostDomain,
133
- ignoreDomainExtensions: ignoreDomainExtsSet
134
- });
135
- let _pathName = currentPathName;
136
- let search = "";
137
- let hash = "";
138
- const searchIndex = currentPathName.indexOf("?");
139
- const hashIndex = currentPathName.indexOf("#");
140
- if (searchIndex !== -1) {
141
- search = currentPathName.slice(
142
- searchIndex,
143
- hashIndex !== -1 ? hashIndex : void 0
144
- );
145
- }
146
- if (hashIndex !== -1) {
147
- hash = currentPathName.slice(hashIndex);
148
- }
149
- const endIndex = Math.min(
150
- searchIndex !== -1 ? searchIndex : currentPathName.length,
151
- hashIndex !== -1 ? hashIndex : currentPathName.length
152
- );
153
- _pathName = currentPathName.slice(0, endIndex);
154
- _pathName = "/" + _pathName.replace(/^\/+/, "").replace(/\/{2,}/g, "/");
155
- if (!keepTrailingSlash && _pathName !== "/") {
156
- _pathName = _pathName.replace(/\/+$/, "");
157
- }
158
- _pathName = decodeUnicodeSequences(_pathName);
159
- search = decodeUnicodeSequences(search);
160
- hash = decodeUnicodeSequences(hash);
161
- return _pathName + search + hash;
162
- } catch (error) {
163
- throwError(error);
164
- }
165
- }
166
- var decodeUnicodeSequences = (str) => {
167
- return str.replace(/(?:%(?:[0-9A-F]{2})){2,}/gi, (match) => {
168
- try {
169
- const decoded = decodeURIComponent(match);
170
- if (/^[\u0000-\u007F]+$/.test(decoded)) return match;
171
- return decoded;
172
- } catch {
173
- return match;
174
- }
175
- });
176
- };
177
- var stripLeadingDomain = (path, options) => {
178
- let currentPath = path;
179
- const { ignoreDomainExtensions, localhostDomain } = options;
180
- if (/^https?:\/\//i.test(currentPath)) {
181
- try {
182
- const url = new URL(currentPath);
183
- currentPath = url.pathname.replace(/^\/+/, "").replace(/\/{2,}/g, "/") + url.search + url.hash;
184
- return ensureLeadingSlash(currentPath);
185
- } catch (error) {
186
- throwError(error);
187
- }
188
- }
189
- if (currentPath.startsWith("/")) {
190
- currentPath = currentPath.replace(/\/{2,}/g, "/").slice(1);
191
- }
192
- const segments = currentPath.split("/");
193
- const firstPart = segments[0];
194
- const domainPart = firstPart.split(":")[0];
195
- const isDomain = chunkM7ELWZXM_cjs.isValidDomain(domainPart, {
196
- subdomain: true,
197
- allowUnicode: true,
198
- wildcard: true,
199
- allowLocalhost: localhostDomain,
200
- allowPort: true,
201
- allowProtocol: true,
202
- topLevel: false
203
- });
204
- let hasIgnoredExtension = false;
205
- if (ignoreDomainExtensions) {
206
- for (const ext of ignoreDomainExtensions) {
207
- if (firstPart.endsWith(ext)) {
208
- hasIgnoredExtension = true;
209
- break;
210
- }
211
- }
212
- }
213
- if (isDomain && !hasIgnoredExtension) {
214
- segments.shift();
215
- }
216
- return ensureLeadingSlash(segments.join("/"));
217
- };
218
- var ensureLeadingSlash = (path) => {
219
- if (!path.startsWith("/")) path = "/" + path;
220
- return path;
221
- };
222
- var throwError = (error) => {
223
- const err = chunkSYHPSOUU_cjs.isError(error) ? error : new Error("Unknown error from function `normalizePathname()`.");
224
- throw new NormalizePathnameError(
225
- `Failed to normalize pathname in function \`normalizePathname()\`: ${err.message}`,
226
- err
227
- );
228
- };
229
-
230
- var formatEnvPort = (envVar, options = {}) => {
231
- if (!chunkSYHPSOUU_cjs.isNonEmptyString(envVar)) return "";
232
- chunkSYHPSOUU_cjs.assertIsPlainObject(options, {
233
- message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
234
- });
235
- const prefixColon = chunkSYHPSOUU_cjs.hasOwnProp(options, "prefixColon") ? options.prefixColon : false;
236
- if (!chunkSYHPSOUU_cjs.isBoolean(prefixColon)) {
237
- throw new TypeError(
238
- `Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${chunkSYHPSOUU_cjs.getPreciseType(
239
- prefixColon
240
- )}\`.`
241
- );
242
- }
243
- const digitsOnly = envVar.replace(/\D+/g, "");
244
- if (chunkWLOQQFDS_cjs.isEmptyString(digitsOnly)) return "";
245
- return prefixColon ? `:${digitsOnly}` : digitsOnly;
246
- };
247
-
248
- exports.formatEnvPort = formatEnvPort;
249
- exports.normalizePathname = normalizePathname;
@@ -1,242 +0,0 @@
1
- /*!
2
- * ====================================================
3
- * Rzl Utils-JS.
4
- * ----------------------------------------------------
5
- * Version: 3.11.1.
6
- * Author: Rizalvin Dwiky.
7
- * Repository: https://github.com/rzl-zone/utils-js.
8
- * ====================================================
9
- */
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
- import { getDefaultConfig, extendTailwindMerge } from 'tailwind-merge-v3';
14
- import { getDefaultConfig as getDefaultConfig$1, extendTailwindMerge as extendTailwindMerge$1 } from 'tailwind-merge-v4';
15
-
16
- function toStringValue(value) {
17
- let str = "";
18
- if (isNonEmptyString(value) || isNumber(value)) {
19
- str += value;
20
- } else if (isObjectOrArray(value)) {
21
- if (isStringObject(value) || isNumberObject(value) || isBooleanObject(value)) {
22
- const val = value.valueOf();
23
- if (val) str += val;
24
- } else if (isArray(value)) {
25
- for (const item of value) {
26
- if (!item) continue;
27
- const y = toStringValue(item);
28
- if (!y) continue;
29
- if (str) str += " ";
30
- str += y;
31
- }
32
- } else {
33
- for (const key in value) {
34
- if (!value[key]) continue;
35
- if (str) str += " ";
36
- str += key;
37
- }
38
- }
39
- }
40
- return str;
41
- }
42
- function cx(...values) {
43
- let str = "";
44
- for (const value of values) {
45
- if (!value) continue;
46
- const x = toStringValue(value);
47
- if (!x) continue;
48
- if (str) str += " ";
49
- str += x;
50
- }
51
- return str;
52
- }
53
-
54
- var validatorPropsTwMerge = (options) => {
55
- if (!isPlainObject(options)) options = {};
56
- let { config, prefix, extend, override, cacheSize, experimentalParseClassName } = options;
57
- if (!isPlainObject(config)) config = {};
58
- if (!isPlainObject(extend)) extend = {};
59
- if (!isPlainObject(override)) override = {};
60
- if (!isNumber(cacheSize)) cacheSize = void 0;
61
- if (!isNonEmptyString(prefix)) prefix = void 0;
62
- if (!isFunction(experimentalParseClassName)) experimentalParseClassName = void 0;
63
- const theme = hasOwnProp(extend, "theme") ? extend.theme : {};
64
- const classGroups = hasOwnProp(extend, "classGroups") ? extend.classGroups : {};
65
- const conflictingClassGroupModifiers = hasOwnProp(
66
- extend,
67
- "conflictingClassGroupModifiers"
68
- ) ? extend.conflictingClassGroupModifiers : {};
69
- const conflictingClassGroups = hasOwnProp(extend, "conflictingClassGroups") ? extend.conflictingClassGroups : {};
70
- const orderSensitiveModifiers = hasOwnProp(extend, "orderSensitiveModifiers") && isNonEmptyArray(extend.orderSensitiveModifiers) ? extend.orderSensitiveModifiers : [];
71
- return {
72
- config,
73
- override,
74
- cacheSize,
75
- prefix,
76
- experimentalParseClassName,
77
- theme,
78
- classGroups,
79
- conflictingClassGroupModifiers,
80
- conflictingClassGroups,
81
- orderSensitiveModifiers
82
- };
83
- };
84
-
85
- var defaultConfig = getDefaultConfig();
86
- var twMergeDefaultV3 = (options = {}) => {
87
- if (!isPlainObject(options)) options = {};
88
- const {
89
- cacheSize,
90
- classGroups,
91
- config,
92
- conflictingClassGroupModifiers,
93
- conflictingClassGroups,
94
- override,
95
- prefix,
96
- theme,
97
- experimentalParseClassName
98
- } = validatorPropsTwMerge(options);
99
- return extendTailwindMerge({
100
- prefix: prefix ?? config.prefix,
101
- cacheSize: cacheSize || defaultConfig.cacheSize,
102
- experimentalParseClassName,
103
- override,
104
- extend: {
105
- conflictingClassGroupModifiers: {
106
- ...defaultConfig.conflictingClassGroupModifiers,
107
- ...conflictingClassGroupModifiers
108
- },
109
- theme: { ...defaultConfig.theme, ...theme },
110
- conflictingClassGroups: {
111
- ...defaultConfig.conflictingClassGroups,
112
- ...conflictingClassGroups
113
- },
114
- classGroups: {
115
- ...defaultConfig.classGroups,
116
- ...classGroups,
117
- "text-shadow": ["", "-sm", "-md", "-lg", "-xl", "-xxl", "-none", "-default"].map(
118
- (size) => `text-shadow${size}`
119
- ),
120
- "font-size": Object.keys({
121
- ...config.theme?.fontSize || {},
122
- ...config.theme?.extend?.fontSize || {}
123
- }).map((size) => `text-${size}`)
124
- }
125
- }
126
- });
127
- };
128
- var defaultConfig2 = getDefaultConfig$1();
129
- var twMergeDefaultV4 = (options = {}) => {
130
- if (!isPlainObject(options)) options = {};
131
- const {
132
- cacheSize,
133
- classGroups,
134
- config,
135
- conflictingClassGroupModifiers,
136
- conflictingClassGroups,
137
- orderSensitiveModifiers,
138
- override,
139
- prefix,
140
- theme,
141
- experimentalParseClassName
142
- } = validatorPropsTwMerge(options);
143
- return extendTailwindMerge$1({
144
- prefix: prefix || config.prefix,
145
- cacheSize: cacheSize || defaultConfig2.cacheSize,
146
- experimentalParseClassName,
147
- override,
148
- extend: {
149
- conflictingClassGroupModifiers: {
150
- ...defaultConfig2.conflictingClassGroupModifiers,
151
- ...conflictingClassGroupModifiers
152
- },
153
- theme: { ...defaultConfig2.theme, ...theme },
154
- conflictingClassGroups: {
155
- ...defaultConfig2.conflictingClassGroups,
156
- ...conflictingClassGroups
157
- },
158
- orderSensitiveModifiers: [
159
- ...defaultConfig2.orderSensitiveModifiers,
160
- ...orderSensitiveModifiers
161
- ],
162
- classGroups: {
163
- ...defaultConfig2.classGroups,
164
- ...classGroups,
165
- "text-shadow": ["", "-sm", "-md", "-lg", "-xl", "-xxl", "-none", "-default"].map(
166
- (size) => `text-shadow${size}`
167
- ),
168
- "font-size": Object.keys({
169
- ...config.theme?.fontSize || {},
170
- ...config.theme?.extend?.fontSize || {}
171
- }).map((size) => `text-${size}`)
172
- }
173
- }
174
- });
175
- };
176
-
177
- var defaultTwMergeV3 = twMergeDefaultV3();
178
- var defaultTwMergeV4 = twMergeDefaultV4();
179
- var cnV3 = (...classes) => {
180
- return defaultTwMergeV3(cx(...classes));
181
- };
182
- var cnV4 = (...classes) => {
183
- return defaultTwMergeV4(cx(...classes));
184
- };
185
-
186
- var customCnV3 = (customTwMergeV3, ...classes) => {
187
- if (!isFunction(customTwMergeV3)) {
188
- throw new TypeError(
189
- `first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${getPreciseType(
190
- customTwMergeV3
191
- )}\`.`
192
- );
193
- }
194
- return customTwMergeV3(cx(...classes));
195
- };
196
- var customCnV4 = (customTwMergeV4, ...classes) => {
197
- if (!isFunction(customTwMergeV4)) {
198
- throw new TypeError(
199
- `first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${getPreciseType(
200
- customTwMergeV4
201
- )}\`.`
202
- );
203
- }
204
- return customTwMergeV4(cx(...classes));
205
- };
206
-
207
- var shouldForwardProp = (props) => {
208
- assertIsArray(props, {
209
- message: ({ currentType, validType }) => `First parameter (\`props\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
210
- });
211
- const invalidItems = [];
212
- props.forEach((p, idx) => {
213
- if (!isString(p)) {
214
- invalidItems.push({
215
- index: idx,
216
- reason: `Expected a non-empty string, but received ${getPreciseType(p, {
217
- formatCase: "toPascalCaseSpace"
218
- })}.`
219
- });
220
- } else if (isEmptyString(p)) {
221
- invalidItems.push({
222
- index: idx,
223
- reason: `Expected a non-empty string, but received EmptyString.`
224
- });
225
- }
226
- });
227
- if (isNonEmptyArray(invalidItems)) {
228
- const maxWidth = Math.max(...invalidItems.map((item) => String(item.index).length));
229
- const details = invalidItems.map(
230
- (item) => `\u2022 [Index ${String(item.index).padStart(maxWidth, "0")}] ${item.reason}`
231
- ).join("\n");
232
- throw new TypeError(
233
- `First parameter (\`props\`) contains invalid entries:
234
- ${details}`
235
- );
236
- }
237
- return (propName) => {
238
- return !props.map(String).includes(String(propName));
239
- };
240
- };
241
-
242
- export { cnV3, cnV4, customCnV3, customCnV4, cx, shouldForwardProp, twMergeDefaultV3, twMergeDefaultV4 };