@rzl-zone/utils-js 3.1.0-beta.2 → 3.1.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.
- package/README.md +56 -27
- package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +23 -23
- package/dist/any-BmdI8UbK.d.ts +56 -56
- package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +66 -66
- package/dist/assertions/index.cjs +1 -1
- package/dist/assertions/index.d.ts +396 -396
- package/dist/assertions/index.js +1 -1
- package/dist/chunk-26XIKDJI.cjs +1 -0
- package/dist/chunk-2NWHDDM5.js +1 -0
- package/dist/chunk-2UIRWYE3.js +1 -0
- package/dist/chunk-3KBHD3BS.cjs +1 -0
- package/dist/chunk-4HD2O5A4.js +1 -0
- package/dist/chunk-5C2SMIGX.cjs +1 -0
- package/dist/chunk-5I2B5DOG.js +1 -0
- package/dist/chunk-6HQDHIOD.js +1 -0
- package/dist/chunk-735HJXBT.cjs +1 -0
- package/dist/chunk-7BXIZM57.cjs +1 -0
- package/dist/chunk-7KJBDGEP.js +1 -0
- package/dist/chunk-7U44T63D.cjs +1 -0
- package/dist/chunk-AJ65QFV2.js +1 -0
- package/dist/chunk-APHDUCVQ.js +1 -0
- package/dist/chunk-BSVZRN7C.js +1 -0
- package/dist/chunk-C6JFHUR2.cjs +1 -0
- package/dist/chunk-CPLBRGST.js +1 -0
- package/dist/chunk-CTBRLEOG.js +1 -0
- package/dist/chunk-DUK2K4FB.js +1 -0
- package/dist/chunk-DVMHRLKP.cjs +1 -0
- package/dist/chunk-E63WVPZE.cjs +1 -0
- package/dist/chunk-EBMHQW7X.cjs +1 -0
- package/dist/chunk-EGNZCW4K.js +1 -0
- package/dist/chunk-FEKDB32T.js +1 -0
- package/dist/chunk-FIAAX3UE.js +1 -0
- package/dist/chunk-FUS3DVLB.cjs +1 -0
- package/dist/chunk-GGRMHIFJ.cjs +1 -0
- package/dist/chunk-HQ5GQTEE.js +1 -0
- package/dist/chunk-I5X5IN4H.js +1 -0
- package/dist/chunk-I7YGXQPI.cjs +1 -0
- package/dist/chunk-INUFZJLX.cjs +1 -0
- package/dist/chunk-IREHUBF7.js +1 -0
- package/dist/chunk-J2RGTPGK.cjs +1 -0
- package/dist/chunk-KHO2SBNA.cjs +1 -0
- package/dist/chunk-KXIXXSWX.cjs +1 -0
- package/dist/chunk-LBMEEJWA.js +1 -0
- package/dist/chunk-MC3LXMCQ.js +1 -0
- package/dist/chunk-MMSYCIJ2.cjs +1 -1
- package/dist/chunk-NU3N4WHD.cjs +1 -0
- package/dist/chunk-ODZQXH7E.cjs +1 -0
- package/dist/chunk-ONZFBJVW.js +1 -0
- package/dist/chunk-PXDRHFIE.js +1 -0
- package/dist/chunk-Q6NHYWVX.js +1 -0
- package/dist/chunk-QNKGP5DY.js +1 -0
- package/dist/chunk-S6Z6I2EG.cjs +1 -0
- package/dist/chunk-SMADKXZE.js +1 -0
- package/dist/chunk-TSLYDPBJ.js +1 -0
- package/dist/chunk-TVXADXCC.cjs +1 -0
- package/dist/chunk-UDA26MCU.cjs +1 -0
- package/dist/chunk-UET567YM.cjs +1 -0
- package/dist/chunk-VEYMQ3UA.js +1 -0
- package/dist/chunk-W2W3L2M5.js +1 -0
- package/dist/chunk-WBWTXKMC.cjs +1 -0
- package/dist/chunk-WVSPXFTY.js +1 -0
- package/dist/chunk-XC2PYCT4.cjs +1 -0
- package/dist/chunk-XIXA5KDF.cjs +1 -0
- package/dist/chunk-Y4O5KZF6.cjs +1 -0
- package/dist/chunk-YRM7IJLX.js +1 -0
- package/dist/chunk-YT3MSZKK.cjs +1 -0
- package/dist/chunk-YXHCULSO.cjs +1 -0
- package/dist/chunk-YZR5OGJA.cjs +1 -0
- package/dist/chunk-Z4DXK7A6.cjs +1 -0
- package/dist/chunk-ZXIWDFEQ.js +1 -0
- package/dist/conversions/index.cjs +1 -1
- package/dist/conversions/index.d.ts +1347 -1297
- package/dist/conversions/index.js +1 -1
- package/dist/env/index.cjs +1 -1
- package/dist/env/index.d.ts +14 -14
- package/dist/env/index.js +1 -1
- package/dist/events/index.cjs +1 -1
- package/dist/events/index.d.ts +109 -109
- package/dist/events/index.js +1 -1
- package/dist/extends-Bk_SBGdT.d.ts +330 -330
- package/dist/formatting/index.cjs +1 -1
- package/dist/formatting/index.d.ts +855 -855
- package/dist/formatting/index.js +1 -1
- package/dist/generator/index.cjs +1 -1
- package/dist/generator/index.d.ts +155 -155
- package/dist/generator/index.js +1 -1
- package/dist/if-CvT4R7Kh.d.ts +16 -16
- package/dist/is-array-Cymwrsmm.d.ts +1119 -0
- package/dist/isPlainObject-BVhBAPHX.d.ts +154 -154
- package/dist/never-BfayMBF9.d.ts +64 -64
- package/dist/next/index.cjs +1 -8
- package/dist/next/index.d.ts +183 -183
- package/dist/next/index.js +1 -8
- package/dist/next/server/index.cjs +1 -2
- package/dist/next/server/index.d.ts +25 -25
- package/dist/next/server/index.js +1 -2
- package/dist/nils-DMz3kU7M.d.ts +155 -155
- package/dist/omit-VvmIsZmX.d.ts +25 -25
- package/dist/operations/index.cjs +1 -1
- package/dist/operations/index.d.ts +120 -120
- package/dist/operations/index.js +1 -1
- package/dist/or-DyZCRvaU.d.ts +89 -0
- package/dist/parsers/index.cjs +1 -1
- package/dist/parsers/index.d.ts +34 -34
- package/dist/parsers/index.js +1 -1
- package/dist/predicates/index.cjs +1 -1
- package/dist/predicates/index.d.ts +1774 -1680
- package/dist/predicates/index.js +1 -1
- package/dist/prettify-C4xLcYOP.d.ts +328 -328
- package/dist/promise/index.cjs +1 -1
- package/dist/promise/index.d.ts +29 -29
- package/dist/promise/index.js +1 -1
- package/dist/rzl-utils.global.js +1 -4
- package/dist/string-XA-til3C.d.ts +318 -318
- package/dist/strings/index.cjs +1 -1
- package/dist/strings/index.d.ts +690 -690
- package/dist/strings/index.js +1 -1
- package/dist/tailwind/index.cjs +1 -0
- package/dist/tailwind/index.d.ts +565 -0
- package/dist/tailwind/index.js +1 -0
- package/dist/type-data-DDs-u2kq.d.ts +241 -241
- package/dist/types/index.d.ts +3266 -3266
- package/dist/urls/index.cjs +1 -1
- package/dist/urls/index.d.ts +373 -373
- package/dist/urls/index.js +1 -1
- package/package.json +24 -23
- package/dist/chunk-25G6B35W.js +0 -1
- package/dist/chunk-2AUUPGMN.js +0 -1
- package/dist/chunk-2JQQQ625.js +0 -1
- package/dist/chunk-445TAVT4.cjs +0 -1
- package/dist/chunk-467VEMJH.js +0 -1
- package/dist/chunk-56QBKKRE.js +0 -1
- package/dist/chunk-5SZUSNGZ.js +0 -1
- package/dist/chunk-6Q4I2RPC.cjs +0 -1
- package/dist/chunk-6SMJMZ7G.cjs +0 -1
- package/dist/chunk-7YWAQOA4.cjs +0 -1
- package/dist/chunk-BLCANGFS.js +0 -1
- package/dist/chunk-CK3BZGEU.js +0 -1
- package/dist/chunk-D43GV6EF.cjs +0 -1
- package/dist/chunk-DFSTVQFI.cjs +0 -1
- package/dist/chunk-DYRDBYPF.cjs +0 -1
- package/dist/chunk-ELDDNERR.js +0 -1
- package/dist/chunk-EXXLUO7L.cjs +0 -1
- package/dist/chunk-FIEZKTAZ.cjs +0 -1
- package/dist/chunk-G72VSVGO.js +0 -1
- package/dist/chunk-GAJTFCUA.js +0 -1
- package/dist/chunk-GOJNH55O.cjs +0 -1
- package/dist/chunk-HXST7RJB.js +0 -1
- package/dist/chunk-HXTACM3O.cjs +0 -1
- package/dist/chunk-IJTZWWRJ.cjs +0 -1
- package/dist/chunk-ISJ33O2J.cjs +0 -1
- package/dist/chunk-JISH2VGG.js +0 -1
- package/dist/chunk-JQZUWBIX.js +0 -1
- package/dist/chunk-K4PLGD7C.js +0 -1
- package/dist/chunk-KZQB7H4E.cjs +0 -1
- package/dist/chunk-LUVV5KSD.cjs +0 -2
- package/dist/chunk-LVUSFXQS.cjs +0 -1
- package/dist/chunk-ME5OV5HN.js +0 -1
- package/dist/chunk-MF5Y5K4N.cjs +0 -1
- package/dist/chunk-MJAW5RAK.js +0 -1
- package/dist/chunk-MWLEM7ED.js +0 -1
- package/dist/chunk-NNM7QCNB.js +0 -1
- package/dist/chunk-NSVLG7NY.js +0 -4
- package/dist/chunk-NUHOOAUN.cjs +0 -1
- package/dist/chunk-NUVGETPD.js +0 -2
- package/dist/chunk-O5VXBNUQ.cjs +0 -4
- package/dist/chunk-O7SJR4CY.cjs +0 -1
- package/dist/chunk-OX6RLS2F.cjs +0 -1
- package/dist/chunk-PFLNHD4B.cjs +0 -1
- package/dist/chunk-PSWITZK5.js +0 -1
- package/dist/chunk-PUQXRLZH.cjs +0 -1
- package/dist/chunk-PYUVKHUF.cjs +0 -1
- package/dist/chunk-REFMEB4A.js +0 -1
- package/dist/chunk-RHE3M2NJ.cjs +0 -1
- package/dist/chunk-RHIBYOFQ.js +0 -1
- package/dist/chunk-RV2VULM7.cjs +0 -1
- package/dist/chunk-S7GMG4TB.js +0 -1
- package/dist/chunk-SW6HYEW7.cjs +0 -1
- package/dist/chunk-SYJC7UAW.js +0 -1
- package/dist/chunk-TQMZ2LPI.js +0 -1
- package/dist/chunk-U4TZO7WV.js +0 -1
- package/dist/chunk-UUMKL74S.js +0 -1
- package/dist/chunk-VQLAPEL3.js +0 -1
- package/dist/chunk-VTR75UID.cjs +0 -1
- package/dist/chunk-XFCJDSB2.cjs +0 -1
- package/dist/chunk-XOYX4PLZ.cjs +0 -1
- package/dist/chunk-Z6FLCEN6.js +0 -1
- package/dist/chunk-ZO5364A6.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/is-array--YjXV-Wx.d.ts +0 -1207
- package/dist/stylings/index.cjs +0 -1
- package/dist/stylings/index.d.ts +0 -41
- package/dist/stylings/index.js +0 -1
package/dist/assertions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{assertIsBigInt,assertIsNumber}from"../chunk-I5X5IN4H.js";export{assertIsArray}from"../chunk-ZXIWDFEQ.js";export{assertIsString}from"../chunk-W2W3L2M5.js";import"../chunk-QNKGP5DY.js";export{assertIsBoolean,assertIsPlainObject}from"../chunk-2UIRWYE3.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var s=require("./chunk-INUFZJLX.cjs"),a=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),t=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]);exports.extractFileName=r=>{if(!s.isNonEmptyString(r))return;let e=r.split("/").pop();if(""===e)return"";if(e){for(const s of t){const a=`.${s}`;if(e.toLowerCase().endsWith(a))return e.slice(0,-a.length)}for(;;){const s=e.lastIndexOf(".");if(-1===s)break;const t=e.slice(s+1).toLowerCase();if(!a.has(t))break;e=e.slice(0,s)}return e}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNumber as r,isString as e,getPreciseType as t,isNonEmptyString as i}from"./chunk-2UIRWYE3.js";var n=(i,n,a)=>{if(!r(i)||!e(a)||!e(n))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': \`${t(i)}\`, 'originalString': \`${t(n)}\`, 'replaceTo': \`${t(a)}\`]".`);if(i<0||i>=n.length)throw new RangeError("First parameter (`index`) is out of range from second parameter (`originalString`).");return n.slice(0,i)+a+n.slice(i+1)},a=r=>{if(!i(r))return"";const e=(r=r.replace(/\s+/g," ").trim()).split(" ");return e.length>1?e[0][0]+e[1][0].toUpperCase():r.length>1?r.substring(0,2).toUpperCase():r[0].toUpperCase()};export{a as getInitialsName,n as replaceAt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>"boolean"==typeof e,r=e=>"function"==typeof e;function t(e){return null==e}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&!t(e)&&!o(e)}function n(e){if(!a(e))return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||null===r}var i=e=>"string"==typeof e;function s(e){return a(e)&&"[object Number]"===Object.prototype.toString.call(e)}function l(e){return"number"==typeof e?Number.isNaN(e):s(e)&&Number.isNaN(e.valueOf())}var c=e=>null===e,u=(r,t={})=>{if(e(r))return;const o=_({value:r,options:t,requiredValidType:"boolean"});throw new TypeError(o)},f=(r,t={})=>{k(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!(!n(t)||!e(t.includeNaN))&&t.includeNaN;u(o,{message:({currentType:e,validType:r})=>`Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a="number"==typeof r;return o?a:a&&!Number.isNaN(r)},m=e=>"symbol"==typeof e,p=e=>void 0===e;function y(e){return o(e)||a(e)}function b(e,t,o={}){if(!i(e)&&!y(e)&&!r(e))return!1;k(o,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const a=void 0===o.discardUndefined||o.discardUndefined,n=void 0!==o.discardNull&&o.discardNull;u(a,{message:({currentType:e,validType:r})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),u(n,{message:({currentType:e,validType:r})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const s=[];if(i(t)&&t.trim().length>0||f(t,{includeNaN:!0})){(f(t,{includeNaN:!0})?String(t):t).split(".").forEach(e=>{const r=e.match(/^\[(\d+)\]$/),t=e.match(/^Symbol\((.+)\)$/);r?s.push(Number(r[1])):t?s.push(Symbol.for(t[1])):l(Number(e))?s.push(e):s.push(Number(e))})}else{if(!m(t))return!1;s.push(t)}let b=i(e)&&e.trim().length>0?Object(e):e;for(const e of s)if(i(e)&&e.trim().length>0||f(e,{includeNaN:!0})){if(c(b)||!Object.prototype.hasOwnProperty.call(b,e))return!1;b=b[e]}else{if(!m(e))return!1;{if(c(b)||"object"!=typeof b&&!r(b))return!1;const t=Object.getOwnPropertySymbols(b).find(r=>r===e||r.description===e.description);if(!t)return!1;b=b[t]}}return(!a||!p(b))&&(!n||!c(b))}var d=(e,r={})=>{if(!i(e))return!1;k(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!b(r,"trim")||r.trim;u(t,{message:({currentType:e,validType:r})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});return(t?e.trim():e).length>0};function g(e){return"[object Set]"===Object.prototype.toString.call(e)||e instanceof Set}function v(e){return Array.isArray(e)&&e.length>0}var h=(e,r={lowerCaseNextRest:!0,trim:!1})=>{if(!d(e))return"";n(r)||(r={});const t=!1!==r.lowerCaseNextRest;return!0===r.trim&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},j=(e,r={collapseSpaces:!1,trim:!1})=>{var t,o;if(!d(e))return"";let a=e;n(r)||(r={});const i=!0===r.collapseSpaces;if(!0===r.trim&&(a=a.trim()),i){const e=(null==(t=a.match(/^\s*/))?void 0:t[0])??"",r=(null==(o=a.match(/\s*$/))?void 0:o[0])??"";a=a.trim().replace(/\s+/g," "),a=`${e}${a}${r}`}return a.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},S=e=>{let r="";return o(e)?r=e.map(e=>d(e)?e.trim():"").filter(e=>e.length).join("-"):d(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)},C=e=>{const r=new Set([]),t=e=>e.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(d(e)){const o=t(e);o&&r.add(o)}return v(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),g(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),r},N=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map((e,r)=>o.has(e)?e:0===r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},w=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")},T=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},A=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(" ")},O=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-")},P=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("_")},R=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(".")},L=(e,r)=>{if(!v(e)&&!d(e))return"";const t=S(e),o=C(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-").replace(/^-+|-+$/g,"")},E=e=>"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error,I=e=>"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e),$=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]);function U(e){return a(e)&&"[object String]"===Object.prototype.toString.call(e)}function B(e){return a(e)&&"[object Boolean]"===Object.prototype.toString.call(e)}function F(e){if("number"==typeof e||s(e)){const r=Number(e);return r===1/0||r===-1/0}return!1}var D=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),x=Object.entries({string:"String",number:"Number",boolean:"Boolean",bigint:"Big Int",symbol:"Symbol",undefined:"Undefined",null:"Null",regexp:"Reg Exp",reflect:"Reflect",proxy:"Proxy",atomics:"Atomics",object:"Object",array:"Array",arguments:"Arguments",function:"Function",asyncfunction:"Async Function",generatorfunction:"Generator Function",asyncgeneratorfunction:"Async Generator Function",generator:"Generator",promise:"Promise",evalerror:"Eval Error",rangeerror:"Range Error",referenceerror:"Reference Error",syntaxerror:"Syntax Error",typeerror:"Type Error",urierror:"URI Error",aggregateerror:"Aggregate Error",error:"Error",int8array:"Int 8 Array",uint8array:"Uint 8 Array",uint8clampedarray:"Uint 8 Clamped Array",int16array:"Int 16 Array",uint16array:"Uint 16 Array",int32array:"Int 32 Array",uint32array:"Uint 32 Array",float32array:"Float 32 Array",float64array:"Float 64 Array",bigint64array:"Big Int 64 Array",biguint64array:"Big Uint 64 Array",arraybuffer:"Array Buffer",sharedarraybuffer:"Shared Array Buffer",dataview:"Data View",arraybufferview:"Array Buffer View",map:"Map",set:"Set",weakmap:"Weak Map",weakset:"Weak Set",mapiterator:"Map Iterator",setiterator:"Set Iterator",arrayiterator:"Array Iterator",stringiterator:"String Iterator",readablestream:"Readable Stream",writablestream:"Writable Stream",transformstream:"Transform Stream",readablestreamdefaultreader:"Readable Stream Default Reader",writablestreamdefaultwriter:"Writable Stream Default Writer",readablestreamdefaultcontroller:"Readable Stream Default Controller",transformstreamdefaultcontroller:"Transform Stream Default Controller",abortcontroller:"Abort Controller",abortsignal:"Abort Signal",fetch:"fetch",request:"Request",response:"Response",headers:"Headers",formdata:"FormData",blob:"Blob",file:"File",filelist:"FileList",filereader:"FileReader",intl:"Intl",collator:"Intl. Collator",datetimeformat:"Intl. Date Time Format",listformat:"Intl. List Format",numberformat:"Intl. Number Format",pluralrules:"Intl. Plural Rules",relativetimeformat:"Intl. Relative Time Format",segmenter:"Intl. Segmenter",locale:"Intl. Locale",displaynames:"Intl. Display Names",finalizationregistry:"Finalization Registry",weakref:"Weak Ref",structuredclone:"structured Clone",urlpattern:"URL Pattern",performance:"Performance",performanceobserver:"Performance Observer",performanceentry:"Performance Entry",performancemark:"Performance Mark",performancemeasure:"Performance Measure",webassembly:"Web Assembly",wasmmodule:"WebAssembly .Module",wasminstance:"WebAssembly. Instance",wasmmemory:"WebAssembly. Memory",wasmtable:"WebAssembly. Table",buffer:"Buffer",process:"Process",eventemitter:"Event Emitter",stream:"Stream",fs:"fs",path:"path",url:"URL",urlsearchparams:"URL Search Params",node:"Node",element:"Element",htmlelement:"HTML Element",svgelement:"SVG Element",document:"Document",documentfragment:"Document Fragment",shadowroot:"Shadow Root",nodelist:"Node List",htmlcollection:"HTML Collection",mutationobserver:"Mutation Observer",intersectionobserver:"Intersection Observer",resizeobserver:"Resize Observer"}).reduce((e,[r,t])=>(e[D(r)]=t,e),{});var M=(e,r)=>"toPascalCaseSpace"===r?w(e,$):"slugify"===r?L(e,$):"toCamelCase"===r?N(e,$):"toDotCase"===r?R(e,$):"toKebabCase"===r?O(e,$):"toPascalCase"===r?T(e,$):"toSnakeCase"===r?P(e,$):A(e,$),W=(e,t={formatCase:"toLowerCase"})=>{var o,i;n(t)||(t={});const u=t.formatCase;if(c(e))return M(x[D("null")]??"Null",u);if(l(e))return"NaN";if(F(e))return String(e);if(s(e))return M("Number Constructor",u);if(U(e))return M("String Constructor",u);if(B(e))return M("Boolean Constructor",u);const f=typeof e;if(!y(e)&&!r(e))return M(x[D(f)]??f,u);if(I(e))return M(x[D("buffer")]??"Buffer",u);if(function(e){if("object"!=typeof e||null===e)return!1;const r=Object.prototype.toString.call(e);if(["[object Array]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]","[object Function]","[object Error]","[object Promise]","[object Generator]","[object GeneratorFunction]","[object AsyncFunction]"].includes(r))return!1;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return!0}}(e))return M(x[D("proxy")]??"Proxy",u);if(a(e)&&r(null==e?void 0:e.next)&&r(null==e?void 0:e.throw))return M(x[D("generator")]??"Generator",u);if(E(e)){const r=(null==(o=e.constructor)?void 0:o.name)??"Error";return M(x[D(r)]??x[D(r.replace(/\s+/g,""))]??r,u)}if(c(Object.getPrototypeOf(e)))return M(x[D("object")]??"Object",u);const m=Object.prototype.toString.call(e).slice(8,-1)||"Object",p=x[D(m)];if(p)return M(p,u);const b=null==(i=null==e?void 0:e.constructor)?void 0:i.name;return M(b&&"Object"!==b?x[D(b)]??b:m,u)};function _(e){const{requiredValidType:t,value:o,options:a}=e||{},{message:i,formatCase:s}=n(a)?a:{},l=O(t),c=W(o,{formatCase:s}),u={currentType:c,validType:l},f=`Parameter input (\`value\`) must be of type \`${l}\`, but received: \`${c}\`.`;return r(i)?d(i(u))?i(u).trim():f:d(i)?i.trim():f}function k(e,r={}){if(n(e))return;const t=_({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}export{u as assertIsBoolean,k as assertIsPlainObject,h as capitalizeFirst,j as capitalizeWords,W as getPreciseType,b as hasOwnProp,o as isArray,e as isBoolean,B as isBooleanObject,I as isBuffer,E as isError,r as isFunction,F as isInfinityNumber,l as isNaN,t as isNil,v as isNonEmptyArray,d as isNonEmptyString,c as isNull,f as isNumber,s as isNumberObject,a as isObject,y as isObjectOrArray,n as isPlainObject,g as isSet,i as isString,U as isStringObject,m as isSymbol,p as isUndefined,_ as resolveErrorMessageAssertions,L as slugify,N as toCamelCase,R as toDotCase,O as toKebabCase,A as toLowerCase,T as toPascalCase,w as toPascalCaseSpace,P as toSnakeCase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-WBWTXKMC.cjs"),r=require("./chunk-YXHCULSO.cjs"),t=require("./chunk-Z4DXK7A6.cjs"),i=require("./chunk-YT3MSZKK.cjs"),s=require("./chunk-EBMHQW7X.cjs"),n=require("./chunk-Y4O5KZF6.cjs"),o=require("./chunk-E63WVPZE.cjs"),a=require("./chunk-UDA26MCU.cjs"),m=require("./chunk-INUFZJLX.cjs");var y=e=>!m.isNil(e)&&(m.isString(e)?m.isNonEmptyString(e):m.isBoolean(e)?e:m.isNumber(e,{includeNaN:!0})?0!==e:m.isArray(e)?e.some(y):!!m.isObject(e)&&Object.values(e).some(y)),p=(e,r)=>{if(!m.isObjectOrArray(e))return e;const[i,...s]=r;if(m.isArray(e))for(const t of e)m.isObjectOrArray(t)&&p(t,r);else t.isEmptyArray(s)?m.isPlainObject(e)&&delete e[i]:m.isPlainObject(e)&&m.isObjectOrArray(e[i])&&p(e[i],s);return e},c=(e,r)=>{if(!m.isPlainObject(e))return e;const[t,...i]=r;return 0===i.length?m.isPlainObject(e)&&delete e[t]:m.isPlainObject(e[t])&&c(e[t],i),e};exports.convertType=e=>{const r={undefined:void 0,null:null,nan:NaN,true:!0,false:!1,yes:!0,no:!1};if(m.isString(e)){const t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];const i=t.replace(/,/g,""),s=Number(i);return!m.isNaN(s)&&m.isNonEmptyString(i)?s:e.trim()}return e},exports.removeObjectPaths=function(e,r,s=!0){if(t.isEmptyObject(e,{checkSymbols:!0}))return{};if(i.assertIsArray(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: \`${o.safeStableStringify(r)}\`.`}),!r.every(e=>m.isPlainObject(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: \`${o.safeStableStringify(r)}\`.`);let a=s?(e=>{try{if(m.isFunction(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))})(e):e;for(const{key:e,deep:t}of r){if(n.assertIsString(e,{message:({currentType:e,validType:r})=>`Parameter \`key\` at Second Parameter (\`keysToDelete\`) must be of type \`${r}\`, but received: \`${e}\`.`}),!m.isUndefined(t)&&!m.isBoolean(t))throw new TypeError(`Parameter \`deep\` at Second Parameter (\`keysToDelete\`) ➔ (key: "${e}", deep: ${t}) must be of type \`boolean\` or \`undefined\`, but received: \`${m.getPreciseType(t)}\`.`);const r=e.split(".");a=t?p(a,r):c(a,r)}return a},exports.toBooleanContent=r=>!m.isNil(r)&&(m.isString(r)?m.isNonEmptyString(r):m.isBoolean(r)?r:m.isNumber(r,{includeNaN:!0})?0!==r:m.isArray(r)||m.isObject(r)?e.isNonEmptyValue(r):Boolean(r)),exports.toBooleanContentDeep=y,exports.toBooleanExplicit=(e,r={})=>{if(m.isNil(e))return!1;m.isPlainObject(r)||(r={});const t=!!m.hasOwnProp(r,"caseInsensitive")&&r.caseInsensitive,i=!m.hasOwnProp(r,"trimString")||r.trimString,s=!!m.hasOwnProp(r,"includeIndeterminate")&&r.includeIndeterminate;if(!m.isBoolean(t)||!m.isBoolean(i)||!m.isBoolean(s))throw new TypeError(`Parameters \`caseInsensitive\`, \`trimString\` and \`includeIndeterminate\` property of the \`options\` (second parameter) expected to be a \`boolean\` type, but received: ['caseInsensitive': \`${m.getPreciseType(t)}\`, 'trimString': \`${m.getPreciseType(i)}\`, 'includeIndeterminate': \`${m.getPreciseType(s)}\`].`);if(m.isString(e)){let r=e;i&&(r=r.trim()),t&&(r=r.toLowerCase());const n=["true","on","yes","1"];return s&&n.push("indeterminate"),n.includes(r)}return m.isNumber(e)?1===e:!!m.isBoolean(e)&&e},exports.toBooleanLoose=e=>!m.isNil(e)&&(m.isString(e)?!s.isEmptyString(e):m.isBoolean(e)?e:m.isNumber(e,{includeNaN:!0})?0!==e:m.isArray(e)?e.length>0:Boolean(e)),exports.toNumberArrayUnRecursive=function(e,t={}){m.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const i=!m.hasOwnProp(t,"removeInvalidValueNumber")||t.removeInvalidValueNumber;if(m.assertIsBoolean(i,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValueNumber\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),m.isArray(e)){const t=Array.from(e,e=>{if(a.isBigInt(e))return Number(e);const r=String(e).trim().match(/-?\d+(\.\d+)?/);return r?Number(r[0]):m.isNull(e)?null:void 0});return i?r.filterNilArray(t):t}},exports.toNumberDeep=function(r,i={}){return m.assertIsPlainObject(i,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(i,s){if(m.isNil(i)||t.isRegExp(i))return;const{removeEmptyArrays:n,removeEmptyObjects:a,isRoot:y}=s;if(!m.isBoolean(a)||!m.isBoolean(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${m.getPreciseType(a)}\`, 'removeEmptyArrays': \`${m.getPreciseType(n)}\`].`);if(m.isNumber(i)||m.isBoolean(i)||m.isNonEmptyString(i)){const e=Number(i);return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e}if(m.isNumberObject(i)||m.isStringObject(i)||m.isBooleanObject(i)){const e=Number(i.valueOf());return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e}if(o.isDate(i,{skipInvalidDate:!0}))try{return m.isNaN(i.getTime())?0:i.getTime()}catch{return 0}if(m.isBuffer(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(e.isTypedArray(i)){if(i instanceof BigInt64Array||i instanceof BigUint64Array){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}{const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}}if(m.isSet(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(o.isMap(i)){let e=Array.from(i.entries()).map(([e,t])=>{const i=r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1}),s=r(t,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});return m.isUndefined(i)||m.isUndefined(s)?void 0:[i,s]}).filter(e=>!m.isUndefined(e));if(n&&(e=e.filter(e=>!t.isEmptyArray(e))),n&&t.isEmptyArray(e))return;return e}if(m.isArray(i)){const e=i.map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(m.isObject(i)){const e={};for(const[t,s]of Object.entries(i)){const i=r(s,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});m.isUndefined(i)||(e[t]=i)}return a&&t.isEmptyObject(e)?y?{}:void 0:e}}(r,{removeEmptyObjects:!!m.hasOwnProp(i,"removeEmptyObjects")&&i.removeEmptyObjects,removeEmptyArrays:!!m.hasOwnProp(i,"removeEmptyArrays")&&i.removeEmptyArrays,isRoot:!0})},exports.toStringDeep=function(r,i={}){return m.assertIsPlainObject(i,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`}),function r(i,s){if(m.isNil(i)||m.isInfinityNumber(i))return;const{removeEmptyArrays:n,removeEmptyObjects:a,isRoot:y}=s;if(!m.isBoolean(a)||!m.isBoolean(n))throw new TypeError(`Parameters \`removeEmptyObjects\` and \`removeEmptyArrays\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['removeEmptyObjects': \`${m.getPreciseType(a)}\`, 'removeEmptyArrays': \`${m.getPreciseType(n)}\`].`);if(m.isNumber(i)||m.isString(i)||m.isBoolean(i))return String(i);if(m.isNumberObject(i)){const e=i.valueOf();return m.isInfinityNumber(e)||m.isNaN(e)?void 0:e.toString()}if(m.isStringObject(i))return i.valueOf();if(m.isBooleanObject(i))return i.valueOf().toString();if(o.isDate(i,{skipInvalidDate:!0}))try{return i.toISOString()}catch{return i.toString()}if(t.isRegExp(i))return i.toString();if(m.isBuffer(i))return Array.from(i).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(e.isTypedArray(i)){if(i instanceof BigInt64Array||i instanceof BigUint64Array){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}{const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).map(e=>String(e)).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}}if(m.isSet(i)){const e=Array.from(i).map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&t.isEmptyArray(e))return;return e}if(o.isMap(i)){const e=Array.from(i.entries()).map(([e,t])=>[r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1}),r(t,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})]).filter(([e,r])=>!m.isUndefined(e)&&!m.isUndefined(r));if(n&&t.isEmptyArray(e))return;return e}if(m.isArray(i)){let e=i.map(e=>r(e,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1})).filter(e=>!m.isUndefined(e));if(n&&(e=e.filter(e=>!(m.isArray(e)&&0===e.length))),n&&t.isEmptyArray(e))return;return e}if(m.isObject(i)){const e={};for(const[t,s]of Object.entries(i)){const i=r(s,{removeEmptyObjects:a,removeEmptyArrays:n,isRoot:!1});m.isUndefined(i)?m.isArray(s)&&!n&&(e[t]=[]):e[t]=i}return a&&0===Object.keys(e).length?y?{}:void 0:e}}(r,{removeEmptyObjects:!!m.hasOwnProp(i,"removeEmptyObjects")&&i.removeEmptyObjects,removeEmptyArrays:!!m.hasOwnProp(i,"removeEmptyArrays")&&i.removeEmptyArrays,isRoot:!0})};
|
|
@@ -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-AJ65QFV2.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:",",F=l(n,"separator")?n.separator:".";if(!(s(F)&&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(F)}\`, '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 E=s(r)?e(r):r;if(d(E))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let C="",N="",P=Math.abs(E);const x=Math.pow(10,g);if(D){const e=P*x;switch(D){case"round":P=Math.round(e)/x;break;case"ceil":P=Math.ceil(e)/x;break;case"floor":P=Math.floor(e)/x}}if(D)[C,N]=P.toFixed(g).split("."),N=N??"".padEnd(g,"0");else{const e=String(P).split(".");C=e[0],N=(e[1]||"").slice(0,g).padEnd(g,"0")}let j;if(v?(F=",",S=".",j=(w.trim().length?w:"")+M(C,F)):j=(w.trim().length?w:"")+C.replace(/\B(?=(\d{3})+(?!\d))/g,F),b&&!f(N)&&g>0){let e=S+N;$&&(e+=T),j+=e}if(E<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},F=(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 E(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 C=(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}},N=(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}},P=(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`${A(n,f,.6,d)}@${A(s,y,.5,d)}.${m.length<=2?m:A(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,A=(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 O(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,O as chunkString,S as formatCurrency,P as formatDateFns,N as formatDateIntl,C as formatDateTime,F as formatNumber,E as formatPhoneNumber,x as getGMTOffset,V as truncateString};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.noop=()=>{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isServer as e}from"./chunk-MC3LXMCQ.js";import{assertIsString as t}from"./chunk-W2W3L2M5.js";import{isPlainObject as o,hasOwnProp as s,isNonEmptyString as r,isNumber as i}from"./chunk-2UIRWYE3.js";var n=(o="on_processing")=>{if(e())return;t(o,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:s}=document;s&&!s.classList.contains(o)&&s.classList.add(o)},m=(o="on_processing")=>{if(e())return;t(o,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:s}=document;s&&s.classList.contains(o)&&s.classList.remove(o)},c=()=>{if(e())return;const t=document.activeElement;t instanceof HTMLElement&&t.blur()},a=t=>{if(e())return;o(t)||(t={});const n=s(t,"behavior")&&r(t.behavior)&&["auto","instant","smooth"].includes(t.behavior.trim())?t.behavior:"smooth";let m=s(t,"timeout")&&i(t.timeout)&&t.timeout>=1?t.timeout:1;m=m>2147483647?2147483647:m,setTimeout(()=>window.scrollTo({top:0,left:0,behavior:n}),m)};export{n as disableUserInteraction,m as enableUserInteraction,c as removeElementFocus,a as scrollToTop};
|
|
@@ -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-AJ65QFV2.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
|
+
"use strict";var e=require("./chunk-KHO2SBNA.cjs"),r=require("./chunk-WBWTXKMC.cjs"),t=require("./chunk-Z4DXK7A6.cjs"),s=require("./chunk-7BXIZM57.cjs"),i=require("./chunk-EBMHQW7X.cjs"),n=require("./chunk-Y4O5KZF6.cjs"),a=require("./chunk-E63WVPZE.cjs"),o=require("./chunk-INUFZJLX.cjs");function u(e){const r=typeof e;return"string"===r||"number"===r||"symbol"===r}var c=(e,r)=>{if(!o.isObjectOrArray(e))return!1;if(!u(r))throw new TypeError(`Second Parameter (\`key\`) must be of type \`string\`, \`number\` or \`symbol\`, but received: \`${o.getPreciseType(r)}\`.`);return!!Object.prototype.hasOwnProperty.call(e,r)||(o.isArray(e)?e.some(e=>c(e,r)):Object.values(e).some(e=>o.isObjectOrArray(e)&&c(e,r)))},p=e=>"[object Arguments]"===Object.prototype.toString.call(e);function y(e){return"number"==typeof e&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}var f=(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(a.isDate(e)&&a.isDate(r))return e.getTime()===r.getTime();if(t.isRegExp(e)&&t.isRegExp(r))return e.toString()===r.toString();if(o.isSymbol(e)&&o.isSymbol(r))return e.toString()===r.toString();if(o.isSet(e)&&o.isSet(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const r of e){let e=!1;for(let i=0;i<t.length;i++)if(!s.has(i)&&f(r,t[i])){s.add(i),e=!0;break}if(!e)return!1}return!0}if(a.isMap(e)&&a.isMap(r)){if(e.size!==r.size)return!1;const t=Array.from(r),s=new Set;for(const[r,i]of e){let e=!1;for(let n=0;n<t.length;n++){if(s.has(n))continue;const[a,o]=t[n];if(f(r,a)&&f(i,o)){s.add(n),e=!0;break}}if(!e)return!1}return!0}if(o.isArray(e)&&o.isArray(r))return e.length===r.length&&e.every((e,t)=>f(e,r[t]));if(o.isObjectOrArray(e)&&o.isObjectOrArray(r)&&e&&r){if(o.isArray(e)!==o.isArray(r))return!1;const t=Object.keys(e),s=Object.keys(r);return t.length===s.length&&t.every(t=>f(e[t],r[t]))}return!1};var l=e=>{if(o.isString(e))return i.isEmptyString(e);if(o.isNumber(e))return o.isNaN(e);if(o.isArray(e))return t.isEmptyArray(e)||e.every(l);if(o.isObjectOrArray(e)){const r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return 0===r.length&&0===t.length||[...r,...t].every(r=>l(e[r]))}return!e};function m(e,r,t){return g(e,r,t)}function b(e,r){return e===r||0===e&&0===r||Number.isNaN(e)&&Number.isNaN(r)}function g(e,r,t){if(e===r)return!0;if(!o.isObjectOrArray(r))return b(e,r);if(!o.isObjectOrArray(e))return!1;const s=Reflect.ownKeys(r).filter(e=>!(o.isArray(r)&&"length"===e));for(const i of s){if(!(i in e))return!1;const s=e[i],n=r[i],a=null==t?void 0:t(s,n,i,e,r);if(o.isUndefined(a)){if(o.isObjectOrArray(s)&&o.isObjectOrArray(n)){if(!m(s,n,t))return!1}else if(!b(s,n))return!1}else if(!a)return!1}return!0}var h=Function.prototype.toString,d=/\{\s*\[native code\]\s*\}/;exports.areArraysEqual=(e,r,s=!1)=>{if(!o.isArray(e)||!o.isArray(r))throw new TypeError(`Parameters \`array1\` and \`array2\` property of the \`options\` (second parameter) must be of type \`array\`, but received: ['array1': \`${o.getPreciseType(e)}\`, 'array2': \`${o.getPreciseType(r)}\`].`);if(o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Third parameter \`ignoreOrder\` must be of type \`${r}\`, but received: \`${e}\`.`}),!t.isEqual(e.length,r.length))return!1;const i=e=>{if(!o.isArray(e))return e;return e.map(e=>o.isArray(e)?i(e):e).sort((e,r)=>{const t=a.safeStableStringify(e),s=a.safeStableStringify(r);return t<s?-1:t>s?1:0})},n=s?i(e):e,u=s?i(r):r;return!!t.isEqual(n.length,u.length)&&n.every((e,r)=>a.safeStableStringify(e)===a.safeStableStringify(u[r]))},exports.areObjectsEqual=(e,r)=>t.isEqual(e,r),exports.areURLsEqualPath=(r,t)=>{if(!e.isURL(r)||!e.isURL(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},exports.areURLsIdentical=(r,t)=>{if(!e.isURL(r)||!e.isURL(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},exports.arrayHasAnyMatch=(e,r)=>{if(!o.isArray(e)||!o.isArray(r)||t.isEmptyArray(e)||t.isEmptyArray(r))return!1;const s=new Set(e);return r.some(e=>s.has(e))},exports.doesKeyExist=c,exports.isArguments=p,exports.isArrayLike=function(e){return!o.isFunction(e)&&o.isObjectOrArray(e)&&y(null==e?void 0:e.length)},exports.isArrayLikeObject=function(e){return o.isObjectOrArray(e)&&y(e.length)},exports.isCurrencyLike=e=>{if(!o.isString(e)&&!o.isNumber(e))return!1;return 0!==s.parseCurrencyString(e.toString())||"0"===e.toString().trim()},exports.isDeepEqual=f,exports.isElement=function(e){return!!e&&"object"==typeof e&&1===(null==e?void 0:e.nodeType)&&!o.isPlainObject(e)},exports.isEmpty=function(e){return!!o.isNil(e)||(!!(o.isBoolean(e)||o.isNumber(e,{includeNaN:!0})||o.isSymbol(e))||(o.isFunction(e)?0===Object.keys(e).length:o.isString(e)||o.isArray(e)||p(e)||r.isTypedArray(e)?0===e.length:a.isMap(e)||o.isSet(e)?0===e.size:o.isBuffer(e)?0===e.length:!!o.isPlainObject(e)&&0===Object.keys(e).length))},exports.isEmptyDeep=l,exports.isEqualWith=function(e,r,s){return t.baseDeepEqual(e,r,s,new WeakMap)},exports.isLength=y,exports.isMatch=function(e,r){return g(e,r)},exports.isMatchWith=m,exports.isNative=function(e){if(!o.isFunction(e))return!1;try{const r=h.call(e);return d.test(r)}catch{return!1}},exports.isObjectLoose=function(e){return!o.isNil(e)&&(o.isObjectOrArray(e)||o.isFunction(e))},exports.isPropertyKey=u,exports.isSafeInteger=function(e){return"number"==typeof e&&Number.isSafeInteger(e)},exports.isValidURL=e=>{if(!o.isNonEmptyString(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)},exports.isWeakMap=function(e){return o.isObject(e)&&!o.isNull(e)&&e instanceof WeakMap},exports.textContainsAll=(e,r,t={})=>{if(!o.isNonEmptyString(e)||!o.isArray(r))return!1;o.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:i="i"}=t;o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),n.assertIsString(i,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>o.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return 0!==a.length&&a.every(r=>new RegExp(s?`(?<!\\S)${r}(?!\\S)`:r,i.includes("u")?i:i+"u").test(e))},exports.textContainsAny=(e,r,t={})=>{if(!o.isNonEmptyString(e)||!o.isArray(r))return!1;o.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const{exactMatch:s=!1,flags:i="i"}=t;o.assertIsBoolean(s,{message:({currentType:e,validType:r})=>`Parameter \`exactMatch\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),n.assertIsString(i,{message:({currentType:e,validType:r})=>`Parameter \`flags\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a=r.filter(e=>o.isNonEmptyString(e)).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));if(0===a.length)return!1;const u=s?`(?<!\\S)(${a.join("|")})(?!\\S)`:`(${a.join("|")})`;return new RegExp(u,i.includes("u")?i:i+"u").test(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-INUFZJLX.cjs");exports.parseCurrencyString=l=>{if(!e.isNonEmptyString(l))return 0;let c=l.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),r=!1;/^\(.*\)$/.test(c)&&(r=!0,c=c.slice(1,-1).trim()),c=c.replace(/^[-\s]+/,e=>e.includes("-")?"-":"").replace(/[\s.,-]+$/,""),r=r||/^-/.test(c)||/^[^\d]*-/.test(c);let s=c.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,"");const t=s.match(/,\d{2}/g);if(t&&t.length>1)s=s.replace(/,/g,"");else{const e=(s.match(/\./g)||[]).length,l=(s.match(/,/g)||[]).length;if(e>1&&0===l)s=s.replace(/\./g,"");else if(l>1&&0===e)s=s.replace(/,/g,"");else{const e=s.lastIndexOf(","),l=s.lastIndexOf(".");if(e>l)s=s.replace(/\./g,"").replace(",",".");else if(l>e)s=s.replace(/,/g,"");else if(e>l){const l=s.slice(0,e).replace(/,/g,"").replace(/\./g,""),c=s.slice(e+1);s=l+"."+c}else if(l>e){const e=s.slice(0,l).replace(/\./g,"").replace(/,/g,""),c=s.slice(l+1);s=e+"."+c}else-1!==e?s=s.replace(/,/g,""):-1!==l&&(s=s.replace(/\./g,""))}}const a=parseFloat(s)||0;return r?-a:a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNonEmptyString as s}from"./chunk-2UIRWYE3.js";var a=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),t=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),r=r=>{if(!s(r))return;let p=r.split("/").pop();if(""===p)return"";if(p){for(const s of t){const a=`.${s}`;if(p.toLowerCase().endsWith(a))return p.slice(0,-a.length)}for(;;){const s=p.lastIndexOf(".");if(-1===s)break;const t=p.slice(s+1).toLowerCase();if(!a.has(t))break;p=p.slice(0,s)}return p}};export{r as extractFileName};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-DVMHRLKP.cjs"),r=require("./chunk-E63WVPZE.cjs"),n=require("./chunk-INUFZJLX.cjs");exports.delay=(t=1e3,i)=>{if(!e.isInteger(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.getPreciseType(t)}\`, with value: \`${r.safeStableStringify(t)}\`.`);if(n.isNull(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}))})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isBigInt as r}from"./chunk-QNKGP5DY.js";import{assertIsPlainObject as t,isPlainObject as e,isBoolean as o,isNaN as n,hasOwnProp as s,getPreciseType as a,isNumberObject as i,isInfinityNumber as u,isStringObject as p,isBooleanObject as f,isFunction as c,isSymbol as y,isUndefined as l,isObjectOrArray as m,isSet as b,isArray as d,isNull as v,isNumber as S,isObject as g}from"./chunk-2UIRWYE3.js";function h(r){return"[object Map]"===Object.prototype.toString.call(r)||r instanceof Map}var O=(r,s={})=>{t(s,{message:({currentType:r,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${r}\`.`});const a=!(!e(s)||!o(s.skipInvalidDate))&&s.skipInvalidDate,i=r instanceof Date;return a?i:i&&!n(r.getTime())},$=(e,$={})=>{t($,{message:({currentType:r,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${r}\`.`});const k=!!s($,"pretty")&&$.pretty,A=!s($,"sortKeys")||$.sortKeys,T=!!s($,"sortArray")&&$.sortArray;if(!o(A)||!o(T)||!o(k))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${a(A)}\`, 'sortArray': \`${a(T)}\`, 'pretty': \`${a(k)}\`]".`);const j=new WeakSet,K=r=>v(r)||!m(r)&&!c(r),w=t=>{if(i(t)){const r=t.valueOf();return n(r)||u(r)?null:r}if(p(t))return t.valueOf();if(f(t))return t.valueOf();if(!c(t)&&!y(t)){if(r(t))return t.toString();if(l(t)||n(t)||t===1/0||t===-1/0)return null;if(m(t)){if(j.has(t))return"[Circular]";if(j.add(t),O(t))return t.toISOString();if(h(t))return{map:Array.from(t.entries()).map(([r,t])=>[r,w(t)])};if(b(t))return{set:Array.from(t.values()).map(w)};if(d(t)){const r=t.map(w);if(T){const t=[],e=[];for(const o of r)K(o)?t.push(o):e.push(o);return t.sort((r,t)=>S(r)&&S(t)?r-t:String(r).localeCompare(String(t))),[...t,...e]}return r}const r=Object.keys(t);A&&r.sort((r,t)=>{const e=Number(r),o=Number(t);return n(e)||n(o)?r.localeCompare(t):e-o});const e={};if(g(t))for(const o of r){const r=w(t[o]);l(r)||(e[o]=r)}return e}return t}};try{return JSON.stringify(w(e),null,k?2:0)}catch(r){return console.warn("Error in safeStableStringify:",r),"{}"}};export{O as isDate,h as isMap,$ as safeStableStringify};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-AJ65QFV2.js";import{isNonEmptyArray as t,getPreciseType as n,isNumber as a,isPlainObject as m,assertIsBoolean as i,isNaN as h}from"./chunk-2UIRWYE3.js";function o(e){if(!t(e))return;return e[Math.floor(Math.random()*(e.length||0))]}var u=(t,a)=>{if(!e(t)||!e(a))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${c(t,a)}value, but received: ['min': \`${n(t)}\` - (with value: \`${r(t)})\`, 'max': \`${n(a)}\` - (with value: \`${r(a)}\`)].`);if(t>a)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${s(t)}, 'max': ${s(a)}].`);return t=Math.max(1,t),a=Math.min(Number.MAX_SAFE_INTEGER,a),Math.floor(Math.random()*(a-t+1))+t},s=e=>a(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${n(e)}\``,c=(...e)=>e.some(e=>a(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ",g=t=>{m(t)||(t={});const{minLength:a=1,maxLength:h=16,avoidZero:o=!1}=t;if(i(o,{message:({currentType:e,validType:r})=>`Parameters \`avoidZero\` must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(h))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(h)}\` - (with value: ${r(h)})].`);if(a<1||h>16||a>h)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${h}\`].`);const s=a===h?a:u(a,h),c=10**(s-1);let g=u(c,10**s-1);return o&&0===g&&(g=c),g},p=t=>{m(t)||(t={});const{minLength:a=40,maxLength:o=40,type:s="string",avoidWhiteSpace:c=!0}=t;if(i(c,{message:({currentType:e,validType:r})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),!e(a)||!e(o))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${n(a)}\` - (with value: ${r(a)}), 'maxLength': \`${n(o)}\` - (with value: ${r(o)})].`);if(a<1||o>5e3||a>o)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${a}\`, 'maxLength': \`${o}\`].`);if("string"!==s&&"number"!==s)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${n(s)}\`, with value: ${r(s)}.`);const g=u(a,o),p="number"===s?(h(Number(t.replaceGenInt))?void 0:t.replaceGenInt)??"0123456789":(t.replaceGenStr?t.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",d=(l=p,(c?l.replace(/\s|\n|\t/g,""):l)+(t.addChar||""));var l;if(!d.length){throw new Error(`Character set is empty. ${(()=>"number"===s?c?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let b="";for(let e=0;e<g;e++)b+=d.charAt(Math.floor(Math.random()*d.length));return b};export{o as getRandomItem,u as randomInt,g as randomIntByLength,p as randomStr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isDate as e,isMap as r}from"./chunk-AJ65QFV2.js";import{isObjectOrArray as t,isError as n,isSet as f,isArray as i,isObject as o,assertIsPlainObject as u,hasOwnProp as s,assertIsBoolean as c,isUndefined as a}from"./chunk-2UIRWYE3.js";var g=e=>e instanceof RegExp;function y(e){return e instanceof ArrayBuffer}function l(o,u,s,c=new WeakMap){if(o===u)return!0;if(o!=o&&u!=u)return!0;if(!t(o)||!t(u))return!1;if(c.get(o)===u)return!0;c.set(o,u);const h=(e,r,t,n,f)=>{if(s){const i=s(e,r,t,n,f,c);if(!a(i))return i}return l(e,r,s,c)};if(e(o)&&e(u))return o.getTime()===u.getTime();if(g(o)&&g(u))return o.source===u.source&&o.flags===u.flags;if(n(o)&&n(u))return o.name===u.name&&o.message===u.message;if(ArrayBuffer.isView(o)&&ArrayBuffer.isView(u)){const e=new Uint8Array(o.buffer,o.byteOffset,o.byteLength),r=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);if(e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(y(o)&&y(u)){if(o.byteLength!==u.byteLength)return!1;const e=new Uint8Array(o),r=new Uint8Array(u);for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}if(r(o)&&r(u)){if(o.size!==u.size)return!1;for(const[e,r]of o){if(!u.has(e))return!1;if(!l(r,u.get(e),s,c))return!1}return!0}if(f(o)&&f(u)){if(o.size!==u.size)return!1;for(const e of o){let r=!1;for(const t of u)if(l(e,t,s,c)){r=!0;break}if(!r)return!1}return!0}if(i(o)&&i(u)){if(o.length!==u.length)return!1;for(let e=0;e<o.length;e++)if(!h(o[e],u[e],e,o,u))return!1;return!0}if(Object.getPrototypeOf(o)!==Object.getPrototypeOf(u))return!1;const b=Reflect.ownKeys(o),m=Reflect.ownKeys(u);if(b.length!==m.length)return!1;for(const e of b){if(!h(o[e],u[e],e,o,u))return!1}return!0}function h(e,r){return l(e,r,void 0,new WeakMap)}var b=e=>!i(e)||0===e.length;function m(e,r={}){if(!o(e))return!0;u(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!!s(r,"checkSymbols")&&r.checkSymbols;c(t,{message:({currentType:e,validType:r})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const n=0===Object.keys(e).length;return t?n&&0===Object.getOwnPropertySymbols(e).length:n}export{l as baseDeepEqual,y as isArrayBuffer,b as isEmptyArray,m as isEmptyObject,h as isEqual,g as isRegExp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-NU3N4WHD.cjs"),r=require("./chunk-Z4DXK7A6.cjs"),t=require("./chunk-YT3MSZKK.cjs"),s=require("./chunk-E63WVPZE.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{assertIsArray as e}from"./chunk-ZXIWDFEQ.js";import{isPlainObject as i,isNumber as r,isNonEmptyString as s,isFunction as o,hasOwnProp as t,isNonEmptyArray as n,getPreciseType as a}from"./chunk-2UIRWYE3.js";import{getDefaultConfig as l,extendTailwindMerge as c}from"tailwind-merge-v3";import{getDefaultConfig as f,extendTailwindMerge as p}from"tailwind-merge-v4";function d(e){var i,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(i=0;i<o;i++)e[i]&&(r=d(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var u=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=d(e))&&(s&&(s+=" "),s+=i);return s},m=e=>{i(e)||(e={});let{config:a,prefix:l,extend:c,override:f,cacheSize:p,experimentalParseClassName:d}=e;i(a)||(a={}),i(c)||(c={}),i(f)||(f={}),r(p)||(p=void 0),s(l)||(l=void 0),o(d)||(d=void 0);return{config:a,override:f,cacheSize:p,prefix:l,experimentalParseClassName:d,theme:t(c,"theme")?c.theme:{},classGroups:t(c,"classGroups")?c.classGroups:{},conflictingClassGroupModifiers:t(c,"conflictingClassGroupModifiers")?c.conflictingClassGroupModifiers:{},conflictingClassGroups:t(c,"conflictingClassGroups")?c.conflictingClassGroups:{},orderSensitiveModifiers:t(c,"orderSensitiveModifiers")&&n(c.orderSensitiveModifiers)?c.orderSensitiveModifiers:[]}},g=l(),v=(e={})=>{var r,s,o;i(e)||(e={});const{cacheSize:t,classGroups:n,config:a,conflictingClassGroupModifiers:l,conflictingClassGroups:f,override:p,prefix:d,theme:u,experimentalParseClassName:v}=m(e);return c({prefix:d??a.prefix,cacheSize:t||g.cacheSize,experimentalParseClassName:v,override:p,extend:{conflictingClassGroupModifiers:{...g.conflictingClassGroupModifiers,...l},theme:{...g.theme,...u},conflictingClassGroups:{...g.conflictingClassGroups,...f},classGroups:{...g.classGroups,...n,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=a.theme)?void 0:r.fontSize)||{},...(null==(o=null==(s=a.theme)?void 0:s.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},x=f(),h=(e={})=>{var r,s,o;i(e)||(e={});const{cacheSize:t,classGroups:n,config:a,conflictingClassGroupModifiers:l,conflictingClassGroups:c,orderSensitiveModifiers:f,override:d,prefix:u,theme:g,experimentalParseClassName:v}=m(e);return p({prefix:u||a.prefix,cacheSize:t||x.cacheSize,experimentalParseClassName:v,override:d,extend:{conflictingClassGroupModifiers:{...x.conflictingClassGroupModifiers,...l},theme:{...x.theme,...g},conflictingClassGroups:{...x.conflictingClassGroups,...c},orderSensitiveModifiers:[...x.orderSensitiveModifiers,...f],classGroups:{...x.classGroups,...n,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=a.theme)?void 0:r.fontSize)||{},...(null==(o=null==(s=a.theme)?void 0:s.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},G=v(),C=h(),S=(...e)=>G(u(...e)),M=(...e)=>C(u(...e)),y=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(u(...i))},z=(e,...i)=>{if(!o(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${a(e)}\`.`);return e(u(...i))},w=i=>(e(i,{message:({currentType:e,validType:i})=>`First parameter (\`props\`) must be of type \`${i}\`, but received: \`${e}\`.`}),e=>!i.map(e=>e.toString()).includes(e.toString()));export{S as cnV3,M as cnV4,y as customCnV3,z as customCnV4,w as shouldForwardProp,v as twMergeDefaultV3,h as twMergeDefaultV4};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRegExp as e,isEmptyArray as r,isEqual as t}from"./chunk-BSVZRN7C.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-AJ65QFV2.js";import{isBigInt as s}from"./chunk-QNKGP5DY.js";import{getPreciseType as p,isNaN as f,isString as l,isNumber as m,isBoolean as c,isNil as v,isSymbol as y,isFunction as d,isArray as g,isObjectOrArray as b,isError as h,isSet as S,isObject as T,assertIsPlainObject as $,hasOwnProp as N,assertIsBoolean as w,isNull as j}from"./chunk-2UIRWYE3.js";function k(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(f(r))return"primitives"===t||"all"===t?"NaN":NaN;if(l(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))return"all"===t?r.toString():r;if(d(r))return"all"===t?r.toString():r;if(g(r))return r.map(e=>k(e,t));if(b(r)){if(a(r))return"all"===t?r.toISOString():r;if(e(r))return"all"===t?r.toString():r;if(h(r)||r instanceof Promise)return"all"===t?r.toString():r;if(S(r))return"all"===t?[...r].map(e=>k(e,t)):r;if(u(r))return"all"===t?[...r.entries()].map(([e,r])=>[k(e,t),k(r,t)]):r;const i={};if(T(r))for(const e of Object.keys(r))i[e]=k(r[e],t);return i}return r}function O(e){if(v(e))return;if(!g(e))return[];return e.reduce((e,t)=>{if(!v(t))if(g(t)){const i=O(t);i&&!r(i)&&e.push(i)}else e.push(t);return e},[])}var I=(e,r={})=>{i(e,{message:({currentType:e,validType:r})=>`First parameter (\`inputArray\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`}),$(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const n=!!N(r,"flatten")&&r.flatten,a=!!N(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)}\`.`);w(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=g(i)?s(i):k(i,a);return r.some(e=>t(e,n))||(r.push(n),e.push(n)),e},[])},f=e=>g(e)?e.flatMap(f):S(e)?[...e].flatMap(f):u(e)?[...e.values()].flatMap(f):[e];return s(n?f(e):e)};function P(e,r={}){$(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!N(r,"removeInvalidValue")||r.removeInvalidValue;if(w(t,{message:({currentType:e,validType:r})=>`Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),g(e)){const r=Array.from(e,e=>l(e)||n(e)||c(e)||s(e)?String(e):j(e)?null:void 0);return t?O(r):r}}export{I as dedupeArray,O as filterNilArray,P as toStringArrayUnRecursive,k as toStringDeepForce};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNumber as r}from"./chunk-2UIRWYE3.js";function i(i){return r(i)&&Number.isFinite(i)}export{i as isFinite};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isInteger=function(e){return"number"==typeof e&&Number.isInteger(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-UDA26MCU.cjs"),r=require("./chunk-INUFZJLX.cjs");function t(e){return"[object Map]"===Object.prototype.toString.call(e)||e instanceof Map}var s=(e,t={})=>{r.assertIsPlainObject(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const s=!(!r.isPlainObject(t)||!r.isBoolean(t.skipInvalidDate))&&t.skipInvalidDate,i=e instanceof Date;return s?i:i&&!r.isNaN(e.getTime())};exports.isDate=s,exports.isMap=t,exports.safeStableStringify=(i,n={})=>{r.assertIsPlainObject(n,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!!r.hasOwnProp(n,"pretty")&&n.pretty,a=!r.hasOwnProp(n,"sortKeys")||n.sortKeys,c=!!r.hasOwnProp(n,"sortArray")&&n.sortArray;if(!r.isBoolean(a)||!r.isBoolean(c)||!r.isBoolean(o))throw new TypeError(`Parameters \`sortKeys\`, \`sortArray\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${r.getPreciseType(a)}\`, 'sortArray': \`${r.getPreciseType(c)}\`, 'pretty': \`${r.getPreciseType(o)}\`]".`);const u=new WeakSet,p=e=>r.isNull(e)||!r.isObjectOrArray(e)&&!r.isFunction(e),f=i=>{if(r.isNumberObject(i)){const e=i.valueOf();return r.isNaN(e)||r.isInfinityNumber(e)?null:e}if(r.isStringObject(i))return i.valueOf();if(r.isBooleanObject(i))return i.valueOf();if(!r.isFunction(i)&&!r.isSymbol(i)){if(e.isBigInt(i))return i.toString();if(r.isUndefined(i)||r.isNaN(i)||i===1/0||i===-1/0)return null;if(r.isObjectOrArray(i)){if(u.has(i))return"[Circular]";if(u.add(i),s(i))return i.toISOString();if(t(i))return{map:Array.from(i.entries()).map(([e,r])=>[e,f(r)])};if(r.isSet(i))return{set:Array.from(i.values()).map(f)};if(r.isArray(i)){const e=i.map(f);if(c){const t=[],s=[];for(const r of e)p(r)?t.push(r):s.push(r);return t.sort((e,t)=>r.isNumber(e)&&r.isNumber(t)?e-t:String(e).localeCompare(String(t))),[...t,...s]}return e}const e=Object.keys(i);a&&e.sort((e,t)=>{const s=Number(e),i=Number(t);return r.isNaN(s)||r.isNaN(i)?e.localeCompare(t):s-i});const n={};if(r.isObject(i))for(const t of e){const e=f(i[t]);r.isUndefined(e)||(n[t]=e)}return n}return i}};try{return JSON.stringify(f(i),null,o?2:0)}catch(e){return console.warn("Error in safeStableStringify:",e),"{}"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("./chunk-INUFZJLX.cjs");exports.isEmptyString=(t,i={})=>!r.isNonEmptyString(t,i);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNonEmptyValue as e,isTypedArray as r}from"./chunk-HQ5GQTEE.js";import{filterNilArray as t}from"./chunk-CTBRLEOG.js";import{isEmptyObject as o,isRegExp as n,isEmptyArray as m}from"./chunk-BSVZRN7C.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-AJ65QFV2.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 R,isNumberObject as N,isStringObject as I,isBooleanObject as w,isBuffer as P,isSet as B,isFunction as D,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 Q=r=>!E(r)&&(j(r)?A(r):O(r)?r:g(r,{includeNaN:!0})?0!==r:d(r)||h(r)?e(r):Boolean(r)),V=e=>!E(e)&&(j(e)?A(e):O(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.some(V):!!h(e)&&Object.values(e).some(V)),J=(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},W=e=>!E(e)&&(j(e)?!s(e):O(e)?e:g(e,{includeNaN:!0})?0!==e:d(e)?e.length>0:Boolean(e)),G=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},Y=(e,r)=>{if(!S(e))return e;const[t,...o]=r;return 0===o.length?S(e)&&delete e[t]:S(e[t])&&Y(e[t],o),e};function x(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(D(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):Y(n,r)}return n}function F(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 R(e)||$(e)?void 0:e}if(N(t)||I(t)||w(t)){const e=Number(t.valueOf());return R(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(B(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 Z(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)||R(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(N(t)){const e=t.valueOf();return R(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(B(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{G as convertType,x as removeObjectPaths,Q as toBooleanContent,V as toBooleanContentDeep,J as toBooleanExplicit,W as toBooleanLoose,L as toNumberArrayUnRecursive,F as toNumberDeep,Z as toStringDeep};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyArray as e,isEmptyObject as r}from"./chunk-BSVZRN7C.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
|
+
var r=()=>{};export{r as noop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-7BXIZM57.cjs"),t=require("./chunk-YZR5OGJA.cjs"),r=require("./chunk-XC2PYCT4.cjs"),n=require("./chunk-EBMHQW7X.cjs"),i=require("./chunk-Y4O5KZF6.cjs"),a=require("./chunk-DVMHRLKP.cjs"),s=require("./chunk-E63WVPZE.cjs"),o=require("./chunk-INUFZJLX.cjs"),p=require("date-fns/locale"),c=require("date-fns"),l=(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};var u=(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,m=(e,t,r,n)=>{if(e.length<=t)return"*".repeat(e.length);const i=e.split(""),a=Math.max(t,Math.ceil(e.length*r)),s=new Set;let p=0;for(;s.size<a;){const t=o.isUndefined(n)?Math.floor(Math.random()*e.length):(n+e.length+31*p)%e.length;s.add(t),p++}for(const e of s)i[e]="*";return i.join("")};exports.censorEmail=(e,t={})=>{if(!o.isNonEmptyString(e))return"";o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=o.hasOwnProp(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: \`${o.getPreciseType(r)}\`, with value: \`${s.safeStableStringify(r)}\`.`);if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return"";const[n,i]=e.split("@"),a=i.split(".");if(a.length<2)return"";const[p,...c]=a,l=c.join("."),f=u(r,e),d=n.length<4?1:2,g=p.length<4?1:2;return`${m(n,d,.6,f)}@${m(p,g,.5,f)}.${l.length<=2?l:m(l,1,.4,f)}`},exports.chunkString=function(e,t,n={}){if(o.isNil(e)||t<=0)return e;if(i.assertIsString(e,{message:({currentType:e,validType:t})=>`First parameter (\`subject\`) must be of type \`${t}\`, but received: \`${e}\`.`}),!a.isInteger(t))throw new TypeError(`Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${o.getPreciseType(t)}\`, with value: \`${s.safeStableStringify(t)}\`.`);o.assertIsPlainObject(n,{message:({currentType:e,validType:t})=>`Third parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=o.hasOwnProp(n,"separator")?n.separator:" ",c=!!o.hasOwnProp(n,"reCountAfterSpace")&&n.reCountAfterSpace;if(i.assertIsString(p,{message:({currentType:e,validType:t})=>`Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),o.assertIsBoolean(c,{message:({currentType:e,validType:t})=>`Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),e=r.normalizeSpaces(e),!c){let r="",n=0;for(let i=0;i<e.length;i++){n===t&&(r+=p,n=0),r+=e[i],n++}return r}const l=e.split(" "),u=[];let m=[],f=0;for(let e=0;e<l.length;e++){const r=l[e];let n="",i=0;for(let e=0;e<r.length;e++)n+=r[e],i++,i===t&&e<r.length-1&&(n+=p,i=0);m.push(n),f++,f!==t&&e!==l.length-1||(u.push(m.join(p)),m=[],f=0)}return u.join(" ")},exports.formatCurrency=(r,n={})=>{if(!o.isString(r)&&!t.isFinite(r))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${o.getPreciseType(r)}\`, with value: \`${s.safeStableStringify(r)}\`.`);o.assertIsPlainObject(n,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const p=!!o.hasOwnProp(n,"decimal")&&n.decimal,c=o.hasOwnProp(n,"totalDecimal")?n.totalDecimal:2,u=!o.hasOwnProp(n,"endDecimal")||n.endDecimal,m=!!o.hasOwnProp(n,"indianFormat")&&n.indianFormat,f=o.hasOwnProp(n,"suffixCurrency")?n.suffixCurrency:"",d=o.hasOwnProp(n,"suffixDecimal")?n.suffixDecimal:"",g=o.hasOwnProp(n,"roundedDecimal")?n.roundedDecimal:"round",y=o.hasOwnProp(n,"negativeFormat")?n.negativeFormat:"dash";let h=o.hasOwnProp(n,"separatorDecimals")?n.separatorDecimals:",",b=o.hasOwnProp(n,"separator")?n.separator:".";if(!(o.isString(b)&&o.isString(h)&&o.isString(f)&&o.isString(d)))throw new TypeError(`Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${o.getPreciseType(b)}\`, 'separatorDecimals': \`${o.getPreciseType(h)}\`, 'suffixCurrency': \`${o.getPreciseType(f)}\`, 'suffixDecimal': \`${o.getPreciseType(d)}\`].`);if(!o.isBoolean(p)||!o.isBoolean(u)||!o.isBoolean(m))throw new TypeError(`Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${o.getPreciseType(p)}\`, 'endDecimal': \`${o.getPreciseType(u)}\`, 'indianFormat': \`${o.getPreciseType(m)}\`].`);if(!a.isInteger(c))throw new TypeError(`Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${o.getPreciseType(c)}\`, with value: \`${s.safeStableStringify(length)}\`.`);if(!1!==g&&"round"!==g&&"ceil"!==g&&"floor"!==g)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: \`${o.getPreciseType(g)}\`, with value: \`${s.safeStableStringify(g)}\`.`);if("abs"!==y&&"brackets"!==y&&"dash"!==y&&!o.isPlainObject(y))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: \`${o.getPreciseType(y)}\`, with value: \`${s.safeStableStringify(y)}\`.`);const $=o.isString(r)?e.parseCurrencyString(r):r;if(o.isNaN($))throw new TypeError("First parameter (`value`) could not be parsed into a valid `number`.");let P="",S="",w=Math.abs($);const T=Math.pow(10,c);if(g){const e=w*T;switch(g){case"round":w=Math.round(e)/T;break;case"ceil":w=Math.ceil(e)/T;break;case"floor":w=Math.floor(e)/T}}if(g)[P,S]=w.toFixed(c).split("."),S=S??"".padEnd(c,"0");else{const e=String(w).split(".");P=e[0],S=(e[1]||"").slice(0,c).padEnd(c,"0")}let v;if(m?(b=",",h=".",v=(f.trim().length?f:"")+l(P,b)):v=(f.trim().length?f:"")+P.replace(/\B(?=(\d{3})+(?!\d))/g,b),p&&!o.isUndefined(S)&&c>0){let e=h+S;u&&(e+=d),v+=e}if($<0)if("dash"===y)v="-"+v;else if("brackets"===y)v="("+v+")";else if("abs"===y);else if(o.isPlainObject(y))if(o.hasOwnProp(y,"custom")){const e=y.custom;if(!o.isFunction(e))throw new TypeError(`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${o.getPreciseType(e)}\`.`);const t=e(v);i.assertIsString(t,{message:({currentType:e,validType:t})=>`Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${t}\` type value, but received: \`${e}\`.`}),v=t}else{const e=y.style||"dash",t=!o.isUndefined(y.space)&&y.space;if(o.assertIsBoolean(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: \`${o.getPreciseType(e)}\`, with value: \`${s.safeStableStringify(e)}\`.`);switch(e){case"dash":v="-"+(t?" ":"")+v;break;case"brackets":v=t?`( ${v} )`:`(${v})`}}return v},exports.formatDateFns=(e,t={})=>{if(o.isNil(e)||!c.isDate(e)&&!o.isNonEmptyString(e))return null;o.isPlainObject(t)||(t={});const{inputFormat:r,locale:n="en",inputLocale:i="en",...a}=t,s=o.hasOwnProp(t,"format")&&o.isNonEmptyString(t.format)?t.format:"dd MMM yyyy - HH:mm:ss";let l;try{if(o.isNonEmptyString(e)&&r&&i){const t=o.isNonEmptyString(i)?"id"===i?p.id:p.enUS:i;l=c.parse(e,r,new Date,{locale:t})}else l=new Date(e);if(o.isNaN(l.getTime()))return null;const t=o.isNonEmptyString(n)?"id"===n?p.id:p.enUS:n;return c.format(l,s,{...a,locale:t})}catch{return null}},exports.formatDateIntl=(e,t)=>{if(o.isNil(e)||!c.isDate(e)&&!o.isNonEmptyString(e))return null;const r=new Date(e);if(o.isNaN(r.getTime()))return null;o.isPlainObject(t)||(t={});const{locale:n="en-US",...i}=t;try{return new Intl.DateTimeFormat(o.isNonEmptyString(n)?n.trim():"en-US",i).format(r)}catch{return null}},exports.formatDateTime=(e,t)=>{if(o.isNil(t)&&(t="YYYY-MM-DD hh:mm:ss"),!o.isString(t))return null;if(o.isNil(e)||!c.isDate(e)&&!o.isNonEmptyString(e))return null;try{const r=new Date(e);if(o.isNaN(r.getTime()))return null;const n=e=>e.toString().padStart(2,"0"),i={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(i).reduce((e,[t,r])=>e.split(t).join(r),t);return a.includes("NaN")?null:a}catch{return null}},exports.formatNumber=(e,r=",")=>{if(!o.isString(e)&&!t.isFinite(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${o.getPreciseType(e)}\`.`);if(!o.isString(r))throw new TypeError(`Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${o.getPreciseType(r)}\`.`);const n="."===(r=o.isString(r)?r:",")?",":".",i=e.toString().trim(),a=i.lastIndexOf("."),s=i.lastIndexOf(",");let p="";a>s?p=".":s>a&&(p=",");let c=i,l="";if(p){const e=i.split(p);c=e.slice(0,-1).join(p),l=e.slice(-1)[0]}c=c.replace(/[^\d]/g,"");const u=c.replace(/\B(?=(\d{3})+(?!\d))/g,r);return l?`${u}${n}${l}`:u},exports.formatPhoneNumber=function(e,t={}){if(o.isNil(e))return"";if(!o.isString(e)&&!o.isNumber(e))throw new TypeError(`First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${o.getPreciseType(e)}\`.`);o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Second parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=o.hasOwnProp(t,"separator")?t.separator:" ",n=!!o.hasOwnProp(t,"takeNumberOnly")&&t.takeNumberOnly,i=!!o.hasOwnProp(t,"checkValidOnly")&&t.checkValidOnly,a=o.hasOwnProp(t,"plusNumberCountry")?t.plusNumberCountry:"",s=o.hasOwnProp(t,"openingNumberCountry")?t.openingNumberCountry:"",p=o.hasOwnProp(t,"closingNumberCountry")?t.closingNumberCountry:"";if(!o.isBoolean(n)||!o.isBoolean(i))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': \`${o.getPreciseType(n)}\`, 'checkValidOnly': \`${o.getPreciseType(i)}\`].`);if(!(o.isString(r)&&o.isString(a)&&o.isString(s)&&o.isString(p)))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': \`${o.getPreciseType(r)}\`, 'plusNumberCountry': \`${o.getPreciseType(a)}\`, 'openingNumberCountry': \`${o.getPreciseType(s)}\`, 'closingNumberCountry': \`${o.getPreciseType(p)}\`].`);if(o.isString(e)||(e=String(e)),n)return e.replace(/\D/g,"");if(i)return/^(\+)?[0-9\s().-]+$/.test(e)&&e.replace(/\D/g,"").length<24;e=e.replace(/\D/g,"");let c=a.trim().replace(/\s+/g,"").replace(/[^\d+]/g,"");/^\+/.test(c)&&(c="+"+c.replace(/^\++/,""));let l="",u="";({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"})[c.replace(/^\+/,"").replace(/[^\d]/g,"")]&&e.startsWith("0")?(l=e.slice(1,4),u=e.slice(4)):(l=e.slice(0,4),u=e.slice(4));const m=c.trim(),f=s.trim(),d=p.trim();let g="";g=m?f&&d?`${f}${m}${d} ${l}`:f&&!d?`${f}${m} ${l}`:!f&&d?`${m}${d} ${l}`:`${m} ${l}`:`${l}`;const y={0:r,4:r,8:r,12:r,16:r,20:r,24:r};for(let e=0;e<u.length;e++){g+=(y[e+l.length]||"")+u[e]}return g},exports.getGMTOffset=e=>{try{if(o.isNil(e)||o.isString(e)&&n.isEmptyString(e))e=new Date;else if(!c.isDate(e)&&!o.isNonEmptyString(e))return"0";const t=new Date(e);if(o.isNaN(t.getTime()))return"0";const r=e=>e.toString().padStart(2,"0");let i=t.getTimezoneOffset();const a=i<0?"+":"-";return i=Math.abs(i),`${a}${r(Math.floor(i/60))}${r(i%60)}`}catch{return"0"}},exports.truncateString=(e,t={})=>{if(!o.isNonEmptyString(e))return"";o.assertIsPlainObject(t,{message:({currentType:e,validType:t})=>`Seconds parameter (\`options\`) must be of type \`${t}\`, but received: \`${e}\`.`});const r=!o.hasOwnProp(t,"trim")||t.trim,p=o.hasOwnProp(t,"length")?t.length:10;let c=o.hasOwnProp(t,"ending")?t.ending:"...";if(!a.isInteger(p))throw new TypeError(`Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${o.getPreciseType(p)}\`, with value: \`${s.safeStableStringify(p)}\`.`);if(p<1)return"";i.assertIsString(c,{message:({currentType:e,validType:t})=>`Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),o.assertIsBoolean(r,{message:({currentType:e,validType:t})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),c=n.isEmptyString(c)?"...":c.trim();const l=r?e.trim():e;if(l.length<=p)return l;const u=l.slice(0,p);return(r?u:u.trimEnd())+c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-Z4DXK7A6.cjs"),s=require("./chunk-EBMHQW7X.cjs"),r=require("./chunk-INUFZJLX.cjs");exports.isEmptyValue=(t,c={})=>{r.assertIsPlainObject(c,{message:({currentType:e,validType:s})=>`Second parameter (\`options\`) must be of type \`${s}\`, but received: \`${e}\`.`});const i=!!r.hasOwnProp(c,"checkSymbols")&&c.checkSymbols;return r.assertIsBoolean(i,{message:({currentType:e,validType:s})=>`Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${s}\`, but received: \`${e}\`.`}),!(!r.isNil(t)&&!1!==t&&!r.isNaN(t))||(r.isString(t)?s.isEmptyString(t):r.isArray(t)?e.isEmptyArray(t):!!r.isObject(t)&&e.isEmptyObject(t,{checkSymbols:i}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyValue as t}from"./chunk-FEKDB32T.js";var r=(r,o={})=>!t(r,o),o=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);function e(t){return null!=t&&"object"==typeof t&&o.has(Object.prototype.toString.call(t))}export{r as isNonEmptyValue,e as isTypedArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isBigInt as r}from"./chunk-QNKGP5DY.js";import{resolveErrorMessageAssertions as e,hasOwnProp as o,isNumber as i}from"./chunk-2UIRWYE3.js";var n=(o,i={})=>{if(r(o))return;const n=e({value:o,options:i,requiredValidType:"big int"});throw new TypeError(n)},t=(r,n={})=>{const t=o(n,"includeNaN")?n.includeNaN:void 0;if(i(r,{includeNaN:t}))return;const u=e({value:r,options:n,requiredValidType:"number"});throw new TypeError(u)};export{n as assertIsBigInt,t as assertIsNumber};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("./chunk-KHO2SBNA.cjs"),e=require("./chunk-YXHCULSO.cjs"),t=require("./chunk-GGRMHIFJ.cjs"),n=require("./chunk-YT3MSZKK.cjs"),i=require("./chunk-XC2PYCT4.cjs"),s=require("./chunk-EBMHQW7X.cjs"),a=require("./chunk-E63WVPZE.cjs"),o=require("./chunk-INUFZJLX.cjs");exports.constructURL=(c,u,l)=>{if(o.isString(c)){if(s.isEmptyString(c))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");c=i.normalizeString(c)}else if(!r.isURL(c))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${o.getPreciseType(c)}\`, with current value: \`${a.safeStableStringify(c)}\`.`);if(!o.isUndefined(l)&&(n.assertIsArray(l,{message:({currentType:r,validType:e})=>`Third parameter (\`removeParams\`) must be of type \`${e} of strings\`, but received: \`${r}\`.`}),!l.every(r=>o.isNonEmptyString(r))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!o.isUndefined(u)&&!o.isFunction(u[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${o.getPreciseType(u)}\`, with value: \`${a.safeStableStringify(u)}\`.`);const r=new URL(c);if(!o.isUndefined(u)){const n=Object.fromEntries(u);if(!t.isEmptyValue(n)){const t=new URLSearchParams(r.search);for(const[r,e]of Object.entries(n)){if(!o.isNonEmptyString(e)&&!o.isNumber(e,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${o.getPreciseType(u)}\`, with value: \`${a.safeStableStringify(u)}\`.`);t.set(r,String(e))}(null==l?void 0:l.length)&&e.toStringArrayUnRecursive(l).map(r=>{t.delete(r)}),r.search=t.toString()}}return null==l||l.forEach(e=>r.searchParams.delete(e)),r}catch(r){if(o.isError(r))throw r;throw new Error("Failed to construct a valid URL in `constructURL()`, Error:"+r)}},exports.extractURLs=r=>{if(!o.isNonEmptyString(r))return null;let e;try{e=decodeURIComponent(r)}catch{return null}const t=e.match(/https?:\/\/.*?(?=https?:\/\/|\s|$)/g);if(!t)return null;const n=t.map(r=>r.replace(/[.,;:!?)]*$/,"")).filter(r=>{try{const e=new URL(r);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}});return n.length?n:null};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=e=>"boolean"==typeof e,r=e=>"function"==typeof e;function t(e){return null==e}function o(e){return Array.isArray(e)}function a(e){return"object"==typeof e&&!t(e)&&!o(e)}function n(e){if(!a(e))return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||null===r}var s=e=>"string"==typeof e;function i(e){return a(e)&&"[object Number]"===Object.prototype.toString.call(e)}function l(e){return"number"==typeof e?Number.isNaN(e):i(e)&&Number.isNaN(e.valueOf())}var c=e=>null===e,u=(r,t={})=>{if(e(r))return;const o=M({value:r,options:t,requiredValidType:"boolean"});throw new TypeError(o)},p=(r,t={})=>{W(t,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const o=!(!n(t)||!e(t.includeNaN))&&t.includeNaN;u(o,{message:({currentType:e,validType:r})=>`Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const a="number"==typeof r;return o?a:a&&!Number.isNaN(r)},f=e=>"symbol"==typeof e,m=e=>void 0===e;function b(e){return o(e)||a(e)}function y(e,t,o={}){if(!s(e)&&!b(e)&&!r(e))return!1;W(o,{message:({currentType:e,validType:r})=>`Third parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const a=void 0===o.discardUndefined||o.discardUndefined,n=void 0!==o.discardNull&&o.discardNull;u(a,{message:({currentType:e,validType:r})=>`Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`}),u(n,{message:({currentType:e,validType:r})=>`Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${r}\`, but received: \`${e}\`.`});const i=[];if(s(t)&&t.trim().length>0||p(t,{includeNaN:!0})){(p(t,{includeNaN:!0})?String(t):t).split(".").forEach(e=>{const r=e.match(/^\[(\d+)\]$/),t=e.match(/^Symbol\((.+)\)$/);r?i.push(Number(r[1])):t?i.push(Symbol.for(t[1])):l(Number(e))?i.push(e):i.push(Number(e))})}else{if(!f(t))return!1;i.push(t)}let y=s(e)&&e.trim().length>0?Object(e):e;for(const e of i)if(s(e)&&e.trim().length>0||p(e,{includeNaN:!0})){if(c(y)||!Object.prototype.hasOwnProperty.call(y,e))return!1;y=y[e]}else{if(!f(e))return!1;{if(c(y)||"object"!=typeof y&&!r(y))return!1;const t=Object.getOwnPropertySymbols(y).find(r=>r===e||r.description===e.description);if(!t)return!1;y=y[t]}}return(!a||!m(y))&&(!n||!c(y))}var d=(e,r={})=>{if(!s(e))return!1;W(r,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const t=!y(r,"trim")||r.trim;u(t,{message:({currentType:e,validType:r})=>`Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${r}\`, but received: \`${e}\`.`});return(t?e.trim():e).length>0};function g(e){return"[object Set]"===Object.prototype.toString.call(e)||e instanceof Set}function j(e){return Array.isArray(e)&&e.length>0}var S=e=>{let r="";return o(e)?r=e.map(e=>d(e)?e.trim():"").filter(e=>e.length).join("-"):d(e)&&(r=e.trim()),r.split(/[^\p{L}\p{N}]+/u).filter(Boolean)},v=e=>{const r=new Set([]),t=e=>e.trim().split(/[^\p{L}\p{N}]+/u).filter(Boolean).join("");if(d(e)){const o=t(e);o&&r.add(o)}return j(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),g(e)&&e.forEach(e=>{if(d(e)){const o=t(e);o&&r.add(o)}}),r},h=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map((e,r)=>o.has(e)?e:0===r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},C=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")},N=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("")},x=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(" ")},w=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-")},A=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("_")},T=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join(".")},O=(e,r)=>{if(!j(e)&&!d(e))return"";const t=S(e),o=v(r);return t.map(e=>o.has(e)?e:e.toLowerCase()).join("-").replace(/^-+|-+$/g,"")},P=e=>"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error,E=e=>"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e),R=Object.freeze(["URI","URL","HTTP","HTTPS","HTML","XML","CSS","JS","JSON","SVG","DOM","UTC","XHR","RTC","ICE","TLS","TCP","UDP","IDB","ID"]);function I(e){return a(e)&&"[object String]"===Object.prototype.toString.call(e)}function L(e){return a(e)&&"[object Boolean]"===Object.prototype.toString.call(e)}function B(e){if("number"==typeof e||i(e)){const r=Number(e);return r===1/0||r===-1/0}return!1}var U=e=>e.replace(/[\s_\-]+/g,"").toLowerCase(),$=Object.entries({string:"String",number:"Number",boolean:"Boolean",bigint:"Big Int",symbol:"Symbol",undefined:"Undefined",null:"Null",regexp:"Reg Exp",reflect:"Reflect",proxy:"Proxy",atomics:"Atomics",object:"Object",array:"Array",arguments:"Arguments",function:"Function",asyncfunction:"Async Function",generatorfunction:"Generator Function",asyncgeneratorfunction:"Async Generator Function",generator:"Generator",promise:"Promise",evalerror:"Eval Error",rangeerror:"Range Error",referenceerror:"Reference Error",syntaxerror:"Syntax Error",typeerror:"Type Error",urierror:"URI Error",aggregateerror:"Aggregate Error",error:"Error",int8array:"Int 8 Array",uint8array:"Uint 8 Array",uint8clampedarray:"Uint 8 Clamped Array",int16array:"Int 16 Array",uint16array:"Uint 16 Array",int32array:"Int 32 Array",uint32array:"Uint 32 Array",float32array:"Float 32 Array",float64array:"Float 64 Array",bigint64array:"Big Int 64 Array",biguint64array:"Big Uint 64 Array",arraybuffer:"Array Buffer",sharedarraybuffer:"Shared Array Buffer",dataview:"Data View",arraybufferview:"Array Buffer View",map:"Map",set:"Set",weakmap:"Weak Map",weakset:"Weak Set",mapiterator:"Map Iterator",setiterator:"Set Iterator",arrayiterator:"Array Iterator",stringiterator:"String Iterator",readablestream:"Readable Stream",writablestream:"Writable Stream",transformstream:"Transform Stream",readablestreamdefaultreader:"Readable Stream Default Reader",writablestreamdefaultwriter:"Writable Stream Default Writer",readablestreamdefaultcontroller:"Readable Stream Default Controller",transformstreamdefaultcontroller:"Transform Stream Default Controller",abortcontroller:"Abort Controller",abortsignal:"Abort Signal",fetch:"fetch",request:"Request",response:"Response",headers:"Headers",formdata:"FormData",blob:"Blob",file:"File",filelist:"FileList",filereader:"FileReader",intl:"Intl",collator:"Intl. Collator",datetimeformat:"Intl. Date Time Format",listformat:"Intl. List Format",numberformat:"Intl. Number Format",pluralrules:"Intl. Plural Rules",relativetimeformat:"Intl. Relative Time Format",segmenter:"Intl. Segmenter",locale:"Intl. Locale",displaynames:"Intl. Display Names",finalizationregistry:"Finalization Registry",weakref:"Weak Ref",structuredclone:"structured Clone",urlpattern:"URL Pattern",performance:"Performance",performanceobserver:"Performance Observer",performanceentry:"Performance Entry",performancemark:"Performance Mark",performancemeasure:"Performance Measure",webassembly:"Web Assembly",wasmmodule:"WebAssembly .Module",wasminstance:"WebAssembly. Instance",wasmmemory:"WebAssembly. Memory",wasmtable:"WebAssembly. Table",buffer:"Buffer",process:"Process",eventemitter:"Event Emitter",stream:"Stream",fs:"fs",path:"path",url:"URL",urlsearchparams:"URL Search Params",node:"Node",element:"Element",htmlelement:"HTML Element",svgelement:"SVG Element",document:"Document",documentfragment:"Document Fragment",shadowroot:"Shadow Root",nodelist:"Node List",htmlcollection:"HTML Collection",mutationobserver:"Mutation Observer",intersectionobserver:"Intersection Observer",resizeobserver:"Resize Observer"}).reduce((e,[r,t])=>(e[U(r)]=t,e),{});var F=(e,r)=>"toPascalCaseSpace"===r?C(e,R):"slugify"===r?O(e,R):"toCamelCase"===r?h(e,R):"toDotCase"===r?T(e,R):"toKebabCase"===r?w(e,R):"toPascalCase"===r?N(e,R):"toSnakeCase"===r?A(e,R):x(e,R),D=(e,t={formatCase:"toLowerCase"})=>{var o,s;n(t)||(t={});const u=t.formatCase;if(c(e))return F($[U("null")]??"Null",u);if(l(e))return"NaN";if(B(e))return String(e);if(i(e))return F("Number Constructor",u);if(I(e))return F("String Constructor",u);if(L(e))return F("Boolean Constructor",u);const p=typeof e;if(!b(e)&&!r(e))return F($[U(p)]??p,u);if(E(e))return F($[U("buffer")]??"Buffer",u);if(function(e){if("object"!=typeof e||null===e)return!1;const r=Object.prototype.toString.call(e);if(["[object Array]","[object Date]","[object RegExp]","[object Map]","[object Set]","[object WeakMap]","[object WeakSet]","[object Function]","[object Error]","[object Promise]","[object Generator]","[object GeneratorFunction]","[object AsyncFunction]"].includes(r))return!1;try{return Reflect.defineProperty(e,"__proxy_detect__",{configurable:!0,value:1}),Reflect.deleteProperty(e,"__proxy_detect__"),!1}catch{return!0}}(e))return F($[U("proxy")]??"Proxy",u);if(a(e)&&r(null==e?void 0:e.next)&&r(null==e?void 0:e.throw))return F($[U("generator")]??"Generator",u);if(P(e)){const r=(null==(o=e.constructor)?void 0:o.name)??"Error";return F($[U(r)]??$[U(r.replace(/\s+/g,""))]??r,u)}if(c(Object.getPrototypeOf(e)))return F($[U("object")]??"Object",u);const f=Object.prototype.toString.call(e).slice(8,-1)||"Object",m=$[U(f)];if(m)return F(m,u);const y=null==(s=null==e?void 0:e.constructor)?void 0:s.name;return F(y&&"Object"!==y?$[U(y)]??y:f,u)};function M(e){const{requiredValidType:t,value:o,options:a}=e||{},{message:s,formatCase:i}=n(a)?a:{},l=w(t),c=D(o,{formatCase:i}),u={currentType:c,validType:l},p=`Parameter input (\`value\`) must be of type \`${l}\`, but received: \`${c}\`.`;return r(s)?d(s(u))?s(u).trim():p:d(s)?s.trim():p}function W(e,r={}){if(n(e))return;const t=M({value:e,options:r,requiredValidType:"plain object"});throw new TypeError(t)}exports.assertIsBoolean=u,exports.assertIsPlainObject=W,exports.capitalizeFirst=(e,r={lowerCaseNextRest:!0,trim:!1})=>{if(!d(e))return"";n(r)||(r={});const t=!1!==r.lowerCaseNextRest;return!0===r.trim&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},exports.capitalizeWords=(e,r={collapseSpaces:!1,trim:!1})=>{var t,o;if(!d(e))return"";let a=e;n(r)||(r={});const s=!0===r.collapseSpaces;if(!0===r.trim&&(a=a.trim()),s){const e=(null==(t=a.match(/^\s*/))?void 0:t[0])??"",r=(null==(o=a.match(/\s*$/))?void 0:o[0])??"";a=a.trim().replace(/\s+/g," "),a=`${e}${a}${r}`}return a.toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},exports.getPreciseType=D,exports.hasOwnProp=y,exports.isArray=o,exports.isBoolean=e,exports.isBooleanObject=L,exports.isBuffer=E,exports.isError=P,exports.isFunction=r,exports.isInfinityNumber=B,exports.isNaN=l,exports.isNil=t,exports.isNonEmptyArray=j,exports.isNonEmptyString=d,exports.isNull=c,exports.isNumber=p,exports.isNumberObject=i,exports.isObject=a,exports.isObjectOrArray=b,exports.isPlainObject=n,exports.isSet=g,exports.isString=s,exports.isStringObject=I,exports.isSymbol=f,exports.isUndefined=m,exports.resolveErrorMessageAssertions=M,exports.slugify=O,exports.toCamelCase=h,exports.toDotCase=T,exports.toKebabCase=w,exports.toLowerCase=x,exports.toPascalCase=N,exports.toPascalCaseSpace=C,exports.toSnakeCase=A;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isInteger as e}from"./chunk-WVSPXFTY.js";import{safeStableStringify as r}from"./chunk-AJ65QFV2.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
|
+
"use strict";exports.isServer=()=>"undefined"==typeof window||"undefined"==typeof document;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.isURL=s=>s instanceof URL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-J2RGTPGK.cjs"),t=require("./chunk-Y4O5KZF6.cjs"),s=require("./chunk-INUFZJLX.cjs");exports.disableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&!r.classList.contains(s)&&r.classList.add(s)},exports.enableUserInteraction=(s="on_processing")=>{if(e.isServer())return;t.assertIsString(s,{message:({validType:e,currentType:t})=>`First parameter \`className\` must be of type \`${e}\`, but received: \`${t}\`.`});const{documentElement:r}=document;r&&r.classList.contains(s)&&r.classList.remove(s)},exports.removeElementFocus=()=>{if(e.isServer())return;const t=document.activeElement;t instanceof HTMLElement&&t.blur()},exports.scrollToTop=t=>{if(e.isServer())return;s.isPlainObject(t)||(t={});const r=s.hasOwnProp(t,"behavior")&&s.isNonEmptyString(t.behavior)&&["auto","instant","smooth"].includes(t.behavior.trim())?t.behavior:"smooth";let i=s.hasOwnProp(t,"timeout")&&s.isNumber(t.timeout)&&t.timeout>=1?t.timeout:1;i=i>2147483647?2147483647:i,setTimeout(()=>window.scrollTo({top:0,left:0,behavior:r}),i)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyArray as e,isEmptyObject as r}from"./chunk-BSVZRN7C.js";import{noop as t}from"./chunk-FIAAX3UE.js";import{safeStableStringify as o}from"./chunk-AJ65QFV2.js";import{isString as n,isNumber as s,isNull as a,isUndefined as c,isNaN as i,isArray as m,isObject as l,isNonEmptyString as u,getPreciseType as v,isError as f,assertIsPlainObject as d,hasOwnProp as p,isBoolean as N,isFunction as g}from"./chunk-2UIRWYE3.js";var y=e=>{if(!n(e)&&!s(e))return 0;const r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0},b=(e={})=>{d(e,{message:({currentType:e,validType:r})=>`Second parameter (\`options\`) must be of type \`${r}\`, but received: \`${e}\`.`});const r=!!p(e,"convertBooleans")&&e.convertBooleans,o=!!p(e,"convertDates")&&e.convertDates,n=!!p(e,"convertNumbers")&&e.convertNumbers,s=!!p(e,"loggingOnFail")&&e.loggingOnFail,a=!!p(e,"removeEmptyArrays")&&e.removeEmptyArrays,c=!!p(e,"removeEmptyObjects")&&e.removeEmptyObjects,i=!!p(e,"removeNulls")&&e.removeNulls,l=!!p(e,"removeUndefined")&&e.removeUndefined,u=!!p(e,"strictMode")&&e.strictMode,f=!!p(e,"checkSymbols")&&e.checkSymbols,y=!!p(e,"convertNaN")&&e.convertNaN,b=p(e,"customDateFormats")?e.customDateFormats:[],E=p(e,"onError")?e.onError:t;if(!(N(r)&&N(o)&&N(n)&&N(y)&&N(f)&&N(s)&&N(a)&&N(c)&&N(i)&&N(l)&&N(u)&&m(b)&&g(E)))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': \`${v(r)}\`, 'convertDates': \`${v(o)}\`, 'convertNumbers': \`${v(n)}\`, 'loggingOnFail': \`${v(s)}\`, 'removeEmptyArrays': \`${v(a)}\`, 'removeEmptyObjects': \`${v(c)}\`, 'removeNulls': \`${v(i)}\`, 'removeUndefined': \`${v(l)}\`, 'strictMode': \`${v(u)}\`, 'customDateFormats': \`${v(b)}\`, 'onError': \`${v(E)}\`].`);return{convertBooleans:r,convertDates:o,convertNumbers:n,convertNaN:y,loggingOnFail:s,removeEmptyArrays:a,removeEmptyObjects:c,removeNulls:i,removeUndefined:l,strictMode:u,customDateFormats:b,onError:E,checkSymbols:f}},E=(t,o={})=>{var s;const u=b(o);if(a(t))return u.removeNulls?void 0:null;if(!c(t)){if(n(t)){const e=t.trim();if(u.convertNaN&&"NaN"===e)return NaN;if(u.convertNumbers&&!i(Number(e)))return Number(e);if(u.convertBooleans){if("true"===e)return!0;if("false"===e)return!1}if(u.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==(s=u.customDateFormats)?void 0:s.length)for(const r of u.customDateFormats){const t=D(e,r);if(t)return t}}return u.strictMode?void 0:e}if(m(t)){const r=t.map(e=>E(e,u)).filter(e=>!c(e));return u.removeEmptyArrays&&e(r)?void 0:r}if(l(t)){const e={};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=E(t[r],u);c(o)||(e[r]=o)}return u.removeEmptyObjects&&r(e,{checkSymbols:u.checkSymbols})?void 0:e}return u.strictMode?void 0:t}u.removeUndefined},D=(e,r)=>{if(!u(e)||!u(r))throw new TypeError(`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${v(e)}\` - (current value: \`${o(e)}\`), 'format': \`${v(r)}\` - (current value: \`${o(r)}\`)]".`);const t=e.split(/[-/]/).map(Number);if(3!==t.length||t.some(i))return null;let n,s,a;if("DD/MM/YYYY"===r)[n,s,a]=t;else{if("MM/DD/YYYY"!==r)return null;[s,n,a]=t}s-=1;const c=new Date(a,s,n);return c.getFullYear()!==a||c.getMonth()!==s||c.getDate()!==n?null:c};function h(e,r={}){if(a(e))return null;const t=b(r);if(t.convertNaN&&(i(e)||u(e)&&"NaN"===e))return NaN;if(t.convertNumbers&&!i(Number(e))&&s(y(e)))return Number(e);if(n(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 a=0;a<e.length;a++){const c=e[a];if(s)o?"'"===c?t+="'":r.has(c)?t+="\\"===c?"\\\\":'"'===c?'\\"':"\\"+c:t+="\\\\"+c:n?'"'===c?t+='\\"':r.has(c)?t+="\\"+c:t+="\\\\"+c:t+="\\"+c,s=!1;else if("\\"!==c){if(o||n){if(o){if("'"===c){t+='"',o=!1;continue}}else if(n&&'"'===c){t+='"',n=!1;continue}}else{if("'"===c){t+='"',o=!0;continue}if('"'===c){t+='"',n=!0;continue}}t+=c}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 E(o,t)}catch(e){return t.loggingOnFail&&console.error("Failed to parsing at `safeJsonParse`:",e),void t.onError(f(e)?new Error(e.message.replace(/^JSON\.parse:/,"Failed to parsing")):new Error(String(e)))}}export{E as cleanParsedData,y as extractDigits,D as parseCustomDate,h as safeJsonParse};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=()=>"undefined"==typeof window||"undefined"==typeof document;export{e as isServer};
|
package/dist/chunk-MMSYCIJ2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./chunk-Z4DXK7A6.cjs"),r=require("./chunk-5C2SMIGX.cjs"),t=require("./chunk-E63WVPZE.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
|
+
"use strict";var e=require("./chunk-YT3MSZKK.cjs"),i=require("./chunk-INUFZJLX.cjs"),r=require("tailwind-merge-v3"),s=require("tailwind-merge-v4");function t(e){var i,r,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(i=0;i<o;i++)e[i]&&(r=t(e[i]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}var o=function(){for(var e,i,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(i=t(e))&&(s&&(s+=" "),s+=i);return s},n=e=>{i.isPlainObject(e)||(e={});let{config:r,prefix:s,extend:t,override:o,cacheSize:n,experimentalParseClassName:a}=e;i.isPlainObject(r)||(r={}),i.isPlainObject(t)||(t={}),i.isPlainObject(o)||(o={}),i.isNumber(n)||(n=void 0),i.isNonEmptyString(s)||(s=void 0),i.isFunction(a)||(a=void 0);return{config:r,override:o,cacheSize:n,prefix:s,experimentalParseClassName:a,theme:i.hasOwnProp(t,"theme")?t.theme:{},classGroups:i.hasOwnProp(t,"classGroups")?t.classGroups:{},conflictingClassGroupModifiers:i.hasOwnProp(t,"conflictingClassGroupModifiers")?t.conflictingClassGroupModifiers:{},conflictingClassGroups:i.hasOwnProp(t,"conflictingClassGroups")?t.conflictingClassGroups:{},orderSensitiveModifiers:i.hasOwnProp(t,"orderSensitiveModifiers")&&i.isNonEmptyArray(t.orderSensitiveModifiers)?t.orderSensitiveModifiers:[]}},a=r.getDefaultConfig(),c=(e={})=>{var s,t,o;i.isPlainObject(e)||(e={});const{cacheSize:c,classGroups:l,config:f,conflictingClassGroupModifiers:p,conflictingClassGroups:u,override:d,prefix:m,theme:g,experimentalParseClassName:x}=n(e);return r.extendTailwindMerge({prefix:m??f.prefix,cacheSize:c||a.cacheSize,experimentalParseClassName:x,override:d,extend:{conflictingClassGroupModifiers:{...a.conflictingClassGroupModifiers,...p},theme:{...a.theme,...g},conflictingClassGroups:{...a.conflictingClassGroups,...u},classGroups:{...a.classGroups,...l,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(s=f.theme)?void 0:s.fontSize)||{},...(null==(o=null==(t=f.theme)?void 0:t.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},l=s.getDefaultConfig(),f=(e={})=>{var r,t,o;i.isPlainObject(e)||(e={});const{cacheSize:a,classGroups:c,config:f,conflictingClassGroupModifiers:p,conflictingClassGroups:u,orderSensitiveModifiers:d,override:m,prefix:g,theme:x,experimentalParseClassName:h}=n(e);return s.extendTailwindMerge({prefix:g||f.prefix,cacheSize:a||l.cacheSize,experimentalParseClassName:h,override:m,extend:{conflictingClassGroupModifiers:{...l.conflictingClassGroupModifiers,...p},theme:{...l.theme,...x},conflictingClassGroups:{...l.conflictingClassGroups,...u},orderSensitiveModifiers:[...l.orderSensitiveModifiers,...d],classGroups:{...l.classGroups,...c,"text-shadow":["","-sm","-md","-lg","-xl","-xxl","-none","-default"].map(e=>`text-shadow${e}`),"font-size":Object.keys({...(null==(r=f.theme)?void 0:r.fontSize)||{},...(null==(o=null==(t=f.theme)?void 0:t.extend)?void 0:o.fontSize)||{}}).map(e=>`text-${e}`)}}})},p=c(),u=f();exports.cnV3=(...e)=>p(o(...e)),exports.cnV4=(...e)=>u(o(...e)),exports.customCnV3=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.customCnV4=(e,...r)=>{if(!i.isFunction(e))throw new TypeError(`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${i.getPreciseType(e)}\`.`);return e(o(...r))},exports.shouldForwardProp=i=>(e.assertIsArray(i,{message:({currentType:e,validType:i})=>`First parameter (\`props\`) must be of type \`${i}\`, but received: \`${e}\`.`}),e=>!i.map(e=>e.toString()).includes(e.toString())),exports.twMergeDefaultV3=c,exports.twMergeDefaultV4=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=a=>a instanceof URL;export{a as isURL};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isURL as r}from"./chunk-ONZFBJVW.js";import{toStringArrayUnRecursive as e}from"./chunk-CTBRLEOG.js";import{isEmptyValue as t}from"./chunk-FEKDB32T.js";import{assertIsArray as n}from"./chunk-ZXIWDFEQ.js";import{normalizeString as o}from"./chunk-Q6NHYWVX.js";import{isEmptyString as a}from"./chunk-TSLYDPBJ.js";import{safeStableStringify as s}from"./chunk-AJ65QFV2.js";import{isString as i,getPreciseType as c,isUndefined as m,isNonEmptyString as u,isFunction as p,isNumber as h,isError as l}from"./chunk-2UIRWYE3.js";var f=(f,y,d)=>{if(i(f)){if(a(f))throw new TypeError("First parameter (`baseUrl`) cannot be an empty-string.");f=o(f)}else if(!r(f))throw new TypeError(`First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${c(f)}\`, with current value: \`${s(f)}\`.`);if(!m(d)&&(n(d,{message:({currentType:r,validType:e})=>`Third parameter (\`removeParams\`) must be of type \`${e} of strings\`, but received: \`${r}\`.`}),!d.every(r=>u(r))))throw new TypeError("Third parameter (`removeParams`) must be of type `array` and contains `string` only and non empty-string.");try{if(!m(y)&&!p(y[Symbol.iterator]))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c(y)}\`, with value: \`${s(y)}\`.`);const r=new URL(f);if(!m(y)){const n=Object.fromEntries(y);if(!t(n)){const t=new URLSearchParams(r.search);for(const[r,e]of Object.entries(n)){if(!u(e)&&!h(e,{includeNaN:!0}))throw new TypeError(`Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${c(y)}\`, with value: \`${s(y)}\`.`);t.set(r,String(e))}(null==d?void 0:d.length)&&e(d).map(r=>{t.delete(r)}),r.search=t.toString()}}return null==d||d.forEach(e=>r.searchParams.delete(e)),r}catch(r){if(l(r))throw r;throw new Error("Failed to construct a valid URL in `constructURL()`, Error:"+r)}},y=r=>{if(!u(r))return null;let e;try{e=decodeURIComponent(r)}catch{return null}const t=e.match(/https?:\/\/.*?(?=https?:\/\/|\s|$)/g);if(!t)return null;const n=t.map(r=>r.replace(/[.,;:!?)]*$/,"")).filter(r=>{try{const e=new URL(r);return"http:"===e.protocol||"https:"===e.protocol}catch{return!1}});return n.length?n:null};export{f as constructURL,y as extractURLs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isEmptyString as r}from"./chunk-TSLYDPBJ.js";import{isNonEmptyString as t,isPlainObject as i,isString as n}from"./chunk-2UIRWYE3.js";var e=(r,n={withTrim:!0,trimOnly:!1})=>{if(!t(r))return"";i(n)||(n={});const{trimOnly:e=!1,withTrim:m=!0}=n;return e?r.trim():(m&&(r=r.trim()),r.replace(/\s+/g," "))},m=r=>t(r)?r.trim():"",u=(r,n={trimOnly:!1})=>{if(!t(r))return"";i(n)||(n={});const{trimOnly:e=!1}=n;return e?r.trim():r.replace(/\s+/g,"")};function c(t){if(!n(t))return;if(r(t))return"";return t.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim()}export{e as normalizeSpaces,m as normalizeString,u as removeSpaces,c as stripHtmlTags};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=t=>"bigint"==typeof t;export{t as isBigInt};
|
|
@@ -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-E63WVPZE.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{safeJsonParse as e}from"./chunk-LBMEEJWA.js";import{isEqual as r,isEmptyArray as t}from"./chunk-BSVZRN7C.js";import{assertIsArray as n}from"./chunk-ZXIWDFEQ.js";import{safeStableStringify as s}from"./chunk-AJ65QFV2.js";import{isPlainObject as i,isNonEmptyArray as o,isObjectOrArray as c,isArray as a,isNaN as u,isUndefined as m}from"./chunk-2UIRWYE3.js";var f=e=>{n(e,{message:({currentType:e,validType:r})=>`First parameter (\`values\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const t=[];return e.forEach((n,s)=>{for(let i=s+1;i<e.length;i++)if(r(n,e[i])){t.some(e=>r(e,n))||t.push(n);break}}),t},p=(e,r)=>{if(!i(e))return{};n(r,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const t=f(r);if(t.length>0)throw new Error(`Function "omitKeys" Error: Duplicate keys detected - \`${t}\``);return Object.fromEntries(Object.entries(e).filter(([e])=>!r.includes(e)))},l=(r,p)=>{if(!i(r))return{};n(p,{message:({currentType:e,validType:r})=>`Second parameter (\`keysToOmit\`) must be of type \`${r}\` (array literal or instance), but received: \`${e}\`.`});const l=f(p);if(o(l))throw new Error(`Function "omitKeysDeep" Error: Duplicate keys detected - \`${s(l)}\`.`);const y=(e,r)=>{if(!c(e))return e;const[n,...s]=r;if(t(s))if(a(e)){const r=parseInt(n);!u(r)&&r in e&&e.splice(r,1)}else delete e[n];else{const r=e[n];c(r)&&(e[n]=y(r,s))}return e},d=e=>{if(a(e))return e.map(d).filter(e=>!(c(e)&&0===Object.keys(e).length));if(c(e)){return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,d(r)]).filter(([,e])=>!(m(e)||c(e)&&0===Object.keys(e).length)))}return e},b=e(s(r));for(const e of p){const r=e.split(".");y(b,r)}return d(b)};export{f as findDuplicates,p as omitKeys,l as omitKeysDeep};
|
|
@@ -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";var e=require("./chunk-DVMHRLKP.cjs"),t=require("./chunk-E63WVPZE.cjs"),r=require("./chunk-INUFZJLX.cjs");var n=(n,s)=>{if(!e.isInteger(n)||!e.isInteger(s))throw new TypeError(`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${i(n,s)}value, but received: ['min': \`${r.getPreciseType(n)}\` - (with value: \`${t.safeStableStringify(n)})\`, 'max': \`${r.getPreciseType(s)}\` - (with value: \`${t.safeStableStringify(s)}\`)].`);if(n>s)throw new RangeError(`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${a(n)}, 'max': ${a(s)}].`);return n=Math.max(1,n),s=Math.min(Number.MAX_SAFE_INTEGER,s),Math.floor(Math.random()*(s-n+1))+n},a=e=>r.isNumber(e,{includeNaN:!0})?e===Number.MIN_VALUE?"`Number.MIN_VALUE`":`${e}`:`\`${r.getPreciseType(e)}\``,i=(...e)=>e.some(e=>r.isNumber(e,{includeNaN:!0})&&e===Number.MIN_VALUE)?" and can't be `Number.MIN_VALUE` ":" ";exports.getRandomItem=function(e){if(!r.isNonEmptyArray(e))return;return e[Math.floor(Math.random()*(e.length||0))]},exports.randomInt=n,exports.randomIntByLength=a=>{r.isPlainObject(a)||(a={});const{minLength:i=1,maxLength:s=16,avoidZero:m=!1}=a;if(r.assertIsBoolean(m,{message:({currentType:e,validType:t})=>`Parameters \`avoidZero\` must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>16||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 16, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);const o=i===s?i:n(i,s),h=10**(o-1);let u=n(h,10**o-1);return m&&0===u&&(u=h),u},exports.randomStr=a=>{r.isPlainObject(a)||(a={});const{minLength:i=40,maxLength:s=40,type:m="string",avoidWhiteSpace:o=!0}=a;if(r.assertIsBoolean(o,{message:({currentType:e,validType:t})=>`Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${t}\`, but received: \`${e}\`.`}),!e.isInteger(i)||!e.isInteger(s))throw new TypeError(`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${r.getPreciseType(i)}\` - (with value: ${t.safeStableStringify(i)}), 'maxLength': \`${r.getPreciseType(s)}\` - (with value: ${t.safeStableStringify(s)})].`);if(i<1||s>5e3||i>s)throw new RangeError(`Invalid range at parameters \`minLength\` must be ≥ 1, \`maxLength\` must be ≤ 5000, and \`minLength\` ≤ \`maxLength\`, but received: ['minLength': \`${i}\`, 'maxLength': \`${s}\`].`);if("string"!==m&&"number"!==m)throw new TypeError(`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${r.getPreciseType(m)}\`, with value: ${t.safeStableStringify(m)}.`);const h=n(i,s),u="number"===m?(r.isNaN(Number(a.replaceGenInt))?void 0:a.replaceGenInt)??"0123456789":(a.replaceGenStr?a.replaceGenStr:void 0)??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",g=(c=u,(o?c.replace(/\s|\n|\t/g,""):c)+(a.addChar||""));var c;if(!g.length){throw new Error(`Character set is empty. ${(()=>"number"===m?o?"If `avoidWhiteSpace` is true, and `replaceGenInt` cant be empty-string value, ensure `replaceGenInt` has valid characters and non-nan string number.":"Ensure `replaceGenInt` has valid characters and not a NaN number string while convert to number.":"Ensure `replaceGenStr` has valid characters and non empty string.")()}`)}let p="";for(let e=0;e<h;e++)p+=g.charAt(Math.floor(Math.random()*g.length));return p};
|
|
@@ -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{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
|
+
"use strict";var t=require("./chunk-GGRMHIFJ.cjs"),r=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);exports.isNonEmptyValue=(r,e={})=>!t.isEmptyValue(r,e),exports.isTypedArray=function(t){return null!=t&&"object"==typeof t&&r.has(Object.prototype.toString.call(t))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return"number"==typeof e&&Number.isInteger(e)}export{e as isInteger};
|