@capgo/cli 4.34.5 → 4.34.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18,16 +18,16 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
18
18
  `),this.outputHelp({error:!0}));let n=r||{},i=n.exitCode||1,o=n.code||"commander.error";this._exit(i,o,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in ve.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,ve.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new wN(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=s=>{let a=s.attributeName(),u=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),l=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||s},i=s=>{let a=n(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);i=i.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=qb(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(o=>{i.push(o.name()),o.alias()&&i.push(o.alias())}),r=qb(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
19
19
  `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>DN(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=yn.basename(e,yn.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,o;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:o}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let o=this.helpInformation({error:n.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let r=Number(ve.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
20
20
  Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
21
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Mb(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function dp(){if(ve.env.NO_COLOR||ve.env.FORCE_COLOR==="0"||ve.env.FORCE_COLOR==="false")return!1;if(ve.env.FORCE_COLOR||ve.env.CLICOLOR_FORCE!==void 0)return!0}hp.Command=fp;hp.useColor=dp});var Gb=D(lr=>{var{Argument:Vb}=Jc(),{Command:pp}=Ub(),{CommanderError:_N,InvalidArgumentError:Hb}=Ia(),{Help:EN}=ip(),{Option:zb}=up();lr.program=new pp;lr.createCommand=t=>new pp(t);lr.createOption=(t,e)=>new zb(t,e);lr.createArgument=(t,e)=>new Vb(t,e);lr.Command=pp;lr.Option=zb;lr.Argument=Vb;lr.Help=EN;lr.CommanderError=_N;lr.InvalidArgumentError=Hb;lr.InvalidOptionArgumentError=Hb});var Te=D((Lse,Kb)=>{"use strict";var mp="\x1B",Me=`${mp}[`,SN="\x07",gp={to(t,e){return e?`${Me}${e+1};${t+1}H`:`${Me}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Me}${-t}D`:t>0&&(r+=`${Me}${t}C`),e<0?r+=`${Me}${-e}A`:e>0&&(r+=`${Me}${e}B`),r},up:(t=1)=>`${Me}${t}A`,down:(t=1)=>`${Me}${t}B`,forward:(t=1)=>`${Me}${t}C`,backward:(t=1)=>`${Me}${t}D`,nextLine:(t=1)=>`${Me}E`.repeat(t),prevLine:(t=1)=>`${Me}F`.repeat(t),left:`${Me}G`,hide:`${Me}?25l`,show:`${Me}?25h`,save:`${mp}7`,restore:`${mp}8`},xN={up:(t=1)=>`${Me}S`.repeat(t),down:(t=1)=>`${Me}T`.repeat(t)},FN={screen:`${Me}2J`,up:(t=1)=>`${Me}1J`.repeat(t),down:(t=1)=>`${Me}J`.repeat(t),line:`${Me}2K`,lineEnd:`${Me}K`,lineStart:`${Me}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?gp.up():"");return t&&(e+=gp.left),e}};Kb.exports={cursor:gp,scroll:xN,erase:FN,beep:SN}});var Dp=D((Bse,yp)=>{var Qc=process||{},Yb=Qc.argv||[],Zc=Qc.env||{},ON=!(Zc.NO_COLOR||Yb.includes("--no-color"))&&(!!Zc.FORCE_COLOR||Yb.includes("--color")||Qc.platform==="win32"||(Qc.stdout||{}).isTTY&&Zc.TERM!=="dumb"||!!Zc.CI),AN=(t,e,r=t)=>n=>{let i=""+n,o=i.indexOf(e,t.length);return~o?t+kN(i,e,r,o)+e:t+i+e},kN=(t,e,r,n)=>{let i="",o=0;do i+=t.substring(o,n)+r,o=n+e.length,n=t.indexOf(e,o);while(~n);return i+t.substring(o)},Jb=(t=ON)=>{let e=t?AN:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};yp.exports=Jb();yp.exports.createColors=Jb});var cl=D(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.isNXMonorepo=qt.isMonorepo=qt.findPackageRelativePathInMonorepo=qt.findPackagePath=qt.findNXMonorepoRoot=qt.findMonorepoRoot=void 0;var La=require("node:fs"),Gn=require("node:path");function ul(t){let e=(0,Gn.join)(t,"package.json"),r=(0,Gn.join)(t,"pnpm-workspace.yaml");if((0,La.existsSync)(r)||(0,La.existsSync)(e)&&JSON.parse((0,La.readFileSync)(e,"utf-8")).workspaces)return t;let n=(0,Gn.dirname)(t);if(n===t)throw new Error("Monorepo root not found");return ul(n)}qt.findMonorepoRoot=ul;function Tp(t){let e=(0,Gn.join)(t,"nx.json");if((0,La.existsSync)(e))return t;let r=(0,Gn.dirname)(t);if(r===t)throw new Error("Monorepo root not found");return Tp(r)}qt.findNXMonorepoRoot=Tp;function Pp(t,e,r){let n=(0,Gn.join)(e,"node_modules",t);if((0,La.existsSync)(n))return n;if(e===r)return null;let i=(0,Gn.dirname)(e);return Pp(t,i,r)}qt.findPackagePath=Pp;function aL(t,e){let r=ul(e),n=Pp(t,e,r);return n?(0,Gn.relative)(e,n):null}qt.findPackageRelativePathInMonorepo=aL;function uL(t){try{return ul(t),!0}catch{return!1}}qt.isMonorepo=uL;function cL(t){try{return Tp(t),!0}catch{return!1}}qt.isNXMonorepo=cL});var Si={};_i(Si,{default:()=>lL});var lL,xi=Et(()=>{lL={}});var mw=D($r=>{"use strict";var fL=$r&&$r.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),dL=$r&&$r.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hL=$r&&$r.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fL(e,t,r);return dL(e,t),e};Object.defineProperty($r,"__esModule",{value:!0});$r.resolveFetch=void 0;var pL=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>hL((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};$r.resolveFetch=pL});var jp=D(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.FunctionRegion=tr.FunctionsHttpError=tr.FunctionsRelayError=tr.FunctionsFetchError=tr.FunctionsError=void 0;var Vo=class extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}};tr.FunctionsError=Vo;var Rp=class extends Vo{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}};tr.FunctionsFetchError=Rp;var $p=class extends Vo{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}};tr.FunctionsRelayError=$p;var Ip=class extends Vo{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}};tr.FunctionsHttpError=Ip;var mL;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(mL=tr.FunctionRegion||(tr.FunctionRegion={}))});var gw=D(Ho=>{"use strict";var gL=Ho&&Ho.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.FunctionsClient=void 0;var yL=mw(),fl=jp(),Np=class{constructor(e,{headers:r={},customFetch:n,region:i=fl.FunctionRegion.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=(0,yL.resolveFetch)(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,r={}){var n;return gL(this,void 0,void 0,function*(){try{let{headers:i,method:o,body:s}=r,a={},{region:u}=r;u||(u=this.region),u&&u!=="any"&&(a["x-region"]=u);let c;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",c=s):typeof s=="string"?(a["Content-Type"]="text/plain",c=s):typeof FormData<"u"&&s instanceof FormData?c=s:(a["Content-Type"]="application/json",c=JSON.stringify(s)));let l=yield this.fetch(`${this.url}/${e}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:c}).catch(m=>{throw new fl.FunctionsFetchError(m)}),f=l.headers.get("x-relay-error");if(f&&f==="true")throw new fl.FunctionsRelayError(l);if(!l.ok)throw new fl.FunctionsHttpError(l);let h=((n=l.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),d;return h==="application/json"?d=yield l.json():h==="application/octet-stream"?d=yield l.blob():h==="text/event-stream"?d=l:h==="multipart/form-data"?d=yield l.formData():d=yield l.text(),{data:d,error:null}}catch(i){return{data:null,error:i}}})}};Ho.FunctionsClient=Np});var Lp=D(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.FunctionRegion=Mt.FunctionsRelayError=Mt.FunctionsHttpError=Mt.FunctionsFetchError=Mt.FunctionsError=Mt.FunctionsClient=void 0;var DL=gw();Object.defineProperty(Mt,"FunctionsClient",{enumerable:!0,get:function(){return DL.FunctionsClient}});var qa=jp();Object.defineProperty(Mt,"FunctionsError",{enumerable:!0,get:function(){return qa.FunctionsError}});Object.defineProperty(Mt,"FunctionsFetchError",{enumerable:!0,get:function(){return qa.FunctionsFetchError}});Object.defineProperty(Mt,"FunctionsHttpError",{enumerable:!0,get:function(){return qa.FunctionsHttpError}});Object.defineProperty(Mt,"FunctionsRelayError",{enumerable:!0,get:function(){return qa.FunctionsRelayError}});Object.defineProperty(Mt,"FunctionRegion",{enumerable:!0,get:function(){return qa.FunctionRegion}})});var Mp=D(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var Bp=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}};qp.default=Bp});var Vp=D(Ma=>{"use strict";var yw=Ma&&Ma.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ma,"__esModule",{value:!0});var vL=yw((xi(),je(Si))),bL=yw(Mp()),Up=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=vL.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=Object.assign({},this.headers),this.headers[e]=r,this}then(e,r){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");let n=this.fetch,i=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var s,a,u;let c=null,l=null,f=null,h=o.status,d=o.statusText;if(o.ok){if(this.method!=="HEAD"){let _=await o.text();_===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?l=_:l=JSON.parse(_))}let b=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),y=(a=o.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");b&&y&&y.length>1&&(f=parseInt(y[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(l)&&(l.length>1?(c={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,f=null,h=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{let b=await o.text();try{c=JSON.parse(b),Array.isArray(c)&&o.status===404&&(l=[],c=null,h=200,d="OK")}catch{o.status===404&&b===""?(h=204,d="No Content"):c={message:b}}if(c&&this.isMaybeSingle&&(!((u=c?.details)===null||u===void 0)&&u.includes("0 rows"))&&(c=null,h=200,d="OK"),c&&this.shouldThrowOnError)throw new bL.default(c)}return{error:c,data:l,count:f,status:h,statusText:d}});return this.shouldThrowOnError||(i=i.catch(o=>{var s,a,u;return{error:{message:`${(s=o?.name)!==null&&s!==void 0?s:"FetchError"}: ${o?.message}`,details:`${(a=o?.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(u=o?.code)!==null&&u!==void 0?u:""}`},data:null,count:null,status:0,statusText:""}})),i.then(e,r)}};Ma.default=Up});var zp=D(Ua=>{"use strict";var wL=Ua&&Ua.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ua,"__esModule",{value:!0});var _L=wL(Vp()),Hp=class extends _L.default{select(e){let r=!1,n=(e??"*").split("").map(i=>/\s/.test(i)&&!r?"":(i==='"'&&(r=!r),i)).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:r=!0,nullsFirst:n,foreignTable:i,referencedTable:o=i}={}){let s=o?`${o}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${e}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:r,referencedTable:n=r}={}){let i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,r,{foreignTable:n,referencedTable:i=n}={}){let o=typeof i>"u"?"offset":`${i}.offset`,s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(s,`${r-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:r=!1,settings:n=!1,buffers:i=!1,wal:o=!1,format:s="text"}={}){var a;let u=[e?"analyze":null,r?"verbose":null,n?"settings":null,i?"buffers":null,o?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${c}"; options=${u};`,s==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};Ua.default=Hp});var dl=D(Va=>{"use strict";var EL=Va&&Va.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Va,"__esModule",{value:!0});var CL=EL(zp()),Gp=class extends CL.default{eq(e,r){return this.url.searchParams.append(e,`eq.${r}`),this}neq(e,r){return this.url.searchParams.append(e,`neq.${r}`),this}gt(e,r){return this.url.searchParams.append(e,`gt.${r}`),this}gte(e,r){return this.url.searchParams.append(e,`gte.${r}`),this}lt(e,r){return this.url.searchParams.append(e,`lt.${r}`),this}lte(e,r){return this.url.searchParams.append(e,`lte.${r}`),this}like(e,r){return this.url.searchParams.append(e,`like.${r}`),this}likeAllOf(e,r){return this.url.searchParams.append(e,`like(all).{${r.join(",")}}`),this}likeAnyOf(e,r){return this.url.searchParams.append(e,`like(any).{${r.join(",")}}`),this}ilike(e,r){return this.url.searchParams.append(e,`ilike.${r}`),this}ilikeAllOf(e,r){return this.url.searchParams.append(e,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(e,r){return this.url.searchParams.append(e,`ilike(any).{${r.join(",")}}`),this}is(e,r){return this.url.searchParams.append(e,`is.${r}`),this}in(e,r){let n=Array.from(new Set(r)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cs.{${r.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(r)}`),this}containedBy(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cd.{${r.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(r)}`),this}rangeGt(e,r){return this.url.searchParams.append(e,`sr.${r}`),this}rangeGte(e,r){return this.url.searchParams.append(e,`nxl.${r}`),this}rangeLt(e,r){return this.url.searchParams.append(e,`sl.${r}`),this}rangeLte(e,r){return this.url.searchParams.append(e,`nxr.${r}`),this}rangeAdjacent(e,r){return this.url.searchParams.append(e,`adj.${r}`),this}overlaps(e,r){return typeof r=="string"?this.url.searchParams.append(e,`ov.${r}`):this.url.searchParams.append(e,`ov.{${r.join(",")}}`),this}textSearch(e,r,{config:n,type:i}={}){let o="";i==="plain"?o="pl":i==="phrase"?o="ph":i==="websearch"&&(o="w");let s=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${o}fts${s}.${r}`),this}match(e){return Object.entries(e).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(e,r,n){return this.url.searchParams.append(e,`not.${r}.${n}`),this}or(e,{foreignTable:r,referencedTable:n=r}={}){let i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,r,n){return this.url.searchParams.append(e,`${r}.${n}`),this}};Va.default=Gp});var Kp=D(za=>{"use strict";var SL=za&&za.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(za,"__esModule",{value:!0});var Ha=SL(dl()),Wp=class{constructor(e,{headers:r={},schema:n,fetch:i}){this.url=e,this.headers=r,this.schema=n,this.fetch=i}select(e,{head:r=!1,count:n}={}){let i=r?"HEAD":"GET",o=!1,s=(e??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",s),n&&(this.headers.Prefer=`count=${n}`),new Ha.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:r,defaultToNull:n=!0}={}){let i="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),n||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){let s=e.reduce((a,u)=>a.concat(Object.keys(u)),[]);if(s.length>0){let a=[...new Set(s)].map(u=>`"${u}"`);this.url.searchParams.set("columns",a.join(","))}}return new Ha.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:r,ignoreDuplicates:n=!1,count:i,defaultToNull:o=!0}={}){let s="POST",a=[`resolution=${n?"ignore":"merge"}-duplicates`];if(r!==void 0&&this.url.searchParams.set("on_conflict",r),this.headers.Prefer&&a.push(this.headers.Prefer),i&&a.push(`count=${i}`),o||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){let u=e.reduce((c,l)=>c.concat(Object.keys(l)),[]);if(u.length>0){let c=[...new Set(u)].map(l=>`"${l}"`);this.url.searchParams.set("columns",c.join(","))}}return new Ha.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:r}={}){let n="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),r&&i.push(`count=${r}`),this.headers.Prefer=i.join(","),new Ha.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){let r="DELETE",n=[];return e&&n.push(`count=${e}`),this.headers.Prefer&&n.unshift(this.headers.Prefer),this.headers.Prefer=n.join(","),new Ha.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};za.default=Wp});var Dw=D(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.version=void 0;hl.version="0.0.0-automated"});var vw=D(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.DEFAULT_HEADERS=void 0;var xL=Dw();pl.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${xL.version}`}});var ww=D(Ga=>{"use strict";var bw=Ga&&Ga.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ga,"__esModule",{value:!0});var FL=bw(Kp()),OL=bw(dl()),AL=vw(),Yp=class t{constructor(e,{headers:r={},schema:n,fetch:i}={}){this.url=e,this.headers=Object.assign(Object.assign({},AL.DEFAULT_HEADERS),r),this.schemaName=n,this.fetch=i}from(e){let r=new URL(`${this.url}/${e}`);return new FL.default(r,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new t(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,r={},{head:n=!1,get:i=!1,count:o}={}){let s,a=new URL(`${this.url}/rpc/${e}`),u;n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([l,f])=>f!==void 0).map(([l,f])=>[l,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([l,f])=>{a.searchParams.append(l,f)})):(s="POST",u=r);let c=Object.assign({},this.headers);return o&&(c.Prefer=`count=${o}`),new OL.default({method:s,url:a,headers:c,schema:this.schemaName,body:u,fetch:this.fetch,allowEmpty:!1})}};Ga.default=Yp});var Jp=D(Dt=>{"use strict";var zo=Dt&&Dt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.PostgrestError=Dt.PostgrestBuilder=Dt.PostgrestTransformBuilder=Dt.PostgrestFilterBuilder=Dt.PostgrestQueryBuilder=Dt.PostgrestClient=void 0;var _w=zo(ww());Dt.PostgrestClient=_w.default;var Ew=zo(Kp());Dt.PostgrestQueryBuilder=Ew.default;var Cw=zo(dl());Dt.PostgrestFilterBuilder=Cw.default;var Sw=zo(zp());Dt.PostgrestTransformBuilder=Sw.default;var xw=zo(Vp());Dt.PostgrestBuilder=xw.default;var Fw=zo(Mp());Dt.PostgrestError=Fw.default;Dt.default={PostgrestClient:_w.default,PostgrestQueryBuilder:Ew.default,PostgrestFilterBuilder:Cw.default,PostgrestTransformBuilder:Sw.default,PostgrestBuilder:xw.default,PostgrestError:Fw.default}});var Zp={};_i(Zp,{RealtimeClient:()=>Xp});var Xp,Qp=Et(()=>{Xp=class{constructor(){}connect(){}disconnect(){}}});var Ka=D(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.StorageUnknownError=Ir.StorageApiError=Ir.isStorageError=Ir.StorageError=void 0;var Wa=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};Ir.StorageError=Wa;function kL(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}Ir.isStorageError=kL;var em=class extends Wa{constructor(e,r){super(e),this.name="StorageApiError",this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}};Ir.StorageApiError=em;var tm=class extends Wa{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}};Ir.StorageUnknownError=tm});var ml=D(ut=>{"use strict";var TL=ut&&ut.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),PL=ut&&ut.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ow=ut&&ut.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&TL(e,t,r);return PL(e,t),e},RL=ut&&ut.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(ut,"__esModule",{value:!0});ut.recursiveToCamel=ut.resolveResponse=ut.resolveFetch=void 0;var $L=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Ow((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};ut.resolveFetch=$L;var IL=()=>RL(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Promise.resolve().then(()=>Ow((xi(),je(Si))))).Response:Response});ut.resolveResponse=IL;var jL=t=>{if(Array.isArray(t))return t.map(r=>(0,ut.recursiveToCamel)(r));if(typeof t=="function"||t!==Object(t))return t;let e={};return Object.entries(t).forEach(([r,n])=>{let i=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[i]=(0,ut.recursiveToCamel)(n)}),e};ut.recursiveToCamel=jL});var im=D(Ut=>{"use strict";var Fi=Ut&&Ut.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.remove=Ut.head=Ut.put=Ut.post=Ut.get=void 0;var rm=Ka(),NL=ml(),nm=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),LL=(t,e,r)=>Fi(void 0,void 0,void 0,function*(){let n=yield(0,NL.resolveResponse)();t instanceof n&&!r?.noResolveJson?t.json().then(i=>{e(new rm.StorageApiError(nm(i),t.status||500))}).catch(i=>{e(new rm.StorageUnknownError(nm(i),i))}):e(new rm.StorageUnknownError(nm(t),t))}),BL=(t,e,r,n)=>{let i={method:t,headers:e?.headers||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},e?.headers),n&&(i.body=JSON.stringify(n)),Object.assign(Object.assign({},i),r))};function Ya(t,e,r,n,i,o){return Fi(this,void 0,void 0,function*(){return new Promise((s,a)=>{t(r,BL(e,n,i,o)).then(u=>{if(!u.ok)throw u;return n?.noResolveJson?u:u.json()}).then(u=>s(u)).catch(u=>LL(u,a,n))})})}function qL(t,e,r,n){return Fi(this,void 0,void 0,function*(){return Ya(t,"GET",e,r,n)})}Ut.get=qL;function ML(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"POST",e,n,i,r)})}Ut.post=ML;function UL(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"PUT",e,n,i,r)})}Ut.put=UL;function VL(t,e,r,n){return Fi(this,void 0,void 0,function*(){return Ya(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}Ut.head=VL;function HL(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"DELETE",e,n,i,r)})}Ut.remove=HL});var Tw=D(Ja=>{"use strict";var Vt=Ja&&Ja.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ja,"__esModule",{value:!0});var Ht=Ka(),jr=im(),Aw=ml(),zL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},kw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1},om=class{constructor(e,r={},n,i){this.url=e,this.headers=r,this.bucketId=n,this.fetch=(0,Aw.resolveFetch)(i)}uploadOrUpdate(e,r,n,i){return Vt(this,void 0,void 0,function*(){try{let o,s=Object.assign(Object.assign({},kw),i),a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(s.upsert)}),u=s.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",s.cacheControl),u&&o.append("metadata",this.encodeMetadata(u)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.append("cacheControl",s.cacheControl),u&&o.append("metadata",this.encodeMetadata(u))):(o=n,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,u&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),i?.headers&&(a=Object.assign(Object.assign({},a),i.headers));let c=this._removeEmptyFolders(r),l=this._getFinalPath(c),f=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:o,headers:a},s?.duplex?{duplex:s.duplex}:{})),h=yield f.json();return f.ok?{data:{path:c,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(o){if((0,Ht.isStorageError)(o))return{data:null,error:o};throw o}})}upload(e,r,n){return Vt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,i){return Vt(this,void 0,void 0,function*(){let o=this._removeEmptyFolders(e),s=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",r);try{let u,c=Object.assign({upsert:kw.upsert},i),l=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.append("cacheControl",c.cacheControl)):(u=n,l["cache-control"]=`max-age=${c.cacheControl}`,l["content-type"]=c.contentType);let f=yield this.fetch(a.toString(),{method:"PUT",body:u,headers:l}),h=yield f.json();return f.ok?{data:{path:o,fullPath:h.Key},error:null}:{data:null,error:h}}catch(u){if((0,Ht.isStorageError)(u))return{data:null,error:u};throw u}})}createSignedUploadUrl(e,r){return Vt(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),i=Object.assign({},this.headers);r?.upsert&&(i["x-upsert"]="true");let o=yield(0,jr.post)(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(this.url+o.url),a=s.searchParams.get("token");if(!a)throw new Ht.StorageError("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:a},error:null}}catch(n){if((0,Ht.isStorageError)(n))return{data:null,error:n};throw n}})}update(e,r,n){return Vt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return Vt(this,void 0,void 0,function*(){try{return{data:yield(0,jr.post)(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers}),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}copy(e,r,n){return Vt(this,void 0,void 0,function*(){try{return{data:{path:(yield(0,jr.post)(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}createSignedUrl(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),o=yield(0,jr.post)(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:r},n?.transform?{transform:n.transform}:{}),{headers:this.headers}),s=n?.download?`&download=${n.download===!0?"":n.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${s}`)},{data:o,error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}createSignedUrls(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=yield(0,jr.post)(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),o=n?.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${o}`):null})),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}download(e,r){return Vt(this,void 0,void 0,function*(){let i=typeof r?.transform<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString(r?.transform||{}),s=o?`?${o}`:"";try{let a=this._getFinalPath(e);return{data:yield(yield(0,jr.get)(this.fetch,`${this.url}/${i}/${a}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if((0,Ht.isStorageError)(a))return{data:null,error:a};throw a}})}info(e){return Vt(this,void 0,void 0,function*(){let r=this._getFinalPath(e);try{let n=yield(0,jr.get)(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:(0,Aw.recursiveToCamel)(n),error:null}}catch(n){if((0,Ht.isStorageError)(n))return{data:null,error:n};throw n}})}exists(e){return Vt(this,void 0,void 0,function*(){let r=this._getFinalPath(e);try{return yield(0,jr.head)(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if((0,Ht.isStorageError)(n)&&n instanceof Ht.StorageUnknownError){let i=n.originalError;if([400,404].includes(i?.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){let n=this._getFinalPath(e),i=[],o=r?.download?`download=${r.download===!0?"":r.download}`:"";o!==""&&i.push(o);let a=typeof r?.transform<"u"?"render/image":"object",u=this.transformOptsToQueryString(r?.transform||{});u!==""&&i.push(u);let c=i.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${c}`)}}}remove(e){return Vt(this,void 0,void 0,function*(){try{return{data:yield(0,jr.remove)(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if((0,Ht.isStorageError)(r))return{data:null,error:r};throw r}})}list(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=Object.assign(Object.assign(Object.assign({},zL),r),{prefix:e||""});return{data:yield(0,jr.post)(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){let r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}};Ja.default=om});var Pw=D(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.version=void 0;gl.version="2.7.1"});var Rw=D(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.DEFAULT_HEADERS=void 0;var GL=Pw();yl.DEFAULT_HEADERS={"X-Client-Info":`storage-js/${GL.version}`}});var $w=D(Xa=>{"use strict";var Go=Xa&&Xa.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Xa,"__esModule",{value:!0});var WL=Rw(),Wo=Ka(),Ko=im(),KL=ml(),sm=class{constructor(e,r={},n){this.url=e,this.headers=Object.assign(Object.assign({},WL.DEFAULT_HEADERS),r),this.fetch=(0,KL.resolveFetch)(n)}listBuckets(){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.get)(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if((0,Wo.isStorageError)(e))return{data:null,error:e};throw e}})}getBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.get)(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}createBucket(e,r={public:!1}){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.post)(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if((0,Wo.isStorageError)(n))return{data:null,error:n};throw n}})}updateBucket(e,r){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.put)(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if((0,Wo.isStorageError)(n))return{data:null,error:n};throw n}})}emptyBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.post)(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}deleteBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.remove)(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}};Xa.default=sm});var jw=D(Yo=>{"use strict";var Iw=Yo&&Yo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yo,"__esModule",{value:!0});Yo.StorageClient=void 0;var YL=Iw(Tw()),JL=Iw($w()),am=class extends JL.default{constructor(e,r={},n){super(e,r,n)}from(e){return new YL.default(this.url,this.headers,e,this.fetch)}};Yo.StorageClient=am});var Lw=D(Nw=>{"use strict";Object.defineProperty(Nw,"__esModule",{value:!0})});var qw=D(Nr=>{"use strict";var XL=Nr&&Nr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Bw=Nr&&Nr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&XL(e,t,r)};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.StorageClient=void 0;var ZL=jw();Object.defineProperty(Nr,"StorageClient",{enumerable:!0,get:function(){return ZL.StorageClient}});Bw(Lw(),Nr);Bw(Ka(),Nr)});var Mw=D(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.version=void 0;Dl.version="2.48.1"});var Uw=D(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DEFAULT_REALTIME_OPTIONS=rr.DEFAULT_AUTH_OPTIONS=rr.DEFAULT_DB_OPTIONS=rr.DEFAULT_GLOBAL_OPTIONS=rr.DEFAULT_HEADERS=void 0;var QL=Mw(),Za="";typeof Deno<"u"?Za="deno":typeof document<"u"?Za="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Za="react-native":Za="node";rr.DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${Za}/${QL.version}`};rr.DEFAULT_GLOBAL_OPTIONS={headers:rr.DEFAULT_HEADERS};rr.DEFAULT_DB_OPTIONS={schema:"public"};rr.DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"};rr.DEFAULT_REALTIME_OPTIONS={}});var Hw=D(ct=>{"use strict";var eB=ct&&ct.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),tB=ct&&ct.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rB=ct&&ct.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eB(e,t,r);return tB(e,t),e},nB=ct&&ct.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(ct,"__esModule",{value:!0});ct.fetchWithAuth=ct.resolveHeadersConstructor=ct.resolveFetch=void 0;var Vw=rB((xi(),je(Si))),iB=t=>{let e;return t?e=t:typeof fetch>"u"?e=Vw.default:e=fetch,(...r)=>e(...r)};ct.resolveFetch=iB;var oB=()=>typeof Headers>"u"?Vw.Headers:Headers;ct.resolveHeadersConstructor=oB;var sB=(t,e,r)=>{let n=(0,ct.resolveFetch)(r),i=(0,ct.resolveHeadersConstructor)();return(o,s)=>nB(void 0,void 0,void 0,function*(){var a;let u=(a=yield e())!==null&&a!==void 0?a:t,c=new i(s?.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${u}`),n(o,Object.assign(Object.assign({},s),{headers:c}))})};ct.fetchWithAuth=sB});var zw=D(dr=>{"use strict";var aB=dr&&dr.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(dr,"__esModule",{value:!0});dr.applySettingDefaults=dr.isBrowser=dr.stripTrailingSlash=dr.uuid=void 0;function uB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t=="x"?e:e&3|8;return r.toString(16)})}dr.uuid=uB;function cB(t){return t.replace(/\/$/,"")}dr.stripTrailingSlash=cB;var lB=()=>typeof window<"u";dr.isBrowser=lB;function fB(t,e){let{db:r,auth:n,realtime:i,global:o}=t,{db:s,auth:a,realtime:u,global:c}=e,l={db:Object.assign(Object.assign({},s),r),auth:Object.assign(Object.assign({},a),n),realtime:Object.assign(Object.assign({},u),i),global:Object.assign(Object.assign({},c),o),accessToken:()=>aB(this,void 0,void 0,function*(){return""})};return t.accessToken?l.accessToken=t.accessToken:delete l.accessToken,l}dr.applySettingDefaults=fB});var um=D(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.version=void 0;vl.version="2.67.3"});var bl=D(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.API_VERSIONS=lt.API_VERSION_HEADER_NAME=lt.NETWORK_FAILURE=lt.EXPIRY_MARGIN=lt.DEFAULT_HEADERS=lt.AUDIENCE=lt.STORAGE_KEY=lt.GOTRUE_URL=void 0;var dB=um();lt.GOTRUE_URL="http://localhost:9999";lt.STORAGE_KEY="supabase.auth.token";lt.AUDIENCE="";lt.DEFAULT_HEADERS={"X-Client-Info":`gotrue-js/${dB.version}`};lt.EXPIRY_MARGIN=10;lt.NETWORK_FAILURE={MAX_RETRIES:10,RETRY_INTERVAL:2};lt.API_VERSION_HEADER_NAME="X-Supabase-Api-Version";lt.API_VERSIONS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}}});var Jo=D(te=>{"use strict";var hB=te&&te.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),pB=te&&te.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mB=te&&te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hB(e,t,r);return pB(e,t),e};Object.defineProperty(te,"__esModule",{value:!0});te.parseResponseAPIVersion=te.getCodeChallengeAndMethod=te.generatePKCEChallenge=te.generatePKCEVerifier=te.retryable=te.sleep=te.decodeJWTPayload=te.Deferred=te.decodeBase64URL=te.removeItemAsync=te.getItemAsync=te.setItemAsync=te.looksLikeFetchResponse=te.resolveFetch=te.parseParametersFromURL=te.supportsLocalStorage=te.isBrowser=te.uuid=te.expiresAt=void 0;var gB=bl();function yB(t){return Math.round(Date.now()/1e3)+t}te.expiresAt=yB;function DB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}te.uuid=DB;var vB=()=>typeof window<"u"&&typeof document<"u";te.isBrowser=vB;var Oi={tested:!1,writable:!1},bB=()=>{if(!(0,te.isBrowser)())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Oi.tested)return Oi.writable;let t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Oi.tested=!0,Oi.writable=!0}catch{Oi.tested=!0,Oi.writable=!1}return Oi.writable};te.supportsLocalStorage=bB;function wB(t){let e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,o)=>{e[o]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}te.parseParametersFromURL=wB;var _B=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>mB((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};te.resolveFetch=_B;var EB=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function";te.looksLikeFetchResponse=EB;var CB=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))};te.setItemAsync=CB;var SB=async(t,e)=>{let r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}};te.getItemAsync=SB;var xB=async(t,e)=>{await t.removeItem(e)};te.removeItemAsync=xB;function Gw(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",n,i,o,s,a,u,c,l=0;for(t=t.replace("-","+").replace("_","/");l<t.length;)s=e.indexOf(t.charAt(l++)),a=e.indexOf(t.charAt(l++)),u=e.indexOf(t.charAt(l++)),c=e.indexOf(t.charAt(l++)),n=s<<2|a>>4,i=(a&15)<<4|u>>2,o=(u&3)<<6|c,r=r+String.fromCharCode(n),u!=64&&i!=0&&(r=r+String.fromCharCode(i)),c!=64&&o!=0&&(r=r+String.fromCharCode(o));return r}te.decodeBase64URL=Gw;var wl=class t{constructor(){this.promise=new t.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}};te.Deferred=wl;wl.promiseConstructor=Promise;function FB(t){let e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,r=t.split(".");if(r.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(r[1]))throw new Error("JWT is not valid: payload is not in base64url format");let n=r[1];return JSON.parse(Gw(n))}te.decodeJWTPayload=FB;async function OB(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}te.sleep=OB;function AB(t,e){return new Promise((n,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{let s=await t(o);if(!e(o,null,s)){n(s);return}}catch(s){if(!e(o,s)){i(s);return}}})()})}te.retryable=AB;function kB(t){return("0"+t.toString(16)).substr(-2)}function Ww(){let e=new Uint32Array(56);if(typeof crypto>"u"){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length,i="";for(let o=0;o<56;o++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,kB).join("")}te.generatePKCEVerifier=Ww;async function TB(t){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}function PB(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Kw(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;let r=await TB(t);return PB(r)}te.generatePKCEChallenge=Kw;async function RB(t,e,r=!1){let n=Ww(),i=n;r&&(i+="/PASSWORD_RECOVERY"),await(0,te.setItemAsync)(t,`${e}-code-verifier`,i);let o=await Kw(n);return[o,n===o?"plain":"s256"]}te.getCodeChallengeAndMethod=RB;var $B=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function IB(t){let e=t.headers.get(gB.API_VERSION_HEADER_NAME);if(!e||!e.match($B))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}te.parseResponseAPIVersion=IB});var Qa=D(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.isAuthWeakPasswordError=le.AuthWeakPasswordError=le.isAuthRetryableFetchError=le.AuthRetryableFetchError=le.AuthPKCEGrantCodeExchangeError=le.isAuthImplicitGrantRedirectError=le.AuthImplicitGrantRedirectError=le.AuthInvalidCredentialsError=le.AuthInvalidTokenResponseError=le.isAuthSessionMissingError=le.AuthSessionMissingError=le.CustomAuthError=le.AuthUnknownError=le.isAuthApiError=le.AuthApiError=le.isAuthError=le.AuthError=void 0;var Xo=class extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}};le.AuthError=Xo;function Zo(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}le.isAuthError=Zo;var cm=class extends Xo{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}};le.AuthApiError=cm;function jB(t){return Zo(t)&&t.name==="AuthApiError"}le.isAuthApiError=jB;var lm=class extends Xo{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}};le.AuthUnknownError=lm;var Lr=class extends Xo{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}};le.CustomAuthError=Lr;var fm=class extends Lr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}};le.AuthSessionMissingError=fm;function NB(t){return Zo(t)&&t.name==="AuthSessionMissingError"}le.isAuthSessionMissingError=NB;var dm=class extends Lr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}};le.AuthInvalidTokenResponseError=dm;var hm=class extends Lr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}};le.AuthInvalidCredentialsError=hm;var pm=class extends Lr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};le.AuthImplicitGrantRedirectError=pm;function LB(t){return Zo(t)&&t.name==="AuthImplicitGrantRedirectError"}le.isAuthImplicitGrantRedirectError=LB;var mm=class extends Lr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};le.AuthPKCEGrantCodeExchangeError=mm;var gm=class extends Lr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}};le.AuthRetryableFetchError=gm;function BB(t){return Zo(t)&&t.name==="AuthRetryableFetchError"}le.isAuthRetryableFetchError=BB;var ym=class extends Lr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}};le.AuthWeakPasswordError=ym;function qB(t){return Zo(t)&&t.name==="AuthWeakPasswordError"}le.isAuthWeakPasswordError=qB});var bm=D(nt=>{"use strict";var MB=nt&&nt.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};Object.defineProperty(nt,"__esModule",{value:!0});nt._noResolveJsonResponse=nt._generateLinkResponse=nt._ssoResponse=nt._userResponse=nt._sessionResponsePassword=nt._sessionResponse=nt._request=nt.handleError=void 0;var _l=bl(),Dm=Jo(),Wn=Qa(),Ai=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),UB=[502,503,504];async function vm(t){var e;if(!(0,Dm.looksLikeFetchResponse)(t))throw new Wn.AuthRetryableFetchError(Ai(t),0);if(UB.includes(t.status))throw new Wn.AuthRetryableFetchError(Ai(t),t.status);let r;try{r=await t.json()}catch(o){throw new Wn.AuthUnknownError(Ai(o),o)}let n,i=(0,Dm.parseResponseAPIVersion)(t);if(i&&i.getTime()>=_l.API_VERSIONS["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Wn.AuthWeakPasswordError(Ai(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wn.AuthSessionMissingError}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,s)=>o&&typeof s=="string",!0))throw new Wn.AuthWeakPasswordError(Ai(r),t.status,r.weak_password.reasons);throw new Wn.AuthApiError(Ai(r),t.status||500,n)}nt.handleError=vm;var VB=(t,e,r,n)=>{let i={method:t,headers:e?.headers||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function HB(t,e,r,n){var i;let o=Object.assign({},n?.headers);o[_l.API_VERSION_HEADER_NAME]||(o[_l.API_VERSION_HEADER_NAME]=_l.API_VERSIONS["2024-01-01"].name),n?.jwt&&(o.Authorization=`Bearer ${n.jwt}`);let s=(i=n?.query)!==null&&i!==void 0?i:{};n?.redirectTo&&(s.redirect_to=n.redirectTo);let a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",u=await zB(t,e,r+a,{headers:o,noResolveJson:n?.noResolveJson},{},n?.body);return n?.xform?n?.xform(u):{data:Object.assign({},u),error:null}}nt._request=HB;async function zB(t,e,r,n,i,o){let s=VB(e,n,i,o),a;try{a=await t(r,Object.assign({},s))}catch(u){throw console.error(u),new Wn.AuthRetryableFetchError(Ai(u),0)}if(a.ok||await vm(a),n?.noResolveJson)return a;try{return await a.json()}catch(u){await vm(u)}}function Yw(t){var e;let r=null;XB(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=(0,Dm.expiresAt)(t.expires_in)));let n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}nt._sessionResponse=Yw;function GB(t){let e=Yw(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}nt._sessionResponsePassword=GB;function WB(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}nt._userResponse=WB;function KB(t){return{data:t,error:null}}nt._ssoResponse=KB;function YB(t){let{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o}=t,s=MB(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o},u=Object.assign({},s);return{data:{properties:a,user:u},error:null}}nt._generateLinkResponse=YB;function JB(t){return t}nt._noResolveJsonResponse=JB;function XB(t){return t.access_token&&t.refresh_token&&t.expires_in}});var El=D(eu=>{"use strict";var ZB=eu&&eu.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};Object.defineProperty(eu,"__esModule",{value:!0});var vt=bm(),QB=Jo(),Br=Qa(),wm=class{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=(0,QB.resolveFetch)(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,r="global"){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if((0,Br.isAuthError)(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{let{options:r}=e,n=ZB(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n?.newEmail,delete i.newEmail),await(0,vt._request)(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:vt._generateLinkResponse,redirectTo:r?.redirectTo})}catch(r){if((0,Br.isAuthError)(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:vt._userResponse})}catch(r){if((0,Br.isAuthError)(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,o,s,a,u;try{let c={nextPage:null,lastPage:0,total:0},l=await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(i=e?.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:vt._noResolveJsonResponse});if(l.error)throw l.error;let f=await l.json(),h=(s=l.headers.get("x-total-count"))!==null&&s!==void 0?s:0,d=(u=(a=l.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&u!==void 0?u:[];return d.length>0&&(d.forEach(m=>{let b=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(m.split(";")[1].split("=")[1]);c[`${y}Page`]=b}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if((0,Br.isAuthError)(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){try{return await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:vt._userResponse})}catch(r){if((0,Br.isAuthError)(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){try{return await(0,vt._request)(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){try{return await(0,vt._request)(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){try{let{data:r,error:n}=await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if((0,Br.isAuthError)(r))return{data:null,error:r};throw r}}async _deleteFactor(e){try{return{data:await(0,vt._request)(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if((0,Br.isAuthError)(r))return{data:null,error:r};throw r}}};eu.default=wm});var Jw=D(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.memoryLocalStorageAdapter=Qo.localStorageAdapter=void 0;var _m=Jo();Qo.localStorageAdapter={getItem:t=>(0,_m.supportsLocalStorage)()?globalThis.localStorage.getItem(t):null,setItem:(t,e)=>{(0,_m.supportsLocalStorage)()&&globalThis.localStorage.setItem(t,e)},removeItem:t=>{(0,_m.supportsLocalStorage)()&&globalThis.localStorage.removeItem(t)}};function eq(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}Qo.memoryLocalStorageAdapter=eq});var Xw=D(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.polyfillGlobalThis=void 0;function tq(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}Cl.polyfillGlobalThis=tq});var Em=D(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.processLock=it.navigatorLock=it.ProcessLockAcquireTimeoutError=it.NavigatorLockAcquireTimeoutError=it.LockAcquireTimeoutError=it.internals=void 0;var rq=Jo();it.internals={debug:!!(globalThis&&(0,rq.supportsLocalStorage)()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};var tu=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};it.LockAcquireTimeoutError=tu;var Sl=class extends tu{};it.NavigatorLockAcquireTimeoutError=Sl;var xl=class extends tu{};it.ProcessLockAcquireTimeoutError=xl;async function nq(t,e,r){it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);let n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Sl(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(it.internals.debug)try{let o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}it.navigatorLock=nq;var Zw={};async function iq(t,e,r){var n;let i=(n=Zw[t])!==null&&n!==void 0?n:Promise.resolve(),o=Promise.race([i.catch(()=>null),e>=0?new Promise((s,a)=>{setTimeout(()=>{a(new xl(`Acquring process lock with name "${t}" timed out`))},e)}):null].filter(s=>s)).catch(s=>{if(s&&s.isAcquireTimeout)throw s;return null}).then(async()=>await r());return Zw[t]=o.catch(async s=>{if(s&&s.isAcquireTimeout)return await i,null;throw s}),await o}it.processLock=iq});var Sm=D(iu=>{"use strict";var oq=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});var sq=oq(El()),nu=bl(),Z=Qa(),se=bm(),me=Jo(),Cm=Jw(),aq=Xw(),uq=um(),Qw=Em();(0,aq.polyfillGlobalThis)();var cq={url:nu.GOTRUE_URL,storageKey:nu.STORAGE_KEY,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:nu.DEFAULT_HEADERS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},ru=30*1e3,e_=3;async function t_(t,e,r){return await r()}var Fl=class t{constructor(e){var r,n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=t.nextInstanceID,t.nextInstanceID+=1,this.instanceID>0&&(0,me.isBrowser)()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let i=Object.assign(Object.assign({},cq),e);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new sq.default({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=(0,me.resolveFetch)(i.fetch),this.lock=i.lock||t_,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:(0,me.isBrowser)()&&(!((r=globalThis?.navigator)===null||r===void 0)&&r.locks)?this.lock=Qw.navigatorLock:this.lock=t_,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:(0,me.supportsLocalStorage)()?this.storage=Cm.localStorageAdapter:(this.memoryStorage={},this.storage=(0,Cm.memoryLocalStorageAdapter)(this.memoryStorage)):(this.memoryStorage={},this.storage=(0,Cm.memoryLocalStorageAdapter)(this.memoryStorage)),(0,me.isBrowser)()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${uq.version}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r=(0,me.parseParametersFromURL)(window.location.href),n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),(0,me.isBrowser)()&&this.detectSessionInUrl&&n!=="none"){let{data:i,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),(0,Z.isAuthImplicitGrantRedirectError)(o)){let u=(e=o.details)===null||e===void 0?void 0:e.code;if(u==="identity_already_exists"||u==="identity_not_found"||u==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}let{session:s,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",a),await this._saveSession(s),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return(0,Z.isAuthError)(r)?{error:r}:{error:new Z.AuthUnknownError("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{let o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e?.options)===null||i===void 0?void 0:i.captchaToken}},xform:se._sessionResponse}),{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};let u=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(e){var r,n,i;try{let o;if("email"in e){let{email:l,password:f,options:h}=e,d=null,m=null;this.flowType==="pkce"&&([d,m]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey)),o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h?.emailRedirectTo,body:{email:l,password:f,data:(r=h?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:d,code_challenge_method:m},xform:se._sessionResponse})}else if("phone"in e){let{phone:l,password:f,options:h}=e;o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:l,password:f,data:(n=h?.data)!==null&&n!==void 0?n:{},channel:(i=h?.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:se._sessionResponse})}else throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};let u=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{let r;if("email"in e){let{email:o,password:s,options:a}=e;r=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:s,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:se._sessionResponsePassword})}else if("phone"in e){let{phone:o,password:s,options:a}=e;r=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:s,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:se._sessionResponsePassword})}else throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Z.AuthInvalidTokenResponseError}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,i,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){let r=await(0,me.getItemAsync)(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{let{data:o,error:s}=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:se._sessionResponse});if(await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new Z.AuthInvalidTokenResponseError}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:i??null}),error:s})}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(e){try{let{options:r,provider:n,token:i,access_token:o,nonce:s}=e,a=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:o,nonce:s,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:se._sessionResponse}),{data:u,error:c}=a;return c?{data:{user:null,session:null},error:c}:!u||!u.session||!u.user?{data:{user:null,session:null},error:new Z.AuthInvalidTokenResponseError}:(u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),{data:u,error:c})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,i,o,s;try{if("email"in e){let{email:a,options:u}=e,c=null,l=null;this.flowType==="pkce"&&([c,l]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey));let{error:f}=await(0,se._request)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=u?.data)!==null&&r!==void 0?r:{},create_user:(n=u?.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:l},redirectTo:u?.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){let{phone:a,options:u}=e,{data:c,error:l}=await(0,se._request)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=u?.data)!==null&&i!==void 0?i:{},create_user:(o=u?.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:u?.captchaToken},channel:(s=u?.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:c?.message_id},error:l}}throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(a){if((0,Z.isAuthError)(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var r,n;try{let i,o;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,o=(n=e.options)===null||n===void 0?void 0:n.captchaToken);let{data:s,error:a}=await(0,se._request)(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:se._sessionResponse});if(a)throw a;if(!s)throw new Error("An error occurred on token verification.");let u=s.session,c=s.user;return u?.access_token&&(await this._saveSession(u),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(i){if((0,Z.isAuthError)(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(e){var r,n,i;try{let o=null,s=null;return this.flowType==="pkce"&&([o,s]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey)),await(0,se._request)(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e?.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:s}),headers:this.headers,xform:se._ssoResponse})}catch(o){if((0,Z.isAuthError)(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Z.AuthSessionMissingError;let{error:i}=await(0,se._request)(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(e){if((0,Z.isAuthError)(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{let r=`${this.url}/resend`;if("email"in e){let{email:n,type:i,options:o}=e,{error:s}=await(0,se._request)(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:o?.captchaToken}},redirectTo:o?.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in e){let{phone:n,type:i,options:o}=e,{data:s,error:a}=await(0,se._request)(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:o?.captchaToken}}});return{data:{user:null,session:null,messageId:s?.message_id},error:a}}throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){let i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null,r=await(0,me.getItemAsync)(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.storage.isServer){let s=this.suppressGetSessionWarning;e=new Proxy(e,{get:(u,c,l)=>(!s&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(u,c,l))})}return{data:{session:e},error:null}}let{session:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await(0,se._request)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:se._userResponse}):await this._useSession(async r=>{var n,i,o;let{data:s,error:a}=r;if(a)throw a;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Z.AuthSessionMissingError}:await(0,se._request)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:se._userResponse})})}catch(r){if((0,Z.isAuthError)(r))return(0,Z.isAuthSessionMissingError)(r)&&(await this._removeSession(),await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{let{data:i,error:o}=n;if(o)throw o;if(!i.session)throw new Z.AuthSessionMissingError;let s=i.session,a=null,u=null;this.flowType==="pkce"&&e.email!=null&&([a,u]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey));let{data:c,error:l}=await(0,se._request)(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:u}),jwt:s.access_token,xform:se._userResponse});if(l)throw l;return s.user=c.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(n){if((0,Z.isAuthError)(n))return{data:{user:null},error:n};throw n}}_decodeJWT(e){return(0,me.decodeJWTPayload)(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Z.AuthSessionMissingError;let r=Date.now()/1e3,n=r,i=!0,o=null,s=(0,me.decodeJWTPayload)(e.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){let{session:a,error:u}=await this._callRefreshToken(e.refresh_token);if(u)return{data:{user:null,session:null},error:u};if(!a)return{data:{user:null,session:null},error:null};o=a}else{let{data:a,error:u}=await this._getUser(e.access_token);if(u)throw u;o={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(r){if((0,Z.isAuthError)(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){let{data:s,error:a}=r;if(a)throw a;e=(n=s.session)!==null&&n!==void 0?n:void 0}if(!e?.refresh_token)throw new Z.AuthSessionMissingError;let{session:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!(0,me.isBrowser)())throw new Z.AuthImplicitGrantRedirectError("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Z.AuthImplicitGrantRedirectError(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Z.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Z.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Z.AuthPKCEGrantCodeExchangeError("No code detected.");let{data:x,error:g}=await this._exchangeCodeForSession(e.code);if(g)throw g;let C=new URL(window.location.href);return C.searchParams.delete("code"),window.history.replaceState(window.history.state,"",C.toString()),{data:{session:x.session,redirectType:null},error:null}}let{provider_token:n,provider_refresh_token:i,access_token:o,refresh_token:s,expires_in:a,expires_at:u,token_type:c}=e;if(!o||!a||!s||!c)throw new Z.AuthImplicitGrantRedirectError("No session defined in URL");let l=Math.round(Date.now()/1e3),f=parseInt(a),h=l+f;u&&(h=parseInt(u));let d=h-l;d*1e3<=ru&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${d}s, should have been closer to ${f}s`);let m=h-f;l-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,h,l):l-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,h,l);let{data:b,error:y}=await this._getUser(o);if(y)throw y;let _={provider_token:n,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:s,token_type:c,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:_,redirectType:e.type},error:null}}catch(n){if((0,Z.isAuthError)(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){let r=await(0,me.getItemAsync)(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;let{data:i,error:o}=r;if(o)return{error:o};let s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){let{error:a}=await this.admin.signOut(s,e);if(a&&!((0,Z.isAuthApiError)(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){let r=(0,me.uuid)(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{let{data:{session:o},error:s}=r;if(s)throw s;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey,!0));try{return await(0,se._request)(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if((0,Z.isAuthError)(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{let{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async linkIdentity(e){var r;try{let{data:n,error:i}=await this._useSession(async o=>{var s,a,u,c,l;let{data:f,error:h}=o;if(h)throw h;let d=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(u=e.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return await(0,se._request)(this.fetch,"GET",d,{headers:this.headers,jwt:(l=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&l!==void 0?l:void 0})});if(i)throw i;return(0,me.isBrowser)()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n?.url),{data:{provider:e.provider,url:n?.url},error:null}}catch(n){if((0,Z.isAuthError)(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;let{data:o,error:s}=r;if(s)throw s;return await(0,se._request)(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){let r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{let n=Date.now();return await(0,me.retryable)(async i=>(i>0&&await(0,me.sleep)(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:se._sessionResponse})),(i,o)=>{let s=200*Math.pow(2,i);return o&&(0,Z.isAuthRetryableFetchError)(o)&&Date.now()+s-n<ru})}catch(n){if(this._debug(r,"error",n),(0,Z.isAuthError)(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){let n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),(0,me.isBrowser)()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e;let r="#_recoverAndRefresh()";this._debug(r,"begin");try{let n=await(0,me.getItemAsync)(this.storage,this.storageKey);if(this._debug(r,"session from storage",n),!this._isValidSession(n)){this._debug(r,"session is not valid"),n!==null&&await this._removeSession();return}let i=Math.round(Date.now()/1e3),o=((e=n.expires_at)!==null&&e!==void 0?e:1/0)<i+nu.EXPIRY_MARGIN;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${nu.EXPIRY_MARGIN}s`),o){if(this.autoRefreshToken&&n.refresh_token){let{error:s}=await this._callRefreshToken(n.refresh_token);s&&(console.error(s),(0,Z.isAuthRetryableFetchError)(s)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",n)}catch(n){this._debug(r,"error",n),console.error(n);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Z.AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new me.Deferred;let{data:o,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!o.session)throw new Z.AuthSessionMissingError;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);let a={session:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(i,"error",o),(0,Z.isAuthError)(o)){let s={session:null,error:o};return(0,Z.isAuthRetryableFetchError)(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){let i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});let o=[],s=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(u){o.push(u)}});if(await Promise.all(s),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await(0,me.setItemAsync)(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await(0,me.removeItemAsync)(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&(0,me.isBrowser)()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),ru);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async r=>{let{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let i=Math.floor((n.expires_at*1e3-e)/ru);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ru}ms, refresh threshold is ${e_} ticks`),i<=e_&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Qw.LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!(0,me.isBrowser)()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){let i=[`provider=${encodeURIComponent(r)}`];if(n?.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){let[o,s]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(a.toString())}if(n?.queryParams){let o=new URLSearchParams(n.queryParams);i.push(o.toString())}return n?.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;return o?{data:null,error:o}:await(0,se._request)(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;let{data:o,error:s}=r;if(s)return{data:null,error:s};let a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:u,error:c}=await(0,se._request)(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o?.session)===null||n===void 0?void 0:n.access_token});return c?{data:null,error:c}:(e.factorType==="totp"&&(!((i=u?.totp)===null||i===void 0)&&i.qr_code)&&(u.totp.qr_code=`data:image/svg+xml;utf-8,${u.totp.qr_code}`),{data:u,error:null})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;if(o)return{data:null,error:o};let{data:s,error:a}=await(0,se._request)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:a})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;return o?{data:null,error:o}:await(0,se._request)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){let{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){let{data:{user:e},error:r}=await this.getUser();if(r)return{data:null,error:r};let n=e?.factors||[],i=n.filter(s=>s.factor_type==="totp"&&s.status==="verified"),o=n.filter(s=>s.factor_type==="phone"&&s.status==="verified");return{data:{all:n,totp:i,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var r,n;let{data:{session:i},error:o}=e;if(o)return{data:null,error:o};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let s=this._decodeJWT(i.access_token),a=null;s.aal&&(a=s.aal);let u=a;((n=(r=i.user.factors)===null||r===void 0?void 0:r.filter(f=>f.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(u="aal2");let l=s.amr||[];return{data:{currentLevel:a,nextLevel:u,currentAuthenticationMethods:l},error:null}}))}};iu.default=Fl;Fl.nextInstanceID=0});var r_=D(ou=>{"use strict";var lq=ou&&ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ou,"__esModule",{value:!0});var fq=lq(El()),dq=fq.default;ou.default=dq});var n_=D(su=>{"use strict";var hq=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});var pq=hq(Sm()),mq=pq.default;su.default=mq});var o_=D(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0})});var Fm=D(Le=>{"use strict";var gq=Le&&Le.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),s_=Le&&Le.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&gq(e,t,r)},Ol=Le&&Le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Le,"__esModule",{value:!0});Le.lockInternals=Le.NavigatorLockAcquireTimeoutError=Le.navigatorLock=Le.AuthClient=Le.AuthAdminApi=Le.GoTrueClient=Le.GoTrueAdminApi=void 0;var yq=Ol(El());Le.GoTrueAdminApi=yq.default;var Dq=Ol(Sm());Le.GoTrueClient=Dq.default;var vq=Ol(r_());Le.AuthAdminApi=vq.default;var bq=Ol(n_());Le.AuthClient=bq.default;s_(o_(),Le);s_(Qa(),Le);var xm=Em();Object.defineProperty(Le,"navigatorLock",{enumerable:!0,get:function(){return xm.navigatorLock}});Object.defineProperty(Le,"NavigatorLockAcquireTimeoutError",{enumerable:!0,get:function(){return xm.NavigatorLockAcquireTimeoutError}});Object.defineProperty(Le,"lockInternals",{enumerable:!0,get:function(){return xm.internals}})});var a_=D(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.SupabaseAuthClient=void 0;var wq=Fm(),Om=class extends wq.AuthClient{constructor(e){super(e)}};Al.SupabaseAuthClient=Om});var km=D(au=>{"use strict";var _q=au&&au.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(au,"__esModule",{value:!0});var Eq=Lp(),Cq=Jp(),Sq=(Qp(),je(Zp)),xq=qw(),kl=Uw(),Fq=Hw(),u_=zw(),Oq=a_(),Am=class{constructor(e,r,n){var i,o,s;if(this.supabaseUrl=e,this.supabaseKey=r,!e)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");let a=(0,u_.stripTrailingSlash)(e);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;let u=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,c={db:kl.DEFAULT_DB_OPTIONS,realtime:kl.DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},kl.DEFAULT_AUTH_OPTIONS),{storageKey:u}),global:kl.DEFAULT_GLOBAL_OPTIONS},l=(0,u_.applySettingDefaults)(n??{},c);this.storageKey=(i=l.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=l.global.headers)!==null&&o!==void 0?o:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=l.auth)!==null&&s!==void 0?s:{},this.headers,l.global.fetch),this.fetch=(0,Fq.fetchWithAuth)(r,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.rest=new Cq.PostgrestClient(`${a}/rest/v1`,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),l.accessToken||this._listenForAuthEvents()}get functions(){return new Eq.FunctionsClient(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new xq.StorageClient(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,r;return _q(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();let{data:n}=yield this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,storageKey:o,flowType:s,lock:a,debug:u},c,l){let f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Oq.SupabaseAuthClient({url:this.authUrl,headers:Object.assign(Object.assign({},f),c),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,flowType:s,lock:a,debug:u,fetch:l,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new Sq.RealtimeClient(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n?.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};au.default=Am});var f_=D(Fe=>{"use strict";var Aq=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),c_=Fe&&Fe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Aq(e,t,r)},l_=Fe&&Fe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.createClient=Fe.SupabaseClient=Fe.FunctionRegion=Fe.FunctionsError=Fe.FunctionsRelayError=Fe.FunctionsFetchError=Fe.FunctionsHttpError=Fe.PostgrestError=void 0;var kq=l_(km());c_(Fm(),Fe);var Tq=Jp();Object.defineProperty(Fe,"PostgrestError",{enumerable:!0,get:function(){return Tq.PostgrestError}});var uu=Lp();Object.defineProperty(Fe,"FunctionsHttpError",{enumerable:!0,get:function(){return uu.FunctionsHttpError}});Object.defineProperty(Fe,"FunctionsFetchError",{enumerable:!0,get:function(){return uu.FunctionsFetchError}});Object.defineProperty(Fe,"FunctionsRelayError",{enumerable:!0,get:function(){return uu.FunctionsRelayError}});Object.defineProperty(Fe,"FunctionsError",{enumerable:!0,get:function(){return uu.FunctionsError}});Object.defineProperty(Fe,"FunctionRegion",{enumerable:!0,get:function(){return uu.FunctionRegion}});c_((Qp(),je(Zp)),Fe);var Pq=km();Object.defineProperty(Fe,"SupabaseClient",{enumerable:!0,get:function(){return l_(Pq).default}});var Rq=(t,e,r)=>new kq.default(t,e,r);Fe.createClient=Rq});var Tm=D((Yae,d_)=>{d_.exports=require("stream")});var D_=D((Jae,y_)=>{"use strict";function h_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function p_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h_(Object(r),!0).forEach(function(n){$q(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $q(t,e,r){return e=g_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g_(n.key),n)}}function jq(t,e,r){return e&&m_(t.prototype,e),r&&m_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g_(t){var e=Nq(t,"string");return typeof e=="symbol"?e:String(e)}function Nq(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lq=require("buffer"),Tl=Lq.Buffer,Bq=require("util"),Pm=Bq.inspect,qq=Pm&&Pm.custom||"inspect";function Mq(t,e,r){Tl.prototype.copy.call(t,e,r)}y_.exports=function(){function t(){Iq(this,t),this.head=null,this.tail=null,this.length=0}return jq(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return Tl.alloc(0);for(var n=Tl.allocUnsafe(r>>>0),i=this.head,o=0;i;)Mq(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=Tl.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:qq,value:function(r,n){return Pm(this,p_(p_({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var $m=D((Xae,b_)=>{"use strict";function Uq(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Rm,this,t)):process.nextTick(Rm,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Pl,r):(r._writableState.errorEmitted=!0,process.nextTick(v_,r,o)):process.nextTick(v_,r,o):e?(process.nextTick(Pl,r),e(o)):process.nextTick(Pl,r)}),this)}function v_(t,e){Rm(t,e),Pl(t)}function Pl(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Vq(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Rm(t,e){t.emit("error",e)}function Hq(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}b_.exports={destroy:Uq,undestroy:Vq,errorOrDestroy:Hq}});var Kn=D((Zae,E_)=>{"use strict";var __={};function hr(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,__[t]=i}function w_(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function zq(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Gq(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Wq(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}hr("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);hr("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&zq(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Gq(t," argument"))i=`The ${t} ${n} ${w_(e,"type")}`;else{let o=Wq(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${w_(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);hr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");hr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});hr("ERR_STREAM_PREMATURE_CLOSE","Premature close");hr("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});hr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");hr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");hr("ERR_STREAM_WRITE_AFTER_END","write after end");hr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);hr("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);hr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");E_.exports.codes=__});var Im=D((Qae,C_)=>{"use strict";var Kq=Kn().codes.ERR_INVALID_OPT_VALUE;function Yq(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Jq(t,e,r,n){var i=Yq(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new Kq(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}C_.exports={getHighWaterMark:Jq}});var S_=D((eue,jm)=>{typeof Object.create=="function"?jm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jm.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var es=D((tue,Lm)=>{try{if(Nm=require("util"),typeof Nm.inherits!="function")throw"";Lm.exports=Nm.inherits}catch{Lm.exports=S_()}var Nm});var F_=D((rue,x_)=>{x_.exports=require("util").deprecate});var Mm=D((nue,R_)=>{"use strict";R_.exports=Ye;function A_(t){var e=this;this.next=null,this.entry=null,this.finish=function(){EM(e,t)}}var ts;Ye.WritableState=lu;var Xq={deprecate:F_()},k_=Tm(),$l=require("buffer").Buffer,Zq=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Qq(t){return $l.from(t)}function eM(t){return $l.isBuffer(t)||t instanceof Zq}var qm=$m(),tM=Im(),rM=tM.getHighWaterMark,Yn=Kn().codes,nM=Yn.ERR_INVALID_ARG_TYPE,iM=Yn.ERR_METHOD_NOT_IMPLEMENTED,oM=Yn.ERR_MULTIPLE_CALLBACK,sM=Yn.ERR_STREAM_CANNOT_PIPE,aM=Yn.ERR_STREAM_DESTROYED,uM=Yn.ERR_STREAM_NULL_VALUES,cM=Yn.ERR_STREAM_WRITE_AFTER_END,lM=Yn.ERR_UNKNOWN_ENCODING,rs=qm.errorOrDestroy;es()(Ye,k_);function fM(){}function lu(t,e,r){ts=ts||ki(),t=t||{},typeof r!="boolean"&&(r=e instanceof ts),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=rM(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){DM(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A_(this)}lu.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(lu.prototype,"buffer",{get:Xq.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Rl;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Rl=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(e){return Rl.call(this,e)?!0:this!==Ye?!1:e&&e._writableState instanceof lu}})):Rl=function(e){return e instanceof this};function Ye(t){ts=ts||ki();var e=this instanceof ts;if(!e&&!Rl.call(Ye,this))return new Ye(t);this._writableState=new lu(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),k_.call(this)}Ye.prototype.pipe=function(){rs(this,new sM)};function dM(t,e){var r=new cM;rs(t,r),process.nextTick(e,r)}function hM(t,e,r,n){var i;return r===null?i=new uM:typeof r!="string"&&!e.objectMode&&(i=new nM("chunk",["string","Buffer"],r)),i?(rs(t,i),process.nextTick(n,i),!1):!0}Ye.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&eM(t);return o&&!$l.isBuffer(t)&&(t=Qq(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=fM),n.ending?dM(this,r):(o||hM(this,n,t,r))&&(n.pendingcb++,i=mM(this,n,o,t,e,r)),i};Ye.prototype.cork=function(){this._writableState.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&T_(this,t))};Ye.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new lM(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function pM(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=$l.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function mM(t,e,r,n,i,o){if(!r){var s=pM(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Bm(t,e,!1,a,n,i,o);return u}function Bm(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new aM("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function gM(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(cu,t,e),t._writableState.errorEmitted=!0,rs(t,n)):(i(n),t._writableState.errorEmitted=!0,rs(t,n),cu(t,e))}function yM(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function DM(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new oM;if(yM(r),e)gM(t,r,n,e,i);else{var o=P_(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&T_(t,r),n?process.nextTick(O_,t,r,o,i):O_(t,r,o,i)}}function O_(t,e,r,n){r||vM(t,e),e.pendingcb--,n(),cu(t,e)}function vM(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function T_(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,Bm(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new A_(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,f=e.objectMode?1:u.length;if(Bm(t,e,!1,f,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new iM("_write()"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||_M(this,n,r),this};Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P_(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function bM(t,e){t._final(function(r){e.pendingcb--,r&&rs(t,r),e.prefinished=!0,t.emit("prefinish"),cu(t,e)})}function wM(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(bM,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function cu(t,e){var r=P_(e);if(r&&(wM(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function _M(t,e,r){e.ending=!0,cu(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function EM(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ye.prototype.destroy=qm.destroy;Ye.prototype._undestroy=qm.undestroy;Ye.prototype._destroy=function(t,e){e(t)}});var ki=D((iue,I_)=>{"use strict";var CM=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};I_.exports=qr;var $_=Hm(),Vm=Mm();es()(qr,$_);for(Um=CM(Vm.prototype),Il=0;Il<Um.length;Il++)jl=Um[Il],qr.prototype[jl]||(qr.prototype[jl]=Vm.prototype[jl]);var Um,jl,Il;function qr(t){if(!(this instanceof qr))return new qr(t);$_.call(this,t),Vm.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",SM)))}Object.defineProperty(qr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(qr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(qr.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function SM(){this._writableState.ended||process.nextTick(xM,this)}function xM(t){t.end()}Object.defineProperty(qr.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var L_=D((zm,N_)=>{var Nl=require("buffer"),Mr=Nl.Buffer;function j_(t,e){for(var r in t)e[r]=t[r]}Mr.from&&Mr.alloc&&Mr.allocUnsafe&&Mr.allocUnsafeSlow?N_.exports=Nl:(j_(Nl,zm),zm.Buffer=Ti);function Ti(t,e,r){return Mr(t,e,r)}Ti.prototype=Object.create(Mr.prototype);j_(Mr,Ti);Ti.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Mr(t,e,r)};Ti.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Mr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Ti.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Mr(t)};Ti.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Nl.SlowBuffer(t)}});var Km=D(q_=>{"use strict";var Wm=L_().Buffer,B_=Wm.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function FM(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function OM(t){var e=FM(t);if(typeof e!="string"&&(Wm.isEncoding===B_||!B_(t)))throw new Error("Unknown encoding: "+t);return e||t}q_.StringDecoder=fu;function fu(t){this.encoding=OM(t);var e;switch(this.encoding){case"utf16le":this.text=$M,this.end=IM,e=4;break;case"utf8":this.fillLast=TM,e=4;break;case"base64":this.text=jM,this.end=NM,e=3;break;default:this.write=LM,this.end=BM;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Wm.allocUnsafe(e)}fu.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};fu.prototype.end=RM;fu.prototype.text=PM;fu.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Gm(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function AM(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Gm(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Gm(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Gm(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function kM(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function TM(t){var e=this.lastTotal-this.lastNeed,r=kM(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function PM(t,e){var r=AM(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function RM(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function $M(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function IM(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function jM(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function NM(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function LM(t){return t.toString(this.encoding)}function BM(t){return t&&t.length?this.write(t):""}});var Ll=D((sue,V_)=>{"use strict";var M_=Kn().codes.ERR_STREAM_PREMATURE_CLOSE;function qM(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function MM(){}function UM(t){return t.setHeader&&typeof t.abort=="function"}function U_(t,e,r){if(typeof e=="function")return U_(t,null,e);e||(e={}),r=qM(r||MM);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){n=!1,u=!0,i||r.call(t)},l=function(m){r.call(t,m)},f=function(){var m;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(m=new M_),r.call(t,m);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(m=new M_),r.call(t,m)},h=function(){t.req.on("finish",a)};return UM(t)?(t.on("complete",a),t.on("abort",f),t.req?h():t.on("request",h)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",c),t.on("finish",a),e.error!==!1&&t.on("error",l),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",f)}}V_.exports=U_});var z_=D((aue,H_)=>{"use strict";var Bl;function Jn(t,e,r){return e=VM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VM(t){var e=HM(t,"string");return typeof e=="symbol"?e:String(e)}function HM(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zM=Ll(),Xn=Symbol("lastResolve"),Pi=Symbol("lastReject"),du=Symbol("error"),ql=Symbol("ended"),Ri=Symbol("lastPromise"),Ym=Symbol("handlePromise"),$i=Symbol("stream");function Zn(t,e){return{value:t,done:e}}function GM(t){var e=t[Xn];if(e!==null){var r=t[$i].read();r!==null&&(t[Ri]=null,t[Xn]=null,t[Pi]=null,e(Zn(r,!1)))}}function WM(t){process.nextTick(GM,t)}function KM(t,e){return function(r,n){t.then(function(){if(e[ql]){r(Zn(void 0,!0));return}e[Ym](r,n)},n)}}var YM=Object.getPrototypeOf(function(){}),JM=Object.setPrototypeOf((Bl={get stream(){return this[$i]},next:function(){var e=this,r=this[du];if(r!==null)return Promise.reject(r);if(this[ql])return Promise.resolve(Zn(void 0,!0));if(this[$i].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[du]?a(e[du]):s(Zn(void 0,!0))})});var n=this[Ri],i;if(n)i=new Promise(KM(n,this));else{var o=this[$i].read();if(o!==null)return Promise.resolve(Zn(o,!1));i=new Promise(this[Ym])}return this[Ri]=i,i}},Jn(Bl,Symbol.asyncIterator,function(){return this}),Jn(Bl,"return",function(){var e=this;return new Promise(function(r,n){e[$i].destroy(null,function(i){if(i){n(i);return}r(Zn(void 0,!0))})})}),Bl),YM),XM=function(e){var r,n=Object.create(JM,(r={},Jn(r,$i,{value:e,writable:!0}),Jn(r,Xn,{value:null,writable:!0}),Jn(r,Pi,{value:null,writable:!0}),Jn(r,du,{value:null,writable:!0}),Jn(r,ql,{value:e._readableState.endEmitted,writable:!0}),Jn(r,Ym,{value:function(o,s){var a=n[$i].read();a?(n[Ri]=null,n[Xn]=null,n[Pi]=null,o(Zn(a,!1))):(n[Xn]=o,n[Pi]=s)},writable:!0}),r));return n[Ri]=null,zM(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[Pi];o!==null&&(n[Ri]=null,n[Xn]=null,n[Pi]=null,o(i)),n[du]=i;return}var s=n[Xn];s!==null&&(n[Ri]=null,n[Xn]=null,n[Pi]=null,s(Zn(void 0,!0))),n[ql]=!0}),e.on("readable",WM.bind(null,n)),n};H_.exports=XM});var Y_=D((uue,K_)=>{"use strict";function G_(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function ZM(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){G_(o,n,i,s,a,"next",u)}function a(u){G_(o,n,i,s,a,"throw",u)}s(void 0)})}}function W_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function QM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?W_(Object(r),!0).forEach(function(n){e4(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):W_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function e4(t,e,r){return e=t4(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function t4(t){var e=r4(t,"string");return typeof e=="symbol"?e:String(e)}function r4(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var n4=Kn().codes.ERR_INVALID_ARG_TYPE;function i4(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new n4("iterable",["Iterable"],e);var i=new t(QM({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=ZM(function*(){try{var u=yield n.next(),c=u.value,l=u.done;l?i.push(null):i.push(yield c)?s():o=!1}catch(f){i.destroy(f)}}),a.apply(this,arguments)}return i}K_.exports=i4});var Hm=D((lue,oE)=>{"use strict";oE.exports=ge;var ns;ge.ReadableState=Q_;var cue=require("events").EventEmitter,Z_=function(e,r){return e.listeners(r).length},pu=Tm(),Ml=require("buffer").Buffer,o4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s4(t){return Ml.from(t)}function a4(t){return Ml.isBuffer(t)||t instanceof o4}var Jm=require("util"),ae;Jm&&Jm.debuglog?ae=Jm.debuglog("stream"):ae=function(){};var u4=D_(),ng=$m(),c4=Im(),l4=c4.getHighWaterMark,Ul=Kn().codes,f4=Ul.ERR_INVALID_ARG_TYPE,d4=Ul.ERR_STREAM_PUSH_AFTER_EOF,h4=Ul.ERR_METHOD_NOT_IMPLEMENTED,p4=Ul.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,is,Xm,Zm;es()(ge,pu);var hu=ng.errorOrDestroy,Qm=["error","close","destroy","pause","resume"];function m4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Q_(t,e,r){ns=ns||ki(),t=t||{},typeof r!="boolean"&&(r=e instanceof ns),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=l4(this,t,"readableHighWaterMark",r),this.buffer=new u4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(is||(is=Km().StringDecoder),this.decoder=new is(t.encoding),this.encoding=t.encoding)}function ge(t){if(ns=ns||ki(),!(this instanceof ge))return new ge(t);var e=this instanceof ns;this._readableState=new Q_(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),pu.call(this)}Object.defineProperty(ge.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});ge.prototype.destroy=ng.destroy;ge.prototype._undestroy=ng.undestroy;ge.prototype._destroy=function(t,e){e(t)};ge.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ml.from(t,e),e=""),n=!0),eE(this,t,e,!1,n)};ge.prototype.unshift=function(t){return eE(this,t,null,!0,!1)};function eE(t,e,r,n,i){ae("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,D4(t,o);else{var s;if(i||(s=g4(o,e)),s)hu(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Ml.prototype&&(e=s4(e)),n)o.endEmitted?hu(t,new p4):eg(t,o,e,!0);else if(o.ended)hu(t,new d4);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?eg(t,o,e,!1):rg(t,o)):eg(t,o,e,!1)}else n||(o.reading=!1,rg(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function eg(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vl(t)),rg(t,e)}function g4(t,e){var r;return!a4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new f4("chunk",["string","Buffer","Uint8Array"],e)),r}ge.prototype.isPaused=function(){return this._readableState.flowing===!1};ge.prototype.setEncoding=function(t){is||(is=Km().StringDecoder);var e=new is(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var J_=1073741824;function y4(t){return t>=J_?t=J_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function X_(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=y4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ge.prototype.read=function(t){ae("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ae("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?tg(this):Vl(this),null;if(t=X_(t,e),t===0&&e.ended)return e.length===0&&tg(this),null;var n=e.needReadable;ae("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,ae("length less than watermark",n)),e.ended||e.reading?(n=!1,ae("reading or ended",n)):n&&(ae("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=X_(r,e)));var i;return t>0?i=nE(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&tg(this)),i!==null&&this.emit("data",i),i};function D4(t,e){if(ae("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vl(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,tE(t)))}}function Vl(t){var e=t._readableState;ae("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ae("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(tE,t))}function tE(t){var e=t._readableState;ae("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ig(t)}function rg(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(v4,t,e))}function v4(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(ae("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}ge.prototype._read=function(t){hu(this,new h4("_read()"))};ge.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,ae("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:b;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(y,_){ae("onunpipe"),y===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,l())}function a(){ae("onend"),t.end()}var u=b4(r);t.on("drain",u);var c=!1;function l(){ae("cleanup"),t.removeListener("close",d),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",f);function f(y){ae("ondata");var _=t.write(y);ae("dest.write",_),_===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&iE(n.pipes,t)!==-1)&&!c&&(ae("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(y){ae("onerror",y),b(),t.removeListener("error",h),Z_(t,"error")===0&&hu(t,y)}m4(t,"error",h);function d(){t.removeListener("finish",m),b()}t.once("close",d);function m(){ae("onfinish"),t.removeListener("close",d),b()}t.once("finish",m);function b(){ae("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(ae("pipe resume"),r.resume()),t};function b4(t){return function(){var r=t._readableState;ae("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Z_(t,"data")&&(r.flowing=!0,ig(t))}}ge.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=iE(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ge.prototype.on=function(t,e){var r=pu.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ae("on readable",n.length,n.reading),n.length?Vl(this):n.reading||process.nextTick(w4,this)),r};ge.prototype.addListener=ge.prototype.on;ge.prototype.removeListener=function(t,e){var r=pu.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(rE,this),r};ge.prototype.removeAllListeners=function(t){var e=pu.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(rE,this),e};function rE(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function w4(t){ae("readable nexttick read 0"),t.read(0)}ge.prototype.resume=function(){var t=this._readableState;return t.flowing||(ae("resume"),t.flowing=!t.readableListening,_4(this,t)),t.paused=!1,this};function _4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(E4,t,e))}function E4(t,e){ae("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ig(t),e.flowing&&!e.reading&&t.read(0)}ge.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ig(t){var e=t._readableState;for(ae("flow",e.flowing);e.flowing&&t.read()!==null;);}ge.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(ae("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(ae("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(a){return function(){return t[a].apply(t,arguments)}}(i));for(var o=0;o<Qm.length;o++)t.on(Qm[o],this.emit.bind(this,Qm[o]));return this._read=function(s){ae("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(ge.prototype[Symbol.asyncIterator]=function(){return Xm===void 0&&(Xm=z_()),Xm(this)});Object.defineProperty(ge.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ge.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ge.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});ge._fromList=nE;Object.defineProperty(ge.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function nE(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function tg(t){var e=t._readableState;ae("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(C4,e,t))}function C4(t,e){if(ae("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(ge.from=function(t,e){return Zm===void 0&&(Zm=Y_()),Zm(ge,t,e)});function iE(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var og=D((fue,aE)=>{"use strict";aE.exports=vn;var Hl=Kn().codes,S4=Hl.ERR_METHOD_NOT_IMPLEMENTED,x4=Hl.ERR_MULTIPLE_CALLBACK,F4=Hl.ERR_TRANSFORM_ALREADY_TRANSFORMING,O4=Hl.ERR_TRANSFORM_WITH_LENGTH_0,zl=ki();es()(vn,zl);function A4(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new x4);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function vn(t){if(!(this instanceof vn))return new vn(t);zl.call(this,t),this._transformState={afterTransform:A4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",k4)}function k4(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){sE(t,e,r)}):sE(this,null,null)}vn.prototype.push=function(t,e){return this._transformState.needTransform=!1,zl.prototype.push.call(this,t,e)};vn.prototype._transform=function(t,e,r){r(new S4("_transform()"))};vn.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};vn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};vn.prototype._destroy=function(t,e){zl.prototype._destroy.call(this,t,function(r){e(r)})};function sE(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new O4;if(t._transformState.transforming)throw new F4;return t.push(null)}});var lE=D((due,cE)=>{"use strict";cE.exports=mu;var uE=og();es()(mu,uE);function mu(t){if(!(this instanceof mu))return new mu(t);uE.call(this,t)}mu.prototype._transform=function(t,e,r){r(null,t)}});var mE=D((hue,pE)=>{"use strict";var sg;function T4(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var hE=Kn().codes,P4=hE.ERR_MISSING_ARGS,R4=hE.ERR_STREAM_DESTROYED;function fE(t){if(t)throw t}function $4(t){return t.setHeader&&typeof t.abort=="function"}function I4(t,e,r,n){n=T4(n);var i=!1;t.on("close",function(){i=!0}),sg===void 0&&(sg=Ll()),sg(t,{readable:e,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,$4(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(s||new R4("pipe"))}}}function dE(t){t()}function j4(t,e){return t.pipe(e)}function N4(t){return!t.length||typeof t[t.length-1]!="function"?fE:t.pop()}function L4(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=N4(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new P4("streams");var i,o=e.map(function(s,a){var u=a<e.length-1,c=a>0;return I4(s,u,c,function(l){i||(i=l),l&&o.forEach(dE),!u&&(o.forEach(dE),n(i))})});return e.reduce(j4)}pE.exports=L4});var gE=D((pr,yu)=>{var gu=require("stream");process.env.READABLE_STREAM==="disable"&&gu?(yu.exports=gu.Readable,Object.assign(yu.exports,gu),yu.exports.Stream=gu):(pr=yu.exports=Hm(),pr.Stream=gu||pr,pr.Readable=pr,pr.Writable=Mm(),pr.Duplex=ki(),pr.Transform=og(),pr.PassThrough=lE(),pr.finished=Ll(),pr.pipeline=mE())});var ug=D(ag=>{var yE;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof ag=="object"?t(ag):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(yE={}):t(yE={})})(function(t){t.version="1.2.2";function e(){for(var F=0,L=new Array(256),S=0;S!=256;++S)F=S,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,L[S]=F;return typeof Int32Array<"u"?new Int32Array(L):L}var r=e();function n(F){var L=0,S=0,I=0,$=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(I=0;I!=256;++I)$[I]=F[I];for(I=0;I!=256;++I)for(S=F[I],L=256+I;L<4096;L+=256)S=$[L]=S>>>8^F[S&255];var B=[];for(I=1;I!=16;++I)B[I-1]=typeof Int32Array<"u"?$.subarray(I*256,I*256+256):$.slice(I*256,I*256+256);return B}var i=n(r),o=i[0],s=i[1],a=i[2],u=i[3],c=i[4],l=i[5],f=i[6],h=i[7],d=i[8],m=i[9],b=i[10],y=i[11],_=i[12],x=i[13],g=i[14];function C(F,L){for(var S=L^-1,I=0,$=F.length;I<$;)S=S>>>8^r[(S^F.charCodeAt(I++))&255];return~S}function k(F,L){for(var S=L^-1,I=F.length-15,$=0;$<I;)S=g[F[$++]^S&255]^x[F[$++]^S>>8&255]^_[F[$++]^S>>16&255]^y[F[$++]^S>>>24]^b[F[$++]]^m[F[$++]]^d[F[$++]]^h[F[$++]]^f[F[$++]]^l[F[$++]]^c[F[$++]]^u[F[$++]]^a[F[$++]]^s[F[$++]]^o[F[$++]]^r[F[$++]];for(I+=15;$<I;)S=S>>>8^r[(S^F[$++])&255];return~S}function P(F,L){for(var S=L^-1,I=0,$=F.length,B=0,q=0;I<$;)B=F.charCodeAt(I++),B<128?S=S>>>8^r[(S^B)&255]:B<2048?(S=S>>>8^r[(S^(192|B>>6&31))&255],S=S>>>8^r[(S^(128|B&63))&255]):B>=55296&&B<57344?(B=(B&1023)+64,q=F.charCodeAt(I++)&1023,S=S>>>8^r[(S^(240|B>>8&7))&255],S=S>>>8^r[(S^(128|B>>2&63))&255],S=S>>>8^r[(S^(128|q>>6&15|(B&3)<<4))&255],S=S>>>8^r[(S^(128|q&63))&255]):(S=S>>>8^r[(S^(224|B>>12&15))&255],S=S>>>8^r[(S^(128|B>>6&63))&255],S=S>>>8^r[(S^(128|B&63))&255]);return~S}t.table=r,t.bstr=C,t.buf=k,t.str=P})});var vE=D((mue,DE)=>{"use strict";var{Transform:B4}=gE(),q4=ug(),cg=class extends B4{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,n){e&&(this.checksum=q4.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};DE.exports=cg});var wE=D((gue,bE)=>{"use strict";var{DeflateRaw:M4}=require("zlib"),U4=ug(),lg=class extends M4{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,n){e&&(this.checksum=U4.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,n)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};bE.exports=lg});var EE=D((yue,_E)=>{"use strict";_E.exports={CRC32Stream:vE(),DeflateCRC32Stream:wE()}});var Du=D(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.checksum=os.checksumFile=void 0;var V4=require("fs"),H4=require("crypto"),SE=require("stream"),z4=require("util"),{CRC32Stream:G4}=EE(),CE=(0,z4.promisify)(SE.pipeline),W4=(t,e,r)=>xE(V4.createReadStream(t),e,r);os.checksumFile=W4;async function xE(t,e,r="hex"){let n=Y4(t);if(e==="crc32"){let o=new G4,s=CE(n,o);return o.resume(),await s,o.end(),Buffer.from(o.digest()).toString(r)}let i=(0,H4.createHash)(e);return await CE(n,i),i.end(),i.digest(r)}os.checksum=xE;function K4(t){return t!=null&&typeof t=="object"&&typeof t.read=="function"&&typeof t.pipe=="function"}var Y4=t=>K4(t)?t:new SE.Readable({read(){this.push(t),this.push(null)}})});var fg=D((vue,FE)=>{FE.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Gl=D(AE=>{var OE={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function J4(t){return function(...e){return e.length&&(t=t.replace(/\{(\d)\}/g,(r,n)=>e[n]||"")),new Error("ADM-ZIP: "+t)}}for(let t of Object.keys(OE))AE[t]=J4(OE[t])});var $E=D((wue,RE)=>{var X4=require("fs"),at=require("path"),kE=fg(),Z4=Gl(),Q4=typeof process=="object"&&process.platform==="win32",TE=t=>typeof t=="object"&&t!==null,PE=new Uint32Array(256).map((t,e)=>{for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e>>>=1;return e>>>0});function Je(t){this.sep=at.sep,this.fs=X4,TE(t)&&TE(t.fs)&&typeof t.fs.statSync=="function"&&(this.fs=t.fs)}RE.exports=Je;Je.prototype.makeDir=function(t){let e=this;function r(n){let i=n.split(e.sep)[0];n.split(e.sep).forEach(function(o){if(!(!o||o.substr(-1,1)===":")){i+=e.sep+o;var s;try{s=e.fs.statSync(i)}catch{e.fs.mkdirSync(i)}if(s&&s.isFile())throw Z4.FILE_IN_THE_WAY(`"${i}"`)}})}r(t)};Je.prototype.writeFileTo=function(t,e,r,n){let i=this;if(i.fs.existsSync(t)){if(!r)return!1;var o=i.fs.statSync(t);if(o.isDirectory())return!1}var s=at.dirname(t);i.fs.existsSync(s)||i.makeDir(s);var a;try{a=i.fs.openSync(t,"w",438)}catch{i.fs.chmodSync(t,438),a=i.fs.openSync(t,"w",438)}if(a)try{i.fs.writeSync(a,e,0,e.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(t,n||438),!0};Je.prototype.writeFileToAsync=function(t,e,r,n,i){typeof n=="function"&&(i=n,n=void 0);let o=this;o.fs.exists(t,function(s){if(s&&!r)return i(!1);o.fs.stat(t,function(a,u){if(s&&u.isDirectory())return i(!1);var c=at.dirname(t);o.fs.exists(c,function(l){l||o.makeDir(c),o.fs.open(t,"w",438,function(f,h){f?o.fs.chmod(t,438,function(){o.fs.open(t,"w",438,function(d,m){o.fs.write(m,e,0,e.length,0,function(){o.fs.close(m,function(){o.fs.chmod(t,n||438,function(){i(!0)})})})})}):h?o.fs.write(h,e,0,e.length,0,function(){o.fs.close(h,function(){o.fs.chmod(t,n||438,function(){i(!0)})})}):o.fs.chmod(t,n||438,function(){i(!0)})})})})})};Je.prototype.findFiles=function(t){let e=this;function r(n,i,o){typeof i=="boolean"&&(o=i,i=void 0);let s=[];return e.fs.readdirSync(n).forEach(function(a){let u=at.join(n,a),c=e.fs.statSync(u);(!i||i.test(u))&&s.push(at.normalize(u)+(c.isDirectory()?e.sep:"")),c.isDirectory()&&o&&(s=s.concat(r(u,i,o)))}),s}return r(t,void 0,!0)};Je.prototype.findFilesAsync=function(t,e){let r=this,n=[];r.fs.readdir(t,function(i,o){if(i)return e(i);let s=o.length;if(!s)return e(null,n);o.forEach(function(a){a=at.join(t,a),r.fs.stat(a,function(u,c){if(u)return e(u);c&&(n.push(at.normalize(a)+(c.isDirectory()?r.sep:"")),c.isDirectory()?r.findFilesAsync(a,function(l,f){if(l)return e(l);n=n.concat(f),--s||e(null,n)}):--s||e(null,n))})})})};Je.prototype.getAttributes=function(){};Je.prototype.setAttributes=function(){};Je.crc32update=function(t,e){return PE[(t^e)&255]^t>>>8};Je.crc32=function(t){typeof t=="string"&&(t=Buffer.from(t,"utf8"));let e=t.length,r=-1;for(let n=0;n<e;)r=Je.crc32update(r,t[n++]);return~r>>>0};Je.methodToString=function(t){switch(t){case kE.STORED:return"STORED ("+t+")";case kE.DEFLATED:return"DEFLATED ("+t+")";default:return"UNSUPPORTED ("+t+")"}};Je.canonical=function(t){if(!t)return"";let e=at.posix.normalize("/"+t.split("\\").join("/"));return at.join(".",e)};Je.zipnamefix=function(t){if(!t)return"";let e=at.posix.normalize("/"+t.split("\\").join("/"));return at.posix.join(".",e)};Je.findLast=function(t,e){if(!Array.isArray(t))throw new TypeError("arr is not array");let r=t.length>>>0;for(let n=r-1;n>=0;n--)if(e(t[n],n,t))return t[n]};Je.sanitize=function(t,e){t=at.resolve(at.normalize(t));for(var r=e.split("/"),n=0,i=r.length;n<i;n++){var o=at.normalize(at.join(t,r.slice(n,i).join(at.sep)));if(o.indexOf(t)===0)return o}return at.normalize(at.join(t,at.basename(e)))};Je.toBuffer=function(e,r){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):typeof e=="string"?r(e):Buffer.alloc(0)};Je.readBigUInt64LE=function(t,e){var r=Buffer.from(t.slice(e,e+8));return r.swap64(),parseInt(`0x${r.toString("hex")}`)};Je.fromDOS2Date=function(t){return new Date((t>>25&127)+1980,Math.max((t>>21&15)-1,0),Math.max(t>>16&31,1),t>>11&31,t>>5&63,(t&31)<<1)};Je.fromDate2DOS=function(t){let e=0,r=0;return t.getFullYear()>1979&&(e=(t.getFullYear()-1980&127)<<9|t.getMonth()+1<<5|t.getDate(),r=t.getHours()<<11|t.getMinutes()<<5|t.getSeconds()>>1),e<<16|r};Je.isWin=Q4;Je.crcTable=PE});var jE=D((_ue,IE)=>{var e5=require("path");IE.exports=function(t,{fs:e}){var r=t||"",n=o(),i=null;function o(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&e.existsSync(r)?(i=e.statSync(r),n.directory=i.isDirectory(),n.mtime=i.mtime,n.atime=i.atime,n.executable=(73&i.mode)!==0,n.readonly=(128&i.mode)===0,n.hidden=e5.basename(r)[0]==="."):console.warn("Invalid path: "+r),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:n.directory,isReadOnly:n.readonly,isHidden:n.hidden,isExecutable:n.executable,mTime:n.mtime,aTime:n.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var LE=D((Eue,NE)=>{NE.exports={efs:!0,encode:t=>Buffer.from(t,"utf8"),decode:t=>t.toString("utf8")}});var as=D((Cue,ss)=>{ss.exports=$E();ss.exports.Constants=fg();ss.exports.Errors=Gl();ss.exports.FileAttr=jE();ss.exports.decoder=LE()});var qE=D((Sue,BE)=>{var Qn=as(),U=Qn.Constants;BE.exports=function(){var t=20,e=10,r=0,n=0,i=0,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,m=0;t|=Qn.isWin?2560:768,r|=U.FLG_EFS;let b={extraLen:0},y=g=>Math.max(0,g)>>>0,_=g=>Math.max(0,g)&65535,x=g=>Math.max(0,g)&255;return i=Qn.fromDate2DOS(new Date),{get made(){return t},set made(g){t=g},get version(){return e},set version(g){e=g},get flags(){return r},set flags(g){r=g},get flags_efs(){return(r&U.FLG_EFS)>0},set flags_efs(g){g?r|=U.FLG_EFS:r&=~U.FLG_EFS},get flags_desc(){return(r&U.FLG_DESC)>0},set flags_desc(g){g?r|=U.FLG_DESC:r&=~U.FLG_DESC},get method(){return n},set method(g){switch(g){case U.STORED:this.version=10;case U.DEFLATED:default:this.version=20}n=g},get time(){return Qn.fromDOS2Date(this.timeval)},set time(g){this.timeval=Qn.fromDate2DOS(g)},get timeval(){return i},set timeval(g){i=y(g)},get timeHighByte(){return x(i>>>8)},get crc(){return o},set crc(g){o=y(g)},get compressedSize(){return s},set compressedSize(g){s=y(g)},get size(){return a},set size(g){a=y(g)},get fileNameLength(){return u},set fileNameLength(g){u=g},get extraLength(){return c},set extraLength(g){c=g},get extraLocalLength(){return b.extraLen},set extraLocalLength(g){b.extraLen=g},get commentLength(){return l},set commentLength(g){l=g},get diskNumStart(){return f},set diskNumStart(g){f=y(g)},get inAttr(){return h},set inAttr(g){h=y(g)},get attr(){return d},set attr(g){d=y(g)},get fileAttr(){return(d||0)>>16&4095},get offset(){return m},set offset(g){m=y(g)},get encrypted(){return(r&U.FLG_ENC)===U.FLG_ENC},get centralHeaderSize(){return U.CENHDR+u+c+l},get realDataOffset(){return m+U.LOCHDR+b.fnameLen+b.extraLen},get localHeader(){return b},loadLocalHeaderFromBinary:function(g){var C=g.slice(m,m+U.LOCHDR);if(C.readUInt32LE(0)!==U.LOCSIG)throw Qn.Errors.INVALID_LOC();b.version=C.readUInt16LE(U.LOCVER),b.flags=C.readUInt16LE(U.LOCFLG),b.method=C.readUInt16LE(U.LOCHOW),b.time=C.readUInt32LE(U.LOCTIM),b.crc=C.readUInt32LE(U.LOCCRC),b.compressedSize=C.readUInt32LE(U.LOCSIZ),b.size=C.readUInt32LE(U.LOCLEN),b.fnameLen=C.readUInt16LE(U.LOCNAM),b.extraLen=C.readUInt16LE(U.LOCEXT);let k=m+U.LOCHDR+b.fnameLen,P=k+b.extraLen;return g.slice(k,P)},loadFromBinary:function(g){if(g.length!==U.CENHDR||g.readUInt32LE(0)!==U.CENSIG)throw Qn.Errors.INVALID_CEN();t=g.readUInt16LE(U.CENVEM),e=g.readUInt16LE(U.CENVER),r=g.readUInt16LE(U.CENFLG),n=g.readUInt16LE(U.CENHOW),i=g.readUInt32LE(U.CENTIM),o=g.readUInt32LE(U.CENCRC),s=g.readUInt32LE(U.CENSIZ),a=g.readUInt32LE(U.CENLEN),u=g.readUInt16LE(U.CENNAM),c=g.readUInt16LE(U.CENEXT),l=g.readUInt16LE(U.CENCOM),f=g.readUInt16LE(U.CENDSK),h=g.readUInt16LE(U.CENATT),d=g.readUInt32LE(U.CENATX),m=g.readUInt32LE(U.CENOFF)},localHeaderToBinary:function(){var g=Buffer.alloc(U.LOCHDR);return g.writeUInt32LE(U.LOCSIG,0),g.writeUInt16LE(e,U.LOCVER),g.writeUInt16LE(r,U.LOCFLG),g.writeUInt16LE(n,U.LOCHOW),g.writeUInt32LE(i,U.LOCTIM),g.writeUInt32LE(o,U.LOCCRC),g.writeUInt32LE(s,U.LOCSIZ),g.writeUInt32LE(a,U.LOCLEN),g.writeUInt16LE(u,U.LOCNAM),g.writeUInt16LE(b.extraLen,U.LOCEXT),g},centralHeaderToBinary:function(){var g=Buffer.alloc(U.CENHDR+u+c+l);return g.writeUInt32LE(U.CENSIG,0),g.writeUInt16LE(t,U.CENVEM),g.writeUInt16LE(e,U.CENVER),g.writeUInt16LE(r,U.CENFLG),g.writeUInt16LE(n,U.CENHOW),g.writeUInt32LE(i,U.CENTIM),g.writeUInt32LE(o,U.CENCRC),g.writeUInt32LE(s,U.CENSIZ),g.writeUInt32LE(a,U.CENLEN),g.writeUInt16LE(u,U.CENNAM),g.writeUInt16LE(c,U.CENEXT),g.writeUInt16LE(l,U.CENCOM),g.writeUInt16LE(f,U.CENDSK),g.writeUInt16LE(h,U.CENATT),g.writeUInt32LE(d,U.CENATX),g.writeUInt32LE(m,U.CENOFF),g},toJSON:function(){let g=function(C){return C+" bytes"};return{made:t,version:e,flags:r,method:Qn.methodToString(n),time:this.time,crc:"0x"+o.toString(16).toUpperCase(),compressedSize:g(s),size:g(a),fileNameLength:g(u),extraLength:g(c),commentLength:g(l),diskNumStart:f,inAttr:h,attr:d,offset:m,centralHeaderSize:g(U.CENHDR+u+c+l)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var UE=D((xue,ME)=>{var us=as(),Ue=us.Constants;ME.exports=function(){var t=0,e=0,r=0,n=0,i=0;return{get diskEntries(){return t},set diskEntries(o){t=e=o},get totalEntries(){return e},set totalEntries(o){e=t=o},get size(){return r},set size(o){r=o},get offset(){return n},set offset(o){n=o},get commentLength(){return i},set commentLength(o){i=o},get mainHeaderSize(){return Ue.ENDHDR+i},loadFromBinary:function(o){if((o.length!==Ue.ENDHDR||o.readUInt32LE(0)!==Ue.ENDSIG)&&(o.length<Ue.ZIP64HDR||o.readUInt32LE(0)!==Ue.ZIP64SIG))throw us.Errors.INVALID_END();o.readUInt32LE(0)===Ue.ENDSIG?(t=o.readUInt16LE(Ue.ENDSUB),e=o.readUInt16LE(Ue.ENDTOT),r=o.readUInt32LE(Ue.ENDSIZ),n=o.readUInt32LE(Ue.ENDOFF),i=o.readUInt16LE(Ue.ENDCOM)):(t=us.readBigUInt64LE(o,Ue.ZIP64SUB),e=us.readBigUInt64LE(o,Ue.ZIP64TOT),r=us.readBigUInt64LE(o,Ue.ZIP64SIZE),n=us.readBigUInt64LE(o,Ue.ZIP64OFF),i=0)},toBinary:function(){var o=Buffer.alloc(Ue.ENDHDR+i);return o.writeUInt32LE(Ue.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(t,Ue.ENDSUB),o.writeUInt16LE(e,Ue.ENDTOT),o.writeUInt32LE(r,Ue.ENDSIZ),o.writeUInt32LE(n,Ue.ENDOFF),o.writeUInt16LE(i,Ue.ENDCOM),o.fill(" ",Ue.ENDHDR),o},toJSON:function(){let o=function(s,a){let u=s.toString(16).toUpperCase();for(;u.length<a;)u="0"+u;return"0x"+u};return{diskEntries:t,totalEntries:e,size:r+" bytes",offset:o(n,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var hg=D(dg=>{dg.EntryHeader=qE();dg.MainHeader=UE()});var HE=D((Oue,VE)=>{VE.exports=function(t){var e=require("zlib"),r={chunkSize:(parseInt(t.length/1024)+1)*1024};return{deflate:function(){return e.deflateRawSync(t,r)},deflateAsync:function(n){var i=e.createDeflateRaw(r),o=[],s=0;i.on("data",function(a){o.push(a),s+=a.length}),i.on("end",function(){var a=Buffer.alloc(s),u=0;a.fill(0);for(var c=0;c<o.length;c++){var l=o[c];l.copy(a,u),u+=l.length}n&&n(a)}),i.end(t)}}}});var GE=D((Aue,zE)=>{var t5=+(process.versions?process.versions.node:"").split(".")[0]||0;zE.exports=function(t,e){var r=require("zlib");let n=t5>=15&&e>0?{maxOutputLength:e}:{};return{inflate:function(){return r.inflateRawSync(t,n)},inflateAsync:function(i){var o=r.createInflateRaw(n),s=[],a=0;o.on("data",function(u){s.push(u),a+=u.length}),o.on("end",function(){var u=Buffer.alloc(a),c=0;u.fill(0);for(var l=0;l<s.length;l++){var f=s[l];f.copy(u,c),c+=f.length}i&&i(u)}),o.end(t)}}}});var XE=D((kue,JE)=>{"use strict";var{randomFillSync:WE}=require("crypto"),r5=Gl(),n5=new Uint32Array(256).map((t,e)=>{for(let r=0;r<8;r++)e&1?e=e>>>1^3988292384:e>>>=1;return e>>>0}),YE=(t,e)=>Math.imul(t,e)>>>0,KE=(t,e)=>n5[(t^e)&255]^t>>>8,vu=()=>typeof WE=="function"?WE(Buffer.alloc(12)):vu.node();vu.node=()=>{let t=Buffer.alloc(12),e=t.length;for(let r=0;r<e;r++)t[r]=Math.random()*256&255;return t};var Wl={genSalt:vu};function Kl(t){let e=Buffer.isBuffer(t)?t:Buffer.from(t);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<e.length;r++)this.updateKeys(e[r])}Kl.prototype.updateKeys=function(t){let e=this.keys;return e[0]=KE(e[0],t),e[1]+=e[0]&255,e[1]=YE(e[1],134775813)+1,e[2]=KE(e[2],e[1]>>>24),t};Kl.prototype.next=function(){let t=(this.keys[2]|2)>>>0;return YE(t,t^1)>>8&255};function i5(t){let e=new Kl(t);return function(r){let n=Buffer.alloc(r.length),i=0;for(let o of r)n[i++]=e.updateKeys(o^e.next());return n}}function o5(t){let e=new Kl(t);return function(r,n,i=0){n||(n=Buffer.alloc(r.length));for(let o of r){let s=e.next();n[i++]=o^s,e.updateKeys(o)}return n}}function s5(t,e,r){if(!t||!Buffer.isBuffer(t)||t.length<12)return Buffer.alloc(0);let n=i5(r),i=n(t.slice(0,12)),o=(e.flags&8)===8?e.timeHighByte:e.crc>>>24;if(i[11]!==o)throw r5.WRONG_PASSWORD();return n(t.slice(12))}function a5(t){Buffer.isBuffer(t)&&t.length>=12?Wl.genSalt=function(){return t.slice(0,12)}:t==="node"?Wl.genSalt=vu.node:Wl.genSalt=vu}function u5(t,e,r,n=!1){t==null&&(t=Buffer.alloc(0)),Buffer.isBuffer(t)||(t=Buffer.from(t.toString()));let i=o5(r),o=Wl.genSalt();o[11]=e.crc>>>24&255,n&&(o[10]=e.crc>>>16&255);let s=Buffer.alloc(t.length+12);return i(o,s),i(t,s,12)}JE.exports={decrypt:s5,encrypt:u5,_salter:a5}});var ZE=D(Yl=>{Yl.Deflater=HE();Yl.Inflater=GE();Yl.ZipCrypto=XE()});var mg=D((Pue,QE)=>{var be=as(),c5=hg(),Xe=be.Constants,pg=ZE();QE.exports=function(t,e){var r=new c5.EntryHeader,n=Buffer.alloc(0),i=Buffer.alloc(0),o=!1,s=null,a=Buffer.alloc(0),u=Buffer.alloc(0),c=!0;let l=t,f=typeof l.decoder=="object"?l.decoder:be.decoder;c=f.hasOwnProperty("efs")?f.efs:!1;function h(){return!e||!(e instanceof Uint8Array)?Buffer.alloc(0):(u=r.loadLocalHeaderFromBinary(e),e.slice(r.realDataOffset,r.realDataOffset+r.compressedSize))}function d(g){if(r.flags_desc){let C={},k=r.realDataOffset+r.compressedSize;if(e.readUInt32LE(k)==Xe.LOCSIG||e.readUInt32LE(k)==Xe.CENSIG)throw be.Errors.DESCRIPTOR_NOT_EXIST();if(e.readUInt32LE(k)==Xe.EXTSIG)C.crc=e.readUInt32LE(k+Xe.EXTCRC),C.compressedSize=e.readUInt32LE(k+Xe.EXTSIZ),C.size=e.readUInt32LE(k+Xe.EXTLEN);else if(e.readUInt16LE(k+12)===19280)C.crc=e.readUInt32LE(k+Xe.EXTCRC-4),C.compressedSize=e.readUInt32LE(k+Xe.EXTSIZ-4),C.size=e.readUInt32LE(k+Xe.EXTLEN-4);else throw be.Errors.DESCRIPTOR_UNKNOWN();if(C.compressedSize!==r.compressedSize||C.size!==r.size||C.crc!==r.crc)throw be.Errors.DESCRIPTOR_FAULTY();if(be.crc32(g)!==C.crc)return!1}else if(be.crc32(g)!==r.localHeader.crc)return!1;return!0}function m(g,C,k){if(typeof C>"u"&&typeof g=="string"&&(k=g,g=void 0),o)return g&&C&&C(Buffer.alloc(0),be.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var P=h();if(P.length===0)return g&&C&&C(P),P;if(r.encrypted){if(typeof k!="string"&&!Buffer.isBuffer(k))throw be.Errors.INVALID_PASS_PARAM();P=pg.ZipCrypto.decrypt(P,r,k)}var F=Buffer.alloc(r.size);switch(r.method){case be.Constants.STORED:if(P.copy(F),d(F))return g&&C&&C(F),F;throw g&&C&&C(F,be.Errors.BAD_CRC()),be.Errors.BAD_CRC();case be.Constants.DEFLATED:var L=new pg.Inflater(P,r.size);if(g)L.inflateAsync(function(S){S.copy(S,0),C&&(d(S)?C(S):C(S,be.Errors.BAD_CRC()))});else{if(L.inflate(F).copy(F,0),!d(F))throw be.Errors.BAD_CRC(`"${f.decode(n)}"`);return F}break;default:throw g&&C&&C(Buffer.alloc(0),be.Errors.UNKNOWN_METHOD()),be.Errors.UNKNOWN_METHOD()}}function b(g,C){if((!s||!s.length)&&Buffer.isBuffer(e))return g&&C&&C(h()),h();if(s.length&&!o){var k;switch(r.method){case be.Constants.STORED:return r.compressedSize=r.size,k=Buffer.alloc(s.length),s.copy(k),g&&C&&C(k),k;default:case be.Constants.DEFLATED:var P=new pg.Deflater(s);if(g)P.deflateAsync(function(L){k=Buffer.alloc(L.length),r.compressedSize=L.length,L.copy(k),C&&C(k)});else{var F=P.deflate();return r.compressedSize=F.length,F}P=null;break}}else if(g&&C)C(Buffer.alloc(0));else return Buffer.alloc(0)}function y(g,C){return(g.readUInt32LE(C+4)<<4)+g.readUInt32LE(C)}function _(g){try{for(var C=0,k,P,F;C+4<g.length;)k=g.readUInt16LE(C),C+=2,P=g.readUInt16LE(C),C+=2,F=g.slice(C,C+P),C+=P,Xe.ID_ZIP64===k&&x(F)}catch{throw be.Errors.EXTRA_FIELD_PARSE_ERROR()}}function x(g){var C,k,P,F;g.length>=Xe.EF_ZIP64_SCOMP&&(C=y(g,Xe.EF_ZIP64_SUNCOMP),r.size===Xe.EF_ZIP64_OR_32&&(r.size=C)),g.length>=Xe.EF_ZIP64_RHO&&(k=y(g,Xe.EF_ZIP64_SCOMP),r.compressedSize===Xe.EF_ZIP64_OR_32&&(r.compressedSize=k)),g.length>=Xe.EF_ZIP64_DSN&&(P=y(g,Xe.EF_ZIP64_RHO),r.offset===Xe.EF_ZIP64_OR_32&&(r.offset=P)),g.length>=Xe.EF_ZIP64_DSN+4&&(F=g.readUInt32LE(Xe.EF_ZIP64_DSN),r.diskNumStart===Xe.EF_ZIP64_OR_16&&(r.diskNumStart=F))}return{get entryName(){return f.decode(n)},get rawEntryName(){return n},set entryName(g){n=be.toBuffer(g,f.encode);var C=n[n.length-1];o=C===47||C===92,r.fileNameLength=n.length},get efs(){return typeof c=="function"?c(this.entryName):c},get extra(){return a},set extra(g){a=g,r.extraLength=g.length,_(g)},get comment(){return f.decode(i)},set comment(g){if(i=be.toBuffer(g,f.encode),r.commentLength=i.length,i.length>65535)throw be.Errors.COMMENT_TOO_LONG()},get name(){var g=f.decode(n);return o?g.substr(g.length-1).split("/").pop():g.split("/").pop()},get isDirectory(){return o},getCompressedData:function(){return b(!1,null)},getCompressedDataAsync:function(g){b(!0,g)},setData:function(g){s=be.toBuffer(g,be.decoder.encode),!o&&s.length?(r.size=s.length,r.method=be.Constants.DEFLATED,r.crc=be.crc32(g),r.changed=!0):r.method=be.Constants.STORED},getData:function(g){return r.changed?s:m(!1,null,g)},getDataAsync:function(g,C){r.changed?g(s):m(!0,g,C)},set attr(g){r.attr=g},get attr(){return r.attr},set header(g){r.loadFromBinary(g)},get header(){return r},packCentralHeader:function(){r.flags_efs=this.efs,r.extraLength=a.length;var g=r.centralHeaderToBinary(),C=be.Constants.CENHDR;return n.copy(g,C),C+=n.length,a.copy(g,C),C+=r.extraLength,i.copy(g,C),g},packLocalHeader:function(){let g=0;r.flags_efs=this.efs,r.extraLocalLength=u.length;let C=r.localHeaderToBinary(),k=Buffer.alloc(C.length+n.length+r.extraLocalLength);return C.copy(k,g),g+=C.length,n.copy(k,g),g+=n.length,u.copy(k,g),g+=u.length,k},toJSON:function(){let g=function(C){return"<"+(C&&C.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:r.toJSON(),compressedData:g(e),data:g(s)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var rC=D((Rue,tC)=>{var eC=mg(),l5=hg(),bt=as();tC.exports=function(t,e){var r=[],n={},i=Buffer.alloc(0),o=new l5.MainHeader,s=!1,a=null;let u=new Set,c=e,{noSort:l,decoder:f}=c;t?m(c.readEntries):s=!0;function h(){let y=new Set;for(let _ of Object.keys(n)){let x=_.split("/");if(x.pop(),!!x.length)for(let g=0;g<x.length;g++){let C=x.slice(0,g+1).join("/")+"/";y.add(C)}}for(let _ of y)if(!(_ in n)){let x=new eC(c);x.entryName=_,x.attr=16,x.temporary=!0,r.push(x),n[x.entryName]=x,u.add(x)}}function d(){if(s=!0,n={},o.diskEntries>(t.length-o.offset)/bt.Constants.CENHDR)throw bt.Errors.DISK_ENTRY_TOO_LARGE();r=new Array(o.diskEntries);for(var y=o.offset,_=0;_<r.length;_++){var x=y,g=new eC(c,t);g.header=t.slice(x,x+=bt.Constants.CENHDR),g.entryName=t.slice(x,x+=g.header.fileNameLength),g.header.extraLength&&(g.extra=t.slice(x,x+=g.header.extraLength)),g.header.commentLength&&(g.comment=t.slice(x,x+g.header.commentLength)),y+=g.header.centralHeaderSize,r[_]=g,n[g.entryName]=g}u.clear(),h()}function m(y){var _=t.length-bt.Constants.ENDHDR,x=Math.max(0,_-65535),g=x,C=t.length,k=-1,P=0;for((typeof c.trailingSpace=="boolean"?c.trailingSpace:!1)&&(x=0),_;_>=g;_--)if(t[_]===80){if(t.readUInt32LE(_)===bt.Constants.ENDSIG){k=_,P=_,C=_+bt.Constants.ENDHDR,g=_-bt.Constants.END64HDR;continue}if(t.readUInt32LE(_)===bt.Constants.END64SIG){g=x;continue}if(t.readUInt32LE(_)===bt.Constants.ZIP64SIG){k=_,C=_+bt.readBigUInt64LE(t,_+bt.Constants.ZIP64SIZE)+bt.Constants.ZIP64LEAD;break}}if(k==-1)throw bt.Errors.INVALID_FORMAT();o.loadFromBinary(t.slice(k,C)),o.commentLength&&(i=t.slice(P+bt.Constants.ENDHDR)),y&&d()}function b(){r.length>1&&!l&&r.sort((y,_)=>y.entryName.toLowerCase().localeCompare(_.entryName.toLowerCase()))}return{get entries(){return s||d(),r.filter(y=>!u.has(y))},get comment(){return f.decode(i)},set comment(y){i=bt.toBuffer(y,f.encode),o.commentLength=i.length},getEntryCount:function(){return s?r.length:o.diskEntries},forEach:function(y){this.entries.forEach(y)},getEntry:function(y){return s||d(),n[y]||null},setEntry:function(y){s||d(),r.push(y),n[y.entryName]=y,o.totalEntries=r.length},deleteFile:function(y,_=!0){s||d();let x=n[y];this.getEntryChildren(x,_).map(C=>C.entryName).forEach(this.deleteEntry)},deleteEntry:function(y){s||d();let _=n[y],x=r.indexOf(_);x>=0&&(r.splice(x,1),delete n[y],o.totalEntries=r.length)},getEntryChildren:function(y,_=!0){if(s||d(),typeof y=="object")if(y.isDirectory&&_){let x=[],g=y.entryName;for(let C of r)C.entryName.startsWith(g)&&x.push(C);return x}else return[y];return[]},getChildCount:function(y){if(y&&y.isDirectory){let _=this.getEntryChildren(y);return _.includes(y)?_.length-1:_.length}return 0},compressToBuffer:function(){s||d(),b();let y=[],_=[],x=0,g=0;o.size=0,o.offset=0;let C=0;for(let F of this.entries){let L=F.getCompressedData();F.header.offset=g;let S=F.packLocalHeader(),I=S.length+L.length;g+=I,y.push(S),y.push(L);let $=F.packCentralHeader();_.push($),o.size+=$.length,x+=I+$.length,C++}x+=o.mainHeaderSize,o.offset=g,o.totalEntries=C,g=0;let k=Buffer.alloc(x);for(let F of y)F.copy(k,g),g+=F.length;for(let F of _)F.copy(k,g),g+=F.length;let P=o.toBinary();return i&&i.copy(P,bt.Constants.ENDHDR),P.copy(k,g),t=k,s=!1,k},toAsyncBuffer:function(y,_,x,g){try{s||d(),b();let C=[],k=[],P=0,F=0,L=0;o.size=0,o.offset=0;let S=function(I){if(I.length>0){let $=I.shift(),B=$.entryName+$.extra.toString();x&&x(B),$.getCompressedDataAsync(function(q){g&&g(B),$.header.offset=F;let K=$.packLocalHeader(),V=K.length+q.length;F+=V,C.push(K),C.push(q);let E=$.packCentralHeader();k.push(E),o.size+=E.length,P+=V+E.length,L++,S(I)})}else{P+=o.mainHeaderSize,o.offset=F,o.totalEntries=L,F=0;let $=Buffer.alloc(P);C.forEach(function(q){q.copy($,F),F+=q.length}),k.forEach(function(q){q.copy($,F),F+=q.length});let B=o.toBinary();i&&i.copy(B,bt.Constants.ENDHDR),B.copy($,F),t=$,s=!1,y($)}};S(Array.from(this.entries))}catch(C){_(C)}}}}});var oC=D(($ue,iC)=>{var Ve=as(),Ze=require("path"),f5=mg(),d5=rC(),Ii=(...t)=>Ve.findLast(t,e=>typeof e=="boolean"),nC=(...t)=>Ve.findLast(t,e=>typeof e=="string"),h5=(...t)=>Ve.findLast(t,e=>typeof e=="function"),p5={noSort:!1,readEntries:!1,method:Ve.Constants.NONE,fs:null};iC.exports=function(t,e){let r=null,n=Object.assign(Object.create(null),p5);t&&typeof t=="object"&&(t instanceof Uint8Array||(Object.assign(n,t),t=n.input?n.input:void 0,n.input&&delete n.input),Buffer.isBuffer(t)&&(r=t,n.method=Ve.Constants.BUFFER,t=void 0)),Object.assign(n,e);let i=new Ve(n);if((typeof n.decoder!="object"||typeof n.decoder.encode!="function"||typeof n.decoder.decode!="function")&&(n.decoder=Ve.decoder),t&&typeof t=="string")if(i.fs.existsSync(t))n.method=Ve.Constants.FILE,n.filename=t,r=i.fs.readFileSync(t);else throw Ve.Errors.INVALID_FILENAME();let o=new d5(r,n),{canonical:s,sanitize:a,zipnamefix:u}=Ve;function c(d){if(d&&o){var m;if(typeof d=="string"&&(m=o.getEntry(Ze.posix.normalize(d))),typeof d=="object"&&typeof d.entryName<"u"&&typeof d.header<"u"&&(m=o.getEntry(d.entryName)),m)return m}return null}function l(d){let{join:m,normalize:b,sep:y}=Ze.posix;return m(".",b(y+d.split("\\").join(y)+y))}function f(d){return d instanceof RegExp?function(m){return function(b){return m.test(b)}}(d):typeof d!="function"?()=>!0:d}let h=(d,m)=>{let b=m.slice(-1);return b=b===i.sep?i.sep:"",Ze.relative(d,m)+b};return{readFile:function(d,m){var b=c(d);return b&&b.getData(m)||null},childCount:function(d){let m=c(d);if(m)return o.getChildCount(m)},readFileAsync:function(d,m){var b=c(d);b?b.getDataAsync(m):m(null,"getEntry failed for:"+d)},readAsText:function(d,m){var b=c(d);if(b){var y=b.getData();if(y&&y.length)return y.toString(m||"utf8")}return""},readAsTextAsync:function(d,m,b){var y=c(d);y?y.getDataAsync(function(_,x){if(x){m(_,x);return}_&&_.length?m(_.toString(b||"utf8")):m("")}):m("")},deleteFile:function(d,m=!0){var b=c(d);b&&o.deleteFile(b.entryName,m)},deleteEntry:function(d){var m=c(d);m&&o.deleteEntry(m.entryName)},addZipComment:function(d){o.comment=d},getZipComment:function(){return o.comment||""},addZipEntryComment:function(d,m){var b=c(d);b&&(b.comment=m)},getZipEntryComment:function(d){var m=c(d);return m&&m.comment||""},updateFile:function(d,m){var b=c(d);b&&b.setData(m)},addLocalFile:function(d,m,b,y){if(i.fs.existsSync(d)){m=m?l(m):"";let _=Ze.win32.basename(Ze.win32.normalize(d));m+=b||_;let x=i.fs.statSync(d),g=x.isFile()?i.fs.readFileSync(d):Buffer.alloc(0);x.isDirectory()&&(m+=i.sep),this.addFile(m,g,y,x)}else throw Ve.Errors.FILE_NOT_FOUND(d)},addLocalFileAsync:function(d,m){d=typeof d=="object"?d:{localPath:d};let b=Ze.resolve(d.localPath),{comment:y}=d,{zipPath:_,zipName:x}=d,g=this;i.fs.stat(b,function(C,k){if(C)return m(C,!1);_=_?l(_):"";let P=Ze.win32.basename(Ze.win32.normalize(b));if(_+=x||P,k.isFile())i.fs.readFile(b,function(F,L){return F?m(F,!1):(g.addFile(_,L,y,k),setImmediate(m,void 0,!0))});else if(k.isDirectory())return _+=i.sep,g.addFile(_,Buffer.alloc(0),y,k),setImmediate(m,void 0,!0)})},addLocalFolder:function(d,m,b){if(b=f(b),m=m?l(m):"",d=Ze.normalize(d),i.fs.existsSync(d)){let y=i.findFiles(d),_=this;if(y.length)for(let x of y){let g=Ze.join(m,h(d,x));b(g)&&_.addLocalFile(x,Ze.dirname(g))}}else throw Ve.Errors.FILE_NOT_FOUND(d)},addLocalFolderAsync:function(d,m,b,y){y=f(y),b=b?l(b):"",d=Ze.normalize(d);var _=this;i.fs.open(d,"r",function(x){if(x&&x.code==="ENOENT")m(void 0,Ve.Errors.FILE_NOT_FOUND(d));else if(x)m(void 0,x);else{var g=i.findFiles(d),C=-1,k=function(){if(C+=1,C<g.length){var P=g[C],F=h(d,P).split("\\").join("/");F=F.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),y(F)?i.fs.stat(P,function(L,S){L&&m(void 0,L),S.isFile()?i.fs.readFile(P,function(I,$){I?m(void 0,I):(_.addFile(b+F,$,"",S),k())}):(_.addFile(b+F+"/",Buffer.alloc(0),"",S),k())}):process.nextTick(()=>{k()})}else m(!0,void 0)};k()}})},addLocalFolderAsync2:function(d,m){let b=this;d=typeof d=="object"?d:{localPath:d},localPath=Ze.resolve(l(d.localPath));let{zipPath:y,filter:_,namefix:x}=d;_ instanceof RegExp?_=function(k){return function(P){return k.test(P)}}(_):typeof _!="function"&&(_=function(){return!0}),y=y?l(y):"",x=="latin1"&&(x=k=>k.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof x!="function"&&(x=k=>k);let g=k=>Ze.join(y,x(h(localPath,k))),C=k=>Ze.win32.basename(Ze.win32.normalize(x(k)));i.fs.open(localPath,"r",function(k){k&&k.code==="ENOENT"?m(void 0,Ve.Errors.FILE_NOT_FOUND(localPath)):k?m(void 0,k):i.findFilesAsync(localPath,function(P,F){if(P)return m(P);F=F.filter(L=>_(g(L))),F.length||m(void 0,!1),setImmediate(F.reverse().reduce(function(L,S){return function(I,$){if(I||$===!1)return setImmediate(L,I,!1);b.addLocalFileAsync({localPath:S,zipPath:Ze.dirname(g(S)),zipName:C(S)},L)}},m))})})},addLocalFolderPromise:function(d,m){return new Promise((b,y)=>{this.addLocalFolderAsync2(Object.assign({localPath:d},m),(_,x)=>{_&&y(_),x&&b(this)})})},addFile:function(d,m,b,y){d=u(d);let _=c(d),x=_!=null;x||(_=new f5(n),_.entryName=d),_.comment=b||"";let g=typeof y=="object"&&y instanceof i.fs.Stats;g&&(_.header.time=y.mtime);var C=_.isDirectory?16:0;let k=_.isDirectory?16384:32768;return g?k|=4095&y.mode:typeof y=="number"?k|=4095&y:k|=_.isDirectory?493:420,C=(C|k<<16)>>>0,_.attr=C,_.setData(m),x||o.setEntry(_),_},getEntries:function(d){return o.password=d,o?o.entries:[]},getEntry:function(d){return c(d)},getEntryCount:function(){return o.getEntryCount()},forEach:function(d){return o.forEach(d)},extractEntryTo:function(d,m,b,y,_,x){y=Ii(!1,y),_=Ii(!1,_),b=Ii(!0,b),x=nC(_,x);var g=c(d);if(!g)throw Ve.Errors.NO_ENTRY();var C=s(g.entryName),k=a(m,x&&!g.isDirectory?x:b?C:Ze.basename(C));if(g.isDirectory){var P=o.getEntryChildren(g);return P.forEach(function(S){if(S.isDirectory)return;var I=S.getData();if(!I)throw Ve.Errors.CANT_EXTRACT_FILE();var $=s(S.entryName),B=a(m,b?$:Ze.basename($));let q=_?S.header.fileAttr:void 0;i.writeFileTo(B,I,y,q)}),!0}var F=g.getData(o.password);if(!F)throw Ve.Errors.CANT_EXTRACT_FILE();if(i.fs.existsSync(k)&&!y)throw Ve.Errors.CANT_OVERRIDE();let L=_?d.header.fileAttr:void 0;return i.writeFileTo(k,F,y,L),!0},test:function(d){if(!o)return!1;for(var m in o.entries)try{if(m.isDirectory)continue;var b=o.entries[m].getData(d);if(!b)return!1}catch{return!1}return!0},extractAllTo:function(d,m,b,y){if(b=Ii(!1,b),y=nC(b,y),m=Ii(!1,m),!o)throw Ve.Errors.NO_ZIP();o.entries.forEach(function(_){var x=a(d,s(_.entryName));if(_.isDirectory){i.makeDir(x);return}var g=_.getData(y);if(!g)throw Ve.Errors.CANT_EXTRACT_FILE();let C=b?_.header.fileAttr:void 0;i.writeFileTo(x,g,m,C);try{i.fs.utimesSync(x,_.header.time,_.header.time)}catch{throw Ve.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(d,m,b,y){if(y=h5(m,b,y),b=Ii(!1,b),m=Ii(!1,m),!y)return new Promise((k,P)=>{this.extractAllToAsync(d,m,b,function(F){F?P(F):k(this)})});if(!o){y(Ve.Errors.NO_ZIP());return}d=Ze.resolve(d);let _=k=>a(d,Ze.normalize(s(k.entryName))),x=(k,P)=>new Error(k+': "'+P+'"'),g=[],C=[];o.entries.forEach(k=>{k.isDirectory?g.push(k):C.push(k)});for(let k of g){let P=_(k),F=b?k.header.fileAttr:void 0;try{i.makeDir(P),F&&i.fs.chmodSync(P,F),i.fs.utimesSync(P,k.header.time,k.header.time)}catch{y(x("Unable to create folder",P))}}C.reverse().reduce(function(k,P){return function(F){if(F)k(F);else{let L=Ze.normalize(s(P.entryName)),S=a(d,L);P.getDataAsync(function(I,$){if($)k($);else if(!I)k(Ve.Errors.CANT_EXTRACT_FILE());else{let B=b?P.header.fileAttr:void 0;i.writeFileToAsync(S,I,m,B,function(q){q||k(x("Unable to write file",S)),i.fs.utimes(S,P.header.time,P.header.time,function(K){K?k(x("Unable to set times",S)):k()})})}})}}},y)()},writeZip:function(d,m){if(arguments.length===1&&typeof d=="function"&&(m=d,d=""),!d&&n.filename&&(d=n.filename),!!d){var b=o.compressToBuffer();if(b){var y=i.writeFileTo(d,b,!0);typeof m=="function"&&m(y?null:new Error("failed"),"")}}},writeZipPromise:function(d,m){let{overwrite:b,perm:y}=Object.assign({overwrite:!0},m);return new Promise((_,x)=>{!d&&n.filename&&(d=n.filename),d||x("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(g=>{let C=k=>k?_(k):x("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(d,g,b,y,C)},x)})},toBufferPromise:function(){return new Promise((d,m)=>{o.toAsyncBuffer(d,m)})},toBuffer:function(d,m,b,y){return typeof d=="function"?(o.toAsyncBuffer(d,m,b,y),null):o.compressToBuffer()}}}});var bC=D((uce,vC)=>{var DC={};vC.exports=DC;var yC={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(yC).forEach(function(t){var e=yC[t],r=DC[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var _C=D((cce,wC)=>{"use strict";wC.exports=function(t,e){e=e||process.argv;var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?!0:i<r)}});var CC=D((lce,EC)=>{"use strict";var b5=require("os"),xr=_C(),kt=process.env,fs=void 0;xr("no-color")||xr("no-colors")||xr("color=false")?fs=!1:(xr("color")||xr("colors")||xr("color=true")||xr("color=always"))&&(fs=!0);"FORCE_COLOR"in kt&&(fs=kt.FORCE_COLOR.length===0||parseInt(kt.FORCE_COLOR,10)!==0);function w5(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function _5(t){if(fs===!1)return 0;if(xr("color=16m")||xr("color=full")||xr("color=truecolor"))return 3;if(xr("color=256"))return 2;if(t&&!t.isTTY&&fs!==!0)return 0;var e=fs?1:0;if(process.platform==="win32"){var r=b5.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in kt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in kt})||kt.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in kt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(kt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in kt){var n=parseInt((kt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(kt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(kt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(kt.TERM)||"COLORTERM"in kt?1:(kt.TERM==="dumb",e)}function _g(t){var e=_5(t);return w5(e)}EC.exports={supportsColor:_g,stdout:_g(process.stdout),stderr:_g(process.stderr)}});var xC=D((fce,SC)=>{SC.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=i[o]||[" "],a=Math.floor(Math.random()*s.length);typeof i[o]<"u"?n+=i[o][a]:n+=o}),n}});var OC=D((dce,FC)=>{FC.exports=function(e,r){e=e||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},i=[].concat(n.up,n.down,n.mid);function o(u){var c=Math.floor(Math.random()*u);return c}function s(u){var c=!1;return i.filter(function(l){c=l===u}),c}function a(u,c){var l="",f,h;c=c||{},c.up=typeof c.up<"u"?c.up:!0,c.mid=typeof c.mid<"u"?c.mid:!0,c.down=typeof c.down<"u"?c.down:!0,c.size=typeof c.size<"u"?c.size:"maxi",u=u.split("");for(h in u)if(!s(h)){switch(l=l+u[h],f={up:0,down:0,mid:0},c.size){case"mini":f.up=o(8),f.mid=o(2),f.down=o(8);break;case"maxi":f.up=o(16)+3,f.mid=o(4)+1,f.down=o(64)+3;break;default:f.up=o(8)+1,f.mid=o(6)/2,f.down=o(8)+1;break}var d=["up","mid","down"];for(var m in d)for(var b=d[m],y=0;y<=f[b];y++)c[b]&&(l=l+n[b][o(n[b].length)])}return l}return a(e,r)}});var kC=D((hce,AC)=>{AC.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var PC=D((pce,TC)=>{TC.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var $C=D((mce,RC)=>{RC.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}}});var jC=D((gce,IC)=>{IC.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var UC=D((Dce,MC)=>{var ce={};MC.exports=ce;ce.themes={};var E5=require("util"),ji=ce.styles=bC(),LC=Object.defineProperties,C5=new RegExp(/[\r\n]+/g);ce.supportsColor=CC().supportsColor;typeof ce.enabled>"u"&&(ce.enabled=ce.supportsColor()!==!1);ce.enable=function(){ce.enabled=!0};ce.disable=function(){ce.enabled=!1};ce.stripColors=ce.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var yce=ce.stylize=function(e,r){if(!ce.enabled)return e+"";var n=ji[r];return!n&&r in ce?ce[r](e):n.open+e+n.close},S5=/[|\\{}()[\]^$+*?.]/g,x5=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(S5,"\\$&")};function BC(t){var e=function r(){return O5.apply(r,arguments)};return e._styles=t,e.__proto__=F5,e}var qC=function(){var t={};return ji.grey=ji.gray,Object.keys(ji).forEach(function(e){ji[e].closeRe=new RegExp(x5(ji[e].close),"g"),t[e]={get:function(){return BC(this._styles.concat(e))}}}),t}(),F5=LC(function(){},qC);function O5(){var t=Array.prototype.slice.call(arguments),e=t.map(function(s){return s!=null&&s.constructor===String?s:E5.inspect(s)}).join(" ");if(!ce.enabled||!e)return e;for(var r=e.indexOf(`
22
- `)!=-1,n=this._styles,i=n.length;i--;){var o=ji[n[i]];e=o.open+e.replace(o.closeRe,o.open)+o.close,r&&(e=e.replace(C5,function(s){return o.close+s+o.open}))}return e}ce.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){ce[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var o in t[r])i=ce[t[r][o]](i);return i}return ce[t[r]](n)}})(e)};function A5(){var t={};return Object.keys(qC).forEach(function(e){t[e]={get:function(){return BC([e])}}}),t}var k5=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};ce.trap=xC();ce.zalgo=OC();ce.maps={};ce.maps.america=kC()(ce);ce.maps.zebra=PC()(ce);ce.maps.rainbow=$C()(ce);ce.maps.random=jC()(ce);for(NC in ce.maps)(function(t){ce[t]=function(e){return k5(ce.maps[t],e)}})(NC);var NC;LC(ce,A5())});var HC=D((vce,VC)=>{var T5=UC();VC.exports=T5});var zC=D(Eg=>{"use strict";Eg.indent=function(e){return new Array(e+1).join(" ")};Eg.getMaxIndexLength=function(t){var e=0;return Object.getOwnPropertyNames(t).forEach(function(r){t[r]!==void 0&&(e=Math.max(e,r.length))}),e}});var GC=D((wce,P5)=>{P5.exports={author:"Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)",name:"prettyjson",description:"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output",version:"1.2.5",homepage:"http://rafeca.com/prettyjson",keywords:["json","cli","formatting","colors"],repository:{type:"git",url:"https://github.com/rafeca/prettyjson.git"},bugs:{url:"https://github.com/rafeca/prettyjson/issues"},main:"./lib/prettyjson",files:["bin/prettyjson","lib/*.js"],license:"MIT",scripts:{test:"npm run jshint && mocha --reporter spec",testwin:"node ./node_modules/mocha/bin/mocha --reporter spec",jshint:"jshint lib/*.js test/*.js",coverage:"istanbul cover _mocha --report lcovonly -- -R spec",coveralls:"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",changelog:"git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"},bin:{prettyjson:"./bin/prettyjson"},dependencies:{colors:"1.4.0",minimist:"^1.2.0"},devDependencies:{coveralls:"^2.11.15",istanbul:"^0.4.5",jshint:"^2.9.4",mocha:"^3.1.2","mocha-lcov-reporter":"^1.2.0",should:"^11.1.1"}}});var WC=D(_u=>{"use strict";var Vr=HC(),ti=zC(),R5=/[^\w\s\n\r\v\t\.,]/i;_u.version=GC().version;var Cg=function(t,e){return t!==void 0||e.renderUndefined},ef=function(t,e,r){return!!(typeof t=="boolean"||typeof t=="number"||typeof t=="function"||t===null||t===void 0||t instanceof Date||typeof t=="string"&&t.indexOf(`
23
- `)===-1||r.inlineArrays&&!e&&Array.isArray(t)&&ef(t[0],!0,r))},$5=function(t,e){if(e.noColor)return t;if(typeof t=="string")return e.stringColor?Vr[e.stringColor](t):t;var r=t+"";return t===!0?Vr.green(r):t===!1?Vr.red(r):t==null?Vr.grey(r):typeof t=="number"?t>=0?Vr[e.positiveNumberColor](r):Vr[e.negativeNumberColor](r):typeof t=="function"?"function() {}":Array.isArray(t)?t.join(", "):r},Sg=function(t,e){return t.multilineStringColor===null||t.noColor?e:Vr[t.multilineStringColor](e)},I5=function(t,e,r){var n=t.split(`
21
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Mb(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",o;return(o=e.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?i=o[3]:n=o[3]):(o=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],n=o[3],i=o[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function dp(){if(ve.env.NO_COLOR||ve.env.FORCE_COLOR==="0"||ve.env.FORCE_COLOR==="false")return!1;if(ve.env.FORCE_COLOR||ve.env.CLICOLOR_FORCE!==void 0)return!0}hp.Command=fp;hp.useColor=dp});var Gb=D(lr=>{var{Argument:Vb}=Jc(),{Command:pp}=Ub(),{CommanderError:_N,InvalidArgumentError:Hb}=Ia(),{Help:EN}=ip(),{Option:zb}=up();lr.program=new pp;lr.createCommand=t=>new pp(t);lr.createOption=(t,e)=>new zb(t,e);lr.createArgument=(t,e)=>new Vb(t,e);lr.Command=pp;lr.Option=zb;lr.Argument=Vb;lr.Help=EN;lr.CommanderError=_N;lr.InvalidArgumentError=Hb;lr.InvalidOptionArgumentError=Hb});var Te=D((Lse,Kb)=>{"use strict";var mp="\x1B",Me=`${mp}[`,SN="\x07",gp={to(t,e){return e?`${Me}${e+1};${t+1}H`:`${Me}${t+1}G`},move(t,e){let r="";return t<0?r+=`${Me}${-t}D`:t>0&&(r+=`${Me}${t}C`),e<0?r+=`${Me}${-e}A`:e>0&&(r+=`${Me}${e}B`),r},up:(t=1)=>`${Me}${t}A`,down:(t=1)=>`${Me}${t}B`,forward:(t=1)=>`${Me}${t}C`,backward:(t=1)=>`${Me}${t}D`,nextLine:(t=1)=>`${Me}E`.repeat(t),prevLine:(t=1)=>`${Me}F`.repeat(t),left:`${Me}G`,hide:`${Me}?25l`,show:`${Me}?25h`,save:`${mp}7`,restore:`${mp}8`},xN={up:(t=1)=>`${Me}S`.repeat(t),down:(t=1)=>`${Me}T`.repeat(t)},FN={screen:`${Me}2J`,up:(t=1)=>`${Me}1J`.repeat(t),down:(t=1)=>`${Me}J`.repeat(t),line:`${Me}2K`,lineEnd:`${Me}K`,lineStart:`${Me}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?gp.up():"");return t&&(e+=gp.left),e}};Kb.exports={cursor:gp,scroll:xN,erase:FN,beep:SN}});var Dp=D((Bse,yp)=>{var Qc=process||{},Yb=Qc.argv||[],Zc=Qc.env||{},ON=!(Zc.NO_COLOR||Yb.includes("--no-color"))&&(!!Zc.FORCE_COLOR||Yb.includes("--color")||Qc.platform==="win32"||(Qc.stdout||{}).isTTY&&Zc.TERM!=="dumb"||!!Zc.CI),AN=(t,e,r=t)=>n=>{let i=""+n,o=i.indexOf(e,t.length);return~o?t+kN(i,e,r,o)+e:t+i+e},kN=(t,e,r,n)=>{let i="",o=0;do i+=t.substring(o,n)+r,o=n+e.length,n=t.indexOf(e,o);while(~n);return i+t.substring(o)},Jb=(t=ON)=>{let e=t?AN:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};yp.exports=Jb();yp.exports.createColors=Jb});var cl=D(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.isNXMonorepo=qt.isMonorepo=qt.findPackageRelativePathInMonorepo=qt.findPackagePath=qt.findNXMonorepoRoot=qt.findMonorepoRoot=void 0;var La=require("node:fs"),Gn=require("node:path");function ul(t){let e=(0,Gn.join)(t,"package.json"),r=(0,Gn.join)(t,"pnpm-workspace.yaml");if((0,La.existsSync)(r)||(0,La.existsSync)(e)&&JSON.parse((0,La.readFileSync)(e,"utf-8")).workspaces)return t;let n=(0,Gn.dirname)(t);if(n===t)throw new Error("Monorepo root not found");return ul(n)}qt.findMonorepoRoot=ul;function Tp(t){let e=(0,Gn.join)(t,"nx.json");if((0,La.existsSync)(e))return t;let r=(0,Gn.dirname)(t);if(r===t)throw new Error("Monorepo root not found");return Tp(r)}qt.findNXMonorepoRoot=Tp;function Pp(t,e,r){let n=(0,Gn.join)(e,"node_modules",t);if((0,La.existsSync)(n))return n;if(e===r)return null;let i=(0,Gn.dirname)(e);return Pp(t,i,r)}qt.findPackagePath=Pp;function aL(t,e){let r=ul(e),n=Pp(t,e,r);return n?(0,Gn.relative)(e,n):null}qt.findPackageRelativePathInMonorepo=aL;function uL(t){try{return ul(t),!0}catch{return!1}}qt.isMonorepo=uL;function cL(t){try{return Tp(t),!0}catch{return!1}}qt.isNXMonorepo=cL});var Si={};_i(Si,{default:()=>lL});var lL,xi=Et(()=>{lL={}});var mw=D($r=>{"use strict";var fL=$r&&$r.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),dL=$r&&$r.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),hL=$r&&$r.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&fL(e,t,r);return dL(e,t),e};Object.defineProperty($r,"__esModule",{value:!0});$r.resolveFetch=void 0;var pL=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>hL((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};$r.resolveFetch=pL});var jp=D(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.FunctionRegion=tr.FunctionsHttpError=tr.FunctionsRelayError=tr.FunctionsFetchError=tr.FunctionsError=void 0;var Vo=class extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}};tr.FunctionsError=Vo;var Rp=class extends Vo{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}};tr.FunctionsFetchError=Rp;var $p=class extends Vo{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}};tr.FunctionsRelayError=$p;var Ip=class extends Vo{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}};tr.FunctionsHttpError=Ip;var mL;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(mL=tr.FunctionRegion||(tr.FunctionRegion={}))});var gw=D(Ho=>{"use strict";var gL=Ho&&Ho.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.FunctionsClient=void 0;var yL=mw(),fl=jp(),Np=class{constructor(e,{headers:r={},customFetch:n,region:i=fl.FunctionRegion.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=(0,yL.resolveFetch)(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,r={}){var n;return gL(this,void 0,void 0,function*(){try{let{headers:i,method:o,body:s}=r,a={},{region:u}=r;u||(u=this.region),u&&u!=="any"&&(a["x-region"]=u);let c;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",c=s):typeof s=="string"?(a["Content-Type"]="text/plain",c=s):typeof FormData<"u"&&s instanceof FormData?c=s:(a["Content-Type"]="application/json",c=JSON.stringify(s)));let l=yield this.fetch(`${this.url}/${e}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:c}).catch(m=>{throw new fl.FunctionsFetchError(m)}),f=l.headers.get("x-relay-error");if(f&&f==="true")throw new fl.FunctionsRelayError(l);if(!l.ok)throw new fl.FunctionsHttpError(l);let h=((n=l.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),d;return h==="application/json"?d=yield l.json():h==="application/octet-stream"?d=yield l.blob():h==="text/event-stream"?d=l:h==="multipart/form-data"?d=yield l.formData():d=yield l.text(),{data:d,error:null}}catch(i){return{data:null,error:i}}})}};Ho.FunctionsClient=Np});var Lp=D(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.FunctionRegion=Mt.FunctionsRelayError=Mt.FunctionsHttpError=Mt.FunctionsFetchError=Mt.FunctionsError=Mt.FunctionsClient=void 0;var DL=gw();Object.defineProperty(Mt,"FunctionsClient",{enumerable:!0,get:function(){return DL.FunctionsClient}});var qa=jp();Object.defineProperty(Mt,"FunctionsError",{enumerable:!0,get:function(){return qa.FunctionsError}});Object.defineProperty(Mt,"FunctionsFetchError",{enumerable:!0,get:function(){return qa.FunctionsFetchError}});Object.defineProperty(Mt,"FunctionsHttpError",{enumerable:!0,get:function(){return qa.FunctionsHttpError}});Object.defineProperty(Mt,"FunctionsRelayError",{enumerable:!0,get:function(){return qa.FunctionsRelayError}});Object.defineProperty(Mt,"FunctionRegion",{enumerable:!0,get:function(){return qa.FunctionRegion}})});var Mp=D(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var Bp=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}};qp.default=Bp});var Vp=D(Ma=>{"use strict";var yw=Ma&&Ma.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ma,"__esModule",{value:!0});var vL=yw((xi(),je(Si))),bL=yw(Mp()),Up=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=vL.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,r){return this.headers=Object.assign({},this.headers),this.headers[e]=r,this}then(e,r){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");let n=this.fetch,i=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{var s,a,u;let c=null,l=null,f=null,h=o.status,d=o.statusText;if(o.ok){if(this.method!=="HEAD"){let _=await o.text();_===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?l=_:l=JSON.parse(_))}let b=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),y=(a=o.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");b&&y&&y.length>1&&(f=parseInt(y[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(l)&&(l.length>1?(c={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,f=null,h=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{let b=await o.text();try{c=JSON.parse(b),Array.isArray(c)&&o.status===404&&(l=[],c=null,h=200,d="OK")}catch{o.status===404&&b===""?(h=204,d="No Content"):c={message:b}}if(c&&this.isMaybeSingle&&(!((u=c?.details)===null||u===void 0)&&u.includes("0 rows"))&&(c=null,h=200,d="OK"),c&&this.shouldThrowOnError)throw new bL.default(c)}return{error:c,data:l,count:f,status:h,statusText:d}});return this.shouldThrowOnError||(i=i.catch(o=>{var s,a,u;return{error:{message:`${(s=o?.name)!==null&&s!==void 0?s:"FetchError"}: ${o?.message}`,details:`${(a=o?.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(u=o?.code)!==null&&u!==void 0?u:""}`},data:null,count:null,status:0,statusText:""}})),i.then(e,r)}};Ma.default=Up});var zp=D(Ua=>{"use strict";var wL=Ua&&Ua.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ua,"__esModule",{value:!0});var _L=wL(Vp()),Hp=class extends _L.default{select(e){let r=!1,n=(e??"*").split("").map(i=>/\s/.test(i)&&!r?"":(i==='"'&&(r=!r),i)).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:r=!0,nullsFirst:n,foreignTable:i,referencedTable:o=i}={}){let s=o?`${o}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${e}.${r?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:r,referencedTable:n=r}={}){let i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this}range(e,r,{foreignTable:n,referencedTable:i=n}={}){let o=typeof i>"u"?"offset":`${i}.offset`,s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(o,`${e}`),this.url.searchParams.set(s,`${r-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:r=!1,settings:n=!1,buffers:i=!1,wal:o=!1,format:s="text"}={}){var a;let u=[e?"analyze":null,r?"verbose":null,n?"settings":null,i?"buffers":null,o?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${c}"; options=${u};`,s==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};Ua.default=Hp});var dl=D(Va=>{"use strict";var EL=Va&&Va.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Va,"__esModule",{value:!0});var CL=EL(zp()),Gp=class extends CL.default{eq(e,r){return this.url.searchParams.append(e,`eq.${r}`),this}neq(e,r){return this.url.searchParams.append(e,`neq.${r}`),this}gt(e,r){return this.url.searchParams.append(e,`gt.${r}`),this}gte(e,r){return this.url.searchParams.append(e,`gte.${r}`),this}lt(e,r){return this.url.searchParams.append(e,`lt.${r}`),this}lte(e,r){return this.url.searchParams.append(e,`lte.${r}`),this}like(e,r){return this.url.searchParams.append(e,`like.${r}`),this}likeAllOf(e,r){return this.url.searchParams.append(e,`like(all).{${r.join(",")}}`),this}likeAnyOf(e,r){return this.url.searchParams.append(e,`like(any).{${r.join(",")}}`),this}ilike(e,r){return this.url.searchParams.append(e,`ilike.${r}`),this}ilikeAllOf(e,r){return this.url.searchParams.append(e,`ilike(all).{${r.join(",")}}`),this}ilikeAnyOf(e,r){return this.url.searchParams.append(e,`ilike(any).{${r.join(",")}}`),this}is(e,r){return this.url.searchParams.append(e,`is.${r}`),this}in(e,r){let n=Array.from(new Set(r)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cs.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cs.{${r.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(r)}`),this}containedBy(e,r){return typeof r=="string"?this.url.searchParams.append(e,`cd.${r}`):Array.isArray(r)?this.url.searchParams.append(e,`cd.{${r.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(r)}`),this}rangeGt(e,r){return this.url.searchParams.append(e,`sr.${r}`),this}rangeGte(e,r){return this.url.searchParams.append(e,`nxl.${r}`),this}rangeLt(e,r){return this.url.searchParams.append(e,`sl.${r}`),this}rangeLte(e,r){return this.url.searchParams.append(e,`nxr.${r}`),this}rangeAdjacent(e,r){return this.url.searchParams.append(e,`adj.${r}`),this}overlaps(e,r){return typeof r=="string"?this.url.searchParams.append(e,`ov.${r}`):this.url.searchParams.append(e,`ov.{${r.join(",")}}`),this}textSearch(e,r,{config:n,type:i}={}){let o="";i==="plain"?o="pl":i==="phrase"?o="ph":i==="websearch"&&(o="w");let s=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${o}fts${s}.${r}`),this}match(e){return Object.entries(e).forEach(([r,n])=>{this.url.searchParams.append(r,`eq.${n}`)}),this}not(e,r,n){return this.url.searchParams.append(e,`not.${r}.${n}`),this}or(e,{foreignTable:r,referencedTable:n=r}={}){let i=n?`${n}.or`:"or";return this.url.searchParams.append(i,`(${e})`),this}filter(e,r,n){return this.url.searchParams.append(e,`${r}.${n}`),this}};Va.default=Gp});var Kp=D(za=>{"use strict";var SL=za&&za.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(za,"__esModule",{value:!0});var Ha=SL(dl()),Wp=class{constructor(e,{headers:r={},schema:n,fetch:i}){this.url=e,this.headers=r,this.schema=n,this.fetch=i}select(e,{head:r=!1,count:n}={}){let i=r?"HEAD":"GET",o=!1,s=(e??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",s),n&&(this.headers.Prefer=`count=${n}`),new Ha.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:r,defaultToNull:n=!0}={}){let i="POST",o=[];if(this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),n||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){let s=e.reduce((a,u)=>a.concat(Object.keys(u)),[]);if(s.length>0){let a=[...new Set(s)].map(u=>`"${u}"`);this.url.searchParams.set("columns",a.join(","))}}return new Ha.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:r,ignoreDuplicates:n=!1,count:i,defaultToNull:o=!0}={}){let s="POST",a=[`resolution=${n?"ignore":"merge"}-duplicates`];if(r!==void 0&&this.url.searchParams.set("on_conflict",r),this.headers.Prefer&&a.push(this.headers.Prefer),i&&a.push(`count=${i}`),o||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){let u=e.reduce((c,l)=>c.concat(Object.keys(l)),[]);if(u.length>0){let c=[...new Set(u)].map(l=>`"${l}"`);this.url.searchParams.set("columns",c.join(","))}}return new Ha.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:r}={}){let n="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),r&&i.push(`count=${r}`),this.headers.Prefer=i.join(","),new Ha.default({method:n,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){let r="DELETE",n=[];return e&&n.push(`count=${e}`),this.headers.Prefer&&n.unshift(this.headers.Prefer),this.headers.Prefer=n.join(","),new Ha.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};za.default=Wp});var Dw=D(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.version=void 0;hl.version="0.0.0-automated"});var vw=D(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.DEFAULT_HEADERS=void 0;var xL=Dw();pl.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${xL.version}`}});var ww=D(Ga=>{"use strict";var bw=Ga&&Ga.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ga,"__esModule",{value:!0});var FL=bw(Kp()),OL=bw(dl()),AL=vw(),Yp=class t{constructor(e,{headers:r={},schema:n,fetch:i}={}){this.url=e,this.headers=Object.assign(Object.assign({},AL.DEFAULT_HEADERS),r),this.schemaName=n,this.fetch=i}from(e){let r=new URL(`${this.url}/${e}`);return new FL.default(r,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new t(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,r={},{head:n=!1,get:i=!1,count:o}={}){let s,a=new URL(`${this.url}/rpc/${e}`),u;n||i?(s=n?"HEAD":"GET",Object.entries(r).filter(([l,f])=>f!==void 0).map(([l,f])=>[l,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([l,f])=>{a.searchParams.append(l,f)})):(s="POST",u=r);let c=Object.assign({},this.headers);return o&&(c.Prefer=`count=${o}`),new OL.default({method:s,url:a,headers:c,schema:this.schemaName,body:u,fetch:this.fetch,allowEmpty:!1})}};Ga.default=Yp});var Jp=D(Dt=>{"use strict";var zo=Dt&&Dt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.PostgrestError=Dt.PostgrestBuilder=Dt.PostgrestTransformBuilder=Dt.PostgrestFilterBuilder=Dt.PostgrestQueryBuilder=Dt.PostgrestClient=void 0;var _w=zo(ww());Dt.PostgrestClient=_w.default;var Ew=zo(Kp());Dt.PostgrestQueryBuilder=Ew.default;var Cw=zo(dl());Dt.PostgrestFilterBuilder=Cw.default;var Sw=zo(zp());Dt.PostgrestTransformBuilder=Sw.default;var xw=zo(Vp());Dt.PostgrestBuilder=xw.default;var Fw=zo(Mp());Dt.PostgrestError=Fw.default;Dt.default={PostgrestClient:_w.default,PostgrestQueryBuilder:Ew.default,PostgrestFilterBuilder:Cw.default,PostgrestTransformBuilder:Sw.default,PostgrestBuilder:xw.default,PostgrestError:Fw.default}});var Zp={};_i(Zp,{RealtimeClient:()=>Xp});var Xp,Qp=Et(()=>{Xp=class{constructor(){}connect(){}disconnect(){}}});var Ka=D(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.StorageUnknownError=Ir.StorageApiError=Ir.isStorageError=Ir.StorageError=void 0;var Wa=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};Ir.StorageError=Wa;function kL(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}Ir.isStorageError=kL;var em=class extends Wa{constructor(e,r){super(e),this.name="StorageApiError",this.status=r}toJSON(){return{name:this.name,message:this.message,status:this.status}}};Ir.StorageApiError=em;var tm=class extends Wa{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}};Ir.StorageUnknownError=tm});var ml=D(ut=>{"use strict";var TL=ut&&ut.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),PL=ut&&ut.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ow=ut&&ut.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&TL(e,t,r);return PL(e,t),e},RL=ut&&ut.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(ut,"__esModule",{value:!0});ut.recursiveToCamel=ut.resolveResponse=ut.resolveFetch=void 0;var $L=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>Ow((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};ut.resolveFetch=$L;var IL=()=>RL(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Promise.resolve().then(()=>Ow((xi(),je(Si))))).Response:Response});ut.resolveResponse=IL;var jL=t=>{if(Array.isArray(t))return t.map(r=>(0,ut.recursiveToCamel)(r));if(typeof t=="function"||t!==Object(t))return t;let e={};return Object.entries(t).forEach(([r,n])=>{let i=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[i]=(0,ut.recursiveToCamel)(n)}),e};ut.recursiveToCamel=jL});var im=D(Ut=>{"use strict";var Fi=Ut&&Ut.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.remove=Ut.head=Ut.put=Ut.post=Ut.get=void 0;var rm=Ka(),NL=ml(),nm=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),LL=(t,e,r)=>Fi(void 0,void 0,void 0,function*(){let n=yield(0,NL.resolveResponse)();t instanceof n&&!r?.noResolveJson?t.json().then(i=>{e(new rm.StorageApiError(nm(i),t.status||500))}).catch(i=>{e(new rm.StorageUnknownError(nm(i),i))}):e(new rm.StorageUnknownError(nm(t),t))}),BL=(t,e,r,n)=>{let i={method:t,headers:e?.headers||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},e?.headers),n&&(i.body=JSON.stringify(n)),Object.assign(Object.assign({},i),r))};function Ya(t,e,r,n,i,o){return Fi(this,void 0,void 0,function*(){return new Promise((s,a)=>{t(r,BL(e,n,i,o)).then(u=>{if(!u.ok)throw u;return n?.noResolveJson?u:u.json()}).then(u=>s(u)).catch(u=>LL(u,a,n))})})}function qL(t,e,r,n){return Fi(this,void 0,void 0,function*(){return Ya(t,"GET",e,r,n)})}Ut.get=qL;function ML(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"POST",e,n,i,r)})}Ut.post=ML;function UL(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"PUT",e,n,i,r)})}Ut.put=UL;function VL(t,e,r,n){return Fi(this,void 0,void 0,function*(){return Ya(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}Ut.head=VL;function HL(t,e,r,n,i){return Fi(this,void 0,void 0,function*(){return Ya(t,"DELETE",e,n,i,r)})}Ut.remove=HL});var Tw=D(Ja=>{"use strict";var Vt=Ja&&Ja.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ja,"__esModule",{value:!0});var Ht=Ka(),jr=im(),Aw=ml(),zL={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},kw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1},om=class{constructor(e,r={},n,i){this.url=e,this.headers=r,this.bucketId=n,this.fetch=(0,Aw.resolveFetch)(i)}uploadOrUpdate(e,r,n,i){return Vt(this,void 0,void 0,function*(){try{let o,s=Object.assign(Object.assign({},kw),i),a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(s.upsert)}),u=s.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",s.cacheControl),u&&o.append("metadata",this.encodeMetadata(u)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.append("cacheControl",s.cacheControl),u&&o.append("metadata",this.encodeMetadata(u))):(o=n,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,u&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(u)))),i?.headers&&(a=Object.assign(Object.assign({},a),i.headers));let c=this._removeEmptyFolders(r),l=this._getFinalPath(c),f=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:o,headers:a},s?.duplex?{duplex:s.duplex}:{})),h=yield f.json();return f.ok?{data:{path:c,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(o){if((0,Ht.isStorageError)(o))return{data:null,error:o};throw o}})}upload(e,r,n){return Vt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,i){return Vt(this,void 0,void 0,function*(){let o=this._removeEmptyFolders(e),s=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",r);try{let u,c=Object.assign({upsert:kw.upsert},i),l=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&n instanceof Blob?(u=new FormData,u.append("cacheControl",c.cacheControl),u.append("",n)):typeof FormData<"u"&&n instanceof FormData?(u=n,u.append("cacheControl",c.cacheControl)):(u=n,l["cache-control"]=`max-age=${c.cacheControl}`,l["content-type"]=c.contentType);let f=yield this.fetch(a.toString(),{method:"PUT",body:u,headers:l}),h=yield f.json();return f.ok?{data:{path:o,fullPath:h.Key},error:null}:{data:null,error:h}}catch(u){if((0,Ht.isStorageError)(u))return{data:null,error:u};throw u}})}createSignedUploadUrl(e,r){return Vt(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),i=Object.assign({},this.headers);r?.upsert&&(i["x-upsert"]="true");let o=yield(0,jr.post)(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(this.url+o.url),a=s.searchParams.get("token");if(!a)throw new Ht.StorageError("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:a},error:null}}catch(n){if((0,Ht.isStorageError)(n))return{data:null,error:n};throw n}})}update(e,r,n){return Vt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return Vt(this,void 0,void 0,function*(){try{return{data:yield(0,jr.post)(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers}),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}copy(e,r,n){return Vt(this,void 0,void 0,function*(){try{return{data:{path:(yield(0,jr.post)(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}createSignedUrl(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=this._getFinalPath(e),o=yield(0,jr.post)(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:r},n?.transform?{transform:n.transform}:{}),{headers:this.headers}),s=n?.download?`&download=${n.download===!0?"":n.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${s}`)},{data:o,error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}createSignedUrls(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=yield(0,jr.post)(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),o=n?.download?`&download=${n.download===!0?"":n.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${o}`):null})),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}download(e,r){return Vt(this,void 0,void 0,function*(){let i=typeof r?.transform<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString(r?.transform||{}),s=o?`?${o}`:"";try{let a=this._getFinalPath(e);return{data:yield(yield(0,jr.get)(this.fetch,`${this.url}/${i}/${a}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if((0,Ht.isStorageError)(a))return{data:null,error:a};throw a}})}info(e){return Vt(this,void 0,void 0,function*(){let r=this._getFinalPath(e);try{let n=yield(0,jr.get)(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:(0,Aw.recursiveToCamel)(n),error:null}}catch(n){if((0,Ht.isStorageError)(n))return{data:null,error:n};throw n}})}exists(e){return Vt(this,void 0,void 0,function*(){let r=this._getFinalPath(e);try{return yield(0,jr.head)(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if((0,Ht.isStorageError)(n)&&n instanceof Ht.StorageUnknownError){let i=n.originalError;if([400,404].includes(i?.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){let n=this._getFinalPath(e),i=[],o=r?.download?`download=${r.download===!0?"":r.download}`:"";o!==""&&i.push(o);let a=typeof r?.transform<"u"?"render/image":"object",u=this.transformOptsToQueryString(r?.transform||{});u!==""&&i.push(u);let c=i.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${c}`)}}}remove(e){return Vt(this,void 0,void 0,function*(){try{return{data:yield(0,jr.remove)(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if((0,Ht.isStorageError)(r))return{data:null,error:r};throw r}})}list(e,r,n){return Vt(this,void 0,void 0,function*(){try{let i=Object.assign(Object.assign(Object.assign({},zL),r),{prefix:e||""});return{data:yield(0,jr.post)(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},n),error:null}}catch(i){if((0,Ht.isStorageError)(i))return{data:null,error:i};throw i}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){let r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}};Ja.default=om});var Pw=D(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.version=void 0;gl.version="2.7.1"});var Rw=D(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.DEFAULT_HEADERS=void 0;var GL=Pw();yl.DEFAULT_HEADERS={"X-Client-Info":`storage-js/${GL.version}`}});var $w=D(Xa=>{"use strict";var Go=Xa&&Xa.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(Xa,"__esModule",{value:!0});var WL=Rw(),Wo=Ka(),Ko=im(),KL=ml(),sm=class{constructor(e,r={},n){this.url=e,this.headers=Object.assign(Object.assign({},WL.DEFAULT_HEADERS),r),this.fetch=(0,KL.resolveFetch)(n)}listBuckets(){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.get)(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if((0,Wo.isStorageError)(e))return{data:null,error:e};throw e}})}getBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.get)(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}createBucket(e,r={public:!1}){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.post)(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if((0,Wo.isStorageError)(n))return{data:null,error:n};throw n}})}updateBucket(e,r){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.put)(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if((0,Wo.isStorageError)(n))return{data:null,error:n};throw n}})}emptyBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.post)(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}deleteBucket(e){return Go(this,void 0,void 0,function*(){try{return{data:yield(0,Ko.remove)(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if((0,Wo.isStorageError)(r))return{data:null,error:r};throw r}})}};Xa.default=sm});var jw=D(Yo=>{"use strict";var Iw=Yo&&Yo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yo,"__esModule",{value:!0});Yo.StorageClient=void 0;var YL=Iw(Tw()),JL=Iw($w()),am=class extends JL.default{constructor(e,r={},n){super(e,r,n)}from(e){return new YL.default(this.url,this.headers,e,this.fetch)}};Yo.StorageClient=am});var Lw=D(Nw=>{"use strict";Object.defineProperty(Nw,"__esModule",{value:!0})});var qw=D(Nr=>{"use strict";var XL=Nr&&Nr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Bw=Nr&&Nr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&XL(e,t,r)};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.StorageClient=void 0;var ZL=jw();Object.defineProperty(Nr,"StorageClient",{enumerable:!0,get:function(){return ZL.StorageClient}});Bw(Lw(),Nr);Bw(Ka(),Nr)});var Mw=D(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.version=void 0;Dl.version="2.48.1"});var Uw=D(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DEFAULT_REALTIME_OPTIONS=rr.DEFAULT_AUTH_OPTIONS=rr.DEFAULT_DB_OPTIONS=rr.DEFAULT_GLOBAL_OPTIONS=rr.DEFAULT_HEADERS=void 0;var QL=Mw(),Za="";typeof Deno<"u"?Za="deno":typeof document<"u"?Za="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Za="react-native":Za="node";rr.DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${Za}/${QL.version}`};rr.DEFAULT_GLOBAL_OPTIONS={headers:rr.DEFAULT_HEADERS};rr.DEFAULT_DB_OPTIONS={schema:"public"};rr.DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"};rr.DEFAULT_REALTIME_OPTIONS={}});var Hw=D(ct=>{"use strict";var eB=ct&&ct.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),tB=ct&&ct.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),rB=ct&&ct.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&eB(e,t,r);return tB(e,t),e},nB=ct&&ct.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(ct,"__esModule",{value:!0});ct.fetchWithAuth=ct.resolveHeadersConstructor=ct.resolveFetch=void 0;var Vw=rB((xi(),je(Si))),iB=t=>{let e;return t?e=t:typeof fetch>"u"?e=Vw.default:e=fetch,(...r)=>e(...r)};ct.resolveFetch=iB;var oB=()=>typeof Headers>"u"?Vw.Headers:Headers;ct.resolveHeadersConstructor=oB;var sB=(t,e,r)=>{let n=(0,ct.resolveFetch)(r),i=(0,ct.resolveHeadersConstructor)();return(o,s)=>nB(void 0,void 0,void 0,function*(){var a;let u=(a=yield e())!==null&&a!==void 0?a:t,c=new i(s?.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${u}`),n(o,Object.assign(Object.assign({},s),{headers:c}))})};ct.fetchWithAuth=sB});var zw=D(dr=>{"use strict";var aB=dr&&dr.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(dr,"__esModule",{value:!0});dr.applySettingDefaults=dr.isBrowser=dr.stripTrailingSlash=dr.uuid=void 0;function uB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t=="x"?e:e&3|8;return r.toString(16)})}dr.uuid=uB;function cB(t){return t.replace(/\/$/,"")}dr.stripTrailingSlash=cB;var lB=()=>typeof window<"u";dr.isBrowser=lB;function fB(t,e){let{db:r,auth:n,realtime:i,global:o}=t,{db:s,auth:a,realtime:u,global:c}=e,l={db:Object.assign(Object.assign({},s),r),auth:Object.assign(Object.assign({},a),n),realtime:Object.assign(Object.assign({},u),i),global:Object.assign(Object.assign({},c),o),accessToken:()=>aB(this,void 0,void 0,function*(){return""})};return t.accessToken?l.accessToken=t.accessToken:delete l.accessToken,l}dr.applySettingDefaults=fB});var um=D(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.version=void 0;vl.version="2.67.3"});var bl=D(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.API_VERSIONS=lt.API_VERSION_HEADER_NAME=lt.NETWORK_FAILURE=lt.EXPIRY_MARGIN=lt.DEFAULT_HEADERS=lt.AUDIENCE=lt.STORAGE_KEY=lt.GOTRUE_URL=void 0;var dB=um();lt.GOTRUE_URL="http://localhost:9999";lt.STORAGE_KEY="supabase.auth.token";lt.AUDIENCE="";lt.DEFAULT_HEADERS={"X-Client-Info":`gotrue-js/${dB.version}`};lt.EXPIRY_MARGIN=10;lt.NETWORK_FAILURE={MAX_RETRIES:10,RETRY_INTERVAL:2};lt.API_VERSION_HEADER_NAME="X-Supabase-Api-Version";lt.API_VERSIONS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}}});var Jo=D(te=>{"use strict";var hB=te&&te.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),pB=te&&te.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mB=te&&te.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&hB(e,t,r);return pB(e,t),e};Object.defineProperty(te,"__esModule",{value:!0});te.parseResponseAPIVersion=te.getCodeChallengeAndMethod=te.generatePKCEChallenge=te.generatePKCEVerifier=te.retryable=te.sleep=te.decodeJWTPayload=te.Deferred=te.decodeBase64URL=te.removeItemAsync=te.getItemAsync=te.setItemAsync=te.looksLikeFetchResponse=te.resolveFetch=te.parseParametersFromURL=te.supportsLocalStorage=te.isBrowser=te.uuid=te.expiresAt=void 0;var gB=bl();function yB(t){return Math.round(Date.now()/1e3)+t}te.expiresAt=yB;function DB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}te.uuid=DB;var vB=()=>typeof window<"u"&&typeof document<"u";te.isBrowser=vB;var Oi={tested:!1,writable:!1},bB=()=>{if(!(0,te.isBrowser)())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Oi.tested)return Oi.writable;let t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Oi.tested=!0,Oi.writable=!0}catch{Oi.tested=!0,Oi.writable=!1}return Oi.writable};te.supportsLocalStorage=bB;function wB(t){let e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,o)=>{e[o]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}te.parseParametersFromURL=wB;var _B=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>Promise.resolve().then(()=>mB((xi(),je(Si)))).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};te.resolveFetch=_B;var EB=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function";te.looksLikeFetchResponse=EB;var CB=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))};te.setItemAsync=CB;var SB=async(t,e)=>{let r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}};te.getItemAsync=SB;var xB=async(t,e)=>{await t.removeItem(e)};te.removeItemAsync=xB;function Gw(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",n,i,o,s,a,u,c,l=0;for(t=t.replace("-","+").replace("_","/");l<t.length;)s=e.indexOf(t.charAt(l++)),a=e.indexOf(t.charAt(l++)),u=e.indexOf(t.charAt(l++)),c=e.indexOf(t.charAt(l++)),n=s<<2|a>>4,i=(a&15)<<4|u>>2,o=(u&3)<<6|c,r=r+String.fromCharCode(n),u!=64&&i!=0&&(r=r+String.fromCharCode(i)),c!=64&&o!=0&&(r=r+String.fromCharCode(o));return r}te.decodeBase64URL=Gw;var wl=class t{constructor(){this.promise=new t.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}};te.Deferred=wl;wl.promiseConstructor=Promise;function FB(t){let e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,r=t.split(".");if(r.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(r[1]))throw new Error("JWT is not valid: payload is not in base64url format");let n=r[1];return JSON.parse(Gw(n))}te.decodeJWTPayload=FB;async function OB(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}te.sleep=OB;function AB(t,e){return new Promise((n,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{let s=await t(o);if(!e(o,null,s)){n(s);return}}catch(s){if(!e(o,s)){i(s);return}}})()})}te.retryable=AB;function kB(t){return("0"+t.toString(16)).substr(-2)}function Ww(){let e=new Uint32Array(56);if(typeof crypto>"u"){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length,i="";for(let o=0;o<56;o++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,kB).join("")}te.generatePKCEVerifier=Ww;async function TB(t){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}function PB(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Kw(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;let r=await TB(t);return PB(r)}te.generatePKCEChallenge=Kw;async function RB(t,e,r=!1){let n=Ww(),i=n;r&&(i+="/PASSWORD_RECOVERY"),await(0,te.setItemAsync)(t,`${e}-code-verifier`,i);let o=await Kw(n);return[o,n===o?"plain":"s256"]}te.getCodeChallengeAndMethod=RB;var $B=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function IB(t){let e=t.headers.get(gB.API_VERSION_HEADER_NAME);if(!e||!e.match($B))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}te.parseResponseAPIVersion=IB});var Qa=D(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.isAuthWeakPasswordError=le.AuthWeakPasswordError=le.isAuthRetryableFetchError=le.AuthRetryableFetchError=le.AuthPKCEGrantCodeExchangeError=le.isAuthImplicitGrantRedirectError=le.AuthImplicitGrantRedirectError=le.AuthInvalidCredentialsError=le.AuthInvalidTokenResponseError=le.isAuthSessionMissingError=le.AuthSessionMissingError=le.CustomAuthError=le.AuthUnknownError=le.isAuthApiError=le.AuthApiError=le.isAuthError=le.AuthError=void 0;var Xo=class extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}};le.AuthError=Xo;function Zo(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}le.isAuthError=Zo;var cm=class extends Xo{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}};le.AuthApiError=cm;function jB(t){return Zo(t)&&t.name==="AuthApiError"}le.isAuthApiError=jB;var lm=class extends Xo{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}};le.AuthUnknownError=lm;var Lr=class extends Xo{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}};le.CustomAuthError=Lr;var fm=class extends Lr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}};le.AuthSessionMissingError=fm;function NB(t){return Zo(t)&&t.name==="AuthSessionMissingError"}le.isAuthSessionMissingError=NB;var dm=class extends Lr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}};le.AuthInvalidTokenResponseError=dm;var hm=class extends Lr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}};le.AuthInvalidCredentialsError=hm;var pm=class extends Lr{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};le.AuthImplicitGrantRedirectError=pm;function LB(t){return Zo(t)&&t.name==="AuthImplicitGrantRedirectError"}le.isAuthImplicitGrantRedirectError=LB;var mm=class extends Lr{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};le.AuthPKCEGrantCodeExchangeError=mm;var gm=class extends Lr{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}};le.AuthRetryableFetchError=gm;function BB(t){return Zo(t)&&t.name==="AuthRetryableFetchError"}le.isAuthRetryableFetchError=BB;var ym=class extends Lr{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}};le.AuthWeakPasswordError=ym;function qB(t){return Zo(t)&&t.name==="AuthWeakPasswordError"}le.isAuthWeakPasswordError=qB});var bm=D(nt=>{"use strict";var MB=nt&&nt.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};Object.defineProperty(nt,"__esModule",{value:!0});nt._noResolveJsonResponse=nt._generateLinkResponse=nt._ssoResponse=nt._userResponse=nt._sessionResponsePassword=nt._sessionResponse=nt._request=nt.handleError=void 0;var _l=bl(),Dm=Jo(),Wn=Qa(),Ai=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),UB=[502,503,504];async function vm(t){var e;if(!(0,Dm.looksLikeFetchResponse)(t))throw new Wn.AuthRetryableFetchError(Ai(t),0);if(UB.includes(t.status))throw new Wn.AuthRetryableFetchError(Ai(t),t.status);let r;try{r=await t.json()}catch(o){throw new Wn.AuthUnknownError(Ai(o),o)}let n,i=(0,Dm.parseResponseAPIVersion)(t);if(i&&i.getTime()>=_l.API_VERSIONS["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Wn.AuthWeakPasswordError(Ai(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wn.AuthSessionMissingError}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,s)=>o&&typeof s=="string",!0))throw new Wn.AuthWeakPasswordError(Ai(r),t.status,r.weak_password.reasons);throw new Wn.AuthApiError(Ai(r),t.status||500,n)}nt.handleError=vm;var VB=(t,e,r,n)=>{let i={method:t,headers:e?.headers||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function HB(t,e,r,n){var i;let o=Object.assign({},n?.headers);o[_l.API_VERSION_HEADER_NAME]||(o[_l.API_VERSION_HEADER_NAME]=_l.API_VERSIONS["2024-01-01"].name),n?.jwt&&(o.Authorization=`Bearer ${n.jwt}`);let s=(i=n?.query)!==null&&i!==void 0?i:{};n?.redirectTo&&(s.redirect_to=n.redirectTo);let a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",u=await zB(t,e,r+a,{headers:o,noResolveJson:n?.noResolveJson},{},n?.body);return n?.xform?n?.xform(u):{data:Object.assign({},u),error:null}}nt._request=HB;async function zB(t,e,r,n,i,o){let s=VB(e,n,i,o),a;try{a=await t(r,Object.assign({},s))}catch(u){throw console.error(u),new Wn.AuthRetryableFetchError(Ai(u),0)}if(a.ok||await vm(a),n?.noResolveJson)return a;try{return await a.json()}catch(u){await vm(u)}}function Yw(t){var e;let r=null;XB(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=(0,Dm.expiresAt)(t.expires_in)));let n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}nt._sessionResponse=Yw;function GB(t){let e=Yw(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}nt._sessionResponsePassword=GB;function WB(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}nt._userResponse=WB;function KB(t){return{data:t,error:null}}nt._ssoResponse=KB;function YB(t){let{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o}=t,s=MB(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:o},u=Object.assign({},s);return{data:{properties:a,user:u},error:null}}nt._generateLinkResponse=YB;function JB(t){return t}nt._noResolveJsonResponse=JB;function XB(t){return t.access_token&&t.refresh_token&&t.expires_in}});var El=D(eu=>{"use strict";var ZB=eu&&eu.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};Object.defineProperty(eu,"__esModule",{value:!0});var vt=bm(),QB=Jo(),Br=Qa(),wm=class{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=(0,QB.resolveFetch)(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,r="global"){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if((0,Br.isAuthError)(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{let{options:r}=e,n=ZB(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n?.newEmail,delete i.newEmail),await(0,vt._request)(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:vt._generateLinkResponse,redirectTo:r?.redirectTo})}catch(r){if((0,Br.isAuthError)(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await(0,vt._request)(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:vt._userResponse})}catch(r){if((0,Br.isAuthError)(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,o,s,a,u;try{let c={nextPage:null,lastPage:0,total:0},l=await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(i=e?.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:vt._noResolveJsonResponse});if(l.error)throw l.error;let f=await l.json(),h=(s=l.headers.get("x-total-count"))!==null&&s!==void 0?s:0,d=(u=(a=l.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&u!==void 0?u:[];return d.length>0&&(d.forEach(m=>{let b=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(m.split(";")[1].split("=")[1]);c[`${y}Page`]=b}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if((0,Br.isAuthError)(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){try{return await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:vt._userResponse})}catch(r){if((0,Br.isAuthError)(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){try{return await(0,vt._request)(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){try{return await(0,vt._request)(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:vt._userResponse})}catch(n){if((0,Br.isAuthError)(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){try{let{data:r,error:n}=await(0,vt._request)(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if((0,Br.isAuthError)(r))return{data:null,error:r};throw r}}async _deleteFactor(e){try{return{data:await(0,vt._request)(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if((0,Br.isAuthError)(r))return{data:null,error:r};throw r}}};eu.default=wm});var Jw=D(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.memoryLocalStorageAdapter=Qo.localStorageAdapter=void 0;var _m=Jo();Qo.localStorageAdapter={getItem:t=>(0,_m.supportsLocalStorage)()?globalThis.localStorage.getItem(t):null,setItem:(t,e)=>{(0,_m.supportsLocalStorage)()&&globalThis.localStorage.setItem(t,e)},removeItem:t=>{(0,_m.supportsLocalStorage)()&&globalThis.localStorage.removeItem(t)}};function eq(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}Qo.memoryLocalStorageAdapter=eq});var Xw=D(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.polyfillGlobalThis=void 0;function tq(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}Cl.polyfillGlobalThis=tq});var Em=D(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.processLock=it.navigatorLock=it.ProcessLockAcquireTimeoutError=it.NavigatorLockAcquireTimeoutError=it.LockAcquireTimeoutError=it.internals=void 0;var rq=Jo();it.internals={debug:!!(globalThis&&(0,rq.supportsLocalStorage)()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};var tu=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};it.LockAcquireTimeoutError=tu;var Sl=class extends tu{};it.NavigatorLockAcquireTimeoutError=Sl;var xl=class extends tu{};it.ProcessLockAcquireTimeoutError=xl;async function nq(t,e,r){it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);let n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async i=>{if(i){it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await r()}finally{it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw it.internals.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Sl(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(it.internals.debug)try{let o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}it.navigatorLock=nq;var Zw={};async function iq(t,e,r){var n;let i=(n=Zw[t])!==null&&n!==void 0?n:Promise.resolve(),o=Promise.race([i.catch(()=>null),e>=0?new Promise((s,a)=>{setTimeout(()=>{a(new xl(`Acquring process lock with name "${t}" timed out`))},e)}):null].filter(s=>s)).catch(s=>{if(s&&s.isAcquireTimeout)throw s;return null}).then(async()=>await r());return Zw[t]=o.catch(async s=>{if(s&&s.isAcquireTimeout)return await i,null;throw s}),await o}it.processLock=iq});var Sm=D(iu=>{"use strict";var oq=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});var sq=oq(El()),nu=bl(),Z=Qa(),se=bm(),me=Jo(),Cm=Jw(),aq=Xw(),uq=um(),Qw=Em();(0,aq.polyfillGlobalThis)();var cq={url:nu.GOTRUE_URL,storageKey:nu.STORAGE_KEY,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:nu.DEFAULT_HEADERS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},ru=30*1e3,e_=3;async function t_(t,e,r){return await r()}var Fl=class t{constructor(e){var r,n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=t.nextInstanceID,t.nextInstanceID+=1,this.instanceID>0&&(0,me.isBrowser)()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let i=Object.assign(Object.assign({},cq),e);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new sq.default({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=(0,me.resolveFetch)(i.fetch),this.lock=i.lock||t_,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:(0,me.isBrowser)()&&(!((r=globalThis?.navigator)===null||r===void 0)&&r.locks)?this.lock=Qw.navigatorLock:this.lock=t_,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:(0,me.supportsLocalStorage)()?this.storage=Cm.localStorageAdapter:(this.memoryStorage={},this.storage=(0,Cm.memoryLocalStorageAdapter)(this.memoryStorage)):(this.memoryStorage={},this.storage=(0,Cm.memoryLocalStorageAdapter)(this.memoryStorage)),(0,me.isBrowser)()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${uq.version}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r=(0,me.parseParametersFromURL)(window.location.href),n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),(0,me.isBrowser)()&&this.detectSessionInUrl&&n!=="none"){let{data:i,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),(0,Z.isAuthImplicitGrantRedirectError)(o)){let u=(e=o.details)===null||e===void 0?void 0:e.code;if(u==="identity_already_exists"||u==="identity_not_found"||u==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}let{session:s,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",a),await this._saveSession(s),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return(0,Z.isAuthError)(r)?{error:r}:{error:new Z.AuthUnknownError("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{let o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e?.options)===null||i===void 0?void 0:i.captchaToken}},xform:se._sessionResponse}),{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};let u=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(e){var r,n,i;try{let o;if("email"in e){let{email:l,password:f,options:h}=e,d=null,m=null;this.flowType==="pkce"&&([d,m]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey)),o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h?.emailRedirectTo,body:{email:l,password:f,data:(r=h?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h?.captchaToken},code_challenge:d,code_challenge_method:m},xform:se._sessionResponse})}else if("phone"in e){let{phone:l,password:f,options:h}=e;o=await(0,se._request)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:l,password:f,data:(n=h?.data)!==null&&n!==void 0?n:{},channel:(i=h?.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h?.captchaToken}},xform:se._sessionResponse})}else throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};let u=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{let r;if("email"in e){let{email:o,password:s,options:a}=e;r=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:s,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:se._sessionResponsePassword})}else if("phone"in e){let{phone:o,password:s,options:a}=e;r=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:s,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:se._sessionResponsePassword})}else throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a password");let{data:n,error:i}=r;return i?{data:{user:null,session:null},error:i}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new Z.AuthInvalidTokenResponseError}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,i,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){let r=await(0,me.getItemAsync)(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{let{data:o,error:s}=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:se._sessionResponse});if(await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new Z.AuthInvalidTokenResponseError}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:i??null}),error:s})}catch(o){if((0,Z.isAuthError)(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(e){try{let{options:r,provider:n,token:i,access_token:o,nonce:s}=e,a=await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:o,nonce:s,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:se._sessionResponse}),{data:u,error:c}=a;return c?{data:{user:null,session:null},error:c}:!u||!u.session||!u.user?{data:{user:null,session:null},error:new Z.AuthInvalidTokenResponseError}:(u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",u.session)),{data:u,error:c})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,i,o,s;try{if("email"in e){let{email:a,options:u}=e,c=null,l=null;this.flowType==="pkce"&&([c,l]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey));let{error:f}=await(0,se._request)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=u?.data)!==null&&r!==void 0?r:{},create_user:(n=u?.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:u?.captchaToken},code_challenge:c,code_challenge_method:l},redirectTo:u?.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in e){let{phone:a,options:u}=e,{data:c,error:l}=await(0,se._request)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=u?.data)!==null&&i!==void 0?i:{},create_user:(o=u?.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:u?.captchaToken},channel:(s=u?.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:c?.message_id},error:l}}throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number.")}catch(a){if((0,Z.isAuthError)(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var r,n;try{let i,o;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,o=(n=e.options)===null||n===void 0?void 0:n.captchaToken);let{data:s,error:a}=await(0,se._request)(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:se._sessionResponse});if(a)throw a;if(!s)throw new Error("An error occurred on token verification.");let u=s.session,c=s.user;return u?.access_token&&(await this._saveSession(u),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u)),{data:{user:c,session:u},error:null}}catch(i){if((0,Z.isAuthError)(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(e){var r,n,i;try{let o=null,s=null;return this.flowType==="pkce"&&([o,s]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey)),await(0,se._request)(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e?.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:s}),headers:this.headers,xform:se._ssoResponse})}catch(o){if((0,Z.isAuthError)(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Z.AuthSessionMissingError;let{error:i}=await(0,se._request)(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:i}})}catch(e){if((0,Z.isAuthError)(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{let r=`${this.url}/resend`;if("email"in e){let{email:n,type:i,options:o}=e,{error:s}=await(0,se._request)(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:o?.captchaToken}},redirectTo:o?.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in e){let{phone:n,type:i,options:o}=e,{data:s,error:a}=await(0,se._request)(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:o?.captchaToken}}});return{data:{user:null,session:null,messageId:s?.message_id},error:a}}throw new Z.AuthInvalidCredentialsError("You must provide either an email or phone number and a type")}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){let i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null,r=await(0,me.getItemAsync)(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.storage.isServer){let s=this.suppressGetSessionWarning;e=new Proxy(e,{get:(u,c,l)=>(!s&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(u,c,l))})}return{data:{session:e},error:null}}let{session:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await(0,se._request)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:se._userResponse}):await this._useSession(async r=>{var n,i,o;let{data:s,error:a}=r;if(a)throw a;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Z.AuthSessionMissingError}:await(0,se._request)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:se._userResponse})})}catch(r){if((0,Z.isAuthError)(r))return(0,Z.isAuthSessionMissingError)(r)&&(await this._removeSession(),await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{let{data:i,error:o}=n;if(o)throw o;if(!i.session)throw new Z.AuthSessionMissingError;let s=i.session,a=null,u=null;this.flowType==="pkce"&&e.email!=null&&([a,u]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey));let{data:c,error:l}=await(0,se._request)(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:u}),jwt:s.access_token,xform:se._userResponse});if(l)throw l;return s.user=c.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(n){if((0,Z.isAuthError)(n))return{data:{user:null},error:n};throw n}}_decodeJWT(e){return(0,me.decodeJWTPayload)(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Z.AuthSessionMissingError;let r=Date.now()/1e3,n=r,i=!0,o=null,s=(0,me.decodeJWTPayload)(e.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){let{session:a,error:u}=await this._callRefreshToken(e.refresh_token);if(u)return{data:{user:null,session:null},error:u};if(!a)return{data:{user:null,session:null},error:null};o=a}else{let{data:a,error:u}=await this._getUser(e.access_token);if(u)throw u;o={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(r){if((0,Z.isAuthError)(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){let{data:s,error:a}=r;if(a)throw a;e=(n=s.session)!==null&&n!==void 0?n:void 0}if(!e?.refresh_token)throw new Z.AuthSessionMissingError;let{session:i,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if((0,Z.isAuthError)(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!(0,me.isBrowser)())throw new Z.AuthImplicitGrantRedirectError("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Z.AuthImplicitGrantRedirectError(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Z.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Z.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Z.AuthPKCEGrantCodeExchangeError("No code detected.");let{data:x,error:g}=await this._exchangeCodeForSession(e.code);if(g)throw g;let C=new URL(window.location.href);return C.searchParams.delete("code"),window.history.replaceState(window.history.state,"",C.toString()),{data:{session:x.session,redirectType:null},error:null}}let{provider_token:n,provider_refresh_token:i,access_token:o,refresh_token:s,expires_in:a,expires_at:u,token_type:c}=e;if(!o||!a||!s||!c)throw new Z.AuthImplicitGrantRedirectError("No session defined in URL");let l=Math.round(Date.now()/1e3),f=parseInt(a),h=l+f;u&&(h=parseInt(u));let d=h-l;d*1e3<=ru&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${d}s, should have been closer to ${f}s`);let m=h-f;l-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,h,l):l-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,h,l);let{data:b,error:y}=await this._getUser(o);if(y)throw y;let _={provider_token:n,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:s,token_type:c,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:_,redirectType:e.type},error:null}}catch(n){if((0,Z.isAuthError)(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){let r=await(0,me.getItemAsync)(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;let{data:i,error:o}=r;if(o)return{error:o};let s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){let{error:a}=await this.admin.signOut(s,e);if(a&&!((0,Z.isAuthApiError)(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await(0,me.removeItemAsync)(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){let r=(0,me.uuid)(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{let{data:{session:o},error:s}=r;if(s)throw s;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey,!0));try{return await(0,se._request)(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if((0,Z.isAuthError)(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{let{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async linkIdentity(e){var r;try{let{data:n,error:i}=await this._useSession(async o=>{var s,a,u,c,l;let{data:f,error:h}=o;if(h)throw h;let d=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(u=e.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return await(0,se._request)(this.fetch,"GET",d,{headers:this.headers,jwt:(l=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&l!==void 0?l:void 0})});if(i)throw i;return(0,me.isBrowser)()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n?.url),{data:{provider:e.provider,url:n?.url},error:null}}catch(n){if((0,Z.isAuthError)(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;let{data:o,error:s}=r;if(s)throw s;return await(0,se._request)(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){let r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{let n=Date.now();return await(0,me.retryable)(async i=>(i>0&&await(0,me.sleep)(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await(0,se._request)(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:se._sessionResponse})),(i,o)=>{let s=200*Math.pow(2,i);return o&&(0,Z.isAuthRetryableFetchError)(o)&&Date.now()+s-n<ru})}catch(n){if(this._debug(r,"error",n),(0,Z.isAuthError)(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){let n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),(0,me.isBrowser)()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e;let r="#_recoverAndRefresh()";this._debug(r,"begin");try{let n=await(0,me.getItemAsync)(this.storage,this.storageKey);if(this._debug(r,"session from storage",n),!this._isValidSession(n)){this._debug(r,"session is not valid"),n!==null&&await this._removeSession();return}let i=Math.round(Date.now()/1e3),o=((e=n.expires_at)!==null&&e!==void 0?e:1/0)<i+nu.EXPIRY_MARGIN;if(this._debug(r,`session has${o?"":" not"} expired with margin of ${nu.EXPIRY_MARGIN}s`),o){if(this.autoRefreshToken&&n.refresh_token){let{error:s}=await this._callRefreshToken(n.refresh_token);s&&(console.error(s),(0,Z.isAuthRetryableFetchError)(s)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",n)}catch(n){this._debug(r,"error",n),console.error(n);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Z.AuthSessionMissingError;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new me.Deferred;let{data:o,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!o.session)throw new Z.AuthSessionMissingError;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);let a={session:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(i,"error",o),(0,Z.isAuthError)(o)){let s={session:null,error:o};return(0,Z.isAuthRetryableFetchError)(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){let i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});let o=[],s=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(u){o.push(u)}});if(await Promise.all(s),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await(0,me.setItemAsync)(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await(0,me.removeItemAsync)(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&(0,me.isBrowser)()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),ru);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async r=>{let{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let i=Math.floor((n.expires_at*1e3-e)/ru);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${ru}ms, refresh threshold is ${e_} ticks`),i<=e_&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Qw.LockAcquireTimeoutError)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!(0,me.isBrowser)()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){let i=[`provider=${encodeURIComponent(r)}`];if(n?.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){let[o,s]=await(0,me.getCodeChallengeAndMethod)(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(a.toString())}if(n?.queryParams){let o=new URLSearchParams(n.queryParams);i.push(o.toString())}return n?.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;return o?{data:null,error:o}:await(0,se._request)(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;let{data:o,error:s}=r;if(s)return{data:null,error:s};let a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:u,error:c}=await(0,se._request)(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o?.session)===null||n===void 0?void 0:n.access_token});return c?{data:null,error:c}:(e.factorType==="totp"&&(!((i=u?.totp)===null||i===void 0)&&i.qr_code)&&(u.totp.qr_code=`data:image/svg+xml;utf-8,${u.totp.qr_code}`),{data:u,error:null})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;if(o)return{data:null,error:o};let{data:s,error:a}=await(0,se._request)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:a})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;let{data:i,error:o}=r;return o?{data:null,error:o}:await(0,se._request)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(n=i?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if((0,Z.isAuthError)(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){let{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){let{data:{user:e},error:r}=await this.getUser();if(r)return{data:null,error:r};let n=e?.factors||[],i=n.filter(s=>s.factor_type==="totp"&&s.status==="verified"),o=n.filter(s=>s.factor_type==="phone"&&s.status==="verified");return{data:{all:n,totp:i,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var r,n;let{data:{session:i},error:o}=e;if(o)return{data:null,error:o};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let s=this._decodeJWT(i.access_token),a=null;s.aal&&(a=s.aal);let u=a;((n=(r=i.user.factors)===null||r===void 0?void 0:r.filter(f=>f.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(u="aal2");let l=s.amr||[];return{data:{currentLevel:a,nextLevel:u,currentAuthenticationMethods:l},error:null}}))}};iu.default=Fl;Fl.nextInstanceID=0});var r_=D(ou=>{"use strict";var lq=ou&&ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ou,"__esModule",{value:!0});var fq=lq(El()),dq=fq.default;ou.default=dq});var n_=D(su=>{"use strict";var hq=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});var pq=hq(Sm()),mq=pq.default;su.default=mq});var o_=D(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0})});var Fm=D(Le=>{"use strict";var gq=Le&&Le.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),s_=Le&&Le.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&gq(e,t,r)},Ol=Le&&Le.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Le,"__esModule",{value:!0});Le.lockInternals=Le.NavigatorLockAcquireTimeoutError=Le.navigatorLock=Le.AuthClient=Le.AuthAdminApi=Le.GoTrueClient=Le.GoTrueAdminApi=void 0;var yq=Ol(El());Le.GoTrueAdminApi=yq.default;var Dq=Ol(Sm());Le.GoTrueClient=Dq.default;var vq=Ol(r_());Le.AuthAdminApi=vq.default;var bq=Ol(n_());Le.AuthClient=bq.default;s_(o_(),Le);s_(Qa(),Le);var xm=Em();Object.defineProperty(Le,"navigatorLock",{enumerable:!0,get:function(){return xm.navigatorLock}});Object.defineProperty(Le,"NavigatorLockAcquireTimeoutError",{enumerable:!0,get:function(){return xm.NavigatorLockAcquireTimeoutError}});Object.defineProperty(Le,"lockInternals",{enumerable:!0,get:function(){return xm.internals}})});var a_=D(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.SupabaseAuthClient=void 0;var wq=Fm(),Om=class extends wq.AuthClient{constructor(e){super(e)}};Al.SupabaseAuthClient=Om});var km=D(au=>{"use strict";var _q=au&&au.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{c(n.next(l))}catch(f){s(f)}}function u(l){try{c(n.throw(l))}catch(f){s(f)}}function c(l){l.done?o(l.value):i(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})};Object.defineProperty(au,"__esModule",{value:!0});var Eq=Lp(),Cq=Jp(),Sq=(Qp(),je(Zp)),xq=qw(),kl=Uw(),Fq=Hw(),u_=zw(),Oq=a_(),Am=class{constructor(e,r,n){var i,o,s;if(this.supabaseUrl=e,this.supabaseKey=r,!e)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");let a=(0,u_.stripTrailingSlash)(e);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;let u=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,c={db:kl.DEFAULT_DB_OPTIONS,realtime:kl.DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},kl.DEFAULT_AUTH_OPTIONS),{storageKey:u}),global:kl.DEFAULT_GLOBAL_OPTIONS},l=(0,u_.applySettingDefaults)(n??{},c);this.storageKey=(i=l.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=l.global.headers)!==null&&o!==void 0?o:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=l.auth)!==null&&s!==void 0?s:{},this.headers,l.global.fetch),this.fetch=(0,Fq.fetchWithAuth)(r,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.rest=new Cq.PostgrestClient(`${a}/rest/v1`,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),l.accessToken||this._listenForAuthEvents()}get functions(){return new Eq.FunctionsClient(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new xq.StorageClient(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,r;return _q(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();let{data:n}=yield this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,storageKey:o,flowType:s,lock:a,debug:u},c,l){let f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Oq.SupabaseAuthClient({url:this.authUrl,headers:Object.assign(Object.assign({},f),c),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:i,flowType:s,lock:a,debug:u,fetch:l,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new Sq.RealtimeClient(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n?.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};au.default=Am});var f_=D(Fe=>{"use strict";var Aq=Fe&&Fe.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),c_=Fe&&Fe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Aq(e,t,r)},l_=Fe&&Fe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.createClient=Fe.SupabaseClient=Fe.FunctionRegion=Fe.FunctionsError=Fe.FunctionsRelayError=Fe.FunctionsFetchError=Fe.FunctionsHttpError=Fe.PostgrestError=void 0;var kq=l_(km());c_(Fm(),Fe);var Tq=Jp();Object.defineProperty(Fe,"PostgrestError",{enumerable:!0,get:function(){return Tq.PostgrestError}});var uu=Lp();Object.defineProperty(Fe,"FunctionsHttpError",{enumerable:!0,get:function(){return uu.FunctionsHttpError}});Object.defineProperty(Fe,"FunctionsFetchError",{enumerable:!0,get:function(){return uu.FunctionsFetchError}});Object.defineProperty(Fe,"FunctionsRelayError",{enumerable:!0,get:function(){return uu.FunctionsRelayError}});Object.defineProperty(Fe,"FunctionsError",{enumerable:!0,get:function(){return uu.FunctionsError}});Object.defineProperty(Fe,"FunctionRegion",{enumerable:!0,get:function(){return uu.FunctionRegion}});c_((Qp(),je(Zp)),Fe);var Pq=km();Object.defineProperty(Fe,"SupabaseClient",{enumerable:!0,get:function(){return l_(Pq).default}});var Rq=(t,e,r)=>new kq.default(t,e,r);Fe.createClient=Rq});var Tm=D((Yae,d_)=>{d_.exports=require("stream")});var D_=D((Jae,y_)=>{"use strict";function h_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function p_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h_(Object(r),!0).forEach(function(n){$q(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $q(t,e,r){return e=g_(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g_(n.key),n)}}function jq(t,e,r){return e&&m_(t.prototype,e),r&&m_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g_(t){var e=Nq(t,"string");return typeof e=="symbol"?e:String(e)}function Nq(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lq=require("buffer"),Tl=Lq.Buffer,Bq=require("util"),Pm=Bq.inspect,qq=Pm&&Pm.custom||"inspect";function Mq(t,e,r){Tl.prototype.copy.call(t,e,r)}y_.exports=function(){function t(){Iq(this,t),this.head=null,this.tail=null,this.length=0}return jq(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return Tl.alloc(0);for(var n=Tl.allocUnsafe(r>>>0),i=this.head,o=0;i;)Mq(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,o=n.data;for(r-=o.length;n=n.next;){var s=n.data,a=r>s.length?s.length:r;if(a===s.length?o+=s:o+=s.slice(0,r),r-=a,r===0){a===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(a));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=Tl.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,a=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,a),r-=a,r===0){a===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(a));break}++o}return this.length-=o,n}},{key:qq,value:function(r,n){return Pm(this,p_(p_({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var $m=D((Xae,b_)=>{"use strict";function Uq(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Rm,this,t)):process.nextTick(Rm,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(Pl,r):(r._writableState.errorEmitted=!0,process.nextTick(v_,r,o)):process.nextTick(v_,r,o):e?(process.nextTick(Pl,r),e(o)):process.nextTick(Pl,r)}),this)}function v_(t,e){Rm(t,e),Pl(t)}function Pl(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Vq(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Rm(t,e){t.emit("error",e)}function Hq(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}b_.exports={destroy:Uq,undestroy:Vq,errorOrDestroy:Hq}});var Kn=D((Zae,E_)=>{"use strict";var __={};function hr(t,e,r){r||(r=Error);function n(o,s,a){return typeof e=="string"?e:e(o,s,a)}class i extends r{constructor(s,a,u){super(n(s,a,u))}}i.prototype.name=r.name,i.prototype.code=t,__[t]=i}function w_(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function zq(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Gq(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Wq(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}hr("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);hr("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&zq(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(Gq(t," argument"))i=`The ${t} ${n} ${w_(e,"type")}`;else{let o=Wq(t,".")?"property":"argument";i=`The "${t}" ${o} ${n} ${w_(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);hr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");hr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});hr("ERR_STREAM_PREMATURE_CLOSE","Premature close");hr("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});hr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");hr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");hr("ERR_STREAM_WRITE_AFTER_END","write after end");hr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);hr("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);hr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");E_.exports.codes=__});var Im=D((Qae,C_)=>{"use strict";var Kq=Kn().codes.ERR_INVALID_OPT_VALUE;function Yq(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Jq(t,e,r,n){var i=Yq(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new Kq(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}C_.exports={getHighWaterMark:Jq}});var S_=D((eue,jm)=>{typeof Object.create=="function"?jm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jm.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var es=D((tue,Lm)=>{try{if(Nm=require("util"),typeof Nm.inherits!="function")throw"";Lm.exports=Nm.inherits}catch{Lm.exports=S_()}var Nm});var F_=D((rue,x_)=>{x_.exports=require("util").deprecate});var Mm=D((nue,R_)=>{"use strict";R_.exports=Ye;function A_(t){var e=this;this.next=null,this.entry=null,this.finish=function(){EM(e,t)}}var ts;Ye.WritableState=lu;var Xq={deprecate:F_()},k_=Tm(),$l=require("buffer").Buffer,Zq=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Qq(t){return $l.from(t)}function eM(t){return $l.isBuffer(t)||t instanceof Zq}var qm=$m(),tM=Im(),rM=tM.getHighWaterMark,Yn=Kn().codes,nM=Yn.ERR_INVALID_ARG_TYPE,iM=Yn.ERR_METHOD_NOT_IMPLEMENTED,oM=Yn.ERR_MULTIPLE_CALLBACK,sM=Yn.ERR_STREAM_CANNOT_PIPE,aM=Yn.ERR_STREAM_DESTROYED,uM=Yn.ERR_STREAM_NULL_VALUES,cM=Yn.ERR_STREAM_WRITE_AFTER_END,lM=Yn.ERR_UNKNOWN_ENCODING,rs=qm.errorOrDestroy;es()(Ye,k_);function fM(){}function lu(t,e,r){ts=ts||ki(),t=t||{},typeof r!="boolean"&&(r=e instanceof ts),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=rM(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){DM(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A_(this)}lu.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(lu.prototype,"buffer",{get:Xq.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Rl;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Rl=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(e){return Rl.call(this,e)?!0:this!==Ye?!1:e&&e._writableState instanceof lu}})):Rl=function(e){return e instanceof this};function Ye(t){ts=ts||ki();var e=this instanceof ts;if(!e&&!Rl.call(Ye,this))return new Ye(t);this._writableState=new lu(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),k_.call(this)}Ye.prototype.pipe=function(){rs(this,new sM)};function dM(t,e){var r=new cM;rs(t,r),process.nextTick(e,r)}function hM(t,e,r,n){var i;return r===null?i=new uM:typeof r!="string"&&!e.objectMode&&(i=new nM("chunk",["string","Buffer"],r)),i?(rs(t,i),process.nextTick(n,i),!1):!0}Ye.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&eM(t);return o&&!$l.isBuffer(t)&&(t=Qq(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=fM),n.ending?dM(this,r):(o||hM(this,n,t,r))&&(n.pendingcb++,i=mM(this,n,o,t,e,r)),i};Ye.prototype.cork=function(){this._writableState.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&T_(this,t))};Ye.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new lM(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function pM(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=$l.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function mM(t,e,r,n,i,o){if(!r){var s=pM(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Bm(t,e,!1,a,n,i,o);return u}function Bm(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new aM("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function gM(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(cu,t,e),t._writableState.errorEmitted=!0,rs(t,n)):(i(n),t._writableState.errorEmitted=!0,rs(t,n),cu(t,e))}function yM(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function DM(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new oM;if(yM(r),e)gM(t,r,n,e,i);else{var o=P_(r)||t.destroyed;!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&T_(t,r),n?process.nextTick(O_,t,r,o,i):O_(t,r,o,i)}}function O_(t,e,r,n){r||vM(t,e),e.pendingcb--,n(),cu(t,e)}function vM(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function T_(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)i[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;i.allBuffers=a,Bm(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new A_(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback,f=e.objectMode?1:u.length;if(Bm(t,e,!1,f,u,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new iM("_write()"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||_M(this,n,r),this};Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P_(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function bM(t,e){t._final(function(r){e.pendingcb--,r&&rs(t,r),e.prefinished=!0,t.emit("prefinish"),cu(t,e)})}function wM(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(bM,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function cu(t,e){var r=P_(e);if(r&&(wM(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function _M(t,e,r){e.ending=!0,cu(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function EM(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Ye.prototype.destroy=qm.destroy;Ye.prototype._undestroy=qm.undestroy;Ye.prototype._destroy=function(t,e){e(t)}});var ki=D((iue,I_)=>{"use strict";var CM=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};I_.exports=qr;var $_=Hm(),Vm=Mm();es()(qr,$_);for(Um=CM(Vm.prototype),Il=0;Il<Um.length;Il++)jl=Um[Il],qr.prototype[jl]||(qr.prototype[jl]=Vm.prototype[jl]);var Um,jl,Il;function qr(t){if(!(this instanceof qr))return new qr(t);$_.call(this,t),Vm.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",SM)))}Object.defineProperty(qr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(qr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(qr.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function SM(){this._writableState.ended||process.nextTick(xM,this)}function xM(t){t.end()}Object.defineProperty(qr.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var L_=D((zm,N_)=>{var Nl=require("buffer"),Mr=Nl.Buffer;function j_(t,e){for(var r in t)e[r]=t[r]}Mr.from&&Mr.alloc&&Mr.allocUnsafe&&Mr.allocUnsafeSlow?N_.exports=Nl:(j_(Nl,zm),zm.Buffer=Ti);function Ti(t,e,r){return Mr(t,e,r)}Ti.prototype=Object.create(Mr.prototype);j_(Mr,Ti);Ti.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Mr(t,e,r)};Ti.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Mr(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Ti.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Mr(t)};Ti.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Nl.SlowBuffer(t)}});var Km=D(q_=>{"use strict";var Wm=L_().Buffer,B_=Wm.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function FM(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function OM(t){var e=FM(t);if(typeof e!="string"&&(Wm.isEncoding===B_||!B_(t)))throw new Error("Unknown encoding: "+t);return e||t}q_.StringDecoder=fu;function fu(t){this.encoding=OM(t);var e;switch(this.encoding){case"utf16le":this.text=$M,this.end=IM,e=4;break;case"utf8":this.fillLast=TM,e=4;break;case"base64":this.text=jM,this.end=NM,e=3;break;default:this.write=LM,this.end=BM;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Wm.allocUnsafe(e)}fu.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};fu.prototype.end=RM;fu.prototype.text=PM;fu.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Gm(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function AM(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Gm(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Gm(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Gm(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function kM(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function TM(t){var e=this.lastTotal-this.lastNeed,r=kM(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function PM(t,e){var r=AM(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function RM(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function $M(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function IM(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function jM(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function NM(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function LM(t){return t.toString(this.encoding)}function BM(t){return t&&t.length?this.write(t):""}});var Ll=D((sue,V_)=>{"use strict";var M_=Kn().codes.ERR_STREAM_PREMATURE_CLOSE;function qM(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function MM(){}function UM(t){return t.setHeader&&typeof t.abort=="function"}function U_(t,e,r){if(typeof e=="function")return U_(t,null,e);e||(e={}),r=qM(r||MM);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,o=function(){t.writable||a()},s=t._writableState&&t._writableState.finished,a=function(){i=!1,s=!0,n||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){n=!1,u=!0,i||r.call(t)},l=function(m){r.call(t,m)},f=function(){var m;if(n&&!u)return(!t._readableState||!t._readableState.ended)&&(m=new M_),r.call(t,m);if(i&&!s)return(!t._writableState||!t._writableState.ended)&&(m=new M_),r.call(t,m)},h=function(){t.req.on("finish",a)};return UM(t)?(t.on("complete",a),t.on("abort",f),t.req?h():t.on("request",h)):i&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",c),t.on("finish",a),e.error!==!1&&t.on("error",l),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",a),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",a),t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",f)}}V_.exports=U_});var z_=D((aue,H_)=>{"use strict";var Bl;function Jn(t,e,r){return e=VM(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VM(t){var e=HM(t,"string");return typeof e=="symbol"?e:String(e)}function HM(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zM=Ll(),Xn=Symbol("lastResolve"),Pi=Symbol("lastReject"),du=Symbol("error"),ql=Symbol("ended"),Ri=Symbol("lastPromise"),Ym=Symbol("handlePromise"),$i=Symbol("stream");function Zn(t,e){return{value:t,done:e}}function GM(t){var e=t[Xn];if(e!==null){var r=t[$i].read();r!==null&&(t[Ri]=null,t[Xn]=null,t[Pi]=null,e(Zn(r,!1)))}}function WM(t){process.nextTick(GM,t)}function KM(t,e){return function(r,n){t.then(function(){if(e[ql]){r(Zn(void 0,!0));return}e[Ym](r,n)},n)}}var YM=Object.getPrototypeOf(function(){}),JM=Object.setPrototypeOf((Bl={get stream(){return this[$i]},next:function(){var e=this,r=this[du];if(r!==null)return Promise.reject(r);if(this[ql])return Promise.resolve(Zn(void 0,!0));if(this[$i].destroyed)return new Promise(function(s,a){process.nextTick(function(){e[du]?a(e[du]):s(Zn(void 0,!0))})});var n=this[Ri],i;if(n)i=new Promise(KM(n,this));else{var o=this[$i].read();if(o!==null)return Promise.resolve(Zn(o,!1));i=new Promise(this[Ym])}return this[Ri]=i,i}},Jn(Bl,Symbol.asyncIterator,function(){return this}),Jn(Bl,"return",function(){var e=this;return new Promise(function(r,n){e[$i].destroy(null,function(i){if(i){n(i);return}r(Zn(void 0,!0))})})}),Bl),YM),XM=function(e){var r,n=Object.create(JM,(r={},Jn(r,$i,{value:e,writable:!0}),Jn(r,Xn,{value:null,writable:!0}),Jn(r,Pi,{value:null,writable:!0}),Jn(r,du,{value:null,writable:!0}),Jn(r,ql,{value:e._readableState.endEmitted,writable:!0}),Jn(r,Ym,{value:function(o,s){var a=n[$i].read();a?(n[Ri]=null,n[Xn]=null,n[Pi]=null,o(Zn(a,!1))):(n[Xn]=o,n[Pi]=s)},writable:!0}),r));return n[Ri]=null,zM(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[Pi];o!==null&&(n[Ri]=null,n[Xn]=null,n[Pi]=null,o(i)),n[du]=i;return}var s=n[Xn];s!==null&&(n[Ri]=null,n[Xn]=null,n[Pi]=null,s(Zn(void 0,!0))),n[ql]=!0}),e.on("readable",WM.bind(null,n)),n};H_.exports=XM});var Y_=D((uue,K_)=>{"use strict";function G_(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function ZM(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){G_(o,n,i,s,a,"next",u)}function a(u){G_(o,n,i,s,a,"throw",u)}s(void 0)})}}function W_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function QM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?W_(Object(r),!0).forEach(function(n){e4(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):W_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function e4(t,e,r){return e=t4(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function t4(t){var e=r4(t,"string");return typeof e=="symbol"?e:String(e)}function r4(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var n4=Kn().codes.ERR_INVALID_ARG_TYPE;function i4(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new n4("iterable",["Iterable"],e);var i=new t(QM({objectMode:!0},r)),o=!1;i._read=function(){o||(o=!0,s())};function s(){return a.apply(this,arguments)}function a(){return a=ZM(function*(){try{var u=yield n.next(),c=u.value,l=u.done;l?i.push(null):i.push(yield c)?s():o=!1}catch(f){i.destroy(f)}}),a.apply(this,arguments)}return i}K_.exports=i4});var Hm=D((lue,oE)=>{"use strict";oE.exports=ge;var ns;ge.ReadableState=Q_;var cue=require("events").EventEmitter,Z_=function(e,r){return e.listeners(r).length},pu=Tm(),Ml=require("buffer").Buffer,o4=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s4(t){return Ml.from(t)}function a4(t){return Ml.isBuffer(t)||t instanceof o4}var Jm=require("util"),ae;Jm&&Jm.debuglog?ae=Jm.debuglog("stream"):ae=function(){};var u4=D_(),ng=$m(),c4=Im(),l4=c4.getHighWaterMark,Ul=Kn().codes,f4=Ul.ERR_INVALID_ARG_TYPE,d4=Ul.ERR_STREAM_PUSH_AFTER_EOF,h4=Ul.ERR_METHOD_NOT_IMPLEMENTED,p4=Ul.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,is,Xm,Zm;es()(ge,pu);var hu=ng.errorOrDestroy,Qm=["error","close","destroy","pause","resume"];function m4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Q_(t,e,r){ns=ns||ki(),t=t||{},typeof r!="boolean"&&(r=e instanceof ns),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=l4(this,t,"readableHighWaterMark",r),this.buffer=new u4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(is||(is=Km().StringDecoder),this.decoder=new is(t.encoding),this.encoding=t.encoding)}function ge(t){if(ns=ns||ki(),!(this instanceof ge))return new ge(t);var e=this instanceof ns;this._readableState=new Q_(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),pu.call(this)}Object.defineProperty(ge.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});ge.prototype.destroy=ng.destroy;ge.prototype._undestroy=ng.undestroy;ge.prototype._destroy=function(t,e){e(t)};ge.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ml.from(t,e),e=""),n=!0),eE(this,t,e,!1,n)};ge.prototype.unshift=function(t){return eE(this,t,null,!0,!1)};function eE(t,e,r,n,i){ae("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,D4(t,o);else{var s;if(i||(s=g4(o,e)),s)hu(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Ml.prototype&&(e=s4(e)),n)o.endEmitted?hu(t,new p4):eg(t,o,e,!0);else if(o.ended)hu(t,new d4);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?eg(t,o,e,!1):rg(t,o)):eg(t,o,e,!1)}else n||(o.reading=!1,rg(t,o))}return!o.ended&&(o.length<o.highWaterMark||o.length===0)}function eg(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vl(t)),rg(t,e)}function g4(t,e){var r;return!a4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new f4("chunk",["string","Buffer","Uint8Array"],e)),r}ge.prototype.isPaused=function(){return this._readableState.flowing===!1};ge.prototype.setEncoding=function(t){is||(is=Km().StringDecoder);var e=new is(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var J_=1073741824;function y4(t){return t>=J_?t=J_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function X_(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=y4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ge.prototype.read=function(t){ae("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return ae("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?tg(this):Vl(this),null;if(t=X_(t,e),t===0&&e.ended)return e.length===0&&tg(this),null;var n=e.needReadable;ae("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,ae("length less than watermark",n)),e.ended||e.reading?(n=!1,ae("reading or ended",n)):n&&(ae("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=X_(r,e)));var i;return t>0?i=nE(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&tg(this)),i!==null&&this.emit("data",i),i};function D4(t,e){if(ae("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vl(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,tE(t)))}}function Vl(t){var e=t._readableState;ae("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(ae("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(tE,t))}function tE(t){var e=t._readableState;ae("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,ig(t)}function rg(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(v4,t,e))}function v4(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(ae("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}ge.prototype._read=function(t){hu(this,new h4("_read()"))};ge.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,ae("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?a:b;n.endEmitted?process.nextTick(o):r.once("end",o),t.on("unpipe",s);function s(y,_){ae("onunpipe"),y===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,l())}function a(){ae("onend"),t.end()}var u=b4(r);t.on("drain",u);var c=!1;function l(){ae("cleanup"),t.removeListener("close",d),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",s),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u()}r.on("data",f);function f(y){ae("ondata");var _=t.write(y);ae("dest.write",_),_===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&iE(n.pipes,t)!==-1)&&!c&&(ae("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(y){ae("onerror",y),b(),t.removeListener("error",h),Z_(t,"error")===0&&hu(t,y)}m4(t,"error",h);function d(){t.removeListener("finish",m),b()}t.once("close",d);function m(){ae("onfinish"),t.removeListener("close",d),b()}t.once("finish",m);function b(){ae("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(ae("pipe resume"),r.resume()),t};function b4(t){return function(){var r=t._readableState;ae("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Z_(t,"data")&&(r.flowing=!0,ig(t))}}ge.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=iE(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ge.prototype.on=function(t,e){var r=pu.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ae("on readable",n.length,n.reading),n.length?Vl(this):n.reading||process.nextTick(w4,this)),r};ge.prototype.addListener=ge.prototype.on;ge.prototype.removeListener=function(t,e){var r=pu.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(rE,this),r};ge.prototype.removeAllListeners=function(t){var e=pu.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(rE,this),e};function rE(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function w4(t){ae("readable nexttick read 0"),t.read(0)}ge.prototype.resume=function(){var t=this._readableState;return t.flowing||(ae("resume"),t.flowing=!t.readableListening,_4(this,t)),t.paused=!1,this};function _4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(E4,t,e))}function E4(t,e){ae("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),ig(t),e.flowing&&!e.reading&&t.read(0)}ge.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ig(t){var e=t._readableState;for(ae("flow",e.flowing);e.flowing&&t.read()!==null;);}ge.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(ae("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(ae("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var a=e.push(s);a||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(a){return function(){return t[a].apply(t,arguments)}}(i));for(var o=0;o<Qm.length;o++)t.on(Qm[o],this.emit.bind(this,Qm[o]));return this._read=function(s){ae("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(ge.prototype[Symbol.asyncIterator]=function(){return Xm===void 0&&(Xm=z_()),Xm(this)});Object.defineProperty(ge.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ge.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ge.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});ge._fromList=nE;Object.defineProperty(ge.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function nE(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function tg(t){var e=t._readableState;ae("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(C4,e,t))}function C4(t,e){if(ae("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(ge.from=function(t,e){return Zm===void 0&&(Zm=Y_()),Zm(ge,t,e)});function iE(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var og=D((fue,aE)=>{"use strict";aE.exports=vn;var Hl=Kn().codes,S4=Hl.ERR_METHOD_NOT_IMPLEMENTED,x4=Hl.ERR_MULTIPLE_CALLBACK,F4=Hl.ERR_TRANSFORM_ALREADY_TRANSFORMING,O4=Hl.ERR_TRANSFORM_WITH_LENGTH_0,zl=ki();es()(vn,zl);function A4(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new x4);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function vn(t){if(!(this instanceof vn))return new vn(t);zl.call(this,t),this._transformState={afterTransform:A4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",k4)}function k4(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){sE(t,e,r)}):sE(this,null,null)}vn.prototype.push=function(t,e){return this._transformState.needTransform=!1,zl.prototype.push.call(this,t,e)};vn.prototype._transform=function(t,e,r){r(new S4("_transform()"))};vn.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};vn.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};vn.prototype._destroy=function(t,e){zl.prototype._destroy.call(this,t,function(r){e(r)})};function sE(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new O4;if(t._transformState.transforming)throw new F4;return t.push(null)}});var lE=D((due,cE)=>{"use strict";cE.exports=mu;var uE=og();es()(mu,uE);function mu(t){if(!(this instanceof mu))return new mu(t);uE.call(this,t)}mu.prototype._transform=function(t,e,r){r(null,t)}});var mE=D((hue,pE)=>{"use strict";var sg;function T4(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var hE=Kn().codes,P4=hE.ERR_MISSING_ARGS,R4=hE.ERR_STREAM_DESTROYED;function fE(t){if(t)throw t}function $4(t){return t.setHeader&&typeof t.abort=="function"}function I4(t,e,r,n){n=T4(n);var i=!1;t.on("close",function(){i=!0}),sg===void 0&&(sg=Ll()),sg(t,{readable:e,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,$4(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(s||new R4("pipe"))}}}function dE(t){t()}function j4(t,e){return t.pipe(e)}function N4(t){return!t.length||typeof t[t.length-1]!="function"?fE:t.pop()}function L4(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=N4(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new P4("streams");var i,o=e.map(function(s,a){var u=a<e.length-1,c=a>0;return I4(s,u,c,function(l){i||(i=l),l&&o.forEach(dE),!u&&(o.forEach(dE),n(i))})});return e.reduce(j4)}pE.exports=L4});var gE=D((pr,yu)=>{var gu=require("stream");process.env.READABLE_STREAM==="disable"&&gu?(yu.exports=gu.Readable,Object.assign(yu.exports,gu),yu.exports.Stream=gu):(pr=yu.exports=Hm(),pr.Stream=gu||pr,pr.Readable=pr,pr.Writable=Mm(),pr.Duplex=ki(),pr.Transform=og(),pr.PassThrough=lE(),pr.finished=Ll(),pr.pipeline=mE())});var ug=D(ag=>{var yE;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof ag=="object"?t(ag):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(yE={}):t(yE={})})(function(t){t.version="1.2.2";function e(){for(var F=0,L=new Array(256),S=0;S!=256;++S)F=S,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,F=F&1?-306674912^F>>>1:F>>>1,L[S]=F;return typeof Int32Array<"u"?new Int32Array(L):L}var r=e();function n(F){var L=0,S=0,I=0,$=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(I=0;I!=256;++I)$[I]=F[I];for(I=0;I!=256;++I)for(S=F[I],L=256+I;L<4096;L+=256)S=$[L]=S>>>8^F[S&255];var B=[];for(I=1;I!=16;++I)B[I-1]=typeof Int32Array<"u"?$.subarray(I*256,I*256+256):$.slice(I*256,I*256+256);return B}var i=n(r),o=i[0],s=i[1],a=i[2],u=i[3],c=i[4],l=i[5],f=i[6],h=i[7],d=i[8],m=i[9],b=i[10],y=i[11],_=i[12],x=i[13],g=i[14];function C(F,L){for(var S=L^-1,I=0,$=F.length;I<$;)S=S>>>8^r[(S^F.charCodeAt(I++))&255];return~S}function k(F,L){for(var S=L^-1,I=F.length-15,$=0;$<I;)S=g[F[$++]^S&255]^x[F[$++]^S>>8&255]^_[F[$++]^S>>16&255]^y[F[$++]^S>>>24]^b[F[$++]]^m[F[$++]]^d[F[$++]]^h[F[$++]]^f[F[$++]]^l[F[$++]]^c[F[$++]]^u[F[$++]]^a[F[$++]]^s[F[$++]]^o[F[$++]]^r[F[$++]];for(I+=15;$<I;)S=S>>>8^r[(S^F[$++])&255];return~S}function P(F,L){for(var S=L^-1,I=0,$=F.length,B=0,q=0;I<$;)B=F.charCodeAt(I++),B<128?S=S>>>8^r[(S^B)&255]:B<2048?(S=S>>>8^r[(S^(192|B>>6&31))&255],S=S>>>8^r[(S^(128|B&63))&255]):B>=55296&&B<57344?(B=(B&1023)+64,q=F.charCodeAt(I++)&1023,S=S>>>8^r[(S^(240|B>>8&7))&255],S=S>>>8^r[(S^(128|B>>2&63))&255],S=S>>>8^r[(S^(128|q>>6&15|(B&3)<<4))&255],S=S>>>8^r[(S^(128|q&63))&255]):(S=S>>>8^r[(S^(224|B>>12&15))&255],S=S>>>8^r[(S^(128|B>>6&63))&255],S=S>>>8^r[(S^(128|B&63))&255]);return~S}t.table=r,t.bstr=C,t.buf=k,t.str=P})});var vE=D((mue,DE)=>{"use strict";var{Transform:B4}=gE(),q4=ug(),cg=class extends B4{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,n){e&&(this.checksum=q4.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};DE.exports=cg});var wE=D((gue,bE)=>{"use strict";var{DeflateRaw:M4}=require("zlib"),U4=ug(),lg=class extends M4{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,n){e&&(this.checksum=U4.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,n)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};bE.exports=lg});var EE=D((yue,_E)=>{"use strict";_E.exports={CRC32Stream:vE(),DeflateCRC32Stream:wE()}});var Du=D(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.checksum=os.checksumFile=void 0;var V4=require("fs"),H4=require("crypto"),SE=require("stream"),z4=require("util"),{CRC32Stream:G4}=EE(),CE=(0,z4.promisify)(SE.pipeline),W4=(t,e,r)=>xE(V4.createReadStream(t),e,r);os.checksumFile=W4;async function xE(t,e,r="hex"){let n=Y4(t);if(e==="crc32"){let o=new G4,s=CE(n,o);return o.resume(),await s,o.end(),Buffer.from(o.digest()).toString(r)}let i=(0,H4.createHash)(e);return await CE(n,i),i.end(),i.digest(r)}os.checksum=xE;function K4(t){return t!=null&&typeof t=="object"&&typeof t.read=="function"&&typeof t.pipe=="function"}var Y4=t=>K4(t)?t:new SE.Readable({read(){this.push(t),this.push(null)}})});var fg=D((vue,FE)=>{FE.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Gl=D(AE=>{var OE={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function J4(t){return function(...e){return e.length&&(t=t.replace(/\{(\d)\}/g,(r,n)=>e[n]||"")),new Error("ADM-ZIP: "+t)}}for(let t of Object.keys(OE))AE[t]=J4(OE[t])});var $E=D((wue,RE)=>{var X4=require("fs"),at=require("path"),kE=fg(),Z4=Gl(),Q4=typeof process=="object"&&process.platform==="win32",TE=t=>typeof t=="object"&&t!==null,PE=new Uint32Array(256).map((t,e)=>{for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e>>>=1;return e>>>0});function Je(t){this.sep=at.sep,this.fs=X4,TE(t)&&TE(t.fs)&&typeof t.fs.statSync=="function"&&(this.fs=t.fs)}RE.exports=Je;Je.prototype.makeDir=function(t){let e=this;function r(n){let i=n.split(e.sep)[0];n.split(e.sep).forEach(function(o){if(!(!o||o.substr(-1,1)===":")){i+=e.sep+o;var s;try{s=e.fs.statSync(i)}catch{e.fs.mkdirSync(i)}if(s&&s.isFile())throw Z4.FILE_IN_THE_WAY(`"${i}"`)}})}r(t)};Je.prototype.writeFileTo=function(t,e,r,n){let i=this;if(i.fs.existsSync(t)){if(!r)return!1;var o=i.fs.statSync(t);if(o.isDirectory())return!1}var s=at.dirname(t);i.fs.existsSync(s)||i.makeDir(s);var a;try{a=i.fs.openSync(t,"w",438)}catch{i.fs.chmodSync(t,438),a=i.fs.openSync(t,"w",438)}if(a)try{i.fs.writeSync(a,e,0,e.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(t,n||438),!0};Je.prototype.writeFileToAsync=function(t,e,r,n,i){typeof n=="function"&&(i=n,n=void 0);let o=this;o.fs.exists(t,function(s){if(s&&!r)return i(!1);o.fs.stat(t,function(a,u){if(s&&u.isDirectory())return i(!1);var c=at.dirname(t);o.fs.exists(c,function(l){l||o.makeDir(c),o.fs.open(t,"w",438,function(f,h){f?o.fs.chmod(t,438,function(){o.fs.open(t,"w",438,function(d,m){o.fs.write(m,e,0,e.length,0,function(){o.fs.close(m,function(){o.fs.chmod(t,n||438,function(){i(!0)})})})})}):h?o.fs.write(h,e,0,e.length,0,function(){o.fs.close(h,function(){o.fs.chmod(t,n||438,function(){i(!0)})})}):o.fs.chmod(t,n||438,function(){i(!0)})})})})})};Je.prototype.findFiles=function(t){let e=this;function r(n,i,o){typeof i=="boolean"&&(o=i,i=void 0);let s=[];return e.fs.readdirSync(n).forEach(function(a){let u=at.join(n,a),c=e.fs.statSync(u);(!i||i.test(u))&&s.push(at.normalize(u)+(c.isDirectory()?e.sep:"")),c.isDirectory()&&o&&(s=s.concat(r(u,i,o)))}),s}return r(t,void 0,!0)};Je.prototype.findFilesAsync=function(t,e){let r=this,n=[];r.fs.readdir(t,function(i,o){if(i)return e(i);let s=o.length;if(!s)return e(null,n);o.forEach(function(a){a=at.join(t,a),r.fs.stat(a,function(u,c){if(u)return e(u);c&&(n.push(at.normalize(a)+(c.isDirectory()?r.sep:"")),c.isDirectory()?r.findFilesAsync(a,function(l,f){if(l)return e(l);n=n.concat(f),--s||e(null,n)}):--s||e(null,n))})})})};Je.prototype.getAttributes=function(){};Je.prototype.setAttributes=function(){};Je.crc32update=function(t,e){return PE[(t^e)&255]^t>>>8};Je.crc32=function(t){typeof t=="string"&&(t=Buffer.from(t,"utf8"));let e=t.length,r=-1;for(let n=0;n<e;)r=Je.crc32update(r,t[n++]);return~r>>>0};Je.methodToString=function(t){switch(t){case kE.STORED:return"STORED ("+t+")";case kE.DEFLATED:return"DEFLATED ("+t+")";default:return"UNSUPPORTED ("+t+")"}};Je.canonical=function(t){if(!t)return"";let e=at.posix.normalize("/"+t.split("\\").join("/"));return at.join(".",e)};Je.zipnamefix=function(t){if(!t)return"";let e=at.posix.normalize("/"+t.split("\\").join("/"));return at.posix.join(".",e)};Je.findLast=function(t,e){if(!Array.isArray(t))throw new TypeError("arr is not array");let r=t.length>>>0;for(let n=r-1;n>=0;n--)if(e(t[n],n,t))return t[n]};Je.sanitize=function(t,e){t=at.resolve(at.normalize(t));for(var r=e.split("/"),n=0,i=r.length;n<i;n++){var o=at.normalize(at.join(t,r.slice(n,i).join(at.sep)));if(o.indexOf(t)===0)return o}return at.normalize(at.join(t,at.basename(e)))};Je.toBuffer=function(e,r){return Buffer.isBuffer(e)?e:e instanceof Uint8Array?Buffer.from(e):typeof e=="string"?r(e):Buffer.alloc(0)};Je.readBigUInt64LE=function(t,e){var r=Buffer.from(t.slice(e,e+8));return r.swap64(),parseInt(`0x${r.toString("hex")}`)};Je.fromDOS2Date=function(t){return new Date((t>>25&127)+1980,Math.max((t>>21&15)-1,0),Math.max(t>>16&31,1),t>>11&31,t>>5&63,(t&31)<<1)};Je.fromDate2DOS=function(t){let e=0,r=0;return t.getFullYear()>1979&&(e=(t.getFullYear()-1980&127)<<9|t.getMonth()+1<<5|t.getDate(),r=t.getHours()<<11|t.getMinutes()<<5|t.getSeconds()>>1),e<<16|r};Je.isWin=Q4;Je.crcTable=PE});var jE=D((_ue,IE)=>{var eU=require("path");IE.exports=function(t,{fs:e}){var r=t||"",n=o(),i=null;function o(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return r&&e.existsSync(r)?(i=e.statSync(r),n.directory=i.isDirectory(),n.mtime=i.mtime,n.atime=i.atime,n.executable=(73&i.mode)!==0,n.readonly=(128&i.mode)===0,n.hidden=eU.basename(r)[0]==="."):console.warn("Invalid path: "+r),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:r,isDirectory:n.directory,isReadOnly:n.readonly,isHidden:n.hidden,isExecutable:n.executable,mTime:n.mtime,aTime:n.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var LE=D((Eue,NE)=>{NE.exports={efs:!0,encode:t=>Buffer.from(t,"utf8"),decode:t=>t.toString("utf8")}});var as=D((Cue,ss)=>{ss.exports=$E();ss.exports.Constants=fg();ss.exports.Errors=Gl();ss.exports.FileAttr=jE();ss.exports.decoder=LE()});var qE=D((Sue,BE)=>{var Qn=as(),U=Qn.Constants;BE.exports=function(){var t=20,e=10,r=0,n=0,i=0,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,m=0;t|=Qn.isWin?2560:768,r|=U.FLG_EFS;let b={extraLen:0},y=g=>Math.max(0,g)>>>0,_=g=>Math.max(0,g)&65535,x=g=>Math.max(0,g)&255;return i=Qn.fromDate2DOS(new Date),{get made(){return t},set made(g){t=g},get version(){return e},set version(g){e=g},get flags(){return r},set flags(g){r=g},get flags_efs(){return(r&U.FLG_EFS)>0},set flags_efs(g){g?r|=U.FLG_EFS:r&=~U.FLG_EFS},get flags_desc(){return(r&U.FLG_DESC)>0},set flags_desc(g){g?r|=U.FLG_DESC:r&=~U.FLG_DESC},get method(){return n},set method(g){switch(g){case U.STORED:this.version=10;case U.DEFLATED:default:this.version=20}n=g},get time(){return Qn.fromDOS2Date(this.timeval)},set time(g){this.timeval=Qn.fromDate2DOS(g)},get timeval(){return i},set timeval(g){i=y(g)},get timeHighByte(){return x(i>>>8)},get crc(){return o},set crc(g){o=y(g)},get compressedSize(){return s},set compressedSize(g){s=y(g)},get size(){return a},set size(g){a=y(g)},get fileNameLength(){return u},set fileNameLength(g){u=g},get extraLength(){return c},set extraLength(g){c=g},get extraLocalLength(){return b.extraLen},set extraLocalLength(g){b.extraLen=g},get commentLength(){return l},set commentLength(g){l=g},get diskNumStart(){return f},set diskNumStart(g){f=y(g)},get inAttr(){return h},set inAttr(g){h=y(g)},get attr(){return d},set attr(g){d=y(g)},get fileAttr(){return(d||0)>>16&4095},get offset(){return m},set offset(g){m=y(g)},get encrypted(){return(r&U.FLG_ENC)===U.FLG_ENC},get centralHeaderSize(){return U.CENHDR+u+c+l},get realDataOffset(){return m+U.LOCHDR+b.fnameLen+b.extraLen},get localHeader(){return b},loadLocalHeaderFromBinary:function(g){var C=g.slice(m,m+U.LOCHDR);if(C.readUInt32LE(0)!==U.LOCSIG)throw Qn.Errors.INVALID_LOC();b.version=C.readUInt16LE(U.LOCVER),b.flags=C.readUInt16LE(U.LOCFLG),b.method=C.readUInt16LE(U.LOCHOW),b.time=C.readUInt32LE(U.LOCTIM),b.crc=C.readUInt32LE(U.LOCCRC),b.compressedSize=C.readUInt32LE(U.LOCSIZ),b.size=C.readUInt32LE(U.LOCLEN),b.fnameLen=C.readUInt16LE(U.LOCNAM),b.extraLen=C.readUInt16LE(U.LOCEXT);let k=m+U.LOCHDR+b.fnameLen,P=k+b.extraLen;return g.slice(k,P)},loadFromBinary:function(g){if(g.length!==U.CENHDR||g.readUInt32LE(0)!==U.CENSIG)throw Qn.Errors.INVALID_CEN();t=g.readUInt16LE(U.CENVEM),e=g.readUInt16LE(U.CENVER),r=g.readUInt16LE(U.CENFLG),n=g.readUInt16LE(U.CENHOW),i=g.readUInt32LE(U.CENTIM),o=g.readUInt32LE(U.CENCRC),s=g.readUInt32LE(U.CENSIZ),a=g.readUInt32LE(U.CENLEN),u=g.readUInt16LE(U.CENNAM),c=g.readUInt16LE(U.CENEXT),l=g.readUInt16LE(U.CENCOM),f=g.readUInt16LE(U.CENDSK),h=g.readUInt16LE(U.CENATT),d=g.readUInt32LE(U.CENATX),m=g.readUInt32LE(U.CENOFF)},localHeaderToBinary:function(){var g=Buffer.alloc(U.LOCHDR);return g.writeUInt32LE(U.LOCSIG,0),g.writeUInt16LE(e,U.LOCVER),g.writeUInt16LE(r,U.LOCFLG),g.writeUInt16LE(n,U.LOCHOW),g.writeUInt32LE(i,U.LOCTIM),g.writeUInt32LE(o,U.LOCCRC),g.writeUInt32LE(s,U.LOCSIZ),g.writeUInt32LE(a,U.LOCLEN),g.writeUInt16LE(u,U.LOCNAM),g.writeUInt16LE(b.extraLen,U.LOCEXT),g},centralHeaderToBinary:function(){var g=Buffer.alloc(U.CENHDR+u+c+l);return g.writeUInt32LE(U.CENSIG,0),g.writeUInt16LE(t,U.CENVEM),g.writeUInt16LE(e,U.CENVER),g.writeUInt16LE(r,U.CENFLG),g.writeUInt16LE(n,U.CENHOW),g.writeUInt32LE(i,U.CENTIM),g.writeUInt32LE(o,U.CENCRC),g.writeUInt32LE(s,U.CENSIZ),g.writeUInt32LE(a,U.CENLEN),g.writeUInt16LE(u,U.CENNAM),g.writeUInt16LE(c,U.CENEXT),g.writeUInt16LE(l,U.CENCOM),g.writeUInt16LE(f,U.CENDSK),g.writeUInt16LE(h,U.CENATT),g.writeUInt32LE(d,U.CENATX),g.writeUInt32LE(m,U.CENOFF),g},toJSON:function(){let g=function(C){return C+" bytes"};return{made:t,version:e,flags:r,method:Qn.methodToString(n),time:this.time,crc:"0x"+o.toString(16).toUpperCase(),compressedSize:g(s),size:g(a),fileNameLength:g(u),extraLength:g(c),commentLength:g(l),diskNumStart:f,inAttr:h,attr:d,offset:m,centralHeaderSize:g(U.CENHDR+u+c+l)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var UE=D((xue,ME)=>{var us=as(),Ue=us.Constants;ME.exports=function(){var t=0,e=0,r=0,n=0,i=0;return{get diskEntries(){return t},set diskEntries(o){t=e=o},get totalEntries(){return e},set totalEntries(o){e=t=o},get size(){return r},set size(o){r=o},get offset(){return n},set offset(o){n=o},get commentLength(){return i},set commentLength(o){i=o},get mainHeaderSize(){return Ue.ENDHDR+i},loadFromBinary:function(o){if((o.length!==Ue.ENDHDR||o.readUInt32LE(0)!==Ue.ENDSIG)&&(o.length<Ue.ZIP64HDR||o.readUInt32LE(0)!==Ue.ZIP64SIG))throw us.Errors.INVALID_END();o.readUInt32LE(0)===Ue.ENDSIG?(t=o.readUInt16LE(Ue.ENDSUB),e=o.readUInt16LE(Ue.ENDTOT),r=o.readUInt32LE(Ue.ENDSIZ),n=o.readUInt32LE(Ue.ENDOFF),i=o.readUInt16LE(Ue.ENDCOM)):(t=us.readBigUInt64LE(o,Ue.ZIP64SUB),e=us.readBigUInt64LE(o,Ue.ZIP64TOT),r=us.readBigUInt64LE(o,Ue.ZIP64SIZE),n=us.readBigUInt64LE(o,Ue.ZIP64OFF),i=0)},toBinary:function(){var o=Buffer.alloc(Ue.ENDHDR+i);return o.writeUInt32LE(Ue.ENDSIG,0),o.writeUInt32LE(0,4),o.writeUInt16LE(t,Ue.ENDSUB),o.writeUInt16LE(e,Ue.ENDTOT),o.writeUInt32LE(r,Ue.ENDSIZ),o.writeUInt32LE(n,Ue.ENDOFF),o.writeUInt16LE(i,Ue.ENDCOM),o.fill(" ",Ue.ENDHDR),o},toJSON:function(){let o=function(s,a){let u=s.toString(16).toUpperCase();for(;u.length<a;)u="0"+u;return"0x"+u};return{diskEntries:t,totalEntries:e,size:r+" bytes",offset:o(n,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var hg=D(dg=>{dg.EntryHeader=qE();dg.MainHeader=UE()});var HE=D((Oue,VE)=>{VE.exports=function(t){var e=require("zlib"),r={chunkSize:(parseInt(t.length/1024)+1)*1024};return{deflate:function(){return e.deflateRawSync(t,r)},deflateAsync:function(n){var i=e.createDeflateRaw(r),o=[],s=0;i.on("data",function(a){o.push(a),s+=a.length}),i.on("end",function(){var a=Buffer.alloc(s),u=0;a.fill(0);for(var c=0;c<o.length;c++){var l=o[c];l.copy(a,u),u+=l.length}n&&n(a)}),i.end(t)}}}});var GE=D((Aue,zE)=>{var tU=+(process.versions?process.versions.node:"").split(".")[0]||0;zE.exports=function(t,e){var r=require("zlib");let n=tU>=15&&e>0?{maxOutputLength:e}:{};return{inflate:function(){return r.inflateRawSync(t,n)},inflateAsync:function(i){var o=r.createInflateRaw(n),s=[],a=0;o.on("data",function(u){s.push(u),a+=u.length}),o.on("end",function(){var u=Buffer.alloc(a),c=0;u.fill(0);for(var l=0;l<s.length;l++){var f=s[l];f.copy(u,c),c+=f.length}i&&i(u)}),o.end(t)}}}});var XE=D((kue,JE)=>{"use strict";var{randomFillSync:WE}=require("crypto"),rU=Gl(),nU=new Uint32Array(256).map((t,e)=>{for(let r=0;r<8;r++)e&1?e=e>>>1^3988292384:e>>>=1;return e>>>0}),YE=(t,e)=>Math.imul(t,e)>>>0,KE=(t,e)=>nU[(t^e)&255]^t>>>8,vu=()=>typeof WE=="function"?WE(Buffer.alloc(12)):vu.node();vu.node=()=>{let t=Buffer.alloc(12),e=t.length;for(let r=0;r<e;r++)t[r]=Math.random()*256&255;return t};var Wl={genSalt:vu};function Kl(t){let e=Buffer.isBuffer(t)?t:Buffer.from(t);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<e.length;r++)this.updateKeys(e[r])}Kl.prototype.updateKeys=function(t){let e=this.keys;return e[0]=KE(e[0],t),e[1]+=e[0]&255,e[1]=YE(e[1],134775813)+1,e[2]=KE(e[2],e[1]>>>24),t};Kl.prototype.next=function(){let t=(this.keys[2]|2)>>>0;return YE(t,t^1)>>8&255};function iU(t){let e=new Kl(t);return function(r){let n=Buffer.alloc(r.length),i=0;for(let o of r)n[i++]=e.updateKeys(o^e.next());return n}}function oU(t){let e=new Kl(t);return function(r,n,i=0){n||(n=Buffer.alloc(r.length));for(let o of r){let s=e.next();n[i++]=o^s,e.updateKeys(o)}return n}}function sU(t,e,r){if(!t||!Buffer.isBuffer(t)||t.length<12)return Buffer.alloc(0);let n=iU(r),i=n(t.slice(0,12)),o=(e.flags&8)===8?e.timeHighByte:e.crc>>>24;if(i[11]!==o)throw rU.WRONG_PASSWORD();return n(t.slice(12))}function aU(t){Buffer.isBuffer(t)&&t.length>=12?Wl.genSalt=function(){return t.slice(0,12)}:t==="node"?Wl.genSalt=vu.node:Wl.genSalt=vu}function uU(t,e,r,n=!1){t==null&&(t=Buffer.alloc(0)),Buffer.isBuffer(t)||(t=Buffer.from(t.toString()));let i=oU(r),o=Wl.genSalt();o[11]=e.crc>>>24&255,n&&(o[10]=e.crc>>>16&255);let s=Buffer.alloc(t.length+12);return i(o,s),i(t,s,12)}JE.exports={decrypt:sU,encrypt:uU,_salter:aU}});var ZE=D(Yl=>{Yl.Deflater=HE();Yl.Inflater=GE();Yl.ZipCrypto=XE()});var mg=D((Pue,QE)=>{var be=as(),cU=hg(),Xe=be.Constants,pg=ZE();QE.exports=function(t,e){var r=new cU.EntryHeader,n=Buffer.alloc(0),i=Buffer.alloc(0),o=!1,s=null,a=Buffer.alloc(0),u=Buffer.alloc(0),c=!0;let l=t,f=typeof l.decoder=="object"?l.decoder:be.decoder;c=f.hasOwnProperty("efs")?f.efs:!1;function h(){return!e||!(e instanceof Uint8Array)?Buffer.alloc(0):(u=r.loadLocalHeaderFromBinary(e),e.slice(r.realDataOffset,r.realDataOffset+r.compressedSize))}function d(g){if(r.flags_desc){let C={},k=r.realDataOffset+r.compressedSize;if(e.readUInt32LE(k)==Xe.LOCSIG||e.readUInt32LE(k)==Xe.CENSIG)throw be.Errors.DESCRIPTOR_NOT_EXIST();if(e.readUInt32LE(k)==Xe.EXTSIG)C.crc=e.readUInt32LE(k+Xe.EXTCRC),C.compressedSize=e.readUInt32LE(k+Xe.EXTSIZ),C.size=e.readUInt32LE(k+Xe.EXTLEN);else if(e.readUInt16LE(k+12)===19280)C.crc=e.readUInt32LE(k+Xe.EXTCRC-4),C.compressedSize=e.readUInt32LE(k+Xe.EXTSIZ-4),C.size=e.readUInt32LE(k+Xe.EXTLEN-4);else throw be.Errors.DESCRIPTOR_UNKNOWN();if(C.compressedSize!==r.compressedSize||C.size!==r.size||C.crc!==r.crc)throw be.Errors.DESCRIPTOR_FAULTY();if(be.crc32(g)!==C.crc)return!1}else if(be.crc32(g)!==r.localHeader.crc)return!1;return!0}function m(g,C,k){if(typeof C>"u"&&typeof g=="string"&&(k=g,g=void 0),o)return g&&C&&C(Buffer.alloc(0),be.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var P=h();if(P.length===0)return g&&C&&C(P),P;if(r.encrypted){if(typeof k!="string"&&!Buffer.isBuffer(k))throw be.Errors.INVALID_PASS_PARAM();P=pg.ZipCrypto.decrypt(P,r,k)}var F=Buffer.alloc(r.size);switch(r.method){case be.Constants.STORED:if(P.copy(F),d(F))return g&&C&&C(F),F;throw g&&C&&C(F,be.Errors.BAD_CRC()),be.Errors.BAD_CRC();case be.Constants.DEFLATED:var L=new pg.Inflater(P,r.size);if(g)L.inflateAsync(function(S){S.copy(S,0),C&&(d(S)?C(S):C(S,be.Errors.BAD_CRC()))});else{if(L.inflate(F).copy(F,0),!d(F))throw be.Errors.BAD_CRC(`"${f.decode(n)}"`);return F}break;default:throw g&&C&&C(Buffer.alloc(0),be.Errors.UNKNOWN_METHOD()),be.Errors.UNKNOWN_METHOD()}}function b(g,C){if((!s||!s.length)&&Buffer.isBuffer(e))return g&&C&&C(h()),h();if(s.length&&!o){var k;switch(r.method){case be.Constants.STORED:return r.compressedSize=r.size,k=Buffer.alloc(s.length),s.copy(k),g&&C&&C(k),k;default:case be.Constants.DEFLATED:var P=new pg.Deflater(s);if(g)P.deflateAsync(function(L){k=Buffer.alloc(L.length),r.compressedSize=L.length,L.copy(k),C&&C(k)});else{var F=P.deflate();return r.compressedSize=F.length,F}P=null;break}}else if(g&&C)C(Buffer.alloc(0));else return Buffer.alloc(0)}function y(g,C){return(g.readUInt32LE(C+4)<<4)+g.readUInt32LE(C)}function _(g){try{for(var C=0,k,P,F;C+4<g.length;)k=g.readUInt16LE(C),C+=2,P=g.readUInt16LE(C),C+=2,F=g.slice(C,C+P),C+=P,Xe.ID_ZIP64===k&&x(F)}catch{throw be.Errors.EXTRA_FIELD_PARSE_ERROR()}}function x(g){var C,k,P,F;g.length>=Xe.EF_ZIP64_SCOMP&&(C=y(g,Xe.EF_ZIP64_SUNCOMP),r.size===Xe.EF_ZIP64_OR_32&&(r.size=C)),g.length>=Xe.EF_ZIP64_RHO&&(k=y(g,Xe.EF_ZIP64_SCOMP),r.compressedSize===Xe.EF_ZIP64_OR_32&&(r.compressedSize=k)),g.length>=Xe.EF_ZIP64_DSN&&(P=y(g,Xe.EF_ZIP64_RHO),r.offset===Xe.EF_ZIP64_OR_32&&(r.offset=P)),g.length>=Xe.EF_ZIP64_DSN+4&&(F=g.readUInt32LE(Xe.EF_ZIP64_DSN),r.diskNumStart===Xe.EF_ZIP64_OR_16&&(r.diskNumStart=F))}return{get entryName(){return f.decode(n)},get rawEntryName(){return n},set entryName(g){n=be.toBuffer(g,f.encode);var C=n[n.length-1];o=C===47||C===92,r.fileNameLength=n.length},get efs(){return typeof c=="function"?c(this.entryName):c},get extra(){return a},set extra(g){a=g,r.extraLength=g.length,_(g)},get comment(){return f.decode(i)},set comment(g){if(i=be.toBuffer(g,f.encode),r.commentLength=i.length,i.length>65535)throw be.Errors.COMMENT_TOO_LONG()},get name(){var g=f.decode(n);return o?g.substr(g.length-1).split("/").pop():g.split("/").pop()},get isDirectory(){return o},getCompressedData:function(){return b(!1,null)},getCompressedDataAsync:function(g){b(!0,g)},setData:function(g){s=be.toBuffer(g,be.decoder.encode),!o&&s.length?(r.size=s.length,r.method=be.Constants.DEFLATED,r.crc=be.crc32(g),r.changed=!0):r.method=be.Constants.STORED},getData:function(g){return r.changed?s:m(!1,null,g)},getDataAsync:function(g,C){r.changed?g(s):m(!0,g,C)},set attr(g){r.attr=g},get attr(){return r.attr},set header(g){r.loadFromBinary(g)},get header(){return r},packCentralHeader:function(){r.flags_efs=this.efs,r.extraLength=a.length;var g=r.centralHeaderToBinary(),C=be.Constants.CENHDR;return n.copy(g,C),C+=n.length,a.copy(g,C),C+=r.extraLength,i.copy(g,C),g},packLocalHeader:function(){let g=0;r.flags_efs=this.efs,r.extraLocalLength=u.length;let C=r.localHeaderToBinary(),k=Buffer.alloc(C.length+n.length+r.extraLocalLength);return C.copy(k,g),g+=C.length,n.copy(k,g),g+=n.length,u.copy(k,g),g+=u.length,k},toJSON:function(){let g=function(C){return"<"+(C&&C.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:r.toJSON(),compressedData:g(e),data:g(s)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var rC=D((Rue,tC)=>{var eC=mg(),lU=hg(),bt=as();tC.exports=function(t,e){var r=[],n={},i=Buffer.alloc(0),o=new lU.MainHeader,s=!1,a=null;let u=new Set,c=e,{noSort:l,decoder:f}=c;t?m(c.readEntries):s=!0;function h(){let y=new Set;for(let _ of Object.keys(n)){let x=_.split("/");if(x.pop(),!!x.length)for(let g=0;g<x.length;g++){let C=x.slice(0,g+1).join("/")+"/";y.add(C)}}for(let _ of y)if(!(_ in n)){let x=new eC(c);x.entryName=_,x.attr=16,x.temporary=!0,r.push(x),n[x.entryName]=x,u.add(x)}}function d(){if(s=!0,n={},o.diskEntries>(t.length-o.offset)/bt.Constants.CENHDR)throw bt.Errors.DISK_ENTRY_TOO_LARGE();r=new Array(o.diskEntries);for(var y=o.offset,_=0;_<r.length;_++){var x=y,g=new eC(c,t);g.header=t.slice(x,x+=bt.Constants.CENHDR),g.entryName=t.slice(x,x+=g.header.fileNameLength),g.header.extraLength&&(g.extra=t.slice(x,x+=g.header.extraLength)),g.header.commentLength&&(g.comment=t.slice(x,x+g.header.commentLength)),y+=g.header.centralHeaderSize,r[_]=g,n[g.entryName]=g}u.clear(),h()}function m(y){var _=t.length-bt.Constants.ENDHDR,x=Math.max(0,_-65535),g=x,C=t.length,k=-1,P=0;for((typeof c.trailingSpace=="boolean"?c.trailingSpace:!1)&&(x=0),_;_>=g;_--)if(t[_]===80){if(t.readUInt32LE(_)===bt.Constants.ENDSIG){k=_,P=_,C=_+bt.Constants.ENDHDR,g=_-bt.Constants.END64HDR;continue}if(t.readUInt32LE(_)===bt.Constants.END64SIG){g=x;continue}if(t.readUInt32LE(_)===bt.Constants.ZIP64SIG){k=_,C=_+bt.readBigUInt64LE(t,_+bt.Constants.ZIP64SIZE)+bt.Constants.ZIP64LEAD;break}}if(k==-1)throw bt.Errors.INVALID_FORMAT();o.loadFromBinary(t.slice(k,C)),o.commentLength&&(i=t.slice(P+bt.Constants.ENDHDR)),y&&d()}function b(){r.length>1&&!l&&r.sort((y,_)=>y.entryName.toLowerCase().localeCompare(_.entryName.toLowerCase()))}return{get entries(){return s||d(),r.filter(y=>!u.has(y))},get comment(){return f.decode(i)},set comment(y){i=bt.toBuffer(y,f.encode),o.commentLength=i.length},getEntryCount:function(){return s?r.length:o.diskEntries},forEach:function(y){this.entries.forEach(y)},getEntry:function(y){return s||d(),n[y]||null},setEntry:function(y){s||d(),r.push(y),n[y.entryName]=y,o.totalEntries=r.length},deleteFile:function(y,_=!0){s||d();let x=n[y];this.getEntryChildren(x,_).map(C=>C.entryName).forEach(this.deleteEntry)},deleteEntry:function(y){s||d();let _=n[y],x=r.indexOf(_);x>=0&&(r.splice(x,1),delete n[y],o.totalEntries=r.length)},getEntryChildren:function(y,_=!0){if(s||d(),typeof y=="object")if(y.isDirectory&&_){let x=[],g=y.entryName;for(let C of r)C.entryName.startsWith(g)&&x.push(C);return x}else return[y];return[]},getChildCount:function(y){if(y&&y.isDirectory){let _=this.getEntryChildren(y);return _.includes(y)?_.length-1:_.length}return 0},compressToBuffer:function(){s||d(),b();let y=[],_=[],x=0,g=0;o.size=0,o.offset=0;let C=0;for(let F of this.entries){let L=F.getCompressedData();F.header.offset=g;let S=F.packLocalHeader(),I=S.length+L.length;g+=I,y.push(S),y.push(L);let $=F.packCentralHeader();_.push($),o.size+=$.length,x+=I+$.length,C++}x+=o.mainHeaderSize,o.offset=g,o.totalEntries=C,g=0;let k=Buffer.alloc(x);for(let F of y)F.copy(k,g),g+=F.length;for(let F of _)F.copy(k,g),g+=F.length;let P=o.toBinary();return i&&i.copy(P,bt.Constants.ENDHDR),P.copy(k,g),t=k,s=!1,k},toAsyncBuffer:function(y,_,x,g){try{s||d(),b();let C=[],k=[],P=0,F=0,L=0;o.size=0,o.offset=0;let S=function(I){if(I.length>0){let $=I.shift(),B=$.entryName+$.extra.toString();x&&x(B),$.getCompressedDataAsync(function(q){g&&g(B),$.header.offset=F;let K=$.packLocalHeader(),V=K.length+q.length;F+=V,C.push(K),C.push(q);let E=$.packCentralHeader();k.push(E),o.size+=E.length,P+=V+E.length,L++,S(I)})}else{P+=o.mainHeaderSize,o.offset=F,o.totalEntries=L,F=0;let $=Buffer.alloc(P);C.forEach(function(q){q.copy($,F),F+=q.length}),k.forEach(function(q){q.copy($,F),F+=q.length});let B=o.toBinary();i&&i.copy(B,bt.Constants.ENDHDR),B.copy($,F),t=$,s=!1,y($)}};S(Array.from(this.entries))}catch(C){_(C)}}}}});var oC=D(($ue,iC)=>{var Ve=as(),Ze=require("path"),fU=mg(),dU=rC(),Ii=(...t)=>Ve.findLast(t,e=>typeof e=="boolean"),nC=(...t)=>Ve.findLast(t,e=>typeof e=="string"),hU=(...t)=>Ve.findLast(t,e=>typeof e=="function"),pU={noSort:!1,readEntries:!1,method:Ve.Constants.NONE,fs:null};iC.exports=function(t,e){let r=null,n=Object.assign(Object.create(null),pU);t&&typeof t=="object"&&(t instanceof Uint8Array||(Object.assign(n,t),t=n.input?n.input:void 0,n.input&&delete n.input),Buffer.isBuffer(t)&&(r=t,n.method=Ve.Constants.BUFFER,t=void 0)),Object.assign(n,e);let i=new Ve(n);if((typeof n.decoder!="object"||typeof n.decoder.encode!="function"||typeof n.decoder.decode!="function")&&(n.decoder=Ve.decoder),t&&typeof t=="string")if(i.fs.existsSync(t))n.method=Ve.Constants.FILE,n.filename=t,r=i.fs.readFileSync(t);else throw Ve.Errors.INVALID_FILENAME();let o=new dU(r,n),{canonical:s,sanitize:a,zipnamefix:u}=Ve;function c(d){if(d&&o){var m;if(typeof d=="string"&&(m=o.getEntry(Ze.posix.normalize(d))),typeof d=="object"&&typeof d.entryName<"u"&&typeof d.header<"u"&&(m=o.getEntry(d.entryName)),m)return m}return null}function l(d){let{join:m,normalize:b,sep:y}=Ze.posix;return m(".",b(y+d.split("\\").join(y)+y))}function f(d){return d instanceof RegExp?function(m){return function(b){return m.test(b)}}(d):typeof d!="function"?()=>!0:d}let h=(d,m)=>{let b=m.slice(-1);return b=b===i.sep?i.sep:"",Ze.relative(d,m)+b};return{readFile:function(d,m){var b=c(d);return b&&b.getData(m)||null},childCount:function(d){let m=c(d);if(m)return o.getChildCount(m)},readFileAsync:function(d,m){var b=c(d);b?b.getDataAsync(m):m(null,"getEntry failed for:"+d)},readAsText:function(d,m){var b=c(d);if(b){var y=b.getData();if(y&&y.length)return y.toString(m||"utf8")}return""},readAsTextAsync:function(d,m,b){var y=c(d);y?y.getDataAsync(function(_,x){if(x){m(_,x);return}_&&_.length?m(_.toString(b||"utf8")):m("")}):m("")},deleteFile:function(d,m=!0){var b=c(d);b&&o.deleteFile(b.entryName,m)},deleteEntry:function(d){var m=c(d);m&&o.deleteEntry(m.entryName)},addZipComment:function(d){o.comment=d},getZipComment:function(){return o.comment||""},addZipEntryComment:function(d,m){var b=c(d);b&&(b.comment=m)},getZipEntryComment:function(d){var m=c(d);return m&&m.comment||""},updateFile:function(d,m){var b=c(d);b&&b.setData(m)},addLocalFile:function(d,m,b,y){if(i.fs.existsSync(d)){m=m?l(m):"";let _=Ze.win32.basename(Ze.win32.normalize(d));m+=b||_;let x=i.fs.statSync(d),g=x.isFile()?i.fs.readFileSync(d):Buffer.alloc(0);x.isDirectory()&&(m+=i.sep),this.addFile(m,g,y,x)}else throw Ve.Errors.FILE_NOT_FOUND(d)},addLocalFileAsync:function(d,m){d=typeof d=="object"?d:{localPath:d};let b=Ze.resolve(d.localPath),{comment:y}=d,{zipPath:_,zipName:x}=d,g=this;i.fs.stat(b,function(C,k){if(C)return m(C,!1);_=_?l(_):"";let P=Ze.win32.basename(Ze.win32.normalize(b));if(_+=x||P,k.isFile())i.fs.readFile(b,function(F,L){return F?m(F,!1):(g.addFile(_,L,y,k),setImmediate(m,void 0,!0))});else if(k.isDirectory())return _+=i.sep,g.addFile(_,Buffer.alloc(0),y,k),setImmediate(m,void 0,!0)})},addLocalFolder:function(d,m,b){if(b=f(b),m=m?l(m):"",d=Ze.normalize(d),i.fs.existsSync(d)){let y=i.findFiles(d),_=this;if(y.length)for(let x of y){let g=Ze.join(m,h(d,x));b(g)&&_.addLocalFile(x,Ze.dirname(g))}}else throw Ve.Errors.FILE_NOT_FOUND(d)},addLocalFolderAsync:function(d,m,b,y){y=f(y),b=b?l(b):"",d=Ze.normalize(d);var _=this;i.fs.open(d,"r",function(x){if(x&&x.code==="ENOENT")m(void 0,Ve.Errors.FILE_NOT_FOUND(d));else if(x)m(void 0,x);else{var g=i.findFiles(d),C=-1,k=function(){if(C+=1,C<g.length){var P=g[C],F=h(d,P).split("\\").join("/");F=F.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),y(F)?i.fs.stat(P,function(L,S){L&&m(void 0,L),S.isFile()?i.fs.readFile(P,function(I,$){I?m(void 0,I):(_.addFile(b+F,$,"",S),k())}):(_.addFile(b+F+"/",Buffer.alloc(0),"",S),k())}):process.nextTick(()=>{k()})}else m(!0,void 0)};k()}})},addLocalFolderAsync2:function(d,m){let b=this;d=typeof d=="object"?d:{localPath:d},localPath=Ze.resolve(l(d.localPath));let{zipPath:y,filter:_,namefix:x}=d;_ instanceof RegExp?_=function(k){return function(P){return k.test(P)}}(_):typeof _!="function"&&(_=function(){return!0}),y=y?l(y):"",x=="latin1"&&(x=k=>k.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof x!="function"&&(x=k=>k);let g=k=>Ze.join(y,x(h(localPath,k))),C=k=>Ze.win32.basename(Ze.win32.normalize(x(k)));i.fs.open(localPath,"r",function(k){k&&k.code==="ENOENT"?m(void 0,Ve.Errors.FILE_NOT_FOUND(localPath)):k?m(void 0,k):i.findFilesAsync(localPath,function(P,F){if(P)return m(P);F=F.filter(L=>_(g(L))),F.length||m(void 0,!1),setImmediate(F.reverse().reduce(function(L,S){return function(I,$){if(I||$===!1)return setImmediate(L,I,!1);b.addLocalFileAsync({localPath:S,zipPath:Ze.dirname(g(S)),zipName:C(S)},L)}},m))})})},addLocalFolderPromise:function(d,m){return new Promise((b,y)=>{this.addLocalFolderAsync2(Object.assign({localPath:d},m),(_,x)=>{_&&y(_),x&&b(this)})})},addFile:function(d,m,b,y){d=u(d);let _=c(d),x=_!=null;x||(_=new fU(n),_.entryName=d),_.comment=b||"";let g=typeof y=="object"&&y instanceof i.fs.Stats;g&&(_.header.time=y.mtime);var C=_.isDirectory?16:0;let k=_.isDirectory?16384:32768;return g?k|=4095&y.mode:typeof y=="number"?k|=4095&y:k|=_.isDirectory?493:420,C=(C|k<<16)>>>0,_.attr=C,_.setData(m),x||o.setEntry(_),_},getEntries:function(d){return o.password=d,o?o.entries:[]},getEntry:function(d){return c(d)},getEntryCount:function(){return o.getEntryCount()},forEach:function(d){return o.forEach(d)},extractEntryTo:function(d,m,b,y,_,x){y=Ii(!1,y),_=Ii(!1,_),b=Ii(!0,b),x=nC(_,x);var g=c(d);if(!g)throw Ve.Errors.NO_ENTRY();var C=s(g.entryName),k=a(m,x&&!g.isDirectory?x:b?C:Ze.basename(C));if(g.isDirectory){var P=o.getEntryChildren(g);return P.forEach(function(S){if(S.isDirectory)return;var I=S.getData();if(!I)throw Ve.Errors.CANT_EXTRACT_FILE();var $=s(S.entryName),B=a(m,b?$:Ze.basename($));let q=_?S.header.fileAttr:void 0;i.writeFileTo(B,I,y,q)}),!0}var F=g.getData(o.password);if(!F)throw Ve.Errors.CANT_EXTRACT_FILE();if(i.fs.existsSync(k)&&!y)throw Ve.Errors.CANT_OVERRIDE();let L=_?d.header.fileAttr:void 0;return i.writeFileTo(k,F,y,L),!0},test:function(d){if(!o)return!1;for(var m in o.entries)try{if(m.isDirectory)continue;var b=o.entries[m].getData(d);if(!b)return!1}catch{return!1}return!0},extractAllTo:function(d,m,b,y){if(b=Ii(!1,b),y=nC(b,y),m=Ii(!1,m),!o)throw Ve.Errors.NO_ZIP();o.entries.forEach(function(_){var x=a(d,s(_.entryName));if(_.isDirectory){i.makeDir(x);return}var g=_.getData(y);if(!g)throw Ve.Errors.CANT_EXTRACT_FILE();let C=b?_.header.fileAttr:void 0;i.writeFileTo(x,g,m,C);try{i.fs.utimesSync(x,_.header.time,_.header.time)}catch{throw Ve.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(d,m,b,y){if(y=hU(m,b,y),b=Ii(!1,b),m=Ii(!1,m),!y)return new Promise((k,P)=>{this.extractAllToAsync(d,m,b,function(F){F?P(F):k(this)})});if(!o){y(Ve.Errors.NO_ZIP());return}d=Ze.resolve(d);let _=k=>a(d,Ze.normalize(s(k.entryName))),x=(k,P)=>new Error(k+': "'+P+'"'),g=[],C=[];o.entries.forEach(k=>{k.isDirectory?g.push(k):C.push(k)});for(let k of g){let P=_(k),F=b?k.header.fileAttr:void 0;try{i.makeDir(P),F&&i.fs.chmodSync(P,F),i.fs.utimesSync(P,k.header.time,k.header.time)}catch{y(x("Unable to create folder",P))}}C.reverse().reduce(function(k,P){return function(F){if(F)k(F);else{let L=Ze.normalize(s(P.entryName)),S=a(d,L);P.getDataAsync(function(I,$){if($)k($);else if(!I)k(Ve.Errors.CANT_EXTRACT_FILE());else{let B=b?P.header.fileAttr:void 0;i.writeFileToAsync(S,I,m,B,function(q){q||k(x("Unable to write file",S)),i.fs.utimes(S,P.header.time,P.header.time,function(K){K?k(x("Unable to set times",S)):k()})})}})}}},y)()},writeZip:function(d,m){if(arguments.length===1&&typeof d=="function"&&(m=d,d=""),!d&&n.filename&&(d=n.filename),!!d){var b=o.compressToBuffer();if(b){var y=i.writeFileTo(d,b,!0);typeof m=="function"&&m(y?null:new Error("failed"),"")}}},writeZipPromise:function(d,m){let{overwrite:b,perm:y}=Object.assign({overwrite:!0},m);return new Promise((_,x)=>{!d&&n.filename&&(d=n.filename),d||x("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(g=>{let C=k=>k?_(k):x("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(d,g,b,y,C)},x)})},toBufferPromise:function(){return new Promise((d,m)=>{o.toAsyncBuffer(d,m)})},toBuffer:function(d,m,b,y){return typeof d=="function"?(o.toAsyncBuffer(d,m,b,y),null):o.compressToBuffer()}}}});var bC=D((uce,vC)=>{var DC={};vC.exports=DC;var yC={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(yC).forEach(function(t){var e=yC[t],r=DC[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var _C=D((cce,wC)=>{"use strict";wC.exports=function(t,e){e=e||process.argv;var r=e.indexOf("--"),n=/^-{1,2}/.test(t)?"":"--",i=e.indexOf(n+t);return i!==-1&&(r===-1?!0:i<r)}});var CC=D((lce,EC)=>{"use strict";var bU=require("os"),xr=_C(),kt=process.env,fs=void 0;xr("no-color")||xr("no-colors")||xr("color=false")?fs=!1:(xr("color")||xr("colors")||xr("color=true")||xr("color=always"))&&(fs=!0);"FORCE_COLOR"in kt&&(fs=kt.FORCE_COLOR.length===0||parseInt(kt.FORCE_COLOR,10)!==0);function wU(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function _U(t){if(fs===!1)return 0;if(xr("color=16m")||xr("color=full")||xr("color=truecolor"))return 3;if(xr("color=256"))return 2;if(t&&!t.isTTY&&fs!==!0)return 0;var e=fs?1:0;if(process.platform==="win32"){var r=bU.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in kt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(i){return i in kt})||kt.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in kt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(kt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in kt){var n=parseInt((kt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(kt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(kt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(kt.TERM)||"COLORTERM"in kt?1:(kt.TERM==="dumb",e)}function _g(t){var e=_U(t);return wU(e)}EC.exports={supportsColor:_g,stdout:_g(process.stdout),stderr:_g(process.stderr)}});var xC=D((fce,SC)=>{SC.exports=function(e,r){var n="";e=e||"Run the trap, drop the bass",e=e.split("");var i={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=i[o]||[" "],a=Math.floor(Math.random()*s.length);typeof i[o]<"u"?n+=i[o][a]:n+=o}),n}});var OC=D((dce,FC)=>{FC.exports=function(e,r){e=e||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},i=[].concat(n.up,n.down,n.mid);function o(u){var c=Math.floor(Math.random()*u);return c}function s(u){var c=!1;return i.filter(function(l){c=l===u}),c}function a(u,c){var l="",f,h;c=c||{},c.up=typeof c.up<"u"?c.up:!0,c.mid=typeof c.mid<"u"?c.mid:!0,c.down=typeof c.down<"u"?c.down:!0,c.size=typeof c.size<"u"?c.size:"maxi",u=u.split("");for(h in u)if(!s(h)){switch(l=l+u[h],f={up:0,down:0,mid:0},c.size){case"mini":f.up=o(8),f.mid=o(2),f.down=o(8);break;case"maxi":f.up=o(16)+3,f.mid=o(4)+1,f.down=o(64)+3;break;default:f.up=o(8)+1,f.mid=o(6)/2,f.down=o(8)+1;break}var d=["up","mid","down"];for(var m in d)for(var b=d[m],y=0;y<=f[b];y++)c[b]&&(l=l+n[b][o(n[b].length)])}return l}return a(e,r)}});var kC=D((hce,AC)=>{AC.exports=function(t){return function(e,r,n){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var PC=D((pce,TC)=>{TC.exports=function(t){return function(e,r,n){return r%2===0?e:t.inverse(e)}}});var $C=D((mce,RC)=>{RC.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,n,i){return r===" "?r:t[e[n++%e.length]](r)}}});var jC=D((gce,IC)=>{IC.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,n,i){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var UC=D((Dce,MC)=>{var ce={};MC.exports=ce;ce.themes={};var EU=require("util"),ji=ce.styles=bC(),LC=Object.defineProperties,CU=new RegExp(/[\r\n]+/g);ce.supportsColor=CC().supportsColor;typeof ce.enabled>"u"&&(ce.enabled=ce.supportsColor()!==!1);ce.enable=function(){ce.enabled=!0};ce.disable=function(){ce.enabled=!1};ce.stripColors=ce.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var yce=ce.stylize=function(e,r){if(!ce.enabled)return e+"";var n=ji[r];return!n&&r in ce?ce[r](e):n.open+e+n.close},SU=/[|\\{}()[\]^$+*?.]/g,xU=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(SU,"\\$&")};function BC(t){var e=function r(){return OU.apply(r,arguments)};return e._styles=t,e.__proto__=FU,e}var qC=function(){var t={};return ji.grey=ji.gray,Object.keys(ji).forEach(function(e){ji[e].closeRe=new RegExp(xU(ji[e].close),"g"),t[e]={get:function(){return BC(this._styles.concat(e))}}}),t}(),FU=LC(function(){},qC);function OU(){var t=Array.prototype.slice.call(arguments),e=t.map(function(s){return s!=null&&s.constructor===String?s:EU.inspect(s)}).join(" ");if(!ce.enabled||!e)return e;for(var r=e.indexOf(`
22
+ `)!=-1,n=this._styles,i=n.length;i--;){var o=ji[n[i]];e=o.open+e.replace(o.closeRe,o.open)+o.close,r&&(e=e.replace(CU,function(s){return o.close+s+o.open}))}return e}ce.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){ce[r]=function(n){if(typeof t[r]=="object"){var i=n;for(var o in t[r])i=ce[t[r][o]](i);return i}return ce[t[r]](n)}})(e)};function AU(){var t={};return Object.keys(qC).forEach(function(e){t[e]={get:function(){return BC([e])}}}),t}var kU=function(e,r){var n=r.split("");return n=n.map(e),n.join("")};ce.trap=xC();ce.zalgo=OC();ce.maps={};ce.maps.america=kC()(ce);ce.maps.zebra=PC()(ce);ce.maps.rainbow=$C()(ce);ce.maps.random=jC()(ce);for(NC in ce.maps)(function(t){ce[t]=function(e){return kU(ce.maps[t],e)}})(NC);var NC;LC(ce,AU())});var HC=D((vce,VC)=>{var TU=UC();VC.exports=TU});var zC=D(Eg=>{"use strict";Eg.indent=function(e){return new Array(e+1).join(" ")};Eg.getMaxIndexLength=function(t){var e=0;return Object.getOwnPropertyNames(t).forEach(function(r){t[r]!==void 0&&(e=Math.max(e,r.length))}),e}});var GC=D((wce,PU)=>{PU.exports={author:"Rafael de Oleza <rafeca@gmail.com> (https://github.com/rafeca)",name:"prettyjson",description:"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output",version:"1.2.5",homepage:"http://rafeca.com/prettyjson",keywords:["json","cli","formatting","colors"],repository:{type:"git",url:"https://github.com/rafeca/prettyjson.git"},bugs:{url:"https://github.com/rafeca/prettyjson/issues"},main:"./lib/prettyjson",files:["bin/prettyjson","lib/*.js"],license:"MIT",scripts:{test:"npm run jshint && mocha --reporter spec",testwin:"node ./node_modules/mocha/bin/mocha --reporter spec",jshint:"jshint lib/*.js test/*.js",coverage:"istanbul cover _mocha --report lcovonly -- -R spec",coveralls:"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",changelog:"git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"},bin:{prettyjson:"./bin/prettyjson"},dependencies:{colors:"1.4.0",minimist:"^1.2.0"},devDependencies:{coveralls:"^2.11.15",istanbul:"^0.4.5",jshint:"^2.9.4",mocha:"^3.1.2","mocha-lcov-reporter":"^1.2.0",should:"^11.1.1"}}});var WC=D(_u=>{"use strict";var Vr=HC(),ti=zC(),RU=/[^\w\s\n\r\v\t\.,]/i;_u.version=GC().version;var Cg=function(t,e){return t!==void 0||e.renderUndefined},ef=function(t,e,r){return!!(typeof t=="boolean"||typeof t=="number"||typeof t=="function"||t===null||t===void 0||t instanceof Date||typeof t=="string"&&t.indexOf(`
23
+ `)===-1||r.inlineArrays&&!e&&Array.isArray(t)&&ef(t[0],!0,r))},$U=function(t,e){if(e.noColor)return t;if(typeof t=="string")return e.stringColor?Vr[e.stringColor](t):t;var r=t+"";return t===!0?Vr.green(r):t===!1?Vr.red(r):t==null?Vr.grey(r):typeof t=="number"?t>=0?Vr[e.positiveNumberColor](r):Vr[e.negativeNumberColor](r):typeof t=="function"?"function() {}":Array.isArray(t)?t.join(", "):r},Sg=function(t,e){return t.multilineStringColor===null||t.noColor?e:Vr[t.multilineStringColor](e)},IU=function(t,e,r){var n=t.split(`
24
24
  `);return n=n.map(function(i){return ti.indent(e)+Sg(r,i)}),n.join(`
25
- `)},ds=function(t,e,r){if(typeof t=="string"&&t.match(R5)&&e.escape&&(t=JSON.stringify(t)),!Cg(t,e))return[];if(ef(t,!1,e))return[ti.indent(r)+$5(t,e)];if(typeof t=="string")return[ti.indent(r)+Sg(e,'"""'),I5(t,r+e.defaultIndentation,e),ti.indent(r)+Sg(e,'"""')];if(Array.isArray(t)){if(t.length===0)return[ti.indent(r)+e.emptyArrayMsg];var n=[];return t.forEach(function(a){if(Cg(a,e)){var u="- ";e.noColor||(u=Vr[e.dashColor](u)),u=ti.indent(r)+u,ef(a,!1,e)?(u+=ds(a,e,0)[0],n.push(u)):(n.push(u),n.push.apply(n,ds(a,e,r+e.defaultIndentation)))}}),n}if(t instanceof Error)return ds({message:t.message,stack:t.stack.split(`
25
+ `)},ds=function(t,e,r){if(typeof t=="string"&&t.match(RU)&&e.escape&&(t=JSON.stringify(t)),!Cg(t,e))return[];if(ef(t,!1,e))return[ti.indent(r)+$U(t,e)];if(typeof t=="string")return[ti.indent(r)+Sg(e,'"""'),IU(t,r+e.defaultIndentation,e),ti.indent(r)+Sg(e,'"""')];if(Array.isArray(t)){if(t.length===0)return[ti.indent(r)+e.emptyArrayMsg];var n=[];return t.forEach(function(a){if(Cg(a,e)){var u="- ";e.noColor||(u=Vr[e.dashColor](u)),u=ti.indent(r)+u,ef(a,!1,e)?(u+=ds(a,e,0)[0],n.push(u)):(n.push(u),n.push.apply(n,ds(a,e,r+e.defaultIndentation)))}}),n}if(t instanceof Error)return ds({message:t.message,stack:t.stack.split(`
26
26
  `)},e,r);var i=e.noAlign?0:ti.getMaxIndexLength(t),o,s=[];return Object.getOwnPropertyNames(t).forEach(function(a){if(Cg(t[a],e))if(o=a+": ",e.noColor||(o=Vr[e.keysColor](o)),o=ti.indent(r)+o,ef(t[a],!1,e)){var u=e.noAlign?0:i-a.length;o+=ds(t[a],e,u)[0],s.push(o)}else s.push(o),s.push.apply(s,ds(t[a],e,r+e.defaultIndentation))}),s};_u.render=function(e,r,n){return n=n||0,r=r||{},r.emptyArrayMsg=r.emptyArrayMsg||"(empty array)",r.keysColor=r.keysColor||"green",r.dashColor=r.dashColor||"green",r.numberColor=r.numberColor||"blue",r.positiveNumberColor=r.positiveNumberColor||r.numberColor,r.negativeNumberColor=r.negativeNumberColor||r.numberColor,r.defaultIndentation=r.defaultIndentation||2,r.noColor=!!r.noColor,r.noAlign=!!r.noAlign,r.escape=!!r.escape,r.renderUndefined=!!r.renderUndefined,r.stringColor=r.stringColor||null,r.multilineStringColor=r.multilineStringColor||null,ds(e,r,n).join(`
27
27
  `)};_u.renderString=function(e,r,n){var i="",o;if(typeof e!="string"||e==="")return"";if(e[0]!=="{"&&e[0]!=="["){var s;e.indexOf("{")===-1?s=e.indexOf("["):e.indexOf("[")===-1||e.indexOf("{")<e.indexOf("[")?s=e.indexOf("{"):s=e.indexOf("["),i+=e.substr(0,s)+`
28
- `,e=e.substr(s)}try{o=JSON.parse(e)}catch{return Vr.red("Error:")+" Not valid JSON!"}return i+=_u.render(o,r,n),i}});var Og=D(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.default=void 0;function hs(t){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hs(t)}function KC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,N5(n.key),n)}}function j5(t,e,r){return e&&KC(t.prototype,e),r&&KC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function N5(t){var e=L5(t,"string");return hs(e)=="symbol"?e:e+""}function L5(t,e){if(hs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(hs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function B5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q5(t,e,r){return e=Cu(e),M5(t,Fg()?Reflect.construct(e,r||[],Cu(t).constructor):e.apply(t,r))}function M5(t,e){if(e&&(hs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U5(t)}function U5(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V5(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eu(t,e)}function xg(t){var e=typeof Map=="function"?new Map:void 0;return xg=function(n){if(n===null||!z5(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return H5(n,arguments,Cu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Eu(i,n)},xg(t)}function H5(t,e,r){if(Fg())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&Eu(i,r.prototype),i}function Fg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fg=function(){return!!t})()}function z5(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function Eu(t,e){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Eu(t,e)}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cu(t)}var G5=function(t){function e(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(B5(this,e),n=q5(this,e,[r]),n.originalRequest=o,n.originalResponse=s,n.causingError=i,i!=null&&(r+=", caused by ".concat(i.toString())),o!=null){var a=o.getHeader("X-Request-ID")||"n/a",u=o.getMethod(),c=o.getURL(),l=s?s.getStatus():"n/a",f=s?s.getBody()||"":"n/a";r+=", originated from request (method: ".concat(u,", url: ").concat(c,", response code: ").concat(l,", response text: ").concat(f,", request id: ").concat(a,")")}return n.message=r,n}return V5(e,t),j5(e)}(xg(Error)),Ece=tf.default=G5});var Ag=D(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.enableDebugLog=W5;rf.log=K5;var YC=!1;function W5(){YC=!0}function K5(t){YC&&console.log(t)}});var XC=D(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.default=void 0;function Su(t){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Su(t)}function Y5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,X5(n.key),n)}}function J5(t,e,r){return e&&JC(t.prototype,e),r&&JC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function X5(t){var e=Z5(t,"string");return Su(e)=="symbol"?e:e+""}function Z5(t,e){if(Su(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Su(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xce=nf.default=function(){function t(){Y5(this,t)}return J5(t,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(r){return Promise.resolve([])}},{key:"removeUpload",value:function(r){return Promise.resolve()}},{key:"addUpload",value:function(r,n){return Promise.resolve(null)}}])}()});var ZC=D((kg,Tg)=>{(function(t,e){typeof kg=="object"&&typeof Tg<"u"?Tg.exports=e():typeof define=="function"&&define.amd?define(e):function(){var r=t.Base64,n=e();n.noConflict=function(){return t.Base64=r,n},t.Meteor&&(Base64=n),t.Base64=n}()})(typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:kg,function(){"use strict";var t="3.7.7",e=t,r=typeof Buffer=="function",n=typeof TextDecoder=="function"?new TextDecoder:void 0,i=typeof TextEncoder=="function"?new TextEncoder:void 0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=Array.prototype.slice.call(o),a=function(T){var N={};return T.forEach(function(ie,oe){return N[ie]=oe}),N}(s),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),l=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):function(T){return new Uint8Array(Array.prototype.slice.call(T,0))},f=function(T){return T.replace(/=/g,"").replace(/[+\/]/g,function(N){return N=="+"?"-":"_"})},h=function(T){return T.replace(/[^A-Za-z0-9\+\/]/g,"")},d=function(T){for(var N,ie,oe,De,gn="",Xh=T.length%3,Wc=0;Wc<T.length;){if((ie=T.charCodeAt(Wc++))>255||(oe=T.charCodeAt(Wc++))>255||(De=T.charCodeAt(Wc++))>255)throw new TypeError("invalid character found");N=ie<<16|oe<<8|De,gn+=s[N>>18&63]+s[N>>12&63]+s[N>>6&63]+s[N&63]}return Xh?gn.slice(0,Xh-3)+"===".substring(Xh):gn},m=typeof btoa=="function"?function(T){return btoa(T)}:r?function(T){return Buffer.from(T,"binary").toString("base64")}:d,b=r?function(T){return Buffer.from(T).toString("base64")}:function(T){for(var N=4096,ie=[],oe=0,De=T.length;oe<De;oe+=N)ie.push(c.apply(null,T.subarray(oe,oe+N)));return m(ie.join(""))},y=function(T,N){return N===void 0&&(N=!1),N?f(b(T)):b(T)},_=function(T){if(T.length<2){var N=T.charCodeAt(0);return N<128?T:N<2048?c(192|N>>>6)+c(128|N&63):c(224|N>>>12&15)+c(128|N>>>6&63)+c(128|N&63)}else{var N=65536+(T.charCodeAt(0)-55296)*1024+(T.charCodeAt(1)-56320);return c(240|N>>>18&7)+c(128|N>>>12&63)+c(128|N>>>6&63)+c(128|N&63)}},x=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(T){return T.replace(x,_)},C=r?function(T){return Buffer.from(T,"utf8").toString("base64")}:i?function(T){return b(i.encode(T))}:function(T){return m(g(T))},k=function(T,N){return N===void 0&&(N=!1),N?f(C(T)):C(T)},P=function(T){return k(T,!0)},F=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,L=function(T){switch(T.length){case 4:var N=(7&T.charCodeAt(0))<<18|(63&T.charCodeAt(1))<<12|(63&T.charCodeAt(2))<<6|63&T.charCodeAt(3),ie=N-65536;return c((ie>>>10)+55296)+c((ie&1023)+56320);case 3:return c((15&T.charCodeAt(0))<<12|(63&T.charCodeAt(1))<<6|63&T.charCodeAt(2));default:return c((31&T.charCodeAt(0))<<6|63&T.charCodeAt(1))}},S=function(T){return T.replace(F,L)},I=function(T){if(T=T.replace(/\s+/g,""),!u.test(T))throw new TypeError("malformed base64.");T+="==".slice(2-(T.length&3));for(var N,ie="",oe,De,gn=0;gn<T.length;)N=a[T.charAt(gn++)]<<18|a[T.charAt(gn++)]<<12|(oe=a[T.charAt(gn++)])<<6|(De=a[T.charAt(gn++)]),ie+=oe===64?c(N>>16&255):De===64?c(N>>16&255,N>>8&255):c(N>>16&255,N>>8&255,N&255);return ie},$=typeof atob=="function"?function(T){return atob(h(T))}:r?function(T){return Buffer.from(T,"base64").toString("binary")}:I,B=r?function(T){return l(Buffer.from(T,"base64"))}:function(T){return l($(T).split("").map(function(N){return N.charCodeAt(0)}))},q=function(T){return B(V(T))},K=r?function(T){return Buffer.from(T,"base64").toString("utf8")}:n?function(T){return n.decode(B(T))}:function(T){return S($(T))},V=function(T){return h(T.replace(/[-_]/g,function(N){return N=="-"?"+":"/"}))},E=function(T){return K(V(T))},v=function(T){if(typeof T!="string")return!1;var N=T.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(N)||!/[^\s0-9a-zA-Z\-_]/.test(N)},w=function(T){return{value:T,enumerable:!1,writable:!0,configurable:!0}},O=function(){var T=function(N,ie){return Object.defineProperty(String.prototype,N,w(ie))};T("fromBase64",function(){return E(this)}),T("toBase64",function(N){return k(this,N)}),T("toBase64URI",function(){return k(this,!0)}),T("toBase64URL",function(){return k(this,!0)}),T("toUint8Array",function(){return q(this)})},j=function(){var T=function(N,ie){return Object.defineProperty(Uint8Array.prototype,N,w(ie))};T("toBase64",function(N){return y(this,N)}),T("toBase64URI",function(){return y(this,!0)}),T("toBase64URL",function(){return y(this,!0)})},R=function(){O(),j()},M={version:t,VERSION:e,atob:$,atobPolyfill:I,btoa:m,btoaPolyfill:d,fromBase64:E,toBase64:k,encode:k,encodeURI:P,encodeURL:P,utob:g,btou:S,decode:E,isValid:v,fromUint8Array:y,toUint8Array:q,extendString:O,extendUint8Array:j,extendBuiltins:R};return M.Base64={},Object.keys(M).forEach(function(T){return M.Base64[T]=M[T]}),M})});var eS=D((Oce,QC)=>{"use strict";QC.exports=function(e,r){if(r=r.split(":")[0],e=+e,!e)return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}});var nS=D(Pg=>{"use strict";var Q5=Object.prototype.hasOwnProperty,eU;function tS(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function rS(t){try{return encodeURIComponent(t)}catch{return null}}function tU(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},n;n=e.exec(t);){var i=tS(n[1]),o=tS(n[2]);i===null||o===null||i in r||(r[i]=o)}return r}function rU(t,e){e=e||"";var r=[],n,i;typeof e!="string"&&(e="?");for(i in t)if(Q5.call(t,i)){if(n=t[i],!n&&(n===null||n===eU||isNaN(n))&&(n=""),i=rS(i),n=rS(n),i===null||n===null)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""}Pg.stringify=rU;Pg.parse=tU});var fS=D((kce,lS)=>{"use strict";var oS=eS(),of=nS(),nU=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,sS=/[\n\r\t]/g,iU=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,aS=/:\d+$/,oU=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,sU=/^[a-zA-Z]:/;function $g(t){return(t||"").toString().replace(nU,"")}var Rg=[["#","hash"],["?","query"],function(e,r){return Hr(r.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],iS={hash:1,query:1};function uS(t){var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e={};var r=e.location||{};t=t||r;var n={},i=typeof t,o;if(t.protocol==="blob:")n=new zr(unescape(t.pathname),{});else if(i==="string"){n=new zr(t,{});for(o in iS)delete n[o]}else if(i==="object"){for(o in t)o in iS||(n[o]=t[o]);n.slashes===void 0&&(n.slashes=iU.test(t.href))}return n}function Hr(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}function cS(t,e){t=$g(t),t=t.replace(sS,""),e=e||{};var r=oU.exec(t),n=r[1]?r[1].toLowerCase():"",i=!!r[2],o=!!r[3],s=0,a;return i?o?(a=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(a=r[2]+r[4],s=r[2].length):o?(a=r[3]+r[4],s=r[3].length):a=r[4],n==="file:"?s>=2&&(a=a.slice(2)):Hr(n)?a=r[4]:n?i&&(a=a.slice(2)):s>=2&&Hr(e.protocol)&&(a=r[4]),{protocol:n,slashes:i||Hr(n),slashesCount:s,rest:a}}function aU(t,e){if(t==="")return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=r.length,i=r[n-1],o=!1,s=0;n--;)r[n]==="."?r.splice(n,1):r[n]===".."?(r.splice(n,1),s++):s&&(n===0&&(o=!0),r.splice(n,1),s--);return o&&r.unshift(""),(i==="."||i==="..")&&r.push(""),r.join("/")}function zr(t,e,r){if(t=$g(t),t=t.replace(sS,""),!(this instanceof zr))return new zr(t,e,r);var n,i,o,s,a,u,c=Rg.slice(),l=typeof e,f=this,h=0;for(l!=="object"&&l!=="string"&&(r=e,e=null),r&&typeof r!="function"&&(r=of.parse),e=uS(e),i=cS(t||"",e),n=!i.protocol&&!i.slashes,f.slashes=i.slashes||n&&e.slashes,f.protocol=i.protocol||e.protocol||"",t=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||sU.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!Hr(f.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h<c.length;h++){if(s=c[h],typeof s=="function"){t=s(t,f);continue}o=s[0],u=s[1],o!==o?f[u]=t:typeof o=="string"?(a=o==="@"?t.lastIndexOf(o):t.indexOf(o),~a&&(typeof s[2]=="number"?(f[u]=t.slice(0,a),t=t.slice(a+s[2])):(f[u]=t.slice(a),t=t.slice(0,a)))):(a=o.exec(t))&&(f[u]=a[1],t=t.slice(0,a.index)),f[u]=f[u]||n&&s[3]&&e[u]||"",s[4]&&(f[u]=f[u].toLowerCase())}r&&(f.query=r(f.query)),n&&e.slashes&&f.pathname.charAt(0)!=="/"&&(f.pathname!==""||e.pathname!=="")&&(f.pathname=aU(f.pathname,e.pathname)),f.pathname.charAt(0)!=="/"&&Hr(f.protocol)&&(f.pathname="/"+f.pathname),oS(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(a=f.auth.indexOf(":"),~a?(f.username=f.auth.slice(0,a),f.username=encodeURIComponent(decodeURIComponent(f.username)),f.password=f.auth.slice(a+1),f.password=encodeURIComponent(decodeURIComponent(f.password))):f.username=encodeURIComponent(decodeURIComponent(f.auth)),f.auth=f.password?f.username+":"+f.password:f.username),f.origin=f.protocol!=="file:"&&Hr(f.protocol)&&f.host?f.protocol+"//"+f.host:"null",f.href=f.toString()}function uU(t,e,r){var n=this;switch(t){case"query":typeof e=="string"&&e.length&&(e=(r||of.parse)(e)),n[t]=e;break;case"port":n[t]=e,oS(e,n.protocol)?e&&(n.host=n.hostname+":"+e):(n.host=n.hostname,n[t]="");break;case"hostname":n[t]=e,n.port&&(e+=":"+n.port),n.host=e;break;case"host":n[t]=e,aS.test(e)?(e=e.split(":"),n.port=e.pop(),n.hostname=e.join(":")):(n.hostname=e,n.port="");break;case"protocol":n.protocol=e.toLowerCase(),n.slashes=!r;break;case"pathname":case"hash":if(e){var i=t==="pathname"?"/":"#";n[t]=e.charAt(0)!==i?i+e:e}else n[t]=e;break;case"username":case"password":n[t]=encodeURIComponent(e);break;case"auth":var o=e.indexOf(":");~o?(n.username=e.slice(0,o),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=e.slice(o+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(e))}for(var s=0;s<Rg.length;s++){var a=Rg[s];a[4]&&(n[a[1]]=n[a[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin=n.protocol!=="file:"&&Hr(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function cU(t){(!t||typeof t!="function")&&(t=of.stringify);var e,r=this,n=r.host,i=r.protocol;i&&i.charAt(i.length-1)!==":"&&(i+=":");var o=i+(r.protocol&&r.slashes||Hr(r.protocol)?"//":"");return r.username?(o+=r.username,r.password&&(o+=":"+r.password),o+="@"):r.password?(o+=":"+r.password,o+="@"):r.protocol!=="file:"&&Hr(r.protocol)&&!n&&r.pathname!=="/"&&(o+="@"),(n[n.length-1]===":"||aS.test(r.hostname)&&!r.port)&&(n+=":"),o+=n+r.pathname,e=typeof r.query=="object"?t(r.query):r.query,e&&(o+=e.charAt(0)!=="?"?"?"+e:e),r.hash&&(o+=r.hash),o}zr.prototype={set:uU,toString:cU};zr.extractProtocol=cS;zr.location=uS;zr.trimLeft=$g;zr.qs=of;lS.exports=zr});var dS=D(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.default=lU;function lU(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t==="x"?e:e&3|8;return r.toString(16)})}});var FS=D(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.default=void 0;var fU=ZC(),dU=Lg(fS()),sf=Lg(Og()),Ni=Ag(),hU=Lg(dS());function Lg(t){return t&&t.__esModule?t:{default:t}}function jg(){"use strict";jg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&Li(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(Li(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function hS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function pU(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){hS(o,n,i,s,a,"next",u)}function a(u){hS(o,n,i,s,a,"throw",u)}s(void 0)})}}function _S(t,e){return yU(t)||gU(t,e)||ES(t,e)||mU()}function mU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gU(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function yU(t){if(Array.isArray(t))return t}function Li(t){"@babel/helpers - typeof";return Li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Li(t)}function DU(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ES(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function ES(t,e){if(t){if(typeof t=="string")return pS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pS(t,e)}}function pS(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ps(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mS(Object(r),!0).forEach(function(n){vU(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vU(t,e,r){return e=CS(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,CS(n.key),n)}}function wU(t,e,r){return e&&gS(t.prototype,e),r&&gS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function CS(t){var e=_U(t,"string");return Li(e)=="symbol"?e:e+""}function _U(t,e){if(Li(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var af="tus-v1",uf="ietf-draft-03",xu="ietf-draft-05",EU={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:xS,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:af},SS=function(){function t(e,r){bU(this,t),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=e,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return wU(t,[{key:"findPreviousUploads",value:function(){var r=this;return this.options.fingerprint(this.file,this.options).then(function(n){return r._urlStorage.findUploadsByFingerprint(n)})}},{key:"resumeFromPreviousUpload",value:function(r){this.url=r.uploadUrl||null,this._parallelUploadUrls=r.parallelUploadUrls||null,this._urlStorageKey=r.urlStorageKey}},{key:"start",value:function(){var r=this,n=this.file;if(!n){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(![af,uf,xu].includes(this.options.protocol)){this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var i=this.options.retryDelays;if(i!=null&&Object.prototype.toString.call(i)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var o=0,s=["uploadUrl","uploadSize","uploadLengthDeferred"];o<s.length;o++){var a=s[o];if(this.options[a]){this._emitError(new Error("tus: cannot use the ".concat(a," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(n,this.options).then(function(u){return u==null?(0,Ni.log)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,Ni.log)("Calculated fingerprint: ".concat(u)),r._fingerprint=u,r._source?r._source:r.options.fileReader.openFile(n,r.options.chunkSize)}).then(function(u){if(r._source=u,r.options.uploadLengthDeferred)r._size=null;else if(r.options.uploadSize!=null){if(r._size=Number(r.options.uploadSize),Number.isNaN(r._size)){r._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(r._size=r._source.size,r._size==null){r._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}r.options.parallelUploads>1||r._parallelUploadUrls!=null?r._startParallelUpload():r._startSingleUpload()}).catch(function(u){r._emitError(u)})}},{key:"_startParallelUpload",value:function(){var r,n=this,i=this._size,o=0;this._parallelUploads=[];var s=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,a=(r=this.options.parallelUploadBoundaries)!==null&&r!==void 0?r:SU(this._source.size,s);this._parallelUploadUrls&&a.forEach(function(l,f){l.uploadUrl=n._parallelUploadUrls[f]||null}),this._parallelUploadUrls=new Array(a.length);var u=a.map(function(l,f){var h=0;return n._source.slice(l.start,l.end).then(function(d){var m=d.value;return new Promise(function(b,y){var _=ps(ps({},n.options),{},{uploadUrl:l.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:n.options.metadataForPartialUploads,headers:ps(ps({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:b,onError:y,onProgress:function(C){o=o-h+C,h=C,n._emitProgress(o,i)},onUploadUrlAvailable:function(){n._parallelUploadUrls[f]=x.url,n._parallelUploadUrls.filter(function(C){return!!C}).length===a.length&&n._saveUploadInUrlStorage()}}),x=new t(m,_);x.start(),n._parallelUploads.push(x)})})}),c;Promise.all(u).then(function(){c=n._openRequest("POST",n.options.endpoint),c.setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var l=yS(n.options.metadata);return l!==""&&c.setHeader("Upload-Metadata",l),n._sendRequest(c,null)}).then(function(l){if(!ms(l.getStatus(),200)){n._emitHttpError(c,l,"tus: unexpected response while creating upload");return}var f=l.getHeader("Location");if(f==null){n._emitHttpError(c,l,"tus: invalid or missing Location header");return}n.url=wS(n.options.endpoint,f),(0,Ni.log)("Created upload at ".concat(n.url)),n._emitSuccess(l)}).catch(function(l){n._emitError(l)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){(0,Ni.log)("Resuming upload from previous URL: ".concat(this.url)),this._resumeUpload();return}if(this.options.uploadUrl!=null){(0,Ni.log)("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,this._resumeUpload();return}(0,Ni.log)("Creating a new upload"),this._createUpload()}},{key:"abort",value:function(r){var n=this;if(this._parallelUploads!=null){var i=DU(this._parallelUploads),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;s.abort(r)}}catch(a){i.e(a)}finally{i.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!r||this.url==null?Promise.resolve():t.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(r,n,i,o){this._emitError(new sf.default(i,o,r,n))}},{key:"_emitError",value:function(r){var n=this;if(!this._aborted){if(this.options.retryDelays!=null){var i=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(i&&(this._retryAttempt=0),bS(r,this._retryAttempt,this.options)){var o=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){n.start()},o);return}}if(typeof this.options.onError=="function")this.options.onError(r);else throw r}}},{key:"_emitSuccess",value:function(r){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess({lastResponse:r})}},{key:"_emitProgress",value:function(r,n){typeof this.options.onProgress=="function"&&this.options.onProgress(r,n)}},{key:"_emitChunkComplete",value:function(r,n,i){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(r,n,i)}},{key:"_createUpload",value:function(){var r=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var n=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?n.setHeader("Upload-Defer-Length","1"):n.setHeader("Upload-Length","".concat(this._size));var i=yS(this.options.metadata);i!==""&&n.setHeader("Upload-Metadata",i);var o;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,o=this._addChunkToRequest(n)):((this.options.protocol===uf||this.options.protocol===xu)&&n.setHeader("Upload-Complete","?0"),o=this._sendRequest(n,null)),o.then(function(s){if(!ms(s.getStatus(),200)){r._emitHttpError(n,s,"tus: unexpected response while creating upload");return}var a=s.getHeader("Location");if(a==null){r._emitHttpError(n,s,"tus: invalid or missing Location header");return}if(r.url=wS(r.options.endpoint,a),(0,Ni.log)("Created upload at ".concat(r.url)),typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._size===0){r._emitSuccess(s),r._source.close();return}r._saveUploadInUrlStorage().then(function(){r.options.uploadDataDuringCreation?r._handleUploadResponse(n,s):(r._offset=0,r._performUpload())})}).catch(function(s){r._emitHttpError(n,null,"tus: failed to create upload",s)})}},{key:"_resumeUpload",value:function(){var r=this,n=this._openRequest("HEAD",this.url),i=this._sendRequest(n,null);i.then(function(o){var s=o.getStatus();if(!ms(s,200)){if(s===423){r._emitHttpError(n,o,"tus: upload is currently locked; retry later");return}if(ms(s,400)&&r._removeFromUrlStorage(),!r.options.endpoint){r._emitHttpError(n,o,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}r.url=null,r._createUpload();return}var a=Number.parseInt(o.getHeader("Upload-Offset"),10);if(Number.isNaN(a)){r._emitHttpError(n,o,"tus: invalid or missing offset value");return}var u=Number.parseInt(o.getHeader("Upload-Length"),10);if(Number.isNaN(u)&&!r.options.uploadLengthDeferred&&r.options.protocol===af){r._emitHttpError(n,o,"tus: invalid or missing length value");return}typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._saveUploadInUrlStorage().then(function(){if(a===u){r._emitProgress(u,u),r._emitSuccess(o);return}r._offset=a,r._performUpload()})}).catch(function(o){r._emitHttpError(n,null,"tus: failed to resume upload",o)})}},{key:"_performUpload",value:function(){var r=this;if(!this._aborted){var n;this.options.overridePatchMethod?(n=this._openRequest("POST",this.url),n.setHeader("X-HTTP-Method-Override","PATCH")):n=this._openRequest("PATCH",this.url),n.setHeader("Upload-Offset","".concat(this._offset));var i=this._addChunkToRequest(n);i.then(function(o){if(!ms(o.getStatus(),200)){r._emitHttpError(n,o,"tus: unexpected response while uploading chunk");return}r._handleUploadResponse(n,o)}).catch(function(o){r._aborted||r._emitHttpError(n,null,"tus: failed to upload chunk at offset ".concat(r._offset),o)})}}},{key:"_addChunkToRequest",value:function(r){var n=this,i=this._offset,o=this._offset+this.options.chunkSize;return r.setProgressHandler(function(s){n._emitProgress(i+s,n._size)}),this.options.protocol===af?r.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===xu&&r.setHeader("Content-Type","application/partial-upload"),(o===Number.POSITIVE_INFINITY||o>this._size)&&!this.options.uploadLengthDeferred&&(o=this._size),this._source.slice(i,o).then(function(s){var a=s.value,u=s.done,c=a!=null&&a.size?a.size:0;n.options.uploadLengthDeferred&&u&&(n._size=n._offset+c,r.setHeader("Upload-Length","".concat(n._size)));var l=n._offset+c;return!n.options.uploadLengthDeferred&&u&&l!==n._size?Promise.reject(new Error("upload was configured with a size of ".concat(n._size," bytes, but the source is done after ").concat(l," bytes"))):a===null?n._sendRequest(r):((n.options.protocol===uf||n.options.protocol===xu)&&r.setHeader("Upload-Complete",u?"?1":"?0"),n._emitProgress(n._offset,n._size),n._sendRequest(r,a))})}},{key:"_handleUploadResponse",value:function(r,n){var i=Number.parseInt(n.getHeader("Upload-Offset"),10);if(Number.isNaN(i)){this._emitHttpError(r,n,"tus: invalid or missing offset value");return}if(this._emitProgress(i,this._size),this._emitChunkComplete(i-this._offset,i,this._size),this._offset=i,i===this._size){this._emitSuccess(n),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(r,n){var i=DS(r,n,this.options);return this._req=i,i}},{key:"_removeFromUrlStorage",value:function(){var r=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(n){r._emitError(n)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var r=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var n={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?n.parallelUploadUrls=this._parallelUploadUrls:n.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,n).then(function(i){r._urlStorageKey=i})}},{key:"_sendRequest",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return vS(r,n,this.options)}}],[{key:"terminate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=DS("DELETE",r,n);return vS(i,null,n).then(function(o){if(o.getStatus()!==204)throw new sf.default("tus: unexpected response while terminating upload",null,i,o)}).catch(function(o){if(o instanceof sf.default||(o=new sf.default("tus: failed to terminate upload",o,i,null)),!bS(o,0,n))throw o;var s=n.retryDelays[0],a=n.retryDelays.slice(1),u=ps(ps({},n),{},{retryDelays:a});return new Promise(function(c){return setTimeout(c,s)}).then(function(){return t.terminate(r,u)})})}}])}();function yS(t){return Object.entries(t).map(function(e){var r=_S(e,2),n=r[0],i=r[1];return"".concat(n," ").concat(fU.Base64.encode(String(i)))}).join(",")}function ms(t,e){return t>=e&&t<e+100}function DS(t,e,r){var n=r.httpStack.createRequest(t,e);r.protocol===uf?n.setHeader("Upload-Draft-Interop-Version","5"):r.protocol===xu?n.setHeader("Upload-Draft-Interop-Version","6"):n.setHeader("Tus-Resumable","1.0.0");for(var i=r.headers||{},o=0,s=Object.entries(i);o<s.length;o++){var a=_S(s[o],2),u=a[0],c=a[1];n.setHeader(u,c)}if(r.addRequestId){var l=(0,hU.default)();n.setHeader("X-Request-ID",l)}return n}function vS(t,e,r){return Ng.apply(this,arguments)}function Ng(){return Ng=pU(jg().mark(function t(e,r,n){var i;return jg().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(typeof n.onBeforeRequest!="function"){s.next=3;break}return s.next=3,n.onBeforeRequest(e);case 3:return s.next=5,e.send(r);case 5:if(i=s.sent,typeof n.onAfterResponse!="function"){s.next=9;break}return s.next=9,n.onAfterResponse(e,i);case 9:return s.abrupt("return",i);case 10:case"end":return s.stop()}},t)})),Ng.apply(this,arguments)}function CU(){var t=!0;return typeof navigator<"u"&&navigator.onLine===!1&&(t=!1),t}function bS(t,e,r){return r.retryDelays==null||e>=r.retryDelays.length||t.originalRequest==null?!1:r&&typeof r.onShouldRetry=="function"?r.onShouldRetry(t,e,r):xS(t)}function xS(t){var e=t.originalResponse?t.originalResponse.getStatus():0;return(!ms(e,400)||e===409||e===423)&&CU()}function wS(t,e){return new dU.default(e,t).toString()}function SU(t,e){for(var r=Math.floor(t/e),n=[],i=0;i<e;i++)n.push({start:r*i,end:r*(i+1)});return n[e-1].end=t,n}SS.defaultOptions=EU;var Pce=cf.default=SS});var AS=D(($ce,OS)=>{"use strict";var Gr=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Gr.writable=t=>Gr(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Gr.readable=t=>Gr(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Gr.duplex=t=>Gr.writable(t)&&Gr.readable(t);Gr.transform=t=>Gr.duplex(t)&&typeof t._transform=="function";OS.exports=Gr});var TS=D(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.default=void 0;function Fu(t){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(t)}function xU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,OU(n.key),n)}}function FU(t,e,r){return e&&kS(t.prototype,e),r&&kS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function OU(t){var e=AU(t,"string");return Fu(e)=="symbol"?e:e+""}function AU(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ice=lf.default=function(){function t(e){xU(this,t),this._buffer=e,this.size=e.length}return FU(t,[{key:"slice",value:function(r,n){var i=this._buffer.slice(r,n);i.size=i.length;var o=n>=this.size;return Promise.resolve({value:i,done:o})}},{key:"close",value:function(){}}])}()});var IS=D(Mg=>{"use strict";Object.defineProperty(Mg,"__esModule",{value:!0});Mg.default=IU;var $S=require("fs");function Bi(t){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(t)}function Bg(){"use strict";Bg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&Bi(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(Bi(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function kU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,PU(n.key),n)}}function TU(t,e,r){return e&&PS(t.prototype,e),r&&PS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function PU(t){var e=RU(t,"string");return Bi(e)=="symbol"?e:e+""}function RU(t,e){if(Bi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function RS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function $U(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){RS(o,n,i,s,a,"next",u)}function a(u){RS(o,n,i,s,a,"throw",u)}s(void 0)})}}function IU(t){return qg.apply(this,arguments)}function qg(){return qg=$U(Bg().mark(function t(e){var r,n,i,o,s,a,u;return Bg().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.path.toString(),l.next=3,$S.promises.stat(n);case 3:return i=l.sent,o=i.size,s=(r=e.start)!==null&&r!==void 0?r:0,a=Number.isFinite(e.end)?e.end+1:o,u=a-s,l.abrupt("return",new jU(e,n,u));case 9:case"end":return l.stop()}},t)})),qg.apply(this,arguments)}var jU=function(){function t(e,r,n){kU(this,t),this._stream=e,this._path=r,this.size=n}return TU(t,[{key:"slice",value:function(r,n){var i,o=(i=this._stream.start)!==null&&i!==void 0?i:0,s=(0,$S.createReadStream)(this._path,{start:o+r,end:o+n-1,autoClose:!0});s.size=Math.min(n-r,this.size);var a=s.size>=this.size;return Promise.resolve({value:s,done:a})}},{key:"close",value:function(){this._stream.destroy()}}])}()});var Vg=D(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.default=void 0;function qi(t){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(t)}function Ou(){"use strict";Ou=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&qi(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(qi(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function NU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,BU(n.key),n)}}function LU(t,e,r){return e&&jS(t.prototype,e),r&&jS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BU(t){var e=qU(t,"string");return qi(e)=="symbol"?e:e+""}function qU(t,e){if(qi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function LS(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){NS(o,n,i,s,a,"next",u)}function a(u){NS(o,n,i,s,a,"throw",u)}s(void 0)})}}function MU(t,e){return Ug.apply(this,arguments)}function Ug(){return Ug=LS(Ou().mark(function t(e,r){return Ou().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",new Promise(function(o,s){var a=function(l){e.off("readable",u),s(l)},u=function c(){var l=e.read(r);l!==null&&(e.off("error",a),e.off("readable",c),o(l))};e.once("error",a),e.on("readable",u)}));case 1:case"end":return i.stop()}},t)})),Ug.apply(this,arguments)}var Lce=ff.default=function(){function t(e){var r=this;NU(this,t),this._stream=e,this.size=null,this._buf=Buffer.alloc(0),this._bufPos=0,this._ended=!1,this._error=null,e.pause(),e.on("end",function(){r._ended=!0}),e.on("error",function(n){r._error=n})}return LU(t,[{key:"slice",value:function(){var e=LS(Ou().mark(function n(i,o){var s,a,u,c,l;return Ou().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!(i<this._bufPos)){h.next=2;break}throw new Error("cannot slice from position which we already seeked away");case 2:if(!(i>this._bufPos+this._buf.length)){h.next=4;break}throw new Error("slice start is outside of buffer (currently not implemented)");case 4:if(!this._error){h.next=6;break}throw this._error;case 6:if(i<this._bufPos+this._buf.length?(a=i-this._bufPos,u=Math.min(this._buf.length,o-this._bufPos),s=this._buf.slice(a,u)):s=Buffer.alloc(0),!this._ended){h.next=10;break}return s.size=s.length,h.abrupt("return",{value:s,done:!0});case 10:if(c=o-i,!(c>s.length)){h.next=16;break}return h.next=14,MU(this._stream,c-s.length);case 14:l=h.sent,s=Buffer.concat([s,l]);case 16:return this._buf=s,this._bufPos=i,s.size=s.length,h.abrupt("return",{value:s,done:this._ended});case 20:case"end":return h.stop()}},n,this)}));function r(n,i){return e.apply(this,arguments)}return r}()},{key:"close",value:function(){this._stream.destroy()}}])}()});var qS=D(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.default=void 0;var UU=require("fs"),VU=df(AS()),HU=df(TS()),zU=df(IS()),GU=df(Vg());function df(t){return t&&t.__esModule?t:{default:t}}function Au(t){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Au(t)}function WU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,YU(n.key),n)}}function KU(t,e,r){return e&&BS(t.prototype,e),r&&BS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function YU(t){var e=JU(t,"string");return Au(e)=="symbol"?e:e+""}function JU(t,e){if(Au(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qce=hf.default=function(){function t(){WU(this,t)}return KU(t,[{key:"openFile",value:function(r,n){return Buffer.isBuffer(r)?Promise.resolve(new HU.default(r)):r instanceof UU.ReadStream&&r.path!=null?(0,zU.default)(r):VU.default.readable(r)?(n=Number(n),Number.isFinite(n)?Promise.resolve(new GU.default(r)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option; specify a chunkSize to control the memory consumption"))):Promise.reject(new Error("source object may only be an instance of Buffer or Readable in this environment"))}}])}()});var HS=D(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.default=QU;var XU=require("crypto"),MS=VS(require("fs")),ZU=VS(require("path"));function US(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(US=function(n){return n?r:e})(t)}function VS(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=US(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function QU(t,e){if(Buffer.isBuffer(t)){var r=65536,n=t.slice(0,Math.min(r,t.length)),i=(0,XU.createHash)("md5").update(n).digest("hex"),o=["node-buffer",i,t.length,e.endpoint].join("-");return Promise.resolve(o)}return t instanceof MS.ReadStream&&t.path!=null?new Promise(function(s,a){var u=ZU.resolve(t.path);MS.stat(t.path,function(c,l){if(c){a(c);return}var f=["node-file",u,l.size,l.mtime.getTime(),e.endpoint].join("-");s(f)})}):Promise.resolve(null)}});var YS=D((Vce,KS)=>{var WS="Expected a function",zS=NaN,e9="[object Symbol]",t9=/^\s+|\s+$/g,r9=/^[-+]0x[0-9a-f]+$/i,n9=/^0b[01]+$/i,i9=/^0o[0-7]+$/i,o9=parseInt,s9=typeof global=="object"&&global&&global.Object===Object&&global,a9=typeof self=="object"&&self&&self.Object===Object&&self,u9=s9||a9||Function("return this")(),c9=Object.prototype,l9=c9.toString,f9=Math.max,d9=Math.min,zg=function(){return u9.Date.now()};function h9(t,e,r){var n,i,o,s,a,u,c=0,l=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(WS);e=GS(e)||0,pf(r)&&(l=!!r.leading,f="maxWait"in r,o=f?f9(GS(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h);function d(P){var F=n,L=i;return n=i=void 0,c=P,s=t.apply(L,F),s}function m(P){return c=P,a=setTimeout(_,e),l?d(P):s}function b(P){var F=P-u,L=P-c,S=e-F;return f?d9(S,o-L):S}function y(P){var F=P-u,L=P-c;return u===void 0||F>=e||F<0||f&&L>=o}function _(){var P=zg();if(y(P))return x(P);a=setTimeout(_,b(P))}function x(P){return a=void 0,h&&n?d(P):(n=i=void 0,s)}function g(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function C(){return a===void 0?s:x(zg())}function k(){var P=zg(),F=y(P);if(n=arguments,i=this,u=P,F){if(a===void 0)return m(u);if(f)return a=setTimeout(_,e),d(u)}return a===void 0&&(a=setTimeout(_,e)),s}return k.cancel=g,k.flush=C,k}function p9(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(WS);return pf(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),h9(t,e,{leading:n,maxWait:e,trailing:i})}function pf(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function m9(t){return!!t&&typeof t=="object"}function g9(t){return typeof t=="symbol"||m9(t)&&l9.call(t)==e9}function GS(t){if(typeof t=="number")return t;if(g9(t))return zS;if(pf(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pf(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(t9,"");var r=n9.test(t);return r||i9.test(t)?o9(t.slice(2),r?2:8):r9.test(t)?zS:+t}KS.exports=p9});var i1=D(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.default=void 0;var y9=t1(require("http")),D9=t1(require("https")),ZS=require("stream"),v9=require("url"),QS=b9(YS());function b9(t){return t&&t.__esModule?t:{default:t}}function e1(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(e1=function(n){return n?r:e})(t)}function t1(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=e1(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function w9(t,e,r){return e=mf(e),_9(t,r1()?Reflect.construct(e,r||[],mf(t).constructor):e.apply(t,r))}function _9(t,e){if(e&&(gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E9(t)}function E9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r1=function(){return!!t})()}function mf(t){return mf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mf(t)}function C9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gg(t,e)}function Gg(t,e){return Gg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gg(t,e)}function JS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ku(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JS(Object(r),!0).forEach(function(n){S9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S9(t,e,r){return e=n1(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}function gf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n1(n.key),n)}}function yf(t,e,r){return e&&XS(t.prototype,e),r&&XS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function n1(t){var e=x9(t,"string");return gs(e)=="symbol"?e:e+""}function x9(t,e){if(gs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(gs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hce=Df.default=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gf(this,t),this._requestOptions=e}return yf(t,[{key:"createRequest",value:function(r,n){return new F9(r,n,this._requestOptions)}},{key:"getName",value:function(){return"NodeHttpStack"}}])}(),F9=function(){function t(e,r,n){gf(this,t),this._method=e,this._url=r,this._headers={},this._request=null,this._progressHandler=function(){},this._requestOptions=n||{}}return yf(t,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(r,n){this._headers[r]=n}},{key:"getHeader",value:function(r){return this._headers[r]}},{key:"setProgressHandler",value:function(r){this._progressHandler=r}},{key:"send",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(i,o){var s=ku(ku(ku({},(0,v9.parse)(r._url)),r._requestOptions),{},{method:r._method,headers:ku(ku({},r._requestOptions.headers||{}),r._headers)});n!=null&&n.size&&(s.headers["Content-Length"]=n.size);var a=s.protocol==="https:"?D9:y9;r._request=a.request(s);var u=r._request;u.on("response",function(c){var l=[];c.on("data",function(f){l.push(f)}),c.on("end",function(){var f=Buffer.concat(l).toString("utf8");i(new O9(c,f))})}),u.on("error",function(c){o(c)}),n instanceof ZS.Readable?n.pipe(new A9(r._progressHandler)).pipe(u):n instanceof Uint8Array?k9(u,n,r._progressHandler):u.end(n)})}},{key:"abort",value:function(){return this._request!==null&&this._request.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._request}}])}(),O9=function(){function t(e,r){gf(this,t),this._response=e,this._body=r}return yf(t,[{key:"getStatus",value:function(){return this._response.statusCode}},{key:"getHeader",value:function(r){return this._response.headers[r.toLowerCase()]}},{key:"getBody",value:function(){return this._body}},{key:"getUnderlyingObject",value:function(){return this._response}}])}(),A9=function(t){function e(r){var n;return gf(this,e),n=w9(this,e),n._onprogress=(0,QS.default)(r,100,{leading:!0,trailing:!1}),n._position=0,n}return C9(e,t),yf(e,[{key:"_transform",value:function(n,i,o){this._position+=n.length,this._onprogress(this._position),o(null,n)}}])}(ZS.Transform),k9=function(e,r,n){n=(0,QS.default)(n,100,{leading:!0,trailing:!1});var i=0;function o(){var s=Math.min(e.writableHighWaterMark,r.length-i),a=r.subarray(i,i+s);i+=a.length;var u=e.write(a);u?i<r.length?o():e.end():(e.once("drain",o),n(i))}o()}});var o1=D(Wg=>{"use strict";Wg.expectReceive=function(t,e,r){var n;r.root(t,e,r),n=this.message,t.hasOwnProperty("expected")&&(n+=" Expected "+t.expected+"."),t.hasOwnProperty("received")&&(n+=" Received: "+t.received+"."),this.message=n};Wg.root=function(t,e,r){var n=this,i,o={stackLength:Error.stackTraceLimit,rootOnly:!0},s="",a=Error.stackTraceLimit,u;function c(){u[0]=n.toString(),n.stack=u.join(`
28
+ `,e=e.substr(s)}try{o=JSON.parse(e)}catch{return Vr.red("Error:")+" Not valid JSON!"}return i+=_u.render(o,r,n),i}});var Og=D(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.default=void 0;function hs(t){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hs(t)}function KC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,NU(n.key),n)}}function jU(t,e,r){return e&&KC(t.prototype,e),r&&KC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function NU(t){var e=LU(t,"string");return hs(e)=="symbol"?e:e+""}function LU(t,e){if(hs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(hs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function BU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qU(t,e,r){return e=Cu(e),MU(t,Fg()?Reflect.construct(e,r||[],Cu(t).constructor):e.apply(t,r))}function MU(t,e){if(e&&(hs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UU(t)}function UU(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function VU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eu(t,e)}function xg(t){var e=typeof Map=="function"?new Map:void 0;return xg=function(n){if(n===null||!zU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return HU(n,arguments,Cu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Eu(i,n)},xg(t)}function HU(t,e,r){if(Fg())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&Eu(i,r.prototype),i}function Fg(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fg=function(){return!!t})()}function zU(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function Eu(t,e){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Eu(t,e)}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cu(t)}var GU=function(t){function e(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(BU(this,e),n=qU(this,e,[r]),n.originalRequest=o,n.originalResponse=s,n.causingError=i,i!=null&&(r+=", caused by ".concat(i.toString())),o!=null){var a=o.getHeader("X-Request-ID")||"n/a",u=o.getMethod(),c=o.getURL(),l=s?s.getStatus():"n/a",f=s?s.getBody()||"":"n/a";r+=", originated from request (method: ".concat(u,", url: ").concat(c,", response code: ").concat(l,", response text: ").concat(f,", request id: ").concat(a,")")}return n.message=r,n}return VU(e,t),jU(e)}(xg(Error)),Ece=tf.default=GU});var Ag=D(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.enableDebugLog=WU;rf.log=KU;var YC=!1;function WU(){YC=!0}function KU(t){YC&&console.log(t)}});var XC=D(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.default=void 0;function Su(t){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Su(t)}function YU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,XU(n.key),n)}}function JU(t,e,r){return e&&JC(t.prototype,e),r&&JC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function XU(t){var e=ZU(t,"string");return Su(e)=="symbol"?e:e+""}function ZU(t,e){if(Su(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Su(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xce=nf.default=function(){function t(){YU(this,t)}return JU(t,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(r){return Promise.resolve([])}},{key:"removeUpload",value:function(r){return Promise.resolve()}},{key:"addUpload",value:function(r,n){return Promise.resolve(null)}}])}()});var ZC=D((kg,Tg)=>{(function(t,e){typeof kg=="object"&&typeof Tg<"u"?Tg.exports=e():typeof define=="function"&&define.amd?define(e):function(){var r=t.Base64,n=e();n.noConflict=function(){return t.Base64=r,n},t.Meteor&&(Base64=n),t.Base64=n}()})(typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:kg,function(){"use strict";var t="3.7.7",e=t,r=typeof Buffer=="function",n=typeof TextDecoder=="function"?new TextDecoder:void 0,i=typeof TextEncoder=="function"?new TextEncoder:void 0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=Array.prototype.slice.call(o),a=function(T){var N={};return T.forEach(function(ie,oe){return N[ie]=oe}),N}(s),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,c=String.fromCharCode.bind(String),l=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):function(T){return new Uint8Array(Array.prototype.slice.call(T,0))},f=function(T){return T.replace(/=/g,"").replace(/[+\/]/g,function(N){return N=="+"?"-":"_"})},h=function(T){return T.replace(/[^A-Za-z0-9\+\/]/g,"")},d=function(T){for(var N,ie,oe,De,gn="",Xh=T.length%3,Wc=0;Wc<T.length;){if((ie=T.charCodeAt(Wc++))>255||(oe=T.charCodeAt(Wc++))>255||(De=T.charCodeAt(Wc++))>255)throw new TypeError("invalid character found");N=ie<<16|oe<<8|De,gn+=s[N>>18&63]+s[N>>12&63]+s[N>>6&63]+s[N&63]}return Xh?gn.slice(0,Xh-3)+"===".substring(Xh):gn},m=typeof btoa=="function"?function(T){return btoa(T)}:r?function(T){return Buffer.from(T,"binary").toString("base64")}:d,b=r?function(T){return Buffer.from(T).toString("base64")}:function(T){for(var N=4096,ie=[],oe=0,De=T.length;oe<De;oe+=N)ie.push(c.apply(null,T.subarray(oe,oe+N)));return m(ie.join(""))},y=function(T,N){return N===void 0&&(N=!1),N?f(b(T)):b(T)},_=function(T){if(T.length<2){var N=T.charCodeAt(0);return N<128?T:N<2048?c(192|N>>>6)+c(128|N&63):c(224|N>>>12&15)+c(128|N>>>6&63)+c(128|N&63)}else{var N=65536+(T.charCodeAt(0)-55296)*1024+(T.charCodeAt(1)-56320);return c(240|N>>>18&7)+c(128|N>>>12&63)+c(128|N>>>6&63)+c(128|N&63)}},x=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(T){return T.replace(x,_)},C=r?function(T){return Buffer.from(T,"utf8").toString("base64")}:i?function(T){return b(i.encode(T))}:function(T){return m(g(T))},k=function(T,N){return N===void 0&&(N=!1),N?f(C(T)):C(T)},P=function(T){return k(T,!0)},F=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,L=function(T){switch(T.length){case 4:var N=(7&T.charCodeAt(0))<<18|(63&T.charCodeAt(1))<<12|(63&T.charCodeAt(2))<<6|63&T.charCodeAt(3),ie=N-65536;return c((ie>>>10)+55296)+c((ie&1023)+56320);case 3:return c((15&T.charCodeAt(0))<<12|(63&T.charCodeAt(1))<<6|63&T.charCodeAt(2));default:return c((31&T.charCodeAt(0))<<6|63&T.charCodeAt(1))}},S=function(T){return T.replace(F,L)},I=function(T){if(T=T.replace(/\s+/g,""),!u.test(T))throw new TypeError("malformed base64.");T+="==".slice(2-(T.length&3));for(var N,ie="",oe,De,gn=0;gn<T.length;)N=a[T.charAt(gn++)]<<18|a[T.charAt(gn++)]<<12|(oe=a[T.charAt(gn++)])<<6|(De=a[T.charAt(gn++)]),ie+=oe===64?c(N>>16&255):De===64?c(N>>16&255,N>>8&255):c(N>>16&255,N>>8&255,N&255);return ie},$=typeof atob=="function"?function(T){return atob(h(T))}:r?function(T){return Buffer.from(T,"base64").toString("binary")}:I,B=r?function(T){return l(Buffer.from(T,"base64"))}:function(T){return l($(T).split("").map(function(N){return N.charCodeAt(0)}))},q=function(T){return B(V(T))},K=r?function(T){return Buffer.from(T,"base64").toString("utf8")}:n?function(T){return n.decode(B(T))}:function(T){return S($(T))},V=function(T){return h(T.replace(/[-_]/g,function(N){return N=="-"?"+":"/"}))},E=function(T){return K(V(T))},v=function(T){if(typeof T!="string")return!1;var N=T.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(N)||!/[^\s0-9a-zA-Z\-_]/.test(N)},w=function(T){return{value:T,enumerable:!1,writable:!0,configurable:!0}},O=function(){var T=function(N,ie){return Object.defineProperty(String.prototype,N,w(ie))};T("fromBase64",function(){return E(this)}),T("toBase64",function(N){return k(this,N)}),T("toBase64URI",function(){return k(this,!0)}),T("toBase64URL",function(){return k(this,!0)}),T("toUint8Array",function(){return q(this)})},j=function(){var T=function(N,ie){return Object.defineProperty(Uint8Array.prototype,N,w(ie))};T("toBase64",function(N){return y(this,N)}),T("toBase64URI",function(){return y(this,!0)}),T("toBase64URL",function(){return y(this,!0)})},R=function(){O(),j()},M={version:t,VERSION:e,atob:$,atobPolyfill:I,btoa:m,btoaPolyfill:d,fromBase64:E,toBase64:k,encode:k,encodeURI:P,encodeURL:P,utob:g,btou:S,decode:E,isValid:v,fromUint8Array:y,toUint8Array:q,extendString:O,extendUint8Array:j,extendBuiltins:R};return M.Base64={},Object.keys(M).forEach(function(T){return M.Base64[T]=M[T]}),M})});var eS=D((Oce,QC)=>{"use strict";QC.exports=function(e,r){if(r=r.split(":")[0],e=+e,!e)return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}});var nS=D(Pg=>{"use strict";var QU=Object.prototype.hasOwnProperty,e5;function tS(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function rS(t){try{return encodeURIComponent(t)}catch{return null}}function t5(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},n;n=e.exec(t);){var i=tS(n[1]),o=tS(n[2]);i===null||o===null||i in r||(r[i]=o)}return r}function r5(t,e){e=e||"";var r=[],n,i;typeof e!="string"&&(e="?");for(i in t)if(QU.call(t,i)){if(n=t[i],!n&&(n===null||n===e5||isNaN(n))&&(n=""),i=rS(i),n=rS(n),i===null||n===null)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""}Pg.stringify=r5;Pg.parse=t5});var fS=D((kce,lS)=>{"use strict";var oS=eS(),of=nS(),n5=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,sS=/[\n\r\t]/g,i5=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,aS=/:\d+$/,o5=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,s5=/^[a-zA-Z]:/;function $g(t){return(t||"").toString().replace(n5,"")}var Rg=[["#","hash"],["?","query"],function(e,r){return Hr(r.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],iS={hash:1,query:1};function uS(t){var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e={};var r=e.location||{};t=t||r;var n={},i=typeof t,o;if(t.protocol==="blob:")n=new zr(unescape(t.pathname),{});else if(i==="string"){n=new zr(t,{});for(o in iS)delete n[o]}else if(i==="object"){for(o in t)o in iS||(n[o]=t[o]);n.slashes===void 0&&(n.slashes=i5.test(t.href))}return n}function Hr(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}function cS(t,e){t=$g(t),t=t.replace(sS,""),e=e||{};var r=o5.exec(t),n=r[1]?r[1].toLowerCase():"",i=!!r[2],o=!!r[3],s=0,a;return i?o?(a=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(a=r[2]+r[4],s=r[2].length):o?(a=r[3]+r[4],s=r[3].length):a=r[4],n==="file:"?s>=2&&(a=a.slice(2)):Hr(n)?a=r[4]:n?i&&(a=a.slice(2)):s>=2&&Hr(e.protocol)&&(a=r[4]),{protocol:n,slashes:i||Hr(n),slashesCount:s,rest:a}}function a5(t,e){if(t==="")return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=r.length,i=r[n-1],o=!1,s=0;n--;)r[n]==="."?r.splice(n,1):r[n]===".."?(r.splice(n,1),s++):s&&(n===0&&(o=!0),r.splice(n,1),s--);return o&&r.unshift(""),(i==="."||i==="..")&&r.push(""),r.join("/")}function zr(t,e,r){if(t=$g(t),t=t.replace(sS,""),!(this instanceof zr))return new zr(t,e,r);var n,i,o,s,a,u,c=Rg.slice(),l=typeof e,f=this,h=0;for(l!=="object"&&l!=="string"&&(r=e,e=null),r&&typeof r!="function"&&(r=of.parse),e=uS(e),i=cS(t||"",e),n=!i.protocol&&!i.slashes,f.slashes=i.slashes||n&&e.slashes,f.protocol=i.protocol||e.protocol||"",t=i.rest,(i.protocol==="file:"&&(i.slashesCount!==2||s5.test(t))||!i.slashes&&(i.protocol||i.slashesCount<2||!Hr(f.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h<c.length;h++){if(s=c[h],typeof s=="function"){t=s(t,f);continue}o=s[0],u=s[1],o!==o?f[u]=t:typeof o=="string"?(a=o==="@"?t.lastIndexOf(o):t.indexOf(o),~a&&(typeof s[2]=="number"?(f[u]=t.slice(0,a),t=t.slice(a+s[2])):(f[u]=t.slice(a),t=t.slice(0,a)))):(a=o.exec(t))&&(f[u]=a[1],t=t.slice(0,a.index)),f[u]=f[u]||n&&s[3]&&e[u]||"",s[4]&&(f[u]=f[u].toLowerCase())}r&&(f.query=r(f.query)),n&&e.slashes&&f.pathname.charAt(0)!=="/"&&(f.pathname!==""||e.pathname!=="")&&(f.pathname=a5(f.pathname,e.pathname)),f.pathname.charAt(0)!=="/"&&Hr(f.protocol)&&(f.pathname="/"+f.pathname),oS(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(a=f.auth.indexOf(":"),~a?(f.username=f.auth.slice(0,a),f.username=encodeURIComponent(decodeURIComponent(f.username)),f.password=f.auth.slice(a+1),f.password=encodeURIComponent(decodeURIComponent(f.password))):f.username=encodeURIComponent(decodeURIComponent(f.auth)),f.auth=f.password?f.username+":"+f.password:f.username),f.origin=f.protocol!=="file:"&&Hr(f.protocol)&&f.host?f.protocol+"//"+f.host:"null",f.href=f.toString()}function u5(t,e,r){var n=this;switch(t){case"query":typeof e=="string"&&e.length&&(e=(r||of.parse)(e)),n[t]=e;break;case"port":n[t]=e,oS(e,n.protocol)?e&&(n.host=n.hostname+":"+e):(n.host=n.hostname,n[t]="");break;case"hostname":n[t]=e,n.port&&(e+=":"+n.port),n.host=e;break;case"host":n[t]=e,aS.test(e)?(e=e.split(":"),n.port=e.pop(),n.hostname=e.join(":")):(n.hostname=e,n.port="");break;case"protocol":n.protocol=e.toLowerCase(),n.slashes=!r;break;case"pathname":case"hash":if(e){var i=t==="pathname"?"/":"#";n[t]=e.charAt(0)!==i?i+e:e}else n[t]=e;break;case"username":case"password":n[t]=encodeURIComponent(e);break;case"auth":var o=e.indexOf(":");~o?(n.username=e.slice(0,o),n.username=encodeURIComponent(decodeURIComponent(n.username)),n.password=e.slice(o+1),n.password=encodeURIComponent(decodeURIComponent(n.password))):n.username=encodeURIComponent(decodeURIComponent(e))}for(var s=0;s<Rg.length;s++){var a=Rg[s];a[4]&&(n[a[1]]=n[a[1]].toLowerCase())}return n.auth=n.password?n.username+":"+n.password:n.username,n.origin=n.protocol!=="file:"&&Hr(n.protocol)&&n.host?n.protocol+"//"+n.host:"null",n.href=n.toString(),n}function c5(t){(!t||typeof t!="function")&&(t=of.stringify);var e,r=this,n=r.host,i=r.protocol;i&&i.charAt(i.length-1)!==":"&&(i+=":");var o=i+(r.protocol&&r.slashes||Hr(r.protocol)?"//":"");return r.username?(o+=r.username,r.password&&(o+=":"+r.password),o+="@"):r.password?(o+=":"+r.password,o+="@"):r.protocol!=="file:"&&Hr(r.protocol)&&!n&&r.pathname!=="/"&&(o+="@"),(n[n.length-1]===":"||aS.test(r.hostname)&&!r.port)&&(n+=":"),o+=n+r.pathname,e=typeof r.query=="object"?t(r.query):r.query,e&&(o+=e.charAt(0)!=="?"?"?"+e:e),r.hash&&(o+=r.hash),o}zr.prototype={set:u5,toString:c5};zr.extractProtocol=cS;zr.location=uS;zr.trimLeft=$g;zr.qs=of;lS.exports=zr});var dS=D(Ig=>{"use strict";Object.defineProperty(Ig,"__esModule",{value:!0});Ig.default=l5;function l5(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t==="x"?e:e&3|8;return r.toString(16)})}});var FS=D(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.default=void 0;var f5=ZC(),d5=Lg(fS()),sf=Lg(Og()),Ni=Ag(),h5=Lg(dS());function Lg(t){return t&&t.__esModule?t:{default:t}}function jg(){"use strict";jg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&Li(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(Li(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function hS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function p5(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){hS(o,n,i,s,a,"next",u)}function a(u){hS(o,n,i,s,a,"throw",u)}s(void 0)})}}function _S(t,e){return y5(t)||g5(t,e)||ES(t,e)||m5()}function m5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g5(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==e);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function y5(t){if(Array.isArray(t))return t}function Li(t){"@babel/helpers - typeof";return Li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Li(t)}function D5(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ES(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function ES(t,e){if(t){if(typeof t=="string")return pS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pS(t,e)}}function pS(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ps(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mS(Object(r),!0).forEach(function(n){v5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v5(t,e,r){return e=CS(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,CS(n.key),n)}}function w5(t,e,r){return e&&gS(t.prototype,e),r&&gS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function CS(t){var e=_5(t,"string");return Li(e)=="symbol"?e:e+""}function _5(t,e){if(Li(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var af="tus-v1",uf="ietf-draft-03",xu="ietf-draft-05",E5={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:xS,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:af},SS=function(){function t(e,r){b5(this,t),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=e,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return w5(t,[{key:"findPreviousUploads",value:function(){var r=this;return this.options.fingerprint(this.file,this.options).then(function(n){return r._urlStorage.findUploadsByFingerprint(n)})}},{key:"resumeFromPreviousUpload",value:function(r){this.url=r.uploadUrl||null,this._parallelUploadUrls=r.parallelUploadUrls||null,this._urlStorageKey=r.urlStorageKey}},{key:"start",value:function(){var r=this,n=this.file;if(!n){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(![af,uf,xu].includes(this.options.protocol)){this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var i=this.options.retryDelays;if(i!=null&&Object.prototype.toString.call(i)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var o=0,s=["uploadUrl","uploadSize","uploadLengthDeferred"];o<s.length;o++){var a=s[o];if(this.options[a]){this._emitError(new Error("tus: cannot use the ".concat(a," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(n,this.options).then(function(u){return u==null?(0,Ni.log)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,Ni.log)("Calculated fingerprint: ".concat(u)),r._fingerprint=u,r._source?r._source:r.options.fileReader.openFile(n,r.options.chunkSize)}).then(function(u){if(r._source=u,r.options.uploadLengthDeferred)r._size=null;else if(r.options.uploadSize!=null){if(r._size=Number(r.options.uploadSize),Number.isNaN(r._size)){r._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(r._size=r._source.size,r._size==null){r._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}r.options.parallelUploads>1||r._parallelUploadUrls!=null?r._startParallelUpload():r._startSingleUpload()}).catch(function(u){r._emitError(u)})}},{key:"_startParallelUpload",value:function(){var r,n=this,i=this._size,o=0;this._parallelUploads=[];var s=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,a=(r=this.options.parallelUploadBoundaries)!==null&&r!==void 0?r:S5(this._source.size,s);this._parallelUploadUrls&&a.forEach(function(l,f){l.uploadUrl=n._parallelUploadUrls[f]||null}),this._parallelUploadUrls=new Array(a.length);var u=a.map(function(l,f){var h=0;return n._source.slice(l.start,l.end).then(function(d){var m=d.value;return new Promise(function(b,y){var _=ps(ps({},n.options),{},{uploadUrl:l.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:n.options.metadataForPartialUploads,headers:ps(ps({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:b,onError:y,onProgress:function(C){o=o-h+C,h=C,n._emitProgress(o,i)},onUploadUrlAvailable:function(){n._parallelUploadUrls[f]=x.url,n._parallelUploadUrls.filter(function(C){return!!C}).length===a.length&&n._saveUploadInUrlStorage()}}),x=new t(m,_);x.start(),n._parallelUploads.push(x)})})}),c;Promise.all(u).then(function(){c=n._openRequest("POST",n.options.endpoint),c.setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var l=yS(n.options.metadata);return l!==""&&c.setHeader("Upload-Metadata",l),n._sendRequest(c,null)}).then(function(l){if(!ms(l.getStatus(),200)){n._emitHttpError(c,l,"tus: unexpected response while creating upload");return}var f=l.getHeader("Location");if(f==null){n._emitHttpError(c,l,"tus: invalid or missing Location header");return}n.url=wS(n.options.endpoint,f),(0,Ni.log)("Created upload at ".concat(n.url)),n._emitSuccess(l)}).catch(function(l){n._emitError(l)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){(0,Ni.log)("Resuming upload from previous URL: ".concat(this.url)),this._resumeUpload();return}if(this.options.uploadUrl!=null){(0,Ni.log)("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,this._resumeUpload();return}(0,Ni.log)("Creating a new upload"),this._createUpload()}},{key:"abort",value:function(r){var n=this;if(this._parallelUploads!=null){var i=D5(this._parallelUploads),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;s.abort(r)}}catch(a){i.e(a)}finally{i.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!r||this.url==null?Promise.resolve():t.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(r,n,i,o){this._emitError(new sf.default(i,o,r,n))}},{key:"_emitError",value:function(r){var n=this;if(!this._aborted){if(this.options.retryDelays!=null){var i=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(i&&(this._retryAttempt=0),bS(r,this._retryAttempt,this.options)){var o=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){n.start()},o);return}}if(typeof this.options.onError=="function")this.options.onError(r);else throw r}}},{key:"_emitSuccess",value:function(r){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess({lastResponse:r})}},{key:"_emitProgress",value:function(r,n){typeof this.options.onProgress=="function"&&this.options.onProgress(r,n)}},{key:"_emitChunkComplete",value:function(r,n,i){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(r,n,i)}},{key:"_createUpload",value:function(){var r=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var n=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?n.setHeader("Upload-Defer-Length","1"):n.setHeader("Upload-Length","".concat(this._size));var i=yS(this.options.metadata);i!==""&&n.setHeader("Upload-Metadata",i);var o;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,o=this._addChunkToRequest(n)):((this.options.protocol===uf||this.options.protocol===xu)&&n.setHeader("Upload-Complete","?0"),o=this._sendRequest(n,null)),o.then(function(s){if(!ms(s.getStatus(),200)){r._emitHttpError(n,s,"tus: unexpected response while creating upload");return}var a=s.getHeader("Location");if(a==null){r._emitHttpError(n,s,"tus: invalid or missing Location header");return}if(r.url=wS(r.options.endpoint,a),(0,Ni.log)("Created upload at ".concat(r.url)),typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._size===0){r._emitSuccess(s),r._source.close();return}r._saveUploadInUrlStorage().then(function(){r.options.uploadDataDuringCreation?r._handleUploadResponse(n,s):(r._offset=0,r._performUpload())})}).catch(function(s){r._emitHttpError(n,null,"tus: failed to create upload",s)})}},{key:"_resumeUpload",value:function(){var r=this,n=this._openRequest("HEAD",this.url),i=this._sendRequest(n,null);i.then(function(o){var s=o.getStatus();if(!ms(s,200)){if(s===423){r._emitHttpError(n,o,"tus: upload is currently locked; retry later");return}if(ms(s,400)&&r._removeFromUrlStorage(),!r.options.endpoint){r._emitHttpError(n,o,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}r.url=null,r._createUpload();return}var a=Number.parseInt(o.getHeader("Upload-Offset"),10);if(Number.isNaN(a)){r._emitHttpError(n,o,"tus: invalid or missing offset value");return}var u=Number.parseInt(o.getHeader("Upload-Length"),10);if(Number.isNaN(u)&&!r.options.uploadLengthDeferred&&r.options.protocol===af){r._emitHttpError(n,o,"tus: invalid or missing length value");return}typeof r.options.onUploadUrlAvailable=="function"&&r.options.onUploadUrlAvailable(),r._saveUploadInUrlStorage().then(function(){if(a===u){r._emitProgress(u,u),r._emitSuccess(o);return}r._offset=a,r._performUpload()})}).catch(function(o){r._emitHttpError(n,null,"tus: failed to resume upload",o)})}},{key:"_performUpload",value:function(){var r=this;if(!this._aborted){var n;this.options.overridePatchMethod?(n=this._openRequest("POST",this.url),n.setHeader("X-HTTP-Method-Override","PATCH")):n=this._openRequest("PATCH",this.url),n.setHeader("Upload-Offset","".concat(this._offset));var i=this._addChunkToRequest(n);i.then(function(o){if(!ms(o.getStatus(),200)){r._emitHttpError(n,o,"tus: unexpected response while uploading chunk");return}r._handleUploadResponse(n,o)}).catch(function(o){r._aborted||r._emitHttpError(n,null,"tus: failed to upload chunk at offset ".concat(r._offset),o)})}}},{key:"_addChunkToRequest",value:function(r){var n=this,i=this._offset,o=this._offset+this.options.chunkSize;return r.setProgressHandler(function(s){n._emitProgress(i+s,n._size)}),this.options.protocol===af?r.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===xu&&r.setHeader("Content-Type","application/partial-upload"),(o===Number.POSITIVE_INFINITY||o>this._size)&&!this.options.uploadLengthDeferred&&(o=this._size),this._source.slice(i,o).then(function(s){var a=s.value,u=s.done,c=a!=null&&a.size?a.size:0;n.options.uploadLengthDeferred&&u&&(n._size=n._offset+c,r.setHeader("Upload-Length","".concat(n._size)));var l=n._offset+c;return!n.options.uploadLengthDeferred&&u&&l!==n._size?Promise.reject(new Error("upload was configured with a size of ".concat(n._size," bytes, but the source is done after ").concat(l," bytes"))):a===null?n._sendRequest(r):((n.options.protocol===uf||n.options.protocol===xu)&&r.setHeader("Upload-Complete",u?"?1":"?0"),n._emitProgress(n._offset,n._size),n._sendRequest(r,a))})}},{key:"_handleUploadResponse",value:function(r,n){var i=Number.parseInt(n.getHeader("Upload-Offset"),10);if(Number.isNaN(i)){this._emitHttpError(r,n,"tus: invalid or missing offset value");return}if(this._emitProgress(i,this._size),this._emitChunkComplete(i-this._offset,i,this._size),this._offset=i,i===this._size){this._emitSuccess(n),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(r,n){var i=DS(r,n,this.options);return this._req=i,i}},{key:"_removeFromUrlStorage",value:function(){var r=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(n){r._emitError(n)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var r=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var n={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?n.parallelUploadUrls=this._parallelUploadUrls:n.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,n).then(function(i){r._urlStorageKey=i})}},{key:"_sendRequest",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return vS(r,n,this.options)}}],[{key:"terminate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=DS("DELETE",r,n);return vS(i,null,n).then(function(o){if(o.getStatus()!==204)throw new sf.default("tus: unexpected response while terminating upload",null,i,o)}).catch(function(o){if(o instanceof sf.default||(o=new sf.default("tus: failed to terminate upload",o,i,null)),!bS(o,0,n))throw o;var s=n.retryDelays[0],a=n.retryDelays.slice(1),u=ps(ps({},n),{},{retryDelays:a});return new Promise(function(c){return setTimeout(c,s)}).then(function(){return t.terminate(r,u)})})}}])}();function yS(t){return Object.entries(t).map(function(e){var r=_S(e,2),n=r[0],i=r[1];return"".concat(n," ").concat(f5.Base64.encode(String(i)))}).join(",")}function ms(t,e){return t>=e&&t<e+100}function DS(t,e,r){var n=r.httpStack.createRequest(t,e);r.protocol===uf?n.setHeader("Upload-Draft-Interop-Version","5"):r.protocol===xu?n.setHeader("Upload-Draft-Interop-Version","6"):n.setHeader("Tus-Resumable","1.0.0");for(var i=r.headers||{},o=0,s=Object.entries(i);o<s.length;o++){var a=_S(s[o],2),u=a[0],c=a[1];n.setHeader(u,c)}if(r.addRequestId){var l=(0,h5.default)();n.setHeader("X-Request-ID",l)}return n}function vS(t,e,r){return Ng.apply(this,arguments)}function Ng(){return Ng=p5(jg().mark(function t(e,r,n){var i;return jg().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(typeof n.onBeforeRequest!="function"){s.next=3;break}return s.next=3,n.onBeforeRequest(e);case 3:return s.next=5,e.send(r);case 5:if(i=s.sent,typeof n.onAfterResponse!="function"){s.next=9;break}return s.next=9,n.onAfterResponse(e,i);case 9:return s.abrupt("return",i);case 10:case"end":return s.stop()}},t)})),Ng.apply(this,arguments)}function C5(){var t=!0;return typeof navigator<"u"&&navigator.onLine===!1&&(t=!1),t}function bS(t,e,r){return r.retryDelays==null||e>=r.retryDelays.length||t.originalRequest==null?!1:r&&typeof r.onShouldRetry=="function"?r.onShouldRetry(t,e,r):xS(t)}function xS(t){var e=t.originalResponse?t.originalResponse.getStatus():0;return(!ms(e,400)||e===409||e===423)&&C5()}function wS(t,e){return new d5.default(e,t).toString()}function S5(t,e){for(var r=Math.floor(t/e),n=[],i=0;i<e;i++)n.push({start:r*i,end:r*(i+1)});return n[e-1].end=t,n}SS.defaultOptions=E5;var Pce=cf.default=SS});var AS=D(($ce,OS)=>{"use strict";var Gr=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Gr.writable=t=>Gr(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Gr.readable=t=>Gr(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Gr.duplex=t=>Gr.writable(t)&&Gr.readable(t);Gr.transform=t=>Gr.duplex(t)&&typeof t._transform=="function";OS.exports=Gr});var TS=D(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.default=void 0;function Fu(t){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(t)}function x5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,O5(n.key),n)}}function F5(t,e,r){return e&&kS(t.prototype,e),r&&kS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function O5(t){var e=A5(t,"string");return Fu(e)=="symbol"?e:e+""}function A5(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ice=lf.default=function(){function t(e){x5(this,t),this._buffer=e,this.size=e.length}return F5(t,[{key:"slice",value:function(r,n){var i=this._buffer.slice(r,n);i.size=i.length;var o=n>=this.size;return Promise.resolve({value:i,done:o})}},{key:"close",value:function(){}}])}()});var IS=D(Mg=>{"use strict";Object.defineProperty(Mg,"__esModule",{value:!0});Mg.default=I5;var $S=require("fs");function Bi(t){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(t)}function Bg(){"use strict";Bg=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&Bi(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(Bi(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function k5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P5(n.key),n)}}function T5(t,e,r){return e&&PS(t.prototype,e),r&&PS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function P5(t){var e=R5(t,"string");return Bi(e)=="symbol"?e:e+""}function R5(t,e){if(Bi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function RS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function $5(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){RS(o,n,i,s,a,"next",u)}function a(u){RS(o,n,i,s,a,"throw",u)}s(void 0)})}}function I5(t){return qg.apply(this,arguments)}function qg(){return qg=$5(Bg().mark(function t(e){var r,n,i,o,s,a,u;return Bg().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return n=e.path.toString(),l.next=3,$S.promises.stat(n);case 3:return i=l.sent,o=i.size,s=(r=e.start)!==null&&r!==void 0?r:0,a=Number.isFinite(e.end)?e.end+1:o,u=a-s,l.abrupt("return",new j5(e,n,u));case 9:case"end":return l.stop()}},t)})),qg.apply(this,arguments)}var j5=function(){function t(e,r,n){k5(this,t),this._stream=e,this._path=r,this.size=n}return T5(t,[{key:"slice",value:function(r,n){var i,o=(i=this._stream.start)!==null&&i!==void 0?i:0,s=(0,$S.createReadStream)(this._path,{start:o+r,end:o+n-1,autoClose:!0});s.size=Math.min(n-r,this.size);var a=s.size>=this.size;return Promise.resolve({value:s,done:a})}},{key:"close",value:function(){this._stream.destroy()}}])}()});var Vg=D(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.default=void 0;function qi(t){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qi(t)}function Ou(){"use strict";Ou=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(E,v,w){E[v]=w.value},o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(E,v,w){return Object.defineProperty(E,v,{value:w,enumerable:!0,configurable:!0,writable:!0}),E[v]}try{c({},"")}catch{c=function(w,O,j){return w[O]=j}}function l(E,v,w,O){var j=v&&v.prototype instanceof _?v:_,R=Object.create(j.prototype),M=new K(O||[]);return i(R,"_invoke",{value:I(E,w,M)}),R}function f(E,v,w){try{return{type:"normal",arg:E.call(v,w)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var h="suspendedStart",d="suspendedYield",m="executing",b="completed",y={};function _(){}function x(){}function g(){}var C={};c(C,s,function(){return this});var k=Object.getPrototypeOf,P=k&&k(k(V([])));P&&P!==r&&n.call(P,s)&&(C=P);var F=g.prototype=_.prototype=Object.create(C);function L(E){["next","throw","return"].forEach(function(v){c(E,v,function(w){return this._invoke(v,w)})})}function S(E,v){function w(j,R,M,T){var N=f(E[j],E,R);if(N.type!=="throw"){var ie=N.arg,oe=ie.value;return oe&&qi(oe)=="object"&&n.call(oe,"__await")?v.resolve(oe.__await).then(function(De){w("next",De,M,T)},function(De){w("throw",De,M,T)}):v.resolve(oe).then(function(De){ie.value=De,M(ie)},function(De){return w("throw",De,M,T)})}T(N.arg)}var O;i(this,"_invoke",{value:function(R,M){function T(){return new v(function(N,ie){w(R,M,N,ie)})}return O=O?O.then(T,T):T()}})}function I(E,v,w){var O=h;return function(j,R){if(O===m)throw Error("Generator is already running");if(O===b){if(j==="throw")throw R;return{value:t,done:!0}}for(w.method=j,w.arg=R;;){var M=w.delegate;if(M){var T=$(M,w);if(T){if(T===y)continue;return T}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O===h)throw O=b,w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O=m;var N=f(E,v,w);if(N.type==="normal"){if(O=w.done?b:d,N.arg===y)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O=b,w.method="throw",w.arg=N.arg)}}}function $(E,v){var w=v.method,O=E.iterator[w];if(O===t)return v.delegate=null,w==="throw"&&E.iterator.return&&(v.method="return",v.arg=t,$(E,v),v.method==="throw")||w!=="return"&&(v.method="throw",v.arg=new TypeError("The iterator does not provide a '"+w+"' method")),y;var j=f(O,E.iterator,v.arg);if(j.type==="throw")return v.method="throw",v.arg=j.arg,v.delegate=null,y;var R=j.arg;return R?R.done?(v[E.resultName]=R.value,v.next=E.nextLoc,v.method!=="return"&&(v.method="next",v.arg=t),v.delegate=null,y):R:(v.method="throw",v.arg=new TypeError("iterator result is not an object"),v.delegate=null,y)}function B(E){var v={tryLoc:E[0]};1 in E&&(v.catchLoc=E[1]),2 in E&&(v.finallyLoc=E[2],v.afterLoc=E[3]),this.tryEntries.push(v)}function q(E){var v=E.completion||{};v.type="normal",delete v.arg,E.completion=v}function K(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(B,this),this.reset(!0)}function V(E){if(E||E===""){var v=E[s];if(v)return v.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var w=-1,O=function j(){for(;++w<E.length;)if(n.call(E,w))return j.value=E[w],j.done=!1,j;return j.value=t,j.done=!0,j};return O.next=O}}throw new TypeError(qi(E)+" is not iterable")}return x.prototype=g,i(F,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:x,configurable:!0}),x.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(E){var v=typeof E=="function"&&E.constructor;return!!v&&(v===x||(v.displayName||v.name)==="GeneratorFunction")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,g):(E.__proto__=g,c(E,u,"GeneratorFunction")),E.prototype=Object.create(F),E},e.awrap=function(E){return{__await:E}},L(S.prototype),c(S.prototype,a,function(){return this}),e.AsyncIterator=S,e.async=function(E,v,w,O,j){j===void 0&&(j=Promise);var R=new S(l(E,v,w,O),j);return e.isGeneratorFunction(v)?R:R.next().then(function(M){return M.done?M.value:R.next()})},L(F),c(F,u,"Generator"),c(F,s,function(){return this}),c(F,"toString",function(){return"[object Generator]"}),e.keys=function(E){var v=Object(E),w=[];for(var O in v)w.push(O);return w.reverse(),function j(){for(;w.length;){var R=w.pop();if(R in v)return j.value=R,j.done=!1,j}return j.done=!0,j}},e.values=V,K.prototype={constructor:K,reset:function(v){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!v)for(var w in this)w.charAt(0)==="t"&&n.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=t)},stop:function(){this.done=!0;var v=this.tryEntries[0].completion;if(v.type==="throw")throw v.arg;return this.rval},dispatchException:function(v){if(this.done)throw v;var w=this;function O(ie,oe){return M.type="throw",M.arg=v,w.next=ie,oe&&(w.method="next",w.arg=t),!!oe}for(var j=this.tryEntries.length-1;j>=0;--j){var R=this.tryEntries[j],M=R.completion;if(R.tryLoc==="root")return O("end");if(R.tryLoc<=this.prev){var T=n.call(R,"catchLoc"),N=n.call(R,"finallyLoc");if(T&&N){if(this.prev<R.catchLoc)return O(R.catchLoc,!0);if(this.prev<R.finallyLoc)return O(R.finallyLoc)}else if(T){if(this.prev<R.catchLoc)return O(R.catchLoc,!0)}else{if(!N)throw Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return O(R.finallyLoc)}}}},abrupt:function(v,w){for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O];if(j.tryLoc<=this.prev&&n.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var R=j;break}}R&&(v==="break"||v==="continue")&&R.tryLoc<=w&&w<=R.finallyLoc&&(R=null);var M=R?R.completion:{};return M.type=v,M.arg=w,R?(this.method="next",this.next=R.finallyLoc,y):this.complete(M)},complete:function(v,w){if(v.type==="throw")throw v.arg;return v.type==="break"||v.type==="continue"?this.next=v.arg:v.type==="return"?(this.rval=this.arg=v.arg,this.method="return",this.next="end"):v.type==="normal"&&w&&(this.next=w),y},finish:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.finallyLoc===v)return this.complete(O.completion,O.afterLoc),q(O),y}},catch:function(v){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc===v){var j=O.completion;if(j.type==="throw"){var R=j.arg;q(O)}return R}}throw Error("illegal catch attempt")},delegateYield:function(v,w,O){return this.delegate={iterator:V(v),resultName:w,nextLoc:O},this.method==="next"&&(this.arg=t),y}},e}function N5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,B5(n.key),n)}}function L5(t,e,r){return e&&jS(t.prototype,e),r&&jS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function B5(t){var e=q5(t,"string");return qi(e)=="symbol"?e:e+""}function q5(t,e){if(qi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NS(t,e,r,n,i,o,s){try{var a=t[o](s),u=a.value}catch(c){r(c);return}a.done?e(u):Promise.resolve(u).then(n,i)}function LS(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function s(u){NS(o,n,i,s,a,"next",u)}function a(u){NS(o,n,i,s,a,"throw",u)}s(void 0)})}}function M5(t,e){return Ug.apply(this,arguments)}function Ug(){return Ug=LS(Ou().mark(function t(e,r){return Ou().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",new Promise(function(o,s){var a=function(l){e.off("readable",u),s(l)},u=function c(){var l=e.read(r);l!==null&&(e.off("error",a),e.off("readable",c),o(l))};e.once("error",a),e.on("readable",u)}));case 1:case"end":return i.stop()}},t)})),Ug.apply(this,arguments)}var Lce=ff.default=function(){function t(e){var r=this;N5(this,t),this._stream=e,this.size=null,this._buf=Buffer.alloc(0),this._bufPos=0,this._ended=!1,this._error=null,e.pause(),e.on("end",function(){r._ended=!0}),e.on("error",function(n){r._error=n})}return L5(t,[{key:"slice",value:function(){var e=LS(Ou().mark(function n(i,o){var s,a,u,c,l;return Ou().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!(i<this._bufPos)){h.next=2;break}throw new Error("cannot slice from position which we already seeked away");case 2:if(!(i>this._bufPos+this._buf.length)){h.next=4;break}throw new Error("slice start is outside of buffer (currently not implemented)");case 4:if(!this._error){h.next=6;break}throw this._error;case 6:if(i<this._bufPos+this._buf.length?(a=i-this._bufPos,u=Math.min(this._buf.length,o-this._bufPos),s=this._buf.slice(a,u)):s=Buffer.alloc(0),!this._ended){h.next=10;break}return s.size=s.length,h.abrupt("return",{value:s,done:!0});case 10:if(c=o-i,!(c>s.length)){h.next=16;break}return h.next=14,M5(this._stream,c-s.length);case 14:l=h.sent,s=Buffer.concat([s,l]);case 16:return this._buf=s,this._bufPos=i,s.size=s.length,h.abrupt("return",{value:s,done:this._ended});case 20:case"end":return h.stop()}},n,this)}));function r(n,i){return e.apply(this,arguments)}return r}()},{key:"close",value:function(){this._stream.destroy()}}])}()});var qS=D(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.default=void 0;var U5=require("fs"),V5=df(AS()),H5=df(TS()),z5=df(IS()),G5=df(Vg());function df(t){return t&&t.__esModule?t:{default:t}}function Au(t){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Au(t)}function W5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Y5(n.key),n)}}function K5(t,e,r){return e&&BS(t.prototype,e),r&&BS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y5(t){var e=J5(t,"string");return Au(e)=="symbol"?e:e+""}function J5(t,e){if(Au(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qce=hf.default=function(){function t(){W5(this,t)}return K5(t,[{key:"openFile",value:function(r,n){return Buffer.isBuffer(r)?Promise.resolve(new H5.default(r)):r instanceof U5.ReadStream&&r.path!=null?(0,z5.default)(r):V5.default.readable(r)?(n=Number(n),Number.isFinite(n)?Promise.resolve(new G5.default(r)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option; specify a chunkSize to control the memory consumption"))):Promise.reject(new Error("source object may only be an instance of Buffer or Readable in this environment"))}}])}()});var HS=D(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.default=Q5;var X5=require("crypto"),MS=VS(require("fs")),Z5=VS(require("path"));function US(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(US=function(n){return n?r:e})(t)}function VS(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=US(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function Q5(t,e){if(Buffer.isBuffer(t)){var r=65536,n=t.slice(0,Math.min(r,t.length)),i=(0,X5.createHash)("md5").update(n).digest("hex"),o=["node-buffer",i,t.length,e.endpoint].join("-");return Promise.resolve(o)}return t instanceof MS.ReadStream&&t.path!=null?new Promise(function(s,a){var u=Z5.resolve(t.path);MS.stat(t.path,function(c,l){if(c){a(c);return}var f=["node-file",u,l.size,l.mtime.getTime(),e.endpoint].join("-");s(f)})}):Promise.resolve(null)}});var YS=D((Vce,KS)=>{var WS="Expected a function",zS=NaN,e9="[object Symbol]",t9=/^\s+|\s+$/g,r9=/^[-+]0x[0-9a-f]+$/i,n9=/^0b[01]+$/i,i9=/^0o[0-7]+$/i,o9=parseInt,s9=typeof global=="object"&&global&&global.Object===Object&&global,a9=typeof self=="object"&&self&&self.Object===Object&&self,u9=s9||a9||Function("return this")(),c9=Object.prototype,l9=c9.toString,f9=Math.max,d9=Math.min,zg=function(){return u9.Date.now()};function h9(t,e,r){var n,i,o,s,a,u,c=0,l=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(WS);e=GS(e)||0,pf(r)&&(l=!!r.leading,f="maxWait"in r,o=f?f9(GS(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h);function d(P){var F=n,L=i;return n=i=void 0,c=P,s=t.apply(L,F),s}function m(P){return c=P,a=setTimeout(_,e),l?d(P):s}function b(P){var F=P-u,L=P-c,S=e-F;return f?d9(S,o-L):S}function y(P){var F=P-u,L=P-c;return u===void 0||F>=e||F<0||f&&L>=o}function _(){var P=zg();if(y(P))return x(P);a=setTimeout(_,b(P))}function x(P){return a=void 0,h&&n?d(P):(n=i=void 0,s)}function g(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function C(){return a===void 0?s:x(zg())}function k(){var P=zg(),F=y(P);if(n=arguments,i=this,u=P,F){if(a===void 0)return m(u);if(f)return a=setTimeout(_,e),d(u)}return a===void 0&&(a=setTimeout(_,e)),s}return k.cancel=g,k.flush=C,k}function p9(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(WS);return pf(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),h9(t,e,{leading:n,maxWait:e,trailing:i})}function pf(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function m9(t){return!!t&&typeof t=="object"}function g9(t){return typeof t=="symbol"||m9(t)&&l9.call(t)==e9}function GS(t){if(typeof t=="number")return t;if(g9(t))return zS;if(pf(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pf(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(t9,"");var r=n9.test(t);return r||i9.test(t)?o9(t.slice(2),r?2:8):r9.test(t)?zS:+t}KS.exports=p9});var i1=D(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.default=void 0;var y9=t1(require("http")),D9=t1(require("https")),ZS=require("stream"),v9=require("url"),QS=b9(YS());function b9(t){return t&&t.__esModule?t:{default:t}}function e1(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(e1=function(n){return n?r:e})(t)}function t1(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=e1(e);if(r&&r.has(t))return r.get(t);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,r&&r.set(t,n),n}function w9(t,e,r){return e=mf(e),_9(t,r1()?Reflect.construct(e,r||[],mf(t).constructor):e.apply(t,r))}function _9(t,e){if(e&&(gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E9(t)}function E9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r1(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r1=function(){return!!t})()}function mf(t){return mf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mf(t)}function C9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gg(t,e)}function Gg(t,e){return Gg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gg(t,e)}function JS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ku(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JS(Object(r),!0).forEach(function(n){S9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S9(t,e,r){return e=n1(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}function gf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XS(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n1(n.key),n)}}function yf(t,e,r){return e&&XS(t.prototype,e),r&&XS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function n1(t){var e=x9(t,"string");return gs(e)=="symbol"?e:e+""}function x9(t,e){if(gs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(gs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hce=Df.default=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gf(this,t),this._requestOptions=e}return yf(t,[{key:"createRequest",value:function(r,n){return new F9(r,n,this._requestOptions)}},{key:"getName",value:function(){return"NodeHttpStack"}}])}(),F9=function(){function t(e,r,n){gf(this,t),this._method=e,this._url=r,this._headers={},this._request=null,this._progressHandler=function(){},this._requestOptions=n||{}}return yf(t,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(r,n){this._headers[r]=n}},{key:"getHeader",value:function(r){return this._headers[r]}},{key:"setProgressHandler",value:function(r){this._progressHandler=r}},{key:"send",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(i,o){var s=ku(ku(ku({},(0,v9.parse)(r._url)),r._requestOptions),{},{method:r._method,headers:ku(ku({},r._requestOptions.headers||{}),r._headers)});n!=null&&n.size&&(s.headers["Content-Length"]=n.size);var a=s.protocol==="https:"?D9:y9;r._request=a.request(s);var u=r._request;u.on("response",function(c){var l=[];c.on("data",function(f){l.push(f)}),c.on("end",function(){var f=Buffer.concat(l).toString("utf8");i(new O9(c,f))})}),u.on("error",function(c){o(c)}),n instanceof ZS.Readable?n.pipe(new A9(r._progressHandler)).pipe(u):n instanceof Uint8Array?k9(u,n,r._progressHandler):u.end(n)})}},{key:"abort",value:function(){return this._request!==null&&this._request.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._request}}])}(),O9=function(){function t(e,r){gf(this,t),this._response=e,this._body=r}return yf(t,[{key:"getStatus",value:function(){return this._response.statusCode}},{key:"getHeader",value:function(r){return this._response.headers[r.toLowerCase()]}},{key:"getBody",value:function(){return this._body}},{key:"getUnderlyingObject",value:function(){return this._response}}])}(),A9=function(t){function e(r){var n;return gf(this,e),n=w9(this,e),n._onprogress=(0,QS.default)(r,100,{leading:!0,trailing:!1}),n._position=0,n}return C9(e,t),yf(e,[{key:"_transform",value:function(n,i,o){this._position+=n.length,this._onprogress(this._position),o(null,n)}}])}(ZS.Transform),k9=function(e,r,n){n=(0,QS.default)(n,100,{leading:!0,trailing:!1});var i=0;function o(){var s=Math.min(e.writableHighWaterMark,r.length-i),a=r.subarray(i,i+s);i+=a.length;var u=e.write(a);u?i<r.length?o():e.end():(e.once("drain",o),n(i))}o()}});var o1=D(Wg=>{"use strict";Wg.expectReceive=function(t,e,r){var n;r.root(t,e,r),n=this.message,t.hasOwnProperty("expected")&&(n+=" Expected "+t.expected+"."),t.hasOwnProperty("received")&&(n+=" Received: "+t.received+"."),this.message=n};Wg.root=function(t,e,r){var n=this,i,o={stackLength:Error.stackTraceLimit,rootOnly:!0},s="",a=Error.stackTraceLimit,u;function c(){u[0]=n.toString(),n.stack=u.join(`
31
31
  `)}(!e||typeof e!="object")&&(e={}),e.hasOwnProperty("stackLength")&&typeof e.stackLength=="number"&&!isNaN(e.stackLength)&&e.stackLength>=0&&(o.stackLength=e.stackLength),e.hasOwnProperty("rootOnly")||(o.rootOnly=e.rootOnly),(!o.rootOnly||this.CustomError.parent===Error)&&(Object.keys(t).forEach(function(l){switch(l){case"code":i=t.code||void 0;break;case"message":s=t.message||"";break;default:n[l]=t[l]}}),Error.stackTraceLimit=o.stackLength+2,u=new Error().stack.split(`
32
32
  `),u.splice(0,3),u.unshift(""),Error.stackTraceLimit=a,this.stack=u.join(`
33
33
  `),Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,get:function(){return i},set:function(l){i=l,c()}}),Object.defineProperty(this,"message",{configurable:!0,enumerable:!0,get:function(){return s},set:function(l){s=l,c()}}),c())}});var u1=D((Wce,a1)=>{"use strict";a1.exports=Mi;Mi.factory=o1();var Jg=Mi("CustomError");Jg.order=Mi(Jg,{message:"Arguments out of order.",code:"EOARG"});function Mi(t,e,r,n){var i,o;return e=vf(arguments,1,Error,s1,[Kg,bf]),r=vf(arguments,2,{},Kg,[bf]),n=vf(arguments,3,Yg,bf,[]),t=vf(arguments,0,e===Error?"Error":e.prototype.CustomError.name,T9,[s1,Kg,bf]),o=e===Error,o&&n===Yg&&(n=Mi.factory.root),i=function(s,a){var u,c,l,f,h,d;if(!(this instanceof i))return new i(s,a);for(delete this.constructor.name,Object.defineProperty(this.constructor,"name",{enumerable:!1,configurable:!0,value:t,writable:!1}),typeof s=="string"&&(s={message:s}),s||(s={}),c=this.CustomError.chain.slice(0).reverse().map(function(m){return m.properties}),c.push(s),c.unshift({}),d=Object.assign.apply(Object,c),u=this,l={},Object.keys(Mi.factory).forEach(function(m){l[m]=function(b,y){Mi.factory[m].call(u,b,y,l)}}),f=this.CustomError.chain.length-1;f>=0;f--)h=this.CustomError.chain[f],h.factory!==Yg&&h.factory.call(this,d,a,l)},i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype.name=t,i.prototype.CustomError={chain:o?[]:e.prototype.CustomError.chain.slice(0),factory:n,name:t,parent:e,properties:r},i.prototype.CustomError.chain.unshift(i.prototype.CustomError),i.prototype.toString=function(){var s=this.CustomError.chain[this.CustomError.chain.length-1].name;return this.code&&(s+=" "+this.code),this.message&&(s+=": "+this.message),s},i}function vf(t,e,r,n,i){var o=-1,s=-1,a,u,c=e<t.length?e:t.length,l;for(a=0;a<=c;a++){if(l=t[a],o===-1)for(u=0;u<i.length;u++)i[u](l)&&(o=a);s===-1&&n(l)&&(s=a)}if(s!==-1&&o!==-1&&o<s)throw new Jg.order;return s!==-1?t[s]:r}function bf(t){return typeof t=="function"&&t!==Error&&!t.prototype.CustomError}function T9(t){return typeof t=="string"}function s1(t){return typeof t=="function"&&(t===Error||t.prototype.CustomError)}function Kg(t){return t&&typeof t=="object"}function Yg(){}});var l1=D((Kce,c1)=>{c1.exports=u1()});var m1=D((Ui,ys)=>{var P9=1/0,R9="[object Symbol]",Tu={function:!0,object:!0},$9=Tu[typeof Ui]&&Ui&&!Ui.nodeType?Ui:void 0,I9=Tu[typeof ys]&&ys&&!ys.nodeType?ys:void 0,j9=wf($9&&I9&&typeof global=="object"&&global),N9=wf(Tu[typeof self]&&self),f1=wf(Tu[typeof window]&&window),Xg=wf(Tu[typeof Ui]&&Ui),L9=j9||f1!==(Xg&&Xg.window)&&f1||N9||Xg||Function("return this")();function wf(t){return t&&t.Object===Object?t:null}var B9=Object.prototype,q9=B9.toString,d1=L9.Symbol,h1=d1?d1.prototype:void 0,p1=h1?h1.toString:void 0;function M9(t){if(typeof t=="string")return t;if(V9(t))return p1?p1.call(t):"";var e=t+"";return e=="0"&&1/t==-P9?"-0":e}function U9(t){return!!t&&typeof t=="object"}function V9(t){return typeof t=="symbol"||U9(t)&&q9.call(t)==R9}ys.exports=M9});var _1=D((Vi,Ds)=>{var H9=m1(),z9="Expected a function",y1="__lodash_hash_undefined__",G9="[object Function]",W9="[object GeneratorFunction]",K9=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,Y9=/[\\^$.*+?()[\]{}|]/g,J9=/\\(\\)?/g,X9=/^\[object .+?Constructor\]$/,Ru={function:!0,object:!0},Z9=Ru[typeof Vi]&&Vi&&!Vi.nodeType?Vi:void 0,Q9=Ru[typeof Ds]&&Ds&&!Ds.nodeType?Ds:void 0,e7=_f(Z9&&Q9&&typeof global=="object"&&global),t7=_f(Ru[typeof self]&&self),g1=_f(Ru[typeof window]&&window),Zg=_f(Ru[typeof Vi]&&Vi),r7=e7||g1!==(Zg&&Zg.window)&&g1||t7||Zg||Function("return this")();function _f(t){return t&&t.Object===Object?t:null}function n7(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var i7=Array.prototype,D1=Object.prototype,v1=Function.prototype.toString,Qg=D1.hasOwnProperty,o7=D1.toString,s7=RegExp("^"+v1.call(Qg).replace(Y9,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),a7=i7.splice,u7=b1(r7,"Map"),Pu=b1(Object,"create");function Hi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function c7(){this.__data__=Pu?Pu(null):{}}function l7(t){return this.has(t)&&delete this.__data__[t]}function f7(t){var e=this.__data__;if(Pu){var r=e[t];return r===y1?void 0:r}return Qg.call(e,t)?e[t]:void 0}function d7(t){var e=this.__data__;return Pu?e[t]!==void 0:Qg.call(e,t)}function h7(t,e){var r=this.__data__;return r[t]=Pu&&e===void 0?y1:e,this}Hi.prototype.clear=c7;Hi.prototype.delete=l7;Hi.prototype.get=f7;Hi.prototype.has=d7;Hi.prototype.set=h7;function vs(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function p7(){this.__data__=[]}function m7(t){var e=this.__data__,r=Ef(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():a7.call(e,r,1),!0}function g7(t){var e=this.__data__,r=Ef(e,t);return r<0?void 0:e[r][1]}function y7(t){return Ef(this.__data__,t)>-1}function D7(t,e){var r=this.__data__,n=Ef(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}vs.prototype.clear=p7;vs.prototype.delete=m7;vs.prototype.get=g7;vs.prototype.has=y7;vs.prototype.set=D7;function zi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function v7(){this.__data__={hash:new Hi,map:new(u7||vs),string:new Hi}}function b7(t){return Cf(this,t).delete(t)}function w7(t){return Cf(this,t).get(t)}function _7(t){return Cf(this,t).has(t)}function E7(t,e){return Cf(this,t).set(t,e),this}zi.prototype.clear=v7;zi.prototype.delete=b7;zi.prototype.get=w7;zi.prototype.has=_7;zi.prototype.set=E7;function Ef(t,e){for(var r=t.length;r--;)if(F7(t[r][0],e))return r;return-1}function Cf(t,e){var r=t.__data__;return C7(e)?r[typeof e=="string"?"string":"hash"]:r.map}function b1(t,e){var r=t[e];return A7(r)?r:void 0}function C7(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var S7=ey(function(t){var e=[];return k7(t).replace(K9,function(r,n,i,o){e.push(i?o.replace(J9,"$1"):n||r)}),e});function x7(t){if(t!=null){try{return v1.call(t)}catch{}try{return t+""}catch{}}return""}function ey(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(z9);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(ey.Cache||zi),r}ey.Cache=zi;function F7(t,e){return t===e||t!==t&&e!==e}function O7(t){var e=w1(t)?o7.call(t):"";return e==G9||e==W9}function w1(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function A7(t){if(!w1(t))return!1;var e=O7(t)||n7(t)?s7:X9;return e.test(x7(t))}function k7(t){return t==null?"":H9(t)}Ds.exports=S7});var Z1=D((Gi,ws)=>{var T7=_1(),P7=200,fy="__lodash_hash_undefined__",Af=1,_s=2,R7=1/0,O1=9007199254740991,Sf="[object Arguments]",ny="[object Array]",A1="[object Boolean]",k1="[object Date]",T1="[object Error]",P1="[object Function]",$7="[object GeneratorFunction]",$u="[object Map]",R1="[object Number]",bs="[object Object]",E1="[object Promise]",$1="[object RegExp]",Iu="[object Set]",dy="[object String]",I1="[object Symbol]",iy="[object WeakMap]",j1="[object ArrayBuffer]",xf="[object DataView]",I7="[object Float32Array]",j7="[object Float64Array]",N7="[object Int8Array]",L7="[object Int16Array]",B7="[object Int32Array]",q7="[object Uint8Array]",M7="[object Uint8ClampedArray]",U7="[object Uint16Array]",V7="[object Uint32Array]",H7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z7=/^\w*$/,G7=/[\\^$.*+?()[\]{}|]/g,W7=/^\[object .+?Constructor\]$/,K7=/^(?:0|[1-9]\d*)$/,Re={};Re[I7]=Re[j7]=Re[N7]=Re[L7]=Re[B7]=Re[q7]=Re[M7]=Re[U7]=Re[V7]=!0;Re[Sf]=Re[ny]=Re[j1]=Re[A1]=Re[xf]=Re[k1]=Re[T1]=Re[P1]=Re[$u]=Re[R1]=Re[bs]=Re[$1]=Re[Iu]=Re[dy]=Re[iy]=!1;var Nu={function:!0,object:!0},Y7=Nu[typeof Gi]&&Gi&&!Gi.nodeType?Gi:void 0,J7=Nu[typeof ws]&&ws&&!ws.nodeType?ws:void 0,X7=kf(Y7&&J7&&typeof global=="object"&&global),Z7=kf(Nu[typeof self]&&self),C1=kf(Nu[typeof window]&&window),ty=kf(Nu[typeof Gi]&&Gi),Yi=X7||C1!==(ty&&ty.window)&&C1||Z7||ty||Function("return this")();function Q7(t,e){for(var r=-1,n=t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function eV(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function tV(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function rV(t,e){return Q7(e,function(r){return[r,t[r]]})}function kf(t){return t&&t.Object===Object?t:null}function oy(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function N1(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}function nV(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}function iV(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=[n,n]}),r}var oV=Array.prototype,Tf=Object.prototype,L1=Function.prototype.toString,Wi=Tf.hasOwnProperty,Ji=Tf.toString,sV=RegExp("^"+L1.call(Wi).replace(G7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S1=Yi.Symbol,x1=Yi.Uint8Array,aV=Tf.propertyIsEnumerable,uV=oV.splice,cV=Object.getPrototypeOf,lV=Object.keys,sy=Es(Yi,"DataView"),Ff=Es(Yi,"Map"),ay=Es(Yi,"Promise"),uy=Es(Yi,"Set"),cy=Es(Yi,"WeakMap"),ju=Es(Object,"create"),fV=Zi(sy),dV=Zi(Ff),hV=Zi(ay),pV=Zi(uy),mV=Zi(cy),F1=S1?S1.prototype:void 0,ry=F1?F1.valueOf:void 0;function Ki(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function gV(){this.__data__=ju?ju(null):{}}function yV(t){return this.has(t)&&delete this.__data__[t]}function DV(t){var e=this.__data__;if(ju){var r=e[t];return r===fy?void 0:r}return Wi.call(e,t)?e[t]:void 0}function vV(t){var e=this.__data__;return ju?e[t]!==void 0:Wi.call(e,t)}function bV(t,e){var r=this.__data__;return r[t]=ju&&e===void 0?fy:e,this}Ki.prototype.clear=gV;Ki.prototype.delete=yV;Ki.prototype.get=DV;Ki.prototype.has=vV;Ki.prototype.set=bV;function _n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function wV(){this.__data__=[]}function _V(t){var e=this.__data__,r=Pf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():uV.call(e,r,1),!0}function EV(t){var e=this.__data__,r=Pf(e,t);return r<0?void 0:e[r][1]}function CV(t){return Pf(this.__data__,t)>-1}function SV(t,e){var r=this.__data__,n=Pf(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}_n.prototype.clear=wV;_n.prototype.delete=_V;_n.prototype.get=EV;_n.prototype.has=CV;_n.prototype.set=SV;function Xi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function xV(){this.__data__={hash:new Ki,map:new(Ff||_n),string:new Ki}}function FV(t){return Rf(this,t).delete(t)}function OV(t){return Rf(this,t).get(t)}function AV(t){return Rf(this,t).has(t)}function kV(t,e){return Rf(this,t).set(t,e),this}Xi.prototype.clear=xV;Xi.prototype.delete=FV;Xi.prototype.get=OV;Xi.prototype.has=AV;Xi.prototype.set=kV;function Of(t){var e=-1,r=t?t.length:0;for(this.__data__=new Xi;++e<r;)this.add(t[e])}function TV(t){return this.__data__.set(t,fy),this}function PV(t){return this.__data__.has(t)}Of.prototype.add=Of.prototype.push=TV;Of.prototype.has=PV;function wn(t){this.__data__=new _n(t)}function RV(){this.__data__=new _n}function $V(t){return this.__data__.delete(t)}function IV(t){return this.__data__.get(t)}function jV(t){return this.__data__.has(t)}function NV(t,e){var r=this.__data__;return r instanceof _n&&r.__data__.length==P7&&(r=this.__data__=new Xi(r.__data__)),r.set(t,e),this}wn.prototype.clear=RV;wn.prototype.delete=$V;wn.prototype.get=IV;wn.prototype.has=jV;wn.prototype.set=NV;function Pf(t,e){for(var r=t.length;r--;)if(rH(t[r][0],e))return r;return-1}function B1(t,e){e=$f(e,t)?[e]:U1(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[If(e[r++])];return r&&r==n?t:void 0}function q1(t,e){return Wi.call(t,e)||typeof t=="object"&&e in t&&XV(t)===null}function LV(t,e){return e in Object(t)}function hy(t,e,r,n,i){return t===e?!0:t==null||e==null||!Nf(t)&&!Lu(e)?t!==t&&e!==e:BV(t,e,hy,r,n,i)}function BV(t,e,r,n,i,o){var s=ri(t),a=ri(e),u=ny,c=ny;s||(u=bn(t),u=u==Sf?bs:u),a||(c=bn(e),c=c==Sf?bs:c);var l=u==bs&&!oy(t),f=c==bs&&!oy(e),h=u==c;if(h&&!l)return o||(o=new wn),s||oH(t)?V1(t,e,r,n,i,o):WV(t,e,u,r,n,i,o);if(!(i&_s)){var d=l&&Wi.call(t,"__wrapped__"),m=f&&Wi.call(e,"__wrapped__");if(d||m){var b=d?t.value():t,y=m?e.value():e;return o||(o=new wn),r(b,y,n,i,o)}}return h?(o||(o=new wn),KV(t,e,r,n,i,o)):!1}function qV(t,e,r,n){var i=r.length,o=i,s=!n;if(t==null)return!o;for(t=Object(t);i--;){var a=r[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=r[i];var u=a[0],c=t[u],l=a[1];if(s&&a[2]){if(c===void 0&&!(u in t))return!1}else{var f=new wn;if(n)var h=n(c,l,u,t,e,f);if(!(h===void 0?hy(l,c,n,Af|_s,f):h))return!1}}return!0}function MV(t){return typeof t=="function"?t:t==null?cH:typeof t=="object"?ri(t)?HV(t[0],t[1]):VV(t):lH(t)}function UV(t){return lV(Object(t))}function VV(t){var e=JV(t);return e.length==1&&e[0][2]?G1(e[0][0],e[0][1]):function(r){return r===t||qV(r,t,e)}}function HV(t,e){return $f(t)&&z1(e)?G1(If(t),e):function(r){var n=sH(r,t);return n===void 0&&n===e?aH(r,t):hy(e,n,void 0,Af|_s)}}function M1(t){return function(e){return e?.[t]}}function zV(t){return function(e){return B1(e,t)}}function U1(t){return ri(t)?t:T7(t)}function GV(t){return function(e){var r=bn(e);return r==$u?N1(e):r==Iu?iV(e):rV(e,t(e))}}function V1(t,e,r,n,i,o){var s=i&_s,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(t);if(c)return c==e;var l=-1,f=!0,h=i&Af?new Of:void 0;for(o.set(t,e);++l<a;){var d=t[l],m=e[l];if(n)var b=s?n(m,d,l,e,t,o):n(d,m,l,t,e,o);if(b!==void 0){if(b)continue;f=!1;break}if(h){if(!eV(e,function(y,_){if(!h.has(_)&&(d===y||r(d,y,n,i,o)))return h.add(_)})){f=!1;break}}else if(!(d===m||r(d,m,n,i,o))){f=!1;break}}return o.delete(t),f}function WV(t,e,r,n,i,o,s){switch(r){case xf:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case j1:return!(t.byteLength!=e.byteLength||!n(new x1(t),new x1(e)));case A1:case k1:return+t==+e;case T1:return t.name==e.name&&t.message==e.message;case R1:return t!=+t?e!=+e:t==+e;case $1:case dy:return t==e+"";case $u:var a=N1;case Iu:var u=o&_s;if(a||(a=nV),t.size!=e.size&&!u)return!1;var c=s.get(t);return c?c==e:(o|=Af,s.set(t,e),V1(a(t),a(e),n,i,o,s));case I1:if(ry)return ry.call(t)==ry.call(e)}return!1}function KV(t,e,r,n,i,o){var s=i&_s,a=ly(t),u=a.length,c=ly(e),l=c.length;if(u!=l&&!s)return!1;for(var f=u;f--;){var h=a[f];if(!(s?h in e:q1(e,h)))return!1}var d=o.get(t);if(d)return d==e;var m=!0;o.set(t,e);for(var b=s;++f<u;){h=a[f];var y=t[h],_=e[h];if(n)var x=s?n(_,y,h,e,t,o):n(y,_,h,t,e,o);if(!(x===void 0?y===_||r(y,_,n,i,o):x)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var g=t.constructor,C=e.constructor;g!=C&&"constructor"in t&&"constructor"in e&&!(typeof g=="function"&&g instanceof g&&typeof C=="function"&&C instanceof C)&&(m=!1)}return o.delete(t),m}var YV=M1("length");function Rf(t,e){var r=t.__data__;return eH(e)?r[typeof e=="string"?"string":"hash"]:r.map}function JV(t){for(var e=uH(t),r=e.length;r--;)e[r][2]=z1(e[r][1]);return e}function Es(t,e){var r=t[e];return iH(r)?r:void 0}function XV(t){return cV(Object(t))}function bn(t){return Ji.call(t)}(sy&&bn(new sy(new ArrayBuffer(1)))!=xf||Ff&&bn(new Ff)!=$u||ay&&bn(ay.resolve())!=E1||uy&&bn(new uy)!=Iu||cy&&bn(new cy)!=iy)&&(bn=function(t){var e=Ji.call(t),r=e==bs?t.constructor:void 0,n=r?Zi(r):void 0;if(n)switch(n){case fV:return xf;case dV:return $u;case hV:return E1;case pV:return Iu;case mV:return iy}return e});function ZV(t,e,r){e=$f(e,t)?[e]:U1(e);for(var n,i=-1,s=e.length;++i<s;){var o=If(e[i]);if(!(n=t!=null&&r(t,o)))break;t=t[o]}if(n)return n;var s=t?t.length:0;return!!s&&jf(s)&&H1(o,s)&&(ri(t)||J1(t)||W1(t))}function QV(t){var e=t?t.length:void 0;return jf(e)&&(ri(t)||J1(t)||W1(t))?tV(e,String):null}function H1(t,e){return e=e??O1,!!e&&(typeof t=="number"||K7.test(t))&&t>-1&&t%1==0&&t<e}function $f(t,e){if(ri(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||X1(t)?!0:z7.test(t)||!H7.test(t)||e!=null&&t in Object(e)}function eH(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function tH(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Tf;return t===r}function z1(t){return t===t&&!Nf(t)}function G1(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function If(t){if(typeof t=="string"||X1(t))return t;var e=t+"";return e=="0"&&1/t==-R7?"-0":e}function Zi(t){if(t!=null){try{return L1.call(t)}catch{}try{return t+""}catch{}}return""}function rH(t,e){return t===e||t!==t&&e!==e}function W1(t){return nH(t)&&Wi.call(t,"callee")&&(!aV.call(t,"callee")||Ji.call(t)==Sf)}var ri=Array.isArray;function K1(t){return t!=null&&jf(YV(t))&&!Y1(t)}function nH(t){return Lu(t)&&K1(t)}function Y1(t){var e=Nf(t)?Ji.call(t):"";return e==P1||e==$7}function jf(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=O1}function Nf(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Lu(t){return!!t&&typeof t=="object"}function iH(t){if(!Nf(t))return!1;var e=Y1(t)||oy(t)?sV:W7;return e.test(Zi(t))}function J1(t){return typeof t=="string"||!ri(t)&&Lu(t)&&Ji.call(t)==dy}function X1(t){return typeof t=="symbol"||Lu(t)&&Ji.call(t)==I1}function oH(t){return Lu(t)&&jf(t.length)&&!!Re[Ji.call(t)]}function sH(t,e,r){var n=t==null?void 0:B1(t,e);return n===void 0?r:n}function aH(t,e){return t!=null&&ZV(t,e,LV)}function ly(t){var e=tH(t);if(!(e||K1(t)))return UV(t);var r=QV(t),n=!!r,i=r||[],o=i.length;for(var s in t)q1(t,s)&&!(n&&(s=="length"||H1(s,o)))&&!(e&&s=="constructor")&&i.push(s);return i}var uH=GV(ly);function cH(t){return t}function lH(t){return $f(t)?M1(If(t)):zV(t)}ws.exports=MV});var nx=D((Qi,Cs)=>{var fH=1/0,dH="[object Function]",hH="[object GeneratorFunction]",pH=/[\\^$.*+?()[\]{}|]/g,mH=/^\[object .+?Constructor\]$/,Bu={function:!0,object:!0},gH=Bu[typeof Qi]&&Qi&&!Qi.nodeType?Qi:void 0,yH=Bu[typeof Cs]&&Cs&&!Cs.nodeType?Cs:void 0,DH=Lf(gH&&yH&&typeof global=="object"&&global),vH=Lf(Bu[typeof self]&&self),Q1=Lf(Bu[typeof window]&&window),py=Lf(Bu[typeof Qi]&&Qi),bH=DH||Q1!==(py&&py.window)&&Q1||vH||py||Function("return this")();function Lf(t){return t&&t.Object===Object?t:null}function wH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function _H(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var ex=Object.prototype,tx=Function.prototype.toString,EH=ex.hasOwnProperty,CH=ex.toString,SH=RegExp("^"+tx.call(EH).replace(pH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),my=FH(bH,"Set"),xH=my&&1/_H(new my([,-0]))[1]==fH?function(t){return new my(t)}:TH;function FH(t,e){var r=t[e];return kH(r)?r:void 0}function OH(t){if(t!=null){try{return tx.call(t)}catch{}try{return t+""}catch{}}return""}function AH(t){var e=rx(t)?CH.call(t):"";return e==dH||e==hH}function rx(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function kH(t){if(!rx(t))return!1;var e=AH(t)||wH(t)?SH:mH;return e.test(OH(t))}function TH(){}Cs.exports=xH});var ox=D((eo,Ss)=>{var qu={function:!0,object:!0},PH=qu[typeof eo]&&eo&&!eo.nodeType?eo:void 0,RH=qu[typeof Ss]&&Ss&&!Ss.nodeType?Ss:void 0,$H=Bf(PH&&RH&&typeof global=="object"&&global),IH=Bf(qu[typeof self]&&self),ix=Bf(qu[typeof window]&&window),gy=Bf(qu[typeof eo]&&eo),jH=$H||ix!==(gy&&gy.window)&&ix||IH||gy||Function("return this")();function Bf(t){return t&&t.Object===Object?t:null}Ss.exports=jH});var fx=D((Yce,lx)=>{var NH=nx(),LH=ox(),BH=200,yy="__lodash_hash_undefined__",qH="[object Function]",MH="[object GeneratorFunction]",UH=/[\\^$.*+?()[\]{}|]/g,VH=/^\[object .+?Constructor\]$/;function HH(t,e){return!!t.length&&GH(t,e,0)>-1}function zH(t,e,r){for(var n=-1,i=t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function GH(t,e,r){if(e!==e)return KH(t,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function WH(t,e){return t.has(e)}function KH(t,e,r){for(var n=t.length,i=e+(r?0:-1);r?i--:++i<n;){var o=t[i];if(o!==o)return i}return-1}function YH(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function JH(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var XH=Array.prototype,sx=Object.prototype,ax=Function.prototype.toString,Dy=sx.hasOwnProperty,ZH=sx.toString,QH=RegExp("^"+ax.call(Dy).replace(UH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ez=XH.splice,tz=ux(LH,"Map"),Mu=ux(Object,"create");function to(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rz(){this.__data__=Mu?Mu(null):{}}function nz(t){return this.has(t)&&delete this.__data__[t]}function iz(t){var e=this.__data__;if(Mu){var r=e[t];return r===yy?void 0:r}return Dy.call(e,t)?e[t]:void 0}function oz(t){var e=this.__data__;return Mu?e[t]!==void 0:Dy.call(e,t)}function sz(t,e){var r=this.__data__;return r[t]=Mu&&e===void 0?yy:e,this}to.prototype.clear=rz;to.prototype.delete=nz;to.prototype.get=iz;to.prototype.has=oz;to.prototype.set=sz;function xs(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function az(){this.__data__=[]}function uz(t){var e=this.__data__,r=Mf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ez.call(e,r,1),!0}function cz(t){var e=this.__data__,r=Mf(e,t);return r<0?void 0:e[r][1]}function lz(t){return Mf(this.__data__,t)>-1}function fz(t,e){var r=this.__data__,n=Mf(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}xs.prototype.clear=az;xs.prototype.delete=uz;xs.prototype.get=cz;xs.prototype.has=lz;xs.prototype.set=fz;function Fs(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dz(){this.__data__={hash:new to,map:new(tz||xs),string:new to}}function hz(t){return Uf(this,t).delete(t)}function pz(t){return Uf(this,t).get(t)}function mz(t){return Uf(this,t).has(t)}function gz(t,e){return Uf(this,t).set(t,e),this}Fs.prototype.clear=dz;Fs.prototype.delete=hz;Fs.prototype.get=pz;Fs.prototype.has=mz;Fs.prototype.set=gz;function qf(t){var e=-1,r=t?t.length:0;for(this.__data__=new Fs;++e<r;)this.add(t[e])}function yz(t){return this.__data__.set(t,yy),this}function Dz(t){return this.__data__.has(t)}qf.prototype.add=qf.prototype.push=yz;qf.prototype.has=Dz;function Mf(t,e){for(var r=t.length;r--;)if(_z(t[r][0],e))return r;return-1}function vz(t,e,r){var n=-1,i=HH,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=zH;else if(o>=BH){var c=e?null:NH(t);if(c)return JH(c);s=!1,i=WH,u=new qf}else u=e?[]:a;e:for(;++n<o;){var l=t[n],f=e?e(l):l;if(l=r||l!==0?l:0,s&&f===f){for(var h=u.length;h--;)if(u[h]===f)continue e;e&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function Uf(t,e){var r=t.__data__;return bz(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ux(t,e){var r=t[e];return Cz(r)?r:void 0}function bz(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function wz(t){if(t!=null){try{return ax.call(t)}catch{}try{return t+""}catch{}}return""}function _z(t,e){return t===e||t!==t&&e!==e}function Ez(t){var e=cx(t)?ZH.call(t):"";return e==qH||e==MH}function cx(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Cz(t){if(!cx(t))return!1;var e=Ez(t)||YH(t)?QH:VH;return e.test(wz(t))}lx.exports=vz});var hx=D((Jce,dx)=>{var Sz=Z1(),xz=fx();function Fz(t,e){return t&&t.length?xz(t,Sz(e)):[]}dx.exports=Fz});var mx=D((Xce,px)=>{"use strict";var Oz=l1(),Az=hx(),kz=Oz("MultiError");px.exports=vy;function vy(t){if(!(this instanceof vy))return new vy(t);if(t=Array.isArray(t)?t:[t],t=Az(t,function(r){return r.stack}),t.length===1)return t[0];var e=new kz({message:t.map(function(r){return r.message}).join("; "),errors:t.reduce(function(r,n){return r.concat(n.errors||n)},[])});return e.__defineGetter__("stack",function(){return t.map(function(r){return r.stack}).join(`
@@ -201,7 +201,7 @@ GFS4: `),console.error(t)});We[_t]||(tj=global[_t]||[],nj(We,tj),We.close=functi
201
201
  `;function lj(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(o,s,a){var u=t[o];u&&Array.isArray(u)?u.forEach(function(c){n+=ba(o+"[]")+i+ba(c)+`
202
202
  `}):u&&typeof u=="object"?r.push(o):n+=ba(o)+i+ba(u)+Iv}),e.section&&n.length&&(n="["+ba(e.section)+"]"+Iv+n),r.forEach(function(o,s,a){var u=fj(o).join("\\."),c=(e.section?e.section+".":"")+u,l=lj(t[o],{section:c,whitespace:e.whitespace});n.length&&l.length&&(n+=Iv),n+=l}),n}function fj(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function fie(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=t.split(/[\r\n]+/g);return o.forEach(function(s,a,u){if(!(!s||s.match(/^\s*[;#]/))){var c=s.match(i);if(c){if(c[1]!==void 0){if(n=bh(c[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var l=bh(c[2]);if(l!=="__proto__"){var f=c[3]?bh(c[4]):!0;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(l.length>2&&l.slice(-2)==="[]"){if(l=l.substring(0,l.length-2),l==="__proto__")return;r[l]?Array.isArray(r[l])||(r[l]=[r[l]]):r[l]=[]}Array.isArray(r[l])?r[l].push(f):r[l]=f}}}}),Object.keys(e).filter(function(s,a,u){if(!e[s]||typeof e[s]!="object"||Array.isArray(e[s]))return!1;var c=fj(s),l=e,f=c.pop(),h=f.replace(/\\\./g,".");return c.forEach(function(d,m,b){d!=="__proto__"&&((!l[d]||typeof l[d]!="object")&&(l[d]={}),l=l[d])}),l===e&&h===f?!1:(l[h]=e[s],!0)}).forEach(function(s,a,u){delete e[s]}),e}function dj(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function ba(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&dj(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function bh(t,e){if(t=(t||"").trim(),dj(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,o=t.length;i<o;i++){var s=t.charAt(i);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return t}});var yj=D((jn,gj)=>{var pj=cj(),Pc=require("path"),wh=require("fs"),jv=hj(),Nv=require("events").EventEmitter,die=require("url"),hie=require("http"),jn=gj.exports=function(){for(var t=[].slice.call(arguments),e=new Ot;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?mie(r):r)}return e},Fpe=jn.find=function(){var t=Pc.join.apply(null,[].slice.call(arguments));function e(r,n){var i=Pc.join(r,n);try{return wh.statSync(i),i}catch{if(Pc.dirname(r)!==r)return e(Pc.dirname(r),n)}}return e(__dirname,t)},pie=jn.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return jv.parse(t);else try{return JSON.parse(t)}catch{return jv.parse(t)}},mie=jn.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=Pc.join.apply(null,t),r;try{r=wh.readFileSync(e,"utf-8")}catch{return}return pie(r,e,"json")},Ope=jn.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)i.indexOf(t)===0&&(r[i.substring(n)]=e[i]);return r};jn.ConfigChain=Ot;function Ot(){Nv.apply(this),pj.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var mj={constructor:{value:Ot}};Object.keys(Nv.prototype).forEach(function(t){mj[t]=Object.getOwnPropertyDescriptor(Nv.prototype,t)});Ot.prototype=Object.create(pj.prototype,mj);Ot.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][t];return this};Ot.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};Ot.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};Ot.prototype.save=function(t,o,r){typeof o=="function"&&(r=o,o=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[i+a]=n.data[a]}),this}var o=o||n.type,s=n.data;return n.type==="json"?s=JSON.stringify(s):s=jv.stringify(s),this._saving++,wh.writeFile(n.path,s,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};Ot.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),wh.readFile(t,"utf8",function(i,o){i&&this.emit("error",i),this.addString(o,t,e,n)}.bind(this)),this};Ot.prototype.addEnv=function(t,e,r){r=r||"env";var n=jn.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};Ot.prototype.addUrl=function(t,e,r){this._await();var n=die.format(t);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:e},this.push(i),hie.request(t,function(o){var s=[],a=o.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=e),o.on("data",s.push.bind(s)).on("end",function(){this.addString(Buffer.concat(s),n,e,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};Ot.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};Ot.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};Ot.prototype.parse=jn.parse;Ot.prototype._await=function(){this._awaiting++};Ot.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var vj=D((Ape,Dj)=>{Dj.exports=function(t){let e=t.indexOf(":");if(e===-1)return Lv(t);let r=t.substr(0,e),n=t.substr(e+1);return`${Lv(r)}:${Lv(n)}`};function Lv(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var bj=D(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.envReplace=void 0;var gie=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function yie(t,e){return t.replace(gie,Die.bind(null,e))}_h.envReplace=yie;function Die(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let i=bie(t,n);if(i===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${i}`}var vie=/([^:-]+)(:?)-(.+)/;function bie(t,e){let r=e.match(vie);if(!r)return t[e];let[,n,i,o]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&i?o:t[n]:o}});var wj=D(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});Eh.envReplace=void 0;var wie=bj();Object.defineProperty(Eh,"envReplace",{enumerable:!0,get:function(){return wie.envReplace}})});var _j=D(Rc=>{"use strict";var _ie=require("fs"),Ao=require("path"),{envReplace:Bv}=wj(),Eie=t=>typeof t!="string"?t:Bv(t,process.env),Cie=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),i=n.indexOf(Ao)!==-1,o=n.indexOf(Boolean)!==-1,s=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(o&&!s&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=Bv(e,process.env),i&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=Ao.resolve(process.env.HOME,e.substr(2))),e=Ao.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},Sie=t=>{t=Ao.resolve(t);let e=!1;for(;Ao.basename(t)==="node_modules";)t=Ao.dirname(t),e=!0;if(e)return t;let r=(n,i)=>{let o=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&o.test(n))return i;try{let s=_ie.readdirSync(n);if(s.includes("node_modules")||s.includes("package.json")||s.includes("package.json5")||s.includes("package.yaml")||s.includes("pnpm-workspace.yaml"))return n;let a=Ao.dirname(n);return a===n?i:r(a,i)}catch(s){if(n===i){if(s.code==="ENOENT")return i;throw s}return i}};return r(t,t)};Rc.envReplace=Bv;Rc.findPrefix=Sie;Rc.parseField=Cie;Rc.parseKey=Eie});var Sj=D(Cj=>{"use strict";var ko=require("path"),xie=require("stream").Stream,Ch=require("url"),Fie=()=>{},Oie=()=>[],Ej=()=>{};Cj.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:ko,cache:ko,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:ko,"global-style":Boolean,group:[Number,String],"https-proxy":[null,Ch],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":ko,"init-author-name":String,"init-author-email":String,"init-author-url":["",Ch],"init-license":String,"init-version":Ej,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":Oie(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:xie,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,Ej],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:ko,production:Boolean,progress:Boolean,proxy:[null,!1,Ch],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,Ch],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:ko,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:ko,umask:Fie,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var Oj=D(($pe,Fj)=>{"use strict";var{readCAFileSync:Aie}=sj(),xj=require("fs"),qv=require("path"),{ConfigChain:kie}=yj(),Tie=vj(),Mv=_j(),Uv=class extends kie{constructor(e,r){super(e),this.root=e,this._parseField=Mv.parseField.bind(null,r||Sj())}add(e,r){try{for(let[n,i]of Object.entries(e)){let o=Mv.parseKey(n);o!==n&&delete e[n],e[o]=this._parseField(i,o)}}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let i=xj.readFileSync(e,"utf8");this.addString(i,e,"ini",n)}catch(i){if(i.code==="ENOENT")this.add({},n);else if(i.code!=="EISDIR")return`Issue while reading "${e}". ${i.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{if(!e[n])return;let i=Tie(n.substr(11)),o=e[n];r[i]=Pie(i,o)}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let i=this.get("global");this[i?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>qv.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=qv.resolve(e.prefix);else try{r=Mv.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=Aie(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=qv.resolve(this.get("prefix"));try{let n=xj.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};function Pie(t,e){function r(n){let i=`
203
203
 
204
- `;return n.indexOf(i)?n.split(i):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}Fj.exports=Uv});var $j=D(Rj=>{"use strict";var Tj=require("os"),Nn=require("path"),Pj=Tj.tmpdir(),Rie=process.getuid?process.getuid():process.pid,$ie=()=>!0,Aj=process.platform==="win32",kj={editor:()=>process.env.EDITOR||process.env.VISUAL||(Aj?"notepad.exe":"vi"),shell:()=>Aj?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},Iie={fromString:()=>process.umask()},wa=Tj.homedir();wa?process.env.HOME=wa:wa=Nn.resolve(Pj,"npm-"+Rie);var jie=process.platform==="win32"?"npm-cache":".npm",Nie=process.platform==="win32"&&process.env.APPDATA||wa,Lie=Nn.resolve(Nie,jie),Sh,To;Object.defineProperty(Rj,"defaults",{get:function(){return Sh||(process.env.PREFIX?To=process.env.PREFIX:process.platform==="win32"?To=Nn.dirname(process.execPath):(To=Nn.dirname(Nn.dirname(process.execPath)),process.env.DESTDIR&&(To=Nn.join(process.env.DESTDIR,To))),Sh={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:Lie,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:kj.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Nn.resolve(To,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Nn.resolve(wa,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:To,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:kj.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:Pj,unicode:$ie(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Nn.resolve(wa,".npmrc"),umask:process.umask?process.umask():Iie.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Sh)}})});var jj=D((jpe,Vv)=>{"use strict";var Po=require("path"),Bie=Oj(),Ij=$j();Vv.exports=(t,e,r)=>{let n=new Bie(Object.assign({},Ij.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let c=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:c.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(Po.resolve(Po.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=Po.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let c=Po.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(c,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let c=Po.resolve(n.get("prefix"),"etc");n.root.globalconfig=Po.resolve(c,"npmrc"),n.root.globalignorefile=Po.resolve(c,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Vv.exports,"defaults",{get(){return Ij.defaults},enumerable:!0})});var Hj=D((Npe,Vj)=>{var Hv=require("url"),Nj=jj(),Lj=":_authToken",Bj=":_auth",qj=":username",Mj=":_password";Vj.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:Nj()).config,e=e||r.npmrc.get("registry")||Nj.defaults.registry,Uj(e,r)||qie(r.npmrc)};function Uj(t,e){let r=Hv.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=Uie(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:Uj(Hv.resolve(t,"."),e);r.pathname=Hv.resolve(Mie(n),"..")||"/"}}function qie(t){return t.get("_auth")?{token:xh(t.get("_auth")),type:"Basic"}:void 0}function Mie(t){return t[t.length-1]==="/"?t:t+"/"}function Uie(t,e){let r=Vie(e.get(t+Lj)||e.get(t+"/"+Lj));if(r)return r;let n=e.get(t+qj)||e.get(t+"/"+qj),i=e.get(t+Mj)||e.get(t+"/"+Mj),o=Hie(n,i);if(o)return o;let s=zie(e.get(t+Bj)||e.get(t+"/"+Bj));if(s)return s}function xh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Vie(t){return t?{token:xh(t),type:"Bearer"}:void 0}function Hie(t,e){if(!t||!e)return;let r=Buffer.from(xh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function zie(t){return t?{token:xh(t),type:"Basic"}:void 0}});var H8=D((W0e,Vn)=>{var ot=require("fs"),xb=require("os"),cr=require("path"),A8=require("crypto"),fn={fs:ot.constants,os:xb.constants},k8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",P8=/XXXXXX/,joe=3,R8=(fn.O_CREAT||fn.fs.O_CREAT)|(fn.O_EXCL||fn.fs.O_EXCL)|(fn.O_RDWR||fn.fs.O_RDWR),Noe=xb.platform()==="win32",Loe=fn.EBADF||fn.os.errno.EBADF,Boe=fn.ENOENT||fn.os.errno.ENOENT,$8=448,I8=384,qoe="exit",Ta=[],j8=ot.rmdirSync.bind(ot),N8=!1;function Moe(t,e){return ot.rm(t,{recursive:!0},e)}function L8(t){return ot.rmSync(t,{recursive:!0})}function Fb(t,e){let r=Pa(t,e),n=r[0],i=r[1];try{M8(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=q8(n);ot.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Ob(t){let e=Pa(t),r=e[0];M8(r);let n=r.tries;do{let i=q8(r);try{ot.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Uoe(t,e){let r=Pa(t,e),n=r[0],i=r[1];Fb(n,function(s,a){if(s)return i(s);ot.open(a,R8,n.mode||I8,function(c,l){if(c)return i(c);if(n.discardDescriptor)return ot.close(l,function(h){return i(h,a,void 0,Eb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,l,Eb(a,f?-1:l,n,!1))}})})}function Voe(t){let e=Pa(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Ob(r);var o=ot.openSync(i,R8,r.mode||I8);return r.discardDescriptor&&(ot.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:Eb(i,n?-1:o,r,!0)}}function Hoe(t,e){let r=Pa(t,e),n=r[0],i=r[1];Fb(n,function(s,a){if(s)return i(s);ot.mkdir(a,n.mode||$8,function(c){if(c)return i(c);i(null,a,B8(a,n,!1))})})}function zoe(t){let e=Pa(t),r=e[0],n=Ob(r);return ot.mkdirSync(n,r.mode||$8),{name:n,removeCallback:B8(n,r,!0)}}function Goe(t,e){let r=function(n){if(n&&!Sb(n))return e(n);e()};0<=t[0]?ot.close(t[0],function(){ot.unlink(t[1],r)}):ot.unlink(t[1],r)}function Woe(t){let e=null;try{0<=t[0]&&ot.closeSync(t[0])}catch(r){if(!Joe(r)&&!Sb(r))throw r}finally{try{ot.unlinkSync(t[1])}catch(r){Sb(r)||(e=r)}}if(e!==null)throw e}function Eb(t,e,r,n){let i=Kh(Woe,[e,t],n),o=Kh(Goe,[e,t],n,i);return r.keep||Ta.unshift(i),n?i:o}function B8(t,e,r){let n=e.unsafeCleanup?Moe:ot.rmdir.bind(ot),i=e.unsafeCleanup?L8:j8,o=Kh(i,t,r),s=Kh(n,t,r,o);return e.keep||Ta.unshift(o),r?o:s}function Kh(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=Ta.indexOf(a);return u>=0&&Ta.splice(u,1),i=!0,r||t===j8||t===L8?t(e):t(e,s||function(){})}}}function Koe(){if(N8)for(;Ta.length;)try{Ta[0]()}catch{}}function T8(t){let e=[],r=null;try{r=A8.randomBytes(t)}catch{r=A8.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(k8[r[n]%k8.length]);return e.join("")}function Yoe(t){return t===null||Qt(t)||!t.trim()}function Qt(t){return typeof t>"u"}function Pa(t,e){if(typeof t=="function")return[{},t];if(Qt(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function q8(t){let e=t.tmpdir;if(!Qt(t.name))return cr.join(e,t.dir,t.name);if(!Qt(t.template))return cr.join(e,t.dir,t.template).replace(P8,T8(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",T8(12),t.postfix?"-"+t.postfix:""].join("");return cr.join(e,t.dir,r)}function M8(t){t.tmpdir=V8(t);let e=t.tmpdir;if(Qt(t.name)||_b(t.name,"name",e),Qt(t.dir)||_b(t.dir,"dir",e),!Qt(t.template)&&(_b(t.template,"template",e),!t.template.match(P8)))throw new Error(`Invalid template, found "${t.template}".`);if(!Qt(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Qt(t.name)?t.tries||joe:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=Qt(t.dir)?"":cr.relative(e,Cb(t.dir,e)),t.template=Qt(t.template)?void 0:cr.relative(e,Cb(t.template,e)),t.template=Yoe(t.template)?void 0:cr.relative(t.dir,t.template),t.name=Qt(t.name)?void 0:t.name,t.prefix=Qt(t.prefix)?"":t.prefix,t.postfix=Qt(t.postfix)?"":t.postfix}function Cb(t,e){return t.startsWith(e)?cr.resolve(t):cr.resolve(cr.join(e,t))}function _b(t,e,r){if(e==="name"){if(cr.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=cr.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(cr.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=Cb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function Joe(t){return U8(t,-Loe,"EBADF")}function Sb(t){return U8(t,-Boe,"ENOENT")}function U8(t,e,r){return Noe?t.code===r:t.code===r&&t.errno===e}function Xoe(){N8=!0}function V8(t){return cr.resolve(t&&t.tmpdir||xb.tmpdir())}process.addListener(qoe,Koe);Object.defineProperty(Vn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return V8()}});Vn.exports.dir=Hoe;Vn.exports.dirSync=zoe;Vn.exports.file=Uoe;Vn.exports.fileSync=Voe;Vn.exports.tmpName=Fb;Vn.exports.tmpNameSync=Ob;Vn.exports.setGracefulCleanup=Xoe});var Wb=ue(Gb(),1),{program:A,createCommand:xse,createArgument:Fse,createOption:Ose,CommanderError:Ase,InvalidArgumentError:kse,InvalidOptionArgumentError:Tse,Command:Pse,Argument:Rse,Option:$se,Help:Ise}=Wb.default;var Rr={name:"@capgo/cli",version:"4.34.5",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^4.1.1","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^7.0.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.9.1","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.48.1","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.7","@types/node":"^22.13.0","@types/prettyjson":"^0.0.33","@types/semver":"7.5.8","@types/tmp":"^0.2.6","@typescript-eslint/eslint-plugin":"^8.22.0","@typescript-eslint/parser":"^8.22.0","@vercel/ncc":"^0.38.3","adm-zip":"^0.5.16","ci-info":"^4.1.0",commander:"13.0.0",esbuild:"^0.24.2",eslint:"9.18.0","git-format-staged":"3.1.1",husky:"^9.1.7","is-wsl":"^3.1.0",ky:"^1.7.4","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.3",tmp:"^0.2.3","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.3.1",typescript:"5.7.3"}};var _a=require("node:fs"),Wj=require("node:process");var Ct=ue(Te(),1),Mo=require("node:process"),zn=ue(require("node:readline"),1),wp=ue(require("node:readline"),1),iw=require("node:tty"),ow=ue(Dp(),1);function TN({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var PN=TN();function sw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(PN,"")}function aw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uw={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],f=e.length(l);if(a>=i-(f==2?1:0))if(a+f<=o)s+=l;else break;a+=f}return s}})(uw);var RN=uw.exports,$N=aw(RN),IN=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},jN=aw(IN);function ja(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=sw(t),t.length===0))return 0;t=t.replace(jN()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch($N.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var vp=10,Xb=(t=0)=>e=>`\x1B[${e+t}m`,Zb=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Qb=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ne={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ne.modifier);var NN=Object.keys(Ne.color),LN=Object.keys(Ne.bgColor);[...NN,...LN];function BN(){let t=new Map;for(let[e,r]of Object.entries(Ne)){for(let[n,i]of Object.entries(r))Ne[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ne[n],t.set(i[0],i[1]);Object.defineProperty(Ne,e,{value:r,enumerable:!1})}return Object.defineProperty(Ne,"codes",{value:t,enumerable:!1}),Ne.color.close="\x1B[39m",Ne.bgColor.close="\x1B[49m",Ne.color.ansi=Xb(),Ne.color.ansi256=Zb(),Ne.color.ansi16m=Qb(),Ne.bgColor.ansi=Xb(vp),Ne.bgColor.ansi256=Zb(vp),Ne.bgColor.ansi16m=Qb(vp),Object.defineProperties(Ne,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ne.rgbToAnsi256(...Ne.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ne.ansi256ToAnsi(Ne.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ne.ansi256ToAnsi(Ne.hexToAnsi256(e)),enumerable:!1}}),Ne}var qN=BN(),ol=new Set(["\x1B","\x9B"]),MN=39,Ep="\x07",cw="[",UN="]",lw="m",Cp=`${UN}8;;`,ew=t=>`${ol.values().next().value}${cw}${t}${lw}`,tw=t=>`${ol.values().next().value}${Cp}${t}${Ep}`,VN=t=>t.split(" ").map(e=>ja(e)),bp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=ja(sw(t[t.length-1]));for(let[a,u]of n.entries()){let c=ja(u);if(s+c<=r?t[t.length-1]+=u:(t.push(u),s=0),ol.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(Cp)),i){o?u===Ep&&(i=!1,o=!1):u===lw&&(i=!1);continue}s+=c,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},HN=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(ja(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},zN=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=VN(t),a=[""];for(let[c,l]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=ja(a[a.length-1]);if(c!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[c]>e){let h=e-f,d=1+Math.floor((s[c]-h-1)/e);Math.floor((s[c]-1)/e)<d&&a.push(""),bp(a,l,e);continue}if(f+s[c]>e&&f>0&&s[c]>0){if(r.wordWrap===!1&&f<e){bp(a,l,e);continue}a.push("")}if(f+s[c]>e&&r.wordWrap===!1){bp(a,l,e);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>HN(c)));let u=[...a.join(`
204
+ `;return n.indexOf(i)?n.split(i):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}Fj.exports=Uv});var $j=D(Rj=>{"use strict";var Tj=require("os"),Nn=require("path"),Pj=Tj.tmpdir(),Rie=process.getuid?process.getuid():process.pid,$ie=()=>!0,Aj=process.platform==="win32",kj={editor:()=>process.env.EDITOR||process.env.VISUAL||(Aj?"notepad.exe":"vi"),shell:()=>Aj?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},Iie={fromString:()=>process.umask()},wa=Tj.homedir();wa?process.env.HOME=wa:wa=Nn.resolve(Pj,"npm-"+Rie);var jie=process.platform==="win32"?"npm-cache":".npm",Nie=process.platform==="win32"&&process.env.APPDATA||wa,Lie=Nn.resolve(Nie,jie),Sh,To;Object.defineProperty(Rj,"defaults",{get:function(){return Sh||(process.env.PREFIX?To=process.env.PREFIX:process.platform==="win32"?To=Nn.dirname(process.execPath):(To=Nn.dirname(Nn.dirname(process.execPath)),process.env.DESTDIR&&(To=Nn.join(process.env.DESTDIR,To))),Sh={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:Lie,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:kj.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:Nn.resolve(To,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":Nn.resolve(wa,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:To,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:kj.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:Pj,unicode:$ie(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:Nn.resolve(wa,".npmrc"),umask:process.umask?process.umask():Iie.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},Sh)}})});var jj=D((jpe,Vv)=>{"use strict";var Po=require("path"),Bie=Oj(),Ij=$j();Vv.exports=(t,e,r)=>{let n=new Bie(Object.assign({},Ij.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let c=require.resolve.paths("npm"),l;try{l=require.resolve("npm",{paths:c.slice(-1)})}catch{o=!0}l&&i.push(n.addFile(Po.resolve(Po.dirname(l),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=Po.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let c=Po.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(c,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let c=Po.resolve(n.get("prefix"),"etc");n.root.globalconfig=Po.resolve(c,"npmrc"),n.root.globalignorefile=Po.resolve(c,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Vv.exports,"defaults",{get(){return Ij.defaults},enumerable:!0})});var Hj=D((Npe,Vj)=>{var Hv=require("url"),Nj=jj(),Lj=":_authToken",Bj=":_auth",qj=":username",Mj=":_password";Vj.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:Nj()).config,e=e||r.npmrc.get("registry")||Nj.defaults.registry,Uj(e,r)||qie(r.npmrc)};function Uj(t,e){let r=Hv.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=Uie(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:Uj(Hv.resolve(t,"."),e);r.pathname=Hv.resolve(Mie(n),"..")||"/"}}function qie(t){return t.get("_auth")?{token:xh(t.get("_auth")),type:"Basic"}:void 0}function Mie(t){return t[t.length-1]==="/"?t:t+"/"}function Uie(t,e){let r=Vie(e.get(t+Lj)||e.get(t+"/"+Lj));if(r)return r;let n=e.get(t+qj)||e.get(t+"/"+qj),i=e.get(t+Mj)||e.get(t+"/"+Mj),o=Hie(n,i);if(o)return o;let s=zie(e.get(t+Bj)||e.get(t+"/"+Bj));if(s)return s}function xh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Vie(t){return t?{token:xh(t),type:"Bearer"}:void 0}function Hie(t,e){if(!t||!e)return;let r=Buffer.from(xh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function zie(t){return t?{token:xh(t),type:"Basic"}:void 0}});var H8=D((W0e,Vn)=>{var ot=require("fs"),xb=require("os"),cr=require("path"),A8=require("crypto"),fn={fs:ot.constants,os:xb.constants},k8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",P8=/XXXXXX/,joe=3,R8=(fn.O_CREAT||fn.fs.O_CREAT)|(fn.O_EXCL||fn.fs.O_EXCL)|(fn.O_RDWR||fn.fs.O_RDWR),Noe=xb.platform()==="win32",Loe=fn.EBADF||fn.os.errno.EBADF,Boe=fn.ENOENT||fn.os.errno.ENOENT,$8=448,I8=384,qoe="exit",Ta=[],j8=ot.rmdirSync.bind(ot),N8=!1;function Moe(t,e){return ot.rm(t,{recursive:!0},e)}function L8(t){return ot.rmSync(t,{recursive:!0})}function Fb(t,e){let r=Pa(t,e),n=r[0],i=r[1];try{M8(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=q8(n);ot.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Ob(t){let e=Pa(t),r=e[0];M8(r);let n=r.tries;do{let i=q8(r);try{ot.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Uoe(t,e){let r=Pa(t,e),n=r[0],i=r[1];Fb(n,function(s,a){if(s)return i(s);ot.open(a,R8,n.mode||I8,function(c,l){if(c)return i(c);if(n.discardDescriptor)return ot.close(l,function(h){return i(h,a,void 0,Eb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,l,Eb(a,f?-1:l,n,!1))}})})}function Voe(t){let e=Pa(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Ob(r);var o=ot.openSync(i,R8,r.mode||I8);return r.discardDescriptor&&(ot.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:Eb(i,n?-1:o,r,!0)}}function Hoe(t,e){let r=Pa(t,e),n=r[0],i=r[1];Fb(n,function(s,a){if(s)return i(s);ot.mkdir(a,n.mode||$8,function(c){if(c)return i(c);i(null,a,B8(a,n,!1))})})}function zoe(t){let e=Pa(t),r=e[0],n=Ob(r);return ot.mkdirSync(n,r.mode||$8),{name:n,removeCallback:B8(n,r,!0)}}function Goe(t,e){let r=function(n){if(n&&!Sb(n))return e(n);e()};0<=t[0]?ot.close(t[0],function(){ot.unlink(t[1],r)}):ot.unlink(t[1],r)}function Woe(t){let e=null;try{0<=t[0]&&ot.closeSync(t[0])}catch(r){if(!Joe(r)&&!Sb(r))throw r}finally{try{ot.unlinkSync(t[1])}catch(r){Sb(r)||(e=r)}}if(e!==null)throw e}function Eb(t,e,r,n){let i=Kh(Woe,[e,t],n),o=Kh(Goe,[e,t],n,i);return r.keep||Ta.unshift(i),n?i:o}function B8(t,e,r){let n=e.unsafeCleanup?Moe:ot.rmdir.bind(ot),i=e.unsafeCleanup?L8:j8,o=Kh(i,t,r),s=Kh(n,t,r,o);return e.keep||Ta.unshift(o),r?o:s}function Kh(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=Ta.indexOf(a);return u>=0&&Ta.splice(u,1),i=!0,r||t===j8||t===L8?t(e):t(e,s||function(){})}}}function Koe(){if(N8)for(;Ta.length;)try{Ta[0]()}catch{}}function T8(t){let e=[],r=null;try{r=A8.randomBytes(t)}catch{r=A8.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(k8[r[n]%k8.length]);return e.join("")}function Yoe(t){return t===null||Qt(t)||!t.trim()}function Qt(t){return typeof t>"u"}function Pa(t,e){if(typeof t=="function")return[{},t];if(Qt(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function q8(t){let e=t.tmpdir;if(!Qt(t.name))return cr.join(e,t.dir,t.name);if(!Qt(t.template))return cr.join(e,t.dir,t.template).replace(P8,T8(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",T8(12),t.postfix?"-"+t.postfix:""].join("");return cr.join(e,t.dir,r)}function M8(t){t.tmpdir=V8(t);let e=t.tmpdir;if(Qt(t.name)||_b(t.name,"name",e),Qt(t.dir)||_b(t.dir,"dir",e),!Qt(t.template)&&(_b(t.template,"template",e),!t.template.match(P8)))throw new Error(`Invalid template, found "${t.template}".`);if(!Qt(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Qt(t.name)?t.tries||joe:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=Qt(t.dir)?"":cr.relative(e,Cb(t.dir,e)),t.template=Qt(t.template)?void 0:cr.relative(e,Cb(t.template,e)),t.template=Yoe(t.template)?void 0:cr.relative(t.dir,t.template),t.name=Qt(t.name)?void 0:t.name,t.prefix=Qt(t.prefix)?"":t.prefix,t.postfix=Qt(t.postfix)?"":t.postfix}function Cb(t,e){return t.startsWith(e)?cr.resolve(t):cr.resolve(cr.join(e,t))}function _b(t,e,r){if(e==="name"){if(cr.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=cr.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(cr.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=Cb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function Joe(t){return U8(t,-Loe,"EBADF")}function Sb(t){return U8(t,-Boe,"ENOENT")}function U8(t,e,r){return Noe?t.code===r:t.code===r&&t.errno===e}function Xoe(){N8=!0}function V8(t){return cr.resolve(t&&t.tmpdir||xb.tmpdir())}process.addListener(qoe,Koe);Object.defineProperty(Vn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return V8()}});Vn.exports.dir=Hoe;Vn.exports.dirSync=zoe;Vn.exports.file=Uoe;Vn.exports.fileSync=Voe;Vn.exports.tmpName=Fb;Vn.exports.tmpNameSync=Ob;Vn.exports.setGracefulCleanup=Xoe});var Wb=ue(Gb(),1),{program:A,createCommand:xse,createArgument:Fse,createOption:Ose,CommanderError:Ase,InvalidArgumentError:kse,InvalidOptionArgumentError:Tse,Command:Pse,Argument:Rse,Option:$se,Help:Ise}=Wb.default;var Rr={name:"@capgo/cli",version:"4.34.6",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^4.1.1","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^7.0.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.9.1","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.48.1","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.7","@types/node":"^22.13.0","@types/prettyjson":"^0.0.33","@types/semver":"7.5.8","@types/tmp":"^0.2.6","@vercel/ncc":"^0.38.3","adm-zip":"^0.5.16","ci-info":"^4.1.0",commander:"13.0.0",esbuild:"^0.24.2",eslint:"9.18.0","git-format-staged":"3.1.1",husky:"^9.1.7","is-wsl":"^3.1.0",ky:"^1.7.4","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.6.3",tmp:"^0.2.3","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.3.1",typescript:"5.7.3"}};var _a=require("node:fs"),Wj=require("node:process");var Ct=ue(Te(),1),Mo=require("node:process"),zn=ue(require("node:readline"),1),wp=ue(require("node:readline"),1),iw=require("node:tty"),ow=ue(Dp(),1);function TN({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var PN=TN();function sw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(PN,"")}function aw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uw={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),c=0;c<u.length;c++){var l=u[c],f=e.length(l);if(a>=i-(f==2?1:0))if(a+f<=o)s+=l;else break;a+=f}return s}})(uw);var RN=uw.exports,$N=aw(RN),IN=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},jN=aw(IN);function ja(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=sw(t),t.length===0))return 0;t=t.replace(jN()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch($N.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var vp=10,Xb=(t=0)=>e=>`\x1B[${e+t}m`,Zb=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Qb=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ne={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ne.modifier);var NN=Object.keys(Ne.color),LN=Object.keys(Ne.bgColor);[...NN,...LN];function BN(){let t=new Map;for(let[e,r]of Object.entries(Ne)){for(let[n,i]of Object.entries(r))Ne[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ne[n],t.set(i[0],i[1]);Object.defineProperty(Ne,e,{value:r,enumerable:!1})}return Object.defineProperty(Ne,"codes",{value:t,enumerable:!1}),Ne.color.close="\x1B[39m",Ne.bgColor.close="\x1B[49m",Ne.color.ansi=Xb(),Ne.color.ansi256=Zb(),Ne.color.ansi16m=Qb(),Ne.bgColor.ansi=Xb(vp),Ne.bgColor.ansi256=Zb(vp),Ne.bgColor.ansi16m=Qb(vp),Object.defineProperties(Ne,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ne.rgbToAnsi256(...Ne.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ne.ansi256ToAnsi(Ne.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ne.ansi256ToAnsi(Ne.hexToAnsi256(e)),enumerable:!1}}),Ne}var qN=BN(),ol=new Set(["\x1B","\x9B"]),MN=39,Ep="\x07",cw="[",UN="]",lw="m",Cp=`${UN}8;;`,ew=t=>`${ol.values().next().value}${cw}${t}${lw}`,tw=t=>`${ol.values().next().value}${Cp}${t}${Ep}`,VN=t=>t.split(" ").map(e=>ja(e)),bp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=ja(sw(t[t.length-1]));for(let[a,u]of n.entries()){let c=ja(u);if(s+c<=r?t[t.length-1]+=u:(t.push(u),s=0),ol.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(Cp)),i){o?u===Ep&&(i=!1,o=!1):u===lw&&(i=!1);continue}s+=c,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},HN=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(ja(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},zN=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=VN(t),a=[""];for(let[c,l]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=ja(a[a.length-1]);if(c!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[c]>e){let h=e-f,d=1+Math.floor((s[c]-h-1)/e);Math.floor((s[c]-1)/e)<d&&a.push(""),bp(a,l,e);continue}if(f+s[c]>e&&f>0&&s[c]>0){if(r.wordWrap===!1&&f<e){bp(a,l,e);continue}a.push("")}if(f+s[c]>e&&r.wordWrap===!1){bp(a,l,e);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>HN(c)));let u=[...a.join(`
205
205
  `)];for(let[c,l]of u.entries()){if(n+=l,ol.has(l)){let{groups:h}=new RegExp(`(?:\\${cw}(?<code>\\d+)m|\\${Cp}(?<uri>.*)${Ep})`).exec(u.slice(c).join(""))||{groups:{}};if(h.code!==void 0){let d=Number.parseFloat(h.code);i=d===MN?void 0:d}else h.uri!==void 0&&(o=h.uri.length===0?void 0:h.uri)}let f=qN.codes.get(Number(i));u[c+1]===`
206
206
  `?(o&&(n+=tw("")),i&&f&&(n+=ew(f))):l===`
207
207
  `&&(i&&f&&(n+=ew(i)),o&&(n+=tw(o)))}return n};function rw(t,e,r){return String(t).normalize().replace(/\r\n/g,`
@@ -246,7 +246,7 @@ ${H.default.gray(Uo)} ${t}
246
246
  `);let _=a.split(`
247
247
  `);process.stdout.write(sl.cursor.move(-999,_.length-1)),process.stdout.write(sl.erase.down(_.length))},m=_=>_.replace(/\.+$/,""),b=(_="")=>{o=!0,n=fw(),s=m(_),process.stdout.write(`${H.default.gray(Ke)}
248
248
  `);let x=0,g=0;f(),i=setInterval(()=>{if(r&&s===a)return;d(),a=s;let C=H.default.magenta(t[x]),k=r?"...":".".repeat(Math.floor(g)).slice(0,3);process.stdout.write(`${C} ${s}${k}`),x=x+1<t.length?x+1:0,g=g<t.length?g+.125:0},e)},y=(_="",x=0)=>{o=!1,clearInterval(i),d();let g=x===0?H.default.green(Ap):x===1?H.default.red(dw):H.default.red(hw);s=m(_??s),process.stdout.write(`${g} ${s}
249
- `),h(),n()};return{start:b,stop:y,message:(_="")=>{s=m(_??s)}}};var et=require("node:fs"),lh=require("node:os"),Qe=ue(require("node:path")),Nt=require("node:process"),sn=ue(cl());var Dn=require("fs"),Ba=(t=".",e="unknown")=>{let r=`${t}/bun.lockb`,n=`${t}/pnpm-lock.yaml`,i=`${t}/yarn.lock`,o=`${t}/package-lock.json`;return(0,Dn.existsSync)(r)?"bun":(0,Dn.existsSync)(n)?"pnpm":(0,Dn.existsSync)(i)?"yarn":(0,Dn.existsSync)(o)?"npm":e},ll=(t=Ba(),e=!1)=>{switch(t){case"bun":return e?"bun install":"install";case"pnpm":return e?"pnpm install":"install";case"yarn":return e?"yarn install":"install";case"npm":return e?"npm install":"install";case"unknown":return e?"unknown unknown":"unknown";default:return e?"npm install":"install"}},pw=(t=".",e="npx")=>{let r=`${t}/bun.lockb`,n=`${t}/pnpm-lock.yaml`,i=`${t}/yarn.lock`,o=`${t}/package-lock.json`;return(0,Dn.existsSync)(r)?"bunx":(0,Dn.existsSync)(n)?"pnpm exec":(0,Dn.existsSync)(i)?"yarn dlx":(0,Dn.existsSync)(o)?"npx":e};var ca=ue(f_()),sI=ue(Du()),bv=ue(oC());var ei=class extends Error{response;request;options;constructor(e,r,n){let i=e.status||e.status===0?e.status:"",o=e.statusText||"",s=`${i} ${o}`.trim(),a=s?`status code ${s}`:"an unknown error";super(`Request failed with ${a}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}};var cs=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}};var ls=t=>t!==null&&typeof t=="object";var bu=(...t)=>{for(let e of t)if((!ls(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Dg({},...t)},gg=(t={},e={})=>{let r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(let[o,s]of i.entries())n&&s==="undefined"||s===void 0?r.delete(o):r.set(o,s);return r};function Jl(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:Dg(t[r]??[],e[r]??[])}var yg=(t={},e={})=>({beforeRequest:Jl(t,e,"beforeRequest"),beforeRetry:Jl(t,e,"beforeRetry"),afterResponse:Jl(t,e,"afterResponse"),beforeError:Jl(t,e,"beforeError")}),Dg=(...t)=>{let e={},r={},n={};for(let i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(ls(i)){for(let[o,s]of Object.entries(i))ls(s)&&o in e&&(s=Dg(e[o],s)),e={...e,[o]:s};ls(i.hooks)&&(n=yg(n,i.hooks),e.hooks=n),ls(i.headers)&&(r=gg(r,i.headers),e.headers=r)}return e};var sC=(()=>{let t=!1,e=!1,r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),aC=typeof globalThis.AbortController=="function",uC=typeof globalThis.ReadableStream=="function",cC=typeof globalThis.FormData=="function",Xl=["get","post","put","patch","head","delete"],m5=()=>{};m5();var lC={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Zl=2147483647,Ql=Symbol("stop"),fC={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},dC={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var pC=t=>Xl.includes(t)?t.toUpperCase():t,g5=["get","put","head","delete","options","trace"],y5=[408,413,429,500,502,503,504],D5=[413,429,503],hC={limit:2,methods:g5,statusCodes:y5,afterStatusCodes:D5,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},mC=(t={})=>{if(typeof t=="number")return{...hC,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...hC,...t}};async function vg(t,e,r,n){return new Promise((i,o)=>{let s=setTimeout(()=>{r&&r.abort(),o(new cs(t))},n.timeout);n.fetch(t,e).then(i).catch(o).then(()=>{clearTimeout(s)})})}async function bg(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(o),n(e.reason)}let o=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}var gC=(t,e)=>{let r={};for(let n in e)!(n in dC)&&!(n in fC)&&!(n in t)&&(r[n]=e[n]);return r};var wu=class t{static create(e,r){let n=new t(e,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Zl)throw new RangeError(`The \`timeout\` option cannot be greater than ${Zl}`);await Promise.resolve();let a=await n._fetch();for(let u of n._options.hooks.afterResponse){let c=await u(n.request,n._options,n._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let u=new ei(a,n.request,n._options);for(let c of n._options.hooks.beforeError)u=await c(u);throw u}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!uC)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},s=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i();for(let[a,u]of Object.entries(lC))s[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||u);let c=await s;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await c.text())}return c[a]()};return s}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:gg(this._input.headers,r.headers),hooks:yg({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:pC(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:mC(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(aC){this.abortController=new globalThis.AbortController;let n=this._options.signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(sC&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),o=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(cC&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(o,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof cs)throw e;if(e instanceof ei){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());let o=this._options.retry.maxRetryAfter??i;return i<o?i:o}if(e.response.status===413)throw e}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){let n=Math.min(this._calculateRetryDelay(r),Zl);if(this._retryCount<1)throw r;await bg(n,{signal:this._options.signal});for(let i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===Ql)return;return this._retry(e)}}async _fetch(){for(let n of this._options.hooks.beforeRequest){let i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}let e=gC(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):vg(r,e,this.abortController,this._options)}_stream(e,r){let n=Number(e.headers.get("content-length"))||0,i=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(o){let s=e.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){let{done:u,value:c}=await s.read();if(u){o.close();return}if(r){i+=c.byteLength;let l=n===0?0:i/n;r({percent:l,transferredBytes:i,totalBytes:n},c)}o.enqueue(c),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}};var wg=t=>{let e=(r,n)=>wu.create(r,bu(t,n));for(let r of Xl)e[r]=(n,i)=>wu.create(n,bu(t,i,{method:r}));return e.create=r=>wg(bu(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),wg(bu(t,r))),e.stop=Ql,e},v5=wg(),Ur=v5;var aI=ue(WC()),fh=ue(Iy());var Cc=ue(w$());async function _$(){let t=await(0,Cc.loadConfig)();return{config:t.app.extConfig,path:t.app.extConfigFilePath}}async function on(t,e=!1){let r=await(0,Cc.loadConfig)(),{extConfig:n}=r.app;n&&(n.plugins||(n.plugins={extConfig:{},CapacitorUpdater:{}}),n.plugins.CapacitorUpdater||(n.plugins.CapacitorUpdater={}),e?n=t.config:n.plugins.CapacitorUpdater=t.config.plugins?.CapacitorUpdater,(0,Cc.writeConfig)(n,r.app.extConfigFilePath))}var Xt=".capgo_key",sr=".capgo_key_v2",ar=`${Xt}.pub`,$n=`${sr}.pub`,eI="https://capgo.app",tI="https://files.capgo.app",rI="https://api.capgo.app",nI="https://web.capgo.app",uI=12e4,One=1024*1024*20,Ane=1024*1024*1024,kne=1024*1024*99,cI="package.json",la=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*))*))?(?:\+([0-9a-z-]+(?:\.[0-9a-z-]+)*))?$/i,Q=t=>t?`
249
+ `),h(),n()};return{start:b,stop:y,message:(_="")=>{s=m(_??s)}}};var et=require("node:fs"),lh=require("node:os"),Qe=ue(require("node:path")),Nt=require("node:process"),sn=ue(cl());var Dn=require("fs"),Ba=(t=".",e="unknown")=>{let r=`${t}/bun.lockb`,n=`${t}/pnpm-lock.yaml`,i=`${t}/yarn.lock`,o=`${t}/package-lock.json`;return(0,Dn.existsSync)(r)?"bun":(0,Dn.existsSync)(n)?"pnpm":(0,Dn.existsSync)(i)?"yarn":(0,Dn.existsSync)(o)?"npm":e},ll=(t=Ba(),e=!1)=>{switch(t){case"bun":return e?"bun install":"install";case"pnpm":return e?"pnpm install":"install";case"yarn":return e?"yarn install":"install";case"npm":return e?"npm install":"install";case"unknown":return e?"unknown unknown":"unknown";default:return e?"npm install":"install"}},pw=(t=".",e="npx")=>{let r=`${t}/bun.lockb`,n=`${t}/pnpm-lock.yaml`,i=`${t}/yarn.lock`,o=`${t}/package-lock.json`;return(0,Dn.existsSync)(r)?"bunx":(0,Dn.existsSync)(n)?"pnpm exec":(0,Dn.existsSync)(i)?"yarn dlx":(0,Dn.existsSync)(o)?"npx":e};var ca=ue(f_()),sI=ue(Du()),bv=ue(oC());var ei=class extends Error{response;request;options;constructor(e,r,n){let i=e.status||e.status===0?e.status:"",o=e.statusText||"",s=`${i} ${o}`.trim(),a=s?`status code ${s}`:"an unknown error";super(`Request failed with ${a}: ${r.method} ${r.url}`),this.name="HTTPError",this.response=e,this.request=r,this.options=n}};var cs=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}};var ls=t=>t!==null&&typeof t=="object";var bu=(...t)=>{for(let e of t)if((!ls(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Dg({},...t)},gg=(t={},e={})=>{let r=new globalThis.Headers(t),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(let[o,s]of i.entries())n&&s==="undefined"||s===void 0?r.delete(o):r.set(o,s);return r};function Jl(t,e,r){return Object.hasOwn(e,r)&&e[r]===void 0?[]:Dg(t[r]??[],e[r]??[])}var yg=(t={},e={})=>({beforeRequest:Jl(t,e,"beforeRequest"),beforeRetry:Jl(t,e,"beforeRetry"),afterResponse:Jl(t,e,"afterResponse"),beforeError:Jl(t,e,"beforeError")}),Dg=(...t)=>{let e={},r={},n={};for(let i of t)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(ls(i)){for(let[o,s]of Object.entries(i))ls(s)&&o in e&&(s=Dg(e[o],s)),e={...e,[o]:s};ls(i.hooks)&&(n=yg(n,i.hooks),e.hooks=n),ls(i.headers)&&(r=gg(r,i.headers),e.headers=r)}return e};var sC=(()=>{let t=!1,e=!1,r=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(r&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return t&&!e})(),aC=typeof globalThis.AbortController=="function",uC=typeof globalThis.ReadableStream=="function",cC=typeof globalThis.FormData=="function",Xl=["get","post","put","patch","head","delete"],mU=()=>{};mU();var lC={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},Zl=2147483647,Ql=Symbol("stop"),fC={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},dC={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var pC=t=>Xl.includes(t)?t.toUpperCase():t,gU=["get","put","head","delete","options","trace"],yU=[408,413,429,500,502,503,504],DU=[413,429,503],hC={limit:2,methods:gU,statusCodes:yU,afterStatusCodes:DU,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3},mC=(t={})=>{if(typeof t=="number")return{...hC,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...hC,...t}};async function vg(t,e,r,n){return new Promise((i,o)=>{let s=setTimeout(()=>{r&&r.abort(),o(new cs(t))},n.timeout);n.fetch(t,e).then(i).catch(o).then(()=>{clearTimeout(s)})})}async function bg(t,{signal:e}){return new Promise((r,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(o),n(e.reason)}let o=setTimeout(()=>{e?.removeEventListener("abort",i),r()},t)})}var gC=(t,e)=>{let r={};for(let n in e)!(n in dC)&&!(n in fC)&&!(n in t)&&(r[n]=e[n]);return r};var wu=class t{static create(e,r){let n=new t(e,r),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>Zl)throw new RangeError(`The \`timeout\` option cannot be greater than ${Zl}`);await Promise.resolve();let a=await n._fetch();for(let u of n._options.hooks.afterResponse){let c=await u(n.request,n._options,n._decorateResponse(a.clone()));c instanceof globalThis.Response&&(a=c)}if(n._decorateResponse(a),!a.ok&&n._options.throwHttpErrors){let u=new ei(a,n.request,n._options);for(let c of n._options.hooks.beforeError)u=await c(u);throw u}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!uC)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return n._stream(a.clone(),n._options.onDownloadProgress)}return a},s=n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i();for(let[a,u]of Object.entries(lC))s[a]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||u);let c=await s;if(a==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(r.parseJson)return r.parseJson(await c.text())}return c[a]()};return s}request;abortController;_retryCount=0;_input;_options;constructor(e,r={}){if(this._input=e,this._options={...r,headers:gg(this._input.headers,r.headers),hooks:yg({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:pC(r.method??this._input.method),prefixUrl:String(r.prefixUrl||""),retry:mC(r.retry),throwHttpErrors:r.throwHttpErrors!==!1,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(aC){this.abortController=new globalThis.AbortController;let n=this._options.signal??this._input.signal;n?.aborted&&this.abortController.abort(n?.reason),n?.addEventListener("abort",()=>{this.abortController.abort(n.reason)}),this._options.signal=this.abortController.signal}if(sC&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),o=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(cC&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(o,{...this.request}),this._options)}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof cs)throw e;if(e instanceof ei){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());let o=this._options.retry.maxRetryAfter??i;return i<o?i:o}if(e.response.status===413)throw e}let r=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,r)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){let n=Math.min(this._calculateRetryDelay(r),Zl);if(this._retryCount<1)throw r;await bg(n,{signal:this._options.signal});for(let i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===Ql)return;return this._retry(e)}}async _fetch(){for(let n of this._options.hooks.beforeRequest){let i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}let e=gC(this.request,this._options),r=this.request;return this.request=r.clone(),this._options.timeout===!1?this._options.fetch(r,e):vg(r,e,this.abortController,this._options)}_stream(e,r){let n=Number(e.headers.get("content-length"))||0,i=0;return e.status===204?(r&&r({percent:1,totalBytes:n,transferredBytes:i},new Uint8Array),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(o){let s=e.body.getReader();r&&r({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function a(){let{done:u,value:c}=await s.read();if(u){o.close();return}if(r){i+=c.byteLength;let l=n===0?0:i/n;r({percent:l,transferredBytes:i,totalBytes:n},c)}o.enqueue(c),await a()}await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})}};var wg=t=>{let e=(r,n)=>wu.create(r,bu(t,n));for(let r of Xl)e[r]=(n,i)=>wu.create(n,bu(t,i,{method:r}));return e.create=r=>wg(bu(r)),e.extend=r=>(typeof r=="function"&&(r=r(t??{})),wg(bu(t,r))),e.stop=Ql,e},vU=wg(),Ur=vU;var aI=ue(WC()),fh=ue(Iy());var Cc=ue(w$());async function _$(){let t=await(0,Cc.loadConfig)();return{config:t.app.extConfig,path:t.app.extConfigFilePath}}async function on(t,e=!1){let r=await(0,Cc.loadConfig)(),{extConfig:n}=r.app;n&&(n.plugins||(n.plugins={extConfig:{},CapacitorUpdater:{}}),n.plugins.CapacitorUpdater||(n.plugins.CapacitorUpdater={}),e?n=t.config:n.plugins.CapacitorUpdater=t.config.plugins?.CapacitorUpdater,(0,Cc.writeConfig)(n,r.app.extConfigFilePath))}var Xt=".capgo_key",sr=".capgo_key_v2",ar=`${Xt}.pub`,$n=`${sr}.pub`,eI="https://capgo.app",tI="https://files.capgo.app",rI="https://api.capgo.app",nI="https://web.capgo.app",uI=12e4,One=1024*1024*20,Ane=1024*1024*1024,kne=1024*1024*99,cI="package.json",la=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-z-][0-9a-z-]*))*))?(?:\+([0-9a-z-]+(?:\.[0-9a-z-]+)*))?$/i,Q=t=>t?`
250
250
  ${aI.default.render(t)}`:"";function iI(t){return new Promise(e=>{setTimeout(e,t)})}function lI(t){return(0,sn.isMonorepo)(t)||(0,sn.isNXMonorepo)(t)}function wo(t){return(0,sn.isMonorepo)(t)?(0,sn.findMonorepoRoot)(t):(0,sn.isNXMonorepo)(t)?(0,sn.findNXMonorepoRoot)(t):t}async function br(t=wo((0,Nt.cwd)()),e=void 0){let r=e?.split(",")[0];r&&((0,et.existsSync)(r)||(p.error(`Package.json at ${r} does not exist`),(0,Nt.exit)(1)));let n=(0,et.readFileSync)(r||(0,Qe.join)(t,cI));return JSON.parse(n)}async function In(t=wo((0,Nt.cwd)()),e=void 0){let r=e?.split(",");if(r||(r=[(0,Qe.join)(t,cI)]),r)for(let i of r)(0,et.existsSync)(i)||(p.error(`Package.json at ${i} does not exist`),(0,Nt.exit)(1));let n=new Map;for(let i of r){let o=(0,et.readFileSync)(i),s=JSON.parse(o);for(let a in s.dependencies)n.set(a,s.dependencies[a]);for(let a in s.devDependencies)n.set(a,s.devDependencies[a])}return n}async function ee(){try{let t=await _$();return t||(p.error("No capacitor config file found, run `cap init` first"),A.error("")),t}catch(t){p.error(`No capacitor config file found, run \`cap init\` first ${Q(t)}`),A.error("")}}async function _o(t){let e=await ee();return e?.config&&(e.config.plugins||(e.config.plugins={extConfig:{},CapacitorUpdater:{}}),e.config.plugins.CapacitorUpdater||(e.config.plugins.CapacitorUpdater={}),e.config.plugins.CapacitorUpdater={...e.config.plugins.CapacitorUpdater,...t},on(e)),e}async function wr(){try{let t=await ee(),e={host:t?.config?.plugins?.CapacitorUpdater?.localHost||eI,hostWeb:t?.config?.plugins?.CapacitorUpdater?.localWebHost||nI,hostFilesApi:t?.config?.plugins?.CapacitorUpdater?.localApiFiles||tI,hostApi:t?.config?.plugins?.CapacitorUpdater?.localApi||rI};return t?.config?.plugins?.CapacitorUpdater?.localSupa&&t?.config?.plugins?.CapacitorUpdater?.localSupaAnon&&(p.info("Using custom supabase instance from capacitor.config.json"),e.supaKey=t?.config?.plugins?.CapacitorUpdater?.localSupaAnon,e.supaHost=t?.config?.plugins?.CapacitorUpdater?.localSupa),e}catch{return{host:eI,hostWeb:nI,hostFilesApi:tI,hostApi:rI}}}var Tne=/([A-Za-z0-9]+)\.(java|swift|kt|scala)$/;async function wv(){let t=await wr();return Ur.get(`${t.hostApi}/private/config`).then(e=>e.json()).then(e=>({...e,...t})).catch(()=>(p.info(`Local config ${Q(t)}`),t))}async function fI(){let t=await wr();return Ur.get(`${t.hostFilesApi}/files/config`).then(e=>e.json()).catch(()=>({partialUpload:!1,TUSUpload:!1,partialUploadForced:!1,TUSUploadForced:!1,maxUploadLength:Ane,maxChunkSize:kne,alertUploadSize:One}))}async function fe(t){let e=await wv();return(!e.supaHost||!e.supaKey)&&(p.error("Cannot connect to server please try again later"),A.error("")),(0,ca.createClient)(e.supaHost,e.supaKey,{auth:{persistSession:!1},global:{headers:{capgkey:t}}})}async function Pne(t,e,r){let{data:n}=await t.rpc("is_allowed_capgkey",{apikey:e,keymode:r}).single();if(!n){p.error("Invalid API key or insufficient permissions.");let i=r.map((o,s)=>r.length===1?`"${o}"`:s===r.length-1?`or "${o}"`:`"${o}", `).join("");p.error(`Your key should be: ${i} mode.`),A.error("")}}async function Rne(t,e){let{data:r}=await t.rpc("is_paying_org",{orgid:e}).single();return r||!1}async function $ne(t,e){let{data:r}=await t.rpc("is_trial_org",{orgid:e}).single();return r||0}async function Ine(t,e){let{data:r}=await t.rpc("is_allowed_action_org",{orgid:e}).single();return!!r}async function jne(t,e,r){let{data:n}=await t.rpc("is_allowed_action",{apikey:r,appid:e}).single();return!!n}var Ft=(s=>(s[s.none=0]="none",s[s.read=1]="read",s[s.upload=2]="upload",s[s.write=3]="write",s[s.admin=4]="admin",s[s.super_admin=5]="super_admin",s))(Ft||{}),_v=(t,e)=>t>=e;async function dI(t,e,r){let{data:n,error:i}=await t.rpc("get_org_perm_for_apikey",{apikey:e,app_id:r}).single();if(i&&(p.error("Cannot get permissions for organization!"),console.error(i),(0,Nt.exit)(1)),n.includes("perm")){let a=null;switch(n){case"perm_none":{a=0;break}case"perm_read":{a=1;break}case"perm_upload":{a=2;break}case"perm_write":{a=3;break}case"perm_admin":{a=4;break}case"perm_owner":{a=5;break}default:n.includes("invite")&&(p.info("Please accept/deny the organization invitation before trying to access the app"),(0,Nt.exit)(1)),p.error(`Invalid output when fetching organization permission. Response: ${n}`),(0,Nt.exit)(1)}return{okay:!0,data:a}}let s=null;switch(n){case"INVALID_APIKEY":{s="INVALID_APIKEY";break}case"NO_APP":{s="NO_APP";break}case"NO_ORG":{s="NO_ORG";break}default:p.error(`Invalid error when fetching organization permission. Response: ${n}`),(0,Nt.exit)(1)}return{okay:!1,error:s}}async function fa(t,e,r,n,i=!0){let o=await wv();await(n?jne(t,n,r):Ine(t,e))||(p.error(`You need to upgrade your plan to continue to use capgo.
251
251
  Upgrade here: ${o.hostWeb}/dashboard/settings/plans
252
252
  `),iI(100),Promise.resolve().then(()=>(Q$(),Z$)).then(c=>{c.default(`${o.hostWeb}/dashboard/settings/plans`)}),iI(500),A.error(""));let[a,u]=await Promise.all([$ne(t,e),Rne(t,e)]);a>0&&i&&!u&&p.warn(`WARNING !!