@prisma/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) • 201 kB
JavaScript
"use strict";var tc=Object.create;var Lr=Object.defineProperty;var rc=Object.getOwnPropertyDescriptor;var nc=Object.getOwnPropertyNames;var ic=Object.getPrototypeOf,oc=Object.prototype.hasOwnProperty;var ko=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),it=(e,t)=>{for(var r in t)Lr(e,r,{get:t[r],enumerable:!0})},Io=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nc(t))!oc.call(e,i)&&i!==r&&Lr(e,i,{get:()=>t[i],enumerable:!(n=rc(t,i))||n.enumerable});return e};var $=(e,t,r)=>(r=e!=null?tc(ic(e)):{},Io(t||!e||!e.__esModule?Lr(r,"default",{value:e,enumerable:!0}):r,e)),sc=e=>Io(Lr({},"__esModule",{value:!0}),e);var Qo=Q(($g,Rc)=>{Rc.exports={name:"@prisma/internals",version:"6.7.0",description:"This package is intended for Prisma's internal use",main:"dist/index.js",types:"dist/index.d.ts",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/internals"},homepage:"https://www.prisma.io",author:"Tim Suchanek <suchanek@prisma.io>",bugs:"https://github.com/prisma/prisma/issues",license:"Apache-2.0",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",test:"dotenv -e ../../.db.env -- jest --silent",prepublishOnly:"pnpm run build"},files:["README.md","dist","!**/libquery_engine*","!dist/get-generators/engines/*","scripts"],devDependencies:{"@babel/helper-validator-identifier":"7.25.9","@opentelemetry/api":"1.9.0","@swc/core":"1.11.5","@swc/jest":"0.2.37","@types/babel__helper-validator-identifier":"7.15.2","@types/jest":"29.5.14","@types/node":"18.19.76","@types/resolve":"1.20.6",archiver:"6.0.2","checkpoint-client":"1.1.33","cli-truncate":"4.0.0",dotenv:"16.4.7",esbuild:"0.25.1","escape-string-regexp":"5.0.0",execa:"5.1.1","fast-glob":"3.3.3","find-up":"7.0.0","fp-ts":"2.16.9","fs-extra":"11.3.0","fs-jetpack":"5.1.0","global-dirs":"4.0.0",globby:"11.1.0","identifier-regex":"1.0.0","indent-string":"4.0.0","is-windows":"1.0.2","is-wsl":"3.1.0",jest:"29.7.0","jest-junit":"16.0.0",kleur:"4.1.5","mock-stdin":"1.0.0","new-github-issue-url":"0.2.1","node-fetch":"3.3.2","npm-packlist":"5.1.3",open:"7.4.2","p-map":"4.0.0","read-package-up":"11.0.0",resolve:"1.22.10","string-width":"7.2.0","strip-ansi":"6.0.1","strip-indent":"4.0.0","temp-dir":"2.0.0",tempy:"1.0.1","terminal-link":"4.0.0",tmp:"0.2.3","ts-node":"10.9.2","ts-pattern":"5.6.2","ts-toolbelt":"9.6.0",typescript:"5.4.5",yarn:"1.22.22"},dependencies:{"@prisma/config":"workspace:*","@prisma/debug":"workspace:*","@prisma/dmmf":"workspace:*","@prisma/driver-adapter-utils":"workspace:*","@prisma/engines":"workspace:*","@prisma/fetch-engine":"workspace:*","@prisma/generator":"workspace:*","@prisma/generator-helper":"workspace:*","@prisma/get-platform":"workspace:*","@prisma/prisma-schema-wasm":"6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed","@prisma/schema-engine-wasm":"6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed","@prisma/schema-files-loader":"workspace:*",arg:"5.0.2",prompts:"2.4.2"},peerDependencies:{typescript:">=5.1.0"},peerDependenciesMeta:{typescript:{optional:!0}},sideEffects:!1}});var Go=Q((Ug,Ho)=>{"use strict";Ho.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var zo=Q((Hg,Ko)=>{"use strict";Ko.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 Xo=Q((Wg,Zo)=>{"use strict";Zo.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 oi=Q((Jg,es)=>{"use strict";var Fc=Xo();es.exports=e=>typeof e=="string"?e.replace(Fc(),""):e});var ts=Q((Yg,Lc)=>{Lc.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 os=Q((Zg,Ce)=>{"use strict";var ai=require("node:fs"),li=require("node:path"),Vc=require("node:os"),$c=require("node:crypto"),qc=ts(),ui=qc.version,jc=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Uc(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
`);let n;for(;(n=jc.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 Bc(e){let t=is(e),r=q.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=ns(e).split(","),i=n.length,o;for(let s=0;s<i;s++)try{let a=n[s].trim(),l=Gc(r,a);o=q.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=i)throw a}return q.parse(o)}function Qc(e){console.log(`[dotenv@${ui}][INFO] ${e}`)}function Hc(e){console.log(`[dotenv@${ui}][WARN] ${e}`)}function qr(e){console.log(`[dotenv@${ui}][DEBUG] ${e}`)}function ns(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 Gc(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 is(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)ai.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=li.resolve(process.cwd(),".env.vault");return ai.existsSync(t)?t:null}function rs(e){return e[0]==="~"?li.join(Vc.homedir(),e.slice(1)):e}function Wc(e){Qc("Loading env from encrypted .env.vault");let t=q._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),q.populate(r,t,e),{parsed:t}}function Jc(e){let t=li.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&e.encoding?r=e.encoding:n&&qr("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[rs(e.path)];else{i=[];for(let l of e.path)i.push(rs(l))}let o,s={};for(let l of i)try{let u=q.parse(ai.readFileSync(l,{encoding:r}));q.populate(s,u,e)}catch(u){n&&qr(`Failed to load ${l} ${u.message}`),o=u}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),q.populate(a,s,e),o?{parsed:s,error:o}:{parsed:s}}function Kc(e){if(ns(e).length===0)return q.configDotenv(e);let t=is(e);return t?q._configVault(e):(Hc(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),q.configDotenv(e))}function zc(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=$c.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 Yc(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&&qr(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var q={configDotenv:Jc,_configVault:Wc,_parseVault:Bc,config:Kc,decrypt:zc,parse:Uc,populate:Yc};Ce.exports.configDotenv=q.configDotenv;Ce.exports._configVault=q._configVault;Ce.exports._parseVault=q._parseVault;Ce.exports.config=q.config;Ce.exports.decrypt=q.decrypt;Ce.exports.parse=q.parse;Ce.exports.populate=q.populate;Ce.exports=q});var us=Q((ih,Ur)=>{"use strict";Ur.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()};Ur.exports.default=Ur.exports});var xi=Q((_y,_s)=>{"use strict";_s.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,d,m,g,h,R,T,C,w,I=[];for(l=0;l<i;l++)I.push(l+1),I.push(t.charCodeAt(s+l));for(var ue=I.length-1;a<o-3;)for(R=r.charCodeAt(s+(u=a)),T=r.charCodeAt(s+(c=a+1)),C=r.charCodeAt(s+(p=a+2)),w=r.charCodeAt(s+(d=a+3)),m=a+=4,l=0;l<ue;l+=2)g=I[l],h=I[l+1],u=e(g,u,c,R,h),c=e(u,c,p,T,h),p=e(c,p,d,C,h),m=e(p,d,m,w,h),I[l]=m,d=p,p=c,c=u,u=g;for(;a<o;)for(R=r.charCodeAt(s+(u=a)),m=++a,l=0;l<ue;l+=2)g=I[l],I[l]=m=e(g,u,m,R,I[l+1]),u=g;return m}}()});var Vs=ko(()=>{"use strict"});var $s=ko(()=>{"use strict"});var ua=Q((lx,Hd)=>{Hd.exports={name:"@prisma/engines-version",version:"6.7.0-36.3cff47a7f5d65c3ea74883f1d736e41d68ce91ed",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek <suchanek@prisma.io>",prisma:{enginesVersion:"3cff47a7f5d65c3ea74883f1d736e41d68ce91ed"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.76",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Hi=Q(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.anumber=Qi;Je.abytes=rl;Je.ahash=Qm;Je.aexists=Hm;Je.aoutput=Gm;function Qi(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Bm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rl(e,...t){if(!Bm(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Qm(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Qi(e.outputLen),Qi(e.blockLen)}function Hm(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Gm(e,t){rl(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}});var Tl=Q(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.add5L=P.add5H=P.add4H=P.add4L=P.add3H=P.add3L=P.rotlBL=P.rotlBH=P.rotlSL=P.rotlSH=P.rotr32L=P.rotr32H=P.rotrBL=P.rotrBH=P.rotrSL=P.rotrSH=P.shrSL=P.shrSH=P.toBig=void 0;P.fromBig=Wi;P.split=nl;P.add=yl;var Cn=BigInt(2**32-1),Gi=BigInt(32);function Wi(e,t=!1){return t?{h:Number(e&Cn),l:Number(e>>Gi&Cn)}:{h:Number(e>>Gi&Cn)|0,l:Number(e&Cn)|0}}function nl(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=Wi(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]}var il=(e,t)=>BigInt(e>>>0)<<Gi|BigInt(t>>>0);P.toBig=il;var ol=(e,t,r)=>e>>>r;P.shrSH=ol;var sl=(e,t,r)=>e<<32-r|t>>>r;P.shrSL=sl;var al=(e,t,r)=>e>>>r|t<<32-r;P.rotrSH=al;var ll=(e,t,r)=>e<<32-r|t>>>r;P.rotrSL=ll;var ul=(e,t,r)=>e<<64-r|t>>>r-32;P.rotrBH=ul;var cl=(e,t,r)=>e>>>r-32|t<<64-r;P.rotrBL=cl;var pl=(e,t)=>t;P.rotr32H=pl;var dl=(e,t)=>e;P.rotr32L=dl;var ml=(e,t,r)=>e<<r|t>>>32-r;P.rotlSH=ml;var fl=(e,t,r)=>t<<r|e>>>32-r;P.rotlSL=fl;var gl=(e,t,r)=>t<<r-32|e>>>64-r;P.rotlBH=gl;var hl=(e,t,r)=>e<<r-32|t>>>64-r;P.rotlBL=hl;function yl(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:i|0}}var wl=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);P.add3L=wl;var El=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;P.add3H=El;var xl=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);P.add4L=xl;var bl=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;P.add4H=bl;var Pl=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);P.add5L=Pl;var vl=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;P.add5H=vl;var Wm={fromBig:Wi,split:nl,toBig:il,shrSH:ol,shrSL:sl,rotrSH:al,rotrSL:ll,rotrBH:ul,rotrBL:cl,rotr32H:pl,rotr32L:dl,rotlSH:ml,rotlSL:fl,rotlBH:gl,rotlBL:hl,add:yl,add3L:wl,add3H:El,add4L:xl,add4H:bl,add5H:vl,add5L:Pl};P.default=Wm});var Cl=Q(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.crypto=void 0;var Ve=require("node:crypto");An.crypto=Ve&&typeof Ve=="object"&&"webcrypto"in Ve?Ve.webcrypto:Ve&&typeof Ve=="object"&&"randomBytes"in Ve?Ve:void 0});var Rl=Q(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.Hash=S.nextTick=S.byteSwapIfBE=S.isLE=void 0;S.isBytes=Jm;S.u8=Km;S.u32=zm;S.createView=Ym;S.rotr=Zm;S.rotl=Xm;S.byteSwap=zi;S.byteSwap32=ef;S.bytesToHex=rf;S.hexToBytes=nf;S.asyncLoop=sf;S.utf8ToBytes=Sl;S.toBytes=Sn;S.concatBytes=af;S.checkOpts=lf;S.wrapConstructor=uf;S.wrapConstructorWithOpts=cf;S.wrapXOFConstructorWithOpts=pf;S.randomBytes=df;var Ct=Cl(),Ki=Hi();function Jm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Km(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function zm(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ym(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Zm(e,t){return e<<32-t|e>>>t}function Xm(e,t){return e<<t|e>>>32-t>>>0}S.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function zi(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}S.byteSwapIfBE=S.isLE?e=>e:e=>zi(e);function ef(e){for(let t=0;t<e.length;t++)e[t]=zi(e[t])}var tf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rf(e){(0,Ki.abytes)(e);let t="";for(let r=0;r<e.length;r++)t+=tf[e[r]];return t}var Re={_0:48,_9:57,A:65,F:70,a:97,f:102};function Al(e){if(e>=Re._0&&e<=Re._9)return e-Re._0;if(e>=Re.A&&e<=Re.F)return e-(Re.A-10);if(e>=Re.a&&e<=Re.f)return e-(Re.a-10)}function nf(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let i=0,o=0;i<r;i++,o+=2){let s=Al(e.charCodeAt(o)),a=Al(e.charCodeAt(o+1));if(s===void 0||a===void 0){let l=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+o)}n[i]=s*16+a}return n}var of=async()=>{};S.nextTick=of;async function sf(e,t,r){let n=Date.now();for(let i=0;i<e;i++){r(i);let o=Date.now()-n;o>=0&&o<t||(await(0,S.nextTick)(),n+=o)}}function Sl(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Sn(e){return typeof e=="string"&&(e=Sl(e)),(0,Ki.abytes)(e),e}function af(...e){let t=0;for(let n=0;n<e.length;n++){let i=e[n];(0,Ki.abytes)(i),t+=i.length}let r=new Uint8Array(t);for(let n=0,i=0;n<e.length;n++){let o=e[n];r.set(o,i),i+=o.length}return r}var Ji=class{clone(){return this._cloneInto()}};S.Hash=Ji;function lf(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function uf(e){let t=n=>e().update(Sn(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function cf(e){let t=(n,i)=>e(i).update(Sn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function pf(e){let t=(n,i)=>e(i).update(Sn(n)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}function df(e=32){if(Ct.crypto&&typeof Ct.crypto.getRandomValues=="function")return Ct.crypto.getRandomValues(new Uint8Array(e));if(Ct.crypto&&typeof Ct.crypto.randomBytes=="function")return Ct.crypto.randomBytes(e);throw new Error("crypto.getRandomValues must be defined")}});var Fl=Q(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.shake256=F.shake128=F.keccak_512=F.keccak_384=F.keccak_256=F.keccak_224=F.sha3_512=F.sha3_384=F.sha3_256=F.sha3_224=F.Keccak=void 0;F.keccakP=Ml;var At=Hi(),fr=Tl(),ke=Rl(),Ol=[],Dl=[],_l=[],mf=BigInt(0),mr=BigInt(1),ff=BigInt(2),gf=BigInt(7),hf=BigInt(256),yf=BigInt(113);for(let e=0,t=mr,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],Ol.push(2*(5*n+r)),Dl.push((e+1)*(e+2)/2%64);let i=mf;for(let o=0;o<7;o++)t=(t<<mr^(t>>gf)*yf)%hf,t&ff&&(i^=mr<<(mr<<BigInt(o))-mr);_l.push(i)}var[wf,Ef]=(0,fr.split)(_l,!0),kl=(e,t,r)=>r>32?(0,fr.rotlBH)(e,t,r):(0,fr.rotlSH)(e,t,r),Il=(e,t,r)=>r>32?(0,fr.rotlBL)(e,t,r):(0,fr.rotlSL)(e,t,r);function Ml(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,l=(s+2)%10,u=r[l],c=r[l+1],p=kl(u,c,1)^r[a],d=Il(u,c,1)^r[a+1];for(let m=0;m<50;m+=10)e[s+m]^=p,e[s+m+1]^=d}let i=e[2],o=e[3];for(let s=0;s<24;s++){let a=Dl[s],l=kl(i,o,a),u=Il(i,o,a),c=Ol[s];i=e[c],o=e[c+1],e[c]=l,e[c+1]=u}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10]}e[0]^=wf[n],e[1]^=Ef[n]}r.fill(0)}var gr=class e extends ke.Hash{constructor(t,r,n,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,At.anumber)(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,ke.u32)(this.state)}keccak(){ke.isLE||(0,ke.byteSwap32)(this.state32),Ml(this.state32,this.rounds),ke.isLE||(0,ke.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,At.aexists)(this);let{blockLen:r,state:n}=this;t=(0,ke.toBytes)(t);let i=t.length;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);for(let a=0;a<s;a++)n[this.pos++]^=t[o++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:n,blockLen:i}=this;t[n]^=r,(r&128)!==0&&n===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){(0,At.aexists)(this,!1),(0,At.abytes)(t),this.finish();let r=this.state,{blockLen:n}=this;for(let i=0,o=t.length;i<o;){this.posOut>=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);t.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,At.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,At.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return t||(t=new e(r,n,i,s,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=i,t.enableXOF=s,t.destroyed=this.destroyed,t}};F.Keccak=gr;var $e=(e,t,r)=>(0,ke.wrapConstructor)(()=>new gr(t,e,r));F.sha3_224=$e(6,144,224/8);F.sha3_256=$e(6,136,256/8);F.sha3_384=$e(6,104,384/8);F.sha3_512=$e(6,72,512/8);F.keccak_224=$e(1,144,224/8);F.keccak_256=$e(1,136,256/8);F.keccak_384=$e(1,104,384/8);F.keccak_512=$e(1,72,512/8);var Nl=(e,t,r)=>(0,ke.wrapXOFConstructorWithOpts)((n={})=>new gr(t,e,n.dkLen===void 0?r:n.dkLen,!0));F.shake128=Nl(31,168,128/8);F.shake256=Nl(31,136,256/8)});var Ql=Q((M0,qe)=>{"use strict";var{sha3_512:xf}=Fl(),Vl=24,hr=32,Yi=(e=4,t=Math.random)=>{let r="";for(;r.length<e;)r=r+Math.floor(t()*36).toString(36);return r};function $l(e){let t=8n,r=0n;for(let n of e.values()){let i=BigInt(n);r=(r<<t)+i}return r}var ql=(e="")=>$l(xf(e)).toString(36).slice(1),Ll=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),bf=e=>Ll[Math.floor(e()*Ll.length)],jl=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let r=Object.keys(e).toString(),n=r.length?r+Yi(hr,t):Yi(hr,t);return ql(n).substring(0,hr)},Ul=e=>()=>e++,Pf=476782367,Bl=({random:e=Math.random,counter:t=Ul(Math.floor(e()*Pf)),length:r=Vl,fingerprint:n=jl({random:e})}={})=>function(){let o=bf(e),s=Date.now().toString(36),a=t().toString(36),l=Yi(r,e),u=`${s+l+a+n}`;return`${o+ql(u).substring(1,r)}`},vf=Bl(),Tf=(e,{minLength:t=2,maxLength:r=hr}={})=>{let n=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&n>=t&&n<=r&&i.test(e))return!0}finally{}return!1};qe.exports.getConstants=()=>({defaultLength:Vl,bigLength:hr});qe.exports.init=Bl;qe.exports.createId=vf;qe.exports.bufToBigInt=$l;qe.exports.createCounter=Ul;qe.exports.createFingerprint=jl;qe.exports.isCuid=Tf});var Hl=Q((N0,yr)=>{"use strict";var{createId:Cf,init:Af,getConstants:Sf,isCuid:Rf}=Ql();yr.exports.createId=Cf;yr.exports.init=Af;yr.exports.getConstants=Sf;yr.exports.isCuid=Rf});var Sg={};it(Sg,{DMMF:()=>zt,Debug:()=>L,Decimal:()=>ye,Extensions:()=>Yn,MetricsClient:()=>bt,PrismaClientInitializationError:()=>k,PrismaClientKnownRequestError:()=>U,PrismaClientRustPanicError:()=>pe,PrismaClientUnknownRequestError:()=>z,PrismaClientValidationError:()=>Y,Public:()=>Zn,Sql:()=>oe,createParam:()=>ta,defineDmmfProperty:()=>aa,deserializeJsonResponse:()=>ct,deserializeRawResult:()=>Wn,dmmfToRuntimeDataModel:()=>Ss,empty:()=>pa,getPrismaClient:()=>Zu,getRuntime:()=>vn,join:()=>ca,makeStrictEnum:()=>Xu,makeTypedQueryFactory:()=>la,objectEnumValues:()=>ln,raw:()=>ki,serializeJsonQuery:()=>gn,skip:()=>fn,sqltag:()=>Ii,warnEnvConflicts:()=>ec,warnOnce:()=>Wt});module.exports=sc(Sg);var Yn={};it(Yn,{defineExtension:()=>Oo,getExtensionContext:()=>Do});function Oo(e){return typeof e=="function"?e:t=>t.$extends(e)}function Do(e){return e}var Zn={};it(Zn,{validator:()=>_o});function _o(...e){return t=>t}var Vr={};it(Vr,{$:()=>Vo,bgBlack:()=>hc,bgBlue:()=>xc,bgCyan:()=>Pc,bgGreen:()=>wc,bgMagenta:()=>bc,bgRed:()=>yc,bgWhite:()=>vc,bgYellow:()=>Ec,black:()=>dc,blue:()=>Qe,bold:()=>X,cyan:()=>Te,dim:()=>Ue,gray:()=>qt,green:()=>$t,grey:()=>gc,hidden:()=>cc,inverse:()=>uc,italic:()=>lc,magenta:()=>mc,red:()=>ve,reset:()=>ac,strikethrough:()=>pc,underline:()=>ne,white:()=>fc,yellow:()=>Be});var Xn,Mo,No,Fo,Lo=!0;typeof process<"u"&&({FORCE_COLOR:Xn,NODE_DISABLE_COLORS:Mo,NO_COLOR:No,TERM:Fo}=process.env||{},Lo=process.stdout&&process.stdout.isTTY);var Vo={enabled:!Mo&&No==null&&Fo!=="dumb"&&(Xn!=null&&Xn!=="0"||Lo)};function M(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Vo.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var ac=M(0,0),X=M(1,22),Ue=M(2,22),lc=M(3,23),ne=M(4,24),uc=M(7,27),cc=M(8,28),pc=M(9,29),dc=M(30,39),ve=M(31,39),$t=M(32,39),Be=M(33,39),Qe=M(34,39),mc=M(35,39),Te=M(36,39),fc=M(37,39),qt=M(90,39),gc=M(90,39),hc=M(40,49),yc=M(41,49),wc=M(42,49),Ec=M(43,49),xc=M(44,49),bc=M(45,49),Pc=M(46,49),vc=M(47,49);var Tc=100,$o=["green","yellow","blue","magenta","cyan","red"],jt=[],qo=Date.now(),Cc=0,ei=typeof process<"u"?process.env:{};globalThis.DEBUG??=ei.DEBUG??"";globalThis.DEBUG_COLORS??=ei.DEBUG_COLORS?ei.DEBUG_COLORS==="true":!0;var Ut={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 Ac(e){let t={color:$o[Cc++%$o.length],enabled:Ut.enabled(e),namespace:e,log:Ut.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&jt.push([o,...n]),jt.length>Tc&&jt.shift(),Ut.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:Sc(c)),u=`+${Date.now()-qo}ms`;qo=Date.now(),globalThis.DEBUG_COLORS?a(Vr[s](X(o)),...l,Vr[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var L=new Proxy(Ac,{get:(e,t)=>Ut[t],set:(e,t,r)=>Ut[t]=r});function Sc(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 jo(e=7500){let t=jt.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 Uo(){jt.length=0}var Bo=L;var kc=Qo(),ti=kc.version;function ot(e){let t=Ic();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":e?.config.engineType==="client"?"client":Oc(e))}function Ic(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":e==="client"?"client":void 0}function Oc(e){return e?.previewFeatures.includes("queryCompiler")?"client":"library"}var Wo=$(Go(),1);function ri(e){let t=(0,Wo.default)(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}var Jo="prisma+postgres",$r=`${Jo}:`;function ni(e){return e?.startsWith(`${$r}//`)??!1}var Qt={};it(Qt,{error:()=>Mc,info:()=>_c,log:()=>Dc,query:()=>Nc,should:()=>Yo,tags:()=>Bt,warn:()=>ii});var Bt={error:ve("prisma:error"),warn:Be("prisma:warn"),info:Te("prisma:info"),query:Qe("prisma:query")},Yo={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Dc(...e){console.log(...e)}function ii(e,...t){Yo.warn()&&console.warn(`${Bt.warn} ${e}`,...t)}function _c(e,...t){console.info(`${Bt.info} ${e}`,...t)}function Mc(e,...t){console.error(`${Bt.error} ${e}`,...t)}function Nc(e,...t){console.log(`${Bt.query} ${e}`,...t)}function ce(e,t){throw new Error(t)}var Ht=$(require("node:path"));function si(e){return Ht.default.sep===Ht.default.posix.sep?e:e.split(Ht.default.sep).join(Ht.default.posix.sep)}var pi=$(os()),jr=$(require("node:fs"));var st=$(require("node:path"));function ss(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 ci=Bo("prisma:tryLoadEnv");function Gt({rootEnvPath:e,schemaEnvPath:t},r={conflictCheck:"none"}){let n=as(e);r.conflictCheck!=="none"&&Zc(n,t,r.conflictCheck);let i=null;return ls(n?.path,t)||(i=as(t)),!n&&!i&&ci("No Environment variables loaded"),i?.dotenvResult.error?console.error(ve(X("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(`
`),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Zc(e,t,r){let n=e?.dotenvResult.parsed,i=!ls(e?.path,t);if(n&&t&&i&&jr.default.existsSync(t)){let o=pi.default.parse(jr.default.readFileSync(t)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=st.default.relative(process.cwd(),e.path),l=st.default.relative(process.cwd(),t);if(r==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${ne(a)} and ${ne(l)}
Conflicting env vars:
${s.map(c=>` ${X(c)}`).join(`
`)}
We suggest to move the contents of ${ne(l)} to ${ne(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=>X(c)).join(", ")} in ${ne(a)} and ${ne(l)}
Env vars from ${ne(l)} overwrite the ones from ${ne(a)}
`;console.warn(`${Be("warn(prisma)")} ${u}`)}}}}function as(e){if(Xc(e)){ci(`Environment variables loaded from ${e}`);let t=pi.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:ss(t),message:Ue(`Environment variables loaded from ${st.default.relative(process.cwd(),e)}`),path:e}}else ci(`Environment variables not found at ${e}`);return null}function ls(e,t){return e&&t&&st.default.resolve(e)===st.default.resolve(t)}function Xc(e){return!!(e&&jr.default.existsSync(e))}function di(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function at(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function mi(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 cs=new Set,Wt=(e,t,...r)=>{cs.has(e)||(cs.add(e),ii(t,...r))};var k=class e extends Error{clientVersion;errorCode;retryable;constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};b(k,"PrismaClientInitializationError");var U=class extends Error{code;meta;clientVersion;batchRequestIdx;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(U,"PrismaClientKnownRequestError");var pe=class extends Error{clientVersion;constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};b(pe,"PrismaClientRustPanicError");var z=class extends Error{clientVersion;batchRequestIdx;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(z,"PrismaClientUnknownRequestError");var Y=class extends Error{name="PrismaClientValidationError";clientVersion;constructor(t,{clientVersion:r}){super(t),this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};b(Y,"PrismaClientValidationError");var lt=9e15,Me=1e9,fi="0123456789abcdef",Hr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Gr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",gi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-lt,maxE:lt,crypto:!1},gs,Ae,x=!0,Jr="[DecimalError] ",_e=Jr+"Invalid argument: ",hs=Jr+"Precision limit exceeded",ys=Jr+"crypto unavailable",ws="[object Decimal]",Z=Math.floor,j=Math.pow,ep=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,tp=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Es=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,de=1e7,E=7,np=9007199254740991,ip=Hr.length-1,hi=Gr.length-1,f={toStringTag:ws};f.absoluteValue=f.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};f.ceil=function(){return y(new this.constructor(this),this.e+1,2)};f.clampedTo=f.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(_e+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};f.comparedTo=f.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};f.cosine=f.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())+E,n.rounding=1,r=op(n,Ts(n,r)),n.precision=e,n.rounding=t,y(Ae==2||Ae==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};f.cubeRoot=f.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(x=!1,o=c.s*j(c.s*c,1/3),!o||Math.abs(o)==1/0?(r=H(c.d),e=c.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=j(r,1/3),e=Z((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=_(u.plus(c).times(a),u.plus(l),s+2,1),H(a.d).slice(0,s)===(r=H(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 x=!0,y(n,e,p.rounding,t)};f.decimalPlaces=f.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-Z(this.e/E))*E,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};f.dividedBy=f.div=function(e){return _(this,new this.constructor(e))};f.dividedToIntegerBy=f.divToInt=function(e){var t=this,r=t.constructor;return y(_(t,new r(e),0,1,1),r.precision,r.rounding)};f.equals=f.eq=function(e){return this.cmp(e)===0};f.floor=function(){return y(new this.constructor(this),this.e+1,3)};f.greaterThan=f.gt=function(e){return this.cmp(e)>0};f.greaterThanOrEqualTo=f.gte=function(e){var t=this.cmp(e);return t==1||t===0};f.hyperbolicCosine=f.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/zr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=ut(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)};f.hyperbolicSine=f.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=ut(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/zr(5,e)),i=ut(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)};f.hyperbolicTangent=f.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,_(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};f.inverseCosine=f.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,i=t.rounding;return r!==-1?r===0?e.isNeg()?ge(t,n,i):new t(0):new t(NaN):e.isZero()?ge(t,n+4,i).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=i,e.times(2))};f.inverseHyperbolicCosine=f.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,x=!1,r=r.times(r).minus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};f.inverseHyperbolicSine=f.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,x=!1,r=r.times(r).plus(1).sqrt().plus(r),x=!0,n.precision=e,n.rounding=t,r.ln())};f.inverseHyperbolicTangent=f.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=_(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)};f.inverseSine=f.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=ge(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)))};f.inverseTangent=f.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=hi)return s=ge(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=hi)return s=ge(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,r=Math.min(28,a/E+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,t=Math.ceil(a/E),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)),x=!0,y(s,c.precision=p,c.rounding=d,!0)};f.isFinite=function(){return!!this.d};f.isInteger=f.isInt=function(){return!!this.d&&Z(this.e/E)>this.d.length-2};f.isNaN=function(){return!this.s};f.isNegative=f.isNeg=function(){return this.s<0};f.isPositive=f.isPos=function(){return this.s>0};f.isZero=function(){return!!this.d&&this.d[0]===0};f.lessThan=f.lt=function(e){return this.cmp(e)<0};f.lessThanOrEqualTo=f.lte=function(e){return this.cmp(e)<1};f.logarithm=f.log=function(e){var t,r,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,m=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(x=!1,a=p+m,s=De(u,a),n=t?Wr(c,a+10):De(e,a),l=_(s,n,a,1),Jt(l.d,i=p,d))do if(a+=10,s=De(u,a),n=t?Wr(c,a+10):De(e,a),l=_(s,n,a,1),!o){+H(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(Jt(l.d,i+=10,d));return x=!0,y(l,p,d)};f.minus=f.sub=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,m=this,g=m.constructor;if(e=new g(e),!m.d||!e.d)return!m.s||!e.s?e=new g(NaN):m.d?e.s=-e.s:e=new g(e.d||m.s!==e.s?m:NaN),e;if(m.s!=e.s)return e.s=-e.s,m.plus(e);if(u=m.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(m);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(r=Z(e.e/E),c=Z(m.e/E),u=u.slice(),o=c-r,o){for(p=o<0,p?(t=u,o=-o,s=d.length):(t=d,r=c,s=u.length),n=Math.max(Math.ceil(a/E),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=d.length,p=n<s,p&&(s=n),n=0;n<s;n++)if(u[n]!=d[n]){p=u[n]<d[n];break}o=0}for(p&&(t=u,u=d,d=t,e.s=-e.s),s=u.length,n=d.length-s;n>0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]<d[n]){for(i=n;i&&u[--i]===0;)u[i]=de-1;--u[i],u[n]+=de}u[n]-=d[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(e.d=u,e.e=Kr(u,r),x?y(e,a,l):e):new g(l===3?-0:0)};f.modulo=f.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):(x=!1,n.modulo==9?(t=_(r,e.abs(),0,3,1),t.s*=e.s):t=_(r,e,0,n.modulo,1),t=t.times(e),x=!0,r.minus(t))};f.naturalExponential=f.exp=function(){return yi(this)};f.naturalLogarithm=f.ln=function(){return De(this)};f.negated=f.neg=function(){var e=new this.constructor(this);return e.s=-e.s,y(e)};f.plus=f.add=function(e){var t,r,n,i,o,s,a,l,u,c,p=this,d=p.constructor;if(e=new d(e),!p.d||!e.d)return!p.s||!e.s?e=new d(NaN):p.d||(e=new d(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=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(p)),x?y(e,a,l):e;if(o=Z(p.e/E),n=Z(e.e/E),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/E),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)/de|0,u[i]%=de;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=Kr(u,n),x?y(e,a,l):e};f.precision=f.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_e+e);return r.d?(t=xs(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};f.round=function(){var e=this,t=e.constructor;return y(new t(e),e.e+1,t.rounding)};f.sine=f.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())+E,n.rounding=1,r=ap(n,Ts(n,r)),n.precision=e,n.rounding=t,y(Ae>2?r.neg():r,e,t,!0)):new n(NaN)};f.squareRoot=f.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(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=H(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=Z((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(_(s,o,r+2,1)).times(.5),H(o.d).slice(0,r)===(t=H(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 x=!0,y(n,l,c.rounding,e)};f.tangent=f.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=_(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,y(Ae==2||Ae==4?r.neg():r,e,t,!0)):new n(NaN)};f.times=f.mul=function(e){var t,r,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,m=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!m||!m[0])return new p(!e.s||d&&!d[0]&&!m||m&&!m[0]&&!d?NaN:!d||!m?e.s/0:e.s*0);for(r=Z(c.e/E)+Z(e.e/E),l=d.length,u=m.length,l<u&&(o=d,d=m,m=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]+m[n]*d[i-n-1]+t,o[i--]=a%de|0,t=a/de|0;o[i]=(o[i]+t)%de|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=Kr(o,r),x?y(e,p.precision,p.rounding):e};f.toBinary=function(e,t){return wi(this,2,e,t)};f.toDecimalPlaces=f.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ie(e,0,Me),t===void 0?t=n.rounding:ie(t,0,8),y(r,e+r.e+1,t))};f.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(ie(e,0,Me),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};f.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(ie(e,0,Me),t===void 0?t=o.rounding:ie(t,0,8),n=y(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};f.toFraction=function(e){var t,r,n,i,o,s,a,l,u,c,p,d,m=this,g=m.d,h=m.constructor;if(!g)return new h(m);if(u=r=new h(1),n=l=new h(0),t=new h(n),o=t.e=xs(g)-m.e-1,s=o%E,t.d[0]=j(10,s<0?E+s:s),e==null)e=o>0?t:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(_e+a);e=a.gt(t)?o>0?t:u:a}for(x=!1,a=new h(H(g)),c=h.precision,h.precision=o=g.length*E*2;p=_(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=_(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=m.s,d=_(u,n,o,1).minus(m).abs().cmp(_(l,r,o,1).minus(m).abs())<1?[u,n]:[l,r],h.precision=c,x=!0,d};f.toHexadecimal=f.toHex=function(e,t){return wi(this,16,e,t)};f.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:ie(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]?(x=!1,r=_(r,e,0,t,1).times(e),x=!0,y(r)):(e.s=r.s,r=e),r};f.toNumber=function(){return+this};f.toOctal=function(e,t){return wi(this,8,e,t)};f.toPower=f.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(j(+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=Z(e.e/E),t>=e.d.length-1&&(r=u<0?-u:u)<=np)return i=bs(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)==0&&(s=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=s,a}return r=j(+a,u),t=r==0||!isFinite(r)?Z(u*(Math.log("0."+H(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):(x=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=yi(e.times(De(a,n+r)),n),i.d&&(i=y(i,n+5,1),Jt(i.d,n,o)&&(t=n+10,i=y(yi(e.times(De(a,t+r)),t),t+5,1),+H(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};f.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ie(e,1,Me),t===void 0?t=i.rounding:ie(t,0,8),n=y(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};f.toSignificantDigits=f.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ie(e,1,Me),t===void 0?t=n.rounding:ie(t,0,8)),y(new n(r),e,t)};f.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};f.truncated=f.trunc=function(){return y(new this.constructor(this),this.e+1,1)};f.valueOf=f.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function H(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=E-n.length,r&&(o+=Oe(r)),o+=n;s=e[t],n=s+"",r=E-n.length,r&&(o+=Oe(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function ie(e,t,r){if(e!==~~e||e<t||e>r)throw Error(_e+e)}function Jt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=E,i=0):(i=Math.ceil((t+1)/E),t%=E),o=j(10,E-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==