"use strict";var m=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var o=(i,e)=>{for(var r in e)m(i,r,{get:e[r],enumerable:!0})},d=(i,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!f.call(i,n)&&n!==r&&m(i,n,{get:()=>e[n],enumerable:!(t=b(e,n))||t.enumerable});return i};var p=i=>d(m({},"__esModule",{value:!0}),i);var c={};o(c,{DatatypeModule:()=>l});module.exports=p(c);var a=require("../../internal/deprecated"),u=require("../../internal/module-base");class l extends u.SimpleModuleBase{number(e=99999){(0,a.deprecated)({deprecated:"faker.datatype.number()",proposed:"faker.number.int()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={max:e});const{min:r=0,max:t=r+99999,precision:n=1}=e;return this.faker.number.float({min:r,max:t,precision:n})}float(e={}){(0,a.deprecated)({deprecated:"faker.datatype.float()",proposed:"faker.number.float()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={precision:e});const{min:r=0,max:t=r+99999,precision:n=.01}=e;return this.faker.number.float({min:r,max:t,precision:n})}datetime(e={}){(0,a.deprecated)({deprecated:"faker.datatype.datetime({ min, max })",proposed:"faker.date.between({ from, to }) or faker.date.anytime()",since:"8.0",until:"9.0"});const r=864e13;let t=typeof e=="number"?void 0:e.min,n=typeof e=="number"?e:e.max;return(t==null||t<r*-1)&&(t=Date.UTC(1990,0)),(n==null||n>r)&&(n=Date.UTC(2100,0)),this.faker.date.between({from:t,to:n})}string(e={}){(0,a.deprecated)({deprecated:"faker.datatype.string()",proposed:"faker.string.sample()",since:"8.0",until:"9.0"}),typeof e=="number"&&(e={length:e});const{length:r=10}=e;return this.faker.string.sample(r)}uuid(){return(0,a.deprecated)({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});const{probability:r=.5}=e;return r<=0?!1:r>=1?!0:this.faker.number.float()<r}hexadecimal(e={}){return(0,a.deprecated)({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(){(0,a.deprecated)({deprecated:"faker.datatype.json()",proposed:"your own function to generate complex objects",since:"8.0",until:"9.0"});const e=["foo","bar","bike","a","b","name","prop"],r={};for(const t of e)r[t]=this.boolean()?this.faker.string.sample():this.faker.number.int();return JSON.stringify(r)}array(e=10){return(0,a.deprecated)({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(0,a.deprecated)({deprecated:"faker.datatype.bigInt()",proposed:"faker.number.bigInt()",since:"8.0",until:"9.0"}),this.faker.number.bigInt(e)}}0&&(module.exports={DatatypeModule});
