@faker-js/faker
Version:
Generate massive amounts of fake contextual data
8 lines • 165 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 Ne(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;Ne(this)}},p=class extends x{constructor(r){super(r);this.faker=r}};var De=(t=>(t.Narrowbody="narrowbody",t.Regional="regional",t.Widebody="widebody",t))(De||{}),xr=["0","1","2","3","4","5","6","7","8","9"],Ar=["0","O","1","I","L"],Er={regional:20,narrowbody:35,widebody:60},wr={regional:["A","B","C","D"],narrowbody:["A","B","C","D","E","F"],widebody:["A","B","C","D","E","F","G","H","J","K"]},G=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(...xr),t||a.push(...Ar),this.faker.string.alphanumeric({length:6,casing:"upper",exclude:a})}seat(e={}){let{aircraftType:r="narrowbody"}=e,t=Er[r],a=wr[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(De)}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 Re=(n=>(n.SRGB="sRGB",n.DisplayP3="display-p3",n.REC2020="rec2020",n.A98RGB="a98-rgb",n.ProphotoRGB="prophoto-rgb",n))(Re||{}),Le= 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))(Le||{});function Sr(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 Pe(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 Pe([...n]).replaceAll(" ","")}return(r>>>0).toString(2).padStart(8,"0")}).join(" ")}function A(i){return Math.round(i*100)}function Mr(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 Mr(i,r,t);case"binary":return Pe(i);case"decimal":return i}}var O=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(Le)}cssSupportedSpace(){return this.faker.helpers.enumValue(Re)}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=Sr(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 de=(a=>(a.Legacy="legacy",a.Segwit="segwit",a.Bech32="bech32",a.Taproot="taproot",a))(de||{}),Be= exports.f =(r=>(r.Mainnet="mainnet",r.Testnet="testnet",r))(Be||{}),ve={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 ge=typeof Buffer>"u"||!$e("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"),ye=typeof Buffer>"u"||!$e("base64url")?i=>ge(i).replaceAll("+","-").replaceAll("/","_").replaceAll(/=+$/g,""):i=>Buffer.from(i).toString("base64url");function $e(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 Tr=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"]]),Cr=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"]]),Nr=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"]]),Dr=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"]]),Rr=Object.fromEntries([["\u0686","ch"],["\u06A9","k"],["\u06AF","g"],["\u067E","p"],["\u0698","zh"],["\u06CC","y"]]),Lr=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"]]),ke={...Tr,...Cr,...Nr,...Rr,...Dr,...Lr};var Pr=(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))(Pr||{}),Br={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 Ie(i){return/^[a-z][a-z-]*[a-z]$/i.exec(i)!==null}function _e(i,e){let r=i.helpers.slugify(e);if(Ie(r))return r;let t=i.helpers.slugify(i.lorem.word());return Ie(t)?t:i.string.alpha({casing:"lower",length:i.number.int({min:4,max:8})})}function xe(i,e){return Math.floor((i.number.int(256)+e)/2).toString(16).padStart(2,"0")}var U=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(ke[c])return ke[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=_e(this.faker,this.faker.word.adjective()),r=_e(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=Br[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=xe(this.faker,r),o=xe(this.faker,t),s=xe(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=ye(JSON.stringify(a)),s=ye(JSON.stringify(n)),l=this.faker.string.alphanumeric(64);return`${o}.${s}.${l}`}};var Fe=(r=>(r.Female="female",r.Male="male",r))(Fe||{});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 K=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(Fe)}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 vr=23283064365386963e-26,$r=1/9007199254740992,{imul:Ee,trunc:we}=Math;function Ge(i){return typeof i=="number"?Oe(i):Ir(i)}function Oe(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]=we(Ee(1812433253,t)+r)}return e}function Ir(i){let e=Oe(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]=we((e[r]^Ee(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]=we((e[r]^Ee(e[r-1]^e[r-1]>>>30,1566083941))-r),r++,r>=624&&(e[0]=e[623],r=1);return e[0]=2147483648,e}function Ae(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=Ae(Ge(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=Ae(this.states),this.index=0),e>>>0}nextF32(){return this.nextU32()*vr}nextU53(){let e=this.nextU32()>>>5,r=this.nextU32()>>>6;return e*67108864+r}nextF53(){return this.nextU53()*$r}seed(e){this.states=Ae(Ge(e)),this.index=0}};function P(){return Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)}function Pt(i=P()){let e=new L(i);return{next(){return e.nextF32()},seed(r){e.seed(r)}}}function Ue(i=P()){let e=new L(i);return{next(){return e.nextF53()},seed(r){e.seed(r)}}}var j=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 H=()=>{throw new m("You cannot edit the locale data on the faker instance")};function Ke(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]=_r(t,r[t])},set:H,deleteProperty:H})}function V(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 _r(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"||V(a,i,t.toString()),a},set:H,deleteProperty:H})}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})}}}},z=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 V(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 V(s,"date.weekday",o),this.faker.helpers.arrayElement(s)}timeZone(){return this.faker.helpers.arrayElement(this.faker.definitions.date.time_zone)}};var Fr=/\.|\(/;function je(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]=Gr(a,t,i):[o,t]=Ur(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 Gr(i,e,r){let[t,a]=Or(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 Or(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 Ur(i,e){let r=Fr.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=>Kr(s,n))]}function Kr(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 He(i){let e=jr(i.replace(/L?$/,"0"));return e===0?0:10-e}function jr(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 Ve(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 Hr(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 Se(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=Hr(this.faker,e),e=Se(this.faker,e,r);let t=He(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=Ve(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=[],F=s[3],C=l.exec(F);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 Ce=String.fromCodePoint(d);k.push(_nullishCoalesce(Ce.toUpperCase().codePointAt(0), () => (Number.NaN)),_nullishCoalesce(Ce.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)));F=F.substring(C[0].length),C=l.exec(F)}if(n=Ve(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 kr=this.multiple(()=>String.fromCodePoint(this.arrayElement(k)),{count:n}).join("");e=e.slice(0,s.index)+kr+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)}},W=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=je(o,this.faker),l=String(s),c=r.substring(0,t)+l+r.substring(a+2);return this.fake(c)}};var $=class extends x{latitude(e={}){let{max:r=90,min:t=-90,precision:a=4}=e;return this.faker.number.float({min:t,max:r,fractionDigits:a})}longitude(e={}){let{max:r=180,min:t=-180,precision:a=4}=e;return this.faker.number.float({max:r,min:t,fractionDigits:a})}nearbyGPSCoordinate(e={}){let{origin:r,radius:t=10,isMetric:a=!1}=e;if(r==null)return[this.latitude(),this.longitude()];let n=this.faker.number.float({max:2*Math.PI,fractionDigits:5}),o=a?t:t*1.60934,l=this.faker.number.float({max:o,fractionDigits:3})*.995,c=4e4/360,u=l/c,h=[r[0]+Math.sin(n)*u,r[1]+Math.cos(n)*u];return h[0]=h[0]%180,(h[0]<-90||h[0]>90)&&(h[0]=Math.sign(h[0])*180-h[0],h[1]+=180),h[1]=(h[1]%360+540)%360-180,[h[0],h[1]]}},Y=class extends ${constructor(r){super(r);this.faker=r}zipCode(r={}){typeof r=="string"&&(r={format:r});let{state:t}=r;if(t!=null){let n=this.faker.definitions.location.postcode_by_state[t];if(n==null)throw new m(`No zip code definition found for state "${t}"`);return this.faker.helpers.fake(n)}let{format:a=this.faker.definitions.location.postcode}=r;return typeof a=="string"&&(a=[a]),a=this.faker.helpers.arrayElement(a),this.faker.helpers.replaceSymbols(a)}city(){return this.faker.helpers.fake(this.faker.definitions.location.city_pattern)}buildingNumber(){return this.faker.helpers.arrayElement(this.faker.definitions.location.building_number).replaceAll(/#+/g,r=>this.faker.string.numeric({length:r.length,allowLeadingZeros:!1}))}street(){return this.faker.helpers.fake(this.faker.definitions.location.street_pattern)}streetAddress(r={}){typeof r=="boolean"&&(r={useFullAddress:r});let{useFullAddress:t}=r,n=this.faker.definitions.location.street_address[t?"full":"normal"];return this.faker.helpers.fake(n)}secondaryAddress(){return this.faker.helpers.fake(this.faker.definitions.location.secondary_address).replaceAll(/#+/g,r=>this.faker.string.numeric({length:r.length,allowLeadingZeros:!1}))}county(){return this.faker.helpers.arrayElement(this.faker.definitions.location.county)}country(){return this.faker.helpers.arrayElement(this.faker.definitions.location.country)}continent(){return this.faker.helpers.arrayElement(this.faker.definitions.location.continent)}countryCode(r={}){typeof r=="string"&&(r={variant:r});let{variant:t="alpha-2"}=r,a=(()=>{switch(t){case"numeric":return"numeric";case"alpha-3":return"alpha3";case"alpha-2":return"alpha2"}})();return this.faker.helpers.arrayElement(this.faker.definitions.location.country_code)[a]}state(r={}){let{abbreviated:t=!1}=r,a=t?this.faker.definitions.location.state_abbr:this.faker.definitions.location.state;return this.faker.helpers.arrayElement(a)}direction(r={}){let{abbreviated:t=!1}=r;return t?this.faker.helpers.arrayElement([...this.faker.definitions.location.direction.cardinal_abbr,...this.faker.definitions.location.direction.ordinal_abbr]):this.faker.helpers.arrayElement([...this.faker.definitions.location.direction.cardinal,...this.faker.definitions.location.direction.ordinal])}cardinalDirection(r={}){let{abbreviated:t=!1}=r;return t?this.faker.helpers.arrayElement(this.faker.definitions.location.direction.cardinal_abbr):this.faker.helpers.arrayElement(this.faker.definitions.location.direction.cardinal)}ordinalDirection(r={}){let{abbreviated:t=!1}=r;return t?this.faker.helpers.arrayElement(this.faker.definitions.location.direction.ordinal_abbr):this.faker.helpers.arrayElement(this.faker.definitions.location.direction.ordinal)}timeZone(){return this.faker.helpers.arrayElement(this.faker.definitions.location.time_zone)}language(){return this.faker.helpers.arrayElement(this.faker.definitions.location.language)}};var Z=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 Me="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function ze(i){let e=i.valueOf(),r="";for(let t=10;t>0;t--){let a=e%32;r=Me[a]+r,e=(e-a)/32}return r}var J=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],X=[..."abcdefghijklmnopqrstuvwxyz"],We=[..."0123456789"],Q=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=[...J];break}case"lower":{n=[...X];break}case"mixed":{n=[...X,...J];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=[...We];switch(t){case"upper":{n.push(...J);break}case"lower":{n.push(...X);break}case"mixed":{n.push(...X,...J);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=We.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 ze(t)+this.fromCharacters(Me,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 I= (_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 j(this)}__init3() {this.date=new B(this)}__init4() {this.helpers=new v(this)}__init5() {this.location=new $(this)}__init6() {this.number=new Z(this)}__init7() {this.string=new Q(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);_class.prototype.__init7.call(this);let{randomizer:r,seed:t}=e;r!=null&&t!=null&&r.seed(t),this._randomizer=_nullishCoalesce(r, () => (Ue(t)))}seed(e=P()){return this._randomizer.seed(e),e}}, _class),ka= exports.l =new I;function Ye(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 q=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 ee=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 Vr={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]]},re=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(Vr),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 te=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.fake