UNPKG

openui5-smart-mockserver

Version:

An extended version of UI5 MockServer which generates meaningful mock data.

11 lines (10 loc) 210 kB
var xe=Object.defineProperty;var sr=(s,e,r)=>e in s?xe(s,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[e]=r;var Gr=(s,e)=>{for(var r in e)xe(s,r,{get:e[r],enumerable:!0})};var f=(s,e,r)=>(sr(s,typeof e!="symbol"?e+"":e,r),r);var p=class extends Error{};function Ae(s){let e=Object.getPrototypeOf(s);do{for(let r of Object.getOwnPropertyNames(e))typeof s[r]=="function"&&r!=="constructor"&&(s[r]=s[r].bind(s));e=Object.getPrototypeOf(e)}while(e!==Object.prototype)}var S=class{constructor(e){this.faker=e;Ae(this)}},b=class extends S{constructor(r){super(r);this.faker=r}};var we=(t=>(t.Narrowbody="narrowbody",t.Regional="regional",t.Widebody="widebody",t))(we||{}),or=["0","1","2","3","4","5","6","7","8","9"],cr=["0","O","1","I","L"],lr={regional:20,narrowbody:35,widebody:60},mr={regional:["A","B","C","D"],narrowbody:["A","B","C","D","E","F"],widebody:["A","B","C","D","E","F","G","H","J","K"]},I=class extends b{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(...or),t||a.push(...cr),this.faker.string.alphanumeric({length:6,casing:"upper",exclude:a})}seat(e={}){let{aircraftType:r="narrowbody"}=e,t=lr[r],a=mr[r],n=this.faker.number.int({min:1,max:t}),i=this.faker.helpers.arrayElement(a);return`${n}${i}`}aircraftType(){return this.faker.helpers.enumValue(we)}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 Ee=(n=>(n.SRGB="sRGB",n.DisplayP3="display-p3",n.REC2020="rec2020",n.A98RGB="a98-rgb",n.ProphotoRGB="prophoto-rgb",n))(Ee||{}),Se=(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))(Se||{});function ur(s,e){let{prefix:r,casing:t}=e;switch(t){case"upper":s=s.toUpperCase();break;case"lower":s=s.toLowerCase();break;case"mixed":}return r&&(s=r+s),s}function Ce(s){return s.map(r=>{if(r%1!==0){let a=new ArrayBuffer(4);new DataView(a).setFloat32(0,r);let n=new Uint8Array(a);return Ce([...n]).replace(/ /g,"")}return(r>>>0).toString(2).padStart(8,"0")}).join(" ")}function pr(s,e="rgb",r="sRGB"){let t=a=>Math.round(a*100);switch(e){case"rgba":return`rgba(${s[0]}, ${s[1]}, ${s[2]}, ${s[3]})`;case"color":return`color(${r} ${s[0]} ${s[1]} ${s[2]})`;case"cmyk":return`cmyk(${t(s[0])}%, ${t(s[1])}%, ${t(s[2])}%, ${t(s[3])}%)`;case"hsl":return`hsl(${s[0]}deg ${t(s[1])}% ${t(s[2])}%)`;case"hsla":return`hsl(${s[0]}deg ${t(s[1])}% ${t(s[2])}% / ${t(s[3])})`;case"hwb":return`hwb(${s[0]} ${t(s[1])}% ${t(s[2])}%)`;case"lab":return`lab(${t(s[0])}% ${s[1]} ${s[2]})`;case"lch":return`lch(${t(s[0])}% ${s[1]} ${s[2]})`;case"rgb":default:return`rgb(${s[0]}, ${s[1]}, ${s[2]})`}}function R(s,e,r="rgb",t="sRGB"){switch(e){case"css":return pr(s,r,t);case"binary":return Ce(s);case"decimal":default:return s}}var _=class extends b{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(Se)}cssSupportedSpace(){return this.faker.helpers.enumValue(Ee)}rgb(e={}){let{format:r="hex",includeAlpha:t=!1,prefix:a="#",casing:n="lower"}=e,i,o="rgb";return r==="hex"?(i=this.faker.string.hexadecimal({length:t?8:6,prefix:""}),i=ur(i,{prefix:a,casing:n}),i):(i=Array.from({length:3},()=>this.faker.number.int(255)),t&&(i.push(this.faker.number.float({precision:.01})),o="rgba"),R(i,r,o))}cmyk(e){let r=Array.from({length:4},()=>this.faker.number.float({precision:.01}));return R(r,(e==null?void 0:e.format)||"decimal","cmyk")}hsl(e){let r=[this.faker.number.int(360)];for(let t=0;t<(e!=null&&e.includeAlpha?3:2);t++)r.push(this.faker.number.float({precision:.01}));return R(r,(e==null?void 0:e.format)||"decimal",e!=null&&e.includeAlpha?"hsla":"hsl")}hwb(e){let r=[this.faker.number.int(360)];for(let t=0;t<2;t++)r.push(this.faker.number.float({precision:.01}));return R(r,(e==null?void 0:e.format)||"decimal","hwb")}lab(e){let r=[this.faker.number.float({precision:1e-6})];for(let t=0;t<2;t++)r.push(this.faker.number.float({min:-100,max:100,precision:1e-4}));return R(r,(e==null?void 0:e.format)||"decimal","lab")}lch(e){let r=[this.faker.number.float({precision:1e-6})];for(let t=0;t<2;t++)r.push(this.faker.number.float({max:230,precision:.1}));return R(r,(e==null?void 0:e.format)||"decimal","lch")}colorByCSSColorSpace(e){(e==null?void 0:e.format)==="css"&&!(e!=null&&e.space)&&(e={...e,space:"sRGB"});let r=Array.from({length:3},()=>this.faker.number.float({precision:1e-4}));return R(r,(e==null?void 0:e.format)||"decimal","color",e==null?void 0:e.space)}};var G=()=>{throw new p("You cannot edit the locale data on the faker instance")};function Te(s){let e={};return new Proxy(s,{has(){return!0},get(r,t){return typeof t=="symbol"||t==="nodeType"?r[t]:t in e?e[t]:e[t]=hr(t,r[t])},set:G,deleteProperty:G})}function v(s,...e){if(s===null)throw new p(`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(s===void 0)throw new p(`The locale data for '${e.join(".")}' are missing in this locale. 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 hr(s,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,s,t.toString()),a},set:G,deleteProperty:G})}var Me=(r=>(r.Female="female",r.Male="male",r))(Me||{});function L(s,e,r,{generic:t,female:a,male:n},i){let o;switch(r){case"female":o=a;break;case"male":o=n;break;default:o=t;break}return o==null&&(a!=null&&n!=null?o=s.helpers.arrayElement([a,n]):o=t,v(o,`person.{${i}, female_${i}, male_${i}}`)),e(o)}var U=class extends b{firstName(e){var n;let{first_name:r,female_first_name:t,male_first_name:a}=(n=this.faker.rawDefinitions.person)!=null?n:{};return L(this.faker,this.faker.helpers.arrayElement,e,{generic:r,female:t,male:a},"first_name")}lastName(e){var l;let{last_name:r,female_last_name:t,male_last_name:a,last_name_pattern:n,male_last_name_pattern:i,female_last_name_pattern:o}=(l=this.faker.rawDefinitions.person)!=null?l:{};if(n!=null||i!=null||o!=null){let c=L(this.faker,this.faker.helpers.weightedArrayElement,e,{generic:n,female:o,male:i},"last_name_pattern");return this.faker.helpers.fake(c)}return L(this.faker,this.faker.helpers.arrayElement,e,{generic:r,female:t,male:a},"last_name")}middleName(e){var n;let{middle_name:r,female_middle_name:t,male_middle_name:a}=(n=this.faker.rawDefinitions.person)!=null?n:{};return L(this.faker,this.faker.helpers.arrayElement,e,{generic:r,female:t,male:a},"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(Me)}bio(){let{bio_pattern:e}=this.faker.definitions.person;return this.faker.helpers.fake(e)}prefix(e){var n;let{prefix:r,female_prefix:t,male_prefix:a}=(n=this.faker.rawDefinitions.person)!=null?n:{};return L(this.faker,this.faker.helpers.arrayElement,e,{generic:r,female:t,male:a},"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(){let e=this.faker.definitions.person.title.descriptor;if(e==null)throw new p("No person.title.descriptor definitions available.");return this.faker.helpers.arrayElement(e)}jobArea(){let e=this.faker.definitions.person.title.level;if(e==null)throw new p("No person.title.area definitions available.");return this.faker.helpers.arrayElement(e)}jobType(){let e=this.faker.definitions.person.title.job;if(e==null)throw new p("No person.title.job definitions available.");return this.faker.helpers.arrayElement(e)}zodiacSign(){return this.faker.helpers.arrayElement(this.faker.definitions.person.western_zodiac_sign)}};var be=class{constructor(){f(this,"N",624);f(this,"M",397);f(this,"MATRIX_A",2567483615);f(this,"UPPER_MASK",2147483648);f(this,"LOWER_MASK",2147483647);f(this,"mt",Array.from({length:this.N}));f(this,"mti",this.N+1);f(this,"mag01",[0,this.MATRIX_A])}unsigned32(e){return e<0?(e^this.UPPER_MASK)+this.UPPER_MASK:e}subtraction32(e,r){return e<r?this.unsigned32(4294967296-(r-e)&4294967295):e-r}addition32(e,r){return this.unsigned32(e+r&4294967295)}multiplication32(e,r){let t=0;for(let a=0;a<32;++a)e>>>a&1&&(t=this.addition32(t,this.unsigned32(r<<a)));return t}initGenrand(e){for(this.mt[0]=this.unsigned32(e&4294967295),this.mti=1;this.mti<this.N;this.mti++)this.mt[this.mti]=this.addition32(this.multiplication32(1812433253,this.unsigned32(this.mt[this.mti-1]^this.mt[this.mti-1]>>>30)),this.mti),this.mt[this.mti]=this.unsigned32(this.mt[this.mti]&4294967295)}initByArray(e,r){this.initGenrand(19650218);let t=1,a=0,n=this.N>r?this.N:r;for(;n;n--)this.mt[t]=this.addition32(this.addition32(this.unsigned32(this.mt[t]^this.multiplication32(this.unsigned32(this.mt[t-1]^this.mt[t-1]>>>30),1664525)),e[a]),a),this.mt[t]=this.unsigned32(this.mt[t]&4294967295),t++,a++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1),a>=r&&(a=0);for(n=this.N-1;n;n--)this.mt[t]=this.subtraction32(this.unsigned32(this.mt[t]^this.multiplication32(this.unsigned32(this.mt[t-1]^this.mt[t-1]>>>30),1566083941)),t),this.mt[t]=this.unsigned32(this.mt[t]&4294967295),t++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1);this.mt[0]=2147483648}genrandInt32(){let e;if(this.mti>=this.N){let r;for(this.mti===this.N+1&&this.initGenrand(5489),r=0;r<this.N-this.M;r++)e=this.unsigned32(this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK),this.mt[r]=this.unsigned32(this.mt[r+this.M]^e>>>1^this.mag01[e&1]);for(;r<this.N-1;r++)e=this.unsigned32(this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK),this.mt[r]=this.unsigned32(this.mt[r+(this.M-this.N)]^e>>>1^this.mag01[e&1]);e=this.unsigned32(this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK),this.mt[this.N-1]=this.unsigned32(this.mt[this.M-1]^e>>>1^this.mag01[e&1]),this.mti=0}return e=this.mt[this.mti++],e=this.unsigned32(e^e>>>11),e=this.unsigned32(e^e<<7&2636928640),e=this.unsigned32(e^e<<15&4022730752),e=this.unsigned32(e^e>>>18),e}genrandInt31(){return this.genrandInt32()>>>1}genrandReal1(){return this.genrandInt32()*(1/4294967295)}genrandReal2(){return this.genrandInt32()*(1/4294967296)}genrandReal3(){return(this.genrandInt32()+.5)*(1/4294967296)}genrandRes53(){let e=this.genrandInt32()>>>5,r=this.genrandInt32()>>>6;return(e*67108864+r)*(1/9007199254740992)}};function De(){let s=new be;return s.initGenrand(Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)),{next(){return s.genrandReal2()},seed(e){typeof e=="number"?s.initGenrand(e):Array.isArray(e)&&s.initByArray(e,e.length)}}}function m(s){let e=`[@faker-js/faker]: ${s.deprecated} is deprecated`;s.since&&(e+=` since v${s.since}`),s.until&&(e+=` and will be removed in v${s.until}`),s.proposed&&(e+=`. Please use ${s.proposed} instead`),console.warn(`${e}.`)}var K=class extends S{number(e=99999){m({deprecated:"faker.datatype.number()",proposed:"faker.number.int()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={max:e});let{min:r=0,max:t=r+99999,precision:a=1}=e;return this.faker.number.float({min:r,max:t,precision:a})}float(e={}){m({deprecated:"faker.datatype.float()",proposed:"faker.number.float()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={precision:e});let{min:r=0,max:t=r+99999,precision:a=.01}=e;return this.faker.number.float({min:r,max:t,precision:a})}datetime(e={}){m({deprecated:"faker.datatype.datetime({ min, max })",proposed:"faker.date.between({ from, to }) or faker.date.anytime()",since:"8.0",until:"9.0"});let r=864e13,t=typeof e=="number"?void 0:e.min,a=typeof e=="number"?e:e.max;return(t==null||t<r*-1)&&(t=Date.UTC(1990,0)),(a==null||a>r)&&(a=Date.UTC(2100,0)),this.faker.date.between({from:t,to:a})}string(e={}){m({deprecated:"faker.datatype.string()",proposed:"faker.string.sample()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={length:e});let{length:r=10}=e;return this.faker.string.sample(r)}uuid(){return m({deprecated:"faker.datatype.uuid()",proposed:"faker.string.uuid()",since:"8.0",until:"9.0"}),this.faker.string.uuid()}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}hexadecimal(e={}){return m({deprecated:"faker.datatype.hexadecimal()",proposed:"faker.string.hexadecimal() or faker.number.hex()",since:"8.0",until:"9.0"}),this.faker.string.hexadecimal({...e,casing:e.case})}json(){m({deprecated:"faker.datatype.json()",proposed:"your own function to generate complex objects",since:"8.0",until:"9.0"});let e=["foo","bar","bike","a","b","name","prop"],r={};for(let t of e)r[t]=this.boolean()?this.faker.string.sample():this.faker.number.int();return JSON.stringify(r)}array(e=10){return m({deprecated:"faker.datatype.array()",proposed:"your own function to build complex arrays",since:"8.0",until:"9.0"}),this.faker.helpers.multiple(()=>this.boolean()?this.faker.string.sample():this.faker.number.int(),{count:e})}bigInt(e){return m({deprecated:"faker.datatype.bigInt()",proposed:"faker.number.bigInt()",since:"8.0",until:"9.0"}),this.faker.number.bigInt(e)}};function N(s,e){return s==null?e():(s=new Date(s),Number.isNaN(s.valueOf())&&(s=e()),s)}var $=class extends S{anytime(e={}){let{refDate:r}=e,t=N(r,this.faker.defaultRefDate);return this.between({from:new Date(t.getTime()-1e3*60*60*24*365),to:new Date(t.getTime()+1e3*60*60*24*365)})}past(e={},r){typeof e=="number"&&(m({deprecated:"faker.date.past(years, refDate)",proposed:"faker.date.past({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:t=1,refDate:a=r}=e;if(t<=0)throw new p("Years must be greater than 0.");let n=N(a,this.faker.defaultRefDate),i={min:1e3,max:t*365*24*3600*1e3},o=n.getTime();return o-=this.faker.number.int(i),n.setTime(o),n}future(e={},r){typeof e=="number"&&(m({deprecated:"faker.date.future(years, refDate)",proposed:"faker.date.future({ years, refDate })",since:"8.0",until:"9.0"}),e={years:e});let{years:t=1,refDate:a=r}=e;if(t<=0)throw new p("Years must be greater than 0.");let n=N(a,this.faker.defaultRefDate),i={min:1e3,max:t*365*24*3600*1e3},o=n.getTime();return o+=this.faker.number.int(i),n.setTime(o),n}between(e,r){(e instanceof Date||typeof e!="object")&&(m({deprecated:"faker.date.between(from, to)",proposed:"faker.date.between({ from, to })",since:"8.0",until:"9.0"}),e={from:e,to:r!=null?r:e});let{from:t,to:a}=e,n=N(t,this.faker.defaultRefDate).getTime(),i=N(a,this.faker.defaultRefDate).getTime(),o=this.faker.number.int(i-n);return new Date(n+o)}betweens(e,r,t=3){(e instanceof Date||typeof e!="object")&&(m({deprecated:"faker.date.betweens(from, to, count)",proposed:"faker.date.betweens({ from, to, count })",since:"8.0",until:"9.0"}),e={from:e,to:r!=null?r:e,count:t});let{from:a,to:n,count:i=3}=e;return this.faker.helpers.multiple(()=>this.between({from:a,to:n}),{count:i}).sort((o,l)=>o.getTime()-l.getTime())}recent(e={},r){typeof e=="number"&&(m({deprecated:"faker.date.recent(days, refDate)",proposed:"faker.date.recent({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:t=1,refDate:a=r}=e;if(t<=0)throw new p("Days must be greater than 0.");let n=N(a,this.faker.defaultRefDate),i={min:1e3,max:t*24*3600*1e3},o=n.getTime();return o-=this.faker.number.int(i),n.setTime(o),n}soon(e={},r){typeof e=="number"&&(m({deprecated:"faker.date.soon(days, refDate)",proposed:"faker.date.soon({ days, refDate })",since:"8.0",until:"9.0"}),e={days:e});let{days:t=1,refDate:a=r}=e;if(t<=0)throw new p("Days must be greater than 0.");let n=N(a,this.faker.defaultRefDate),i={min:1e3,max:t*24*3600*1e3},o=n.getTime();return o+=this.faker.number.int(i),n.setTime(o),n}birthdate(e={}){var o,l,c,u;let r=e.mode==="age"?"age":"year",t=N(e.refDate,this.faker.defaultRefDate),a=t.getUTCFullYear(),n,i;if(r==="age"?(n=new Date(t).setUTCFullYear(a-((o=e.max)!=null?o:80)-1),i=new Date(t).setUTCFullYear(a-((l=e.min)!=null?l:18))):(n=new Date(Date.UTC(0,0,2)).setUTCFullYear((c=e.min)!=null?c:a-80),i=new Date(Date.UTC(0,11,30)).setUTCFullYear((u=e.max)!=null?u:a-19)),i<n)throw new p(`Max ${e.max} should be larger than or equal to min ${e.min}.`);return new Date(this.faker.number.int({min:n,max:i}))}},j=class extends ${constructor(r){super(r);this.faker=r}month(r={}){let{abbr:t,abbreviated:a=t!=null?t:!1,context:n=!1}=r;t!=null&&m({deprecated:"faker.date.month({ abbr })",proposed:"faker.date.month({ abbreviated })",since:"8.0",until:"9.0"});let i=this.faker.definitions.date.month,o;a?o=n&&i.abbr_context!=null?"abbr_context":"abbr":o=n&&i.wide_context!=null?"wide_context":"wide";let l=i[o];return v(l,"date.month",o),this.faker.helpers.arrayElement(l)}weekday(r={}){let{abbr:t,abbreviated:a=t!=null?t:!1,context:n=!1}=r;t!=null&&m({deprecated:"faker.date.weekday({ abbr })",proposed:"faker.date.weekday({ abbreviated })",since:"8.0",until:"9.0"});let i=this.faker.definitions.date.weekday,o;a?o=n&&i.abbr_context!=null?"abbr_context":"abbr":o=n&&i.wide_context!=null?"wide_context":"wide";let l=i[o];return v(l,"date.weekday",o),this.faker.helpers.arrayElement(l)}};function Ne(s){let e=fr(s.replace(/L?$/,"0"));return e===0?0:10-e}function fr(s){s=s.replace(/[\s-]/g,"");let e=0,r=!1;for(let t=s.length-1;t>=0;t--){let a=Number.parseInt(s[t]);r&&(a*=2,a>9&&(a=a%10+1)),e+=a,r=!r}return e%10}function br(s,e){return s[e]===void 0?-1:0}function Re(s,e,r,t,a){throw console.error("Error",r),console.log(`Found ${Object.keys(t).length} unique entries before throwing error. retried: ${a} total time: ${e-s}ms`),new p(`${r} for uniqueness check. May not be able to generate any more unique values with current settings. Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}function de(s,e,r={}){let t=Date.now(),{startTime:a=Date.now(),maxTime:n=50,maxRetries:i=50,currentIterations:o=0,compare:l=br,store:c={}}=r,{exclude:u=[]}=r;if(r.currentIterations=o,Array.isArray(u)||(u=[u]),t-a>=n)return Re(a,t,`Exceeded maxTime: ${n}`,c,o);if(o>=i)return Re(a,t,`Exceeded maxRetries: ${i}`,c,o);let h=s(...e);return l(c,h)===-1&&!u.includes(h)?(c[h]=h,r.currentIterations=0,h):(r.currentIterations++,de(s,e,{...r,startTime:a,maxTime:n,maxRetries:i,compare:l,exclude:u}))}function ve(s,e,r,t){let a=1;if(e)switch(e){case"?":{a=s.datatype.boolean()?0:1;break}case"*":{let n=1;for(;s.datatype.boolean();)n*=2;a=s.number.int({min:0,max:n});break}case"+":{let n=1;for(;s.datatype.boolean();)n*=2;a=s.number.int({min:1,max:n});break}default:throw new p("Unknown quantifier symbol provided.")}else r!=null&&t!=null?a=s.number.int({min:Number.parseInt(r),max:Number.parseInt(t)}):r!=null&&t==null&&(a=Number.parseInt(r));return a}function Le(s,e=""){let r=/(.)\{(\d+),(\d+)\}/,t=/(.)\{(\d+)\}/,a=/\[(\d+)-(\d+)\]/,n,i,o,l,c=r.exec(e);for(;c!=null;)n=Number.parseInt(c[2]),i=Number.parseInt(c[3]),n>i&&(o=i,i=n,n=o),l=s.number.int({min:n,max:i}),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]),i=Number.parseInt(c[2]),n>i&&(o=i,i=n,n=o),e=e.slice(0,c.index)+s.number.int({min:n,max:i}).toString()+e.slice(c.index+c[0].length),c=a.exec(e);return e}var P=class extends S{constructor(){super(...arguments);f(this,"uniqueStore",{})}slugify(r=""){return r.normalize("NFKD").replace(/[\u0300-\u036F]/g,"").replace(/ /g,"-").replace(/[^\w.-]+/g,"")}replaceSymbolWithNumber(r="",t="#"){let a="";for(let n=0;n<r.length;n++)r.charAt(n)===t?a+=this.faker.number.int(9):r.charAt(n)==="!"?a+=this.faker.number.int({min:2,max:9}):a+=r.charAt(n);return a}replaceSymbols(r=""){let t=["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"],a="";for(let n=0;n<r.length;n++)r.charAt(n)==="#"?a+=this.faker.number.int(9):r.charAt(n)==="?"?a+=this.arrayElement(t):r.charAt(n)==="*"?a+=this.faker.datatype.boolean()?this.arrayElement(t):this.faker.number.int(9):a+=r.charAt(n);return a}replaceCreditCardSymbols(r="6453-####-####-####-###L",t="#"){r=Le(this.faker,r),r=this.replaceSymbolWithNumber(r,t);let a=Ne(r);return r.replace("L",String(a))}regexpStyleStringParse(r=""){return m({deprecated:"faker.helpers.regexpStyleStringParse",proposed:"faker.helpers.fromRegExp",since:"8.1",until:"9.0"}),Le(this.faker,r)}fromRegExp(r){var g,y;let t=!1;r instanceof RegExp&&(t=r.flags.includes("i"),r=r.toString(),r=(y=(g=/\/(.+?)\//.exec(r))==null?void 0:g[1])!=null?y:"");let a,n,i,o=/([.A-Za-z0-9])(?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,l=o.exec(r);for(;l!=null;){let A=l[2],x=l[3],w=l[4];i=ve(this.faker,w,A,x),r=r.slice(0,l.index)+l[1].repeat(i)+r.slice(l.index+l[0].length),l=o.exec(r)}let c=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,u=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:,(\d+)|)\}|(\?|\*|\+)|)/;for(l=u.exec(r);l!=null;){let A=l[1]==="^",x=l[2]==="-",w=l[4],ar=l[5],nr=l[6],E=[],F=l[3],D=c.exec(F);for(x&&E.push(45);D!=null;){if(D[0].includes("-")){let C=D[0].split("-").map(k=>k.charCodeAt(0));if(a=C[0],n=C[1],a>n)throw new p("Character range provided is out of order.");for(let k=a;k<=n;k++)if(t&&Number.isNaN(Number(String.fromCharCode(k)))){let ke=String.fromCharCode(k);E.push(ke.toUpperCase().charCodeAt(0),ke.toLowerCase().charCodeAt(0))}else E.push(k)}else t&&Number.isNaN(Number(D[0]))?E.push(D[0].toUpperCase().charCodeAt(0),D[0].toLowerCase().charCodeAt(0)):E.push(D[0].charCodeAt(0));F=F.substring(D[0].length),D=c.exec(F)}if(i=ve(this.faker,nr,w,ar),A){let C=-1;for(let k=48;k<=57;k++){if(C=E.indexOf(k),C>-1){E.splice(C,1);continue}E.push(k)}for(let k=65;k<=90;k++){if(C=E.indexOf(k),C>-1){E.splice(C,1);continue}E.push(k)}for(let k=97;k<=122;k++){if(C=E.indexOf(k),C>-1){E.splice(C,1);continue}E.push(k)}}let ir=this.multiple(()=>String.fromCharCode(this.arrayElement(E)),{count:i}).join("");r=r.slice(0,l.index)+ir+r.slice(l.index+l[0].length),l=u.exec(r)}let h=/(.)\{(\d+),(\d+)\}/;for(l=h.exec(r);l!=null;){if(a=Number.parseInt(l[2]),n=Number.parseInt(l[3]),a>n)throw new p("Numbers out of order in {} quantifier.");i=this.faker.number.int({min:a,max:n}),r=r.slice(0,l.index)+l[1].repeat(i)+r.slice(l.index+l[0].length),l=h.exec(r)}let d=/(.)\{(\d+)\}/;for(l=d.exec(r);l!=null;)i=Number.parseInt(l[2]),r=r.slice(0,l.index)+l[1].repeat(i)+r.slice(l.index+l[0].length),l=d.exec(r);return r}shuffle(r,t={}){let{inplace:a=!1}=t;a||(r=[...r]);for(let n=r.length-1;n>0;--n){let i=this.faker.number.int(n);[r[n],r[i]]=[r[i],r[n]]}return r}uniqueArray(r,t){if(Array.isArray(r)){let i=[...new Set(r)];return this.shuffle(i).splice(0,t)}let a=new Set;try{if(typeof r=="function"){let n=1e3*t,i=0;for(;a.size<t&&i<n;)a.add(r()),i++}}catch{}return[...a]}mustache(r,t){if(r==null)return"";for(let a in t){let n=new RegExp(`{{${a}}}`,"g"),i=t[a];typeof i=="string"&&(i=i.replace(/\$/g,"$$$$")),r=r.replace(n,i)}return r}maybe(r,t={}){if(this.faker.datatype.boolean(t))return r()}objectKey(r){let t=Object.keys(r);return this.arrayElement(t)}objectValue(r){let t=this.faker.helpers.objectKey(r);return r[t]}objectEntry(r){let t=this.faker.helpers.objectKey(r);return[t,r[t]]}arrayElement(r){if(r==null)throw new p("Calling `faker.helpers.arrayElement()` without arguments is no longer supported.");if(r.length===0)throw new p("Cannot get value from empty dataset.");let t=r.length>1?this.faker.number.int({max:r.length-1}):0;return r[t]}weightedArrayElement(r){if(r.length===0)throw new p("weightedArrayElement expects an array with at least one element");if(!r.every(i=>i.weight>0))throw new p("weightedArrayElement expects an array of { weight, value } objects where weight is a positive number");let t=r.reduce((i,{weight:o})=>i+o,0),a=this.faker.number.float({min:0,max:t,precision:1e-9}),n=0;for(let{weight:i,value:o}of r)if(n+=i,a<n)return o;return r[r.length-1].value}arrayElements(r,t){if(r==null)throw new p("Calling `faker.helpers.arrayElements()` without arguments is no longer supported.");if(r.length===0)return[];let a=this.rangeToNumber(t!=null?t:{min:1,max:r.length});if(a>=r.length)return this.shuffle(r);if(a<=0)return[];let n=[...r],i=r.length,o=i-a,l,c;for(;i-- >o;)c=this.faker.number.int(i),l=n[c],n[c]=n[i],n[i]=l;return n.slice(o)}enumValue(r){let t=Object.keys(r).filter(n=>Number.isNaN(Number(n))),a=this.arrayElement(t);return r[a]}rangeToNumber(r){return typeof r=="number"?r:this.faker.number.int(r)}unique(r,t=[],a={}){m({deprecated:"faker.helpers.unique",proposed:"https://github.com/faker-js/faker/issues/1785#issuecomment-1407773744",since:"8.0",until:"9.0"});let{maxTime:n=50,maxRetries:i=50,exclude:o=[],store:l=this.uniqueStore}=a;return de(r,t,{...a,startTime:Date.now(),maxTime:n,maxRetries:i,currentIterations:0,exclude:o,store:l})}multiple(r,t={}){var n;let a=this.rangeToNumber((n=t.count)!=null?n:3);return a<=0?[]:Array.from({length:a},r)}},O=class extends P{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 i=r.substring(t+2,a+2).replace("}}","").replace("{{",""),o=/\(([^)]*)\)/,l=o.exec(i),c="";l&&(i=i.replace(o,""),c=l[1]);let u=i.split("."),h=this.faker,d=this.faker.rawDefinitions;for(let w of u)h=h==null?void 0:h[w],d=d==null?void 0:d[w];let g;if(typeof h=="function")g=h;else if(Array.isArray(d))g=()=>this.faker.helpers.arrayElement(d);else throw new p(`Invalid module method or definition: ${i} - faker.${i} is not a function - faker.definitions.${i} is not an array`);g=g.bind(this);let y;try{y=JSON.parse(`[${c}]`)}catch{y=[c]}let A=String(g(...y)),x=r.substring(0,t)+A+r.substring(a+2);return this.fake(x)}};var z=class extends S{int(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=Number.MAX_SAFE_INTEGER}=e,a=Math.ceil(r),n=Math.floor(t);if(a===n)return a;if(n<a)throw t>=r?new p(`No integer value between ${r} and ${t} found.`):new p(`Max ${t} should be greater than min ${r}.`);let o=this.faker._randomizer.next();return Math.floor(o*(n+1-a)+a)}float(e={}){typeof e=="number"&&(e={max:e});let{min:r=0,max:t=1,precision:a}=e;if(t===r)return r;if(t<r)throw new p(`Max ${t} should be greater than min ${r}.`);if(a!==void 0){if(a<=0)throw new p("Precision should be greater than 0.");let o=1/a;return this.int({min:r*o,max:t*o})/o}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={}){var i,o;(typeof e=="bigint"||typeof e=="number"||typeof e=="string"||typeof e=="boolean")&&(e={max:e});let r=BigInt((i=e.min)!=null?i:0),t=BigInt((o=e.max)!=null?o:r+BigInt(999999999999999));if(t===r)return r;if(t<r)throw new p(`Max ${t} should be larger then min ${r}.`);let a=t-r,n=BigInt(this.faker.string.numeric({length:a.toString(10).length,allowLeadingZeros:!0}))%(a+BigInt(1));return r+n}};var H=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"],V=[..."abcdefghijklmnopqrstuvwxyz"],$e=[..."0123456789"],W=class extends S{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 p("Unable to generate string: No characters to select from.");return this.faker.helpers.multiple(()=>this.faker.helpers.arrayElement(e),{count:r}).join("")}alpha(e={}){var i;typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber((i=e.length)!=null?i: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=[...H];break;case"lower":n=[...V];break;case"mixed":default:n=[...V,...H];break}return n=n.filter(o=>!a.includes(o)),this.fromCharacters(n,r)}alphanumeric(e={}){var i;typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber((i=e.length)!=null?i:1);if(r<=0)return"";let{casing:t="mixed"}=e,{exclude:a=[]}=e;typeof a=="string"&&(a=[...a]);let n=[...$e];switch(t){case"upper":n.push(...H);break;case"lower":n.push(...V);break;case"mixed":default:n.push(...V,...H);break}return n=n.filter(o=>!a.includes(o)),this.fromCharacters(n,r)}binary(e={}){var a;let{prefix:r="0b"}=e,t=r;return t+=this.fromCharacters(["0","1"],(a=e.length)!=null?a:1),t}octal(e={}){var a;let{prefix:r="0o"}=e,t=r;return t+=this.fromCharacters(["0","1","2","3","4","5","6","7"],(a=e.length)!=null?a:1),t}hexadecimal(e={}){var i;let{casing:r="mixed",prefix:t="0x"}=e,a=this.faker.helpers.rangeToNumber((i=e.length)!=null?i: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={}){var o;typeof e=="number"&&(e={length:e});let r=this.faker.helpers.rangeToNumber((o=e.length)!=null?o:1);if(r<=0)return"";let{allowLeadingZeros:t=!0}=e,{exclude:a=[]}=e;typeof a=="string"&&(a=[...a]);let n=$e.filter(l=>!a.includes(l));if(n.length===0||n.length===1&&!t&&n[0]==="0")throw new p("Unable to generate numeric string, because all possible digits are excluded.");let i="";return!t&&!a.includes("0")&&(i+=this.faker.helpers.arrayElement(n.filter(l=>l!=="0"))),i+=this.fromCharacters(n,r-i.length),i}sample(e=10){e=this.faker.helpers.rangeToNumber(e);let r={min:33,max:125},t="";for(;t.length<e;)t+=String.fromCharCode(this.faker.number.int(r));return t}uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/x/g,()=>this.faker.number.hex({min:0,max:15})).replace(/y/g,()=>this.faker.number.hex({min:8,max:11}))}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 B=class{constructor(e={}){f(this,"_defaultRefDate",()=>new Date);f(this,"_randomizer");f(this,"datatype",new K(this));f(this,"date",new $(this));f(this,"helpers",new P(this));f(this,"number",new z(this));f(this,"string",new W(this));let{randomizer:r=De()}=e;this._randomizer=r}get defaultRefDate(){return this._defaultRefDate}setDefaultRefDate(e=()=>new Date){typeof e=="function"?this._defaultRefDate=e:this._defaultRefDate=()=>new Date(e)}seed(e=Math.ceil(Math.random()*Number.MAX_SAFE_INTEGER)){return this._randomizer.seed(e),e}},Lt=new B;function Pe(s){let e={};for(let r of s)for(let t in r){let a=r[t];e[t]===void 0?e[t]={...a}:e[t]={...a,...e[t]}}return e}var Y=class extends b{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)}};var gr={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]]},Z=class extends b{department(){return this.faker.helpers.arrayElement(this.faker.definitions.commerce.department)}productName(){return`${this.productAdjective()} ${this.productMaterial()} ${this.product()}`}price(e={},r=1e3,t=2,a=""){typeof e=="number"&&(m({deprecated:"faker.commerce.price(min, max, dec, symbol)",proposed:"faker.commerce.price({ min, max, dec, symbol })",since:"8.0",until:"9.0"}),e={min:e,dec:t,max:r,symbol:a});let{dec:n=2,max:i=1e3,min:o=1,symbol:l=""}=e;if(o<0||i<0)return`${l}0`;let c=this.faker.number.int({min:o,max:i});return l+c.toFixed(n)}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.arrayElement(this.faker.definitions.commerce.product_description)}isbn(e={}){var A;typeof e=="number"&&(e={variant:e});let{variant:r=13,separator:t="-"}=e,a="978",[n,i]=this.faker.helpers.objectEntry(gr),o=this.faker.string.numeric(8),l=Number.parseInt(o.slice(0,-1)),c=(A=i.find(([x])=>l<=x))==null?void 0:A[1];if(!c)throw new p(`Unable to find a registrant length for the group ${n}`);let u=o.slice(0,c),h=o.slice(c),d=[a,n,u,h];r===10&&d.shift();let g=d.join(""),y=0;for(let x=0;x<r-1;x++){let w=r===10?x+1:x%2?3:1;y+=w*Number.parseInt(g[x])}return y=r===10?y%11:(10-y%10)%10,d.push(y===10?"X":y.toString()),d.join(t)}};var J=class extends b{suffixes(){return m({deprecated:"faker.company.suffixes",proposed:"faker.company.name",since:"8.0",until:"9.0"}),[...this.faker.definitions.company.suffix]}name(){return this.faker.helpers.fake(this.faker.definitions.company.name_pattern)}companySuffix(){return m({deprecated:"faker.company.companySuffix",proposed:"faker.company.name",since:"8.0",until:"9.0"}),this.faker.helpers.arrayElement(this.suffixes())}catchPhrase(){return[this.catchPhraseAdjective(),this.catchPhraseDescriptor(),this.catchPhraseNoun()].join(" ")}bs(){return m({deprecated:"faker.company.bs",proposed:"faker.company.buzzPhrase",since:"8.0",until:"9.0"}),this.buzzPhrase()}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)}bsAdjective(){return m({deprecated:"faker.company.bsAdjective",proposed:"faker.company.buzzAdjective",since:"8.0",until:"9.0"}),this.buzzAdjective()}buzzAdjective(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_adjective)}bsBuzz(){return m({deprecated:"faker.company.bsBuzz",proposed:"faker.company.buzzVerb",since:"8.0",until:"9.0"}),this.buzzVerb()}buzzVerb(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_verb)}bsNoun(){return m({deprecated:"faker.company.bsNoun",proposed:"faker.company.buzzNoun",since:"8.0",until:"9.0"}),this.buzzNoun()}buzzNoun(){return this.faker.helpers.arrayElement(this.faker.definitions.company.buzz_noun)}};var X=class extends b{column(){return this.faker.helpers.arrayElement(this.faker.definitions.database.column)}type(){return this.faker.helpers.arrayElement(this.faker.definitions.database.type)}collation(){return this.faker.helpers.arrayElement(this.faker.definitions.database.collation)}engine(){return this.faker.helpers.arrayElement(this.faker.definitions.database.engine)}mongodbObjectId(){return this.faker.string.hexadecimal({length:24,casing:"lower",prefix:""})}};var yr={alpha:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],formats:[{country:"AL",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"ALkk bbbs sssx cccc cccc cccc cccc"},{country:"AD",total:24,bban:[{type:"n",count:8},{type:"c",count:12}],format:"ADkk bbbb ssss cccc cccc cccc"},{country:"AT",total:20,bban:[{type:"n",count:5},{type:"n",count:11}],format:"ATkk bbbb bccc cccc cccc"},{country:"AZ",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"AZkk bbbb cccc cccc cccc cccc cccc"},{country:"BH",total:22,bban:[{type:"a",count:4},{type:"c",count:14}],format:"BHkk bbbb cccc cccc cccc cc"},{country:"BE",total:16,bban:[{type:"n",count:3},{type:"n",count:9}],format:"BEkk bbbc cccc ccxx"},{country:"BA",total:20,bban:[{type:"n",count:6},{type:"n",count:10}],format:"BAkk bbbs sscc cccc ccxx"},{country:"BR",total:29,bban:[{type:"n",count:13},{type:"n",count:10},{type:"a",count:1},{type:"c",count:1}],format:"BRkk bbbb bbbb ssss sccc cccc ccct n"},{country:"BG",total:22,bban:[{type:"a",count:4},{type:"n",count:6},{type:"c",count:8}],format:"BGkk bbbb ssss ddcc cccc cc"},{country:"CR",total:22,bban:[{type:"n",count:1},{type:"n",count:3},{type:"n",count:14}],format:"CRkk xbbb cccc cccc cccc cc"},{country:"HR",total:21,bban:[{type:"n",count:7},{type:"n",count:10}],format:"HRkk bbbb bbbc cccc cccc c"},{country:"CY",total:28,bban:[{type:"n",count:8},{type:"c",count:16}],format:"CYkk bbbs ssss cccc cccc cccc cccc"},{country:"CZ",total:24,bban:[{type:"n",count:10},{type:"n",count:10}],format:"CZkk bbbb ssss sscc cccc cccc"},{country:"DK",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"DKkk bbbb cccc cccc cc"},{country:"DO",total:28,bban:[{type:"a",count:4},{type:"n",count:20}],format:"DOkk bbbb cccc cccc cccc cccc cccc"},{country:"TL",total:23,bban:[{type:"n",count:3},{type:"n",count:16}],format:"TLkk bbbc cccc cccc cccc cxx"},{country:"EE",total:20,bban:[{type:"n",count:4},{type:"n",count:12}],format:"EEkk bbss cccc cccc cccx"},{country:"FO",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"FOkk bbbb cccc cccc cx"},{country:"FI",total:18,bban:[{type:"n",count:6},{type:"n",count:8}],format:"FIkk bbbb bbcc cccc cx"},{country:"FR",total:27,bban:[{type:"n",count:10},{type:"c",count:11},{type:"n",count:2}],format:"FRkk bbbb bggg ggcc cccc cccc cxx"},{country:"GE",total:22,bban:[{type:"a",count:2},{type:"n",count:16}],format:"GEkk bbcc cccc cccc cccc cc"},{country:"DE",total:22,bban:[{type:"n",count:8},{type:"n",count:10}],format:"DEkk bbbb bbbb cccc cccc cc"},{country:"GI",total:23,bban:[{type:"a",count:4},{type:"c",count:15}],format:"GIkk bbbb cccc cccc cccc ccc"},{country:"GR",total:27,bban:[{type:"n",count:7},{type:"c",count:16}],format:"GRkk bbbs sssc cccc cccc cccc ccc"},{country:"GL",total:18,bban:[{type:"n",count:4},{type:"n",count:10}],format:"GLkk bbbb cccc cccc cc"},{country:"GT",total:28,bban:[{type:"c",count:4},{type:"c",count:4},{type:"c",count:16}],format:"GTkk bbbb mmtt cccc cccc cccc cccc"},{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:"c",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:"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:"c",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:"c",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"],mod97:s=>{let e=0;for(let r of s)e=(e*10+ +r)%97;return e},pattern10:["01","02","03","04","05","06","07","08","09"],pattern100:["001","002","003","004","005","006","007","008","009"],toDigitString:s=>s.replace(/[A-Z]/gi,e=>String(e.toUpperCase().charCodeAt(0)-55))},T=yr;function kr(s){let e="";for(let r=0;r<s.length;r+=4)e+=`${s.substring(r,r+4)} `;return e.trimEnd()}var Q=class extends b{account(e){return m({deprecated:"faker.finance.account",proposed:"faker.finance.accountNumber",since:"8.0",until:"9.0"}),this.accountNumber(e)}accountNumber(e={}){typeof e=="number"&&(e={length:e});let{length:r=8}=e;return this.faker.string.numeric({length:r,allowLeadingZeros:!0})}accountName(){return[this.faker.helpers.arrayElement(this.faker.definitions.finance.account_type),"Account"].join(" ")}routingNumber(){let e=this.faker.string.numeric({length:8,allowLeadingZeros:!0}),r=0;for(let t=0;t<e.length;t+=3)r+=Number(e[t])*3,r+=Number(e[t+1])*7,r+=Number(e[t+2])||0;return`${e}${Math.ceil(r/10)*10-r}`}mask(e,r,t){return m({deprecated:"faker.finance.mask",proposed:"faker.finance.maskedNumber",since:"8.0",until:"9.0"}),this.maskedNumber({length:e,parens:r,ellipsis:t})}maskedNumber(e={}){typeof e=="number"&&(e={length:e});let{ellipsis:r=!0,length:t=4,parens:a=!0}=e,n=this.faker.string.numeric({length:t});return r&&(n=`...${n}`),a&&(n=`(${n})`),n}amount(e={},r=1e3,t=2,a="",n=!1){typeof e=="number"&&(e={min:e});let{autoFormat:i=n,dec:o=t,max:l=r,min:c=0,symbol:u=a}=e,h=this.faker.number.float({max:l,min:c,precision:10**-o}),d=i?h.toLocaleString(void 0,{minimumFractionDigits:o}):h.toFixed(o);return u+d}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}bitcoinAddress(){let e=this.faker.number.int({min:25,max:39}),r=this.faker.helpers.arrayElement(["1","3"]);return r+=this.faker.string.alphanumeric({length:e,casing:"mixed",exclude:"0OIl"}),r}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:r=""}=e,t,a=this.faker.definitions.finance.credit_card,n=r.toLowerCase();if(n in a)t=this.faker.helpers.arrayElement(a[n]);else if(r.includes("#"))t=r;else{let i=this.faker.helpers.objectValue(a);t=this.faker.helpers.arrayElement(i)}return t=t.replace(/\//g,""),this.faker.helpers.replaceCreditCardSymbols(t)}creditCardCVV(){return this.faker.string.numeric({length:3,allowLeadingZeros:!0})}creditCardIssuer(){return this.faker.helpers.objectKey(this.faker.definitions.finance.credit_card)}pin(e={}){typeof e=="number"&&(e={length:e});let{length:r=4}=e;if(r<1)throw new p("minimum length is 1");return this.faker.string.numeric({length:r,allowLeadingZeros:!0})}ethereumAddress(){return this.faker.string.hexadecimal({length:40,casing:"lower"})}iban(e={},r){typeof e=="boolean"&&(e={formatted:e});let{countryCode:t=r,formatted:a=!1}=e,n=t?T.f