@faker-js/faker
Version:
Generate massive amounts of fake contextual data
7 lines • 127 kB
JavaScript
var e=class extends Error{};const t=Symbol(`FakerLocaleProxy`),n=()=>{throw new e(`You cannot edit the locale data on the faker instance`)};function r(e){return typeof e==`object`&&!!e&&e?.[t]===!0}function i(e){if(r(e))return e;let i={raw:e};return new Proxy(e,{has(){return!0},get(e,n){return typeof n==`symbol`?n===t?!0:e[n]:n===`nodeType`?e[n]:i[n]??=o(n,e[n])},set:n,deleteProperty:n})}function a(t,...n){if(t===null)throw new e(`The locale data for '${n.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(t===void 0)throw new e(`The locale data for '${n.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 o(e,t={}){return new Proxy(t,{has(e,t){return e[t]!=null},get(t,n){let r=t[n];return typeof n==`symbol`||n===`nodeType`||a(r,e,n.toString()),r},set:n,deleteProperty:n})}function s(e){let t={};for(let n of e)for(let e in n){let r=n[e];t[e]===void 0?t[e]={...r}:t[e]={...r,...t[e]}}return t}const c=2567483615,l=2**31-1,u=2**31,{imul:d,trunc:f}=Math;function p(e){return typeof e==`number`?m(e):h(e)}function m(e){let t=Array.from({length:624});t[0]=e;for(let e=1;e!==624;++e)t[e]=f(d(1812433253,t[e-1]^t[e-1]>>>30)+e);return t}function h(e){let t=m(19650218),n=1,r=0;for(let i=Math.max(624,e.length);i!==0;--i){let i=t[n-1]^t[n-1]>>>30;t[n]=f((t[n]^d(i,1664525))+e[r]+r),n++,r++,n>=624&&(t[0]=t[623],n=1),r>=e.length&&(r=0)}for(let e=623;e!==0;e--)t[n]=f((t[n]^d(t[n-1]^t[n-1]>>>30,1566083941))-n),n++,n>=624&&(t[0]=t[623],n=1);return t[0]=2147483648,t}function g(e){for(let t=0;t!==227;++t){let n=(e[t]&u)+(e[t+1]&l);e[t]=e[t+397]^n>>>1^-(n&1)&c}for(let t=227;t!==623;++t){let n=(e[t]&u)+(e[t+1]&l);e[t]=e[t+397-624]^n>>>1^-(n&1)&c}let t=(e[623]&u)+(e[0]&l);return e[623]=e[396]^t>>>1^-(t&1)&c,e}var _=class{states;index;constructor(e=Math.random()*(2**53-1),t=g(p(e)),n=0){this.states=t,this.index=n}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=g(this.states),this.index=0),e>>>0}nextF32(){return this.nextU32()*23283064365386963e-26}nextU53(){let e=this.nextU32()>>>5,t=this.nextU32()>>>6;return e*67108864+t}nextF53(){return this.nextU53()*11102230246251565e-32}seed(e){this.states=g(p(e)),this.index=0}};function v(){return Math.ceil(Math.random()*(2**53-1))}function ee(e=v()){let t=new _(e);return{next(){return t.nextF32()},seed(e){t.seed(e)}}}function y(e=v()){let t=new _(e);return{next(){return t.nextF53()},seed(e){t.seed(e)}}}function te(e={}){let{locale:t={},randomizer:n=y(),config:r={},seed:a}=e;return n!=null&&a!=null&&n.seed(a),{locale:i(Array.isArray(t)?s(t):t),randomizer:n,config:r}}function b(){return ne}const ne=({next:e})=>e();function re(e){let t=Object.getPrototypeOf(e);do{for(let n of Object.getOwnPropertyNames(t))typeof e[n]==`function`&&n!==`constructor`&&(e[n]=e[n].bind(e));t=Object.getPrototypeOf(t)}while(t!==Object.prototype)}var x=class{faker;constructor(e){this.faker=e,re(this)}},S=class extends x{faker;constructor(e){super(e),this.faker=e}};let C=function(e){return e.Narrowbody=`narrowbody`,e.Regional=`regional`,e.Widebody=`widebody`,e}({});const ie=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],ae=[`0`,`O`,`1`,`I`,`L`],oe={regional:20,narrowbody:35,widebody:60},se={regional:[`A`,`B`,`C`,`D`],narrowbody:[`A`,`B`,`C`,`D`,`E`,`F`],widebody:[`A`,`B`,`C`,`D`,`E`,`F`,`G`,`H`,`J`,`K`]};var ce=class extends S{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:t=!1,allowVisuallySimilarCharacters:n=!1}=e,r=[];return t||r.push(...ie),n||r.push(...ae),this.faker.string.alphanumeric({length:6,casing:`upper`,exclude:r})}seat(e={}){let{aircraftType:t=`narrowbody`}=e,n=oe[t],r=se[t];return`${this.faker.number.int({min:1,max:n})}${this.faker.helpers.arrayElement(r)}`}aircraftType(){return this.faker.helpers.enumValue(C)}flightNumber(e={}){let{length:t={min:1,max:4},addLeadingZeros:n=!1}=e,r=this.faker.string.numeric({length:t,allowLeadingZeros:!1});return n?r.padStart(4,`0`):r}},le=class extends S{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)}},ue=class extends S{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)}};let w=function(e){return e.SRGB=`sRGB`,e.DisplayP3=`display-p3`,e.REC2020=`rec2020`,e.A98RGB=`a98-rgb`,e.ProphotoRGB=`prophoto-rgb`,e}({}),T=function(e){return e.RGB=`rgb`,e.RGBA=`rgba`,e.HSL=`hsl`,e.HSLA=`hsla`,e.HWB=`hwb`,e.CMYK=`cmyk`,e.LAB=`lab`,e.LCH=`lch`,e.COLOR=`color`,e}({});function de(e,t){let{prefix:n,casing:r}=t;switch(r){case`upper`:e=e.toUpperCase();break;case`lower`:e=e.toLowerCase();break;case`mixed`:}return n&&(e=n+e),e}function E(e){return e.map(e=>{if(e%1!=0){let t=new ArrayBuffer(4);return new DataView(t).setFloat32(0,e),E([...new Uint8Array(t)]).replaceAll(` `,``)}return(e>>>0).toString(2).padStart(8,`0`)}).join(` `)}function D(e){return Math.round(e*100)}function fe(e,t=`rgb`,n=`sRGB`){switch(t){case`rgba`:return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`;case`color`:return`color(${n} ${e[0]} ${e[1]} ${e[2]})`;case`cmyk`:return`cmyk(${D(e[0])}%, ${D(e[1])}%, ${D(e[2])}%, ${D(e[3])}%)`;case`hsl`:return`hsl(${e[0]}deg ${D(e[1])}% ${D(e[2])}%)`;case`hsla`:return`hsl(${e[0]}deg ${D(e[1])}% ${D(e[2])}% / ${D(e[3])})`;case`hwb`:return`hwb(${e[0]} ${D(e[1])}% ${D(e[2])}%)`;case`lab`:return`lab(${D(e[0])}% ${e[1]} ${e[2]})`;case`lch`:return`lch(${D(e[0])}% ${e[1]} ${e[2]})`;case`rgb`:return`rgb(${e[0]}, ${e[1]}, ${e[2]})`}}function O(e,t,n=`rgb`,r=`sRGB`){switch(t){case`css`:return fe(e,n,r);case`binary`:return E(e);case`decimal`:return e}}var pe=class extends S{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(T)}cssSupportedSpace(){return this.faker.helpers.enumValue(w)}rgb(e={}){let{format:t=`hex`,includeAlpha:n=!1,prefix:r=`#`,casing:i=`lower`}=e,a,o=`rgb`;return t===`hex`?(a=this.faker.string.hexadecimal({length:n?8:6,prefix:``}),a=de(a,{prefix:r,casing:i}),a):(a=Array.from({length:3},()=>this.faker.number.int(255)),n&&(a.push(this.faker.number.float({multipleOf:.01})),o=`rgba`),O(a,t,o))}cmyk(e={}){let{format:t=`decimal`}=e;return O(Array.from({length:4},()=>this.faker.number.float({multipleOf:.01})),t,`cmyk`)}hsl(e={}){let{format:t=`decimal`,includeAlpha:n=!1}=e,r=[this.faker.number.int(360)];for(let t=0;t<(e?.includeAlpha?3:2);t++)r.push(this.faker.number.float({multipleOf:.01}));return O(r,t,n?`hsla`:`hsl`)}hwb(e={}){let{format:t=`decimal`}=e,n=[this.faker.number.int(360)];for(let e=0;e<2;e++)n.push(this.faker.number.float({multipleOf:.01}));return O(n,t,`hwb`)}lab(e={}){let{format:t=`decimal`}=e,n=[this.faker.number.float({multipleOf:1e-6})];for(let e=0;e<2;e++)n.push(this.faker.number.float({min:-100,max:100,multipleOf:1e-4}));return O(n,t,`lab`)}lch(e={}){let{format:t=`decimal`}=e,n=[this.faker.number.float({multipleOf:1e-6})];for(let e=0;e<2;e++)n.push(this.faker.number.float({max:230,multipleOf:.1}));return O(n,t,`lch`)}colorByCSSColorSpace(e={}){let{format:t=`decimal`,space:n=`sRGB`}=e;return O(Array.from({length:3},()=>this.faker.number.float({multipleOf:1e-4})),t,`color`,n)}};function me(t){if(!/^\d{11}$/.test(t))throw new e(`calculateUPCCheckDigit expects exactly 11 numeric digits`);let n=0,r=0;for(let e of t)n+=Number.parseInt(e,10)*(r%2==0?3:1),r++;return(10-n%10)%10}const he={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]]};var ge=class extends S{department(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.department)}productName(){let e=this.faker.definitions.commerce.product_name.pattern;return this.faker.helpers.fake(e)}price(e={}){let{dec:t=2,max:n=1e3,min:r=1,symbol:i=``}=e;if(r<0||n<0)return`${i}0`;if(r===n)return`${i}${r.toFixed(t)}`;let a=this.faker.number.float({min:r,max:n,fractionDigits:t});if(t===0)return`${i}${a.toFixed(t)}`;let o=a*10**t%10,s=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)**t,l=o*c,u=s*c,d=a-l+u;return r<=d&&d<=n?`${i}${d.toFixed(t)}`:`${i}${a.toFixed(t)}`}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(t={}){typeof t==`number`&&(t={variant:t});let{variant:n=13,separator:r=`-`}=t,[i,a]=this.faker.helpers.objectEntry(he),o=this.faker.string.numeric(8),s=Number.parseInt(o.slice(0,-1)),c=a.find(([e])=>s<=e)?.[1];if(!c)throw new e(`Unable to find a registrant length for the group ${i}`);let l=[`978`,i,o.slice(0,c),o.slice(c)];n===10&&l.shift();let u=l.join(``),d=0;for(let e=0;e<n-1;e++){let t=n===10?e+1:e%2?3:1;d+=t*Number.parseInt(u[e])}return d=n===10?d%11:(10-d%10)%10,l.push(d===10?`X`:d.toString()),l.join(r)}upc(t={}){let{prefix:n=``}=t;if(n&&/\D/.test(n))throw new e(`Prefix must contain only numeric digits`);if(n.length>11)throw new e(`Prefix must be at most 11 numeric digits`);let r=11-n.length,i=`${n}${this.faker.string.numeric({length:r,allowLeadingZeros:!0})}`;return`${i}${me(i)}`}},_e=class extends S{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)}},ve=class extends S{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:``})}};function k(t,n=`refDate`){let r=new Date(t);if(Number.isNaN(r.valueOf()))throw new e(`Invalid ${n} date: ${t.toString()}`);return r}var A=class extends x{anytime(e={}){let{refDate:t=this.faker.defaultRefDate()}=e,n=k(t).getTime();return this.between({from:n-1e3*60*60*24*365,to:n+1e3*60*60*24*365})}past(t={}){let{refDate:n=this.faker.defaultRefDate()}=t,{years:r=1}=t;if(typeof r==`number`&&(r={min:0,max:r}),r.max<=0)throw new e(`Years must be greater than 0.`);if(r.min>=r.max)throw new e(`The maximum amount of years must be greater than the minimum amount of years.`);let i=k(n),a=new Date(i);a.setUTCFullYear(a.getUTCFullYear()-r.max);let o=new Date(i);return o.setUTCFullYear(o.getUTCFullYear()-r.min),this.between({from:a,to:o.getTime()-1e3})}future(t={}){let{refDate:n=this.faker.defaultRefDate()}=t,{years:r=1}=t;if(typeof r==`number`&&(r={min:0,max:r}),r.max<=0)throw new e(`Years must be greater than 0.`);if(r.min>=r.max)throw new e(`The maximum amount of years must be greater than the minimum amount of years.`);let i=k(n),a=new Date(i);a.setUTCFullYear(a.getUTCFullYear()+r.min);let o=new Date(i);return o.setUTCFullYear(o.getUTCFullYear()+r.max),this.between({from:a.getTime()+1e3,to:o})}between(t){let{from:n,to:r}=t,i=k(n,`from`).getTime(),a=k(r,`to`).getTime();if(i>a)throw new e("`from` date must be before `to` date.");return new Date(this.faker.number.int({min:i,max:a}))}betweens(e){let{from:t,to:n,count:r=3}=e;return this.faker.helpers.multiple(()=>this.between({from:t,to:n}),{count:r}).toSorted((e,t)=>e.getTime()-t.getTime())}recent(t={}){let{refDate:n=this.faker.defaultRefDate()}=t,{days:r=1}=t;if(typeof r==`number`&&(r={min:0,max:r}),r.max<=0)throw new e(`Days must be greater than 0.`);if(r.min>=r.max)throw new e(`The maximum amount of days must be greater than the minimum amount of days.`);let i=k(n),a=new Date(i);a.setUTCDate(a.getUTCDate()-r.max);let o=new Date(i);return o.setUTCDate(o.getUTCDate()-r.min),this.between({from:a,to:o.getTime()-1e3})}soon(t={}){let{refDate:n=this.faker.defaultRefDate()}=t,{days:r=1}=t;if(typeof r==`number`&&(r={min:0,max:r}),r.max<=0)throw new e(`Days must be greater than 0.`);if(r.min>=r.max)throw new e(`The maximum amount of days must be greater than the minimum amount of days.`);let i=k(n),a=new Date(i);a.setUTCDate(a.getUTCDate()+r.min);let o=new Date(i);return o.setUTCDate(o.getUTCDate()+r.max),this.between({from:a.getTime()+1e3,to:o})}birthdate(t={}){let{mode:n=`age`,min:r=18,max:i=80,refDate:a=this.faker.defaultRefDate()}=t,o=k(a),s=o.getUTCFullYear();switch(n){case`age`:{let t=new Date(o).setUTCFullYear(s-i-1)+1440*60*1e3,n=new Date(o).setUTCFullYear(s-r);if(t>n)throw new e(`Max age ${i} should be greater than or equal to min age ${r}.`);return this.between({from:t,to:n})}case`year`:{let t=new Date(Date.UTC(0,0,2)).setUTCFullYear(r),n=new Date(Date.UTC(0,11,30)).setUTCFullYear(i);if(t>n)throw new e(`Max year ${i} should be greater than or equal to min year ${r}.`);return this.between({from:t,to:n})}}}},ye=class extends A{faker;constructor(e){super(e),this.faker=e}month(e={}){let{abbreviated:t=!1,context:n=!1}=e,r=this.faker.definitions.date.month,i;i=t?n&&r.abbr_context!=null?`abbr_context`:`abbr`:n&&r.wide_context!=null?`wide_context`:`wide`;let o=r[i];return a(o,`date.month`,i),this.faker.helpers.arrayElement(o)}weekday(e={}){let{abbreviated:t=!1,context:n=!1}=e,r=this.faker.definitions.date.weekday,i;i=t?n&&r.abbr_context!=null?`abbr_context`:`abbr`:n&&r.wide_context!=null?`wide_context`:`wide`;let o=r[i];return a(o,`date.weekday`,i),this.faker.helpers.arrayElement(o)}timeZone(){return this.faker.helpers.arrayElement(this.faker.definitions.date.time_zone)}};let j=function(e){return e.Legacy=`legacy`,e.Segwit=`segwit`,e.Bech32=`bech32`,e.Taproot=`taproot`,e}({}),be=function(e){return e.Mainnet=`mainnet`,e.Testnet=`testnet`,e}({});const xe={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`}},M={alpha:`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``),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`},{country:`HU`,total:28,bban:[{type:`n`,count:8},{type:`n`,count:16}],format:`HUkk bbbs sssk cccc cccc cccc cccx`},{country:`IS`,total:26,bban:[{type:`n`,count:6},{type:`n`,count:16}],format:`ISkk bbbb sscc cccc iiii iiii ii`},{country:`IE`,total:22,bban:[{type:`a`,count:4},{type:`n`,count:6},{type:`n`,count:8}],format:`IEkk aaaa bbbb bbcc cccc cc`},{country:`IL`,total:23,bban:[{type:`n`,count:6},{type:`n`,count:13}],format:`ILkk bbbn nncc cccc cccc ccc`},{country:`IR`,total:26,bban:[{type:`n`,count:22}],format:`IRkk bbbb cccc cccc cccc cccc cc`},{country:`IT`,total:27,bban:[{type:`a`,count:1},{type:`n`,count:10},{type:`c`,count:12}],format:`ITkk xaaa aabb bbbc cccc cccc ccc`},{country:`JO`,total:30,bban:[{type:`a`,count:4},{type:`n`,count:4},{type:`n`,count:18}],format:`JOkk bbbb nnnn cccc cccc cccc cccc cc`},{country:`KZ`,total:20,bban:[{type:`n`,count:3},{type:`c`,count:13}],format:`KZkk bbbc cccc cccc cccc`},{country:`XK`,total:20,bban:[{type:`n`,count:4},{type:`n`,count:12}],format:`XKkk bbbb cccc cccc cccc`},{country:`KW`,total:30,bban:[{type:`a`,count:4},{type:`c`,count:22}],format:`KWkk bbbb cccc cccc cccc cccc cccc cc`},{country:`LV`,total:21,bban:[{type:`a`,count:4},{type:`c`,count:13}],format:`LVkk bbbb cccc cccc cccc c`},{country:`LB`,total:28,bban:[{type:`n`,count:4},{type:`c`,count:20}],format:`LBkk bbbb cccc cccc cccc cccc cccc`},{country:`LI`,total:21,bban:[{type:`n`,count:5},{type:`c`,count:12}],format:`LIkk bbbb bccc cccc cccc c`},{country:`LT`,total:20,bban:[{type:`n`,count:5},{type:`n`,count:11}],format:`LTkk bbbb bccc cccc cccc`},{country:`LU`,total:20,bban:[{type:`n`,count:3},{type:`c`,count:13}],format:`LUkk bbbc cccc cccc cccc`},{country:`MK`,total:19,bban:[{type:`n`,count:3},{type:`c`,count:10},{type:`n`,count:2}],format:`MKkk bbbc cccc cccc cxx`},{country:`MT`,total:31,bban:[{type:`a`,count:4},{type:`n`,count:5},{type:`c`,count:18}],format:`MTkk bbbb ssss sccc cccc cccc cccc ccc`},{country:`MR`,total:27,bban:[{type:`n`,count:10},{type:`n`,count:13}],format:`MRkk bbbb bsss sscc cccc cccc cxx`},{country:`MU`,total:30,bban:[{type:`a`,count:4},{type:`n`,count:4},{type:`n`,count:15},{type:`a`,count:3}],format:`MUkk bbbb bbss cccc cccc cccc 000d dd`},{country:`MC`,total:27,bban:[{type:`n`,count:10},{type:`c`,count:11},{type:`n`,count:2}],format:`MCkk bbbb bsss sscc cccc cccc cxx`},{country:`MD`,total:24,bban:[{type:`c`,count:2},{type:`c`,count:18}],format:`MDkk bbcc cccc cccc cccc cccc`},{country:`ME`,total:22,bban:[{type:`n`,count:3},{type:`n`,count:15}],format:`MEkk bbbc cccc cccc cccc xx`},{country:`NL`,total:18,bban:[{type:`a`,count:4},{type:`n`,count:10}],format:`NLkk bbbb cccc cccc cc`},{country:`NO`,total:15,bban:[{type:`n`,count:4},{type:`n`,count:7}],format:`NOkk bbbb cccc ccx`},{country:`PK`,total:24,bban:[{type:`a`,count:4},{type:`n`,count:16}],format:`PKkk bbbb cccc cccc cccc cccc`},{country:`PS`,total:29,bban:[{type:`a`,count:4},{type:`n`,count:9},{type:`n`,count:12}],format:`PSkk bbbb xxxx xxxx xccc cccc cccc c`},{country:`PL`,total:28,bban:[{type:`n`,count:8},{type:`n`,count:16}],format:`PLkk bbbs sssx cccc cccc cccc cccc`},{country:`PT`,total:25,bban:[{type:`n`,count:8},{type:`n`,count:13}],format:`PTkk bbbb ssss cccc cccc cccx x`},{country:`QA`,total:29,bban:[{type:`a`,count:4},{type:`c`,count:21}],format:`QAkk bbbb cccc cccc cccc cccc cccc c`},{country:`RO`,total:24,bban:[{type:`a`,count:4},{type:`c`,count:16}],format:`ROkk bbbb cccc cccc cccc cccc`},{country:`SM`,total:27,bban:[{type:`a`,count:1},{type:`n`,count:10},{type:`c`,count:12}],format:`SMkk xaaa aabb bbbc cccc cccc ccc`},{country:`SA`,total:24,bban:[{type:`n`,count:2},{type:`c`,count:18}],format:`SAkk bbcc cccc cccc cccc cccc`},{country:`RS`,total:22,bban:[{type:`n`,count:3},{type:`n`,count:15}],format:`RSkk bbbc cccc cccc cccc xx`},{country:`SK`,total:24,bban:[{type:`n`,count:10},{type:`n`,count:10}],format:`SKkk bbbb ssss sscc cccc cccc`},{country:`SI`,total:19,bban:[{type:`n`,count:5},{type:`n`,count:10}],format:`SIkk bbss sccc cccc cxx`},{country:`ES`,total:24,bban:[{type:`n`,count:10},{type:`n`,count:10}],format:`ESkk bbbb gggg xxcc cccc cccc`},{country:`SE`,total:24,bban:[{type:`n`,count:3},{type:`n`,count:17}],format:`SEkk bbbc cccc cccc cccc cccc`},{country:`CH`,total:21,bban:[{type:`n`,count:5},{type:`c`,count:12}],format:`CHkk bbbb bccc cccc cccc c`},{country:`TN`,total:24,bban:[{type:`n`,count:5},{type:`n`,count:15}],format:`TNkk bbss sccc cccc cccc cccc`},{country:`TR`,total:26,bban:[{type:`n`,count:5},{type:`n`,count:1},{type:`n`,count:16}],format:`TRkk bbbb bxcc cccc cccc cccc cc`},{country:`AE`,total:23,bban:[{type:`n`,count:3},{type:`n`,count:16}],format:`AEkk bbbc cccc cccc cccc ccc`},{country:`GB`,total:22,bban:[{type:`a`,count:4},{type:`n`,count:6},{type:`n`,count:8}],format:`GBkk bbbb ssss sscc cccc cc`},{country:`VG`,total:24,bban:[{type:`a`,count:4},{type:`n`,count:16}],format:`VGkk bbbb cccc cccc cccc cccc`}],iso3166:`AD.AE.AF.AG.AI.AL.AM.AO.AQ.AR.AS.AT.AU.AW.AX.AZ.BA.BB.BD.BE.BF.BG.BH.BI.BJ.BL.BM.BN.BO.BQ.BR.BS.BT.BV.BW.BY.BZ.CA.CC.CD.CF.CG.CH.CI.CK.CL.CM.CN.CO.CR.CU.CV.CW.CX.CY.CZ.DE.DJ.DK.DM.DO.DZ.EC.EE.EG.EH.ER.ES.ET.FI.FJ.FK.FM.FO.FR.GA.GB.GD.GE.GF.GG.GH.GI.GL.GM.GN.GP.GQ.GR.GS.GT.GU.GW.GY.HK.HM.HN.HR.HT.HU.ID.IE.IL.IM.IN.IO.IQ.IR.IS.IT.JE.JM.JO.JP.KE.KG.KH.KI.KM.KN.KP.KR.KW.KY.KZ.LA.LB.LC.LI.LK.LR.LS.LT.LU.LV.LY.MA.MC.MD.ME.MF.MG.MH.MK.ML.MM.MN.MO.MP.MQ.MR.MS.MT.MU.MV.MW.MX.MY.MZ.NA.NC.NE.NF.NG.NI.NL.NO.NP.NR.NU.NZ.OM.PA.PE.PF.PG.PH.PK.PL.PM.PN.PR.PS.PT.PW.PY.QA.RE.RO.RS.RU.RW.SA.SB.SC.SD.SE.SG.SH.SI.SJ.SK.SL.SM.SN.SO.SR.SS.ST.SV.SX.SY.SZ.TC.TD.TF.TG.TH.TJ.TK.TL.TM.TN.TO.TR.TT.TV.TW.TZ.UA.UG.UM.US.UY.UZ.VA.VC.VE.VG.VI.VN.VU.WF.WS.XK.YE.YT.ZA.ZM.ZW`.split(`.`),mod97:e=>{let t=0;for(let n of e)t=(t*10+ +n)%97;return t},pattern10:[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`],pattern100:[`001`,`002`,`003`,`004`,`005`,`006`,`007`,`008`,`009`],toDigitString:e=>e.replaceAll(/[A-Z]/gi,e=>String((e.toUpperCase().codePointAt(0)??NaN)-55))};function Se(e){let t=``;for(let n=0;n<e.length;n+=4)t+=`${e.substring(n,n+4)} `;return t.trimEnd()}var Ce=class extends S{accountNumber(e={}){typeof e==`number`&&(e={length:e});let{length:t=8}=e;return this.faker.string.numeric({length:t,allowLeadingZeros:!0})}accountName(){return[this.faker.helpers.arrayElement(this.faker.definitions.finance.account_type),`Account`].join(` `)}routingNumber(){let e=this.faker.helpers.arrayElement(this.faker.definitions.finance.federal_reserve_routing_symbol)+this.faker.string.numeric({length:4,allowLeadingZeros:!0}),t=0;for(let n=0;n<e.length;n+=3)t+=Number(e[n])*3,t+=Number(e[n+1])*7,t+=Number(e[n+2])||0;return`${e}${Math.ceil(t/10)*10-t}`}amount(e={}){let{autoFormat:t=!1,dec:n=2,max:r=1e3,min:i=0,symbol:a=``}=e,o=this.faker.number.float({max:r,min:i,fractionDigits:n});return a+(t?o.toLocaleString(void 0,{minimumFractionDigits:n}):o.toFixed(n))}transactionType(){return this.faker.helpers.arrayElement(this.faker.definitions.finance.transaction_type)}currency(){return this.faker.helpers.arrayElement(this.faker.definitions.finance.currency)}currencyCode(){return this.currency().code}currencyName(){return this.currency().name}currencySymbol(){let e;do e=this.currency().symbol;while(e.length===0);return e}currencyNumericCode(){return this.currency().numericCode}bitcoinAddress(e={}){let{type:t=this.faker.helpers.enumValue(j),network:n=`mainnet`}=e,r=xe[t],i=r.prefix[n],a=this.faker.number.int(r.length);return i+this.faker.string.alphanumeric({length:a-i.length,casing:r.casing,exclude:r.exclude})}litecoinAddress(){let e=this.faker.number.int({min:26,max:33});return this.faker.string.fromCharacters(`LM3`)+this.faker.string.fromCharacters(`123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ`,e-1)}creditCardNumber(e={}){typeof e==`string`&&(e={issuer:e});let{issuer:t=``}=e,n,r=this.faker.definitions.finance.credit_card,i=t.toLowerCase();if(i in r)n=this.faker.helpers.arrayElement(r[i]);else if(t.includes(`#`))n=t;else{let e=this.faker.helpers.objectValue(r);n=this.faker.helpers.arrayElement(e)}return n=n.replaceAll(`/`,``),this.faker.helpers.replaceCreditCardSymbols(n)}creditCardCVV(){return this.faker.string.numeric({length:3,allowLeadingZeros:!0})}creditCardIssuer(){return this.faker.helpers.objectKey(this.faker.definitions.finance.credit_card)}pin(t={}){typeof t==`number`&&(t={length:t});let{length:n=4}=t;if(n<1)throw new e(`minimum length is 1`);return this.faker.string.numeric({length:n,allowLeadingZeros:!0})}ethereumAddress(){return this.faker.string.hexadecimal({length:40,casing:`lower`})}iban(t={}){let{countryCode:n,formatted:r=!1}=t,i=n?M.formats.find(e=>e.country===n):this.faker.helpers.arrayElement(M.formats);if(!i)throw new e(`Country code ${n} not supported.`);let a=``,o=0;for(let e of i.bban){let t=e.count;for(o+=e.count;t>0;)e.type===`a`?a+=this.faker.helpers.arrayElement(M.alpha):e.type===`c`?this.faker.datatype.boolean(.8)?a+=this.faker.number.int(9):a+=this.faker.helpers.arrayElement(M.alpha):t>=3&&this.faker.datatype.boolean(.3)?this.faker.datatype.boolean()?(a+=this.faker.helpers.arrayElement(M.pattern100),t-=2):(a+=this.faker.helpers.arrayElement(M.pattern10),t--):a+=this.faker.number.int(9),t--;a=a.substring(0,o)}let s=98-M.mod97(M.toDigitString(`${a}${i.country}00`));s<10&&(s=`0${s}`);let c=`${i.country}${s}${a}`;return r?Se(c):c}bic(e={}){let{includeBranchCode:t=this.faker.datatype.boolean()}=e;return`${this.faker.string.alpha({length:4,casing:`upper`})}${this.faker.helpers.arrayElement(M.iso3166)}${this.faker.string.alphanumeric({length:2,casing:`upper`})}${t?this.faker.datatype.boolean()?this.faker.string.alphanumeric({length:3,casing:`upper`}):`XXX`:``}`}transactionDescription(){return this.faker.helpers.fake(this.faker.definitions.finance.transaction_description_pattern)}};function N(e){return e.split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var we=class extends S{adjective(){return this.faker.helpers.arrayElement(this.faker.definitions.food.adjective)}description(){return this.faker.helpers.fake(this.faker.definitions.food.description_pattern)}dish(){return this.faker.datatype.boolean()?N(this.faker.helpers.fake(this.faker.definitions.food.dish_pattern)):N(this.faker.helpers.arrayElement(this.faker.definitions.food.dish))}ethnicCategory(){return this.faker.helpers.arrayElement(this.faker.definitions.food.ethnic_category)}fruit(){return this.faker.helpers.arrayElement(this.faker.definitions.food.fruit)}ingredient(){return this.faker.helpers.arrayElement(this.faker.definitions.food.ingredient)}meat(){return this.faker.helpers.arrayElement(this.faker.definitions.food.meat)}spice(){return this.faker.helpers.arrayElement(this.faker.definitions.food.spice)}vegetable(){return this.faker.helpers.arrayElement(this.faker.definitions.food.vegetable)}},Te=class extends S{branch(){return`${this.faker.hacker.noun().replace(` `,`-`)}-${this.faker.hacker.verb().replace(` `,`-`)}`}commitEntry(e={}){let{merge:t=this.faker.datatype.boolean({probability:.2}),eol:n=`CRLF`,refDate:r}=e,i=[`commit ${this.faker.git.commitSha()}`];t&&i.push(`Merge: ${this.commitSha({length:7})} ${this.commitSha({length:7})}`);let a=this.faker.person.firstName(),o=this.faker.person.lastName(),s=this.faker.person.fullName({firstName:a,lastName:o}),c=this.faker.internet.username({firstName:a,lastName:o}),l=this.faker.helpers.arrayElement([s,c]),u=this.faker.internet.email({firstName:a,lastName:o});l=l.replaceAll(/^[.,:;"\\']|[<>\n]|[.,:;"\\']$/g,``),i.push(`Author: ${l} <${u}>`,`Date: ${this.commitDate({refDate:r})}`,``,`${`\xA0`.repeat(4)}${this.commitMessage()}`,``);let d=n===`CRLF`?`\r
`:`
`;return i.join(d)}commitMessage(){return`${this.faker.hacker.verb()} ${this.faker.hacker.adjective()} ${this.faker.hacker.noun()}`}commitDate(e={}){let{refDate:t=this.faker.defaultRefDate()}=e,n=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],r=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],i=this.faker.date.recent({days:1,refDate:t}),a=n[i.getUTCDay()],o=r[i.getUTCMonth()],s=i.getUTCDate(),c=i.getUTCHours().toString().padStart(2,`0`),l=i.getUTCMinutes().toString().padStart(2,`0`),u=i.getUTCSeconds().toString().padStart(2,`0`),d=i.getUTCFullYear(),f=this.faker.number.int({min:-11,max:12}),p=Math.abs(f).toString().padStart(2,`0`);return`${a} ${o} ${s} ${c}:${l}:${u} ${d} ${f>=0?`+`:`-`}${p}00`}commitSha(e={}){let{length:t=40}=e;return this.faker.string.hexadecimal({length:t,casing:`lower`,prefix:``})}},Ee=class extends S{abbreviation(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.abbreviation)}adjective(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.adjective)}noun(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.noun)}verb(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.verb)}ingverb(){return this.faker.helpers.arrayElement(this.faker.definitions.hacker.ingverb)}phrase(){return this.faker.helpers.fake(this.faker.definitions.hacker.phrase)}};const De=/\.|\(/;function Oe(t,n,r=[n,n.definitions.raw]){if(t.length===0)throw new e(`Eval expression cannot be empty.`);if(r.length===0)throw new e(`Eval entrypoints cannot be empty.`);let i=r,a=t;do{let e;a.startsWith(`(`)?[e,i]=ke(a,i):[e,i]=je(a,i),a=a.substring(e),i=i.filter(e=>e!=null).map(e=>Array.isArray(e)?n.helpers.arrayElement(e):e)}while(a.length>0&&i.length>0);if(i.length===0)throw new e(`Cannot resolve expression '${t}'`);let o=i[0];return typeof o==`function`?o():o}function ke(t,n){let[r,i]=Ae(t),a=t[r+1];switch(a){case`.`:case`(`:case void 0:break;default:throw new e(`Expected dot ('.'), open parenthesis ('('), or nothing after function call but got '${a}'`)}return[r+(a===`.`?2:1),n.map(e=>typeof e==`function`?e(...i):void 0)]}function Ae(t){let n=t.indexOf(`)`,1);if(n===-1)throw new e(`Missing closing parenthesis in '${t}'`);for(;n!==-1;){let e=t.substring(1,n);try{return[n,JSON.parse(`[${e}]`)]}catch{if(!e.includes(`'`)&&!e.includes(`"`))try{return[n,JSON.parse(`["${e}"]`)]}catch{}}n=t.indexOf(`)`,n+1)}n=t.lastIndexOf(`)`);let r=t.substring(1,n);return[n,[r]]}function je(t,n){let r=De.exec(t),i=(r?.[0]??``)===`.`,a=r?.index??t.length,o=t.substring(0,a);if(o.length===0)throw new e(`Expression parts cannot be empty in '${t}'`);let s=t[a+1];if(i&&(s==null||s===`.`||s===`(`))throw new e(`Found dot without property name in '${t}'`);return[a+ +!!i,n.map(e=>P(e,o))]}function P(e,t){switch(typeof e){case`function`:try{e=e()}catch{return}return P(e,t);case`object`:return e?.[t];default:return}}function Me(e){let t=Ne(e.replace(/L?$/,`0`));return t===0?0:10-t}function Ne(e){e=e.replaceAll(/[\s-]/g,``);let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=Number.parseInt(e[r]);n&&(i*=2,i>9&&(i=i%10+1)),t+=i,n=!n}return t%10}function F(t,n,r,i){let a=1;if(n)switch(n){case`?`:a=+!t.datatype.boolean();break;case`*`:{let e=1;for(;t.datatype.boolean();)e*=2;a=t.number.int({min:0,max:e});break}case`+`:{let e=1;for(;t.datatype.boolean();)e*=2;a=t.number.int({min:1,max:e});break}default:throw new e(`Unknown quantifier symbol provided.`)}else r!=null&&i!=null?a=t.number.int({min:Number.parseInt(r),max:Number.parseInt(i)}):r!=null&&i==null&&(a=Number.parseInt(r));return a}function Pe(e,t=``){let n=/(.)\{(\d+),(\d+)\}/,r=/(.)\{(\d+)\}/,i=/\[(\d+)-(\d+)\]/,a,o,s,c,l=n.exec(t);for(;l!=null;)a=Number.parseInt(l[2]),o=Number.parseInt(l[3]),a>o&&(s=o,o=a,a=s),c=e.number.int({min:a,max:o}),t=t.slice(0,l.index)+l[1].repeat(c)+t.slice(l.index+l[0].length),l=n.exec(t);for(l=r.exec(t);l!=null;)c=Number.parseInt(l[2]),t=t.slice(0,l.index)+l[1].repeat(c)+t.slice(l.index+l[0].length),l=r.exec(t);for(l=i.exec(t);l!=null;)a=Number.parseInt(l[1]),o=Number.parseInt(l[2]),a>o&&(s=o,o=a,a=s),t=t.slice(0,l.index)+e.number.int({min:a,max:o}).toString()+t.slice(l.index+l[0].length),l=i.exec(t);return t}function Fe(e,t,n){let r=``,i=!1;for(let a=0;a<t.length;a++){let o=t[a];if(o===`\\`){r+=o,a+1<t.length&&(r+=t[++a]);continue}if(o===`[`){i=!0,r+=o;continue}if(o===`]`){i=!1,r+=o;continue}let s=t[a+1],c=[`?`,`*`,`+`,`{`].includes(s);if(!i&&!c&&o===`.`){r+=e.string.alphanumeric();continue}if(!i&&!c&&n&&/^[a-z]$/i.test(o)){r+=e.string.fromCharacters([o.toLowerCase(),o.toUpperCase()]);continue}r+=o}return r}function I(e,t=``,n=`#`){let r=``;for(let i=0;i<t.length;i++)t.charAt(i)===n?r+=e.number.int(9):t.charAt(i)===`!`?r+=e.number.int({min:2,max:9}):r+=t.charAt(i);return r}var L=class extends x{slugify(e=``){return e.normalize(`NFKD`).replaceAll(/[\u0300-\u036F]/g,``).replaceAll(` `,`-`).replaceAll(/[^\w.-]+/g,``)}replaceSymbols(e=``){let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``),n=``;for(let r=0;r<e.length;r++)e.charAt(r)===`#`?n+=this.faker.number.int(9):e.charAt(r)===`?`?n+=this.arrayElement(t):e.charAt(r)===`*`?n+=this.faker.datatype.boolean()?this.arrayElement(t):this.faker.number.int(9):n+=e.charAt(r);return n}replaceCreditCardSymbols(e=`6453-####-####-####-###L`,t=`#`){e=Pe(this.faker,e),e=I(this.faker,e,t);let n=Me(e);return e.replace(`L`,String(n))}fromRegExp(t){let n=!1;if(t instanceof RegExp&&(n=t.flags.includes(`i`),t=t.source.replace(/^\^+/,``).replace(/\$+$/,``)),t===`.`)return this.faker.string.alphanumeric();if(n&&/^[a-z]$/i.test(t))return this.faker.string.fromCharacters([t.toLowerCase(),t.toUpperCase()]);t=Fe(this.faker,t,n);let r,i,a,o=/([.A-Za-z0-9])(?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,s=o.exec(t);for(;s!=null;){let e=s[2],r=s[3],i=s[4];a=F(this.faker,i,e,r);let c;c=s[1]===`.`?this.faker.string.alphanumeric(a):n?this.faker.string.fromCharacters([s[1].toLowerCase(),s[1].toUpperCase()],a):s[1].repeat(a),t=t.slice(0,s.index)+c+t.slice(s.index+s[0].length),s=o.exec(t)}let c=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+)|)/;for(s=l.exec(t);s!=null;){let o=s[1]===`^`,u=s[2]===`-`,d=s[4],f=s[5],p=s[6],m=[],h=s[3],g=c.exec(h);for(u&&m.push(45);g!=null;){if(g[0].includes(`-`)){let t=g[0].split(`-`).map(e=>e.codePointAt(0)??NaN);if(r=t[0],i=t[1],r>i)throw new e(`Character range provided is out of order.`);for(let e=r;e<=i;e++)if(n&&Number.isNaN(Number(String.fromCodePoint(e)))){let t=String.fromCodePoint(e);m.push(t.toUpperCase().codePointAt(0)??NaN,t.toLowerCase().codePointAt(0)??NaN)}else m.push(e)}else n&&Number.isNaN(Number(g[0]))?m.push(g[0].toUpperCase().codePointAt(0)??NaN,g[0].toLowerCase().codePointAt(0)??NaN):m.push(g[0].codePointAt(0)??NaN);h=h.substring(g[0].length),g=c.exec(h)}if(a=F(this.faker,p,d,f),o){let e;for(let t=48;t<=57;t++){if(e=m.indexOf(t),e>-1){m.splice(e,1);continue}m.push(t)}for(let t=65;t<=90;t++){if(e=m.indexOf(t),e>-1){m.splice(e,1);continue}m.push(t)}for(let t=97;t<=122;t++){if(e=m.indexOf(t),e>-1){m.splice(e,1);continue}m.push(t)}}let _=this.multiple(()=>String.fromCodePoint(this.arrayElement(m)),{count:a}).join(``);t=t.slice(0,s.index)+_+t.slice(s.index+s[0].length),s=l.exec(t)}let u=/(.)\{(\d+),(\d+)\}/;for(s=u.exec(t);s!=null;){if(r=Number.parseInt(s[2]),i=Number.parseInt(s[3]),r>i)throw new e(`Numbers out of order in {} quantifier.`);a=this.faker.number.int({min:r,max:i}),t=t.slice(0,s.index)+s[1].repeat(a)+t.slice(s.index+s[0].length),s=u.exec(t)}let d=/(.)\{(\d+)\}/;for(s=d.exec(t);s!=null;)a=Number.parseInt(s[2]),t=t.slice(0,s.index)+s[1].repeat(a)+t.slice(s.index+s[0].length),s=d.exec(t);return t}shuffle(e,t={}){let{inplace:n=!1}=t;n||(e=[...e]);for(let t=e.length-1;t>0;--t){let n=this.faker.number.int(t);[e[t],e[n]]=[e[n],e[t]]}return e}uniqueArray(e,t){if(Array.isArray(e)){let n=[...new Set(e)];return this.shuffle(n).splice(0,t)}let n=new Set;try{if(typeof e==`function`){let r=1e3*t,i=0;for(;n.size<t&&i<r;)n.add(e()),i++}}catch{}return[...n]}mustache(e,t){if(e==null)return``;for(let n in t){let r=RegExp(`{{${n}}}`,`g`),i=t[n];typeof i==`string`&&(i=i.replaceAll(`$`,`$$$$`)),e=e.replace(r,i)}return e}maybe(e,t={}){if(this.faker.datatype.boolean(t))return e()}objectKey(e){let t=Object.keys(e);return this.arrayElement(t)}objectValue(e){return e[this.faker.helpers.objectKey(e)]}objectEntry(e){let t=this.faker.helpers.objectKey(e);return[t,e[t]]}arrayElement(t){if(t.length===0)throw new e(`Cannot get value from empty dataset.`);return t[t.length>1?this.faker.number.int({max:t.length-1}):0]}weightedArrayElement(t){if(t.length===0)throw new e(`weightedArrayElement expects an array with at least one element`);if(!t.every(e=>e.weight>0))throw new e(`weightedArrayElement expects an array of { weight, value } objects where weight is a positive number`);let n=t.reduce((e,{weight:t})=>e+t,0),r=this.faker.number.float({min:0,max:n}),i=0;for(let{weight:e,value:n}of t)if(i+=e,r<i)return n;return t.at(-1).value}arrayElements(e,t){if(e.length===0)return[];let n=this.rangeToNumber(t??{min:1,max:e.length});if(n>=e.length)return this.shuffle(e);if(n<=0)return[];let r=[...e],i=e.length,a=i-n,o,s;for(;i-->a;)s=this.faker.number.int(i),o=r[s],r[s]=r[i],r[i]=o;return r.slice(a)}enumValue(e){let t=Object.keys(e).filter(e=>Number.isNaN(Number(e)));return e[this.arrayElement(t)]}rangeToNumber(e){return typeof e==`number`?e:this.faker.number.int(e)}multiple(e,t={}){let n=this.rangeToNumber(t.count??3);return n<=0?[]:Array.from({length:n},e)}},Ie=class extends L{faker;constructor(e){super(e),this.faker=e}fake(e){e=typeof e==`string`?e:this.arrayElement(e);let t=e.search(/{{[a-z]/),n=e.indexOf(`}}`,t);if(t===-1||n===-1)return e;let r=Oe(e.substring(t+2,n+2).replace(`}}`,``).replace(`{{`,``),this.faker),i=String(r),a=e.substring(0,t)+i+e.substring(n+2);return this.fake(a)}};const R=typeof Buffer>`u`||!B(`base64`)?e=>{let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}:e=>Buffer.from(e).toString(`base64`),z=typeof Buffer>`u`||!B(`base64url`)?e=>R(e).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replaceAll(/=+$/g,``):e=>Buffer.from(e).toString(`base64url`);function B(e){try{return typeof Buffer.from(`test`).toString(e)==`string`}catch{return!1}}function Le(e){let{deprecated:t,since:n,until:r,proposed:i}=e,a=`[@faker-js/faker]: ${t} is deprecated`;n&&(a+=` since v${n}`),r&&(a+=` and will be removed in v${r}`),i&&(a+=`. Please use ${i} instead`),console.warn(`${a}.`)}var Re=class extends S{avatar(){return this.faker.helpers.arrayElement([this.personPortrait,this.avatarGitHub])()}avatarGitHub(){return`https://avatars.githubusercontent.com/u/${this.faker.number.int(1e8)}`}personPortrait(e={}){let{size:t=512}=e,{sex:n=this.faker.person.sexType()}=e;return n===`generic`&&(n=this.faker.person.sexType()),`https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/${n}/${t}/${this.faker.number.int({min:0,max:99})}.jpg`}url(e={}){let{width:t=this.faker.number.int({min:1,max:3999}),height:n=this.faker.number.int({min:1,max:3999})}=e;return this.faker.helpers.arrayElement([({width:e,height:t})=>this.urlPicsumPhotos({width:e,height:t,grayscale:!1,blur:0})])({width:t,height:n})}urlLoremFlickr(e={}){Le({deprecated:`faker.image.urlLoremFlickr()`,proposed:`faker.image.url()`,since:`10.1.0`,until:`11.0.0`});let{width:t=this.faker.number.int({min:1,max:3999}),height:n=this.faker.number.int({min:1,max:3999}),category:r}=e;return`https://loremflickr.com/${t}/${n}${r==null?``:`/${r}`}?lock=${this.faker.number.int()}`}urlPicsumPhotos(e={}){let{width:t=this.faker.number.int({min:1,max:3999}),height:n=this.faker.number.int({min:1,max:3999}),grayscale:r=this.faker.datatype.boolean(),blur:i=this.faker.number.int({max:10})}=e,a=`https://picsum.photos/seed/${this.faker.string.alphanumeric({length:{min:5,max:10}})}/${t}/${n}`,o=typeof i==`number`&&i>=1&&i<=10;return(r||o)&&(a+=`?`,r&&(a+=`grayscale`),r&&o&&(a+=`&`),o&&(a+=`blur=${i}`)),a}dataUri(e={}){let{width:t=this.faker.number.int({min:1,max:3999}),height:n=this.faker.number.int({min:1,max:3999}),color:r=this.faker.color.rgb(),type:i=this.faker.helpers.arrayElement([`svg-uri`,`svg-base64`])}=e,a=`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="${t}" height="${n}"><rect width="100%" height="100%" fill="${r}"/><text x="${t/2}" y="${n/2}" font-size="20" alignment-baseline="middle" text-anchor="middle" fill="white">${t}x${n}</text></svg>`;return i===`svg-uri`?`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(a)}`:`data:image/svg+xml;base64,${R(a)}`}};const ze=Object.fromEntries([[`А`,`A`],[`а`,`a`],[`Б`,`B`],[`б`,`b`],[`В`,`V`],[`в`,`v`],[`Г`,`G`],[`г`,`g`],[`Д`,`D`],[`д`,`d`],[`ъе`,`ye`],[`Ъе`,`Ye`],[`ъЕ`,`yE`],[`ЪЕ`,`YE`],[`Е`,`E`],[`е`,`e`],[`Ё`,`Yo`],[`ё`,`yo`],[`Ж`,`Zh`],[`ж`,`zh`],[`З`,`Z`],[`з`,`z`],[`И`,`I`],[`и`,`i`],[`ый`,`iy`],[`Ый`,`Iy`],[`ЫЙ`,`IY`],[`ыЙ`,`iY`],[`Й`,`Y`],[`й`,`y`],[`К`,`K`],[`к`,`k`],[`Л`,`L`],[`л`,`l`],[`М`,`M`],[`м`,`m`],[`Н`,`N`],[`н`,`n`],[`О`,`O`],[`о`,`o`],[`П`,`P`],[`п`,`p`],[`Р`,`R`],[`р`,`r`],[`С`,`S`],[`с`,`s`],[`Т`,`T`],[`т`,`t`],[`У`,`U`],[`у`,`u`],[`Ф`,`F`],[`ф`,`f`],[`Х`,`Kh`],[`х`,`kh`],[`Ц`,`Ts`],[`ц`,`ts`],[`Ч`,`Ch`],[`ч`,`ch`],[`Ш`,`Sh`],[`ш`,`sh`],[`Щ`,`Sch`],[`щ`,`sch`],[`Ъ`,``],[`ъ`,``],[`Ы`,`Y`],[`ы`,`y`],[`Ь`,``],[`ь`,``],[`Э`,`E`],[`э`,`e`],[`Ю`,`Yu`],[`ю`,`yu`],[`Я`,`Ya`],[`я`,`ya`]]),Be=Object.fromEntries([[`α`,`a`],[`β`,`v`],[`γ`,`g`],[`δ`,`d`],[`ε`,`e`],[`ζ`,`z`],[`η`,`i`],[`θ`,`th`],[`ι`,`i`],[`κ`,`k`],[`λ`,`l`],[`μ`,`m`],[`ν`,`n`],[`ξ`,`ks`],[`ο`,`o`],[`π`,`p`],[`ρ`,`r`],[`σ`,`s`],[`τ`,`t`],[`υ`,`y`],[`φ`,`f`],[`χ`,`x`],[`ψ`,`ps`],[`ω`,`o`],[`ά`,`a`],[`έ`,`e`],[`ί`,`i`],[`ό`,`o`],[`ύ`,`y`],[`ή`,`i`],[`ώ`,`o`],[`ς`,`s`],[`ϊ`,`i`],[`ΰ`,`y`],[`ϋ`,`y`],[`ΐ`,`i`],[`Α`,`A`],[`Β`,`B`],[`Γ`,`G`],[`Δ`,`D`],[`Ε`,`E`],[`Ζ`,`Z`],[`Η`,`I`],[`Θ`,`TH`],[`Ι`,`I`],[`Κ`,`K`],[`Λ`,`L`],[`Μ`,`M`],[`Ν`,`N`],[`Ξ`,`KS`],[`Ο`,`O`],[`Π`,`P`],[`Ρ`,`R`],[`Σ`,`S`],[`Τ`,`T`],[`Υ`,`Y`],[`Φ`,`F`],[`Χ`,`X`],[`Ψ`,`PS`],[`Ω`,`O`],[`Ά`,`A`],[`Έ`,`E`],[`Ί`,`I`],[`Ό`,`O`],[`Ύ`,`Y`],[`Ή`,`I`],[`Ώ`,`O`],[`Ϊ`,`I`],[`Ϋ`,`Y`]]),Ve=Object.fromEntries([[`ء`,`e`],[`آ`,`a`],[`أ`,`a`],[`ؤ`,`w`],[`إ`,`i`],[`ئ`,`y`],[`ا`,`a`],[`ب`,`b`],[`ة`,`t`],[`ت`,`t`],[`ث`,`th`],[`ج`,`j`],[`ح`,`h`],[`خ`,`kh`],[`د`,`d`],[`ذ`,`dh`],[`ر`,`r`],[`ز`,`z`],[`س`,`s`],[`ش`,`sh`],[`ص`,`s`],[`ض`,`d`],[`ط`,`t`],[`ظ`,`z`],[`ع`,`e`],[`غ`,`gh`],[`ـ`,`_`],[`ف`,`f`],[`ق`,`q`],[`ك`,`k`],[`ل`,`l`],[`م`,`m`],[`ن`,`n`],[`ه`,`h`],[`و`,`w`],[`ى`,`a`],[`ي`,`y`],[`َ`,`a`],[`ُ`,`u`],[`ِ`,`i`]]),He=Object.fromEntries([[`ա`,`a`],[`Ա`,`A`],[`բ`,`b`],[`Բ`,`B`],[`գ`,`g`],[`Գ`,`G`],[`դ`,`d`],[`Դ`,`D`],[`ե`,`ye`],[`Ե`,`Ye`],[`զ`,`z`],[`Զ`,`Z`],[`է`,`e`],[`Է`,`E`],[`ը`,`y`],[`Ը`,`Y`],[`թ`,`t`],[`Թ`,`T`],[`ժ`,`zh`],[`Ժ`,`Zh`],[`ի`,`i`],[`Ի`,`I`],[`լ`,`l`],[`Լ`,`L`],[`խ`,`kh`],[`Խ`,`Kh`],[`ծ`,`ts`],[`Ծ`,`Ts`],[`կ`,`k`],[`Կ`,`K`],[`հ`,`h`],[`Հ`,`H`],[`ձ`,`dz`],[`Ձ`,`Dz`],[`ղ`,`gh`],[`Ղ`,`Gh`],[`ճ`,`tch`],[`Ճ`,`Tch`],[`մ`,`m`],[`Մ`,`M`],[`յ`,`y`],[`Յ`,`Y`],[`ն`,`n`],[`Ն`,`N`],[`շ`,`sh`],[`Շ`,`Sh`],[`ո`,`vo`],[`Ո`,`Vo`],[`չ`,`ch`],[`Չ`,`Ch`],[`պ`,`p`],[`Պ`,`P`],[`ջ`,`j`],[`Ջ`,`J`],[`ռ`,`r`],[`Ռ`,`R`],[`ս`,`s`],[`Ս`,`S`],[`վ`,`v`],[`Վ`,`V`],[`տ`,`t`],[`Տ`,`T`],[`ր`,`r`],[`Ր`,`R`],[`ց`,`c`],[`Ց`,`C`],[`ու`,`u`],[`ՈՒ`,`U`],[`Ու`,`U`],[`փ`,`p`],[`Փ`,`P`],[`ք`,`q`],[`Ք`,`Q`],[`օ`,`o`],[`Օ`,`O`],[`ֆ`,`f`],[`Ֆ`,`F`],[`և`,`yev`]]),Ue=Object.fromEntries([[`چ`,`ch`],[`ک`,`k`],[`گ`,`g`],[`پ`,`p`],[`ژ`,`zh`],[`ی`,`y`]]),We=Object.fromEntries([[`א`,`a`],[`ב`,`b`],[`ג`,`g`],[`ד`,`d`],[`ה`,`h`],[`ו`,`v`],[`ז`,`z`],[`ח`,`ch`],[`ט`,`t`],[`י`,`y`],[`כ`,`k`],[`ך`,`kh`],[`ל`,`l`],[`ם`,`m`],[`מ`,`m`],[`ן`,`n`],[`נ`,`n`],[`ס`,`s`],[`ע`,`a`],[`פ`,`f`],[`ף`,`ph`],[`צ`,`ts`],[`ץ`,`ts`],[`ק`,`k`],[`ר`,`r`],[`ש`,`sh`],[`ת`,`t`],[`ו`,`v`]]),V={...ze,...Be,...Ve,...Ue,...He,...We};let Ge=function(e){return e.Any=`any`,e.Loopback=`loopback`,e.PrivateA=`private-a`,e.PrivateB=`private-b`,e.PrivateC=`private-c`,e.TestNet1=`test-net-1`,e.TestNet2=`test-net-2`,e.TestNet3=`test-net-3`,e.LinkLocal=`link-local`,e.Multicast=`multicast`,e}({});const Ke={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 H(e){return/^[a-z][a-z-]*[a-z]$/i.exec(e)!==null}function U(e,t){let n=e.helpers.slugify(t);if(H(n))return n;let r=e.helpers.slugify(e.lorem.word());return H(r)?r:e.string.alpha({casing:`lower`,length:e.number.int({min:4,max:8})})}var qe=class extends S{email(e={}){let{firstName:t,lastName:n,provider:r=this.faker.helpers.arrayElement(this.faker.definitions.internet.free_email),allowSpecialCharacters:i=!1}=e,a=this.username({firstName:t,lastName:n});if(a=a.replaceAll(/[^A-Za-z0-9._+-]+/g,``),a=a.substring(0,50),i){let e=[...`._-`],t=[...".!#$%&'*+-/=?^_`{|}~"];a=a.replace(this.faker.helpers.arrayElement(e),this.faker.helpers.arrayElement(t))}return a=a.replaceAll(/\.{2,}/g,`.`),a=a.replace(/^\./,``),a=a.replace(/\.$/,``),`${a}@${r}`}exampleEmail(e={}){let{firstName:t,lastName:n,allowSpecialCharacters:r=!1}=e,i=this.faker.helpers.arrayElement(this.faker.definitions.internet.example_email);return this.email({firstName:t,lastName:n,provider:i,allowSpecialCharacters:r})}username(e={}){let{firstName:t=this.faker.person.firstName(