@faker-js/faker
Version:
Generate massive amounts of fake contextual data
8 lines • 200 kB
JavaScript
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;var m=class extends Error{};function Ce(i){let e=Object.getPrototypeOf(i);do{for(let r of Object.getOwnPropertyNames(e))typeof i[r]=="function"&&r!=="constructor"&&(i[r]=i[r].bind(i));e=Object.getPrototypeOf(e)}while(e!==Object.prototype)}var x=class{constructor(e){this.faker=e;Ce(this)}},p=class extends x{constructor(r){super(r);this.faker=r}};var Ne=(t=>(t.Narrowbody="narrowbody",t.Regional="regional",t.Widebody="widebody",t))(Ne||{}),kr=["0","1","2","3","4","5","6","7","8","9"],xr=["0","O","1","I","L"],Ar={regional:20,narrowbody:35,widebody:60},Er={regional:["A","B","C","D"],narrowbody:["A","B","C","D","E","F"],widebody:["A","B","C","D","E","F","G","H","J","K"]},F=class extends p{airport(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airport)}airline(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airline)}airplane(){return this.faker.helpers.arrayElement(this.faker.definitions.airline.airplane)}recordLocator(e={}){let{allowNumerics:r=!1,allowVisuallySimilarCharacters:t=!1}=e,a=[];return r||a.push(...kr),t||a.push(...xr),this.faker.string.alphanumeric({length:6,casing:"upper",exclude:a})}seat(e={}){let{aircraftType:r="narrowbody"}=e,t=Ar[r],a=Er[r],n=this.faker.number.int({min:1,max:t}),o=this.faker.helpers.arrayElement(a);return`${n}${o}`}aircraftType(){return this.faker.helpers.enumValue(Ne)}flightNumber(e={}){let{length:r={min:1,max:4},addLeadingZeros:t=!1}=e,a=this.faker.string.numeric({length:r,allowLeadingZeros:!1});return t?a.padStart(4,"0"):a}};var De=(n=>(n.SRGB="sRGB",n.DisplayP3="display-p3",n.REC2020="rec2020",n.A98RGB="a98-rgb",n.ProphotoRGB="prophoto-rgb",n))(De||{}),Re= exports.d =(c=>(c.RGB="rgb",c.RGBA="rgba",c.HSL="hsl",c.HSLA="hsla",c.HWB="hwb",c.CMYK="cmyk",c.LAB="lab",c.LCH="lch",c.COLOR="color",c))(Re||{});function wr(i,e){let{prefix:r,casing:t}=e;switch(t){case"upper":{i=i.toUpperCase();break}case"lower":{i=i.toLowerCase();break}case"mixed":}return r&&(i=r+i),i}function Le(i){return i.map(r=>{if(r%1!==0){let a=new ArrayBuffer(4);new DataView(a).setFloat32(0,r);let n=new Uint8Array(a);return Le([...n]).replaceAll(" ","")}return(r>>>0).toString(2).padStart(8,"0")}).join(" ")}function A(i){return Math.round(i*100)}function Sr(i,e="rgb",r="sRGB"){switch(e){case"rgba":return`rgba(${i[0]}, ${i[1]}, ${i[2]}, ${i[3]})`;case"color":return`color(${r} ${i[0]} ${i[1]} ${i[2]})`;case"cmyk":return`cmyk(${A(i[0])}%, ${A(i[1])}%, ${A(i[2])}%, ${A(i[3])}%)`;case"hsl":return`hsl(${i[0]}deg ${A(i[1])}% ${A(i[2])}%)`;case"hsla":return`hsl(${i[0]}deg ${A(i[1])}% ${A(i[2])}% / ${A(i[3])})`;case"hwb":return`hwb(${i[0]} ${A(i[1])}% ${A(i[2])}%)`;case"lab":return`lab(${A(i[0])}% ${i[1]} ${i[2]})`;case"lch":return`lch(${A(i[0])}% ${i[1]} ${i[2]})`;case"rgb":return`rgb(${i[0]}, ${i[1]}, ${i[2]})`}}function D(i,e,r="rgb",t="sRGB"){switch(e){case"css":return Sr(i,r,t);case"binary":return Le(i);case"decimal":return i}}var G=class extends p{human(){return this.faker.helpers.arrayElement(this.faker.definitions.color.human)}space(){return this.faker.helpers.arrayElement(this.faker.definitions.color.space)}cssSupportedFunction(){return this.faker.helpers.enumValue(Re)}cssSupportedSpace(){return this.faker.helpers.enumValue(De)}rgb(e={}){let{format:r="hex",includeAlpha:t=!1,prefix:a="#",casing:n="lower"}=e,o,s="rgb";return r==="hex"?(o=this.faker.string.hexadecimal({length:t?8:6,prefix:""}),o=wr(o,{prefix:a,casing:n}),o):(o=Array.from({length:3},()=>this.faker.number.int(255)),t&&(o.push(this.faker.number.float({multipleOf:.01})),s="rgba"),D(o,r,s))}cmyk(e={}){let{format:r="decimal"}=e,t=Array.from({length:4},()=>this.faker.number.float({multipleOf:.01}));return D(t,r,"cmyk")}hsl(e={}){let{format:r="decimal",includeAlpha:t=!1}=e,a=[this.faker.number.int(360)];for(let n=0;n<(_optionalChain([e, 'optionalAccess', _2 => _2.includeAlpha])?3:2);n++)a.push(this.faker.number.float({multipleOf:.01}));return D(a,r,t?"hsla":"hsl")}hwb(e={}){let{format:r="decimal"}=e,t=[this.faker.number.int(360)];for(let a=0;a<2;a++)t.push(this.faker.number.float({multipleOf:.01}));return D(t,r,"hwb")}lab(e={}){let{format:r="decimal"}=e,t=[this.faker.number.float({multipleOf:1e-6})];for(let a=0;a<2;a++)t.push(this.faker.number.float({min:-100,max:100,multipleOf:1e-4}));return D(t,r,"lab")}lch(e={}){let{format:r="decimal"}=e,t=[this.faker.number.float({multipleOf:1e-6})];for(let a=0;a<2;a++)t.push(this.faker.number.float({max:230,multipleOf:.1}));return D(t,r,"lch")}colorByCSSColorSpace(e={}){let{format:r="decimal",space:t="sRGB"}=e,a=Array.from({length:3},()=>this.faker.number.float({multipleOf:1e-4}));return D(a,r,"color",t)}};var be=(a=>(a.Legacy="legacy",a.Segwit="segwit",a.Bech32="bech32",a.Taproot="taproot",a))(be||{}),Pe= exports.f =(r=>(r.Mainnet="mainnet",r.Testnet="testnet",r))(Pe||{}),Be={legacy:{prefix:{mainnet:"1",testnet:"m"},length:{min:26,max:34},casing:"mixed",exclude:"0OIl"},segwit:{prefix:{mainnet:"3",testnet:"2"},length:{min:26,max:34},casing:"mixed",exclude:"0OIl"},bech32:{prefix:{mainnet:"bc1",testnet:"tb1"},length:{min:42,max:42},casing:"lower",exclude:"1bBiIoO"},taproot:{prefix:{mainnet:"bc1p",testnet:"tb1p"},length:{min:62,max:62},casing:"lower",exclude:"1bBiIoO"}};var de=typeof Buffer>"u"||!ve("base64")?i=>{let e=new TextEncoder().encode(i),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}:i=>Buffer.from(i).toString("base64"),ge=typeof Buffer>"u"||!ve("base64url")?i=>de(i).replaceAll("+","-").replaceAll("/","_").replaceAll(/=+$/g,""):i=>Buffer.from(i).toString("base64url");function ve(i){try{return typeof Buffer.from("test").toString(i)=="string"}catch (e2){return!1}}function w(i){let{deprecated:e,since:r,until:t,proposed:a}=i,n=`[@faker-js/faker]: ${e} is deprecated`;r&&(n+=` since v${r}`),t&&(n+=` and will be removed in v${t}`),a&&(n+=`. Please use ${a} instead`),console.warn(`${n}.`)}var Mr=Object.fromEntries([["\u0410","A"],["\u0430","a"],["\u0411","B"],["\u0431","b"],["\u0412","V"],["\u0432","v"],["\u0413","G"],["\u0433","g"],["\u0414","D"],["\u0434","d"],["\u044A\u0435","ye"],["\u042A\u0435","Ye"],["\u044A\u0415","yE"],["\u042A\u0415","YE"],["\u0415","E"],["\u0435","e"],["\u0401","Yo"],["\u0451","yo"],["\u0416","Zh"],["\u0436","zh"],["\u0417","Z"],["\u0437","z"],["\u0418","I"],["\u0438","i"],["\u044B\u0439","iy"],["\u042B\u0439","Iy"],["\u042B\u0419","IY"],["\u044B\u0419","iY"],["\u0419","Y"],["\u0439","y"],["\u041A","K"],["\u043A","k"],["\u041B","L"],["\u043B","l"],["\u041C","M"],["\u043C","m"],["\u041D","N"],["\u043D","n"],["\u041E","O"],["\u043E","o"],["\u041F","P"],["\u043F","p"],["\u0420","R"],["\u0440","r"],["\u0421","S"],["\u0441","s"],["\u0422","T"],["\u0442","t"],["\u0423","U"],["\u0443","u"],["\u0424","F"],["\u0444","f"],["\u0425","Kh"],["\u0445","kh"],["\u0426","Ts"],["\u0446","ts"],["\u0427","Ch"],["\u0447","ch"],["\u0428","Sh"],["\u0448","sh"],["\u0429","Sch"],["\u0449","sch"],["\u042A",""],["\u044A",""],["\u042B","Y"],["\u044B","y"],["\u042C",""],["\u044C",""],["\u042D","E"],["\u044D","e"],["\u042E","Yu"],["\u044E","yu"],["\u042F","Ya"],["\u044F","ya"]]),Tr=Object.fromEntries([["\u03B1","a"],["\u03B2","v"],["\u03B3","g"],["\u03B4","d"],["\u03B5","e"],["\u03B6","z"],["\u03B7","i"],["\u03B8","th"],["\u03B9","i"],["\u03BA","k"],["\u03BB","l"],["\u03BC","m"],["\u03BD","n"],["\u03BE","ks"],["\u03BF","o"],["\u03C0","p"],["\u03C1","r"],["\u03C3","s"],["\u03C4","t"],["\u03C5","y"],["\u03C6","f"],["\u03C7","x"],["\u03C8","ps"],["\u03C9","o"],["\u03AC","a"],["\u03AD","e"],["\u03AF","i"],["\u03CC","o"],["\u03CD","y"],["\u03AE","i"],["\u03CE","o"],["\u03C2","s"],["\u03CA","i"],["\u03B0","y"],["\u03CB","y"],["\u0390","i"],["\u0391","A"],["\u0392","B"],["\u0393","G"],["\u0394","D"],["\u0395","E"],["\u0396","Z"],["\u0397","I"],["\u0398","TH"],["\u0399","I"],["\u039A","K"],["\u039B","L"],["\u039C","M"],["\u039D","N"],["\u039E","KS"],["\u039F","O"],["\u03A0","P"],["\u03A1","R"],["\u03A3","S"],["\u03A4","T"],["\u03A5","Y"],["\u03A6","F"],["\u03A7","X"],["\u03A8","PS"],["\u03A9","O"],["\u0386","A"],["\u0388","E"],["\u038A","I"],["\u038C","O"],["\u038E","Y"],["\u0389","I"],["\u038F","O"],["\u03AA","I"],["\u03AB","Y"]]),Cr=Object.fromEntries([["\u0621","e"],["\u0622","a"],["\u0623","a"],["\u0624","w"],["\u0625","i"],["\u0626","y"],["\u0627","a"],["\u0628","b"],["\u0629","t"],["\u062A","t"],["\u062B","th"],["\u062C","j"],["\u062D","h"],["\u062E","kh"],["\u062F","d"],["\u0630","dh"],["\u0631","r"],["\u0632","z"],["\u0633","s"],["\u0634","sh"],["\u0635","s"],["\u0636","d"],["\u0637","t"],["\u0638","z"],["\u0639","e"],["\u063A","gh"],["\u0640","_"],["\u0641","f"],["\u0642","q"],["\u0643","k"],["\u0644","l"],["\u0645","m"],["\u0646","n"],["\u0647","h"],["\u0648","w"],["\u0649","a"],["\u064A","y"],["\u064E\u200E","a"],["\u064F","u"],["\u0650\u200E","i"]]),Nr=Object.fromEntries([["\u0561","a"],["\u0531","A"],["\u0562","b"],["\u0532","B"],["\u0563","g"],["\u0533","G"],["\u0564","d"],["\u0534","D"],["\u0565","ye"],["\u0535","Ye"],["\u0566","z"],["\u0536","Z"],["\u0567","e"],["\u0537","E"],["\u0568","y"],["\u0538","Y"],["\u0569","t"],["\u0539","T"],["\u056A","zh"],["\u053A","Zh"],["\u056B","i"],["\u053B","I"],["\u056C","l"],["\u053C","L"],["\u056D","kh"],["\u053D","Kh"],["\u056E","ts"],["\u053E","Ts"],["\u056F","k"],["\u053F","K"],["\u0570","h"],["\u0540","H"],["\u0571","dz"],["\u0541","Dz"],["\u0572","gh"],["\u0542","Gh"],["\u0573","tch"],["\u0543","Tch"],["\u0574","m"],["\u0544","M"],["\u0575","y"],["\u0545","Y"],["\u0576","n"],["\u0546","N"],["\u0577","sh"],["\u0547","Sh"],["\u0578","vo"],["\u0548","Vo"],["\u0579","ch"],["\u0549","Ch"],["\u057A","p"],["\u054A","P"],["\u057B","j"],["\u054B","J"],["\u057C","r"],["\u054C","R"],["\u057D","s"],["\u054D","S"],["\u057E","v"],["\u054E","V"],["\u057F","t"],["\u054F","T"],["\u0580","r"],["\u0550","R"],["\u0581","c"],["\u0551","C"],["\u0578\u0582","u"],["\u0548\u0552","U"],["\u0548\u0582","U"],["\u0583","p"],["\u0553","P"],["\u0584","q"],["\u0554","Q"],["\u0585","o"],["\u0555","O"],["\u0586","f"],["\u0556","F"],["\u0587","yev"]]),Dr=Object.fromEntries([["\u0686","ch"],["\u06A9","k"],["\u06AF","g"],["\u067E","p"],["\u0698","zh"],["\u06CC","y"]]),Rr=Object.fromEntries([["\u05D0","a"],["\u05D1","b"],["\u05D2","g"],["\u05D3","d"],["\u05D4","h"],["\u05D5","v"],["\u05D6","z"],["\u05D7","ch"],["\u05D8","t"],["\u05D9","y"],["\u05DB","k"],["\u05DA","kh"],["\u05DC","l"],["\u05DD","m"],["\u05DE","m"],["\u05DF","n"],["\u05E0","n"],["\u05E1","s"],["\u05E2","a"],["\u05E4","f"],["\u05E3","ph"],["\u05E6","ts"],["\u05E5","ts"],["\u05E7","k"],["\u05E8","r"],["\u05E9","sh"],["\u05EA","t"],["\u05D5","v"]]),ye={...Mr,...Tr,...Cr,...Dr,...Nr,...Rr};var Lr=(u=>(u.Any="any",u.Loopback="loopback",u.PrivateA="private-a",u.PrivateB="private-b",u.PrivateC="private-c",u.TestNet1="test-net-1",u.TestNet2="test-net-2",u.TestNet3="test-net-3",u.LinkLocal="link-local",u.Multicast="multicast",u))(Lr||{}),Pr={any:"0.0.0.0/0",loopback:"127.0.0.0/8","private-a":"10.0.0.0/8","private-b":"172.16.0.0/12","private-c":"192.168.0.0/16","test-net-1":"192.0.2.0/24","test-net-2":"198.51.100.0/24","test-net-3":"203.0.113.0/24","link-local":"169.254.0.0/16",multicast:"224.0.0.0/4"};function $e(i){return/^[a-z][a-z-]*[a-z]$/i.exec(i)!==null}function Ie(i,e){let r=i.helpers.slugify(e);if($e(r))return r;let t=i.helpers.slugify(i.lorem.word());return $e(t)?t:i.string.alpha({casing:"lower",length:i.number.int({min:4,max:8})})}function ke(i,e){return Math.floor((i.number.int(256)+e)/2).toString(16).padStart(2,"0")}var O=class extends p{email(e={}){let{firstName:r,lastName:t,provider:a=this.faker.helpers.arrayElement(this.faker.definitions.internet.free_email),allowSpecialCharacters:n=!1}=e,o=this.username({firstName:r,lastName:t});if(o=o.replaceAll(/[^A-Za-z0-9._+-]+/g,""),o=o.substring(0,50),n){let s=[..."._-"],l=[...".!#$%&'*+-/=?^_`{|}~"];o=o.replace(this.faker.helpers.arrayElement(s),this.faker.helpers.arrayElement(l))}return o=o.replaceAll(/\.{2,}/g,"."),o=o.replace(/^\./,""),o=o.replace(/\.$/,""),`${o}@${a}`}exampleEmail(e={}){let{firstName:r,lastName:t,allowSpecialCharacters:a=!1}=e,n=this.faker.helpers.arrayElement(this.faker.definitions.internet.example_email);return this.email({firstName:r,lastName:t,provider:n,allowSpecialCharacters:a})}userName(e={}){return w({deprecated:"faker.internet.userName()",proposed:"faker.internet.username()",since:"9.1.0",until:"10.0.0"}),this.username(e)}username(e={}){let{firstName:r=this.faker.person.firstName(),lastName:t=this.faker.person.lastName(),lastName:a}=e,n=this.faker.helpers.arrayElement([".","_"]),o=this.faker.number.int(99),s=[()=>`${r}${n}${t}${o}`,()=>`${r}${n}${t}`];a||s.push(()=>`${r}${o}`);let l=this.faker.helpers.arrayElement(s)();return l=l.normalize("NFKD").replaceAll(/[\u0300-\u036F]/g,""),l=[...l].map(c=>{if(ye[c])return ye[c];let u=_nullishCoalesce(c.codePointAt(0), () => (Number.NaN));return u<128?c:u.toString(36)}).join(""),l=l.toString().replaceAll("'",""),l=l.replaceAll(" ",""),l}displayName(e={}){let{firstName:r=this.faker.person.firstName(),lastName:t=this.faker.person.lastName()}=e,a=this.faker.helpers.arrayElement([".","_"]),n=this.faker.number.int(99),o=[()=>`${r}${n}`,()=>`${r}${a}${t}`,()=>`${r}${a}${t}${n}`],s=this.faker.helpers.arrayElement(o)();return s=s.toString().replaceAll("'",""),s=s.replaceAll(" ",""),s}protocol(){let e=["http","https"];return this.faker.helpers.arrayElement(e)}httpMethod(){let e=["GET","POST","PUT","DELETE","PATCH"];return this.faker.helpers.arrayElement(e)}httpStatusCode(e={}){let{types:r=Object.keys(this.faker.definitions.internet.http_status_code)}=e,t=this.faker.helpers.arrayElement(r);return this.faker.helpers.arrayElement(this.faker.definitions.internet.http_status_code[t])}url(e={}){let{appendSlash:r=this.faker.datatype.boolean(),protocol:t="https"}=e;return`${t}://${this.domainName()}${r?"/":""}`}domainName(){return`${this.domainWord()}.${this.domainSuffix()}`}domainSuffix(){return this.faker.helpers.arrayElement(this.faker.definitions.internet.domain_suffix)}domainWord(){let e=Ie(this.faker,this.faker.word.adjective()),r=Ie(this.faker,this.faker.word.noun());return`${e}-${r}`.toLowerCase()}ip(){return this.faker.datatype.boolean()?this.ipv4():this.ipv6()}ipv4(e={}){let{network:r="any",cidrBlock:t=Pr[r]}=e;if(!/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/.test(t))throw new m(`Invalid CIDR block provided: ${t}. Must be in the format x.x.x.x/y.`);let[a,n]=t.split("/"),o=4294967295>>>Number.parseInt(n),[s,l,c,u]=a.split(".").map(Number),f=(s<<24|l<<16|c<<8|u)&~o,g=this.faker.number.int(o),b=f|g;return[b>>>24&255,b>>>16&255,b>>>8&255,b&255].join(".")}ipv6(){return Array.from({length:8},()=>this.faker.string.hexadecimal({length:4,casing:"lower",prefix:""})).join(":")}port(){return this.faker.number.int(65535)}userAgent(){return this.faker.helpers.fake(this.faker.definitions.internet.user_agent_pattern)}color(e={}){w({deprecated:"faker.internet.color()",proposed:"faker.color.rgb()",since:"9.6.0",until:"10.0.0"});let{redBase:r=0,greenBase:t=0,blueBase:a=0}=e,n=ke(this.faker,r),o=ke(this.faker,t),s=ke(this.faker,a);return`#${n}${o}${s}`}mac(e={}){typeof e=="string"&&(e={separator:e});let{separator:r=":"}=e,t,a="";for([":","-",""].includes(r)||(r=":"),t=0;t<12;t++)a+=this.faker.number.hex(15),t%2===1&&t!==11&&(a+=r);return a}password(e={}){let r=/[aeiouAEIOU]$/,t=/[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]$/,a=(c,u,h,f)=>{if(f.length>=c)return f;u&&(h=t.test(f)?r:t);let g=this.faker.number.int(94)+33,b=String.fromCodePoint(g);return u&&(b=b.toLowerCase()),h.test(b)?a(c,u,h,f+b):a(c,u,h,f)},{length:n=15,memorable:o=!1,pattern:s=/\w/,prefix:l=""}=e;return a(n,o,s,l)}emoji(e={}){let{types:r=Object.keys(this.faker.definitions.internet.emoji)}=e,t=this.faker.helpers.arrayElement(r);return this.faker.helpers.arrayElement(this.faker.definitions.internet.emoji[t])}jwtAlgorithm(){return this.faker.helpers.arrayElement(this.faker.definitions.internet.jwt_algorithm)}jwt(e={}){let{refDate:r=this.faker.defaultRefDate()}=e,t=this.faker.date.recent({refDate:r}),{header:a={alg:this.jwtAlgorithm(),typ:"JWT"},payload:n={iat:Math.round(t.valueOf()/1e3),exp:Math.round(this.faker.date.soon({refDate:t}).valueOf()/1e3),nbf:Math.round(this.faker.date.anytime({refDate:r}).valueOf()/1e3),iss:this.faker.company.name(),sub:this.faker.string.uuid(),aud:this.faker.string.uuid(),jti:this.faker.string.uuid()}}=e,o=ge(JSON.stringify(a)),s=ge(JSON.stringify(n)),l=this.faker.string.alphanumeric(64);return`${o}.${s}.${l}`}};var _e=(r=>(r.Female="female",r.Male="male",r))(_e||{});function R(i,e,r){let{generic:t,female:a,male:n}=r;switch(e){case"female":return _nullishCoalesce(a, () => (t));case"male":return _nullishCoalesce(n, () => (t));default:return _nullishCoalesce(_nullishCoalesce(t, () => (i.helpers.arrayElement([a,n]))), () => ([]))}}var U=class extends p{firstName(e){return this.faker.helpers.arrayElement(R(this.faker,e,this.faker.definitions.person.first_name))}lastName(e){if(_optionalChain([this, 'access', _3 => _3.faker, 'access', _4 => _4.rawDefinitions, 'access', _5 => _5.person, 'optionalAccess', _6 => _6.last_name_pattern])!=null){let r=this.faker.helpers.weightedArrayElement(R(this.faker,e,this.faker.rawDefinitions.person.last_name_pattern));return this.faker.helpers.fake(r)}return this.faker.helpers.arrayElement(R(this.faker,e,this.faker.definitions.person.last_name))}middleName(e){return this.faker.helpers.arrayElement(R(this.faker,e,this.faker.definitions.person.middle_name))}fullName(e={}){let{sex:r=this.faker.helpers.arrayElement(["female","male"]),firstName:t=this.firstName(r),lastName:a=this.lastName(r)}=e,n=this.faker.helpers.weightedArrayElement(this.faker.definitions.person.name);return this.faker.helpers.mustache(n,{"person.prefix":()=>this.prefix(r),"person.firstName":()=>t,"person.middleName":()=>this.middleName(r),"person.lastName":()=>a,"person.suffix":()=>this.suffix()})}gender(){return this.faker.helpers.arrayElement(this.faker.definitions.person.gender)}sex(){return this.faker.helpers.arrayElement(this.faker.definitions.person.sex)}sexType(){return this.faker.helpers.enumValue(_e)}bio(){let{bio_pattern:e}=this.faker.definitions.person;return this.faker.helpers.fake(e)}prefix(e){return this.faker.helpers.arrayElement(R(this.faker,e,this.faker.definitions.person.prefix))}suffix(){return this.faker.helpers.arrayElement(this.faker.definitions.person.suffix)}jobTitle(){return this.faker.helpers.fake(this.faker.definitions.person.job_title_pattern)}jobDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.person.job_descriptor)}jobArea(){return this.faker.helpers.arrayElement(this.faker.definitions.person.job_area)}jobType(){return this.faker.helpers.arrayElement(this.faker.definitions.person.job_type)}zodiacSign(){return this.faker.helpers.arrayElement(this.faker.definitions.person.western_zodiac_sign)}};var Br=23283064365386963e-26,vr=1/9007199254740992,{imul:Ae,trunc:Ee}=Math;function Fe(i){return typeof i=="number"?Ge(i):$r(i)}function Ge(i){let e=Array.from({length:624});e[0]=i;for(let r=1;r!==624;++r){let t=e[r-1]^e[r-1]>>>30;e[r]=Ee(Ae(1812433253,t)+r)}return e}function $r(i){let e=Ge(19650218),r=1,t=0;for(let a=Math.max(624,i.length);a!==0;--a){let n=e[r-1]^e[r-1]>>>30;e[r]=Ee((e[r]^Ae(n,1664525))+i[t]+t),r++,t++,r>=624&&(e[0]=e[623],r=1),t>=i.length&&(t=0)}for(let a=623;a!==0;a--)e[r]=Ee((e[r]^Ae(e[r-1]^e[r-1]>>>30,1566083941))-r),r++,r>=624&&(e[0]=e[623],r=1);return e[0]=2147483648,e}function xe(i){for(let r=0;r!==227;++r){let t=(i[r]&2147483648)+(i[r+1]&2147483647);i[r]=i[r+397]^t>>>1^-(t&1)&2567483615}for(let r=227;r!==623;++r){let t=(i[r]&2147483648)+(i[r+1]&2147483647);i[r]=i[r+397-624]^t>>>1^-(t&1)&2567483615}let e=(i[623]&2147483648)+(i[0]&2147483647);return i[623]=i[396]^e>>>1^-(e&1)&2567483615,i}var L=class{constructor(e=Math.random()*Number.MAX_SAFE_INTEGER,r=xe(Fe(e)),t=0){this.states=r;this.index=t}nextU32(){let e=this.states[this.index];return e^=this.states[this.index]>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,++this.index>=624&&(this.states=xe(this.states),this.index=0),e>>>0}nextF32(){return this.nextU32()*Br}nextU53(){let e=this.nextU32()>>>5,r=this.nextU32()>>>6;return e*67108864+r}nextF53(){return this.nextU53()*vr}seed(e){this.states=xe(Fe(e)),this.index=0}};function P(){return Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)}function Lt(i=P()){let e=new L(i);return{next(){return e.nextF32()},seed(r){e.seed(r)}}}function Oe(i=P()){let e=new L(i);return{next(){return e.nextF53()},seed(r){e.seed(r)}}}var K=class extends x{boolean(e={}){typeof e=="number"&&(e={probability:e});let{probability:r=.5}=e;return r<=0?!1:r>=1?!0:this.faker.number.float()<r}};function S(i,e="refDate"){let r=new Date(i);if(Number.isNaN(r.valueOf()))throw new m(`Invalid ${e} date: ${i.toString()}`);return r}var j=()=>{throw new m("You cannot edit the locale data on the faker instance")};function Ue(i){let e={};return new Proxy(i,{has(){return!0},get(r,t){return typeof t=="symbol"||t==="nodeType"?r[t]:t in e?e[t]:e[t]=Ir(t,r[t])},set:j,deleteProperty:j})}function H(i,...e){if(i===null)throw new m(`The locale data for '${e.join(".")}' aren't applicable to this locale.
If you think this is a bug, please report it at: https://github.com/faker-js/faker`);if(i===void 0)throw new m(`The locale data for '${e.join(".")}' are missing in this locale.
If this is a custom Faker instance, please make sure all required locales are used e.g. '[de_AT, de, en, base]'.
Please contribute the missing data to the project or use a locale/Faker instance that has these data.
For more information see https://fakerjs.dev/guide/localization.html`)}function Ir(i,e={}){return new Proxy(e,{has(r,t){return r[t]!=null},get(r,t){let a=r[t];return typeof t=="symbol"||t==="nodeType"||H(a,i,t.toString()),a},set:j,deleteProperty:j})}var B=class extends x{anytime(e={}){let{refDate:r=this.faker.defaultRefDate()}=e,t=S(r).getTime();return this.between({from:t-1e3*60*60*24*365,to:t+1e3*60*60*24*365})}past(e={}){let{years:r=1,refDate:t=this.faker.defaultRefDate()}=e;if(r<=0)throw new m("Years must be greater than 0.");let a=S(t).getTime();return this.between({from:a-r*365*24*3600*1e3,to:a-1e3})}future(e={}){let{years:r=1,refDate:t=this.faker.defaultRefDate()}=e;if(r<=0)throw new m("Years must be greater than 0.");let a=S(t).getTime();return this.between({from:a+1e3,to:a+r*365*24*3600*1e3})}between(e){if(e==null||e.from==null||e.to==null)throw new m("Must pass an options object with `from` and `to` values.");let{from:r,to:t}=e,a=S(r,"from").getTime(),n=S(t,"to").getTime();if(a>n)throw new m("`from` date must be before `to` date.");return new Date(this.faker.number.int({min:a,max:n}))}betweens(e){if(e==null||e.from==null||e.to==null)throw new m("Must pass an options object with `from` and `to` values.");let{from:r,to:t,count:a=3}=e;return this.faker.helpers.multiple(()=>this.between({from:r,to:t}),{count:a}).sort((n,o)=>n.getTime()-o.getTime())}recent(e={}){let{days:r=1,refDate:t=this.faker.defaultRefDate()}=e;if(r<=0)throw new m("Days must be greater than 0.");let a=S(t).getTime();return this.between({from:a-r*24*3600*1e3,to:a-1e3})}soon(e={}){let{days:r=1,refDate:t=this.faker.defaultRefDate()}=e;if(r<=0)throw new m("Days must be greater than 0.");let a=S(t).getTime();return this.between({from:a+1e3,to:a+r*24*3600*1e3})}birthdate(e={}){let{mode:r="age",min:t=18,max:a=80,refDate:n=this.faker.defaultRefDate(),mode:o,min:s,max:l}=e;if([s,l,o].filter(f=>f!=null).length%3!==0)throw new m("The 'min', 'max', and 'mode' options must be set together.");let u=S(n),h=u.getUTCFullYear();switch(r){case"age":{let g=new Date(u).setUTCFullYear(h-a-1)+864e5,b=new Date(u).setUTCFullYear(h-t);if(g>b)throw new m(`Max age ${a} should be greater than or equal to min age ${t}.`);return this.between({from:g,to:b})}case"year":{let f=new Date(Date.UTC(0,0,2)).setUTCFullYear(t),g=new Date(Date.UTC(0,11,30)).setUTCFullYear(a);if(f>g)throw new m(`Max year ${a} should be greater than or equal to min year ${t}.`);return this.between({from:f,to:g})}}}},V=class extends B{constructor(r){super(r);this.faker=r}month(r={}){let{abbreviated:t=!1,context:a=!1}=r,n=this.faker.definitions.date.month,o;t?o=a&&n.abbr_context!=null?"abbr_context":"abbr":o=a&&n.wide_context!=null?"wide_context":"wide";let s=n[o];return H(s,"date.month",o),this.faker.helpers.arrayElement(s)}weekday(r={}){let{abbreviated:t=!1,context:a=!1}=r,n=this.faker.definitions.date.weekday,o;t?o=a&&n.abbr_context!=null?"abbr_context":"abbr":o=a&&n.wide_context!=null?"wide_context":"wide";let s=n[o];return H(s,"date.weekday",o),this.faker.helpers.arrayElement(s)}timeZone(){return this.faker.helpers.arrayElement(this.faker.definitions.date.time_zone)}};var _r=/\.|\(/;function Ke(i,e,r=[e,e.rawDefinitions]){if(i.length===0)throw new m("Eval expression cannot be empty.");if(r.length===0)throw new m("Eval entrypoints cannot be empty.");let t=r,a=i;do{let o;a.startsWith("(")?[o,t]=Fr(a,t,i):[o,t]=Or(a,t),a=a.substring(o),t=t.filter(s=>s!=null).map(s=>Array.isArray(s)?e.helpers.arrayElement(s):s)}while(a.length>0&&t.length>0);if(t.length===0)throw new m(`Cannot resolve expression '${i}'`);let n=t[0];return typeof n=="function"?n():n}function Fr(i,e,r){let[t,a]=Gr(i),n=i[t+1];switch(n){case".":case"(":case void 0:break;default:throw new m(`Expected dot ('.'), open parenthesis ('('), or nothing after function call but got '${n}'`)}return[t+(n==="."?2:1),e.map(o=>typeof o=="function"?o(...a):(console.warn(`[@faker-js/faker]: Invoking expressions which are not functions is deprecated since v9.0 and will be removed in v10.0.
Please remove the parentheses or replace the expression with an actual function.
${r}
${" ".repeat(r.length-i.length)}^`),o))]}function Gr(i){let e=i.indexOf(")",1);if(e===-1)throw new m(`Missing closing parenthesis in '${i}'`);for(;e!==-1;){let t=i.substring(1,e);try{return[e,JSON.parse(`[${t}]`)]}catch (e3){if(!t.includes("'")&&!t.includes('"'))try{return[e,JSON.parse(`["${t}"]`)]}catch (e4){}}e=i.indexOf(")",e+1)}e=i.lastIndexOf(")");let r=i.substring(1,e);return[e,[r]]}function Or(i,e){let r=_r.exec(i),t=(_nullishCoalesce(_optionalChain([r, 'optionalAccess', _7 => _7[0]]), () => ("")))===".",a=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _8 => _8.index]), () => (i.length)),n=i.substring(0,a);if(n.length===0)throw new m(`Expression parts cannot be empty in '${i}'`);let o=i[a+1];if(t&&(o==null||o==="."||o==="("))throw new m(`Found dot without property name in '${i}'`);return[a+(t?1:0),e.map(s=>Ur(s,n))]}function Ur(i,e){switch(typeof i){case"function":{try{i=i()}catch (e5){return}return _optionalChain([i, 'optionalAccess', _9 => _9[e]])}case"object":return _optionalChain([i, 'optionalAccess', _10 => _10[e]]);default:return}}function je(i){let e=Kr(i.replace(/L?$/,"0"));return e===0?0:10-e}function Kr(i){i=i.replaceAll(/[\s-]/g,"");let e=0,r=!1;for(let t=i.length-1;t>=0;t--){let a=Number.parseInt(i[t]);r&&(a*=2,a>9&&(a=a%10+1)),e+=a,r=!r}return e%10}function He(i,e,r,t){let a=1;if(e)switch(e){case"?":{a=i.datatype.boolean()?0:1;break}case"*":{let n=1;for(;i.datatype.boolean();)n*=2;a=i.number.int({min:0,max:n});break}case"+":{let n=1;for(;i.datatype.boolean();)n*=2;a=i.number.int({min:1,max:n});break}default:throw new m("Unknown quantifier symbol provided.")}else r!=null&&t!=null?a=i.number.int({min:Number.parseInt(r),max:Number.parseInt(t)}):r!=null&&t==null&&(a=Number.parseInt(r));return a}function jr(i,e=""){let r=/(.)\{(\d+),(\d+)\}/,t=/(.)\{(\d+)\}/,a=/\[(\d+)-(\d+)\]/,n,o,s,l,c=r.exec(e);for(;c!=null;)n=Number.parseInt(c[2]),o=Number.parseInt(c[3]),n>o&&(s=o,o=n,n=s),l=i.number.int({min:n,max:o}),e=e.slice(0,c.index)+c[1].repeat(l)+e.slice(c.index+c[0].length),c=r.exec(e);for(c=t.exec(e);c!=null;)l=Number.parseInt(c[2]),e=e.slice(0,c.index)+c[1].repeat(l)+e.slice(c.index+c[0].length),c=t.exec(e);for(c=a.exec(e);c!=null;)n=Number.parseInt(c[1]),o=Number.parseInt(c[2]),n>o&&(s=o,o=n,n=s),e=e.slice(0,c.index)+i.number.int({min:n,max:o}).toString()+e.slice(c.index+c[0].length),c=a.exec(e);return e}function we(i,e="",r="#"){let t="";for(let a=0;a<e.length;a++)e.charAt(a)===r?t+=i.number.int(9):e.charAt(a)==="!"?t+=i.number.int({min:2,max:9}):t+=e.charAt(a);return t}var v=class extends x{slugify(e=""){return e.normalize("NFKD").replaceAll(/[\u0300-\u036F]/g,"").replaceAll(" ","-").replaceAll(/[^\w.-]+/g,"")}replaceSymbols(e=""){let r=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t="";for(let a=0;a<e.length;a++)e.charAt(a)==="#"?t+=this.faker.number.int(9):e.charAt(a)==="?"?t+=this.arrayElement(r):e.charAt(a)==="*"?t+=this.faker.datatype.boolean()?this.arrayElement(r):this.faker.number.int(9):t+=e.charAt(a);return t}replaceCreditCardSymbols(e="6453-####-####-####-###L",r="#"){e=jr(this.faker,e),e=we(this.faker,e,r);let t=je(e);return e.replace("L",String(t))}fromRegExp(e){let r=!1;e instanceof RegExp&&(r=e.flags.includes("i"),e=e.toString(),e=_nullishCoalesce(_optionalChain([/\/(.+?)\//, 'access', _11 => _11.exec, 'call', _12 => _12(e), 'optionalAccess', _13 => _13[1]]), () => ("")));let t,a,n,o=/([.A-Za-z0-9])(?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,s=o.exec(e);for(;s!=null;){let f=s[2],g=s[3],b=s[4];n=He(this.faker,b,f,g);let y;s[1]==="."?y=this.faker.string.alphanumeric(n):r?y=this.faker.string.fromCharacters([s[1].toLowerCase(),s[1].toUpperCase()],n):y=s[1].repeat(n),e=e.slice(0,s.index)+y+e.slice(s.index+s[0].length),s=o.exec(e)}let l=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,c=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+)|)/;for(s=c.exec(e);s!=null;){let f=s[1]==="^",g=s[2]==="-",b=s[4],y=s[5],N=s[6],k=[],_=s[3],C=l.exec(_);for(g&&k.push(45);C!=null;){if(C[0].includes("-")){let E=C[0].split("-").map(d=>_nullishCoalesce(d.codePointAt(0), () => (Number.NaN)));if(t=E[0],a=E[1],t>a)throw new m("Character range provided is out of order.");for(let d=t;d<=a;d++)if(r&&Number.isNaN(Number(String.fromCodePoint(d)))){let Te=String.fromCodePoint(d);k.push(_nullishCoalesce(Te.toUpperCase().codePointAt(0), () => (Number.NaN)),_nullishCoalesce(Te.toLowerCase().codePointAt(0), () => (Number.NaN)))}else k.push(d)}else r&&Number.isNaN(Number(C[0]))?k.push(_nullishCoalesce(C[0].toUpperCase().codePointAt(0), () => (Number.NaN)),_nullishCoalesce(C[0].toLowerCase().codePointAt(0), () => (Number.NaN))):k.push(_nullishCoalesce(C[0].codePointAt(0), () => (Number.NaN)));_=_.substring(C[0].length),C=l.exec(_)}if(n=He(this.faker,N,b,y),f){let E=-1;for(let d=48;d<=57;d++){if(E=k.indexOf(d),E>-1){k.splice(E,1);continue}k.push(d)}for(let d=65;d<=90;d++){if(E=k.indexOf(d),E>-1){k.splice(E,1);continue}k.push(d)}for(let d=97;d<=122;d++){if(E=k.indexOf(d),E>-1){k.splice(E,1);continue}k.push(d)}}let yr=this.multiple(()=>String.fromCodePoint(this.arrayElement(k)),{count:n}).join("");e=e.slice(0,s.index)+yr+e.slice(s.index+s[0].length),s=c.exec(e)}let u=/(.)\{(\d+),(\d+)\}/;for(s=u.exec(e);s!=null;){if(t=Number.parseInt(s[2]),a=Number.parseInt(s[3]),t>a)throw new m("Numbers out of order in {} quantifier.");n=this.faker.number.int({min:t,max:a}),e=e.slice(0,s.index)+s[1].repeat(n)+e.slice(s.index+s[0].length),s=u.exec(e)}let h=/(.)\{(\d+)\}/;for(s=h.exec(e);s!=null;)n=Number.parseInt(s[2]),e=e.slice(0,s.index)+s[1].repeat(n)+e.slice(s.index+s[0].length),s=h.exec(e);return e}shuffle(e,r={}){let{inplace:t=!1}=r;t||(e=[...e]);for(let a=e.length-1;a>0;--a){let n=this.faker.number.int(a);[e[a],e[n]]=[e[n],e[a]]}return e}uniqueArray(e,r){if(Array.isArray(e)){let n=[...new Set(e)];return this.shuffle(n).splice(0,r)}let t=new Set;try{if(typeof e=="function"){let a=1e3*r,n=0;for(;t.size<r&&n<a;)t.add(e()),n++}}catch (e6){}return[...t]}mustache(e,r){if(e==null)return"";for(let t in r){let a=new RegExp(`{{${t}}}`,"g"),n=r[t];typeof n=="string"&&(n=n.replaceAll("$","$$$$")),e=e.replace(a,n)}return e}maybe(e,r={}){if(this.faker.datatype.boolean(r))return e()}objectKey(e){let r=Object.keys(e);return this.arrayElement(r)}objectValue(e){let r=this.faker.helpers.objectKey(e);return e[r]}objectEntry(e){let r=this.faker.helpers.objectKey(e);return[r,e[r]]}arrayElement(e){if(e.length===0)throw new m("Cannot get value from empty dataset.");let r=e.length>1?this.faker.number.int({max:e.length-1}):0;return e[r]}weightedArrayElement(e){if(e.length===0)throw new m("weightedArrayElement expects an array with at least one element");if(!e.every(n=>n.weight>0))throw new m("weightedArrayElement expects an array of { weight, value } objects where weight is a positive number");let r=e.reduce((n,{weight:o})=>n+o,0),t=this.faker.number.float({min:0,max:r}),a=0;for(let{weight:n,value:o}of e)if(a+=n,t<a)return o;return e.at(-1).value}arrayElements(e,r){if(e.length===0)return[];let t=this.rangeToNumber(_nullishCoalesce(r, () => ({min:1,max:e.length})));if(t>=e.length)return this.shuffle(e);if(t<=0)return[];let a=[...e],n=e.length,o=n-t,s,l;for(;n-- >o;)l=this.faker.number.int(n),s=a[l],a[l]=a[n],a[n]=s;return a.slice(o)}enumValue(e){let r=Object.keys(e).filter(a=>Number.isNaN(Number(a))),t=this.arrayElement(r);return e[t]}rangeToNumber(e){return typeof e=="number"?e:this.faker.number.int(e)}multiple(e,r={}){let t=this.rangeToNumber(_nullishCoalesce(r.count, () => (3)));return t<=0?[]:Array.from({length:t},e)}},z=class extends v{constructor(r){super(r);this.faker=r}fake(r){r=typeof r=="string"?r:this.arrayElement(r);let t=r.search(/{{[a-z]/),a=r.indexOf("}}",t);if(t===-1||a===-1)return r;let o=r.substring(t+2,a+2).replace("}}","").replace("{{",""),s=Ke(o,this.faker),l=String(s),c=r.substring(0,t)+l+r.substring(a+2);return this.fake(c)}};var W=class extends x{int(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=Number.MAX_SAFE_INTEGER,multipleOf:a=1}=e;if(!Number.isInteger(a))throw new m("multipleOf should be an integer.");if(a<=0)throw new m("multipleOf should be greater than 0.");let n=Math.ceil(r/a),o=Math.floor(t/a);if(n===o)return n*a;if(o<n)throw t>=r?new m(`No suitable integer value between ${r} and ${t} found.`):new m(`Max ${t} should be greater than min ${r}.`);let l=this.faker._randomizer.next(),c=o-n+1;return Math.floor(l*c+n)*a}float(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=1,fractionDigits:a,multipleOf:n,multipleOf:o=a==null?void 0:10**-a}=e;if(t<r)throw new m(`Max ${t} should be greater than min ${r}.`);if(a!=null){if(n!=null)throw new m("multipleOf and fractionDigits cannot be set at the same time.");if(!Number.isInteger(a))throw new m("fractionDigits should be an integer.");if(a<0)throw new m("fractionDigits should be greater than or equal to 0.")}if(o!=null){if(o<=0)throw new m("multipleOf should be greater than 0.");let c=Math.log10(o),u=o<1&&Number.isInteger(c)?10**-c:1/o;return this.int({min:r*u,max:t*u})/u}return this.faker._randomizer.next()*(t-r)+r}binary(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=1}=e;return this.int({max:t,min:r}).toString(2)}octal(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=7}=e;return this.int({max:t,min:r}).toString(8)}hex(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=15}=e;return this.int({max:t,min:r}).toString(16)}bigInt(e={}){(typeof e=="bigint"||typeof e=="number"||typeof e=="string"||typeof e=="boolean")&&(e={max:e});let r=BigInt(_nullishCoalesce(e.min, () => (0))),t=BigInt(_nullishCoalesce(e.max, () => (r+BigInt(999999999999999)))),a=BigInt(_nullishCoalesce(e.multipleOf, () => (1)));if(t<r)throw new m(`Max ${t} should be larger than min ${r}.`);if(a<=BigInt(0))throw new m("multipleOf should be greater than 0.");let n=r/a+(r%a>0n?1n:0n),o=t/a-(t%a<0n?1n:0n);if(n===o)return n*a;if(o<n)throw new m(`No suitable bigint value between ${r} and ${t} found.`);let s=o-n+1n,l=BigInt(this.faker.string.numeric({length:s.toString(10).length,allowLeadingZeros:!0}))%s;return(n+l)*a}romanNumeral(e={}){typeof e=="number"&&(e={max:e});let{min:a=1,max:n=3999}=e;if(a<1)throw new m(`Min value ${a} should be 1 or greater.`);if(n>3999)throw new m(`Max value ${n} should be 3999 or less.`);let o=this.int({min:a,max:n}),s=[["M",1e3],["CM",900],["D",500],["CD",400],["C",100],["XC",90],["L",50],["XL",40],["X",10],["IX",9],["V",5],["IV",4],["I",1]],l="";for(let[c,u]of s)l+=c.repeat(Math.floor(o/u)),o%=u;return l}};var Se="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Ve(i){let e=i.valueOf(),r="";for(let t=10;t>0;t--){let a=e%32;r=Se[a]+r,e=(e-a)/32}return r}var Y=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],Z=[..."abcdefghijklmnopqrstuvwxyz"],ze=[..."0123456789"],J=class extends x{fromCharacters(e,r=1){if(r=this.faker.helpers.rangeToNumber(r),r<=0)return"";if(typeof e=="string"&&(e=[...e]),e.length===0)throw new m("Unable to generate string: No characters to select from.");return this.faker.helpers.multiple(()=>this.faker.helpers.arrayElement(e),{count:r}).join("")}alpha(e={}){typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber(_nullishCoalesce(e.length, () => (1)));if(r<=0)return"";let{casing:t="mixed"}=e,{exclude:a=[]}=e;typeof a=="string"&&(a=[...a]);let n;switch(t){case"upper":{n=[...Y];break}case"lower":{n=[...Z];break}case"mixed":{n=[...Z,...Y];break}}return n=n.filter(o=>!a.includes(o)),this.fromCharacters(n,r)}alphanumeric(e={}){typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber(_nullishCoalesce(e.length, () => (1)));if(r<=0)return"";let{casing:t="mixed"}=e,{exclude:a=[]}=e;typeof a=="string"&&(a=[...a]);let n=[...ze];switch(t){case"upper":{n.push(...Y);break}case"lower":{n.push(...Z);break}case"mixed":{n.push(...Z,...Y);break}}return n=n.filter(o=>!a.includes(o)),this.fromCharacters(n,r)}binary(e={}){let{prefix:r="0b"}=e,t=r;return t+=this.fromCharacters(["0","1"],_nullishCoalesce(e.length, () => (1))),t}octal(e={}){let{prefix:r="0o"}=e,t=r;return t+=this.fromCharacters(["0","1","2","3","4","5","6","7"],_nullishCoalesce(e.length, () => (1))),t}hexadecimal(e={}){let{casing:r="mixed",prefix:t="0x"}=e,a=this.faker.helpers.rangeToNumber(_nullishCoalesce(e.length, () => (1)));if(a<=0)return t;let n=this.fromCharacters(["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],a);return r==="upper"?n=n.toUpperCase():r==="lower"&&(n=n.toLowerCase()),`${t}${n}`}numeric(e={}){typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber(_nullishCoalesce(e.length, () => (1)));if(r<=0)return"";let{allowLeadingZeros:t=!0}=e,{exclude:a=[]}=e;typeof a=="string"&&(a=[...a]);let n=ze.filter(s=>!a.includes(s));if(n.length===0||n.length===1&&!t&&n[0]==="0")throw new m("Unable to generate numeric string, because all possible digits are excluded.");let o="";return!t&&!a.includes("0")&&(o+=this.faker.helpers.arrayElement(n.filter(s=>s!=="0"))),o+=this.fromCharacters(n,r-o.length),o}sample(e=10){e=this.faker.helpers.rangeToNumber(e);let r={min:33,max:125},t="";for(;t.length<e;)t+=String.fromCodePoint(this.faker.number.int(r));return t}uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll("x",()=>this.faker.number.hex({min:0,max:15})).replaceAll("y",()=>this.faker.number.hex({min:8,max:11}))}ulid(e={}){let{refDate:r=this.faker.defaultRefDate()}=e,t=S(r);return Ve(t)+this.fromCharacters(Se,16)}nanoid(e=21){if(e=this.faker.helpers.rangeToNumber(e),e<=0)return"";let r=[{value:()=>this.alphanumeric(1),weight:62},{value:()=>this.faker.helpers.arrayElement(["_","-"]),weight:2}],t="";for(;t.length<e;){let a=this.faker.helpers.weightedArrayElement(r);t+=a()}return t}symbol(e=1){return this.fromCharacters(["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_","`","{","|","}","~"],e)}};var $= (_class =class{__init() {this._defaultRefDate=()=>new Date}get defaultRefDate(){return this._defaultRefDate}setDefaultRefDate(e=()=>new Date){typeof e=="function"?this._defaultRefDate=e:this._defaultRefDate=()=>new Date(e)}__init2() {this.datatype=new K(this)}__init3() {this.date=new B(this)}__init4() {this.helpers=new v(this)}__init5() {this.number=new W(this)}__init6() {this.string=new J(this)}constructor(e={}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);let{randomizer:r,seed:t}=e;r!=null&&t!=null&&r.seed(t),this._randomizer=_nullishCoalesce(r, () => (Oe(t)))}seed(e=P()){return this._randomizer.seed(e),e}}, _class),fa= exports.l =new $;function We(i){let e={};for(let r of i)for(let t in r){let a=r[t];e[t]===void 0?e[t]={...a}:e[t]={...a,...e[t]}}return e}var X=class extends p{dog(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.dog)}cat(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cat)}snake(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.snake)}bear(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.bear)}lion(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.lion)}cetacean(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cetacean)}horse(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.horse)}bird(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.bird)}cow(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.cow)}fish(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.fish)}crocodilia(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.crocodilia)}insect(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.insect)}rabbit(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.rabbit)}rodent(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.rodent)}type(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.type)}petName(){return this.faker.helpers.arrayElement(this.faker.definitions.animal.pet_name)}};var Q=class extends p{author(){return this.faker.helpers.arrayElement(this.faker.definitions.book.author)}format(){return this.faker.helpers.arrayElement(this.faker.definitions.book.format)}genre(){return this.faker.helpers.arrayElement(this.faker.definitions.book.genre)}publisher(){return this.faker.helpers.arrayElement(this.faker.definitions.book.publisher)}series(){return this.faker.helpers.arrayElement(this.faker.definitions.book.series)}title(){return this.faker.helpers.arrayElement(this.faker.definitions.book.title)}};var Hr={0:[[1999999,2],[2279999,3],[2289999,4],[3689999,3],[3699999,4],[6389999,3],[6397999,4],[6399999,7],[6449999,3],[6459999,7],[6479999,3],[6489999,7],[6549999,3],[6559999,4],[6999999,3],[8499999,4],[8999999,5],[9499999,6],[9999999,7]],1:[[99999,3],[299999,2],[349999,3],[399999,4],[499999,3],[699999,2],[999999,4],[3979999,3],[5499999,4],[6499999,5],[6799999,4],[6859999,5],[7139999,4],[7169999,3],[7319999,4],[7399999,7],[7749999,5],[7753999,7],[7763999,5],[7764999,7],[7769999,5],[7782999,7],[7899999,5],[7999999,4],[8004999,5],[8049999,5],[8379999,5],[8384999,7],[8671999,5],[8675999,4],[8697999,5],[9159999,6],[9165059,7],[9168699,6],[9169079,7],[9195999,6],[9196549,7],[9729999,6],[9877999,4],[9911499,6],[9911999,7],[9989899,6],[9999999,7]]},q=class extends p{department(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.department)}productName(){return`${this.productAdjective()} ${this.productMaterial()} ${this.product()}`}price(e={}){let{dec:r=2,max:t=1e3,min:a=1,symbol:n=""}=e;if(a<0||t<0)return`${n}0`;if(a===t)return`${n}${a.toFixed(r)}`;let o=this.faker.number.float({min:a,max:t,fractionDigits:r});if(r===0)return`${n}${o.toFixed(r)}`;let s=o*10**r%10,l=this.faker.helpers.weightedArrayElement([{weight:5,value:9},{weight:3,value:5},{weight:1,value:0},{weight:1,value:this.faker.number.int({min:0,max:9})}]),c=(1/10)**r,u=s*c,h=l*c,f=o-u+h;return a<=f&&f<=t?`${n}${f.toFixed(r)}`:`${n}${o.toFixed(r)}`}productAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.adjective)}productMaterial(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.material)}product(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.product_name.product)}productDescription(){return this.faker.helpers.fake(this.faker.definitions.commerce.product_description)}isbn(e={}){typeof e=="number"&&(e={variant:e});let{variant:r=13,separator:t="-"}=e,a="978",[n,o]=this.faker.helpers.objectEntry(Hr),s=this.faker.string.numeric(8),l=Number.parseInt(s.slice(0,-1)),c=_optionalChain([o, 'access', _14 => _14.find, 'call', _15 => _15(([y])=>l<=y), 'optionalAccess', _16 => _16[1]]);if(!c)throw new m(`Unable to find a registrant length for the group ${n}`);let u=s.slice(0,c),h=s.slice(c),f=[a,n,u,h];r===10&&f.shift();let g=f.join(""),b=0;for(let y=0;y<r-1;y++){let N=r===10?y+1:y%2?3:1;b+=N*Number.parseInt(g[y])}return b=r===10?b%11:(10-b%10)%10,f.push(b===10?"X":b.toString()),f.join(t)}};var ee=class extends p{name(){return this.faker.helpers.fake(this.faker.definitions.company.name_pattern)}catchPhrase(){return[this.catchPhraseAdjective(),this.catchPhraseDescriptor(),this.catchPhraseNoun()].join(" ")}buzzPhrase(){return[this.buzzVerb(),this.buzzAdjective(),this.buzzNoun()].join(" ")}catchPhraseAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.company.adjective)}catchPhraseDescriptor(){return this.faker.helpers.arrayElement(this.faker.definitions.company.descriptor)}catchPhraseNoun(){return this.faker.helpers.arrayElement(this.faker.definitions.company.noun)}buzzAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_adjective)}buzzVerb(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_verb)}buzzNoun(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_noun)}};var re=class extends p{column(){return this.faker.helpers.arrayElement(this.faker.definitions.database.column)}type(){return this.faker.helpers.arrayElement(this.faker.definitions.database.type)}collation(){return this.faker.helpers.arrayElement(this.faker.definitions.database.collation)}engine(){return this.faker.helpers.arrayElement(this.faker.definitions.database.engine)}mongodbObjectId(){return this.faker.string.hexadecimal({length:24,casing:"lower",prefix:""})}};var Vr={alpha:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],formats:[{country:"AL",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"ALkk bbbs sssx cccc cccc cccc cccc"},{country:"AD",total:24,bban:[{type:"n",count:8},{type:"c",count:12}],format:"ADkk bbbb ssss cccc cccc cccc"},{country:"AT",total:20,bban:[{type:"n",count:5},{type:"n",count:11}],format:"ATkk bbbb bccc cccc cccc"},{country:"AZ",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"AZkk bbbb cccc cccc cccc cccc cccc"},{country:"BH",total:22,bban:[{type:"a",count:4},{type:"c",count:14}],format:"BHkk bbbb cccc cccc cccc cc"},{country:"BE",total:16,bban:[{type:"n",count:3},{type:"n",count:9}],format:"BEkk bbbc cccc ccxx"},{country:"BA",total:20,bban:[{type:"n",count:6},{type:"n",count:10}],format:"BAkk bbbs sscc cccc ccxx"},{country:"BR",total:29,bban:[{type:"n",count:13},{type:"n",count:10},{type:"a",count:1},{type:"c",count:1}],format:"BRkk bbbb bbbb ssss sccc cccc ccct n"},{country:"BG",total:22,bban:[{type:"a",count:4},{type:"n",count:6},{type:"c",count:8}],format:"BGkk bbbb ssss ddcc cccc cc"},{country:"CR",total:22,bban:[{type:"n",count:1},{type:"n",count:3},{type:"n",count:14}],format:"CRkk xbbb cccc cccc cccc cc"},{country:"HR",total:21,bban:[{type:"n",count:7},{type:"n",count:10}],format:"HRkk bbbb bbbc cccc cccc c"},{country:"CY",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"CYkk bbbs ssss cccc cccc cccc cccc"},{country:"CZ",total:24,bban:[{type:"n",count:10},{type:"n",count:10}],format:"CZkk bbbb ssss sscc cccc cccc"},{country:"DK",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"DKkk bbbb cccc cccc cc"},{country:"DO",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"DOkk bbbb cccc cccc cccc cccc cccc"},{country:"TL",total:23,bban:[{type:"n",count:3},{type:"n",count:16}],format:"TLkk bbbc cccc cccc cccc cxx"},{country:"EE",total:20,bban:[{type:"n",count:4},{type:"n",count:12}],format:"EEkk bbss cccc cccc cccx"},{country:"FO",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"FOkk bbbb cccc cccc cx"},{country:"FI",total:18,bban:[{type:"n",count:6},{type:"n",count:8}],format:"FIkk bbbb bbcc cccc cx"},{country:"FR",total:27,bban:[{type:"n",count:10},{type:"c",count:11},{type:"n",count:2}],format:"FRkk bbbb bggg ggcc cccc cccc cxx"},{country:"GE",total:22,bban:[{type:"a",count:2},{type:"n",count:16}],format:"GEkk bbcc cccc cccc cccc cc"},{country:"DE",total:22,bban:[{type:"n",count:8},{type:"n",count:10}],format:"DEkk bbbb bbbb cccc cccc cc"},{country:"GI",total:23,bban:[{type:"a",count:4},{type:"c",count:15}],format:"GIkk bbbb cccc cccc cccc ccc"},{country:"GR",total:27,bban:[{type:"n",count:7},{type:"c",count:16}],format:"GRkk bbbs sssc cccc cccc cccc ccc"},{country:"GL",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"GLkk bbbb cccc cccc cc"},{country:"GT",total:28,bban:[{type:"c",count:4},{type:"c",count:4},{type:"c",count:16}],format:"GTkk bbbb mmtt cccc cccc cccc cccc"},{co