@partyxjimmy/client
Version:
Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.
13 lines (12 loc) • 173 kB
JavaScript
"use strict";var $a=Object.create;var pr=Object.defineProperty;var qa=Object.getOwnPropertyDescriptor;var ja=Object.getOwnPropertyNames;var Ua=Object.getPrototypeOf,Ba=Object.prototype.hasOwnProperty;var ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yt=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},xi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ja(t))!Ba.call(e,i)&&i!==r&&pr(e,i,{get:()=>t[i],enumerable:!(n=qa(t,i))||n.enumerable});return e};var B=(e,t,r)=>(r=e!=null?$a(Ua(e)):{},xi(t||!e||!e.__esModule?pr(r,"default",{value:e,enumerable:!0}):r,e)),Qa=e=>xi(pr({},"__esModule",{value:!0}),e);var Mi=ue((lm,ml)=>{ml.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Vi=ue((um,xe)=>{"use strict";var wn=require("fs"),En=require("path"),dl=require("os"),fl=require("crypto"),gl=Mi(),bn=gl.version,hl=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function yl(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
`);let n;for(;(n=hl.exec(r))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
`),o=o.replace(/\\r/g,"\r")),t[i]=o}return t}function wl(e){let t=Li(e),r=L.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=Fi(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=xl(r,a);o=L.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return L.parse(o)}function El(e){console.log(`[dotenv@${bn}][INFO] ${e}`)}function bl(e){console.log(`[dotenv@${bn}][WARN] ${e}`)}function dr(e){console.log(`[dotenv@${bn}][DEBUG] ${e}`)}function Fi(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function xl(e,t){let r;try{r=new URL(t)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let n=r.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=r.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=e.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function Li(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)wn.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=En.resolve(process.cwd(),".env.vault");return wn.existsSync(t)?t:null}function _i(e){return e[0]==="~"?En.join(dl.homedir(),e.slice(1)):e}function Pl(e){El("Loading env from encrypted .env.vault");let t=L._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),L.populate(r,t,e),{parsed:t}}function vl(e){let t=En.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&dr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[_i(e.path)];else{i=[];for(let l of e.path)i.push(_i(l))}let o,s={};for(let l of i)try{let u=L.parse(wn.readFileSync(l,{encoding:r}));L.populate(s,u,e)}catch(u){n&&dr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),L.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function Tl(e){if(Fi(e).length===0)return L.configDotenv(e);let t=Li(e);return t?L._configVault(e):(bl(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),L.configDotenv(e))}function Cl(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=fl.createDecipheriv("aes-256-gcm",r,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||l){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw s}}function Al(e,t,r={}){let n=!!(r&&r.debug),i=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(i===!0&&(e[o]=t[o]),n&&dr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var L={configDotenv:vl,_configVault:Pl,_parseVault:wl,config:Tl,decrypt:Cl,parse:yl,populate:Al};xe.exports.configDotenv=L.configDotenv;xe.exports._configVault=L._configVault;xe.exports._parseVault=L._parseVault;xe.exports.config=L.config;xe.exports.decrypt=L.decrypt;xe.exports.parse=L.parse;xe.exports.populate=L.populate;xe.exports=L});var Qi=ue((hm,Bi)=>{"use strict";Bi.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Gi=ue((ym,Ji)=>{"use strict";var Ol=Qi();Ji.exports=e=>{let t=Ol(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Ki=ue((Tm,Hi)=>{"use strict";Hi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Zi=ue((Am,Yi)=>{"use strict";Yi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var An=ue((Rm,Xi)=>{"use strict";var _l=Zi();Xi.exports=e=>typeof e=="string"?e.replace(_l(),""):e});var eo=ue((km,hr)=>{"use strict";hr.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};hr.exports.default=hr.exports});var Fn=ue((Ld,To)=>{"use strict";To.exports=function(){function e(t,r,n,i,o){return t<r||n<r?t>n?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;s<i&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,o-=s,i===0||o<3)return o;var a=0,l,u,c,p,m,f,g,h,R,P,T,v,k=[];for(l=0;l<i;l++)k.push(l+1),k.push(t.charCodeAt(s+l));for(var A=k.length-1;a<o-3;)for(R=r.charCodeAt(s+(u=a)),P=r.charCodeAt(s+(c=a+1)),T=r.charCodeAt(s+(p=a+2)),v=r.charCodeAt(s+(m=a+3)),f=a+=4,l=0;l<A;l+=2)g=k[l],h=k[l+1],u=e(g,u,c,R,h),c=e(u,c,p,P,h),p=e(c,p,m,T,h),f=e(p,m,f,v,h),k[l]=f,m=p,p=c,c=u,u=g;for(;a<o;)for(R=r.charCodeAt(s+(u=a)),f=++a,l=0;l<A;l+=2)g=k[l],k[l]=f=e(g,u,f,R,k[l+1]),u=g;return f}}()});var es=ue((Dg,Oc)=>{Oc.exports={name:"@prisma/engines-version",version:"6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"acc0b9dd43eb689cbd20c9470515d719db10d0b0"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.68",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zp={};yt(zp,{Debug:()=>yn,Decimal:()=>pe,Extensions:()=>dn,MetricsClient:()=>st,PrismaClientInitializationError:()=>S,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>oe,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>G,Public:()=>fn,Sql:()=>X,createParam:()=>Jo,defineDmmfProperty:()=>Yo,deserializeJsonResponse:()=>Ke,deserializeRawResult:()=>cn,dmmfToRuntimeDataModel:()=>zo,empty:()=>rs,getPrismaClient:()=>Fa,getRuntime:()=>Kr,join:()=>ts,makeStrictEnum:()=>La,makeTypedQueryFactory:()=>Zo,objectEnumValues:()=>Mr,raw:()=>Hn,serializeJsonQuery:()=>jr,skip:()=>qr,sqltag:()=>Kn,warnEnvConflicts:()=>Va,warnOnce:()=>Rt});module.exports=Qa(zp);var dn={};yt(dn,{defineExtension:()=>Pi,getExtensionContext:()=>vi});function Pi(e){return typeof e=="function"?e:t=>t.$extends(e)}function vi(e){return e}var fn={};yt(fn,{validator:()=>Ti});function Ti(...e){return t=>t}var mr={};yt(mr,{$:()=>ki,bgBlack:()=>el,bgBlue:()=>il,bgCyan:()=>sl,bgGreen:()=>rl,bgMagenta:()=>ol,bgRed:()=>tl,bgWhite:()=>al,bgYellow:()=>nl,black:()=>za,blue:()=>Me,bold:()=>H,cyan:()=>be,dim:()=>De,gray:()=>Et,green:()=>wt,grey:()=>Xa,hidden:()=>Ha,inverse:()=>Wa,italic:()=>Ga,magenta:()=>Ya,red:()=>Ee,reset:()=>Ja,strikethrough:()=>Ka,underline:()=>Y,white:()=>Za,yellow:()=>Ne});var gn,Ci,Ai,Ri,Si=!0;typeof process<"u"&&({FORCE_COLOR:gn,NODE_DISABLE_COLORS:Ci,NO_COLOR:Ai,TERM:Ri}=process.env||{},Si=process.stdout&&process.stdout.isTTY);var ki={enabled:!Ci&&Ai==null&&Ri!=="dumb"&&(gn!=null&&gn!=="0"||Si)};function N(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!ki.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ja=N(0,0),H=N(1,22),De=N(2,22),Ga=N(3,23),Y=N(4,24),Wa=N(7,27),Ha=N(8,28),Ka=N(9,29),za=N(30,39),Ee=N(31,39),wt=N(32,39),Ne=N(33,39),Me=N(34,39),Ya=N(35,39),be=N(36,39),Za=N(37,39),Et=N(90,39),Xa=N(90,39),el=N(40,49),tl=N(41,49),rl=N(42,49),nl=N(43,49),il=N(44,49),ol=N(45,49),sl=N(46,49),al=N(47,49);var ll=100,Oi=["green","yellow","blue","magenta","cyan","red"],bt=[],Ii=Date.now(),ul=0,hn=typeof process<"u"?process.env:{};globalThis.DEBUG??=hn.DEBUG??"";globalThis.DEBUG_COLORS??=hn.DEBUG_COLORS?hn.DEBUG_COLORS==="true":!0;var xt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e;(console.warn??console.log)(`${t} ${r}`,...n)},formatters:{}};function cl(e){let t={color:Oi[ul++%Oi.length],enabled:xt.enabled(e),namespace:e,log:xt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&bt.push([o,...n]),bt.length>ll&&bt.shift(),xt.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:pl(c)),u=`+${Date.now()-Ii}ms`;Ii=Date.now(),globalThis.DEBUG_COLORS?a(mr[s](H(o)),...l,mr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var yn=new Proxy(cl,{get:(e,t)=>xt[t],set:(e,t,r)=>xt[t]=r});function pl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Di(e=7500){let t=bt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(`
`);return t.length<e?t:t.slice(-e)}function Ni(){bt.length=0}var _=yn;var Pn=B(Vi()),fr=B(require("fs"));var Qe=B(require("path"));function $i(e){let t=e.ignoreProcessEnv?{}:process.env,r=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(t,p)?t[p]:e.parsed[p]||"",u=r(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=r(i)}for(let n in e.parsed)t[n]=e.parsed[n];return e}var xn=_("prisma:tryLoadEnv");function Pt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=qi(e);r.conflictCheck!=="none"&&Rl(n,t,r.conflictCheck);let i=null;return ji(n?.path,t)||(i=qi(t)),!n&&!i&&xn("No Environment variables loaded"),i?.dotenvResult.error?console.error(Ee(H("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(`
`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Rl(e,t,r){let n=e?.dotenvResult.parsed,i=!ji(e?.path,t);if(n&&t&&i&&fr.default.existsSync(t)){let o=Pn.default.parse(fr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=Qe.default.relative(process.cwd(),e.path),l=Qe.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${Y(a)} and ${Y(l)}
Conflicting env vars:
${s.map(c=>` ${H(c)}`).join(`
`)}
We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars.
`;throw new Error(u)}else if(r==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>H(c)).join(", ")} in ${Y(a)} and ${Y(l)}
Env vars from ${Y(l)} overwrite the ones from ${Y(a)}
`;console.warn(`${Ne("warn(prisma)")} ${u}`)}}}}function qi(e){if(Sl(e)){xn(`Environment variables loaded from ${e}`);let t=Pn.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:$i(t),message:De(`Environment variables loaded from ${Qe.default.relative(process.cwd(),e)}`),path:e}}else xn(`Environment variables not found at ${e}`);return null}function ji(e,t){return e&&t&&Qe.default.resolve(e)===Qe.default.resolve(t)}function Sl(e){return!!(e&&fr.default.existsSync(e))}var Ui="library";function Je(e){let t=kl();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Ui)}function kl(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}var Wi="prisma+postgres",gr=`${Wi}:`;function vn(e){return e?.startsWith(`${gr}//`)??!1}var vt;(t=>{let e;(A=>(A.findUnique="findUnique",A.findUniqueOrThrow="findUniqueOrThrow",A.findFirst="findFirst",A.findFirstOrThrow="findFirstOrThrow",A.findMany="findMany",A.create="create",A.createMany="createMany",A.createManyAndReturn="createManyAndReturn",A.update="update",A.updateMany="updateMany",A.updateManyAndReturn="updateManyAndReturn",A.upsert="upsert",A.delete="delete",A.deleteMany="deleteMany",A.groupBy="groupBy",A.count="count",A.aggregate="aggregate",A.findRaw="findRaw",A.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(vt||={});var Tt=B(require("path"));function Tn(e){return Tt.default.sep===Tt.default.posix.sep?e:e.split(Tt.default.sep).join(Tt.default.posix.sep)}var At={};yt(At,{error:()=>Nl,info:()=>Dl,log:()=>Il,query:()=>Ml,should:()=>zi,tags:()=>Ct,warn:()=>Cn});var Ct={error:Ee("prisma:error"),warn:Ne("prisma:warn"),info:be("prisma:info"),query:Me("prisma:query")},zi={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Il(...e){console.log(...e)}function Cn(e,...t){zi.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function Dl(e,...t){console.info(`${Ct.info} ${e}`,...t)}function Nl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function Ml(e,...t){console.log(`${Ct.query} ${e}`,...t)}function re(e,t){throw new Error(t)}function Rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Sn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});function Ge(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function kn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n<e.length;n++)t(r,e[n])<0&&(r=e[n]);return r}function b(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var to=new Set,Rt=(e,t,...r)=>{to.has(e)||(to.add(e),Cn(t,...r))};var S=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};b(S,"PrismaClientInitializationError");var Q=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};b(Q,"PrismaClientKnownRequestError");var oe=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};b(oe,"PrismaClientRustPanicError");var J=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};b(J,"PrismaClientUnknownRequestError");var G=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};b(G,"PrismaClientValidationError");var We=9e15,Se=1e9,On="0123456789abcdef",wr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Er="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",In={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-We,maxE:We,crypto:!1},so,Pe,E=!0,xr="[DecimalError] ",Re=xr+"Invalid argument: ",ao=xr+"Precision limit exceeded",lo=xr+"crypto unavailable",uo="[object Decimal]",W=Math.floor,V=Math.pow,Fl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ll=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,co=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ae=1e7,w=7,$l=9007199254740991,ql=wr.length-1,Dn=Er.length-1,d={toStringTag:uo};d.absoluteValue=d.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};d.ceil=function(){return y(new this.constructor(this),this.e+1,2)};d.clampedTo=d.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Re+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};d.comparedTo=d.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=n<i?n:i;t<r;++t)if(s[t]!==a[t])return s[t]>a[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};d.cosine=d.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+w,n.rounding=1,r=jl(n,ho(n,r)),n.precision=e,n.rounding=t,y(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};d.cubeRoot=d.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(E=!1,o=c.s*V(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=q(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=V(r,1/3),e=W((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new p(r),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=D(u.plus(c).times(a),u.plus(l),s+2,1),q(a.d).slice(0,s)===(r=q(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return E=!0,y(n,e,p.rounding,t)};d.decimalPlaces=d.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-W(this.e/w))*w,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};d.dividedBy=d.div=function(e){return D(this,new this.constructor(e))};d.dividedToIntegerBy=d.divToInt=function(e){var t=this,r=t.constructor;return y(D(t,new r(e),0,1,1),r.precision,r.rounding)};d.equals=d.eq=function(e){return this.cmp(e)===0};d.floor=function(){return y(new this.constructor(this),this.e+1,3)};d.greaterThan=d.gt=function(e){return this.cmp(e)>0};d.greaterThanOrEqualTo=d.gte=function(e){var t=this.cmp(e);return t==1||t===0};d.hyperbolicCosine=d.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/vr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=He(s,1,o.times(t),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=r,s.rounding=n,!0)};d.hyperbolicSine=d.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=He(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/vr(5,e)),i=He(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,y(i,t,r,!0)};d.hyperbolicTangent=d.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,D(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};d.inverseCosine=d.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?se(r,i,o):new r(0):new r(NaN):t.isZero()?se(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=se(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};d.inverseHyperbolicCosine=d.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,E=!1,r=r.times(r).minus(1).sqrt().plus(r),E=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};d.inverseHyperbolicSine=d.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,E=!1,r=r.times(r).plus(1).sqrt().plus(r),E=!0,n.precision=e,n.rounding=t,r.ln())};d.inverseHyperbolicTangent=d.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,t,!0):(o.precision=r=n-i.e,i=D(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};d.inverseSine=d.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=se(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};d.inverseTangent=d.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,m=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Dn)return s=se(c,p+4,m).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Dn)return s=se(c,p+4,m).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/w+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(E=!1,t=Math.ceil(a/w),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<<r-1)),E=!0,y(s,c.precision=p,c.rounding=m,!0)};d.isFinite=function(){return!!this.d};d.isInteger=d.isInt=function(){return!!this.d&&W(this.e/w)>this.d.length-2};d.isNaN=function(){return!this.s};d.isNegative=d.isNeg=function(){return this.s<0};d.isPositive=d.isPos=function(){return this.s>0};d.isZero=function(){return!!this.d&&this.d[0]===0};d.lessThan=d.lt=function(e){return this.cmp(e)<0};d.lessThanOrEqualTo=d.lte=function(e){return this.cmp(e)<1};d.logarithm=d.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,m=c.rounding,f=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(E=!1,a=p+f,s=Ae(u,a),n=t?br(c,a+10):Ae(e,a),l=D(s,n,a,1),St(l.d,i=p,m))do if(a+=10,s=Ae(u,a),n=t?br(c,a+10):Ae(e,a),l=D(s,n,a,1),!o){+q(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(St(l.d,i+=10,m));return E=!0,y(l,p,m)};d.minus=d.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,m,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,m=e.d,a=g.precision,l=g.rounding,!u[0]||!m[0]){if(m[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return E?y(e,a,l):e}if(r=W(e.e/w),c=W(f.e/w),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=m.length):(t=m,r=c,s=u.length),n=Math.max(Math.ceil(a/w),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=m.length,p=n<s,p&&(s=n),n=0;n<s;n++)if(u[n]!=m[n]){p=u[n]<m[n];break}o=0}for(p&&(t=u,u=m,m=t,e.s=-e.s),s=u.length,n=m.length-s;n>0;--n)u[s++]=0;for(n=m.length;n>o;){if(u[--n]<m[n]){for(i=n;i&&u[--i]===0;)u[i]=ae-1;--u[i],u[n]+=ae}u[n]-=m[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(e.d=u,e.e=Pr(u,r),E?y(e,a,l):e):new g(l===3?-0:0)};d.modulo=d.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?y(new n(r),n.precision,n.rounding):(E=!1,n.modulo==9?(t=D(r,e.abs(),0,3,1),t.s*=e.s):t=D(r,e,0,n.modulo,1),t=t.times(e),E=!0,r.minus(t))};d.naturalExponential=d.exp=function(){return Nn(this)};d.naturalLogarithm=d.ln=function(){return Ae(this)};d.negated=d.neg=function(){var e=new this.constructor(this);return e.s=-e.s,y(e)};d.plus=d.add=function(e){var t,r,n,i,o,s,a,l,u,c,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return!p.s||!e.s?e=new m(NaN):p.d||(e=new m(e.d||p.s===e.s?p:NaN)),e;if(p.s!=e.s)return e.s=-e.s,p.minus(e);if(u=p.d,c=e.d,a=m.precision,l=m.rounding,!u[0]||!c[0])return c[0]||(e=new m(p)),E?y(e,a,l):e;if(o=W(p.e/w),n=W(e.e/w),u=u.slice(),i=o-n,i){for(i<0?(r=u,i=-i,s=c.length):(r=c,n=o,s=u.length),o=Math.ceil(a/w),s=o>s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,r=c,c=u,u=r),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/ae|0,u[i]%=ae;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=Pr(u,n),E?y(e,a,l):e};d.precision=d.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);return r.d?(t=po(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};d.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};d.sine=d.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+w,n.rounding=1,r=Bl(n,ho(n,r)),n.precision=e,n.rounding=t,y(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};d.squareRoot=d.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(E=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=q(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=W((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new c(t)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(o=n,n=o.plus(D(s,o,r+2,1)).times(.5),q(o.d).slice(0,r)===(t=q(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return E=!0,y(n,l,c.rounding,e)};d.tangent=d.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=D(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};d.times=d.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,m=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!m||!m[0]||!f||!f[0])return new p(!e.s||m&&!m[0]&&!f||f&&!f[0]&&!m?NaN:!m||!f?e.s/0:e.s*0);for(r=W(c.e/w)+W(e.e/w),l=m.length,u=f.length,l<u&&(o=m,m=f,f=o,s=l,l=u,u=s),o=[],s=l+u,n=s;n--;)o.push(0);for(n=u;--n>=0;){for(t=0,i=l+n;i>n;)a=o[i]+f[n]*m[i-n-1]+t,o[i--]=a%ae|0,t=a/ae|0;o[i]=(o[i]+t)%ae|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Pr(o,r),E?y(e,p.precision,p.rounding):e};d.toBinary=function(e,t){return _n(this,2,e,t)};d.toDecimalPlaces=d.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Z(e,0,Se),t===void 0?t=n.rounding:Z(t,0,8),y(r,e+r.e+1,t))};d.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ce(n,!0):(Z(e,0,Se),t===void 0?t=i.rounding:Z(t,0,8),n=y(new i(n),e+1,t),r=ce(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};d.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=ce(i):(Z(e,0,Se),t===void 0?t=o.rounding:Z(t,0,8),n=y(new o(i),e+i.e+1,t),r=ce(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};d.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,m,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=po(g)-f.e-1,s=o%w,t.d[0]=V(10,s<0?w+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Re+a);e=a.gt(t)?o>0?t:u:a}for(E=!1,a=new h(q(g)),c=h.precision,h.precision=o=g.length*w*2;p=D(a,t,0,1,1),i=r.plus(p.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=t,t=a.minus(p.times(i)),a=i;return i=D(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=f.s,m=D(u,n,o,1).minus(f).abs().cmp(D(l,r,o,1).minus(f).abs())<1?[u,n]:[l,r],h.precision=c,E=!0,m};d.toHexadecimal=d.toHex=function(e,t){return _n(this,16,e,t)};d.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:Z(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(E=!1,r=D(r,e,0,t,1).times(e),E=!0,y(r)):(e.s=r.s,r=e),r};d.toNumber=function(){return+this};d.toOctal=function(e,t){return _n(this,8,e,t)};d.toPower=d.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(V(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(t=W(e.e/w),t>=e.d.length-1&&(r=u<0?-u:u)<=$l)return i=mo(l,a,r,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(t<e.d.length-1)return new l(NaN);if(e.d[t]&1||(s=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=s,a}return r=V(+a,u),t=r==0||!isFinite(r)?W(u*(Math.log("0."+q(a.d))/Math.LN10+a.e+1)):new l(r+"").e,t>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(E=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Nn(e.times(Ae(a,n+r)),n),i.d&&(i=y(i,n+5,1),St(i.d,n,o)&&(t=n+10,i=y(Nn(e.times(Ae(a,t+r)),t),t+5,1),+q(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,E=!0,l.rounding=o,y(i,n,o))};d.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ce(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(Z(e,1,Se),t===void 0?t=i.rounding:Z(t,0,8),n=y(new i(n),e,t),r=ce(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};d.toSignificantDigits=d.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Z(e,1,Se),t===void 0?t=n.rounding:Z(t,0,8)),y(new n(r),e,t)};d.toString=function(){var e=this,t=e.constructor,r=ce(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};d.truncated=d.trunc=function(){return y(new this.constructor(this),this.e+1,1)};d.valueOf=d.toJSON=function(){var e=this,t=e.constructor,r=ce(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function q(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)n=e[t]+"",r=w-n.length,r&&(o+=Ce(r)),o+=n;s=e[t],n=s+"",r=w-n.length,r&&(o+=Ce(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function Z(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Re+e)}function St(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=w,i=0):(i=Math.ceil((t+1)/w),t%=w),o=V(10,w-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==V(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==V(10,t-3)-1,s}function yr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;s<a;){for(o=i.length;o--;)i[o]*=t;for(i[0]+=On.indexOf(e.charAt(s++)),n=0;n<i.length;n++)i[n]>r-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function jl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/vr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=He(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var D=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;a<o;a++)if(n[a]!=i[a]){l=n[a]>i[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]<i[o]?1:0,n[o]=a*s+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,m,f,g,h,R,P,T,v,k,A,te,ht,F,z,we,j,Be,cr=n.constructor,mn=n.s==i.s?1:-1,U=n.d,I=i.d;if(!U||!U[0]||!I||!I[0])return new cr(!n.s||!i.s||(U?I&&U[0]==I[0]:!I)?NaN:U&&U[0]==0||!I?mn*0:mn/0);for(l?(f=1,c=n.e-i.e):(l=ae,f=w,c=W(n.e/f)-W(i.e/f)),j=I.length,z=U.length,P=new cr(mn),T=P.d=[],p=0;I[p]==(U[p]||0);p++);if(I[p]>(U[p]||0)&&c--,o==null?(te=o=cr.precision,s=cr.rounding):a?te=o+(n.e-i.e)+1:te=o,te<0)T.push(1),g=!0;else{if(te=te/f+2|0,p=0,j==1){for(m=0,I=I[0],te++;(p<z||m)&&te--;p++)ht=m*l+(U[p]||0),T[p]=ht/I|0,m=ht%I|0;g=m||p<z}else{for(m=l/(I[0]+1)|0,m>1&&(I=e(I,m,l),U=e(U,m,l),j=I.length,z=U.length),F=j,v=U.slice(0,j),k=v.length;k<j;)v[k++]=0;Be=I.slice(),Be.unshift(0),we=I[0],I[1]>=l/2&&++we;do m=0,u=t(I,v,j,k),u<0?(A=v[0],j!=k&&(A=A*l+(v[1]||0)),m=A/we|0,m>1?(m>=l&&(m=l-1),h=e(I,m,l),R=h.length,k=v.length,u=t(h,v,R,k),u==1&&(m--,r(h,j<R?Be:I,R,l))):(m==0&&(u=m=1),h=I.slice()),R=h.length,R<k&&h.unshift(0),r(v,h,k,l),u==-1&&(k=v.length,u=t(I,v,j,k),u<1&&(m++,r(v,j<k?Be:I,k,l))),k=v.length):u===0&&(m++,v=[0]),T[p++]=m,u&&v[0]?v[k++]=U[F]||0:(v=[U[F]],k=1);while((F++<z||v[0]!==void 0)&&te--);g=v[0]!==void 0}T[0]||T.shift()}if(f==1)P.e=c,so=g;else{for(p=1,m=T[0];m>=10;m/=10)p++;P.e=p+c*f-1,y(P,a?o+P.e+1:o,s,g)}return P}}();function y(e,t,r,n){var i,o,s,a,l,u,c,p,m,f=e.constructor;e:if(t!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=w,s=t,c=p[m=0],l=c/V(10,i-s-1)%10|0;else if(m=Math.ceil((o+1)/w),a=p.length,m>=a)if(n){for(;a++<=m;)p.push(0);c=l=0,i=1,o%=w,s=o-w+1}else break e;else{for(c=a=p[m],i=1;a>=10;a/=10)i++;o%=w,s=o-w+i,l=s<0?0:c/V(10,i-s-1)%10|0}if(n=n||t<0||p[m+1]!==void 0||(s<0?c:c%V(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?c/V(10,i-s):0:p[m-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,u?(t-=e.e+1,p[0]=V(10,(w-t%w)%w),e.e=-t||0):p[0]=e.e=0,e;if(o==0?(p.length=m,a=1,m--):(p.length=m+1,a=V(10,w-o),p[m]=s>0?(c/V(10,i-s)%V(10,s)|0)*a:0),u)for(;;)if(m==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==ae&&(p[0]=1));break}else{if(p[m]+=a,p[m]!=ae)break;p[m--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return E&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e<f.minE&&(e.e=0,e.d=[0])),e}function ce(e,t,r){if(!e.isFinite())return go(e);var n,i=e.e,o=q(e.d),s=o.length;return t?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+Ce(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ce(-i-1)+o,r&&(n=r-s)>0&&(o+=Ce(n))):i>=s?(o+=Ce(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ce(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=Ce(n))),o}function Pr(e,t){var r=e[0];for(t*=w;r>=10;r/=10)t++;return t}function br(e,t,r){if(t>ql)throw E=!0,r&&(e.precision=r),Error(ao);return y(new e(wr),t,1,!0)}function se(e,t,r){if(t>Dn)throw Error(ao);return y(new e(Er),t,r,!0)}function po(e){var t=e.length-1,r=t*w+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ce(e){for(var t="";e--;)t+="0";return t}function mo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/w+4);for(E=!1;;){if(r%2&&(o=o.times(t),io(o.d,s)&&(i=!0)),r=W(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),io(t.d,s)}return E=!0,o}function no(e){return e.d[e.d.length-1]&1}function fo(e,t,r){for(var n,i=new e(t[0]),o=0;++o<t.length;)if(n=new e(t[o]),n.s)i[r](n)&&(i=n);else{i=n;break}return i}function Nn(e,t){var r,n,i,o,s,a,l,u=0,c=0,p=0,m=e.constructor,f=m.rounding,g=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(E=!1,l=g):l=t,a=new m(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(V(2,p))/Math.LN10*2+5|0,l+=n,r=o=s=new m(1),m.precision=l;;){if(o=y(o.times(e),l,1),r=r.times(++c),a=s.plus(D(o,r,l,1)),q(a.d).slice(0,l)===q(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(t==null)if(u<3&&St(s.d,l-n,f,u))m.precision=l+=10,r=o=a=new m(1),c=0,u++;else return y(s,m.precision=g,f,E=!0);else return m.precision=g,s}s=a}}function Ae(e,t){var r,n,i,o,s,a,l,u,c,p,m,f=1,g=10,h=e,R=h.d,P=h.constructor,T=P.rounding,v=P.precision;if(h.s<0||!R||!R[0]||!h.e&&R[0]==1&&R.length==1)return new P(R&&!R[0]?-1/0:h.s!=1?NaN:R?0:h);if(t==null?(E=!1,c=v):c=t,P.precision=c+=g,r=q(R),n=r.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=q(h.d),n=r.charAt(0),f++;o=h.e,n>1?(h=new P("0."+r),o++):h=new P(n+"."+r.slice(1))}else return u=br(P,c+2,v).times(o+""),h=Ae(new P(n+"."+r.slice(1)),c-g).plus(u),P.precision=v,t==null?y(h,v,T,E=!0):h;for(p=h,l=s=h=D(h.minus(1),h.plus(1),c,1),m=y(h.times(h),c,1),i=3;;){if(s=y(s.times(m),c,1),u=l.plus(D(s,new P(i),c,1)),q(u.d).slice(0,c)===q(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(br(P,c+2,v).times(o+""))),l=D(l,new P(f),c,1),t==null)if(St(l.d,c-g,T,a))P.precision=c+=g,u=s=h=D(p.minus(1),p.plus(1),c,1),m=y(h.times(h),c,1),i=a=1;else return y(l,P.precision=v,T,E=!0);else return P.precision=v,l;l=u,i+=2}}function go(e){return String(e.s*e.s/0)}function Mn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%w,r<0&&(n+=w),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=w;n<i;)e.d.push(+t.slice(n,n+=w));t=t.slice(n),n=w-t.length}else n-=i;for(;n--;)t+="0";e.d.push(+t),E&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Ul(e,t){var r,n,i,o,s,a,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),co.test(t))return Mn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Ll.test(t))r=16,t=t.toLowerCase();else if(Fl.test(t))r=2;else if(Vl.test(t))r=8;else throw Error(Re+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=mo(n,new n(r),o,o*2)),u=yr(t,r,ae),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=Pr(u,c),e.d=u,E=!1,s&&(e=D(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?V(2,l):_e.pow(2,l))),E=!0,e)}function Bl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:He(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/vr(5,r)),t=He(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function He(e,t,r,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/w);for(E=!1,l=r.times(r),a=new e(n);;){if(s=D(a.times(l),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=D(s.times(l),new e(t++*t++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return E=!0,s.d.length=p+1,s}function vr(e,t){for(var r=e;--t;)r*=e;return r}function ho(e,t){var r,n=t.s<0,i=se(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=no(r)?n?2:3:n?4:1,t;Pe=no(r)?n?1:4:n?3:2}return t.minus(i).abs()}function _n(e,t,r,n){var i,o,s,a,l,u,c,p,m,f=e.constructor,g=r!==void 0;if(g?(Z(r,1,Se),n===void 0?n=f.rounding:Z(n,0,8)):(r=f.precision,n=f.rounding),!e.isFinite())c=go(e);else{for(c=ce(e),s=c.indexOf("."),g?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(c=c.replace(".",""),m=new f(1),m.e=c.length-s,m.d=yr(ce(m),10,i),m.e=m.d.length),p=yr(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=D(e,m,r,n,0,i),p=e.d,o=e.e,u=so),s=p[r],a=i/2,u=u||p[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[r-1]&1||n===(e.s<0?8:7)),p.length=r,u)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s<l;s++)c+=On.charAt(p[s]);if(g){if(l>1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)c+="0";for(p=yr(c,i,t),l=p.length;!p[l-1];--l);for(s=1,c="1.";s<l;s++)c+=On.charAt(p[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}c=(t==16?"0x":t==2?"0b":t==8?"0o":"")+c}return e.s<0?"-"+c:c}function io(e,t){if(e.length>t)return e.length=t,!0}function Ql(e){return new this(e).abs()}function Jl(e){return new this(e).acos()}function Gl(e){return new this(e).acosh()}function Wl(e,t){return new this(e).plus(t)}function Hl(e){return new this(e).asin()}function Kl(e){return new this(e).asinh()}function zl(e){return new this(e).atan()}function Yl(e){return new this(e).atanh()}function Zl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=se(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?se(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=se(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(D(e,t,o,1)),t=se(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(D(e,t,o,1)),r}function Xl(e){return new this(e).cbrt()}function eu(e){return y(e=new this(e),e.e+1,2)}function tu(e,t,r){return new this(e).clamp(t,r)}function ru(e){if(!e||typeof e!="object")throw Error(xr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Se,"rounding",0,8,"toExpNeg",-We,0,"toExpPos",0,We,"maxE",0,We,"minE",-We,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=In[r]),(n=e[r])!==void 0)if(W(n)===n&&n>=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Re+r+": "+n);if(r="crypto",i&&(this[r]=In[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(lo);else this[r]=!1;else throw Error(Re+r+": "+n);return this}function nu(e){return new this(e).cos()}function iu(e){return new this(e).cosh()}function yo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,oo(o)){u.s=o.s,E?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e<i.minE?(u.e=0,u.d=[0]):(u.e=o.e,u.d=o.d.slice()):(u.e=o.e,u.d=o.d?o.d.slice():o.d);return}if(l=typeof o,l==="number"){if(o===0){u.s=1/o<0?-1:1,u.e=0,u.d=[0];return}if(o<0?(o=-o,u.s=-1):u.s=1,o===~~o&&o<1e7){for(s=0,a=o;a>=10;a/=10)s++;E?s>i.maxE?(u.e=NaN,u.d=null):s<i.minE?(u.e=0,u.d=[0]):(u.e=s,u.d=[o]):(u.e=s,u.d=[o]);return}else if(o*0!==0){o||(u.s=NaN),u.e=NaN,u.d=null;return}return Mn(u,o.toString())}else if(l!=="string")throw Error(Re+o);return(a=o.charCodeAt(0))===45?(o=o.slice(1),u.s=-1):(a===43&&(o=o.slice(1)),u.s=1),co.test(o)?Mn(u,o):Ul(u,o)}if(i.prototype=d,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=ru,i.clone=yo,i.isDecimal=oo,i.abs=Ql,i.acos=Jl,i.acosh=Gl,i.add=Wl,i.asin=Hl,i.asinh=Kl,i.atan=zl,i.atanh=Yl,i.atan2=Zl,i.cbrt=Xl,i.ceil=eu,i.clamp=tu,i.cos=nu,i.cosh=iu,i.div=ou,i.exp=su,i.floor=au,i.hypot=lu,i.ln=uu,i.log=cu,i.log10=mu,i.log2=pu,i.max=du,i.min=fu,i.mod=gu,i.mul=hu,i.pow=yu,i.random=wu,i.round=Eu,i.sign=bu,i.sin=xu,i.sinh=Pu,i.sqrt=vu,i.sub=Tu,i.sum=Cu,i.tan=Au,i.tanh=Ru,i.trunc=Su,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function ou(e,t){return new this(e).div(t)}function su(e){return new this(e).exp()}function au(e){return y(e=new this(e),e.e+1,3)}function lu(){var e,t,r=new this(0);for(E=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return E=!0,new this(1/0);r=t}return E=!0,r.sqrt()}function oo(e){return e instanceof _e||e&&e.toStringTag===uo||!1}function uu(e){return new this(e).ln()}function cu(e,t){return new this(e).log(t)}function pu(e){return new this(e).log(2)}function mu(e){return new this(e).log(10)}function du(){return fo(this,arguments,"lt")}function fu(){return fo(this,arguments,"gt")}function gu(e,t){return new this(e).mod(t)}function hu(e,t){return new this(e).mul(t)}function yu(e,t){return new this(e).pow(t)}function wu(e){var t,r,n,i,o=0,s=new this(1),a=[];if(e===void 0?e=this.precision:Z(e,1,Se),n=Math.ceil(e/w),this