@rzl-zone/utils-js 3.1.1-beta.0 → 3.1.1

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 (170) hide show
  1. package/README.md +56 -27
  2. package/dist/assertions/index.cjs +1 -1
  3. package/dist/assertions/index.js +1 -1
  4. package/dist/chunk-26XIKDJI.cjs +1 -0
  5. package/dist/chunk-2NWHDDM5.js +1 -0
  6. package/dist/chunk-2UIRWYE3.js +1 -0
  7. package/dist/chunk-4VCRMMAH.cjs +1 -0
  8. package/dist/chunk-5C2SMIGX.cjs +1 -0
  9. package/dist/chunk-5I2B5DOG.js +1 -0
  10. package/dist/chunk-5Y52H4VH.cjs +1 -0
  11. package/dist/chunk-7BXIZM57.cjs +1 -0
  12. package/dist/chunk-7H7IODCQ.cjs +1 -0
  13. package/dist/chunk-7KJBDGEP.js +1 -0
  14. package/dist/chunk-7PG6YKIY.cjs +1 -0
  15. package/dist/chunk-7YVINA3U.cjs +1 -0
  16. package/dist/chunk-AXWJJXJC.js +1 -0
  17. package/dist/chunk-CPLBRGST.js +1 -0
  18. package/dist/chunk-DQFU3KLE.cjs +1 -0
  19. package/dist/chunk-DUK2K4FB.js +1 -0
  20. package/dist/chunk-DVMHRLKP.cjs +1 -0
  21. package/dist/chunk-EBMHQW7X.cjs +1 -0
  22. package/dist/chunk-EXWCTDC3.cjs +1 -0
  23. package/dist/chunk-FIAAX3UE.js +1 -0
  24. package/dist/chunk-G2B35D5W.js +1 -0
  25. package/dist/chunk-GLUYWYOA.cjs +1 -0
  26. package/dist/chunk-GRSCNTOK.js +1 -0
  27. package/dist/chunk-I5X5IN4H.js +1 -0
  28. package/dist/chunk-I6NOFGAK.cjs +1 -0
  29. package/dist/chunk-INUFZJLX.cjs +1 -0
  30. package/dist/chunk-IRBPXCMR.js +1 -0
  31. package/dist/chunk-J2RGTPGK.cjs +1 -0
  32. package/dist/chunk-KHO2SBNA.cjs +1 -0
  33. package/dist/chunk-KXIXXSWX.cjs +1 -0
  34. package/dist/chunk-L73TOPX5.js +1 -0
  35. package/dist/chunk-MC3LXMCQ.js +1 -0
  36. package/dist/chunk-MHXVVDRQ.cjs +1 -0
  37. package/dist/chunk-MMSYCIJ2.cjs +1 -1
  38. package/dist/chunk-NHNBV5VS.cjs +1 -0
  39. package/dist/chunk-NXWPZDDX.js +1 -0
  40. package/dist/chunk-ODZQXH7E.cjs +1 -0
  41. package/dist/chunk-ONZFBJVW.js +1 -0
  42. package/dist/chunk-Q6NHYWVX.js +1 -0
  43. package/dist/chunk-QNKGP5DY.js +1 -0
  44. package/dist/chunk-QVRTHAM2.js +1 -0
  45. package/dist/chunk-RF34NETZ.js +1 -0
  46. package/dist/chunk-SAW7XS4K.js +1 -0
  47. package/dist/chunk-TSLYDPBJ.js +1 -0
  48. package/dist/chunk-UDA26MCU.cjs +1 -0
  49. package/dist/chunk-UET567YM.cjs +1 -0
  50. package/dist/chunk-URGK5UQT.js +1 -0
  51. package/dist/chunk-VEYMQ3UA.js +1 -0
  52. package/dist/chunk-W2W3L2M5.js +1 -0
  53. package/dist/chunk-WFPQO7KN.js +1 -0
  54. package/dist/chunk-WVSPXFTY.js +1 -0
  55. package/dist/chunk-WZE3XLKY.cjs +1 -0
  56. package/dist/chunk-X4PD3I5U.js +1 -0
  57. package/dist/chunk-XC2PYCT4.cjs +1 -0
  58. package/dist/chunk-XIXA5KDF.cjs +1 -0
  59. package/dist/chunk-XSFPU3YT.js +1 -0
  60. package/dist/chunk-XVHPXRUH.cjs +1 -0
  61. package/dist/chunk-Y44ZD3GG.js +1 -0
  62. package/dist/chunk-Y4O5KZF6.cjs +1 -0
  63. package/dist/chunk-YT3MSZKK.cjs +1 -0
  64. package/dist/chunk-YZR5OGJA.cjs +1 -0
  65. package/dist/chunk-ZR7GTJQX.cjs +1 -0
  66. package/dist/chunk-ZXIWDFEQ.js +1 -0
  67. package/dist/conversions/index.cjs +1 -1
  68. package/dist/conversions/index.d.ts +175 -40
  69. package/dist/conversions/index.js +1 -1
  70. package/dist/env/index.cjs +1 -1
  71. package/dist/env/index.js +1 -1
  72. package/dist/events/index.cjs +1 -1
  73. package/dist/events/index.js +1 -1
  74. package/dist/formatting/index.cjs +1 -1
  75. package/dist/formatting/index.js +1 -1
  76. package/dist/generator/index.cjs +1 -1
  77. package/dist/generator/index.js +1 -1
  78. package/dist/{is-array--YjXV-Wx.d.ts → is-array-Cymwrsmm.d.ts} +2 -90
  79. package/dist/next/index.cjs +1 -8
  80. package/dist/next/index.js +1 -8
  81. package/dist/next/server/index.cjs +1 -2
  82. package/dist/next/server/index.js +1 -2
  83. package/dist/operations/index.cjs +1 -1
  84. package/dist/operations/index.js +1 -1
  85. package/dist/or-DyZCRvaU.d.ts +89 -0
  86. package/dist/parsers/index.cjs +1 -1
  87. package/dist/parsers/index.js +1 -1
  88. package/dist/predicates/index.cjs +1 -1
  89. package/dist/predicates/index.d.ts +111 -17
  90. package/dist/predicates/index.js +1 -1
  91. package/dist/promise/index.cjs +1 -1
  92. package/dist/promise/index.js +1 -1
  93. package/dist/rzl-utils.global.js +1 -4
  94. package/dist/strings/index.cjs +1 -1
  95. package/dist/strings/index.js +1 -1
  96. package/dist/tailwind/index.cjs +1 -0
  97. package/dist/tailwind/index.d.ts +565 -0
  98. package/dist/tailwind/index.js +1 -0
  99. package/dist/types/index.d.ts +1 -1
  100. package/dist/urls/index.cjs +1 -1
  101. package/dist/urls/index.js +1 -1
  102. package/package.json +24 -23
  103. package/dist/chunk-26W3VZIK.cjs +0 -1
  104. package/dist/chunk-2KRCHXFG.cjs +0 -2
  105. package/dist/chunk-33ZLH266.js +0 -1
  106. package/dist/chunk-4L4EJTNZ.js +0 -1
  107. package/dist/chunk-56QBKKRE.js +0 -1
  108. package/dist/chunk-5Q37AP7P.js +0 -1
  109. package/dist/chunk-5SZUSNGZ.js +0 -1
  110. package/dist/chunk-7CHFAMS2.js +0 -1
  111. package/dist/chunk-7MMJZ6HS.js +0 -1
  112. package/dist/chunk-7TC6DE3J.cjs +0 -1
  113. package/dist/chunk-7VX33E3V.js +0 -1
  114. package/dist/chunk-7YWAQOA4.cjs +0 -1
  115. package/dist/chunk-BEZPD44N.cjs +0 -1
  116. package/dist/chunk-BI263OHW.js +0 -1
  117. package/dist/chunk-CII6WWLO.cjs +0 -1
  118. package/dist/chunk-D5TYPCWU.cjs +0 -1
  119. package/dist/chunk-EEQY5QUG.js +0 -1
  120. package/dist/chunk-ELDDNERR.js +0 -1
  121. package/dist/chunk-ESJYBIYH.js +0 -1
  122. package/dist/chunk-EWYPSKKM.js +0 -1
  123. package/dist/chunk-EXCOQLWX.cjs +0 -1
  124. package/dist/chunk-FIEZKTAZ.cjs +0 -1
  125. package/dist/chunk-FWQVTMYA.cjs +0 -1
  126. package/dist/chunk-G4EWCRKS.js +0 -1
  127. package/dist/chunk-G7R5XZRM.cjs +0 -1
  128. package/dist/chunk-GGEV7LXX.cjs +0 -1
  129. package/dist/chunk-HJOZOENU.cjs +0 -1
  130. package/dist/chunk-IRDZVLNZ.cjs +0 -1
  131. package/dist/chunk-IW73G523.cjs +0 -1
  132. package/dist/chunk-IY5OZAB3.cjs +0 -1
  133. package/dist/chunk-J4NCYYGS.js +0 -1
  134. package/dist/chunk-J7JAZAJD.js +0 -1
  135. package/dist/chunk-JYNSO7ZY.js +0 -1
  136. package/dist/chunk-K3UVKYEU.js +0 -1
  137. package/dist/chunk-LQ76EDZG.js +0 -1
  138. package/dist/chunk-MROH35V3.cjs +0 -1
  139. package/dist/chunk-NJSAV73S.js +0 -1
  140. package/dist/chunk-NNM7QCNB.js +0 -1
  141. package/dist/chunk-NR44SNYE.js +0 -1
  142. package/dist/chunk-NXMTWY77.js +0 -1
  143. package/dist/chunk-OZCQZO2V.cjs +0 -4
  144. package/dist/chunk-PUQXRLZH.cjs +0 -1
  145. package/dist/chunk-Q3NTKN5I.cjs +0 -1
  146. package/dist/chunk-QDNSC57Z.js +0 -4
  147. package/dist/chunk-QGXTL5ZH.js +0 -2
  148. package/dist/chunk-QSQDP7L2.cjs +0 -1
  149. package/dist/chunk-RV2VULM7.cjs +0 -1
  150. package/dist/chunk-S5M33A4O.js +0 -1
  151. package/dist/chunk-SGTHOQQ2.js +0 -1
  152. package/dist/chunk-SL3RQOWA.js +0 -1
  153. package/dist/chunk-SW6HYEW7.cjs +0 -1
  154. package/dist/chunk-SYJC7UAW.js +0 -1
  155. package/dist/chunk-SZPWZZYG.cjs +0 -1
  156. package/dist/chunk-UA4B7JBO.cjs +0 -1
  157. package/dist/chunk-UQDJF5RR.cjs +0 -1
  158. package/dist/chunk-UTQUYABU.cjs +0 -1
  159. package/dist/chunk-VPW3DRV5.js +0 -1
  160. package/dist/chunk-W32WALNU.js +0 -1
  161. package/dist/chunk-XGZ6K753.cjs +0 -1
  162. package/dist/chunk-YFTR64N5.cjs +0 -1
  163. package/dist/chunk-ZFDS7W6B.cjs +0 -1
  164. package/dist/chunk-ZQOLZE6Z.cjs +0 -1
  165. package/dist/index.cjs +0 -1
  166. package/dist/index.d.ts +0 -1
  167. package/dist/index.js +0 -1
  168. package/dist/stylings/index.cjs +0 -1
  169. package/dist/stylings/index.d.ts +0 -41
  170. package/dist/stylings/index.js +0 -1
@@ -0,0 +1 @@
1
+ import{parseCurrencyString as e}from"./chunk-VEYMQ3UA.js";import{isFinite as t}from"./chunk-DUK2K4FB.js";import{normalizeSpaces as r}from"./chunk-Q6NHYWVX.js";import{isEmptyString as n}from"./chunk-TSLYDPBJ.js";import{assertIsString as o}from"./chunk-W2W3L2M5.js";import{isInteger as a}from"./chunk-WVSPXFTY.js";import{safeStableStringify as i}from"./chunk-L73TOPX5.js";import{isString as s,getPreciseType as u,assertIsPlainObject as p,hasOwnProp as l,isBoolean as c,isPlainObject as m,isNaN as d,isUndefined as f,isFunction as y,assertIsBoolean as h,isNil as b,isNumber as g,isNonEmptyString as $}from"./chunk-2UIRWYE3.js";import{id as v,enUS as w}from"date-fns/locale";import{isDate as T,parse as D,format as k}from"date-fns";var S=(r,n={})=>{if(!s(r)&&!t(r))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${u(r)}\`, with value: \`${i(r)}\`.`);p(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const b=!!l(n,"decimal")&&n.decimal,g=l(n,"totalDecimal")?n.totalDecimal:2,$=!l(n,"endDecimal")||n.endDecimal,v=!!l(n,"indianFormat")&&n.indianFormat,w=l(n,"suffixCurrency")?n.suffixCurrency:"",T=l(n,"suffixDecimal")?n.suffixDecimal:"",D=l(n,"roundedDecimal")?n.roundedDecimal:"round",k=l(n,"negativeFormat")?n.negativeFormat:"dash";let S=l(n,"separatorDecimals")?n.separatorDecimals:",",E=l(n,"separator")?n.separator:".";if(!(s(E)&&s(S)&&s(w)&&s(T)))throw new TypeError(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${u(E)}\`, 'separatorDecimals': \`${u(S)}\`, 'suffixCurrency': \`${u(w)}\`, 'suffixDecimal': \`${u(T)}\`].`);if(!c(b)||!c($)||!c(v))throw new TypeError(`Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${u(b)}\`, 'endDecimal': \`${u($)}\`, 'indianFormat': \`${u(v)}\`].`);if(!a(g))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${u(g)}\`, with value: \`${i(length)}\`.`);if(!1!==D&&"round"!==D&&"ceil"!==D&&"floor"!==D)throw new TypeError(`Parameter \`roundedDecimal\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` must be one of "round" | "ceil" | "floor", but received: \`${u(D)}\`, with value: \`${i(D)}\`.`);if("abs"!==k&&"brackets"!==k&&"dash"!==k&&!m(k))throw new TypeError(`Parameter \`negativeFormat\` property of the \`options\` (second parameter) must be of type \`string\` must be one of "abs" | "brackets" | "dash" or \`plain-object\` type, but received: \`${u(k)}\`, with value: \`${i(k)}\`.`);const F=s(r)?e(r):r;if(d(F))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let P="",C="",N=Math.abs(F);const x=Math.pow(10,g);if(D){const e=N*x;switch(D){case"round":N=Math.round(e)/x;break;case"ceil":N=Math.ceil(e)/x;break;case"floor":N=Math.floor(e)/x}}if(D)[P,C]=N.toFixed(g).split("."),C=C??"".padEnd(g,"0");else{const e=String(N).split(".");P=e[0],C=(e[1]||"").slice(0,g).padEnd(g,"0")}let j;if(v?(E=",",S=".",j=(w.trim().length?w:"")+M(P,E)):j=(w.trim().length?w:"")+P.replace(/\B(?=(\d{3})+(?!\d))/g,E),b&&!f(C)&&g>0){let e=S+C;$&&(e+=T),j+=e}if(F<0)if("dash"===k)j="-"+j;else if("brackets"===k)j="("+j+")";else if("abs"===k);else if(m(k))if(l(k,"custom")){const e=k.custom;if(!y(e))throw new TypeError(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${u(e)}\`.`);const t=e(j);o(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${t}\` type value, but received: \`${e}\`.`}),j=t}else{const e=k.style||"dash",t=!f(k.space)&&k.space;if(h(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.space\` property of the \`options\` (second parameter) must be of type \`${t} or undefined\`, but received: \`${e}\`.`}),"abs"!==e&&"brackets"!==e&&"dash"!==e)throw new TypeError(`Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${u(e)}\`, with value: \`${i(e)}\`.`);switch(e){case"dash":j="-"+(t?" ":"")+j;break;case"brackets":j=t?`( ${j} )`:`(${j})`}}return j},M=(e,t)=>{const r=e.slice(-3),n=e.slice(0,-3);return n?n.replace(/\B(?=(\d{2})+(?!\d))/g,t)+t+r:r},E=(e,r=",")=>{if(!s(e)&&!t(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${u(e)}\`.`);if(!s(r))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${u(r)}\`.`);const n="."===(r=s(r)?r:",")?",":".",o=e.toString().trim(),a=o.lastIndexOf("."),i=o.lastIndexOf(",");let p="";a>i?p=".":i>a&&(p=",");let l=o,c="";if(p){const e=o.split(p);l=e.slice(0,-1).join(p),c=e.slice(-1)[0]}l=l.replace(/[^\d]/g,"");const m=l.replace(/\B(?=(\d{3})+(?!\d))/g,r);return c?`${m}${n}${c}`:m};function F(e,t={}){if(b(e))return"";if(!s(e)&&!g(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${u(e)}\`.`);p(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=l(t,"separator")?t.separator:" ",n=!!l(t,"takeNumberOnly")&&t.takeNumberOnly,o=!!l(t,"checkValidOnly")&&t.checkValidOnly,a=l(t,"plusNumberCountry")?t.plusNumberCountry:"",i=l(t,"openingNumberCountry")?t.openingNumberCountry:"",m=l(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!c(n)||!c(o))throw new TypeError(`Parameter \`takeNumberOnly\` and \`checkValidOnly\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${u(n)}\`, 'checkValidOnly': \`${u(o)}\`].`);if(!(s(r)&&s(a)&&s(i)&&s(m)))throw new TypeError(`Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${u(r)}\`, 'plusNumberCountry': \`${u(a)}\`, 'openingNumberCountry': \`${u(i)}\`, 'closingNumberCountry': \`${u(m)}\`].`);if(s(e)||(e=String(e)),n)return e.replace(/\D/g,"");if(o)return/^(\+)?[0-9\s().-]+$/.test(e)&&e.replace(/\D/g,"").length<24;e=e.replace(/\D/g,"");let d=a.trim().replace(/\s+/g,"").replace(/[^\d+]/g,"");/^\+/.test(d)&&(d="+"+d.replace(/^\++/,""));let f="",y="";({7:"Russia, Kazakhstan",27:"South Africa",31:"Netherlands",32:"Belgium",33:"France",34:"Spain",36:"Hungary",39:"Italy, San Marino, Vatican",44:"United Kingdom",46:"Sweden",47:"Norway",48:"Poland",49:"Germany",52:"Mexico",54:"Argentina",55:"Brazil",56:"Chile",61:"Australia",62:"Indonesia",64:"New Zealand",81:"Japan",82:"South Korea",86:"China",90:"Turkey",91:"India",92:"Pakistan",351:"Portugal",352:"Luxembourg",971:"UAE"})[d.replace(/^\+/,"").replace(/[^\d]/g,"")]&&e.startsWith("0")?(f=e.slice(1,4),y=e.slice(4)):(f=e.slice(0,4),y=e.slice(4));const h=d.trim(),$=i.trim(),v=m.trim();let w="";w=h?$&&v?`${$}${h}${v} ${f}`:$&&!v?`${$}${h} ${f}`:!$&&v?`${h}${v} ${f}`:`${h} ${f}`:`${f}`;const T={0:r,4:r,8:r,12:r,16:r,20:r,24:r};for(let e=0;e<y.length;e++){w+=(T[e+f.length]||"")+y[e]}return w}var P=(e,t)=>{if(b(t)&&(t="YYYY-MM-DD hh:mm:ss"),!s(t))return null;if(b(e)||!T(e)&&!$(e))return null;try{const r=new Date(e);if(d(r.getTime()))return null;const n=e=>e.toString().padStart(2,"0"),o={YYYY:r.getFullYear().toString(),MM:n(r.getMonth()+1),DD:n(r.getDate()),hh:n(r.getHours()),mm:n(r.getMinutes()),ss:n(r.getSeconds())},a=Object.entries(o).reduce((e,[t,r])=>e.split(t).join(r),t);return a.includes("NaN")?null:a}catch{return null}},C=(e,t)=>{if(b(e)||!T(e)&&!$(e))return null;const r=new Date(e);if(d(r.getTime()))return null;m(t)||(t={});const{locale:n="en-US",...o}=t;try{return new Intl.DateTimeFormat($(n)?n.trim():"en-US",o).format(r)}catch{return null}},N=(e,t={})=>{if(b(e)||!T(e)&&!$(e))return null;m(t)||(t={});const{inputFormat:r,locale:n="en",inputLocale:o="en",...a}=t,i=l(t,"format")&&$(t.format)?t.format:"dd MMM yyyy - HH:mm:ss";let s;try{if($(e)&&r&&o){const t=$(o)?"id"===o?v:w:o;s=D(e,r,new Date,{locale:t})}else s=new Date(e);if(d(s.getTime()))return null;const t=$(n)?"id"===n?v:w:n;return k(s,i,{...a,locale:t})}catch{return null}},x=e=>{try{if(b(e)||s(e)&&n(e))e=new Date;else if(!T(e)&&!$(e))return"0";const t=new Date(e);if(d(t.getTime()))return"0";const r=e=>e.toString().padStart(2,"0");let o=t.getTimezoneOffset();const a=o<0?"+":"-";return o=Math.abs(o),`${a}${r(Math.floor(o/60))}${r(o%60)}`}catch{return"0"}},j=(e,t={})=>{if(!$(e))return"";p(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=l(t,"mode")?t.mode:"fixed";if("random"!==r&&"fixed"!==r)throw new TypeError(`Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${u(r)}\`, with value: \`${i(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[n,o]=e.split("@"),a=o.split(".");if(a.length<2)return"";const[s,...c]=a,m=c.join("."),d=Y(r,e),f=n.length<4?1:2,y=s.length<4?1:2;return`${O(n,f,.6,d)}@${O(s,y,.5,d)}.${m.length<=2?m:O(m,1,.4,d)}`},Y=(e,t)=>"fixed"===e?(()=>{let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)})():void 0,O=(e,t,r,n)=>{if(e.length<=t)return"*".repeat(e.length);const o=e.split(""),a=Math.max(t,Math.ceil(e.length*r)),i=new Set;let s=0;for(;i.size<a;){const t=f(n)?Math.floor(Math.random()*e.length):(n+e.length+31*s)%e.length;i.add(t),s++}for(const e of i)o[e]="*";return o.join("")};function A(e,t,n={}){if(b(e)||t<=0)return e;if(o(e,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!a(t))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${u(t)}\`, with value: \`${i(t)}\`.`);p(n,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const s=l(n,"separator")?n.separator:" ",c=!!l(n,"reCountAfterSpace")&&n.reCountAfterSpace;if(o(s,{message:({currentType:e,validType:t})=>`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),h(c,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),e=r(e),!c){let r="",n=0;for(let o=0;o<e.length;o++){n===t&&(r+=s,n=0),r+=e[o],n++}return r}const m=e.split(" "),d=[];let f=[],y=0;for(let e=0;e<m.length;e++){const r=m[e];let n="",o=0;for(let e=0;e<r.length;e++)n+=r[e],o++,o===t&&e<r.length-1&&(n+=s,o=0);f.push(n),y++,y!==t&&e!==m.length-1||(d.push(f.join(s)),f=[],y=0)}return d.join(" ")}var V=(e,t={})=>{if(!$(e))return"";p(t,{message:({currentType:e,validType:t})=>`Seconds parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!l(t,"trim")||t.trim,s=l(t,"length")?t.length:10;let c=l(t,"ending")?t.ending:"...";if(!a(s))throw new TypeError(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${u(s)}\`, with value: \`${i(s)}\`.`);if(s<1)return"";o(c,{message:({currentType:e,validType:t})=>`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),h(r,{message:({currentType:e,validType:t})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),c=n(c)?"...":c.trim();const m=r?e.trim():e;if(m.length<=s)return m;const d=m.slice(0,s);return(r?d:d.trimEnd())+c};export{j as censorEmail,A as chunkString,S as formatCurrency,N as formatDateFns,C as formatDateIntl,P as formatDateTime,E as formatNumber,F as formatPhoneNumber,x as getGMTOffset,V as truncateString};
@@ -0,0 +1 @@
1
+ import{removeSpaces as e}from"./chunk-Q6NHYWVX.js";import{isEmptyString as r}from"./chunk-TSLYDPBJ.js";import{isInteger as t}from"./chunk-WVSPXFTY.js";import{safeStableStringify as n}from"./chunk-L73TOPX5.js";import{isString as o,isArray as a,getPreciseType as i,isNull as s,isPlainObject as u,isBoolean as p,isNonEmptyArray as c,isNonEmptyString as m,isNil as f,isError as l,assertIsPlainObject as h,hasOwnProp as y}from"./chunk-2UIRWYE3.js";var d=class e extends Error{constructor(r,t){super(r),this.originalError=t,this.name="NormalizePathnameError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},b=(e,r=null,f={})=>{const l=[];o(e)||a(e)||l.push(`First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${i(e)}\`.`),o(r)||a(r)||s(r)||l.push(`Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${i(r)}\`.`),u(f)||l.push(`Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${i(f)}\`.`);const{levels:h=1,removeDuplicates:y=!0}=f;if((!t(h)||t(h)&&h<0)&&l.push(`Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${i(h)}\`, with value: \`${n(h)}\`.`),p(y)||l.push(`Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${i(y)}\`.`),c(l))throw new TypeError(`Invalid parameter(s) in \`getPrefixPathname\` function:\n- ${l.join("\n- ")}`);function d(e){return`/${$(e).split("/").filter(Boolean).slice(0,h).join("/")}`}function b(e){if(r){if(e=$(e),a(r)){for(const t of r)if(e.startsWith($(t)))return d(e)}else if(m(r)&&e.startsWith($(r)))return d(e);return null}return d(e)}if(a(e)){const r=e.map(b).filter(e=>!s(e)),t=y?[...new Set(r)]:r;return 1===t.length?t[0]:t}return b(e)},v=(e,r="/")=>{if(!m(r))throw new TypeError(`Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${i(r)}\`, with value: \`${n(r)}\`.`);if(a(e)){if(!e.every(e=>o(e)))throw new TypeError(`First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${i(e)}\`, with value: \`${n(e)}\`.`);for(const r of e){const e=$(r);if("/"!==e)return e}return $(r)}if(o(e)){const t=$(e);return"/"!==t?t:$(r)}if(!f(e))throw new TypeError(`First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${i(e)}\`.`);return $(r)},$=(r,t="/")=>{if(!m(t))throw new TypeError(`Second parameter (\`defaultPath\`) must be of type \`string\` and not empty-string, but received: \`${i(t)}\`, with value: \`${n(t)}\`.`);if(!m(r))return t;try{if((r=(r=e(r,{trimOnly:!0})).replace(/\s+/g,"")).startsWith("http://")||r.startsWith("https://")){const e=new URL(r);return`${e.pathname}${e.search}${e.hash}`.replace(/^\/+/,"/")}return"/"+r.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(e){const r=l(e)?e:new Error("Unknown error from function `normalizePathname()`.");throw new d(`Failed to normalize pathname in function \`normalizePathname()\`: ${r.message}`,r)}},w=(e,t={})=>{if(!m(e))return"";h(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!y(t,"prefixColon")&&t.prefixColon;if(!p(n))throw new TypeError(`Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${i(n)}\`.`);const o=e.replace(/\D+/g,"");return r(o)?"":n?`:${o}`:o};export{w as formatEnvPort,v as getFirstPrefixPathname,b as getPrefixPathname,$ as normalizePathname};
@@ -0,0 +1 @@
1
+ import{isNonEmptyString as r}from"./chunk-2UIRWYE3.js";var o=(o,m={})=>!r(o,m);export{o as isEmptyString};
@@ -0,0 +1 @@
1
+ "use strict";exports.isBigInt=t=>"bigint"==typeof t;
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-UDA26MCU.cjs"),e=require("./chunk-INUFZJLX.cjs");exports.assertIsBigInt=(s,i={})=>{if(r.isBigInt(s))return;const n=e.resolveErrorMessageAssertions({value:s,options:i,requiredValidType:"big int"});throw new TypeError(n)},exports.assertIsNumber=(r,s={})=>{const i=e.hasOwnProp(s,"includeNaN")?s.includeNaN:void 0;if(e.isNumber(r,{includeNaN:i}))return;const n=e.resolveErrorMessageAssertions({value:r,options:s,requiredValidType:"number"});throw new TypeError(n)};
@@ -0,0 +1 @@
1
+ import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-L73TOPX5.js";import{getPreciseType as n,isNull as o}from"./chunk-2UIRWYE3.js";var t=(t=1e3,i)=>{if(!e(t)||t<=0)throw new TypeError(`First parameter (\`milliSeconds\`) must be of type \`number\` and value must be a \`non-zero\`, \`non-NaN\`, \`non-negative\`, and \`integer-number\`, but received: \`${n(t)}\`, with value: \`${r(t)}\`.`);if(o(i)||i&&!(i instanceof AbortSignal))throw new TypeError("Second parameter (`signal`) must be an `instance of AbortSignal` if provided.");return new Promise((e,r)=>{const n=setTimeout(()=>{o(),e()},t),o=()=>{clearTimeout(n),i&&i.removeEventListener("abort",a)},a=()=>{o(),r(new DOMException("Function `delay` aborted","AbortError"))};i&&(i.aborted?a():i.addEventListener("abort",a,{once:!0}))})};export{t as delay};
@@ -0,0 +1 @@
1
+ import{isNonEmptyString as e}from"./chunk-2UIRWYE3.js";var l=l=>{if(!e(l))return 0;let c=l.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),s=!1;/^\(.*\)$/.test(c)&&(s=!0,c=c.slice(1,-1).trim()),c=c.replace(/^[-\s]+/,e=>e.includes("-")?"-":"").replace(/[\s.,-]+$/,""),s=s||/^-/.test(c)||/^[^\d]*-/.test(c);let r=c.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,"");const t=r.match(/,\d{2}/g);if(t&&t.length>1)r=r.replace(/,/g,"");else{const e=(r.match(/\./g)||[]).length,l=(r.match(/,/g)||[]).length;if(e>1&&0===l)r=r.replace(/\./g,"");else if(l>1&&0===e)r=r.replace(/,/g,"");else{const e=r.lastIndexOf(","),l=r.lastIndexOf(".");if(e>l)r=r.replace(/\./g,"").replace(",",".");else if(l>e)r=r.replace(/,/g,"");else if(e>l){const l=r.slice(0,e).replace(/,/g,"").replace(/\./g,""),c=r.slice(e+1);r=l+"."+c}else if(l>e){const e=r.slice(0,l).replace(/\./g,"").replace(/,/g,""),c=r.slice(l+1);r=e+"."+c}else-1!==e?r=r.replace(/,/g,""):-1!==l&&(r=r.replace(/\./g,""))}}const a=parseFloat(r)||0;return s?-a:a};export{l as parseCurrencyString};
@@ -0,0 +1 @@
1
+ import{isString as r,resolveErrorMessageAssertions as e}from"./chunk-2UIRWYE3.js";var o=(o,t={})=>{if(r(o))return;const i=e({value:o,options:t,requiredValidType:"string"});throw new TypeError(i)};export{o as assertIsString};
@@ -0,0 +1 @@
1
+ import{isNonEmptyValue as e,isTypedArray as r}from"./chunk-NXWPZDDX.js";import{filterNilArray as t}from"./chunk-Y44ZD3GG.js";import{isEmptyObject as o,isRegExp as n,isEmptyArray as m}from"./chunk-GRSCNTOK.js";import{assertIsArray as i}from"./chunk-ZXIWDFEQ.js";import{isEmptyString as s}from"./chunk-TSLYDPBJ.js";import{assertIsString as a}from"./chunk-W2W3L2M5.js";import{safeStableStringify as y,isDate as p,isMap as c}from"./chunk-L73TOPX5.js";import{isBigInt as u}from"./chunk-QNKGP5DY.js";import{assertIsPlainObject as f,hasOwnProp as v,assertIsBoolean as l,isArray as d,isNull as b,isNil as E,isString as j,isNonEmptyString as A,isBoolean as O,isNumber as g,isObject as h,isPlainObject as S,getPreciseType as T,isNaN as $,isUndefined as k,isInfinityNumber as N,isNumberObject as R,isStringObject as I,isBooleanObject as w,isBuffer as P,isSet as D,isFunction as B,isObjectOrArray as C}from"./chunk-2UIRWYE3.js";function L(e,r={}){f(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!v(r,"removeInvalidValueNumber")||r.removeInvalidValueNumber;if(l(o,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),d(e)){const r=Array.from(e,e=>{if(u(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):b(e)?null:void 0});return o?t(r):r}}var W=r=>!E(r)&&(j(r)?A(r):O(r)?r:g(r,{includeNaN:!0})?0!==r:d(r)||h(r)?e(r):Boolean(r)),G=e=>!E(e)&&(j(e)?A(e):O(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.some(G):!!h(e)&&Object.values(e).some(G)),X=(e,r={})=>{if(E(e))return!1;S(r)||(r={});const t=!!v(r,"caseInsensitive")&&r.caseInsensitive,o=!v(r,"trimString")||r.trimString,n=!!v(r,"includeIndeterminate")&&r.includeIndeterminate;if(!O(t)||!O(o)||!O(n))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${T(t)}\`, 'trimString': \`${T(o)}\`, 'includeIndeterminate': \`${T(n)}\`].`);if(j(e)){let r=e;o&&(r=r.trim()),t&&(r=r.toLowerCase());const m=["true","on","yes","1"];return n&&m.push("indeterminate"),m.includes(r)}return g(e)?1===e:!!O(e)&&e},Y=e=>!E(e)&&(j(e)?!s(e):O(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.length>0:Boolean(e)),J=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(j(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const o=t.replace(/,/g,""),n=Number(o);return!$(n)&&A(o)?n:e.trim()}return e},U=(e,r)=>{if(!C(e))return e;const[t,...o]=r;if(d(e))for(const t of e)C(t)&&U(t,r);else m(o)?S(e)&&delete e[t]:S(e)&&C(e[t])&&U(e[t],o);return e},V=(e,r)=>{if(!S(e))return e;const[t,...o]=r;return 0===o.length?S(e)&&delete e[t]:S(e[t])&&V(e[t],o),e};function Z(e,r,t=!0){if(o(e,{checkSymbols:!0}))return{};if(i(r,{message:({currentType:e,validType:t})=>`Second parameter (\`keysToDelete\`) must be of type \`${t}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${e}\`, with value: \`${y(r)}\`.`}),!r.every(e=>S(e)&&"key"in e))throw new TypeError(`Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${y(r)}\`.`);let n=t?(e=>{try{if(B(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(a(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!k(t)&&!O(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${T(t)}\`.`);const r=e.split(".");n=t?U(n,r):V(n,r)}return n}function x(e,t={}){f(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,i){if(E(t)||n(t))return;const{removeEmptyArrays:s,removeEmptyObjects:a,isRoot:y}=i;if(!O(a)||!O(s))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${T(a)}\`, 'removeEmptyArrays': \`${T(s)}\`].`);if(g(t)||O(t)||A(t)){const e=Number(t);return N(e)||$(e)?void 0:e}if(R(t)||I(t)||w(t)){const e=Number(t.valueOf());return N(e)||$(e)?void 0:e}if(p(t,{skipInvalidDate:!0}))try{return $(t.getTime())?0:t.getTime()}catch{return 0}if(P(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1})).filter(e=>!k(e));if(s&&m(r))return;return r}if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1})).filter(e=>!k(e));if(s&&m(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1})).filter(e=>!k(e));if(s&&m(r))return;return r}}if(D(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1})).filter(e=>!k(e));if(s&&m(r))return;return r}if(c(t)){let r=Array.from(t.entries()).map(([r,t])=>{const o=e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1}),n=e(t,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1});return k(o)||k(n)?void 0:[o,n]}).filter(e=>!k(e));if(s&&(r=r.filter(e=>!m(e))),s&&m(r))return;return r}if(d(t)){const r=t.map(r=>e(r,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1})).filter(e=>!k(e));if(s&&m(r))return;return r}if(h(t)){const r={};for(const[o,n]of Object.entries(t)){const t=e(n,{removeEmptyObjects:a,removeEmptyArrays:s,isRoot:!1});k(t)||(r[o]=t)}return a&&o(r)?y?{}:void 0:r}}(e,{removeEmptyObjects:!!v(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!v(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}function K(e,t={}){f(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});return function e(t,o){if(E(t)||N(t))return;const{removeEmptyArrays:i,removeEmptyObjects:s,isRoot:a}=o;if(!O(s)||!O(i))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${T(s)}\`, 'removeEmptyArrays': \`${T(i)}\`].`);if(g(t)||j(t)||O(t))return String(t);if(R(t)){const e=t.valueOf();return N(e)||$(e)?void 0:e.toString()}if(I(t))return t.valueOf();if(w(t))return t.valueOf().toString();if(p(t,{skipInvalidDate:!0}))try{return t.toISOString()}catch{return t.toString()}if(n(t))return t.toString();if(P(t))return Array.from(t).map(e=>String(e)).filter(e=>!k(e));if(r(t)){if(t instanceof BigInt64Array||t instanceof BigUint64Array){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).map(e=>String(e)).filter(e=>!k(e));if(i&&m(r))return;return r}{const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).map(e=>String(e)).filter(e=>!k(e));if(i&&m(r))return;return r}}if(D(t)){const r=Array.from(t).map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).filter(e=>!k(e));if(i&&m(r))return;return r}if(c(t)){const r=Array.from(t.entries()).map(([r,t])=>[e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1}),e(t,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})]).filter(([e,r])=>!k(e)&&!k(r));if(i&&m(r))return;return r}if(d(t)){let r=t.map(r=>e(r,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1})).filter(e=>!k(e));if(i&&(r=r.filter(e=>!(d(e)&&0===e.length))),i&&m(r))return;return r}if(h(t)){const r={};for(const[o,n]of Object.entries(t)){const t=e(n,{removeEmptyObjects:s,removeEmptyArrays:i,isRoot:!1});k(t)?d(n)&&!i&&(r[o]=[]):r[o]=t}return s&&0===Object.keys(r).length?a?{}:void 0:r}}(e,{removeEmptyObjects:!!v(t,"removeEmptyObjects")&&t.removeEmptyObjects,removeEmptyArrays:!!v(t,"removeEmptyArrays")&&t.removeEmptyArrays,isRoot:!0})}export{J as convertType,Z as removeObjectPaths,W as toBooleanContent,G as toBooleanContentDeep,X as toBooleanExplicit,Y as toBooleanLoose,L as toNumberArrayUnRecursive,x as toNumberDeep,K as toStringDeep};
@@ -0,0 +1 @@
1
+ function e(e){return"number"==typeof e&&Number.isInteger(e)}export{e as isInteger};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-XC2PYCT4.cjs"),r=require("./chunk-EBMHQW7X.cjs"),t=require("./chunk-DVMHRLKP.cjs"),i=require("./chunk-DQFU3KLE.cjs"),n=require("./chunk-INUFZJLX.cjs"),s=class e extends Error{constructor(r,t){super(r),this.originalError=t,this.name="NormalizePathnameError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},a=(r,t="/")=>{if(!n.isNonEmptyString(t))throw new TypeError(`Second parameter (\`defaultPath\`) must be of type \`string\` and not empty-string, but received: \`${n.getPreciseType(t)}\`, with value: \`${i.safeStableStringify(t)}\`.`);if(!n.isNonEmptyString(r))return t;try{if((r=(r=e.removeSpaces(r,{trimOnly:!0})).replace(/\s+/g,"")).startsWith("http://")||r.startsWith("https://")){const e=new URL(r);return`${e.pathname}${e.search}${e.hash}`.replace(/^\/+/,"/")}return"/"+r.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(e){const r=n.isError(e)?e:new Error("Unknown error from function `normalizePathname()`.");throw new s(`Failed to normalize pathname in function \`normalizePathname()\`: ${r.message}`,r)}};exports.formatEnvPort=(e,t={})=>{if(!n.isNonEmptyString(e))return"";n.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!!n.hasOwnProp(t,"prefixColon")&&t.prefixColon;if(!n.isBoolean(i))throw new TypeError(`Parameter \`prefixColon\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${n.getPreciseType(i)}\`.`);const s=e.replace(/\D+/g,"");return r.isEmptyString(s)?"":i?`:${s}`:s},exports.getFirstPrefixPathname=(e,r="/")=>{if(!n.isNonEmptyString(r))throw new TypeError(`Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${n.getPreciseType(r)}\`, with value: \`${i.safeStableStringify(r)}\`.`);if(n.isArray(e)){if(!e.every(e=>n.isString(e)))throw new TypeError(`First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${n.getPreciseType(e)}\`, with value: \`${i.safeStableStringify(e)}\`.`);for(const r of e){const e=a(r);if("/"!==e)return e}return a(r)}if(n.isString(e)){const t=a(e);return"/"!==t?t:a(r)}if(!n.isNil(e))throw new TypeError(`First parameter (\`result\`) must be of type \`string\`, \`array-string\`, \`null\` or \`undefined\`, but received: \`${n.getPreciseType(e)}\`.`);return a(r)},exports.getPrefixPathname=(e,r=null,s={})=>{const o=[];n.isString(e)||n.isArray(e)||o.push(`First parameter (\`url\`) must be of type \`string\` or \`array-string\`, but received: \`${n.getPreciseType(e)}\`.`),n.isString(r)||n.isArray(r)||n.isNull(r)||o.push(`Second parameter (\`base\`) must be of type \`string\`, \`array-string\` or \`null\`, but received: \`${n.getPreciseType(r)}\`.`),n.isPlainObject(s)||o.push(`Second parameter (\`options\`) must be of type \`plain-object\`, but received: \`${n.getPreciseType(s)}\`.`);const{levels:p=1,removeDuplicates:u=!0}=s;if((!t.isInteger(p)||t.isInteger(p)&&p<0)&&o.push(`Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${n.getPreciseType(p)}\`, with value: \`${i.safeStableStringify(p)}\`.`),n.isBoolean(u)||o.push(`Parameter \`removeDuplicates\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: \`${n.getPreciseType(u)}\`.`),n.isNonEmptyArray(o))throw new TypeError(`Invalid parameter(s) in \`getPrefixPathname\` function:\n- ${o.join("\n- ")}`);function c(e){return`/${a(e).split("/").filter(Boolean).slice(0,p).join("/")}`}function l(e){if(r){if(e=a(e),n.isArray(r)){for(const t of r)if(e.startsWith(a(t)))return c(e)}else if(n.isNonEmptyString(r)&&e.startsWith(a(r)))return c(e);return null}return c(e)}if(n.isArray(e)){const r=e.map(l).filter(e=>!n.isNull(e)),t=u?[...new Set(r)]:r;return 1===t.length?t[0]:t}return l(e)},exports.normalizePathname=a;
@@ -0,0 +1 @@
1
+ import{isEmptyArray as e,isEmptyObject as r}from"./chunk-GRSCNTOK.js";import{isEmptyString as o}from"./chunk-TSLYDPBJ.js";import{assertIsPlainObject as t,hasOwnProp as c,assertIsBoolean as m,isNil as s,isNaN as p,isString as a,isArray as n,isObject as y}from"./chunk-2UIRWYE3.js";var u=(u,i={})=>{t(i,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const b=!!c(i,"checkSymbols")&&i.checkSymbols;return m(b,{message:({currentType:e,validType:r})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),!(!s(u)&&!1!==u&&!p(u))||(a(u)?o(u):n(u)?e(u):!!y(u)&&r(u,{checkSymbols:b}))};export{u as isEmptyValue};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-EBMHQW7X.cjs"),t=require("./chunk-INUFZJLX.cjs");exports.normalizeSpaces=(r,i={withTrim:!0,trimOnly:!1})=>{if(!t.isNonEmptyString(r))return"";t.isPlainObject(i)||(i={});const{trimOnly:e=!1,withTrim:n=!0}=i;return e?r.trim():(n&&(r=r.trim()),r.replace(/\s+/g," "))},exports.normalizeString=r=>t.isNonEmptyString(r)?r.trim():"",exports.removeSpaces=(r,i={trimOnly:!1})=>{if(!t.isNonEmptyString(r))return"";t.isPlainObject(i)||(i={});const{trimOnly:e=!1}=i;return e?r.trim():r.replace(/\s+/g,"")},exports.stripHtmlTags=function(i){if(!t.isString(i))return;return r.isEmptyString(i)?"":i.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim()};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-INUFZJLX.cjs");exports.getInitialsName=r=>{if(!e.isNonEmptyString(r))return"";const t=(r=r.replace(/\s+/g," ").trim()).split(" ");return t.length>1?t[0][0]+t[1][0].toUpperCase():r.length>1?r.substring(0,2).toUpperCase():r[0].toUpperCase()},exports.replaceAt=(r,t,i)=>{if(!e.isNumber(r)||!e.isString(i)||!e.isString(t))throw new TypeError(`First parameter (\`index\`) must be of type \`number\`, second parameter (\`originalString\`) and third parameter (\`replaceTo\`) must be of type \`string\`, but received: "['index': \`${e.getPreciseType(r)}\`, 'originalString': \`${e.getPreciseType(t)}\`, 'replaceTo': \`${e.getPreciseType(i)}\`]".`);if(r<0||r>=t.length)throw new RangeError("First parameter (`index`) is out of range from second parameter (`originalString`).");return t.slice(0,r)+i+t.slice(r+1)};
@@ -0,0 +1 @@
1
+ import{isURL as e}from"./chunk-ONZFBJVW.js";import{isTypedArray as r}from"./chunk-NXWPZDDX.js";import{isEqual as t,isEmptyArray as n,isRegExp as o,baseDeepEqual as i}from"./chunk-GRSCNTOK.js";import{parseCurrencyString as u}from"./chunk-VEYMQ3UA.js";import{isEmptyString as a}from"./chunk-TSLYDPBJ.js";import{assertIsString as s}from"./chunk-W2W3L2M5.js";import{safeStableStringify as f,isDate as c,isMap as p}from"./chunk-L73TOPX5.js";import{isArray as m,getPreciseType as l,assertIsBoolean as h,isNonEmptyString as y,assertIsPlainObject as g,isObjectOrArray as b,isFunction as d,isString as v,isNumber as T,isSymbol as $,isSet as j,isPlainObject as w,isNil as N,isBoolean as S,isBuffer as k,isNaN as O,isUndefined as P,isObject as E,isNull as A}from"./chunk-2UIRWYE3.js";var R=(e,r,n=!1)=>{if(!m(e)||!m(r))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${l(e)}\`, 'array2': \`${l(r)}\`].`);if(h(n,{message:({currentType:e,validType:r})=>`Third parameter \`ignoreOrder\` must be of type \`${r}\`, but received: \`${e}\`.`}),!t(e.length,r.length))return!1;const o=e=>{if(!m(e))return e;return e.map(e=>m(e)?o(e):e).sort((e,r)=>{const t=f(e),n=f(r);return t<n?-1:t>n?1:0})},i=n?o(e):e,u=n?o(r):r;return!!t(i.length,u.length)&&i.every((e,r)=>f(e)===f(u[r]))},M=(e,r)=>t(e,r),W=(r,t)=>{if(!e(r)||!e(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname==t.protocol+"//"+t.host+t.pathname},x=(r,t)=>{if(!e(r)||!e(t))throw new TypeError("Parameters `urlA` and `urlB` (first and second parameter) must be instance of URL.");return r.protocol+"//"+r.host+r.pathname+r.search==t.protocol+"//"+t.host+t.pathname+t.search},z=(e,r,t={})=>{if(!y(e)||!m(r))return!1;g(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:n=!1,flags:o="i"}=t;h(n,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),s(o,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=r.filter(e=>y(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return 0!==i.length&&i.every(r=>new RegExp(n?`(?<!\\S)${r}(?!\\S)`:r,o.includes("u")?o:o+"u").test(e))},I=(e,r,t={})=>{if(!y(e)||!m(r))return!1;g(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:n=!1,flags:o="i"}=t;h(n,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),s(o,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=r.filter(e=>y(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));if(0===i.length)return!1;const u=n?`(?<!\\S)(${i.join("|")})(?!\\S)`:`(${i.join("|")})`;return new RegExp(u,o.includes("u")?o:o+"u").test(e)};function L(e){const r=typeof e;return"string"===r||"number"===r||"symbol"===r}var U=(e,r)=>{if(!b(e))return!1;if(!L(r))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${l(r)}\`.`);return!!Object.prototype.hasOwnProperty.call(e,r)||(m(e)?e.some(e=>U(e,r)):Object.values(e).some(e=>b(e)&&U(e,r)))},B=(e,r)=>{if(!m(e)||!m(r)||n(e)||n(r))return!1;const t=new Set(e);return r.some(e=>t.has(e))},X=e=>"[object Arguments]"===Object.prototype.toString.call(e);function Z(e){return"number"==typeof e&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}function D(e){return!d(e)&&b(e)&&Z(null==e?void 0:e.length)}function F(e){return b(e)&&Z(e.length)}var Y=e=>{if(!v(e)&&!T(e))return!1;return 0!==u(e.toString())||"0"===e.toString().trim()},_=(e,r)=>{if("number"==typeof e&&"number"==typeof r&&Number.isNaN(e)&&Number.isNaN(r))return!0;if(e===r)return!0;if(typeof e!=typeof r)return!1;if(c(e)&&c(r))return e.getTime()===r.getTime();if(o(e)&&o(r))return e.toString()===r.toString();if($(e)&&$(r))return e.toString()===r.toString();if(j(e)&&j(r)){if(e.size!==r.size)return!1;const t=Array.from(r),n=new Set;for(const r of e){let e=!1;for(let o=0;o<t.length;o++)if(!n.has(o)&&_(r,t[o])){n.add(o),e=!0;break}if(!e)return!1}return!0}if(p(e)&&p(r)){if(e.size!==r.size)return!1;const t=Array.from(r),n=new Set;for(const[r,o]of e){let e=!1;for(let i=0;i<t.length;i++){if(n.has(i))continue;const[u,a]=t[i];if(_(r,u)&&_(o,a)){n.add(i),e=!0;break}}if(!e)return!1}return!0}if(m(e)&&m(r))return e.length===r.length&&e.every((e,t)=>_(e,r[t]));if(b(e)&&b(r)&&e&&r){if(m(e)!==m(r))return!1;const t=Object.keys(e),n=Object.keys(r);return t.length===n.length&&t.every(t=>_(e[t],r[t]))}return!1};function C(e){return!!e&&"object"==typeof e&&1===(null==e?void 0:e.nodeType)&&!w(e)}function G(e){return!!N(e)||(!!(S(e)||T(e,{includeNaN:!0})||$(e))||(d(e)?0===Object.keys(e).length:v(e)||m(e)||X(e)||r(e)?0===e.length:p(e)||j(e)?0===e.size:k(e)?0===e.length:!!w(e)&&0===Object.keys(e).length))}var J=e=>{if(v(e))return a(e);if(T(e))return O(e);if(m(e))return n(e)||e.every(J);if(b(e)){const r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return 0===r.length&&0===t.length||[...r,...t].every(r=>J(e[r]))}return!e};function K(e,r,t){return i(e,r,t,new WeakMap)}function V(e,r,t){return q(e,r,t)}function Q(e,r){return e===r||0===e&&0===r||Number.isNaN(e)&&Number.isNaN(r)}function q(e,r,t){if(e===r)return!0;if(!b(r))return Q(e,r);if(!b(e))return!1;const n=Reflect.ownKeys(r).filter(e=>!(m(r)&&"length"===e));for(const o of n){if(!(o in e))return!1;const n=e[o],i=r[o],u=null==t?void 0:t(n,i,o,e,r);if(P(u)){if(b(n)&&b(i)){if(!V(n,i,t))return!1}else if(!Q(n,i))return!1}else if(!u)return!1}return!0}function H(e,r){return q(e,r)}var ee=Function.prototype.toString,re=/\{\s*\[native code\]\s*\}/;function te(e){if(!d(e))return!1;try{const r=ee.call(e);return re.test(r)}catch{return!1}}function ne(e){return!N(e)&&(b(e)||d(e))}function oe(e){return"number"==typeof e&&Number.isSafeInteger(e)}var ie=e=>{if(!y(e))return!1;let r;try{r=decodeURIComponent(e)}catch{return!1}if(!r.startsWith("http://")&&!r.startsWith("https://"))return!1;return new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(r)};function ue(e){return E(e)&&!A(e)&&e instanceof WeakMap}export{R as areArraysEqual,M as areObjectsEqual,W as areURLsEqualPath,x as areURLsIdentical,B as arrayHasAnyMatch,U as doesKeyExist,X as isArguments,D as isArrayLike,F as isArrayLikeObject,Y as isCurrencyLike,_ as isDeepEqual,C as isElement,G as isEmpty,J as isEmptyDeep,K as isEqualWith,Z as isLength,H as isMatch,V as isMatchWith,te as isNative,ne as isObjectLoose,L as isPropertyKey,oe as isSafeInteger,ie as isValidURL,ue as isWeakMap,z as textContainsAll,I as textContainsAny};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-ZR7GTJQX.cjs"),r=require("./chunk-4VCRMMAH.cjs"),t=require("./chunk-YT3MSZKK.cjs"),s=require("./chunk-DQFU3KLE.cjs"),i=require("./chunk-INUFZJLX.cjs"),n=e=>{t.assertIsArray(e,{message:({currentType:e,validType:r})=>`First parameter (\`values\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const s=[];return e.forEach((t,i)=>{for(let n=i+1;n<e.length;n++)if(r.isEqual(t,e[n])){s.some(e=>r.isEqual(e,t))||s.push(t);break}}),s};exports.findDuplicates=n,exports.omitKeys=(e,r)=>{if(!i.isPlainObject(e))return{};t.assertIsArray(r,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const s=n(r);if(s.length>0)throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${s}\``);return Object.fromEntries(Object.entries(e).filter(([e])=>!r.includes(e)))},exports.omitKeysDeep=(a,c)=>{if(!i.isPlainObject(a))return{};t.assertIsArray(c,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const o=n(c);if(i.isNonEmptyArray(o))throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${s.safeStableStringify(o)}\`.`);const u=(e,t)=>{if(!i.isObjectOrArray(e))return e;const[s,...n]=t;if(r.isEmptyArray(n))if(i.isArray(e)){const r=parseInt(s);!i.isNaN(r)&&r in e&&e.splice(r,1)}else delete e[s];else{const r=e[s];i.isObjectOrArray(r)&&(e[s]=u(r,n))}return e},y=e=>{if(i.isArray(e))return e.map(y).filter(e=>!(i.isObjectOrArray(e)&&0===Object.keys(e).length));if(i.isObjectOrArray(e)){return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,y(r)]).filter(([,e])=>!(i.isUndefined(e)||i.isObjectOrArray(e)&&0===Object.keys(e).length)))}return e},l=e.safeJsonParse(s.safeStableStringify(a));for(const e of c){const r=e.split(".");u(l,r)}return y(l)};
@@ -0,0 +1 @@
1
+ import{isRegExp as e,isEmptyArray as r,isEqual as t}from"./chunk-GRSCNTOK.js";import{assertIsArray as i}from"./chunk-ZXIWDFEQ.js";import{isFinite as n}from"./chunk-DUK2K4FB.js";import{safeStableStringify as o,isDate as a,isMap as u}from"./chunk-L73TOPX5.js";import{isBigInt as s}from"./chunk-QNKGP5DY.js";import{getPreciseType as p,isNaN as l,isString as f,isNumber as m,isBoolean as c,isNil as v,isNumberObject as y,isBooleanObject as g,isStringObject as d,isSymbol as b,isFunction as h,isArray as S,isObjectOrArray as T,isError as $,isSet as N,isObject as O,assertIsPlainObject as w,hasOwnProp as j,assertIsBoolean as k,isNull as I}from"./chunk-2UIRWYE3.js";function P(r,t){if(!1!==t&&"stringOrNumber"!==t&&"primitives"!==t&&"all"!==t)throw new TypeError(`Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p(t)}\`, with value: \`${o(t)}\`.`);if(l(r))return"primitives"===t||"all"===t?"NaN":NaN;if(f(r)||m(r))return"stringOrNumber"===t||"primitives"===t||"all"===t?String(r):r;if(c(r)||s(r)||v(r))return"primitives"===t||"all"===t?String(r):r;if(y(r)||g(r)||d(r))return"all"===t?r.valueOf().toString():r;if(b(r))return"all"===t?r.toString():r;if(h(r))return"all"===t?r.toString():r;if(S(r))return r.map(e=>P(e,t));if(T(r)){if(a(r))return"all"===t?r.toISOString():r;if(e(r))return"all"===t?r.toString():r;if($(r)||r instanceof Promise)return"all"===t?r.toString():r;if(N(r))return"all"===t?[...r].map(e=>P(e,t)):r;if(u(r))return"all"===t?[...r.entries()].map(([e,r])=>[P(e,t),P(r,t)]):r;const i={};if(O(r))for(const e of Object.keys(r))i[e]=P(r[e],t);return i}return r}function E(e){if(v(e))return;if(!S(e))return[];return e.reduce((e,t)=>{if(!v(t))if(S(t)){const i=E(t);i&&!r(i)&&e.push(i)}else e.push(t);return e},[])}var K=(e,r={})=>{i(e,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),w(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!j(r,"flatten")&&r.flatten,a=!!j(r,"forceToString")&&r.forceToString;if(!1!==a&&"stringOrNumber"!==a&&"primitives"!==a&&"all"!==a)throw new TypeError(`Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${p(a)}\`, with value: \`${o(a)}\`.`);k(n,{message:({currentType:e,validType:r})=>`Parameter \`flatten\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=e=>{const r=[];return e.reduce((e,i)=>{const n=S(i)?s(i):P(i,a);return r.some(e=>t(e,n))||(r.push(n),e.push(n)),e},[])},l=e=>S(e)?e.flatMap(l):N(e)?[...e].flatMap(l):u(e)?[...e.values()].flatMap(l):[e];return s(n?l(e):e)};function D(e,r={}){w(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!j(r,"removeInvalidValue")||r.removeInvalidValue;if(k(t,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),S(e)){const r=Array.from(e,e=>f(e)||n(e)||c(e)||s(e)?String(e):I(e)?null:void 0);return t?E(r):r}}export{K as dedupeArray,E as filterNilArray,D as toStringArrayUnRecursive,P as toStringDeepForce};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-INUFZJLX.cjs");exports.assertIsString=(e,s={})=>{if(r.isString(e))return;const t=r.resolveErrorMessageAssertions({value:e,options:s,requiredValidType:"string"});throw new TypeError(t)};
@@ -0,0 +1 @@
1
+ "use strict";var r=require("./chunk-INUFZJLX.cjs");exports.assertIsArray=function(e,s){if(r.isArray(e))return;const o=r.resolveErrorMessageAssertions({value:e,options:s,requiredValidType:"array"});throw new TypeError(o)};
@@ -0,0 +1 @@
1
+ "use strict";var i=require("./chunk-INUFZJLX.cjs");exports.isFinite=function(e){return i.isNumber(e)&&Number.isFinite(e)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./chunk-4VCRMMAH.cjs"),r=require("./chunk-5C2SMIGX.cjs"),t=require("./chunk-DQFU3KLE.cjs"),o=require("./chunk-INUFZJLX.cjs"),n=e=>{if(!o.isString(e)&&!o.isNumber(e))return 0;const r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0},s=(e={})=>{o.assertIsPlainObject(e,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!o.hasOwnProp(e,"convertBooleans")&&e.convertBooleans,n=!!o.hasOwnProp(e,"convertDates")&&e.convertDates,s=!!o.hasOwnProp(e,"convertNumbers")&&e.convertNumbers,i=!!o.hasOwnProp(e,"loggingOnFail")&&e.loggingOnFail,a=!!o.hasOwnProp(e,"removeEmptyArrays")&&e.removeEmptyArrays,c=!!o.hasOwnProp(e,"removeEmptyObjects")&&e.removeEmptyObjects,l=!!o.hasOwnProp(e,"removeNulls")&&e.removeNulls,u=!!o.hasOwnProp(e,"removeUndefined")&&e.removeUndefined,m=!!o.hasOwnProp(e,"strictMode")&&e.strictMode,p=!!o.hasOwnProp(e,"checkSymbols")&&e.checkSymbols,N=!!o.hasOwnProp(e,"convertNaN")&&e.convertNaN,v=o.hasOwnProp(e,"customDateFormats")?e.customDateFormats:[],d=o.hasOwnProp(e,"onError")?e.onError:r.noop;if(!(o.isBoolean(t)&&o.isBoolean(n)&&o.isBoolean(s)&&o.isBoolean(N)&&o.isBoolean(p)&&o.isBoolean(i)&&o.isBoolean(a)&&o.isBoolean(c)&&o.isBoolean(l)&&o.isBoolean(u)&&o.isBoolean(m)&&o.isArray(v)&&o.isFunction(d)))throw new TypeError(`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${o.getPreciseType(t)}\`, 'convertDates': \`${o.getPreciseType(n)}\`, 'convertNumbers': \`${o.getPreciseType(s)}\`, 'loggingOnFail': \`${o.getPreciseType(i)}\`, 'removeEmptyArrays': \`${o.getPreciseType(a)}\`, 'removeEmptyObjects': \`${o.getPreciseType(c)}\`, 'removeNulls': \`${o.getPreciseType(l)}\`, 'removeUndefined': \`${o.getPreciseType(u)}\`, 'strictMode': \`${o.getPreciseType(m)}\`, 'customDateFormats': \`${o.getPreciseType(v)}\`, 'onError': \`${o.getPreciseType(d)}\`].`);return{convertBooleans:t,convertDates:n,convertNumbers:s,convertNaN:N,loggingOnFail:i,removeEmptyArrays:a,removeEmptyObjects:c,removeNulls:l,removeUndefined:u,strictMode:m,customDateFormats:v,onError:d,checkSymbols:p}},i=(r,t={})=>{var n;const c=s(t);if(o.isNull(r))return c.removeNulls?void 0:null;if(!o.isUndefined(r)){if(o.isString(r)){const e=r.trim();if(c.convertNaN&&"NaN"===e)return NaN;if(c.convertNumbers&&!o.isNaN(Number(e)))return Number(e);if(c.convertBooleans){if("true"===e)return!0;if("false"===e)return!1}if(c.convertDates){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e))return new Date(e);if(null==(n=c.customDateFormats)?void 0:n.length)for(const r of c.customDateFormats){const t=a(e,r);if(t)return t}}return c.strictMode?void 0:e}if(o.isArray(r)){const t=r.map(e=>i(e,c)).filter(e=>!o.isUndefined(e));return c.removeEmptyArrays&&e.isEmptyArray(t)?void 0:t}if(o.isObject(r)){const t={};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const n=i(r[e],c);o.isUndefined(n)||(t[e]=n)}return c.removeEmptyObjects&&e.isEmptyObject(t,{checkSymbols:c.checkSymbols})?void 0:t}return c.strictMode?void 0:r}c.removeUndefined},a=(e,r)=>{if(!o.isNonEmptyString(e)||!o.isNonEmptyString(r))throw new TypeError(`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${o.getPreciseType(e)}\` - (current value: \`${t.safeStableStringify(e)}\`), 'format': \`${o.getPreciseType(r)}\` - (current value: \`${t.safeStableStringify(r)}\`)]".`);const n=e.split(/[-/]/).map(Number);if(3!==n.length||n.some(o.isNaN))return null;let s,i,a;if("DD/MM/YYYY"===r)[s,i,a]=n;else{if("MM/DD/YYYY"!==r)return null;[i,s,a]=n}i-=1;const c=new Date(a,i,s);return c.getFullYear()!==a||c.getMonth()!==i||c.getDate()!==s?null:c};exports.cleanParsedData=i,exports.extractDigits=n,exports.parseCustomDate=a,exports.safeJsonParse=function(e,r={}){if(o.isNull(e))return null;const t=s(r);if(t.convertNaN&&(o.isNaN(e)||o.isNonEmptyString(e)&&"NaN"===e))return NaN;if(t.convertNumbers&&!o.isNaN(Number(e))&&o.isNumber(n(e)))return Number(e);if(o.isString(e))try{let r=function(e){const r=new Set(["\\",'"',"/","b","f","n","r","t","u"]);let t="",o=!1,n=!1,s=!1;for(let i=0;i<e.length;i++){const a=e[i];if(s)o?"'"===a?t+="'":r.has(a)?t+="\\"===a?"\\\\":'"'===a?'\\"':"\\"+a:t+="\\\\"+a:n?'"'===a?t+='\\"':r.has(a)?t+="\\"+a:t+="\\\\"+a:t+="\\"+a,s=!1;else if("\\"!==a){if(o||n){if(o){if("'"===a){t+='"',o=!1;continue}}else if(n&&'"'===a){t+='"',n=!1;continue}}else{if("'"===a){t+='"',o=!0;continue}if('"'===a){t+='"',n=!0;continue}}t+=a}else s=!0}return t}(e);r=t.removeUndefined?r.replace(/,\s*"[^"]*"\s*:\s*undefined(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*undefined\s*(,)?/g,""):r.replace(/:\s*undefined(?=\s*[,}])/g,":null"),r=t.convertNaN?r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"'):r.replace(/:\s*NaN(?=\s*[,}])/g,':"NaN"').replace(/,\s*"[^"]*"\s*:\s*NaN(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*NaN\s*(,)?/g,""),r=r.replace(/,(\s*[}\]])/g,"$1");const o=JSON.parse(r);return i(o,t)}catch(e){return t.loggingOnFail&&console.error("Failed to parsing at `safeJsonParse`:",e),void t.onError(o.isError(e)?new Error(e.message.replace(/^JSON\.parse:/,"Failed to parsing")):new Error(String(e)))}};
@@ -0,0 +1 @@
1
+ import{isArray as r,resolveErrorMessageAssertions as o}from"./chunk-2UIRWYE3.js";function e(e,n){if(r(e))return;const t=o({value:e,options:n,requiredValidType:"array"});throw new TypeError(t)}export{e as assertIsArray};
@@ -1 +1 @@
1
- 'use strict';var chunkFWQVTMYA_cjs=require('../chunk-FWQVTMYA.cjs'),chunkZFDS7W6B_cjs=require('../chunk-ZFDS7W6B.cjs');require('../chunk-UA4B7JBO.cjs');var chunkXGZ6K753_cjs=require('../chunk-XGZ6K753.cjs');require('../chunk-ZQOLZE6Z.cjs'),require('../chunk-G7R5XZRM.cjs'),require('../chunk-UQDJF5RR.cjs');var chunkQSQDP7L2_cjs=require('../chunk-QSQDP7L2.cjs');require('../chunk-Q3NTKN5I.cjs'),require('../chunk-RV2VULM7.cjs'),require('../chunk-UTQUYABU.cjs'),require('../chunk-BEZPD44N.cjs');var chunk26W3VZIK_cjs=require('../chunk-26W3VZIK.cjs');require('../chunk-7YWAQOA4.cjs'),require('../chunk-CII6WWLO.cjs');Object.defineProperty(exports,"convertType",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.f}});Object.defineProperty(exports,"removeObjectPaths",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.g}});Object.defineProperty(exports,"toBooleanContent",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.b}});Object.defineProperty(exports,"toBooleanContentDeep",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.c}});Object.defineProperty(exports,"toBooleanExplicit",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.d}});Object.defineProperty(exports,"toBooleanLoose",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.e}});Object.defineProperty(exports,"toNumberArrayUnRecursive",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.a}});Object.defineProperty(exports,"toNumberDeep",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.h}});Object.defineProperty(exports,"toStringDeep",{enumerable:true,get:function(){return chunkFWQVTMYA_cjs.i}});Object.defineProperty(exports,"cleanParsedData",{enumerable:true,get:function(){return chunkZFDS7W6B_cjs.b}});Object.defineProperty(exports,"extractDigits",{enumerable:true,get:function(){return chunkZFDS7W6B_cjs.a}});Object.defineProperty(exports,"parseCustomDate",{enumerable:true,get:function(){return chunkZFDS7W6B_cjs.c}});Object.defineProperty(exports,"safeJsonParse",{enumerable:true,get:function(){return chunkZFDS7W6B_cjs.d}});Object.defineProperty(exports,"dedupeArray",{enumerable:true,get:function(){return chunkXGZ6K753_cjs.c}});Object.defineProperty(exports,"filterNilArray",{enumerable:true,get:function(){return chunkXGZ6K753_cjs.b}});Object.defineProperty(exports,"toStringArrayUnRecursive",{enumerable:true,get:function(){return chunkXGZ6K753_cjs.d}});Object.defineProperty(exports,"toStringDeepForce",{enumerable:true,get:function(){return chunkXGZ6K753_cjs.a}});Object.defineProperty(exports,"parseCurrencyString",{enumerable:true,get:function(){return chunkQSQDP7L2_cjs.a}});Object.defineProperty(exports,"safeStableStringify",{enumerable:true,get:function(){return chunk26W3VZIK_cjs.c}});
1
+ "use strict";var e=require("../chunk-GLUYWYOA.cjs"),r=require("../chunk-ZR7GTJQX.cjs");require("../chunk-7YVINA3U.cjs");var t=require("../chunk-7PG6YKIY.cjs");require("../chunk-EXWCTDC3.cjs"),require("../chunk-4VCRMMAH.cjs"),require("../chunk-YT3MSZKK.cjs");var n=require("../chunk-7BXIZM57.cjs");require("../chunk-YZR5OGJA.cjs"),require("../chunk-5C2SMIGX.cjs"),require("../chunk-EBMHQW7X.cjs"),require("../chunk-Y4O5KZF6.cjs");var o=require("../chunk-DQFU3KLE.cjs");require("../chunk-UDA26MCU.cjs"),require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"convertType",{enumerable:!0,get:function(){return e.convertType}}),Object.defineProperty(exports,"removeObjectPaths",{enumerable:!0,get:function(){return e.removeObjectPaths}}),Object.defineProperty(exports,"toBooleanContent",{enumerable:!0,get:function(){return e.toBooleanContent}}),Object.defineProperty(exports,"toBooleanContentDeep",{enumerable:!0,get:function(){return e.toBooleanContentDeep}}),Object.defineProperty(exports,"toBooleanExplicit",{enumerable:!0,get:function(){return e.toBooleanExplicit}}),Object.defineProperty(exports,"toBooleanLoose",{enumerable:!0,get:function(){return e.toBooleanLoose}}),Object.defineProperty(exports,"toNumberArrayUnRecursive",{enumerable:!0,get:function(){return e.toNumberArrayUnRecursive}}),Object.defineProperty(exports,"toNumberDeep",{enumerable:!0,get:function(){return e.toNumberDeep}}),Object.defineProperty(exports,"toStringDeep",{enumerable:!0,get:function(){return e.toStringDeep}}),Object.defineProperty(exports,"cleanParsedData",{enumerable:!0,get:function(){return r.cleanParsedData}}),Object.defineProperty(exports,"extractDigits",{enumerable:!0,get:function(){return r.extractDigits}}),Object.defineProperty(exports,"parseCustomDate",{enumerable:!0,get:function(){return r.parseCustomDate}}),Object.defineProperty(exports,"safeJsonParse",{enumerable:!0,get:function(){return r.safeJsonParse}}),Object.defineProperty(exports,"dedupeArray",{enumerable:!0,get:function(){return t.dedupeArray}}),Object.defineProperty(exports,"filterNilArray",{enumerable:!0,get:function(){return t.filterNilArray}}),Object.defineProperty(exports,"toStringArrayUnRecursive",{enumerable:!0,get:function(){return t.toStringArrayUnRecursive}}),Object.defineProperty(exports,"toStringDeepForce",{enumerable:!0,get:function(){return t.toStringDeepForce}}),Object.defineProperty(exports,"parseCurrencyString",{enumerable:!0,get:function(){return n.parseCurrencyString}}),Object.defineProperty(exports,"safeStableStringify",{enumerable:!0,get:function(){return o.safeStableStringify}});