@ampt/cli 0.0.1-beta.87 → 1.0.0
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/README.md +1 -1
- package/dist/cli.js +10 -10
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
`+s),e.push(i+"m+"+Y_.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=TXe()+t+" "+e[0]}function TXe(){return An.inspectOpts.hideDate?"":new Date().toISOString()+" "}function AXe(...e){return process.stderr.write(X_.format(...e)+`
|
|
21
21
|
`)}function OXe(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function IXe(){return process.env.DEBUG}function RXe(e){e.inspectOpts={};let t=Object.keys(An.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=An.inspectOpts[t[r]]}Y_.exports=RR()(An);var{formatters:CX}=Y_.exports;CX.o=function(e){return this.inspectOpts.colors=this.useColors,X_.inspect(e,this.inspectOpts).split(`
|
|
22
22
|
`).map(t=>t.trim()).join(" ")};CX.O=function(e){return this.inspectOpts.colors=this.useColors,X_.inspect(e,this.inspectOpts)}});var Zm=g((gKt,NR)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?NR.exports=SX():NR.exports=TX()});var OX=g((vKt,AX)=>{var Qm;AX.exports=function(){if(!Qm){try{Qm=Zm()("follow-redirects")}catch{}typeof Qm!="function"&&(Qm=function(){})}Qm.apply(null,arguments)}});var FR=g((xKt,LR)=>{var vl=require("url"),qR=vl.URL,NXe=require("http"),qXe=require("https"),NX=require("stream").Writable,qX=require("assert"),PX=OX(),kR=["abort","aborted","connect","error","socket","timeout"],DR=Object.create(null);kR.forEach(function(e){DR[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var PXe=tg("ERR_INVALID_URL","Invalid URL",TypeError),IX=tg("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),kXe=tg("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),DXe=tg("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),LXe=tg("ERR_STREAM_WRITE_AFTER_END","write after end");function Ki(e,t){NX.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}Ki.prototype=Object.create(NX.prototype);Ki.prototype.abort=function(){DX(this._currentRequest),this.emit("abort")};Ki.prototype.write=function(e,t,r){if(this._ending)throw new LXe;if(!xl(e)&&!BXe(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(eg(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new DXe),this.abort())};Ki.prototype.end=function(e,t,r){if(eg(e)?(r=e,e=t=null):eg(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(e,t,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Ki.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Ki.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Ki.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Ki.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Ki.prototype,e,{get:function(){return this._currentRequest[e]}})});Ki.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Ki.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t){this.emit("error",new TypeError("Unsupported protocol "+e));return}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of kR)n.on(i,DR[i]);if(this._currentUrl=/^\//.test(this._options.path)?vl.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function u(c){if(n===o._currentRequest)if(c)o.emit("error",c);else if(s<a.length){var f=a[s++];n.finished||n.write(f.data,f.encoding,u)}else o._ended&&n.end()})()}};Ki.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(DX(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new kXe);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],PR(/^content-/i,this._options.headers));var o=PR(/^host$/i,this._options.headers),a=vl.parse(this._currentUrl),u=o||a.host,c=/^\w+:/.test(r)?this._currentUrl:vl.format(Object.assign(a,{host:u})),f;try{f=vl.resolve(c,r)}catch(v){this.emit("error",new IX({cause:v}));return}PX("redirecting to",f),this._isRedirect=!0;var p=vl.parse(f);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==u&&!MXe(p.host,u))&&PR(/^(?:authorization|cookie)$/i,this._options.headers),eg(i)){var d={headers:e.headers,statusCode:t},m={url:c,method:s,headers:n};try{i(this._options,d,m)}catch(v){this.emit("error",v);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(v){this.emit("error",new IX({cause:v}))}};function kX(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var i=n+":",s=r[i]=e[n],o=t[n]=Object.create(s);function a(c,f,p){if(xl(c)){var d;try{d=RX(new qR(c))}catch{d=vl.parse(c)}if(!xl(d.protocol))throw new PXe({input:c});c=d}else qR&&c instanceof qR?c=RX(c):(p=f,f=c,c={protocol:i});return eg(f)&&(p=f,f=null),f=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,f),f.nativeProtocols=r,!xl(f.host)&&!xl(f.hostname)&&(f.hostname="::1"),qX.equal(f.protocol,i,"protocol mismatch"),PX("options",f),new Ki(f,p)}function u(c,f,p){var d=o.request(c,f,p);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function FXe(){}function RX(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return e.port!==""&&(t.port=Number(e.port)),t}function PR(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function tg(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function DX(e){for(var t of kR)e.removeListener(t,DR[t]);e.on("error",FXe),e.abort()}function MXe(e,t){qX(xl(e)&&xl(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function xl(e){return typeof e=="string"||e instanceof String}function eg(e){return typeof e=="function"}function BXe(e){return typeof e=="object"&&"length"in e}LR.exports=kX({http:NXe,https:qXe});LR.exports.wrap=kX});var yl,J_=se(()=>{yl="1.4.0"});function rg(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var MR=se(()=>{"use strict"});function BR(e,t,r){let n=r&&r.Blob||Vr.classes.Blob,i=rg(e);if(t===void 0&&n&&(t=!0),i==="data"){e=i.length?e.slice(i.length+1):e;let s=jXe.exec(e);if(!s)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let o=s[1],a=s[2],u=s[3],c=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(t){if(!n)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new n([c],{type:o})}return c}throw new Se("Unsupported protocol "+i,Se.ERR_NOT_SUPPORT)}var jXe,LX=se(()=>{"use strict";Zs();MR();Gu();jXe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});function UXe(e,t){let r=0,n=1e3/t,i=null;return function(o,a){let u=Date.now();if(o||u-r>n)return i&&(clearTimeout(i),i=null),r=u,e.apply(null,a);i||(i=setTimeout(()=>(i=null,r=Date.now(),e.apply(null,a)),n-(u-r)))}}var FX,MX=se(()=>{"use strict";FX=UXe});function HXe(e,t){e=e||10;let r=new Array(e),n=new Array(e),i=0,s=0,o;return t=t!==void 0?t:1e3,function(u){let c=Date.now(),f=n[s];o||(o=c),r[i]=u,n[i]=c;let p=s,d=0;for(;p!==i;)d+=r[p++],p=p%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;let m=f&&c-f;return m?Math.round(d*1e3/m):void 0}}var Z_,jR=se(()=>{"use strict";Z_=HXe});var BX,Q_,UR,HR,jX=se(()=>{"use strict";BX=ve(require("stream"),1);lr();MX();jR();Q_=Symbol("internals"),UR=class extends BX.default.Transform{constructor(t){t=J.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,u)=>!J.isUndefined(u[a])),super({readableHighWaterMark:t.chunkSize});let r=this,n=this[Q_]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},i=Z_(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",a=>{a==="progress"&&(n.isCaptured||(n.isCaptured=!0))});let s=0;n.updateProgress=FX(function(){let u=n.length,c=n.bytesSeen,f=c-s;if(!f||r.destroyed)return;let p=i(f);s=c,process.nextTick(()=>{r.emit("progress",{loaded:c,total:u,progress:u?c/u:void 0,bytes:f,rate:p||void 0,estimated:p&&u&&c<=u?(u-c)/p:void 0})})},n.ticksRate);let o=()=>{n.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(t){let r=this[Q_];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let i=this,s=this[Q_],o=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,f=o/c,p=s.minChunkSize!==!1?Math.max(s.minChunkSize,f*.01):0;function d(v,_){let b=Buffer.byteLength(v);s.bytesSeen+=b,s.bytes+=b,s.isCaptured&&s.updateProgress(),i.push(v)?process.nextTick(_):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(_)}}let m=(v,_)=>{let b=Buffer.byteLength(v),y=null,T=a,S,E=0;if(o){let C=Date.now();(!s.ts||(E=C-s.ts)>=u)&&(s.ts=C,S=f-s.bytes,s.bytes=S<0?-S:0,E=0),S=f-s.bytes}if(o){if(S<=0)return setTimeout(()=>{_(null,v)},u-E);S<T&&(T=S)}T&&b>T&&b-T>p&&(y=v.subarray(T),v=v.subarray(0,T)),d(v,y?()=>{process.nextTick(_,null,y)}:_)};m(t,function v(_,b){if(_)return n(_);b?m(b,v):n(null)})}setLength(t){return this[Q_].length=+t,this}},HR=UR});var UX,zXe,eb,zR=se(()=>{({asyncIterator:UX}=Symbol),zXe=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[UX]?yield*e[UX]():yield e},eb=zXe});var HX,zX,$Xe,ng,Xu,WXe,GXe,$R,VXe,$X,WX=se(()=>{HX=require("util"),zX=require("stream");lr();zR();$Xe=J.ALPHABET.ALPHA_DIGIT+"-_",ng=new HX.TextEncoder,Xu=`\r
|
|
23
|
-
`,WXe=ng.encode(Xu),GXe=2,$R=class{constructor(t,r){let{escapeName:n}=this.constructor,i=J.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Xu}`;i?r=ng.encode(String(r).replace(/\r?\n|\r\n?/g,Xu)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Xu}`,this.headers=ng.encode(s+Xu),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+GXe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;J.isTypedArray(t)?yield t:yield*eb(t),yield WXe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},VXe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+J.generateString(i,$Xe)}=r||{};if(!J.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=ng.encode("--"+s+Xu),a=ng.encode("--"+s+"--"+Xu+Xu),u=a.byteLength,c=Array.from(e.entries()).map(([p,d])=>{let m=new $R(p,d);return u+=m.size,m});u+=o.byteLength*c.length,u=J.toFiniteNumber(u);let f={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(u)&&(f["Content-Length"]=u),t&&t(f),zX.Readable.from(async function*(){for(let p of c)yield o,yield*p.encode();yield a}())},$X=VXe});var GX,WR,VX,KX=se(()=>{"use strict";GX=ve(require("stream"),1),WR=class extends GX.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(t,r,n)}},VX=WR});var KXe,XX,YX=se(()=>{lr();KXe=(e,t)=>J.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e,XX=KXe});function QXe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function oY(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,eY.getProxyForUrl)(r);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let i=n.hostname||n.host;e.hostname=i,e.host=i,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(s){oY(s,t,s.href)}}var eY,tY,rY,nY,iY,qa,_l,sY,JX,XXe,ZX,YXe,JXe,ZXe,QX,eYe,tYe,aY,uY=se(()=>{"use strict";lr();AR();G_();j_();eY=ve(_X(),1),tY=ve(require("http"),1),rY=ve(require("https"),1),nY=ve(require("util"),1),iY=ve(FR(),1),qa=ve(require("zlib"),1);J_();U_();Zs();qp();Gu();LX();_l=ve(require("stream"),1);Vu();jX();sY=ve(require("events"),1);WX();zR();KX();YX();JX={flush:qa.default.constants.Z_SYNC_FLUSH,finishFlush:qa.default.constants.Z_SYNC_FLUSH},XXe={flush:qa.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:qa.default.constants.BROTLI_OPERATION_FLUSH},ZX=J.isFunction(qa.default.createBrotliDecompress),{http:YXe,https:JXe}=iY.default,ZXe=/https:?/,QX=Vr.protocols.map(e=>e+":");eYe=typeof process<"u"&&J.kindOf(process)==="process",tYe=e=>new Promise((t,r)=>{let n,i,s=(u,c)=>{i||(i=!0,n&&n(u,c))},o=u=>{s(u),t(u)},a=u=>{s(u,!0),r(u)};e(o,a,u=>n=u).catch(a)}),aY=eYe&&function(t){return tYe(async function(n,i,s){let{data:o,lookup:a,family:u}=t,{responseType:c,responseEncoding:f}=t,p=t.method.toUpperCase(),d,m=!1,v;a&&J.isAsyncFn(a)&&(a=XX(a,ee=>{if(J.isString(ee))ee=[ee,ee.indexOf(".")<0?6:4];else if(!J.isArray(ee))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return ee}));let _=new sY.default,b=()=>{t.cancelToken&&t.cancelToken.unsubscribe(y),t.signal&&t.signal.removeEventListener("abort",y),_.removeAllListeners()};s((ee,Q)=>{d=!0,Q&&(m=!0,b())});function y(ee){_.emit("abort",!ee||ee.type?new eo(null,t,v):ee)}_.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(y),t.signal&&(t.signal.aborted?y():t.signal.addEventListener("abort",y)));let T=ml(t.baseURL,t.url),S=new URL(T,"http://localhost"),E=S.protocol||QX[0];if(E==="data:"){let ee;if(p!=="GET")return Ku(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{ee=BR(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Q){throw Se.from(Q,Se.ERR_BAD_REQUEST,t)}return c==="text"?(ee=ee.toString(f),(!f||f==="utf8")&&(ee=J.stripBOM(ee))):c==="stream"&&(ee=_l.default.Readable.from(ee)),Ku(n,i,{data:ee,status:200,statusText:"OK",headers:new sn,config:t})}if(QX.indexOf(E)===-1)return i(new Se("Unsupported protocol "+E,Se.ERR_BAD_REQUEST,t));let C=sn.from(t.headers).normalize();C.set("User-Agent","axios/"+yl,!1);let I=t.onDownloadProgress,q=t.onUploadProgress,B=t.maxRate,M,R;if(J.isSpecCompliantForm(o)){let ee=C.getContentType(/boundary=([-_\w\d]{10,70})/i);o=$X(o,Q=>{C.set(Q)},{tag:`axios-${yl}-boundary`,boundary:ee&&ee[1]||void 0})}else if(J.isFormData(o)&&J.isFunction(o.getHeaders)){if(C.set(o.getHeaders()),!C.hasContentLength())try{let ee=await nY.default.promisify(o.getLength).call(o);Number.isFinite(ee)&&ee>=0&&C.setContentLength(ee)}catch{}}else if(J.isBlob(o))o.size&&C.setContentType(o.type||"application/octet-stream"),C.setContentLength(o.size||0),o=_l.default.Readable.from(eb(o));else if(o&&!J.isStream(o)){if(!Buffer.isBuffer(o))if(J.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(J.isString(o))o=Buffer.from(o,"utf-8");else return i(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,t));if(C.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,t))}let D=J.toFiniteNumber(C.getContentLength());J.isArray(B)?(M=B[0],R=B[1]):M=R=B,o&&(q||M)&&(J.isStream(o)||(o=_l.default.Readable.from(o,{objectMode:!1})),o=_l.default.pipeline([o,new HR({length:D,maxRate:J.toFiniteNumber(M)})],J.noop),q&&o.on("progress",ee=>{q(Object.assign(ee,{upload:!0}))}));let N;if(t.auth){let ee=t.auth.username||"",Q=t.auth.password||"";N=ee+":"+Q}if(!N&&S.username){let ee=S.username,Q=S.password;N=ee+":"+Q}N&&C.delete("authorization");let Y;try{Y=hl(S.pathname+S.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(ee){let Q=new Error(ee.message);return Q.config=t,Q.url=t.url,Q.exists=!0,i(Q)}C.set("Accept-Encoding","gzip, compress, deflate"+(ZX?", br":""),!1);let oe={path:Y,method:p,headers:C.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:N,protocol:E,family:u,lookup:a,beforeRedirect:QXe,beforeRedirects:{}};t.socketPath?oe.socketPath=t.socketPath:(oe.hostname=S.hostname,oe.port=S.port,oY(oe,t.proxy,E+"//"+S.hostname+(S.port?":"+S.port:"")+oe.path));let H,U=ZXe.test(oe.protocol);if(oe.agent=U?t.httpsAgent:t.httpAgent,t.transport?H=t.transport:t.maxRedirects===0?H=U?rY.default:tY.default:(t.maxRedirects&&(oe.maxRedirects=t.maxRedirects),t.beforeRedirect&&(oe.beforeRedirects.config=t.beforeRedirect),H=U?JXe:YXe),t.maxBodyLength>-1?oe.maxBodyLength=t.maxBodyLength:oe.maxBodyLength=1/0,t.insecureHTTPParser&&(oe.insecureHTTPParser=t.insecureHTTPParser),v=H.request(oe,function(Q){if(v.destroyed)return;let pe=[Q],ge=+Q.headers["content-length"];if(I){let xt=new HR({length:J.toFiniteNumber(ge),maxRate:J.toFiniteNumber(R)});I&&xt.on("progress",Ne=>{I(Object.assign(Ne,{download:!0}))}),pe.push(xt)}let be=Q,We=Q.req||v;if(t.decompress!==!1&&Q.headers["content-encoding"])switch((p==="HEAD"||Q.statusCode===204)&&delete Q.headers["content-encoding"],Q.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":pe.push(qa.default.createUnzip(JX)),delete Q.headers["content-encoding"];break;case"deflate":pe.push(new VX),pe.push(qa.default.createUnzip(JX)),delete Q.headers["content-encoding"];break;case"br":ZX&&(pe.push(qa.default.createBrotliDecompress(XXe)),delete Q.headers["content-encoding"])}be=pe.length>1?_l.default.pipeline(pe,J.noop):pe[0];let et=_l.default.finished(be,()=>{et(),b()}),tt={status:Q.statusCode,statusText:Q.statusMessage,headers:new sn(Q.headers),config:t,request:We};if(c==="stream")tt.data=be,Ku(n,i,tt);else{let xt=[],Ne=0;be.on("data",function(zt){xt.push(zt),Ne+=zt.length,t.maxContentLength>-1&&Ne>t.maxContentLength&&(m=!0,be.destroy(),i(new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,We)))}),be.on("aborted",function(){if(m)return;let zt=new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,We);be.destroy(zt),i(zt)}),be.on("error",function(zt){v.destroyed||i(Se.from(zt,null,t,We))}),be.on("end",function(){try{let zt=xt.length===1?xt[0]:Buffer.concat(xt);c!=="arraybuffer"&&(zt=zt.toString(f),(!f||f==="utf8")&&(zt=J.stripBOM(zt))),tt.data=zt}catch(zt){i(Se.from(zt,null,t,tt.request,tt))}Ku(n,i,tt)})}_.once("abort",xt=>{be.destroyed||(be.emit("error",xt),be.destroy())})}),_.once("abort",ee=>{i(ee),v.destroy(ee)}),v.on("error",function(Q){i(Se.from(Q,null,t,v))}),v.on("socket",function(Q){Q.setKeepAlive(!0,1e3*60)}),t.timeout){let ee=parseInt(t.timeout,10);if(isNaN(ee)){i(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,t,v));return}v.setTimeout(ee,function(){if(d)return;let pe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ge=t.transitional||Ip;t.timeoutErrorMessage&&(pe=t.timeoutErrorMessage),i(new Se(pe,ge.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,v)),y()})}if(J.isStream(o)){let ee=!1,Q=!1;o.on("end",()=>{ee=!0}),o.once("error",pe=>{Q=!0,v.destroy(pe)}),o.on("close",()=>{!ee&&!Q&&y(new eo("Request stream has been aborted",t,v))}),o.pipe(v)}else v.end(o)})}});var cY,lY=se(()=>{"use strict";lr();Gu();cY=Vr.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let u=[];u.push(r+"="+encodeURIComponent(n)),J.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),J.isString(s)&&u.push("path="+s),J.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){let n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var fY,pY=se(()=>{"use strict";lr();Gu();fY=Vr.isStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){let o=s;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){let a=J.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});function dY(e,t){let r=0,n=Z_(50,250);return i=>{let s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,u=n(a),c=s<=o;r=s;let f={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&c?(o-s)/u:void 0,event:i};f[t?"download":"upload"]=!0,e(f)}}var rYe,hY,mY=se(()=>{"use strict";lr();AR();lY();j_();G_();pY();U_();Zs();qp();MR();Gu();Vu();jR();rYe=typeof XMLHttpRequest<"u",hY=rYe&&function(e){return new Promise(function(r,n){let i=e.data,s=sn.from(e.headers).normalize(),o=e.responseType,a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}J.isFormData(i)&&(Vr.isStandardBrowserEnv||Vr.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){let m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(m+":"+v))}let f=ml(e.baseURL,e.url);c.open(e.method.toUpperCase(),hl(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;let m=sn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:e,request:c};Ku(function(y){r(y),u()},function(y){n(y),u()},_),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(n(new Se("Request aborted",Se.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Se("Network Error",Se.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",_=e.transitional||Ip;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),n(new Se(v,_.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,c)),c=null},Vr.isStandardBrowserEnv){let m=(e.withCredentials||fY(f))&&e.xsrfCookieName&&cY.read(e.xsrfCookieName);m&&s.set(e.xsrfHeaderName,m)}i===void 0&&s.setContentType(null),"setRequestHeader"in c&&J.forEach(s.toJSON(),function(v,_){c.setRequestHeader(_,v)}),J.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",dY(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",dY(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=m=>{c&&(n(!m||m.type?new eo(null,e,c):m),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let d=rg(f);if(d&&Vr.protocols.indexOf(d)===-1){n(new Se("Unsupported protocol "+d+":",Se.ERR_BAD_REQUEST,e));return}c.send(i||null)})}});var tb,gY,vY=se(()=>{lr();uY();mY();Zs();tb={http:aY,xhr:hY};J.forEach(tb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});gY={getAdapter:e=>{e=J.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=J.isString(r)?tb[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Se(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(J.hasOwnProp(tb,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!J.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:tb}});function GR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eo(null,e)}function rb(e){return GR(e),e.headers=sn.from(e.headers),e.data=Ym.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gY.getAdapter(e.adapter||Rp.adapter)(e).then(function(n){return GR(e),n.data=Ym.call(e,e.transformResponse,n),n.headers=sn.from(n.headers),n},function(n){return Jm(n)||(GR(e),n&&n.response&&(n.response.data=Ym.call(e,e.transformResponse,n.response),n.response.headers=sn.from(n.response.headers))),Promise.reject(n)})}var xY=se(()=>{"use strict";mX();TR();$_();qp();Vu();vY()});function Pa(e,t){t=t||{};let r={};function n(c,f,p){return J.isPlainObject(c)&&J.isPlainObject(f)?J.merge.call({caseless:p},c,f):J.isPlainObject(f)?J.merge({},f):J.isArray(f)?f.slice():f}function i(c,f,p){if(J.isUndefined(f)){if(!J.isUndefined(c))return n(void 0,c,p)}else return n(c,f,p)}function s(c,f){if(!J.isUndefined(f))return n(void 0,f)}function o(c,f){if(J.isUndefined(f)){if(!J.isUndefined(c))return n(void 0,c)}else return n(void 0,f)}function a(c,f,p){if(p in t)return n(c,f);if(p in e)return n(void 0,c)}let u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,f)=>i(yY(c),yY(f),!0)};return J.forEach(Object.keys(Object.assign({},e,t)),function(f){let p=u[f]||i,d=p(e[f],t[f],f);J.isUndefined(d)&&p!==a||(r[f]=d)}),r}var yY,VR=se(()=>{"use strict";lr();Vu();yY=e=>e instanceof sn?e.toJSON():e});function nYe(e,t,r){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let s=n[i],o=t[s];if(o){let a=e[s],u=a===void 0||o(a,s,e);if(u!==!0)throw new Se("option "+s+" must be "+u,Se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Se("Unknown option "+s,Se.ERR_BAD_OPTION)}}var KR,_Y,nb,bY=se(()=>{"use strict";J_();Zs();KR={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{KR[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});_Y={};KR.transitional=function(t,r,n){function i(s,o){return"[Axios v"+yl+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Se(i(o," has been removed"+(r?" in "+r:"")),Se.ERR_DEPRECATED);return r&&!_Y[o]&&(_Y[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};nb={assertOptions:nYe,validators:KR}});var Yu,Fp,ig,wY=se(()=>{"use strict";lr();j_();oX();xY();VR();G_();bY();Vu();Yu=nb.validators,Fp=class{constructor(t){this.defaults=t,this.interceptors={request:new wR,response:new wR}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Pa(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&nb.assertOptions(n,{silentJSONParsing:Yu.transitional(Yu.boolean),forcedJSONParsing:Yu.transitional(Yu.boolean),clarifyTimeoutError:Yu.transitional(Yu.boolean)},!1),i!=null&&(J.isFunction(i)?r.paramsSerializer={serialize:i}:nb.assertOptions(i,{encode:Yu.function,serialize:Yu.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&J.merge(s.common,s[r.method]),o&&J.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=sn.concat(o,s);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,d;if(!u){let v=[rb.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),d=v.length,f=Promise.resolve(r);p<d;)f=f.then(v[p++],v[p++]);return f}d=a.length;let m=r;for(p=0;p<d;){let v=a[p++],_=a[p++];try{m=v(m)}catch(b){_.call(this,b);break}}try{f=rb.call(this,m)}catch(v){return Promise.reject(v)}for(p=0,d=c.length;p<d;)f=f.then(c[p++],c[p++]);return f}getUri(t){t=Pa(this.defaults,t);let r=ml(t.baseURL,t.url);return hl(r,t.params,t.paramsSerializer)}};J.forEach(["delete","get","head","options"],function(t){Fp.prototype[t]=function(r,n){return this.request(Pa(n||{},{method:t,url:r,data:(n||{}).data}))}});J.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(Pa(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Fp.prototype[t]=r(),Fp.prototype[t+"Form"]=r(!0)});ig=Fp});var sg,EY,SY=se(()=>{"use strict";qp();sg=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s,o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new eo(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new sg(function(i){t=i}),cancel:t}}},EY=sg});function XR(e){return function(r){return e.apply(null,r)}}var CY=se(()=>{"use strict"});function YR(e){return J.isObject(e)&&e.isAxiosError===!0}var TY=se(()=>{"use strict";lr()});var JR,AY,OY=se(()=>{JR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(JR).forEach(([e,t])=>{JR[t]=e});AY=JR});function IY(e){let t=new ig(e),r=Wm(ig.prototype.request,t);return J.extend(r,ig.prototype,t,{allOwnKeys:!0}),J.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return IY(Pa(e,i))},r}var on,Lo,RY=se(()=>{"use strict";lr();iR();wY();VR();$_();SR();qp();SY();TR();J_();Km();Zs();CY();TY();Vu();OY();on=IY(Rp);on.Axios=ig;on.CanceledError=eo;on.CancelToken=EY;on.isCancel=Jm;on.VERSION=yl;on.toFormData=Wu;on.AxiosError=Se;on.Cancel=on.CanceledError;on.all=function(t){return Promise.all(t)};on.spread=XR;on.isAxiosError=YR;on.mergeConfig=Pa;on.AxiosHeaders=sn;on.formToJSON=e=>H_(J.isHTMLForm(e)?new FormData(e):e);on.HttpStatusCode=AY;on.default=on;Lo=on});var xYt,yYt,_Yt,bYt,wYt,EYt,SYt,CYt,TYt,AYt,OYt,IYt,RYt,NYt,qYt,ib=se(()=>{RY();({Axios:xYt,AxiosError:yYt,CanceledError:_Yt,isCancel:bYt,CancelToken:wYt,VERSION:EYt,all:SYt,Cancel:CYt,isAxiosError:TYt,spread:AYt,toFormData:OYt,AxiosHeaders:IYt,HttpStatusCode:RYt,formToJSON:NYt,mergeConfig:qYt}=Lo)});var qY=g((kYt,NY)=>{"use strict";var iYe=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);NY.exports=e=>!iYe.has(e&&e.code)});function PY(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(c){r(c);return}a.done?t(u):Promise.resolve(u).then(n,i)}function FY(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function o(u){PY(s,n,i,o,a,"next",u)}function a(u){PY(s,n,i,o,a,"throw",u)}o(void 0)})}}function kY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kY(Object(r),!0).forEach(function(n){sYe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kY(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sYe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BY(e){return!e.response&&!!e.code&&e.code!=="ECONNABORTED"&&(0,MY.default)(e)}function eN(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function aYe(e){return e.config?eN(e)&&jY.indexOf(e.config.method)!==-1:!1}function UY(e){return e.config?eN(e)&&oYe.indexOf(e.config.method)!==-1:!1}function HY(e){return BY(e)||UY(e)}function uYe(){return 0}function cYe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=Math.pow(2,e)*100,r=t*.2*Math.random();return t+r}function LY(e){var t=e[ZR]||{};return t.retryCount=t.retryCount||0,e[ZR]=t,t}function lYe(e,t){return DY(DY({},t),e[ZR])}function fYe(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function pYe(e,t,r,n){return QR.apply(this,arguments)}function QR(){return QR=FY(function*(e,t,r,n){var i=r.retryCount<e&&t(n);if(typeof i=="object")try{var s=yield i;return s!==!1}catch{return!1}return i}),QR.apply(this,arguments)}function to(e,t){e.interceptors.request.use(r=>{var n=LY(r);return n.lastRequestTime=Date.now(),r}),e.interceptors.response.use(null,function(){var r=FY(function*(n){var{config:i}=n;if(!i)return Promise.reject(n);var{retries:s=3,retryCondition:o=HY,retryDelay:a=uYe,shouldResetTimeout:u=!1,onRetry:c=()=>{}}=lYe(i,t),f=LY(i);if(yield pYe(s,o,f,n)){f.retryCount+=1;var p=a(f.retryCount,n);if(fYe(e,i),!u&&i.timeout&&f.lastRequestTime){var d=Date.now()-f.lastRequestTime,m=i.timeout-d-p;if(m<=0)return Promise.reject(n);i.timeout=m}return i.transformRequest=[v=>v],c(f.retryCount,n,i),new Promise(v=>setTimeout(()=>v(e(i)),p))}return Promise.reject(n)});return function(n){return r.apply(this,arguments)}}())}var MY,ZR,jY,oYe,zY=se(()=>{MY=ve(qY(),1);ZR="axios-retry";jY=["get","head","options"],oYe=jY.concat(["put","delete"]);to.isNetworkError=BY;to.isSafeRequestError=aYe;to.isIdempotentRequestError=UY;to.isNetworkOrIdempotentRequestError=HY;to.exponentialDelay=cYe;to.isRetryableError=eN});var rN=g((LYt,GY)=>{"use strict";var og=e=>e&&typeof e.message=="string",tN=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return og(r)?r:void 0}else return og(t)?t:void 0},$Y=(e,t)=>{if(!og(e))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
23
|
+
`,WXe=ng.encode(Xu),GXe=2,$R=class{constructor(t,r){let{escapeName:n}=this.constructor,i=J.isString(r),s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Xu}`;i?r=ng.encode(String(r).replace(/\r?\n|\r\n?/g,Xu)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Xu}`,this.headers=ng.encode(s+Xu),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+GXe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;J.isTypedArray(t)?yield t:yield*eb(t),yield WXe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},VXe=(e,t,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+J.generateString(i,$Xe)}=r||{};if(!J.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let o=ng.encode("--"+s+Xu),a=ng.encode("--"+s+"--"+Xu+Xu),u=a.byteLength,c=Array.from(e.entries()).map(([p,d])=>{let m=new $R(p,d);return u+=m.size,m});u+=o.byteLength*c.length,u=J.toFiniteNumber(u);let f={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(u)&&(f["Content-Length"]=u),t&&t(f),zX.Readable.from(async function*(){for(let p of c)yield o,yield*p.encode();yield a}())},$X=VXe});var GX,WR,VX,KX=se(()=>{"use strict";GX=ve(require("stream"),1),WR=class extends GX.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(t,r,n)}},VX=WR});var KXe,XX,YX=se(()=>{lr();KXe=(e,t)=>J.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e,XX=KXe});function QXe(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function oY(e,t,r){let n=t;if(!n&&n!==!1){let i=(0,eY.getProxyForUrl)(r);i&&(n=new URL(i))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let i=n.hostname||n.host;e.hostname=i,e.host=i,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(s){oY(s,t,s.href)}}var eY,tY,rY,nY,iY,qa,_l,sY,JX,XXe,ZX,YXe,JXe,ZXe,QX,eYe,tYe,aY,uY=se(()=>{"use strict";lr();AR();G_();j_();eY=ve(_X(),1),tY=ve(require("http"),1),rY=ve(require("https"),1),nY=ve(require("util"),1),iY=ve(FR(),1),qa=ve(require("zlib"),1);J_();U_();Zs();qp();Gu();LX();_l=ve(require("stream"),1);Vu();jX();sY=ve(require("events"),1);WX();zR();KX();YX();JX={flush:qa.default.constants.Z_SYNC_FLUSH,finishFlush:qa.default.constants.Z_SYNC_FLUSH},XXe={flush:qa.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:qa.default.constants.BROTLI_OPERATION_FLUSH},ZX=J.isFunction(qa.default.createBrotliDecompress),{http:YXe,https:JXe}=iY.default,ZXe=/https:?/,QX=Vr.protocols.map(e=>e+":");eYe=typeof process<"u"&&J.kindOf(process)==="process",tYe=e=>new Promise((t,r)=>{let n,i,s=(u,c)=>{i||(i=!0,n&&n(u,c))},o=u=>{s(u),t(u)},a=u=>{s(u,!0),r(u)};e(o,a,u=>n=u).catch(a)}),aY=eYe&&function(t){return tYe(async function(n,i,s){let{data:o,lookup:a,family:u}=t,{responseType:c,responseEncoding:f}=t,p=t.method.toUpperCase(),d,m=!1,v;a&&J.isAsyncFn(a)&&(a=XX(a,ee=>{if(J.isString(ee))ee=[ee,ee.indexOf(".")<0?6:4];else if(!J.isArray(ee))throw new TypeError("lookup async function must return an array [ip: string, family: number]]");return ee}));let _=new sY.default,b=()=>{t.cancelToken&&t.cancelToken.unsubscribe(y),t.signal&&t.signal.removeEventListener("abort",y),_.removeAllListeners()};s((ee,Q)=>{d=!0,Q&&(m=!0,b())});function y(ee){_.emit("abort",!ee||ee.type?new eo(null,t,v):ee)}_.once("abort",i),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(y),t.signal&&(t.signal.aborted?y():t.signal.addEventListener("abort",y)));let T=ml(t.baseURL,t.url),S=new URL(T,"http://localhost"),E=S.protocol||QX[0];if(E==="data:"){let ee;if(p!=="GET")return Ku(n,i,{status:405,statusText:"method not allowed",headers:{},config:t});try{ee=BR(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Q){throw Se.from(Q,Se.ERR_BAD_REQUEST,t)}return c==="text"?(ee=ee.toString(f),(!f||f==="utf8")&&(ee=J.stripBOM(ee))):c==="stream"&&(ee=_l.default.Readable.from(ee)),Ku(n,i,{data:ee,status:200,statusText:"OK",headers:new sn,config:t})}if(QX.indexOf(E)===-1)return i(new Se("Unsupported protocol "+E,Se.ERR_BAD_REQUEST,t));let C=sn.from(t.headers).normalize();C.set("User-Agent","axios/"+yl,!1);let I=t.onDownloadProgress,q=t.onUploadProgress,B=t.maxRate,M,R;if(J.isSpecCompliantForm(o)){let ee=C.getContentType(/boundary=([-_\w\d]{10,70})/i);o=$X(o,Q=>{C.set(Q)},{tag:`axios-${yl}-boundary`,boundary:ee&&ee[1]||void 0})}else if(J.isFormData(o)&&J.isFunction(o.getHeaders)){if(C.set(o.getHeaders()),!C.hasContentLength())try{let ee=await nY.default.promisify(o.getLength).call(o);Number.isFinite(ee)&&ee>=0&&C.setContentLength(ee)}catch{}}else if(J.isBlob(o))o.size&&C.setContentType(o.type||"application/octet-stream"),C.setContentLength(o.size||0),o=_l.default.Readable.from(eb(o));else if(o&&!J.isStream(o)){if(!Buffer.isBuffer(o))if(J.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(J.isString(o))o=Buffer.from(o,"utf-8");else return i(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,t));if(C.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return i(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,t))}let D=J.toFiniteNumber(C.getContentLength());J.isArray(B)?(M=B[0],R=B[1]):M=R=B,o&&(q||M)&&(J.isStream(o)||(o=_l.default.Readable.from(o,{objectMode:!1})),o=_l.default.pipeline([o,new HR({length:D,maxRate:J.toFiniteNumber(M)})],J.noop),q&&o.on("progress",ee=>{q(Object.assign(ee,{upload:!0}))}));let N;if(t.auth){let ee=t.auth.username||"",Q=t.auth.password||"";N=ee+":"+Q}if(!N&&S.username){let ee=S.username,Q=S.password;N=ee+":"+Q}N&&C.delete("authorization");let Y;try{Y=hl(S.pathname+S.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(ee){let Q=new Error(ee.message);return Q.config=t,Q.url=t.url,Q.exists=!0,i(Q)}C.set("Accept-Encoding","gzip, compress, deflate"+(ZX?", br":""),!1);let oe={path:Y,method:p,headers:C.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:N,protocol:E,family:u,lookup:a,beforeRedirect:QXe,beforeRedirects:{}};t.socketPath?oe.socketPath=t.socketPath:(oe.hostname=S.hostname,oe.port=S.port,oY(oe,t.proxy,E+"//"+S.hostname+(S.port?":"+S.port:"")+oe.path));let H,U=ZXe.test(oe.protocol);if(oe.agent=U?t.httpsAgent:t.httpAgent,t.transport?H=t.transport:t.maxRedirects===0?H=U?rY.default:tY.default:(t.maxRedirects&&(oe.maxRedirects=t.maxRedirects),t.beforeRedirect&&(oe.beforeRedirects.config=t.beforeRedirect),H=U?JXe:YXe),t.maxBodyLength>-1?oe.maxBodyLength=t.maxBodyLength:oe.maxBodyLength=1/0,t.insecureHTTPParser&&(oe.insecureHTTPParser=t.insecureHTTPParser),v=H.request(oe,function(Q){if(v.destroyed)return;let pe=[Q],ge=+Q.headers["content-length"];if(I){let xt=new HR({length:J.toFiniteNumber(ge),maxRate:J.toFiniteNumber(R)});I&&xt.on("progress",Ne=>{I(Object.assign(Ne,{download:!0}))}),pe.push(xt)}let we=Q,We=Q.req||v;if(t.decompress!==!1&&Q.headers["content-encoding"])switch((p==="HEAD"||Q.statusCode===204)&&delete Q.headers["content-encoding"],Q.headers["content-encoding"]){case"gzip":case"x-gzip":case"compress":case"x-compress":pe.push(qa.default.createUnzip(JX)),delete Q.headers["content-encoding"];break;case"deflate":pe.push(new VX),pe.push(qa.default.createUnzip(JX)),delete Q.headers["content-encoding"];break;case"br":ZX&&(pe.push(qa.default.createBrotliDecompress(XXe)),delete Q.headers["content-encoding"])}we=pe.length>1?_l.default.pipeline(pe,J.noop):pe[0];let et=_l.default.finished(we,()=>{et(),b()}),tt={status:Q.statusCode,statusText:Q.statusMessage,headers:new sn(Q.headers),config:t,request:We};if(c==="stream")tt.data=we,Ku(n,i,tt);else{let xt=[],Ne=0;we.on("data",function(zt){xt.push(zt),Ne+=zt.length,t.maxContentLength>-1&&Ne>t.maxContentLength&&(m=!0,we.destroy(),i(new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,We)))}),we.on("aborted",function(){if(m)return;let zt=new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,We);we.destroy(zt),i(zt)}),we.on("error",function(zt){v.destroyed||i(Se.from(zt,null,t,We))}),we.on("end",function(){try{let zt=xt.length===1?xt[0]:Buffer.concat(xt);c!=="arraybuffer"&&(zt=zt.toString(f),(!f||f==="utf8")&&(zt=J.stripBOM(zt))),tt.data=zt}catch(zt){i(Se.from(zt,null,t,tt.request,tt))}Ku(n,i,tt)})}_.once("abort",xt=>{we.destroyed||(we.emit("error",xt),we.destroy())})}),_.once("abort",ee=>{i(ee),v.destroy(ee)}),v.on("error",function(Q){i(Se.from(Q,null,t,v))}),v.on("socket",function(Q){Q.setKeepAlive(!0,1e3*60)}),t.timeout){let ee=parseInt(t.timeout,10);if(isNaN(ee)){i(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,t,v));return}v.setTimeout(ee,function(){if(d)return;let pe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",ge=t.transitional||Ip;t.timeoutErrorMessage&&(pe=t.timeoutErrorMessage),i(new Se(pe,ge.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,v)),y()})}if(J.isStream(o)){let ee=!1,Q=!1;o.on("end",()=>{ee=!0}),o.once("error",pe=>{Q=!0,v.destroy(pe)}),o.on("close",()=>{!ee&&!Q&&y(new eo("Request stream has been aborted",t,v))}),o.pipe(v)}else v.end(o)})}});var cY,lY=se(()=>{"use strict";lr();Gu();cY=Vr.isStandardBrowserEnv?function(){return{write:function(r,n,i,s,o,a){let u=[];u.push(r+"="+encodeURIComponent(n)),J.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),J.isString(s)&&u.push("path="+s),J.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){let n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var fY,pY=se(()=>{"use strict";lr();Gu();fY=Vr.isStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){let o=s;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(o){let a=J.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});function dY(e,t){let r=0,n=Z_(50,250);return i=>{let s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,u=n(a),c=s<=o;r=s;let f={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&c?(o-s)/u:void 0,event:i};f[t?"download":"upload"]=!0,e(f)}}var rYe,hY,mY=se(()=>{"use strict";lr();AR();lY();j_();G_();pY();U_();Zs();qp();MR();Gu();Vu();jR();rYe=typeof XMLHttpRequest<"u",hY=rYe&&function(e){return new Promise(function(r,n){let i=e.data,s=sn.from(e.headers).normalize(),o=e.responseType,a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}J.isFormData(i)&&(Vr.isStandardBrowserEnv||Vr.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){let m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(m+":"+v))}let f=ml(e.baseURL,e.url);c.open(e.method.toUpperCase(),hl(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function p(){if(!c)return;let m=sn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:e,request:c};Ku(function(y){r(y),u()},function(y){n(y),u()},_),c=null}if("onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(n(new Se("Request aborted",Se.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Se("Network Error",Se.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",_=e.transitional||Ip;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),n(new Se(v,_.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,c)),c=null},Vr.isStandardBrowserEnv){let m=(e.withCredentials||fY(f))&&e.xsrfCookieName&&cY.read(e.xsrfCookieName);m&&s.set(e.xsrfHeaderName,m)}i===void 0&&s.setContentType(null),"setRequestHeader"in c&&J.forEach(s.toJSON(),function(v,_){c.setRequestHeader(_,v)}),J.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",dY(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",dY(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=m=>{c&&(n(!m||m.type?new eo(null,e,c):m),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));let d=rg(f);if(d&&Vr.protocols.indexOf(d)===-1){n(new Se("Unsupported protocol "+d+":",Se.ERR_BAD_REQUEST,e));return}c.send(i||null)})}});var tb,gY,vY=se(()=>{lr();uY();mY();Zs();tb={http:aY,xhr:hY};J.forEach(tb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});gY={getAdapter:e=>{e=J.isArray(e)?e:[e];let{length:t}=e,r,n;for(let i=0;i<t&&(r=e[i],!(n=J.isString(r)?tb[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new Se(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(J.hasOwnProp(tb,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!J.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:tb}});function GR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eo(null,e)}function rb(e){return GR(e),e.headers=sn.from(e.headers),e.data=Ym.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gY.getAdapter(e.adapter||Rp.adapter)(e).then(function(n){return GR(e),n.data=Ym.call(e,e.transformResponse,n),n.headers=sn.from(n.headers),n},function(n){return Jm(n)||(GR(e),n&&n.response&&(n.response.data=Ym.call(e,e.transformResponse,n.response),n.response.headers=sn.from(n.response.headers))),Promise.reject(n)})}var xY=se(()=>{"use strict";mX();TR();$_();qp();Vu();vY()});function Pa(e,t){t=t||{};let r={};function n(c,f,p){return J.isPlainObject(c)&&J.isPlainObject(f)?J.merge.call({caseless:p},c,f):J.isPlainObject(f)?J.merge({},f):J.isArray(f)?f.slice():f}function i(c,f,p){if(J.isUndefined(f)){if(!J.isUndefined(c))return n(void 0,c,p)}else return n(c,f,p)}function s(c,f){if(!J.isUndefined(f))return n(void 0,f)}function o(c,f){if(J.isUndefined(f)){if(!J.isUndefined(c))return n(void 0,c)}else return n(void 0,f)}function a(c,f,p){if(p in t)return n(c,f);if(p in e)return n(void 0,c)}let u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,f)=>i(yY(c),yY(f),!0)};return J.forEach(Object.keys(Object.assign({},e,t)),function(f){let p=u[f]||i,d=p(e[f],t[f],f);J.isUndefined(d)&&p!==a||(r[f]=d)}),r}var yY,VR=se(()=>{"use strict";lr();Vu();yY=e=>e instanceof sn?e.toJSON():e});function nYe(e,t,r){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let s=n[i],o=t[s];if(o){let a=e[s],u=a===void 0||o(a,s,e);if(u!==!0)throw new Se("option "+s+" must be "+u,Se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Se("Unknown option "+s,Se.ERR_BAD_OPTION)}}var KR,_Y,nb,bY=se(()=>{"use strict";J_();Zs();KR={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{KR[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});_Y={};KR.transitional=function(t,r,n){function i(s,o){return"[Axios v"+yl+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,a)=>{if(t===!1)throw new Se(i(o," has been removed"+(r?" in "+r:"")),Se.ERR_DEPRECATED);return r&&!_Y[o]&&(_Y[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,o,a):!0}};nb={assertOptions:nYe,validators:KR}});var Yu,Fp,ig,wY=se(()=>{"use strict";lr();j_();oX();xY();VR();G_();bY();Vu();Yu=nb.validators,Fp=class{constructor(t){this.defaults=t,this.interceptors={request:new wR,response:new wR}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Pa(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&nb.assertOptions(n,{silentJSONParsing:Yu.transitional(Yu.boolean),forcedJSONParsing:Yu.transitional(Yu.boolean),clarifyTimeoutError:Yu.transitional(Yu.boolean)},!1),i!=null&&(J.isFunction(i)?r.paramsSerializer={serialize:i}:nb.assertOptions(i,{encode:Yu.function,serialize:Yu.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o;o=s&&J.merge(s.common,s[r.method]),o&&J.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=sn.concat(o,s);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,d;if(!u){let v=[rb.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,c),d=v.length,f=Promise.resolve(r);p<d;)f=f.then(v[p++],v[p++]);return f}d=a.length;let m=r;for(p=0;p<d;){let v=a[p++],_=a[p++];try{m=v(m)}catch(b){_.call(this,b);break}}try{f=rb.call(this,m)}catch(v){return Promise.reject(v)}for(p=0,d=c.length;p<d;)f=f.then(c[p++],c[p++]);return f}getUri(t){t=Pa(this.defaults,t);let r=ml(t.baseURL,t.url);return hl(r,t.params,t.paramsSerializer)}};J.forEach(["delete","get","head","options"],function(t){Fp.prototype[t]=function(r,n){return this.request(Pa(n||{},{method:t,url:r,data:(n||{}).data}))}});J.forEach(["post","put","patch"],function(t){function r(n){return function(s,o,a){return this.request(Pa(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Fp.prototype[t]=r(),Fp.prototype[t+"Form"]=r(!0)});ig=Fp});var sg,EY,SY=se(()=>{"use strict";qp();sg=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s,o=new Promise(a=>{n.subscribe(a),s=a}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},t(function(s,o,a){n.reason||(n.reason=new eo(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new sg(function(i){t=i}),cancel:t}}},EY=sg});function XR(e){return function(r){return e.apply(null,r)}}var CY=se(()=>{"use strict"});function YR(e){return J.isObject(e)&&e.isAxiosError===!0}var TY=se(()=>{"use strict";lr()});var JR,AY,OY=se(()=>{JR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(JR).forEach(([e,t])=>{JR[t]=e});AY=JR});function IY(e){let t=new ig(e),r=Wm(ig.prototype.request,t);return J.extend(r,ig.prototype,t,{allOwnKeys:!0}),J.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return IY(Pa(e,i))},r}var on,Lo,RY=se(()=>{"use strict";lr();iR();wY();VR();$_();SR();qp();SY();TR();J_();Km();Zs();CY();TY();Vu();OY();on=IY(Rp);on.Axios=ig;on.CanceledError=eo;on.CancelToken=EY;on.isCancel=Jm;on.VERSION=yl;on.toFormData=Wu;on.AxiosError=Se;on.Cancel=on.CanceledError;on.all=function(t){return Promise.all(t)};on.spread=XR;on.isAxiosError=YR;on.mergeConfig=Pa;on.AxiosHeaders=sn;on.formToJSON=e=>H_(J.isHTMLForm(e)?new FormData(e):e);on.HttpStatusCode=AY;on.default=on;Lo=on});var xYt,yYt,_Yt,bYt,wYt,EYt,SYt,CYt,TYt,AYt,OYt,IYt,RYt,NYt,qYt,ib=se(()=>{RY();({Axios:xYt,AxiosError:yYt,CanceledError:_Yt,isCancel:bYt,CancelToken:wYt,VERSION:EYt,all:SYt,Cancel:CYt,isAxiosError:TYt,spread:AYt,toFormData:OYt,AxiosHeaders:IYt,HttpStatusCode:RYt,formToJSON:NYt,mergeConfig:qYt}=Lo)});var qY=g((kYt,NY)=>{"use strict";var iYe=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);NY.exports=e=>!iYe.has(e&&e.code)});function PY(e,t,r,n,i,s,o){try{var a=e[s](o),u=a.value}catch(c){r(c);return}a.done?t(u):Promise.resolve(u).then(n,i)}function FY(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var s=e.apply(t,r);function o(u){PY(s,n,i,o,a,"next",u)}function a(u){PY(s,n,i,o,a,"throw",u)}o(void 0)})}}function kY(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kY(Object(r),!0).forEach(function(n){sYe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kY(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sYe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BY(e){return!e.response&&!!e.code&&e.code!=="ECONNABORTED"&&(0,MY.default)(e)}function eN(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function aYe(e){return e.config?eN(e)&&jY.indexOf(e.config.method)!==-1:!1}function UY(e){return e.config?eN(e)&&oYe.indexOf(e.config.method)!==-1:!1}function HY(e){return BY(e)||UY(e)}function uYe(){return 0}function cYe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=Math.pow(2,e)*100,r=t*.2*Math.random();return t+r}function LY(e){var t=e[ZR]||{};return t.retryCount=t.retryCount||0,e[ZR]=t,t}function lYe(e,t){return DY(DY({},t),e[ZR])}function fYe(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function pYe(e,t,r,n){return QR.apply(this,arguments)}function QR(){return QR=FY(function*(e,t,r,n){var i=r.retryCount<e&&t(n);if(typeof i=="object")try{var s=yield i;return s!==!1}catch{return!1}return i}),QR.apply(this,arguments)}function to(e,t){e.interceptors.request.use(r=>{var n=LY(r);return n.lastRequestTime=Date.now(),r}),e.interceptors.response.use(null,function(){var r=FY(function*(n){var{config:i}=n;if(!i)return Promise.reject(n);var{retries:s=3,retryCondition:o=HY,retryDelay:a=uYe,shouldResetTimeout:u=!1,onRetry:c=()=>{}}=lYe(i,t),f=LY(i);if(yield pYe(s,o,f,n)){f.retryCount+=1;var p=a(f.retryCount,n);if(fYe(e,i),!u&&i.timeout&&f.lastRequestTime){var d=Date.now()-f.lastRequestTime,m=i.timeout-d-p;if(m<=0)return Promise.reject(n);i.timeout=m}return i.transformRequest=[v=>v],c(f.retryCount,n,i),new Promise(v=>setTimeout(()=>v(e(i)),p))}return Promise.reject(n)});return function(n){return r.apply(this,arguments)}}())}var MY,ZR,jY,oYe,zY=se(()=>{MY=ve(qY(),1);ZR="axios-retry";jY=["get","head","options"],oYe=jY.concat(["put","delete"]);to.isNetworkError=BY;to.isSafeRequestError=aYe;to.isIdempotentRequestError=UY;to.isNetworkOrIdempotentRequestError=HY;to.exponentialDelay=cYe;to.isRetryableError=eN});var rN=g((LYt,GY)=>{"use strict";var og=e=>e&&typeof e.message=="string",tN=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return og(r)?r:void 0}else return og(t)?t:void 0},$Y=(e,t)=>{if(!og(e))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
24
24
|
causes have become circular...`;let n=tN(e);return n?(t.add(e),r+`
|
|
25
25
|
caused by: `+$Y(n,t)):r},dYe=e=>$Y(e,new Set),WY=(e,t,r)=>{if(!og(e))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=tN(e);if(i){t.add(e);let s=typeof e.cause=="function";return n+(s?"":": ")+WY(i,t,s)}else return n},hYe=e=>WY(e,new Set);GY.exports={isErrorLike:og,getErrorCause:tN,stackWithCauses:dYe,messageWithCauses:hYe}});var nN=g((FYt,KY)=>{"use strict";var mYe=Symbol("circular-ref-tag"),sb=Symbol("pino-raw-err-ref"),VY=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[sb]},set:function(e){this[sb]=e}}});Object.defineProperty(VY,sb,{writable:!0,value:{}});KY.exports={pinoErrProto:VY,pinoErrorSymbols:{seen:mYe,rawSymbol:sb}}});var JY=g((MYt,YY)=>{"use strict";YY.exports=sN;var{messageWithCauses:gYe,stackWithCauses:vYe,isErrorLike:XY}=rN(),{pinoErrProto:xYe,pinoErrorSymbols:yYe}=nN(),{seen:iN}=yYe,{toString:_Ye}=Object.prototype;function sN(e){if(!XY(e))return e;e[iN]=void 0;let t=Object.create(xYe);t.type=_Ye.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=gYe(e),t.stack=vYe(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>sN(r)));for(let r in e)if(t[r]===void 0){let n=e[r];XY(n)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,iN)&&(t[r]=sN(n)):t[r]=n}return delete e[iN],t.raw=e,t}});var QY=g((BYt,ZY)=>{"use strict";ZY.exports=ab;var{isErrorLike:oN}=rN(),{pinoErrProto:bYe,pinoErrorSymbols:wYe}=nN(),{seen:ob}=wYe,{toString:EYe}=Object.prototype;function ab(e){if(!oN(e))return e;e[ob]=void 0;let t=Object.create(bYe);t.type=EYe.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>ab(r))),oN(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,ob)&&(t.cause=ab(e.cause));for(let r in e)if(t[r]===void 0){let n=e[r];oN(n)?Object.prototype.hasOwnProperty.call(n,ob)||(t[r]=ab(n)):t[r]=n}return delete e[ob],t.raw=e,t}});var nJ=g((jYt,rJ)=>{"use strict";rJ.exports={mapHttpRequest:SYe,reqSerializer:tJ};var aN=Symbol("pino-raw-req-ref"),eJ=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[aN]},set:function(e){this[aN]=e}}});Object.defineProperty(eJ,aN,{writable:!0,value:{}});function tJ(e){let t=e.info||e.socket,r=Object.create(eJ);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function SYe(e){return{req:tJ(e)}}});var aJ=g((UYt,oJ)=>{"use strict";oJ.exports={mapHttpResponse:CYe,resSerializer:sJ};var uN=Symbol("pino-raw-res-ref"),iJ=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[uN]},set:function(e){this[uN]=e}}});Object.defineProperty(iJ,uN,{writable:!0,value:{}});function sJ(e){let t=Object.create(iJ);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function CYe(e){return{res:sJ(e)}}});var lN=g((HYt,uJ)=>{"use strict";var cN=JY(),TYe=QY(),ub=nJ(),cb=aJ();uJ.exports={err:cN,errWithCause:TYe,mapHttpRequest:ub.mapHttpRequest,mapHttpResponse:cb.mapHttpResponse,req:ub.reqSerializer,res:cb.resSerializer,wrapErrorSerializer:function(t){return t===cN?t:function(n){return t(cN(n))}},wrapRequestSerializer:function(t){return t===ub.reqSerializer?t:function(n){return t(ub.reqSerializer(n))}},wrapResponseSerializer:function(t){return t===cb.resSerializer?t:function(n){return t(cb.resSerializer(n))}}}});var fN=g((zYt,cJ)=>{"use strict";function AYe(e,t){return t}cJ.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=AYe;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let s of n)s&&i.push(s.getFileName());return i}});var fJ=g(($Yt,lJ)=>{"use strict";var{createContext:OYe,runInContext:IYe}=require("vm");lJ.exports=RYe;function RYe(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=n=>`fast-redact \u2013 Invalid path (${n})`}=e;return function({paths:i}){i.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let o=new Proxy({},{get:()=>o,set:()=>{throw Error()}}),a=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(a)||/\/\*/.test(a))throw Error();IYe(`
|
|
26
26
|
(function () {
|
|
@@ -137,7 +137,7 @@ Url: `+pw(e)),!0)}Lg._shouldDropEvent=jre;function rut(e,t){return!t||!t.length?
|
|
|
137
137
|
`;n.auth&&(o["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:c,port:f,secureEndpoint:p}=r;Wut(f,p)||(c+=`:${f}`),o.Host=c,o.Connection="close";for(let b of Object.keys(o))u+=`${b}: ${o[b]}\r
|
|
138
138
|
`;let d=zut.default(s);s.write(`${u}\r
|
|
139
139
|
`);let{statusCode:m,buffered:v}=yield d;if(m===200){if(t.once("socket",$ut),r.secureEndpoint){jg("Upgrading socket connection to TLS");let b=r.servername||r.host;return Qre.default.connect(Object.assign(Object.assign({},Vut(r,"host","hostname","path","port")),{socket:s,servername:b}))}return s}s.destroy();let _=new Zre.default.Socket({writable:!1});return _.readable=!0,t.once("socket",b=>{jg("replaying proxy buffer for failed request"),jut.default(b.listenerCount("data")>0),b.push(v),b.push(null)}),_})}};ql.default=Yq;function $ut(e){e.resume()}function Wut(e,t){return!!(!t&&e===80||t&&e===443)}function Gut(e){return typeof e=="string"?/^https:?$/i.test(e):!1}function Vut(e,...t){let r={},n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}});var gw=g((Qq,tne)=>{"use strict";var Kut=Qq&&Qq.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jq=Kut(ene());function Zq(e){return new Jq.default(e)}(function(e){e.HttpsProxyAgent=Jq.default,e.prototype=Jq.default.prototype})(Zq||(Zq={}));tne.exports=Zq});var ine=g(eP=>{Object.defineProperty(eP,"__esModule",{value:!0});var Xut=(Nn(),pt(Rn)),rne=an(),nne=require("http"),Yut=hw(),Jut=function(e){Xut.__extends(t,e);function t(r){var n=e.call(this,r)||this;n.options=r;var i=n._getProxy("http");return n.module=nne,n.client=i?new(gw())(i):new nne.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return t.prototype.sendEvent=function(r){return this._send(rne.eventToSentryRequest(r,this._api),r)},t.prototype.sendSession=function(r){return this._send(rne.sessionToSentryRequest(r,this._api),r)},t}(Yut.BaseTransport);eP.HTTPTransport=Jut});var ane=g(tP=>{Object.defineProperty(tP,"__esModule",{value:!0});var Zut=(Nn(),pt(Rn)),sne=an(),one=require("https"),Qut=hw(),ect=function(e){Zut.__extends(t,e);function t(r){var n=e.call(this,r)||this;n.options=r;var i=n._getProxy("https");return n.module=one,n.client=i?new(gw())(i):new one.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return t.prototype.sendEvent=function(r){return this._send(sne.eventToSentryRequest(r,this._api),r)},t.prototype.sendSession=function(r){return this._send(sne.sessionToSentryRequest(r,this._api),r)},t}(Qut.BaseTransport);tP.HTTPSTransport=ect});var cne=g(rP=>{Object.defineProperty(rP,"__esModule",{value:!0});var tct=an(),rct=Ot(),nct=require("http"),ict=require("https"),une=require("url");function sct(e){var t,r=new une.URL(e.url),n=r.protocol==="https:",i=oct(r,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),s=n?ict:nct,o=i?new(gw())(i):new s.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),a=act(e,(t=e.httpModule,t??s),o);return tct.createTransport({bufferSize:e.bufferSize},a)}rP.makeNodeTransport=sct;function oct(e,t){var r=process.env.no_proxy,n=r&&r.split(",").some(function(i){return e.host.endsWith(i)||e.hostname.endsWith(i)});if(!n)return t}function act(e,t,r){var n=new une.URL(e.url),i=n.hostname,s=n.pathname,o=n.port,a=n.protocol,u=n.search;return function(f){return new Promise(function(p,d){var m=t.request({method:"POST",agent:r,headers:e.headers,hostname:i,path:""+s+u,port:o,protocol:a,ca:e.caCerts},function(v){var _,b,y;v.on("data",function(){}),v.on("end",function(){});var T=(_=v.statusCode,_??500),S=rct.eventStatusFromHttpCode(T);v.setEncoding("utf8");var E=(b=v.headers["retry-after"],b??null),C=(y=v.headers["x-sentry-rate-limits"],y??null);p({headers:{"retry-after":E,"x-sentry-rate-limits":Array.isArray(C)?C[0]:C},reason:S,statusCode:T})});m.on("error",d),m.end(f.body)})}}});var nP=g(ld=>{Object.defineProperty(ld,"__esModule",{value:!0});var uct=hw();ld.BaseTransport=uct.BaseTransport;var cct=ine();ld.HTTPTransport=cct.HTTPTransport;var lct=ane();ld.HTTPSTransport=lct.HTTPSTransport;var fct=cne();ld.makeNodeTransport=fct.makeNodeTransport});var uP=g(aP=>{Object.defineProperty(aP,"__esModule",{value:!0});var fd=(Nn(),pt(Rn)),iP=an(),pct=Kp(),sP=Ot(),lne=jq(),oP=nP(),dct=function(e){fd.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.eventFromException=function(r,n){return sP.resolvedSyncPromise(lne.eventFromUnknownInput(r,n))},t.prototype.eventFromMessage=function(r,n,i){return n===void 0&&(n=pct.Severity.Info),sP.resolvedSyncPromise(lne.eventFromMessage(r,n,i,this._options.attachStacktrace))},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var r=sP.makeDsn(this._options.dsn),n=fd.__assign(fd.__assign(fd.__assign(fd.__assign(fd.__assign({},this._options.transportOptions),this._options.httpProxy&&{httpProxy:this._options.httpProxy}),this._options.httpsProxy&&{httpsProxy:this._options.httpsProxy}),this._options.caCerts&&{caCerts:this._options.caCerts}),{dsn:this._options.dsn,tunnel:this._options.tunnel,_metadata:this._options._metadata});if(this._options.transport)return new this._options.transport(n);var i=iP.initAPIDetails(n.dsn,n._metadata,n.tunnel),s=iP.getEnvelopeEndpointWithUrlEncodedAuth(i.dsn,i.tunnel);return this._newTransport=oP.makeNodeTransport({url:s,headers:n.headers,proxy:n.httpProxy,caCerts:n.caCerts}),r.protocol==="http"?new oP.HTTPTransport(n):new oP.HTTPSTransport(n)},t}(iP.BaseBackend);aP.NodeBackend=dct});var fP=g(lP=>{Object.defineProperty(lP,"__esModule",{value:!0});var hct=(Nn(),pt(Rn)),cP=an(),mct=jo(),fne=Ot(),gct=uP(),pne=cc(),vct=function(e){hct.__extends(t,e);function t(r){var n=this;return r._metadata=r._metadata||{},r._metadata.sdk=r._metadata.sdk||{name:"sentry.javascript.node",packages:[{name:"npm:@sentry/node",version:cP.SDK_VERSION}],version:cP.SDK_VERSION},n=e.call(this,gct.NodeBackend,r)||this,n}return t.prototype.captureException=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=i.getRequestSession();s&&s.status==="ok"&&(s.status="errored")}return e.prototype.captureException.call(this,r,n,i)},t.prototype.captureEvent=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=r.type||"exception",o=s==="exception"&&r.exception&&r.exception.values&&r.exception.values.length>0;if(o){var a=i.getRequestSession();a&&a.status==="ok"&&(a.status="errored")}}return e.prototype.captureEvent.call(this,r,n,i)},t.prototype.close=function(r){var n;return(n=this._sessionFlusher)===null||n===void 0||n.close(),e.prototype.close.call(this,r)},t.prototype.initSessionFlusher=function(){var r=this._options,n=r.release,i=r.environment;n?this._sessionFlusher=new mct.SessionFlusher(this.getTransport(),{release:n,environment:i}):pne.IS_DEBUG_BUILD&&fne.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")},t.prototype._prepareEvent=function(r,n,i){return r.platform=r.platform||"node",this.getOptions().serverName&&(r.server_name=this.getOptions().serverName),e.prototype._prepareEvent.call(this,r,n,i)},t.prototype._captureRequestSession=function(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():pne.IS_DEBUG_BUILD&&fne.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")},t}(cP.BaseClient);lP.NodeClient=vct});var vne=g(pP=>{Object.defineProperty(pP,"__esModule",{value:!0});var hne=(Nn(),pt(Rn)),dne=an(),mne=Ot(),xct=require("util"),gne=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){var t,r;try{for(var n=hne.__values(["debug","info","warn","error","log"]),i=n.next();!i.done;i=n.next()){var s=i.value;mne.fill(console,s,yct(s))}}catch(o){t={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.id="Console",e}();pP.Console=gne;function yct(e){return function(r){var n=mne.severityFromString(e);return function(){dne.getCurrentHub().getIntegration(gne)&&dne.getCurrentHub().addBreadcrumb({category:"console",level:n,message:xct.format.apply(void 0,arguments)},{input:hne.__spread(arguments),level:e}),r.apply(this,arguments)}}}});var bne=g(Pl=>{Object.defineProperty(Pl,"__esModule",{value:!0});var dP=(Nn(),pt(Rn)),_ct=an(),bct=Ot(),xne=require("url"),yne=bct.parseSemver(process.versions.node);function wct(e){var t,r=(t=_ct.getCurrentHub().getClient())===null||t===void 0?void 0:t.getDsn();return r?e.includes(r.host):!1}Pl.isSentryRequest=wct;function _ne(e){var t=e.protocol||"",r=e.hostname||e.host||"",n=!e.port||e.port===80||e.port===443?"":":"+e.port,i=e.path?e.path:"/";return t+"//"+r+n+i}Pl.extractUrl=_ne;function Ect(e,t,r){var n,i,s;if(!e)return e;var o=dP.__read(e.split(" "),2),a=o[0],u=o[1];return t.host&&!t.protocol&&(t.protocol=(i=(n=r)===null||n===void 0?void 0:n.agent)===null||i===void 0?void 0:i.protocol,u=_ne(t)),!((s=u)===null||s===void 0)&&s.startsWith("///")&&(u=u.slice(2)),a+" "+u}Pl.cleanSpanDescription=Ect;function hP(e){var t={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:""+(e.pathname||"")+(e.search||""),href:e.href};return e.port!==""&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=e.username+":"+e.password),t}Pl.urlToOptions=hP;function Sct(e,t){var r,n,i,s,o,a,u,c,f,p;return typeof t[t.length-1]=="function"&&(f=t.pop()),typeof t[0]=="string"?p=hP(new xne.URL(t[0])):t[0]instanceof xne.URL?p=hP(t[0]):p=t[0],t.length===2&&(p=dP.__assign(dP.__assign({},p),t[1])),p.protocol===void 0&&(yne.major&&yne.major>8?p.protocol=((n=(r=e)===null||r===void 0?void 0:r.globalAgent)===null||n===void 0?void 0:n.protocol)||((i=p.agent)===null||i===void 0?void 0:i.protocol)||((s=p._defaultAgent)===null||s===void 0?void 0:s.protocol):p.protocol=((o=p.agent)===null||o===void 0?void 0:o.protocol)||((a=p._defaultAgent)===null||a===void 0?void 0:a.protocol)||((c=(u=e)===null||u===void 0?void 0:u.globalAgent)===null||c===void 0?void 0:c.protocol)),f?[p,f]:[p]}Pl.normalizeRequestArgs=Sct});var Tne=g(gP=>{Object.defineProperty(gP,"__esModule",{value:!0});var wne=(Nn(),pt(Rn)),mP=an(),pd=Ot(),Cct=cc(),Ug=bne(),Ene=pd.parseSemver(process.versions.node),Cne=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this._breadcrumbs=typeof t.breadcrumbs>"u"?!0:t.breadcrumbs,this._tracing=typeof t.tracing>"u"?!1:t.tracing}return e.prototype.setupOnce=function(){if(!(!this._breadcrumbs&&!this._tracing)){var t=Tct(this._breadcrumbs,this._tracing),r=require("http");if(pd.fill(r,"get",t),pd.fill(r,"request",t),Ene.major&&Ene.major>8){var n=require("https");pd.fill(n,"get",t),pd.fill(n,"request",t)}}},e.id="Http",e}();gP.Http=Cne;function Tct(e,t){return function(n){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=this,u=Ug.normalizeRequestArgs(this,s),c=u[0],f=Ug.extractUrl(c);if(Ug.isSentryRequest(f))return n.apply(a,u);var p,d,m=mP.getCurrentHub().getScope();if(m&&t&&(d=m.getSpan(),d)){p=d.startChild({description:(c.method||"GET")+" "+f,op:"http.client"});var v=p.toTraceparent();Cct.IS_DEBUG_BUILD&&pd.logger.log("[Tracing] Adding sentry-trace header "+v+" to outgoing request to "+f+": "),c.headers=wne.__assign(wne.__assign({},c.headers),{"sentry-trace":v})}return n.apply(a,u).once("response",function(_){var b=this;e&&Sne("response",f,b,_),t&&p&&(_.statusCode&&p.setHttpStatus(_.statusCode),p.description=Ug.cleanSpanDescription(p.description,c,b),p.finish())}).once("error",function(){var _=this;e&&Sne("error",f,_),t&&p&&(p.setHttpStatus(500),p.description=Ug.cleanSpanDescription(p.description,c,_),p.finish())})}}}function Sne(e,t,r,n){mP.getCurrentHub().getIntegration(Cne)&&mP.getCurrentHub().addBreadcrumb({category:"http",data:{method:r.method,status_code:n&&n.statusCode,url:t},type:"http"},{event:e,request:r,response:n})}});var yP=g(xP=>{Object.defineProperty(xP,"__esModule",{value:!0});var Act=an(),vP=Ot(),Ane=cc(),Oct=2e3;function Ict(e){console.error(e&&e.stack?e.stack:e);var t=Act.getCurrentHub().getClient();t===void 0&&(Ane.IS_DEBUG_BUILD&&vP.logger.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1));var r=t.getOptions(),n=r&&r.shutdownTimeout&&r.shutdownTimeout>0&&r.shutdownTimeout||Oct;vP.forget(t.close(n).then(function(i){i||Ane.IS_DEBUG_BUILD&&vP.logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)}))}xP.logAndExitProcess=Ict});var Rne=g(_P=>{Object.defineProperty(_P,"__esModule",{value:!0});var One=an(),Rct=Kp(),Nct=Ot(),qct=cc(),Ine=yP(),Pct=function(){function e(t){t===void 0&&(t={}),this._options=t,this.name=e.id,this.handler=this._makeErrorHandler()}return e.prototype.setupOnce=function(){global.process.on("uncaughtException",this.handler.bind(this))},e.prototype._makeErrorHandler=function(){var t=this,r=2e3,n=!1,i=!1,s=!1,o;return function(a){var u=Ine.logAndExitProcess,c=One.getCurrentHub().getClient();if(t._options.onFatalError?u=t._options.onFatalError:c&&c.getOptions().onFatalError&&(u=c.getOptions().onFatalError),n)s?(qct.IS_DEBUG_BUILD&&Nct.logger.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Ine.logAndExitProcess(a)):i||(i=!0,setTimeout(function(){s||(s=!0,u(o,a))},r));else{var f=One.getCurrentHub();o=a,n=!0,f.getIntegration(e)?f.withScope(function(p){p.setLevel(Rct.Severity.Fatal),f.captureException(a,{originalException:a,data:{mechanism:{handled:!1,type:"onuncaughtexception"}}}),s||(s=!0,u(a))}):s||(s=!0,u(a))}}},e.id="OnUncaughtException",e}();_P.OnUncaughtException=Pct});var qne=g(bP=>{Object.defineProperty(bP,"__esModule",{value:!0});var kct=an(),Nne=Ot(),Dct=yP(),Lct=function(){function e(t){t===void 0&&(t={mode:"warn"}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(){global.process.on("unhandledRejection",this.sendUnhandledPromise.bind(this))},e.prototype.sendUnhandledPromise=function(t,r){var n=kct.getCurrentHub();if(!n.getIntegration(e)){this._handleRejection(t);return}var i=r.domain&&r.domain.sentryContext||{};n.withScope(function(s){s.setExtra("unhandledPromiseRejection",!0),i.user&&s.setUser(i.user),i.tags&&s.setTags(i.tags),i.extra&&s.setExtras(i.extra),n.captureException(t,{originalException:r,data:{mechanism:{handled:!1,type:"onunhandledrejection"}}})}),this._handleRejection(t)},e.prototype._handleRejection=function(t){var r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";this._options.mode==="warn"?Nne.consoleSandbox(function(){console.warn(r),console.error(t&&t.stack?t.stack:t)}):this._options.mode==="strict"&&(Nne.consoleSandbox(function(){console.warn(r)}),Dct.logAndExitProcess(t))},e.id="OnUnhandledRejection",e}();bP.OnUnhandledRejection=Lct});var Pne=g(vw=>{(function(e,t){let r=typeof vw=="object"?vw:typeof e=="object"?e:{};t(r),typeof define=="function"&&define.amd&&define("lru",r)})(vw,function(e){let t=Symbol("newer"),r=Symbol("older");function n(u,c){typeof u!="number"&&(c=u,u=0),this.size=0,this.limit=u,this.oldest=this.newest=void 0,this._keymap=new Map,c&&(this.assign(c),u<1&&(this.limit=this.size))}e.LRUMap=n;function i(u,c){this.key=u,this.value=c,this[t]=void 0,this[r]=void 0}n.prototype._markEntryAsUsed=function(u){u!==this.newest&&(u[t]&&(u===this.oldest&&(this.oldest=u[t]),u[t][r]=u[r]),u[r]&&(u[r][t]=u[t]),u[t]=void 0,u[r]=this.newest,this.newest&&(this.newest[t]=u),this.newest=u)},n.prototype.assign=function(u){let c,f=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=u[Symbol.iterator]();for(let d=p.next();!d.done;d=p.next()){let m=new i(d.value[0],d.value[1]);if(this._keymap.set(m.key,m),c?(c[t]=m,m[r]=c):this.oldest=m,c=m,f--==0)throw new Error("overflow")}this.newest=c,this.size=this._keymap.size},n.prototype.get=function(u){var c=this._keymap.get(u);if(c)return this._markEntryAsUsed(c),c.value},n.prototype.set=function(u,c){var f=this._keymap.get(u);return f?(f.value=c,this._markEntryAsUsed(f),this):(this._keymap.set(u,f=new i(u,c)),this.newest?(this.newest[t]=f,f[r]=this.newest):this.oldest=f,this.newest=f,++this.size,this.size>this.limit&&this.shift(),this)},n.prototype.shift=function(){var u=this.oldest;if(u)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[r]=void 0):(this.oldest=void 0,this.newest=void 0),u[t]=u[r]=void 0,this._keymap.delete(u.key),--this.size,[u.key,u.value]},n.prototype.find=function(u){let c=this._keymap.get(u);return c?c.value:void 0},n.prototype.has=function(u){return this._keymap.has(u)},n.prototype.delete=function(u){var c=this._keymap.get(u);if(c)return this._keymap.delete(c.key),c[t]&&c[r]?(c[r][t]=c[t],c[t][r]=c[r]):c[t]?(c[t][r]=void 0,this.oldest=c[t]):c[r]?(c[r][t]=void 0,this.newest=c[r]):this.oldest=this.newest=void 0,this.size--,c.value},n.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()};function s(u){this.entry=u}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let u=this.entry;return u?(this.entry=u[t],{done:!1,value:[u.key,u.value]}):{done:!0,value:void 0}};function o(u){this.entry=u}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let u=this.entry;return u?(this.entry=u[t],{done:!1,value:u.key}):{done:!0,value:void 0}};function a(u){this.entry=u}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let u=this.entry;return u?(this.entry=u[t],{done:!1,value:u.value}):{done:!0,value:void 0}},n.prototype.keys=function(){return new o(this.oldest)},n.prototype.values=function(){return new a(this.oldest)},n.prototype.entries=function(){return this},n.prototype[Symbol.iterator]=function(){return new s(this.oldest)},n.prototype.forEach=function(u,c){typeof c!="object"&&(c=this);let f=this.oldest;for(;f;)u.call(c,f.value,f.key,this),f=f[t]},n.prototype.toJSON=function(){for(var u=new Array(this.size),c=0,f=this.oldest;f;)u[c++]={key:f.key,value:f.value},f=f[t];return u},n.prototype.toString=function(){for(var u="",c=this.oldest;c;)u+=String(c.key)+":"+c.value,c=c[t],c&&(u+=" < ");return u}})});var EP=g(xw=>{Object.defineProperty(xw,"__esModule",{value:!0});var fc=(Nn(),pt(Rn)),Fct=an(),Mct=Ot(),Bct=require("fs"),jct=Pne(),wP=new jct.LRUMap(100),Uct=7;function Hct(e){return new Promise(function(t,r){Bct.readFile(e,"utf8",function(n,i){n?r(n):t(i)})})}function zct(){wP.clear()}xw.resetFileContentCache=zct;var $ct=function(){function e(t){t===void 0&&(t={}),this._options=t,this.name=e.id}return Object.defineProperty(e.prototype,"_contextLines",{get:function(){var t,r;if(this._options.frameContextLines===void 0){var n=(t=Fct.getCurrentHub().getClient())===null||t===void 0?void 0:t.getOptions();this._options.frameContextLines=(r=n)===null||r===void 0?void 0:r.frameContextLines}return this._options.frameContextLines!==void 0?this._options.frameContextLines:Uct},enumerable:!0,configurable:!0}),e.prototype.setupOnce=function(t){var r=this;t(function(n){return r.addSourceContext(n)})},e.prototype.addSourceContext=function(t){var r,n;return fc.__awaiter(this,void 0,void 0,function(){var i,s,o,a,u,c;return fc.__generator(this,function(f){switch(f.label){case 0:if(!(this._contextLines>0&&(!((r=t.exception)===null||r===void 0)&&r.values)))return[3,8];f.label=1;case 1:f.trys.push([1,6,7,8]),i=fc.__values(t.exception.values),s=i.next(),f.label=2;case 2:return s.done?[3,5]:(o=s.value,!((n=o.stacktrace)===null||n===void 0)&&n.frames?[4,this.addSourceContextToFrames(o.stacktrace.frames)]:[3,4]);case 3:f.sent(),f.label=4;case 4:return s=i.next(),[3,2];case 5:return[3,8];case 6:return a=f.sent(),u={error:a},[3,8];case 7:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 8:return[2,t]}})})},e.prototype.addSourceContextToFrames=function(t){return fc.__awaiter(this,void 0,void 0,function(){var r,n,i,s,o,a,u,c,f;return fc.__generator(this,function(p){switch(p.label){case 0:r=this._contextLines,p.label=1;case 1:p.trys.push([1,6,7,8]),n=fc.__values(t),i=n.next(),p.label=2;case 2:return i.done?[3,5]:(s=i.value,s.filename&&s.context_line===void 0?[4,Wct(s.filename)]:[3,4]);case 3:if(o=p.sent(),o)try{a=o.split(`
|
|
140
|
-
`),Mct.addContextToFrame(a,s,r)}catch{}p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return u=p.sent(),c={error:u},[3,8];case 7:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(c)throw c.error}return[7];case 8:return[2]}})})},e.id="ContextLines",e}();xw.ContextLines=$ct;function Wct(e){return fc.__awaiter(this,void 0,void 0,function(){var t,r,n;return fc.__generator(this,function(i){switch(i.label){case 0:if(t=wP.get(e),t!==void 0)return[2,t];r=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Hct(e)];case 2:return r=i.sent(),[3,4];case 3:return n=i.sent(),[3,4];case 4:return wP.set(e,r),[2,r]}})})}});var kne=g(CP=>{Object.defineProperty(CP,"__esModule",{value:!0});var yw=(Nn(),pt(Rn)),SP=an(),_w=Ot(),Gct=jq(),Vct=EP(),Kct="cause",Xct=5,Yct=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this._key=t.key||Kct,this._limit=t.limit||Xct}return e.prototype.setupOnce=function(){SP.addGlobalEventProcessor(function(t,r){var n=SP.getCurrentHub().getIntegration(e);if(n){var i=n._handler&&n._handler.bind(n);return typeof i=="function"?i(t,r):t}return t})},e.prototype._handler=function(t,r){var n=this;return!t.exception||!t.exception.values||!r||!_w.isInstanceOf(r.originalException,Error)?_w.resolvedSyncPromise(t):new _w.SyncPromise(function(i){n._walkErrorTree(r.originalException,n._key).then(function(s){t&&t.exception&&t.exception.values&&(t.exception.values=yw.__spread(s,t.exception.values)),i(t)}).then(null,function(){i(t)})})},e.prototype._walkErrorTree=function(t,r,n){n===void 0&&(n=[]);var i;return yw.__awaiter(this,void 0,void 0,function(){var s,o,a=this;return yw.__generator(this,function(u){switch(u.label){case 0:return!_w.isInstanceOf(t[r],Error)||n.length+1>=this._limit?[2,Promise.resolve(n)]:(s=Gct.exceptionFromError(t[r]),o=SP.getCurrentHub().getIntegration(Vct.ContextLines),o&&(!((i=s.stacktrace)===null||i===void 0)&&i.frames)?[4,o.addSourceContextToFrames(s.stacktrace.frames)]:[3,2]);case 1:u.sent(),u.label=2;case 2:return[2,new Promise(function(c,f){a._walkErrorTree(t[r],r,yw.__spread([s],n)).then(c).then(null,function(){f()})})]}})})},e.id="LinkedErrors",e}();CP.LinkedErrors=Yct});var Mne=g(AP=>{Object.defineProperty(AP,"__esModule",{value:!0});var Dne=(Nn(),pt(Rn)),Lne=require("fs"),Fne=require("path"),TP;function Jct(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function Zct(){var e=require.main&&require.main.paths||[],t=Jct(),r={},n={};return t.forEach(function(i){var s=i,o=function(){var a=s;if(s=Fne.dirname(a),!(!s||a===s||n[a])){if(e.indexOf(s)<0)return o();var u=Fne.join(a,"package.json");if(n[a]=!0,!Lne.existsSync(u))return o();try{var c=JSON.parse(Lne.readFileSync(u,"utf8"));r[c.name]=c.version}catch{}}};o()}),r}var Qct=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,r){var n=this;t(function(i){return r().getIntegration(e)?Dne.__assign(Dne.__assign({},i),{modules:n._getModules()}):i})},e.prototype._getModules=function(){return TP||(TP=Zct()),TP},e.id="Modules",e}();AP.Modules=Qct});var OP=g(za=>{Object.defineProperty(za,"__esModule",{value:!0});var elt=vne();za.Console=elt.Console;var tlt=Tne();za.Http=tlt.Http;var rlt=Rne();za.OnUncaughtException=rlt.OnUncaughtException;var nlt=qne();za.OnUnhandledRejection=nlt.OnUnhandledRejection;var ilt=kne();za.LinkedErrors=ilt.LinkedErrors;var slt=Mne();za.Modules=slt.Modules;var olt=EP();za.ContextLines=olt.ContextLines});var RP=g(Ho=>{Object.defineProperty(Ho,"__esModule",{value:!0});var Hg=(Nn(),pt(Rn)),pc=an(),Bne=jo(),IP=Ot(),alt=require("domain"),ult=fP(),jne=cc(),dd=OP();Ho.defaultIntegrations=[new pc.Integrations.InboundFilters,new pc.Integrations.FunctionToString,new dd.ContextLines,new dd.Console,new dd.Http,new dd.OnUncaughtException,new dd.OnUnhandledRejection,new dd.LinkedErrors];function clt(e){e===void 0&&(e={});var t,r=Bne.getMainCarrier(),n=((t=r.__SENTRY__)===null||t===void 0?void 0:t.integrations)||[];if(e.defaultIntegrations=e.defaultIntegrations===!1?[]:Hg.__spread(Array.isArray(e.defaultIntegrations)?e.defaultIntegrations:Ho.defaultIntegrations,n),e.dsn===void 0&&process.env.SENTRY_DSN&&(e.dsn=process.env.SENTRY_DSN),e.tracesSampleRate===void 0&&process.env.SENTRY_TRACES_SAMPLE_RATE){var i=parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);isFinite(i)&&(e.tracesSampleRate=i)}if(e.release===void 0){var s=Une();s!==void 0?e.release=s:e.autoSessionTracking=!1}e.environment===void 0&&process.env.SENTRY_ENVIRONMENT&&(e.environment=process.env.SENTRY_ENVIRONMENT),e.autoSessionTracking===void 0&&e.dsn!==void 0&&(e.autoSessionTracking=!0),alt.active&&Bne.setHubOnCarrier(r,pc.getCurrentHub()),pc.initAndBind(ult.NodeClient,e),e.autoSessionTracking&&hlt()}Ho.init=clt;function llt(){return pc.getCurrentHub().lastEventId()}Ho.lastEventId=llt;function flt(e){return Hg.__awaiter(this,void 0,void 0,function(){var t;return Hg.__generator(this,function(r){return t=pc.getCurrentHub().getClient(),t?[2,t.flush(e)]:(jne.IS_DEBUG_BUILD&&IP.logger.warn("Cannot flush events. No client defined."),[2,Promise.resolve(!1)])})})}Ho.flush=flt;function plt(e){return Hg.__awaiter(this,void 0,void 0,function(){var t;return Hg.__generator(this,function(r){return t=pc.getCurrentHub().getClient(),t?[2,t.close(e)]:(jne.IS_DEBUG_BUILD&&IP.logger.warn("Cannot flush events and disable SDK. No client defined."),[2,Promise.resolve(!1)])})})}Ho.close=plt;function dlt(e){if(e===void 0)return!1;var t=e&&e.getOptions();return t&&t.autoSessionTracking!==void 0?t.autoSessionTracking:!1}Ho.isAutoSessionTrackingEnabled=dlt;function Une(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;var t=IP.getGlobalObject();return t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id?t.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||e}Ho.getSentryRelease=Une;function hlt(){var e=pc.getCurrentHub();e.startSession(),process.on("beforeExit",function(){var t,r=(t=e.getScope())===null||t===void 0?void 0:t.getSession(),n=["exited","crashed"];r&&!n.includes(r.status)&&e.endSession()})}});var zne=g(qP=>{Object.defineProperty(qP,"__esModule",{value:!0});var Hne=(Nn(),pt(Rn)),bw=require("fs"),NP=require("path");function mlt(e){var t=NP.resolve(e);if(!bw.existsSync(t))throw new Error("Cannot read contents of "+t+". Directory does not exist.");if(!bw.statSync(t).isDirectory())throw new Error("Cannot read contents of "+t+", because it is not a directory.");var r=function(n){return bw.readdirSync(n).reduce(function(i,s){var o=NP.join(n,s);return bw.statSync(o).isDirectory()?Hne.__spread(i,r(o)):Hne.__spread(i,[o])},[])};return r(t).map(function(n){return NP.relative(t,n)})}qP.deepReadDirSync=mlt});var $ne=g(PP=>{"use strict";PP.parse=xlt;PP.serialize=ylt;var glt=decodeURIComponent,vlt=encodeURIComponent,ww=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function xlt(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},i=e.split(";"),s=n.decode||glt,o=0;o<i.length;o++){var a=i[o],u=a.indexOf("=");if(!(u<0)){var c=a.substring(0,u).trim();if(r[c]==null){var f=a.substring(u+1,a.length).trim();f[0]==='"'&&(f=f.slice(1,-1)),r[c]=_lt(f,s)}}}return r}function ylt(e,t,r){var n=r||{},i=n.encode||vlt;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ww.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!ww.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ww.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!ww.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function _lt(e,t){try{return t(e)}catch{return e}}});var Gne=g(Ll=>{Object.defineProperty(Ll,"__esModule",{value:!0});var zo=(Nn(),pt(Rn)),kl=an(),Dl=Ot(),blt=$ne(),wlt=require("domain"),Elt=require("os"),Slt=require("url"),Clt=cc(),zg=RP();function Tlt(){return function(t,r,n){var i;t.headers&&Dl.isString(t.headers["sentry-trace"])&&(i=Dl.extractTraceparentData(t.headers["sentry-trace"]));var s=kl.startTransaction(zo.__assign({name:Ew(t,{path:!0,method:!0}),op:"http.server"},i),{request:Sw(t)});kl.getCurrentHub().configureScope(function(o){o.setSpan(s)}),r.__sentry_transaction=s,r.once("finish",function(){setImmediate(function(){Alt(s,t),s.setHttpStatus(r.statusCode),s.finish()})}),n()}}Ll.tracingHandler=Tlt;function Alt(e,t){e&&(e.name=Ew(t,{path:!0,method:!0}),e.setData("url",t.originalUrl),e.setData("baseUrl",t.baseUrl),e.setData("query",t.query))}function Ew(e,t){t===void 0&&(t={});var r,n=(r=e.method)===null||r===void 0?void 0:r.toUpperCase(),i="";e.route?i=""+(e.baseUrl||"")+e.route.path:(e.originalUrl||e.url)&&(i=Dl.stripUrlQueryAndFragment(e.originalUrl||e.url||""));var s="";return t.method&&n&&(s+=n),t.method&&t.path&&(s+=" "),t.path&&i&&(s+=i),s}function Olt(e,t){var r;switch(t){case"path":return Ew(e,{path:!0});case"handler":return((r=e.route)===null||r===void 0?void 0:r.stack[0].name)||"<anonymous>";case"methodPath":default:return Ew(e,{path:!0,method:!0})}}var Ilt=["id","username","email"];function Rlt(e,t){var r={},n=Array.isArray(t)?t:Ilt;return n.forEach(function(i){e&&i in e&&(r[i]=e[i])}),r}var Nlt=["cookies","data","headers","method","query_string","url"];function Sw(e,t){t===void 0&&(t=Nlt);var r={},n=e.headers||e.header||{},i=e.method,s=e.hostname||e.host||n.host||"<no host>",o=e.protocol==="https"||e.secure||(e.socket||{}).encrypted?"https":"http",a=e.originalUrl||e.url||"",u=o+"://"+s+a;return t.forEach(function(c){switch(c){case"headers":r.headers=n;break;case"method":r.method=i;break;case"url":r.url=u;break;case"cookies":r.cookies=e.cookies||blt.parse(n.cookie||"");break;case"query_string":r.query_string=e.query||Slt.parse(a||"",!1).query;break;case"data":if(i==="GET"||i==="HEAD")break;e.body!==void 0&&(r.data=Dl.isString(e.body)?e.body:JSON.stringify(Dl.normalize(e.body)));break;default:({}).hasOwnProperty.call(e,c)&&(r[c]=e[c])}}),r}Ll.extractRequestData=Sw;function Wne(e,t,r){if(r=zo.__assign({ip:!1,request:!0,serverName:!0,transaction:!0,user:!0,version:!0},r),r.version&&(e.contexts=zo.__assign(zo.__assign({},e.contexts),{runtime:{name:"node",version:global.process.version}})),r.request){var n=Array.isArray(r.request)?Sw(t,r.request):Sw(t);e.request=zo.__assign(zo.__assign({},e.request),n)}if(r.serverName&&!e.server_name&&(e.server_name=global.process.env.SENTRY_NAME||Elt.hostname()),r.user){var i=t.user&&Dl.isPlainObject(t.user)?Rlt(t.user,r.user):{};Object.keys(i)&&(e.user=zo.__assign(zo.__assign({},e.user),i))}if(r.ip){var s=t.ip||t.connection&&t.connection.remoteAddress;s&&(e.user=zo.__assign(zo.__assign({},e.user),{ip_address:s}))}return r.transaction&&!e.transaction&&(e.transaction=Olt(t,r.transaction)),e}Ll.parseRequest=Wne;function qlt(e){var t=kl.getCurrentHub(),r=t.getClient();if(r&&zg.isAutoSessionTrackingEnabled(r)){r.initSessionFlusher();var n=t.getScope();n&&n.getSession()&&n.setSession()}return function(s,o,a){if(e&&e.flushTimeout&&e.flushTimeout>0){var u=o.end;o.end=function(f,p,d){var m=this;zg.flush(e.flushTimeout).then(function(){u.call(m,f,p,d)}).then(null,function(v){Clt.IS_DEBUG_BUILD&&Dl.logger.error(v),u.call(m,f,p,d)})}}var c=wlt.create();c.add(s),c.add(o),c.on("error",a),c.run(function(){var f=kl.getCurrentHub();f.configureScope(function(p){p.addEventProcessor(function(v){return Wne(v,s,e)});var d=f.getClient();if(zg.isAutoSessionTrackingEnabled(d)){var m=f.getScope();m&&m.setRequestSession({status:"ok"})}}),o.once("finish",function(){var p=f.getClient();zg.isAutoSessionTrackingEnabled(p)&&setImmediate(function(){p&&p._captureRequestSession&&p._captureRequestSession()})}),a()})}}Ll.requestHandler=qlt;function Plt(e){var t=e.status||e.statusCode||e.status_code||e.output&&e.output.statusCode;return t?parseInt(t,10):500}function klt(e){var t=Plt(e);return t>=500}function Dlt(e){return function(r,n,i,s){var o=e&&e.shouldHandleError||klt;if(o(r)){kl.withScope(function(a){var u=i.__sentry_transaction;u&&a.getSpan()===void 0&&a.setSpan(u);var c=kl.getCurrentHub().getClient();if(c&&zg.isAutoSessionTrackingEnabled(c)){var f=c._sessionFlusher!==void 0;if(f){var p=a.getRequestSession();p&&p.status!==void 0&&(p.status="crashed")}}var d=kl.captureException(r);i.sentry=d,s(r)});return}s(r)}}Ll.errorHandler=Dlt});var Kne=g(ct=>{Object.defineProperty(ct,"__esModule",{value:!0});var Vne=(Nn(),pt(Rn)),Llt=Kp();ct.Severity=Llt.Severity;var Br=an();ct.addGlobalEventProcessor=Br.addGlobalEventProcessor;ct.addBreadcrumb=Br.addBreadcrumb;ct.captureException=Br.captureException;ct.captureEvent=Br.captureEvent;ct.captureMessage=Br.captureMessage;ct.configureScope=Br.configureScope;ct.getHubFromCarrier=Br.getHubFromCarrier;ct.getCurrentHub=Br.getCurrentHub;ct.Hub=Br.Hub;ct.makeMain=Br.makeMain;ct.Scope=Br.Scope;ct.Session=Br.Session;ct.startTransaction=Br.startTransaction;ct.SDK_VERSION=Br.SDK_VERSION;ct.setContext=Br.setContext;ct.setExtra=Br.setExtra;ct.setExtras=Br.setExtras;ct.setTag=Br.setTag;ct.setTags=Br.setTags;ct.setUser=Br.setUser;ct.withScope=Br.withScope;var Flt=uP();ct.NodeBackend=Flt.NodeBackend;var Mlt=fP();ct.NodeClient=Mlt.NodeClient;var hd=RP();ct.defaultIntegrations=hd.defaultIntegrations;ct.init=hd.init;ct.lastEventId=hd.lastEventId;ct.flush=hd.flush;ct.close=hd.close;ct.getSentryRelease=hd.getSentryRelease;var Blt=zne();ct.deepReadDirSync=Blt.deepReadDirSync;var jlt=zq();ct.SDK_NAME=jlt.SDK_NAME;var Ult=an(),Hlt=jo(),zlt=require("domain"),$lt=Gne();ct.Handlers=$lt;var Wlt=OP(),Glt=nP();ct.Transports=Glt;var Vlt=Vne.__assign(Vne.__assign({},Ult.Integrations),Wlt);ct.Integrations=Vlt;var $g=Hlt.getMainCarrier();$g.__SENTRY__&&($g.__SENTRY__.extensions=$g.__SENTRY__.extensions||{},$g.__SENTRY__.extensions.domain=$g.__SENTRY__.extensions.domain||zlt)});var Xne,Gg,Yne,Wg,kP,sr,co=se(()=>{"use strict";Xne=ve(ite()),Gg=ve(Kne());md();Yne=()=>{var e;return(process.env.AMPT_STAGE==="prod"||((e=process.env.AMPT_ENDPOINT)==null?void 0:e.endsWith("ampt.dev")))&&!process.env.JEST_WORKER_ID};Yne()&&Gg.init({dsn:"https://5f27cbf3265a475abff6b7999ae73179@o1265020.ingest.sentry.io/6448443",tracesSampleRate:1});kP=class{constructor(){Or(this,"orgName");om(this,Wg,(0,Xne.ulid)());Or(this,"auth");Or(this,"captureException",t=>{Vg.error({err:t},"captureException"),Yne()&&Gg&&Gg.captureException(t,{tags:{sessionId:Ao(this,Wg)}})})}getSessionId(){return Ao(this,Wg)}storeAuth(t){this.auth=t}};Wg=new WeakMap;sr=new kP});var Cw,DP,Tw,LP,Ce,Vg,md=se(()=>{"use strict";Cw=ve(XZ()),DP=ve(require("path")),Tw=ve(Vp());co();LP=class{logger;enabled;logFilePath;logToConsole;pinoArgs;pinoDestination;initLogDestination(){try{(0,Tw.removeSync)(this.logFilePath)}catch(t){process.env.AMPT_DEBUG&&console.log("remove log file err",t)}finally{try{(0,Tw.ensureFileSync)(this.logFilePath)}catch{this.enabled=!1}}this.pinoDestination=this.enabled&&!this.logToConsole?Cw.default.destination(this.logFilePath):void 0}constructor(){this.enabled=!process.env.AMPT_DISABLE_LOGS,this.logFilePath=process.env.AMPT_LOG_DIR||DP.default.join(process.cwd(),".ampt","logs"),this.logToConsole=process.env.AMPT_LOG_TO_CONSOLE==="true",this.enabled&&this.initLogDestination(),this.pinoArgs={enabled:this.enabled,level:process.env.AMPT_LOG_LEVEL||"info",mixin:()=>({sessionId:sr.getSessionId()}),redact:{remove:!0,paths:["credentials","accessKey","token","idToken","refreshToken","accessToken"]}},this.logger=(0,Cw.default)(this.pinoArgs,this.pinoDestination)}disable(){this.enabled=!1}enable(){this.enabled=!0,this.logFilePath=process.env.AMPT_LOG_DIR||DP.default.join(process.cwd(),".ampt","logs"),this.initLogDestination(),this.pinoArgs={...this.pinoArgs,enabled:this.enabled},this.logger=(0,Cw.default)(this.pinoArgs,this.pinoDestination)}child(t){return this.logger.child(t)}debug(...t){this.enabled&&this.logger.debug(...t)}warn(...t){this.enabled&&this.logger.warn(...t)}error(...t){this.enabled?this.logger.error(...t):console.error(...t)}info(...t){this.enabled&&this.logger.info(...t)}fatal(...t){this.enabled&&this.logger.fatal(...t)}trace(...t){this.enabled&&this.logger.trace(...t)}},Ce=new LP,Vg=Ce});var Kg=g((kQt,Klt)=>{Klt.exports={name:"@ampt/cli",version:"0.0.1-beta.87",description:"Ampt command line interface",main:"./dist/index.js",types:"./types/index.d.ts",engines:{node:">=16.0.0"},publishConfig:{access:"public"},bin:{ampt:"./bin/bin"},scripts:{prepublishOnly:"npm run build",build:"node esbuild.mjs",watch:"node esbuild.mjs --watch",test:'LOG_LEVEL=silent AWS_REGION=us-east-1 NODE_OPTIONS="--no-warnings --experimental-vm-modules" jest --collect-coverage',eslint:"eslint .",prettier:"prettier --check ."},author:"Ampt Inc <hello@getampt.com>",license:"Apache-2.0",optionalDependencies:{fsevents:"~2.3.2"},babel:{presets:["@babel/preset-typescript"]},devDependencies:{"@astrojs/webapi":"^1.1.1","@sentry/node":"^6.16.1","@types/express":"^4.17.13","@types/http-proxy":"^1.17.8","@types/write-file-atomic":"^4.0.0","@types/ws":"^8.5.3","adm-zip":"^0.5.5","ansi-escapes":"^4.3.1",axios:"^1.4.0","axios-retry":"^3.4.0",chalk:"^4.1.0","child-process-ext":"^2.1.1",chokidar:"^3.5.0",chunk:"^0.0.3",dayjs:"^1.10.4",debounce:"^1.2.1",del:"^6.0.0",download:"^8.0.0","download-git-repo":"^3.0.2",figures:"^3.2.0","fs-extra":"^9.0.1","get-port":"^5.0.0","git-list-updated":"^1.2.1","github-release-from-cc-changelog":"^2.2.0","http-proxy":"^1.18.1",ignore:"^5.2.0","is-git-url":"^1.0.0","is-installed-globally":"^0.4.0","it-parallel":"^2.0.1","jwt-decode":"^3.1.2",keypress:"^0.2.1","lz4-wasm-nodejs":"^0.9.2",minimist:"^1.2.5","node-emoji":"^1.10.0","node-resolve":"^1.3.4","normalize-path":"^3.0.0",open:"^8.2.0","parse-packagejson-name":"^1.0.1",pluralize:"^8.0.0",ramda:"^0.27.2",semver:"^5.7.1","strip-ansi":"^6.0.0",terminate:"^2.5.0","tree-kill":"^1.2.2",ulid:"^2.3.0",which:"^2.0.2","write-file-atomic":"^4.0.2"},dependencies:{"source-map-support":"^0.5.21"}}});var Zne,Jne,Xlt,Xg,ze,FP=se(()=>{"use strict";Zne=ve(require("https"));ib();zY();md();co();co();({version:Jne}=Kg()),Xlt=new Zne.default.Agent({keepAlive:!0}),Xg=Lo.create({httpsAgent:Xlt});to(Xg,{retries:10,retryDelay:to.exponentialDelay,retryCondition:e=>{var i;let t=e.response&&e.response.status||"unknown",r=e.response&&e.response.data&&e.response.data.message||"unknown",n=to.isNetworkOrIdempotentRequestError(e)&&t!==500||t===429||t===503;return n&&Vg.debug({status:t,message:r,response:(i=e.response)==null?void 0:i.data},"retryable request error"),n}});Xg.defaults.headers.common={};Xg.defaults.headers.put={};Xg.defaults.headers.get={};ze=async(e={})=>{var m,v,_,b,y;let t=e.root||process.env.AMPT_ENDPOINT,r=process.env.AMPT_API_KEY,n=(m=sr.auth)==null?void 0:m.accessToken,{method:i="POST",params:s,headers:o={},body:a,endpoint:u}=e,{url:c=`${t}${u}`,responseType:f}=e;r&&c.startsWith(process.env.AMPT_ENDPOINT)?o.Authorization=`Basic ${r}`:n&&c.startsWith(process.env.AMPT_ENDPOINT)&&(o.Authorization=`Bearer ${n}`),a&&u&&(o["Content-Type"]="application/json");let p=sr.getSessionId();u&&(o["User-Agent"]=`ampt-cli/${Jne}`,o["ampt-version"]=Jne,o["ampt-session-id"]=p);let d={url:c,method:i,headers:o,params:s,data:a,maxContentLength:1/0,maxBodyLength:1/0,onUploadProgress:e.onUploadProgress};f&&(d.responseType=f);try{return Vg.debug({method:i,url:c,sessionId:p},"request"),(await Xg(d)).data}catch(T){if(T.response&&T.response.data){let S=new Error(T.response.data.message||T.response.data);throw(v=T.response.data.message)!=null&&v.includes("Request Entity Too Large")?(S.message="Your code size is too large. Try reducing it by adding to .serverlessignore.",S.name="EntityTooLargeError"):(_=T.response.data.message)!=null&&_.includes("User disabled")?(S.message=T.response.data.detail||"Your account has been disabled. Please contact support@getampt.com for more information.",S.name="UserDisabledError"):(b=T.response.data.message)!=null&&b.includes("App limit reached")?(S.message="You have reached your Organization's app limit. Please upgrade your plan or delete an app.",S.name="AppLimitReachedError"):(y=T.response.data.message)!=null&&y.includes("Instance limit reached")?(S.message="You have reached your Organization's environment limit. Please upgrade your plan or delete an environment.",S.name="EnvironmentLimitReachedError"):S.name=T.response.data.name||null,S.statusCode=T.response.data.statusCode||T.response.status||null,S}throw T}}});var Qne,eie=se(()=>{"use strict";Qne=async(e,t)=>{let r,n=new Promise(i=>{r=setTimeout(()=>i(null),t)});return Promise.race([e,n]).then(i=>(clearTimeout(r),i))}});var gd,tie=se(()=>{"use strict";gd=e=>e?e===0?"less than a second":e===1?"1 second":`${e} seconds`:"a few seconds"});var Fl,rie=se(()=>{"use strict";Fl=async e=>new Promise(t=>setTimeout(t,e).unref())});var rr,MP,BP=se(()=>{"use strict";Sr();co();rr=e=>{(async()=>{let{eventName:t,eventData:r={}}=e,n=sr.orgName;if(!n){Ce.warn({eventName:t},"Could not send report - no org name found");return}try{await ze({method:"POST",body:{eventName:t,eventData:{...r,shell:!0}},endpoint:`/orgs/${n}/analytics`})}catch(i){sr.captureException(i),process.env.AMPT_DEBUG&&console.error(i)}})()},MP=rr});async function jP(e){try{let t="https://raw.githubusercontent.com/getampt/templates/build/templates-manifest.json",{data:r}=await Lo.get(t);return r}catch(t){return process.env.AMPT_DEBUG&&e.logError(t),[]}}var UP=se(()=>{"use strict";ib()});var HP,nie,zP=se(()=>{"use strict";HP=e=>{try{return process.kill(e,0)}catch(t){return t.code==="EPERM"}},nie=HP});async function Aw(e,t){let r=e.eventNames(),n=new Map;for(let i of r)n.set(i,e.listeners(i));try{return await t()}finally{e.removeAllListeners();for(let i of r)for(let s of n.get(i))e.on(i,s)}}var iie=se(()=>{"use strict"});function sie(e){e=e.trim();let t=0,r=null,n=null,i=null,s=[];for(let o=0;o<e.length;o++){if(r=n,n=e.charAt(o),n===" "&&!i){r!==" "&&t++;continue}if(n===i){i=null;continue}else if((n==="'"||n==='"')&&!i){i=n;continue}s[t]||(s[t]=""),s[t]+=n}return s}var oie=se(()=>{"use strict"});var aie=se(()=>{"use strict"});var uie=g((vd,Yg)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",a=500,u="__lodash_placeholder__",c=1,f=2,p=4,d=1,m=2,v=1,_=2,b=4,y=8,T=16,S=32,E=64,C=128,I=256,q=512,B=30,M="...",R=800,D=16,N=1,Y=2,oe=3,H=1/0,U=9007199254740991,ee=17976931348623157e292,Q=0/0,pe=4294967295,ge=pe-1,be=pe>>>1,We=[["ary",C],["bind",v],["bindKey",_],["curry",y],["curryRight",T],["flip",q],["partial",S],["partialRight",E],["rearg",I]],et="[object Arguments]",tt="[object Array]",xt="[object AsyncFunction]",Ne="[object Boolean]",Dr="[object Date]",zt="[object DOMException]",xe="[object Error]",F="[object Function]",A="[object GeneratorFunction]",Z="[object Map]",V="[object Number]",He="[object Null]",Fe="[object Object]",$t="[object Promise]",yr="[object Proxy]",Gr="[object RegExp]",Ae="[object Set]",Vt="[object String]",Cn="[object Symbol]",qf="[object Undefined]",wo="[object WeakMap]",Hc="[object WeakSet]",Eo="[object ArrayBuffer]",k="[object DataView]",$="[object Float32Array]",G="[object Float64Array]",ne="[object Int8Array]",ue="[object Int16Array]",we="[object Int32Array]",Ge="[object Uint8Array]",ot="[object Uint8ClampedArray]",en="[object Uint16Array]",Bi="[object Uint32Array]",Lr=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Ws=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yx=/&(?:amp|lt|gt|quot|#39);/g,Pf=/[&<>"']/g,_x=RegExp(yx.source),bx=RegExp(Pf.source),jh=/<%-([\s\S]+?)%>/g,ji=/<%([\s\S]+?)%>/g,Uh=/<%=([\s\S]+?)%>/g,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wx=/^\w*$/,zh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zc=/[\\^$.*+?()[\]{}|]/g,kf=RegExp(zc.source),$c=/^\s+/,Ex=/\s/,Sx=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,iDe=/\{\n\/\* \[wrapped with (.+)\] \*/,sDe=/,? & /,oDe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,aDe=/[()=,{}\[\]\/\s]/,uDe=/\\(\\)?/g,cDe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,aB=/\w*$/,lDe=/^[-+]0x[0-9a-f]+$/i,fDe=/^0b[01]+$/i,pDe=/^\[object .+?Constructor\]$/,dDe=/^0o[0-7]+$/i,hDe=/^(?:0|[1-9]\d*)$/,mDe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cx=/($^)/,gDe=/['\n\r\u2028\u2029\\]/g,Tx="\\ud800-\\udfff",vDe="\\u0300-\\u036f",xDe="\\ufe20-\\ufe2f",yDe="\\u20d0-\\u20ff",uB=vDe+xDe+yDe,cB="\\u2700-\\u27bf",lB="a-z\\xdf-\\xf6\\xf8-\\xff",_De="\\xac\\xb1\\xd7\\xf7",bDe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wDe="\\u2000-\\u206f",EDe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fB="A-Z\\xc0-\\xd6\\xd8-\\xde",pB="\\ufe0e\\ufe0f",dB=_De+bDe+wDe+EDe,YC="['\u2019]",SDe="["+Tx+"]",hB="["+dB+"]",Ax="["+uB+"]",mB="\\d+",CDe="["+cB+"]",gB="["+lB+"]",vB="[^"+Tx+dB+mB+cB+lB+fB+"]",JC="\\ud83c[\\udffb-\\udfff]",TDe="(?:"+Ax+"|"+JC+")",xB="[^"+Tx+"]",ZC="(?:\\ud83c[\\udde6-\\uddff]){2}",QC="[\\ud800-\\udbff][\\udc00-\\udfff]",Df="["+fB+"]",yB="\\u200d",_B="(?:"+gB+"|"+vB+")",ADe="(?:"+Df+"|"+vB+")",bB="(?:"+YC+"(?:d|ll|m|re|s|t|ve))?",wB="(?:"+YC+"(?:D|LL|M|RE|S|T|VE))?",EB=TDe+"?",SB="["+pB+"]?",ODe="(?:"+yB+"(?:"+[xB,ZC,QC].join("|")+")"+SB+EB+")*",IDe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",RDe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",CB=SB+EB+ODe,NDe="(?:"+[CDe,ZC,QC].join("|")+")"+CB,qDe="(?:"+[xB+Ax+"?",Ax,ZC,QC,SDe].join("|")+")",PDe=RegExp(YC,"g"),kDe=RegExp(Ax,"g"),eT=RegExp(JC+"(?="+JC+")|"+qDe+CB,"g"),DDe=RegExp([Df+"?"+gB+"+"+bB+"(?="+[hB,Df,"$"].join("|")+")",ADe+"+"+wB+"(?="+[hB,Df+_B,"$"].join("|")+")",Df+"?"+_B+"+"+bB,Df+"+"+wB,RDe,IDe,mB,NDe].join("|"),"g"),LDe=RegExp("["+yB+Tx+uB+pB+"]"),FDe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,MDe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],BDe=-1,nr={};nr[$]=nr[G]=nr[ne]=nr[ue]=nr[we]=nr[Ge]=nr[ot]=nr[en]=nr[Bi]=!0,nr[et]=nr[tt]=nr[Eo]=nr[Ne]=nr[k]=nr[Dr]=nr[xe]=nr[F]=nr[Z]=nr[V]=nr[Fe]=nr[Gr]=nr[Ae]=nr[Vt]=nr[wo]=!1;var tr={};tr[et]=tr[tt]=tr[Eo]=tr[k]=tr[Ne]=tr[Dr]=tr[$]=tr[G]=tr[ne]=tr[ue]=tr[we]=tr[Z]=tr[V]=tr[Fe]=tr[Gr]=tr[Ae]=tr[Vt]=tr[Cn]=tr[Ge]=tr[ot]=tr[en]=tr[Bi]=!0,tr[xe]=tr[F]=tr[wo]=!1;var jDe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},UDe={"&":"&","<":"<",">":">",'"':""","'":"'"},HDe={"&":"&","<":"<",">":">",""":'"',"'":"'"},zDe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$De=parseFloat,WDe=parseInt,TB=typeof global=="object"&&global&&global.Object===Object&&global,GDe=typeof self=="object"&&self&&self.Object===Object&&self,hn=TB||GDe||Function("return this")(),tT=typeof vd=="object"&&vd&&!vd.nodeType&&vd,Wc=tT&&typeof Yg=="object"&&Yg&&!Yg.nodeType&&Yg,AB=Wc&&Wc.exports===tT,rT=AB&&TB.process,ds=function(){try{var K=Wc&&Wc.require&&Wc.require("util").types;return K||rT&&rT.binding&&rT.binding("util")}catch{}}(),OB=ds&&ds.isArrayBuffer,IB=ds&&ds.isDate,RB=ds&&ds.isMap,NB=ds&&ds.isRegExp,qB=ds&&ds.isSet,PB=ds&&ds.isTypedArray;function Ui(K,ie,re){switch(re.length){case 0:return K.call(ie);case 1:return K.call(ie,re[0]);case 2:return K.call(ie,re[0],re[1]);case 3:return K.call(ie,re[0],re[1],re[2])}return K.apply(ie,re)}function VDe(K,ie,re,Ee){for(var Ve=-1,At=K==null?0:K.length;++Ve<At;){var tn=K[Ve];ie(Ee,tn,re(tn),K)}return Ee}function hs(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee&&ie(K[re],re,K)!==!1;);return K}function KDe(K,ie){for(var re=K==null?0:K.length;re--&&ie(K[re],re,K)!==!1;);return K}function kB(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee;)if(!ie(K[re],re,K))return!1;return!0}function Tu(K,ie){for(var re=-1,Ee=K==null?0:K.length,Ve=0,At=[];++re<Ee;){var tn=K[re];ie(tn,re,K)&&(At[Ve++]=tn)}return At}function Ox(K,ie){var re=K==null?0:K.length;return!!re&&Lf(K,ie,0)>-1}function nT(K,ie,re){for(var Ee=-1,Ve=K==null?0:K.length;++Ee<Ve;)if(re(ie,K[Ee]))return!0;return!1}function cr(K,ie){for(var re=-1,Ee=K==null?0:K.length,Ve=Array(Ee);++re<Ee;)Ve[re]=ie(K[re],re,K);return Ve}function Au(K,ie){for(var re=-1,Ee=ie.length,Ve=K.length;++re<Ee;)K[Ve+re]=ie[re];return K}function iT(K,ie,re,Ee){var Ve=-1,At=K==null?0:K.length;for(Ee&&At&&(re=K[++Ve]);++Ve<At;)re=ie(re,K[Ve],Ve,K);return re}function XDe(K,ie,re,Ee){var Ve=K==null?0:K.length;for(Ee&&Ve&&(re=K[--Ve]);Ve--;)re=ie(re,K[Ve],Ve,K);return re}function sT(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee;)if(ie(K[re],re,K))return!0;return!1}var YDe=oT("length");function JDe(K){return K.split("")}function ZDe(K){return K.match(oDe)||[]}function DB(K,ie,re){var Ee;return re(K,function(Ve,At,tn){if(ie(Ve,At,tn))return Ee=At,!1}),Ee}function Ix(K,ie,re,Ee){for(var Ve=K.length,At=re+(Ee?1:-1);Ee?At--:++At<Ve;)if(ie(K[At],At,K))return At;return-1}function Lf(K,ie,re){return ie===ie?lLe(K,ie,re):Ix(K,LB,re)}function QDe(K,ie,re,Ee){for(var Ve=re-1,At=K.length;++Ve<At;)if(Ee(K[Ve],ie))return Ve;return-1}function LB(K){return K!==K}function FB(K,ie){var re=K==null?0:K.length;return re?uT(K,ie)/re:Q}function oT(K){return function(ie){return ie==null?e:ie[K]}}function aT(K){return function(ie){return K==null?e:K[ie]}}function MB(K,ie,re,Ee,Ve){return Ve(K,function(At,tn,Kt){re=Ee?(Ee=!1,At):ie(re,At,tn,Kt)}),re}function eLe(K,ie){var re=K.length;for(K.sort(ie);re--;)K[re]=K[re].value;return K}function uT(K,ie){for(var re,Ee=-1,Ve=K.length;++Ee<Ve;){var At=ie(K[Ee]);At!==e&&(re=re===e?At:re+At)}return re}function cT(K,ie){for(var re=-1,Ee=Array(K);++re<K;)Ee[re]=ie(re);return Ee}function tLe(K,ie){return cr(ie,function(re){return[re,K[re]]})}function BB(K){return K&&K.slice(0,zB(K)+1).replace($c,"")}function Hi(K){return function(ie){return K(ie)}}function lT(K,ie){return cr(ie,function(re){return K[re]})}function $h(K,ie){return K.has(ie)}function jB(K,ie){for(var re=-1,Ee=K.length;++re<Ee&&Lf(ie,K[re],0)>-1;);return re}function UB(K,ie){for(var re=K.length;re--&&Lf(ie,K[re],0)>-1;);return re}function rLe(K,ie){for(var re=K.length,Ee=0;re--;)K[re]===ie&&++Ee;return Ee}var nLe=aT(jDe),iLe=aT(UDe);function sLe(K){return"\\"+zDe[K]}function oLe(K,ie){return K==null?e:K[ie]}function Ff(K){return LDe.test(K)}function aLe(K){return FDe.test(K)}function uLe(K){for(var ie,re=[];!(ie=K.next()).done;)re.push(ie.value);return re}function fT(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee,Ve){re[++ie]=[Ve,Ee]}),re}function HB(K,ie){return function(re){return K(ie(re))}}function Ou(K,ie){for(var re=-1,Ee=K.length,Ve=0,At=[];++re<Ee;){var tn=K[re];(tn===ie||tn===u)&&(K[re]=u,At[Ve++]=re)}return At}function Rx(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee){re[++ie]=Ee}),re}function cLe(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee){re[++ie]=[Ee,Ee]}),re}function lLe(K,ie,re){for(var Ee=re-1,Ve=K.length;++Ee<Ve;)if(K[Ee]===ie)return Ee;return-1}function fLe(K,ie,re){for(var Ee=re+1;Ee--;)if(K[Ee]===ie)return Ee;return Ee}function Mf(K){return Ff(K)?dLe(K):YDe(K)}function Gs(K){return Ff(K)?hLe(K):JDe(K)}function zB(K){for(var ie=K.length;ie--&&Ex.test(K.charAt(ie)););return ie}var pLe=aT(HDe);function dLe(K){for(var ie=eT.lastIndex=0;eT.test(K);)++ie;return ie}function hLe(K){return K.match(eT)||[]}function mLe(K){return K.match(DDe)||[]}var gLe=function K(ie){ie=ie==null?hn:Iu.defaults(hn.Object(),ie,Iu.pick(hn,MDe));var re=ie.Array,Ee=ie.Date,Ve=ie.Error,At=ie.Function,tn=ie.Math,Kt=ie.Object,pT=ie.RegExp,vLe=ie.String,ms=ie.TypeError,Nx=re.prototype,xLe=At.prototype,Bf=Kt.prototype,qx=ie["__core-js_shared__"],Px=xLe.toString,kt=Bf.hasOwnProperty,yLe=0,$B=function(){var l=/[^.]+$/.exec(qx&&qx.keys&&qx.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),kx=Bf.toString,_Le=Px.call(Kt),bLe=hn._,wLe=pT("^"+Px.call(kt).replace(zc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dx=AB?ie.Buffer:e,Ru=ie.Symbol,Lx=ie.Uint8Array,WB=Dx?Dx.allocUnsafe:e,Fx=HB(Kt.getPrototypeOf,Kt),GB=Kt.create,VB=Bf.propertyIsEnumerable,Mx=Nx.splice,KB=Ru?Ru.isConcatSpreadable:e,Wh=Ru?Ru.iterator:e,Gc=Ru?Ru.toStringTag:e,Bx=function(){try{var l=Jc(Kt,"defineProperty");return l({},"",{}),l}catch{}}(),ELe=ie.clearTimeout!==hn.clearTimeout&&ie.clearTimeout,SLe=Ee&&Ee.now!==hn.Date.now&&Ee.now,CLe=ie.setTimeout!==hn.setTimeout&&ie.setTimeout,jx=tn.ceil,Ux=tn.floor,dT=Kt.getOwnPropertySymbols,TLe=Dx?Dx.isBuffer:e,XB=ie.isFinite,ALe=Nx.join,OLe=HB(Kt.keys,Kt),rn=tn.max,Gn=tn.min,ILe=Ee.now,RLe=ie.parseInt,YB=tn.random,NLe=Nx.reverse,hT=Jc(ie,"DataView"),Gh=Jc(ie,"Map"),mT=Jc(ie,"Promise"),jf=Jc(ie,"Set"),Vh=Jc(ie,"WeakMap"),Kh=Jc(Kt,"create"),Hx=Vh&&new Vh,Uf={},qLe=Zc(hT),PLe=Zc(Gh),kLe=Zc(mT),DLe=Zc(jf),LLe=Zc(Vh),zx=Ru?Ru.prototype:e,Xh=zx?zx.valueOf:e,JB=zx?zx.toString:e;function P(l){if(Ar(l)&&!Ze(l)&&!(l instanceof ft)){if(l instanceof gs)return l;if(kt.call(l,"__wrapped__"))return Zj(l)}return new gs(l)}var Hf=function(){function l(){}return function(h){if(!_r(h))return{};if(GB)return GB(h);l.prototype=h;var x=new l;return l.prototype=e,x}}();function $x(){}function gs(l,h){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=e}P.templateSettings={escape:jh,evaluate:ji,interpolate:Uh,variable:"",imports:{_:P}},P.prototype=$x.prototype,P.prototype.constructor=P,gs.prototype=Hf($x.prototype),gs.prototype.constructor=gs;function ft(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pe,this.__views__=[]}function FLe(){var l=new ft(this.__wrapped__);return l.__actions__=bi(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=bi(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=bi(this.__views__),l}function MLe(){if(this.__filtered__){var l=new ft(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function BLe(){var l=this.__wrapped__.value(),h=this.__dir__,x=Ze(l),w=h<0,O=x?l.length:0,L=JFe(0,O,this.__views__),z=L.start,W=L.end,X=W-z,ae=w?W:z-1,ce=this.__iteratees__,fe=ce.length,_e=0,qe=Gn(X,this.__takeCount__);if(!x||!w&&O==X&&qe==X)return bj(l,this.__actions__);var je=[];e:for(;X--&&_e<qe;){ae+=h;for(var rt=-1,Ue=l[ae];++rt<fe;){var at=ce[rt],yt=at.iteratee,Wi=at.type,ui=yt(Ue);if(Wi==Y)Ue=ui;else if(!ui){if(Wi==N)continue e;break e}}je[_e++]=Ue}return je}ft.prototype=Hf($x.prototype),ft.prototype.constructor=ft;function Vc(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function jLe(){this.__data__=Kh?Kh(null):{},this.size=0}function ULe(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function HLe(l){var h=this.__data__;if(Kh){var x=h[l];return x===o?e:x}return kt.call(h,l)?h[l]:e}function zLe(l){var h=this.__data__;return Kh?h[l]!==e:kt.call(h,l)}function $Le(l,h){var x=this.__data__;return this.size+=this.has(l)?0:1,x[l]=Kh&&h===e?o:h,this}Vc.prototype.clear=jLe,Vc.prototype.delete=ULe,Vc.prototype.get=HLe,Vc.prototype.has=zLe,Vc.prototype.set=$Le;function ga(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function WLe(){this.__data__=[],this.size=0}function GLe(l){var h=this.__data__,x=Wx(h,l);if(x<0)return!1;var w=h.length-1;return x==w?h.pop():Mx.call(h,x,1),--this.size,!0}function VLe(l){var h=this.__data__,x=Wx(h,l);return x<0?e:h[x][1]}function KLe(l){return Wx(this.__data__,l)>-1}function XLe(l,h){var x=this.__data__,w=Wx(x,l);return w<0?(++this.size,x.push([l,h])):x[w][1]=h,this}ga.prototype.clear=WLe,ga.prototype.delete=GLe,ga.prototype.get=VLe,ga.prototype.has=KLe,ga.prototype.set=XLe;function va(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function YLe(){this.size=0,this.__data__={hash:new Vc,map:new(Gh||ga),string:new Vc}}function JLe(l){var h=ny(this,l).delete(l);return this.size-=h?1:0,h}function ZLe(l){return ny(this,l).get(l)}function QLe(l){return ny(this,l).has(l)}function eFe(l,h){var x=ny(this,l),w=x.size;return x.set(l,h),this.size+=x.size==w?0:1,this}va.prototype.clear=YLe,va.prototype.delete=JLe,va.prototype.get=ZLe,va.prototype.has=QLe,va.prototype.set=eFe;function Kc(l){var h=-1,x=l==null?0:l.length;for(this.__data__=new va;++h<x;)this.add(l[h])}function tFe(l){return this.__data__.set(l,o),this}function rFe(l){return this.__data__.has(l)}Kc.prototype.add=Kc.prototype.push=tFe,Kc.prototype.has=rFe;function Vs(l){var h=this.__data__=new ga(l);this.size=h.size}function nFe(){this.__data__=new ga,this.size=0}function iFe(l){var h=this.__data__,x=h.delete(l);return this.size=h.size,x}function sFe(l){return this.__data__.get(l)}function oFe(l){return this.__data__.has(l)}function aFe(l,h){var x=this.__data__;if(x instanceof ga){var w=x.__data__;if(!Gh||w.length<r-1)return w.push([l,h]),this.size=++x.size,this;x=this.__data__=new va(w)}return x.set(l,h),this.size=x.size,this}Vs.prototype.clear=nFe,Vs.prototype.delete=iFe,Vs.prototype.get=sFe,Vs.prototype.has=oFe,Vs.prototype.set=aFe;function ZB(l,h){var x=Ze(l),w=!x&&Qc(l),O=!x&&!w&&Du(l),L=!x&&!w&&!O&&Gf(l),z=x||w||O||L,W=z?cT(l.length,vLe):[],X=W.length;for(var ae in l)(h||kt.call(l,ae))&&!(z&&(ae=="length"||O&&(ae=="offset"||ae=="parent")||L&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||ba(ae,X)))&&W.push(ae);return W}function QB(l){var h=l.length;return h?l[TT(0,h-1)]:e}function uFe(l,h){return iy(bi(l),Xc(h,0,l.length))}function cFe(l){return iy(bi(l))}function gT(l,h,x){(x!==e&&!Ks(l[h],x)||x===e&&!(h in l))&&xa(l,h,x)}function Yh(l,h,x){var w=l[h];(!(kt.call(l,h)&&Ks(w,x))||x===e&&!(h in l))&&xa(l,h,x)}function Wx(l,h){for(var x=l.length;x--;)if(Ks(l[x][0],h))return x;return-1}function lFe(l,h,x,w){return Nu(l,function(O,L,z){h(w,O,x(O),z)}),w}function ej(l,h){return l&&Co(h,mn(h),l)}function fFe(l,h){return l&&Co(h,Ei(h),l)}function xa(l,h,x){h=="__proto__"&&Bx?Bx(l,h,{configurable:!0,enumerable:!0,value:x,writable:!0}):l[h]=x}function vT(l,h){for(var x=-1,w=h.length,O=re(w),L=l==null;++x<w;)O[x]=L?e:JT(l,h[x]);return O}function Xc(l,h,x){return l===l&&(x!==e&&(l=l<=x?l:x),h!==e&&(l=l>=h?l:h)),l}function vs(l,h,x,w,O,L){var z,W=h&c,X=h&f,ae=h&p;if(x&&(z=O?x(l,w,O,L):x(l)),z!==e)return z;if(!_r(l))return l;var ce=Ze(l);if(ce){if(z=QFe(l),!W)return bi(l,z)}else{var fe=Vn(l),_e=fe==F||fe==A;if(Du(l))return Sj(l,W);if(fe==Fe||fe==et||_e&&!O){if(z=X||_e?{}:zj(l),!W)return X?HFe(l,fFe(z,l)):UFe(l,ej(z,l))}else{if(!tr[fe])return O?l:{};z=e4e(l,fe,W)}}L||(L=new Vs);var qe=L.get(l);if(qe)return qe;L.set(l,z),x5(l)?l.forEach(function(Ue){z.add(vs(Ue,h,x,Ue,l,L))}):g5(l)&&l.forEach(function(Ue,at){z.set(at,vs(Ue,h,x,at,l,L))});var je=ae?X?FT:LT:X?Ei:mn,rt=ce?e:je(l);return hs(rt||l,function(Ue,at){rt&&(at=Ue,Ue=l[at]),Yh(z,at,vs(Ue,h,x,at,l,L))}),z}function pFe(l){var h=mn(l);return function(x){return tj(x,l,h)}}function tj(l,h,x){var w=x.length;if(l==null)return!w;for(l=Kt(l);w--;){var O=x[w],L=h[O],z=l[O];if(z===e&&!(O in l)||!L(z))return!1}return!0}function rj(l,h,x){if(typeof l!="function")throw new ms(i);return nm(function(){l.apply(e,x)},h)}function Jh(l,h,x,w){var O=-1,L=Ox,z=!0,W=l.length,X=[],ae=h.length;if(!W)return X;x&&(h=cr(h,Hi(x))),w?(L=nT,z=!1):h.length>=r&&(L=$h,z=!1,h=new Kc(h));e:for(;++O<W;){var ce=l[O],fe=x==null?ce:x(ce);if(ce=w||ce!==0?ce:0,z&&fe===fe){for(var _e=ae;_e--;)if(h[_e]===fe)continue e;X.push(ce)}else L(h,fe,w)||X.push(ce)}return X}var Nu=Ij(So),nj=Ij(yT,!0);function dFe(l,h){var x=!0;return Nu(l,function(w,O,L){return x=!!h(w,O,L),x}),x}function Gx(l,h,x){for(var w=-1,O=l.length;++w<O;){var L=l[w],z=h(L);if(z!=null&&(W===e?z===z&&!$i(z):x(z,W)))var W=z,X=L}return X}function hFe(l,h,x,w){var O=l.length;for(x=Qe(x),x<0&&(x=-x>O?0:O+x),w=w===e||w>O?O:Qe(w),w<0&&(w+=O),w=x>w?0:_5(w);x<w;)l[x++]=h;return l}function ij(l,h){var x=[];return Nu(l,function(w,O,L){h(w,O,L)&&x.push(w)}),x}function Tn(l,h,x,w,O){var L=-1,z=l.length;for(x||(x=r4e),O||(O=[]);++L<z;){var W=l[L];h>0&&x(W)?h>1?Tn(W,h-1,x,w,O):Au(O,W):w||(O[O.length]=W)}return O}var xT=Rj(),sj=Rj(!0);function So(l,h){return l&&xT(l,h,mn)}function yT(l,h){return l&&sj(l,h,mn)}function Vx(l,h){return Tu(h,function(x){return wa(l[x])})}function Yc(l,h){h=Pu(h,l);for(var x=0,w=h.length;l!=null&&x<w;)l=l[To(h[x++])];return x&&x==w?l:e}function oj(l,h,x){var w=h(l);return Ze(l)?w:Au(w,x(l))}function oi(l){return l==null?l===e?qf:He:Gc&&Gc in Kt(l)?YFe(l):c4e(l)}function _T(l,h){return l>h}function mFe(l,h){return l!=null&&kt.call(l,h)}function gFe(l,h){return l!=null&&h in Kt(l)}function vFe(l,h,x){return l>=Gn(h,x)&&l<rn(h,x)}function bT(l,h,x){for(var w=x?nT:Ox,O=l[0].length,L=l.length,z=L,W=re(L),X=1/0,ae=[];z--;){var ce=l[z];z&&h&&(ce=cr(ce,Hi(h))),X=Gn(ce.length,X),W[z]=!x&&(h||O>=120&&ce.length>=120)?new Kc(z&&ce):e}ce=l[0];var fe=-1,_e=W[0];e:for(;++fe<O&&ae.length<X;){var qe=ce[fe],je=h?h(qe):qe;if(qe=x||qe!==0?qe:0,!(_e?$h(_e,je):w(ae,je,x))){for(z=L;--z;){var rt=W[z];if(!(rt?$h(rt,je):w(l[z],je,x)))continue e}_e&&_e.push(je),ae.push(qe)}}return ae}function xFe(l,h,x,w){return So(l,function(O,L,z){h(w,x(O),L,z)}),w}function Zh(l,h,x){h=Pu(h,l),l=Vj(l,h);var w=l==null?l:l[To(ys(h))];return w==null?e:Ui(w,l,x)}function aj(l){return Ar(l)&&oi(l)==et}function yFe(l){return Ar(l)&&oi(l)==Eo}function _Fe(l){return Ar(l)&&oi(l)==Dr}function Qh(l,h,x,w,O){return l===h?!0:l==null||h==null||!Ar(l)&&!Ar(h)?l!==l&&h!==h:bFe(l,h,x,w,Qh,O)}function bFe(l,h,x,w,O,L){var z=Ze(l),W=Ze(h),X=z?tt:Vn(l),ae=W?tt:Vn(h);X=X==et?Fe:X,ae=ae==et?Fe:ae;var ce=X==Fe,fe=ae==Fe,_e=X==ae;if(_e&&Du(l)){if(!Du(h))return!1;z=!0,ce=!1}if(_e&&!ce)return L||(L=new Vs),z||Gf(l)?jj(l,h,x,w,O,L):KFe(l,h,X,x,w,O,L);if(!(x&d)){var qe=ce&&kt.call(l,"__wrapped__"),je=fe&&kt.call(h,"__wrapped__");if(qe||je){var rt=qe?l.value():l,Ue=je?h.value():h;return L||(L=new Vs),O(rt,Ue,x,w,L)}}return _e?(L||(L=new Vs),XFe(l,h,x,w,O,L)):!1}function wFe(l){return Ar(l)&&Vn(l)==Z}function wT(l,h,x,w){var O=x.length,L=O,z=!w;if(l==null)return!L;for(l=Kt(l);O--;){var W=x[O];if(z&&W[2]?W[1]!==l[W[0]]:!(W[0]in l))return!1}for(;++O<L;){W=x[O];var X=W[0],ae=l[X],ce=W[1];if(z&&W[2]){if(ae===e&&!(X in l))return!1}else{var fe=new Vs;if(w)var _e=w(ae,ce,X,l,h,fe);if(!(_e===e?Qh(ce,ae,d|m,w,fe):_e))return!1}}return!0}function uj(l){if(!_r(l)||i4e(l))return!1;var h=wa(l)?wLe:pDe;return h.test(Zc(l))}function EFe(l){return Ar(l)&&oi(l)==Gr}function SFe(l){return Ar(l)&&Vn(l)==Ae}function CFe(l){return Ar(l)&&ly(l.length)&&!!nr[oi(l)]}function cj(l){return typeof l=="function"?l:l==null?Si:typeof l=="object"?Ze(l)?pj(l[0],l[1]):fj(l):N5(l)}function ET(l){if(!rm(l))return OLe(l);var h=[];for(var x in Kt(l))kt.call(l,x)&&x!="constructor"&&h.push(x);return h}function TFe(l){if(!_r(l))return u4e(l);var h=rm(l),x=[];for(var w in l)w=="constructor"&&(h||!kt.call(l,w))||x.push(w);return x}function ST(l,h){return l<h}function lj(l,h){var x=-1,w=wi(l)?re(l.length):[];return Nu(l,function(O,L,z){w[++x]=h(O,L,z)}),w}function fj(l){var h=BT(l);return h.length==1&&h[0][2]?Wj(h[0][0],h[0][1]):function(x){return x===l||wT(x,l,h)}}function pj(l,h){return UT(l)&&$j(h)?Wj(To(l),h):function(x){var w=JT(x,l);return w===e&&w===h?ZT(x,l):Qh(h,w,d|m)}}function Kx(l,h,x,w,O){l!==h&&xT(h,function(L,z){if(O||(O=new Vs),_r(L))AFe(l,h,z,x,Kx,w,O);else{var W=w?w(zT(l,z),L,z+"",l,h,O):e;W===e&&(W=L),gT(l,z,W)}},Ei)}function AFe(l,h,x,w,O,L,z){var W=zT(l,x),X=zT(h,x),ae=z.get(X);if(ae){gT(l,x,ae);return}var ce=L?L(W,X,x+"",l,h,z):e,fe=ce===e;if(fe){var _e=Ze(X),qe=!_e&&Du(X),je=!_e&&!qe&&Gf(X);ce=X,_e||qe||je?Ze(W)?ce=W:Fr(W)?ce=bi(W):qe?(fe=!1,ce=Sj(X,!0)):je?(fe=!1,ce=Cj(X,!0)):ce=[]:im(X)||Qc(X)?(ce=W,Qc(W)?ce=b5(W):(!_r(W)||wa(W))&&(ce=zj(X))):fe=!1}fe&&(z.set(X,ce),O(ce,X,w,L,z),z.delete(X)),gT(l,x,ce)}function dj(l,h){var x=l.length;if(x)return h+=h<0?x:0,ba(h,x)?l[h]:e}function hj(l,h,x){h.length?h=cr(h,function(L){return Ze(L)?function(z){return Yc(z,L.length===1?L[0]:L)}:L}):h=[Si];var w=-1;h=cr(h,Hi(Me()));var O=lj(l,function(L,z,W){var X=cr(h,function(ae){return ae(L)});return{criteria:X,index:++w,value:L}});return eLe(O,function(L,z){return jFe(L,z,x)})}function OFe(l,h){return mj(l,h,function(x,w){return ZT(l,w)})}function mj(l,h,x){for(var w=-1,O=h.length,L={};++w<O;){var z=h[w],W=Yc(l,z);x(W,z)&&em(L,Pu(z,l),W)}return L}function IFe(l){return function(h){return Yc(h,l)}}function CT(l,h,x,w){var O=w?QDe:Lf,L=-1,z=h.length,W=l;for(l===h&&(h=bi(h)),x&&(W=cr(l,Hi(x)));++L<z;)for(var X=0,ae=h[L],ce=x?x(ae):ae;(X=O(W,ce,X,w))>-1;)W!==l&&Mx.call(W,X,1),Mx.call(l,X,1);return l}function gj(l,h){for(var x=l?h.length:0,w=x-1;x--;){var O=h[x];if(x==w||O!==L){var L=O;ba(O)?Mx.call(l,O,1):IT(l,O)}}return l}function TT(l,h){return l+Ux(YB()*(h-l+1))}function RFe(l,h,x,w){for(var O=-1,L=rn(jx((h-l)/(x||1)),0),z=re(L);L--;)z[w?L:++O]=l,l+=x;return z}function AT(l,h){var x="";if(!l||h<1||h>U)return x;do h%2&&(x+=l),h=Ux(h/2),h&&(l+=l);while(h);return x}function nt(l,h){return $T(Gj(l,h,Si),l+"")}function NFe(l){return QB(Vf(l))}function qFe(l,h){var x=Vf(l);return iy(x,Xc(h,0,x.length))}function em(l,h,x,w){if(!_r(l))return l;h=Pu(h,l);for(var O=-1,L=h.length,z=L-1,W=l;W!=null&&++O<L;){var X=To(h[O]),ae=x;if(X==="__proto__"||X==="constructor"||X==="prototype")return l;if(O!=z){var ce=W[X];ae=w?w(ce,X,W):e,ae===e&&(ae=_r(ce)?ce:ba(h[O+1])?[]:{})}Yh(W,X,ae),W=W[X]}return l}var vj=Hx?function(l,h){return Hx.set(l,h),l}:Si,PFe=Bx?function(l,h){return Bx(l,"toString",{configurable:!0,enumerable:!1,value:eA(h),writable:!0})}:Si;function kFe(l){return iy(Vf(l))}function xs(l,h,x){var w=-1,O=l.length;h<0&&(h=-h>O?0:O+h),x=x>O?O:x,x<0&&(x+=O),O=h>x?0:x-h>>>0,h>>>=0;for(var L=re(O);++w<O;)L[w]=l[w+h];return L}function DFe(l,h){var x;return Nu(l,function(w,O,L){return x=h(w,O,L),!x}),!!x}function Xx(l,h,x){var w=0,O=l==null?w:l.length;if(typeof h=="number"&&h===h&&O<=be){for(;w<O;){var L=w+O>>>1,z=l[L];z!==null&&!$i(z)&&(x?z<=h:z<h)?w=L+1:O=L}return O}return OT(l,h,Si,x)}function OT(l,h,x,w){var O=0,L=l==null?0:l.length;if(L===0)return 0;h=x(h);for(var z=h!==h,W=h===null,X=$i(h),ae=h===e;O<L;){var ce=Ux((O+L)/2),fe=x(l[ce]),_e=fe!==e,qe=fe===null,je=fe===fe,rt=$i(fe);if(z)var Ue=w||je;else ae?Ue=je&&(w||_e):W?Ue=je&&_e&&(w||!qe):X?Ue=je&&_e&&!qe&&(w||!rt):qe||rt?Ue=!1:Ue=w?fe<=h:fe<h;Ue?O=ce+1:L=ce}return Gn(L,ge)}function xj(l,h){for(var x=-1,w=l.length,O=0,L=[];++x<w;){var z=l[x],W=h?h(z):z;if(!x||!Ks(W,X)){var X=W;L[O++]=z===0?0:z}}return L}function yj(l){return typeof l=="number"?l:$i(l)?Q:+l}function zi(l){if(typeof l=="string")return l;if(Ze(l))return cr(l,zi)+"";if($i(l))return JB?JB.call(l):"";var h=l+"";return h=="0"&&1/l==-H?"-0":h}function qu(l,h,x){var w=-1,O=Ox,L=l.length,z=!0,W=[],X=W;if(x)z=!1,O=nT;else if(L>=r){var ae=h?null:GFe(l);if(ae)return Rx(ae);z=!1,O=$h,X=new Kc}else X=h?[]:W;e:for(;++w<L;){var ce=l[w],fe=h?h(ce):ce;if(ce=x||ce!==0?ce:0,z&&fe===fe){for(var _e=X.length;_e--;)if(X[_e]===fe)continue e;h&&X.push(fe),W.push(ce)}else O(X,fe,x)||(X!==W&&X.push(fe),W.push(ce))}return W}function IT(l,h){return h=Pu(h,l),l=Vj(l,h),l==null||delete l[To(ys(h))]}function _j(l,h,x,w){return em(l,h,x(Yc(l,h)),w)}function Yx(l,h,x,w){for(var O=l.length,L=w?O:-1;(w?L--:++L<O)&&h(l[L],L,l););return x?xs(l,w?0:L,w?L+1:O):xs(l,w?L+1:0,w?O:L)}function bj(l,h){var x=l;return x instanceof ft&&(x=x.value()),iT(h,function(w,O){return O.func.apply(O.thisArg,Au([w],O.args))},x)}function RT(l,h,x){var w=l.length;if(w<2)return w?qu(l[0]):[];for(var O=-1,L=re(w);++O<w;)for(var z=l[O],W=-1;++W<w;)W!=O&&(L[O]=Jh(L[O]||z,l[W],h,x));return qu(Tn(L,1),h,x)}function wj(l,h,x){for(var w=-1,O=l.length,L=h.length,z={};++w<O;){var W=w<L?h[w]:e;x(z,l[w],W)}return z}function NT(l){return Fr(l)?l:[]}function qT(l){return typeof l=="function"?l:Si}function Pu(l,h){return Ze(l)?l:UT(l,h)?[l]:Jj(Nt(l))}var LFe=nt;function ku(l,h,x){var w=l.length;return x=x===e?w:x,!h&&x>=w?l:xs(l,h,x)}var Ej=ELe||function(l){return hn.clearTimeout(l)};function Sj(l,h){if(h)return l.slice();var x=l.length,w=WB?WB(x):new l.constructor(x);return l.copy(w),w}function PT(l){var h=new l.constructor(l.byteLength);return new Lx(h).set(new Lx(l)),h}function FFe(l,h){var x=h?PT(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.byteLength)}function MFe(l){var h=new l.constructor(l.source,aB.exec(l));return h.lastIndex=l.lastIndex,h}function BFe(l){return Xh?Kt(Xh.call(l)):{}}function Cj(l,h){var x=h?PT(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.length)}function Tj(l,h){if(l!==h){var x=l!==e,w=l===null,O=l===l,L=$i(l),z=h!==e,W=h===null,X=h===h,ae=$i(h);if(!W&&!ae&&!L&&l>h||L&&z&&X&&!W&&!ae||w&&z&&X||!x&&X||!O)return 1;if(!w&&!L&&!ae&&l<h||ae&&x&&O&&!w&&!L||W&&x&&O||!z&&O||!X)return-1}return 0}function jFe(l,h,x){for(var w=-1,O=l.criteria,L=h.criteria,z=O.length,W=x.length;++w<z;){var X=Tj(O[w],L[w]);if(X){if(w>=W)return X;var ae=x[w];return X*(ae=="desc"?-1:1)}}return l.index-h.index}function Aj(l,h,x,w){for(var O=-1,L=l.length,z=x.length,W=-1,X=h.length,ae=rn(L-z,0),ce=re(X+ae),fe=!w;++W<X;)ce[W]=h[W];for(;++O<z;)(fe||O<L)&&(ce[x[O]]=l[O]);for(;ae--;)ce[W++]=l[O++];return ce}function Oj(l,h,x,w){for(var O=-1,L=l.length,z=-1,W=x.length,X=-1,ae=h.length,ce=rn(L-W,0),fe=re(ce+ae),_e=!w;++O<ce;)fe[O]=l[O];for(var qe=O;++X<ae;)fe[qe+X]=h[X];for(;++z<W;)(_e||O<L)&&(fe[qe+x[z]]=l[O++]);return fe}function bi(l,h){var x=-1,w=l.length;for(h||(h=re(w));++x<w;)h[x]=l[x];return h}function Co(l,h,x,w){var O=!x;x||(x={});for(var L=-1,z=h.length;++L<z;){var W=h[L],X=w?w(x[W],l[W],W,x,l):e;X===e&&(X=l[W]),O?xa(x,W,X):Yh(x,W,X)}return x}function UFe(l,h){return Co(l,jT(l),h)}function HFe(l,h){return Co(l,Uj(l),h)}function Jx(l,h){return function(x,w){var O=Ze(x)?VDe:lFe,L=h?h():{};return O(x,l,Me(w,2),L)}}function zf(l){return nt(function(h,x){var w=-1,O=x.length,L=O>1?x[O-1]:e,z=O>2?x[2]:e;for(L=l.length>3&&typeof L=="function"?(O--,L):e,z&&ai(x[0],x[1],z)&&(L=O<3?e:L,O=1),h=Kt(h);++w<O;){var W=x[w];W&&l(h,W,w,L)}return h})}function Ij(l,h){return function(x,w){if(x==null)return x;if(!wi(x))return l(x,w);for(var O=x.length,L=h?O:-1,z=Kt(x);(h?L--:++L<O)&&w(z[L],L,z)!==!1;);return x}}function Rj(l){return function(h,x,w){for(var O=-1,L=Kt(h),z=w(h),W=z.length;W--;){var X=z[l?W:++O];if(x(L[X],X,L)===!1)break}return h}}function zFe(l,h,x){var w=h&v,O=tm(l);function L(){var z=this&&this!==hn&&this instanceof L?O:l;return z.apply(w?x:this,arguments)}return L}function Nj(l){return function(h){h=Nt(h);var x=Ff(h)?Gs(h):e,w=x?x[0]:h.charAt(0),O=x?ku(x,1).join(""):h.slice(1);return w[l]()+O}}function $f(l){return function(h){return iT(I5(O5(h).replace(PDe,"")),l,"")}}function tm(l){return function(){var h=arguments;switch(h.length){case 0:return new l;case 1:return new l(h[0]);case 2:return new l(h[0],h[1]);case 3:return new l(h[0],h[1],h[2]);case 4:return new l(h[0],h[1],h[2],h[3]);case 5:return new l(h[0],h[1],h[2],h[3],h[4]);case 6:return new l(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new l(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var x=Hf(l.prototype),w=l.apply(x,h);return _r(w)?w:x}}function $Fe(l,h,x){var w=tm(l);function O(){for(var L=arguments.length,z=re(L),W=L,X=Wf(O);W--;)z[W]=arguments[W];var ae=L<3&&z[0]!==X&&z[L-1]!==X?[]:Ou(z,X);if(L-=ae.length,L<x)return Lj(l,h,Zx,O.placeholder,e,z,ae,e,e,x-L);var ce=this&&this!==hn&&this instanceof O?w:l;return Ui(ce,this,z)}return O}function qj(l){return function(h,x,w){var O=Kt(h);if(!wi(h)){var L=Me(x,3);h=mn(h),x=function(W){return L(O[W],W,O)}}var z=l(h,x,w);return z>-1?O[L?h[z]:z]:e}}function Pj(l){return _a(function(h){var x=h.length,w=x,O=gs.prototype.thru;for(l&&h.reverse();w--;){var L=h[w];if(typeof L!="function")throw new ms(i);if(O&&!z&&ry(L)=="wrapper")var z=new gs([],!0)}for(w=z?w:x;++w<x;){L=h[w];var W=ry(L),X=W=="wrapper"?MT(L):e;X&&HT(X[0])&&X[1]==(C|y|S|I)&&!X[4].length&&X[9]==1?z=z[ry(X[0])].apply(z,X[3]):z=L.length==1&&HT(L)?z[W]():z.thru(L)}return function(){var ae=arguments,ce=ae[0];if(z&&ae.length==1&&Ze(ce))return z.plant(ce).value();for(var fe=0,_e=x?h[fe].apply(this,ae):ce;++fe<x;)_e=h[fe].call(this,_e);return _e}})}function Zx(l,h,x,w,O,L,z,W,X,ae){var ce=h&C,fe=h&v,_e=h&_,qe=h&(y|T),je=h&q,rt=_e?e:tm(l);function Ue(){for(var at=arguments.length,yt=re(at),Wi=at;Wi--;)yt[Wi]=arguments[Wi];if(qe)var ui=Wf(Ue),Gi=rLe(yt,ui);if(w&&(yt=Aj(yt,w,O,qe)),L&&(yt=Oj(yt,L,z,qe)),at-=Gi,qe&&at<ae){var Mr=Ou(yt,ui);return Lj(l,h,Zx,Ue.placeholder,x,yt,Mr,W,X,ae-at)}var Xs=fe?x:this,Sa=_e?Xs[l]:l;return at=yt.length,W?yt=l4e(yt,W):je&&at>1&&yt.reverse(),ce&&X<at&&(yt.length=X),this&&this!==hn&&this instanceof Ue&&(Sa=rt||tm(Sa)),Sa.apply(Xs,yt)}return Ue}function kj(l,h){return function(x,w){return xFe(x,l,h(w),{})}}function Qx(l,h){return function(x,w){var O;if(x===e&&w===e)return h;if(x!==e&&(O=x),w!==e){if(O===e)return w;typeof x=="string"||typeof w=="string"?(x=zi(x),w=zi(w)):(x=yj(x),w=yj(w)),O=l(x,w)}return O}}function kT(l){return _a(function(h){return h=cr(h,Hi(Me())),nt(function(x){var w=this;return l(h,function(O){return Ui(O,w,x)})})})}function ey(l,h){h=h===e?" ":zi(h);var x=h.length;if(x<2)return x?AT(h,l):h;var w=AT(h,jx(l/Mf(h)));return Ff(h)?ku(Gs(w),0,l).join(""):w.slice(0,l)}function WFe(l,h,x,w){var O=h&v,L=tm(l);function z(){for(var W=-1,X=arguments.length,ae=-1,ce=w.length,fe=re(ce+X),_e=this&&this!==hn&&this instanceof z?L:l;++ae<ce;)fe[ae]=w[ae];for(;X--;)fe[ae++]=arguments[++W];return Ui(_e,O?x:this,fe)}return z}function Dj(l){return function(h,x,w){return w&&typeof w!="number"&&ai(h,x,w)&&(x=w=e),h=Ea(h),x===e?(x=h,h=0):x=Ea(x),w=w===e?h<x?1:-1:Ea(w),RFe(h,x,w,l)}}function ty(l){return function(h,x){return typeof h=="string"&&typeof x=="string"||(h=_s(h),x=_s(x)),l(h,x)}}function Lj(l,h,x,w,O,L,z,W,X,ae){var ce=h&y,fe=ce?z:e,_e=ce?e:z,qe=ce?L:e,je=ce?e:L;h|=ce?S:E,h&=~(ce?E:S),h&b||(h&=~(v|_));var rt=[l,h,O,qe,fe,je,_e,W,X,ae],Ue=x.apply(e,rt);return HT(l)&&Kj(Ue,rt),Ue.placeholder=w,Xj(Ue,l,h)}function DT(l){var h=tn[l];return function(x,w){if(x=_s(x),w=w==null?0:Gn(Qe(w),292),w&&XB(x)){var O=(Nt(x)+"e").split("e"),L=h(O[0]+"e"+(+O[1]+w));return O=(Nt(L)+"e").split("e"),+(O[0]+"e"+(+O[1]-w))}return h(x)}}var GFe=jf&&1/Rx(new jf([,-0]))[1]==H?function(l){return new jf(l)}:nA;function Fj(l){return function(h){var x=Vn(h);return x==Z?fT(h):x==Ae?cLe(h):tLe(h,l(h))}}function ya(l,h,x,w,O,L,z,W){var X=h&_;if(!X&&typeof l!="function")throw new ms(i);var ae=w?w.length:0;if(ae||(h&=~(S|E),w=O=e),z=z===e?z:rn(Qe(z),0),W=W===e?W:Qe(W),ae-=O?O.length:0,h&E){var ce=w,fe=O;w=O=e}var _e=X?e:MT(l),qe=[l,h,x,w,O,ce,fe,L,z,W];if(_e&&a4e(qe,_e),l=qe[0],h=qe[1],x=qe[2],w=qe[3],O=qe[4],W=qe[9]=qe[9]===e?X?0:l.length:rn(qe[9]-ae,0),!W&&h&(y|T)&&(h&=~(y|T)),!h||h==v)var je=zFe(l,h,x);else h==y||h==T?je=$Fe(l,h,W):(h==S||h==(v|S))&&!O.length?je=WFe(l,h,x,w):je=Zx.apply(e,qe);var rt=_e?vj:Kj;return Xj(rt(je,qe),l,h)}function Mj(l,h,x,w){return l===e||Ks(l,Bf[x])&&!kt.call(w,x)?h:l}function Bj(l,h,x,w,O,L){return _r(l)&&_r(h)&&(L.set(h,l),Kx(l,h,e,Bj,L),L.delete(h)),l}function VFe(l){return im(l)?e:l}function jj(l,h,x,w,O,L){var z=x&d,W=l.length,X=h.length;if(W!=X&&!(z&&X>W))return!1;var ae=L.get(l),ce=L.get(h);if(ae&&ce)return ae==h&&ce==l;var fe=-1,_e=!0,qe=x&m?new Kc:e;for(L.set(l,h),L.set(h,l);++fe<W;){var je=l[fe],rt=h[fe];if(w)var Ue=z?w(rt,je,fe,h,l,L):w(je,rt,fe,l,h,L);if(Ue!==e){if(Ue)continue;_e=!1;break}if(qe){if(!sT(h,function(at,yt){if(!$h(qe,yt)&&(je===at||O(je,at,x,w,L)))return qe.push(yt)})){_e=!1;break}}else if(!(je===rt||O(je,rt,x,w,L))){_e=!1;break}}return L.delete(l),L.delete(h),_e}function KFe(l,h,x,w,O,L,z){switch(x){case k:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case Eo:return!(l.byteLength!=h.byteLength||!L(new Lx(l),new Lx(h)));case Ne:case Dr:case V:return Ks(+l,+h);case xe:return l.name==h.name&&l.message==h.message;case Gr:case Vt:return l==h+"";case Z:var W=fT;case Ae:var X=w&d;if(W||(W=Rx),l.size!=h.size&&!X)return!1;var ae=z.get(l);if(ae)return ae==h;w|=m,z.set(l,h);var ce=jj(W(l),W(h),w,O,L,z);return z.delete(l),ce;case Cn:if(Xh)return Xh.call(l)==Xh.call(h)}return!1}function XFe(l,h,x,w,O,L){var z=x&d,W=LT(l),X=W.length,ae=LT(h),ce=ae.length;if(X!=ce&&!z)return!1;for(var fe=X;fe--;){var _e=W[fe];if(!(z?_e in h:kt.call(h,_e)))return!1}var qe=L.get(l),je=L.get(h);if(qe&&je)return qe==h&&je==l;var rt=!0;L.set(l,h),L.set(h,l);for(var Ue=z;++fe<X;){_e=W[fe];var at=l[_e],yt=h[_e];if(w)var Wi=z?w(yt,at,_e,h,l,L):w(at,yt,_e,l,h,L);if(!(Wi===e?at===yt||O(at,yt,x,w,L):Wi)){rt=!1;break}Ue||(Ue=_e=="constructor")}if(rt&&!Ue){var ui=l.constructor,Gi=h.constructor;ui!=Gi&&"constructor"in l&&"constructor"in h&&!(typeof ui=="function"&&ui instanceof ui&&typeof Gi=="function"&&Gi instanceof Gi)&&(rt=!1)}return L.delete(l),L.delete(h),rt}function _a(l){return $T(Gj(l,e,t5),l+"")}function LT(l){return oj(l,mn,jT)}function FT(l){return oj(l,Ei,Uj)}var MT=Hx?function(l){return Hx.get(l)}:nA;function ry(l){for(var h=l.name+"",x=Uf[h],w=kt.call(Uf,h)?x.length:0;w--;){var O=x[w],L=O.func;if(L==null||L==l)return O.name}return h}function Wf(l){var h=kt.call(P,"placeholder")?P:l;return h.placeholder}function Me(){var l=P.iteratee||tA;return l=l===tA?cj:l,arguments.length?l(arguments[0],arguments[1]):l}function ny(l,h){var x=l.__data__;return n4e(h)?x[typeof h=="string"?"string":"hash"]:x.map}function BT(l){for(var h=mn(l),x=h.length;x--;){var w=h[x],O=l[w];h[x]=[w,O,$j(O)]}return h}function Jc(l,h){var x=oLe(l,h);return uj(x)?x:e}function YFe(l){var h=kt.call(l,Gc),x=l[Gc];try{l[Gc]=e;var w=!0}catch{}var O=kx.call(l);return w&&(h?l[Gc]=x:delete l[Gc]),O}var jT=dT?function(l){return l==null?[]:(l=Kt(l),Tu(dT(l),function(h){return VB.call(l,h)}))}:iA,Uj=dT?function(l){for(var h=[];l;)Au(h,jT(l)),l=Fx(l);return h}:iA,Vn=oi;(hT&&Vn(new hT(new ArrayBuffer(1)))!=k||Gh&&Vn(new Gh)!=Z||mT&&Vn(mT.resolve())!=$t||jf&&Vn(new jf)!=Ae||Vh&&Vn(new Vh)!=wo)&&(Vn=function(l){var h=oi(l),x=h==Fe?l.constructor:e,w=x?Zc(x):"";if(w)switch(w){case qLe:return k;case PLe:return Z;case kLe:return $t;case DLe:return Ae;case LLe:return wo}return h});function JFe(l,h,x){for(var w=-1,O=x.length;++w<O;){var L=x[w],z=L.size;switch(L.type){case"drop":l+=z;break;case"dropRight":h-=z;break;case"take":h=Gn(h,l+z);break;case"takeRight":l=rn(l,h-z);break}}return{start:l,end:h}}function ZFe(l){var h=l.match(iDe);return h?h[1].split(sDe):[]}function Hj(l,h,x){h=Pu(h,l);for(var w=-1,O=h.length,L=!1;++w<O;){var z=To(h[w]);if(!(L=l!=null&&x(l,z)))break;l=l[z]}return L||++w!=O?L:(O=l==null?0:l.length,!!O&&ly(O)&&ba(z,O)&&(Ze(l)||Qc(l)))}function QFe(l){var h=l.length,x=new l.constructor(h);return h&&typeof l[0]=="string"&&kt.call(l,"index")&&(x.index=l.index,x.input=l.input),x}function zj(l){return typeof l.constructor=="function"&&!rm(l)?Hf(Fx(l)):{}}function e4e(l,h,x){var w=l.constructor;switch(h){case Eo:return PT(l);case Ne:case Dr:return new w(+l);case k:return FFe(l,x);case $:case G:case ne:case ue:case we:case Ge:case ot:case en:case Bi:return Cj(l,x);case Z:return new w;case V:case Vt:return new w(l);case Gr:return MFe(l);case Ae:return new w;case Cn:return BFe(l)}}function t4e(l,h){var x=h.length;if(!x)return l;var w=x-1;return h[w]=(x>1?"& ":"")+h[w],h=h.join(x>2?", ":" "),l.replace(Sx,`{
|
|
140
|
+
`),Mct.addContextToFrame(a,s,r)}catch{}p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return u=p.sent(),c={error:u},[3,8];case 7:try{i&&!i.done&&(f=n.return)&&f.call(n)}finally{if(c)throw c.error}return[7];case 8:return[2]}})})},e.id="ContextLines",e}();xw.ContextLines=$ct;function Wct(e){return fc.__awaiter(this,void 0,void 0,function(){var t,r,n;return fc.__generator(this,function(i){switch(i.label){case 0:if(t=wP.get(e),t!==void 0)return[2,t];r=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Hct(e)];case 2:return r=i.sent(),[3,4];case 3:return n=i.sent(),[3,4];case 4:return wP.set(e,r),[2,r]}})})}});var kne=g(CP=>{Object.defineProperty(CP,"__esModule",{value:!0});var yw=(Nn(),pt(Rn)),SP=an(),_w=Ot(),Gct=jq(),Vct=EP(),Kct="cause",Xct=5,Yct=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this._key=t.key||Kct,this._limit=t.limit||Xct}return e.prototype.setupOnce=function(){SP.addGlobalEventProcessor(function(t,r){var n=SP.getCurrentHub().getIntegration(e);if(n){var i=n._handler&&n._handler.bind(n);return typeof i=="function"?i(t,r):t}return t})},e.prototype._handler=function(t,r){var n=this;return!t.exception||!t.exception.values||!r||!_w.isInstanceOf(r.originalException,Error)?_w.resolvedSyncPromise(t):new _w.SyncPromise(function(i){n._walkErrorTree(r.originalException,n._key).then(function(s){t&&t.exception&&t.exception.values&&(t.exception.values=yw.__spread(s,t.exception.values)),i(t)}).then(null,function(){i(t)})})},e.prototype._walkErrorTree=function(t,r,n){n===void 0&&(n=[]);var i;return yw.__awaiter(this,void 0,void 0,function(){var s,o,a=this;return yw.__generator(this,function(u){switch(u.label){case 0:return!_w.isInstanceOf(t[r],Error)||n.length+1>=this._limit?[2,Promise.resolve(n)]:(s=Gct.exceptionFromError(t[r]),o=SP.getCurrentHub().getIntegration(Vct.ContextLines),o&&(!((i=s.stacktrace)===null||i===void 0)&&i.frames)?[4,o.addSourceContextToFrames(s.stacktrace.frames)]:[3,2]);case 1:u.sent(),u.label=2;case 2:return[2,new Promise(function(c,f){a._walkErrorTree(t[r],r,yw.__spread([s],n)).then(c).then(null,function(){f()})})]}})})},e.id="LinkedErrors",e}();CP.LinkedErrors=Yct});var Mne=g(AP=>{Object.defineProperty(AP,"__esModule",{value:!0});var Dne=(Nn(),pt(Rn)),Lne=require("fs"),Fne=require("path"),TP;function Jct(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function Zct(){var e=require.main&&require.main.paths||[],t=Jct(),r={},n={};return t.forEach(function(i){var s=i,o=function(){var a=s;if(s=Fne.dirname(a),!(!s||a===s||n[a])){if(e.indexOf(s)<0)return o();var u=Fne.join(a,"package.json");if(n[a]=!0,!Lne.existsSync(u))return o();try{var c=JSON.parse(Lne.readFileSync(u,"utf8"));r[c.name]=c.version}catch{}}};o()}),r}var Qct=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,r){var n=this;t(function(i){return r().getIntegration(e)?Dne.__assign(Dne.__assign({},i),{modules:n._getModules()}):i})},e.prototype._getModules=function(){return TP||(TP=Zct()),TP},e.id="Modules",e}();AP.Modules=Qct});var OP=g(za=>{Object.defineProperty(za,"__esModule",{value:!0});var elt=vne();za.Console=elt.Console;var tlt=Tne();za.Http=tlt.Http;var rlt=Rne();za.OnUncaughtException=rlt.OnUncaughtException;var nlt=qne();za.OnUnhandledRejection=nlt.OnUnhandledRejection;var ilt=kne();za.LinkedErrors=ilt.LinkedErrors;var slt=Mne();za.Modules=slt.Modules;var olt=EP();za.ContextLines=olt.ContextLines});var RP=g(Ho=>{Object.defineProperty(Ho,"__esModule",{value:!0});var Hg=(Nn(),pt(Rn)),pc=an(),Bne=jo(),IP=Ot(),alt=require("domain"),ult=fP(),jne=cc(),dd=OP();Ho.defaultIntegrations=[new pc.Integrations.InboundFilters,new pc.Integrations.FunctionToString,new dd.ContextLines,new dd.Console,new dd.Http,new dd.OnUncaughtException,new dd.OnUnhandledRejection,new dd.LinkedErrors];function clt(e){e===void 0&&(e={});var t,r=Bne.getMainCarrier(),n=((t=r.__SENTRY__)===null||t===void 0?void 0:t.integrations)||[];if(e.defaultIntegrations=e.defaultIntegrations===!1?[]:Hg.__spread(Array.isArray(e.defaultIntegrations)?e.defaultIntegrations:Ho.defaultIntegrations,n),e.dsn===void 0&&process.env.SENTRY_DSN&&(e.dsn=process.env.SENTRY_DSN),e.tracesSampleRate===void 0&&process.env.SENTRY_TRACES_SAMPLE_RATE){var i=parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);isFinite(i)&&(e.tracesSampleRate=i)}if(e.release===void 0){var s=Une();s!==void 0?e.release=s:e.autoSessionTracking=!1}e.environment===void 0&&process.env.SENTRY_ENVIRONMENT&&(e.environment=process.env.SENTRY_ENVIRONMENT),e.autoSessionTracking===void 0&&e.dsn!==void 0&&(e.autoSessionTracking=!0),alt.active&&Bne.setHubOnCarrier(r,pc.getCurrentHub()),pc.initAndBind(ult.NodeClient,e),e.autoSessionTracking&&hlt()}Ho.init=clt;function llt(){return pc.getCurrentHub().lastEventId()}Ho.lastEventId=llt;function flt(e){return Hg.__awaiter(this,void 0,void 0,function(){var t;return Hg.__generator(this,function(r){return t=pc.getCurrentHub().getClient(),t?[2,t.flush(e)]:(jne.IS_DEBUG_BUILD&&IP.logger.warn("Cannot flush events. No client defined."),[2,Promise.resolve(!1)])})})}Ho.flush=flt;function plt(e){return Hg.__awaiter(this,void 0,void 0,function(){var t;return Hg.__generator(this,function(r){return t=pc.getCurrentHub().getClient(),t?[2,t.close(e)]:(jne.IS_DEBUG_BUILD&&IP.logger.warn("Cannot flush events and disable SDK. No client defined."),[2,Promise.resolve(!1)])})})}Ho.close=plt;function dlt(e){if(e===void 0)return!1;var t=e&&e.getOptions();return t&&t.autoSessionTracking!==void 0?t.autoSessionTracking:!1}Ho.isAutoSessionTrackingEnabled=dlt;function Une(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;var t=IP.getGlobalObject();return t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id?t.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||e}Ho.getSentryRelease=Une;function hlt(){var e=pc.getCurrentHub();e.startSession(),process.on("beforeExit",function(){var t,r=(t=e.getScope())===null||t===void 0?void 0:t.getSession(),n=["exited","crashed"];r&&!n.includes(r.status)&&e.endSession()})}});var zne=g(qP=>{Object.defineProperty(qP,"__esModule",{value:!0});var Hne=(Nn(),pt(Rn)),bw=require("fs"),NP=require("path");function mlt(e){var t=NP.resolve(e);if(!bw.existsSync(t))throw new Error("Cannot read contents of "+t+". Directory does not exist.");if(!bw.statSync(t).isDirectory())throw new Error("Cannot read contents of "+t+", because it is not a directory.");var r=function(n){return bw.readdirSync(n).reduce(function(i,s){var o=NP.join(n,s);return bw.statSync(o).isDirectory()?Hne.__spread(i,r(o)):Hne.__spread(i,[o])},[])};return r(t).map(function(n){return NP.relative(t,n)})}qP.deepReadDirSync=mlt});var $ne=g(PP=>{"use strict";PP.parse=xlt;PP.serialize=ylt;var glt=decodeURIComponent,vlt=encodeURIComponent,ww=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function xlt(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},i=e.split(";"),s=n.decode||glt,o=0;o<i.length;o++){var a=i[o],u=a.indexOf("=");if(!(u<0)){var c=a.substring(0,u).trim();if(r[c]==null){var f=a.substring(u+1,a.length).trim();f[0]==='"'&&(f=f.slice(1,-1)),r[c]=_lt(f,s)}}}return r}function ylt(e,t,r){var n=r||{},i=n.encode||vlt;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!ww.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!ww.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!ww.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!ww.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function _lt(e,t){try{return t(e)}catch{return e}}});var Gne=g(Ll=>{Object.defineProperty(Ll,"__esModule",{value:!0});var zo=(Nn(),pt(Rn)),kl=an(),Dl=Ot(),blt=$ne(),wlt=require("domain"),Elt=require("os"),Slt=require("url"),Clt=cc(),zg=RP();function Tlt(){return function(t,r,n){var i;t.headers&&Dl.isString(t.headers["sentry-trace"])&&(i=Dl.extractTraceparentData(t.headers["sentry-trace"]));var s=kl.startTransaction(zo.__assign({name:Ew(t,{path:!0,method:!0}),op:"http.server"},i),{request:Sw(t)});kl.getCurrentHub().configureScope(function(o){o.setSpan(s)}),r.__sentry_transaction=s,r.once("finish",function(){setImmediate(function(){Alt(s,t),s.setHttpStatus(r.statusCode),s.finish()})}),n()}}Ll.tracingHandler=Tlt;function Alt(e,t){e&&(e.name=Ew(t,{path:!0,method:!0}),e.setData("url",t.originalUrl),e.setData("baseUrl",t.baseUrl),e.setData("query",t.query))}function Ew(e,t){t===void 0&&(t={});var r,n=(r=e.method)===null||r===void 0?void 0:r.toUpperCase(),i="";e.route?i=""+(e.baseUrl||"")+e.route.path:(e.originalUrl||e.url)&&(i=Dl.stripUrlQueryAndFragment(e.originalUrl||e.url||""));var s="";return t.method&&n&&(s+=n),t.method&&t.path&&(s+=" "),t.path&&i&&(s+=i),s}function Olt(e,t){var r;switch(t){case"path":return Ew(e,{path:!0});case"handler":return((r=e.route)===null||r===void 0?void 0:r.stack[0].name)||"<anonymous>";case"methodPath":default:return Ew(e,{path:!0,method:!0})}}var Ilt=["id","username","email"];function Rlt(e,t){var r={},n=Array.isArray(t)?t:Ilt;return n.forEach(function(i){e&&i in e&&(r[i]=e[i])}),r}var Nlt=["cookies","data","headers","method","query_string","url"];function Sw(e,t){t===void 0&&(t=Nlt);var r={},n=e.headers||e.header||{},i=e.method,s=e.hostname||e.host||n.host||"<no host>",o=e.protocol==="https"||e.secure||(e.socket||{}).encrypted?"https":"http",a=e.originalUrl||e.url||"",u=o+"://"+s+a;return t.forEach(function(c){switch(c){case"headers":r.headers=n;break;case"method":r.method=i;break;case"url":r.url=u;break;case"cookies":r.cookies=e.cookies||blt.parse(n.cookie||"");break;case"query_string":r.query_string=e.query||Slt.parse(a||"",!1).query;break;case"data":if(i==="GET"||i==="HEAD")break;e.body!==void 0&&(r.data=Dl.isString(e.body)?e.body:JSON.stringify(Dl.normalize(e.body)));break;default:({}).hasOwnProperty.call(e,c)&&(r[c]=e[c])}}),r}Ll.extractRequestData=Sw;function Wne(e,t,r){if(r=zo.__assign({ip:!1,request:!0,serverName:!0,transaction:!0,user:!0,version:!0},r),r.version&&(e.contexts=zo.__assign(zo.__assign({},e.contexts),{runtime:{name:"node",version:global.process.version}})),r.request){var n=Array.isArray(r.request)?Sw(t,r.request):Sw(t);e.request=zo.__assign(zo.__assign({},e.request),n)}if(r.serverName&&!e.server_name&&(e.server_name=global.process.env.SENTRY_NAME||Elt.hostname()),r.user){var i=t.user&&Dl.isPlainObject(t.user)?Rlt(t.user,r.user):{};Object.keys(i)&&(e.user=zo.__assign(zo.__assign({},e.user),i))}if(r.ip){var s=t.ip||t.connection&&t.connection.remoteAddress;s&&(e.user=zo.__assign(zo.__assign({},e.user),{ip_address:s}))}return r.transaction&&!e.transaction&&(e.transaction=Olt(t,r.transaction)),e}Ll.parseRequest=Wne;function qlt(e){var t=kl.getCurrentHub(),r=t.getClient();if(r&&zg.isAutoSessionTrackingEnabled(r)){r.initSessionFlusher();var n=t.getScope();n&&n.getSession()&&n.setSession()}return function(s,o,a){if(e&&e.flushTimeout&&e.flushTimeout>0){var u=o.end;o.end=function(f,p,d){var m=this;zg.flush(e.flushTimeout).then(function(){u.call(m,f,p,d)}).then(null,function(v){Clt.IS_DEBUG_BUILD&&Dl.logger.error(v),u.call(m,f,p,d)})}}var c=wlt.create();c.add(s),c.add(o),c.on("error",a),c.run(function(){var f=kl.getCurrentHub();f.configureScope(function(p){p.addEventProcessor(function(v){return Wne(v,s,e)});var d=f.getClient();if(zg.isAutoSessionTrackingEnabled(d)){var m=f.getScope();m&&m.setRequestSession({status:"ok"})}}),o.once("finish",function(){var p=f.getClient();zg.isAutoSessionTrackingEnabled(p)&&setImmediate(function(){p&&p._captureRequestSession&&p._captureRequestSession()})}),a()})}}Ll.requestHandler=qlt;function Plt(e){var t=e.status||e.statusCode||e.status_code||e.output&&e.output.statusCode;return t?parseInt(t,10):500}function klt(e){var t=Plt(e);return t>=500}function Dlt(e){return function(r,n,i,s){var o=e&&e.shouldHandleError||klt;if(o(r)){kl.withScope(function(a){var u=i.__sentry_transaction;u&&a.getSpan()===void 0&&a.setSpan(u);var c=kl.getCurrentHub().getClient();if(c&&zg.isAutoSessionTrackingEnabled(c)){var f=c._sessionFlusher!==void 0;if(f){var p=a.getRequestSession();p&&p.status!==void 0&&(p.status="crashed")}}var d=kl.captureException(r);i.sentry=d,s(r)});return}s(r)}}Ll.errorHandler=Dlt});var Kne=g(ct=>{Object.defineProperty(ct,"__esModule",{value:!0});var Vne=(Nn(),pt(Rn)),Llt=Kp();ct.Severity=Llt.Severity;var Br=an();ct.addGlobalEventProcessor=Br.addGlobalEventProcessor;ct.addBreadcrumb=Br.addBreadcrumb;ct.captureException=Br.captureException;ct.captureEvent=Br.captureEvent;ct.captureMessage=Br.captureMessage;ct.configureScope=Br.configureScope;ct.getHubFromCarrier=Br.getHubFromCarrier;ct.getCurrentHub=Br.getCurrentHub;ct.Hub=Br.Hub;ct.makeMain=Br.makeMain;ct.Scope=Br.Scope;ct.Session=Br.Session;ct.startTransaction=Br.startTransaction;ct.SDK_VERSION=Br.SDK_VERSION;ct.setContext=Br.setContext;ct.setExtra=Br.setExtra;ct.setExtras=Br.setExtras;ct.setTag=Br.setTag;ct.setTags=Br.setTags;ct.setUser=Br.setUser;ct.withScope=Br.withScope;var Flt=uP();ct.NodeBackend=Flt.NodeBackend;var Mlt=fP();ct.NodeClient=Mlt.NodeClient;var hd=RP();ct.defaultIntegrations=hd.defaultIntegrations;ct.init=hd.init;ct.lastEventId=hd.lastEventId;ct.flush=hd.flush;ct.close=hd.close;ct.getSentryRelease=hd.getSentryRelease;var Blt=zne();ct.deepReadDirSync=Blt.deepReadDirSync;var jlt=zq();ct.SDK_NAME=jlt.SDK_NAME;var Ult=an(),Hlt=jo(),zlt=require("domain"),$lt=Gne();ct.Handlers=$lt;var Wlt=OP(),Glt=nP();ct.Transports=Glt;var Vlt=Vne.__assign(Vne.__assign({},Ult.Integrations),Wlt);ct.Integrations=Vlt;var $g=Hlt.getMainCarrier();$g.__SENTRY__&&($g.__SENTRY__.extensions=$g.__SENTRY__.extensions||{},$g.__SENTRY__.extensions.domain=$g.__SENTRY__.extensions.domain||zlt)});var Xne,Gg,Yne,Wg,kP,sr,co=se(()=>{"use strict";Xne=ve(ite()),Gg=ve(Kne());md();Yne=()=>{var e;return(process.env.AMPT_STAGE==="prod"||((e=process.env.AMPT_ENDPOINT)==null?void 0:e.endsWith("ampt.dev")))&&!process.env.JEST_WORKER_ID};Yne()&&Gg.init({dsn:"https://5f27cbf3265a475abff6b7999ae73179@o1265020.ingest.sentry.io/6448443",tracesSampleRate:1});kP=class{constructor(){Or(this,"orgName");om(this,Wg,(0,Xne.ulid)());Or(this,"auth");Or(this,"captureException",t=>{Vg.error({err:t},"captureException"),Yne()&&Gg&&Gg.captureException(t,{tags:{sessionId:Ao(this,Wg)}})})}getSessionId(){return Ao(this,Wg)}storeAuth(t){this.auth=t}};Wg=new WeakMap;sr=new kP});var Cw,DP,Tw,LP,Ce,Vg,md=se(()=>{"use strict";Cw=ve(XZ()),DP=ve(require("path")),Tw=ve(Vp());co();LP=class{logger;enabled;logFilePath;logToConsole;pinoArgs;pinoDestination;initLogDestination(){try{(0,Tw.removeSync)(this.logFilePath)}catch(t){process.env.AMPT_DEBUG&&console.log("remove log file err",t)}finally{try{(0,Tw.ensureFileSync)(this.logFilePath)}catch{this.enabled=!1}}this.pinoDestination=this.enabled&&!this.logToConsole?Cw.default.destination(this.logFilePath):void 0}constructor(){this.enabled=!process.env.AMPT_DISABLE_LOGS,this.logFilePath=process.env.AMPT_LOG_DIR||DP.default.join(process.cwd(),".ampt","logs"),this.logToConsole=process.env.AMPT_LOG_TO_CONSOLE==="true",this.enabled&&this.initLogDestination(),this.pinoArgs={enabled:this.enabled,level:process.env.AMPT_LOG_LEVEL||"info",mixin:()=>({sessionId:sr.getSessionId()}),redact:{remove:!0,paths:["credentials","accessKey","token","idToken","refreshToken","accessToken"]}},this.logger=(0,Cw.default)(this.pinoArgs,this.pinoDestination)}disable(){this.enabled=!1}enable(){this.enabled=!0,this.logFilePath=process.env.AMPT_LOG_DIR||DP.default.join(process.cwd(),".ampt","logs"),this.initLogDestination(),this.pinoArgs={...this.pinoArgs,enabled:this.enabled},this.logger=(0,Cw.default)(this.pinoArgs,this.pinoDestination)}child(t){return this.logger.child(t)}debug(...t){this.enabled&&this.logger.debug(...t)}warn(...t){this.enabled&&this.logger.warn(...t)}error(...t){this.enabled?this.logger.error(...t):console.error(...t)}info(...t){this.enabled&&this.logger.info(...t)}fatal(...t){this.enabled&&this.logger.fatal(...t)}trace(...t){this.enabled&&this.logger.trace(...t)}},Ce=new LP,Vg=Ce});var Kg=g((kQt,Klt)=>{Klt.exports={name:"@ampt/cli",version:"1.0.0",description:"Ampt command line interface",main:"./dist/index.js",types:"./types/index.d.ts",engines:{node:">=16.0.0"},publishConfig:{access:"public"},bin:{ampt:"./bin/bin"},scripts:{prepublishOnly:"npm run build",build:"node esbuild.mjs",watch:"node esbuild.mjs --watch",test:'LOG_LEVEL=silent AWS_REGION=us-east-1 NODE_OPTIONS="--no-warnings --experimental-vm-modules" jest --collect-coverage',eslint:"eslint .",prettier:"prettier --check ."},author:"Ampt Inc <hello@getampt.com>",license:"Apache-2.0",optionalDependencies:{fsevents:"~2.3.2"},babel:{presets:["@babel/preset-typescript"]},devDependencies:{"@astrojs/webapi":"^1.1.1","@sentry/node":"^6.16.1","@types/express":"^4.17.13","@types/http-proxy":"^1.17.8","@types/write-file-atomic":"^4.0.0","@types/ws":"^8.5.3","adm-zip":"^0.5.5","ansi-escapes":"^4.3.1",axios:"^1.4.0","axios-retry":"^3.4.0",chalk:"^4.1.0","child-process-ext":"^2.1.1",chokidar:"^3.5.0",chunk:"^0.0.3",dayjs:"^1.10.4",debounce:"^1.2.1",del:"^6.0.0",download:"^8.0.0","download-git-repo":"^3.0.2",figures:"^3.2.0","fs-extra":"^9.0.1","get-port":"^5.0.0","git-list-updated":"^1.2.1","github-release-from-cc-changelog":"^2.2.0","http-proxy":"^1.18.1",ignore:"^5.2.0","is-git-url":"^1.0.0","is-installed-globally":"^0.4.0","it-parallel":"^2.0.1","jwt-decode":"^3.1.2",keypress:"^0.2.1","lz4-wasm-nodejs":"^0.9.2",minimist:"^1.2.5","node-emoji":"^1.10.0","node-resolve":"^1.3.4","normalize-path":"^3.0.0",open:"^8.2.0","parse-packagejson-name":"^1.0.1",pluralize:"^8.0.0",ramda:"^0.27.2",semver:"^5.7.1","strip-ansi":"^6.0.0",terminate:"^2.5.0","tree-kill":"^1.2.2",ulid:"^2.3.0",which:"^2.0.2","write-file-atomic":"^4.0.2"},dependencies:{"source-map-support":"^0.5.21"}}});var Zne,Jne,Xlt,Xg,ze,FP=se(()=>{"use strict";Zne=ve(require("https"));ib();zY();md();co();co();({version:Jne}=Kg()),Xlt=new Zne.default.Agent({keepAlive:!0}),Xg=Lo.create({httpsAgent:Xlt});to(Xg,{retries:10,retryDelay:to.exponentialDelay,retryCondition:e=>{var i;let t=e.response&&e.response.status||"unknown",r=e.response&&e.response.data&&e.response.data.message||"unknown",n=to.isNetworkOrIdempotentRequestError(e)&&t!==500||t===429||t===503;return n&&Vg.debug({status:t,message:r,response:(i=e.response)==null?void 0:i.data},"retryable request error"),n}});Xg.defaults.headers.common={};Xg.defaults.headers.put={};Xg.defaults.headers.get={};ze=async(e={})=>{var m,v,_,b,y;let t=e.root||process.env.AMPT_ENDPOINT,r=process.env.AMPT_API_KEY,n=(m=sr.auth)==null?void 0:m.accessToken,{method:i="POST",params:s,headers:o={},body:a,endpoint:u}=e,{url:c=`${t}${u}`,responseType:f}=e;r&&c.startsWith(process.env.AMPT_ENDPOINT)?o.Authorization=`Basic ${r}`:n&&c.startsWith(process.env.AMPT_ENDPOINT)&&(o.Authorization=`Bearer ${n}`),a&&u&&(o["Content-Type"]="application/json");let p=sr.getSessionId();u&&(o["User-Agent"]=`ampt-cli/${Jne}`,o["ampt-version"]=Jne,o["ampt-session-id"]=p);let d={url:c,method:i,headers:o,params:s,data:a,maxContentLength:1/0,maxBodyLength:1/0,onUploadProgress:e.onUploadProgress};f&&(d.responseType=f);try{return Vg.debug({method:i,url:c,sessionId:p},"request"),(await Xg(d)).data}catch(T){if(T.response&&T.response.data){let S=new Error(T.response.data.message||T.response.data);throw(v=T.response.data.message)!=null&&v.includes("Request Entity Too Large")?(S.message="Your code size is too large. Try reducing it by adding to .serverlessignore.",S.name="EntityTooLargeError"):(_=T.response.data.message)!=null&&_.includes("User disabled")?(S.message=T.response.data.detail||"Your account has been disabled. Please contact support@getampt.com for more information.",S.name="UserDisabledError"):(b=T.response.data.message)!=null&&b.includes("App limit reached")?(S.message="You have reached your Organization's app limit. Please upgrade your plan or delete an app.",S.name="AppLimitReachedError"):(y=T.response.data.message)!=null&&y.includes("Instance limit reached")?(S.message="You have reached your Organization's environment limit. Please upgrade your plan or delete an environment.",S.name="EnvironmentLimitReachedError"):S.name=T.response.data.name||null,S.statusCode=T.response.data.statusCode||T.response.status||null,S}throw T}}});var Qne,eie=se(()=>{"use strict";Qne=async(e,t)=>{let r,n=new Promise(i=>{r=setTimeout(()=>i(null),t)});return Promise.race([e,n]).then(i=>(clearTimeout(r),i))}});var gd,tie=se(()=>{"use strict";gd=e=>e?e===0?"less than a second":e===1?"1 second":`${e} seconds`:"a few seconds"});var Fl,rie=se(()=>{"use strict";Fl=async e=>new Promise(t=>setTimeout(t,e).unref())});var rr,MP,BP=se(()=>{"use strict";Sr();co();rr=e=>{(async()=>{let{eventName:t,eventData:r={}}=e,n=sr.orgName;if(!n){Ce.warn({eventName:t},"Could not send report - no org name found");return}try{await ze({method:"POST",body:{eventName:t,eventData:{...r,shell:!0}},endpoint:`/orgs/${n}/analytics`})}catch(i){sr.captureException(i),process.env.AMPT_DEBUG&&console.error(i)}})()},MP=rr});async function jP(e){try{let t="https://raw.githubusercontent.com/getampt/templates/build/templates-manifest.json",{data:r}=await Lo.get(t);return r}catch(t){return process.env.AMPT_DEBUG&&e.logError(t),[]}}var UP=se(()=>{"use strict";ib()});var HP,nie,zP=se(()=>{"use strict";HP=e=>{try{return process.kill(e,0)}catch(t){return t.code==="EPERM"}},nie=HP});async function Aw(e,t){let r=e.eventNames(),n=new Map;for(let i of r)n.set(i,e.listeners(i));try{return await t()}finally{e.removeAllListeners();for(let i of r)for(let s of n.get(i))e.on(i,s)}}var iie=se(()=>{"use strict"});function sie(e){e=e.trim();let t=0,r=null,n=null,i=null,s=[];for(let o=0;o<e.length;o++){if(r=n,n=e.charAt(o),n===" "&&!i){r!==" "&&t++;continue}if(n===i){i=null;continue}else if((n==="'"||n==='"')&&!i){i=n;continue}s[t]||(s[t]=""),s[t]+=n}return s}var oie=se(()=>{"use strict"});var aie=se(()=>{"use strict"});var uie=g((vd,Yg)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",o="__lodash_hash_undefined__",a=500,u="__lodash_placeholder__",c=1,f=2,p=4,d=1,m=2,v=1,_=2,b=4,y=8,T=16,S=32,E=64,C=128,I=256,q=512,B=30,M="...",R=800,D=16,N=1,Y=2,oe=3,H=1/0,U=9007199254740991,ee=17976931348623157e292,Q=0/0,pe=4294967295,ge=pe-1,we=pe>>>1,We=[["ary",C],["bind",v],["bindKey",_],["curry",y],["curryRight",T],["flip",q],["partial",S],["partialRight",E],["rearg",I]],et="[object Arguments]",tt="[object Array]",xt="[object AsyncFunction]",Ne="[object Boolean]",Dr="[object Date]",zt="[object DOMException]",xe="[object Error]",F="[object Function]",A="[object GeneratorFunction]",Z="[object Map]",V="[object Number]",He="[object Null]",Fe="[object Object]",$t="[object Promise]",yr="[object Proxy]",Gr="[object RegExp]",Ae="[object Set]",Vt="[object String]",Cn="[object Symbol]",qf="[object Undefined]",wo="[object WeakMap]",Hc="[object WeakSet]",Eo="[object ArrayBuffer]",k="[object DataView]",$="[object Float32Array]",G="[object Float64Array]",ne="[object Int8Array]",ue="[object Int16Array]",be="[object Int32Array]",Ge="[object Uint8Array]",ot="[object Uint8ClampedArray]",en="[object Uint16Array]",Bi="[object Uint32Array]",Lr=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Ws=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yx=/&(?:amp|lt|gt|quot|#39);/g,Pf=/[&<>"']/g,_x=RegExp(yx.source),bx=RegExp(Pf.source),jh=/<%-([\s\S]+?)%>/g,ji=/<%([\s\S]+?)%>/g,Uh=/<%=([\s\S]+?)%>/g,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wx=/^\w*$/,zh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zc=/[\\^$.*+?()[\]{}|]/g,kf=RegExp(zc.source),$c=/^\s+/,Ex=/\s/,Sx=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,iDe=/\{\n\/\* \[wrapped with (.+)\] \*/,sDe=/,? & /,oDe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,aDe=/[()=,{}\[\]\/\s]/,uDe=/\\(\\)?/g,cDe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,aB=/\w*$/,lDe=/^[-+]0x[0-9a-f]+$/i,fDe=/^0b[01]+$/i,pDe=/^\[object .+?Constructor\]$/,dDe=/^0o[0-7]+$/i,hDe=/^(?:0|[1-9]\d*)$/,mDe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cx=/($^)/,gDe=/['\n\r\u2028\u2029\\]/g,Tx="\\ud800-\\udfff",vDe="\\u0300-\\u036f",xDe="\\ufe20-\\ufe2f",yDe="\\u20d0-\\u20ff",uB=vDe+xDe+yDe,cB="\\u2700-\\u27bf",lB="a-z\\xdf-\\xf6\\xf8-\\xff",_De="\\xac\\xb1\\xd7\\xf7",bDe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wDe="\\u2000-\\u206f",EDe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fB="A-Z\\xc0-\\xd6\\xd8-\\xde",pB="\\ufe0e\\ufe0f",dB=_De+bDe+wDe+EDe,YC="['\u2019]",SDe="["+Tx+"]",hB="["+dB+"]",Ax="["+uB+"]",mB="\\d+",CDe="["+cB+"]",gB="["+lB+"]",vB="[^"+Tx+dB+mB+cB+lB+fB+"]",JC="\\ud83c[\\udffb-\\udfff]",TDe="(?:"+Ax+"|"+JC+")",xB="[^"+Tx+"]",ZC="(?:\\ud83c[\\udde6-\\uddff]){2}",QC="[\\ud800-\\udbff][\\udc00-\\udfff]",Df="["+fB+"]",yB="\\u200d",_B="(?:"+gB+"|"+vB+")",ADe="(?:"+Df+"|"+vB+")",bB="(?:"+YC+"(?:d|ll|m|re|s|t|ve))?",wB="(?:"+YC+"(?:D|LL|M|RE|S|T|VE))?",EB=TDe+"?",SB="["+pB+"]?",ODe="(?:"+yB+"(?:"+[xB,ZC,QC].join("|")+")"+SB+EB+")*",IDe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",RDe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",CB=SB+EB+ODe,NDe="(?:"+[CDe,ZC,QC].join("|")+")"+CB,qDe="(?:"+[xB+Ax+"?",Ax,ZC,QC,SDe].join("|")+")",PDe=RegExp(YC,"g"),kDe=RegExp(Ax,"g"),eT=RegExp(JC+"(?="+JC+")|"+qDe+CB,"g"),DDe=RegExp([Df+"?"+gB+"+"+bB+"(?="+[hB,Df,"$"].join("|")+")",ADe+"+"+wB+"(?="+[hB,Df+_B,"$"].join("|")+")",Df+"?"+_B+"+"+bB,Df+"+"+wB,RDe,IDe,mB,NDe].join("|"),"g"),LDe=RegExp("["+yB+Tx+uB+pB+"]"),FDe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,MDe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],BDe=-1,nr={};nr[$]=nr[G]=nr[ne]=nr[ue]=nr[be]=nr[Ge]=nr[ot]=nr[en]=nr[Bi]=!0,nr[et]=nr[tt]=nr[Eo]=nr[Ne]=nr[k]=nr[Dr]=nr[xe]=nr[F]=nr[Z]=nr[V]=nr[Fe]=nr[Gr]=nr[Ae]=nr[Vt]=nr[wo]=!1;var tr={};tr[et]=tr[tt]=tr[Eo]=tr[k]=tr[Ne]=tr[Dr]=tr[$]=tr[G]=tr[ne]=tr[ue]=tr[be]=tr[Z]=tr[V]=tr[Fe]=tr[Gr]=tr[Ae]=tr[Vt]=tr[Cn]=tr[Ge]=tr[ot]=tr[en]=tr[Bi]=!0,tr[xe]=tr[F]=tr[wo]=!1;var jDe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},UDe={"&":"&","<":"<",">":">",'"':""","'":"'"},HDe={"&":"&","<":"<",">":">",""":'"',"'":"'"},zDe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$De=parseFloat,WDe=parseInt,TB=typeof global=="object"&&global&&global.Object===Object&&global,GDe=typeof self=="object"&&self&&self.Object===Object&&self,hn=TB||GDe||Function("return this")(),tT=typeof vd=="object"&&vd&&!vd.nodeType&&vd,Wc=tT&&typeof Yg=="object"&&Yg&&!Yg.nodeType&&Yg,AB=Wc&&Wc.exports===tT,rT=AB&&TB.process,ds=function(){try{var K=Wc&&Wc.require&&Wc.require("util").types;return K||rT&&rT.binding&&rT.binding("util")}catch{}}(),OB=ds&&ds.isArrayBuffer,IB=ds&&ds.isDate,RB=ds&&ds.isMap,NB=ds&&ds.isRegExp,qB=ds&&ds.isSet,PB=ds&&ds.isTypedArray;function Ui(K,ie,re){switch(re.length){case 0:return K.call(ie);case 1:return K.call(ie,re[0]);case 2:return K.call(ie,re[0],re[1]);case 3:return K.call(ie,re[0],re[1],re[2])}return K.apply(ie,re)}function VDe(K,ie,re,Ee){for(var Ve=-1,At=K==null?0:K.length;++Ve<At;){var tn=K[Ve];ie(Ee,tn,re(tn),K)}return Ee}function hs(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee&&ie(K[re],re,K)!==!1;);return K}function KDe(K,ie){for(var re=K==null?0:K.length;re--&&ie(K[re],re,K)!==!1;);return K}function kB(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee;)if(!ie(K[re],re,K))return!1;return!0}function Tu(K,ie){for(var re=-1,Ee=K==null?0:K.length,Ve=0,At=[];++re<Ee;){var tn=K[re];ie(tn,re,K)&&(At[Ve++]=tn)}return At}function Ox(K,ie){var re=K==null?0:K.length;return!!re&&Lf(K,ie,0)>-1}function nT(K,ie,re){for(var Ee=-1,Ve=K==null?0:K.length;++Ee<Ve;)if(re(ie,K[Ee]))return!0;return!1}function cr(K,ie){for(var re=-1,Ee=K==null?0:K.length,Ve=Array(Ee);++re<Ee;)Ve[re]=ie(K[re],re,K);return Ve}function Au(K,ie){for(var re=-1,Ee=ie.length,Ve=K.length;++re<Ee;)K[Ve+re]=ie[re];return K}function iT(K,ie,re,Ee){var Ve=-1,At=K==null?0:K.length;for(Ee&&At&&(re=K[++Ve]);++Ve<At;)re=ie(re,K[Ve],Ve,K);return re}function XDe(K,ie,re,Ee){var Ve=K==null?0:K.length;for(Ee&&Ve&&(re=K[--Ve]);Ve--;)re=ie(re,K[Ve],Ve,K);return re}function sT(K,ie){for(var re=-1,Ee=K==null?0:K.length;++re<Ee;)if(ie(K[re],re,K))return!0;return!1}var YDe=oT("length");function JDe(K){return K.split("")}function ZDe(K){return K.match(oDe)||[]}function DB(K,ie,re){var Ee;return re(K,function(Ve,At,tn){if(ie(Ve,At,tn))return Ee=At,!1}),Ee}function Ix(K,ie,re,Ee){for(var Ve=K.length,At=re+(Ee?1:-1);Ee?At--:++At<Ve;)if(ie(K[At],At,K))return At;return-1}function Lf(K,ie,re){return ie===ie?lLe(K,ie,re):Ix(K,LB,re)}function QDe(K,ie,re,Ee){for(var Ve=re-1,At=K.length;++Ve<At;)if(Ee(K[Ve],ie))return Ve;return-1}function LB(K){return K!==K}function FB(K,ie){var re=K==null?0:K.length;return re?uT(K,ie)/re:Q}function oT(K){return function(ie){return ie==null?e:ie[K]}}function aT(K){return function(ie){return K==null?e:K[ie]}}function MB(K,ie,re,Ee,Ve){return Ve(K,function(At,tn,Kt){re=Ee?(Ee=!1,At):ie(re,At,tn,Kt)}),re}function eLe(K,ie){var re=K.length;for(K.sort(ie);re--;)K[re]=K[re].value;return K}function uT(K,ie){for(var re,Ee=-1,Ve=K.length;++Ee<Ve;){var At=ie(K[Ee]);At!==e&&(re=re===e?At:re+At)}return re}function cT(K,ie){for(var re=-1,Ee=Array(K);++re<K;)Ee[re]=ie(re);return Ee}function tLe(K,ie){return cr(ie,function(re){return[re,K[re]]})}function BB(K){return K&&K.slice(0,zB(K)+1).replace($c,"")}function Hi(K){return function(ie){return K(ie)}}function lT(K,ie){return cr(ie,function(re){return K[re]})}function $h(K,ie){return K.has(ie)}function jB(K,ie){for(var re=-1,Ee=K.length;++re<Ee&&Lf(ie,K[re],0)>-1;);return re}function UB(K,ie){for(var re=K.length;re--&&Lf(ie,K[re],0)>-1;);return re}function rLe(K,ie){for(var re=K.length,Ee=0;re--;)K[re]===ie&&++Ee;return Ee}var nLe=aT(jDe),iLe=aT(UDe);function sLe(K){return"\\"+zDe[K]}function oLe(K,ie){return K==null?e:K[ie]}function Ff(K){return LDe.test(K)}function aLe(K){return FDe.test(K)}function uLe(K){for(var ie,re=[];!(ie=K.next()).done;)re.push(ie.value);return re}function fT(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee,Ve){re[++ie]=[Ve,Ee]}),re}function HB(K,ie){return function(re){return K(ie(re))}}function Ou(K,ie){for(var re=-1,Ee=K.length,Ve=0,At=[];++re<Ee;){var tn=K[re];(tn===ie||tn===u)&&(K[re]=u,At[Ve++]=re)}return At}function Rx(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee){re[++ie]=Ee}),re}function cLe(K){var ie=-1,re=Array(K.size);return K.forEach(function(Ee){re[++ie]=[Ee,Ee]}),re}function lLe(K,ie,re){for(var Ee=re-1,Ve=K.length;++Ee<Ve;)if(K[Ee]===ie)return Ee;return-1}function fLe(K,ie,re){for(var Ee=re+1;Ee--;)if(K[Ee]===ie)return Ee;return Ee}function Mf(K){return Ff(K)?dLe(K):YDe(K)}function Gs(K){return Ff(K)?hLe(K):JDe(K)}function zB(K){for(var ie=K.length;ie--&&Ex.test(K.charAt(ie)););return ie}var pLe=aT(HDe);function dLe(K){for(var ie=eT.lastIndex=0;eT.test(K);)++ie;return ie}function hLe(K){return K.match(eT)||[]}function mLe(K){return K.match(DDe)||[]}var gLe=function K(ie){ie=ie==null?hn:Iu.defaults(hn.Object(),ie,Iu.pick(hn,MDe));var re=ie.Array,Ee=ie.Date,Ve=ie.Error,At=ie.Function,tn=ie.Math,Kt=ie.Object,pT=ie.RegExp,vLe=ie.String,ms=ie.TypeError,Nx=re.prototype,xLe=At.prototype,Bf=Kt.prototype,qx=ie["__core-js_shared__"],Px=xLe.toString,kt=Bf.hasOwnProperty,yLe=0,$B=function(){var l=/[^.]+$/.exec(qx&&qx.keys&&qx.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),kx=Bf.toString,_Le=Px.call(Kt),bLe=hn._,wLe=pT("^"+Px.call(kt).replace(zc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dx=AB?ie.Buffer:e,Ru=ie.Symbol,Lx=ie.Uint8Array,WB=Dx?Dx.allocUnsafe:e,Fx=HB(Kt.getPrototypeOf,Kt),GB=Kt.create,VB=Bf.propertyIsEnumerable,Mx=Nx.splice,KB=Ru?Ru.isConcatSpreadable:e,Wh=Ru?Ru.iterator:e,Gc=Ru?Ru.toStringTag:e,Bx=function(){try{var l=Jc(Kt,"defineProperty");return l({},"",{}),l}catch{}}(),ELe=ie.clearTimeout!==hn.clearTimeout&&ie.clearTimeout,SLe=Ee&&Ee.now!==hn.Date.now&&Ee.now,CLe=ie.setTimeout!==hn.setTimeout&&ie.setTimeout,jx=tn.ceil,Ux=tn.floor,dT=Kt.getOwnPropertySymbols,TLe=Dx?Dx.isBuffer:e,XB=ie.isFinite,ALe=Nx.join,OLe=HB(Kt.keys,Kt),rn=tn.max,Gn=tn.min,ILe=Ee.now,RLe=ie.parseInt,YB=tn.random,NLe=Nx.reverse,hT=Jc(ie,"DataView"),Gh=Jc(ie,"Map"),mT=Jc(ie,"Promise"),jf=Jc(ie,"Set"),Vh=Jc(ie,"WeakMap"),Kh=Jc(Kt,"create"),Hx=Vh&&new Vh,Uf={},qLe=Zc(hT),PLe=Zc(Gh),kLe=Zc(mT),DLe=Zc(jf),LLe=Zc(Vh),zx=Ru?Ru.prototype:e,Xh=zx?zx.valueOf:e,JB=zx?zx.toString:e;function P(l){if(Ar(l)&&!Ze(l)&&!(l instanceof ft)){if(l instanceof gs)return l;if(kt.call(l,"__wrapped__"))return Zj(l)}return new gs(l)}var Hf=function(){function l(){}return function(h){if(!_r(h))return{};if(GB)return GB(h);l.prototype=h;var x=new l;return l.prototype=e,x}}();function $x(){}function gs(l,h){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=e}P.templateSettings={escape:jh,evaluate:ji,interpolate:Uh,variable:"",imports:{_:P}},P.prototype=$x.prototype,P.prototype.constructor=P,gs.prototype=Hf($x.prototype),gs.prototype.constructor=gs;function ft(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=pe,this.__views__=[]}function FLe(){var l=new ft(this.__wrapped__);return l.__actions__=bi(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=bi(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=bi(this.__views__),l}function MLe(){if(this.__filtered__){var l=new ft(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function BLe(){var l=this.__wrapped__.value(),h=this.__dir__,x=Ze(l),w=h<0,O=x?l.length:0,L=JFe(0,O,this.__views__),z=L.start,W=L.end,X=W-z,ae=w?W:z-1,ce=this.__iteratees__,fe=ce.length,_e=0,qe=Gn(X,this.__takeCount__);if(!x||!w&&O==X&&qe==X)return bj(l,this.__actions__);var je=[];e:for(;X--&&_e<qe;){ae+=h;for(var rt=-1,Ue=l[ae];++rt<fe;){var at=ce[rt],yt=at.iteratee,Wi=at.type,ui=yt(Ue);if(Wi==Y)Ue=ui;else if(!ui){if(Wi==N)continue e;break e}}je[_e++]=Ue}return je}ft.prototype=Hf($x.prototype),ft.prototype.constructor=ft;function Vc(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function jLe(){this.__data__=Kh?Kh(null):{},this.size=0}function ULe(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function HLe(l){var h=this.__data__;if(Kh){var x=h[l];return x===o?e:x}return kt.call(h,l)?h[l]:e}function zLe(l){var h=this.__data__;return Kh?h[l]!==e:kt.call(h,l)}function $Le(l,h){var x=this.__data__;return this.size+=this.has(l)?0:1,x[l]=Kh&&h===e?o:h,this}Vc.prototype.clear=jLe,Vc.prototype.delete=ULe,Vc.prototype.get=HLe,Vc.prototype.has=zLe,Vc.prototype.set=$Le;function ga(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function WLe(){this.__data__=[],this.size=0}function GLe(l){var h=this.__data__,x=Wx(h,l);if(x<0)return!1;var w=h.length-1;return x==w?h.pop():Mx.call(h,x,1),--this.size,!0}function VLe(l){var h=this.__data__,x=Wx(h,l);return x<0?e:h[x][1]}function KLe(l){return Wx(this.__data__,l)>-1}function XLe(l,h){var x=this.__data__,w=Wx(x,l);return w<0?(++this.size,x.push([l,h])):x[w][1]=h,this}ga.prototype.clear=WLe,ga.prototype.delete=GLe,ga.prototype.get=VLe,ga.prototype.has=KLe,ga.prototype.set=XLe;function va(l){var h=-1,x=l==null?0:l.length;for(this.clear();++h<x;){var w=l[h];this.set(w[0],w[1])}}function YLe(){this.size=0,this.__data__={hash:new Vc,map:new(Gh||ga),string:new Vc}}function JLe(l){var h=ny(this,l).delete(l);return this.size-=h?1:0,h}function ZLe(l){return ny(this,l).get(l)}function QLe(l){return ny(this,l).has(l)}function eFe(l,h){var x=ny(this,l),w=x.size;return x.set(l,h),this.size+=x.size==w?0:1,this}va.prototype.clear=YLe,va.prototype.delete=JLe,va.prototype.get=ZLe,va.prototype.has=QLe,va.prototype.set=eFe;function Kc(l){var h=-1,x=l==null?0:l.length;for(this.__data__=new va;++h<x;)this.add(l[h])}function tFe(l){return this.__data__.set(l,o),this}function rFe(l){return this.__data__.has(l)}Kc.prototype.add=Kc.prototype.push=tFe,Kc.prototype.has=rFe;function Vs(l){var h=this.__data__=new ga(l);this.size=h.size}function nFe(){this.__data__=new ga,this.size=0}function iFe(l){var h=this.__data__,x=h.delete(l);return this.size=h.size,x}function sFe(l){return this.__data__.get(l)}function oFe(l){return this.__data__.has(l)}function aFe(l,h){var x=this.__data__;if(x instanceof ga){var w=x.__data__;if(!Gh||w.length<r-1)return w.push([l,h]),this.size=++x.size,this;x=this.__data__=new va(w)}return x.set(l,h),this.size=x.size,this}Vs.prototype.clear=nFe,Vs.prototype.delete=iFe,Vs.prototype.get=sFe,Vs.prototype.has=oFe,Vs.prototype.set=aFe;function ZB(l,h){var x=Ze(l),w=!x&&Qc(l),O=!x&&!w&&Du(l),L=!x&&!w&&!O&&Gf(l),z=x||w||O||L,W=z?cT(l.length,vLe):[],X=W.length;for(var ae in l)(h||kt.call(l,ae))&&!(z&&(ae=="length"||O&&(ae=="offset"||ae=="parent")||L&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||ba(ae,X)))&&W.push(ae);return W}function QB(l){var h=l.length;return h?l[TT(0,h-1)]:e}function uFe(l,h){return iy(bi(l),Xc(h,0,l.length))}function cFe(l){return iy(bi(l))}function gT(l,h,x){(x!==e&&!Ks(l[h],x)||x===e&&!(h in l))&&xa(l,h,x)}function Yh(l,h,x){var w=l[h];(!(kt.call(l,h)&&Ks(w,x))||x===e&&!(h in l))&&xa(l,h,x)}function Wx(l,h){for(var x=l.length;x--;)if(Ks(l[x][0],h))return x;return-1}function lFe(l,h,x,w){return Nu(l,function(O,L,z){h(w,O,x(O),z)}),w}function ej(l,h){return l&&Co(h,mn(h),l)}function fFe(l,h){return l&&Co(h,Ei(h),l)}function xa(l,h,x){h=="__proto__"&&Bx?Bx(l,h,{configurable:!0,enumerable:!0,value:x,writable:!0}):l[h]=x}function vT(l,h){for(var x=-1,w=h.length,O=re(w),L=l==null;++x<w;)O[x]=L?e:JT(l,h[x]);return O}function Xc(l,h,x){return l===l&&(x!==e&&(l=l<=x?l:x),h!==e&&(l=l>=h?l:h)),l}function vs(l,h,x,w,O,L){var z,W=h&c,X=h&f,ae=h&p;if(x&&(z=O?x(l,w,O,L):x(l)),z!==e)return z;if(!_r(l))return l;var ce=Ze(l);if(ce){if(z=QFe(l),!W)return bi(l,z)}else{var fe=Vn(l),_e=fe==F||fe==A;if(Du(l))return Sj(l,W);if(fe==Fe||fe==et||_e&&!O){if(z=X||_e?{}:zj(l),!W)return X?HFe(l,fFe(z,l)):UFe(l,ej(z,l))}else{if(!tr[fe])return O?l:{};z=e4e(l,fe,W)}}L||(L=new Vs);var qe=L.get(l);if(qe)return qe;L.set(l,z),x5(l)?l.forEach(function(Ue){z.add(vs(Ue,h,x,Ue,l,L))}):g5(l)&&l.forEach(function(Ue,at){z.set(at,vs(Ue,h,x,at,l,L))});var je=ae?X?FT:LT:X?Ei:mn,rt=ce?e:je(l);return hs(rt||l,function(Ue,at){rt&&(at=Ue,Ue=l[at]),Yh(z,at,vs(Ue,h,x,at,l,L))}),z}function pFe(l){var h=mn(l);return function(x){return tj(x,l,h)}}function tj(l,h,x){var w=x.length;if(l==null)return!w;for(l=Kt(l);w--;){var O=x[w],L=h[O],z=l[O];if(z===e&&!(O in l)||!L(z))return!1}return!0}function rj(l,h,x){if(typeof l!="function")throw new ms(i);return nm(function(){l.apply(e,x)},h)}function Jh(l,h,x,w){var O=-1,L=Ox,z=!0,W=l.length,X=[],ae=h.length;if(!W)return X;x&&(h=cr(h,Hi(x))),w?(L=nT,z=!1):h.length>=r&&(L=$h,z=!1,h=new Kc(h));e:for(;++O<W;){var ce=l[O],fe=x==null?ce:x(ce);if(ce=w||ce!==0?ce:0,z&&fe===fe){for(var _e=ae;_e--;)if(h[_e]===fe)continue e;X.push(ce)}else L(h,fe,w)||X.push(ce)}return X}var Nu=Ij(So),nj=Ij(yT,!0);function dFe(l,h){var x=!0;return Nu(l,function(w,O,L){return x=!!h(w,O,L),x}),x}function Gx(l,h,x){for(var w=-1,O=l.length;++w<O;){var L=l[w],z=h(L);if(z!=null&&(W===e?z===z&&!$i(z):x(z,W)))var W=z,X=L}return X}function hFe(l,h,x,w){var O=l.length;for(x=Qe(x),x<0&&(x=-x>O?0:O+x),w=w===e||w>O?O:Qe(w),w<0&&(w+=O),w=x>w?0:_5(w);x<w;)l[x++]=h;return l}function ij(l,h){var x=[];return Nu(l,function(w,O,L){h(w,O,L)&&x.push(w)}),x}function Tn(l,h,x,w,O){var L=-1,z=l.length;for(x||(x=r4e),O||(O=[]);++L<z;){var W=l[L];h>0&&x(W)?h>1?Tn(W,h-1,x,w,O):Au(O,W):w||(O[O.length]=W)}return O}var xT=Rj(),sj=Rj(!0);function So(l,h){return l&&xT(l,h,mn)}function yT(l,h){return l&&sj(l,h,mn)}function Vx(l,h){return Tu(h,function(x){return wa(l[x])})}function Yc(l,h){h=Pu(h,l);for(var x=0,w=h.length;l!=null&&x<w;)l=l[To(h[x++])];return x&&x==w?l:e}function oj(l,h,x){var w=h(l);return Ze(l)?w:Au(w,x(l))}function oi(l){return l==null?l===e?qf:He:Gc&&Gc in Kt(l)?YFe(l):c4e(l)}function _T(l,h){return l>h}function mFe(l,h){return l!=null&&kt.call(l,h)}function gFe(l,h){return l!=null&&h in Kt(l)}function vFe(l,h,x){return l>=Gn(h,x)&&l<rn(h,x)}function bT(l,h,x){for(var w=x?nT:Ox,O=l[0].length,L=l.length,z=L,W=re(L),X=1/0,ae=[];z--;){var ce=l[z];z&&h&&(ce=cr(ce,Hi(h))),X=Gn(ce.length,X),W[z]=!x&&(h||O>=120&&ce.length>=120)?new Kc(z&&ce):e}ce=l[0];var fe=-1,_e=W[0];e:for(;++fe<O&&ae.length<X;){var qe=ce[fe],je=h?h(qe):qe;if(qe=x||qe!==0?qe:0,!(_e?$h(_e,je):w(ae,je,x))){for(z=L;--z;){var rt=W[z];if(!(rt?$h(rt,je):w(l[z],je,x)))continue e}_e&&_e.push(je),ae.push(qe)}}return ae}function xFe(l,h,x,w){return So(l,function(O,L,z){h(w,x(O),L,z)}),w}function Zh(l,h,x){h=Pu(h,l),l=Vj(l,h);var w=l==null?l:l[To(ys(h))];return w==null?e:Ui(w,l,x)}function aj(l){return Ar(l)&&oi(l)==et}function yFe(l){return Ar(l)&&oi(l)==Eo}function _Fe(l){return Ar(l)&&oi(l)==Dr}function Qh(l,h,x,w,O){return l===h?!0:l==null||h==null||!Ar(l)&&!Ar(h)?l!==l&&h!==h:bFe(l,h,x,w,Qh,O)}function bFe(l,h,x,w,O,L){var z=Ze(l),W=Ze(h),X=z?tt:Vn(l),ae=W?tt:Vn(h);X=X==et?Fe:X,ae=ae==et?Fe:ae;var ce=X==Fe,fe=ae==Fe,_e=X==ae;if(_e&&Du(l)){if(!Du(h))return!1;z=!0,ce=!1}if(_e&&!ce)return L||(L=new Vs),z||Gf(l)?jj(l,h,x,w,O,L):KFe(l,h,X,x,w,O,L);if(!(x&d)){var qe=ce&&kt.call(l,"__wrapped__"),je=fe&&kt.call(h,"__wrapped__");if(qe||je){var rt=qe?l.value():l,Ue=je?h.value():h;return L||(L=new Vs),O(rt,Ue,x,w,L)}}return _e?(L||(L=new Vs),XFe(l,h,x,w,O,L)):!1}function wFe(l){return Ar(l)&&Vn(l)==Z}function wT(l,h,x,w){var O=x.length,L=O,z=!w;if(l==null)return!L;for(l=Kt(l);O--;){var W=x[O];if(z&&W[2]?W[1]!==l[W[0]]:!(W[0]in l))return!1}for(;++O<L;){W=x[O];var X=W[0],ae=l[X],ce=W[1];if(z&&W[2]){if(ae===e&&!(X in l))return!1}else{var fe=new Vs;if(w)var _e=w(ae,ce,X,l,h,fe);if(!(_e===e?Qh(ce,ae,d|m,w,fe):_e))return!1}}return!0}function uj(l){if(!_r(l)||i4e(l))return!1;var h=wa(l)?wLe:pDe;return h.test(Zc(l))}function EFe(l){return Ar(l)&&oi(l)==Gr}function SFe(l){return Ar(l)&&Vn(l)==Ae}function CFe(l){return Ar(l)&&ly(l.length)&&!!nr[oi(l)]}function cj(l){return typeof l=="function"?l:l==null?Si:typeof l=="object"?Ze(l)?pj(l[0],l[1]):fj(l):N5(l)}function ET(l){if(!rm(l))return OLe(l);var h=[];for(var x in Kt(l))kt.call(l,x)&&x!="constructor"&&h.push(x);return h}function TFe(l){if(!_r(l))return u4e(l);var h=rm(l),x=[];for(var w in l)w=="constructor"&&(h||!kt.call(l,w))||x.push(w);return x}function ST(l,h){return l<h}function lj(l,h){var x=-1,w=wi(l)?re(l.length):[];return Nu(l,function(O,L,z){w[++x]=h(O,L,z)}),w}function fj(l){var h=BT(l);return h.length==1&&h[0][2]?Wj(h[0][0],h[0][1]):function(x){return x===l||wT(x,l,h)}}function pj(l,h){return UT(l)&&$j(h)?Wj(To(l),h):function(x){var w=JT(x,l);return w===e&&w===h?ZT(x,l):Qh(h,w,d|m)}}function Kx(l,h,x,w,O){l!==h&&xT(h,function(L,z){if(O||(O=new Vs),_r(L))AFe(l,h,z,x,Kx,w,O);else{var W=w?w(zT(l,z),L,z+"",l,h,O):e;W===e&&(W=L),gT(l,z,W)}},Ei)}function AFe(l,h,x,w,O,L,z){var W=zT(l,x),X=zT(h,x),ae=z.get(X);if(ae){gT(l,x,ae);return}var ce=L?L(W,X,x+"",l,h,z):e,fe=ce===e;if(fe){var _e=Ze(X),qe=!_e&&Du(X),je=!_e&&!qe&&Gf(X);ce=X,_e||qe||je?Ze(W)?ce=W:Fr(W)?ce=bi(W):qe?(fe=!1,ce=Sj(X,!0)):je?(fe=!1,ce=Cj(X,!0)):ce=[]:im(X)||Qc(X)?(ce=W,Qc(W)?ce=b5(W):(!_r(W)||wa(W))&&(ce=zj(X))):fe=!1}fe&&(z.set(X,ce),O(ce,X,w,L,z),z.delete(X)),gT(l,x,ce)}function dj(l,h){var x=l.length;if(x)return h+=h<0?x:0,ba(h,x)?l[h]:e}function hj(l,h,x){h.length?h=cr(h,function(L){return Ze(L)?function(z){return Yc(z,L.length===1?L[0]:L)}:L}):h=[Si];var w=-1;h=cr(h,Hi(Me()));var O=lj(l,function(L,z,W){var X=cr(h,function(ae){return ae(L)});return{criteria:X,index:++w,value:L}});return eLe(O,function(L,z){return jFe(L,z,x)})}function OFe(l,h){return mj(l,h,function(x,w){return ZT(l,w)})}function mj(l,h,x){for(var w=-1,O=h.length,L={};++w<O;){var z=h[w],W=Yc(l,z);x(W,z)&&em(L,Pu(z,l),W)}return L}function IFe(l){return function(h){return Yc(h,l)}}function CT(l,h,x,w){var O=w?QDe:Lf,L=-1,z=h.length,W=l;for(l===h&&(h=bi(h)),x&&(W=cr(l,Hi(x)));++L<z;)for(var X=0,ae=h[L],ce=x?x(ae):ae;(X=O(W,ce,X,w))>-1;)W!==l&&Mx.call(W,X,1),Mx.call(l,X,1);return l}function gj(l,h){for(var x=l?h.length:0,w=x-1;x--;){var O=h[x];if(x==w||O!==L){var L=O;ba(O)?Mx.call(l,O,1):IT(l,O)}}return l}function TT(l,h){return l+Ux(YB()*(h-l+1))}function RFe(l,h,x,w){for(var O=-1,L=rn(jx((h-l)/(x||1)),0),z=re(L);L--;)z[w?L:++O]=l,l+=x;return z}function AT(l,h){var x="";if(!l||h<1||h>U)return x;do h%2&&(x+=l),h=Ux(h/2),h&&(l+=l);while(h);return x}function nt(l,h){return $T(Gj(l,h,Si),l+"")}function NFe(l){return QB(Vf(l))}function qFe(l,h){var x=Vf(l);return iy(x,Xc(h,0,x.length))}function em(l,h,x,w){if(!_r(l))return l;h=Pu(h,l);for(var O=-1,L=h.length,z=L-1,W=l;W!=null&&++O<L;){var X=To(h[O]),ae=x;if(X==="__proto__"||X==="constructor"||X==="prototype")return l;if(O!=z){var ce=W[X];ae=w?w(ce,X,W):e,ae===e&&(ae=_r(ce)?ce:ba(h[O+1])?[]:{})}Yh(W,X,ae),W=W[X]}return l}var vj=Hx?function(l,h){return Hx.set(l,h),l}:Si,PFe=Bx?function(l,h){return Bx(l,"toString",{configurable:!0,enumerable:!1,value:eA(h),writable:!0})}:Si;function kFe(l){return iy(Vf(l))}function xs(l,h,x){var w=-1,O=l.length;h<0&&(h=-h>O?0:O+h),x=x>O?O:x,x<0&&(x+=O),O=h>x?0:x-h>>>0,h>>>=0;for(var L=re(O);++w<O;)L[w]=l[w+h];return L}function DFe(l,h){var x;return Nu(l,function(w,O,L){return x=h(w,O,L),!x}),!!x}function Xx(l,h,x){var w=0,O=l==null?w:l.length;if(typeof h=="number"&&h===h&&O<=we){for(;w<O;){var L=w+O>>>1,z=l[L];z!==null&&!$i(z)&&(x?z<=h:z<h)?w=L+1:O=L}return O}return OT(l,h,Si,x)}function OT(l,h,x,w){var O=0,L=l==null?0:l.length;if(L===0)return 0;h=x(h);for(var z=h!==h,W=h===null,X=$i(h),ae=h===e;O<L;){var ce=Ux((O+L)/2),fe=x(l[ce]),_e=fe!==e,qe=fe===null,je=fe===fe,rt=$i(fe);if(z)var Ue=w||je;else ae?Ue=je&&(w||_e):W?Ue=je&&_e&&(w||!qe):X?Ue=je&&_e&&!qe&&(w||!rt):qe||rt?Ue=!1:Ue=w?fe<=h:fe<h;Ue?O=ce+1:L=ce}return Gn(L,ge)}function xj(l,h){for(var x=-1,w=l.length,O=0,L=[];++x<w;){var z=l[x],W=h?h(z):z;if(!x||!Ks(W,X)){var X=W;L[O++]=z===0?0:z}}return L}function yj(l){return typeof l=="number"?l:$i(l)?Q:+l}function zi(l){if(typeof l=="string")return l;if(Ze(l))return cr(l,zi)+"";if($i(l))return JB?JB.call(l):"";var h=l+"";return h=="0"&&1/l==-H?"-0":h}function qu(l,h,x){var w=-1,O=Ox,L=l.length,z=!0,W=[],X=W;if(x)z=!1,O=nT;else if(L>=r){var ae=h?null:GFe(l);if(ae)return Rx(ae);z=!1,O=$h,X=new Kc}else X=h?[]:W;e:for(;++w<L;){var ce=l[w],fe=h?h(ce):ce;if(ce=x||ce!==0?ce:0,z&&fe===fe){for(var _e=X.length;_e--;)if(X[_e]===fe)continue e;h&&X.push(fe),W.push(ce)}else O(X,fe,x)||(X!==W&&X.push(fe),W.push(ce))}return W}function IT(l,h){return h=Pu(h,l),l=Vj(l,h),l==null||delete l[To(ys(h))]}function _j(l,h,x,w){return em(l,h,x(Yc(l,h)),w)}function Yx(l,h,x,w){for(var O=l.length,L=w?O:-1;(w?L--:++L<O)&&h(l[L],L,l););return x?xs(l,w?0:L,w?L+1:O):xs(l,w?L+1:0,w?O:L)}function bj(l,h){var x=l;return x instanceof ft&&(x=x.value()),iT(h,function(w,O){return O.func.apply(O.thisArg,Au([w],O.args))},x)}function RT(l,h,x){var w=l.length;if(w<2)return w?qu(l[0]):[];for(var O=-1,L=re(w);++O<w;)for(var z=l[O],W=-1;++W<w;)W!=O&&(L[O]=Jh(L[O]||z,l[W],h,x));return qu(Tn(L,1),h,x)}function wj(l,h,x){for(var w=-1,O=l.length,L=h.length,z={};++w<O;){var W=w<L?h[w]:e;x(z,l[w],W)}return z}function NT(l){return Fr(l)?l:[]}function qT(l){return typeof l=="function"?l:Si}function Pu(l,h){return Ze(l)?l:UT(l,h)?[l]:Jj(Nt(l))}var LFe=nt;function ku(l,h,x){var w=l.length;return x=x===e?w:x,!h&&x>=w?l:xs(l,h,x)}var Ej=ELe||function(l){return hn.clearTimeout(l)};function Sj(l,h){if(h)return l.slice();var x=l.length,w=WB?WB(x):new l.constructor(x);return l.copy(w),w}function PT(l){var h=new l.constructor(l.byteLength);return new Lx(h).set(new Lx(l)),h}function FFe(l,h){var x=h?PT(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.byteLength)}function MFe(l){var h=new l.constructor(l.source,aB.exec(l));return h.lastIndex=l.lastIndex,h}function BFe(l){return Xh?Kt(Xh.call(l)):{}}function Cj(l,h){var x=h?PT(l.buffer):l.buffer;return new l.constructor(x,l.byteOffset,l.length)}function Tj(l,h){if(l!==h){var x=l!==e,w=l===null,O=l===l,L=$i(l),z=h!==e,W=h===null,X=h===h,ae=$i(h);if(!W&&!ae&&!L&&l>h||L&&z&&X&&!W&&!ae||w&&z&&X||!x&&X||!O)return 1;if(!w&&!L&&!ae&&l<h||ae&&x&&O&&!w&&!L||W&&x&&O||!z&&O||!X)return-1}return 0}function jFe(l,h,x){for(var w=-1,O=l.criteria,L=h.criteria,z=O.length,W=x.length;++w<z;){var X=Tj(O[w],L[w]);if(X){if(w>=W)return X;var ae=x[w];return X*(ae=="desc"?-1:1)}}return l.index-h.index}function Aj(l,h,x,w){for(var O=-1,L=l.length,z=x.length,W=-1,X=h.length,ae=rn(L-z,0),ce=re(X+ae),fe=!w;++W<X;)ce[W]=h[W];for(;++O<z;)(fe||O<L)&&(ce[x[O]]=l[O]);for(;ae--;)ce[W++]=l[O++];return ce}function Oj(l,h,x,w){for(var O=-1,L=l.length,z=-1,W=x.length,X=-1,ae=h.length,ce=rn(L-W,0),fe=re(ce+ae),_e=!w;++O<ce;)fe[O]=l[O];for(var qe=O;++X<ae;)fe[qe+X]=h[X];for(;++z<W;)(_e||O<L)&&(fe[qe+x[z]]=l[O++]);return fe}function bi(l,h){var x=-1,w=l.length;for(h||(h=re(w));++x<w;)h[x]=l[x];return h}function Co(l,h,x,w){var O=!x;x||(x={});for(var L=-1,z=h.length;++L<z;){var W=h[L],X=w?w(x[W],l[W],W,x,l):e;X===e&&(X=l[W]),O?xa(x,W,X):Yh(x,W,X)}return x}function UFe(l,h){return Co(l,jT(l),h)}function HFe(l,h){return Co(l,Uj(l),h)}function Jx(l,h){return function(x,w){var O=Ze(x)?VDe:lFe,L=h?h():{};return O(x,l,Me(w,2),L)}}function zf(l){return nt(function(h,x){var w=-1,O=x.length,L=O>1?x[O-1]:e,z=O>2?x[2]:e;for(L=l.length>3&&typeof L=="function"?(O--,L):e,z&&ai(x[0],x[1],z)&&(L=O<3?e:L,O=1),h=Kt(h);++w<O;){var W=x[w];W&&l(h,W,w,L)}return h})}function Ij(l,h){return function(x,w){if(x==null)return x;if(!wi(x))return l(x,w);for(var O=x.length,L=h?O:-1,z=Kt(x);(h?L--:++L<O)&&w(z[L],L,z)!==!1;);return x}}function Rj(l){return function(h,x,w){for(var O=-1,L=Kt(h),z=w(h),W=z.length;W--;){var X=z[l?W:++O];if(x(L[X],X,L)===!1)break}return h}}function zFe(l,h,x){var w=h&v,O=tm(l);function L(){var z=this&&this!==hn&&this instanceof L?O:l;return z.apply(w?x:this,arguments)}return L}function Nj(l){return function(h){h=Nt(h);var x=Ff(h)?Gs(h):e,w=x?x[0]:h.charAt(0),O=x?ku(x,1).join(""):h.slice(1);return w[l]()+O}}function $f(l){return function(h){return iT(I5(O5(h).replace(PDe,"")),l,"")}}function tm(l){return function(){var h=arguments;switch(h.length){case 0:return new l;case 1:return new l(h[0]);case 2:return new l(h[0],h[1]);case 3:return new l(h[0],h[1],h[2]);case 4:return new l(h[0],h[1],h[2],h[3]);case 5:return new l(h[0],h[1],h[2],h[3],h[4]);case 6:return new l(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new l(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var x=Hf(l.prototype),w=l.apply(x,h);return _r(w)?w:x}}function $Fe(l,h,x){var w=tm(l);function O(){for(var L=arguments.length,z=re(L),W=L,X=Wf(O);W--;)z[W]=arguments[W];var ae=L<3&&z[0]!==X&&z[L-1]!==X?[]:Ou(z,X);if(L-=ae.length,L<x)return Lj(l,h,Zx,O.placeholder,e,z,ae,e,e,x-L);var ce=this&&this!==hn&&this instanceof O?w:l;return Ui(ce,this,z)}return O}function qj(l){return function(h,x,w){var O=Kt(h);if(!wi(h)){var L=Me(x,3);h=mn(h),x=function(W){return L(O[W],W,O)}}var z=l(h,x,w);return z>-1?O[L?h[z]:z]:e}}function Pj(l){return _a(function(h){var x=h.length,w=x,O=gs.prototype.thru;for(l&&h.reverse();w--;){var L=h[w];if(typeof L!="function")throw new ms(i);if(O&&!z&&ry(L)=="wrapper")var z=new gs([],!0)}for(w=z?w:x;++w<x;){L=h[w];var W=ry(L),X=W=="wrapper"?MT(L):e;X&&HT(X[0])&&X[1]==(C|y|S|I)&&!X[4].length&&X[9]==1?z=z[ry(X[0])].apply(z,X[3]):z=L.length==1&&HT(L)?z[W]():z.thru(L)}return function(){var ae=arguments,ce=ae[0];if(z&&ae.length==1&&Ze(ce))return z.plant(ce).value();for(var fe=0,_e=x?h[fe].apply(this,ae):ce;++fe<x;)_e=h[fe].call(this,_e);return _e}})}function Zx(l,h,x,w,O,L,z,W,X,ae){var ce=h&C,fe=h&v,_e=h&_,qe=h&(y|T),je=h&q,rt=_e?e:tm(l);function Ue(){for(var at=arguments.length,yt=re(at),Wi=at;Wi--;)yt[Wi]=arguments[Wi];if(qe)var ui=Wf(Ue),Gi=rLe(yt,ui);if(w&&(yt=Aj(yt,w,O,qe)),L&&(yt=Oj(yt,L,z,qe)),at-=Gi,qe&&at<ae){var Mr=Ou(yt,ui);return Lj(l,h,Zx,Ue.placeholder,x,yt,Mr,W,X,ae-at)}var Xs=fe?x:this,Sa=_e?Xs[l]:l;return at=yt.length,W?yt=l4e(yt,W):je&&at>1&&yt.reverse(),ce&&X<at&&(yt.length=X),this&&this!==hn&&this instanceof Ue&&(Sa=rt||tm(Sa)),Sa.apply(Xs,yt)}return Ue}function kj(l,h){return function(x,w){return xFe(x,l,h(w),{})}}function Qx(l,h){return function(x,w){var O;if(x===e&&w===e)return h;if(x!==e&&(O=x),w!==e){if(O===e)return w;typeof x=="string"||typeof w=="string"?(x=zi(x),w=zi(w)):(x=yj(x),w=yj(w)),O=l(x,w)}return O}}function kT(l){return _a(function(h){return h=cr(h,Hi(Me())),nt(function(x){var w=this;return l(h,function(O){return Ui(O,w,x)})})})}function ey(l,h){h=h===e?" ":zi(h);var x=h.length;if(x<2)return x?AT(h,l):h;var w=AT(h,jx(l/Mf(h)));return Ff(h)?ku(Gs(w),0,l).join(""):w.slice(0,l)}function WFe(l,h,x,w){var O=h&v,L=tm(l);function z(){for(var W=-1,X=arguments.length,ae=-1,ce=w.length,fe=re(ce+X),_e=this&&this!==hn&&this instanceof z?L:l;++ae<ce;)fe[ae]=w[ae];for(;X--;)fe[ae++]=arguments[++W];return Ui(_e,O?x:this,fe)}return z}function Dj(l){return function(h,x,w){return w&&typeof w!="number"&&ai(h,x,w)&&(x=w=e),h=Ea(h),x===e?(x=h,h=0):x=Ea(x),w=w===e?h<x?1:-1:Ea(w),RFe(h,x,w,l)}}function ty(l){return function(h,x){return typeof h=="string"&&typeof x=="string"||(h=_s(h),x=_s(x)),l(h,x)}}function Lj(l,h,x,w,O,L,z,W,X,ae){var ce=h&y,fe=ce?z:e,_e=ce?e:z,qe=ce?L:e,je=ce?e:L;h|=ce?S:E,h&=~(ce?E:S),h&b||(h&=~(v|_));var rt=[l,h,O,qe,fe,je,_e,W,X,ae],Ue=x.apply(e,rt);return HT(l)&&Kj(Ue,rt),Ue.placeholder=w,Xj(Ue,l,h)}function DT(l){var h=tn[l];return function(x,w){if(x=_s(x),w=w==null?0:Gn(Qe(w),292),w&&XB(x)){var O=(Nt(x)+"e").split("e"),L=h(O[0]+"e"+(+O[1]+w));return O=(Nt(L)+"e").split("e"),+(O[0]+"e"+(+O[1]-w))}return h(x)}}var GFe=jf&&1/Rx(new jf([,-0]))[1]==H?function(l){return new jf(l)}:nA;function Fj(l){return function(h){var x=Vn(h);return x==Z?fT(h):x==Ae?cLe(h):tLe(h,l(h))}}function ya(l,h,x,w,O,L,z,W){var X=h&_;if(!X&&typeof l!="function")throw new ms(i);var ae=w?w.length:0;if(ae||(h&=~(S|E),w=O=e),z=z===e?z:rn(Qe(z),0),W=W===e?W:Qe(W),ae-=O?O.length:0,h&E){var ce=w,fe=O;w=O=e}var _e=X?e:MT(l),qe=[l,h,x,w,O,ce,fe,L,z,W];if(_e&&a4e(qe,_e),l=qe[0],h=qe[1],x=qe[2],w=qe[3],O=qe[4],W=qe[9]=qe[9]===e?X?0:l.length:rn(qe[9]-ae,0),!W&&h&(y|T)&&(h&=~(y|T)),!h||h==v)var je=zFe(l,h,x);else h==y||h==T?je=$Fe(l,h,W):(h==S||h==(v|S))&&!O.length?je=WFe(l,h,x,w):je=Zx.apply(e,qe);var rt=_e?vj:Kj;return Xj(rt(je,qe),l,h)}function Mj(l,h,x,w){return l===e||Ks(l,Bf[x])&&!kt.call(w,x)?h:l}function Bj(l,h,x,w,O,L){return _r(l)&&_r(h)&&(L.set(h,l),Kx(l,h,e,Bj,L),L.delete(h)),l}function VFe(l){return im(l)?e:l}function jj(l,h,x,w,O,L){var z=x&d,W=l.length,X=h.length;if(W!=X&&!(z&&X>W))return!1;var ae=L.get(l),ce=L.get(h);if(ae&&ce)return ae==h&&ce==l;var fe=-1,_e=!0,qe=x&m?new Kc:e;for(L.set(l,h),L.set(h,l);++fe<W;){var je=l[fe],rt=h[fe];if(w)var Ue=z?w(rt,je,fe,h,l,L):w(je,rt,fe,l,h,L);if(Ue!==e){if(Ue)continue;_e=!1;break}if(qe){if(!sT(h,function(at,yt){if(!$h(qe,yt)&&(je===at||O(je,at,x,w,L)))return qe.push(yt)})){_e=!1;break}}else if(!(je===rt||O(je,rt,x,w,L))){_e=!1;break}}return L.delete(l),L.delete(h),_e}function KFe(l,h,x,w,O,L,z){switch(x){case k:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case Eo:return!(l.byteLength!=h.byteLength||!L(new Lx(l),new Lx(h)));case Ne:case Dr:case V:return Ks(+l,+h);case xe:return l.name==h.name&&l.message==h.message;case Gr:case Vt:return l==h+"";case Z:var W=fT;case Ae:var X=w&d;if(W||(W=Rx),l.size!=h.size&&!X)return!1;var ae=z.get(l);if(ae)return ae==h;w|=m,z.set(l,h);var ce=jj(W(l),W(h),w,O,L,z);return z.delete(l),ce;case Cn:if(Xh)return Xh.call(l)==Xh.call(h)}return!1}function XFe(l,h,x,w,O,L){var z=x&d,W=LT(l),X=W.length,ae=LT(h),ce=ae.length;if(X!=ce&&!z)return!1;for(var fe=X;fe--;){var _e=W[fe];if(!(z?_e in h:kt.call(h,_e)))return!1}var qe=L.get(l),je=L.get(h);if(qe&&je)return qe==h&&je==l;var rt=!0;L.set(l,h),L.set(h,l);for(var Ue=z;++fe<X;){_e=W[fe];var at=l[_e],yt=h[_e];if(w)var Wi=z?w(yt,at,_e,h,l,L):w(at,yt,_e,l,h,L);if(!(Wi===e?at===yt||O(at,yt,x,w,L):Wi)){rt=!1;break}Ue||(Ue=_e=="constructor")}if(rt&&!Ue){var ui=l.constructor,Gi=h.constructor;ui!=Gi&&"constructor"in l&&"constructor"in h&&!(typeof ui=="function"&&ui instanceof ui&&typeof Gi=="function"&&Gi instanceof Gi)&&(rt=!1)}return L.delete(l),L.delete(h),rt}function _a(l){return $T(Gj(l,e,t5),l+"")}function LT(l){return oj(l,mn,jT)}function FT(l){return oj(l,Ei,Uj)}var MT=Hx?function(l){return Hx.get(l)}:nA;function ry(l){for(var h=l.name+"",x=Uf[h],w=kt.call(Uf,h)?x.length:0;w--;){var O=x[w],L=O.func;if(L==null||L==l)return O.name}return h}function Wf(l){var h=kt.call(P,"placeholder")?P:l;return h.placeholder}function Me(){var l=P.iteratee||tA;return l=l===tA?cj:l,arguments.length?l(arguments[0],arguments[1]):l}function ny(l,h){var x=l.__data__;return n4e(h)?x[typeof h=="string"?"string":"hash"]:x.map}function BT(l){for(var h=mn(l),x=h.length;x--;){var w=h[x],O=l[w];h[x]=[w,O,$j(O)]}return h}function Jc(l,h){var x=oLe(l,h);return uj(x)?x:e}function YFe(l){var h=kt.call(l,Gc),x=l[Gc];try{l[Gc]=e;var w=!0}catch{}var O=kx.call(l);return w&&(h?l[Gc]=x:delete l[Gc]),O}var jT=dT?function(l){return l==null?[]:(l=Kt(l),Tu(dT(l),function(h){return VB.call(l,h)}))}:iA,Uj=dT?function(l){for(var h=[];l;)Au(h,jT(l)),l=Fx(l);return h}:iA,Vn=oi;(hT&&Vn(new hT(new ArrayBuffer(1)))!=k||Gh&&Vn(new Gh)!=Z||mT&&Vn(mT.resolve())!=$t||jf&&Vn(new jf)!=Ae||Vh&&Vn(new Vh)!=wo)&&(Vn=function(l){var h=oi(l),x=h==Fe?l.constructor:e,w=x?Zc(x):"";if(w)switch(w){case qLe:return k;case PLe:return Z;case kLe:return $t;case DLe:return Ae;case LLe:return wo}return h});function JFe(l,h,x){for(var w=-1,O=x.length;++w<O;){var L=x[w],z=L.size;switch(L.type){case"drop":l+=z;break;case"dropRight":h-=z;break;case"take":h=Gn(h,l+z);break;case"takeRight":l=rn(l,h-z);break}}return{start:l,end:h}}function ZFe(l){var h=l.match(iDe);return h?h[1].split(sDe):[]}function Hj(l,h,x){h=Pu(h,l);for(var w=-1,O=h.length,L=!1;++w<O;){var z=To(h[w]);if(!(L=l!=null&&x(l,z)))break;l=l[z]}return L||++w!=O?L:(O=l==null?0:l.length,!!O&&ly(O)&&ba(z,O)&&(Ze(l)||Qc(l)))}function QFe(l){var h=l.length,x=new l.constructor(h);return h&&typeof l[0]=="string"&&kt.call(l,"index")&&(x.index=l.index,x.input=l.input),x}function zj(l){return typeof l.constructor=="function"&&!rm(l)?Hf(Fx(l)):{}}function e4e(l,h,x){var w=l.constructor;switch(h){case Eo:return PT(l);case Ne:case Dr:return new w(+l);case k:return FFe(l,x);case $:case G:case ne:case ue:case be:case Ge:case ot:case en:case Bi:return Cj(l,x);case Z:return new w;case V:case Vt:return new w(l);case Gr:return MFe(l);case Ae:return new w;case Cn:return BFe(l)}}function t4e(l,h){var x=h.length;if(!x)return l;var w=x-1;return h[w]=(x>1?"& ":"")+h[w],h=h.join(x>2?", ":" "),l.replace(Sx,`{
|
|
141
141
|
/* [wrapped with `+h+`] */
|
|
142
142
|
`)}function r4e(l){return Ze(l)||Qc(l)||!!(KB&&l&&l[KB])}function ba(l,h){var x=typeof l;return h=h??U,!!h&&(x=="number"||x!="symbol"&&hDe.test(l))&&l>-1&&l%1==0&&l<h}function ai(l,h,x){if(!_r(x))return!1;var w=typeof h;return(w=="number"?wi(x)&&ba(h,x.length):w=="string"&&h in x)?Ks(x[h],l):!1}function UT(l,h){if(Ze(l))return!1;var x=typeof l;return x=="number"||x=="symbol"||x=="boolean"||l==null||$i(l)?!0:wx.test(l)||!Hh.test(l)||h!=null&&l in Kt(h)}function n4e(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function HT(l){var h=ry(l),x=P[h];if(typeof x!="function"||!(h in ft.prototype))return!1;if(l===x)return!0;var w=MT(x);return!!w&&l===w[0]}function i4e(l){return!!$B&&$B in l}var s4e=qx?wa:sA;function rm(l){var h=l&&l.constructor,x=typeof h=="function"&&h.prototype||Bf;return l===x}function $j(l){return l===l&&!_r(l)}function Wj(l,h){return function(x){return x==null?!1:x[l]===h&&(h!==e||l in Kt(x))}}function o4e(l){var h=uy(l,function(w){return x.size===a&&x.clear(),w}),x=h.cache;return h}function a4e(l,h){var x=l[1],w=h[1],O=x|w,L=O<(v|_|C),z=w==C&&x==y||w==C&&x==I&&l[7].length<=h[8]||w==(C|I)&&h[7].length<=h[8]&&x==y;if(!(L||z))return l;w&v&&(l[2]=h[2],O|=x&v?0:b);var W=h[3];if(W){var X=l[3];l[3]=X?Aj(X,W,h[4]):W,l[4]=X?Ou(l[3],u):h[4]}return W=h[5],W&&(X=l[5],l[5]=X?Oj(X,W,h[6]):W,l[6]=X?Ou(l[5],u):h[6]),W=h[7],W&&(l[7]=W),w&C&&(l[8]=l[8]==null?h[8]:Gn(l[8],h[8])),l[9]==null&&(l[9]=h[9]),l[0]=h[0],l[1]=O,l}function u4e(l){var h=[];if(l!=null)for(var x in Kt(l))h.push(x);return h}function c4e(l){return kx.call(l)}function Gj(l,h,x){return h=rn(h===e?l.length-1:h,0),function(){for(var w=arguments,O=-1,L=rn(w.length-h,0),z=re(L);++O<L;)z[O]=w[h+O];O=-1;for(var W=re(h+1);++O<h;)W[O]=w[O];return W[h]=x(z),Ui(l,this,W)}}function Vj(l,h){return h.length<2?l:Yc(l,xs(h,0,-1))}function l4e(l,h){for(var x=l.length,w=Gn(h.length,x),O=bi(l);w--;){var L=h[w];l[w]=ba(L,x)?O[L]:e}return l}function zT(l,h){if(!(h==="constructor"&&typeof l[h]=="function")&&h!="__proto__")return l[h]}var Kj=Yj(vj),nm=CLe||function(l,h){return hn.setTimeout(l,h)},$T=Yj(PFe);function Xj(l,h,x){var w=h+"";return $T(l,t4e(w,f4e(ZFe(w),x)))}function Yj(l){var h=0,x=0;return function(){var w=ILe(),O=D-(w-x);if(x=w,O>0){if(++h>=R)return arguments[0]}else h=0;return l.apply(e,arguments)}}function iy(l,h){var x=-1,w=l.length,O=w-1;for(h=h===e?w:h;++x<h;){var L=TT(x,O),z=l[L];l[L]=l[x],l[x]=z}return l.length=h,l}var Jj=o4e(function(l){var h=[];return l.charCodeAt(0)===46&&h.push(""),l.replace(zh,function(x,w,O,L){h.push(O?L.replace(uDe,"$1"):w||x)}),h});function To(l){if(typeof l=="string"||$i(l))return l;var h=l+"";return h=="0"&&1/l==-H?"-0":h}function Zc(l){if(l!=null){try{return Px.call(l)}catch{}try{return l+""}catch{}}return""}function f4e(l,h){return hs(We,function(x){var w="_."+x[0];h&x[1]&&!Ox(l,w)&&l.push(w)}),l.sort()}function Zj(l){if(l instanceof ft)return l.clone();var h=new gs(l.__wrapped__,l.__chain__);return h.__actions__=bi(l.__actions__),h.__index__=l.__index__,h.__values__=l.__values__,h}function p4e(l,h,x){(x?ai(l,h,x):h===e)?h=1:h=rn(Qe(h),0);var w=l==null?0:l.length;if(!w||h<1)return[];for(var O=0,L=0,z=re(jx(w/h));O<w;)z[L++]=xs(l,O,O+=h);return z}function d4e(l){for(var h=-1,x=l==null?0:l.length,w=0,O=[];++h<x;){var L=l[h];L&&(O[w++]=L)}return O}function h4e(){var l=arguments.length;if(!l)return[];for(var h=re(l-1),x=arguments[0],w=l;w--;)h[w-1]=arguments[w];return Au(Ze(x)?bi(x):[x],Tn(h,1))}var m4e=nt(function(l,h){return Fr(l)?Jh(l,Tn(h,1,Fr,!0)):[]}),g4e=nt(function(l,h){var x=ys(h);return Fr(x)&&(x=e),Fr(l)?Jh(l,Tn(h,1,Fr,!0),Me(x,2)):[]}),v4e=nt(function(l,h){var x=ys(h);return Fr(x)&&(x=e),Fr(l)?Jh(l,Tn(h,1,Fr,!0),e,x):[]});function x4e(l,h,x){var w=l==null?0:l.length;return w?(h=x||h===e?1:Qe(h),xs(l,h<0?0:h,w)):[]}function y4e(l,h,x){var w=l==null?0:l.length;return w?(h=x||h===e?1:Qe(h),h=w-h,xs(l,0,h<0?0:h)):[]}function _4e(l,h){return l&&l.length?Yx(l,Me(h,3),!0,!0):[]}function b4e(l,h){return l&&l.length?Yx(l,Me(h,3),!0):[]}function w4e(l,h,x,w){var O=l==null?0:l.length;return O?(x&&typeof x!="number"&&ai(l,h,x)&&(x=0,w=O),hFe(l,h,x,w)):[]}function Qj(l,h,x){var w=l==null?0:l.length;if(!w)return-1;var O=x==null?0:Qe(x);return O<0&&(O=rn(w+O,0)),Ix(l,Me(h,3),O)}function e5(l,h,x){var w=l==null?0:l.length;if(!w)return-1;var O=w-1;return x!==e&&(O=Qe(x),O=x<0?rn(w+O,0):Gn(O,w-1)),Ix(l,Me(h,3),O,!0)}function t5(l){var h=l==null?0:l.length;return h?Tn(l,1):[]}function E4e(l){var h=l==null?0:l.length;return h?Tn(l,H):[]}function S4e(l,h){var x=l==null?0:l.length;return x?(h=h===e?1:Qe(h),Tn(l,h)):[]}function C4e(l){for(var h=-1,x=l==null?0:l.length,w={};++h<x;){var O=l[h];w[O[0]]=O[1]}return w}function r5(l){return l&&l.length?l[0]:e}function T4e(l,h,x){var w=l==null?0:l.length;if(!w)return-1;var O=x==null?0:Qe(x);return O<0&&(O=rn(w+O,0)),Lf(l,h,O)}function A4e(l){var h=l==null?0:l.length;return h?xs(l,0,-1):[]}var O4e=nt(function(l){var h=cr(l,NT);return h.length&&h[0]===l[0]?bT(h):[]}),I4e=nt(function(l){var h=ys(l),x=cr(l,NT);return h===ys(x)?h=e:x.pop(),x.length&&x[0]===l[0]?bT(x,Me(h,2)):[]}),R4e=nt(function(l){var h=ys(l),x=cr(l,NT);return h=typeof h=="function"?h:e,h&&x.pop(),x.length&&x[0]===l[0]?bT(x,e,h):[]});function N4e(l,h){return l==null?"":ALe.call(l,h)}function ys(l){var h=l==null?0:l.length;return h?l[h-1]:e}function q4e(l,h,x){var w=l==null?0:l.length;if(!w)return-1;var O=w;return x!==e&&(O=Qe(x),O=O<0?rn(w+O,0):Gn(O,w-1)),h===h?fLe(l,h,O):Ix(l,LB,O,!0)}function P4e(l,h){return l&&l.length?dj(l,Qe(h)):e}var k4e=nt(n5);function n5(l,h){return l&&l.length&&h&&h.length?CT(l,h):l}function D4e(l,h,x){return l&&l.length&&h&&h.length?CT(l,h,Me(x,2)):l}function L4e(l,h,x){return l&&l.length&&h&&h.length?CT(l,h,e,x):l}var F4e=_a(function(l,h){var x=l==null?0:l.length,w=vT(l,h);return gj(l,cr(h,function(O){return ba(O,x)?+O:O}).sort(Tj)),w});function M4e(l,h){var x=[];if(!(l&&l.length))return x;var w=-1,O=[],L=l.length;for(h=Me(h,3);++w<L;){var z=l[w];h(z,w,l)&&(x.push(z),O.push(w))}return gj(l,O),x}function WT(l){return l==null?l:NLe.call(l)}function B4e(l,h,x){var w=l==null?0:l.length;return w?(x&&typeof x!="number"&&ai(l,h,x)?(h=0,x=w):(h=h==null?0:Qe(h),x=x===e?w:Qe(x)),xs(l,h,x)):[]}function j4e(l,h){return Xx(l,h)}function U4e(l,h,x){return OT(l,h,Me(x,2))}function H4e(l,h){var x=l==null?0:l.length;if(x){var w=Xx(l,h);if(w<x&&Ks(l[w],h))return w}return-1}function z4e(l,h){return Xx(l,h,!0)}function $4e(l,h,x){return OT(l,h,Me(x,2),!0)}function W4e(l,h){var x=l==null?0:l.length;if(x){var w=Xx(l,h,!0)-1;if(Ks(l[w],h))return w}return-1}function G4e(l){return l&&l.length?xj(l):[]}function V4e(l,h){return l&&l.length?xj(l,Me(h,2)):[]}function K4e(l){var h=l==null?0:l.length;return h?xs(l,1,h):[]}function X4e(l,h,x){return l&&l.length?(h=x||h===e?1:Qe(h),xs(l,0,h<0?0:h)):[]}function Y4e(l,h,x){var w=l==null?0:l.length;return w?(h=x||h===e?1:Qe(h),h=w-h,xs(l,h<0?0:h,w)):[]}function J4e(l,h){return l&&l.length?Yx(l,Me(h,3),!1,!0):[]}function Z4e(l,h){return l&&l.length?Yx(l,Me(h,3)):[]}var Q4e=nt(function(l){return qu(Tn(l,1,Fr,!0))}),e3e=nt(function(l){var h=ys(l);return Fr(h)&&(h=e),qu(Tn(l,1,Fr,!0),Me(h,2))}),t3e=nt(function(l){var h=ys(l);return h=typeof h=="function"?h:e,qu(Tn(l,1,Fr,!0),e,h)});function r3e(l){return l&&l.length?qu(l):[]}function n3e(l,h){return l&&l.length?qu(l,Me(h,2)):[]}function i3e(l,h){return h=typeof h=="function"?h:e,l&&l.length?qu(l,e,h):[]}function GT(l){if(!(l&&l.length))return[];var h=0;return l=Tu(l,function(x){if(Fr(x))return h=rn(x.length,h),!0}),cT(h,function(x){return cr(l,oT(x))})}function i5(l,h){if(!(l&&l.length))return[];var x=GT(l);return h==null?x:cr(x,function(w){return Ui(h,e,w)})}var s3e=nt(function(l,h){return Fr(l)?Jh(l,h):[]}),o3e=nt(function(l){return RT(Tu(l,Fr))}),a3e=nt(function(l){var h=ys(l);return Fr(h)&&(h=e),RT(Tu(l,Fr),Me(h,2))}),u3e=nt(function(l){var h=ys(l);return h=typeof h=="function"?h:e,RT(Tu(l,Fr),e,h)}),c3e=nt(GT);function l3e(l,h){return wj(l||[],h||[],Yh)}function f3e(l,h){return wj(l||[],h||[],em)}var p3e=nt(function(l){var h=l.length,x=h>1?l[h-1]:e;return x=typeof x=="function"?(l.pop(),x):e,i5(l,x)});function s5(l){var h=P(l);return h.__chain__=!0,h}function d3e(l,h){return h(l),l}function sy(l,h){return h(l)}var h3e=_a(function(l){var h=l.length,x=h?l[0]:0,w=this.__wrapped__,O=function(L){return vT(L,l)};return h>1||this.__actions__.length||!(w instanceof ft)||!ba(x)?this.thru(O):(w=w.slice(x,+x+(h?1:0)),w.__actions__.push({func:sy,args:[O],thisArg:e}),new gs(w,this.__chain__).thru(function(L){return h&&!L.length&&L.push(e),L}))});function m3e(){return s5(this)}function g3e(){return new gs(this.value(),this.__chain__)}function v3e(){this.__values__===e&&(this.__values__=y5(this.value()));var l=this.__index__>=this.__values__.length,h=l?e:this.__values__[this.__index__++];return{done:l,value:h}}function x3e(){return this}function y3e(l){for(var h,x=this;x instanceof $x;){var w=Zj(x);w.__index__=0,w.__values__=e,h?O.__wrapped__=w:h=w;var O=w;x=x.__wrapped__}return O.__wrapped__=l,h}function _3e(){var l=this.__wrapped__;if(l instanceof ft){var h=l;return this.__actions__.length&&(h=new ft(this)),h=h.reverse(),h.__actions__.push({func:sy,args:[WT],thisArg:e}),new gs(h,this.__chain__)}return this.thru(WT)}function b3e(){return bj(this.__wrapped__,this.__actions__)}var w3e=Jx(function(l,h,x){kt.call(l,x)?++l[x]:xa(l,x,1)});function E3e(l,h,x){var w=Ze(l)?kB:dFe;return x&&ai(l,h,x)&&(h=e),w(l,Me(h,3))}function S3e(l,h){var x=Ze(l)?Tu:ij;return x(l,Me(h,3))}var C3e=qj(Qj),T3e=qj(e5);function A3e(l,h){return Tn(oy(l,h),1)}function O3e(l,h){return Tn(oy(l,h),H)}function I3e(l,h,x){return x=x===e?1:Qe(x),Tn(oy(l,h),x)}function o5(l,h){var x=Ze(l)?hs:Nu;return x(l,Me(h,3))}function a5(l,h){var x=Ze(l)?KDe:nj;return x(l,Me(h,3))}var R3e=Jx(function(l,h,x){kt.call(l,x)?l[x].push(h):xa(l,x,[h])});function N3e(l,h,x,w){l=wi(l)?l:Vf(l),x=x&&!w?Qe(x):0;var O=l.length;return x<0&&(x=rn(O+x,0)),fy(l)?x<=O&&l.indexOf(h,x)>-1:!!O&&Lf(l,h,x)>-1}var q3e=nt(function(l,h,x){var w=-1,O=typeof h=="function",L=wi(l)?re(l.length):[];return Nu(l,function(z){L[++w]=O?Ui(h,z,x):Zh(z,h,x)}),L}),P3e=Jx(function(l,h,x){xa(l,x,h)});function oy(l,h){var x=Ze(l)?cr:lj;return x(l,Me(h,3))}function k3e(l,h,x,w){return l==null?[]:(Ze(h)||(h=h==null?[]:[h]),x=w?e:x,Ze(x)||(x=x==null?[]:[x]),hj(l,h,x))}var D3e=Jx(function(l,h,x){l[x?0:1].push(h)},function(){return[[],[]]});function L3e(l,h,x){var w=Ze(l)?iT:MB,O=arguments.length<3;return w(l,Me(h,4),x,O,Nu)}function F3e(l,h,x){var w=Ze(l)?XDe:MB,O=arguments.length<3;return w(l,Me(h,4),x,O,nj)}function M3e(l,h){var x=Ze(l)?Tu:ij;return x(l,cy(Me(h,3)))}function B3e(l){var h=Ze(l)?QB:NFe;return h(l)}function j3e(l,h,x){(x?ai(l,h,x):h===e)?h=1:h=Qe(h);var w=Ze(l)?uFe:qFe;return w(l,h)}function U3e(l){var h=Ze(l)?cFe:kFe;return h(l)}function H3e(l){if(l==null)return 0;if(wi(l))return fy(l)?Mf(l):l.length;var h=Vn(l);return h==Z||h==Ae?l.size:ET(l).length}function z3e(l,h,x){var w=Ze(l)?sT:DFe;return x&&ai(l,h,x)&&(h=e),w(l,Me(h,3))}var $3e=nt(function(l,h){if(l==null)return[];var x=h.length;return x>1&&ai(l,h[0],h[1])?h=[]:x>2&&ai(h[0],h[1],h[2])&&(h=[h[0]]),hj(l,Tn(h,1),[])}),ay=SLe||function(){return hn.Date.now()};function W3e(l,h){if(typeof h!="function")throw new ms(i);return l=Qe(l),function(){if(--l<1)return h.apply(this,arguments)}}function u5(l,h,x){return h=x?e:h,h=l&&h==null?l.length:h,ya(l,C,e,e,e,e,h)}function c5(l,h){var x;if(typeof h!="function")throw new ms(i);return l=Qe(l),function(){return--l>0&&(x=h.apply(this,arguments)),l<=1&&(h=e),x}}var VT=nt(function(l,h,x){var w=v;if(x.length){var O=Ou(x,Wf(VT));w|=S}return ya(l,w,h,x,O)}),l5=nt(function(l,h,x){var w=v|_;if(x.length){var O=Ou(x,Wf(l5));w|=S}return ya(h,w,l,x,O)});function f5(l,h,x){h=x?e:h;var w=ya(l,y,e,e,e,e,e,h);return w.placeholder=f5.placeholder,w}function p5(l,h,x){h=x?e:h;var w=ya(l,T,e,e,e,e,e,h);return w.placeholder=p5.placeholder,w}function d5(l,h,x){var w,O,L,z,W,X,ae=0,ce=!1,fe=!1,_e=!0;if(typeof l!="function")throw new ms(i);h=_s(h)||0,_r(x)&&(ce=!!x.leading,fe="maxWait"in x,L=fe?rn(_s(x.maxWait)||0,h):L,_e="trailing"in x?!!x.trailing:_e);function qe(Mr){var Xs=w,Sa=O;return w=O=e,ae=Mr,z=l.apply(Sa,Xs),z}function je(Mr){return ae=Mr,W=nm(at,h),ce?qe(Mr):z}function rt(Mr){var Xs=Mr-X,Sa=Mr-ae,q5=h-Xs;return fe?Gn(q5,L-Sa):q5}function Ue(Mr){var Xs=Mr-X,Sa=Mr-ae;return X===e||Xs>=h||Xs<0||fe&&Sa>=L}function at(){var Mr=ay();if(Ue(Mr))return yt(Mr);W=nm(at,rt(Mr))}function yt(Mr){return W=e,_e&&w?qe(Mr):(w=O=e,z)}function Wi(){W!==e&&Ej(W),ae=0,w=X=O=W=e}function ui(){return W===e?z:yt(ay())}function Gi(){var Mr=ay(),Xs=Ue(Mr);if(w=arguments,O=this,X=Mr,Xs){if(W===e)return je(X);if(fe)return Ej(W),W=nm(at,h),qe(X)}return W===e&&(W=nm(at,h)),z}return Gi.cancel=Wi,Gi.flush=ui,Gi}var G3e=nt(function(l,h){return rj(l,1,h)}),V3e=nt(function(l,h,x){return rj(l,_s(h)||0,x)});function K3e(l){return ya(l,q)}function uy(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new ms(i);var x=function(){var w=arguments,O=h?h.apply(this,w):w[0],L=x.cache;if(L.has(O))return L.get(O);var z=l.apply(this,w);return x.cache=L.set(O,z)||L,z};return x.cache=new(uy.Cache||va),x}uy.Cache=va;function cy(l){if(typeof l!="function")throw new ms(i);return function(){var h=arguments;switch(h.length){case 0:return!l.call(this);case 1:return!l.call(this,h[0]);case 2:return!l.call(this,h[0],h[1]);case 3:return!l.call(this,h[0],h[1],h[2])}return!l.apply(this,h)}}function X3e(l){return c5(2,l)}var Y3e=LFe(function(l,h){h=h.length==1&&Ze(h[0])?cr(h[0],Hi(Me())):cr(Tn(h,1),Hi(Me()));var x=h.length;return nt(function(w){for(var O=-1,L=Gn(w.length,x);++O<L;)w[O]=h[O].call(this,w[O]);return Ui(l,this,w)})}),KT=nt(function(l,h){var x=Ou(h,Wf(KT));return ya(l,S,e,h,x)}),h5=nt(function(l,h){var x=Ou(h,Wf(h5));return ya(l,E,e,h,x)}),J3e=_a(function(l,h){return ya(l,I,e,e,e,h)});function Z3e(l,h){if(typeof l!="function")throw new ms(i);return h=h===e?h:Qe(h),nt(l,h)}function Q3e(l,h){if(typeof l!="function")throw new ms(i);return h=h==null?0:rn(Qe(h),0),nt(function(x){var w=x[h],O=ku(x,0,h);return w&&Au(O,w),Ui(l,this,O)})}function e6e(l,h,x){var w=!0,O=!0;if(typeof l!="function")throw new ms(i);return _r(x)&&(w="leading"in x?!!x.leading:w,O="trailing"in x?!!x.trailing:O),d5(l,h,{leading:w,maxWait:h,trailing:O})}function t6e(l){return u5(l,1)}function r6e(l,h){return KT(qT(h),l)}function n6e(){if(!arguments.length)return[];var l=arguments[0];return Ze(l)?l:[l]}function i6e(l){return vs(l,p)}function s6e(l,h){return h=typeof h=="function"?h:e,vs(l,p,h)}function o6e(l){return vs(l,c|p)}function a6e(l,h){return h=typeof h=="function"?h:e,vs(l,c|p,h)}function u6e(l,h){return h==null||tj(l,h,mn(h))}function Ks(l,h){return l===h||l!==l&&h!==h}var c6e=ty(_T),l6e=ty(function(l,h){return l>=h}),Qc=aj(function(){return arguments}())?aj:function(l){return Ar(l)&&kt.call(l,"callee")&&!VB.call(l,"callee")},Ze=re.isArray,f6e=OB?Hi(OB):yFe;function wi(l){return l!=null&&ly(l.length)&&!wa(l)}function Fr(l){return Ar(l)&&wi(l)}function p6e(l){return l===!0||l===!1||Ar(l)&&oi(l)==Ne}var Du=TLe||sA,d6e=IB?Hi(IB):_Fe;function h6e(l){return Ar(l)&&l.nodeType===1&&!im(l)}function m6e(l){if(l==null)return!0;if(wi(l)&&(Ze(l)||typeof l=="string"||typeof l.splice=="function"||Du(l)||Gf(l)||Qc(l)))return!l.length;var h=Vn(l);if(h==Z||h==Ae)return!l.size;if(rm(l))return!ET(l).length;for(var x in l)if(kt.call(l,x))return!1;return!0}function g6e(l,h){return Qh(l,h)}function v6e(l,h,x){x=typeof x=="function"?x:e;var w=x?x(l,h):e;return w===e?Qh(l,h,e,x):!!w}function XT(l){if(!Ar(l))return!1;var h=oi(l);return h==xe||h==zt||typeof l.message=="string"&&typeof l.name=="string"&&!im(l)}function x6e(l){return typeof l=="number"&&XB(l)}function wa(l){if(!_r(l))return!1;var h=oi(l);return h==F||h==A||h==xt||h==yr}function m5(l){return typeof l=="number"&&l==Qe(l)}function ly(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=U}function _r(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function Ar(l){return l!=null&&typeof l=="object"}var g5=RB?Hi(RB):wFe;function y6e(l,h){return l===h||wT(l,h,BT(h))}function _6e(l,h,x){return x=typeof x=="function"?x:e,wT(l,h,BT(h),x)}function b6e(l){return v5(l)&&l!=+l}function w6e(l){if(s4e(l))throw new Ve(n);return uj(l)}function E6e(l){return l===null}function S6e(l){return l==null}function v5(l){return typeof l=="number"||Ar(l)&&oi(l)==V}function im(l){if(!Ar(l)||oi(l)!=Fe)return!1;var h=Fx(l);if(h===null)return!0;var x=kt.call(h,"constructor")&&h.constructor;return typeof x=="function"&&x instanceof x&&Px.call(x)==_Le}var YT=NB?Hi(NB):EFe;function C6e(l){return m5(l)&&l>=-U&&l<=U}var x5=qB?Hi(qB):SFe;function fy(l){return typeof l=="string"||!Ze(l)&&Ar(l)&&oi(l)==Vt}function $i(l){return typeof l=="symbol"||Ar(l)&&oi(l)==Cn}var Gf=PB?Hi(PB):CFe;function T6e(l){return l===e}function A6e(l){return Ar(l)&&Vn(l)==wo}function O6e(l){return Ar(l)&&oi(l)==Hc}var I6e=ty(ST),R6e=ty(function(l,h){return l<=h});function y5(l){if(!l)return[];if(wi(l))return fy(l)?Gs(l):bi(l);if(Wh&&l[Wh])return uLe(l[Wh]());var h=Vn(l),x=h==Z?fT:h==Ae?Rx:Vf;return x(l)}function Ea(l){if(!l)return l===0?l:0;if(l=_s(l),l===H||l===-H){var h=l<0?-1:1;return h*ee}return l===l?l:0}function Qe(l){var h=Ea(l),x=h%1;return h===h?x?h-x:h:0}function _5(l){return l?Xc(Qe(l),0,pe):0}function _s(l){if(typeof l=="number")return l;if($i(l))return Q;if(_r(l)){var h=typeof l.valueOf=="function"?l.valueOf():l;l=_r(h)?h+"":h}if(typeof l!="string")return l===0?l:+l;l=BB(l);var x=fDe.test(l);return x||dDe.test(l)?WDe(l.slice(2),x?2:8):lDe.test(l)?Q:+l}function b5(l){return Co(l,Ei(l))}function N6e(l){return l?Xc(Qe(l),-U,U):l===0?l:0}function Nt(l){return l==null?"":zi(l)}var q6e=zf(function(l,h){if(rm(h)||wi(h)){Co(h,mn(h),l);return}for(var x in h)kt.call(h,x)&&Yh(l,x,h[x])}),w5=zf(function(l,h){Co(h,Ei(h),l)}),py=zf(function(l,h,x,w){Co(h,Ei(h),l,w)}),P6e=zf(function(l,h,x,w){Co(h,mn(h),l,w)}),k6e=_a(vT);function D6e(l,h){var x=Hf(l);return h==null?x:ej(x,h)}var L6e=nt(function(l,h){l=Kt(l);var x=-1,w=h.length,O=w>2?h[2]:e;for(O&&ai(h[0],h[1],O)&&(w=1);++x<w;)for(var L=h[x],z=Ei(L),W=-1,X=z.length;++W<X;){var ae=z[W],ce=l[ae];(ce===e||Ks(ce,Bf[ae])&&!kt.call(l,ae))&&(l[ae]=L[ae])}return l}),F6e=nt(function(l){return l.push(e,Bj),Ui(E5,e,l)});function M6e(l,h){return DB(l,Me(h,3),So)}function B6e(l,h){return DB(l,Me(h,3),yT)}function j6e(l,h){return l==null?l:xT(l,Me(h,3),Ei)}function U6e(l,h){return l==null?l:sj(l,Me(h,3),Ei)}function H6e(l,h){return l&&So(l,Me(h,3))}function z6e(l,h){return l&&yT(l,Me(h,3))}function $6e(l){return l==null?[]:Vx(l,mn(l))}function W6e(l){return l==null?[]:Vx(l,Ei(l))}function JT(l,h,x){var w=l==null?e:Yc(l,h);return w===e?x:w}function G6e(l,h){return l!=null&&Hj(l,h,mFe)}function ZT(l,h){return l!=null&&Hj(l,h,gFe)}var V6e=kj(function(l,h,x){h!=null&&typeof h.toString!="function"&&(h=kx.call(h)),l[h]=x},eA(Si)),K6e=kj(function(l,h,x){h!=null&&typeof h.toString!="function"&&(h=kx.call(h)),kt.call(l,h)?l[h].push(x):l[h]=[x]},Me),X6e=nt(Zh);function mn(l){return wi(l)?ZB(l):ET(l)}function Ei(l){return wi(l)?ZB(l,!0):TFe(l)}function Y6e(l,h){var x={};return h=Me(h,3),So(l,function(w,O,L){xa(x,h(w,O,L),w)}),x}function J6e(l,h){var x={};return h=Me(h,3),So(l,function(w,O,L){xa(x,O,h(w,O,L))}),x}var Z6e=zf(function(l,h,x){Kx(l,h,x)}),E5=zf(function(l,h,x,w){Kx(l,h,x,w)}),Q6e=_a(function(l,h){var x={};if(l==null)return x;var w=!1;h=cr(h,function(L){return L=Pu(L,l),w||(w=L.length>1),L}),Co(l,FT(l),x),w&&(x=vs(x,c|f|p,VFe));for(var O=h.length;O--;)IT(x,h[O]);return x});function eMe(l,h){return S5(l,cy(Me(h)))}var tMe=_a(function(l,h){return l==null?{}:OFe(l,h)});function S5(l,h){if(l==null)return{};var x=cr(FT(l),function(w){return[w]});return h=Me(h),mj(l,x,function(w,O){return h(w,O[0])})}function rMe(l,h,x){h=Pu(h,l);var w=-1,O=h.length;for(O||(O=1,l=e);++w<O;){var L=l==null?e:l[To(h[w])];L===e&&(w=O,L=x),l=wa(L)?L.call(l):L}return l}function nMe(l,h,x){return l==null?l:em(l,h,x)}function iMe(l,h,x,w){return w=typeof w=="function"?w:e,l==null?l:em(l,h,x,w)}var C5=Fj(mn),T5=Fj(Ei);function sMe(l,h,x){var w=Ze(l),O=w||Du(l)||Gf(l);if(h=Me(h,4),x==null){var L=l&&l.constructor;O?x=w?new L:[]:_r(l)?x=wa(L)?Hf(Fx(l)):{}:x={}}return(O?hs:So)(l,function(z,W,X){return h(x,z,W,X)}),x}function oMe(l,h){return l==null?!0:IT(l,h)}function aMe(l,h,x){return l==null?l:_j(l,h,qT(x))}function uMe(l,h,x,w){return w=typeof w=="function"?w:e,l==null?l:_j(l,h,qT(x),w)}function Vf(l){return l==null?[]:lT(l,mn(l))}function cMe(l){return l==null?[]:lT(l,Ei(l))}function lMe(l,h,x){return x===e&&(x=h,h=e),x!==e&&(x=_s(x),x=x===x?x:0),h!==e&&(h=_s(h),h=h===h?h:0),Xc(_s(l),h,x)}function fMe(l,h,x){return h=Ea(h),x===e?(x=h,h=0):x=Ea(x),l=_s(l),vFe(l,h,x)}function pMe(l,h,x){if(x&&typeof x!="boolean"&&ai(l,h,x)&&(h=x=e),x===e&&(typeof h=="boolean"?(x=h,h=e):typeof l=="boolean"&&(x=l,l=e)),l===e&&h===e?(l=0,h=1):(l=Ea(l),h===e?(h=l,l=0):h=Ea(h)),l>h){var w=l;l=h,h=w}if(x||l%1||h%1){var O=YB();return Gn(l+O*(h-l+$De("1e-"+((O+"").length-1))),h)}return TT(l,h)}var dMe=$f(function(l,h,x){return h=h.toLowerCase(),l+(x?A5(h):h)});function A5(l){return QT(Nt(l).toLowerCase())}function O5(l){return l=Nt(l),l&&l.replace(mDe,nLe).replace(kDe,"")}function hMe(l,h,x){l=Nt(l),h=zi(h);var w=l.length;x=x===e?w:Xc(Qe(x),0,w);var O=x;return x-=h.length,x>=0&&l.slice(x,O)==h}function mMe(l){return l=Nt(l),l&&bx.test(l)?l.replace(Pf,iLe):l}function gMe(l){return l=Nt(l),l&&kf.test(l)?l.replace(zc,"\\$&"):l}var vMe=$f(function(l,h,x){return l+(x?"-":"")+h.toLowerCase()}),xMe=$f(function(l,h,x){return l+(x?" ":"")+h.toLowerCase()}),yMe=Nj("toLowerCase");function _Me(l,h,x){l=Nt(l),h=Qe(h);var w=h?Mf(l):0;if(!h||w>=h)return l;var O=(h-w)/2;return ey(Ux(O),x)+l+ey(jx(O),x)}function bMe(l,h,x){l=Nt(l),h=Qe(h);var w=h?Mf(l):0;return h&&w<h?l+ey(h-w,x):l}function wMe(l,h,x){l=Nt(l),h=Qe(h);var w=h?Mf(l):0;return h&&w<h?ey(h-w,x)+l:l}function EMe(l,h,x){return x||h==null?h=0:h&&(h=+h),RLe(Nt(l).replace($c,""),h||0)}function SMe(l,h,x){return(x?ai(l,h,x):h===e)?h=1:h=Qe(h),AT(Nt(l),h)}function CMe(){var l=arguments,h=Nt(l[0]);return l.length<3?h:h.replace(l[1],l[2])}var TMe=$f(function(l,h,x){return l+(x?"_":"")+h.toLowerCase()});function AMe(l,h,x){return x&&typeof x!="number"&&ai(l,h,x)&&(h=x=e),x=x===e?pe:x>>>0,x?(l=Nt(l),l&&(typeof h=="string"||h!=null&&!YT(h))&&(h=zi(h),!h&&Ff(l))?ku(Gs(l),0,x):l.split(h,x)):[]}var OMe=$f(function(l,h,x){return l+(x?" ":"")+QT(h)});function IMe(l,h,x){return l=Nt(l),x=x==null?0:Xc(Qe(x),0,l.length),h=zi(h),l.slice(x,x+h.length)==h}function RMe(l,h,x){var w=P.templateSettings;x&&ai(l,h,x)&&(h=e),l=Nt(l),h=py({},h,w,Mj);var O=py({},h.imports,w.imports,Mj),L=mn(O),z=lT(O,L),W,X,ae=0,ce=h.interpolate||Cx,fe="__p += '",_e=pT((h.escape||Cx).source+"|"+ce.source+"|"+(ce===Uh?cDe:Cx).source+"|"+(h.evaluate||Cx).source+"|$","g"),qe="//# sourceURL="+(kt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++BDe+"]")+`
|
|
143
143
|
`;l.replace(_e,function(Ue,at,yt,Wi,ui,Gi){return yt||(yt=Wi),fe+=l.slice(ae,Gi).replace(gDe,sLe),at&&(W=!0,fe+=`' +
|
|
@@ -159,7 +159,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
159
159
|
}`;var rt=R5(function(){return At(L,qe+"return "+fe).apply(e,z)});if(rt.source=fe,XT(rt))throw rt;return rt}function NMe(l){return Nt(l).toLowerCase()}function qMe(l){return Nt(l).toUpperCase()}function PMe(l,h,x){if(l=Nt(l),l&&(x||h===e))return BB(l);if(!l||!(h=zi(h)))return l;var w=Gs(l),O=Gs(h),L=jB(w,O),z=UB(w,O)+1;return ku(w,L,z).join("")}function kMe(l,h,x){if(l=Nt(l),l&&(x||h===e))return l.slice(0,zB(l)+1);if(!l||!(h=zi(h)))return l;var w=Gs(l),O=UB(w,Gs(h))+1;return ku(w,0,O).join("")}function DMe(l,h,x){if(l=Nt(l),l&&(x||h===e))return l.replace($c,"");if(!l||!(h=zi(h)))return l;var w=Gs(l),O=jB(w,Gs(h));return ku(w,O).join("")}function LMe(l,h){var x=B,w=M;if(_r(h)){var O="separator"in h?h.separator:O;x="length"in h?Qe(h.length):x,w="omission"in h?zi(h.omission):w}l=Nt(l);var L=l.length;if(Ff(l)){var z=Gs(l);L=z.length}if(x>=L)return l;var W=x-Mf(w);if(W<1)return w;var X=z?ku(z,0,W).join(""):l.slice(0,W);if(O===e)return X+w;if(z&&(W+=X.length-W),YT(O)){if(l.slice(W).search(O)){var ae,ce=X;for(O.global||(O=pT(O.source,Nt(aB.exec(O))+"g")),O.lastIndex=0;ae=O.exec(ce);)var fe=ae.index;X=X.slice(0,fe===e?W:fe)}}else if(l.indexOf(zi(O),W)!=W){var _e=X.lastIndexOf(O);_e>-1&&(X=X.slice(0,_e))}return X+w}function FMe(l){return l=Nt(l),l&&_x.test(l)?l.replace(yx,pLe):l}var MMe=$f(function(l,h,x){return l+(x?" ":"")+h.toUpperCase()}),QT=Nj("toUpperCase");function I5(l,h,x){return l=Nt(l),h=x?e:h,h===e?aLe(l)?mLe(l):ZDe(l):l.match(h)||[]}var R5=nt(function(l,h){try{return Ui(l,e,h)}catch(x){return XT(x)?x:new Ve(x)}}),BMe=_a(function(l,h){return hs(h,function(x){x=To(x),xa(l,x,VT(l[x],l))}),l});function jMe(l){var h=l==null?0:l.length,x=Me();return l=h?cr(l,function(w){if(typeof w[1]!="function")throw new ms(i);return[x(w[0]),w[1]]}):[],nt(function(w){for(var O=-1;++O<h;){var L=l[O];if(Ui(L[0],this,w))return Ui(L[1],this,w)}})}function UMe(l){return pFe(vs(l,c))}function eA(l){return function(){return l}}function HMe(l,h){return l==null||l!==l?h:l}var zMe=Pj(),$Me=Pj(!0);function Si(l){return l}function tA(l){return cj(typeof l=="function"?l:vs(l,c))}function WMe(l){return fj(vs(l,c))}function GMe(l,h){return pj(l,vs(h,c))}var VMe=nt(function(l,h){return function(x){return Zh(x,l,h)}}),KMe=nt(function(l,h){return function(x){return Zh(l,x,h)}});function rA(l,h,x){var w=mn(h),O=Vx(h,w);x==null&&!(_r(h)&&(O.length||!w.length))&&(x=h,h=l,l=this,O=Vx(h,mn(h)));var L=!(_r(x)&&"chain"in x)||!!x.chain,z=wa(l);return hs(O,function(W){var X=h[W];l[W]=X,z&&(l.prototype[W]=function(){var ae=this.__chain__;if(L||ae){var ce=l(this.__wrapped__),fe=ce.__actions__=bi(this.__actions__);return fe.push({func:X,args:arguments,thisArg:l}),ce.__chain__=ae,ce}return X.apply(l,Au([this.value()],arguments))})}),l}function XMe(){return hn._===this&&(hn._=bLe),this}function nA(){}function YMe(l){return l=Qe(l),nt(function(h){return dj(h,l)})}var JMe=kT(cr),ZMe=kT(kB),QMe=kT(sT);function N5(l){return UT(l)?oT(To(l)):IFe(l)}function eBe(l){return function(h){return l==null?e:Yc(l,h)}}var tBe=Dj(),rBe=Dj(!0);function iA(){return[]}function sA(){return!1}function nBe(){return{}}function iBe(){return""}function sBe(){return!0}function oBe(l,h){if(l=Qe(l),l<1||l>U)return[];var x=pe,w=Gn(l,pe);h=Me(h),l-=pe;for(var O=cT(w,h);++x<l;)h(x);return O}function aBe(l){return Ze(l)?cr(l,To):$i(l)?[l]:bi(Jj(Nt(l)))}function uBe(l){var h=++yLe;return Nt(l)+h}var cBe=Qx(function(l,h){return l+h},0),lBe=DT("ceil"),fBe=Qx(function(l,h){return l/h},1),pBe=DT("floor");function dBe(l){return l&&l.length?Gx(l,Si,_T):e}function hBe(l,h){return l&&l.length?Gx(l,Me(h,2),_T):e}function mBe(l){return FB(l,Si)}function gBe(l,h){return FB(l,Me(h,2))}function vBe(l){return l&&l.length?Gx(l,Si,ST):e}function xBe(l,h){return l&&l.length?Gx(l,Me(h,2),ST):e}var yBe=Qx(function(l,h){return l*h},1),_Be=DT("round"),bBe=Qx(function(l,h){return l-h},0);function wBe(l){return l&&l.length?uT(l,Si):0}function EBe(l,h){return l&&l.length?uT(l,Me(h,2)):0}return P.after=W3e,P.ary=u5,P.assign=q6e,P.assignIn=w5,P.assignInWith=py,P.assignWith=P6e,P.at=k6e,P.before=c5,P.bind=VT,P.bindAll=BMe,P.bindKey=l5,P.castArray=n6e,P.chain=s5,P.chunk=p4e,P.compact=d4e,P.concat=h4e,P.cond=jMe,P.conforms=UMe,P.constant=eA,P.countBy=w3e,P.create=D6e,P.curry=f5,P.curryRight=p5,P.debounce=d5,P.defaults=L6e,P.defaultsDeep=F6e,P.defer=G3e,P.delay=V3e,P.difference=m4e,P.differenceBy=g4e,P.differenceWith=v4e,P.drop=x4e,P.dropRight=y4e,P.dropRightWhile=_4e,P.dropWhile=b4e,P.fill=w4e,P.filter=S3e,P.flatMap=A3e,P.flatMapDeep=O3e,P.flatMapDepth=I3e,P.flatten=t5,P.flattenDeep=E4e,P.flattenDepth=S4e,P.flip=K3e,P.flow=zMe,P.flowRight=$Me,P.fromPairs=C4e,P.functions=$6e,P.functionsIn=W6e,P.groupBy=R3e,P.initial=A4e,P.intersection=O4e,P.intersectionBy=I4e,P.intersectionWith=R4e,P.invert=V6e,P.invertBy=K6e,P.invokeMap=q3e,P.iteratee=tA,P.keyBy=P3e,P.keys=mn,P.keysIn=Ei,P.map=oy,P.mapKeys=Y6e,P.mapValues=J6e,P.matches=WMe,P.matchesProperty=GMe,P.memoize=uy,P.merge=Z6e,P.mergeWith=E5,P.method=VMe,P.methodOf=KMe,P.mixin=rA,P.negate=cy,P.nthArg=YMe,P.omit=Q6e,P.omitBy=eMe,P.once=X3e,P.orderBy=k3e,P.over=JMe,P.overArgs=Y3e,P.overEvery=ZMe,P.overSome=QMe,P.partial=KT,P.partialRight=h5,P.partition=D3e,P.pick=tMe,P.pickBy=S5,P.property=N5,P.propertyOf=eBe,P.pull=k4e,P.pullAll=n5,P.pullAllBy=D4e,P.pullAllWith=L4e,P.pullAt=F4e,P.range=tBe,P.rangeRight=rBe,P.rearg=J3e,P.reject=M3e,P.remove=M4e,P.rest=Z3e,P.reverse=WT,P.sampleSize=j3e,P.set=nMe,P.setWith=iMe,P.shuffle=U3e,P.slice=B4e,P.sortBy=$3e,P.sortedUniq=G4e,P.sortedUniqBy=V4e,P.split=AMe,P.spread=Q3e,P.tail=K4e,P.take=X4e,P.takeRight=Y4e,P.takeRightWhile=J4e,P.takeWhile=Z4e,P.tap=d3e,P.throttle=e6e,P.thru=sy,P.toArray=y5,P.toPairs=C5,P.toPairsIn=T5,P.toPath=aBe,P.toPlainObject=b5,P.transform=sMe,P.unary=t6e,P.union=Q4e,P.unionBy=e3e,P.unionWith=t3e,P.uniq=r3e,P.uniqBy=n3e,P.uniqWith=i3e,P.unset=oMe,P.unzip=GT,P.unzipWith=i5,P.update=aMe,P.updateWith=uMe,P.values=Vf,P.valuesIn=cMe,P.without=s3e,P.words=I5,P.wrap=r6e,P.xor=o3e,P.xorBy=a3e,P.xorWith=u3e,P.zip=c3e,P.zipObject=l3e,P.zipObjectDeep=f3e,P.zipWith=p3e,P.entries=C5,P.entriesIn=T5,P.extend=w5,P.extendWith=py,rA(P,P),P.add=cBe,P.attempt=R5,P.camelCase=dMe,P.capitalize=A5,P.ceil=lBe,P.clamp=lMe,P.clone=i6e,P.cloneDeep=o6e,P.cloneDeepWith=a6e,P.cloneWith=s6e,P.conformsTo=u6e,P.deburr=O5,P.defaultTo=HMe,P.divide=fBe,P.endsWith=hMe,P.eq=Ks,P.escape=mMe,P.escapeRegExp=gMe,P.every=E3e,P.find=C3e,P.findIndex=Qj,P.findKey=M6e,P.findLast=T3e,P.findLastIndex=e5,P.findLastKey=B6e,P.floor=pBe,P.forEach=o5,P.forEachRight=a5,P.forIn=j6e,P.forInRight=U6e,P.forOwn=H6e,P.forOwnRight=z6e,P.get=JT,P.gt=c6e,P.gte=l6e,P.has=G6e,P.hasIn=ZT,P.head=r5,P.identity=Si,P.includes=N3e,P.indexOf=T4e,P.inRange=fMe,P.invoke=X6e,P.isArguments=Qc,P.isArray=Ze,P.isArrayBuffer=f6e,P.isArrayLike=wi,P.isArrayLikeObject=Fr,P.isBoolean=p6e,P.isBuffer=Du,P.isDate=d6e,P.isElement=h6e,P.isEmpty=m6e,P.isEqual=g6e,P.isEqualWith=v6e,P.isError=XT,P.isFinite=x6e,P.isFunction=wa,P.isInteger=m5,P.isLength=ly,P.isMap=g5,P.isMatch=y6e,P.isMatchWith=_6e,P.isNaN=b6e,P.isNative=w6e,P.isNil=S6e,P.isNull=E6e,P.isNumber=v5,P.isObject=_r,P.isObjectLike=Ar,P.isPlainObject=im,P.isRegExp=YT,P.isSafeInteger=C6e,P.isSet=x5,P.isString=fy,P.isSymbol=$i,P.isTypedArray=Gf,P.isUndefined=T6e,P.isWeakMap=A6e,P.isWeakSet=O6e,P.join=N4e,P.kebabCase=vMe,P.last=ys,P.lastIndexOf=q4e,P.lowerCase=xMe,P.lowerFirst=yMe,P.lt=I6e,P.lte=R6e,P.max=dBe,P.maxBy=hBe,P.mean=mBe,P.meanBy=gBe,P.min=vBe,P.minBy=xBe,P.stubArray=iA,P.stubFalse=sA,P.stubObject=nBe,P.stubString=iBe,P.stubTrue=sBe,P.multiply=yBe,P.nth=P4e,P.noConflict=XMe,P.noop=nA,P.now=ay,P.pad=_Me,P.padEnd=bMe,P.padStart=wMe,P.parseInt=EMe,P.random=pMe,P.reduce=L3e,P.reduceRight=F3e,P.repeat=SMe,P.replace=CMe,P.result=rMe,P.round=_Be,P.runInContext=K,P.sample=B3e,P.size=H3e,P.snakeCase=TMe,P.some=z3e,P.sortedIndex=j4e,P.sortedIndexBy=U4e,P.sortedIndexOf=H4e,P.sortedLastIndex=z4e,P.sortedLastIndexBy=$4e,P.sortedLastIndexOf=W4e,P.startCase=OMe,P.startsWith=IMe,P.subtract=bBe,P.sum=wBe,P.sumBy=EBe,P.template=RMe,P.times=oBe,P.toFinite=Ea,P.toInteger=Qe,P.toLength=_5,P.toLower=NMe,P.toNumber=_s,P.toSafeInteger=N6e,P.toString=Nt,P.toUpper=qMe,P.trim=PMe,P.trimEnd=kMe,P.trimStart=DMe,P.truncate=LMe,P.unescape=FMe,P.uniqueId=uBe,P.upperCase=MMe,P.upperFirst=QT,P.each=o5,P.eachRight=a5,P.first=r5,rA(P,function(){var l={};return So(P,function(h,x){kt.call(P.prototype,x)||(l[x]=h)}),l}(),{chain:!1}),P.VERSION=t,hs(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){P[l].placeholder=P}),hs(["drop","take"],function(l,h){ft.prototype[l]=function(x){x=x===e?1:rn(Qe(x),0);var w=this.__filtered__&&!h?new ft(this):this.clone();return w.__filtered__?w.__takeCount__=Gn(x,w.__takeCount__):w.__views__.push({size:Gn(x,pe),type:l+(w.__dir__<0?"Right":"")}),w},ft.prototype[l+"Right"]=function(x){return this.reverse()[l](x).reverse()}}),hs(["filter","map","takeWhile"],function(l,h){var x=h+1,w=x==N||x==oe;ft.prototype[l]=function(O){var L=this.clone();return L.__iteratees__.push({iteratee:Me(O,3),type:x}),L.__filtered__=L.__filtered__||w,L}}),hs(["head","last"],function(l,h){var x="take"+(h?"Right":"");ft.prototype[l]=function(){return this[x](1).value()[0]}}),hs(["initial","tail"],function(l,h){var x="drop"+(h?"":"Right");ft.prototype[l]=function(){return this.__filtered__?new ft(this):this[x](1)}}),ft.prototype.compact=function(){return this.filter(Si)},ft.prototype.find=function(l){return this.filter(l).head()},ft.prototype.findLast=function(l){return this.reverse().find(l)},ft.prototype.invokeMap=nt(function(l,h){return typeof l=="function"?new ft(this):this.map(function(x){return Zh(x,l,h)})}),ft.prototype.reject=function(l){return this.filter(cy(Me(l)))},ft.prototype.slice=function(l,h){l=Qe(l);var x=this;return x.__filtered__&&(l>0||h<0)?new ft(x):(l<0?x=x.takeRight(-l):l&&(x=x.drop(l)),h!==e&&(h=Qe(h),x=h<0?x.dropRight(-h):x.take(h-l)),x)},ft.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},ft.prototype.toArray=function(){return this.take(pe)},So(ft.prototype,function(l,h){var x=/^(?:filter|find|map|reject)|While$/.test(h),w=/^(?:head|last)$/.test(h),O=P[w?"take"+(h=="last"?"Right":""):h],L=w||/^find/.test(h);O&&(P.prototype[h]=function(){var z=this.__wrapped__,W=w?[1]:arguments,X=z instanceof ft,ae=W[0],ce=X||Ze(z),fe=function(at){var yt=O.apply(P,Au([at],W));return w&&_e?yt[0]:yt};ce&&x&&typeof ae=="function"&&ae.length!=1&&(X=ce=!1);var _e=this.__chain__,qe=!!this.__actions__.length,je=L&&!_e,rt=X&&!qe;if(!L&&ce){z=rt?z:new ft(this);var Ue=l.apply(z,W);return Ue.__actions__.push({func:sy,args:[fe],thisArg:e}),new gs(Ue,_e)}return je&&rt?l.apply(this,W):(Ue=this.thru(fe),je?w?Ue.value()[0]:Ue.value():Ue)})}),hs(["pop","push","shift","sort","splice","unshift"],function(l){var h=Nx[l],x=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",w=/^(?:pop|shift)$/.test(l);P.prototype[l]=function(){var O=arguments;if(w&&!this.__chain__){var L=this.value();return h.apply(Ze(L)?L:[],O)}return this[x](function(z){return h.apply(Ze(z)?z:[],O)})}}),So(ft.prototype,function(l,h){var x=P[h];if(x){var w=x.name+"";kt.call(Uf,w)||(Uf[w]=[]),Uf[w].push({name:h,func:x})}}),Uf[Zx(e,_).name]=[{name:"wrapper",func:e}],ft.prototype.clone=FLe,ft.prototype.reverse=MLe,ft.prototype.value=BLe,P.prototype.at=h3e,P.prototype.chain=m3e,P.prototype.commit=g3e,P.prototype.next=v3e,P.prototype.plant=y3e,P.prototype.reverse=_3e,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=b3e,P.prototype.first=P.prototype.head,Wh&&(P.prototype[Wh]=x3e),P},Iu=gLe();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(hn._=Iu,define(function(){return Iu})):Wc?((Wc.exports=Iu)._=Iu,tT._=Iu):hn._=Iu}).call(vd)});var cie=g((QQt,$P)=>{(function(){var e;function t(r,n){var i=this instanceof t?this:e;if(i.reset(n),typeof r=="string"&&r.length>0&&i.hash(r),i!==this)return i}t.prototype.hash=function(r){var n,i,s,o,a;switch(a=r.length,this.len+=a,i=this.k1,s=0,this.rem){case 0:i^=a>s?r.charCodeAt(s++)&65535:0;case 1:i^=a>s?(r.charCodeAt(s++)&65535)<<8:0;case 2:i^=a>s?(r.charCodeAt(s++)&65535)<<16:0;case 3:i^=a>s?(r.charCodeAt(s)&255)<<24:0,i^=a>s?(r.charCodeAt(s++)&65280)>>8:0}if(this.rem=a+this.rem&3,a-=this.rem,a>0){for(n=this.h1;i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,n^=i,n=n<<13|n>>>19,n=n*5+3864292196&4294967295,!(s>=a);)i=r.charCodeAt(s++)&65535^(r.charCodeAt(s++)&65535)<<8^(r.charCodeAt(s++)&65535)<<16,o=r.charCodeAt(s++),i^=(o&255)<<24^(o&65280)>>8;switch(i=0,this.rem){case 3:i^=(r.charCodeAt(s+2)&65535)<<16;case 2:i^=(r.charCodeAt(s+1)&65535)<<8;case 1:i^=r.charCodeAt(s)&65535}this.h1=n}return this.k1=i,this},t.prototype.result=function(){var r,n;return r=this.k1,n=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,n^=r),n^=this.len,n^=n>>>16,n=n*51819+(n&65535)*2246770688&4294967295,n^=n>>>13,n=n*44597+(n&65535)*3266445312&4294967295,n^=n>>>16,n>>>0},t.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},e=new t,typeof $P<"u"?$P.exports=t:this.MurmurHash3=t})()});var lie=g((eer,Ow)=>{Ow.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Ow.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ow.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var mie=g((ter,_d)=>{var pr=global.process,Ml=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Ml(pr)?(fie=require("assert"),xd=lie(),pie=/^win/i.test(pr.platform),Jg=require("events"),typeof Jg!="function"&&(Jg=Jg.EventEmitter),pr.__signal_exit_emitter__?xn=pr.__signal_exit_emitter__:(xn=pr.__signal_exit_emitter__=new Jg,xn.count=0,xn.emitted={}),xn.infinite||(xn.setMaxListeners(1/0),xn.infinite=!0),_d.exports=function(e,t){if(!Ml(global.process))return function(){};fie.equal(typeof e,"function","a callback must be provided for exit handler"),yd===!1&&WP();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=function(){xn.removeListener(r,e),xn.listeners("exit").length===0&&xn.listeners("afterexit").length===0&&Iw()};return xn.on(r,e),n},Iw=function(){!yd||!Ml(global.process)||(yd=!1,xd.forEach(function(t){try{pr.removeListener(t,Rw[t])}catch{}}),pr.emit=Nw,pr.reallyExit=GP,xn.count-=1)},_d.exports.unload=Iw,Bl=function(t,r,n){xn.emitted[t]||(xn.emitted[t]=!0,xn.emit(t,r,n))},Rw={},xd.forEach(function(e){Rw[e]=function(){if(Ml(global.process)){var r=pr.listeners(e);r.length===xn.count&&(Iw(),Bl("exit",null,e),Bl("afterexit",null,e),pie&&e==="SIGHUP"&&(e="SIGINT"),pr.kill(pr.pid,e))}}}),_d.exports.signals=function(){return xd},yd=!1,WP=function(){yd||!Ml(global.process)||(yd=!0,xn.count+=1,xd=xd.filter(function(t){try{return pr.on(t,Rw[t]),!0}catch{return!1}}),pr.emit=hie,pr.reallyExit=die)},_d.exports.load=WP,GP=pr.reallyExit,die=function(t){Ml(global.process)&&(pr.exitCode=t||0,Bl("exit",pr.exitCode,null),Bl("afterexit",pr.exitCode,null),GP.call(pr,pr.exitCode))},Nw=pr.emit,hie=function(t,r){if(t==="exit"&&Ml(global.process)){r!==void 0&&(pr.exitCode=r);var n=Nw.apply(this,arguments);return Bl("exit",pr.exitCode,null),Bl("afterexit",pr.exitCode,null),n}else return Nw.apply(this,arguments)}):_d.exports=function(){return function(){}};var fie,xd,pie,Jg,xn,Iw,Bl,Rw,yd,WP,GP,die,Nw,hie});var vie=g((rer,Zg)=>{"use strict";Zg.exports=rft;Zg.exports.sync=nft;Zg.exports._getTmpname=VP;Zg.exports._cleanupOnExit=KP;var dr=require("fs"),Ylt=cie(),gie=mie(),Jlt=require("path"),{promisify:qs}=require("util"),dc={},Zlt=function(){try{return require("worker_threads").threadId}catch{return 0}}(),Qlt=0;function VP(e){return e+"."+Ylt(__filename).hash(String(process.pid)).hash(String(Zlt)).hash(String(++Qlt)).result()}function KP(e){return()=>{try{dr.unlinkSync(typeof e=="function"?e():e)}catch{}}}function eft(e){return new Promise(t=>{dc[e]||(dc[e]=[]),dc[e].push(t),dc[e].length===1&&t()})}function qw(e){return e.code==="ENOSYS"||(!process.getuid||process.getuid()!==0)&&(e.code==="EINVAL"||e.code==="EPERM")}async function tft(e,t,r={}){typeof r=="string"&&(r={encoding:r});let n,i,s=gie(KP(()=>i)),o=Jlt.resolve(e);try{await eft(o);let a=await qs(dr.realpath)(e).catch(()=>e);if(i=VP(a),!r.mode||!r.chown){let u=await qs(dr.stat)(a).catch(()=>{});u&&(r.mode==null&&(r.mode=u.mode),r.chown==null&&process.getuid&&(r.chown={uid:u.uid,gid:u.gid}))}n=await qs(dr.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),ArrayBuffer.isView(t)?await qs(dr.write)(n,t,0,t.length,0):t!=null&&await qs(dr.write)(n,String(t),0,String(r.encoding||"utf8")),r.fsync!==!1&&await qs(dr.fsync)(n),await qs(dr.close)(n),n=null,r.chown&&await qs(dr.chown)(i,r.chown.uid,r.chown.gid).catch(u=>{if(!qw(u))throw u}),r.mode&&await qs(dr.chmod)(i,r.mode).catch(u=>{if(!qw(u))throw u}),await qs(dr.rename)(i,a)}finally{n&&await qs(dr.close)(n).catch(()=>{}),s(),await qs(dr.unlink)(i).catch(()=>{}),dc[o].shift(),dc[o].length>0?dc[o][0]():delete dc[o]}}async function rft(e,t,r,n){r instanceof Function&&(n=r,r={});let i=tft(e,t,r);if(n)try{let s=await i;return n(s)}catch(s){return n(s)}return i}function nft(e,t,r){typeof r=="string"?r={encoding:r}:r||(r={});try{e=dr.realpathSync(e)}catch{}let n=VP(e);if(!r.mode||!r.chown)try{let u=dr.statSync(e);r=Object.assign({},r),r.mode||(r.mode=u.mode),!r.chown&&process.getuid&&(r.chown={uid:u.uid,gid:u.gid})}catch{}let i,s=KP(n),o=gie(s),a=!0;try{if(i=dr.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),ArrayBuffer.isView(t)?dr.writeSync(i,t,0,t.length,0):t!=null&&dr.writeSync(i,String(t),0,String(r.encoding||"utf8")),r.fsync!==!1&&dr.fsyncSync(i),dr.closeSync(i),i=null,r.chown)try{dr.chownSync(n,r.chown.uid,r.chown.gid)}catch(u){if(!qw(u))throw u}if(r.mode)try{dr.chmodSync(n,r.mode)}catch(u){if(!qw(u))throw u}dr.renameSync(n,e),a=!1}finally{if(i)try{dr.closeSync(i)}catch{}o(),a&&s()}}});function wie(e,t){e.meta=e.meta||{},e.meta.updated_at=Math.round(Date.now()/1e3);let r=JSON.stringify(e,null,2);try{yie.default.sync(t,r),Ce.debug("Config file updated")}catch(n){throw Ce.error({err:n},"Error writing config file"),n}}function oft(){let e={userId:null,meta:{created_at:Math.round(Date.now()/1e3),updated_at:null}};return wie(e,JP()),e}function Eie(){let e=_ie();try{return JSON.parse(Buffer.from(hc.default.readFileSync(e)).toString())}catch(t){if(t.code==="ENOENT")return{};Ce.warn(`Cannot resolve local config file.
|
|
160
160
|
Error: ${t.message}`);try{let r=`${e}.bak`;hc.default.renameSync(e,r),Ce.warn(`Your previous local config was renamed to ${r} for debugging.`)}catch{}}return{}}function Sie(){let e=bie();try{return JSON.parse(Buffer.from(hc.default.readFileSync(e)).toString())}catch(t){if(t.code!=="ENOENT"){Ce.warn(`Cannot resolve global config file: ${e}
|
|
161
161
|
Error: ${t.message}`);try{let r=`${e}.bak`;hc.default.renameSync(e,r),Ce.warn(`Your previous global config was renamed to ${r} for debugging. Default global config will be recreated under ${JP()}`)}catch{}}}return oft()}function Cie(){let e=Eie(),t=Sie();return bd.default.merge(t,e)}function aft(){let e=_ie();return hc.default.existsSync(e)?{config:Eie(),configPath:e}:{config:Sie(),configPath:bie()}}function Tie(e,t){let r=aft(),{config:n}=r,{configPath:i}=r;return e&&typeof e=="string"&&typeof t<"u"?n=bd.default.set(n,e,t):bd.default.isObject(e)?n=bd.default.merge(n,e):typeof t<"u"&&(n=bd.default.merge(n,t)),Ce.info({config:n,configPath:i},"Saving Config"),wie(n,i),Cie()}function Aie(e){Tie(e)}function ZP(){let e=Cie();if(!e.userId)return null;let{sessions:t}=e,r=t==null?void 0:t[e.userId];return!r||!r.username||!r.refreshToken?null:{userId:e.userId,username:r.username,refreshToken:r.refreshToken}}function QP(){let e=ZP(),t={userId:null};e&&(rr({eventName:"ampt.context.logout",eventData:{context:"cli "}}),t.sessions={[e.userId]:{userId:null,username:null,name:null,email:null,refreshToken:null},[e.username]:{userId:null,username:null,name:null,email:null,refreshToken:null}}),Tie(t)}var Pw,XP,hc,bd,yie,xie,ift,YP,_ie,JP,sft,bie,Oie=se(()=>{"use strict";Pw=ve(require("path")),XP=ve(require("os")),hc=ve(require("fs")),bd=ve(uie()),yie=ve(vie());Sr();Js();xie=process.env.AMPT_STAGE||"prod",ift=xie==="prod"?"":xie.toLowerCase().trim(),YP=`.ampt${ift}rc`,_ie=()=>Pw.default.join(process.cwd(),YP),JP=()=>Pw.default.join(XP.default.homedir(),YP),sft=()=>Pw.default.join(XP.default.homedir(),".config",YP),bie=()=>{let e=sft(),t=JP(),r=hc.default.existsSync(e),n=hc.default.existsSync(t);return r&&n?t:r?e:t}});var kw,Iie=se(()=>{"use strict";FP();kw=async(e,t=1e4)=>{let r={root:"https://unpkg.com",endpoint:`/${e}/package.json`,method:"GET"};try{let n=await Promise.race([ze(r),new Promise((i,s)=>setTimeout(()=>s(new Error("Request timed out")),t))]);if(n)return n.version}catch{return}}});var Sr=se(()=>{"use strict";rK();iK();nR();oK();FP();eie();tie();rie();BP();md();UP();zP();iie();oie();aie();Oie();Iie()});async function*Rie(e,t){let r=Buffer.alloc(Ed),n=Buffer.from(JSON.stringify({entries:e})),i=n.length;r.writeInt32BE(i,0);let s=[r,n],o=r.length+n.length,a=new Set(Object.values(e).map(u=>u.hash));for await(let u of t)for(let{hash:c,data:f}of u)if(a.has(c)){a.delete(c);let p=Buffer.alloc(Dw);p.writeInt32BE(f.length,0);let d=Buffer.from(c,"hex");if(d.length!==Nie)throw new Error("Bad hash");d.copy(p,Ed),s.push(p),s.push(f),o+=p.length+f.length,o>256*1024&&(yield Buffer.concat(s),s=[],o=0)}if(a.size>0)throw new Error(`Missing ${a.size} records: ${Array.from(a).slice(0,10).join(", ")}`);s.length&&(yield Buffer.concat(s))}var Lw,Ed,Nie,Dw,mc,qie=se(()=>{Lw=require("stream"),Ed=4,Nie=16,Dw=Ed+Nie;mc=class{constructor(){this.entries={};this.contents={}}static async from(t){let r=new mc;for await(let n of t)for(let{name:i,hash:s,mode:o,data:a}of n)r.entries[i]={hash:s,mode:o},r.contents[s]=a;return r}static parse(t,r=1e3){let n={},i=[],s=[],o=0,a=0,u=0,c={},f,p="";function d(v){let _=Buffer.alloc(v);for(let b=v;b>0;){let y=s.shift();if(y)b>=y.length?(y.copy(_,v-b),b-=y.length):(y.copy(_,v-b,0,b),s.unshift(y.subarray(b)),b=0);else throw new Error("Not enough data")}return a-=v,_}let m=new Lw.Transform({objectMode:!0,transform(v,_,b){s.push(v),a+=v.length;try{if(o===0&&a>=Ed&&(u=d(Ed).readInt32BE(0),o=1),o===1&&a>=u){let T=d(u).toString("utf8");c=JSON.parse(T).entries;for(let[E,{hash:C}]of Object.entries(c))n[C]=n[C]||[],n[C].push(E);o=2}if(o===2){let y=a>=(f===void 0?Dw:f);for(;y;)if(f===void 0){let T=d(Dw);f=T.readInt32BE(0),p=T.toString("hex",Ed),y=a>=f}else{let T=d(f),S=n[p];if(S)for(let E of S){let{hash:C,mode:I}=c[E];i.push({name:E,hash:C,mode:I,data:T})}else throw new Error("Unexpected content with no entry pointing to it");f=void 0,p="",y=a>=Dw}}for(;i.length>=r;)this.push(i.splice(0,r));b()}catch(y){b(y)}},flush(v){i.length?v(null,i):v()}});return t.on("error",v=>{v.code==="NoSuchKey"?(m.push(null),m.destroy()):m.destroy(v)}),t.pipe(m)}static concat(t,r){let n=new mc;n.entries=t;let i=Lw.Readable.from(Rie(t,async function*(){for(let s of r)for await(let o of s){for(let{hash:a,data:u}of o)n.contents[a]=u;yield o}}()),{objectMode:!1});return Object.assign(i,{result:n}),i}getEntries(){return this.entries}getContents(){return this.contents}*content(t=1e3){let r=[];for(let[n,i]of Object.entries(this.contents))r.push({hash:n,data:i}),r.length===t&&(yield r,r=[]);r.length&&(yield r)}async toBuffer(){let t=[];for await(let r of Rie(this.entries,this.content()))t.push(r);return Buffer.concat(t)}}});var Mw=g((Aer,kie)=>{var ek=jr();function Pie(){}Pie.prototype.build=function(e,t){return JSON.stringify(Fw(e,t))};function Fw(e,t){if(!(!t||e===void 0||e===null))switch(t.type){case"structure":return uft(e,t);case"map":return lft(e,t);case"list":return cft(e,t);default:return fft(e,t)}}function uft(e,t){if(t.isDocument)return e;var r={};return ek.each(e,function(n,i){var s=t.members[n];if(s){if(s.location!=="body")return;var o=s.isLocationName?s.name:n,a=Fw(i,s);a!==void 0&&(r[o]=a)}}),r}function cft(e,t){var r=[];return ek.arrayEach(e,function(n){var i=Fw(n,t.member);i!==void 0&&r.push(i)}),r}function lft(e,t){var r={};return ek.each(e,function(n,i){var s=Fw(i,t.value);s!==void 0&&(r[n]=s)}),r}function fft(e,t){return t.toWireFormat(e)}kie.exports=Pie});var jw=g((Oer,Lie)=>{var tk=jr();function Die(){}Die.prototype.parse=function(e,t){return Bw(JSON.parse(e),t)};function Bw(e,t){if(!(!t||e===void 0))switch(t.type){case"structure":return pft(e,t);case"map":return hft(e,t);case"list":return dft(e,t);default:return mft(e,t)}}function pft(e,t){if(e!=null){if(t.isDocument)return e;var r={},n=t.members;return tk.each(n,function(i,s){var o=s.isLocationName?s.name:i;if(Object.prototype.hasOwnProperty.call(e,o)){var a=e[o],u=Bw(a,s);u!==void 0&&(r[i]=u)}}),r}}function dft(e,t){if(e!=null){var r=[];return tk.arrayEach(e,function(n){var i=Bw(n,t.member);i===void 0?r.push(null):r.push(i)}),r}}function hft(e,t){if(e!=null){var r={};return tk.each(e,function(n,i){var s=Bw(i,t.value);s===void 0?r[n]=null:r[n]=s}),r}}function mft(e,t){return t.toType(e)}Lie.exports=Die});var Uw=g((Ier,Fie)=>{var Qg=jr(),gft=Re();function vft(e){var t=e.service.config.hostPrefixEnabled;if(!t)return e;var r=e.service.api.operations[e.operation];if(xft(e))return e;if(r.endpoint&&r.endpoint.hostPrefix){var n=r.endpoint.hostPrefix,i=yft(n,e.params,r.input);_ft(e.httpRequest.endpoint,i),bft(e.httpRequest.endpoint.hostname)}return e}function xft(e){var t=e.service.api,r=t.operations[e.operation],n=t.endpointOperation&&t.endpointOperation===Qg.string.lowerFirst(r.name);return r.endpointDiscoveryRequired!=="NULL"||n===!0}function yft(e,t,r){return Qg.each(r.members,function(n,i){if(i.hostLabel===!0){if(typeof t[n]!="string"||t[n]==="")throw Qg.error(new Error,{message:"Parameter "+n+" should be a non-empty string.",code:"InvalidParameter"});var s=new RegExp("\\{"+n+"\\}","g");e=e.replace(s,t[n])}}),e}function _ft(e,t){e.host&&(e.host=t+e.host),e.hostname&&(e.hostname=t+e.hostname)}function bft(e){var t=e.split("."),r=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/;Qg.arrayEach(t,function(n){if(!n.length||n.length<1||n.length>63)throw Qg.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!r.test(n))throw gft.util.error(new Error,{code:"ValidationError",message:n+" is not hostname compatible."})})}Fie.exports={populateHostPrefix:vft}});var Hw=g((Rer,Mie)=>{var wft=jr(),Eft=Mw(),Sft=jw(),Cft=Uw().populateHostPrefix;function Tft(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,i=r.jsonVersion||"1.0",s=r.operations[e.operation].input,o=new Eft;i===1&&(i="1.0"),r.awsQueryCompatible&&(t.params||(t.params={}),Object.assign(t.params,e.params)),t.body=o.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=n,Cft(e)}function Aft(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError",typeof t.code=="string"&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var n=JSON.parse(r.body.toString()),i=n.__type||n.code||n.Code;i&&(t.code=i.split("#").pop()),t.code==="RequestEntityTooLarge"?t.message="Request body must be less than 1 MB":t.message=n.message||n.Message||null}catch{t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=wft.error(new Error,t)}function Oft(e){var t=e.httpResponse.body.toString()||"{}";if(e.request.service.config.convertResponseTypes===!1)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation],n=r.output||{},i=new Sft;e.data=i.parse(t,n)}}Mie.exports={buildRequest:Tft,extractError:Aft,extractData:Oft}});var zie=g((Ner,Hie)=>{var rk=jr();function Bie(){}Bie.prototype.serialize=function(e,t,r){Uie("",e,t,r)};function jie(e){return e.isQueryName||e.api.protocol!=="ec2"?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function Uie(e,t,r,n){rk.each(r.members,function(i,s){var o=t[i];if(o!=null){var a=jie(s);a=e?e+"."+a:a,zw(a,o,s,n)}})}function Ift(e,t,r,n){var i=1;rk.each(t,function(s,o){var a=r.flattened?".":".entry.",u=a+i+++".",c=u+(r.key.name||"key"),f=u+(r.value.name||"value");zw(e+c,s,r.key,n),zw(e+f,o,r.value,n)})}function Rft(e,t,r,n){var i=r.member||{};if(t.length===0){n.call(this,e,null);return}rk.arrayEach(t,function(s,o){var a="."+(o+1);if(r.api.protocol==="ec2")a=a+"";else if(r.flattened){if(i.name){var u=e.split(".");u.pop(),u.push(jie(i)),e=u.join(".")}}else a="."+(i.name?i.name:"member")+a;zw(e+a,s,i,n)})}function zw(e,t,r,n){t!=null&&(r.type==="structure"?Uie(e,t,r,n):r.type==="list"?Rft(e,t,r,n):r.type==="map"?Ift(e,t,r,n):n(e,r.toWireFormat(t).toString()))}Hie.exports=Bie});var nk=g((qer,$ie)=>{var Nft=jr().memoizedProperty;function qft(e,t,r,n){Nft(this,n(e),function(){return r(e,t)})}function Pft(e,t,r,n,i){n=n||String;var s=this;for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(qft.call(s,o,e[o],r,n),i&&i(o,e[o]))}$ie.exports=Pft});var e0=g((Per,Zie)=>{var kft=nk(),$a=jr();function Le(e,t,r){r!=null&&$a.property.apply(this,arguments)}function jl(e,t){e.constructor.prototype[t]||$a.memoizedProperty.apply(this,arguments)}function hr(e,t,r){t=t||{},Le(this,"shape",e.shape),Le(this,"api",t.api,!1),Le(this,"type",e.type),Le(this,"enum",e.enum),Le(this,"min",e.min),Le(this,"max",e.max),Le(this,"pattern",e.pattern),Le(this,"location",e.location||this.location||"body"),Le(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),Le(this,"isStreaming",e.streaming||this.isStreaming||!1),Le(this,"requiresLength",e.requiresLength,!1),Le(this,"isComposite",e.isComposite||!1),Le(this,"isShape",!0,!1),Le(this,"isQueryName",!!e.queryName,!1),Le(this,"isLocationName",!!e.locationName,!1),Le(this,"isIdempotent",e.idempotencyToken===!0),Le(this,"isJsonValue",e.jsonvalue===!0),Le(this,"isSensitive",e.sensitive===!0||e.prototype&&e.prototype.sensitive===!0),Le(this,"isEventStream",!!e.eventstream,!1),Le(this,"isEvent",!!e.event,!1),Le(this,"isEventPayload",!!e.eventpayload,!1),Le(this,"isEventHeader",!!e.eventheader,!1),Le(this,"isTimestampFormatSet",!!e.timestampFormat||e.prototype&&e.prototype.isTimestampFormatSet===!0,!1),Le(this,"endpointDiscoveryId",!!e.endpointdiscoveryid,!1),Le(this,"hostLabel",!!e.hostLabel,!1),t.documentation&&(Le(this,"documentation",e.documentation),Le(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&Le(this,"isXmlAttribute",e.xmlAttribute||!1),Le(this,"defaultValue",null),this.toWireFormat=function(n){return n??""},this.toType=function(n){return n}}hr.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"};hr.types={structure:Wie,list:Gie,map:Vie,boolean:Jie,timestamp:Dft,float:Lft,integer:Fft,string:Kie,base64:Yie,binary:Xie};hr.resolve=function(t,r){if(t.shape){var n=r.api.shapes[t.shape];if(!n)throw new Error("Cannot find shape reference: "+t.shape);return n}else return null};hr.create=function(t,r,n){if(t.isShape)return t;var i=hr.resolve(t,r);if(i){var s=Object.keys(t);r.documentation||(s=s.filter(function(u){return!u.match(/documentation/)}));var o=function(){i.constructor.call(this,t,r,n)};return o.prototype=i,new o}else{t.type||(t.members?t.type="structure":t.member?t.type="list":t.key?t.type="map":t.type="string");var a=t.type;if(hr.normalizedTypes[t.type]&&(t.type=hr.normalizedTypes[t.type]),hr.types[t.type])return new hr.types[t.type](t,r,n);throw new Error("Unrecognized shape type: "+a)}};function ik(e){hr.apply(this,arguments),Le(this,"isComposite",!0),e.flattened&&Le(this,"flattened",e.flattened||!1)}function Wie(e,t){var r=this,n=null,i=!this.isShape;ik.apply(this,arguments),i&&(Le(this,"defaultValue",function(){return{}}),Le(this,"members",{}),Le(this,"memberNames",[]),Le(this,"required",[]),Le(this,"isRequired",function(){return!1}),Le(this,"isDocument",!!e.document)),e.members&&(Le(this,"members",new kft(e.members,t,function(s,o){return hr.create(o,t,s)})),jl(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)}),e.event&&(jl(this,"eventPayloadMemberName",function(){for(var s=r.members,o=r.memberNames,a=0,u=o.length;a<u;a++)if(s[o[a]].isEventPayload)return o[a]}),jl(this,"eventHeaderMemberNames",function(){for(var s=r.members,o=r.memberNames,a=[],u=0,c=o.length;u<c;u++)s[o[u]].isEventHeader&&a.push(o[u]);return a}))),e.required&&(Le(this,"required",e.required),Le(this,"isRequired",function(s){if(!n){n={};for(var o=0;o<e.required.length;o++)n[e.required[o]]=!0}return n[s]},!1,!0)),Le(this,"resultWrapper",e.resultWrapper||null),e.payload&&Le(this,"payload",e.payload),typeof e.xmlNamespace=="string"?Le(this,"xmlNamespaceUri",e.xmlNamespace):typeof e.xmlNamespace=="object"&&(Le(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),Le(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function Gie(e,t){var r=this,n=!this.isShape;if(ik.apply(this,arguments),n&&Le(this,"defaultValue",function(){return[]}),e.member&&jl(this,"member",function(){return hr.create(e.member,t)}),this.flattened){var i=this.name;jl(this,"name",function(){return r.member.name||i})}}function Vie(e,t){var r=!this.isShape;ik.apply(this,arguments),r&&(Le(this,"defaultValue",function(){return{}}),Le(this,"key",hr.create({type:"string"},t)),Le(this,"value",hr.create({type:"string"},t))),e.key&&jl(this,"key",function(){return hr.create(e.key,t)}),e.value&&jl(this,"value",function(){return hr.create(e.value,t)})}function Dft(e){var t=this;if(hr.apply(this,arguments),e.timestampFormat)Le(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)Le(this,"timestampFormat",this.timestampFormat);else if(this.location==="header")Le(this,"timestampFormat","rfc822");else if(this.location==="querystring")Le(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":Le(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":Le(this,"timestampFormat","iso8601");break}this.toType=function(r){return r==null?null:typeof r.toUTCString=="function"?r:typeof r=="string"||typeof r=="number"?$a.date.parseTimestamp(r):null},this.toWireFormat=function(r){return $a.date.format(r,t.timestampFormat)}}function Kie(){hr.apply(this,arguments);var e=["rest-xml","query","ec2"];this.toType=function(t){return t=this.api&&e.indexOf(this.api.protocol)>-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&typeof t.toString=="function"?t.toString():t},this.toWireFormat=function(t){return this.isJsonValue?JSON.stringify(t):t}}function Lft(){hr.apply(this,arguments),this.toType=function(e){return e==null?null:parseFloat(e)},this.toWireFormat=this.toType}function Fft(){hr.apply(this,arguments),this.toType=function(e){return e==null?null:parseInt(e,10)},this.toWireFormat=this.toType}function Xie(){hr.apply(this,arguments),this.toType=function(e){var t=$a.base64.decode(e);if(this.isSensitive&&$a.isNode()&&typeof $a.Buffer.alloc=="function"){var r=$a.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=$a.base64.encode}function Yie(){Xie.apply(this,arguments)}function Jie(){hr.apply(this,arguments),this.toType=function(e){return typeof e=="boolean"?e:e==null?null:e==="true"}}hr.shapes={StructureShape:Wie,ListShape:Gie,MapShape:Vie,StringShape:Kie,BooleanShape:Jie,Base64Shape:Yie};Zie.exports=hr});var sk=g((ker,tse)=>{var ese=Re(),t0=jr(),Mft=zie(),Qie=e0(),Bft=Uw().populateHostPrefix;function jft(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name};var n=new Mft;n.serialize(e.params,t.input,function(i,s){r.params[i]=s}),r.body=t0.queryParamsToString(r.params),Bft(e)}function Uft(e){var t,r=e.httpResponse.body.toString();if(r.match("<UnknownOperationException"))t={Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation};else try{t=new ese.XML.Parser().parse(r)}catch{t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.requestId&&!e.requestId&&(e.requestId=t.requestId),t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=t0.error(new Error,{code:t.Code,message:t.Message}):e.error=t0.error(new Error,{code:e.httpResponse.statusCode,message:null})}function Hft(e){var t=e.request,r=t.service.api.operations[t.operation],n=r.output||{},i=n;if(i.resultWrapper){var s=Qie.create({type:"structure"});s.members[i.resultWrapper]=n,s.memberNames=[i.resultWrapper],t0.property(n,"name",n.resultWrapper),n=s}var o=new ese.XML.Parser;if(n&&n.members&&!n.members._XAMZRequestId){var a=Qie.create({type:"string"},{api:{protocol:"query"}},"requestId");n.members._XAMZRequestId=a}var u=o.parse(e.httpResponse.body.toString(),n);e.requestId=u._XAMZRequestId||u.requestId,u._XAMZRequestId&&delete u._XAMZRequestId,i.resultWrapper&&u[i.resultWrapper]&&(t0.update(u,u[i.resultWrapper]),delete u[i.resultWrapper]),e.data=u}tse.exports={buildRequest:jft,extractError:Uft,extractData:Hft}});var r0=g((Der,nse)=>{var Pn=jr(),zft=Uw().populateHostPrefix;function $ft(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod}function rse(e,t,r,n){var i=[e,t].join("/");i=i.replace(/\/+/g,"/");var s={},o=!1;if(Pn.each(r.members,function(u,c){var f=n[u];if(f!=null)if(c.location==="uri"){var p=new RegExp("\\{"+c.name+"(\\+)?\\}");i=i.replace(p,function(d,m){var v=m?Pn.uriEscapePath:Pn.uriEscape;return v(String(f))})}else c.location==="querystring"&&(o=!0,c.type==="list"?s[c.name]=f.map(function(d){return Pn.uriEscape(c.member.toWireFormat(d).toString())}):c.type==="map"?Pn.each(f,function(d,m){Array.isArray(m)?s[d]=m.map(function(v){return Pn.uriEscape(String(v))}):s[d]=Pn.uriEscape(String(m))}):s[c.name]=Pn.uriEscape(c.toWireFormat(f).toString()))}),o){i+=i.indexOf("?")>=0?"&":"?";var a=[];Pn.arrayEach(Object.keys(s).sort(),function(u){Array.isArray(s[u])||(s[u]=[s[u]]);for(var c=0;c<s[u].length;c++)a.push(Pn.uriEscape(String(u))+"="+s[u][c])}),i+=a.join("&")}return i}function Wft(e){var t=e.service.api.operations[e.operation],r=t.input,n=rse(e.httpRequest.endpoint.path,t.httpPath,r,e.params);e.httpRequest.path=n}function Gft(e){var t=e.service.api.operations[e.operation];Pn.each(t.input.members,function(r,n){var i=e.params[r];i!=null&&(n.location==="headers"&&n.type==="map"?Pn.each(i,function(s,o){e.httpRequest.headers[n.name+s]=o}):n.location==="header"&&(i=n.toWireFormat(i).toString(),n.isJsonValue&&(i=Pn.base64.encode(i)),e.httpRequest.headers[n.name]=i))})}function Vft(e){$ft(e),Wft(e),Gft(e),zft(e)}function Kft(){}function Xft(e){var t=e.request,r={},n=e.httpResponse,i=t.service.api.operations[t.operation],s=i.output,o={};Pn.each(n.headers,function(a,u){o[a.toLowerCase()]=u}),Pn.each(s.members,function(a,u){var c=(u.name||a).toLowerCase();if(u.location==="headers"&&u.type==="map"){r[a]={};var f=u.isLocationName?u.name:"",p=new RegExp("^"+f+"(.+)","i");Pn.each(n.headers,function(m,v){var _=m.match(p);_!==null&&(r[a][_[1]]=v)})}else if(u.location==="header"){if(o[c]!==void 0){var d=u.isJsonValue?Pn.base64.decode(o[c]):o[c];r[a]=u.toType(d)}}else u.location==="statusCode"&&(r[a]=parseInt(n.statusCode,10))}),e.data=r}nse.exports={buildRequest:Vft,extractError:Kft,extractData:Xft,generateURI:rse}});var uk=g((Ler,use)=>{var ak=jr(),sse=r0(),ose=Hw(),Yft=Mw(),ise=jw(),ase=["GET","HEAD","DELETE"];function Jft(e){var t=ak.getRequestPayloadShape(e);t===void 0&&ase.indexOf(e.httpRequest.method)>=0&&delete e.httpRequest.headers["Content-Length"]}function Zft(e){var t=new Yft,r=e.service.api.operations[e.operation].input;if(r.payload){var n={},i=r.members[r.payload];n=e.params[r.payload],i.type==="structure"?(e.httpRequest.body=t.build(n||{},i),ok(e)):n!==void 0&&(e.httpRequest.body=n,(i.type==="binary"||i.isStreaming)&&ok(e,!0))}else e.httpRequest.body=t.build(e.params,r),ok(e)}function ok(e,t){if(!e.httpRequest.headers["Content-Type"]){var r=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=r}}function Qft(e){sse.buildRequest(e),ase.indexOf(e.httpRequest.method)<0&&Zft(e)}function ept(e){ose.extractError(e)}function tpt(e){sse.extractData(e);var t=e.request,r=t.service.api.operations[t.operation],n=t.service.api.operations[t.operation].output||{},i,s=r.hasEventOutput;if(n.payload){var o=n.members[n.payload],a=e.httpResponse.body;if(o.isEventStream)i=new ise,e.data[payload]=ak.createEventStream(AWS.HttpClient.streamsApiVersion===2?e.httpResponse.stream:a,i,o);else if(o.type==="structure"||o.type==="list"){var i=new ise;e.data[n.payload]=i.parse(a,o)}else o.type==="binary"||o.isStreaming?e.data[n.payload]=a:e.data[n.payload]=o.toType(a)}else{var u=e.data;ose.extractData(e),e.data=ak.merge(u,e.data)}}use.exports={buildRequest:Qft,extractError:ept,extractData:tpt,unsetContentLength:Jft}});var lk=g((Fer,cse)=>{var Sd=Re(),n0=jr(),ck=r0();function rpt(e){var t=e.service.api.operations[e.operation].input,r=new Sd.XML.Builder,n=e.params,i=t.payload;if(i){var s=t.members[i];if(n=n[i],n===void 0)return;if(s.type==="structure"){var o=s.name;e.httpRequest.body=r.toXML(n,s,o,!0)}else e.httpRequest.body=n}else e.httpRequest.body=r.toXML(n,t,t.name||t.shape||n0.string.upperFirst(e.operation)+"Request")}function npt(e){ck.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&rpt(e)}function ipt(e){ck.extractError(e);var t;try{t=new Sd.XML.Parser().parse(e.httpResponse.body.toString())}catch{t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=n0.error(new Error,{code:t.Code,message:t.Message}):e.error=n0.error(new Error,{code:e.httpResponse.statusCode,message:null})}function spt(e){ck.extractData(e);var t,r=e.request,n=e.httpResponse.body,i=r.service.api.operations[r.operation],s=i.output,o=i.hasEventOutput,a=s.payload;if(a){var u=s.members[a];u.isEventStream?(t=new Sd.XML.Parser,e.data[a]=n0.createEventStream(Sd.HttpClient.streamsApiVersion===2?e.httpResponse.stream:e.httpResponse.body,t,u)):u.type==="structure"?(t=new Sd.XML.Parser,e.data[a]=t.parse(n.toString(),u)):u.type==="binary"||u.isStreaming?e.data[a]=n:e.data[a]=u.toType(n)}else if(n.length>0){t=new Sd.XML.Parser;var c=t.parse(n.toString(),s);n0.update(e.data,c)}}cse.exports={buildRequest:npt,extractError:ipt,extractData:spt}});var fse=g((Mer,lse)=>{function opt(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}lse.exports={escapeAttribute:opt}});var dse=g((Ber,pse)=>{var apt=fse().escapeAttribute;function i0(e,t){t===void 0&&(t=[]),this.name=e,this.children=t,this.attributes={}}i0.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this};i0.prototype.addChildNode=function(e){return this.children.push(e),this};i0.prototype.removeAttribute=function(e){return delete this.attributes[e],this};i0.prototype.toString=function(){for(var e=!!this.children.length,t="<"+this.name,r=this.attributes,n=0,i=Object.keys(r);n<i.length;n++){var s=i[n],o=r[s];typeof o<"u"&&o!==null&&(t+=" "+s+'="'+apt(""+o)+'"')}return t+=e?">"+this.children.map(function(a){return a.toString()}).join("")+"</"+this.name+">":"/>"};pse.exports={XmlNode:i0}});var mse=g((jer,hse)=>{function upt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
").replace(/\n/g,"
").replace(/\u0085/g,"…").replace(/\u2028/,"
")}hse.exports={escapeElement:upt}});var xse=g((Uer,vse)=>{var cpt=mse().escapeElement;function gse(e){this.value=e}gse.prototype.toString=function(){return cpt(""+this.value)};vse.exports={XmlText:gse}});var wse=g((Her,bse)=>{var $w=jr(),Ul=dse().XmlNode,lpt=xse().XmlText;function yse(){}yse.prototype.toXML=function(e,t,r,n){var i=new Ul(r);return _se(i,t,!0),Hl(i,e,t),i.children.length>0||n?i.toString():""};function Hl(e,t,r){switch(r.type){case"structure":return fpt(e,t,r);case"map":return ppt(e,t,r);case"list":return dpt(e,t,r);default:return hpt(e,t,r)}}function fpt(e,t,r){$w.arrayEach(r.memberNames,function(n){var i=r.members[n];if(i.location==="body"){var s=t[n],o=i.name;if(s!=null)if(i.isXmlAttribute)e.addAttribute(o,s);else if(i.flattened)Hl(e,s,i);else{var a=new Ul(o);e.addChildNode(a),_se(a,i),Hl(a,s,i)}}})}function ppt(e,t,r){var n=r.key.name||"key",i=r.value.name||"value";$w.each(t,function(s,o){var a=new Ul(r.flattened?r.name:"entry");e.addChildNode(a);var u=new Ul(n),c=new Ul(i);a.addChildNode(u),a.addChildNode(c),Hl(u,s,r.key),Hl(c,o,r.value)})}function dpt(e,t,r){r.flattened?$w.arrayEach(t,function(n){var i=r.member.name||r.name,s=new Ul(i);e.addChildNode(s),Hl(s,n,r.member)}):$w.arrayEach(t,function(n){var i=r.member.name||"member",s=new Ul(i);e.addChildNode(s),Hl(s,n,r.member)})}function hpt(e,t,r){e.addChildNode(new lpt(r.toWireFormat(t)))}function _se(e,t,r){var n,i="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(i,n)}bse.exports=yse});var fk=g((zer,Sse)=>{var s0=e0(),Ese=jr(),$o=Ese.property,Cd=Ese.memoizedProperty;function mpt(e,t,r){var n=this;r=r||{},$o(this,"name",t.name||e),$o(this,"api",r.api,!1),t.http=t.http||{},$o(this,"endpoint",t.endpoint),$o(this,"httpMethod",t.http.method||"POST"),$o(this,"httpPath",t.http.requestUri||"/"),$o(this,"authtype",t.authtype||""),$o(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL");var i=t.httpChecksumRequired||t.httpChecksum&&t.httpChecksum.requestChecksumRequired;$o(this,"httpChecksumRequired",i,!1),Cd(this,"input",function(){return t.input?s0.create(t.input,r):new s0.create({type:"structure"},r)}),Cd(this,"output",function(){return t.output?s0.create(t.output,r):new s0.create({type:"structure"},r)}),Cd(this,"errors",function(){var s=[];if(!t.errors)return null;for(var o=0;o<t.errors.length;o++)s.push(s0.create(t.errors[o],r));return s}),Cd(this,"paginator",function(){return r.api.paginators[e]}),r.documentation&&($o(this,"documentation",t.documentation),$o(this,"documentationUrl",t.documentationUrl)),Cd(this,"idempotentMembers",function(){var s=[],o=n.input,a=o.members;if(!o.members)return s;for(var u in a)a.hasOwnProperty(u)&&a[u].isIdempotent===!0&&s.push(u);return s}),Cd(this,"hasEventOutput",function(){var s=n.output;return gpt(s)})}function gpt(e){var t=e.members,r=e.payload;if(!e.members)return!1;if(r){var n=t[r];return n.isEventStream}for(var i in t)if(!t.hasOwnProperty(i)&&t[i].isEventStream===!0)return!0;return!1}Sse.exports=mpt});var pk=g(($er,Cse)=>{var o0=jr().property;function vpt(e,t){o0(this,"inputToken",t.input_token),o0(this,"limitKey",t.limit_key),o0(this,"moreResults",t.more_results),o0(this,"outputToken",t.output_token),o0(this,"resultKey",t.result_key)}Cse.exports=vpt});var dk=g((Wer,Ase)=>{var Tse=jr(),Ww=Tse.property;function xpt(e,t,r){r=r||{},Ww(this,"name",e),Ww(this,"api",r.api,!1),t.operation&&Ww(this,"operation",Tse.string.lowerFirst(t.operation));var n=this,i=["type","description","delay","maxAttempts","acceptors"];i.forEach(function(s){var o=t[s];o&&Ww(n,s,o)})}Ase.exports=xpt});var hk=g((Ger,ypt)=>{ypt.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*","2018-06-18*","2018-11-05*","2019-03-26*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM",cors:!0},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},s3control:{name:"S3Control",dualstackAvailable:!0,xmlNoDefaultLists:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay",cors:!0},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},marketplaceentitlementservice:{prefix:"entitlement.marketplace",name:"MarketplaceEntitlementService"},athena:{name:"Athena",cors:!0},greengrass:{name:"Greengrass"},dax:{name:"DAX"},migrationhub:{prefix:"AWSMigrationHub",name:"MigrationHub"},cloudhsmv2:{name:"CloudHSMV2",cors:!0},glue:{name:"Glue"},mobile:{name:"Mobile"},pricing:{name:"Pricing",cors:!0},costexplorer:{prefix:"ce",name:"CostExplorer",cors:!0},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData",cors:!0},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend",cors:!0},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia",cors:!0},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia",cors:!0},kinesisvideo:{name:"KinesisVideo",cors:!0},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate",cors:!0},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups",cors:!0},alexaforbusiness:{name:"AlexaForBusiness"},cloud9:{name:"Cloud9"},serverlessapplicationrepository:{prefix:"serverlessrepo",name:"ServerlessApplicationRepository"},servicediscovery:{name:"ServiceDiscovery"},workmail:{name:"WorkMail"},autoscalingplans:{prefix:"autoscaling-plans",name:"AutoScalingPlans"},transcribeservice:{prefix:"transcribe",name:"TranscribeService"},connect:{name:"Connect",cors:!0},acmpca:{prefix:"acm-pca",name:"ACMPCA"},fms:{name:"FMS"},secretsmanager:{name:"SecretsManager",cors:!0},iotanalytics:{name:"IoTAnalytics",cors:!0},iot1clickdevicesservice:{prefix:"iot1click-devices",name:"IoT1ClickDevicesService"},iot1clickprojects:{prefix:"iot1click-projects",name:"IoT1ClickProjects"},pi:{name:"PI"},neptune:{name:"Neptune"},mediatailor:{name:"MediaTailor"},eks:{name:"EKS"},macie:{name:"Macie"},dlm:{name:"DLM"},signer:{name:"Signer"},chime:{name:"Chime"},pinpointemail:{prefix:"pinpoint-email",name:"PinpointEmail"},ram:{name:"RAM"},route53resolver:{name:"Route53Resolver"},pinpointsmsvoice:{prefix:"sms-voice",name:"PinpointSMSVoice"},quicksight:{name:"QuickSight"},rdsdataservice:{prefix:"rds-data",name:"RDSDataService"},amplify:{name:"Amplify"},datasync:{name:"DataSync"},robomaker:{name:"RoboMaker"},transfer:{name:"Transfer"},globalaccelerator:{name:"GlobalAccelerator"},comprehendmedical:{name:"ComprehendMedical",cors:!0},kinesisanalyticsv2:{name:"KinesisAnalyticsV2"},mediaconnect:{name:"MediaConnect"},fsx:{name:"FSx"},securityhub:{name:"SecurityHub"},appmesh:{name:"AppMesh",versions:["2018-10-01*"]},licensemanager:{prefix:"license-manager",name:"LicenseManager"},kafka:{name:"Kafka"},apigatewaymanagementapi:{name:"ApiGatewayManagementApi"},apigatewayv2:{name:"ApiGatewayV2"},docdb:{name:"DocDB"},backup:{name:"Backup"},worklink:{name:"WorkLink"},textract:{name:"Textract"},managedblockchain:{name:"ManagedBlockchain"},mediapackagevod:{prefix:"mediapackage-vod",name:"MediaPackageVod"},groundstation:{name:"GroundStation"},iotthingsgraph:{name:"IoTThingsGraph"},iotevents:{name:"IoTEvents"},ioteventsdata:{prefix:"iotevents-data",name:"IoTEventsData"},personalize:{name:"Personalize",cors:!0},personalizeevents:{prefix:"personalize-events",name:"PersonalizeEvents",cors:!0},personalizeruntime:{prefix:"personalize-runtime",name:"PersonalizeRuntime",cors:!0},applicationinsights:{prefix:"application-insights",name:"ApplicationInsights"},servicequotas:{prefix:"service-quotas",name:"ServiceQuotas"},ec2instanceconnect:{prefix:"ec2-instance-connect",name:"EC2InstanceConnect"},eventbridge:{name:"EventBridge"},lakeformation:{name:"LakeFormation"},forecastservice:{prefix:"forecast",name:"ForecastService",cors:!0},forecastqueryservice:{prefix:"forecastquery",name:"ForecastQueryService",cors:!0},qldb:{name:"QLDB"},qldbsession:{prefix:"qldb-session",name:"QLDBSession"},workmailmessageflow:{name:"WorkMailMessageFlow"},codestarnotifications:{prefix:"codestar-notifications",name:"CodeStarNotifications"},savingsplans:{name:"SavingsPlans"},sso:{name:"SSO"},ssooidc:{prefix:"sso-oidc",name:"SSOOIDC"},marketplacecatalog:{prefix:"marketplace-catalog",name:"MarketplaceCatalog",cors:!0},dataexchange:{name:"DataExchange"},sesv2:{name:"SESV2"},migrationhubconfig:{prefix:"migrationhub-config",name:"MigrationHubConfig"},connectparticipant:{name:"ConnectParticipant"},appconfig:{name:"AppConfig"},iotsecuretunneling:{name:"IoTSecureTunneling"},wafv2:{name:"WAFV2"},elasticinference:{prefix:"elastic-inference",name:"ElasticInference"},imagebuilder:{name:"Imagebuilder"},schemas:{name:"Schemas"},accessanalyzer:{name:"AccessAnalyzer"},codegurureviewer:{prefix:"codeguru-reviewer",name:"CodeGuruReviewer"},codeguruprofiler:{name:"CodeGuruProfiler"},computeoptimizer:{prefix:"compute-optimizer",name:"ComputeOptimizer"},frauddetector:{name:"FraudDetector"},kendra:{name:"Kendra"},networkmanager:{name:"NetworkManager"},outposts:{name:"Outposts"},augmentedairuntime:{prefix:"sagemaker-a2i-runtime",name:"AugmentedAIRuntime"},ebs:{name:"EBS"},kinesisvideosignalingchannels:{prefix:"kinesis-video-signaling",name:"KinesisVideoSignalingChannels",cors:!0},detective:{name:"Detective"},codestarconnections:{prefix:"codestar-connections",name:"CodeStarconnections"},synthetics:{name:"Synthetics"},iotsitewise:{name:"IoTSiteWise"},macie2:{name:"Macie2"},codeartifact:{name:"CodeArtifact"},honeycode:{name:"Honeycode"},ivs:{name:"IVS"},braket:{name:"Braket"},identitystore:{name:"IdentityStore"},appflow:{name:"Appflow"},redshiftdata:{prefix:"redshift-data",name:"RedshiftData"},ssoadmin:{prefix:"sso-admin",name:"SSOAdmin"},timestreamquery:{prefix:"timestream-query",name:"TimestreamQuery"},timestreamwrite:{prefix:"timestream-write",name:"TimestreamWrite"},s3outposts:{name:"S3Outposts"},databrew:{name:"DataBrew"},servicecatalogappregistry:{prefix:"servicecatalog-appregistry",name:"ServiceCatalogAppRegistry"},networkfirewall:{prefix:"network-firewall",name:"NetworkFirewall"},mwaa:{name:"MWAA"},amplifybackend:{name:"AmplifyBackend"},appintegrations:{name:"AppIntegrations"},connectcontactlens:{prefix:"connect-contact-lens",name:"ConnectContactLens"},devopsguru:{prefix:"devops-guru",name:"DevOpsGuru"},ecrpublic:{prefix:"ecr-public",name:"ECRPUBLIC"},lookoutvision:{name:"LookoutVision"},sagemakerfeaturestoreruntime:{prefix:"sagemaker-featurestore-runtime",name:"SageMakerFeatureStoreRuntime"},customerprofiles:{prefix:"customer-profiles",name:"CustomerProfiles"},auditmanager:{name:"AuditManager"},emrcontainers:{prefix:"emr-containers",name:"EMRcontainers"},healthlake:{name:"HealthLake"},sagemakeredge:{prefix:"sagemaker-edge",name:"SagemakerEdge"},amp:{name:"Amp"},greengrassv2:{name:"GreengrassV2"},iotdeviceadvisor:{name:"IotDeviceAdvisor"},iotfleethub:{name:"IoTFleetHub"},iotwireless:{name:"IoTWireless"},location:{name:"Location",cors:!0},wellarchitected:{name:"WellArchitected"},lexmodelsv2:{prefix:"models.lex.v2",name:"LexModelsV2"},lexruntimev2:{prefix:"runtime.lex.v2",name:"LexRuntimeV2",cors:!0},fis:{name:"Fis"},lookoutmetrics:{name:"LookoutMetrics"},mgn:{name:"Mgn"},lookoutequipment:{name:"LookoutEquipment"},nimble:{name:"Nimble"},finspace:{name:"Finspace"},finspacedata:{prefix:"finspace-data",name:"Finspacedata"},ssmcontacts:{prefix:"ssm-contacts",name:"SSMContacts"},ssmincidents:{prefix:"ssm-incidents",name:"SSMIncidents"},applicationcostprofiler:{name:"ApplicationCostProfiler"},apprunner:{name:"AppRunner"},proton:{name:"Proton"},route53recoverycluster:{prefix:"route53-recovery-cluster",name:"Route53RecoveryCluster"},route53recoverycontrolconfig:{prefix:"route53-recovery-control-config",name:"Route53RecoveryControlConfig"},route53recoveryreadiness:{prefix:"route53-recovery-readiness",name:"Route53RecoveryReadiness"},chimesdkidentity:{prefix:"chime-sdk-identity",name:"ChimeSDKIdentity"},chimesdkmessaging:{prefix:"chime-sdk-messaging",name:"ChimeSDKMessaging"},snowdevicemanagement:{prefix:"snow-device-management",name:"SnowDeviceManagement"},memorydb:{name:"MemoryDB"},opensearch:{name:"OpenSearch"},kafkaconnect:{name:"KafkaConnect"},voiceid:{prefix:"voice-id",name:"VoiceID"},wisdom:{name:"Wisdom"},account:{name:"Account"},cloudcontrol:{name:"CloudControl"},grafana:{name:"Grafana"},panorama:{name:"Panorama"},chimesdkmeetings:{prefix:"chime-sdk-meetings",name:"ChimeSDKMeetings"},resiliencehub:{name:"Resiliencehub"},migrationhubstrategy:{name:"MigrationHubStrategy"},appconfigdata:{name:"AppConfigData"},drs:{name:"Drs"},migrationhubrefactorspaces:{prefix:"migration-hub-refactor-spaces",name:"MigrationHubRefactorSpaces"},evidently:{name:"Evidently"},inspector2:{name:"Inspector2"},rbin:{name:"Rbin"},rum:{name:"RUM"},backupgateway:{prefix:"backup-gateway",name:"BackupGateway"},iottwinmaker:{name:"IoTTwinMaker"},workspacesweb:{prefix:"workspaces-web",name:"WorkSpacesWeb"},amplifyuibuilder:{name:"AmplifyUIBuilder"},keyspaces:{name:"Keyspaces"},billingconductor:{name:"Billingconductor"},gamesparks:{name:"GameSparks"},pinpointsmsvoicev2:{prefix:"pinpoint-sms-voice-v2",name:"PinpointSMSVoiceV2"},ivschat:{name:"Ivschat"},chimesdkmediapipelines:{prefix:"chime-sdk-media-pipelines",name:"ChimeSDKMediaPipelines"},emrserverless:{prefix:"emr-serverless",name:"EMRServerless"},m2:{name:"M2"},connectcampaigns:{name:"ConnectCampaigns"},redshiftserverless:{prefix:"redshift-serverless",name:"RedshiftServerless"},rolesanywhere:{name:"RolesAnywhere"},licensemanagerusersubscriptions:{prefix:"license-manager-user-subscriptions",name:"LicenseManagerUserSubscriptions"},backupstorage:{name:"BackupStorage"},privatenetworks:{name:"PrivateNetworks"},supportapp:{prefix:"support-app",name:"SupportApp"},controltower:{name:"ControlTower"},iotfleetwise:{name:"IoTFleetWise"},migrationhuborchestrator:{name:"MigrationHubOrchestrator"},connectcases:{name:"ConnectCases"},resourceexplorer2:{prefix:"resource-explorer-2",name:"ResourceExplorer2"},scheduler:{name:"Scheduler"},chimesdkvoice:{prefix:"chime-sdk-voice",name:"ChimeSDKVoice"},iotroborunner:{prefix:"iot-roborunner",name:"IoTRoboRunner"},ssmsap:{prefix:"ssm-sap",name:"SsmSap"},oam:{name:"OAM"},arczonalshift:{prefix:"arc-zonal-shift",name:"ARCZonalShift"},omics:{name:"Omics"},opensearchserverless:{name:"OpenSearchServerless"},securitylake:{name:"SecurityLake"},simspaceweaver:{name:"SimSpaceWeaver"},docdbelastic:{prefix:"docdb-elastic",name:"DocDBElastic"},sagemakergeospatial:{prefix:"sagemaker-geospatial",name:"SageMakerGeospatial"},codecatalyst:{name:"CodeCatalyst"},pipes:{name:"Pipes"},sagemakermetrics:{prefix:"sagemaker-metrics",name:"SageMakerMetrics"},kinesisvideowebrtcstorage:{prefix:"kinesis-video-webrtc-storage",name:"KinesisVideoWebRTCStorage"},licensemanagerlinuxsubscriptions:{prefix:"license-manager-linux-subscriptions",name:"LicenseManagerLinuxSubscriptions"},kendraranking:{prefix:"kendra-ranking",name:"KendraRanking"},cleanrooms:{name:"CleanRooms"},cloudtraildata:{prefix:"cloudtrail-data",name:"CloudTrailData"},tnb:{name:"Tnb"},internetmonitor:{name:"InternetMonitor"},ivsrealtime:{prefix:"ivs-realtime",name:"IVSRealTime"},vpclattice:{prefix:"vpc-lattice",name:"VPCLattice"},osis:{name:"OSIS"}}});var mk=g((Ver,Ise)=>{var Gw=nk(),_pt=fk(),bpt=e0(),wpt=pk(),Ept=dk(),Ose=hk(),a0=jr(),mr=a0.property,Spt=a0.memoizedProperty;function Cpt(e,t){var r=this;e=e||{},t=t||{},t.api=this,e.metadata=e.metadata||{};var n=t.serviceIdentifier;delete t.serviceIdentifier,mr(this,"isApi",!0,!1),mr(this,"apiVersion",e.metadata.apiVersion),mr(this,"endpointPrefix",e.metadata.endpointPrefix),mr(this,"signingName",e.metadata.signingName),mr(this,"globalEndpoint",e.metadata.globalEndpoint),mr(this,"signatureVersion",e.metadata.signatureVersion),mr(this,"jsonVersion",e.metadata.jsonVersion),mr(this,"targetPrefix",e.metadata.targetPrefix),mr(this,"protocol",e.metadata.protocol),mr(this,"timestampFormat",e.metadata.timestampFormat),mr(this,"xmlNamespaceUri",e.metadata.xmlNamespace),mr(this,"abbreviation",e.metadata.serviceAbbreviation),mr(this,"fullName",e.metadata.serviceFullName),mr(this,"serviceId",e.metadata.serviceId),n&&Ose[n]&&mr(this,"xmlNoDefaultLists",Ose[n].xmlNoDefaultLists,!1),Spt(this,"className",function(){var s=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return s?(s=s.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""),s==="ElasticLoadBalancing"&&(s="ELB"),s):null});function i(s,o){o.endpointoperation===!0&&mr(r,"endpointOperation",a0.string.lowerFirst(s)),o.endpointdiscovery&&!r.hasRequiredEndpointDiscovery&&mr(r,"hasRequiredEndpointDiscovery",o.endpointdiscovery.required===!0)}mr(this,"operations",new Gw(e.operations,t,function(s,o){return new _pt(s,o,t)},a0.string.lowerFirst,i)),mr(this,"shapes",new Gw(e.shapes,t,function(s,o){return bpt.create(o,t)})),mr(this,"paginators",new Gw(e.paginators,t,function(s,o){return new wpt(s,o,t)})),mr(this,"waiters",new Gw(e.waiters,t,function(s,o){return new Ept(s,o,t)},a0.string.lowerFirst)),t.documentation&&(mr(this,"documentation",e.documentation),mr(this,"documentationUrl",e.documentationUrl)),mr(this,"awsQueryCompatible",e.metadata.awsQueryCompatible)}Ise.exports=Cpt});var Nse=g((Ker,Rse)=>{function Vw(e,t){if(!Vw.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return Vw.services[e][t]}Vw.services={};Rse.exports=Vw});var qse=g(gk=>{"use strict";Object.defineProperty(gk,"__esModule",{value:!0});var Tpt=function(){function e(t,r){this.key=t,this.value=r}return e}(),Apt=function(){function e(t){if(this.nodeMap={},this.size=0,typeof t!="number"||t<1)throw new Error("Cache size can only be positive number");this.sizeLimit=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.prependToList=function(t){this.headerNode?(this.headerNode.prev=t,t.next=this.headerNode):this.tailNode=t,this.headerNode=t,this.size++},e.prototype.removeFromTail=function(){if(this.tailNode){var t=this.tailNode,r=t.prev;return r&&(r.next=void 0),t.prev=void 0,this.tailNode=r,this.size--,t}},e.prototype.detachFromList=function(t){this.headerNode===t&&(this.headerNode=t.next),this.tailNode===t&&(this.tailNode=t.prev),t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.next=void 0,t.prev=void 0,this.size--},e.prototype.get=function(t){if(this.nodeMap[t]){var r=this.nodeMap[t];return this.detachFromList(r),this.prependToList(r),r.value}},e.prototype.remove=function(t){if(this.nodeMap[t]){var r=this.nodeMap[t];this.detachFromList(r),delete this.nodeMap[t]}},e.prototype.put=function(t,r){if(this.nodeMap[t])this.remove(t);else if(this.size===this.sizeLimit){var n=this.removeFromTail(),i=n.key;delete this.nodeMap[i]}var s=new Tpt(t,r);this.nodeMap[t]=s,this.prependToList(s)},e.prototype.empty=function(){for(var t=Object.keys(this.nodeMap),r=0;r<t.length;r++){var n=t[r],i=this.nodeMap[n];this.detachFromList(i),delete this.nodeMap[n]}},e}();gk.LRUCache=Apt});var Pse=g(vk=>{"use strict";Object.defineProperty(vk,"__esModule",{value:!0});var Opt=qse(),Ipt=1e3,Rpt=function(){function e(t){t===void 0&&(t=Ipt),this.maxSize=t,this.cache=new Opt.LRUCache(t)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n=typeof t!="string"?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r=typeof t!="string"?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i){for(var s=i.length-1;s>=0;s--){var o=i[s];o.Expire<n&&i.splice(s,1)}if(i.length===0){this.cache.remove(r);return}}return i},e.getKeyString=function(t){for(var r=[],n=Object.keys(t).sort(),i=0;i<n.length;i++){var s=n[i];t[s]!==void 0&&r.push(t[s])}return r.join(" ")},e.prototype.populateValue=function(t){var r=Date.now();return t.map(function(n){return{Address:n.Address||"",Expire:r+(n.CachePeriodInMinutes||1)*60*1e3}})},e.prototype.empty=function(){this.cache.empty()},e.prototype.remove=function(t){var r=typeof t!="string"?e.getKeyString(t):t;this.cache.remove(r)},e}();vk.EndpointCache=Rpt});var xk=g((Jer,kse)=>{var Wa=Re();Wa.SequentialExecutor=Wa.util.inherit({constructor:function(){this._events={}},listeners:function(t){return this._events[t]?this._events[t].slice(0):[]},on:function(t,r,n){return this._events[t]?n?this._events[t].unshift(r):this._events[t].push(r):this._events[t]=[r],this},onAsync:function(t,r,n){return r._isAsync=!0,this.on(t,r,n)},removeListener:function(t,r){var n=this._events[t];if(n){for(var i=n.length,s=-1,o=0;o<i;++o)n[o]===r&&(s=o);s>-1&&n.splice(s,1)}return this},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this},emit:function(t,r,n){n||(n=function(){});var i=this.listeners(t),s=i.length;return this.callListeners(i,r,n),s>0},callListeners:function(t,r,n,i){var s=this,o=i||null;function a(c){if(c&&(o=Wa.util.error(o||new Error,c),s._haltHandlersOnError))return n.call(s,o);s.callListeners(t,r,n,o)}for(;t.length>0;){var u=t.shift();if(u._isAsync){u.apply(s,r.concat([a]));return}else{try{u.apply(s,r)}catch(c){o=Wa.util.error(o||new Error,c)}if(o&&s._haltHandlersOnError){n.call(s,o);return}}}n.call(s,o)},addListeners:function(t){var r=this;return t._events&&(t=t._events),Wa.util.each(t,function(n,i){typeof i=="function"&&(i=[i]),Wa.util.arrayEach(i,function(s){r.on(n,s)})}),r},addNamedListener:function(t,r,n,i){return this[t]=n,this.addListener(r,n,i),this},addNamedAsyncListener:function(t,r,n,i){return n._isAsync=!0,this.addNamedListener(t,r,n,i)},addNamedListeners:function(t){var r=this;return t(function(){r.addNamedListener.apply(r,arguments)},function(){r.addNamedAsyncListener.apply(r,arguments)}),this}});Wa.SequentialExecutor.prototype.addListener=Wa.SequentialExecutor.prototype.on;kse.exports=Wa.SequentialExecutor});var Dse=g((Zer,Npt)=>{Npt.exports={rules:{"*/*":{endpoint:"{service}.{region}.amazonaws.com"},"cn-*/*":{endpoint:"{service}.{region}.amazonaws.com.cn"},"us-iso-*/*":"usIso","us-isob-*/*":"usIsob","*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/sts":"globalSSL","*/importexport":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2",globalEndpoint:!0},"*/route53":"globalSSL","cn-*/route53":{endpoint:"{service}.amazonaws.com.cn",globalEndpoint:!0,signingRegion:"cn-northwest-1"},"us-gov-*/route53":"globalGovCloud","us-iso-*/route53":{endpoint:"{service}.c2s.ic.gov",globalEndpoint:!0,signingRegion:"us-iso-east-1"},"us-isob-*/route53":{endpoint:"{service}.sc2s.sgov.gov",globalEndpoint:!0,signingRegion:"us-isob-east-1"},"*/waf":"globalSSL","*/iam":"globalSSL","cn-*/iam":{endpoint:"{service}.cn-north-1.amazonaws.com.cn",globalEndpoint:!0,signingRegion:"cn-north-1"},"us-gov-*/iam":"globalGovCloud","us-gov-*/sts":{endpoint:"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{endpoint:"{service}.amazonaws.com",signatureVersion:"s3"},"us-east-1/sdb":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2"},"*/sdb":{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"v2"},"*/resource-explorer-2":"dualstackByDefault","*/kendra-ranking":"dualstackByDefault","*/internetmonitor":"dualstackByDefault","*/codecatalyst":"globalDualstackByDefault"},fipsRules:{"*/*":"fipsStandard","us-gov-*/*":"fipsStandard","us-iso-*/*":{endpoint:"{service}-fips.{region}.c2s.ic.gov"},"us-iso-*/dms":"usIso","us-isob-*/*":{endpoint:"{service}-fips.{region}.sc2s.sgov.gov"},"us-isob-*/dms":"usIsob","cn-*/*":{endpoint:"{service}-fips.{region}.amazonaws.com.cn"},"*/api.ecr":"fips.api.ecr","*/api.sagemaker":"fips.api.sagemaker","*/batch":"fipsDotPrefix","*/eks":"fipsDotPrefix","*/models.lex":"fips.models.lex","*/runtime.lex":"fips.runtime.lex","*/runtime.sagemaker":{endpoint:"runtime-fips.sagemaker.{region}.amazonaws.com"},"*/iam":"fipsWithoutRegion","*/route53":"fipsWithoutRegion","*/transcribe":"fipsDotPrefix","*/waf":"fipsWithoutRegion","us-gov-*/transcribe":"fipsDotPrefix","us-gov-*/api.ecr":"fips.api.ecr","us-gov-*/api.sagemaker":"fips.api.sagemaker","us-gov-*/models.lex":"fips.models.lex","us-gov-*/runtime.lex":"fips.runtime.lex","us-gov-*/acm-pca":"fipsWithServiceOnly","us-gov-*/batch":"fipsWithServiceOnly","us-gov-*/cloudformation":"fipsWithServiceOnly","us-gov-*/config":"fipsWithServiceOnly","us-gov-*/eks":"fipsWithServiceOnly","us-gov-*/elasticmapreduce":"fipsWithServiceOnly","us-gov-*/identitystore":"fipsWithServiceOnly","us-gov-*/dynamodb":"fipsWithServiceOnly","us-gov-*/elasticloadbalancing":"fipsWithServiceOnly","us-gov-*/guardduty":"fipsWithServiceOnly","us-gov-*/monitoring":"fipsWithServiceOnly","us-gov-*/resource-groups":"fipsWithServiceOnly","us-gov-*/runtime.sagemaker":"fipsWithServiceOnly","us-gov-*/servicecatalog-appregistry":"fipsWithServiceOnly","us-gov-*/servicequotas":"fipsWithServiceOnly","us-gov-*/ssm":"fipsWithServiceOnly","us-gov-*/sts":"fipsWithServiceOnly","us-gov-*/support":"fipsWithServiceOnly","us-gov-west-1/states":"fipsWithServiceOnly","us-iso-east-1/elasticfilesystem":{endpoint:"elasticfilesystem-fips.{region}.c2s.ic.gov"},"us-gov-west-1/organizations":"fipsWithServiceOnly","us-gov-west-1/route53":{endpoint:"route53.us-gov.amazonaws.com"},"*/resource-explorer-2":"fipsDualstackByDefault","*/kendra-ranking":"dualstackByDefault","*/internetmonitor":"dualstackByDefault","*/codecatalyst":"fipsGlobalDualstackByDefault"},dualstackRules:{"*/*":{endpoint:"{service}.{region}.api.aws"},"cn-*/*":{endpoint:"{service}.{region}.api.amazonwebservices.com.cn"},"*/s3":"dualstackLegacy","cn-*/s3":"dualstackLegacyCn","*/s3-control":"dualstackLegacy","cn-*/s3-control":"dualstackLegacyCn","ap-south-1/ec2":"dualstackLegacyEc2","eu-west-1/ec2":"dualstackLegacyEc2","sa-east-1/ec2":"dualstackLegacyEc2","us-east-1/ec2":"dualstackLegacyEc2","us-east-2/ec2":"dualstackLegacyEc2","us-west-2/ec2":"dualstackLegacyEc2"},dualstackFipsRules:{"*/*":{endpoint:"{service}-fips.{region}.api.aws"},"cn-*/*":{endpoint:"{service}-fips.{region}.api.amazonwebservices.com.cn"},"*/s3":"dualstackFipsLegacy","cn-*/s3":"dualstackFipsLegacyCn","*/s3-control":"dualstackFipsLegacy","cn-*/s3-control":"dualstackFipsLegacyCn"},patterns:{globalSSL:{endpoint:"https://{service}.amazonaws.com",globalEndpoint:!0,signingRegion:"us-east-1"},globalGovCloud:{endpoint:"{service}.us-gov.amazonaws.com",globalEndpoint:!0,signingRegion:"us-gov-west-1"},s3signature:{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"s3"},usIso:{endpoint:"{service}.{region}.c2s.ic.gov"},usIsob:{endpoint:"{service}.{region}.sc2s.sgov.gov"},fipsStandard:{endpoint:"{service}-fips.{region}.amazonaws.com"},fipsDotPrefix:{endpoint:"fips.{service}.{region}.amazonaws.com"},fipsWithoutRegion:{endpoint:"{service}-fips.amazonaws.com"},"fips.api.ecr":{endpoint:"ecr-fips.{region}.amazonaws.com"},"fips.api.sagemaker":{endpoint:"api-fips.sagemaker.{region}.amazonaws.com"},"fips.models.lex":{endpoint:"models-fips.lex.{region}.amazonaws.com"},"fips.runtime.lex":{endpoint:"runtime-fips.lex.{region}.amazonaws.com"},fipsWithServiceOnly:{endpoint:"{service}.{region}.amazonaws.com"},dualstackLegacy:{endpoint:"{service}.dualstack.{region}.amazonaws.com"},dualstackLegacyCn:{endpoint:"{service}.dualstack.{region}.amazonaws.com.cn"},dualstackFipsLegacy:{endpoint:"{service}-fips.dualstack.{region}.amazonaws.com"},dualstackFipsLegacyCn:{endpoint:"{service}-fips.dualstack.{region}.amazonaws.com.cn"},dualstackLegacyEc2:{endpoint:"api.ec2.{region}.aws"},dualstackByDefault:{endpoint:"{service}.{region}.api.aws"},fipsDualstackByDefault:{endpoint:"{service}-fips.{region}.api.aws"},globalDualstackByDefault:{endpoint:"{service}.global.api.aws"},fipsGlobalDualstackByDefault:{endpoint:"{service}-fips.global.api.aws"}}}});var Fse=g((Qer,Lse)=>{var qpt=jr(),u0=Dse();function Ppt(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}function kpt(e){var t=e.config.region,r=Ppt(t),n=e.api.endpointPrefix;return[[t,n],[r,n],[t,"*"],[r,"*"],["*",n],[t,"internal-*"],["*","*"]].map(function(i){return i[0]&&i[1]?i.join("/"):null})}function Dpt(e,t){qpt.each(t,function(r,n){r!=="globalEndpoint"&&(e.config[r]===void 0||e.config[r]===null)&&(e.config[r]=n)})}function Lpt(e){for(var t=kpt(e),r=e.config.useFipsEndpoint,n=e.config.useDualstackEndpoint,i=0;i<t.length;i++){var s=t[i];if(s){var o=r?n?u0.dualstackFipsRules:u0.fipsRules:n?u0.dualstackRules:u0.rules;if(Object.prototype.hasOwnProperty.call(o,s)){var a=o[s];typeof a=="string"&&(a=u0.patterns[a]),e.isGlobalEndpoint=!!a.globalEndpoint,a.signingRegion&&(e.signingRegion=a.signingRegion),a.signatureVersion||(a.signatureVersion="v4");var u=(e.api&&e.api.signatureVersion)==="bearer";Dpt(e,Object.assign({},a,{signatureVersion:u?"bearer":a.signatureVersion}));return}}}}function Fpt(e){for(var t={"^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$":"amazonaws.com","^cn\\-\\w+\\-\\d+$":"amazonaws.com.cn","^us\\-gov\\-\\w+\\-\\d+$":"amazonaws.com","^us\\-iso\\-\\w+\\-\\d+$":"c2s.ic.gov","^us\\-isob\\-\\w+\\-\\d+$":"sc2s.sgov.gov"},r="amazonaws.com",n=Object.keys(t),i=0;i<n.length;i++){var s=RegExp(n[i]),o=t[n[i]];if(s.test(e))return o}return r}Lse.exports={configureEndpoint:Lpt,getEndpointSuffix:Fpt}});var yk=g((etr,Mse)=>{function Mpt(e){return typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips"))}function Bpt(e){return typeof e=="string"&&["aws-global","aws-us-gov-global"].includes(e)}function jpt(e){return["fips-aws-global","aws-fips","aws-global"].includes(e)?"us-east-1":["fips-aws-us-gov-global","aws-us-gov-global"].includes(e)?"us-gov-west-1":e.replace(/fips-(dkr-|prod-)?|-fips/,"")}Mse.exports={isFipsRegion:Mpt,isGlobalRegion:Bpt,getRealRegion:jpt}});var jse=g((ttr,Bse)=>{var Oe=Re(),Upt=mk(),Hpt=Fse(),_k=Oe.util.inherit,zpt=0,Kw=yk();Oe.Service=_k({constructor:function(t){if(!this.loadServiceClass)throw Oe.util.error(new Error,"Service must be constructed with `new' operator");if(t){if(t.region){var r=t.region;Kw.isFipsRegion(r)&&(t.region=Kw.getRealRegion(r),t.useFipsEndpoint=!0),Kw.isGlobalRegion(r)&&(t.region=Kw.getRealRegion(r))}typeof t.useDualstack=="boolean"&&typeof t.useDualstackEndpoint!="boolean"&&(t.useDualstackEndpoint=t.useDualstack)}var n=this.loadServiceClass(t||{});if(n){var i=Oe.util.copy(t),s=new n(t);return Object.defineProperty(s,"_originalConfig",{get:function(){return i},enumerable:!1,configurable:!0}),s._clientId=++zpt,s}this.initialize(t)},initialize:function(t){var r=Oe.config[this.serviceIdentifier];if(this.config=new Oe.Config(Oe.config),r&&this.config.update(r,!0),t&&this.config.update(t,!0),this.validateService(),this.config.endpoint||Hpt.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),Oe.SequentialExecutor.call(this),Oe.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||Oe.Service._clientSideMonitoring)&&this.publisher){var n=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",function(s){process.nextTick(function(){n.eventHandler(s)})}),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",function(s){process.nextTick(function(){n.eventHandler(s)})})}},validateService:function(){},loadServiceClass:function(t){var r=t;if(Oe.util.isEmpty(this.api)){if(r.apiConfig)return Oe.Service.defineServiceApi(this.constructor,r.apiConfig);if(this.constructor.services){r=new Oe.Config(Oe.config),r.update(t,!0);var n=r.apiVersions[this.constructor.serviceIdentifier];return n=n||r.apiVersion,this.getLatestServiceClass(n)}else return null}else return null},getLatestServiceClass:function(t){return t=this.getLatestServiceVersion(t),this.constructor.services[t]===null&&Oe.Service.defineServiceApi(this.constructor,t),this.constructor.services[t]},getLatestServiceVersion:function(t){if(!this.constructor.services||this.constructor.services.length===0)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(t?Oe.util.isType(t,Date)&&(t=Oe.util.date.iso8601(t).split("T")[0]):t="latest",Object.hasOwnProperty(this.constructor.services,t))return t;for(var r=Object.keys(this.constructor.services).sort(),n=null,i=r.length-1;i>=0;i--)if(r[i][r[i].length-1]!=="*"&&(n=r[i]),r[i].substr(0,10)<=t)return n;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+t+"'")},api:{},defaultRetryCount:3,customizeRequests:function(t){if(!t)this.customRequestHandler=null;else if(typeof t=="function")this.customRequestHandler=t;else throw new Error("Invalid callback type '"+typeof t+"' provided in customizeRequests")},makeRequest:function(t,r,n){if(typeof r=="function"&&(n=r,r=null),r=r||{},this.config.params){var i=this.api.operations[t];i&&(r=Oe.util.copy(r),Oe.util.each(this.config.params,function(o,a){i.input.members[o]&&(r[o]===void 0||r[o]===null)&&(r[o]=a)}))}var s=new Oe.Request(this,t,r);return this.addAllRequestListeners(s),this.attachMonitoringEmitter(s),n&&s.send(n),s},makeUnauthenticatedRequest:function(t,r,n){typeof r=="function"&&(n=r,r={});var i=this.makeRequest(t,r).toUnauthenticated();return n?i.send(n):i},waitFor:function(t,r,n){var i=new Oe.ResourceWaiter(this,t);return i.wait(r,n)},addAllRequestListeners:function(t){for(var r=[Oe.events,Oe.EventListeners.Core,this.serviceInterface(),Oe.EventListeners.CorePost],n=0;n<r.length;n++)r[n]&&t.addListeners(r[n]);this.config.paramValidation||t.removeListener("validate",Oe.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&t.addListeners(Oe.EventListeners.Logger),this.setupRequestListeners(t),typeof this.constructor.prototype.customRequestHandler=="function"&&this.constructor.prototype.customRequestHandler(t),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&typeof this.customRequestHandler=="function"&&this.customRequestHandler(t)},apiCallEvent:function(t){var r=t.service.api.operations[t.operation],n={Type:"ApiCall",Api:r?r.name:t.operation,Version:1,Service:t.service.api.serviceId||t.service.api.endpointPrefix,Region:t.httpRequest.region,MaxRetriesExceeded:0,UserAgent:t.httpRequest.getUserAgent()},i=t.response;if(i.httpResponse.statusCode&&(n.FinalHttpStatusCode=i.httpResponse.statusCode),i.error){var s=i.error,o=i.httpResponse.statusCode;o>299?(s.code&&(n.FinalAwsException=s.code),s.message&&(n.FinalAwsExceptionMessage=s.message)):((s.code||s.name)&&(n.FinalSdkException=s.code||s.name),s.message&&(n.FinalSdkExceptionMessage=s.message))}return n},apiAttemptEvent:function(t){var r=t.service.api.operations[t.operation],n={Type:"ApiCallAttempt",Api:r?r.name:t.operation,Version:1,Service:t.service.api.serviceId||t.service.api.endpointPrefix,Fqdn:t.httpRequest.endpoint.hostname,UserAgent:t.httpRequest.getUserAgent()},i=t.response;return i.httpResponse.statusCode&&(n.HttpStatusCode=i.httpResponse.statusCode),!t._unAuthenticated&&t.service.config.credentials&&t.service.config.credentials.accessKeyId&&(n.AccessKey=t.service.config.credentials.accessKeyId),i.httpResponse.headers&&(t.httpRequest.headers["x-amz-security-token"]&&(n.SessionToken=t.httpRequest.headers["x-amz-security-token"]),i.httpResponse.headers["x-amzn-requestid"]&&(n.XAmznRequestId=i.httpResponse.headers["x-amzn-requestid"]),i.httpResponse.headers["x-amz-request-id"]&&(n.XAmzRequestId=i.httpResponse.headers["x-amz-request-id"]),i.httpResponse.headers["x-amz-id-2"]&&(n.XAmzId2=i.httpResponse.headers["x-amz-id-2"])),n},attemptFailEvent:function(t){var r=this.apiAttemptEvent(t),n=t.response,i=n.error;return n.httpResponse.statusCode>299?(i.code&&(r.AwsException=i.code),i.message&&(r.AwsExceptionMessage=i.message)):((i.code||i.name)&&(r.SdkException=i.code||i.name),i.message&&(r.SdkExceptionMessage=i.message)),r},attachMonitoringEmitter:function(t){var r,n,i,s,o=0,a,u,c=this,f=!0;t.on("validate",function(){s=Oe.util.realClock.now(),u=Date.now()},f),t.on("sign",function(){n=Oe.util.realClock.now(),r=Date.now(),a=t.httpRequest.region,o++},f),t.on("validateResponse",function(){i=Math.round(Oe.util.realClock.now()-n)}),t.addNamedListener("API_CALL_ATTEMPT","success",function(){var d=c.apiAttemptEvent(t);d.Timestamp=r,d.AttemptLatency=i>=0?i:0,d.Region=a,c.emit("apiCallAttempt",[d])}),t.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var d=c.attemptFailEvent(t);d.Timestamp=r,i=i||Math.round(Oe.util.realClock.now()-n),d.AttemptLatency=i>=0?i:0,d.Region=a,c.emit("apiCallAttempt",[d])}),t.addNamedListener("API_CALL","complete",function(){var d=c.apiCallEvent(t);if(d.AttemptCount=o,!(d.AttemptCount<=0)){d.Timestamp=u;var m=Math.round(Oe.util.realClock.now()-s);d.Latency=m>=0?m:0;var v=t.response;v.error&&v.error.retryable&&typeof v.retryCount=="number"&&typeof v.maxRetries=="number"&&v.retryCount>=v.maxRetries&&(d.MaxRetriesExceeded=1),c.emit("apiCall",[d])}})},setupRequestListeners:function(t){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(t){var r,n=null,i="";if(t){var s=t.service.api.operations||{};n=s[t.operation]||null,i=n?n.authtype:""}return this.config.signatureVersion?r=this.config.signatureVersion:i==="v4"||i==="v4-unsigned-body"?r="v4":i==="bearer"?r="bearer":r=this.api.signatureVersion,Oe.Signers.RequestSigner.getVersion(r)},serviceInterface:function(){switch(this.api.protocol){case"ec2":return Oe.EventListeners.Query;case"query":return Oe.EventListeners.Query;case"json":return Oe.EventListeners.Json;case"rest-json":return Oe.EventListeners.RestJson;case"rest-xml":return Oe.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(t){return t.httpResponse.statusCode<300},numRetries:function(){return this.config.maxRetries!==void 0?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(t,r){return Oe.util.calculateRetryDelay(t,this.config.retryDelayOptions,r)},retryableError:function(t){return!!(this.timeoutError(t)||this.networkingError(t)||this.expiredCredentialsError(t)||this.throttledError(t)||t.statusCode>=500)},networkingError:function(t){return t.code==="NetworkingError"},timeoutError:function(t){return t.code==="TimeoutError"},expiredCredentialsError:function(t){return t.code==="ExpiredTokenException"},clockSkewError:function(t){switch(t.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(t){t&&(this.config.systemClockOffset=t-Date.now())},isClockSkewed:function(t){if(t)return Math.abs(this.getSkewCorrectedDate().getTime()-t)>=3e5},throttledError:function(t){if(t.statusCode===429)return!0;switch(t.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(t){if(typeof t!="string")return t;var r=t;return r=r.replace(/\{service\}/g,this.api.endpointPrefix),r=r.replace(/\{region\}/g,this.config.region),r=r.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http"),r},setEndpoint:function(t){this.endpoint=new Oe.Endpoint(t,this.config)},paginationConfig:function(t,r){var n=this.api.operations[t].paginator;if(!n){if(r){var i=new Error;throw Oe.util.error(i,"No pagination configuration for "+t)}return null}return n}});Oe.util.update(Oe.Service,{defineMethods:function(t){Oe.util.each(t.prototype.api.operations,function(n){if(!t.prototype[n]){var i=t.prototype.api.operations[n];i.authtype==="none"?t.prototype[n]=function(s,o){return this.makeUnauthenticatedRequest(n,s,o)}:t.prototype[n]=function(s,o){return this.makeRequest(n,s,o)}}})},defineService:function(t,r,n){Oe.Service._serviceMap[t]=!0,Array.isArray(r)||(n=r,r=[]);var i=_k(Oe.Service,n||{});if(typeof t=="string"){Oe.Service.addVersions(i,r);var s=i.serviceIdentifier||t;i.serviceIdentifier=s}else i.prototype.api=t,Oe.Service.defineMethods(i);if(Oe.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&Oe.util.clientSideMonitoring){var o=Oe.util.clientSideMonitoring.Publisher,a=Oe.util.clientSideMonitoring.configProvider,u=a();this.prototype.publisher=new o(u),u.enabled&&(Oe.Service._clientSideMonitoring=!0)}return Oe.SequentialExecutor.call(i.prototype),Oe.Service.addDefaultMonitoringListeners(i.prototype),i},addVersions:function(t,r){Array.isArray(r)||(r=[r]),t.services=t.services||{};for(var n=0;n<r.length;n++)t.services[r[n]]===void 0&&(t.services[r[n]]=null);t.apiVersions=Object.keys(t.services).sort()},defineServiceApi:function(t,r,n){var i=_k(t,{serviceIdentifier:t.serviceIdentifier});function s(o){o.isApi?i.prototype.api=o:i.prototype.api=new Upt(o,{serviceIdentifier:t.serviceIdentifier})}if(typeof r=="string"){if(n)s(n);else try{s(Oe.apiLoader(t.serviceIdentifier,r))}catch(o){throw Oe.util.error(o,{message:"Could not find API configuration "+t.serviceIdentifier+"-"+r})}Object.prototype.hasOwnProperty.call(t.services,r)||(t.apiVersions=t.apiVersions.concat(r).sort()),t.services[r]=i}else s(r);return Oe.Service.defineMethods(i),i},hasService:function(e){return Object.prototype.hasOwnProperty.call(Oe.Service._serviceMap,e)},addDefaultMonitoringListeners:function(t){t.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",function(n){var i=Object.getPrototypeOf(t);i._events&&i.emit("apiCallAttempt",[n])}),t.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",function(n){var i=Object.getPrototypeOf(t);i._events&&i.emit("apiCall",[n])})},_serviceMap:{}});Oe.util.mixin(Oe.Service,Oe.SequentialExecutor);Bse.exports=Oe.Service});var bk=g(()=>{var Ps=Re();Ps.Credentials=Ps.util.inherit({constructor:function(){if(Ps.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],arguments.length===1&&typeof arguments[0]=="object"){var t=arguments[0].credentials||arguments[0];this.accessKeyId=t.accessKeyId,this.secretAccessKey=t.secretAccessKey,this.sessionToken=t.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var t=Ps.util.date.getDate().getTime(),r=new Date(t+this.expiryWindow*1e3);return this.expireTime&&r>this.expireTime?!0:this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(t){var r=this;this.needsRefresh()?this.refresh(function(n){n||(r.expired=!1),t&&t(n)}):t&&t()},refresh:function(t){this.expired=!1,t()},coalesceRefresh:function(t,r){var n=this;n.refreshCallbacks.push(t)===1&&n.load(function(s){Ps.util.arrayEach(n.refreshCallbacks,function(o){r?o(s):Ps.util.defer(function(){o(s)})}),n.refreshCallbacks.length=0})},load:function(t){t()}});Ps.Credentials.addPromisesToClass=function(t){this.prototype.getPromise=Ps.util.promisifyMethod("get",t),this.prototype.refreshPromise=Ps.util.promisifyMethod("refresh",t)};Ps.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise};Ps.util.addPromises(Ps.Credentials)});var wk=g(()=>{var lo=Re();lo.CredentialProviderChain=lo.util.inherit(lo.Credentials,{constructor:function(t){t?this.providers=t:this.providers=lo.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(t){var r=this;if(r.providers.length===0)return t(new Error("No providers")),r;if(r.resolveCallbacks.push(t)===1){let o=function(a,u){if(!a&&u||n===i.length){lo.util.arrayEach(r.resolveCallbacks,function(f){f(a,u)}),r.resolveCallbacks.length=0;return}var c=i[n++];typeof c=="function"?u=c.call():u=c,u.get?u.get(function(f){o(f,f?null:u)}):o(null,u)};var s=o,n=0,i=r.providers.slice(0);o()}return r}});lo.CredentialProviderChain.defaultProviders=[];lo.CredentialProviderChain.addPromisesToClass=function(t){this.prototype.resolvePromise=lo.util.promisifyMethod("resolve",t)};lo.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise};lo.util.addPromises(lo.CredentialProviderChain)});var Use=g(()=>{var gr=Re();bk();wk();var Xw;gr.Config=gr.util.inherit({constructor:function(t){t===void 0&&(t={}),t=this.extractCredentials(t),gr.util.each.call(this,this.keys,function(r,n){this.set(r,t[r],n)})},getCredentials:function(t){var r=this;function n(a){t(a,a?null:r.credentials)}function i(a,u){return new gr.util.error(u||new Error,{code:"CredentialsError",message:a,name:"CredentialsError"})}function s(){r.credentials.get(function(a){if(a){var u="Could not load credentials from "+r.credentials.constructor.name;a=i(u,a)}n(a)})}function o(){var a=null;(!r.credentials.accessKeyId||!r.credentials.secretAccessKey)&&(a=i("Missing credentials")),n(a)}r.credentials?typeof r.credentials.get=="function"?s():o():r.credentialProvider?r.credentialProvider.resolve(function(a,u){a&&(a=i("Could not load credentials from any providers",a)),r.credentials=u,n(a)}):n(i("No credentials to load"))},getToken:function(t){var r=this;function n(a){t(a,a?null:r.token)}function i(a,u){return new gr.util.error(u||new Error,{code:"TokenError",message:a,name:"TokenError"})}function s(){r.token.get(function(a){if(a){var u="Could not load token from "+r.token.constructor.name;a=i(u,a)}n(a)})}function o(){var a=null;r.token.token||(a=i("Missing token")),n(a)}r.token?typeof r.token.get=="function"?s():o():r.tokenProvider?r.tokenProvider.resolve(function(a,u){a&&(a=i("Could not load token from any providers",a)),r.token=u,n(a)}):n(i("No token to load"))},update:function(t,r){r=r||!1,t=this.extractCredentials(t),gr.util.each.call(this,t,function(n,i){(r||Object.prototype.hasOwnProperty.call(this.keys,n)||gr.Service.hasService(n))&&this.set(n,i)})},loadFromPath:function(t){this.clear();var r=JSON.parse(gr.util.readFileSync(t)),n=new gr.FileSystemCredentials(t),i=new gr.CredentialProviderChain;return i.providers.unshift(n),i.resolve(function(s,o){if(s)throw s;r.credentials=o}),this.constructor(r),this},clear:function(){gr.util.each.call(this,this.keys,function(t){delete this[t]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(t,r,n){r===void 0?(n===void 0&&(n=this.keys[t]),typeof n=="function"?this[t]=n.call(this):this[t]=n):t==="httpOptions"&&this[t]?this[t]=gr.util.merge(this[t],r):this[t]=r},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy",useFipsEndpoint:!1,useDualstackEndpoint:!1,token:null},extractCredentials:function(t){return t.accessKeyId&&t.secretAccessKey&&(t=gr.util.copy(t),t.credentials=new gr.Credentials(t)),t},setPromisesDependency:function(t){Xw=t,t===null&&typeof Promise=="function"&&(Xw=Promise);var r=[gr.Request,gr.Credentials,gr.CredentialProviderChain];gr.S3&&(r.push(gr.S3),gr.S3.ManagedUpload&&r.push(gr.S3.ManagedUpload)),gr.util.addPromises(r,Xw)},getPromisesDependency:function(){return Xw}});gr.config=new gr.Config});var Jw=g(()=>{var kn=Re(),Yw=kn.util.inherit;kn.Endpoint=Yw({constructor:function(t,r){if(kn.util.hideProperties(this,["slashes","auth","hash","search","query"]),typeof t>"u"||t===null)throw new Error("Invalid endpoint: "+t);if(typeof t!="string")return kn.util.copy(t);if(!t.match(/^http/)){var n=r&&r.sslEnabled!==void 0?r.sslEnabled:kn.config.sslEnabled;t=(n?"https":"http")+"://"+t}kn.util.update(this,kn.util.urlParse(t)),this.port?this.port=parseInt(this.port,10):this.port=this.protocol==="https:"?443:80}});kn.HttpRequest=Yw({constructor:function(t,r){t=new kn.Endpoint(t),this.method="POST",this.path=t.path||"/",this.headers={},this.body="",this.endpoint=t,this.region=r,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=kn.util.userAgent()},getUserAgentHeaderName:function(){var t=kn.util.isBrowser()?"X-Amz-":"";return t+"User-Agent"},appendToUserAgent:function(t){typeof t=="string"&&t&&(this._userAgent+=" "+t),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var t=this.path.split("?",2)[1];return t?(t=kn.util.queryStringParse(t),kn.util.queryParamsToString(t)):""},updateEndpoint:function(t){var r=new kn.Endpoint(t);this.endpoint=r,this.path=r.path||"/",this.headers.Host&&(this.headers.Host=r.host)}});kn.HttpResponse=Yw({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}});kn.HttpClient=Yw({});kn.HttpClient.getInstance=function(){return this.singleton===void 0&&(this.singleton=new this),this.singleton}});var Xse=g((ltr,Kse)=>{var un=Re(),Zi=jr(),Hse=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function Zw(e){var t=e.service,r=t.api||{},n=r.operations,i={};return t.config.region&&(i.region=t.config.region),r.serviceId&&(i.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(i.accessKeyId=t.config.credentials.accessKeyId),i}function $se(e,t,r){!r||t===void 0||t===null||r.type==="structure"&&r.required&&r.required.length>0&&Zi.arrayEach(r.required,function(n){var i=r.members[n];if(i.endpointDiscoveryId===!0){var s=i.isLocationName?i.name:n;e[s]=String(t[n])}else $se(e,t[n],i)})}function Qw(e,t){var r={};return $se(r,e.params,t),r}function Wse(e){var t=e.service,r=t.api,n=r.operations?r.operations[e.operation]:void 0,i=n?n.input:void 0,s=Qw(e,i),o=Zw(e);Object.keys(s).length>0&&(o=Zi.update(o,s),n&&(o.operation=n.name));var a=un.endpointCache.get(o);if(!(a&&a.length===1&&a[0].Address===""))if(a&&a.length>0)e.httpRequest.updateEndpoint(a[0].Address);else{var u=t.makeRequest(r.endpointOperation,{Operation:n.name,Identifiers:s});Vse(u),u.removeListener("validate",un.EventListeners.Core.VALIDATE_PARAMETERS),u.removeListener("retry",un.EventListeners.Core.RETRY_CHECK),un.endpointCache.put(o,[{Address:"",CachePeriodInMinutes:1}]),u.send(function(c,f){f&&f.Endpoints?un.endpointCache.put(o,f.Endpoints):c&&un.endpointCache.put(o,[{Address:"",CachePeriodInMinutes:1}])})}}var Ga={};function Gse(e,t){var r=e.service,n=r.api,i=n.operations?n.operations[e.operation]:void 0,s=i?i.input:void 0,o=Qw(e,s),a=Zw(e);Object.keys(o).length>0&&(a=Zi.update(a,o),i&&(a.operation=i.name));var u=un.EndpointCache.getKeyString(a),c=un.endpointCache.get(u);if(c&&c.length===1&&c[0].Address===""){Ga[u]||(Ga[u]=[]),Ga[u].push({request:e,callback:t});return}else if(c&&c.length>0)e.httpRequest.updateEndpoint(c[0].Address),t();else{var f=r.makeRequest(n.endpointOperation,{Operation:i.name,Identifiers:o});f.removeListener("validate",un.EventListeners.Core.VALIDATE_PARAMETERS),Vse(f),un.endpointCache.put(u,[{Address:"",CachePeriodInMinutes:60}]),f.send(function(p,d){if(p){if(e.response.error=Zi.error(p,{retryable:!1}),un.endpointCache.remove(a),Ga[u]){var m=Ga[u];Zi.arrayEach(m,function(v){v.request.response.error=Zi.error(p,{retryable:!1}),v.callback()}),delete Ga[u]}}else if(d&&(un.endpointCache.put(u,d.Endpoints),e.httpRequest.updateEndpoint(d.Endpoints[0].Address),Ga[u])){var m=Ga[u];Zi.arrayEach(m,function(_){_.request.httpRequest.updateEndpoint(d.Endpoints[0].Address),_.callback()}),delete Ga[u]}t()})}}function Vse(e){var t=e.service.api,r=t.apiVersion;r&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=r)}function Ek(e){var t=e.error,r=e.httpResponse;if(t&&(t.code==="InvalidEndpointException"||r.statusCode===421)){var n=e.request,i=n.service.api.operations||{},s=i[n.operation]?i[n.operation].input:void 0,o=Qw(n,s),a=Zw(n);Object.keys(o).length>0&&(a=Zi.update(a,o),i[n.operation]&&(a.operation=i[n.operation].name)),un.endpointCache.remove(a)}}function $pt(e){if(e._originalConfig&&e._originalConfig.endpoint&&e._originalConfig.endpointDiscoveryEnabled===!0)throw Zi.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=un.config[e.serviceIdentifier]||{};return!!(un.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}function zse(e){return["false","0"].indexOf(e)>=0}function Wpt(e){var t=e.service||{};if(t.config.endpointDiscoveryEnabled!==void 0)return t.config.endpointDiscoveryEnabled;if(!Zi.isBrowser()){for(var r=0;r<Hse.length;r++){var n=Hse[r];if(Object.prototype.hasOwnProperty.call(process.env,n)){if(process.env[n]===""||process.env[n]===void 0)throw Zi.error(new Error,{code:"ConfigurationException",message:"environmental variable "+n+" cannot be set to nothing"});return!zse(process.env[n])}}var i={};try{i=un.util.iniLoader?un.util.iniLoader.loadFrom({isConfig:!0,filename:process.env[un.util.sharedConfigFileEnv]}):{}}catch{}var s=i[process.env.AWS_PROFILE||un.util.defaultProfile]||{};if(Object.prototype.hasOwnProperty.call(s,"endpoint_discovery_enabled")){if(s.endpoint_discovery_enabled===void 0)throw Zi.error(new Error,{code:"ConfigurationException",message:"config file entry 'endpoint_discovery_enabled' cannot be set to nothing"});return!zse(s.endpoint_discovery_enabled)}}}function Gpt(e,t){var r=e.service||{};if($pt(r)||e.isPresigned())return t();var n=r.api.operations||{},i=n[e.operation],s=i?i.endpointDiscoveryRequired:"NULL",o=Wpt(e),a=r.api.hasRequiredEndpointDiscovery;switch((o||a)&&e.httpRequest.appendToUserAgent("endpoint-discovery"),s){case"OPTIONAL":(o||a)&&(Wse(e),e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",Ek)),t();break;case"REQUIRED":if(o===!1){e.response.error=Zi.error(new Error,{code:"ConfigurationException",message:"Endpoint Discovery is disabled but "+r.api.className+"."+e.operation+"() requires it. Please check your configurations."}),t();break}e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",Ek),Gse(e,t);break;case"NULL":default:t();break}}Kse.exports={discoverEndpoint:Gpt,requiredDiscoverEndpoint:Gse,optionalDiscoverEndpoint:Wse,marshallCustomIdentifiers:Qw,getCacheKey:Zw,invalidateCachedEndpoint:Ek}});var Zse=g(()=>{var gt=Re(),gc=xk(),Vpt=Xse().discoverEndpoint;gt.EventListeners={Core:{}};function Jse(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}function Yse(e){var t=e.service;return t.config.signatureVersion?t.config.signatureVersion:t.api.signatureVersion?t.api.signatureVersion:Jse(e)}gt.EventListeners={Core:new gc().addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(i,s){if(!i.service.api.signatureVersion&&!i.service.config.signatureVersion)return s();var o=Yse(i);if(o==="bearer"){i.service.config.getToken(function(a){a&&(i.response.error=gt.util.error(a,{code:"TokenError"})),s()});return}i.service.config.getCredentials(function(a){a&&(i.response.error=gt.util.error(a,{code:"CredentialsError",message:"Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1"})),s()})}),e("VALIDATE_REGION","validate",function(i){if(!i.service.isGlobalEndpoint){var s=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);i.service.config.region?s.test(i.service.config.region)||(i.response.error=gt.util.error(new Error,{code:"ConfigError",message:"Invalid region in config"})):i.response.error=gt.util.error(new Error,{code:"ConfigError",message:"Missing region in config"})}}),e("BUILD_IDEMPOTENCY_TOKENS","validate",function(i){if(i.service.api.operations){var s=i.service.api.operations[i.operation];if(s){var o=s.idempotentMembers;if(o.length){for(var a=gt.util.copy(i.params),u=0,c=o.length;u<c;u++)a[o[u]]||(a[o[u]]=gt.util.uuid.v4());i.params=a}}}}),e("VALIDATE_PARAMETERS","validate",function(i){if(i.service.api.operations){var s=i.service.api.operations[i.operation].input,o=i.service.config.paramValidation;new gt.ParamValidator(o).validate(s,i.params)}}),e("COMPUTE_CHECKSUM","afterBuild",function(i){if(i.service.api.operations){var s=i.service.api.operations[i.operation];if(s){var o=i.httpRequest.body,a=o&&(gt.util.Buffer.isBuffer(o)||typeof o=="string"),u=i.httpRequest.headers;if(s.httpChecksumRequired&&i.service.config.computeChecksums&&a&&!u["Content-MD5"]){var c=gt.util.crypto.md5(o,"base64");u["Content-MD5"]=c}}}}),t("COMPUTE_SHA256","afterBuild",function(i,s){if(i.haltHandlersOnError(),!!i.service.api.operations){var o=i.service.api.operations[i.operation],a=o?o.authtype:"";if(!i.service.api.signatureVersion&&!a&&!i.service.config.signatureVersion)return s();if(i.service.getSignerClass(i)===gt.Signers.V4){var u=i.httpRequest.body||"";if(a.indexOf("unsigned-body")>=0)return i.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",s();gt.util.computeSha256(u,function(c,f){c?s(c):(i.httpRequest.headers["X-Amz-Content-Sha256"]=f,s())})}else s()}}),e("SET_CONTENT_LENGTH","afterBuild",function(i){var s=Jse(i),o=gt.util.getRequestPayloadShape(i);if(i.httpRequest.headers["Content-Length"]===void 0)try{var a=gt.util.string.byteLength(i.httpRequest.body);i.httpRequest.headers["Content-Length"]=a}catch(u){if(o&&o.isStreaming){if(o.requiresLength)throw u;if(s.indexOf("unsigned-body")>=0){i.httpRequest.headers["Transfer-Encoding"]="chunked";return}else throw u}throw u}}),e("SET_HTTP_HOST","afterBuild",function(i){i.httpRequest.headers.Host=i.httpRequest.endpoint.host}),e("SET_TRACE_ID","afterBuild",function(i){var s="X-Amzn-Trace-Id";if(gt.util.isNode()&&!Object.hasOwnProperty.call(i.httpRequest.headers,s)){var o="AWS_LAMBDA_FUNCTION_NAME",a="_X_AMZN_TRACE_ID",u=process.env[o],c=process.env[a];typeof u=="string"&&u.length>0&&typeof c=="string"&&c.length>0&&(i.httpRequest.headers[s]=c)}}),e("RESTART","restart",function(){var i=this.response.error;!i||!i.retryable||(this.httpRequest=new gt.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)});var r=!0;t("DISCOVER_ENDPOINT","sign",Vpt,r),t("SIGN","sign",function(i,s){var o=i.service,a=Yse(i);if(!a||a.length===0)return s();a==="bearer"?o.config.getToken(function(u,c){if(u)return i.response.error=u,s();try{var f=o.getSignerClass(i),p=new f(i.httpRequest);p.addAuthorization(c)}catch(d){i.response.error=d}s()}):o.config.getCredentials(function(u,c){if(u)return i.response.error=u,s();try{var f=o.getSkewCorrectedDate(),p=o.getSignerClass(i),d=i.service.api.operations||{},m=d[i.operation],v=new p(i.httpRequest,o.getSigningName(i),{signatureCache:o.config.signatureCache,operation:m,signatureVersion:o.api.signatureVersion});v.setServiceClientId(o._clientId),delete i.httpRequest.headers.Authorization,delete i.httpRequest.headers.Date,delete i.httpRequest.headers["X-Amz-Date"],v.addAuthorization(c,f),i.signedAt=f}catch(_){i.response.error=_}s()})}),e("VALIDATE_RESPONSE","validateResponse",function(i){this.service.successfulResponse(i,this)?(i.data={},i.error=null):(i.data=null,i.error=gt.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),e("ERROR","error",function(i,s){var o=s.request.service.api.awsQueryCompatible;if(o){var a=s.httpResponse.headers,u=a?a["x-amzn-query-error"]:void 0;u&&u.includes(";")&&(s.error.code=u.split(";")[0])}},!0),t("SEND","send",function(i,s){i.httpResponse._abortCallback=s,i.error=null,i.data=null;function o(p){i.httpResponse.stream=p;var d=i.request.httpRequest.stream,m=i.request.service,v=m.api,_=i.request.operation,b=v.operations[_]||{};p.on("headers",function(T,S,E){if(i.request.emit("httpHeaders",[T,S,i,E]),!i.httpResponse.streaming)if(gt.HttpClient.streamsApiVersion===2){if(b.hasEventOutput&&m.successfulResponse(i)){i.request.emit("httpDone"),s();return}p.on("readable",function(){var I=p.read();I!==null&&i.request.emit("httpData",[I,i])})}else p.on("data",function(I){i.request.emit("httpData",[I,i])})}),p.on("end",function(){if(!d||!d.didCallback){if(gt.HttpClient.streamsApiVersion===2&&b.hasEventOutput&&m.successfulResponse(i))return;i.request.emit("httpDone"),s()}})}function a(p){p.on("sendProgress",function(m){i.request.emit("httpUploadProgress",[m,i])}),p.on("receiveProgress",function(m){i.request.emit("httpDownloadProgress",[m,i])})}function u(p){if(p.code!=="RequestAbortedError"){var d=p.code==="TimeoutError"?p.code:"NetworkingError";p=gt.util.error(p,{code:d,region:i.request.httpRequest.region,hostname:i.request.httpRequest.endpoint.hostname,retryable:!0})}i.error=p,i.request.emit("httpError",[i.error,i],function(){s()})}function c(){var p=gt.HttpClient.getInstance(),d=i.request.service.config.httpOptions||{};try{var m=p.handleRequest(i.request.httpRequest,d,o,u);a(m)}catch(v){u(v)}}var f=(i.request.service.getSkewCorrectedDate()-this.signedAt)/1e3;f>=60*10?this.emit("sign",[this],function(p){p?s(p):c()}):c()}),e("HTTP_HEADERS","httpHeaders",function(i,s,o,a){o.httpResponse.statusCode=i,o.httpResponse.statusMessage=a,o.httpResponse.headers=s,o.httpResponse.body=gt.util.buffer.toBuffer(""),o.httpResponse.buffers=[],o.httpResponse.numBytes=0;var u=s.date||s.Date,c=o.request.service;if(u){var f=Date.parse(u);c.config.correctClockSkew&&c.isClockSkewed(f)&&c.applyClockOffset(f)}}),e("HTTP_DATA","httpData",function(i,s){if(i){if(gt.util.isNode()){s.httpResponse.numBytes+=i.length;var o=s.httpResponse.headers["content-length"],a={loaded:s.httpResponse.numBytes,total:o};s.request.emit("httpDownloadProgress",[a,s])}s.httpResponse.buffers.push(gt.util.buffer.toBuffer(i))}}),e("HTTP_DONE","httpDone",function(i){if(i.httpResponse.buffers&&i.httpResponse.buffers.length>0){var s=gt.util.buffer.concat(i.httpResponse.buffers);i.httpResponse.body=s}delete i.httpResponse.numBytes,delete i.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(i){i.httpResponse.statusCode&&(i.error.statusCode=i.httpResponse.statusCode,i.error.retryable===void 0&&(i.error.retryable=this.service.retryableError(i.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(i){if(i.error)switch(i.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":i.error.retryable=!0,i.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(i){var s=i.error;s&&typeof s.code=="string"&&typeof s.message=="string"&&s.code.match(/Signature/)&&s.message.match(/expired/)&&(i.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(i){i.error&&this.service.clockSkewError(i.error)&&this.service.config.correctClockSkew&&(i.error.retryable=!0)}),e("REDIRECT","retry",function(i){i.error&&i.error.statusCode>=300&&i.error.statusCode<400&&i.httpResponse.headers.location&&(this.httpRequest.endpoint=new gt.Endpoint(i.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,i.error.redirect=!0,i.error.retryable=!0)}),e("RETRY_CHECK","retry",function(i){i.error&&(i.error.redirect&&i.redirectCount<i.maxRedirects?i.error.retryDelay=0:i.retryCount<i.maxRetries&&(i.error.retryDelay=this.service.retryDelays(i.retryCount,i.error)||0))}),t("RESET_RETRY_STATE","afterRetry",function(i,s){var o,a=!1;i.error&&(o=i.error.retryDelay||0,i.error.retryable&&i.retryCount<i.maxRetries?(i.retryCount++,a=!0):i.error.redirect&&i.redirectCount<i.maxRedirects&&(i.redirectCount++,a=!0)),a&&o>=0?(i.error=null,setTimeout(s,o)):s()})}),CorePost:new gc().addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",gt.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",gt.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(r){function n(s){return s.errno==="ENOTFOUND"||typeof s.errno=="number"&&typeof gt.util.getSystemErrorName=="function"&&["EAI_NONAME","EAI_NODATA"].indexOf(gt.util.getSystemErrorName(s.errno)>=0)}if(r.code==="NetworkingError"&&n(r)){var i="Inaccessible host: `"+r.hostname+"' at port `"+r.port+"'. This service may not be available in the `"+r.region+"' region.";this.response.error=gt.util.error(new Error(i),{code:"UnknownEndpoint",region:r.region,hostname:r.hostname,retryable:!0,originalError:r})}})}),Logger:new gc().addNamedListeners(function(e){e("LOG_REQUEST","complete",function(r){var n=r.request,i=n.service.config.logger;if(!i)return;function s(u,c){if(!c)return c;if(u.isSensitive)return"***SensitiveInformation***";switch(u.type){case"structure":var f={};return gt.util.each(c,function(m,v){Object.prototype.hasOwnProperty.call(u.members,m)?f[m]=s(u.members[m],v):f[m]=v}),f;case"list":var p=[];return gt.util.arrayEach(c,function(m,v){p.push(s(u.member,m))}),p;case"map":var d={};return gt.util.each(c,function(m,v){d[m]=s(u.value,v)}),d;default:return c}}function o(){var u=r.request.service.getSkewCorrectedDate().getTime(),c=(u-n.startTime.getTime())/1e3,f=!!i.isTTY,p=r.httpResponse.statusCode,d=n.params;if(n.service.api.operations&&n.service.api.operations[n.operation]&&n.service.api.operations[n.operation].input){var m=n.service.api.operations[n.operation].input;d=s(m,n.params)}var v=require("util").inspect(d,!0,null),_="";return f&&(_+="\x1B[33m"),_+="[AWS "+n.service.serviceIdentifier+" "+p,_+=" "+c.toString()+"s "+r.retryCount+" retries]",f&&(_+="\x1B[0;1m"),_+=" "+gt.util.string.lowerFirst(n.operation),_+="("+v+")",f&&(_+="\x1B[0m"),_}var a=o();typeof i.log=="function"?i.log(a):typeof i.write=="function"&&i.write(a+`
|
|
162
|
-
`)})}),Json:new gc().addNamedListeners(function(e){var t=Hw();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Rest:new gc().addNamedListeners(function(e){var t=r0();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestJson:new gc().addNamedListeners(function(e){var t=uk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError),e("UNSET_CONTENT_LENGTH","afterBuild",t.unsetContentLength)}),RestXml:new gc().addNamedListeners(function(e){var t=lk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Query:new gc().addNamedListeners(function(e){var t=sk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})}});var eoe=g((dtr,Qse)=>{function Sk(e,t){this.currentState=t||null,this.states=e||{}}Sk.prototype.runTo=function(t,r,n,i){typeof t=="function"&&(i=n,n=r,r=t,t=null);var s=this,o=s.states[s.currentState];o.fn.call(n||s,i,function(a){if(a)if(o.fail)s.currentState=o.fail;else return r?r.call(n,a):null;else if(o.accept)s.currentState=o.accept;else return r?r.call(n):null;if(s.currentState===t)return r?r.call(n,a):null;s.runTo(t,r,n,a)})};Sk.prototype.addState=function(t,r,n,i){return typeof r=="function"?(i=r,r=null,n=null):typeof n=="function"&&(i=n,n=null),this.currentState||(this.currentState=t),this.states[t]={accept:r,fail:n,fn:i},this};Qse.exports=Sk});var tE=g(eE=>{(function(e){"use strict";function t(k){return k!==null?Object.prototype.toString.call(k)==="[object Array]":!1}function r(k){return k!==null?Object.prototype.toString.call(k)==="[object Object]":!1}function n(k,$){if(k===$)return!0;var G=Object.prototype.toString.call(k);if(G!==Object.prototype.toString.call($))return!1;if(t(k)===!0){if(k.length!==$.length)return!1;for(var ne=0;ne<k.length;ne++)if(n(k[ne],$[ne])===!1)return!1;return!0}if(r(k)===!0){var ue={};for(var we in k)if(hasOwnProperty.call(k,we)){if(n(k[we],$[we])===!1)return!1;ue[we]=!0}for(var Ge in $)if(hasOwnProperty.call($,Ge)&&ue[Ge]!==!0)return!1;return!0}return!1}function i(k){if(k===""||k===!1||k===null)return!0;if(t(k)&&k.length===0)return!0;if(r(k)){for(var $ in k)if(k.hasOwnProperty($))return!1;return!0}else return!1}function s(k){for(var $=Object.keys(k),G=[],ne=0;ne<$.length;ne++)G.push(k[$[ne]]);return G}function o(k,$){var G={};for(var ne in k)G[ne]=k[ne];for(var ue in $)G[ue]=$[ue];return G}var a;typeof String.prototype.trimLeft=="function"?a=function(k){return k.trimLeft()}:a=function(k){return k.match(/^\s*(.*)/)[1]};var u=0,c=1,f=2,p=3,d=4,m=5,v=6,_=7,b=8,y=9,T={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},S="EOF",E="UnquotedIdentifier",C="QuotedIdentifier",I="Rbracket",q="Rparen",B="Comma",M="Colon",R="Rbrace",D="Number",N="Current",Y="Expref",oe="Pipe",H="Or",U="And",ee="EQ",Q="GT",pe="LT",ge="GTE",be="LTE",We="NE",et="Flatten",tt="Star",xt="Filter",Ne="Dot",Dr="Not",zt="Lbrace",xe="Lbracket",F="Lparen",A="Literal",Z={".":Ne,"*":tt,",":B,":":M,"{":zt,"}":R,"]":I,"(":F,")":q,"@":N},V={"<":!0,">":!0,"=":!0,"!":!0},He={" ":!0," ":!0,"\n":!0};function Fe(k){return k>="a"&&k<="z"||k>="A"&&k<="Z"||k==="_"}function $t(k){return k>="0"&&k<="9"||k==="-"}function yr(k){return k>="a"&&k<="z"||k>="A"&&k<="Z"||k>="0"&&k<="9"||k==="_"}function Gr(){}Gr.prototype={tokenize:function(k){var $=[];this._current=0;for(var G,ne,ue;this._current<k.length;)if(Fe(k[this._current]))G=this._current,ne=this._consumeUnquotedIdentifier(k),$.push({type:E,value:ne,start:G});else if(Z[k[this._current]]!==void 0)$.push({type:Z[k[this._current]],value:k[this._current],start:this._current}),this._current++;else if($t(k[this._current]))ue=this._consumeNumber(k),$.push(ue);else if(k[this._current]==="[")ue=this._consumeLBracket(k),$.push(ue);else if(k[this._current]==='"')G=this._current,ne=this._consumeQuotedIdentifier(k),$.push({type:C,value:ne,start:G});else if(k[this._current]==="'")G=this._current,ne=this._consumeRawStringLiteral(k),$.push({type:A,value:ne,start:G});else if(k[this._current]==="`"){G=this._current;var we=this._consumeLiteral(k);$.push({type:A,value:we,start:G})}else if(V[k[this._current]]!==void 0)$.push(this._consumeOperator(k));else if(He[k[this._current]]!==void 0)this._current++;else if(k[this._current]==="&")G=this._current,this._current++,k[this._current]==="&"?(this._current++,$.push({type:U,value:"&&",start:G})):$.push({type:Y,value:"&",start:G});else if(k[this._current]==="|")G=this._current,this._current++,k[this._current]==="|"?(this._current++,$.push({type:H,value:"||",start:G})):$.push({type:oe,value:"|",start:G});else{var Ge=new Error("Unknown character:"+k[this._current]);throw Ge.name="LexerError",Ge}return $},_consumeUnquotedIdentifier:function(k){var $=this._current;for(this._current++;this._current<k.length&&yr(k[this._current]);)this._current++;return k.slice($,this._current)},_consumeQuotedIdentifier:function(k){var $=this._current;this._current++;for(var G=k.length;k[this._current]!=='"'&&this._current<G;){var ne=this._current;k[ne]==="\\"&&(k[ne+1]==="\\"||k[ne+1]==='"')?ne+=2:ne++,this._current=ne}return this._current++,JSON.parse(k.slice($,this._current))},_consumeRawStringLiteral:function(k){var $=this._current;this._current++;for(var G=k.length;k[this._current]!=="'"&&this._current<G;){var ne=this._current;k[ne]==="\\"&&(k[ne+1]==="\\"||k[ne+1]==="'")?ne+=2:ne++,this._current=ne}this._current++;var ue=k.slice($+1,this._current-1);return ue.replace("\\'","'")},_consumeNumber:function(k){var $=this._current;this._current++;for(var G=k.length;$t(k[this._current])&&this._current<G;)this._current++;var ne=parseInt(k.slice($,this._current));return{type:D,value:ne,start:$}},_consumeLBracket:function(k){var $=this._current;return this._current++,k[this._current]==="?"?(this._current++,{type:xt,value:"[?",start:$}):k[this._current]==="]"?(this._current++,{type:et,value:"[]",start:$}):{type:xe,value:"[",start:$}},_consumeOperator:function(k){var $=this._current,G=k[$];if(this._current++,G==="!")return k[this._current]==="="?(this._current++,{type:We,value:"!=",start:$}):{type:Dr,value:"!",start:$};if(G==="<")return k[this._current]==="="?(this._current++,{type:be,value:"<=",start:$}):{type:pe,value:"<",start:$};if(G===">")return k[this._current]==="="?(this._current++,{type:ge,value:">=",start:$}):{type:Q,value:">",start:$};if(G==="="&&k[this._current]==="=")return this._current++,{type:ee,value:"==",start:$}},_consumeLiteral:function(k){this._current++;for(var $=this._current,G=k.length,ne;k[this._current]!=="`"&&this._current<G;){var ue=this._current;k[ue]==="\\"&&(k[ue+1]==="\\"||k[ue+1]==="`")?ue+=2:ue++,this._current=ue}var we=a(k.slice($,this._current));return we=we.replace("\\`","`"),this._looksLikeJSON(we)?ne=JSON.parse(we):ne=JSON.parse('"'+we+'"'),this._current++,ne},_looksLikeJSON:function(k){var $='[{"',G=["true","false","null"],ne="-0123456789";if(k==="")return!1;if($.indexOf(k[0])>=0)return!0;if(G.indexOf(k)>=0)return!0;if(ne.indexOf(k[0])>=0)try{return JSON.parse(k),!0}catch{return!1}else return!1}};var Ae={};Ae[S]=0,Ae[E]=0,Ae[C]=0,Ae[I]=0,Ae[q]=0,Ae[B]=0,Ae[R]=0,Ae[D]=0,Ae[N]=0,Ae[Y]=0,Ae[oe]=1,Ae[H]=2,Ae[U]=3,Ae[ee]=5,Ae[Q]=5,Ae[pe]=5,Ae[ge]=5,Ae[be]=5,Ae[We]=5,Ae[et]=9,Ae[tt]=20,Ae[xt]=21,Ae[Ne]=40,Ae[Dr]=45,Ae[zt]=50,Ae[xe]=55,Ae[F]=60;function Vt(){}Vt.prototype={parse:function(k){this._loadTokens(k),this.index=0;var $=this.expression(0);if(this._lookahead(0)!==S){var G=this._lookaheadToken(0),ne=new Error("Unexpected token type: "+G.type+", value: "+G.value);throw ne.name="ParserError",ne}return $},_loadTokens:function(k){var $=new Gr,G=$.tokenize(k);G.push({type:S,value:"",start:k.length}),this.tokens=G},expression:function(k){var $=this._lookaheadToken(0);this._advance();for(var G=this.nud($),ne=this._lookahead(0);k<Ae[ne];)this._advance(),G=this.led(ne,G),ne=this._lookahead(0);return G},_lookahead:function(k){return this.tokens[this.index+k].type},_lookaheadToken:function(k){return this.tokens[this.index+k]},_advance:function(){this.index++},nud:function(k){var $,G,ne;switch(k.type){case A:return{type:"Literal",value:k.value};case E:return{type:"Field",name:k.value};case C:var ue={type:"Field",name:k.value};if(this._lookahead(0)===F)throw new Error("Quoted identifier not allowed for function names.");return ue;case Dr:return G=this.expression(Ae.Not),{type:"NotExpression",children:[G]};case tt:return $={type:"Identity"},G=null,this._lookahead(0)===I?G={type:"Identity"}:G=this._parseProjectionRHS(Ae.Star),{type:"ValueProjection",children:[$,G]};case xt:return this.led(k.type,{type:"Identity"});case zt:return this._parseMultiselectHash();case et:return $={type:et,children:[{type:"Identity"}]},G=this._parseProjectionRHS(Ae.Flatten),{type:"Projection",children:[$,G]};case xe:return this._lookahead(0)===D||this._lookahead(0)===M?(G=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},G)):this._lookahead(0)===tt&&this._lookahead(1)===I?(this._advance(),this._advance(),G=this._parseProjectionRHS(Ae.Star),{type:"Projection",children:[{type:"Identity"},G]}):this._parseMultiselectList();case N:return{type:N};case Y:return ne=this.expression(Ae.Expref),{type:"ExpressionReference",children:[ne]};case F:for(var we=[];this._lookahead(0)!==q;)this._lookahead(0)===N?(ne={type:N},this._advance()):ne=this.expression(0),we.push(ne);return this._match(q),we[0];default:this._errorToken(k)}},led:function(k,$){var G;switch(k){case Ne:var ne=Ae.Dot;return this._lookahead(0)!==tt?(G=this._parseDotRHS(ne),{type:"Subexpression",children:[$,G]}):(this._advance(),G=this._parseProjectionRHS(ne),{type:"ValueProjection",children:[$,G]});case oe:return G=this.expression(Ae.Pipe),{type:oe,children:[$,G]};case H:return G=this.expression(Ae.Or),{type:"OrExpression",children:[$,G]};case U:return G=this.expression(Ae.And),{type:"AndExpression",children:[$,G]};case F:for(var ue=$.name,we=[],Ge,ot;this._lookahead(0)!==q;)this._lookahead(0)===N?(Ge={type:N},this._advance()):Ge=this.expression(0),this._lookahead(0)===B&&this._match(B),we.push(Ge);return this._match(q),ot={type:"Function",name:ue,children:we},ot;case xt:var en=this.expression(0);return this._match(I),this._lookahead(0)===et?G={type:"Identity"}:G=this._parseProjectionRHS(Ae.Filter),{type:"FilterProjection",children:[$,G,en]};case et:var Bi={type:et,children:[$]},Lr=this._parseProjectionRHS(Ae.Flatten);return{type:"Projection",children:[Bi,Lr]};case ee:case We:case Q:case ge:case pe:case be:return this._parseComparator($,k);case xe:var Be=this._lookaheadToken(0);return Be.type===D||Be.type===M?(G=this._parseIndexExpression(),this._projectIfSlice($,G)):(this._match(tt),this._match(I),G=this._parseProjectionRHS(Ae.Star),{type:"Projection",children:[$,G]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(k){if(this._lookahead(0)===k)this._advance();else{var $=this._lookaheadToken(0),G=new Error("Expected "+k+", got: "+$.type);throw G.name="ParserError",G}},_errorToken:function(k){var $=new Error("Invalid token ("+k.type+'): "'+k.value+'"');throw $.name="ParserError",$},_parseIndexExpression:function(){if(this._lookahead(0)===M||this._lookahead(1)===M)return this._parseSliceExpression();var k={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(I),k},_projectIfSlice:function(k,$){var G={type:"IndexExpression",children:[k,$]};return $.type==="Slice"?{type:"Projection",children:[G,this._parseProjectionRHS(Ae.Star)]}:G},_parseSliceExpression:function(){for(var k=[null,null,null],$=0,G=this._lookahead(0);G!==I&&$<3;){if(G===M)$++,this._advance();else if(G===D)k[$]=this._lookaheadToken(0).value,this._advance();else{var ne=this._lookahead(0),ue=new Error("Syntax error, unexpected token: "+ne.value+"("+ne.type+")");throw ue.name="Parsererror",ue}G=this._lookahead(0)}return this._match(I),{type:"Slice",children:k}},_parseComparator:function(k,$){var G=this.expression(Ae[$]);return{type:"Comparator",name:$,children:[k,G]}},_parseDotRHS:function(k){var $=this._lookahead(0),G=[E,C,tt];if(G.indexOf($)>=0)return this.expression(k);if($===xe)return this._match(xe),this._parseMultiselectList();if($===zt)return this._match(zt),this._parseMultiselectHash()},_parseProjectionRHS:function(k){var $;if(Ae[this._lookahead(0)]<10)$={type:"Identity"};else if(this._lookahead(0)===xe)$=this.expression(k);else if(this._lookahead(0)===xt)$=this.expression(k);else if(this._lookahead(0)===Ne)this._match(Ne),$=this._parseDotRHS(k);else{var G=this._lookaheadToken(0),ne=new Error("Sytanx error, unexpected token: "+G.value+"("+G.type+")");throw ne.name="ParserError",ne}return $},_parseMultiselectList:function(){for(var k=[];this._lookahead(0)!==I;){var $=this.expression(0);if(k.push($),this._lookahead(0)===B&&(this._match(B),this._lookahead(0)===I))throw new Error("Unexpected token Rbracket")}return this._match(I),{type:"MultiSelectList",children:k}},_parseMultiselectHash:function(){for(var k=[],$=[E,C],G,ne,ue,we;;){if(G=this._lookaheadToken(0),$.indexOf(G.type)<0)throw new Error("Expecting an identifier token, got: "+G.type);if(ne=G.value,this._advance(),this._match(M),ue=this.expression(0),we={type:"KeyValuePair",name:ne,value:ue},k.push(we),this._lookahead(0)===B)this._match(B);else if(this._lookahead(0)===R){this._match(R);break}}return{type:"MultiSelectHash",children:k}}};function Cn(k){this.runtime=k}Cn.prototype={search:function(k,$){return this.visit(k,$)},visit:function(k,$){var G,ne,ue,we,Ge,ot,en,Bi,Lr,Be;switch(k.type){case"Field":return $!==null&&r($)?(ot=$[k.name],ot===void 0?null:ot):null;case"Subexpression":for(ue=this.visit(k.children[0],$),Be=1;Be<k.children.length;Be++)if(ue=this.visit(k.children[1],ue),ue===null)return null;return ue;case"IndexExpression":return en=this.visit(k.children[0],$),Bi=this.visit(k.children[1],en),Bi;case"Index":if(!t($))return null;var Ws=k.value;return Ws<0&&(Ws=$.length+Ws),ue=$[Ws],ue===void 0&&(ue=null),ue;case"Slice":if(!t($))return null;var yx=k.children.slice(0),Pf=this.computeSliceParams($.length,yx),_x=Pf[0],bx=Pf[1],jh=Pf[2];if(ue=[],jh>0)for(Be=_x;Be<bx;Be+=jh)ue.push($[Be]);else for(Be=_x;Be>bx;Be+=jh)ue.push($[Be]);return ue;case"Projection":var ji=this.visit(k.children[0],$);if(!t(ji))return null;for(Lr=[],Be=0;Be<ji.length;Be++)ne=this.visit(k.children[1],ji[Be]),ne!==null&&Lr.push(ne);return Lr;case"ValueProjection":if(ji=this.visit(k.children[0],$),!r(ji))return null;Lr=[];var Uh=s(ji);for(Be=0;Be<Uh.length;Be++)ne=this.visit(k.children[1],Uh[Be]),ne!==null&&Lr.push(ne);return Lr;case"FilterProjection":if(ji=this.visit(k.children[0],$),!t(ji))return null;var Hh=[],wx=[];for(Be=0;Be<ji.length;Be++)G=this.visit(k.children[2],ji[Be]),i(G)||Hh.push(ji[Be]);for(var zh=0;zh<Hh.length;zh++)ne=this.visit(k.children[1],Hh[zh]),ne!==null&&wx.push(ne);return wx;case"Comparator":switch(we=this.visit(k.children[0],$),Ge=this.visit(k.children[1],$),k.name){case ee:ue=n(we,Ge);break;case We:ue=!n(we,Ge);break;case Q:ue=we>Ge;break;case ge:ue=we>=Ge;break;case pe:ue=we<Ge;break;case be:ue=we<=Ge;break;default:throw new Error("Unknown comparator: "+k.name)}return ue;case et:var zc=this.visit(k.children[0],$);if(!t(zc))return null;var kf=[];for(Be=0;Be<zc.length;Be++)ne=zc[Be],t(ne)?kf.push.apply(kf,ne):kf.push(ne);return kf;case"Identity":return $;case"MultiSelectList":if($===null)return null;for(Lr=[],Be=0;Be<k.children.length;Be++)Lr.push(this.visit(k.children[Be],$));return Lr;case"MultiSelectHash":if($===null)return null;Lr={};var $c;for(Be=0;Be<k.children.length;Be++)$c=k.children[Be],Lr[$c.name]=this.visit($c.value,$);return Lr;case"OrExpression":return G=this.visit(k.children[0],$),i(G)&&(G=this.visit(k.children[1],$)),G;case"AndExpression":return we=this.visit(k.children[0],$),i(we)===!0?we:this.visit(k.children[1],$);case"NotExpression":return we=this.visit(k.children[0],$),i(we);case"Literal":return k.value;case oe:return en=this.visit(k.children[0],$),this.visit(k.children[1],en);case N:return $;case"Function":var Ex=[];for(Be=0;Be<k.children.length;Be++)Ex.push(this.visit(k.children[Be],$));return this.runtime.callFunction(k.name,Ex);case"ExpressionReference":var Sx=k.children[0];return Sx.jmespathType=Y,Sx;default:throw new Error("Unknown node type: "+k.type)}},computeSliceParams:function(k,$){var G=$[0],ne=$[1],ue=$[2],we=[null,null,null];if(ue===null)ue=1;else if(ue===0){var Ge=new Error("Invalid slice, step cannot be 0");throw Ge.name="RuntimeError",Ge}var ot=ue<0;return G===null?G=ot?k-1:0:G=this.capSliceRange(k,G,ue),ne===null?ne=ot?-1:k:ne=this.capSliceRange(k,ne,ue),we[0]=G,we[1]=ne,we[2]=ue,we},capSliceRange:function(k,$,G){return $<0?($+=k,$<0&&($=G<0?-1:0)):$>=k&&($=G<0?k-1:k),$}};function qf(k){this._interpreter=k,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[u]}]},avg:{_func:this._functionAvg,_signature:[{types:[b]}]},ceil:{_func:this._functionCeil,_signature:[{types:[u]}]},contains:{_func:this._functionContains,_signature:[{types:[f,p]},{types:[c]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[f]},{types:[f]}]},floor:{_func:this._functionFloor,_signature:[{types:[u]}]},length:{_func:this._functionLength,_signature:[{types:[f,p,d]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[p]}]},max:{_func:this._functionMax,_signature:[{types:[b,y]}]},merge:{_func:this._functionMerge,_signature:[{types:[d],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[p]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[b]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[f]},{types:[f]}]},min:{_func:this._functionMin,_signature:[{types:[b,y]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[p]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[c]}]},keys:{_func:this._functionKeys,_signature:[{types:[d]}]},values:{_func:this._functionValues,_signature:[{types:[d]}]},sort:{_func:this._functionSort,_signature:[{types:[y,b]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[p]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[f]},{types:[y]}]},reverse:{_func:this._functionReverse,_signature:[{types:[f,p]}]},to_array:{_func:this._functionToArray,_signature:[{types:[c]}]},to_string:{_func:this._functionToString,_signature:[{types:[c]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[c]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[c],variadic:!0}]}}}qf.prototype={callFunction:function(k,$){var G=this.functionTable[k];if(G===void 0)throw new Error("Unknown function: "+k+"()");return this._validateArgs(k,$,G._signature),G._func.call(this,$)},_validateArgs:function(k,$,G){var ne;if(G[G.length-1].variadic){if($.length<G.length)throw ne=G.length===1?" argument":" arguments",new Error("ArgumentError: "+k+"() takes at least"+G.length+ne+" but received "+$.length)}else if($.length!==G.length)throw ne=G.length===1?" argument":" arguments",new Error("ArgumentError: "+k+"() takes "+G.length+ne+" but received "+$.length);for(var ue,we,Ge,ot=0;ot<G.length;ot++){Ge=!1,ue=G[ot].types,we=this._getTypeName($[ot]);for(var en=0;en<ue.length;en++)if(this._typeMatches(we,ue[en],$[ot])){Ge=!0;break}if(!Ge){var Bi=ue.map(function(Lr){return T[Lr]}).join(",");throw new Error("TypeError: "+k+"() expected argument "+(ot+1)+" to be type "+Bi+" but received type "+T[we]+" instead.")}}},_typeMatches:function(k,$,G){if($===c)return!0;if($===y||$===b||$===p){if($===p)return k===p;if(k===p){var ne;$===b?ne=u:$===y&&(ne=f);for(var ue=0;ue<G.length;ue++)if(!this._typeMatches(this._getTypeName(G[ue]),ne,G[ue]))return!1;return!0}}else return k===$},_getTypeName:function(k){switch(Object.prototype.toString.call(k)){case"[object String]":return f;case"[object Number]":return u;case"[object Array]":return p;case"[object Boolean]":return m;case"[object Null]":return _;case"[object Object]":return k.jmespathType===Y?v:d}},_functionStartsWith:function(k){return k[0].lastIndexOf(k[1])===0},_functionEndsWith:function(k){var $=k[0],G=k[1];return $.indexOf(G,$.length-G.length)!==-1},_functionReverse:function(k){var $=this._getTypeName(k[0]);if($===f){for(var G=k[0],ne="",ue=G.length-1;ue>=0;ue--)ne+=G[ue];return ne}else{var we=k[0].slice(0);return we.reverse(),we}},_functionAbs:function(k){return Math.abs(k[0])},_functionCeil:function(k){return Math.ceil(k[0])},_functionAvg:function(k){for(var $=0,G=k[0],ne=0;ne<G.length;ne++)$+=G[ne];return $/G.length},_functionContains:function(k){return k[0].indexOf(k[1])>=0},_functionFloor:function(k){return Math.floor(k[0])},_functionLength:function(k){return r(k[0])?Object.keys(k[0]).length:k[0].length},_functionMap:function(k){for(var $=[],G=this._interpreter,ne=k[0],ue=k[1],we=0;we<ue.length;we++)$.push(G.visit(ne,ue[we]));return $},_functionMerge:function(k){for(var $={},G=0;G<k.length;G++){var ne=k[G];for(var ue in ne)$[ue]=ne[ue]}return $},_functionMax:function(k){if(k[0].length>0){var $=this._getTypeName(k[0][0]);if($===u)return Math.max.apply(Math,k[0]);for(var G=k[0],ne=G[0],ue=1;ue<G.length;ue++)ne.localeCompare(G[ue])<0&&(ne=G[ue]);return ne}else return null},_functionMin:function(k){if(k[0].length>0){var $=this._getTypeName(k[0][0]);if($===u)return Math.min.apply(Math,k[0]);for(var G=k[0],ne=G[0],ue=1;ue<G.length;ue++)G[ue].localeCompare(ne)<0&&(ne=G[ue]);return ne}else return null},_functionSum:function(k){for(var $=0,G=k[0],ne=0;ne<G.length;ne++)$+=G[ne];return $},_functionType:function(k){switch(this._getTypeName(k[0])){case u:return"number";case f:return"string";case p:return"array";case d:return"object";case m:return"boolean";case v:return"expref";case _:return"null"}},_functionKeys:function(k){return Object.keys(k[0])},_functionValues:function(k){for(var $=k[0],G=Object.keys($),ne=[],ue=0;ue<G.length;ue++)ne.push($[G[ue]]);return ne},_functionJoin:function(k){var $=k[0],G=k[1];return G.join($)},_functionToArray:function(k){return this._getTypeName(k[0])===p?k[0]:[k[0]]},_functionToString:function(k){return this._getTypeName(k[0])===f?k[0]:JSON.stringify(k[0])},_functionToNumber:function(k){var $=this._getTypeName(k[0]),G;return $===u?k[0]:$===f&&(G=+k[0],!isNaN(G))?G:null},_functionNotNull:function(k){for(var $=0;$<k.length;$++)if(this._getTypeName(k[$])!==_)return k[$];return null},_functionSort:function(k){var $=k[0].slice(0);return $.sort(),$},_functionSortBy:function(k){var $=k[0].slice(0);if($.length===0)return $;var G=this._interpreter,ne=k[1],ue=this._getTypeName(G.visit(ne,$[0]));if([u,f].indexOf(ue)<0)throw new Error("TypeError");for(var we=this,Ge=[],ot=0;ot<$.length;ot++)Ge.push([ot,$[ot]]);Ge.sort(function(Bi,Lr){var Be=G.visit(ne,Bi[1]),Ws=G.visit(ne,Lr[1]);if(we._getTypeName(Be)!==ue)throw new Error("TypeError: expected "+ue+", received "+we._getTypeName(Be));if(we._getTypeName(Ws)!==ue)throw new Error("TypeError: expected "+ue+", received "+we._getTypeName(Ws));return Be>Ws?1:Be<Ws?-1:Bi[0]-Lr[0]});for(var en=0;en<Ge.length;en++)$[en]=Ge[en][1];return $},_functionMaxBy:function(k){for(var $=k[1],G=k[0],ne=this.createKeyFunction($,[u,f]),ue=-1/0,we,Ge,ot=0;ot<G.length;ot++)Ge=ne(G[ot]),Ge>ue&&(ue=Ge,we=G[ot]);return we},_functionMinBy:function(k){for(var $=k[1],G=k[0],ne=this.createKeyFunction($,[u,f]),ue=1/0,we,Ge,ot=0;ot<G.length;ot++)Ge=ne(G[ot]),Ge<ue&&(ue=Ge,we=G[ot]);return we},createKeyFunction:function(k,$){var G=this,ne=this._interpreter,ue=function(we){var Ge=ne.visit(k,we);if($.indexOf(G._getTypeName(Ge))<0){var ot="TypeError: expected one of "+$+", received "+G._getTypeName(Ge);throw new Error(ot)}return Ge};return ue}};function wo(k){var $=new Vt,G=$.parse(k);return G}function Hc(k){var $=new Gr;return $.tokenize(k)}function Eo(k,$){var G=new Vt,ne=new qf,ue=new Cn(ne);ne._interpreter=ue;var we=G.parse($);return ue.search(we,k)}e.tokenize=Hc,e.compile=wo,e.search=Eo,e.strictDeepEqual=n})(typeof eE>"u"?eE.jmespath={}:eE)});var roe=g(()=>{var Bt=Re(),toe=eoe(),Kpt=Bt.util.inherit,rE=Bt.util.domain,Xpt=tE(),Ypt={success:1,error:1,complete:1};function Jpt(e){return Object.prototype.hasOwnProperty.call(Ypt,e._asm.currentState)}var Ck=new toe;Ck.setupStates=function(){var e=function(t,r){var n=this;n._haltHandlersOnError=!1,n.emit(n._asm.currentState,function(i){if(i)if(Jpt(n))if(rE&&n.domain instanceof rE.Domain)i.domainEmitter=n,i.domain=n.domain,i.domainThrown=!1,n.domain.emit("error",i);else throw i;else n.response.error=i,r(i);else r(n.response.error)})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)};Ck.setupStates();Bt.Request=Kpt({constructor:function(t,r,n){var i=t.endpoint,s=t.config.region,o=t.config.customUserAgent;t.signingRegion?s=t.signingRegion:t.isGlobalEndpoint&&(s="us-east-1"),this.domain=rE&&rE.active,this.service=t,this.operation=r,this.params=n||{},this.httpRequest=new Bt.HttpRequest(i,s),this.httpRequest.appendToUserAgent(o),this.startTime=t.getSkewCorrectedDate(),this.response=new Bt.Response(this),this._asm=new toe(Ck.states,"validate"),this._haltHandlersOnError=!1,Bt.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(t){return t&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(r){t.call(r,r.error,r.data)})),this.runTo(),this.response},build:function(t){return this.runTo("send",t)},runTo:function(t,r){return this._asm.runTo(t,r,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(r){r.error=Bt.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(t){t=Bt.util.fn.makeAsync(t,3);function r(n){t.call(n,n.error,n.data,function(i){i!==!1&&(n.hasNextPage()?n.nextPage().on("complete",r).send():t.call(n,null,null,Bt.util.fn.noop))})}this.on("complete",r).send()},eachItem:function(t){var r=this;function n(i,s){if(i)return t(i,null);if(s===null)return t(null,null);var o=r.service.paginationConfig(r.operation),a=o.resultKey;Array.isArray(a)&&(a=a[0]);var u=Xpt.search(s,a),c=!0;return Bt.util.arrayEach(u,function(f){if(c=t(null,f),c===!1)return Bt.util.abort}),c}this.eachPage(n)},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var t=Bt.util.stream,r=this,n=null;return Bt.HttpClient.streamsApiVersion===2?(n=new t.PassThrough,process.nextTick(function(){r.send()})):(n=new t.Stream,n.readable=!0,n.sent=!1,n.on("newListener",function(i){!n.sent&&i==="data"&&(n.sent=!0,process.nextTick(function(){r.send()}))})),this.on("error",function(i){n.emit("error",i)}),this.on("httpHeaders",function(s,o,a){if(s<300){r.removeListener("httpData",Bt.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",Bt.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(_){a.error=_,a.error.retryable=!1});var u=!1,c;if(r.httpRequest.method!=="HEAD"&&(c=parseInt(o["content-length"],10)),c!==void 0&&!isNaN(c)&&c>=0){u=!0;var f=0}var p=function(){u&&f!==c?n.emit("error",Bt.util.error(new Error("Stream content length mismatch. Received "+f+" of "+c+" bytes."),{code:"StreamContentLengthMismatch"})):Bt.HttpClient.streamsApiVersion===2?n.end():n.emit("end")},d=a.httpResponse.createUnbufferedStream();if(Bt.HttpClient.streamsApiVersion===2)if(u){var m=new t.PassThrough;m._write=function(v){return v&&v.length&&(f+=v.length),t.PassThrough.prototype._write.apply(this,arguments)},m.on("end",p),n.on("error",function(v){u=!1,d.unpipe(m),m.emit("end"),m.end()}),d.pipe(m).pipe(n,{end:!1})}else d.pipe(n);else u&&d.on("data",function(v){v&&v.length&&(f+=v.length)}),d.on("data",function(v){n.emit("data",v)}),d.on("end",p);d.on("error",function(v){u=!1,n.emit("error",v)})}}),n},emitEvent:function(t,r,n){typeof r=="function"&&(n=r,r=null),n||(n=function(){}),r||(r=this.eventParameters(t,this.response));var i=Bt.SequentialExecutor.prototype.emit;i.call(this,t,r,function(s){s&&(this.response.error=s),n.call(this,s)})},eventParameters:function(t){switch(t){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(t,r){return!r&&typeof t=="function"&&(r=t,t=null),new Bt.Signers.Presign().sign(this.toGet(),t,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",Bt.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",Bt.EventListeners.Core.SIGN),this},toGet:function(){return(this.service.api.protocol==="query"||this.service.api.protocol==="ec2")&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(t){t.httpRequest.method="GET",t.httpRequest.path=t.service.endpoint.path+"?"+t.httpRequest.body,t.httpRequest.body="",delete t.httpRequest.headers["Content-Length"],delete t.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}});Bt.Request.addPromisesToClass=function(t){this.prototype.promise=function(){var n=this;return this.httpRequest.appendToUserAgent("promise"),new t(function(i,s){n.on("complete",function(o){o.error?s(o.error):i(Object.defineProperty(o.data||{},"$response",{value:o}))}),n.runTo()})}};Bt.Request.deletePromisesFromClass=function(){delete this.prototype.promise};Bt.util.addPromises(Bt.Request);Bt.util.mixin(Bt.Request,Bt.SequentialExecutor)});var ioe=g(()=>{var c0=Re(),Zpt=c0.util.inherit,noe=tE();c0.Response=Zpt({constructor:function(t){this.request=t,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new c0.HttpResponse,t&&(this.maxRetries=t.service.numRetries(),this.maxRedirects=t.service.config.maxRedirects)},nextPage:function(t){var r,n=this.request.service,i=this.request.operation;try{r=n.paginationConfig(i,!0)}catch(u){this.error=u}if(!this.hasNextPage()){if(t)t(this.error,null);else if(this.error)throw this.error;return null}var s=c0.util.copy(this.request.params);if(this.nextPageTokens){var o=r.inputToken;typeof o=="string"&&(o=[o]);for(var a=0;a<o.length;a++)s[o[a]]=this.nextPageTokens[a];return n.makeRequest(this.request.operation,s,t)}else return t?t(null,null):null},hasNextPage:function(){if(this.cacheNextPageTokens(),this.nextPageTokens)return!0;if(this.nextPageTokens!==void 0)return!1},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var t=this.request.service.paginationConfig(this.request.operation);if(!t)return this.nextPageTokens;if(this.nextPageTokens=null,t.moreResults&&!noe.search(this.data,t.moreResults))return this.nextPageTokens;var r=t.outputToken;return typeof r=="string"&&(r=[r]),c0.util.arrayEach.call(this,r,function(n){var i=noe.search(this.data,n);i&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(i))}),this.nextPageTokens}})});var ooe=g(()=>{var zl=Re(),Qpt=zl.util.inherit,Td=tE();function soe(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach(function(s){if(!n){var o=t.matchers[s.matcher];o&&o(e,s.expected,s.argument)&&(n=!0,i=s.state)}}),!n&&e.error&&(i="failure"),i==="success"?t.setSuccess(e):t.setError(e,i==="retry")}zl.ResourceWaiter=Qpt({constructor:function(t,r){this.service=t,this.state=r,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}return Td.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var s=0;s<i;s++)if(!Td.strictDeepEqual(n[s],t))return!1;return!0},pathAny:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}Array.isArray(n)||(n=[n]);for(var i=n.length,s=0;s<i;s++)if(Td.strictDeepEqual(n[s],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return typeof r=="number"&&r===t},error:function(e,t){return typeof t=="string"&&e.error?t===e.error.code:t===!!e.error}},listeners:new zl.SequentialExecutor().addNamedListeners(function(e){e("RETRY_CHECK","retry",function(t){var r=t.request._waiter;t.error&&t.error.code==="ResourceNotReady"&&(t.error.retryDelay=(r.config.delay||0)*1e3)}),e("CHECK_OUTPUT","extractData",soe),e("CHECK_ERROR","extractError",soe)}),wait:function(t,r){typeof t=="function"&&(r=t,t=void 0),t&&t.$waiter&&(t=zl.util.copy(t),typeof t.$waiter.delay=="number"&&(this.config.delay=t.$waiter.delay),typeof t.$waiter.maxAttempts=="number"&&(this.config.maxAttempts=t.$waiter.maxAttempts),delete t.$waiter);var n=this.service.makeRequest(this.config.operation,t);return n._waiter=this,n.response.maxRetries=this.config.maxAttempts,n.addListeners(this.listeners),r&&n.send(r),n},setSuccess:function(t){t.error=null,t.data=t.data||{},t.request.removeAllListeners("extractData")},setError:function(t,r){t.data=null,t.error=zl.util.error(t.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:r})},loadWaiterConfig:function(t){if(!this.service.api.waiters[t])throw new zl.util.error(new Error,{code:"StateNotFoundError",message:"State "+t+" not found."});this.config=zl.util.copy(this.service.api.waiters[t])}})});var uoe=g((btr,aoe)=>{var Va=Re(),edt=Va.util.inherit;Va.Signers.V2=edt(Va.Signers.RequestSigner,{addAuthorization:function(t,r){r||(r=Va.util.date.getDate());var n=this.request;n.params.Timestamp=Va.util.date.iso8601(r),n.params.SignatureVersion="2",n.params.SignatureMethod="HmacSHA256",n.params.AWSAccessKeyId=t.accessKeyId,t.sessionToken&&(n.params.SecurityToken=t.sessionToken),delete n.params.Signature,n.params.Signature=this.signature(t),n.body=Va.util.queryParamsToString(n.params),n.headers["Content-Length"]=n.body.length},signature:function(t){return Va.util.crypto.hmac(t.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var t=[];return t.push(this.request.method),t.push(this.request.endpoint.host.toLowerCase()),t.push(this.request.pathname()),t.push(Va.util.queryParamsToString(this.request.params)),t.join(`
|
|
162
|
+
`)})}),Json:new gc().addNamedListeners(function(e){var t=Hw();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Rest:new gc().addNamedListeners(function(e){var t=r0();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestJson:new gc().addNamedListeners(function(e){var t=uk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError),e("UNSET_CONTENT_LENGTH","afterBuild",t.unsetContentLength)}),RestXml:new gc().addNamedListeners(function(e){var t=lk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Query:new gc().addNamedListeners(function(e){var t=sk();e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})}});var eoe=g((dtr,Qse)=>{function Sk(e,t){this.currentState=t||null,this.states=e||{}}Sk.prototype.runTo=function(t,r,n,i){typeof t=="function"&&(i=n,n=r,r=t,t=null);var s=this,o=s.states[s.currentState];o.fn.call(n||s,i,function(a){if(a)if(o.fail)s.currentState=o.fail;else return r?r.call(n,a):null;else if(o.accept)s.currentState=o.accept;else return r?r.call(n):null;if(s.currentState===t)return r?r.call(n,a):null;s.runTo(t,r,n,a)})};Sk.prototype.addState=function(t,r,n,i){return typeof r=="function"?(i=r,r=null,n=null):typeof n=="function"&&(i=n,n=null),this.currentState||(this.currentState=t),this.states[t]={accept:r,fail:n,fn:i},this};Qse.exports=Sk});var tE=g(eE=>{(function(e){"use strict";function t(k){return k!==null?Object.prototype.toString.call(k)==="[object Array]":!1}function r(k){return k!==null?Object.prototype.toString.call(k)==="[object Object]":!1}function n(k,$){if(k===$)return!0;var G=Object.prototype.toString.call(k);if(G!==Object.prototype.toString.call($))return!1;if(t(k)===!0){if(k.length!==$.length)return!1;for(var ne=0;ne<k.length;ne++)if(n(k[ne],$[ne])===!1)return!1;return!0}if(r(k)===!0){var ue={};for(var be in k)if(hasOwnProperty.call(k,be)){if(n(k[be],$[be])===!1)return!1;ue[be]=!0}for(var Ge in $)if(hasOwnProperty.call($,Ge)&&ue[Ge]!==!0)return!1;return!0}return!1}function i(k){if(k===""||k===!1||k===null)return!0;if(t(k)&&k.length===0)return!0;if(r(k)){for(var $ in k)if(k.hasOwnProperty($))return!1;return!0}else return!1}function s(k){for(var $=Object.keys(k),G=[],ne=0;ne<$.length;ne++)G.push(k[$[ne]]);return G}function o(k,$){var G={};for(var ne in k)G[ne]=k[ne];for(var ue in $)G[ue]=$[ue];return G}var a;typeof String.prototype.trimLeft=="function"?a=function(k){return k.trimLeft()}:a=function(k){return k.match(/^\s*(.*)/)[1]};var u=0,c=1,f=2,p=3,d=4,m=5,v=6,_=7,b=8,y=9,T={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},S="EOF",E="UnquotedIdentifier",C="QuotedIdentifier",I="Rbracket",q="Rparen",B="Comma",M="Colon",R="Rbrace",D="Number",N="Current",Y="Expref",oe="Pipe",H="Or",U="And",ee="EQ",Q="GT",pe="LT",ge="GTE",we="LTE",We="NE",et="Flatten",tt="Star",xt="Filter",Ne="Dot",Dr="Not",zt="Lbrace",xe="Lbracket",F="Lparen",A="Literal",Z={".":Ne,"*":tt,",":B,":":M,"{":zt,"}":R,"]":I,"(":F,")":q,"@":N},V={"<":!0,">":!0,"=":!0,"!":!0},He={" ":!0," ":!0,"\n":!0};function Fe(k){return k>="a"&&k<="z"||k>="A"&&k<="Z"||k==="_"}function $t(k){return k>="0"&&k<="9"||k==="-"}function yr(k){return k>="a"&&k<="z"||k>="A"&&k<="Z"||k>="0"&&k<="9"||k==="_"}function Gr(){}Gr.prototype={tokenize:function(k){var $=[];this._current=0;for(var G,ne,ue;this._current<k.length;)if(Fe(k[this._current]))G=this._current,ne=this._consumeUnquotedIdentifier(k),$.push({type:E,value:ne,start:G});else if(Z[k[this._current]]!==void 0)$.push({type:Z[k[this._current]],value:k[this._current],start:this._current}),this._current++;else if($t(k[this._current]))ue=this._consumeNumber(k),$.push(ue);else if(k[this._current]==="[")ue=this._consumeLBracket(k),$.push(ue);else if(k[this._current]==='"')G=this._current,ne=this._consumeQuotedIdentifier(k),$.push({type:C,value:ne,start:G});else if(k[this._current]==="'")G=this._current,ne=this._consumeRawStringLiteral(k),$.push({type:A,value:ne,start:G});else if(k[this._current]==="`"){G=this._current;var be=this._consumeLiteral(k);$.push({type:A,value:be,start:G})}else if(V[k[this._current]]!==void 0)$.push(this._consumeOperator(k));else if(He[k[this._current]]!==void 0)this._current++;else if(k[this._current]==="&")G=this._current,this._current++,k[this._current]==="&"?(this._current++,$.push({type:U,value:"&&",start:G})):$.push({type:Y,value:"&",start:G});else if(k[this._current]==="|")G=this._current,this._current++,k[this._current]==="|"?(this._current++,$.push({type:H,value:"||",start:G})):$.push({type:oe,value:"|",start:G});else{var Ge=new Error("Unknown character:"+k[this._current]);throw Ge.name="LexerError",Ge}return $},_consumeUnquotedIdentifier:function(k){var $=this._current;for(this._current++;this._current<k.length&&yr(k[this._current]);)this._current++;return k.slice($,this._current)},_consumeQuotedIdentifier:function(k){var $=this._current;this._current++;for(var G=k.length;k[this._current]!=='"'&&this._current<G;){var ne=this._current;k[ne]==="\\"&&(k[ne+1]==="\\"||k[ne+1]==='"')?ne+=2:ne++,this._current=ne}return this._current++,JSON.parse(k.slice($,this._current))},_consumeRawStringLiteral:function(k){var $=this._current;this._current++;for(var G=k.length;k[this._current]!=="'"&&this._current<G;){var ne=this._current;k[ne]==="\\"&&(k[ne+1]==="\\"||k[ne+1]==="'")?ne+=2:ne++,this._current=ne}this._current++;var ue=k.slice($+1,this._current-1);return ue.replace("\\'","'")},_consumeNumber:function(k){var $=this._current;this._current++;for(var G=k.length;$t(k[this._current])&&this._current<G;)this._current++;var ne=parseInt(k.slice($,this._current));return{type:D,value:ne,start:$}},_consumeLBracket:function(k){var $=this._current;return this._current++,k[this._current]==="?"?(this._current++,{type:xt,value:"[?",start:$}):k[this._current]==="]"?(this._current++,{type:et,value:"[]",start:$}):{type:xe,value:"[",start:$}},_consumeOperator:function(k){var $=this._current,G=k[$];if(this._current++,G==="!")return k[this._current]==="="?(this._current++,{type:We,value:"!=",start:$}):{type:Dr,value:"!",start:$};if(G==="<")return k[this._current]==="="?(this._current++,{type:we,value:"<=",start:$}):{type:pe,value:"<",start:$};if(G===">")return k[this._current]==="="?(this._current++,{type:ge,value:">=",start:$}):{type:Q,value:">",start:$};if(G==="="&&k[this._current]==="=")return this._current++,{type:ee,value:"==",start:$}},_consumeLiteral:function(k){this._current++;for(var $=this._current,G=k.length,ne;k[this._current]!=="`"&&this._current<G;){var ue=this._current;k[ue]==="\\"&&(k[ue+1]==="\\"||k[ue+1]==="`")?ue+=2:ue++,this._current=ue}var be=a(k.slice($,this._current));return be=be.replace("\\`","`"),this._looksLikeJSON(be)?ne=JSON.parse(be):ne=JSON.parse('"'+be+'"'),this._current++,ne},_looksLikeJSON:function(k){var $='[{"',G=["true","false","null"],ne="-0123456789";if(k==="")return!1;if($.indexOf(k[0])>=0)return!0;if(G.indexOf(k)>=0)return!0;if(ne.indexOf(k[0])>=0)try{return JSON.parse(k),!0}catch{return!1}else return!1}};var Ae={};Ae[S]=0,Ae[E]=0,Ae[C]=0,Ae[I]=0,Ae[q]=0,Ae[B]=0,Ae[R]=0,Ae[D]=0,Ae[N]=0,Ae[Y]=0,Ae[oe]=1,Ae[H]=2,Ae[U]=3,Ae[ee]=5,Ae[Q]=5,Ae[pe]=5,Ae[ge]=5,Ae[we]=5,Ae[We]=5,Ae[et]=9,Ae[tt]=20,Ae[xt]=21,Ae[Ne]=40,Ae[Dr]=45,Ae[zt]=50,Ae[xe]=55,Ae[F]=60;function Vt(){}Vt.prototype={parse:function(k){this._loadTokens(k),this.index=0;var $=this.expression(0);if(this._lookahead(0)!==S){var G=this._lookaheadToken(0),ne=new Error("Unexpected token type: "+G.type+", value: "+G.value);throw ne.name="ParserError",ne}return $},_loadTokens:function(k){var $=new Gr,G=$.tokenize(k);G.push({type:S,value:"",start:k.length}),this.tokens=G},expression:function(k){var $=this._lookaheadToken(0);this._advance();for(var G=this.nud($),ne=this._lookahead(0);k<Ae[ne];)this._advance(),G=this.led(ne,G),ne=this._lookahead(0);return G},_lookahead:function(k){return this.tokens[this.index+k].type},_lookaheadToken:function(k){return this.tokens[this.index+k]},_advance:function(){this.index++},nud:function(k){var $,G,ne;switch(k.type){case A:return{type:"Literal",value:k.value};case E:return{type:"Field",name:k.value};case C:var ue={type:"Field",name:k.value};if(this._lookahead(0)===F)throw new Error("Quoted identifier not allowed for function names.");return ue;case Dr:return G=this.expression(Ae.Not),{type:"NotExpression",children:[G]};case tt:return $={type:"Identity"},G=null,this._lookahead(0)===I?G={type:"Identity"}:G=this._parseProjectionRHS(Ae.Star),{type:"ValueProjection",children:[$,G]};case xt:return this.led(k.type,{type:"Identity"});case zt:return this._parseMultiselectHash();case et:return $={type:et,children:[{type:"Identity"}]},G=this._parseProjectionRHS(Ae.Flatten),{type:"Projection",children:[$,G]};case xe:return this._lookahead(0)===D||this._lookahead(0)===M?(G=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},G)):this._lookahead(0)===tt&&this._lookahead(1)===I?(this._advance(),this._advance(),G=this._parseProjectionRHS(Ae.Star),{type:"Projection",children:[{type:"Identity"},G]}):this._parseMultiselectList();case N:return{type:N};case Y:return ne=this.expression(Ae.Expref),{type:"ExpressionReference",children:[ne]};case F:for(var be=[];this._lookahead(0)!==q;)this._lookahead(0)===N?(ne={type:N},this._advance()):ne=this.expression(0),be.push(ne);return this._match(q),be[0];default:this._errorToken(k)}},led:function(k,$){var G;switch(k){case Ne:var ne=Ae.Dot;return this._lookahead(0)!==tt?(G=this._parseDotRHS(ne),{type:"Subexpression",children:[$,G]}):(this._advance(),G=this._parseProjectionRHS(ne),{type:"ValueProjection",children:[$,G]});case oe:return G=this.expression(Ae.Pipe),{type:oe,children:[$,G]};case H:return G=this.expression(Ae.Or),{type:"OrExpression",children:[$,G]};case U:return G=this.expression(Ae.And),{type:"AndExpression",children:[$,G]};case F:for(var ue=$.name,be=[],Ge,ot;this._lookahead(0)!==q;)this._lookahead(0)===N?(Ge={type:N},this._advance()):Ge=this.expression(0),this._lookahead(0)===B&&this._match(B),be.push(Ge);return this._match(q),ot={type:"Function",name:ue,children:be},ot;case xt:var en=this.expression(0);return this._match(I),this._lookahead(0)===et?G={type:"Identity"}:G=this._parseProjectionRHS(Ae.Filter),{type:"FilterProjection",children:[$,G,en]};case et:var Bi={type:et,children:[$]},Lr=this._parseProjectionRHS(Ae.Flatten);return{type:"Projection",children:[Bi,Lr]};case ee:case We:case Q:case ge:case pe:case we:return this._parseComparator($,k);case xe:var Be=this._lookaheadToken(0);return Be.type===D||Be.type===M?(G=this._parseIndexExpression(),this._projectIfSlice($,G)):(this._match(tt),this._match(I),G=this._parseProjectionRHS(Ae.Star),{type:"Projection",children:[$,G]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(k){if(this._lookahead(0)===k)this._advance();else{var $=this._lookaheadToken(0),G=new Error("Expected "+k+", got: "+$.type);throw G.name="ParserError",G}},_errorToken:function(k){var $=new Error("Invalid token ("+k.type+'): "'+k.value+'"');throw $.name="ParserError",$},_parseIndexExpression:function(){if(this._lookahead(0)===M||this._lookahead(1)===M)return this._parseSliceExpression();var k={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(I),k},_projectIfSlice:function(k,$){var G={type:"IndexExpression",children:[k,$]};return $.type==="Slice"?{type:"Projection",children:[G,this._parseProjectionRHS(Ae.Star)]}:G},_parseSliceExpression:function(){for(var k=[null,null,null],$=0,G=this._lookahead(0);G!==I&&$<3;){if(G===M)$++,this._advance();else if(G===D)k[$]=this._lookaheadToken(0).value,this._advance();else{var ne=this._lookahead(0),ue=new Error("Syntax error, unexpected token: "+ne.value+"("+ne.type+")");throw ue.name="Parsererror",ue}G=this._lookahead(0)}return this._match(I),{type:"Slice",children:k}},_parseComparator:function(k,$){var G=this.expression(Ae[$]);return{type:"Comparator",name:$,children:[k,G]}},_parseDotRHS:function(k){var $=this._lookahead(0),G=[E,C,tt];if(G.indexOf($)>=0)return this.expression(k);if($===xe)return this._match(xe),this._parseMultiselectList();if($===zt)return this._match(zt),this._parseMultiselectHash()},_parseProjectionRHS:function(k){var $;if(Ae[this._lookahead(0)]<10)$={type:"Identity"};else if(this._lookahead(0)===xe)$=this.expression(k);else if(this._lookahead(0)===xt)$=this.expression(k);else if(this._lookahead(0)===Ne)this._match(Ne),$=this._parseDotRHS(k);else{var G=this._lookaheadToken(0),ne=new Error("Sytanx error, unexpected token: "+G.value+"("+G.type+")");throw ne.name="ParserError",ne}return $},_parseMultiselectList:function(){for(var k=[];this._lookahead(0)!==I;){var $=this.expression(0);if(k.push($),this._lookahead(0)===B&&(this._match(B),this._lookahead(0)===I))throw new Error("Unexpected token Rbracket")}return this._match(I),{type:"MultiSelectList",children:k}},_parseMultiselectHash:function(){for(var k=[],$=[E,C],G,ne,ue,be;;){if(G=this._lookaheadToken(0),$.indexOf(G.type)<0)throw new Error("Expecting an identifier token, got: "+G.type);if(ne=G.value,this._advance(),this._match(M),ue=this.expression(0),be={type:"KeyValuePair",name:ne,value:ue},k.push(be),this._lookahead(0)===B)this._match(B);else if(this._lookahead(0)===R){this._match(R);break}}return{type:"MultiSelectHash",children:k}}};function Cn(k){this.runtime=k}Cn.prototype={search:function(k,$){return this.visit(k,$)},visit:function(k,$){var G,ne,ue,be,Ge,ot,en,Bi,Lr,Be;switch(k.type){case"Field":return $!==null&&r($)?(ot=$[k.name],ot===void 0?null:ot):null;case"Subexpression":for(ue=this.visit(k.children[0],$),Be=1;Be<k.children.length;Be++)if(ue=this.visit(k.children[1],ue),ue===null)return null;return ue;case"IndexExpression":return en=this.visit(k.children[0],$),Bi=this.visit(k.children[1],en),Bi;case"Index":if(!t($))return null;var Ws=k.value;return Ws<0&&(Ws=$.length+Ws),ue=$[Ws],ue===void 0&&(ue=null),ue;case"Slice":if(!t($))return null;var yx=k.children.slice(0),Pf=this.computeSliceParams($.length,yx),_x=Pf[0],bx=Pf[1],jh=Pf[2];if(ue=[],jh>0)for(Be=_x;Be<bx;Be+=jh)ue.push($[Be]);else for(Be=_x;Be>bx;Be+=jh)ue.push($[Be]);return ue;case"Projection":var ji=this.visit(k.children[0],$);if(!t(ji))return null;for(Lr=[],Be=0;Be<ji.length;Be++)ne=this.visit(k.children[1],ji[Be]),ne!==null&&Lr.push(ne);return Lr;case"ValueProjection":if(ji=this.visit(k.children[0],$),!r(ji))return null;Lr=[];var Uh=s(ji);for(Be=0;Be<Uh.length;Be++)ne=this.visit(k.children[1],Uh[Be]),ne!==null&&Lr.push(ne);return Lr;case"FilterProjection":if(ji=this.visit(k.children[0],$),!t(ji))return null;var Hh=[],wx=[];for(Be=0;Be<ji.length;Be++)G=this.visit(k.children[2],ji[Be]),i(G)||Hh.push(ji[Be]);for(var zh=0;zh<Hh.length;zh++)ne=this.visit(k.children[1],Hh[zh]),ne!==null&&wx.push(ne);return wx;case"Comparator":switch(be=this.visit(k.children[0],$),Ge=this.visit(k.children[1],$),k.name){case ee:ue=n(be,Ge);break;case We:ue=!n(be,Ge);break;case Q:ue=be>Ge;break;case ge:ue=be>=Ge;break;case pe:ue=be<Ge;break;case we:ue=be<=Ge;break;default:throw new Error("Unknown comparator: "+k.name)}return ue;case et:var zc=this.visit(k.children[0],$);if(!t(zc))return null;var kf=[];for(Be=0;Be<zc.length;Be++)ne=zc[Be],t(ne)?kf.push.apply(kf,ne):kf.push(ne);return kf;case"Identity":return $;case"MultiSelectList":if($===null)return null;for(Lr=[],Be=0;Be<k.children.length;Be++)Lr.push(this.visit(k.children[Be],$));return Lr;case"MultiSelectHash":if($===null)return null;Lr={};var $c;for(Be=0;Be<k.children.length;Be++)$c=k.children[Be],Lr[$c.name]=this.visit($c.value,$);return Lr;case"OrExpression":return G=this.visit(k.children[0],$),i(G)&&(G=this.visit(k.children[1],$)),G;case"AndExpression":return be=this.visit(k.children[0],$),i(be)===!0?be:this.visit(k.children[1],$);case"NotExpression":return be=this.visit(k.children[0],$),i(be);case"Literal":return k.value;case oe:return en=this.visit(k.children[0],$),this.visit(k.children[1],en);case N:return $;case"Function":var Ex=[];for(Be=0;Be<k.children.length;Be++)Ex.push(this.visit(k.children[Be],$));return this.runtime.callFunction(k.name,Ex);case"ExpressionReference":var Sx=k.children[0];return Sx.jmespathType=Y,Sx;default:throw new Error("Unknown node type: "+k.type)}},computeSliceParams:function(k,$){var G=$[0],ne=$[1],ue=$[2],be=[null,null,null];if(ue===null)ue=1;else if(ue===0){var Ge=new Error("Invalid slice, step cannot be 0");throw Ge.name="RuntimeError",Ge}var ot=ue<0;return G===null?G=ot?k-1:0:G=this.capSliceRange(k,G,ue),ne===null?ne=ot?-1:k:ne=this.capSliceRange(k,ne,ue),be[0]=G,be[1]=ne,be[2]=ue,be},capSliceRange:function(k,$,G){return $<0?($+=k,$<0&&($=G<0?-1:0)):$>=k&&($=G<0?k-1:k),$}};function qf(k){this._interpreter=k,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[u]}]},avg:{_func:this._functionAvg,_signature:[{types:[b]}]},ceil:{_func:this._functionCeil,_signature:[{types:[u]}]},contains:{_func:this._functionContains,_signature:[{types:[f,p]},{types:[c]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[f]},{types:[f]}]},floor:{_func:this._functionFloor,_signature:[{types:[u]}]},length:{_func:this._functionLength,_signature:[{types:[f,p,d]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[p]}]},max:{_func:this._functionMax,_signature:[{types:[b,y]}]},merge:{_func:this._functionMerge,_signature:[{types:[d],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[p]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[b]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[f]},{types:[f]}]},min:{_func:this._functionMin,_signature:[{types:[b,y]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[p]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[c]}]},keys:{_func:this._functionKeys,_signature:[{types:[d]}]},values:{_func:this._functionValues,_signature:[{types:[d]}]},sort:{_func:this._functionSort,_signature:[{types:[y,b]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[p]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[f]},{types:[y]}]},reverse:{_func:this._functionReverse,_signature:[{types:[f,p]}]},to_array:{_func:this._functionToArray,_signature:[{types:[c]}]},to_string:{_func:this._functionToString,_signature:[{types:[c]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[c]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[c],variadic:!0}]}}}qf.prototype={callFunction:function(k,$){var G=this.functionTable[k];if(G===void 0)throw new Error("Unknown function: "+k+"()");return this._validateArgs(k,$,G._signature),G._func.call(this,$)},_validateArgs:function(k,$,G){var ne;if(G[G.length-1].variadic){if($.length<G.length)throw ne=G.length===1?" argument":" arguments",new Error("ArgumentError: "+k+"() takes at least"+G.length+ne+" but received "+$.length)}else if($.length!==G.length)throw ne=G.length===1?" argument":" arguments",new Error("ArgumentError: "+k+"() takes "+G.length+ne+" but received "+$.length);for(var ue,be,Ge,ot=0;ot<G.length;ot++){Ge=!1,ue=G[ot].types,be=this._getTypeName($[ot]);for(var en=0;en<ue.length;en++)if(this._typeMatches(be,ue[en],$[ot])){Ge=!0;break}if(!Ge){var Bi=ue.map(function(Lr){return T[Lr]}).join(",");throw new Error("TypeError: "+k+"() expected argument "+(ot+1)+" to be type "+Bi+" but received type "+T[be]+" instead.")}}},_typeMatches:function(k,$,G){if($===c)return!0;if($===y||$===b||$===p){if($===p)return k===p;if(k===p){var ne;$===b?ne=u:$===y&&(ne=f);for(var ue=0;ue<G.length;ue++)if(!this._typeMatches(this._getTypeName(G[ue]),ne,G[ue]))return!1;return!0}}else return k===$},_getTypeName:function(k){switch(Object.prototype.toString.call(k)){case"[object String]":return f;case"[object Number]":return u;case"[object Array]":return p;case"[object Boolean]":return m;case"[object Null]":return _;case"[object Object]":return k.jmespathType===Y?v:d}},_functionStartsWith:function(k){return k[0].lastIndexOf(k[1])===0},_functionEndsWith:function(k){var $=k[0],G=k[1];return $.indexOf(G,$.length-G.length)!==-1},_functionReverse:function(k){var $=this._getTypeName(k[0]);if($===f){for(var G=k[0],ne="",ue=G.length-1;ue>=0;ue--)ne+=G[ue];return ne}else{var be=k[0].slice(0);return be.reverse(),be}},_functionAbs:function(k){return Math.abs(k[0])},_functionCeil:function(k){return Math.ceil(k[0])},_functionAvg:function(k){for(var $=0,G=k[0],ne=0;ne<G.length;ne++)$+=G[ne];return $/G.length},_functionContains:function(k){return k[0].indexOf(k[1])>=0},_functionFloor:function(k){return Math.floor(k[0])},_functionLength:function(k){return r(k[0])?Object.keys(k[0]).length:k[0].length},_functionMap:function(k){for(var $=[],G=this._interpreter,ne=k[0],ue=k[1],be=0;be<ue.length;be++)$.push(G.visit(ne,ue[be]));return $},_functionMerge:function(k){for(var $={},G=0;G<k.length;G++){var ne=k[G];for(var ue in ne)$[ue]=ne[ue]}return $},_functionMax:function(k){if(k[0].length>0){var $=this._getTypeName(k[0][0]);if($===u)return Math.max.apply(Math,k[0]);for(var G=k[0],ne=G[0],ue=1;ue<G.length;ue++)ne.localeCompare(G[ue])<0&&(ne=G[ue]);return ne}else return null},_functionMin:function(k){if(k[0].length>0){var $=this._getTypeName(k[0][0]);if($===u)return Math.min.apply(Math,k[0]);for(var G=k[0],ne=G[0],ue=1;ue<G.length;ue++)G[ue].localeCompare(ne)<0&&(ne=G[ue]);return ne}else return null},_functionSum:function(k){for(var $=0,G=k[0],ne=0;ne<G.length;ne++)$+=G[ne];return $},_functionType:function(k){switch(this._getTypeName(k[0])){case u:return"number";case f:return"string";case p:return"array";case d:return"object";case m:return"boolean";case v:return"expref";case _:return"null"}},_functionKeys:function(k){return Object.keys(k[0])},_functionValues:function(k){for(var $=k[0],G=Object.keys($),ne=[],ue=0;ue<G.length;ue++)ne.push($[G[ue]]);return ne},_functionJoin:function(k){var $=k[0],G=k[1];return G.join($)},_functionToArray:function(k){return this._getTypeName(k[0])===p?k[0]:[k[0]]},_functionToString:function(k){return this._getTypeName(k[0])===f?k[0]:JSON.stringify(k[0])},_functionToNumber:function(k){var $=this._getTypeName(k[0]),G;return $===u?k[0]:$===f&&(G=+k[0],!isNaN(G))?G:null},_functionNotNull:function(k){for(var $=0;$<k.length;$++)if(this._getTypeName(k[$])!==_)return k[$];return null},_functionSort:function(k){var $=k[0].slice(0);return $.sort(),$},_functionSortBy:function(k){var $=k[0].slice(0);if($.length===0)return $;var G=this._interpreter,ne=k[1],ue=this._getTypeName(G.visit(ne,$[0]));if([u,f].indexOf(ue)<0)throw new Error("TypeError");for(var be=this,Ge=[],ot=0;ot<$.length;ot++)Ge.push([ot,$[ot]]);Ge.sort(function(Bi,Lr){var Be=G.visit(ne,Bi[1]),Ws=G.visit(ne,Lr[1]);if(be._getTypeName(Be)!==ue)throw new Error("TypeError: expected "+ue+", received "+be._getTypeName(Be));if(be._getTypeName(Ws)!==ue)throw new Error("TypeError: expected "+ue+", received "+be._getTypeName(Ws));return Be>Ws?1:Be<Ws?-1:Bi[0]-Lr[0]});for(var en=0;en<Ge.length;en++)$[en]=Ge[en][1];return $},_functionMaxBy:function(k){for(var $=k[1],G=k[0],ne=this.createKeyFunction($,[u,f]),ue=-1/0,be,Ge,ot=0;ot<G.length;ot++)Ge=ne(G[ot]),Ge>ue&&(ue=Ge,be=G[ot]);return be},_functionMinBy:function(k){for(var $=k[1],G=k[0],ne=this.createKeyFunction($,[u,f]),ue=1/0,be,Ge,ot=0;ot<G.length;ot++)Ge=ne(G[ot]),Ge<ue&&(ue=Ge,be=G[ot]);return be},createKeyFunction:function(k,$){var G=this,ne=this._interpreter,ue=function(be){var Ge=ne.visit(k,be);if($.indexOf(G._getTypeName(Ge))<0){var ot="TypeError: expected one of "+$+", received "+G._getTypeName(Ge);throw new Error(ot)}return Ge};return ue}};function wo(k){var $=new Vt,G=$.parse(k);return G}function Hc(k){var $=new Gr;return $.tokenize(k)}function Eo(k,$){var G=new Vt,ne=new qf,ue=new Cn(ne);ne._interpreter=ue;var be=G.parse($);return ue.search(be,k)}e.tokenize=Hc,e.compile=wo,e.search=Eo,e.strictDeepEqual=n})(typeof eE>"u"?eE.jmespath={}:eE)});var roe=g(()=>{var Bt=Re(),toe=eoe(),Kpt=Bt.util.inherit,rE=Bt.util.domain,Xpt=tE(),Ypt={success:1,error:1,complete:1};function Jpt(e){return Object.prototype.hasOwnProperty.call(Ypt,e._asm.currentState)}var Ck=new toe;Ck.setupStates=function(){var e=function(t,r){var n=this;n._haltHandlersOnError=!1,n.emit(n._asm.currentState,function(i){if(i)if(Jpt(n))if(rE&&n.domain instanceof rE.Domain)i.domainEmitter=n,i.domain=n.domain,i.domainThrown=!1,n.domain.emit("error",i);else throw i;else n.response.error=i,r(i);else r(n.response.error)})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)};Ck.setupStates();Bt.Request=Kpt({constructor:function(t,r,n){var i=t.endpoint,s=t.config.region,o=t.config.customUserAgent;t.signingRegion?s=t.signingRegion:t.isGlobalEndpoint&&(s="us-east-1"),this.domain=rE&&rE.active,this.service=t,this.operation=r,this.params=n||{},this.httpRequest=new Bt.HttpRequest(i,s),this.httpRequest.appendToUserAgent(o),this.startTime=t.getSkewCorrectedDate(),this.response=new Bt.Response(this),this._asm=new toe(Ck.states,"validate"),this._haltHandlersOnError=!1,Bt.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(t){return t&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(r){t.call(r,r.error,r.data)})),this.runTo(),this.response},build:function(t){return this.runTo("send",t)},runTo:function(t,r){return this._asm.runTo(t,r,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(r){r.error=Bt.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(t){t=Bt.util.fn.makeAsync(t,3);function r(n){t.call(n,n.error,n.data,function(i){i!==!1&&(n.hasNextPage()?n.nextPage().on("complete",r).send():t.call(n,null,null,Bt.util.fn.noop))})}this.on("complete",r).send()},eachItem:function(t){var r=this;function n(i,s){if(i)return t(i,null);if(s===null)return t(null,null);var o=r.service.paginationConfig(r.operation),a=o.resultKey;Array.isArray(a)&&(a=a[0]);var u=Xpt.search(s,a),c=!0;return Bt.util.arrayEach(u,function(f){if(c=t(null,f),c===!1)return Bt.util.abort}),c}this.eachPage(n)},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var t=Bt.util.stream,r=this,n=null;return Bt.HttpClient.streamsApiVersion===2?(n=new t.PassThrough,process.nextTick(function(){r.send()})):(n=new t.Stream,n.readable=!0,n.sent=!1,n.on("newListener",function(i){!n.sent&&i==="data"&&(n.sent=!0,process.nextTick(function(){r.send()}))})),this.on("error",function(i){n.emit("error",i)}),this.on("httpHeaders",function(s,o,a){if(s<300){r.removeListener("httpData",Bt.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",Bt.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(_){a.error=_,a.error.retryable=!1});var u=!1,c;if(r.httpRequest.method!=="HEAD"&&(c=parseInt(o["content-length"],10)),c!==void 0&&!isNaN(c)&&c>=0){u=!0;var f=0}var p=function(){u&&f!==c?n.emit("error",Bt.util.error(new Error("Stream content length mismatch. Received "+f+" of "+c+" bytes."),{code:"StreamContentLengthMismatch"})):Bt.HttpClient.streamsApiVersion===2?n.end():n.emit("end")},d=a.httpResponse.createUnbufferedStream();if(Bt.HttpClient.streamsApiVersion===2)if(u){var m=new t.PassThrough;m._write=function(v){return v&&v.length&&(f+=v.length),t.PassThrough.prototype._write.apply(this,arguments)},m.on("end",p),n.on("error",function(v){u=!1,d.unpipe(m),m.emit("end"),m.end()}),d.pipe(m).pipe(n,{end:!1})}else d.pipe(n);else u&&d.on("data",function(v){v&&v.length&&(f+=v.length)}),d.on("data",function(v){n.emit("data",v)}),d.on("end",p);d.on("error",function(v){u=!1,n.emit("error",v)})}}),n},emitEvent:function(t,r,n){typeof r=="function"&&(n=r,r=null),n||(n=function(){}),r||(r=this.eventParameters(t,this.response));var i=Bt.SequentialExecutor.prototype.emit;i.call(this,t,r,function(s){s&&(this.response.error=s),n.call(this,s)})},eventParameters:function(t){switch(t){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(t,r){return!r&&typeof t=="function"&&(r=t,t=null),new Bt.Signers.Presign().sign(this.toGet(),t,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",Bt.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",Bt.EventListeners.Core.SIGN),this},toGet:function(){return(this.service.api.protocol==="query"||this.service.api.protocol==="ec2")&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(t){t.httpRequest.method="GET",t.httpRequest.path=t.service.endpoint.path+"?"+t.httpRequest.body,t.httpRequest.body="",delete t.httpRequest.headers["Content-Length"],delete t.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}});Bt.Request.addPromisesToClass=function(t){this.prototype.promise=function(){var n=this;return this.httpRequest.appendToUserAgent("promise"),new t(function(i,s){n.on("complete",function(o){o.error?s(o.error):i(Object.defineProperty(o.data||{},"$response",{value:o}))}),n.runTo()})}};Bt.Request.deletePromisesFromClass=function(){delete this.prototype.promise};Bt.util.addPromises(Bt.Request);Bt.util.mixin(Bt.Request,Bt.SequentialExecutor)});var ioe=g(()=>{var c0=Re(),Zpt=c0.util.inherit,noe=tE();c0.Response=Zpt({constructor:function(t){this.request=t,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new c0.HttpResponse,t&&(this.maxRetries=t.service.numRetries(),this.maxRedirects=t.service.config.maxRedirects)},nextPage:function(t){var r,n=this.request.service,i=this.request.operation;try{r=n.paginationConfig(i,!0)}catch(u){this.error=u}if(!this.hasNextPage()){if(t)t(this.error,null);else if(this.error)throw this.error;return null}var s=c0.util.copy(this.request.params);if(this.nextPageTokens){var o=r.inputToken;typeof o=="string"&&(o=[o]);for(var a=0;a<o.length;a++)s[o[a]]=this.nextPageTokens[a];return n.makeRequest(this.request.operation,s,t)}else return t?t(null,null):null},hasNextPage:function(){if(this.cacheNextPageTokens(),this.nextPageTokens)return!0;if(this.nextPageTokens!==void 0)return!1},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var t=this.request.service.paginationConfig(this.request.operation);if(!t)return this.nextPageTokens;if(this.nextPageTokens=null,t.moreResults&&!noe.search(this.data,t.moreResults))return this.nextPageTokens;var r=t.outputToken;return typeof r=="string"&&(r=[r]),c0.util.arrayEach.call(this,r,function(n){var i=noe.search(this.data,n);i&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(i))}),this.nextPageTokens}})});var ooe=g(()=>{var zl=Re(),Qpt=zl.util.inherit,Td=tE();function soe(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach(function(s){if(!n){var o=t.matchers[s.matcher];o&&o(e,s.expected,s.argument)&&(n=!0,i=s.state)}}),!n&&e.error&&(i="failure"),i==="success"?t.setSuccess(e):t.setError(e,i==="retry")}zl.ResourceWaiter=Qpt({constructor:function(t,r){this.service=t,this.state=r,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}return Td.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var s=0;s<i;s++)if(!Td.strictDeepEqual(n[s],t))return!1;return!0},pathAny:function(e,t,r){try{var n=Td.search(e.data,r)}catch{return!1}Array.isArray(n)||(n=[n]);for(var i=n.length,s=0;s<i;s++)if(Td.strictDeepEqual(n[s],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return typeof r=="number"&&r===t},error:function(e,t){return typeof t=="string"&&e.error?t===e.error.code:t===!!e.error}},listeners:new zl.SequentialExecutor().addNamedListeners(function(e){e("RETRY_CHECK","retry",function(t){var r=t.request._waiter;t.error&&t.error.code==="ResourceNotReady"&&(t.error.retryDelay=(r.config.delay||0)*1e3)}),e("CHECK_OUTPUT","extractData",soe),e("CHECK_ERROR","extractError",soe)}),wait:function(t,r){typeof t=="function"&&(r=t,t=void 0),t&&t.$waiter&&(t=zl.util.copy(t),typeof t.$waiter.delay=="number"&&(this.config.delay=t.$waiter.delay),typeof t.$waiter.maxAttempts=="number"&&(this.config.maxAttempts=t.$waiter.maxAttempts),delete t.$waiter);var n=this.service.makeRequest(this.config.operation,t);return n._waiter=this,n.response.maxRetries=this.config.maxAttempts,n.addListeners(this.listeners),r&&n.send(r),n},setSuccess:function(t){t.error=null,t.data=t.data||{},t.request.removeAllListeners("extractData")},setError:function(t,r){t.data=null,t.error=zl.util.error(t.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:r})},loadWaiterConfig:function(t){if(!this.service.api.waiters[t])throw new zl.util.error(new Error,{code:"StateNotFoundError",message:"State "+t+" not found."});this.config=zl.util.copy(this.service.api.waiters[t])}})});var uoe=g((btr,aoe)=>{var Va=Re(),edt=Va.util.inherit;Va.Signers.V2=edt(Va.Signers.RequestSigner,{addAuthorization:function(t,r){r||(r=Va.util.date.getDate());var n=this.request;n.params.Timestamp=Va.util.date.iso8601(r),n.params.SignatureVersion="2",n.params.SignatureMethod="HmacSHA256",n.params.AWSAccessKeyId=t.accessKeyId,t.sessionToken&&(n.params.SecurityToken=t.sessionToken),delete n.params.Signature,n.params.Signature=this.signature(t),n.body=Va.util.queryParamsToString(n.params),n.headers["Content-Length"]=n.body.length},signature:function(t){return Va.util.crypto.hmac(t.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var t=[];return t.push(this.request.method),t.push(this.request.endpoint.host.toLowerCase()),t.push(this.request.pathname()),t.push(Va.util.queryParamsToString(this.request.params)),t.join(`
|
|
163
163
|
`)}});aoe.exports=Va.Signers.V2});var Tk=g((wtr,coe)=>{var Wo=Re(),tdt=Wo.util.inherit;Wo.Signers.V3=tdt(Wo.Signers.RequestSigner,{addAuthorization:function(t,r){var n=Wo.util.date.rfc822(r);this.request.headers["X-Amz-Date"]=n,t.sessionToken&&(this.request.headers["x-amz-security-token"]=t.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(t,n)},authorization:function(t){return"AWS3 AWSAccessKeyId="+t.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(t)},signedHeaders:function(){var t=[];return Wo.util.arrayEach(this.headersToSign(),function(n){t.push(n.toLowerCase())}),t.sort().join(";")},canonicalHeaders:function(){var t=this.request.headers,r=[];return Wo.util.arrayEach(this.headersToSign(),function(i){r.push(i.toLowerCase().trim()+":"+String(t[i]).trim())}),r.sort().join(`
|
|
164
164
|
`)+`
|
|
165
165
|
`},headersToSign:function(){var t=[];return Wo.util.each(this.request.headers,function(n){(n==="Host"||n==="Content-Encoding"||n.match(/^X-Amz/i))&&t.push(n)}),t},signature:function(t){return Wo.util.crypto.hmac(t.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var t=[];return t.push(this.request.method),t.push("/"),t.push(""),t.push(this.canonicalHeaders()),t.push(this.request.body),Wo.util.crypto.sha256(t.join(`
|
|
@@ -179,11 +179,11 @@ Error: ${t.message}`);try{let r=`${e}.bak`;hc.default.renameSync(e,r),Ce.warn(`Y
|
|
|
179
179
|
`,p="0124356789",d="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",m=`'"`,v=f+">",_="[CDATA[",b="DOCTYPE",y="http://www.w3.org/XML/1998/namespace",T="http://www.w3.org/2000/xmlns/",S={xml:y,xmlns:T};f=B(f),p=B(p),d=B(d);var E=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,C=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,I=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,q=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;m=B(m),v=B(v);function B(F){return F.split("").reduce(function(A,Z){return A[Z]=!0,A},{})}function M(F){return Object.prototype.toString.call(F)==="[object RegExp]"}function R(F,A){return M(F)?!!A.match(F):F[A]}function D(F,A){return!R(F,A)}var N=0;e.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(F){var A=e.ENTITIES[F],Z=typeof A=="number"?String.fromCharCode(A):A;e.ENTITIES[F]=Z});for(var Y in e.STATE)e.STATE[e.STATE[Y]]=Y;N=e.STATE;function oe(F,A,Z){F[A]&&F[A](Z)}function H(F,A,Z){F.textNode&&U(F),oe(F,A,Z)}function U(F){F.textNode=ee(F.opt,F.textNode),F.textNode&&oe(F,"ontext",F.textNode),F.textNode=""}function ee(F,A){return F.trim&&(A=A.trim()),F.normalize&&(A=A.replace(/\s+/g," ")),A}function Q(F,A){return U(F),F.trackPosition&&(A+=`
|
|
180
180
|
Line: `+F.line+`
|
|
181
181
|
Column: `+F.column+`
|
|
182
|
-
Char: `+F.c),A=new Error(A),F.error=A,oe(F,"onerror",A),F}function pe(F){return F.sawRoot&&!F.closedRoot&&ge(F,"Unclosed root tag"),F.state!==N.BEGIN&&F.state!==N.BEGIN_WHITESPACE&&F.state!==N.TEXT&&Q(F,"Unexpected end"),U(F),F.c="",F.closed=!0,oe(F,"onend"),r.call(F,F.strict,F.opt),F}function ge(F,A){if(typeof F!="object"||!(F instanceof r))throw new Error("bad call to strictFail");F.strict&&Q(F,A)}function
|
|
182
|
+
Char: `+F.c),A=new Error(A),F.error=A,oe(F,"onerror",A),F}function pe(F){return F.sawRoot&&!F.closedRoot&&ge(F,"Unclosed root tag"),F.state!==N.BEGIN&&F.state!==N.BEGIN_WHITESPACE&&F.state!==N.TEXT&&Q(F,"Unexpected end"),U(F),F.c="",F.closed=!0,oe(F,"onend"),r.call(F,F.strict,F.opt),F}function ge(F,A){if(typeof F!="object"||!(F instanceof r))throw new Error("bad call to strictFail");F.strict&&Q(F,A)}function we(F){F.strict||(F.tagName=F.tagName[F.looseCase]());var A=F.tags[F.tags.length-1]||F,Z=F.tag={name:F.tagName,attributes:{}};F.opt.xmlns&&(Z.ns=A.ns),F.attribList.length=0,H(F,"onopentagstart",Z)}function We(F,A){var Z=F.indexOf(":"),V=Z<0?["",F]:F.split(":"),He=V[0],Fe=V[1];return A&&F==="xmlns"&&(He="xmlns",Fe=""),{prefix:He,local:Fe}}function et(F){if(F.strict||(F.attribName=F.attribName[F.looseCase]()),F.attribList.indexOf(F.attribName)!==-1||F.tag.attributes.hasOwnProperty(F.attribName)){F.attribName=F.attribValue="";return}if(F.opt.xmlns){var A=We(F.attribName,!0),Z=A.prefix,V=A.local;if(Z==="xmlns")if(V==="xml"&&F.attribValue!==y)ge(F,"xml: prefix must be bound to "+y+`
|
|
183
183
|
Actual: `+F.attribValue);else if(V==="xmlns"&&F.attribValue!==T)ge(F,"xmlns: prefix must be bound to "+T+`
|
|
184
184
|
Actual: `+F.attribValue);else{var He=F.tag,Fe=F.tags[F.tags.length-1]||F;He.ns===Fe.ns&&(He.ns=Object.create(Fe.ns)),He.ns[V]=F.attribValue}F.attribList.push([F.attribName,F.attribValue])}else F.tag.attributes[F.attribName]=F.attribValue,H(F,"onattribute",{name:F.attribName,value:F.attribValue});F.attribName=F.attribValue=""}function tt(F,A){if(F.opt.xmlns){var Z=F.tag,V=We(F.tagName);Z.prefix=V.prefix,Z.local=V.local,Z.uri=Z.ns[V.prefix]||"",Z.prefix&&!Z.uri&&(ge(F,"Unbound namespace prefix: "+JSON.stringify(F.tagName)),Z.uri=V.prefix);var He=F.tags[F.tags.length-1]||F;Z.ns&&He.ns!==Z.ns&&Object.keys(Z.ns).forEach(function(Eo){H(F,"onopennamespace",{prefix:Eo,uri:Z.ns[Eo]})});for(var Fe=0,$t=F.attribList.length;Fe<$t;Fe++){var yr=F.attribList[Fe],Gr=yr[0],Ae=yr[1],Vt=We(Gr,!0),Cn=Vt.prefix,qf=Vt.local,wo=Cn===""?"":Z.ns[Cn]||"",Hc={name:Gr,value:Ae,prefix:Cn,local:qf,uri:wo};Cn&&Cn!=="xmlns"&&!wo&&(ge(F,"Unbound namespace prefix: "+JSON.stringify(Cn)),Hc.uri=Cn),F.tag.attributes[Gr]=Hc,H(F,"onattribute",Hc)}F.attribList.length=0}F.tag.isSelfClosing=!!A,F.sawRoot=!0,F.tags.push(F.tag),H(F,"onopentag",F.tag),A||(!F.noscript&&F.tagName.toLowerCase()==="script"?F.state=N.SCRIPT:F.state=N.TEXT,F.tag=null,F.tagName=""),F.attribName=F.attribValue="",F.attribList.length=0}function xt(F){if(!F.tagName){ge(F,"Weird empty close tag."),F.textNode+="</>",F.state=N.TEXT;return}if(F.script){if(F.tagName!=="script"){F.script+="</"+F.tagName+">",F.tagName="",F.state=N.SCRIPT;return}H(F,"onscript",F.script),F.script=""}var A=F.tags.length,Z=F.tagName;F.strict||(Z=Z[F.looseCase]());for(var V=Z;A--;){var He=F.tags[A];if(He.name!==V)ge(F,"Unexpected close tag");else break}if(A<0){ge(F,"Unmatched closing tag: "+F.tagName),F.textNode+="</"+F.tagName+">",F.state=N.TEXT;return}F.tagName=Z;for(var Fe=F.tags.length;Fe-- >A;){var $t=F.tag=F.tags.pop();F.tagName=F.tag.name,H(F,"onclosetag",F.tagName);var yr={};for(var Gr in $t.ns)yr[Gr]=$t.ns[Gr];var Ae=F.tags[F.tags.length-1]||F;F.opt.xmlns&&$t.ns!==Ae.ns&&Object.keys($t.ns).forEach(function(Vt){var Cn=$t.ns[Vt];H(F,"onclosenamespace",{prefix:Vt,uri:Cn})})}A===0&&(F.closedRoot=!0),F.tagName=F.attribValue=F.attribName="",F.attribList.length=0,F.state=N.TEXT}function Ne(F){var A=F.entity,Z=A.toLowerCase(),V,He="";return F.ENTITIES[A]?F.ENTITIES[A]:F.ENTITIES[Z]?F.ENTITIES[Z]:(A=Z,A.charAt(0)==="#"&&(A.charAt(1)==="x"?(A=A.slice(2),V=parseInt(A,16),He=V.toString(16)):(A=A.slice(1),V=parseInt(A,10),He=V.toString(10))),A=A.replace(/^0+/,""),He.toLowerCase()!==A?(ge(F,"Invalid character entity"),"&"+F.entity+";"):String.fromCodePoint(V))}function Dr(F,A){A==="<"?(F.state=N.OPEN_WAKA,F.startTagPosition=F.position):D(f,A)&&(ge(F,"Non-whitespace before first tag."),F.textNode=A,F.state=N.TEXT)}function zt(F,A){var Z="";return A<F.length&&(Z=F.charAt(A)),Z}function xe(F){var A=this;if(this.error)throw this.error;if(A.closed)return Q(A,"Cannot write after close. Assign an onready handler.");if(F===null)return pe(A);typeof F=="object"&&(F=F.toString());for(var Z=0,V="";V=zt(F,Z++),A.c=V,!!V;)switch(A.trackPosition&&(A.position++,V===`
|
|
185
185
|
`?(A.line++,A.column=0):A.column++),A.state){case N.BEGIN:if(A.state=N.BEGIN_WHITESPACE,V==="\uFEFF")continue;Dr(A,V);continue;case N.BEGIN_WHITESPACE:Dr(A,V);continue;case N.TEXT:if(A.sawRoot&&!A.closedRoot){for(var He=Z-1;V&&V!=="<"&&V!=="&";)V=zt(F,Z++),V&&A.trackPosition&&(A.position++,V===`
|
|
186
|
-
`?(A.line++,A.column=0):A.column++);A.textNode+=F.substring(He,Z-1)}V==="<"&&!(A.sawRoot&&A.closedRoot&&!A.strict)?(A.state=N.OPEN_WAKA,A.startTagPosition=A.position):(D(f,V)&&(!A.sawRoot||A.closedRoot)&&ge(A,"Text data outside of root node."),V==="&"?A.state=N.TEXT_ENTITY:A.textNode+=V);continue;case N.SCRIPT:V==="<"?A.state=N.SCRIPT_ENDING:A.script+=V;continue;case N.SCRIPT_ENDING:V==="/"?A.state=N.CLOSE_TAG:(A.script+="<"+V,A.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(V==="!")A.state=N.SGML_DECL,A.sgmlDecl="";else if(!R(f,V))if(R(E,V))A.state=N.OPEN_TAG,A.tagName=V;else if(V==="/")A.state=N.CLOSE_TAG,A.tagName="";else if(V==="?")A.state=N.PROC_INST,A.procInstName=A.procInstBody="";else{if(ge(A,"Unencoded <"),A.startTagPosition+1<A.position){var Fe=A.position-A.startTagPosition;V=new Array(Fe).join(" ")+V}A.textNode+="<"+V,A.state=N.TEXT}continue;case N.SGML_DECL:(A.sgmlDecl+V).toUpperCase()===_?(H(A,"onopencdata"),A.state=N.CDATA,A.sgmlDecl="",A.cdata=""):A.sgmlDecl+V==="--"?(A.state=N.COMMENT,A.comment="",A.sgmlDecl=""):(A.sgmlDecl+V).toUpperCase()===b?(A.state=N.DOCTYPE,(A.doctype||A.sawRoot)&&ge(A,"Inappropriately located doctype declaration"),A.doctype="",A.sgmlDecl=""):V===">"?(H(A,"onsgmldeclaration",A.sgmlDecl),A.sgmlDecl="",A.state=N.TEXT):(R(m,V)&&(A.state=N.SGML_DECL_QUOTED),A.sgmlDecl+=V);continue;case N.SGML_DECL_QUOTED:V===A.q&&(A.state=N.SGML_DECL,A.q=""),A.sgmlDecl+=V;continue;case N.DOCTYPE:V===">"?(A.state=N.TEXT,H(A,"ondoctype",A.doctype),A.doctype=!0):(A.doctype+=V,V==="["?A.state=N.DOCTYPE_DTD:R(m,V)&&(A.state=N.DOCTYPE_QUOTED,A.q=V));continue;case N.DOCTYPE_QUOTED:A.doctype+=V,V===A.q&&(A.q="",A.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:A.doctype+=V,V==="]"?A.state=N.DOCTYPE:R(m,V)&&(A.state=N.DOCTYPE_DTD_QUOTED,A.q=V);continue;case N.DOCTYPE_DTD_QUOTED:A.doctype+=V,V===A.q&&(A.state=N.DOCTYPE_DTD,A.q="");continue;case N.COMMENT:V==="-"?A.state=N.COMMENT_ENDING:A.comment+=V;continue;case N.COMMENT_ENDING:V==="-"?(A.state=N.COMMENT_ENDED,A.comment=ee(A.opt,A.comment),A.comment&&H(A,"oncomment",A.comment),A.comment=""):(A.comment+="-"+V,A.state=N.COMMENT);continue;case N.COMMENT_ENDED:V!==">"?(ge(A,"Malformed comment"),A.comment+="--"+V,A.state=N.COMMENT):A.state=N.TEXT;continue;case N.CDATA:V==="]"?A.state=N.CDATA_ENDING:A.cdata+=V;continue;case N.CDATA_ENDING:V==="]"?A.state=N.CDATA_ENDING_2:(A.cdata+="]"+V,A.state=N.CDATA);continue;case N.CDATA_ENDING_2:V===">"?(A.cdata&&H(A,"oncdata",A.cdata),H(A,"onclosecdata"),A.cdata="",A.state=N.TEXT):V==="]"?A.cdata+="]":(A.cdata+="]]"+V,A.state=N.CDATA);continue;case N.PROC_INST:V==="?"?A.state=N.PROC_INST_ENDING:R(f,V)?A.state=N.PROC_INST_BODY:A.procInstName+=V;continue;case N.PROC_INST_BODY:if(!A.procInstBody&&R(f,V))continue;V==="?"?A.state=N.PROC_INST_ENDING:A.procInstBody+=V;continue;case N.PROC_INST_ENDING:V===">"?(H(A,"onprocessinginstruction",{name:A.procInstName,body:A.procInstBody}),A.procInstName=A.procInstBody="",A.state=N.TEXT):(A.procInstBody+="?"+V,A.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:R(C,V)?A.tagName+=V:(be(A),V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:(D(f,V)&&ge(A,"Invalid character in tag name"),A.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:V===">"?(tt(A,!0),xt(A)):(ge(A,"Forward-slash in opening tag not followed by >"),A.state=N.ATTRIB);continue;case N.ATTRIB:if(R(f,V))continue;V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:R(E,V)?(A.attribName=V,A.attribValue="",A.state=N.ATTRIB_NAME):ge(A,"Invalid attribute name");continue;case N.ATTRIB_NAME:V==="="?A.state=N.ATTRIB_VALUE:V===">"?(ge(A,"Attribute without value"),A.attribValue=A.attribName,et(A),tt(A)):R(f,V)?A.state=N.ATTRIB_NAME_SAW_WHITE:R(C,V)?A.attribName+=V:ge(A,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(V==="=")A.state=N.ATTRIB_VALUE;else{if(R(f,V))continue;ge(A,"Attribute without value"),A.tag.attributes[A.attribName]="",A.attribValue="",H(A,"onattribute",{name:A.attribName,value:""}),A.attribName="",V===">"?tt(A):R(E,V)?(A.attribName=V,A.state=N.ATTRIB_NAME):(ge(A,"Invalid attribute name"),A.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(R(f,V))continue;R(m,V)?(A.q=V,A.state=N.ATTRIB_VALUE_QUOTED):(ge(A,"Unquoted attribute value"),A.state=N.ATTRIB_VALUE_UNQUOTED,A.attribValue=V);continue;case N.ATTRIB_VALUE_QUOTED:if(V!==A.q){V==="&"?A.state=N.ATTRIB_VALUE_ENTITY_Q:A.attribValue+=V;continue}et(A),A.q="",A.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:R(f,V)?A.state=N.ATTRIB:V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:R(E,V)?(ge(A,"No whitespace between attributes"),A.attribName=V,A.attribValue="",A.state=N.ATTRIB_NAME):ge(A,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(D(v,V)){V==="&"?A.state=N.ATTRIB_VALUE_ENTITY_U:A.attribValue+=V;continue}et(A),V===">"?tt(A):A.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(A.tagName)V===">"?xt(A):R(C,V)?A.tagName+=V:A.script?(A.script+="</"+A.tagName,A.tagName="",A.state=N.SCRIPT):(D(f,V)&&ge(A,"Invalid tagname in closing tag"),A.state=N.CLOSE_TAG_SAW_WHITE);else{if(R(f,V))continue;D(E,V)?A.script?(A.script+="</"+V,A.state=N.SCRIPT):ge(A,"Invalid tagname in closing tag."):A.tagName=V}continue;case N.CLOSE_TAG_SAW_WHITE:if(R(f,V))continue;V===">"?xt(A):ge(A,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var $t,yr;switch(A.state){case N.TEXT_ENTITY:$t=N.TEXT,yr="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:$t=N.ATTRIB_VALUE_QUOTED,yr="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:$t=N.ATTRIB_VALUE_UNQUOTED,yr="attribValue";break}V===";"?(A[yr]+=Ne(A),A.entity="",A.state=$t):R(A.entity.length?q:I,V)?A.entity+=V:(ge(A,"Invalid character in entity name"),A[yr]+="&"+A.entity+V,A.entity="",A.state=$t);continue;default:throw new Error(A,"Unknown state: "+A.state)}return A.position>=A.bufferCheckPosition&&n(A),A}String.fromCodePoint||function(){var F=String.fromCharCode,A=Math.floor,Z=function(){var V=16384,He=[],Fe,$t,yr=-1,Gr=arguments.length;if(!Gr)return"";for(var Ae="";++yr<Gr;){var Vt=Number(arguments[yr]);if(!isFinite(Vt)||Vt<0||Vt>1114111||A(Vt)!==Vt)throw RangeError("Invalid code point: "+Vt);Vt<=65535?He.push(Vt):(Vt-=65536,Fe=(Vt>>10)+55296,$t=Vt%1024+56320,He.push(Fe,$t)),(yr+1===Gr||He.length>V)&&(Ae+=F.apply(null,He),He.length=0)}return Ae};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Z,configurable:!0,writable:!0}):String.fromCodePoint=Z}()})(typeof FE>"u"?FE.sax={}:FE)});var cce=g(Xk=>{(function(){"use strict";Xk.stripBOM=function(e){return e[0]==="\uFEFF"?e.substring(1):e}}).call(Xk)});var Yk=g(Kl=>{(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),Kl.normalize=function(t){return t.toLowerCase()},Kl.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},Kl.stripPrefix=function(t){return t.replace(e,"")},Kl.parseNumbers=function(t){return isNaN(t)||(t=t%1===0?parseInt(t,10):parseFloat(t)),t},Kl.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t=t.toLowerCase()==="true"),t}}).call(Kl)});var lce=g(Xa=>{(function(){"use strict";var e,t,r,n,i,s,o,a,u=function(p,d){return function(){return p.apply(d,arguments)}},c=function(p,d){for(var m in d)f.call(d,m)&&(p[m]=d[m]);function v(){this.constructor=p}return v.prototype=d.prototype,p.prototype=new v,p.__super__=d.prototype,p},f={}.hasOwnProperty;o=uce(),r=require("events"),e=cce(),s=Yk(),a=require("timers").setImmediate,t=wE().defaults,n=function(p){return typeof p=="object"&&p!=null&&Object.keys(p).length===0},i=function(p,d,m){var v,_,b;for(v=0,_=p.length;v<_;v++)b=p[v],d=b(d,m);return d},Xa.Parser=function(p){c(d,p);function d(m){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var v,_,b;if(!(this instanceof Xa.Parser))return new Xa.Parser(m);this.options={},_=t["0.2"];for(v in _)f.call(_,v)&&(b=_[v],this.options[v]=b);for(v in m)f.call(m,v)&&(b=m[v],this.options[v]=b);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return d.prototype.processAsync=function(){var m,v;try{return this.remaining.length<=this.options.chunkSize?(m=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(m),this.saxParser.close()):(m=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(m),a(this.processAsync))}catch(_){if(v=_,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(v)}},d.prototype.assignOrPush=function(m,v,_){return v in m?(m[v]instanceof Array||(m[v]=[m[v]]),m[v].push(_)):this.options.explicitArray?m[v]=[_]:m[v]=_},d.prototype.reset=function(){var m,v,_,b;return this.removeAllListeners(),this.saxParser=o.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(y){return function(T){if(y.saxParser.resume(),!y.saxParser.errThrown)return y.saxParser.errThrown=!0,y.emit("error",T)}}(this),this.saxParser.onend=function(y){return function(){if(!y.saxParser.ended)return y.saxParser.ended=!0,y.emit("end",y.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],m=this.options.attrkey,v=this.options.charkey,this.saxParser.onopentag=function(y){return function(T){var S,E,C,I,q;if(C=Object.create(null),C[v]="",!y.options.ignoreAttrs){q=T.attributes;for(S in q)f.call(q,S)&&(!(m in C)&&!y.options.mergeAttrs&&(C[m]=Object.create(null)),E=y.options.attrValueProcessors?i(y.options.attrValueProcessors,T.attributes[S],S):T.attributes[S],I=y.options.attrNameProcessors?i(y.options.attrNameProcessors,S):S,y.options.mergeAttrs?y.assignOrPush(C,I,E):C[m][I]=E)}return C["#name"]=y.options.tagNameProcessors?i(y.options.tagNameProcessors,T.name):T.name,y.options.xmlns&&(C[y.options.xmlnskey]={uri:T.uri,local:T.local}),b.push(C)}}(this),this.saxParser.onclosetag=function(y){return function(){var T,S,E,C,I,q,B,M,R,D;if(q=b.pop(),I=q["#name"],(!y.options.explicitChildren||!y.options.preserveChildrenOrder)&&delete q["#name"],q.cdata===!0&&(T=q.cdata,delete q.cdata),R=b[b.length-1],q[v].match(/^\s*$/)&&!T?(S=q[v],delete q[v]):(y.options.trim&&(q[v]=q[v].trim()),y.options.normalize&&(q[v]=q[v].replace(/\s{2,}/g," ").trim()),q[v]=y.options.valueProcessors?i(y.options.valueProcessors,q[v],I):q[v],Object.keys(q).length===1&&v in q&&!y.EXPLICIT_CHARKEY&&(q=q[v])),n(q)&&(typeof y.options.emptyTag=="function"?q=y.options.emptyTag():q=y.options.emptyTag!==""?y.options.emptyTag:S),y.options.validator!=null&&(D="/"+function(){var N,Y,oe;for(oe=[],N=0,Y=b.length;N<Y;N++)C=b[N],oe.push(C["#name"]);return oe}().concat(I).join("/"),function(){var N;try{return q=y.options.validator(D,R&&R[I],q)}catch(Y){return N=Y,y.emit("error",N)}}()),y.options.explicitChildren&&!y.options.mergeAttrs&&typeof q=="object"){if(!y.options.preserveChildrenOrder)C=Object.create(null),y.options.attrkey in q&&(C[y.options.attrkey]=q[y.options.attrkey],delete q[y.options.attrkey]),!y.options.charsAsChildren&&y.options.charkey in q&&(C[y.options.charkey]=q[y.options.charkey],delete q[y.options.charkey]),Object.getOwnPropertyNames(q).length>0&&(C[y.options.childkey]=q),q=C;else if(R){R[y.options.childkey]=R[y.options.childkey]||[],B=Object.create(null);for(E in q)f.call(q,E)&&(B[E]=q[E]);R[y.options.childkey].push(B),delete q["#name"],Object.keys(q).length===1&&v in q&&!y.EXPLICIT_CHARKEY&&(q=q[v])}}return b.length>0?y.assignOrPush(R,I,q):(y.options.explicitRoot&&(M=q,q=Object.create(null),q[I]=M),y.resultObject=q,y.saxParser.ended=!0,y.emit("end",y.resultObject))}}(this),_=function(y){return function(T){var S,E;if(E=b[b.length-1],E)return E[v]+=T,y.options.explicitChildren&&y.options.preserveChildrenOrder&&y.options.charsAsChildren&&(y.options.includeWhiteChars||T.replace(/\\n/g,"").trim()!=="")&&(E[y.options.childkey]=E[y.options.childkey]||[],S={"#name":"__text__"},S[v]=T,y.options.normalize&&(S[v]=S[v].replace(/\s{2,}/g," ").trim()),E[y.options.childkey].push(S)),E}}(this),this.saxParser.ontext=_,this.saxParser.oncdata=function(y){return function(T){var S;if(S=_(T),S)return S.cdata=!0}}(this)},d.prototype.parseString=function(m,v){var _;v!=null&&typeof v=="function"&&(this.on("end",function(b){return this.reset(),v(null,b)}),this.on("error",function(b){return this.reset(),v(b)}));try{return m=m.toString(),m.trim()===""?(this.emit("end",null),!0):(m=e.stripBOM(m),this.options.async?(this.remaining=m,a(this.processAsync),this.saxParser):this.saxParser.write(m).close())}catch(b){if(_=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw _}else return this.emit("error",_),this.saxParser.errThrown=!0}},d.prototype.parseStringPromise=function(m){return new Promise(function(v){return function(_,b){return v.parseString(m,function(y,T){return y?b(y):_(T)})}}(this))},d}(r),Xa.parseString=function(p,d,m){var v,_,b;return m!=null?(typeof m=="function"&&(v=m),typeof d=="object"&&(_=d)):(typeof d=="function"&&(v=d),_={}),b=new Xa.Parser(_),b.parseString(p,v)},Xa.parseStringPromise=function(p,d){var m,v;return typeof d=="object"&&(m=d),v=new Xa.Parser(m),v.parseStringPromise(p)}}).call(Xa)});var fce=g(Ya=>{(function(){"use strict";var e,t,r,n,i=function(o,a){for(var u in a)s.call(a,u)&&(o[u]=a[u]);function c(){this.constructor=o}return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},s={}.hasOwnProperty;t=wE(),e=ace(),r=lce(),n=Yk(),Ya.defaults=t.defaults,Ya.processors=n,Ya.ValidationError=function(o){i(a,o);function a(u){this.message=u}return a}(Error),Ya.Builder=e.Builder,Ya.Parser=r.Parser,Ya.parseString=r.parseString,Ya.parseStringPromise=r.parseStringPromise}).call(Ya)});var vce=g((Drr,gce)=>{var pce=Re(),_0=pce.util,Qht=pce.Model.Shape,emt=fce(),tmt={explicitCharkey:!1,trim:!1,normalize:!1,explicitRoot:!1,emptyTag:null,explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,validator:null};function dce(){}dce.prototype.parse=function(e,t){t=t||{};var r=null,n=null,i=new emt.Parser(tmt);if(i.parseString(e,function(o,a){n=o,r=a}),r){var s=Ja(r,t);return r.ResponseMetadata&&(s.ResponseMetadata=Ja(r.ResponseMetadata[0],{})),s}else{if(n)throw _0.error(n,{code:"XMLParserError",retryable:!0});return Ja({},t)}};function Ja(e,t){switch(t.type){case"structure":return rmt(e,t);case"map":return nmt(e,t);case"list":return hce(e,t);case void 0:case null:return imt(e);default:return mce(e,t)}}function rmt(e,t){var r={};return e===null||_0.each(t.members,function(n,i){var s=i.name;if(Object.prototype.hasOwnProperty.call(e,s)&&Array.isArray(e[s])){var o=e[s];i.flattened||(o=o[0]),r[n]=Ja(o,i)}else i.isXmlAttribute&&e.$&&Object.prototype.hasOwnProperty.call(e.$,s)?r[n]=mce(e.$[s],i):i.type==="list"&&!t.api.xmlNoDefaultLists&&(r[n]=i.defaultValue)}),r}function nmt(e,t){var r={};if(e===null)return r;var n=t.key.name||"key",i=t.value.name||"value",s=t.flattened?e:e.entry;return Array.isArray(s)&&_0.arrayEach(s,function(o){r[o[n][0]]=Ja(o[i][0],t.value)}),r}function hce(e,t){var r=[],n=t.member.name||"member";return t.flattened?_0.arrayEach(e,function(i){r.push(Ja(i,t.member))}):e&&Array.isArray(e[n])&&_0.arrayEach(e[n],function(i){r.push(Ja(i,t.member))}),r}function mce(e,t){return e&&e.$&&e.$.encoding==="base64"&&(t=new Qht.create({type:e.$.encoding})),e&&e._&&(e=e._),typeof t.toType=="function"?t.toType(e):e}function imt(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e)){var t=[];for(n=0;n<e.length;n++)t.push(Ja(e[n],{}));return t}var r=Object.keys(e),n;if(r.length===0||r.length===1&&r[0]==="$")return{};var i={};for(n=0;n<r.length;n++){var s=r[n],o=e[s];s!=="$"&&(o.length>1?i[s]=hce(o,{member:{}}):i[s]=Ja(o[0],{}))}return i}gce.exports=dce});var yce=g(()=>{var qr=Re(),smt=qr.util.stream.Stream,xce=qr.util.stream.Transform,omt=qr.util.stream.Readable;Jw();var amt="AWS_NODEJS_CONNECTION_REUSE_ENABLED";qr.NodeHttpClient=qr.util.inherit({handleRequest:function(t,r,n,i){var s=this,o=t.endpoint,a="";r||(r={}),r.proxy&&(a=o.protocol+"//"+o.hostname,o.port!==80&&o.port!==443&&(a+=":"+o.port),o=new qr.Endpoint(r.proxy));var u=o.protocol==="https:",c=u?require("https"):require("http"),f={host:o.hostname,port:o.port,method:t.method,headers:t.headers,path:a+t.path};r.agent||(f.agent=this.getAgent(u,{keepAlive:process.env[amt]==="1"})),qr.util.update(f,r),delete f.proxy,delete f.timeout;var p=c.request(f,function(v){p.didCallback||(n(v),v.emit("headers",v.statusCode,v.headers,v.statusMessage))});if(t.stream=p,p.didCallback=!1,r.connectTimeout){var d;p.on("socket",function(v){v.connecting&&(d=setTimeout(function(){p.didCallback||(p.didCallback=!0,p.abort(),i(qr.util.error(new Error("Socket timed out without establishing a connection"),{code:"TimeoutError"})))},r.connectTimeout),v.on("connect",function(){clearTimeout(d),d=null}))})}p.setTimeout(r.timeout||0,function(){if(!p.didCallback){p.didCallback=!0;var v="Connection timed out after "+r.timeout+"ms";i(qr.util.error(new Error(v),{code:"TimeoutError"})),p.abort()}}),p.on("error",function(v){d&&(clearTimeout(d),d=null),!p.didCallback&&(p.didCallback=!0,v.code==="ECONNRESET"||v.code==="EPIPE"||v.code==="ETIMEDOUT"?i(qr.util.error(v,{code:"TimeoutError"})):i(v))});var m=t.headers.Expect||t.headers.expect;return m==="100-continue"?p.once("continue",function(){s.writeBody(p,t)}):this.writeBody(p,t),p},writeBody:function(t,r){var n=r.body,i=parseInt(r.headers["Content-Length"],10);if(n instanceof smt){var s=this.progressStream(t,i);s?n.pipe(s).pipe(t):n.pipe(t)}else n?(t.once("finish",function(){t.emit("sendProgress",{loaded:i,total:i})}),t.end(n)):t.end()},getAgent:function(t,r){var n=t?require("https"):require("http");return t?(qr.NodeHttpClient.sslAgent||(qr.NodeHttpClient.sslAgent=new n.Agent(qr.util.merge({rejectUnauthorized:process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0"},r||{})),qr.NodeHttpClient.sslAgent.setMaxListeners(0),Object.defineProperty(qr.NodeHttpClient.sslAgent,"maxSockets",{enumerable:!0,get:function(){var i=50,s=n.globalAgent;return s&&s.maxSockets!==1/0&&typeof s.maxSockets=="number"?s.maxSockets:i}})),qr.NodeHttpClient.sslAgent):(qr.NodeHttpClient.agent||(qr.NodeHttpClient.agent=new n.Agent(r)),qr.NodeHttpClient.agent)},progressStream:function(t,r){if(!(typeof xce>"u")){var n=0,i=new xce;return i._transform=function(s,o,a){s&&(n+=s.length,t.emit("sendProgress",{loaded:n,total:r})),a(null,s)},i}},emitter:null});qr.HttpClient.prototype=qr.NodeHttpClient.prototype;qr.HttpClient.streamsApiVersion=omt?2:1});var _ce=g(()=>{var Ds=Re(),umt=require("fs"),cmt=vc(),lmt=Ds.util.iniLoader;Ds.TokenFileWebIdentityCredentials=Ds.util.inherit(Ds.Credentials,{constructor:function(t){Ds.Credentials.call(this),this.data=null,this.clientConfig=Ds.util.copy(t||{})},getParamsFromEnv:function(){var t="AWS_WEB_IDENTITY_TOKEN_FILE",r="AWS_ROLE_ARN";if(process.env[t]&&process.env[r])return[{envTokenFile:process.env[t],roleArn:process.env[r],roleSessionName:process.env.AWS_ROLE_SESSION_NAME}]},getParamsFromSharedConfig:function(){var t=Ds.util.getProfilesFromSharedConfig(lmt),r=process.env.AWS_PROFILE||Ds.util.defaultProfile,n=t[r]||{};if(Object.keys(n).length===0)throw Ds.util.error(new Error("Profile "+r+" not found"),{code:"TokenFileWebIdentityCredentialsProviderFailure"});for(var i=[];!n.web_identity_token_file&&n.source_profile;){i.unshift({roleArn:n.role_arn,roleSessionName:n.role_session_name});var s=n.source_profile;n=t[s]}return i.unshift({envTokenFile:n.web_identity_token_file,roleArn:n.role_arn,roleSessionName:n.role_session_name}),i},refresh:function(t){this.coalesceRefresh(t||Ds.util.fn.callback)},assumeRoleChaining:function(t,r){var n=this;if(t.length===0)n.service.credentialsFrom(n.data,n),r();else{var i=t.shift();n.service.config.credentials=n.service.credentialsFrom(n.data,n),n.service.assumeRole({RoleArn:i.roleArn,RoleSessionName:i.roleSessionName||"token-file-web-identity"},function(s,o){n.data=null,s?r(s):(n.data=o,n.assumeRoleChaining(t,r))})}},load:function(t){var r=this;try{var n=r.getParamsFromEnv();if(n||(n=r.getParamsFromSharedConfig()),n){var i=n.shift(),s=umt.readFileSync(i.envTokenFile,{encoding:"ascii"});r.service||r.createClients(),r.service.assumeRoleWithWebIdentity({WebIdentityToken:s,RoleArn:i.roleArn,RoleSessionName:i.roleSessionName||"token-file-web-identity"},function(o,a){r.data=null,o?t(o):(r.data=a,r.assumeRoleChaining(n,t))})}}catch(o){t(o)}},createClients:function(){if(!this.service){var e=Ds.util.merge({},this.clientConfig);this.service=new cmt(e),this.service.retryableError=function(t){return t.code==="IDPCommunicationErrorException"||t.code==="InvalidIdentityToken"?!0:Ds.Service.prototype.retryableError.call(this,t)}}}})});var wce=g((jrr,bce)=>{var fmt=function(){return{IPv4:"http://169.254.169.254",IPv6:"http://[fd00:ec2::254]"}};bce.exports=fmt});var Jk=g((Urr,Ece)=>{var pmt=function(){return{IPv4:"IPv4",IPv6:"IPv6"}};Ece.exports=pmt});var Cce=g((Hrr,Sce)=>{var dmt="AWS_EC2_METADATA_SERVICE_ENDPOINT",hmt="ec2_metadata_service_endpoint",mmt=function(){return{environmentVariableSelector:function(e){return e[dmt]},configFileSelector:function(e){return e[hmt]},default:void 0}};Sce.exports=mmt});var Ace=g((zrr,Tce)=>{var gmt=Jk()(),vmt="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",xmt="ec2_metadata_service_endpoint_mode",ymt=function(){return{environmentVariableSelector:function(e){return e[vmt]},configFileSelector:function(e){return e[xmt]},default:gmt.IPv4}};Tce.exports=ymt});var qce=g(($rr,Nce)=>{var Oce=Re(),Ice=wce()(),Rce=Jk()(),_mt=Cce()(),bmt=Ace()(),wmt=function(){var e=Oce.util.loadConfig(_mt);if(e!==void 0)return e;var t=Oce.util.loadConfig(bmt);switch(t){case Rce.IPv4:return Ice.IPv4;case Rce.IPv6:return Ice.IPv6;default:throw new Error("Unsupported endpoint mode: "+t)}};Nce.exports=wmt});var Dce=g((Wrr,kce)=>{var ho=Re();Jw();var Emt=ho.util.inherit,Smt=qce(),Pce=require("url").URL;ho.MetadataService=Emt({endpoint:Smt(),httpOptions:{timeout:0},disableFetchToken:!1,constructor:function(t){t&&t.host&&(t.endpoint="http://"+t.host,delete t.host),ho.util.update(this,t)},request:function(t,r,n){if(arguments.length===2&&(n=r,r={}),process.env[ho.util.imdsDisabledEnv]){n(new Error("EC2 Instance Metadata Service access disabled"));return}t=t||"/",Pce&&new Pce(this.endpoint);var i=new ho.HttpRequest(this.endpoint+t);i.method=r.method||"GET",r.headers&&(i.headers=r.headers),ho.util.handleRequestWithRetries(i,this,n)},loadCredentialsCallbacks:[],fetchMetadataToken:function(t){var r=this,n="/latest/api/token";r.request(n,{method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}},t)},fetchCredentials:function(t,r){var n=this,i="/latest/meta-data/iam/security-credentials/";n.request(i,t,function(s,o){if(s){n.disableFetchToken=s.statusCode!==401,r(ho.util.error(s,{message:"EC2 Metadata roleName request returned error"}));return}o=o.split(`
|
|
186
|
+
`?(A.line++,A.column=0):A.column++);A.textNode+=F.substring(He,Z-1)}V==="<"&&!(A.sawRoot&&A.closedRoot&&!A.strict)?(A.state=N.OPEN_WAKA,A.startTagPosition=A.position):(D(f,V)&&(!A.sawRoot||A.closedRoot)&&ge(A,"Text data outside of root node."),V==="&"?A.state=N.TEXT_ENTITY:A.textNode+=V);continue;case N.SCRIPT:V==="<"?A.state=N.SCRIPT_ENDING:A.script+=V;continue;case N.SCRIPT_ENDING:V==="/"?A.state=N.CLOSE_TAG:(A.script+="<"+V,A.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(V==="!")A.state=N.SGML_DECL,A.sgmlDecl="";else if(!R(f,V))if(R(E,V))A.state=N.OPEN_TAG,A.tagName=V;else if(V==="/")A.state=N.CLOSE_TAG,A.tagName="";else if(V==="?")A.state=N.PROC_INST,A.procInstName=A.procInstBody="";else{if(ge(A,"Unencoded <"),A.startTagPosition+1<A.position){var Fe=A.position-A.startTagPosition;V=new Array(Fe).join(" ")+V}A.textNode+="<"+V,A.state=N.TEXT}continue;case N.SGML_DECL:(A.sgmlDecl+V).toUpperCase()===_?(H(A,"onopencdata"),A.state=N.CDATA,A.sgmlDecl="",A.cdata=""):A.sgmlDecl+V==="--"?(A.state=N.COMMENT,A.comment="",A.sgmlDecl=""):(A.sgmlDecl+V).toUpperCase()===b?(A.state=N.DOCTYPE,(A.doctype||A.sawRoot)&&ge(A,"Inappropriately located doctype declaration"),A.doctype="",A.sgmlDecl=""):V===">"?(H(A,"onsgmldeclaration",A.sgmlDecl),A.sgmlDecl="",A.state=N.TEXT):(R(m,V)&&(A.state=N.SGML_DECL_QUOTED),A.sgmlDecl+=V);continue;case N.SGML_DECL_QUOTED:V===A.q&&(A.state=N.SGML_DECL,A.q=""),A.sgmlDecl+=V;continue;case N.DOCTYPE:V===">"?(A.state=N.TEXT,H(A,"ondoctype",A.doctype),A.doctype=!0):(A.doctype+=V,V==="["?A.state=N.DOCTYPE_DTD:R(m,V)&&(A.state=N.DOCTYPE_QUOTED,A.q=V));continue;case N.DOCTYPE_QUOTED:A.doctype+=V,V===A.q&&(A.q="",A.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:A.doctype+=V,V==="]"?A.state=N.DOCTYPE:R(m,V)&&(A.state=N.DOCTYPE_DTD_QUOTED,A.q=V);continue;case N.DOCTYPE_DTD_QUOTED:A.doctype+=V,V===A.q&&(A.state=N.DOCTYPE_DTD,A.q="");continue;case N.COMMENT:V==="-"?A.state=N.COMMENT_ENDING:A.comment+=V;continue;case N.COMMENT_ENDING:V==="-"?(A.state=N.COMMENT_ENDED,A.comment=ee(A.opt,A.comment),A.comment&&H(A,"oncomment",A.comment),A.comment=""):(A.comment+="-"+V,A.state=N.COMMENT);continue;case N.COMMENT_ENDED:V!==">"?(ge(A,"Malformed comment"),A.comment+="--"+V,A.state=N.COMMENT):A.state=N.TEXT;continue;case N.CDATA:V==="]"?A.state=N.CDATA_ENDING:A.cdata+=V;continue;case N.CDATA_ENDING:V==="]"?A.state=N.CDATA_ENDING_2:(A.cdata+="]"+V,A.state=N.CDATA);continue;case N.CDATA_ENDING_2:V===">"?(A.cdata&&H(A,"oncdata",A.cdata),H(A,"onclosecdata"),A.cdata="",A.state=N.TEXT):V==="]"?A.cdata+="]":(A.cdata+="]]"+V,A.state=N.CDATA);continue;case N.PROC_INST:V==="?"?A.state=N.PROC_INST_ENDING:R(f,V)?A.state=N.PROC_INST_BODY:A.procInstName+=V;continue;case N.PROC_INST_BODY:if(!A.procInstBody&&R(f,V))continue;V==="?"?A.state=N.PROC_INST_ENDING:A.procInstBody+=V;continue;case N.PROC_INST_ENDING:V===">"?(H(A,"onprocessinginstruction",{name:A.procInstName,body:A.procInstBody}),A.procInstName=A.procInstBody="",A.state=N.TEXT):(A.procInstBody+="?"+V,A.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:R(C,V)?A.tagName+=V:(we(A),V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:(D(f,V)&&ge(A,"Invalid character in tag name"),A.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:V===">"?(tt(A,!0),xt(A)):(ge(A,"Forward-slash in opening tag not followed by >"),A.state=N.ATTRIB);continue;case N.ATTRIB:if(R(f,V))continue;V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:R(E,V)?(A.attribName=V,A.attribValue="",A.state=N.ATTRIB_NAME):ge(A,"Invalid attribute name");continue;case N.ATTRIB_NAME:V==="="?A.state=N.ATTRIB_VALUE:V===">"?(ge(A,"Attribute without value"),A.attribValue=A.attribName,et(A),tt(A)):R(f,V)?A.state=N.ATTRIB_NAME_SAW_WHITE:R(C,V)?A.attribName+=V:ge(A,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(V==="=")A.state=N.ATTRIB_VALUE;else{if(R(f,V))continue;ge(A,"Attribute without value"),A.tag.attributes[A.attribName]="",A.attribValue="",H(A,"onattribute",{name:A.attribName,value:""}),A.attribName="",V===">"?tt(A):R(E,V)?(A.attribName=V,A.state=N.ATTRIB_NAME):(ge(A,"Invalid attribute name"),A.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(R(f,V))continue;R(m,V)?(A.q=V,A.state=N.ATTRIB_VALUE_QUOTED):(ge(A,"Unquoted attribute value"),A.state=N.ATTRIB_VALUE_UNQUOTED,A.attribValue=V);continue;case N.ATTRIB_VALUE_QUOTED:if(V!==A.q){V==="&"?A.state=N.ATTRIB_VALUE_ENTITY_Q:A.attribValue+=V;continue}et(A),A.q="",A.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:R(f,V)?A.state=N.ATTRIB:V===">"?tt(A):V==="/"?A.state=N.OPEN_TAG_SLASH:R(E,V)?(ge(A,"No whitespace between attributes"),A.attribName=V,A.attribValue="",A.state=N.ATTRIB_NAME):ge(A,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(D(v,V)){V==="&"?A.state=N.ATTRIB_VALUE_ENTITY_U:A.attribValue+=V;continue}et(A),V===">"?tt(A):A.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(A.tagName)V===">"?xt(A):R(C,V)?A.tagName+=V:A.script?(A.script+="</"+A.tagName,A.tagName="",A.state=N.SCRIPT):(D(f,V)&&ge(A,"Invalid tagname in closing tag"),A.state=N.CLOSE_TAG_SAW_WHITE);else{if(R(f,V))continue;D(E,V)?A.script?(A.script+="</"+V,A.state=N.SCRIPT):ge(A,"Invalid tagname in closing tag."):A.tagName=V}continue;case N.CLOSE_TAG_SAW_WHITE:if(R(f,V))continue;V===">"?xt(A):ge(A,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var $t,yr;switch(A.state){case N.TEXT_ENTITY:$t=N.TEXT,yr="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:$t=N.ATTRIB_VALUE_QUOTED,yr="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:$t=N.ATTRIB_VALUE_UNQUOTED,yr="attribValue";break}V===";"?(A[yr]+=Ne(A),A.entity="",A.state=$t):R(A.entity.length?q:I,V)?A.entity+=V:(ge(A,"Invalid character in entity name"),A[yr]+="&"+A.entity+V,A.entity="",A.state=$t);continue;default:throw new Error(A,"Unknown state: "+A.state)}return A.position>=A.bufferCheckPosition&&n(A),A}String.fromCodePoint||function(){var F=String.fromCharCode,A=Math.floor,Z=function(){var V=16384,He=[],Fe,$t,yr=-1,Gr=arguments.length;if(!Gr)return"";for(var Ae="";++yr<Gr;){var Vt=Number(arguments[yr]);if(!isFinite(Vt)||Vt<0||Vt>1114111||A(Vt)!==Vt)throw RangeError("Invalid code point: "+Vt);Vt<=65535?He.push(Vt):(Vt-=65536,Fe=(Vt>>10)+55296,$t=Vt%1024+56320,He.push(Fe,$t)),(yr+1===Gr||He.length>V)&&(Ae+=F.apply(null,He),He.length=0)}return Ae};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Z,configurable:!0,writable:!0}):String.fromCodePoint=Z}()})(typeof FE>"u"?FE.sax={}:FE)});var cce=g(Xk=>{(function(){"use strict";Xk.stripBOM=function(e){return e[0]==="\uFEFF"?e.substring(1):e}}).call(Xk)});var Yk=g(Kl=>{(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),Kl.normalize=function(t){return t.toLowerCase()},Kl.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},Kl.stripPrefix=function(t){return t.replace(e,"")},Kl.parseNumbers=function(t){return isNaN(t)||(t=t%1===0?parseInt(t,10):parseFloat(t)),t},Kl.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t=t.toLowerCase()==="true"),t}}).call(Kl)});var lce=g(Xa=>{(function(){"use strict";var e,t,r,n,i,s,o,a,u=function(p,d){return function(){return p.apply(d,arguments)}},c=function(p,d){for(var m in d)f.call(d,m)&&(p[m]=d[m]);function v(){this.constructor=p}return v.prototype=d.prototype,p.prototype=new v,p.__super__=d.prototype,p},f={}.hasOwnProperty;o=uce(),r=require("events"),e=cce(),s=Yk(),a=require("timers").setImmediate,t=wE().defaults,n=function(p){return typeof p=="object"&&p!=null&&Object.keys(p).length===0},i=function(p,d,m){var v,_,b;for(v=0,_=p.length;v<_;v++)b=p[v],d=b(d,m);return d},Xa.Parser=function(p){c(d,p);function d(m){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var v,_,b;if(!(this instanceof Xa.Parser))return new Xa.Parser(m);this.options={},_=t["0.2"];for(v in _)f.call(_,v)&&(b=_[v],this.options[v]=b);for(v in m)f.call(m,v)&&(b=m[v],this.options[v]=b);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return d.prototype.processAsync=function(){var m,v;try{return this.remaining.length<=this.options.chunkSize?(m=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(m),this.saxParser.close()):(m=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(m),a(this.processAsync))}catch(_){if(v=_,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(v)}},d.prototype.assignOrPush=function(m,v,_){return v in m?(m[v]instanceof Array||(m[v]=[m[v]]),m[v].push(_)):this.options.explicitArray?m[v]=[_]:m[v]=_},d.prototype.reset=function(){var m,v,_,b;return this.removeAllListeners(),this.saxParser=o.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(y){return function(T){if(y.saxParser.resume(),!y.saxParser.errThrown)return y.saxParser.errThrown=!0,y.emit("error",T)}}(this),this.saxParser.onend=function(y){return function(){if(!y.saxParser.ended)return y.saxParser.ended=!0,y.emit("end",y.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],m=this.options.attrkey,v=this.options.charkey,this.saxParser.onopentag=function(y){return function(T){var S,E,C,I,q;if(C=Object.create(null),C[v]="",!y.options.ignoreAttrs){q=T.attributes;for(S in q)f.call(q,S)&&(!(m in C)&&!y.options.mergeAttrs&&(C[m]=Object.create(null)),E=y.options.attrValueProcessors?i(y.options.attrValueProcessors,T.attributes[S],S):T.attributes[S],I=y.options.attrNameProcessors?i(y.options.attrNameProcessors,S):S,y.options.mergeAttrs?y.assignOrPush(C,I,E):C[m][I]=E)}return C["#name"]=y.options.tagNameProcessors?i(y.options.tagNameProcessors,T.name):T.name,y.options.xmlns&&(C[y.options.xmlnskey]={uri:T.uri,local:T.local}),b.push(C)}}(this),this.saxParser.onclosetag=function(y){return function(){var T,S,E,C,I,q,B,M,R,D;if(q=b.pop(),I=q["#name"],(!y.options.explicitChildren||!y.options.preserveChildrenOrder)&&delete q["#name"],q.cdata===!0&&(T=q.cdata,delete q.cdata),R=b[b.length-1],q[v].match(/^\s*$/)&&!T?(S=q[v],delete q[v]):(y.options.trim&&(q[v]=q[v].trim()),y.options.normalize&&(q[v]=q[v].replace(/\s{2,}/g," ").trim()),q[v]=y.options.valueProcessors?i(y.options.valueProcessors,q[v],I):q[v],Object.keys(q).length===1&&v in q&&!y.EXPLICIT_CHARKEY&&(q=q[v])),n(q)&&(typeof y.options.emptyTag=="function"?q=y.options.emptyTag():q=y.options.emptyTag!==""?y.options.emptyTag:S),y.options.validator!=null&&(D="/"+function(){var N,Y,oe;for(oe=[],N=0,Y=b.length;N<Y;N++)C=b[N],oe.push(C["#name"]);return oe}().concat(I).join("/"),function(){var N;try{return q=y.options.validator(D,R&&R[I],q)}catch(Y){return N=Y,y.emit("error",N)}}()),y.options.explicitChildren&&!y.options.mergeAttrs&&typeof q=="object"){if(!y.options.preserveChildrenOrder)C=Object.create(null),y.options.attrkey in q&&(C[y.options.attrkey]=q[y.options.attrkey],delete q[y.options.attrkey]),!y.options.charsAsChildren&&y.options.charkey in q&&(C[y.options.charkey]=q[y.options.charkey],delete q[y.options.charkey]),Object.getOwnPropertyNames(q).length>0&&(C[y.options.childkey]=q),q=C;else if(R){R[y.options.childkey]=R[y.options.childkey]||[],B=Object.create(null);for(E in q)f.call(q,E)&&(B[E]=q[E]);R[y.options.childkey].push(B),delete q["#name"],Object.keys(q).length===1&&v in q&&!y.EXPLICIT_CHARKEY&&(q=q[v])}}return b.length>0?y.assignOrPush(R,I,q):(y.options.explicitRoot&&(M=q,q=Object.create(null),q[I]=M),y.resultObject=q,y.saxParser.ended=!0,y.emit("end",y.resultObject))}}(this),_=function(y){return function(T){var S,E;if(E=b[b.length-1],E)return E[v]+=T,y.options.explicitChildren&&y.options.preserveChildrenOrder&&y.options.charsAsChildren&&(y.options.includeWhiteChars||T.replace(/\\n/g,"").trim()!=="")&&(E[y.options.childkey]=E[y.options.childkey]||[],S={"#name":"__text__"},S[v]=T,y.options.normalize&&(S[v]=S[v].replace(/\s{2,}/g," ").trim()),E[y.options.childkey].push(S)),E}}(this),this.saxParser.ontext=_,this.saxParser.oncdata=function(y){return function(T){var S;if(S=_(T),S)return S.cdata=!0}}(this)},d.prototype.parseString=function(m,v){var _;v!=null&&typeof v=="function"&&(this.on("end",function(b){return this.reset(),v(null,b)}),this.on("error",function(b){return this.reset(),v(b)}));try{return m=m.toString(),m.trim()===""?(this.emit("end",null),!0):(m=e.stripBOM(m),this.options.async?(this.remaining=m,a(this.processAsync),this.saxParser):this.saxParser.write(m).close())}catch(b){if(_=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw _}else return this.emit("error",_),this.saxParser.errThrown=!0}},d.prototype.parseStringPromise=function(m){return new Promise(function(v){return function(_,b){return v.parseString(m,function(y,T){return y?b(y):_(T)})}}(this))},d}(r),Xa.parseString=function(p,d,m){var v,_,b;return m!=null?(typeof m=="function"&&(v=m),typeof d=="object"&&(_=d)):(typeof d=="function"&&(v=d),_={}),b=new Xa.Parser(_),b.parseString(p,v)},Xa.parseStringPromise=function(p,d){var m,v;return typeof d=="object"&&(m=d),v=new Xa.Parser(m),v.parseStringPromise(p)}}).call(Xa)});var fce=g(Ya=>{(function(){"use strict";var e,t,r,n,i=function(o,a){for(var u in a)s.call(a,u)&&(o[u]=a[u]);function c(){this.constructor=o}return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},s={}.hasOwnProperty;t=wE(),e=ace(),r=lce(),n=Yk(),Ya.defaults=t.defaults,Ya.processors=n,Ya.ValidationError=function(o){i(a,o);function a(u){this.message=u}return a}(Error),Ya.Builder=e.Builder,Ya.Parser=r.Parser,Ya.parseString=r.parseString,Ya.parseStringPromise=r.parseStringPromise}).call(Ya)});var vce=g((Drr,gce)=>{var pce=Re(),_0=pce.util,Qht=pce.Model.Shape,emt=fce(),tmt={explicitCharkey:!1,trim:!1,normalize:!1,explicitRoot:!1,emptyTag:null,explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,validator:null};function dce(){}dce.prototype.parse=function(e,t){t=t||{};var r=null,n=null,i=new emt.Parser(tmt);if(i.parseString(e,function(o,a){n=o,r=a}),r){var s=Ja(r,t);return r.ResponseMetadata&&(s.ResponseMetadata=Ja(r.ResponseMetadata[0],{})),s}else{if(n)throw _0.error(n,{code:"XMLParserError",retryable:!0});return Ja({},t)}};function Ja(e,t){switch(t.type){case"structure":return rmt(e,t);case"map":return nmt(e,t);case"list":return hce(e,t);case void 0:case null:return imt(e);default:return mce(e,t)}}function rmt(e,t){var r={};return e===null||_0.each(t.members,function(n,i){var s=i.name;if(Object.prototype.hasOwnProperty.call(e,s)&&Array.isArray(e[s])){var o=e[s];i.flattened||(o=o[0]),r[n]=Ja(o,i)}else i.isXmlAttribute&&e.$&&Object.prototype.hasOwnProperty.call(e.$,s)?r[n]=mce(e.$[s],i):i.type==="list"&&!t.api.xmlNoDefaultLists&&(r[n]=i.defaultValue)}),r}function nmt(e,t){var r={};if(e===null)return r;var n=t.key.name||"key",i=t.value.name||"value",s=t.flattened?e:e.entry;return Array.isArray(s)&&_0.arrayEach(s,function(o){r[o[n][0]]=Ja(o[i][0],t.value)}),r}function hce(e,t){var r=[],n=t.member.name||"member";return t.flattened?_0.arrayEach(e,function(i){r.push(Ja(i,t.member))}):e&&Array.isArray(e[n])&&_0.arrayEach(e[n],function(i){r.push(Ja(i,t.member))}),r}function mce(e,t){return e&&e.$&&e.$.encoding==="base64"&&(t=new Qht.create({type:e.$.encoding})),e&&e._&&(e=e._),typeof t.toType=="function"?t.toType(e):e}function imt(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e)){var t=[];for(n=0;n<e.length;n++)t.push(Ja(e[n],{}));return t}var r=Object.keys(e),n;if(r.length===0||r.length===1&&r[0]==="$")return{};var i={};for(n=0;n<r.length;n++){var s=r[n],o=e[s];s!=="$"&&(o.length>1?i[s]=hce(o,{member:{}}):i[s]=Ja(o[0],{}))}return i}gce.exports=dce});var yce=g(()=>{var qr=Re(),smt=qr.util.stream.Stream,xce=qr.util.stream.Transform,omt=qr.util.stream.Readable;Jw();var amt="AWS_NODEJS_CONNECTION_REUSE_ENABLED";qr.NodeHttpClient=qr.util.inherit({handleRequest:function(t,r,n,i){var s=this,o=t.endpoint,a="";r||(r={}),r.proxy&&(a=o.protocol+"//"+o.hostname,o.port!==80&&o.port!==443&&(a+=":"+o.port),o=new qr.Endpoint(r.proxy));var u=o.protocol==="https:",c=u?require("https"):require("http"),f={host:o.hostname,port:o.port,method:t.method,headers:t.headers,path:a+t.path};r.agent||(f.agent=this.getAgent(u,{keepAlive:process.env[amt]==="1"})),qr.util.update(f,r),delete f.proxy,delete f.timeout;var p=c.request(f,function(v){p.didCallback||(n(v),v.emit("headers",v.statusCode,v.headers,v.statusMessage))});if(t.stream=p,p.didCallback=!1,r.connectTimeout){var d;p.on("socket",function(v){v.connecting&&(d=setTimeout(function(){p.didCallback||(p.didCallback=!0,p.abort(),i(qr.util.error(new Error("Socket timed out without establishing a connection"),{code:"TimeoutError"})))},r.connectTimeout),v.on("connect",function(){clearTimeout(d),d=null}))})}p.setTimeout(r.timeout||0,function(){if(!p.didCallback){p.didCallback=!0;var v="Connection timed out after "+r.timeout+"ms";i(qr.util.error(new Error(v),{code:"TimeoutError"})),p.abort()}}),p.on("error",function(v){d&&(clearTimeout(d),d=null),!p.didCallback&&(p.didCallback=!0,v.code==="ECONNRESET"||v.code==="EPIPE"||v.code==="ETIMEDOUT"?i(qr.util.error(v,{code:"TimeoutError"})):i(v))});var m=t.headers.Expect||t.headers.expect;return m==="100-continue"?p.once("continue",function(){s.writeBody(p,t)}):this.writeBody(p,t),p},writeBody:function(t,r){var n=r.body,i=parseInt(r.headers["Content-Length"],10);if(n instanceof smt){var s=this.progressStream(t,i);s?n.pipe(s).pipe(t):n.pipe(t)}else n?(t.once("finish",function(){t.emit("sendProgress",{loaded:i,total:i})}),t.end(n)):t.end()},getAgent:function(t,r){var n=t?require("https"):require("http");return t?(qr.NodeHttpClient.sslAgent||(qr.NodeHttpClient.sslAgent=new n.Agent(qr.util.merge({rejectUnauthorized:process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0"},r||{})),qr.NodeHttpClient.sslAgent.setMaxListeners(0),Object.defineProperty(qr.NodeHttpClient.sslAgent,"maxSockets",{enumerable:!0,get:function(){var i=50,s=n.globalAgent;return s&&s.maxSockets!==1/0&&typeof s.maxSockets=="number"?s.maxSockets:i}})),qr.NodeHttpClient.sslAgent):(qr.NodeHttpClient.agent||(qr.NodeHttpClient.agent=new n.Agent(r)),qr.NodeHttpClient.agent)},progressStream:function(t,r){if(!(typeof xce>"u")){var n=0,i=new xce;return i._transform=function(s,o,a){s&&(n+=s.length,t.emit("sendProgress",{loaded:n,total:r})),a(null,s)},i}},emitter:null});qr.HttpClient.prototype=qr.NodeHttpClient.prototype;qr.HttpClient.streamsApiVersion=omt?2:1});var _ce=g(()=>{var Ds=Re(),umt=require("fs"),cmt=vc(),lmt=Ds.util.iniLoader;Ds.TokenFileWebIdentityCredentials=Ds.util.inherit(Ds.Credentials,{constructor:function(t){Ds.Credentials.call(this),this.data=null,this.clientConfig=Ds.util.copy(t||{})},getParamsFromEnv:function(){var t="AWS_WEB_IDENTITY_TOKEN_FILE",r="AWS_ROLE_ARN";if(process.env[t]&&process.env[r])return[{envTokenFile:process.env[t],roleArn:process.env[r],roleSessionName:process.env.AWS_ROLE_SESSION_NAME}]},getParamsFromSharedConfig:function(){var t=Ds.util.getProfilesFromSharedConfig(lmt),r=process.env.AWS_PROFILE||Ds.util.defaultProfile,n=t[r]||{};if(Object.keys(n).length===0)throw Ds.util.error(new Error("Profile "+r+" not found"),{code:"TokenFileWebIdentityCredentialsProviderFailure"});for(var i=[];!n.web_identity_token_file&&n.source_profile;){i.unshift({roleArn:n.role_arn,roleSessionName:n.role_session_name});var s=n.source_profile;n=t[s]}return i.unshift({envTokenFile:n.web_identity_token_file,roleArn:n.role_arn,roleSessionName:n.role_session_name}),i},refresh:function(t){this.coalesceRefresh(t||Ds.util.fn.callback)},assumeRoleChaining:function(t,r){var n=this;if(t.length===0)n.service.credentialsFrom(n.data,n),r();else{var i=t.shift();n.service.config.credentials=n.service.credentialsFrom(n.data,n),n.service.assumeRole({RoleArn:i.roleArn,RoleSessionName:i.roleSessionName||"token-file-web-identity"},function(s,o){n.data=null,s?r(s):(n.data=o,n.assumeRoleChaining(t,r))})}},load:function(t){var r=this;try{var n=r.getParamsFromEnv();if(n||(n=r.getParamsFromSharedConfig()),n){var i=n.shift(),s=umt.readFileSync(i.envTokenFile,{encoding:"ascii"});r.service||r.createClients(),r.service.assumeRoleWithWebIdentity({WebIdentityToken:s,RoleArn:i.roleArn,RoleSessionName:i.roleSessionName||"token-file-web-identity"},function(o,a){r.data=null,o?t(o):(r.data=a,r.assumeRoleChaining(n,t))})}}catch(o){t(o)}},createClients:function(){if(!this.service){var e=Ds.util.merge({},this.clientConfig);this.service=new cmt(e),this.service.retryableError=function(t){return t.code==="IDPCommunicationErrorException"||t.code==="InvalidIdentityToken"?!0:Ds.Service.prototype.retryableError.call(this,t)}}}})});var wce=g((jrr,bce)=>{var fmt=function(){return{IPv4:"http://169.254.169.254",IPv6:"http://[fd00:ec2::254]"}};bce.exports=fmt});var Jk=g((Urr,Ece)=>{var pmt=function(){return{IPv4:"IPv4",IPv6:"IPv6"}};Ece.exports=pmt});var Cce=g((Hrr,Sce)=>{var dmt="AWS_EC2_METADATA_SERVICE_ENDPOINT",hmt="ec2_metadata_service_endpoint",mmt=function(){return{environmentVariableSelector:function(e){return e[dmt]},configFileSelector:function(e){return e[hmt]},default:void 0}};Sce.exports=mmt});var Ace=g((zrr,Tce)=>{var gmt=Jk()(),vmt="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",xmt="ec2_metadata_service_endpoint_mode",ymt=function(){return{environmentVariableSelector:function(e){return e[vmt]},configFileSelector:function(e){return e[xmt]},default:gmt.IPv4}};Tce.exports=ymt});var qce=g(($rr,Nce)=>{var Oce=Re(),Ice=wce()(),Rce=Jk()(),_mt=Cce()(),bmt=Ace()(),wmt=function(){var e=Oce.util.loadConfig(_mt);if(e!==void 0)return e;var t=Oce.util.loadConfig(bmt);switch(t){case Rce.IPv4:return Ice.IPv4;case Rce.IPv6:return Ice.IPv6;default:throw new Error("Unsupported endpoint mode: "+t)}};Nce.exports=wmt});var Dce=g((Wrr,kce)=>{var ho=Re();Jw();var Emt=ho.util.inherit,Smt=qce(),Pce=require("url").URL;ho.MetadataService=Emt({endpoint:Smt(),httpOptions:{timeout:0},disableFetchToken:!1,constructor:function(t){t&&t.host&&(t.endpoint="http://"+t.host,delete t.host),ho.util.update(this,t)},request:function(t,r,n){if(arguments.length===2&&(n=r,r={}),process.env[ho.util.imdsDisabledEnv]){n(new Error("EC2 Instance Metadata Service access disabled"));return}t=t||"/",Pce&&new Pce(this.endpoint);var i=new ho.HttpRequest(this.endpoint+t);i.method=r.method||"GET",r.headers&&(i.headers=r.headers),ho.util.handleRequestWithRetries(i,this,n)},loadCredentialsCallbacks:[],fetchMetadataToken:function(t){var r=this,n="/latest/api/token";r.request(n,{method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}},t)},fetchCredentials:function(t,r){var n=this,i="/latest/meta-data/iam/security-credentials/";n.request(i,t,function(s,o){if(s){n.disableFetchToken=s.statusCode!==401,r(ho.util.error(s,{message:"EC2 Metadata roleName request returned error"}));return}o=o.split(`
|
|
187
187
|
`)[0],n.request(i+o,t,function(a,u){if(a){n.disableFetchToken=a.statusCode!==401,r(ho.util.error(a,{message:"EC2 Metadata creds request returned error"}));return}try{var c=JSON.parse(u);r(null,c)}catch(f){r(f)}})})},loadCredentials:function(t){var r=this;if(r.loadCredentialsCallbacks.push(t),r.loadCredentialsCallbacks.length>1)return;function n(i,s){for(var o;(o=r.loadCredentialsCallbacks.shift())!==void 0;)o(i,s)}r.disableFetchToken?r.fetchCredentials({},n):r.fetchMetadataToken(function(i,s){if(i){if(i.code==="TimeoutError")r.disableFetchToken=!0;else if(i.retryable===!0){n(ho.util.error(i,{message:"EC2 Metadata token request returned error"}));return}else if(i.statusCode===400){n(ho.util.error(i,{message:"EC2 Metadata token request returned 400"}));return}}var o={};s&&(o.headers={"x-aws-ec2-metadata-token":s}),r.fetchCredentials(o,n)})}});kce.exports=ho.MetadataService});var Lce=g(()=>{var es=Re();Dce();es.EC2MetadataCredentials=es.util.inherit(es.Credentials,{constructor:function(t){es.Credentials.call(this),t=t?es.util.copy(t):{},t=es.util.merge({maxRetries:this.defaultMaxRetries},t),t.httpOptions||(t.httpOptions={}),t.httpOptions=es.util.merge({timeout:this.defaultTimeout,connectTimeout:this.defaultConnectTimeout},t.httpOptions),this.metadataService=new es.MetadataService(t),this.logger=t.logger||es.config&&es.config.logger},defaultTimeout:1e3,defaultConnectTimeout:1e3,defaultMaxRetries:3,originalExpiration:void 0,refresh:function(t){this.coalesceRefresh(t||es.util.fn.callback)},load:function(t){var r=this;r.metadataService.loadCredentials(function(n,i){n?r.hasLoadedCredentials()?(r.extendExpirationIfExpired(),t()):t(n):(r.setCredentials(i),r.extendExpirationIfExpired(),t())})},hasLoadedCredentials:function(){return this.AccessKeyId&&this.secretAccessKey},extendExpirationIfExpired:function(){if(this.needsRefresh()){this.originalExpiration=this.originalExpiration||this.expireTime,this.expired=!1;var t=15*60+Math.floor(Math.random()*5*60),r=es.util.date.getDate().getTime();this.expireTime=new Date(r+t*1e3),this.logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted again at "+this.expireTime+`
|
|
188
188
|
For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`)}},setCredentials:function(t){var r=es.util.date.getDate().getTime(),n=new Date(t.Expiration);this.expired=r>=n,this.metadata=t,this.accessKeyId=t.AccessKeyId,this.secretAccessKey=t.SecretAccessKey,this.sessionToken=t.Token,this.expireTime=n}})});var Bce=g(()=>{var Ln=Re(),Zk="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",ME="AWS_CONTAINER_CREDENTIALS_FULL_URI",Cmt="AWS_CONTAINER_AUTHORIZATION_TOKEN",Tmt=["https:"],Fce=["http:","https:"],Mce=["localhost","127.0.0.1"],Amt="169.254.170.2";Ln.RemoteCredentials=Ln.util.inherit(Ln.Credentials,{constructor:function(t){Ln.Credentials.call(this),t=t?Ln.util.copy(t):{},t.httpOptions||(t.httpOptions={}),t.httpOptions=Ln.util.merge(this.httpOptions,t.httpOptions),Ln.util.update(this,t)},httpOptions:{timeout:1e3},maxRetries:3,isConfiguredForEcsCredentials:function(){return!!(process&&process.env&&(process.env[Zk]||process.env[ME]))},getECSFullUri:function(){if(process&&process.env){var t=process.env[Zk],r=process.env[ME];if(t)return"http://"+Amt+t;if(r){var n=Ln.util.urlParse(r);if(Fce.indexOf(n.protocol)<0)throw Ln.util.error(new Error("Unsupported protocol: AWS.RemoteCredentials supports "+Fce.join(",")+" only; "+n.protocol+" requested."),{code:"ECSCredentialsProviderFailure"});if(Tmt.indexOf(n.protocol)<0&&Mce.indexOf(n.hostname)<0)throw Ln.util.error(new Error("Unsupported hostname: AWS.RemoteCredentials only supports "+Mce.join(",")+" for "+n.protocol+"; "+n.protocol+"//"+n.hostname+" requested."),{code:"ECSCredentialsProviderFailure"});return r}else throw Ln.util.error(new Error("Variable "+Zk+" or "+ME+" must be set to use AWS.RemoteCredentials."),{code:"ECSCredentialsProviderFailure"})}else throw Ln.util.error(new Error("No process info available"),{code:"ECSCredentialsProviderFailure"})},getECSAuthToken:function(){if(process&&process.env&&process.env[ME])return process.env[Cmt]},credsFormatIsValid:function(t){return!!t.accessKeyId&&!!t.secretAccessKey&&!!t.sessionToken&&!!t.expireTime},formatCreds:function(t){return t.credentials&&(t=t.credentials),{expired:!1,accessKeyId:t.accessKeyId||t.AccessKeyId,secretAccessKey:t.secretAccessKey||t.SecretAccessKey,sessionToken:t.sessionToken||t.Token,expireTime:new Date(t.expiration||t.Expiration)}},request:function(t,r){var n=new Ln.HttpRequest(t);n.method="GET",n.headers.Accept="application/json";var i=this.getECSAuthToken();i&&(n.headers.Authorization=i),Ln.util.handleRequestWithRetries(n,this,r)},refresh:function(t){this.coalesceRefresh(t||Ln.util.fn.callback)},load:function(t){var r=this,n;try{n=this.getECSFullUri()}catch(i){t(i);return}this.request(n,function(i,s){if(!i)try{s=JSON.parse(s);var o=r.formatCreds(s);if(!r.credsFormatIsValid(o))throw Ln.util.error(new Error("Response data is not in valid format"),{code:"ECSCredentialsProviderFailure"});Ln.util.update(r,o)}catch(a){i=a}t(i,o)})}})});var Uce=g(()=>{var jce=Re();jce.ECSCredentials=jce.RemoteCredentials});var Hce=g(()=>{var _c=Re();_c.EnvironmentCredentials=_c.util.inherit(_c.Credentials,{constructor:function(t){_c.Credentials.call(this),this.envPrefix=t,this.get(function(){})},refresh:function(t){if(t||(t=_c.util.fn.callback),!process||!process.env){t(_c.util.error(new Error("No process info or environment variables available"),{code:"EnvironmentCredentialsProviderFailure"}));return}for(var r=["ACCESS_KEY_ID","SECRET_ACCESS_KEY","SESSION_TOKEN"],n=[],i=0;i<r.length;i++){var s="";if(this.envPrefix&&(s=this.envPrefix+"_"),n[i]=process.env[s+r[i]],!n[i]&&r[i]!=="SESSION_TOKEN"){t(_c.util.error(new Error("Variable "+s+r[i]+" not set."),{code:"EnvironmentCredentialsProviderFailure"}));return}}this.expired=!1,_c.Credentials.apply(this,n),t()}})});var zce=g(()=>{var bc=Re();bc.FileSystemCredentials=bc.util.inherit(bc.Credentials,{constructor:function(t){bc.Credentials.call(this),this.filename=t,this.get(function(){})},refresh:function(t){t||(t=bc.util.fn.callback);try{var r=JSON.parse(bc.util.readFileSync(this.filename));if(bc.Credentials.call(this,r),!this.accessKeyId||!this.secretAccessKey)throw bc.util.error(new Error("Credentials not set in "+this.filename),{code:"FileSystemCredentialsProviderFailure"});this.expired=!1,t()}catch(n){t(n)}}})});var Wce=g(()=>{var Fn=Re(),Omt=vc(),$ce=Fn.util.iniLoader,Imt="us-east-1";Fn.SharedIniFileCredentials=Fn.util.inherit(Fn.Credentials,{constructor:function(t){Fn.Credentials.call(this),t=t||{},this.filename=t.filename,this.profile=t.profile||process.env.AWS_PROFILE||Fn.util.defaultProfile,this.disableAssumeRole=!!t.disableAssumeRole,this.preferStaticCredentials=!!t.preferStaticCredentials,this.tokenCodeFn=t.tokenCodeFn||null,this.httpOptions=t.httpOptions||null,this.get(t.callback||Fn.util.fn.noop)},load:function(t){var r=this;try{var n=Fn.util.getProfilesFromSharedConfig($ce,this.filename),i=n[this.profile]||{};if(Object.keys(i).length===0)throw Fn.util.error(new Error("Profile "+this.profile+" not found"),{code:"SharedIniFileCredentialsProviderFailure"});var s=!!(this.preferStaticCredentials&&i.aws_access_key_id&&i.aws_secret_access_key);if(i.role_arn&&!s){this.loadRoleProfile(n,i,function(o,a){o?t(o):(r.expired=!1,r.accessKeyId=a.Credentials.AccessKeyId,r.secretAccessKey=a.Credentials.SecretAccessKey,r.sessionToken=a.Credentials.SessionToken,r.expireTime=a.Credentials.Expiration,t(null))});return}if(this.accessKeyId=i.aws_access_key_id,this.secretAccessKey=i.aws_secret_access_key,this.sessionToken=i.aws_session_token,!this.accessKeyId||!this.secretAccessKey)throw Fn.util.error(new Error("Credentials not set for profile "+this.profile),{code:"SharedIniFileCredentialsProviderFailure"});this.expired=!1,t(null)}catch(o){t(o)}},refresh:function(t){$ce.clearCachedFiles(),this.coalesceRefresh(t||Fn.util.fn.callback,this.disableAssumeRole)},loadRoleProfile:function(t,r,n){if(this.disableAssumeRole)throw Fn.util.error(new Error("Role assumption profiles are disabled. Failed to load profile "+this.profile+" from "+t.filename),{code:"SharedIniFileCredentialsProviderFailure"});var i=this,s=r.role_arn,o=r.role_session_name,a=r.external_id,u=r.mfa_serial,c=r.source_profile,f=r.region||Imt;if(!c)throw Fn.util.error(new Error("source_profile is not set using profile "+this.profile),{code:"SharedIniFileCredentialsProviderFailure"});var p=t[c];if(typeof p!="object")throw Fn.util.error(new Error("source_profile "+c+" using profile "+this.profile+" does not exist"),{code:"SharedIniFileCredentialsProviderFailure"});var d=new Fn.SharedIniFileCredentials(Fn.util.merge(this.options||{},{profile:c,preferStaticCredentials:!0}));this.roleArn=s;var m=new Omt({credentials:d,region:f,httpOptions:this.httpOptions}),v={RoleArn:s,RoleSessionName:o||"aws-sdk-js-"+Date.now()};if(a&&(v.ExternalId=a),u&&i.tokenCodeFn){v.SerialNumber=u,i.tokenCodeFn(u,function(_,b){if(_){var y;_ instanceof Error?y=_.message:y=_,n(Fn.util.error(new Error("Error fetching MFA token: "+y),{code:"SharedIniFileCredentialsProviderFailure"}));return}v.TokenCode=b,m.assumeRole(v,n)});return}m.assumeRole(v,n)}})});var Gce=g(()=>{var Hr=Re(),Rmt=require("path"),Nmt=require("crypto"),Qk=Hr.util.iniLoader;Hr.SsoCredentials=Hr.util.inherit(Hr.Credentials,{constructor:function(t){Hr.Credentials.call(this),t=t||{},this.errorCode="SsoCredentialsProviderFailure",this.expired=!0,this.filename=t.filename,this.profile=t.profile||process.env.AWS_PROFILE||Hr.util.defaultProfile,this.service=t.ssoClient,this.httpOptions=t.httpOptions||null,this.get(t.callback||Hr.util.fn.noop)},load:function(t){var r=this;try{var n=Hr.util.getProfilesFromSharedConfig(Qk,this.filename),i=n[this.profile]||{};if(Object.keys(i).length===0)throw Hr.util.error(new Error("Profile "+this.profile+" not found"),{code:r.errorCode});if(i.sso_session){if(!i.sso_account_id||!i.sso_role_name)throw Hr.util.error(new Error("Profile "+this.profile+" with session "+i.sso_session+' does not have valid SSO credentials. Required parameters "sso_account_id", "sso_session", "sso_role_name". Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html'),{code:r.errorCode})}else if(!i.sso_start_url||!i.sso_account_id||!i.sso_region||!i.sso_role_name)throw Hr.util.error(new Error("Profile "+this.profile+' does not have valid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html'),{code:r.errorCode});this.getToken(this.profile,i,function(s,o){if(s)return t(s);var a={accessToken:o,accountId:i.sso_account_id,roleName:i.sso_role_name};(!r.service||r.service.config.region!==i.sso_region)&&(r.service=new Hr.SSO({region:i.sso_region,httpOptions:r.httpOptions})),r.service.getRoleCredentials(a,function(u,c){if(u||!c||!c.roleCredentials)t(Hr.util.error(u||new Error('Please log in using "aws sso login"'),{code:r.errorCode}),null);else{if(!c.roleCredentials.accessKeyId||!c.roleCredentials.secretAccessKey||!c.roleCredentials.sessionToken||!c.roleCredentials.expiration)throw Hr.util.error(new Error("SSO returns an invalid temporary credential."));r.expired=!1,r.accessKeyId=c.roleCredentials.accessKeyId,r.secretAccessKey=c.roleCredentials.secretAccessKey,r.sessionToken=c.roleCredentials.sessionToken,r.expireTime=new Date(c.roleCredentials.expiration),t(null)}})})}catch(s){t(s)}},getToken:function(t,r,n){var i=this;if(r.sso_session){var s=Hr.util.iniLoader,o=s.loadSsoSessionsFrom(),a=o[r.sso_session];Object.assign(r,a);var u=new Hr.SSOTokenProvider({profile:t});u.load(function(_){return _?n(_):n(null,u.token)});return}try{var c=9e5,f=Nmt.createHash("sha1"),p=f.update(r.sso_start_url).digest("hex")+".json",d=Rmt.join(Qk.getHomeDir(),".aws","sso","cache",p),m=Hr.util.readFileSync(d),v=null;if(m&&(v=JSON.parse(m)),!v)throw Hr.util.error(new Error("Cached credentials not found under "+this.profile+" profile. Please make sure you log in with aws sso login first"),{code:i.errorCode});if(!v.startUrl||!v.region||!v.accessToken||!v.expiresAt)throw Hr.util.error(new Error("Cached credentials are missing required properties. Try running aws sso login."));if(new Date(v.expiresAt).getTime()-Date.now()<=c)throw Hr.util.error(new Error("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile."));return n(null,v.accessToken)}catch(_){return n(_,null)}},refresh:function(t){Qk.clearCachedFiles(),this.coalesceRefresh(t||Hr.util.fn.callback)}})});var Vce=g(()=>{var Ls=Re();Ls.Token=Ls.util.inherit({constructor:function(t){if(Ls.util.hideProperties(this,["token"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],arguments.length===1){var t=arguments[0];this.token=t.token,this.expireTime=t.expireTime}},expiryWindow:15,needsRefresh:function(){var t=Ls.util.date.getDate().getTime(),r=new Date(t+this.expiryWindow*1e3);return this.expireTime&&r>this.expireTime?!0:this.expired||!this.token},get:function(t){var r=this;this.needsRefresh()?this.refresh(function(n){n||(r.expired=!1),t&&t(n)}):t&&t()},refresh:function(t){this.expired=!1,t()},coalesceRefresh:function(t,r){var n=this;n.refreshCallbacks.push(t)===1&&n.load(function(s){Ls.util.arrayEach(n.refreshCallbacks,function(o){r?o(s):Ls.util.defer(function(){o(s)})}),n.refreshCallbacks.length=0})},load:function(t){t()}});Ls.Token.addPromisesToClass=function(t){this.prototype.getPromise=Ls.util.promisifyMethod("get",t),this.prototype.refreshPromise=Ls.util.promisifyMethod("refresh",t)};Ls.Token.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise};Ls.util.addPromises(Ls.Token)});var Kce=g(()=>{var mo=Re();mo.TokenProviderChain=mo.util.inherit(mo.Token,{constructor:function(t){t?this.providers=t:this.providers=mo.TokenProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(t){var r=this;if(r.providers.length===0)return t(new Error("No providers")),r;if(r.resolveCallbacks.push(t)===1){let o=function(a,u){if(!a&&u||n===i.length){mo.util.arrayEach(r.resolveCallbacks,function(f){f(a,u)}),r.resolveCallbacks.length=0;return}var c=i[n++];typeof c=="function"?u=c.call():u=c,u.get?u.get(function(f){o(f,f?null:u)}):o(null,u)};var s=o,n=0,i=r.providers.slice(0);o()}return r}});mo.TokenProviderChain.defaultProviders=[];mo.TokenProviderChain.addPromisesToClass=function(t){this.prototype.resolvePromise=mo.util.promisifyMethod("resolve",t)};mo.TokenProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise};mo.util.addPromises(mo.TokenProviderChain)});var Jce=g(()=>{var cn=Re(),qmt=require("crypto"),Xce=require("fs"),Pmt=require("path"),BE=cn.util.iniLoader,Yce=0,Xl=function(t,r){if(!t[r])throw cn.util.error(new Error('Key "'+r+'" not present in SSO Token'),{code:"SSOTokenProviderFailure"})},eD=function(t,r,n){if(r>t)n(null);else throw cn.util.error(new Error('SSO Token refresh failed. Please log in using "aws sso login"'),{code:"SSOTokenProviderFailure"})};cn.SSOTokenProvider=cn.util.inherit(cn.Token,{expiryWindow:5*60,constructor:function(t){cn.Token.call(this),t=t||{},this.expired=!0,this.profile=t.profile||process.env.AWS_PROFILE||cn.util.defaultProfile,this.get(t.callback||cn.util.fn.noop)},load:function(t){var r=this,n=BE.loadFrom({isConfig:!0}),i=n[this.profile]||{};if(Object.keys(i).length===0)throw cn.util.error(new Error('Profile "'+this.profile+'" not found'),{code:"SSOTokenProviderFailure"});if(!i.sso_session)throw cn.util.error(new Error('Profile "'+profileName+'" is missing required property "sso_session".'),{code:"SSOTokenProviderFailure"});var s=i.sso_session,o=BE.loadSsoSessionsFrom(),a=o[s];if(a)if(a.sso_start_url){if(!a.sso_region)throw cn.util.error(new Error('Sso session "'+profileName+'" is missing required property "sso_region".'),{code:"SSOTokenProviderFailure"})}else throw cn.util.error(new Error('Sso session "'+profileName+'" is missing required property "sso_start_url".'),{code:"SSOTokenProviderFailure"});else throw cn.util.error(new Error('Sso session "'+s+'" not found'),{code:"SSOTokenProviderFailure"});var u=qmt.createHash("sha1"),c=u.update(s).digest("hex")+".json",f=Pmt.join(BE.getHomeDir(),".aws","sso","cache",c),p=JSON.parse(Xce.readFileSync(f));if(!p)throw cn.util.error(new Error('Cached token not found. Please log in using "aws sso login" for profile "'+this.profile+'".'),{code:"SSOTokenProviderFailure"});Xl(p,"accessToken"),Xl(p,"expiresAt");var d=cn.util.date.getDate().getTime(),m=new Date(d+this.expiryWindow*1e3),v=new Date(p.expiresAt);if(v>m){r.token=p.accessToken,r.expireTime=v,r.expired=!1,t(null);return}if(d-Yce<30*1e3){eD(d,v,t);return}Xl(p,"clientId"),Xl(p,"clientSecret"),Xl(p,"refreshToken"),(!r.service||r.service.config.region!==a.sso_region)&&(r.service=new cn.SSOOIDC({region:a.sso_region}));var _={clientId:p.clientId,clientSecret:p.clientSecret,refreshToken:p.refreshToken,grantType:"refresh_token"};Yce=cn.util.date.getDate().getTime(),r.service.createToken(_,function(b,y){if(b||!y)eD(d,v,t);else try{Xl(y,"accessToken"),Xl(y,"expiresIn"),r.expired=!1,r.token=y.accessToken,r.expireTime=new Date(Date.now()+y.expiresIn*1e3),t(null);try{p.accessToken=y.accessToken,p.expiresAt=r.expireTime.toISOString(),p.refreshToken=y.refreshToken,Xce.writeFileSync(f,JSON.stringify(p,null,2))}catch{}}catch{eD(d,v,t)}})},refresh:function(t){BE.clearCachedFiles(),this.coalesceRefresh(t||cn.util.fn.callback)}})});var _E=g((pnr,ele)=>{var Pr=jr(),Qce=yk(),kmt=Qce.isFipsRegion,Dmt=Qce.getRealRegion;Pr.isBrowser=function(){return!1};Pr.isNode=function(){return!0};Pr.crypto.lib=require("crypto");Pr.Buffer=require("buffer").Buffer;Pr.domain=require("domain");Pr.stream=require("stream");Pr.url=require("url");Pr.querystring=require("querystring");Pr.environment="nodejs";Pr.createEventStream=Pr.stream.Readable?uae().createEventStream:pae().createEventStream;Pr.realClock=hae();Pr.clientSideMonitoring={Publisher:gae().Publisher,configProvider:yae()};Pr.iniLoader=Sae().iniLoader;Pr.getSystemErrorName=require("util").getSystemErrorName;Pr.loadConfig=function(e){var t=e.environmentVariableSelector(process.env);if(t!==void 0)return t;var r={};try{r=Pr.iniLoader?Pr.iniLoader.loadFrom({isConfig:!0,filename:process.env[Pr.sharedConfigFileEnv]}):{}}catch{}var n=r[process.env.AWS_PROFILE||Pr.defaultProfile]||{},i=e.configFileSelector(n);return i!==void 0?i:typeof e.default=="function"?e.default():e.default};var Gt;ele.exports=Gt=Re();bk();wk();qae();Pae();kae();jae();Uae();jk();Gt.XML.Parser=vce();yce();Mk();_ce();Lce();Bce();Uce();Hce();zce();Wce();jk();Gce();Gt.CredentialProviderChain.defaultProviders=[function(){return new Gt.EnvironmentCredentials("AWS")},function(){return new Gt.EnvironmentCredentials("AMAZON")},function(){return new Gt.SsoCredentials},function(){return new Gt.SharedIniFileCredentials},function(){return new Gt.ECSCredentials},function(){return new Gt.ProcessCredentials},function(){return new Gt.TokenFileWebIdentityCredentials},function(){return new Gt.EC2MetadataCredentials}];Vce();Kce();Jce();Gt.TokenProviderChain.defaultProviders=[function(){return new Gt.SSOTokenProvider}];var Zce=function(){var e=process.env,t=e.AWS_REGION||e.AMAZON_REGION;if(e[Gt.util.configOptInEnv])for(var r=[{filename:e[Gt.util.sharedCredentialsFileEnv]},{isConfig:!0,filename:e[Gt.util.sharedConfigFileEnv]}],n=Gt.util.iniLoader;!t&&r.length;){var i={},s=r.shift();try{i=n.loadFrom(s)}catch(a){if(s.isConfig)throw a}var o=i[e.AWS_PROFILE||Gt.util.defaultProfile];t=o&&o.region}return t},jE=function(e){return e==="true"?!0:e==="false"?!1:void 0},Lmt={environmentVariableSelector:function(e){return jE(e.AWS_USE_FIPS_ENDPOINT)},configFileSelector:function(e){return jE(e.use_fips_endpoint)},default:!1},Fmt={environmentVariableSelector:function(e){return jE(e.AWS_USE_DUALSTACK_ENDPOINT)},configFileSelector:function(e){return jE(e.use_dualstack_endpoint)},default:!1};Gt.util.update(Gt.Config.prototype.keys,{credentials:function(){var e=null;return new Gt.CredentialProviderChain([function(){return new Gt.EnvironmentCredentials("AWS")},function(){return new Gt.EnvironmentCredentials("AMAZON")},function(){return new Gt.SharedIniFileCredentials({disableAssumeRole:!0})}]).resolve(function(t,r){t||(e=r)}),e},credentialProvider:function(){return new Gt.CredentialProviderChain},logger:function(){return process.env.AWSJS_DEBUG?console:null},region:function(){var e=Zce();return e?Dmt(e):void 0},tokenProvider:function(){return new Gt.TokenProviderChain},useFipsEndpoint:function(){var e=Zce();return kmt(e)?!0:Pr.loadConfig(Lmt)},useDualstackEndpoint:function(){return Pr.loadConfig(Fmt)}});Gt.config=new Gt.Config});var tle=g(()=>{var tD=Re();tD.util.update(tD.Lambda.prototype,{setupRequestListeners:function(t){t.operation==="invoke"&&t.addListener("extractData",tD.util.convertPayloadToString)}})});var rle=g((mnr,Mmt)=>{Mmt.exports={metadata:{apiVersion:"2014-11-11",endpointPrefix:"lambda",serviceFullName:"AWS Lambda",serviceId:"Lambda",signatureVersion:"v4",protocol:"rest-json"},operations:{AddEventSource:{http:{requestUri:"/2014-11-13/event-source-mappings/"},input:{type:"structure",required:["EventSource","FunctionName","Role"],members:{EventSource:{},FunctionName:{},Role:{},BatchSize:{type:"integer"},Parameters:{shape:"S6"}}},output:{shape:"S7"}},DeleteFunction:{http:{method:"DELETE",requestUri:"/2014-11-13/functions/{FunctionName}",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}}},GetEventSource:{http:{method:"GET",requestUri:"/2014-11-13/event-source-mappings/{UUID}",responseCode:200},input:{type:"structure",required:["UUID"],members:{UUID:{location:"uri",locationName:"UUID"}}},output:{shape:"S7"}},GetFunction:{http:{method:"GET",requestUri:"/2014-11-13/functions/{FunctionName}",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}},output:{type:"structure",members:{Configuration:{shape:"Se"},Code:{type:"structure",members:{RepositoryType:{},Location:{}}}}}},GetFunctionConfiguration:{http:{method:"GET",requestUri:"/2014-11-13/functions/{FunctionName}/configuration",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}},output:{shape:"Se"}},InvokeAsync:{http:{requestUri:"/2014-11-13/functions/{FunctionName}/invoke-async/",responseCode:202},input:{type:"structure",required:["FunctionName","InvokeArgs"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},InvokeArgs:{shape:"Sq"}},payload:"InvokeArgs"},output:{type:"structure",members:{Status:{location:"statusCode",type:"integer"}}}},ListEventSources:{http:{method:"GET",requestUri:"/2014-11-13/event-source-mappings/",responseCode:200},input:{type:"structure",members:{EventSourceArn:{location:"querystring",locationName:"EventSource"},FunctionName:{location:"querystring",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},EventSources:{type:"list",member:{shape:"S7"}}}}},ListFunctions:{http:{method:"GET",requestUri:"/2014-11-13/functions/",responseCode:200},input:{type:"structure",members:{Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},Functions:{type:"list",member:{shape:"Se"}}}}},RemoveEventSource:{http:{method:"DELETE",requestUri:"/2014-11-13/event-source-mappings/{UUID}",responseCode:204},input:{type:"structure",required:["UUID"],members:{UUID:{location:"uri",locationName:"UUID"}}}},UpdateFunctionConfiguration:{http:{method:"PUT",requestUri:"/2014-11-13/functions/{FunctionName}/configuration",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Role:{location:"querystring",locationName:"Role"},Handler:{location:"querystring",locationName:"Handler"},Description:{location:"querystring",locationName:"Description"},Timeout:{location:"querystring",locationName:"Timeout",type:"integer"},MemorySize:{location:"querystring",locationName:"MemorySize",type:"integer"}}},output:{shape:"Se"}},UploadFunction:{http:{method:"PUT",requestUri:"/2014-11-13/functions/{FunctionName}",responseCode:201},input:{type:"structure",required:["FunctionName","FunctionZip","Runtime","Role","Handler","Mode"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},FunctionZip:{shape:"Sq"},Runtime:{location:"querystring",locationName:"Runtime"},Role:{location:"querystring",locationName:"Role"},Handler:{location:"querystring",locationName:"Handler"},Mode:{location:"querystring",locationName:"Mode"},Description:{location:"querystring",locationName:"Description"},Timeout:{location:"querystring",locationName:"Timeout",type:"integer"},MemorySize:{location:"querystring",locationName:"MemorySize",type:"integer"}},payload:"FunctionZip"},output:{shape:"Se"}}},shapes:{S6:{type:"map",key:{},value:{}},S7:{type:"structure",members:{UUID:{},BatchSize:{type:"integer"},EventSource:{},FunctionName:{},Parameters:{shape:"S6"},Role:{},LastModified:{type:"timestamp"},IsActive:{type:"boolean"},Status:{}}},Se:{type:"structure",members:{FunctionName:{},FunctionARN:{},ConfigurationId:{},Runtime:{},Role:{},Handler:{},Mode:{},CodeSize:{type:"long"},Description:{},Timeout:{type:"integer"},MemorySize:{type:"integer"},LastModified:{type:"timestamp"}}},Sq:{type:"blob",streaming:!0}}}});var nle=g((gnr,Bmt)=>{Bmt.exports={pagination:{ListEventSources:{input_token:"Marker",output_token:"NextMarker",limit_key:"MaxItems",result_key:"EventSources"},ListFunctions:{input_token:"Marker",output_token:"NextMarker",limit_key:"MaxItems",result_key:"Functions"}}}});var ile=g((vnr,jmt)=>{jmt.exports={version:"2.0",metadata:{apiVersion:"2015-03-31",endpointPrefix:"lambda",protocol:"rest-json",serviceFullName:"AWS Lambda",serviceId:"Lambda",signatureVersion:"v4",uid:"lambda-2015-03-31"},operations:{AddLayerVersionPermission:{http:{requestUri:"/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",responseCode:201},input:{type:"structure",required:["LayerName","VersionNumber","StatementId","Action","Principal"],members:{LayerName:{location:"uri",locationName:"LayerName"},VersionNumber:{location:"uri",locationName:"VersionNumber",type:"long"},StatementId:{},Action:{},Principal:{},OrganizationId:{},RevisionId:{location:"querystring",locationName:"RevisionId"}}},output:{type:"structure",members:{Statement:{},RevisionId:{}}}},AddPermission:{http:{requestUri:"/2015-03-31/functions/{FunctionName}/policy",responseCode:201},input:{type:"structure",required:["FunctionName","StatementId","Action","Principal"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},StatementId:{},Action:{},Principal:{},SourceArn:{},SourceAccount:{},EventSourceToken:{},Qualifier:{location:"querystring",locationName:"Qualifier"},RevisionId:{},PrincipalOrgID:{},FunctionUrlAuthType:{}}},output:{type:"structure",members:{Statement:{}}}},CreateAlias:{http:{requestUri:"/2015-03-31/functions/{FunctionName}/aliases",responseCode:201},input:{type:"structure",required:["FunctionName","Name","FunctionVersion"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Name:{},FunctionVersion:{},Description:{},RoutingConfig:{shape:"Sp"}}},output:{shape:"St"}},CreateCodeSigningConfig:{http:{requestUri:"/2020-04-22/code-signing-configs/",responseCode:201},input:{type:"structure",required:["AllowedPublishers"],members:{Description:{},AllowedPublishers:{shape:"Sw"},CodeSigningPolicies:{shape:"Sy"}}},output:{type:"structure",required:["CodeSigningConfig"],members:{CodeSigningConfig:{shape:"S11"}}}},CreateEventSourceMapping:{http:{requestUri:"/2015-03-31/event-source-mappings/",responseCode:202},input:{type:"structure",required:["FunctionName"],members:{EventSourceArn:{},FunctionName:{},Enabled:{type:"boolean"},BatchSize:{type:"integer"},FilterCriteria:{shape:"S18"},MaximumBatchingWindowInSeconds:{type:"integer"},ParallelizationFactor:{type:"integer"},StartingPosition:{},StartingPositionTimestamp:{type:"timestamp"},DestinationConfig:{shape:"S1g"},MaximumRecordAgeInSeconds:{type:"integer"},BisectBatchOnFunctionError:{type:"boolean"},MaximumRetryAttempts:{type:"integer"},TumblingWindowInSeconds:{type:"integer"},Topics:{shape:"S1o"},Queues:{shape:"S1q"},SourceAccessConfigurations:{shape:"S1s"},SelfManagedEventSource:{shape:"S1w"},FunctionResponseTypes:{shape:"S21"},AmazonManagedKafkaEventSourceConfig:{shape:"S23"},SelfManagedKafkaEventSourceConfig:{shape:"S24"},ScalingConfig:{shape:"S25"},DocumentDBEventSourceConfig:{shape:"S27"}}},output:{shape:"S2b"}},CreateFunction:{http:{requestUri:"/2015-03-31/functions",responseCode:201},input:{type:"structure",required:["FunctionName","Role","Code"],members:{FunctionName:{},Runtime:{},Role:{},Handler:{},Code:{type:"structure",members:{ZipFile:{shape:"S2h"},S3Bucket:{},S3Key:{},S3ObjectVersion:{},ImageUri:{}}},Description:{},Timeout:{type:"integer"},MemorySize:{type:"integer"},Publish:{type:"boolean"},VpcConfig:{shape:"S2o"},PackageType:{},DeadLetterConfig:{shape:"S2u"},Environment:{shape:"S2w"},KMSKeyArn:{},TracingConfig:{shape:"S31"},Tags:{shape:"S33"},Layers:{shape:"S36"},FileSystemConfigs:{shape:"S38"},ImageConfig:{shape:"S3c"},CodeSigningConfigArn:{},Architectures:{shape:"S3f"},EphemeralStorage:{shape:"S3h"},SnapStart:{shape:"S3j"}}},output:{shape:"S3l"}},CreateFunctionUrlConfig:{http:{requestUri:"/2021-10-31/functions/{FunctionName}/url",responseCode:201},input:{type:"structure",required:["FunctionName","AuthType"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},AuthType:{},Cors:{shape:"S4c"},InvokeMode:{}}},output:{type:"structure",required:["FunctionUrl","FunctionArn","AuthType","CreationTime"],members:{FunctionUrl:{},FunctionArn:{},AuthType:{},Cors:{shape:"S4c"},CreationTime:{},InvokeMode:{}}}},DeleteAlias:{http:{method:"DELETE",requestUri:"/2015-03-31/functions/{FunctionName}/aliases/{Name}",responseCode:204},input:{type:"structure",required:["FunctionName","Name"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Name:{location:"uri",locationName:"Name"}}}},DeleteCodeSigningConfig:{http:{method:"DELETE",requestUri:"/2020-04-22/code-signing-configs/{CodeSigningConfigArn}",responseCode:204},input:{type:"structure",required:["CodeSigningConfigArn"],members:{CodeSigningConfigArn:{location:"uri",locationName:"CodeSigningConfigArn"}}},output:{type:"structure",members:{}}},DeleteEventSourceMapping:{http:{method:"DELETE",requestUri:"/2015-03-31/event-source-mappings/{UUID}",responseCode:202},input:{type:"structure",required:["UUID"],members:{UUID:{location:"uri",locationName:"UUID"}}},output:{shape:"S2b"}},DeleteFunction:{http:{method:"DELETE",requestUri:"/2015-03-31/functions/{FunctionName}",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}}},DeleteFunctionCodeSigningConfig:{http:{method:"DELETE",requestUri:"/2020-06-30/functions/{FunctionName}/code-signing-config",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}}},DeleteFunctionConcurrency:{http:{method:"DELETE",requestUri:"/2017-10-31/functions/{FunctionName}/concurrency",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}}},DeleteFunctionEventInvokeConfig:{http:{method:"DELETE",requestUri:"/2019-09-25/functions/{FunctionName}/event-invoke-config",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}}},DeleteFunctionUrlConfig:{http:{method:"DELETE",requestUri:"/2021-10-31/functions/{FunctionName}/url",responseCode:204},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}}},DeleteLayerVersion:{http:{method:"DELETE",requestUri:"/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",responseCode:204},input:{type:"structure",required:["LayerName","VersionNumber"],members:{LayerName:{location:"uri",locationName:"LayerName"},VersionNumber:{location:"uri",locationName:"VersionNumber",type:"long"}}}},DeleteProvisionedConcurrencyConfig:{http:{method:"DELETE",requestUri:"/2019-09-30/functions/{FunctionName}/provisioned-concurrency",responseCode:204},input:{type:"structure",required:["FunctionName","Qualifier"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}}},GetAccountSettings:{http:{method:"GET",requestUri:"/2016-08-19/account-settings/",responseCode:200},input:{type:"structure",members:{}},output:{type:"structure",members:{AccountLimit:{type:"structure",members:{TotalCodeSize:{type:"long"},CodeSizeUnzipped:{type:"long"},CodeSizeZipped:{type:"long"},ConcurrentExecutions:{type:"integer"},UnreservedConcurrentExecutions:{type:"integer"}}},AccountUsage:{type:"structure",members:{TotalCodeSize:{type:"long"},FunctionCount:{type:"long"}}}}}},GetAlias:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}/aliases/{Name}",responseCode:200},input:{type:"structure",required:["FunctionName","Name"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Name:{location:"uri",locationName:"Name"}}},output:{shape:"St"}},GetCodeSigningConfig:{http:{method:"GET",requestUri:"/2020-04-22/code-signing-configs/{CodeSigningConfigArn}",responseCode:200},input:{type:"structure",required:["CodeSigningConfigArn"],members:{CodeSigningConfigArn:{location:"uri",locationName:"CodeSigningConfigArn"}}},output:{type:"structure",required:["CodeSigningConfig"],members:{CodeSigningConfig:{shape:"S11"}}}},GetEventSourceMapping:{http:{method:"GET",requestUri:"/2015-03-31/event-source-mappings/{UUID}",responseCode:200},input:{type:"structure",required:["UUID"],members:{UUID:{location:"uri",locationName:"UUID"}}},output:{shape:"S2b"}},GetFunction:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{type:"structure",members:{Configuration:{shape:"S3l"},Code:{type:"structure",members:{RepositoryType:{},Location:{},ImageUri:{},ResolvedImageUri:{}}},Tags:{shape:"S33"},Concurrency:{shape:"S5c"}}}},GetFunctionCodeSigningConfig:{http:{method:"GET",requestUri:"/2020-06-30/functions/{FunctionName}/code-signing-config",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}},output:{type:"structure",required:["CodeSigningConfigArn","FunctionName"],members:{CodeSigningConfigArn:{},FunctionName:{}}}},GetFunctionConcurrency:{http:{method:"GET",requestUri:"/2019-09-30/functions/{FunctionName}/concurrency",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"}}},output:{type:"structure",members:{ReservedConcurrentExecutions:{type:"integer"}}}},GetFunctionConfiguration:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}/configuration",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{shape:"S3l"}},GetFunctionEventInvokeConfig:{http:{method:"GET",requestUri:"/2019-09-25/functions/{FunctionName}/event-invoke-config",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{shape:"S5k"}},GetFunctionUrlConfig:{http:{method:"GET",requestUri:"/2021-10-31/functions/{FunctionName}/url",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{type:"structure",required:["FunctionUrl","FunctionArn","AuthType","CreationTime","LastModifiedTime"],members:{FunctionUrl:{},FunctionArn:{},AuthType:{},Cors:{shape:"S4c"},CreationTime:{},LastModifiedTime:{},InvokeMode:{}}}},GetLayerVersion:{http:{method:"GET",requestUri:"/2018-10-31/layers/{LayerName}/versions/{VersionNumber}",responseCode:200},input:{type:"structure",required:["LayerName","VersionNumber"],members:{LayerName:{location:"uri",locationName:"LayerName"},VersionNumber:{location:"uri",locationName:"VersionNumber",type:"long"}}},output:{shape:"S5q"}},GetLayerVersionByArn:{http:{method:"GET",requestUri:"/2018-10-31/layers?find=LayerVersion",responseCode:200},input:{type:"structure",required:["Arn"],members:{Arn:{location:"querystring",locationName:"Arn"}}},output:{shape:"S5q"}},GetLayerVersionPolicy:{http:{method:"GET",requestUri:"/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy",responseCode:200},input:{type:"structure",required:["LayerName","VersionNumber"],members:{LayerName:{location:"uri",locationName:"LayerName"},VersionNumber:{location:"uri",locationName:"VersionNumber",type:"long"}}},output:{type:"structure",members:{Policy:{},RevisionId:{}}}},GetPolicy:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}/policy",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{type:"structure",members:{Policy:{},RevisionId:{}}}},GetProvisionedConcurrencyConfig:{http:{method:"GET",requestUri:"/2019-09-30/functions/{FunctionName}/provisioned-concurrency",responseCode:200},input:{type:"structure",required:["FunctionName","Qualifier"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{type:"structure",members:{RequestedProvisionedConcurrentExecutions:{type:"integer"},AvailableProvisionedConcurrentExecutions:{type:"integer"},AllocatedProvisionedConcurrentExecutions:{type:"integer"},Status:{},StatusReason:{},LastModified:{}}}},GetRuntimeManagementConfig:{http:{method:"GET",requestUri:"/2021-07-20/functions/{FunctionName}/runtime-management-config",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"}}},output:{type:"structure",members:{UpdateRuntimeOn:{},RuntimeVersionArn:{},FunctionArn:{}}}},Invoke:{http:{requestUri:"/2015-03-31/functions/{FunctionName}/invocations"},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},InvocationType:{location:"header",locationName:"X-Amz-Invocation-Type"},LogType:{location:"header",locationName:"X-Amz-Log-Type"},ClientContext:{location:"header",locationName:"X-Amz-Client-Context"},Payload:{shape:"S2h"},Qualifier:{location:"querystring",locationName:"Qualifier"}},payload:"Payload"},output:{type:"structure",members:{StatusCode:{location:"statusCode",type:"integer"},FunctionError:{location:"header",locationName:"X-Amz-Function-Error"},LogResult:{location:"header",locationName:"X-Amz-Log-Result"},Payload:{shape:"S2h"},ExecutedVersion:{location:"header",locationName:"X-Amz-Executed-Version"}},payload:"Payload"}},InvokeAsync:{http:{requestUri:"/2014-11-13/functions/{FunctionName}/invoke-async/",responseCode:202},input:{type:"structure",required:["FunctionName","InvokeArgs"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},InvokeArgs:{type:"blob",streaming:!0}},deprecated:!0,payload:"InvokeArgs"},output:{type:"structure",members:{Status:{location:"statusCode",type:"integer"}},deprecated:!0},deprecated:!0},InvokeWithResponseStream:{http:{requestUri:"/2021-11-15/functions/{FunctionName}/response-streaming-invocations"},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},InvocationType:{location:"header",locationName:"X-Amz-Invocation-Type"},LogType:{location:"header",locationName:"X-Amz-Log-Type"},ClientContext:{location:"header",locationName:"X-Amz-Client-Context"},Qualifier:{location:"querystring",locationName:"Qualifier"},Payload:{shape:"S2h"}},payload:"Payload"},output:{type:"structure",members:{StatusCode:{location:"statusCode",type:"integer"},ExecutedVersion:{location:"header",locationName:"X-Amz-Executed-Version"},EventStream:{type:"structure",members:{PayloadChunk:{type:"structure",members:{Payload:{shape:"S2h",eventpayload:!0}},event:!0},InvokeComplete:{type:"structure",members:{ErrorCode:{},ErrorDetails:{},LogResult:{}},event:!0}},eventstream:!0},ResponseStreamContentType:{location:"header",locationName:"Content-Type"}},payload:"EventStream"}},ListAliases:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}/aliases",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},FunctionVersion:{location:"querystring",locationName:"FunctionVersion"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},Aliases:{type:"list",member:{shape:"St"}}}}},ListCodeSigningConfigs:{http:{method:"GET",requestUri:"/2020-04-22/code-signing-configs/",responseCode:200},input:{type:"structure",members:{Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},CodeSigningConfigs:{type:"list",member:{shape:"S11"}}}}},ListEventSourceMappings:{http:{method:"GET",requestUri:"/2015-03-31/event-source-mappings/",responseCode:200},input:{type:"structure",members:{EventSourceArn:{location:"querystring",locationName:"EventSourceArn"},FunctionName:{location:"querystring",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},EventSourceMappings:{type:"list",member:{shape:"S2b"}}}}},ListFunctionEventInvokeConfigs:{http:{method:"GET",requestUri:"/2019-09-25/functions/{FunctionName}/event-invoke-config/list",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{FunctionEventInvokeConfigs:{type:"list",member:{shape:"S5k"}},NextMarker:{}}}},ListFunctionUrlConfigs:{http:{method:"GET",requestUri:"/2021-10-31/functions/{FunctionName}/urls",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",required:["FunctionUrlConfigs"],members:{FunctionUrlConfigs:{type:"list",member:{type:"structure",required:["FunctionUrl","FunctionArn","CreationTime","LastModifiedTime","AuthType"],members:{FunctionUrl:{},FunctionArn:{},CreationTime:{},LastModifiedTime:{},Cors:{shape:"S4c"},AuthType:{},InvokeMode:{}}}},NextMarker:{}}}},ListFunctions:{http:{method:"GET",requestUri:"/2015-03-31/functions/",responseCode:200},input:{type:"structure",members:{MasterRegion:{location:"querystring",locationName:"MasterRegion"},FunctionVersion:{location:"querystring",locationName:"FunctionVersion"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},Functions:{shape:"S7a"}}}},ListFunctionsByCodeSigningConfig:{http:{method:"GET",requestUri:"/2020-04-22/code-signing-configs/{CodeSigningConfigArn}/functions",responseCode:200},input:{type:"structure",required:["CodeSigningConfigArn"],members:{CodeSigningConfigArn:{location:"uri",locationName:"CodeSigningConfigArn"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},FunctionArns:{type:"list",member:{}}}}},ListLayerVersions:{http:{method:"GET",requestUri:"/2018-10-31/layers/{LayerName}/versions",responseCode:200},input:{type:"structure",required:["LayerName"],members:{CompatibleRuntime:{location:"querystring",locationName:"CompatibleRuntime"},LayerName:{location:"uri",locationName:"LayerName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"},CompatibleArchitecture:{location:"querystring",locationName:"CompatibleArchitecture"}}},output:{type:"structure",members:{NextMarker:{},LayerVersions:{type:"list",member:{shape:"S7i"}}}}},ListLayers:{http:{method:"GET",requestUri:"/2018-10-31/layers",responseCode:200},input:{type:"structure",members:{CompatibleRuntime:{location:"querystring",locationName:"CompatibleRuntime"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"},CompatibleArchitecture:{location:"querystring",locationName:"CompatibleArchitecture"}}},output:{type:"structure",members:{NextMarker:{},Layers:{type:"list",member:{type:"structure",members:{LayerName:{},LayerArn:{},LatestMatchingVersion:{shape:"S7i"}}}}}}},ListProvisionedConcurrencyConfigs:{http:{method:"GET",requestUri:"/2019-09-30/functions/{FunctionName}/provisioned-concurrency?List=ALL",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{ProvisionedConcurrencyConfigs:{type:"list",member:{type:"structure",members:{FunctionArn:{},RequestedProvisionedConcurrentExecutions:{type:"integer"},AvailableProvisionedConcurrentExecutions:{type:"integer"},AllocatedProvisionedConcurrentExecutions:{type:"integer"},Status:{},StatusReason:{},LastModified:{}}}},NextMarker:{}}}},ListTags:{http:{method:"GET",requestUri:"/2017-03-31/tags/{ARN}"},input:{type:"structure",required:["Resource"],members:{Resource:{location:"uri",locationName:"ARN"}}},output:{type:"structure",members:{Tags:{shape:"S33"}}}},ListVersionsByFunction:{http:{method:"GET",requestUri:"/2015-03-31/functions/{FunctionName}/versions",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Marker:{location:"querystring",locationName:"Marker"},MaxItems:{location:"querystring",locationName:"MaxItems",type:"integer"}}},output:{type:"structure",members:{NextMarker:{},Versions:{shape:"S7a"}}}},PublishLayerVersion:{http:{requestUri:"/2018-10-31/layers/{LayerName}/versions",responseCode:201},input:{type:"structure",required:["LayerName","Content"],members:{LayerName:{location:"uri",locationName:"LayerName"},Description:{},Content:{type:"structure",members:{S3Bucket:{},S3Key:{},S3ObjectVersion:{},ZipFile:{shape:"S2h"}}},CompatibleRuntimes:{shape:"S5t"},LicenseInfo:{},CompatibleArchitectures:{shape:"S5v"}}},output:{type:"structure",members:{Content:{shape:"S5r"},LayerArn:{},LayerVersionArn:{},Description:{},CreatedDate:{},Version:{type:"long"},CompatibleRuntimes:{shape:"S5t"},LicenseInfo:{},CompatibleArchitectures:{shape:"S5v"}}}},PublishVersion:{http:{requestUri:"/2015-03-31/functions/{FunctionName}/versions",responseCode:201},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},CodeSha256:{},Description:{},RevisionId:{}}},output:{shape:"S3l"}},PutFunctionCodeSigningConfig:{http:{method:"PUT",requestUri:"/2020-06-30/functions/{FunctionName}/code-signing-config",responseCode:200},input:{type:"structure",required:["CodeSigningConfigArn","FunctionName"],members:{CodeSigningConfigArn:{},FunctionName:{location:"uri",locationName:"FunctionName"}}},output:{type:"structure",required:["CodeSigningConfigArn","FunctionName"],members:{CodeSigningConfigArn:{},FunctionName:{}}}},PutFunctionConcurrency:{http:{method:"PUT",requestUri:"/2017-10-31/functions/{FunctionName}/concurrency",responseCode:200},input:{type:"structure",required:["FunctionName","ReservedConcurrentExecutions"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},ReservedConcurrentExecutions:{type:"integer"}}},output:{shape:"S5c"}},PutFunctionEventInvokeConfig:{http:{method:"PUT",requestUri:"/2019-09-25/functions/{FunctionName}/event-invoke-config",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},MaximumRetryAttempts:{type:"integer"},MaximumEventAgeInSeconds:{type:"integer"},DestinationConfig:{shape:"S1g"}}},output:{shape:"S5k"}},PutProvisionedConcurrencyConfig:{http:{method:"PUT",requestUri:"/2019-09-30/functions/{FunctionName}/provisioned-concurrency",responseCode:202},input:{type:"structure",required:["FunctionName","Qualifier","ProvisionedConcurrentExecutions"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},ProvisionedConcurrentExecutions:{type:"integer"}}},output:{type:"structure",members:{RequestedProvisionedConcurrentExecutions:{type:"integer"},AvailableProvisionedConcurrentExecutions:{type:"integer"},AllocatedProvisionedConcurrentExecutions:{type:"integer"},Status:{},StatusReason:{},LastModified:{}}}},PutRuntimeManagementConfig:{http:{method:"PUT",requestUri:"/2021-07-20/functions/{FunctionName}/runtime-management-config",responseCode:200},input:{type:"structure",required:["FunctionName","UpdateRuntimeOn"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},UpdateRuntimeOn:{},RuntimeVersionArn:{}}},output:{type:"structure",required:["UpdateRuntimeOn","FunctionArn"],members:{UpdateRuntimeOn:{},FunctionArn:{},RuntimeVersionArn:{}}}},RemoveLayerVersionPermission:{http:{method:"DELETE",requestUri:"/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}",responseCode:204},input:{type:"structure",required:["LayerName","VersionNumber","StatementId"],members:{LayerName:{location:"uri",locationName:"LayerName"},VersionNumber:{location:"uri",locationName:"VersionNumber",type:"long"},StatementId:{location:"uri",locationName:"StatementId"},RevisionId:{location:"querystring",locationName:"RevisionId"}}}},RemovePermission:{http:{method:"DELETE",requestUri:"/2015-03-31/functions/{FunctionName}/policy/{StatementId}",responseCode:204},input:{type:"structure",required:["FunctionName","StatementId"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},StatementId:{location:"uri",locationName:"StatementId"},Qualifier:{location:"querystring",locationName:"Qualifier"},RevisionId:{location:"querystring",locationName:"RevisionId"}}}},TagResource:{http:{requestUri:"/2017-03-31/tags/{ARN}",responseCode:204},input:{type:"structure",required:["Resource","Tags"],members:{Resource:{location:"uri",locationName:"ARN"},Tags:{shape:"S33"}}}},UntagResource:{http:{method:"DELETE",requestUri:"/2017-03-31/tags/{ARN}",responseCode:204},input:{type:"structure",required:["Resource","TagKeys"],members:{Resource:{location:"uri",locationName:"ARN"},TagKeys:{location:"querystring",locationName:"tagKeys",type:"list",member:{}}}}},UpdateAlias:{http:{method:"PUT",requestUri:"/2015-03-31/functions/{FunctionName}/aliases/{Name}",responseCode:200},input:{type:"structure",required:["FunctionName","Name"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Name:{location:"uri",locationName:"Name"},FunctionVersion:{},Description:{},RoutingConfig:{shape:"Sp"},RevisionId:{}}},output:{shape:"St"}},UpdateCodeSigningConfig:{http:{method:"PUT",requestUri:"/2020-04-22/code-signing-configs/{CodeSigningConfigArn}",responseCode:200},input:{type:"structure",required:["CodeSigningConfigArn"],members:{CodeSigningConfigArn:{location:"uri",locationName:"CodeSigningConfigArn"},Description:{},AllowedPublishers:{shape:"Sw"},CodeSigningPolicies:{shape:"Sy"}}},output:{type:"structure",required:["CodeSigningConfig"],members:{CodeSigningConfig:{shape:"S11"}}}},UpdateEventSourceMapping:{http:{method:"PUT",requestUri:"/2015-03-31/event-source-mappings/{UUID}",responseCode:202},input:{type:"structure",required:["UUID"],members:{UUID:{location:"uri",locationName:"UUID"},FunctionName:{},Enabled:{type:"boolean"},BatchSize:{type:"integer"},FilterCriteria:{shape:"S18"},MaximumBatchingWindowInSeconds:{type:"integer"},DestinationConfig:{shape:"S1g"},MaximumRecordAgeInSeconds:{type:"integer"},BisectBatchOnFunctionError:{type:"boolean"},MaximumRetryAttempts:{type:"integer"},ParallelizationFactor:{type:"integer"},SourceAccessConfigurations:{shape:"S1s"},TumblingWindowInSeconds:{type:"integer"},FunctionResponseTypes:{shape:"S21"},ScalingConfig:{shape:"S25"},DocumentDBEventSourceConfig:{shape:"S27"}}},output:{shape:"S2b"}},UpdateFunctionCode:{http:{method:"PUT",requestUri:"/2015-03-31/functions/{FunctionName}/code",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},ZipFile:{shape:"S2h"},S3Bucket:{},S3Key:{},S3ObjectVersion:{},ImageUri:{},Publish:{type:"boolean"},DryRun:{type:"boolean"},RevisionId:{},Architectures:{shape:"S3f"}}},output:{shape:"S3l"}},UpdateFunctionConfiguration:{http:{method:"PUT",requestUri:"/2015-03-31/functions/{FunctionName}/configuration",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Role:{},Handler:{},Description:{},Timeout:{type:"integer"},MemorySize:{type:"integer"},VpcConfig:{shape:"S2o"},Environment:{shape:"S2w"},Runtime:{},DeadLetterConfig:{shape:"S2u"},KMSKeyArn:{},TracingConfig:{shape:"S31"},RevisionId:{},Layers:{shape:"S36"},FileSystemConfigs:{shape:"S38"},ImageConfig:{shape:"S3c"},EphemeralStorage:{shape:"S3h"},SnapStart:{shape:"S3j"}}},output:{shape:"S3l"}},UpdateFunctionEventInvokeConfig:{http:{requestUri:"/2019-09-25/functions/{FunctionName}/event-invoke-config",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},MaximumRetryAttempts:{type:"integer"},MaximumEventAgeInSeconds:{type:"integer"},DestinationConfig:{shape:"S1g"}}},output:{shape:"S5k"}},UpdateFunctionUrlConfig:{http:{method:"PUT",requestUri:"/2021-10-31/functions/{FunctionName}/url",responseCode:200},input:{type:"structure",required:["FunctionName"],members:{FunctionName:{location:"uri",locationName:"FunctionName"},Qualifier:{location:"querystring",locationName:"Qualifier"},AuthType:{},Cors:{shape:"S4c"},InvokeMode:{}}},output:{type:"structure",required:["FunctionUrl","FunctionArn","AuthType","CreationTime","LastModifiedTime"],members:{FunctionUrl:{},FunctionArn:{},AuthType:{},Cors:{shape:"S4c"},CreationTime:{},LastModifiedTime:{},InvokeMode:{}}}}},shapes:{Sp:{type:"structure",members:{AdditionalVersionWeights:{type:"map",key:{},value:{type:"double"}}}},St:{type:"structure",members:{AliasArn:{},Name:{},FunctionVersion:{},Description:{},RoutingConfig:{shape:"Sp"},RevisionId:{}}},Sw:{type:"structure",required:["SigningProfileVersionArns"],members:{SigningProfileVersionArns:{type:"list",member:{}}}},Sy:{type:"structure",members:{UntrustedArtifactOnDeployment:{}}},S11:{type:"structure",required:["CodeSigningConfigId","CodeSigningConfigArn","AllowedPublishers","CodeSigningPolicies","LastModified"],members:{CodeSigningConfigId:{},CodeSigningConfigArn:{},Description:{},AllowedPublishers:{shape:"Sw"},CodeSigningPolicies:{shape:"Sy"},LastModified:{}}},S18:{type:"structure",members:{Filters:{type:"list",member:{type:"structure",members:{Pattern:{}}}}}},S1g:{type:"structure",members:{OnSuccess:{type:"structure",members:{Destination:{}}},OnFailure:{type:"structure",members:{Destination:{}}}}},S1o:{type:"list",member:{}},S1q:{type:"list",member:{}},S1s:{type:"list",member:{type:"structure",members:{Type:{},URI:{}}}},S1w:{type:"structure",members:{Endpoints:{type:"map",key:{},value:{type:"list",member:{}}}}},S21:{type:"list",member:{}},S23:{type:"structure",members:{ConsumerGroupId:{}}},S24:{type:"structure",members:{ConsumerGroupId:{}}},S25:{type:"structure",members:{MaximumConcurrency:{type:"integer"}}},S27:{type:"structure",members:{DatabaseName:{},CollectionName:{},FullDocument:{}}},S2b:{type:"structure",members:{UUID:{},StartingPosition:{},StartingPositionTimestamp:{type:"timestamp"},BatchSize:{type:"integer"},MaximumBatchingWindowInSeconds:{type:"integer"},ParallelizationFactor:{type:"integer"},EventSourceArn:{},FilterCriteria:{shape:"S18"},FunctionArn:{},LastModified:{type:"timestamp"},LastProcessingResult:{},State:{},StateTransitionReason:{},DestinationConfig:{shape:"S1g"},Topics:{shape:"S1o"},Queues:{shape:"S1q"},SourceAccessConfigurations:{shape:"S1s"},SelfManagedEventSource:{shape:"S1w"},MaximumRecordAgeInSeconds:{type:"integer"},BisectBatchOnFunctionError:{type:"boolean"},MaximumRetryAttempts:{type:"integer"},TumblingWindowInSeconds:{type:"integer"},FunctionResponseTypes:{shape:"S21"},AmazonManagedKafkaEventSourceConfig:{shape:"S23"},SelfManagedKafkaEventSourceConfig:{shape:"S24"},ScalingConfig:{shape:"S25"},DocumentDBEventSourceConfig:{shape:"S27"}}},S2h:{type:"blob",sensitive:!0},S2o:{type:"structure",members:{SubnetIds:{shape:"S2p"},SecurityGroupIds:{shape:"S2r"}}},S2p:{type:"list",member:{}},S2r:{type:"list",member:{}},S2u:{type:"structure",members:{TargetArn:{}}},S2w:{type:"structure",members:{Variables:{shape:"S2x"}}},S2x:{type:"map",key:{type:"string",sensitive:!0},value:{type:"string",sensitive:!0},sensitive:!0},S31:{type:"structure",members:{Mode:{}}},S33:{type:"map",key:{},value:{}},S36:{type:"list",member:{}},S38:{type:"list",member:{type:"structure",required:["Arn","LocalMountPath"],members:{Arn:{},LocalMountPath:{}}}},S3c:{type:"structure",members:{EntryPoint:{shape:"S3d"},Command:{shape:"S3d"},WorkingDirectory:{}}},S3d:{type:"list",member:{}},S3f:{type:"list",member:{}},S3h:{type:"structure",required:["Size"],members:{Size:{type:"integer"}}},S3j:{type:"structure",members:{ApplyOn:{}}},S3l:{type:"structure",members:{FunctionName:{},FunctionArn:{},Runtime:{},Role:{},Handler:{},CodeSize:{type:"long"},Description:{},Timeout:{type:"integer"},MemorySize:{type:"integer"},LastModified:{},CodeSha256:{},Version:{},VpcConfig:{type:"structure",members:{SubnetIds:{shape:"S2p"},SecurityGroupIds:{shape:"S2r"},VpcId:{}}},DeadLetterConfig:{shape:"S2u"},Environment:{type:"structure",members:{Variables:{shape:"S2x"},Error:{type:"structure",members:{ErrorCode:{},Message:{shape:"S3t"}}}}},KMSKeyArn:{},TracingConfig:{type:"structure",members:{Mode:{}}},MasterArn:{},RevisionId:{},Layers:{type:"list",member:{type:"structure",members:{Arn:{},CodeSize:{type:"long"},SigningProfileVersionArn:{},SigningJobArn:{}}}},State:{},StateReason:{},StateReasonCode:{},LastUpdateStatus:{},LastUpdateStatusReason:{},LastUpdateStatusReasonCode:{},FileSystemConfigs:{shape:"S38"},PackageType:{},ImageConfigResponse:{type:"structure",members:{ImageConfig:{shape:"S3c"},Error:{type:"structure",members:{ErrorCode:{},Message:{shape:"S3t"}}}}},SigningProfileVersionArn:{},SigningJobArn:{},Architectures:{shape:"S3f"},EphemeralStorage:{shape:"S3h"},SnapStart:{type:"structure",members:{ApplyOn:{},OptimizationStatus:{}}},RuntimeVersionConfig:{type:"structure",members:{RuntimeVersionArn:{},Error:{type:"structure",members:{ErrorCode:{},Message:{shape:"S3t"}}}}}}},S3t:{type:"string",sensitive:!0},S4c:{type:"structure",members:{AllowCredentials:{type:"boolean"},AllowHeaders:{shape:"S4e"},AllowMethods:{type:"list",member:{}},AllowOrigins:{type:"list",member:{}},ExposeHeaders:{shape:"S4e"},MaxAge:{type:"integer"}}},S4e:{type:"list",member:{}},S5c:{type:"structure",members:{ReservedConcurrentExecutions:{type:"integer"}}},S5k:{type:"structure",members:{LastModified:{type:"timestamp"},FunctionArn:{},MaximumRetryAttempts:{type:"integer"},MaximumEventAgeInSeconds:{type:"integer"},DestinationConfig:{shape:"S1g"}}},S5q:{type:"structure",members:{Content:{shape:"S5r"},LayerArn:{},LayerVersionArn:{},Description:{},CreatedDate:{},Version:{type:"long"},CompatibleRuntimes:{shape:"S5t"},LicenseInfo:{},CompatibleArchitectures:{shape:"S5v"}}},S5r:{type:"structure",members:{Location:{},CodeSha256:{},CodeSize:{type:"long"},SigningProfileVersionArn:{},SigningJobArn:{}}},S5t:{type:"list",member:{}},S5v:{type:"list",member:{}},S7a:{type:"list",member:{shape:"S3l"}},S7i:{type:"structure",members:{LayerVersionArn:{},Version:{type:"long"},Description:{},CreatedDate:{},CompatibleRuntimes:{shape:"S5t"},LicenseInfo:{},CompatibleArchitectures:{shape:"S5v"}}}}}});var sle=g((xnr,Umt)=>{Umt.exports={pagination:{ListAliases:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"Aliases"},ListCodeSigningConfigs:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"CodeSigningConfigs"},ListEventSourceMappings:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"EventSourceMappings"},ListFunctionEventInvokeConfigs:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"FunctionEventInvokeConfigs"},ListFunctionUrlConfigs:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"FunctionUrlConfigs"},ListFunctions:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"Functions"},ListFunctionsByCodeSigningConfig:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"FunctionArns"},ListLayerVersions:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"LayerVersions"},ListLayers:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"Layers"},ListProvisionedConcurrencyConfigs:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"ProvisionedConcurrencyConfigs"},ListVersionsByFunction:{input_token:"Marker",limit_key:"MaxItems",output_token:"NextMarker",result_key:"Versions"}}}});var ole=g((ynr,Hmt)=>{Hmt.exports={version:2,waiters:{FunctionExists:{delay:1,operation:"GetFunction",maxAttempts:20,acceptors:[{state:"success",matcher:"status",expected:200},{state:"retry",matcher:"error",expected:"ResourceNotFoundException"}]},FunctionActive:{delay:5,maxAttempts:60,operation:"GetFunctionConfiguration",description:"Waits for the function's State to be Active. This waiter uses GetFunctionConfiguration API. This should be used after new function creation.",acceptors:[{state:"success",matcher:"path",argument:"State",expected:"Active"},{state:"failure",matcher:"path",argument:"State",expected:"Failed"},{state:"retry",matcher:"path",argument:"State",expected:"Pending"}]},FunctionUpdated:{delay:5,maxAttempts:60,operation:"GetFunctionConfiguration",description:"Waits for the function's LastUpdateStatus to be Successful. This waiter uses GetFunctionConfiguration API. This should be used after function updates.",acceptors:[{state:"success",matcher:"path",argument:"LastUpdateStatus",expected:"Successful"},{state:"failure",matcher:"path",argument:"LastUpdateStatus",expected:"Failed"},{state:"retry",matcher:"path",argument:"LastUpdateStatus",expected:"InProgress"}]},FunctionActiveV2:{delay:1,maxAttempts:300,operation:"GetFunction",description:"Waits for the function's State to be Active. This waiter uses GetFunction API. This should be used after new function creation.",acceptors:[{state:"success",matcher:"path",argument:"Configuration.State",expected:"Active"},{state:"failure",matcher:"path",argument:"Configuration.State",expected:"Failed"},{state:"retry",matcher:"path",argument:"Configuration.State",expected:"Pending"}]},FunctionUpdatedV2:{delay:1,maxAttempts:300,operation:"GetFunction",description:"Waits for the function's LastUpdateStatus to be Successful. This waiter uses GetFunction API. This should be used after function updates.",acceptors:[{state:"success",matcher:"path",argument:"Configuration.LastUpdateStatus",expected:"Successful"},{state:"failure",matcher:"path",argument:"Configuration.LastUpdateStatus",expected:"Failed"},{state:"retry",matcher:"path",argument:"Configuration.LastUpdateStatus",expected:"InProgress"}]},PublishedVersionActive:{delay:5,maxAttempts:312,operation:"GetFunctionConfiguration",description:"Waits for the published version's State to be Active. This waiter uses GetFunctionConfiguration API. This should be used after new version is published.",acceptors:[{state:"success",matcher:"path",argument:"State",expected:"Active"},{state:"failure",matcher:"path",argument:"State",expected:"Failed"},{state:"retry",matcher:"path",argument:"State",expected:"Pending"}]}}}});var ule=g((_nr,ale)=>{_E();var UE=Re(),zmt=UE.Service,rD=UE.apiLoader;rD.services.lambda={};UE.Lambda=zmt.defineService("lambda",["2014-11-11","2015-03-31"]);tle();Object.defineProperty(rD.services.lambda,"2014-11-11",{get:function(){var t=rle();return t.paginators=nle().pagination,t},enumerable:!0,configurable:!0});Object.defineProperty(rD.services.lambda,"2015-03-31",{get:function(){var t=ile();return t.paginators=sle().pagination,t.waiters=ole().waiters,t},enumerable:!0,configurable:!0});ale.exports=UE.Lambda});var uD=g((bnr,vle)=>{function cle(e){return Array.isArray(e)?e:[e]}var dle="",lle=" ",nD="\\",$mt=/^\s+$/,Wmt=/(?:[^\\]|^)\\$/,Gmt=/^\\!/,Vmt=/^\\#/,Kmt=/\r?\n/g,Xmt=/^\.*\/|^\.+$/,iD="/",hle="node-ignore";typeof Symbol<"u"&&(hle=Symbol.for("node-ignore"));var fle=hle,Ymt=(e,t,r)=>Object.defineProperty(e,t,{value:r}),Jmt=/([0-z])-([0-z])/g,mle=()=>!1,Zmt=e=>e.replace(Jmt,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:dle),Qmt=e=>{let{length:t}=e;return e.slice(0,t-t%2)},egt=[[/\\?\s+$/,e=>e.indexOf("\\")===0?lle:dle],[/\\\s/g,()=>lle],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>nD],[/\\\\/g,()=>nD],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,i)=>t===nD?`\\[${r}${Qmt(n)}${i}`:i==="]"&&n.length%2===0?`[${Zmt(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],ple=Object.create(null),tgt=(e,t)=>{let r=ple[e];return r||(r=egt.reduce((n,i)=>n.replace(i[0],i[1].bind(e)),e),ple[e]=r),t?new RegExp(r,"i"):new RegExp(r)},aD=e=>typeof e=="string",rgt=e=>e&&aD(e)&&!$mt.test(e)&&!Wmt.test(e)&&e.indexOf("#")!==0,ngt=e=>e.split(Kmt),sD=class{constructor(t,r,n,i){this.origin=t,this.pattern=r,this.negative=n,this.regex=i}},igt=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(Gmt,"!").replace(Vmt,"#");let i=tgt(e,t);return new sD(r,e,n,i)},sgt=(e,t)=>{throw new t(e)},Za=(e,t,r)=>aD(e)?e?Za.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),gle=e=>Xmt.test(e);Za.isNotRelative=gle;Za.convert=e=>e;var oD=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){Ymt(this,fle,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[fle]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(rgt(t)){let r=igt(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,cle(aD(t)?ngt(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,i=!1;return this._rules.forEach(s=>{let{negative:o}=s;if(i===o&&n!==i||o&&!n&&!i&&!r)return;s.regex.test(t)&&(n=!o,i=o)}),{ignored:n,unignored:i}}_test(t,r,n,i){let s=t&&Za.convert(t);return Za(s,t,this._allowRelativePaths?mle:sgt),this._t(s,r,n,i)}_t(t,r,n,i){if(t in r)return r[t];if(i||(i=t.split(iD)),i.pop(),!i.length)return r[t]=this._testOne(t,n);let s=this._t(i.join(iD)+iD,r,n,i);return r[t]=s.ignored?s:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return cle(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},HE=e=>new oD(e),ogt=e=>Za(e&&Za.convert(e),e,mle);HE.isPathValid=ogt;HE.default=HE;vle.exports=HE;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Za.convert=e;let t=/^[a-z]:\//i;Za.isNotRelative=r=>t.test(r)||gle(r)}});function Ple(e){return typeof e>"u"||e===null}function agt(e){return typeof e=="object"&&e!==null}function ugt(e){return Array.isArray(e)?e:Ple(e)?[]:[e]}function cgt(e,t){var r,n,i,s;if(t)for(s=Object.keys(t),r=0,n=s.length;r<n;r+=1)i=s[r],e[i]=t[i];return e}function lgt(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function fgt(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function kle(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
189
189
|
|
|
@@ -217,7 +217,7 @@ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/gu
|
|
|
217
217
|
`+e.slice(o+1):u+=e.slice(i),u.slice(1)}function ivt(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=b0(e,i),n=Zn[r],!n&&C0(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||X0t(r);return t}function svt(e,t,r){var n="",i=e.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],e.replacer&&(a=e.replacer.call(r,String(s),a)),(Qa(e,t,a,!1,!1)||typeof a>"u"&&Qa(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function Nle(e,t,r,n){var i="",s=e.tag,o,a,u;for(o=0,a=r.length;o<a;o+=1)u=r[o],e.replacer&&(u=e.replacer.call(r,String(o),u)),(Qa(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&Qa(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=hD(e,t)),e.dump&&E0===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function ovt(e,t,r){var n="",i=e.tag,s=Object.keys(r),o,a,u,c,f;for(o=0,a=s.length;o<a;o+=1)f="",n!==""&&(f+=", "),e.condenseFlow&&(f+='"'),u=s[o],c=r[u],e.replacer&&(c=e.replacer.call(r,u,c)),Qa(e,t,u,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Qa(e,t,c,!1,!1)&&(f+=e.dump,n+=f));e.tag=i,e.dump="{"+n+"}"}function avt(e,t,r,n){var i="",s=e.tag,o=Object.keys(r),a,u,c,f,p,d;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new mi("sortKeys must be a boolean or a function");for(a=0,u=o.length;a<u;a+=1)d="",(!n||i!=="")&&(d+=hD(e,t)),c=o[a],f=r[c],e.replacer&&(f=e.replacer.call(r,c,f)),Qa(e,t+1,c,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&E0===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=hD(e,t)),Qa(e,t+1,f,!0,p)&&(e.dump&&E0===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,i+=d));e.tag=s,e.dump=i||"{}"}function qle(e,t,r){var n,i,s,o,a,u;for(i=r?e.explicitTypes:e.implicitTypes,s=0,o=i.length;s<o;s+=1)if(a=i[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(u=e.styleMap[a.tag]||a.defaultStyle,cfe.call(a.represent)==="[object Function]")n=a.represent(t,u);else if(lfe.call(a.represent,u))n=a.represent[u](t,u);else throw new mi("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function Qa(e,t,r,n,i,s,o){e.tag=null,e.dump=r,qle(e,r,!1)||qle(e,r,!0);var a=cfe.call(e.dump),u=n,c;n&&(n=e.flowLevel<0||e.flowLevel>t);var f=a==="[object Object]"||a==="[object Array]",p,d;if(f&&(p=e.duplicates.indexOf(r),d=p!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(i=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(avt(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(ovt(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Nle(e,t-1,e.dump,i):Nle(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(svt(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&rvt(e,e.dump,t,s,u);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new mi("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function uvt(e,t){var r=[],n=[],i,s;for(gD(e,r,n),i=0,s=n.length;i<s;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(s)}function gD(e,t,r){var n,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)gD(e[i],t,r);else for(n=Object.keys(e),i=0,s=n.length;i<s;i+=1)gD(e[n[i]],t,r)}function cvt(e,t){t=t||{};var r=new J0t(t);r.noRefs||uvt(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Qa(r,0,n,!0,!0)?r.dump+`
|
|
218
218
|
`:""}function wD(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var pgt,dgt,hgt,mgt,ggt,vgt,ln,mi,ygt,_gt,bgt,Mn,Dle,Lle,Fle,Mle,Ble,jle,Ule,Hle,Fgt,jgt,zle,$le,Wle,Gle,Vle,Kle,Xle,vD,Yle,Jgt,Zgt,Jle,t0t,Zle,i0t,Qle,xD,Ec,zE,efe,tfe,$E,fD,a0t,yle,u0t,c0t,l0t,rfe,nfe,ife,sfe,Yl,wle,O0t,I0t,ufe,cfe,lfe,bD,R0t,E0,N0t,q0t,P0t,k0t,dD,D0t,L0t,F0t,M0t,ffe,B0t,GE,j0t,U0t,H0t,z0t,pfe,dfe,$0t,hfe,W0t,mfe,Zn,G0t,V0t,Y0t,S0,vfe,mD,xfe,yfe,Rd,lvt,fvt,pvt,dvt,hvt,mvt,gvt,vvt,xvt,yvt,_vt,bvt,wvt,Evt,Svt,Cvt,Tvt,_fe,bfe=se(()=>{pgt=Ple,dgt=agt,hgt=ugt,mgt=lgt,ggt=fgt,vgt=cgt,ln={isNothing:pgt,isObject:dgt,toArray:hgt,repeat:mgt,isNegativeZero:ggt,extend:vgt};w0.prototype=Object.create(Error.prototype);w0.prototype.constructor=w0;w0.prototype.toString=function(t){return this.name+": "+kle(this,t)};mi=w0;ygt=xgt,_gt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bgt=["scalar","sequence","mapping"];Mn=Egt;pD.prototype.extend=function(t){var r=[],n=[];if(t instanceof Mn)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new mi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Mn))throw new mi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new mi("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new mi("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof Mn))throw new mi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(pD.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=xle(i,"implicit"),i.compiledExplicit=xle(i,"explicit"),i.compiledTypeMap=Sgt(i.compiledImplicit,i.compiledExplicit),i};Dle=pD,Lle=new Mn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Fle=new Mn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Mle=new Mn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Ble=new Dle({explicit:[Lle,Fle,Mle]});jle=new Mn("tag:yaml.org,2002:null",{kind:"scalar",resolve:Cgt,construct:Tgt,predicate:Agt,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});Ule=new Mn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ogt,construct:Igt,predicate:Rgt,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});Hle=new Mn("tag:yaml.org,2002:int",{kind:"scalar",resolve:kgt,construct:Dgt,predicate:Lgt,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Fgt=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");jgt=/^[-+]?[0-9]+e/;zle=new Mn("tag:yaml.org,2002:float",{kind:"scalar",resolve:Mgt,construct:Bgt,predicate:Hgt,represent:Ugt,defaultStyle:"lowercase"}),$le=Ble.extend({implicit:[jle,Ule,Hle,zle]}),Wle=$le,Gle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vle=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Kle=new Mn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:zgt,construct:$gt,instanceOf:Date,represent:Wgt});Xle=new Mn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ggt}),vD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
219
219
|
\r`;Yle=new Mn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Vgt,construct:Kgt,predicate:Ygt,represent:Xgt}),Jgt=Object.prototype.hasOwnProperty,Zgt=Object.prototype.toString;Jle=new Mn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qgt,construct:e0t}),t0t=Object.prototype.toString;Zle=new Mn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r0t,construct:n0t}),i0t=Object.prototype.hasOwnProperty;Qle=new Mn("tag:yaml.org,2002:set",{kind:"mapping",resolve:s0t,construct:o0t}),xD=Wle.extend({implicit:[Kle,Xle],explicit:[Yle,Jle,Zle,Qle]}),Ec=Object.prototype.hasOwnProperty,zE=1,efe=2,tfe=3,$E=4,fD=1,a0t=2,yle=3,u0t=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c0t=/[\x85\u2028\u2029]/,l0t=/[,\[\]\{\}]/,rfe=/^(?:!|!!|![a-z\-]+!)$/i,nfe=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;ife=new Array(256),sfe=new Array(256);for(Yl=0;Yl<256;Yl++)ife[Yl]=ble(Yl)?1:0,sfe[Yl]=ble(Yl);wle={YAML:function(t,r,n){var i,s,o;t.version!==null&&Pe(t,"duplication of %YAML directive"),n.length!==1&&Pe(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Pe(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),o=parseInt(i[2],10),s!==1&&Pe(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&WE(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var i,s;n.length!==2&&Pe(t,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],rfe.test(i)||Pe(t,"ill-formed tag handle (first argument) of the TAG directive"),Ec.call(t.tagMap,i)&&Pe(t,'there is a previously declared suffix for "'+i+'" tag handle'),nfe.test(s)||Pe(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Pe(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};O0t=T0t,I0t=A0t,ufe={loadAll:O0t,load:I0t},cfe=Object.prototype.toString,lfe=Object.prototype.hasOwnProperty,bD=65279,R0t=9,E0=10,N0t=13,q0t=32,P0t=33,k0t=34,dD=35,D0t=37,L0t=38,F0t=39,M0t=42,ffe=44,B0t=45,GE=58,j0t=61,U0t=62,H0t=63,z0t=64,pfe=91,dfe=93,$0t=96,hfe=123,W0t=124,mfe=125,Zn={};Zn[0]="\\0";Zn[7]="\\a";Zn[8]="\\b";Zn[9]="\\t";Zn[10]="\\n";Zn[11]="\\v";Zn[12]="\\f";Zn[13]="\\r";Zn[27]="\\e";Zn[34]='\\"';Zn[92]="\\\\";Zn[133]="\\N";Zn[160]="\\_";Zn[8232]="\\L";Zn[8233]="\\P";G0t=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],V0t=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;Y0t=1,S0=2;vfe=1,mD=2,xfe=3,yfe=4,Rd=5;lvt=cvt,fvt={dump:lvt};pvt=Mn,dvt=Dle,hvt=Ble,mvt=$le,gvt=Wle,vvt=xD,xvt=ufe.load,yvt=ufe.loadAll,_vt=fvt.dump,bvt=mi,wvt={binary:Yle,float:zle,map:Mle,null:jle,pairs:Zle,set:Qle,timestamp:Kle,bool:Ule,int:Hle,merge:Xle,omap:Jle,seq:Fle,str:Lle},Evt=wD("safeLoad","load"),Svt=wD("safeLoadAll","loadAll"),Cvt=wD("safeDump","dump"),Tvt={Type:pvt,Schema:dvt,FAILSAFE_SCHEMA:hvt,JSON_SCHEMA:mvt,CORE_SCHEMA:gvt,DEFAULT_SCHEMA:vvt,load:xvt,loadAll:yvt,dump:_vt,YAMLException:bvt,types:wvt,safeLoad:Evt,safeLoadAll:Svt,safeDump:Cvt},_fe=Tvt});var XE=g(Fs=>{"use strict";Fs.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Fs.find=(e,t)=>e.nodes.find(r=>r.type===t);Fs.exceedsLimit=(e,t,r=1,n)=>n===!1||!Fs.isInteger(e)||!Fs.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;Fs.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Fs.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Fs.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Fs.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Fs.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Fs.flatten=(...e)=>{let t=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];Array.isArray(s)?r(s,t):s!==void 0&&t.push(s)}return t};return r(e),t}});var YE=g((Snr,Efe)=>{"use strict";var wfe=XE();Efe.exports=(e,t={})=>{let r=(n,i={})=>{let s=t.escapeInvalid&&wfe.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||o)&&wfe.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var Cfe=g((Cnr,Sfe)=>{"use strict";Sfe.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var kfe=g((Tnr,Pfe)=>{"use strict";var Tfe=Cfe(),Zl=(e,t,r)=>{if(Tfe(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(Tfe(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+i+s+o+a;if(Zl.cache.hasOwnProperty(u))return Zl.cache[u].result;let c=Math.min(e,t),f=Math.max(e,t);if(Math.abs(c-f)===1){let _=e+"|"+t;return n.capture?`(${_})`:n.wrap===!1?_:`(?:${_})`}let p=qfe(e)||qfe(t),d={min:e,max:t,a:c,b:f},m=[],v=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),c<0){let _=f<0?Math.abs(f):1;v=Afe(_,Math.abs(c),d,n),c=d.a=0}return f>=0&&(m=Afe(c,f,d,n)),d.negatives=v,d.positives=m,d.result=Avt(v,m,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&m.length+v.length>1&&(d.result=`(?:${d.result})`),Zl.cache[u]=d,d.result};function Avt(e,t,r){let n=ED(e,t,"-",!1,r)||[],i=ED(t,e,"",!1,r)||[],s=ED(e,t,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function Ovt(e,t){let r=1,n=1,i=Ife(e,r),s=new Set([t]);for(;e<=i&&i<=t;)s.add(i),r+=1,i=Ife(e,r);for(i=Rfe(t+1,n)-1;e<i&&i<=t;)s.add(i),n+=1,i=Rfe(t+1,n)-1;return s=[...s],s.sort(Nvt),s}function Ivt(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Rvt(e,t),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=qvt(u,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function Afe(e,t,r,n){let i=Ovt(e,t),s=[],o=e,a;for(let u=0;u<i.length;u++){let c=i[u],f=Ivt(String(o),String(c),n),p="";if(!r.isPadded&&a&&a.pattern===f.pattern){a.count.length>1&&a.count.pop(),a.count.push(f.count[0]),a.string=a.pattern+Nfe(a.count),o=c+1;continue}r.isPadded&&(p=Pvt(c,r,n)),f.string=p+f.pattern+Nfe(f.count),s.push(f),o=c+1,a=f}return s}function ED(e,t,r,n,i){let s=[];for(let o of e){let{string:a}=o;!n&&!Ofe(t,"string",a)&&s.push(r+a),n&&Ofe(t,"string",a)&&s.push(r+a)}return s}function Rvt(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Nvt(e,t){return e>t?1:t>e?-1:0}function Ofe(e,t,r){return e.some(n=>n[t]===r)}function Ife(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Rfe(e,t){return e-e%Math.pow(10,t)}function Nfe(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function qvt(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function qfe(e){return/^-?(0+)\d/.test(e)}function Pvt(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Zl.cache={};Zl.clearCache=()=>Zl.cache={};Pfe.exports=Zl});var TD=g((Anr,Hfe)=>{"use strict";var kvt=require("util"),Ffe=kfe(),Dfe=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Dvt=e=>t=>e===!0?Number(t):String(t),SD=e=>typeof e=="number"||typeof e=="string"&&e!=="",T0=e=>Number.isInteger(+e),CD=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Lvt=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Fvt=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Lfe=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},Mvt=(e,t)=>{e.negatives.sort((o,a)=>o<a?-1:o>a?1:0),e.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=t.capture?"":"?:",n="",i="",s;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(i=`-(${r}${e.negatives.join("|")})`),n&&i?s=`${n}|${i}`:s=n||i,t.wrap?`(${r}${s})`:s},Mfe=(e,t,r,n)=>{if(r)return Ffe(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);if(e===t)return i;let s=String.fromCharCode(t);return`[${i}-${s}]`},Bfe=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${e.join("|")})`:e.join("|")}return Ffe(e,t,r)},jfe=(...e)=>new RangeError("Invalid range arguments: "+kvt.inspect(...e)),Ufe=(e,t,r)=>{if(r.strictRanges===!0)throw jfe([e,t]);return[]},Bvt=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},jvt=(e,t,r=1,n={})=>{let i=Number(e),s=Number(t);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw jfe([e,t]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let f=CD(a)||CD(u)||CD(c),p=f?Math.max(a.length,u.length,c.length):0,d=f===!1&&Lvt(e,t,n)===!1,m=n.transform||Dvt(d);if(n.toRegex&&r===1)return Mfe(Lfe(e,p),Lfe(t,p),!0,n);let v={negatives:[],positives:[]},_=T=>v[T<0?"negatives":"positives"].push(Math.abs(T)),b=[],y=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?_(i):b.push(Fvt(m(i,y),p,d)),i=o?i-r:i+r,y++;return n.toRegex===!0?r>1?Mvt(v,n):Bfe(b,null,{wrap:!1,...n}):b},Uvt=(e,t,r=1,n={})=>{if(!T0(e)&&e.length>1||!T0(t)&&t.length>1)return Ufe(e,t,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),a=s>o,u=Math.min(s,o),c=Math.max(s,o);if(n.toRegex&&r===1)return Mfe(u,c,!1,n);let f=[],p=0;for(;a?s>=o:s<=o;)f.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?Bfe(f,null,{wrap:!1,options:n}):f},JE=(e,t,r,n={})=>{if(t==null&&SD(e))return[e];if(!SD(e)||!SD(t))return Ufe(e,t,n);if(typeof r=="function")return JE(e,t,1,{transform:r});if(Dfe(r))return JE(e,t,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,T0(r)?T0(e)&&T0(t)?jvt(e,t,r,i):Uvt(e,t,Math.max(Math.abs(r),1),i):r!=null&&!Dfe(r)?Bvt(r,i):JE(e,t,1,r)};Hfe.exports=JE});var Wfe=g((Onr,$fe)=>{"use strict";var Hvt=TD(),zfe=XE(),zvt=(e,t={})=>{let r=(n,i={})=>{let s=zfe.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||o===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0||n.isClose===!0)return u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=zfe.reduce(n.nodes),p=Hvt(...f,{...t,wrap:!1,toRegex:!0});if(p.length!==0)return f.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let f of n.nodes)c+=r(f,n);return c};return r(e)};$fe.exports=zvt});var Kfe=g((Inr,Vfe)=>{"use strict";var $vt=TD(),Gfe=YE(),kd=XE(),Ql=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?kd.flatten(t).map(i=>`{${i}}`):t;for(let i of e)if(Array.isArray(i))for(let s of i)n.push(Ql(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Ql(i,s,r):i+s);return kd.flatten(n)},Wvt=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Ql(a.pop(),Gfe(i,t)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Ql(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=kd.reduce(i.nodes);if(kd.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=$vt(...p,t);d.length===0&&(d=Gfe(i,t)),a.push(Ql(a.pop(),d)),i.nodes=[];return}let u=kd.encloseBrace(i),c=i.queue,f=i;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,c=f.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&c.push(""),c.push("");continue}if(d.type==="close"){a.push(Ql(a.pop(),c,u));continue}if(d.value&&d.type!=="open"){c.push(Ql(c.pop(),d.value));continue}d.nodes&&n(d,i)}return c};return kd.flatten(n(e))};Vfe.exports=Wvt});var Yfe=g((Rnr,Xfe)=>{"use strict";Xfe.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
220
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var tpe=g((Nnr,epe)=>{"use strict";var Gvt=YE(),{MAX_LENGTH:Jfe,CHAR_BACKSLASH:AD,CHAR_BACKTICK:Vvt,CHAR_COMMA:Kvt,CHAR_DOT:Xvt,CHAR_LEFT_PARENTHESES:Yvt,CHAR_RIGHT_PARENTHESES:Jvt,CHAR_LEFT_CURLY_BRACE:Zvt,CHAR_RIGHT_CURLY_BRACE:Qvt,CHAR_LEFT_SQUARE_BRACKET:Zfe,CHAR_RIGHT_SQUARE_BRACKET:Qfe,CHAR_DOUBLE_QUOTE:ext,CHAR_SINGLE_QUOTE:txt,CHAR_NO_BREAK_SPACE:rxt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nxt}=Yfe(),ixt=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Jfe,r.maxLength):Jfe;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let i={type:"root",input:e,nodes:[]},s=[i],o=i,a=i,u=0,c=e.length,f=0,p=0,d,m={},v=()=>e[f++],_=b=>{if(b.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&b.type==="text"){a.value+=b.value;return}return o.nodes.push(b),b.parent=o,b.prev=a,a=b,b};for(_({type:"bos"});f<c;)if(o=s[s.length-1],d=v(),!(d===nxt||d===rxt)){if(d===AD){_({type:"text",value:(t.keepEscaping?d:"")+v()});continue}if(d===Qfe){_({type:"text",value:"\\"+d});continue}if(d===Zfe){u++;let b=!0,y;for(;f<c&&(y=v());){if(d+=y,y===Zfe){u++;continue}if(y===AD){d+=v();continue}if(y===Qfe&&(u--,u===0))break}_({type:"text",value:d});continue}if(d===Yvt){o=_({type:"paren",nodes:[]}),s.push(o),_({type:"text",value:d});continue}if(d===Jvt){if(o.type!=="paren"){_({type:"text",value:d});continue}o=s.pop(),_({type:"text",value:d}),o=s[s.length-1];continue}if(d===ext||d===txt||d===Vvt){let b=d,y;for(t.keepQuotes!==!0&&(d="");f<c&&(y=v());){if(y===AD){d+=y+v();continue}if(y===b){t.keepQuotes===!0&&(d+=y);break}d+=y}_({type:"text",value:d});continue}if(d===Zvt){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=_(y),s.push(o),_({type:"open",value:d});continue}if(d===Qvt){if(o.type!=="brace"){_({type:"text",value:d});continue}let b="close";o=s.pop(),o.close=!0,_({type:b,value:d}),p--,o=s[s.length-1];continue}if(d===Kvt&&p>0){if(o.ranges>0){o.ranges=0;let b=o.nodes.shift();o.nodes=[b,{type:"text",value:Gvt(o)}]}_({type:"comma",value:d}),o.commas++;continue}if(d===Xvt&&p>0&&o.commas===0){let b=o.nodes;if(p===0||b.length===0){_({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){b.pop();let y=b[b.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}_({type:"dot",value:d});continue}_({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let b=s[s.length-1],y=b.nodes.indexOf(o);b.nodes.splice(y,1,...o.nodes)}while(s.length>0);return _({type:"eos"}),i};epe.exports=ixt});var OD=g((qnr,npe)=>{"use strict";var rpe=YE(),sxt=Wfe(),oxt=Kfe(),axt=tpe(),ts=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=ts.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(ts.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ts.parse=(e,t={})=>axt(e,t);ts.stringify=(e,t={})=>rpe(typeof e=="string"?ts.parse(e,t):e,t);ts.compile=(e,t={})=>(typeof e=="string"&&(e=ts.parse(e,t)),sxt(e,t));ts.expand=(e,t={})=>{typeof e=="string"&&(e=ts.parse(e,t));let r=oxt(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ts.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ts.compile(e,t):ts.expand(e,t);npe.exports=ts});var A0=g((Pnr,upe)=>{"use strict";var uxt=require("path"),Jo="\\\\/",ipe=`[^${Jo}]`,eu="\\.",cxt="\\+",lxt="\\?",ZE="\\/",fxt="(?=.)",spe="[^/]",ID=`(?:${ZE}|$)`,ope=`(?:^|${ZE})`,RD=`${eu}{1,2}${ID}`,pxt=`(?!${eu})`,dxt=`(?!${ope}${RD})`,hxt=`(?!${eu}{0,1}${ID})`,mxt=`(?!${RD})`,gxt=`[^.${ZE}]`,vxt=`${spe}*?`,ape={DOT_LITERAL:eu,PLUS_LITERAL:cxt,QMARK_LITERAL:lxt,SLASH_LITERAL:ZE,ONE_CHAR:fxt,QMARK:spe,END_ANCHOR:ID,DOTS_SLASH:RD,NO_DOT:pxt,NO_DOTS:dxt,NO_DOT_SLASH:hxt,NO_DOTS_SLASH:mxt,QMARK_NO_DOT:gxt,STAR:vxt,START_ANCHOR:ope},xxt={...ape,SLASH_LITERAL:`[${Jo}]`,QMARK:ipe,STAR:`${ipe}*?`,DOTS_SLASH:`${eu}{1,2}(?:[${Jo}]|$)`,NO_DOT:`(?!${eu})`,NO_DOTS:`(?!(?:^|[${Jo}])${eu}{1,2}(?:[${Jo}]|$))`,NO_DOT_SLASH:`(?!${eu}{0,1}(?:[${Jo}]|$))`,NO_DOTS_SLASH:`(?!${eu}{1,2}(?:[${Jo}]|$))`,QMARK_NO_DOT:`[^.${Jo}]`,START_ANCHOR:`(?:^|[${Jo}])`,END_ANCHOR:`(?:[${Jo}]|$)`},yxt={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};upe.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:yxt,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:uxt.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?xxt:ape}}});var O0=g(Di=>{"use strict";var _xt=require("path"),bxt=process.platform==="win32",{REGEX_BACKSLASH:wxt,REGEX_REMOVE_BACKSLASH:Ext,REGEX_SPECIAL_CHARS:Sxt,REGEX_SPECIAL_CHARS_GLOBAL:Cxt}=A0();Di.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Di.hasRegexChars=e=>Sxt.test(e);Di.isRegexChar=e=>e.length===1&&Di.hasRegexChars(e);Di.escapeRegex=e=>e.replace(Cxt,"\\$1");Di.toPosixSlashes=e=>e.replace(wxt,"/");Di.removeBackslashes=e=>e.replace(Ext,t=>t==="\\"?"":t);Di.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Di.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:bxt===!0||_xt.sep==="\\";Di.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Di.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Di.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Di.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var gpe=g((Dnr,mpe)=>{"use strict";var cpe=O0(),{CHAR_ASTERISK:ND,CHAR_AT:Txt,CHAR_BACKWARD_SLASH:I0,CHAR_COMMA:Axt,CHAR_DOT:qD,CHAR_EXCLAMATION_MARK:PD,CHAR_FORWARD_SLASH:hpe,CHAR_LEFT_CURLY_BRACE:kD,CHAR_LEFT_PARENTHESES:DD,CHAR_LEFT_SQUARE_BRACKET:Oxt,CHAR_PLUS:Ixt,CHAR_QUESTION_MARK:lpe,CHAR_RIGHT_CURLY_BRACE:Rxt,CHAR_RIGHT_PARENTHESES:fpe,CHAR_RIGHT_SQUARE_BRACKET:Nxt}=A0(),ppe=e=>e===hpe||e===I0,dpe=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},qxt=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=e,c=-1,f=0,p=0,d=!1,m=!1,v=!1,_=!1,b=!1,y=!1,T=!1,S=!1,E=!1,C=!1,I=0,q,B,M={value:"",depth:0,isGlob:!1},R=()=>c>=n,D=()=>u.charCodeAt(c+1),N=()=>(q=B,u.charCodeAt(++c));for(;c<n;){B=N();let ee;if(B===I0){T=M.backslashes=!0,B=N(),B===kD&&(y=!0);continue}if(y===!0||B===kD){for(I++;R()!==!0&&(B=N());){if(B===I0){T=M.backslashes=!0,N();continue}if(B===kD){I++;continue}if(y!==!0&&B===qD&&(B=N())===qD){if(d=M.isBrace=!0,v=M.isGlob=!0,C=!0,i===!0)continue;break}if(y!==!0&&B===Axt){if(d=M.isBrace=!0,v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===Rxt&&(I--,I===0)){y=!1,d=M.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(B===hpe){if(s.push(c),o.push(M),M={value:"",depth:0,isGlob:!1},C===!0)continue;if(q===qD&&c===f+1){f+=2;continue}p=c+1;continue}if(r.noext!==!0&&(B===Ixt||B===Txt||B===ND||B===lpe||B===PD)===!0&&D()===DD){if(v=M.isGlob=!0,_=M.isExtglob=!0,C=!0,B===PD&&c===f&&(E=!0),i===!0){for(;R()!==!0&&(B=N());){if(B===I0){T=M.backslashes=!0,B=N();continue}if(B===fpe){v=M.isGlob=!0,C=!0;break}}continue}break}if(B===ND){if(q===ND&&(b=M.isGlobstar=!0),v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===lpe){if(v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===Oxt){for(;R()!==!0&&(ee=N());){if(ee===I0){T=M.backslashes=!0,N();continue}if(ee===Nxt){m=M.isBracket=!0,v=M.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&B===PD&&c===f){S=M.negated=!0,f++;continue}if(r.noparen!==!0&&B===DD){if(v=M.isGlob=!0,i===!0){for(;R()!==!0&&(B=N());){if(B===DD){T=M.backslashes=!0,B=N();continue}if(B===fpe){C=!0;break}}continue}break}if(v===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(_=!1,v=!1);let Y=u,oe="",H="";f>0&&(oe=u.slice(0,f),u=u.slice(f),p-=f),Y&&v===!0&&p>0?(Y=u.slice(0,p),H=u.slice(p)):v===!0?(Y="",H=u):Y=u,Y&&Y!==""&&Y!=="/"&&Y!==u&&ppe(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),r.unescape===!0&&(H&&(H=cpe.removeBackslashes(H)),Y&&T===!0&&(Y=cpe.removeBackslashes(Y)));let U={prefix:oe,input:e,start:f,base:Y,glob:H,isBrace:d,isBracket:m,isGlob:v,isExtglob:_,isGlobstar:b,negated:S,negatedExtglob:E};if(r.tokens===!0&&(U.maxDepth=0,ppe(B)||o.push(M),U.tokens=o),r.parts===!0||r.tokens===!0){let ee;for(let Q=0;Q<s.length;Q++){let pe=ee?ee+1:f,ge=s[Q],be=e.slice(pe,ge);r.tokens&&(Q===0&&f!==0?(o[Q].isPrefix=!0,o[Q].value=oe):o[Q].value=be,dpe(o[Q]),U.maxDepth+=o[Q].depth),(Q!==0||be!=="")&&a.push(be),ee=ge}if(ee&&ee+1<e.length){let Q=e.slice(ee+1);a.push(Q),r.tokens&&(o[o.length-1].value=Q,dpe(o[o.length-1]),U.maxDepth+=o[o.length-1].depth)}U.slashes=s,U.parts=a}return U};mpe.exports=qxt});var ype=g((Lnr,xpe)=>{"use strict";var QE=A0(),rs=O0(),{MAX_LENGTH:eS,POSIX_REGEX_SOURCE:Pxt,REGEX_NON_SPECIAL_CHARS:kxt,REGEX_SPECIAL_CHARS_BACKREF:Dxt,REPLACEMENTS:vpe}=QE,Lxt=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(i=>rs.escapeRegex(i)).join("..")}return r},Dd=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,LD=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=vpe[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(eS,r.maxLength):eS,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=rs.isWindows(t),c=QE.globChars(u),f=QE.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:v,DOTS_SLASH:_,NO_DOT:b,NO_DOT_SLASH:y,NO_DOTS_SLASH:T,QMARK:S,QMARK_NO_DOT:E,STAR:C,START_ANCHOR:I}=c,q=xe=>`(${a}(?:(?!${I}${xe.dot?_:p}).)*?)`,B=r.dot?"":b,M=r.dot?S:E,R=r.bash===!0?q(r):C;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let D={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=rs.removePrefix(e,D),i=e.length;let N=[],Y=[],oe=[],H=s,U,ee=()=>D.index===i-1,Q=D.peek=(xe=1)=>e[D.index+xe],pe=D.advance=()=>e[++D.index]||"",ge=()=>e.slice(D.index+1),be=(xe="",F=0)=>{D.consumed+=xe,D.index+=F},We=xe=>{D.output+=xe.output!=null?xe.output:xe.value,be(xe.value)},et=()=>{let xe=1;for(;Q()==="!"&&(Q(2)!=="("||Q(3)==="?");)pe(),D.start++,xe++;return xe%2===0?!1:(D.negated=!0,D.start++,!0)},tt=xe=>{D[xe]++,oe.push(xe)},xt=xe=>{D[xe]--,oe.pop()},Ne=xe=>{if(H.type==="globstar"){let F=D.braces>0&&(xe.type==="comma"||xe.type==="brace"),A=xe.extglob===!0||N.length&&(xe.type==="pipe"||xe.type==="paren");xe.type!=="slash"&&xe.type!=="paren"&&!F&&!A&&(D.output=D.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=R,D.output+=H.output)}if(N.length&&xe.type!=="paren"&&(N[N.length-1].inner+=xe.value),(xe.value||xe.output)&&We(xe),H&&H.type==="text"&&xe.type==="text"){H.value+=xe.value,H.output=(H.output||"")+xe.value;return}xe.prev=H,o.push(xe),H=xe},Dr=(xe,F)=>{let A={...f[F],conditions:1,inner:""};A.prev=H,A.parens=D.parens,A.output=D.output;let Z=(r.capture?"(":"")+A.open;tt("parens"),Ne({type:xe,value:F,output:D.output?"":v}),Ne({type:"paren",extglob:!0,value:pe(),output:Z}),N.push(A)},zt=xe=>{let F=xe.close+(r.capture?")":""),A;if(xe.type==="negate"){let Z=R;if(xe.inner&&xe.inner.length>1&&xe.inner.includes("/")&&(Z=q(r)),(Z!==R||ee()||/^\)+$/.test(ge()))&&(F=xe.close=`)$))${Z}`),xe.inner.includes("*")&&(A=ge())&&/^\.[^\\/.]+$/.test(A)){let V=LD(A,{...t,fastpaths:!1}).output;F=xe.close=`)${V})${Z})`}xe.prev.type==="bos"&&(D.negatedExtglob=!0)}Ne({type:"paren",extglob:!0,value:U,output:F}),xt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let xe=!1,F=e.replace(Dxt,(A,Z,V,He,Fe,$t)=>He==="\\"?(xe=!0,A):He==="?"?Z?Z+He+(Fe?S.repeat(Fe.length):""):$t===0?M+(Fe?S.repeat(Fe.length):""):S.repeat(V.length):He==="."?p.repeat(V.length):He==="*"?Z?Z+He+(Fe?R:""):R:Z?A:`\\${A}`);return xe===!0&&(r.unescape===!0?F=F.replace(/\\/g,""):F=F.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),F===e&&r.contains===!0?(D.output=e,D):(D.output=rs.wrapOutput(F,D,t),D)}for(;!ee();){if(U=pe(),U==="\0")continue;if(U==="\\"){let A=Q();if(A==="/"&&r.bash!==!0||A==="."||A===";")continue;if(!A){U+="\\",Ne({type:"text",value:U});continue}let Z=/^\\+/.exec(ge()),V=0;if(Z&&Z[0].length>2&&(V=Z[0].length,D.index+=V,V%2!==0&&(U+="\\")),r.unescape===!0?U=pe():U+=pe(),D.brackets===0){Ne({type:"text",value:U});continue}}if(D.brackets>0&&(U!=="]"||H.value==="["||H.value==="[^")){if(r.posix!==!1&&U===":"){let A=H.value.slice(1);if(A.includes("[")&&(H.posix=!0,A.includes(":"))){let Z=H.value.lastIndexOf("["),V=H.value.slice(0,Z),He=H.value.slice(Z+2),Fe=Pxt[He];if(Fe){H.value=V+Fe,D.backtrack=!0,pe(),!s.output&&o.indexOf(H)===1&&(s.output=v);continue}}}(U==="["&&Q()!==":"||U==="-"&&Q()==="]")&&(U=`\\${U}`),U==="]"&&(H.value==="["||H.value==="[^")&&(U=`\\${U}`),r.posix===!0&&U==="!"&&H.value==="["&&(U="^"),H.value+=U,We({value:U});continue}if(D.quotes===1&&U!=='"'){U=rs.escapeRegex(U),H.value+=U,We({value:U});continue}if(U==='"'){D.quotes=D.quotes===1?0:1,r.keepQuotes===!0&&Ne({type:"text",value:U});continue}if(U==="("){tt("parens"),Ne({type:"paren",value:U});continue}if(U===")"){if(D.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Dd("opening","("));let A=N[N.length-1];if(A&&D.parens===A.parens+1){zt(N.pop());continue}Ne({type:"paren",value:U,output:D.parens?")":"\\)"}),xt("parens");continue}if(U==="["){if(r.nobracket===!0||!ge().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Dd("closing","]"));U=`\\${U}`}else tt("brackets");Ne({type:"bracket",value:U});continue}if(U==="]"){if(r.nobracket===!0||H&&H.type==="bracket"&&H.value.length===1){Ne({type:"text",value:U,output:`\\${U}`});continue}if(D.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Dd("opening","["));Ne({type:"text",value:U,output:`\\${U}`});continue}xt("brackets");let A=H.value.slice(1);if(H.posix!==!0&&A[0]==="^"&&!A.includes("/")&&(U=`/${U}`),H.value+=U,We({value:U}),r.literalBrackets===!1||rs.hasRegexChars(A))continue;let Z=rs.escapeRegex(H.value);if(D.output=D.output.slice(0,-H.value.length),r.literalBrackets===!0){D.output+=Z,H.value=Z;continue}H.value=`(${a}${Z}|${H.value})`,D.output+=H.value;continue}if(U==="{"&&r.nobrace!==!0){tt("braces");let A={type:"brace",value:U,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};Y.push(A),Ne(A);continue}if(U==="}"){let A=Y[Y.length-1];if(r.nobrace===!0||!A){Ne({type:"text",value:U,output:U});continue}let Z=")";if(A.dots===!0){let V=o.slice(),He=[];for(let Fe=V.length-1;Fe>=0&&(o.pop(),V[Fe].type!=="brace");Fe--)V[Fe].type!=="dots"&&He.unshift(V[Fe].value);Z=Lxt(He,r),D.backtrack=!0}if(A.comma!==!0&&A.dots!==!0){let V=D.output.slice(0,A.outputIndex),He=D.tokens.slice(A.tokensIndex);A.value=A.output="\\{",U=Z="\\}",D.output=V;for(let Fe of He)D.output+=Fe.output||Fe.value}Ne({type:"brace",value:U,output:Z}),xt("braces"),Y.pop();continue}if(U==="|"){N.length>0&&N[N.length-1].conditions++,Ne({type:"text",value:U});continue}if(U===","){let A=U,Z=Y[Y.length-1];Z&&oe[oe.length-1]==="braces"&&(Z.comma=!0,A="|"),Ne({type:"comma",value:U,output:A});continue}if(U==="/"){if(H.type==="dot"&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",o.pop(),H=s;continue}Ne({type:"slash",value:U,output:m});continue}if(U==="."){if(D.braces>0&&H.type==="dot"){H.value==="."&&(H.output=p);let A=Y[Y.length-1];H.type="dots",H.output+=U,H.value+=U,A.dots=!0;continue}if(D.braces+D.parens===0&&H.type!=="bos"&&H.type!=="slash"){Ne({type:"text",value:U,output:p});continue}Ne({type:"dot",value:U,output:p});continue}if(U==="?"){if(!(H&&H.value==="(")&&r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Dr("qmark",U);continue}if(H&&H.type==="paren"){let Z=Q(),V=U;if(Z==="<"&&!rs.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(H.value==="("&&!/[!=<:]/.test(Z)||Z==="<"&&!/<([!=]|\w+>)/.test(ge()))&&(V=`\\${U}`),Ne({type:"text",value:U,output:V});continue}if(r.dot!==!0&&(H.type==="slash"||H.type==="bos")){Ne({type:"qmark",value:U,output:E});continue}Ne({type:"qmark",value:U,output:S});continue}if(U==="!"){if(r.noextglob!==!0&&Q()==="("&&(Q(2)!=="?"||!/[!=<:]/.test(Q(3)))){Dr("negate",U);continue}if(r.nonegate!==!0&&D.index===0){et();continue}}if(U==="+"){if(r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Dr("plus",U);continue}if(H&&H.value==="("||r.regex===!1){Ne({type:"plus",value:U,output:d});continue}if(H&&(H.type==="bracket"||H.type==="paren"||H.type==="brace")||D.parens>0){Ne({type:"plus",value:U});continue}Ne({type:"plus",value:d});continue}if(U==="@"){if(r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Ne({type:"at",extglob:!0,value:U,output:""});continue}Ne({type:"text",value:U});continue}if(U!=="*"){(U==="$"||U==="^")&&(U=`\\${U}`);let A=kxt.exec(ge());A&&(U+=A[0],D.index+=A[0].length),Ne({type:"text",value:U});continue}if(H&&(H.type==="globstar"||H.star===!0)){H.type="star",H.star=!0,H.value+=U,H.output=R,D.backtrack=!0,D.globstar=!0,be(U);continue}let xe=ge();if(r.noextglob!==!0&&/^\([^?]/.test(xe)){Dr("star",U);continue}if(H.type==="star"){if(r.noglobstar===!0){be(U);continue}let A=H.prev,Z=A.prev,V=A.type==="slash"||A.type==="bos",He=Z&&(Z.type==="star"||Z.type==="globstar");if(r.bash===!0&&(!V||xe[0]&&xe[0]!=="/")){Ne({type:"star",value:U,output:""});continue}let Fe=D.braces>0&&(A.type==="comma"||A.type==="brace"),$t=N.length&&(A.type==="pipe"||A.type==="paren");if(!V&&A.type!=="paren"&&!Fe&&!$t){Ne({type:"star",value:U,output:""});continue}for(;xe.slice(0,3)==="/**";){let yr=e[D.index+4];if(yr&&yr!=="/")break;xe=xe.slice(3),be("/**",3)}if(A.type==="bos"&&ee()){H.type="globstar",H.value+=U,H.output=q(r),D.output=H.output,D.globstar=!0,be(U);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!He&&ee()){D.output=D.output.slice(0,-(A.output+H.output).length),A.output=`(?:${A.output}`,H.type="globstar",H.output=q(r)+(r.strictSlashes?")":"|$)"),H.value+=U,D.globstar=!0,D.output+=A.output+H.output,be(U);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&xe[0]==="/"){let yr=xe[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(A.output+H.output).length),A.output=`(?:${A.output}`,H.type="globstar",H.output=`${q(r)}${m}|${m}${yr})`,H.value+=U,D.output+=A.output+H.output,D.globstar=!0,be(U+pe()),Ne({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&xe[0]==="/"){H.type="globstar",H.value+=U,H.output=`(?:^|${m}|${q(r)}${m})`,D.output=H.output,D.globstar=!0,be(U+pe()),Ne({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-H.output.length),H.type="globstar",H.output=q(r),H.value+=U,D.output+=H.output,D.globstar=!0,be(U);continue}let F={type:"star",value:U,output:R};if(r.bash===!0){F.output=".*?",(H.type==="bos"||H.type==="slash")&&(F.output=B+F.output),Ne(F);continue}if(H&&(H.type==="bracket"||H.type==="paren")&&r.regex===!0){F.output=U,Ne(F);continue}(D.index===D.start||H.type==="slash"||H.type==="dot")&&(H.type==="dot"?(D.output+=y,H.output+=y):r.dot===!0?(D.output+=T,H.output+=T):(D.output+=B,H.output+=B),Q()!=="*"&&(D.output+=v,H.output+=v)),Ne(F)}for(;D.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing","]"));D.output=rs.escapeLast(D.output,"["),xt("brackets")}for(;D.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing",")"));D.output=rs.escapeLast(D.output,"("),xt("parens")}for(;D.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing","}"));D.output=rs.escapeLast(D.output,"{"),xt("braces")}if(r.strictSlashes!==!0&&(H.type==="star"||H.type==="bracket")&&Ne({type:"maybe_slash",value:"",output:`${m}?`}),D.backtrack===!0){D.output="";for(let xe of D.tokens)D.output+=xe.output!=null?xe.output:xe.value,xe.suffix&&(D.output+=xe.suffix)}return D};LD.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(eS,r.maxLength):eS,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=vpe[e]||e;let s=rs.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:f,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:m,START_ANCHOR:v}=QE.globChars(s),_=r.dot?p:f,b=r.dot?d:f,y=r.capture?"":"?:",T={negated:!1,prefix:""},S=r.bash===!0?".*?":m;r.capture&&(S=`(${S})`);let E=B=>B.noglobstar===!0?S:`(${y}(?:(?!${v}${B.dot?c:o}).)*?)`,C=B=>{switch(B){case"*":return`${_}${u}${S}`;case".*":return`${o}${u}${S}`;case"*.*":return`${_}${S}${o}${u}${S}`;case"*/*":return`${_}${S}${a}${u}${b}${S}`;case"**":return _+E(r);case"**/*":return`(?:${_}${E(r)}${a})?${b}${u}${S}`;case"**/*.*":return`(?:${_}${E(r)}${a})?${b}${S}${o}${u}${S}`;case"**/.*":return`(?:${_}${E(r)}${a})?${o}${u}${S}`;default:{let M=/^(.*?)\.(\w+)$/.exec(B);if(!M)return;let R=C(M[1]);return R?R+o+M[2]:void 0}}},I=rs.removePrefix(e,T),q=C(I);return q&&r.strictSlashes!==!0&&(q+=`${a}?`),q};xpe.exports=LD});var bpe=g((Fnr,_pe)=>{"use strict";var Fxt=require("path"),Mxt=gpe(),FD=ype(),MD=O0(),Bxt=A0(),jxt=e=>e&&typeof e=="object"&&!Array.isArray(e),zr=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(d=>zr(d,t,r));return d=>{for(let m of f){let v=m(d);if(v)return v}return!1}}let n=jxt(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=MD.isWindows(t),o=n?zr.compileRe(e,t):zr.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let f={...t,ignore:null,onMatch:null,onResult:null};u=zr(i.ignore,f,r)}let c=(f,p=!1)=>{let{isMatch:d,match:m,output:v}=zr.test(f,o,t,{glob:e,posix:s}),_={glob:e,state:a,regex:o,posix:s,input:f,output:v,match:m,isMatch:d};return typeof i.onResult=="function"&&i.onResult(_),d===!1?(_.isMatch=!1,p?_:!1):u(f)?(typeof i.onIgnore=="function"&&i.onIgnore(_),_.isMatch=!1,p?_:!1):(typeof i.onMatch=="function"&&i.onMatch(_),p?_:!0)};return r&&(c.state=a),c};zr.test=(e,t,r,{glob:n,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?MD.toPosixSlashes:null),a=e===n,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=zr.matchBase(e,t,r,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};zr.matchBase=(e,t,r,n=MD.isWindows(r))=>(t instanceof RegExp?t:zr.makeRe(t,r)).test(Fxt.basename(e));zr.isMatch=(e,t,r)=>zr(t,r)(e);zr.parse=(e,t)=>Array.isArray(e)?e.map(r=>zr.parse(r,t)):FD(e,{...t,fastpaths:!1});zr.scan=(e,t)=>Mxt(e,t);zr.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=zr.toRegex(a,t);return n===!0&&(u.state=e),u};zr.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=FD.fastpaths(e,t)),i.output||(i=FD(e,t)),zr.compileRe(i,t,r,n)};zr.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};zr.constants=Bxt;_pe.exports=zr});var tS=g((Mnr,wpe)=>{"use strict";wpe.exports=bpe()});var Ape=g((Bnr,Tpe)=>{"use strict";var Spe=require("util"),Cpe=OD(),Zo=tS(),BD=O0(),Epe=e=>e===""||e==="./",vr=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=f=>{s.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f<t.length;f++){let p=Zo(String(t[f]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let m of e){let v=p(m,!0);(d?!v.isMatch:v.isMatch)&&(d?n.add(v.output):(n.delete(v.output),i.add(v.output)))}}let c=(o===t.length?[...s]:[...i]).filter(f=>!n.has(f));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return c};vr.match=vr;vr.matcher=(e,t)=>Zo(e,t);vr.isMatch=(e,t,r)=>Zo(t,r)(e);vr.any=vr.isMatch;vr.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(vr(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};vr.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Spe.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>vr.contains(e,n,r));if(typeof t=="string"){if(Epe(e)||Epe(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return vr.isMatch(e,t,{...r,contains:!0})};vr.matchKeys=(e,t,r)=>{if(!BD.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=vr(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};vr.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Zo(String(i),r);if(n.some(o=>s(o)))return!0}return!1};vr.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Zo(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};vr.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Spe.inspect(e)}"`);return[].concat(t).every(n=>Zo(n,r)(e))};vr.capture=(e,t,r)=>{let n=BD.isWindows(r),s=Zo.makeRe(String(e),{...r,capture:!0}).exec(n?BD.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};vr.makeRe=(...e)=>Zo.makeRe(...e);vr.scan=(...e)=>Zo.scan(...e);vr.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of Cpe(String(n),t))r.push(Zo.parse(i,t));return r};vr.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:Cpe(e,t)};vr.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return vr.braces(e,{...t,expand:!0})};Tpe.exports=vr});function Hxt(e,t){let{packageManager:r}=e;if(r){let n=r.match(Uxt);if(n)return n[1]}return t.pnpmLockPath?"pnpm":t.yarnLockPath?"yarn":"npm"}function R0(e,t){if(e.pnpmWorkspacePath){let{packages:r}=_fe.load(Ope.default.readFileSync(e.pnpmWorkspacePath,"utf-8"));return Array.isArray(r)&&r.length>0?{name:"pnpm",isInWorkspace(n){return(0,jD.default)([n],r).length>0}}:{name:"pnpm",isInWorkspace(){return!0}}}if(t){let r=Hxt(t,e),{workspaces:n}=t;return n?{name:r,isInWorkspace(i){return jD.default.isMatch(i,n)}}:{name:r,isInWorkspace(){return!1}}}return null}var Ope,jD,Uxt,Ipe=se(()=>{"use strict";Ope=ve(require("fs"),1);bfe();jD=ve(Ape(),1),Uxt=new RegExp("(npm|pnpm|yarn)@?")});function Ppe(e){let t=(0,yn.join)(e,"package.json"),r=(0,yn.join)(e,"pnpm-workspace.yaml"),n=(0,yn.join)(e,"pnpm-lock.yaml"),i=(0,yn.join)(e,"yarn.lock");return{packageJsonPath:ns.default.existsSync(t)?t:void 0,pnpmWorkspacePath:ns.default.existsSync(r)?r:void 0,pnpmLockPath:ns.default.existsSync(n)?n:void 0,yarnLockPath:ns.default.existsSync(i)?i:void 0}}function Rpe(e){return JSON.parse(ns.default.readFileSync(e,"utf-8"))}function zxt(e,t){let{workspaceDir:r,packageManager:n}=e,i=[{dir:r,isNodeModules:!1}],s={},o=new Set,a=["node_modules/.bin","node_modules/.cache",".git",".ampt","node_modules/@ampt/cli","node_modules/fsevents","node_modules/aws-sdk/**/*.d.ts","node_modules/aws-sdk/**/*.examples.json","node_modules/aws-sdk/**/*.md","node_modules/aws-sdk/dist","node_modules/aws-sdk/dist-tools","node_modules/aws-sdk/scripts","node_modules/.vite/","node_modules/.prisma/client/libquery_engine-debian*","coverage/",".svelte-kit",".cache",".nuxt",".output/server/node_modules/.nitro"],u=(0,qpe.default)().add(a);if(ns.default.existsSync((0,yn.join)(r,".amptignore"))){let c=ns.default.readFileSync((0,yn.join)(r,".amptignore"),{encoding:"utf8"});u.add(c)}for(;i.length>0;){let{dir:c,isNodeModules:f}=i.shift();for(let p of ns.default.readdirSync(c,{withFileTypes:!0})){let d=(0,yn.join)(c,p.name),m=(0,yn.relative)(r,d);if(!u.ignores(m)){if(p.isDirectory()){if(p.isSymbolicLink())throw new Error("Did not expect entry to be a symbolic link and a directory");let v=(0,yn.join)(d,"package.json");if(!f&&ns.default.existsSync(v)&&!!(0,yn.relative)(t,d).startsWith("..")&&!n.isInWorkspace(m))continue;i.push({dir:d,isNodeModules:f||p.name==="node_modules"}),s[m]={type:"d"}}else if(p.isSymbolicLink()){let v=ns.default.readlinkSync(d),_=(0,yn.resolve)(c,v);if(_.startsWith(r)){let b=(0,yn.relative)(r,(0,yn.join)(c,v));o.add({key:m,target:b})}else{let b=ns.default.statSync(_,{throwIfNoEntry:!1});b&&(b.isDirectory()?(s[m]={type:"d"},i.push({dir:d,isNodeModules:!1})):s[m]={type:"f",mode:b.mode,size:b.size})}}else if(p.isFile()){let v=ns.default.statSync(d);s[m]={type:"f",mode:v.mode,size:v.size}}}}}for(let{target:c,key:f}of o)s[c]&&(s[f]={type:"l",target:c});return s}function $xt(e,t){(0,Npe.default)(t.packageJsonPath,`${e} does not contain a package.json`);let r=Rpe(t.packageJsonPath);if(r.workspaces||t.pnpmWorkspacePath)return{packageManager:R0(t,r),workspaceDir:e,survey:t};for(let n=0,i=e;n<10;n++){i=(0,yn.resolve)(i,"..");let s=Ppe(i),o=s.packageJsonPath?Rpe(s.packageJsonPath):void 0,a=R0(s,o),u=(0,yn.relative)(i,e);if(a&&a.isInWorkspace(u))return{packageManager:a,workspaceDir:i,survey:s}}return{packageManager:R0(t,r),workspaceDir:e,survey:t}}async function kpe(e){return new Promise(t=>{let r=Ppe(e);process.nextTick(()=>{let n=$xt(e,r);process.nextTick(()=>{let i=zxt(n,e);t({projectDir:e,workspace:n,entries:i})})})})}var Npe,ns,yn,qpe,Dpe=se(()=>{Npe=ve(require("assert"),1),ns=ve(require("fs"),1),yn=require("path"),qpe=ve(uD(),1);Ipe()});function Lpe(e,t){return Buffer.from(e.compress(Buffer.from(JSON.stringify(t),"utf-8"))).toString("base64")}function Fpe(e,t){return JSON.parse(Buffer.from(e.decompress(Buffer.from(t,"base64"))).toString("utf-8"))}var Mpe=se(()=>{});var zpe=g((Gnr,Fd)=>{var Bpe={};Bpe.__wbindgen_placeholder__=Fd.exports;var Qn,{TextDecoder:Wxt}=require("util"),jpe=new Wxt("utf-8",{ignoreBOM:!0,fatal:!0});jpe.decode();var rS=null;function UD(){return(rS===null||rS.buffer!==Qn.memory.buffer)&&(rS=new Uint8Array(Qn.memory.buffer)),rS}function Gxt(e,t){return jpe.decode(UD().subarray(e,e+t))}var tu=new Array(32).fill(void 0);tu.push(void 0,null,!0,!1);var N0=tu.length;function Vxt(e){N0===tu.length&&tu.push(tu.length+1);let t=N0;return N0=tu[t],tu[t]=e,t}var HD=0;function Upe(e,t){let r=t(e.length*1);return UD().set(e,r/1),HD=e.length,r}var nS=null;function Ld(){return(nS===null||nS.buffer!==Qn.memory.buffer)&&(nS=new Int32Array(Qn.memory.buffer)),nS}function Hpe(e,t){return UD().subarray(e/1,e/1+t)}Fd.exports.compress=function(e){try{let i=Qn.__wbindgen_add_to_stack_pointer(-16),s=Upe(e,Qn.__wbindgen_malloc),o=HD;Qn.compress(i,s,o);var t=Ld()[i/4+0],r=Ld()[i/4+1],n=Hpe(t,r).slice();return Qn.__wbindgen_free(t,r*1),n}finally{Qn.__wbindgen_add_to_stack_pointer(16)}};function Kxt(e){return tu[e]}function Xxt(e){e<36||(tu[e]=N0,N0=e)}function Yxt(e){let t=Kxt(e);return Xxt(e),t}Fd.exports.decompress=function(e){try{let o=Qn.__wbindgen_add_to_stack_pointer(-16),a=Upe(e,Qn.__wbindgen_malloc),u=HD;Qn.decompress(o,a,u);var t=Ld()[o/4+0],r=Ld()[o/4+1],n=Ld()[o/4+2],i=Ld()[o/4+3];if(i)throw Yxt(n);var s=Hpe(t,r).slice();return Qn.__wbindgen_free(t,r*1),s}finally{Qn.__wbindgen_add_to_stack_pointer(16)}};Fd.exports.__wbindgen_string_new=function(e,t){let r=Gxt(e,t);return Vxt(r)};var Jxt=require("path").join(__dirname,"lz4_wasm_nodejs_bg.wasm"),Zxt=require("fs").readFileSync(Jxt),Qxt=new WebAssembly.Module(Zxt),eyt=new WebAssembly.Instance(Qxt,Bpe);Qn=eyt.exports;Fd.exports.__wasm=Qn});var iS,Md,$pe,zD,tyt,is,Wpe,$D=se(()=>{"use strict";iS=require("fs"),Md=require("path");qie();$pe=ve(ule());Js();Dpe();Mpe();Sr();zD=ve(zpe()),tyt=6e4,is=class{fs;org;service;instance;user;src;changesUploadUrl;deployTokenExpiration;deployToken;builderFunctionName;builderLambda;credentials;env;sandboxMode=!1;manifest;workspaceRoot;fullSync;verbose;cli;constructor(t){this.fs=t.fs,this.org=t.org,this.service=t.service,this.instance=t.instance,this.user=t.user,this.sandboxMode=t.sandboxMode||!1,this.fullSync=t.fullSync??!1,this.src=this.fs.serviceRoot,this.manifest={files:{},links:{},projectDirectory:"."},this.changesUploadUrl=null,this.workspaceRoot=this.fs.serviceRoot,this.cli=t.cli,this.verbose=t.verbose??!1}timerMs(){let t=process.hrtime.bigint();return function(){let r=process.hrtime.bigint();return parseFloat((Number(r-t)/1e6).toFixed(2))}}async getUrlsAndMap(){if(this.deployTokenExpiration-Date.now()>tyt)return;let n={method:"GET",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/code`,params:{instanceType:this.instance.instanceType,region:this.instance.region,sandbox:this.sandboxMode}},{deployToken:i,deployTokenExpiration:s,builderFunctionName:o,manifest:a,credentials:u,systemWsUrl:c,instanceUrl:f,changesUploadUrl:p,env:d={}}=await ze(n);this.deployToken=i,this.deployTokenExpiration=s,this.instance.url=f,this.instance.systemWsUrl=c,this.changesUploadUrl=p,this.credentials=u,this.env=d,this.builderFunctionName=o,this.builderLambda=new $pe.default({credentials:u}),a&&!this.fullSync&&(this.manifest=Fpe(zD.default,a))}async syncRuntimeSettings(){if(!this.instance||!this.fs.serviceFile)return;await Promise.all([this.fs.readServiceFileIfExists(),this.instance.get()]);let t={runtimeName:this.instance.runtimeName,runtimeChannel:this.instance.runtimeChannel,runtimeUpdates:this.instance.runtimeUpdates,runtimeVersion:this.instance.runtimeVersion},r={runtimeName:this.fs.serviceFile.ampt.runtime||t.runtimeName,runtimeChannel:this.fs.serviceFile.ampt.runtimeChannel||t.runtimeChannel,runtimeUpdates:this.fs.serviceFile.ampt.runtimeUpdates||t.runtimeUpdates,runtimeVersion:this.fs.serviceFile.ampt.runtimeVersion||t.runtimeVersion};r.runtimeName===t.runtimeName&&r.runtimeChannel===t.runtimeChannel&&r.runtimeUpdates===t.runtimeUpdates&&r.runtimeVersion===t.runtimeVersion||(Ce.info({runtimeConfig:r,instanceRuntime:t},"updating instance runtime config"),await this.instance.update(r),this.instance.runtimeName=r.runtimeName,this.instance.runtimeChannel=r.runtimeChannel,this.instance.runtimeUpdates=r.runtimeUpdates,this.instance.runtimeVersion=r.runtimeVersion)}shouldSyncAll(t){let r=!0;return t&&(r=!1,t.forEach(n=>{(n.includes("package-lock.json")||n.includes("package.json")||n.includes("node_modules"))&&(r=!0)})),r}async sync(t,r){var n,i,s,o;try{let{verbose:a,cli:u}=this,c=this.timerMs(),f=this.timerMs();await this.getUrlsAndMap();let p=f(),d=this.fullSync||this.shouldSyncAll(t),m=this.fullSync?{}:this.manifest.files,v=d?{}:this.manifest.files,_=d?{}:this.manifest.links,b={},y=[];r==null||r("analyzing files");let T=0,S=d;if(d){let U=await kpe(this.src);this.workspaceRoot=U.workspace.workspaceDir,this.manifest.projectDirectory=(0,Md.relative)(this.workspaceRoot,this.src);for(let[ee,Q]of Object.entries(U.entries))this.fs.excludes(ee)||(Q.type==="f"?(T+=Q.size,y.push(ee),b[ee]=Q.mode):Q.type==="l"&&(_[ee]=Q.target));this.verbose&&(T>50*1e3*1e3?this.cli.logWarning(`Workspace size: ${T/1e3/1e3} MB`):this.cli.logInfo(`Workspace size: ${T/1e3/1e3} MB`))}else t&&t.forEach(U=>{let ee=(0,Md.join)(this.workspaceRoot,U);if(this.fs.excludes(U))return;U==="package.json"&&(S=!0);let Q=(0,iS.statSync)(ee,{throwIfNoEntry:!1});if(Q){if(Q.isFile())b[U]=Q.mode,y.push(U);else if(Q.isSymbolicLink()){let pe=(0,iS.readlinkSync)(ee),ge=(0,Md.relative)(this.workspaceRoot,(0,Md.join)(U,pe));_[U]=ge}}else delete v[U],delete _[U]});S&&this.syncRuntimeSettings().catch(U=>{u.logError(`Failed to update runtime settings: ${U.message}`)});let E=this.timerMs(),C=this.fs.hash(y,this.workspaceRoot,()=>{let U=E();a&&u.logInfo(`Hashed ${y.length} files in ${U} ms`)});r==null||r("archiving");let q=await(await mc.from(async function*(){for await(let U of C){let ee=[];for(let Q of U){let{normalizedPath:pe,data:ge,hash:be}=Q;if(ge){let We=b[pe],et=m[pe];!et||et.hash!==be||et.mode!==We?(a&&!d&&u.logInfo(`Syncing ${pe} (${Buffer.byteLength(ge)/1024} KB)`),ee.push({name:pe,hash:be,mode:We,data:ge})):a&&!d&&u.logInfo(`Skipping ${pe} (unchanged)`),v[pe]={hash:be,mode:We}}else delete v[pe],delete _[pe]}yield ee}}())).toBuffer(),B=q.length,M,R=0;if(this.manifest.files=v,this.manifest.links=_,this.fullSync=!1,r==null||r(`uploading ${y.length} files`),B>100*1024){let U=this.timerMs();await ze({method:"PUT",url:this.changesUploadUrl,body:q,headers:{"content-length":q.length,"content-type":"application/octet-stream"},onUploadProgress:ee=>{ee.progress===1?r==null||r("finishing upload"):r==null||r(`uploading ${Math.floor(ee.loaded/ee.total*100)}%`)}}),R=U(),a&&u.logInfo(`Uploaded ${B/1024} KB of changes in ${R} ms`)}else M=q.toString("base64");let D=this.timerMs(),N={method:"POST",body:{deployToken:this.deployToken,manifest:Lpe(zD.default,this.manifest),inlineChanges:M},endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/code`};r==null||r("processing");let Y=await ze(N),oe=D();a&&u.logInfo(`Code.sync API took ${oe} ms`);let H=c();return a&&u.logInfo(`Sync took ${H} ms`),this.manifest.sourceEtag=Y.sourceEtag,this.manifest.modulesEtag=Y.modulesEtag,{getUrlsTimeMs:p,uploadTimeMs:R,processChangesTimeMs:oe,syncTimeMs:H,...Y}}catch(a){if(a.message&&a.message.includes("Missing"))return this.user&&rr({eventName:"ampt.dev.failed",eventData:{serviceName:(n=this.service)==null?void 0:n.serviceName,instanceName:(i=this.instance)==null?void 0:i.instanceName,appName:`${(s=this.org)==null?void 0:s.orgName}:${(o=this.service)==null?void 0:o.serviceName}`}}),delete this.deployTokenExpiration,await this.getUrlsAndMap(),this.manifest={files:{},links:{},projectDirectory:this.src},await this.sync();throw a}}},Wpe=is});var Sc,Gpe=se(()=>{"use strict";Sr();Sc=class{fs;org;service;instance;constructor(t={}){this.fs=t.fs,this.org=t.org,this.service=t.service,this.instance=t.instance}async export(){let{dataFileName:t}=this.fs,r={method:"GET",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/data`,params:{dataFileName:t}},n=await ze(r);await this.fs.writeDataFile(n)}async import(t){let{dataFileName:r}=this.fs,n=await this.fs.readDataFileIfExists(),i={method:"PUT",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/data`,body:{items:n,overwrite:t},params:{dataFileName:r}};try{await ze(i)}catch(s){throw s.message==="Invalid key"?new Error("Your data file is missing fields. Please check the JSON file and try again."):s}}}});var Qpe=g((nir,Zpe)=>{var Bd=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vpe=require("path"),ryt=Bd?";":":",Kpe=CO(),Xpe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ype=(e,t)=>{let r=t.colon||ryt,n=e.match(/\//)||Bd&&e.match(/\\/)?[""]:[...Bd?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=Bd?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Bd?i.split(r):[""];return Bd&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Jpe=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:s}=Ype(e,t),o=[],a=c=>new Promise((f,p)=>{if(c===n.length)return t.all&&o.length?f(o):p(Xpe(e));let d=n[c],m=/^".*"$/.test(d)?d.slice(1,-1):d,v=Vpe.join(m,e),_=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+v:v;f(u(_,c,0))}),u=(c,f,p)=>new Promise((d,m)=>{if(p===i.length)return d(a(f+1));let v=i[p];Kpe(c+v,{pathExt:s},(_,b)=>{if(!_&&b)if(t.all)o.push(c+v);else return d(c+v);return d(u(c,f,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},nyt=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Ype(e,t),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=Vpe.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let p=0;p<n.length;p++){let d=f+n[p];try{if(Kpe.sync(d,{pathExt:i}))if(t.all)s.push(d);else return d}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Xpe(e)};Zpe.exports=Jpe;Jpe.sync=nyt});var sde=g((iir,ide)=>{"use strict";var nde=require("child_process"),ede=nde.spawn,iyt=nde.exec;ide.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":iyt("taskkill /pid "+e+" /T /F",r);break;case"darwin":WD(e,n,i,function(s){return ede("pgrep",["-P",s])},function(){tde(n,t,r)});break;default:WD(e,n,i,function(s){return ede("ps",["-o","pid","--no-headers","--ppid",s])},function(){tde(n,t,r)});break}};function tde(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(rde(s,t),n[s]=1)}),n[i]||(rde(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function rde(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function WD(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(c){var c=c.toString("ascii");o+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,WD(c,t,r,n,i)})};s.on("close",a)}});var ade=g((sir,GD)=>{"use strict";var syt=Object.prototype.hasOwnProperty,gi="~";function q0(){}Object.create&&(q0.prototype=Object.create(null),new q0().__proto__||(gi=!1));function oyt(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function ode(e,t,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new oyt(r,n||e,i),o=gi?gi+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],s]:e._events[o].push(s):(e._events[o]=s,e._eventsCount++),e}function sS(e,t){--e._eventsCount===0?e._events=new q0:delete e._events[t]}function ei(){this._events=new q0,this._eventsCount=0}ei.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)syt.call(r,n)&&t.push(gi?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};ei.prototype.listeners=function(t){var r=gi?gi+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};ei.prototype.listenerCount=function(t){var r=gi?gi+t:t,n=this._events[r];return n?n.fn?1:n.length:0};ei.prototype.emit=function(t,r,n,i,s,o){var a=gi?gi+t:t;if(!this._events[a])return!1;var u=this._events[a],c=arguments.length,f,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,i),!0;case 5:return u.fn.call(u.context,r,n,i,s),!0;case 6:return u.fn.call(u.context,r,n,i,s,o),!0}for(p=1,f=new Array(c-1);p<c;p++)f[p-1]=arguments[p];u.fn.apply(u.context,f)}else{var d=u.length,m;for(p=0;p<d;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),c){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,r);break;case 3:u[p].fn.call(u[p].context,r,n);break;case 4:u[p].fn.call(u[p].context,r,n,i);break;default:if(!f)for(m=1,f=new Array(c-1);m<c;m++)f[m-1]=arguments[m];u[p].fn.apply(u[p].context,f)}}return!0};ei.prototype.on=function(t,r,n){return ode(this,t,r,n,!1)};ei.prototype.once=function(t,r,n){return ode(this,t,r,n,!0)};ei.prototype.removeListener=function(t,r,n,i){var s=gi?gi+t:t;if(!this._events[s])return this;if(!r)return sS(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&sS(this,s);else{for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&u.push(o[a]);u.length?this._events[s]=u.length===1?u[0]:u:sS(this,s)}return this};ei.prototype.removeAllListeners=function(t){var r;return t?(r=gi?gi+t:t,this._events[r]&&sS(this,r)):(this._events=new q0,this._eventsCount=0),this};ei.prototype.off=ei.prototype.removeListener;ei.prototype.addListener=ei.prototype.on;ei.prefixed=gi;ei.EventEmitter=ei;typeof GD<"u"&&(GD.exports=ei)});var cde=g((oir,ude)=>{"use strict";ude.exports=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}});var oS=g(fde=>{var ru=fde,ayt=require("url"),lde=require("util")._extend,uyt=cde(),cyt=/(^|,)\s*upgrade\s*($|,)/i,VD=/^https|wss/;ru.isSSL=VD;ru.setupOutgoing=function(e,t,r,n){e.port=t[n||"target"].port||(VD.test(t[n||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){e[a]=t[n||"target"][a]}),e.method=t.method||r.method,e.headers=lde({},r.headers),t.headers&&lde(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),VD.test(t[n||"target"].protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!cyt.test(e.headers.connection))&&(e.headers.connection="close"));var i=t[n||"target"],s=i&&t.prependPath!==!1&&i.path||"",o=t.toProxy?r.url:ayt.parse(r.url).path||"";return o=t.ignorePath?"":o,e.path=ru.urlJoin(s,o),t.changeOrigin&&(e.headers.host=uyt(e.port,t[n||"target"].protocol)&&!lyt(e.host)?e.host+":"+e.port:e.host),e};ru.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};ru.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:ru.hasEncryptedConnection(e)?"443":"80"};ru.hasEncryptedConnection=function(e){return!!(e.connection.encrypted||e.connection.pair)};ru.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],n=r.split("?"),i;return e[t]=n.shift(),i=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,n),i.join("?")};ru.rewriteCookieProperty=function e(t,r,n){return Array.isArray(t)?t.map(function(i){return e(i,r,n)}):t.replace(new RegExp("(;\\s*"+n+"=)([^;]+)","i"),function(i,s,o){var a;if(o in r)a=r[o];else if("*"in r)a=r["*"];else return i;return a?s+a:""})};function lyt(e){return!!~e.indexOf(":")}});var mde=g((uir,hde)=>{var pde=require("url"),dde=oS(),fyt=/^201|30(1|2|7|8)$/;hde.exports={removeChunked:function(t,r,n){t.httpVersion==="1.0"&&delete n.headers["transfer-encoding"]},setConnection:function(t,r,n){t.httpVersion==="1.0"?n.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!n.headers.connection&&(n.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,n,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&n.headers.location&&fyt.test(n.statusCode)){var s=pde.parse(i.target),o=pde.parse(n.headers.location);if(s.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=t.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),n.headers.location=o.format()}},writeHeaders:function(t,r,n,i){var s=i.cookieDomainRewrite,o=i.cookiePathRewrite,a=i.preserveHeaderKeyCase,u,c=function(d,m){m!=null&&(s&&d.toLowerCase()==="set-cookie"&&(m=dde.rewriteCookieProperty(m,s,"domain")),o&&d.toLowerCase()==="set-cookie"&&(m=dde.rewriteCookieProperty(m,o,"path")),r.setHeader(String(d).trim(),m))};if(typeof s=="string"&&(s={"*":s}),typeof o=="string"&&(o={"*":o}),a&&n.rawHeaders!=null){u={};for(var f=0;f<n.rawHeaders.length;f+=2){var p=n.rawHeaders[f];u[p.toLowerCase()]=p}}Object.keys(n.headers).forEach(function(d){var m=n.headers[d];a&&u&&(d=u[d]||d),c(d,m)})},writeStatusCode:function(t,r,n){n.statusMessage?(r.statusCode=n.statusCode,r.statusMessage=n.statusMessage):r.statusCode=n.statusCode}}});var vde=g((cir,gde)=>{var pyt=require("http"),dyt=require("https"),P0=mde(),aS=oS(),hyt=FR();P0=Object.keys(P0).map(function(e){return P0[e]});var myt={http:pyt,https:dyt};gde.exports={deleteLength:function(t,r,n){(t.method==="DELETE"||t.method==="OPTIONS")&&!t.headers["content-length"]&&(t.headers["content-length"]="0",delete t.headers["transfer-encoding"])},timeout:function(t,r,n){n.timeout&&t.socket.setTimeout(n.timeout)},XHeaders:function(t,r,n){if(n.xfwd){var i=t.isSpdy||aS.hasEncryptedConnection(t),s={for:t.connection.remoteAddress||t.socket.remoteAddress,port:aS.getPort(t),proto:i?"https":"http"};["for","port","proto"].forEach(function(o){t.headers["x-forwarded-"+o]=(t.headers["x-forwarded-"+o]||"")+(t.headers["x-forwarded-"+o]?",":"")+s[o]}),t.headers["x-forwarded-host"]=t.headers["x-forwarded-host"]||t.headers.host||""}},stream:function(t,r,n,i,s,o){s.emit("start",t,r,n.target||n.forward);var a=n.followRedirects?hyt:myt,u=a.http,c=a.https;if(n.forward){var f=(n.forward.protocol==="https:"?c:u).request(aS.setupOutgoing(n.ssl||{},n,t,"forward")),p=v(f,n.forward);if(t.on("error",p),f.on("error",p),(n.buffer||t).pipe(f),!n.target)return r.end()}var d=(n.target.protocol==="https:"?c:u).request(aS.setupOutgoing(n.ssl||{},n,t));d.on("socket",function(_){s&&!d.getHeader("expect")&&s.emit("proxyReq",d,t,r,n)}),n.proxyTimeout&&d.setTimeout(n.proxyTimeout,function(){d.abort()}),t.on("aborted",function(){d.abort()});var m=v(d,n.target);t.on("error",m),d.on("error",m);function v(_,b){return function(T){if(t.socket.destroyed&&T.code==="ECONNRESET")return s.emit("econnreset",T,t,r,b),_.abort();o?o(T,t,r,b):s.emit("error",T,t,r,b)}}(n.buffer||t).pipe(d),d.on("response",function(_){if(s&&s.emit("proxyRes",_,t,r),!r.headersSent&&!n.selfHandleResponse)for(var b=0;b<P0.length&&!P0[b](t,r,_,n);b++);r.finished?s&&s.emit("end",t,r,_):(_.on("end",function(){s&&s.emit("end",t,r,_)}),n.selfHandleResponse||_.pipe(r))})}}});var yde=g((lir,xde)=>{var gyt=require("http"),vyt=require("https"),jd=oS();xde.exports={checkMethodAndHeader:function(t,r){if(t.method!=="GET"||!t.headers.upgrade||t.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),!0},XHeaders:function(t,r,n){if(n.xfwd){var i={for:t.connection.remoteAddress||t.socket.remoteAddress,port:jd.getPort(t),proto:jd.hasEncryptedConnection(t)?"wss":"ws"};["for","port","proto"].forEach(function(s){t.headers["x-forwarded-"+s]=(t.headers["x-forwarded-"+s]||"")+(t.headers["x-forwarded-"+s]?",":"")+i[s]})}},stream:function(t,r,n,i,s,o){var a=function(f,p){return Object.keys(p).reduce(function(d,m){var v=p[m];if(!Array.isArray(v))return d.push(m+": "+v),d;for(var _=0;_<v.length;_++)d.push(m+": "+v[_]);return d},[f]).join(`\r
|
|
220
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var tpe=g((Nnr,epe)=>{"use strict";var Gvt=YE(),{MAX_LENGTH:Jfe,CHAR_BACKSLASH:AD,CHAR_BACKTICK:Vvt,CHAR_COMMA:Kvt,CHAR_DOT:Xvt,CHAR_LEFT_PARENTHESES:Yvt,CHAR_RIGHT_PARENTHESES:Jvt,CHAR_LEFT_CURLY_BRACE:Zvt,CHAR_RIGHT_CURLY_BRACE:Qvt,CHAR_LEFT_SQUARE_BRACKET:Zfe,CHAR_RIGHT_SQUARE_BRACKET:Qfe,CHAR_DOUBLE_QUOTE:ext,CHAR_SINGLE_QUOTE:txt,CHAR_NO_BREAK_SPACE:rxt,CHAR_ZERO_WIDTH_NOBREAK_SPACE:nxt}=Yfe(),ixt=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Jfe,r.maxLength):Jfe;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let i={type:"root",input:e,nodes:[]},s=[i],o=i,a=i,u=0,c=e.length,f=0,p=0,d,m={},v=()=>e[f++],_=b=>{if(b.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&b.type==="text"){a.value+=b.value;return}return o.nodes.push(b),b.parent=o,b.prev=a,a=b,b};for(_({type:"bos"});f<c;)if(o=s[s.length-1],d=v(),!(d===nxt||d===rxt)){if(d===AD){_({type:"text",value:(t.keepEscaping?d:"")+v()});continue}if(d===Qfe){_({type:"text",value:"\\"+d});continue}if(d===Zfe){u++;let b=!0,y;for(;f<c&&(y=v());){if(d+=y,y===Zfe){u++;continue}if(y===AD){d+=v();continue}if(y===Qfe&&(u--,u===0))break}_({type:"text",value:d});continue}if(d===Yvt){o=_({type:"paren",nodes:[]}),s.push(o),_({type:"text",value:d});continue}if(d===Jvt){if(o.type!=="paren"){_({type:"text",value:d});continue}o=s.pop(),_({type:"text",value:d}),o=s[s.length-1];continue}if(d===ext||d===txt||d===Vvt){let b=d,y;for(t.keepQuotes!==!0&&(d="");f<c&&(y=v());){if(y===AD){d+=y+v();continue}if(y===b){t.keepQuotes===!0&&(d+=y);break}d+=y}_({type:"text",value:d});continue}if(d===Zvt){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=_(y),s.push(o),_({type:"open",value:d});continue}if(d===Qvt){if(o.type!=="brace"){_({type:"text",value:d});continue}let b="close";o=s.pop(),o.close=!0,_({type:b,value:d}),p--,o=s[s.length-1];continue}if(d===Kvt&&p>0){if(o.ranges>0){o.ranges=0;let b=o.nodes.shift();o.nodes=[b,{type:"text",value:Gvt(o)}]}_({type:"comma",value:d}),o.commas++;continue}if(d===Xvt&&p>0&&o.commas===0){let b=o.nodes;if(p===0||b.length===0){_({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){b.pop();let y=b[b.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}_({type:"dot",value:d});continue}_({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let b=s[s.length-1],y=b.nodes.indexOf(o);b.nodes.splice(y,1,...o.nodes)}while(s.length>0);return _({type:"eos"}),i};epe.exports=ixt});var OD=g((qnr,npe)=>{"use strict";var rpe=YE(),sxt=Wfe(),oxt=Kfe(),axt=tpe(),ts=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=ts.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(ts.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ts.parse=(e,t={})=>axt(e,t);ts.stringify=(e,t={})=>rpe(typeof e=="string"?ts.parse(e,t):e,t);ts.compile=(e,t={})=>(typeof e=="string"&&(e=ts.parse(e,t)),sxt(e,t));ts.expand=(e,t={})=>{typeof e=="string"&&(e=ts.parse(e,t));let r=oxt(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ts.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ts.compile(e,t):ts.expand(e,t);npe.exports=ts});var A0=g((Pnr,upe)=>{"use strict";var uxt=require("path"),Jo="\\\\/",ipe=`[^${Jo}]`,eu="\\.",cxt="\\+",lxt="\\?",ZE="\\/",fxt="(?=.)",spe="[^/]",ID=`(?:${ZE}|$)`,ope=`(?:^|${ZE})`,RD=`${eu}{1,2}${ID}`,pxt=`(?!${eu})`,dxt=`(?!${ope}${RD})`,hxt=`(?!${eu}{0,1}${ID})`,mxt=`(?!${RD})`,gxt=`[^.${ZE}]`,vxt=`${spe}*?`,ape={DOT_LITERAL:eu,PLUS_LITERAL:cxt,QMARK_LITERAL:lxt,SLASH_LITERAL:ZE,ONE_CHAR:fxt,QMARK:spe,END_ANCHOR:ID,DOTS_SLASH:RD,NO_DOT:pxt,NO_DOTS:dxt,NO_DOT_SLASH:hxt,NO_DOTS_SLASH:mxt,QMARK_NO_DOT:gxt,STAR:vxt,START_ANCHOR:ope},xxt={...ape,SLASH_LITERAL:`[${Jo}]`,QMARK:ipe,STAR:`${ipe}*?`,DOTS_SLASH:`${eu}{1,2}(?:[${Jo}]|$)`,NO_DOT:`(?!${eu})`,NO_DOTS:`(?!(?:^|[${Jo}])${eu}{1,2}(?:[${Jo}]|$))`,NO_DOT_SLASH:`(?!${eu}{0,1}(?:[${Jo}]|$))`,NO_DOTS_SLASH:`(?!${eu}{1,2}(?:[${Jo}]|$))`,QMARK_NO_DOT:`[^.${Jo}]`,START_ANCHOR:`(?:^|[${Jo}])`,END_ANCHOR:`(?:[${Jo}]|$)`},yxt={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};upe.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:yxt,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:uxt.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?xxt:ape}}});var O0=g(Di=>{"use strict";var _xt=require("path"),bxt=process.platform==="win32",{REGEX_BACKSLASH:wxt,REGEX_REMOVE_BACKSLASH:Ext,REGEX_SPECIAL_CHARS:Sxt,REGEX_SPECIAL_CHARS_GLOBAL:Cxt}=A0();Di.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Di.hasRegexChars=e=>Sxt.test(e);Di.isRegexChar=e=>e.length===1&&Di.hasRegexChars(e);Di.escapeRegex=e=>e.replace(Cxt,"\\$1");Di.toPosixSlashes=e=>e.replace(wxt,"/");Di.removeBackslashes=e=>e.replace(Ext,t=>t==="\\"?"":t);Di.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Di.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:bxt===!0||_xt.sep==="\\";Di.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Di.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Di.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Di.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var gpe=g((Dnr,mpe)=>{"use strict";var cpe=O0(),{CHAR_ASTERISK:ND,CHAR_AT:Txt,CHAR_BACKWARD_SLASH:I0,CHAR_COMMA:Axt,CHAR_DOT:qD,CHAR_EXCLAMATION_MARK:PD,CHAR_FORWARD_SLASH:hpe,CHAR_LEFT_CURLY_BRACE:kD,CHAR_LEFT_PARENTHESES:DD,CHAR_LEFT_SQUARE_BRACKET:Oxt,CHAR_PLUS:Ixt,CHAR_QUESTION_MARK:lpe,CHAR_RIGHT_CURLY_BRACE:Rxt,CHAR_RIGHT_PARENTHESES:fpe,CHAR_RIGHT_SQUARE_BRACKET:Nxt}=A0(),ppe=e=>e===hpe||e===I0,dpe=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},qxt=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=e,c=-1,f=0,p=0,d=!1,m=!1,v=!1,_=!1,b=!1,y=!1,T=!1,S=!1,E=!1,C=!1,I=0,q,B,M={value:"",depth:0,isGlob:!1},R=()=>c>=n,D=()=>u.charCodeAt(c+1),N=()=>(q=B,u.charCodeAt(++c));for(;c<n;){B=N();let ee;if(B===I0){T=M.backslashes=!0,B=N(),B===kD&&(y=!0);continue}if(y===!0||B===kD){for(I++;R()!==!0&&(B=N());){if(B===I0){T=M.backslashes=!0,N();continue}if(B===kD){I++;continue}if(y!==!0&&B===qD&&(B=N())===qD){if(d=M.isBrace=!0,v=M.isGlob=!0,C=!0,i===!0)continue;break}if(y!==!0&&B===Axt){if(d=M.isBrace=!0,v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===Rxt&&(I--,I===0)){y=!1,d=M.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(B===hpe){if(s.push(c),o.push(M),M={value:"",depth:0,isGlob:!1},C===!0)continue;if(q===qD&&c===f+1){f+=2;continue}p=c+1;continue}if(r.noext!==!0&&(B===Ixt||B===Txt||B===ND||B===lpe||B===PD)===!0&&D()===DD){if(v=M.isGlob=!0,_=M.isExtglob=!0,C=!0,B===PD&&c===f&&(E=!0),i===!0){for(;R()!==!0&&(B=N());){if(B===I0){T=M.backslashes=!0,B=N();continue}if(B===fpe){v=M.isGlob=!0,C=!0;break}}continue}break}if(B===ND){if(q===ND&&(b=M.isGlobstar=!0),v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===lpe){if(v=M.isGlob=!0,C=!0,i===!0)continue;break}if(B===Oxt){for(;R()!==!0&&(ee=N());){if(ee===I0){T=M.backslashes=!0,N();continue}if(ee===Nxt){m=M.isBracket=!0,v=M.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&B===PD&&c===f){S=M.negated=!0,f++;continue}if(r.noparen!==!0&&B===DD){if(v=M.isGlob=!0,i===!0){for(;R()!==!0&&(B=N());){if(B===DD){T=M.backslashes=!0,B=N();continue}if(B===fpe){C=!0;break}}continue}break}if(v===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(_=!1,v=!1);let Y=u,oe="",H="";f>0&&(oe=u.slice(0,f),u=u.slice(f),p-=f),Y&&v===!0&&p>0?(Y=u.slice(0,p),H=u.slice(p)):v===!0?(Y="",H=u):Y=u,Y&&Y!==""&&Y!=="/"&&Y!==u&&ppe(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),r.unescape===!0&&(H&&(H=cpe.removeBackslashes(H)),Y&&T===!0&&(Y=cpe.removeBackslashes(Y)));let U={prefix:oe,input:e,start:f,base:Y,glob:H,isBrace:d,isBracket:m,isGlob:v,isExtglob:_,isGlobstar:b,negated:S,negatedExtglob:E};if(r.tokens===!0&&(U.maxDepth=0,ppe(B)||o.push(M),U.tokens=o),r.parts===!0||r.tokens===!0){let ee;for(let Q=0;Q<s.length;Q++){let pe=ee?ee+1:f,ge=s[Q],we=e.slice(pe,ge);r.tokens&&(Q===0&&f!==0?(o[Q].isPrefix=!0,o[Q].value=oe):o[Q].value=we,dpe(o[Q]),U.maxDepth+=o[Q].depth),(Q!==0||we!=="")&&a.push(we),ee=ge}if(ee&&ee+1<e.length){let Q=e.slice(ee+1);a.push(Q),r.tokens&&(o[o.length-1].value=Q,dpe(o[o.length-1]),U.maxDepth+=o[o.length-1].depth)}U.slashes=s,U.parts=a}return U};mpe.exports=qxt});var ype=g((Lnr,xpe)=>{"use strict";var QE=A0(),rs=O0(),{MAX_LENGTH:eS,POSIX_REGEX_SOURCE:Pxt,REGEX_NON_SPECIAL_CHARS:kxt,REGEX_SPECIAL_CHARS_BACKREF:Dxt,REPLACEMENTS:vpe}=QE,Lxt=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(i=>rs.escapeRegex(i)).join("..")}return r},Dd=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,LD=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=vpe[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(eS,r.maxLength):eS,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=rs.isWindows(t),c=QE.globChars(u),f=QE.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:v,DOTS_SLASH:_,NO_DOT:b,NO_DOT_SLASH:y,NO_DOTS_SLASH:T,QMARK:S,QMARK_NO_DOT:E,STAR:C,START_ANCHOR:I}=c,q=xe=>`(${a}(?:(?!${I}${xe.dot?_:p}).)*?)`,B=r.dot?"":b,M=r.dot?S:E,R=r.bash===!0?q(r):C;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let D={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=rs.removePrefix(e,D),i=e.length;let N=[],Y=[],oe=[],H=s,U,ee=()=>D.index===i-1,Q=D.peek=(xe=1)=>e[D.index+xe],pe=D.advance=()=>e[++D.index]||"",ge=()=>e.slice(D.index+1),we=(xe="",F=0)=>{D.consumed+=xe,D.index+=F},We=xe=>{D.output+=xe.output!=null?xe.output:xe.value,we(xe.value)},et=()=>{let xe=1;for(;Q()==="!"&&(Q(2)!=="("||Q(3)==="?");)pe(),D.start++,xe++;return xe%2===0?!1:(D.negated=!0,D.start++,!0)},tt=xe=>{D[xe]++,oe.push(xe)},xt=xe=>{D[xe]--,oe.pop()},Ne=xe=>{if(H.type==="globstar"){let F=D.braces>0&&(xe.type==="comma"||xe.type==="brace"),A=xe.extglob===!0||N.length&&(xe.type==="pipe"||xe.type==="paren");xe.type!=="slash"&&xe.type!=="paren"&&!F&&!A&&(D.output=D.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=R,D.output+=H.output)}if(N.length&&xe.type!=="paren"&&(N[N.length-1].inner+=xe.value),(xe.value||xe.output)&&We(xe),H&&H.type==="text"&&xe.type==="text"){H.value+=xe.value,H.output=(H.output||"")+xe.value;return}xe.prev=H,o.push(xe),H=xe},Dr=(xe,F)=>{let A={...f[F],conditions:1,inner:""};A.prev=H,A.parens=D.parens,A.output=D.output;let Z=(r.capture?"(":"")+A.open;tt("parens"),Ne({type:xe,value:F,output:D.output?"":v}),Ne({type:"paren",extglob:!0,value:pe(),output:Z}),N.push(A)},zt=xe=>{let F=xe.close+(r.capture?")":""),A;if(xe.type==="negate"){let Z=R;if(xe.inner&&xe.inner.length>1&&xe.inner.includes("/")&&(Z=q(r)),(Z!==R||ee()||/^\)+$/.test(ge()))&&(F=xe.close=`)$))${Z}`),xe.inner.includes("*")&&(A=ge())&&/^\.[^\\/.]+$/.test(A)){let V=LD(A,{...t,fastpaths:!1}).output;F=xe.close=`)${V})${Z})`}xe.prev.type==="bos"&&(D.negatedExtglob=!0)}Ne({type:"paren",extglob:!0,value:U,output:F}),xt("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let xe=!1,F=e.replace(Dxt,(A,Z,V,He,Fe,$t)=>He==="\\"?(xe=!0,A):He==="?"?Z?Z+He+(Fe?S.repeat(Fe.length):""):$t===0?M+(Fe?S.repeat(Fe.length):""):S.repeat(V.length):He==="."?p.repeat(V.length):He==="*"?Z?Z+He+(Fe?R:""):R:Z?A:`\\${A}`);return xe===!0&&(r.unescape===!0?F=F.replace(/\\/g,""):F=F.replace(/\\+/g,A=>A.length%2===0?"\\\\":A?"\\":"")),F===e&&r.contains===!0?(D.output=e,D):(D.output=rs.wrapOutput(F,D,t),D)}for(;!ee();){if(U=pe(),U==="\0")continue;if(U==="\\"){let A=Q();if(A==="/"&&r.bash!==!0||A==="."||A===";")continue;if(!A){U+="\\",Ne({type:"text",value:U});continue}let Z=/^\\+/.exec(ge()),V=0;if(Z&&Z[0].length>2&&(V=Z[0].length,D.index+=V,V%2!==0&&(U+="\\")),r.unescape===!0?U=pe():U+=pe(),D.brackets===0){Ne({type:"text",value:U});continue}}if(D.brackets>0&&(U!=="]"||H.value==="["||H.value==="[^")){if(r.posix!==!1&&U===":"){let A=H.value.slice(1);if(A.includes("[")&&(H.posix=!0,A.includes(":"))){let Z=H.value.lastIndexOf("["),V=H.value.slice(0,Z),He=H.value.slice(Z+2),Fe=Pxt[He];if(Fe){H.value=V+Fe,D.backtrack=!0,pe(),!s.output&&o.indexOf(H)===1&&(s.output=v);continue}}}(U==="["&&Q()!==":"||U==="-"&&Q()==="]")&&(U=`\\${U}`),U==="]"&&(H.value==="["||H.value==="[^")&&(U=`\\${U}`),r.posix===!0&&U==="!"&&H.value==="["&&(U="^"),H.value+=U,We({value:U});continue}if(D.quotes===1&&U!=='"'){U=rs.escapeRegex(U),H.value+=U,We({value:U});continue}if(U==='"'){D.quotes=D.quotes===1?0:1,r.keepQuotes===!0&&Ne({type:"text",value:U});continue}if(U==="("){tt("parens"),Ne({type:"paren",value:U});continue}if(U===")"){if(D.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Dd("opening","("));let A=N[N.length-1];if(A&&D.parens===A.parens+1){zt(N.pop());continue}Ne({type:"paren",value:U,output:D.parens?")":"\\)"}),xt("parens");continue}if(U==="["){if(r.nobracket===!0||!ge().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Dd("closing","]"));U=`\\${U}`}else tt("brackets");Ne({type:"bracket",value:U});continue}if(U==="]"){if(r.nobracket===!0||H&&H.type==="bracket"&&H.value.length===1){Ne({type:"text",value:U,output:`\\${U}`});continue}if(D.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Dd("opening","["));Ne({type:"text",value:U,output:`\\${U}`});continue}xt("brackets");let A=H.value.slice(1);if(H.posix!==!0&&A[0]==="^"&&!A.includes("/")&&(U=`/${U}`),H.value+=U,We({value:U}),r.literalBrackets===!1||rs.hasRegexChars(A))continue;let Z=rs.escapeRegex(H.value);if(D.output=D.output.slice(0,-H.value.length),r.literalBrackets===!0){D.output+=Z,H.value=Z;continue}H.value=`(${a}${Z}|${H.value})`,D.output+=H.value;continue}if(U==="{"&&r.nobrace!==!0){tt("braces");let A={type:"brace",value:U,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};Y.push(A),Ne(A);continue}if(U==="}"){let A=Y[Y.length-1];if(r.nobrace===!0||!A){Ne({type:"text",value:U,output:U});continue}let Z=")";if(A.dots===!0){let V=o.slice(),He=[];for(let Fe=V.length-1;Fe>=0&&(o.pop(),V[Fe].type!=="brace");Fe--)V[Fe].type!=="dots"&&He.unshift(V[Fe].value);Z=Lxt(He,r),D.backtrack=!0}if(A.comma!==!0&&A.dots!==!0){let V=D.output.slice(0,A.outputIndex),He=D.tokens.slice(A.tokensIndex);A.value=A.output="\\{",U=Z="\\}",D.output=V;for(let Fe of He)D.output+=Fe.output||Fe.value}Ne({type:"brace",value:U,output:Z}),xt("braces"),Y.pop();continue}if(U==="|"){N.length>0&&N[N.length-1].conditions++,Ne({type:"text",value:U});continue}if(U===","){let A=U,Z=Y[Y.length-1];Z&&oe[oe.length-1]==="braces"&&(Z.comma=!0,A="|"),Ne({type:"comma",value:U,output:A});continue}if(U==="/"){if(H.type==="dot"&&D.index===D.start+1){D.start=D.index+1,D.consumed="",D.output="",o.pop(),H=s;continue}Ne({type:"slash",value:U,output:m});continue}if(U==="."){if(D.braces>0&&H.type==="dot"){H.value==="."&&(H.output=p);let A=Y[Y.length-1];H.type="dots",H.output+=U,H.value+=U,A.dots=!0;continue}if(D.braces+D.parens===0&&H.type!=="bos"&&H.type!=="slash"){Ne({type:"text",value:U,output:p});continue}Ne({type:"dot",value:U,output:p});continue}if(U==="?"){if(!(H&&H.value==="(")&&r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Dr("qmark",U);continue}if(H&&H.type==="paren"){let Z=Q(),V=U;if(Z==="<"&&!rs.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(H.value==="("&&!/[!=<:]/.test(Z)||Z==="<"&&!/<([!=]|\w+>)/.test(ge()))&&(V=`\\${U}`),Ne({type:"text",value:U,output:V});continue}if(r.dot!==!0&&(H.type==="slash"||H.type==="bos")){Ne({type:"qmark",value:U,output:E});continue}Ne({type:"qmark",value:U,output:S});continue}if(U==="!"){if(r.noextglob!==!0&&Q()==="("&&(Q(2)!=="?"||!/[!=<:]/.test(Q(3)))){Dr("negate",U);continue}if(r.nonegate!==!0&&D.index===0){et();continue}}if(U==="+"){if(r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Dr("plus",U);continue}if(H&&H.value==="("||r.regex===!1){Ne({type:"plus",value:U,output:d});continue}if(H&&(H.type==="bracket"||H.type==="paren"||H.type==="brace")||D.parens>0){Ne({type:"plus",value:U});continue}Ne({type:"plus",value:d});continue}if(U==="@"){if(r.noextglob!==!0&&Q()==="("&&Q(2)!=="?"){Ne({type:"at",extglob:!0,value:U,output:""});continue}Ne({type:"text",value:U});continue}if(U!=="*"){(U==="$"||U==="^")&&(U=`\\${U}`);let A=kxt.exec(ge());A&&(U+=A[0],D.index+=A[0].length),Ne({type:"text",value:U});continue}if(H&&(H.type==="globstar"||H.star===!0)){H.type="star",H.star=!0,H.value+=U,H.output=R,D.backtrack=!0,D.globstar=!0,we(U);continue}let xe=ge();if(r.noextglob!==!0&&/^\([^?]/.test(xe)){Dr("star",U);continue}if(H.type==="star"){if(r.noglobstar===!0){we(U);continue}let A=H.prev,Z=A.prev,V=A.type==="slash"||A.type==="bos",He=Z&&(Z.type==="star"||Z.type==="globstar");if(r.bash===!0&&(!V||xe[0]&&xe[0]!=="/")){Ne({type:"star",value:U,output:""});continue}let Fe=D.braces>0&&(A.type==="comma"||A.type==="brace"),$t=N.length&&(A.type==="pipe"||A.type==="paren");if(!V&&A.type!=="paren"&&!Fe&&!$t){Ne({type:"star",value:U,output:""});continue}for(;xe.slice(0,3)==="/**";){let yr=e[D.index+4];if(yr&&yr!=="/")break;xe=xe.slice(3),we("/**",3)}if(A.type==="bos"&&ee()){H.type="globstar",H.value+=U,H.output=q(r),D.output=H.output,D.globstar=!0,we(U);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&!He&&ee()){D.output=D.output.slice(0,-(A.output+H.output).length),A.output=`(?:${A.output}`,H.type="globstar",H.output=q(r)+(r.strictSlashes?")":"|$)"),H.value+=U,D.globstar=!0,D.output+=A.output+H.output,we(U);continue}if(A.type==="slash"&&A.prev.type!=="bos"&&xe[0]==="/"){let yr=xe[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(A.output+H.output).length),A.output=`(?:${A.output}`,H.type="globstar",H.output=`${q(r)}${m}|${m}${yr})`,H.value+=U,D.output+=A.output+H.output,D.globstar=!0,we(U+pe()),Ne({type:"slash",value:"/",output:""});continue}if(A.type==="bos"&&xe[0]==="/"){H.type="globstar",H.value+=U,H.output=`(?:^|${m}|${q(r)}${m})`,D.output=H.output,D.globstar=!0,we(U+pe()),Ne({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-H.output.length),H.type="globstar",H.output=q(r),H.value+=U,D.output+=H.output,D.globstar=!0,we(U);continue}let F={type:"star",value:U,output:R};if(r.bash===!0){F.output=".*?",(H.type==="bos"||H.type==="slash")&&(F.output=B+F.output),Ne(F);continue}if(H&&(H.type==="bracket"||H.type==="paren")&&r.regex===!0){F.output=U,Ne(F);continue}(D.index===D.start||H.type==="slash"||H.type==="dot")&&(H.type==="dot"?(D.output+=y,H.output+=y):r.dot===!0?(D.output+=T,H.output+=T):(D.output+=B,H.output+=B),Q()!=="*"&&(D.output+=v,H.output+=v)),Ne(F)}for(;D.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing","]"));D.output=rs.escapeLast(D.output,"["),xt("brackets")}for(;D.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing",")"));D.output=rs.escapeLast(D.output,"("),xt("parens")}for(;D.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Dd("closing","}"));D.output=rs.escapeLast(D.output,"{"),xt("braces")}if(r.strictSlashes!==!0&&(H.type==="star"||H.type==="bracket")&&Ne({type:"maybe_slash",value:"",output:`${m}?`}),D.backtrack===!0){D.output="";for(let xe of D.tokens)D.output+=xe.output!=null?xe.output:xe.value,xe.suffix&&(D.output+=xe.suffix)}return D};LD.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(eS,r.maxLength):eS,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=vpe[e]||e;let s=rs.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:f,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:m,START_ANCHOR:v}=QE.globChars(s),_=r.dot?p:f,b=r.dot?d:f,y=r.capture?"":"?:",T={negated:!1,prefix:""},S=r.bash===!0?".*?":m;r.capture&&(S=`(${S})`);let E=B=>B.noglobstar===!0?S:`(${y}(?:(?!${v}${B.dot?c:o}).)*?)`,C=B=>{switch(B){case"*":return`${_}${u}${S}`;case".*":return`${o}${u}${S}`;case"*.*":return`${_}${S}${o}${u}${S}`;case"*/*":return`${_}${S}${a}${u}${b}${S}`;case"**":return _+E(r);case"**/*":return`(?:${_}${E(r)}${a})?${b}${u}${S}`;case"**/*.*":return`(?:${_}${E(r)}${a})?${b}${S}${o}${u}${S}`;case"**/.*":return`(?:${_}${E(r)}${a})?${o}${u}${S}`;default:{let M=/^(.*?)\.(\w+)$/.exec(B);if(!M)return;let R=C(M[1]);return R?R+o+M[2]:void 0}}},I=rs.removePrefix(e,T),q=C(I);return q&&r.strictSlashes!==!0&&(q+=`${a}?`),q};xpe.exports=LD});var bpe=g((Fnr,_pe)=>{"use strict";var Fxt=require("path"),Mxt=gpe(),FD=ype(),MD=O0(),Bxt=A0(),jxt=e=>e&&typeof e=="object"&&!Array.isArray(e),zr=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(d=>zr(d,t,r));return d=>{for(let m of f){let v=m(d);if(v)return v}return!1}}let n=jxt(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=MD.isWindows(t),o=n?zr.compileRe(e,t):zr.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let f={...t,ignore:null,onMatch:null,onResult:null};u=zr(i.ignore,f,r)}let c=(f,p=!1)=>{let{isMatch:d,match:m,output:v}=zr.test(f,o,t,{glob:e,posix:s}),_={glob:e,state:a,regex:o,posix:s,input:f,output:v,match:m,isMatch:d};return typeof i.onResult=="function"&&i.onResult(_),d===!1?(_.isMatch=!1,p?_:!1):u(f)?(typeof i.onIgnore=="function"&&i.onIgnore(_),_.isMatch=!1,p?_:!1):(typeof i.onMatch=="function"&&i.onMatch(_),p?_:!0)};return r&&(c.state=a),c};zr.test=(e,t,r,{glob:n,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?MD.toPosixSlashes:null),a=e===n,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=zr.matchBase(e,t,r,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};zr.matchBase=(e,t,r,n=MD.isWindows(r))=>(t instanceof RegExp?t:zr.makeRe(t,r)).test(Fxt.basename(e));zr.isMatch=(e,t,r)=>zr(t,r)(e);zr.parse=(e,t)=>Array.isArray(e)?e.map(r=>zr.parse(r,t)):FD(e,{...t,fastpaths:!1});zr.scan=(e,t)=>Mxt(e,t);zr.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=zr.toRegex(a,t);return n===!0&&(u.state=e),u};zr.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=FD.fastpaths(e,t)),i.output||(i=FD(e,t)),zr.compileRe(i,t,r,n)};zr.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};zr.constants=Bxt;_pe.exports=zr});var tS=g((Mnr,wpe)=>{"use strict";wpe.exports=bpe()});var Ape=g((Bnr,Tpe)=>{"use strict";var Spe=require("util"),Cpe=OD(),Zo=tS(),BD=O0(),Epe=e=>e===""||e==="./",vr=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=f=>{s.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f<t.length;f++){let p=Zo(String(t[f]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let m of e){let v=p(m,!0);(d?!v.isMatch:v.isMatch)&&(d?n.add(v.output):(n.delete(v.output),i.add(v.output)))}}let c=(o===t.length?[...s]:[...i]).filter(f=>!n.has(f));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return c};vr.match=vr;vr.matcher=(e,t)=>Zo(e,t);vr.isMatch=(e,t,r)=>Zo(t,r)(e);vr.any=vr.isMatch;vr.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(vr(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};vr.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Spe.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>vr.contains(e,n,r));if(typeof t=="string"){if(Epe(e)||Epe(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return vr.isMatch(e,t,{...r,contains:!0})};vr.matchKeys=(e,t,r)=>{if(!BD.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=vr(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};vr.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Zo(String(i),r);if(n.some(o=>s(o)))return!0}return!1};vr.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Zo(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};vr.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Spe.inspect(e)}"`);return[].concat(t).every(n=>Zo(n,r)(e))};vr.capture=(e,t,r)=>{let n=BD.isWindows(r),s=Zo.makeRe(String(e),{...r,capture:!0}).exec(n?BD.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};vr.makeRe=(...e)=>Zo.makeRe(...e);vr.scan=(...e)=>Zo.scan(...e);vr.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of Cpe(String(n),t))r.push(Zo.parse(i,t));return r};vr.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:Cpe(e,t)};vr.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return vr.braces(e,{...t,expand:!0})};Tpe.exports=vr});function Hxt(e,t){let{packageManager:r}=e;if(r){let n=r.match(Uxt);if(n)return n[1]}return t.pnpmLockPath?"pnpm":t.yarnLockPath?"yarn":"npm"}function R0(e,t){if(e.pnpmWorkspacePath){let{packages:r}=_fe.load(Ope.default.readFileSync(e.pnpmWorkspacePath,"utf-8"));return Array.isArray(r)&&r.length>0?{name:"pnpm",isInWorkspace(n){return(0,jD.default)([n],r).length>0}}:{name:"pnpm",isInWorkspace(){return!0}}}if(t){let r=Hxt(t,e),{workspaces:n}=t;return n?{name:r,isInWorkspace(i){return jD.default.isMatch(i,n)}}:{name:r,isInWorkspace(){return!1}}}return null}var Ope,jD,Uxt,Ipe=se(()=>{"use strict";Ope=ve(require("fs"),1);bfe();jD=ve(Ape(),1),Uxt=new RegExp("(npm|pnpm|yarn)@?")});function Ppe(e){let t=(0,yn.join)(e,"package.json"),r=(0,yn.join)(e,"pnpm-workspace.yaml"),n=(0,yn.join)(e,"pnpm-lock.yaml"),i=(0,yn.join)(e,"yarn.lock");return{packageJsonPath:ns.default.existsSync(t)?t:void 0,pnpmWorkspacePath:ns.default.existsSync(r)?r:void 0,pnpmLockPath:ns.default.existsSync(n)?n:void 0,yarnLockPath:ns.default.existsSync(i)?i:void 0}}function Rpe(e){return JSON.parse(ns.default.readFileSync(e,"utf-8"))}function zxt(e,t){let{workspaceDir:r,packageManager:n}=e,i=[{dir:r,isNodeModules:!1}],s={},o=new Set,a=["node_modules/.bin","node_modules/.cache",".git",".ampt","node_modules/@ampt/cli","node_modules/fsevents","node_modules/aws-sdk/**/*.d.ts","node_modules/aws-sdk/**/*.examples.json","node_modules/aws-sdk/**/*.md","node_modules/aws-sdk/dist","node_modules/aws-sdk/dist-tools","node_modules/aws-sdk/scripts","node_modules/.vite/","node_modules/.prisma/client/libquery_engine-debian*","coverage/",".svelte-kit",".cache",".nuxt",".output/server/node_modules/.nitro"],u=(0,qpe.default)().add(a);if(ns.default.existsSync((0,yn.join)(r,".amptignore"))){let c=ns.default.readFileSync((0,yn.join)(r,".amptignore"),{encoding:"utf8"});u.add(c)}for(;i.length>0;){let{dir:c,isNodeModules:f}=i.shift();for(let p of ns.default.readdirSync(c,{withFileTypes:!0})){let d=(0,yn.join)(c,p.name),m=(0,yn.relative)(r,d);if(!u.ignores(m)){if(p.isDirectory()){if(p.isSymbolicLink())throw new Error("Did not expect entry to be a symbolic link and a directory");let v=(0,yn.join)(d,"package.json");if(!f&&ns.default.existsSync(v)&&!!(0,yn.relative)(t,d).startsWith("..")&&!n.isInWorkspace(m))continue;i.push({dir:d,isNodeModules:f||p.name==="node_modules"}),s[m]={type:"d"}}else if(p.isSymbolicLink()){let v=ns.default.readlinkSync(d),_=(0,yn.resolve)(c,v);if(_.startsWith(r)){let b=(0,yn.relative)(r,(0,yn.join)(c,v));o.add({key:m,target:b})}else{let b=ns.default.statSync(_,{throwIfNoEntry:!1});b&&(b.isDirectory()?(s[m]={type:"d"},i.push({dir:d,isNodeModules:!1})):s[m]={type:"f",mode:b.mode,size:b.size})}}else if(p.isFile()){let v=ns.default.statSync(d);s[m]={type:"f",mode:v.mode,size:v.size}}}}}for(let{target:c,key:f}of o)s[c]&&(s[f]={type:"l",target:c});return s}function $xt(e,t){(0,Npe.default)(t.packageJsonPath,`${e} does not contain a package.json`);let r=Rpe(t.packageJsonPath);if(r.workspaces||t.pnpmWorkspacePath)return{packageManager:R0(t,r),workspaceDir:e,survey:t};for(let n=0,i=e;n<10;n++){i=(0,yn.resolve)(i,"..");let s=Ppe(i),o=s.packageJsonPath?Rpe(s.packageJsonPath):void 0,a=R0(s,o),u=(0,yn.relative)(i,e);if(a&&a.isInWorkspace(u))return{packageManager:a,workspaceDir:i,survey:s}}return{packageManager:R0(t,r),workspaceDir:e,survey:t}}async function kpe(e){return new Promise(t=>{let r=Ppe(e);process.nextTick(()=>{let n=$xt(e,r);process.nextTick(()=>{let i=zxt(n,e);t({projectDir:e,workspace:n,entries:i})})})})}var Npe,ns,yn,qpe,Dpe=se(()=>{Npe=ve(require("assert"),1),ns=ve(require("fs"),1),yn=require("path"),qpe=ve(uD(),1);Ipe()});function Lpe(e,t){return Buffer.from(e.compress(Buffer.from(JSON.stringify(t),"utf-8"))).toString("base64")}function Fpe(e,t){return JSON.parse(Buffer.from(e.decompress(Buffer.from(t,"base64"))).toString("utf-8"))}var Mpe=se(()=>{});var zpe=g((Gnr,Fd)=>{var Bpe={};Bpe.__wbindgen_placeholder__=Fd.exports;var Qn,{TextDecoder:Wxt}=require("util"),jpe=new Wxt("utf-8",{ignoreBOM:!0,fatal:!0});jpe.decode();var rS=null;function UD(){return(rS===null||rS.buffer!==Qn.memory.buffer)&&(rS=new Uint8Array(Qn.memory.buffer)),rS}function Gxt(e,t){return jpe.decode(UD().subarray(e,e+t))}var tu=new Array(32).fill(void 0);tu.push(void 0,null,!0,!1);var N0=tu.length;function Vxt(e){N0===tu.length&&tu.push(tu.length+1);let t=N0;return N0=tu[t],tu[t]=e,t}var HD=0;function Upe(e,t){let r=t(e.length*1);return UD().set(e,r/1),HD=e.length,r}var nS=null;function Ld(){return(nS===null||nS.buffer!==Qn.memory.buffer)&&(nS=new Int32Array(Qn.memory.buffer)),nS}function Hpe(e,t){return UD().subarray(e/1,e/1+t)}Fd.exports.compress=function(e){try{let i=Qn.__wbindgen_add_to_stack_pointer(-16),s=Upe(e,Qn.__wbindgen_malloc),o=HD;Qn.compress(i,s,o);var t=Ld()[i/4+0],r=Ld()[i/4+1],n=Hpe(t,r).slice();return Qn.__wbindgen_free(t,r*1),n}finally{Qn.__wbindgen_add_to_stack_pointer(16)}};function Kxt(e){return tu[e]}function Xxt(e){e<36||(tu[e]=N0,N0=e)}function Yxt(e){let t=Kxt(e);return Xxt(e),t}Fd.exports.decompress=function(e){try{let o=Qn.__wbindgen_add_to_stack_pointer(-16),a=Upe(e,Qn.__wbindgen_malloc),u=HD;Qn.decompress(o,a,u);var t=Ld()[o/4+0],r=Ld()[o/4+1],n=Ld()[o/4+2],i=Ld()[o/4+3];if(i)throw Yxt(n);var s=Hpe(t,r).slice();return Qn.__wbindgen_free(t,r*1),s}finally{Qn.__wbindgen_add_to_stack_pointer(16)}};Fd.exports.__wbindgen_string_new=function(e,t){let r=Gxt(e,t);return Vxt(r)};var Jxt=require("path").join(__dirname,"lz4_wasm_nodejs_bg.wasm"),Zxt=require("fs").readFileSync(Jxt),Qxt=new WebAssembly.Module(Zxt),eyt=new WebAssembly.Instance(Qxt,Bpe);Qn=eyt.exports;Fd.exports.__wasm=Qn});var iS,Md,$pe,zD,tyt,is,Wpe,$D=se(()=>{"use strict";iS=require("fs"),Md=require("path");qie();$pe=ve(ule());Js();Dpe();Mpe();Sr();zD=ve(zpe()),tyt=6e4,is=class{fs;org;service;instance;user;src;changesUploadUrl;deployTokenExpiration;deployToken;builderFunctionName;builderLambda;credentials;env;sandboxMode=!1;manifest;workspaceRoot;fullSync;verbose;cli;constructor(t){this.fs=t.fs,this.org=t.org,this.service=t.service,this.instance=t.instance,this.user=t.user,this.sandboxMode=t.sandboxMode||!1,this.fullSync=t.fullSync??!1,this.src=this.fs.serviceRoot,this.manifest={files:{},links:{},projectDirectory:"."},this.changesUploadUrl=null,this.workspaceRoot=this.fs.serviceRoot,this.cli=t.cli,this.verbose=t.verbose??!1}timerMs(){let t=process.hrtime.bigint();return function(){let r=process.hrtime.bigint();return parseFloat((Number(r-t)/1e6).toFixed(2))}}async getUrlsAndMap(){if(this.deployTokenExpiration-Date.now()>tyt)return;let n={method:"GET",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/code`,params:{instanceType:this.instance.instanceType,region:this.instance.region,sandbox:this.sandboxMode}},{deployToken:i,deployTokenExpiration:s,builderFunctionName:o,manifest:a,credentials:u,systemWsUrl:c,instanceUrl:f,changesUploadUrl:p,env:d={}}=await ze(n);this.deployToken=i,this.deployTokenExpiration=s,this.instance.url=f,this.instance.systemWsUrl=c,this.changesUploadUrl=p,this.credentials=u,this.env=d,this.builderFunctionName=o,this.builderLambda=new $pe.default({credentials:u}),a&&!this.fullSync&&(this.manifest=Fpe(zD.default,a))}async syncRuntimeSettings(){if(!this.instance||!this.fs.serviceFile)return;await Promise.all([this.fs.readServiceFileIfExists(),this.instance.get()]);let t={runtimeName:this.instance.runtimeName,runtimeChannel:this.instance.runtimeChannel,runtimeUpdates:this.instance.runtimeUpdates,runtimeVersion:this.instance.runtimeVersion},r={runtimeName:this.fs.serviceFile.ampt.runtime||t.runtimeName,runtimeChannel:this.fs.serviceFile.ampt.runtimeChannel||t.runtimeChannel,runtimeUpdates:this.fs.serviceFile.ampt.runtimeUpdates||t.runtimeUpdates,runtimeVersion:this.fs.serviceFile.ampt.runtimeVersion||t.runtimeVersion};r.runtimeName===t.runtimeName&&r.runtimeChannel===t.runtimeChannel&&r.runtimeUpdates===t.runtimeUpdates&&r.runtimeVersion===t.runtimeVersion||(Ce.info({runtimeConfig:r,instanceRuntime:t},"updating instance runtime config"),await this.instance.update(r),this.instance.runtimeName=r.runtimeName,this.instance.runtimeChannel=r.runtimeChannel,this.instance.runtimeUpdates=r.runtimeUpdates,this.instance.runtimeVersion=r.runtimeVersion)}shouldSyncAll(t){let r=!0;return t&&(r=!1,t.forEach(n=>{(n.includes("package-lock.json")||n.includes("package.json")||n.includes("node_modules"))&&(r=!0)})),r}async sync(t,r){var n,i,s,o;try{let{verbose:a,cli:u}=this,c=this.timerMs(),f=this.timerMs();await this.getUrlsAndMap();let p=f(),d=this.fullSync||this.shouldSyncAll(t),m=this.fullSync?{}:this.manifest.files,v=d?{}:this.manifest.files,_=d?{}:this.manifest.links,b={},y=[];r==null||r("analyzing files");let T=0,S=d;if(d){let U=await kpe(this.src);this.workspaceRoot=U.workspace.workspaceDir,this.manifest.projectDirectory=(0,Md.relative)(this.workspaceRoot,this.src);for(let[ee,Q]of Object.entries(U.entries))this.fs.excludes(ee)||(Q.type==="f"?(T+=Q.size,y.push(ee),b[ee]=Q.mode):Q.type==="l"&&(_[ee]=Q.target));this.verbose&&(T>50*1e3*1e3?this.cli.logWarning(`Workspace size: ${T/1e3/1e3} MB`):this.cli.logInfo(`Workspace size: ${T/1e3/1e3} MB`))}else t&&t.forEach(U=>{let ee=(0,Md.join)(this.workspaceRoot,U);if(this.fs.excludes(U))return;U==="package.json"&&(S=!0);let Q=(0,iS.statSync)(ee,{throwIfNoEntry:!1});if(Q){if(Q.isFile())b[U]=Q.mode,y.push(U);else if(Q.isSymbolicLink()){let pe=(0,iS.readlinkSync)(ee),ge=(0,Md.relative)(this.workspaceRoot,(0,Md.join)(U,pe));_[U]=ge}}else delete v[U],delete _[U]});S&&this.syncRuntimeSettings().catch(U=>{u.logError(`Failed to update runtime settings: ${U.message}`)});let E=this.timerMs(),C=this.fs.hash(y,this.workspaceRoot,()=>{let U=E();a&&u.logInfo(`Hashed ${y.length} files in ${U} ms`)});r==null||r("archiving");let q=await(await mc.from(async function*(){for await(let U of C){let ee=[];for(let Q of U){let{normalizedPath:pe,data:ge,hash:we}=Q;if(ge){let We=b[pe],et=m[pe];!et||et.hash!==we||et.mode!==We?(a&&!d&&u.logInfo(`Syncing ${pe} (${Buffer.byteLength(ge)/1024} KB)`),ee.push({name:pe,hash:we,mode:We,data:ge})):a&&!d&&u.logInfo(`Skipping ${pe} (unchanged)`),v[pe]={hash:we,mode:We}}else delete v[pe],delete _[pe]}yield ee}}())).toBuffer(),B=q.length,M,R=0;if(this.manifest.files=v,this.manifest.links=_,this.fullSync=!1,r==null||r(`uploading ${y.length} files`),B>100*1024){let U=this.timerMs();await ze({method:"PUT",url:this.changesUploadUrl,body:q,headers:{"content-length":q.length,"content-type":"application/octet-stream"},onUploadProgress:ee=>{ee.progress===1?r==null||r("finishing upload"):r==null||r(`uploading ${Math.floor(ee.loaded/ee.total*100)}%`)}}),R=U(),a&&u.logInfo(`Uploaded ${B/1024} KB of changes in ${R} ms`)}else M=q.toString("base64");let D=this.timerMs(),N={method:"POST",body:{deployToken:this.deployToken,manifest:Lpe(zD.default,this.manifest),inlineChanges:M},endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/code`};r==null||r("processing");let Y=await ze(N),oe=D();a&&u.logInfo(`Code.sync API took ${oe} ms`);let H=c();return a&&u.logInfo(`Sync took ${H} ms`),this.manifest.sourceEtag=Y.sourceEtag,this.manifest.modulesEtag=Y.modulesEtag,{getUrlsTimeMs:p,uploadTimeMs:R,processChangesTimeMs:oe,syncTimeMs:H,...Y}}catch(a){if(a.message&&a.message.includes("Missing"))return this.user&&rr({eventName:"ampt.dev.failed",eventData:{serviceName:(n=this.service)==null?void 0:n.serviceName,instanceName:(i=this.instance)==null?void 0:i.instanceName,appName:`${(s=this.org)==null?void 0:s.orgName}:${(o=this.service)==null?void 0:o.serviceName}`}}),delete this.deployTokenExpiration,await this.getUrlsAndMap(),this.manifest={files:{},links:{},projectDirectory:this.src},await this.sync();throw a}}},Wpe=is});var Sc,Gpe=se(()=>{"use strict";Sr();Sc=class{fs;org;service;instance;constructor(t={}){this.fs=t.fs,this.org=t.org,this.service=t.service,this.instance=t.instance}async export(){let{dataFileName:t}=this.fs,r={method:"GET",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/data`,params:{dataFileName:t}},n=await ze(r);await this.fs.writeDataFile(n)}async import(t){let{dataFileName:r}=this.fs,n=await this.fs.readDataFileIfExists(),i={method:"PUT",endpoint:`/orgs/${this.org.orgName}/services/${this.service.serviceName}/instances/${this.instance.instanceName}/data`,body:{items:n,overwrite:t},params:{dataFileName:r}};try{await ze(i)}catch(s){throw s.message==="Invalid key"?new Error("Your data file is missing fields. Please check the JSON file and try again."):s}}}});var Qpe=g((nir,Zpe)=>{var Bd=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Vpe=require("path"),ryt=Bd?";":":",Kpe=CO(),Xpe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Ype=(e,t)=>{let r=t.colon||ryt,n=e.match(/\//)||Bd&&e.match(/\\/)?[""]:[...Bd?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=Bd?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Bd?i.split(r):[""];return Bd&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Jpe=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:s}=Ype(e,t),o=[],a=c=>new Promise((f,p)=>{if(c===n.length)return t.all&&o.length?f(o):p(Xpe(e));let d=n[c],m=/^".*"$/.test(d)?d.slice(1,-1):d,v=Vpe.join(m,e),_=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+v:v;f(u(_,c,0))}),u=(c,f,p)=>new Promise((d,m)=>{if(p===i.length)return d(a(f+1));let v=i[p];Kpe(c+v,{pathExt:s},(_,b)=>{if(!_&&b)if(t.all)o.push(c+v);else return d(c+v);return d(u(c,f,p+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},nyt=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Ype(e,t),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=Vpe.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let p=0;p<n.length;p++){let d=f+n[p];try{if(Kpe.sync(d,{pathExt:i}))if(t.all)s.push(d);else return d}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Xpe(e)};Zpe.exports=Jpe;Jpe.sync=nyt});var sde=g((iir,ide)=>{"use strict";var nde=require("child_process"),ede=nde.spawn,iyt=nde.exec;ide.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":iyt("taskkill /pid "+e+" /T /F",r);break;case"darwin":WD(e,n,i,function(s){return ede("pgrep",["-P",s])},function(){tde(n,t,r)});break;default:WD(e,n,i,function(s){return ede("ps",["-o","pid","--no-headers","--ppid",s])},function(){tde(n,t,r)});break}};function tde(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(rde(s,t),n[s]=1)}),n[i]||(rde(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function rde(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function WD(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(c){var c=c.toString("ascii");o+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,WD(c,t,r,n,i)})};s.on("close",a)}});var ade=g((sir,GD)=>{"use strict";var syt=Object.prototype.hasOwnProperty,gi="~";function q0(){}Object.create&&(q0.prototype=Object.create(null),new q0().__proto__||(gi=!1));function oyt(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function ode(e,t,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new oyt(r,n||e,i),o=gi?gi+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],s]:e._events[o].push(s):(e._events[o]=s,e._eventsCount++),e}function sS(e,t){--e._eventsCount===0?e._events=new q0:delete e._events[t]}function ei(){this._events=new q0,this._eventsCount=0}ei.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)syt.call(r,n)&&t.push(gi?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};ei.prototype.listeners=function(t){var r=gi?gi+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};ei.prototype.listenerCount=function(t){var r=gi?gi+t:t,n=this._events[r];return n?n.fn?1:n.length:0};ei.prototype.emit=function(t,r,n,i,s,o){var a=gi?gi+t:t;if(!this._events[a])return!1;var u=this._events[a],c=arguments.length,f,p;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,i),!0;case 5:return u.fn.call(u.context,r,n,i,s),!0;case 6:return u.fn.call(u.context,r,n,i,s,o),!0}for(p=1,f=new Array(c-1);p<c;p++)f[p-1]=arguments[p];u.fn.apply(u.context,f)}else{var d=u.length,m;for(p=0;p<d;p++)switch(u[p].once&&this.removeListener(t,u[p].fn,void 0,!0),c){case 1:u[p].fn.call(u[p].context);break;case 2:u[p].fn.call(u[p].context,r);break;case 3:u[p].fn.call(u[p].context,r,n);break;case 4:u[p].fn.call(u[p].context,r,n,i);break;default:if(!f)for(m=1,f=new Array(c-1);m<c;m++)f[m-1]=arguments[m];u[p].fn.apply(u[p].context,f)}}return!0};ei.prototype.on=function(t,r,n){return ode(this,t,r,n,!1)};ei.prototype.once=function(t,r,n){return ode(this,t,r,n,!0)};ei.prototype.removeListener=function(t,r,n,i){var s=gi?gi+t:t;if(!this._events[s])return this;if(!r)return sS(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&sS(this,s);else{for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&u.push(o[a]);u.length?this._events[s]=u.length===1?u[0]:u:sS(this,s)}return this};ei.prototype.removeAllListeners=function(t){var r;return t?(r=gi?gi+t:t,this._events[r]&&sS(this,r)):(this._events=new q0,this._eventsCount=0),this};ei.prototype.off=ei.prototype.removeListener;ei.prototype.addListener=ei.prototype.on;ei.prefixed=gi;ei.EventEmitter=ei;typeof GD<"u"&&(GD.exports=ei)});var cde=g((oir,ude)=>{"use strict";ude.exports=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}});var oS=g(fde=>{var ru=fde,ayt=require("url"),lde=require("util")._extend,uyt=cde(),cyt=/(^|,)\s*upgrade\s*($|,)/i,VD=/^https|wss/;ru.isSSL=VD;ru.setupOutgoing=function(e,t,r,n){e.port=t[n||"target"].port||(VD.test(t[n||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){e[a]=t[n||"target"][a]}),e.method=t.method||r.method,e.headers=lde({},r.headers),t.headers&&lde(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),VD.test(t[n||"target"].protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!cyt.test(e.headers.connection))&&(e.headers.connection="close"));var i=t[n||"target"],s=i&&t.prependPath!==!1&&i.path||"",o=t.toProxy?r.url:ayt.parse(r.url).path||"";return o=t.ignorePath?"":o,e.path=ru.urlJoin(s,o),t.changeOrigin&&(e.headers.host=uyt(e.port,t[n||"target"].protocol)&&!lyt(e.host)?e.host+":"+e.port:e.host),e};ru.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};ru.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:ru.hasEncryptedConnection(e)?"443":"80"};ru.hasEncryptedConnection=function(e){return!!(e.connection.encrypted||e.connection.pair)};ru.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],n=r.split("?"),i;return e[t]=n.shift(),i=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,n),i.join("?")};ru.rewriteCookieProperty=function e(t,r,n){return Array.isArray(t)?t.map(function(i){return e(i,r,n)}):t.replace(new RegExp("(;\\s*"+n+"=)([^;]+)","i"),function(i,s,o){var a;if(o in r)a=r[o];else if("*"in r)a=r["*"];else return i;return a?s+a:""})};function lyt(e){return!!~e.indexOf(":")}});var mde=g((uir,hde)=>{var pde=require("url"),dde=oS(),fyt=/^201|30(1|2|7|8)$/;hde.exports={removeChunked:function(t,r,n){t.httpVersion==="1.0"&&delete n.headers["transfer-encoding"]},setConnection:function(t,r,n){t.httpVersion==="1.0"?n.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!n.headers.connection&&(n.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,n,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&n.headers.location&&fyt.test(n.statusCode)){var s=pde.parse(i.target),o=pde.parse(n.headers.location);if(s.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=t.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),n.headers.location=o.format()}},writeHeaders:function(t,r,n,i){var s=i.cookieDomainRewrite,o=i.cookiePathRewrite,a=i.preserveHeaderKeyCase,u,c=function(d,m){m!=null&&(s&&d.toLowerCase()==="set-cookie"&&(m=dde.rewriteCookieProperty(m,s,"domain")),o&&d.toLowerCase()==="set-cookie"&&(m=dde.rewriteCookieProperty(m,o,"path")),r.setHeader(String(d).trim(),m))};if(typeof s=="string"&&(s={"*":s}),typeof o=="string"&&(o={"*":o}),a&&n.rawHeaders!=null){u={};for(var f=0;f<n.rawHeaders.length;f+=2){var p=n.rawHeaders[f];u[p.toLowerCase()]=p}}Object.keys(n.headers).forEach(function(d){var m=n.headers[d];a&&u&&(d=u[d]||d),c(d,m)})},writeStatusCode:function(t,r,n){n.statusMessage?(r.statusCode=n.statusCode,r.statusMessage=n.statusMessage):r.statusCode=n.statusCode}}});var vde=g((cir,gde)=>{var pyt=require("http"),dyt=require("https"),P0=mde(),aS=oS(),hyt=FR();P0=Object.keys(P0).map(function(e){return P0[e]});var myt={http:pyt,https:dyt};gde.exports={deleteLength:function(t,r,n){(t.method==="DELETE"||t.method==="OPTIONS")&&!t.headers["content-length"]&&(t.headers["content-length"]="0",delete t.headers["transfer-encoding"])},timeout:function(t,r,n){n.timeout&&t.socket.setTimeout(n.timeout)},XHeaders:function(t,r,n){if(n.xfwd){var i=t.isSpdy||aS.hasEncryptedConnection(t),s={for:t.connection.remoteAddress||t.socket.remoteAddress,port:aS.getPort(t),proto:i?"https":"http"};["for","port","proto"].forEach(function(o){t.headers["x-forwarded-"+o]=(t.headers["x-forwarded-"+o]||"")+(t.headers["x-forwarded-"+o]?",":"")+s[o]}),t.headers["x-forwarded-host"]=t.headers["x-forwarded-host"]||t.headers.host||""}},stream:function(t,r,n,i,s,o){s.emit("start",t,r,n.target||n.forward);var a=n.followRedirects?hyt:myt,u=a.http,c=a.https;if(n.forward){var f=(n.forward.protocol==="https:"?c:u).request(aS.setupOutgoing(n.ssl||{},n,t,"forward")),p=v(f,n.forward);if(t.on("error",p),f.on("error",p),(n.buffer||t).pipe(f),!n.target)return r.end()}var d=(n.target.protocol==="https:"?c:u).request(aS.setupOutgoing(n.ssl||{},n,t));d.on("socket",function(_){s&&!d.getHeader("expect")&&s.emit("proxyReq",d,t,r,n)}),n.proxyTimeout&&d.setTimeout(n.proxyTimeout,function(){d.abort()}),t.on("aborted",function(){d.abort()});var m=v(d,n.target);t.on("error",m),d.on("error",m);function v(_,b){return function(T){if(t.socket.destroyed&&T.code==="ECONNRESET")return s.emit("econnreset",T,t,r,b),_.abort();o?o(T,t,r,b):s.emit("error",T,t,r,b)}}(n.buffer||t).pipe(d),d.on("response",function(_){if(s&&s.emit("proxyRes",_,t,r),!r.headersSent&&!n.selfHandleResponse)for(var b=0;b<P0.length&&!P0[b](t,r,_,n);b++);r.finished?s&&s.emit("end",t,r,_):(_.on("end",function(){s&&s.emit("end",t,r,_)}),n.selfHandleResponse||_.pipe(r))})}}});var yde=g((lir,xde)=>{var gyt=require("http"),vyt=require("https"),jd=oS();xde.exports={checkMethodAndHeader:function(t,r){if(t.method!=="GET"||!t.headers.upgrade||t.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),!0},XHeaders:function(t,r,n){if(n.xfwd){var i={for:t.connection.remoteAddress||t.socket.remoteAddress,port:jd.getPort(t),proto:jd.hasEncryptedConnection(t)?"wss":"ws"};["for","port","proto"].forEach(function(s){t.headers["x-forwarded-"+s]=(t.headers["x-forwarded-"+s]||"")+(t.headers["x-forwarded-"+s]?",":"")+i[s]})}},stream:function(t,r,n,i,s,o){var a=function(f,p){return Object.keys(p).reduce(function(d,m){var v=p[m];if(!Array.isArray(v))return d.push(m+": "+v),d;for(var _=0;_<v.length;_++)d.push(m+": "+v[_]);return d},[f]).join(`\r
|
|
221
221
|
`)+`\r
|
|
222
222
|
\r
|
|
223
223
|
`};jd.setupSocket(r),i&&i.length&&r.unshift(i);var u=(jd.isSSL.test(n.target.protocol)?vyt:gyt).request(jd.setupOutgoing(n.ssl||{},n,t));return s&&s.emit("proxyReqWs",u,t,r,n,i),u.on("error",c),u.on("response",function(f){f.upgrade||(r.write(a("HTTP/"+f.httpVersion+" "+f.statusCode+" "+f.statusMessage,f.headers)),f.pipe(r))}),u.on("upgrade",function(f,p,d){p.on("error",c),p.on("end",function(){s.emit("close",f,p,d)}),r.on("error",function(){p.end()}),jd.setupSocket(p),d&&d.length&&p.unshift(d),r.write(a("HTTP/1.1 101 Switching Protocols",f.headers)),p.pipe(r).pipe(p),s.emit("open",p),s.emit("proxySocket",p)}),u.end();function c(f){o?o(f,t,r):s.emit("error",f,t,r),r.end()}}}});var Tde=g((fir,Cde)=>{var Ede=Cde.exports,_de=require("util")._extend,xyt=require("url").parse,Sde=ade(),yyt=require("http"),_yt=require("https"),bde=vde(),wde=yde();Ede.Server=ef;function KD(e){return function(t){return function(r,n){var i=e==="ws"?this.wsPasses:this.webPasses,s=[].slice.call(arguments),o=s.length-1,a,u;typeof s[o]=="function"&&(u=s[o],o--);var c=t;if(!(s[o]instanceof Buffer)&&s[o]!==n&&(c=_de({},t),_de(c,s[o]),o--),s[o]instanceof Buffer&&(a=s[o]),["target","forward"].forEach(function(p){typeof c[p]=="string"&&(c[p]=xyt(c[p]))}),!c.target&&!c.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var f=0;f<i.length&&!i[f](r,n,c,a,this,u);f++);}}}Ede.createRightProxy=KD;function ef(e){Sde.call(this),e=e||{},e.prependPath=e.prependPath!==!1,this.web=this.proxyRequest=KD("web")(e),this.ws=this.proxyWebsocketRequest=KD("ws")(e),this.options=e,this.webPasses=Object.keys(bde).map(function(t){return bde[t]}),this.wsPasses=Object.keys(wde).map(function(t){return wde[t]}),this.on("error",this.onError,this)}require("util").inherits(ef,Sde);ef.prototype.onError=function(e){if(this.listeners("error").length===1)throw e};ef.prototype.listen=function(e,t){var r=this,n=function(i,s){r.web(i,s)};return this._server=this.options.ssl?_yt.createServer(this.options.ssl,n):yyt.createServer(n),this.options.ws&&this._server.on("upgrade",function(i,s,o){r.ws(i,s,o)}),this._server.listen(e,t),this};ef.prototype.close=function(e){var t=this;this._server&&this._server.close(r);function r(){t._server=null,e&&e.apply(null,arguments)}};ef.prototype.before=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var n=e==="ws"?this.wsPasses:this.webPasses,i=!1;if(n.forEach(function(s,o){s.name===t&&(i=o)}),i===!1)throw new Error("No such pass");n.splice(i,0,r)};ef.prototype.after=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var n=e==="ws"?this.wsPasses:this.webPasses,i=!1;if(n.forEach(function(s,o){s.name===t&&(i=o)}),i===!1)throw new Error("No such pass");n.splice(i++,0,r)}});var Ode=g((pir,Ade)=>{var k0=Tde().Server;function XD(e){return new k0(e)}k0.createProxyServer=XD;k0.createServer=XD;k0.createProxy=XD;Ade.exports=k0});var Rde=g((dir,Ide)=>{Ide.exports=Ode()});function kde(e){let t=Pde.default.createProxyServer({});return Nde.default.createServer((r,n)=>{t.web(r,n,{changeOrigin:!0,target:e,autoRewrite:!0,agent:qde.globalAgent})})}var Nde,qde,Pde,Dde=se(()=>{"use strict";Nde=ve(require("http")),qde=require("https"),Pde=ve(Rde())});var Fde=g((mir,YD)=>{"use strict";var byt=require("net"),cS=class extends Error{constructor(t){super(`${t} is locked`)}},Ud={old:new Set,young:new Set},wyt=1e3*15,uS,Lde=e=>new Promise((t,r)=>{let n=byt.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:i}=n.address();n.close(()=>{t(i)})})}),Eyt=function*(e){e&&(yield*e),yield 0};YD.exports=async e=>{let t;e&&(t=typeof e.port=="number"?[e.port]:e.port),uS===void 0&&(uS=setInterval(()=>{Ud.old=Ud.young,Ud.young=new Set},wyt),uS.unref&&uS.unref());for(let r of Eyt(t))try{let n=await Lde({...e,port:r});for(;Ud.old.has(n)||Ud.young.has(n);){if(r!==0)throw new cS(r);n=await Lde({...e,port:r})}return Ud.young.add(n),n}catch(n){if(!["EADDRINUSE","EACCES"].includes(n.code)&&!(n instanceof cS))throw n}throw new Error("No available ports found")};YD.exports.makeRange=(e,t)=>{if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<1024||e>65535)throw new RangeError("`from` must be between 1024 and 65535");if(t<1024||t>65536)throw new RangeError("`to` must be between 1024 and 65536");if(t<e)throw new RangeError("`to` must be greater than or equal to `from`");return function*(n,i){for(let s=n;s<=i;s++)yield s}(e,t)}});var jde,Ude,Hd,Hde,go,zde,JD,Mde,Bde,Syt,D0,vi,$de=se(()=>{"use strict";jde=require("child_process"),Ude=ve(require("os")),Hd=ve(require("path")),Hde=ve(Qpe()),go=ve(Vp()),zde=ve(sde());Dde();Js();zP();BP();JD=ve(Fde()),Bde=!1,Syt=process.env.AMPT_SANDBOX_CREDENTIALS_PROCESS||"ampt sandbox",D0=(e,t)=>Hd.default.join(Ude.default.homedir(),".serverless",`cloud_dev_server_${e}_${t}.json`),vi=class{static async start(t){var b,y,T,S,E;let r=await(0,Hde.default)("npm");t&&(Mde=t);let{env:n,url:i,cli:s,fs:o,scriptName:a,ifPresent:u,orgName:c,serviceName:f,region:p}=Mde,d=s.options.port||process.env.AMPT_PORT||await(0,JD.default)({port:JD.default.makeRange(9e3,9100)});if(a==="dev"){let C=await this.isRunning({orgName:c,serviceName:f});if(C)return s.logError(`The dev server for this app is already running at port ${C.port} with a PID of ${C.pid}. Run the "stop" command to stop it.`),1}if(a==="dev"?s.devServerOn():s.pause(),(b=o.serviceFile)!=null&&b.scripts&&((y=o.serviceFile)!=null&&y.scripts["cloud:dev"]||(T=o.serviceFile)!=null&&T.scripts["ampt:dev"])){let C=((S=o.serviceFile)==null?void 0:S.scripts["ampt:dev"])||((E=o.serviceFile)==null?void 0:E.scripts["cloud:dev"]),q=["astro","eleventy","next","react","svelte","vue"].find(B=>C.includes(B));MP({eventName:"ampt.devserver.started",eventData:{appName:`${c}:${f}`,orgName:c,serviceName:f,scriptName:a,frameworkName:q}})}await kde(i).listen(d);let v=parseFloat(process.version.slice(1)),_=["EMBEDDED_METRICS_ENABLED","DISABLED_STORAGE_WRITE","DISABLED_DATA_WRITE","TELEMETRY_METRICS_ENABLED"];return(0,go.writeFileSync)(Hd.default.join(".ampt","aws-config"),`[profile ampt-sandbox]
|
|
@@ -225,12 +225,12 @@ credential_process=\${AMPT_SANDBOX_CREDENTIALS_PROCESS}
|
|
|
225
225
|
`),new Promise(C=>{var Y,oe;let I=Hd.default.join(__dirname,"ttyStub.js"),q=Hd.default.join(__dirname,"webapi-polyfill.js"),B=`-r ${I}`;v<18&&(B+=` -r ${q}`);let M=Object.entries(n).reduce((H,[U,ee])=>_.includes(U)?H:U.includes("SERVICE")?{...H,[U]:ee,[U.replace("SERVICE","APP")]:ee}:U.includes("INSTANCE")?{...H,[U]:ee,[U.replace("INSTANCE","ENVIRONMENT")]:ee}:{...H,[U]:ee},{}),R={...process.env,...M,AMPT_URL:i,AMPT_PORT:d,AMPT_LOG_LEVEL:process.env.AMPT_LOG_LEVEL||M.AMPT_LOG_LEVEL||"info",AWS_REGION:p,AWS_PROFILE:"ampt-sandbox",AWS_CONFIG_FILE:Hd.default.join(".ampt","aws-config"),AMPT_SANDBOX_CREDENTIALS_PROCESS:Syt,TTY_STUB_COLS:process.stdout.columns,TTY_STUB_ROWS:process.stdout.rows,TTY_STUB_COLORS:process.stdout.getColorDepth?process.stdout.getColorDepth():0,NODE_OPTIONS:B},D=["run",`"ampt:${a}"`];u&&D.push("--if-present"),s.args.shift(),s.args.length>0&&(D.push("--"),D.push(...s.args));let N=(0,jde.spawn)(`"${r}"`,D,{stdio:[null,"pipe","pipe"],cwd:process.cwd(),shell:!0,env:R});a==="dev"&&this.writeFile({orgName:c,serviceName:f,content:{pid:N.pid,port:d}}),process.stdout.on("resize",()=>{}),(Y=N.stdout)==null||Y.on("data",H=>{s.write(H)}),(oe=N.stderr)==null||oe.on("data",H=>{s.write(H)}),N.on("exit",H=>{if(a==="dev"&&(0,go.removeSync)(D0(c,f)),Bde){C(0);return}C(H===null?0:H)})})}static async isRunning({orgName:t,serviceName:r}){try{let n=JSON.parse(await(0,go.readFile)(D0(t,r),"utf8"));return nie(n.pid)?n:((0,go.removeSync)(D0(t,r)),!1)}catch{return!1}}static writeFile({orgName:t,serviceName:r,content:n}){let i=D0(t,r);(0,go.ensureFileSync)(i),(0,go.writeFileSync)(i,JSON.stringify(n||{},null,4))}static async stop(t,r){t.devServerOff(),Bde=!!(r!=null&&r.hasQuit);let{orgName:n,serviceName:i}=r,s=await this.isRunning({orgName:n,serviceName:i});s&&(await new Promise(o=>{(0,zde.default)(s.pid,o)}),(0,go.removeSync)(D0(n,i)),MP({eventName:"ampt.devserver.stopped",eventData:{appName:`${n}:${i}`,orgName:n,serviceName:i}}))}}});var ZD=g(Wde=>{Wde.require=function(){if(typeof process=="object"&&process.versions&&process.versions.electron)try{let e=require("original-fs");if(Object.keys(e).length>0)return e}catch{}return require("fs")}});var QD=g((wir,Gde)=>{Gde.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 eL=g((Eir,Vde)=>{Vde.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",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",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: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}});var Jde=g((Sir,Yde)=>{var Cyt=ZD().require(),xi=require("path"),Kde=QD(),Tyt=eL(),Ayt=typeof process=="object"&&process.platform==="win32",Xde=e=>e&&typeof e=="object",tL=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=3988292384^t>>>1:t>>>=1;return t>>>0});function Bn(e){this.sep=xi.sep,this.fs=Cyt,Xde(e)&&Xde(e.fs)&&typeof e.fs.statSync=="function"&&(this.fs=e.fs)}Yde.exports=Bn;Bn.prototype.makeDir=function(e){let t=this;function r(n){let i=n.split(t.sep)[0];n.split(t.sep).forEach(function(s){if(!(!s||s.substr(-1,1)===":")){i+=t.sep+s;var o;try{o=t.fs.statSync(i)}catch{t.fs.mkdirSync(i)}if(o&&o.isFile())throw Tyt.FILE_IN_THE_WAY.replace("%s",i)}})}r(e)};Bn.prototype.writeFileTo=function(e,t,r,n){let i=this;if(i.fs.existsSync(e)){if(!r)return!1;var s=i.fs.statSync(e);if(s.isDirectory())return!1}var o=xi.dirname(e);i.fs.existsSync(o)||i.makeDir(o);var a;try{a=i.fs.openSync(e,"w",438)}catch{i.fs.chmodSync(e,438),a=i.fs.openSync(e,"w",438)}if(a)try{i.fs.writeSync(a,t,0,t.length,0)}finally{i.fs.closeSync(a)}return i.fs.chmodSync(e,n||438),!0};Bn.prototype.writeFileToAsync=function(e,t,r,n,i){typeof n=="function"&&(i=n,n=void 0);let s=this;s.fs.exists(e,function(o){if(o&&!r)return i(!1);s.fs.stat(e,function(a,u){if(o&&u.isDirectory())return i(!1);var c=xi.dirname(e);s.fs.exists(c,function(f){f||s.makeDir(c),s.fs.open(e,"w",438,function(p,d){p?s.fs.chmod(e,438,function(){s.fs.open(e,"w",438,function(m,v){s.fs.write(v,t,0,t.length,0,function(){s.fs.close(v,function(){s.fs.chmod(e,n||438,function(){i(!0)})})})})}):d?s.fs.write(d,t,0,t.length,0,function(){s.fs.close(d,function(){s.fs.chmod(e,n||438,function(){i(!0)})})}):s.fs.chmod(e,n||438,function(){i(!0)})})})})})};Bn.prototype.findFiles=function(e){let t=this;function r(n,i,s){typeof i=="boolean"&&(s=i,i=void 0);let o=[];return t.fs.readdirSync(n).forEach(function(a){var u=xi.join(n,a);t.fs.statSync(u).isDirectory()&&s&&(o=o.concat(r(u,i,s))),(!i||i.test(u))&&o.push(xi.normalize(u)+(t.fs.statSync(u).isDirectory()?t.sep:""))}),o}return r(e,void 0,!0)};Bn.prototype.getAttributes=function(){};Bn.prototype.setAttributes=function(){};Bn.crc32update=function(e,t){return tL[(e^t)&255]^e>>>8};Bn.crc32=function(e){typeof e=="string"&&(e=Buffer.from(e,"utf8")),tL.length||genCRCTable();let t=e.length,r=-1;for(let n=0;n<t;)r=Bn.crc32update(r,e[n++]);return~r>>>0};Bn.methodToString=function(e){switch(e){case Kde.STORED:return"STORED ("+e+")";case Kde.DEFLATED:return"DEFLATED ("+e+")";default:return"UNSUPPORTED ("+e+")"}};Bn.canonical=function(e){if(!e)return"";var t=xi.posix.normalize("/"+e.split("\\").join("/"));return xi.join(".",t)};Bn.sanitize=function(e,t){e=xi.resolve(xi.normalize(e));for(var r=t.split("/"),n=0,i=r.length;n<i;n++){var s=xi.normalize(xi.join(e,r.slice(n,i).join(xi.sep)));if(s.indexOf(e)===0)return s}return xi.normalize(xi.join(e,xi.basename(t)))};Bn.toBuffer=function(t){return Buffer.isBuffer(t)?t:t instanceof Uint8Array?Buffer.from(t):typeof t=="string"?Buffer.from(t,"utf8"):Buffer.alloc(0)};Bn.readBigUInt64LE=function(e,t){var r=Buffer.from(e.slice(t,t+8));return r.swap64(),parseInt(`0x${r.toString("hex")}`)};Bn.isWin=Ayt;Bn.crcTable=tL});var ehe=g((Cir,Qde)=>{var lS=ZD().require(),Zde=require("path");lS.existsSync=lS.existsSync||Zde.existsSync;Qde.exports=function(e){var t=e||"",r=i(),n=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return t&&lS.existsSync(t)?(n=lS.statSync(t),r.directory=n.isDirectory(),r.mtime=n.mtime,r.atime=n.atime,r.executable=(73&n.mode)!==0,r.readonly=(128&n.mode)===0,r.hidden=Zde.basename(t)[0]==="."):console.warn("Invalid path: "+t),{get directory(){return r.directory},get readOnly(){return r.readonly},get hidden(){return r.hidden},get mtime(){return r.mtime},get atime(){return r.atime},get executable(){return r.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:t,isDirectory:r.directory,isReadOnly:r.readonly,isHidden:r.hidden,isExecutable:r.executable,mTime:r.mtime,aTime:r.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var zd=g((Tir,L0)=>{L0.exports=Jde();L0.exports.Constants=QD();L0.exports.Errors=eL();L0.exports.FileAttr=ehe()});var rhe=g((Air,the)=>{var F0=zd(),Te=F0.Constants;the.exports=function(){var e=20,t=10,r=0,n=0,i=0,s=0,o=0,a=0,u=0,c=0,f=0,p=0,d=0,m=0,v=0;e|=F0.isWin?2560:768,r|=Te.FLG_EFS;var _={};function b(y){y=new Date(y),i=(y.getFullYear()-1980&127)<<25|y.getMonth()+1<<21|y.getDate()<<16|y.getHours()<<11|y.getMinutes()<<5|y.getSeconds()>>1}return b(+new Date),{get made(){return e},set made(y){e=y},get version(){return t},set version(y){t=y},get flags(){return r},set flags(y){r=y},get method(){return n},set method(y){switch(y){case Te.STORED:this.version=10;case Te.DEFLATED:default:this.version=20}n=y},get time(){return new Date((i>>25&127)+1980,(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(i&31)<<1)},set time(y){b(y)},get crc(){return s},set crc(y){s=Math.max(0,y)>>>0},get compressedSize(){return o},set compressedSize(y){o=Math.max(0,y)>>>0},get size(){return a},set size(y){a=Math.max(0,y)>>>0},get fileNameLength(){return u},set fileNameLength(y){u=y},get extraLength(){return c},set extraLength(y){c=y},get commentLength(){return f},set commentLength(y){f=y},get diskNumStart(){return p},set diskNumStart(y){p=Math.max(0,y)>>>0},get inAttr(){return d},set inAttr(y){d=Math.max(0,y)>>>0},get attr(){return m},set attr(y){m=Math.max(0,y)>>>0},get fileAttr(){return m?(m>>>0|0)>>16&4095:0},get offset(){return v},set offset(y){v=Math.max(0,y)>>>0},get encripted(){return(r&1)===1},get entryHeaderSize(){return Te.CENHDR+u+c+f},get realDataOffset(){return v+Te.LOCHDR+_.fnameLen+_.extraLen},get dataHeader(){return _},loadDataHeaderFromBinary:function(y){var T=y.slice(v,v+Te.LOCHDR);if(T.readUInt32LE(0)!==Te.LOCSIG)throw new Error(F0.Errors.INVALID_LOC);_={version:T.readUInt16LE(Te.LOCVER),flags:T.readUInt16LE(Te.LOCFLG),method:T.readUInt16LE(Te.LOCHOW),time:T.readUInt32LE(Te.LOCTIM),crc:T.readUInt32LE(Te.LOCCRC),compressedSize:T.readUInt32LE(Te.LOCSIZ),size:T.readUInt32LE(Te.LOCLEN),fnameLen:T.readUInt16LE(Te.LOCNAM),extraLen:T.readUInt16LE(Te.LOCEXT)}},loadFromBinary:function(y){if(y.length!==Te.CENHDR||y.readUInt32LE(0)!==Te.CENSIG)throw new Error(F0.Errors.INVALID_CEN);e=y.readUInt16LE(Te.CENVEM),t=y.readUInt16LE(Te.CENVER),r=y.readUInt16LE(Te.CENFLG),n=y.readUInt16LE(Te.CENHOW),i=y.readUInt32LE(Te.CENTIM),s=y.readUInt32LE(Te.CENCRC),o=y.readUInt32LE(Te.CENSIZ),a=y.readUInt32LE(Te.CENLEN),u=y.readUInt16LE(Te.CENNAM),c=y.readUInt16LE(Te.CENEXT),f=y.readUInt16LE(Te.CENCOM),p=y.readUInt16LE(Te.CENDSK),d=y.readUInt16LE(Te.CENATT),m=y.readUInt32LE(Te.CENATX),v=y.readUInt32LE(Te.CENOFF)},dataHeaderToBinary:function(){var y=Buffer.alloc(Te.LOCHDR);return y.writeUInt32LE(Te.LOCSIG,0),y.writeUInt16LE(t,Te.LOCVER),y.writeUInt16LE(r,Te.LOCFLG),y.writeUInt16LE(n,Te.LOCHOW),y.writeUInt32LE(i,Te.LOCTIM),y.writeUInt32LE(s,Te.LOCCRC),y.writeUInt32LE(o,Te.LOCSIZ),y.writeUInt32LE(a,Te.LOCLEN),y.writeUInt16LE(u,Te.LOCNAM),y.writeUInt16LE(c,Te.LOCEXT),y},entryHeaderToBinary:function(){var y=Buffer.alloc(Te.CENHDR+u+c+f);return y.writeUInt32LE(Te.CENSIG,0),y.writeUInt16LE(e,Te.CENVEM),y.writeUInt16LE(t,Te.CENVER),y.writeUInt16LE(r,Te.CENFLG),y.writeUInt16LE(n,Te.CENHOW),y.writeUInt32LE(i,Te.CENTIM),y.writeUInt32LE(s,Te.CENCRC),y.writeUInt32LE(o,Te.CENSIZ),y.writeUInt32LE(a,Te.CENLEN),y.writeUInt16LE(u,Te.CENNAM),y.writeUInt16LE(c,Te.CENEXT),y.writeUInt16LE(f,Te.CENCOM),y.writeUInt16LE(p,Te.CENDSK),y.writeUInt16LE(d,Te.CENATT),y.writeUInt32LE(m,Te.CENATX),y.writeUInt32LE(v,Te.CENOFF),y.fill(0,Te.CENHDR),y},toJSON:function(){let y=function(T){return T+" bytes"};return{made:e,version:t,flags:r,method:F0.methodToString(n),time:this.time,crc:"0x"+s.toString(16).toUpperCase(),compressedSize:y(o),size:y(a),fileNameLength:y(u),extraLength:y(c),commentLength:y(f),diskNumStart:p,inAttr:d,attr:m,offset:v,entryHeaderSize:y(Te.CENHDR+u+c+f)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var ihe=g((Oir,nhe)=>{var $d=zd(),Cr=$d.Constants;nhe.exports=function(){var e=0,t=0,r=0,n=0,i=0;return{get diskEntries(){return e},set diskEntries(s){e=t=s},get totalEntries(){return t},set totalEntries(s){t=e=s},get size(){return r},set size(s){r=s},get offset(){return n},set offset(s){n=s},get commentLength(){return i},set commentLength(s){i=s},get mainHeaderSize(){return Cr.ENDHDR+i},loadFromBinary:function(s){if((s.length!==Cr.ENDHDR||s.readUInt32LE(0)!==Cr.ENDSIG)&&(s.length<Cr.ZIP64HDR||s.readUInt32LE(0)!==Cr.ZIP64SIG))throw new Error($d.Errors.INVALID_END);s.readUInt32LE(0)===Cr.ENDSIG?(e=s.readUInt16LE(Cr.ENDSUB),t=s.readUInt16LE(Cr.ENDTOT),r=s.readUInt32LE(Cr.ENDSIZ),n=s.readUInt32LE(Cr.ENDOFF),i=s.readUInt16LE(Cr.ENDCOM)):(e=$d.readBigUInt64LE(s,Cr.ZIP64SUB),t=$d.readBigUInt64LE(s,Cr.ZIP64TOT),r=$d.readBigUInt64LE(s,Cr.ZIP64SIZE),n=$d.readBigUInt64LE(s,Cr.ZIP64OFF),i=0)},toBinary:function(){var s=Buffer.alloc(Cr.ENDHDR+i);return s.writeUInt32LE(Cr.ENDSIG,0),s.writeUInt32LE(0,4),s.writeUInt16LE(e,Cr.ENDSUB),s.writeUInt16LE(t,Cr.ENDTOT),s.writeUInt32LE(r,Cr.ENDSIZ),s.writeUInt32LE(n,Cr.ENDOFF),s.writeUInt16LE(i,Cr.ENDCOM),s.fill(" ",Cr.ENDHDR),s},toJSON:function(){let s=function(o,a){let u=o.toString(16).toUpperCase();for(;u.length<a;)u="0"+u;return"0x"+u};return{diskEntries:e,totalEntries:t,size:r+" bytes",offset:s(n,4),commentLength:i}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var nL=g(rL=>{rL.EntryHeader=rhe();rL.MainHeader=ihe()});var ohe=g((Rir,she)=>{she.exports=function(e){var t=require("zlib"),r={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,r)},deflateAsync:function(n){var i=t.createDeflateRaw(r),s=[],o=0;i.on("data",function(a){s.push(a),o+=a.length}),i.on("end",function(){var a=Buffer.alloc(o),u=0;a.fill(0);for(var c=0;c<s.length;c++){var f=s[c];f.copy(a,u),u+=f.length}n&&n(a)}),i.end(e)}}}});var uhe=g((Nir,ahe)=>{ahe.exports=function(e){var t=require("zlib");return{inflate:function(){return t.inflateRawSync(e)},inflateAsync:function(r){var n=t.createInflateRaw(),i=[],s=0;n.on("data",function(o){i.push(o),s+=o.length}),n.on("end",function(){var o=Buffer.alloc(s),a=0;o.fill(0);for(var u=0;u<i.length;u++){var c=i[u];c.copy(o,a),a+=c.length}r&&r(o)}),n.end(e)}}}});var dhe=g((qir,phe)=>{"use strict";var{randomFillSync:che}=require("crypto"),Oyt=new Uint32Array(256).map((e,t)=>{for(let r=0;r<8;r++)t&1?t=t>>>1^3988292384:t>>>=1;return t>>>0}),fhe=(e,t)=>Math.imul(e,t)>>>0,lhe=(e,t)=>Oyt[(e^t)&255]^e>>>8,M0=()=>typeof che=="function"?che(Buffer.alloc(12)):M0.node();M0.node=()=>{let e=Buffer.alloc(12),t=e.length;for(let r=0;r<t;r++)e[r]=Math.random()*256&255;return e};var fS={genSalt:M0};function pS(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let r=0;r<t.length;r++)this.updateKeys(t[r])}pS.prototype.updateKeys=function(e){let t=this.keys;return t[0]=lhe(t[0],e),t[1]+=t[0]&255,t[1]=fhe(t[1],134775813)+1,t[2]=lhe(t[2],t[1]>>>24),e};pS.prototype.next=function(){let e=(this.keys[2]|2)>>>0;return fhe(e,e^1)>>8&255};function Iyt(e){let t=new pS(e);return function(r){let n=Buffer.alloc(r.length),i=0;for(let s of r)n[i++]=t.updateKeys(s^t.next());return n}}function Ryt(e){let t=new pS(e);return function(r,n,i=0){n||(n=Buffer.alloc(r.length));for(let s of r){let o=t.next();n[i++]=s^o,t.updateKeys(s)}return n}}function Nyt(e,t,r){if(!e||!Buffer.isBuffer(e)||e.length<12)return Buffer.alloc(0);let n=Iyt(r);if(n(e.slice(0,12))[11]!==t.crc>>>24)throw"ADM-ZIP: Wrong Password";return n(e.slice(12))}function qyt(e){Buffer.isBuffer(e)&&e.length>=12?fS.genSalt=function(){return e.slice(0,12)}:e==="node"?fS.genSalt=M0.node:fS.genSalt=M0}function Pyt(e,t,r,n=!1){e==null&&(e=Buffer.alloc(0)),Buffer.isBuffer(e)||(e=Buffer.from(e.toString()));let i=Ryt(r),s=fS.genSalt();s[11]=t.crc>>>24&255,n&&(s[10]=t.crc>>>16&255);let o=Buffer.alloc(e.length+12);return i(s,o),i(e,o,12)}phe.exports={decrypt:Nyt,encrypt:Pyt,_salter:qyt}});var hhe=g(dS=>{dS.Deflater=ohe();dS.Inflater=uhe();dS.ZipCrypto=dhe()});var sL=g((kir,mhe)=>{var Xr=zd(),kyt=nL(),ss=Xr.Constants,iL=hhe();mhe.exports=function(e){var t=new kyt.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),i=!1,s=null,o=Buffer.alloc(0);function a(){return!e||!Buffer.isBuffer(e)?Buffer.alloc(0):(t.loadDataHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize))}function u(v){return!((t.flags&8)!==8&&Xr.crc32(v)!==t.dataHeader.crc)}function c(v,_,b){if(typeof _>"u"&&typeof v=="string"&&(b=v,v=void 0),i)return v&&_&&_(Buffer.alloc(0),Xr.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var y=a();if(y.length===0)return v&&_&&_(y),y;if(t.encripted){if(typeof b!="string"&&!Buffer.isBuffer(b))throw new Error("ADM-ZIP: Incompatible password parameter");y=iL.ZipCrypto.decrypt(y,t,b)}var T=Buffer.alloc(t.size);switch(t.method){case Xr.Constants.STORED:if(y.copy(T),u(T))return v&&_&&_(T),T;throw v&&_&&_(T,Xr.Errors.BAD_CRC),new Error(Xr.Errors.BAD_CRC);case Xr.Constants.DEFLATED:var S=new iL.Inflater(y);if(v)S.inflateAsync(function(E){E.copy(E,0),_&&(u(E)?_(E):_(E,Xr.Errors.BAD_CRC))});else{if(S.inflate(T).copy(T,0),!u(T))throw new Error(Xr.Errors.BAD_CRC+" "+r.toString());return T}break;default:throw v&&_&&_(Buffer.alloc(0),Xr.Errors.UNKNOWN_METHOD),new Error(Xr.Errors.UNKNOWN_METHOD)}}function f(v,_){if((!s||!s.length)&&Buffer.isBuffer(e))return v&&_&&_(a()),a();if(s.length&&!i){var b;switch(t.method){case Xr.Constants.STORED:return t.compressedSize=t.size,b=Buffer.alloc(s.length),s.copy(b),v&&_&&_(b),b;default:case Xr.Constants.DEFLATED:var y=new iL.Deflater(s);if(v)y.deflateAsync(function(S){b=Buffer.alloc(S.length),t.compressedSize=S.length,S.copy(b),_&&_(b)});else{var T=y.deflate();return t.compressedSize=T.length,T}y=null;break}}else if(v&&_)_(Buffer.alloc(0));else return Buffer.alloc(0)}function p(v,_){return(v.readUInt32LE(_+4)<<4)+v.readUInt32LE(_)}function d(v){for(var _=0,b,y,T;_<v.length;)b=v.readUInt16LE(_),_+=2,y=v.readUInt16LE(_),_+=2,T=v.slice(_,_+y),_+=y,ss.ID_ZIP64===b&&m(T)}function m(v){var _,b,y,T;v.length>=ss.EF_ZIP64_SCOMP&&(_=p(v,ss.EF_ZIP64_SUNCOMP),t.size===ss.EF_ZIP64_OR_32&&(t.size=_)),v.length>=ss.EF_ZIP64_RHO&&(b=p(v,ss.EF_ZIP64_SCOMP),t.compressedSize===ss.EF_ZIP64_OR_32&&(t.compressedSize=b)),v.length>=ss.EF_ZIP64_DSN&&(y=p(v,ss.EF_ZIP64_RHO),t.offset===ss.EF_ZIP64_OR_32&&(t.offset=y)),v.length>=ss.EF_ZIP64_DSN+4&&(T=v.readUInt32LE(ss.EF_ZIP64_DSN),t.diskNumStart===ss.EF_ZIP64_OR_16&&(t.diskNumStart=T))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(v){r=Xr.toBuffer(v);var _=r[r.length-1];i=_===47||_===92,t.fileNameLength=r.length},get extra(){return o},set extra(v){o=v,t.extraLength=v.length,d(v)},get comment(){return n.toString()},set comment(v){n=Xr.toBuffer(v),t.commentLength=n.length},get name(){var v=r.toString();return i?v.substr(v.length-1).split("/").pop():v.split("/").pop()},get isDirectory(){return i},getCompressedData:function(){return f(!1,null)},getCompressedDataAsync:function(v){f(!0,v)},setData:function(v){s=Xr.toBuffer(v),!i&&s.length?(t.size=s.length,t.method=Xr.Constants.DEFLATED,t.crc=Xr.crc32(v),t.changed=!0):t.method=Xr.Constants.STORED},getData:function(v){return t.changed?s:c(!1,null,v)},getDataAsync:function(v,_){t.changed?v(s):c(!0,v,_)},set attr(v){t.attr=v},get attr(){return t.attr},set header(v){t.loadFromBinary(v)},get header(){return t},packHeader:function(){var v=t.entryHeaderToBinary(),_=Xr.Constants.CENHDR;return r.copy(v,_),_+=r.length,t.extraLength&&(o.copy(v,_),_+=t.extraLength),t.commentLength&&n.copy(v,_),v},toJSON:function(){let v=function(_){return"<"+(_&&_.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:t.toJSON(),compressedData:v(e),data:v(s)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}}});var xhe=g((Dir,vhe)=>{var ghe=sL(),Dyt=nL(),ti=zd();vhe.exports=function(e,t){var r=[],n={},i=Buffer.alloc(0),s=new Dyt.MainHeader,o=!1;let a=Object.assign(Object.create(null),t),{noSort:u}=a;e?p(a.readEntries):o=!0;function c(m){let v=s.diskEntries,_=s.offset;for(let b=0;b<v;b++){let y=_,T=new ghe(e);T.header=e.slice(y,y+=ti.Constants.CENHDR),T.entryName=e.slice(y,y+=T.header.fileNameLength),_+=T.header.entryHeaderSize,m(T)}}function f(){o=!0,n={},r=new Array(s.diskEntries);for(var m=s.offset,v=0;v<r.length;v++){var _=m,b=new ghe(e);b.header=e.slice(_,_+=ti.Constants.CENHDR),b.entryName=e.slice(_,_+=b.header.fileNameLength),b.header.extraLength&&(b.extra=e.slice(_,_+=b.header.extraLength)),b.header.commentLength&&(b.comment=e.slice(_,_+b.header.commentLength)),m+=b.header.entryHeaderSize,r[v]=b,n[b.entryName]=b}}function p(m){var v=e.length-ti.Constants.ENDHDR,_=Math.max(0,v-65535),b=_,y=e.length,T=-1,S=0;for(v;v>=b;v--)if(e[v]===80){if(e.readUInt32LE(v)===ti.Constants.ENDSIG){T=v,S=v,y=v+ti.Constants.ENDHDR,b=v-ti.Constants.END64HDR;continue}if(e.readUInt32LE(v)===ti.Constants.END64SIG){b=_;continue}if(e.readUInt32LE(v)===ti.Constants.ZIP64SIG){T=v,y=v+ti.readBigUInt64LE(e,v+ti.Constants.ZIP64SIZE)+ti.Constants.ZIP64LEAD;break}}if(!~T)throw new Error(ti.Errors.INVALID_FORMAT);s.loadFromBinary(e.slice(T,y)),s.commentLength&&(i=e.slice(S+ti.Constants.ENDHDR)),m&&f()}function d(){r.length>1&&!u&&r.sort((m,v)=>m.entryName.toLowerCase().localeCompare(v.entryName.toLowerCase()))}return{get entries(){return o||f(),r},get comment(){return i.toString()},set comment(m){i=ti.toBuffer(m),s.commentLength=i.length},getEntryCount:function(){return o?r.length:s.diskEntries},forEach:function(m){if(!o){c(m);return}r.forEach(m)},getEntry:function(m){return o||f(),n[m]||null},setEntry:function(m){o||f(),r.push(m),n[m.entryName]=m,s.totalEntries=r.length},deleteEntry:function(m){o||f();var v=n[m];if(v&&v.isDirectory){var _=this;this.getEntryChildren(v).forEach(function(b){b.entryName!==m&&_.deleteEntry(b.entryName)})}r.splice(r.indexOf(v),1),delete n[m],s.totalEntries=r.length},getEntryChildren:function(m){if(o||f(),m&&m.isDirectory){let v=[],_=m.entryName,b=_.length;return r.forEach(function(y){y.entryName.substr(0,b)===_&&v.push(y)}),v}return[]},compressToBuffer:function(){o||f(),d();let m=[],v=[],_=0,b=0;s.size=0,s.offset=0;for(let S of r){let E=S.getCompressedData();S.header.offset=b;let C=S.header.dataHeaderToBinary(),I=S.rawEntryName.length,q=Buffer.alloc(I+S.extra.length);S.rawEntryName.copy(q,0),q.copy(S.extra,I);let B=C.length+q.length+E.length;b+=B,m.push(C),m.push(q),m.push(E);let M=S.packHeader();v.push(M),s.size+=M.length,_+=B+M.length}_+=s.mainHeaderSize,s.offset=b,b=0;let y=Buffer.alloc(_);for(let S of m)S.copy(y,b),b+=S.length;for(let S of v)S.copy(y,b),b+=S.length;let T=s.toBinary();return i&&i.copy(T,ti.Constants.ENDHDR),T.copy(y,b),y},toAsyncBuffer:function(m,v,_,b){try{o||f(),d();let y=[],T=[],S=0,E=0;s.size=0,s.offset=0;let C=function(I){if(I.length){let q=I.pop(),B=q.entryName+q.extra.toString();_&&_(B),q.getCompressedDataAsync(function(M){b&&b(B),q.header.offset=E;let R=q.header.dataHeaderToBinary(),D=Buffer.alloc(B.length,B),N=R.length+D.length+M.length;E+=N,y.push(R),y.push(D),y.push(M);let Y=q.packHeader();T.push(Y),s.size+=Y.length,S+=N+Y.length,C(I)})}else{S+=s.mainHeaderSize,s.offset=E,E=0;let q=Buffer.alloc(S);y.forEach(function(M){M.copy(q,E),E+=M.length}),T.forEach(function(M){M.copy(q,E),E+=M.length});let B=s.toBinary();i&&i.copy(B,ti.Constants.ENDHDR),B.copy(q,E),m(q)}};C(r)}catch(y){v(y)}}}}});var aL=g((Lir,yhe)=>{var _n=zd(),Qo=require("path"),Lyt=sL(),Fyt=xhe(),tf=(e,t)=>typeof e=="boolean"?e:t,oL=(e,t)=>typeof e=="string"?e:t,Myt={noSort:!1,readEntries:!1,method:_n.Constants.NONE,fs:null};yhe.exports=function(e,t){let r=null,n=Object.assign(Object.create(null),Myt);e&&typeof e=="object"&&(e instanceof Uint8Array||(Object.assign(n,e),e=n.input?n.input:void 0,n.input&&delete n.input),Buffer.isBuffer(e)&&(r=e,n.method=_n.Constants.BUFFER,e=void 0)),Object.assign(n,t);let i=new _n(n);if(e&&typeof e=="string")if(i.fs.existsSync(e))n.method=_n.Constants.FILE,n.filename=e,r=i.fs.readFileSync(e);else throw new Error(_n.Errors.INVALID_FILENAME);let s=new Fyt(r,n),{canonical:o,sanitize:a}=_n;function u(f){if(f&&s){var p;if(typeof f=="string"&&(p=s.getEntry(f)),typeof f=="object"&&typeof f.entryName<"u"&&typeof f.header<"u"&&(p=s.getEntry(f.entryName)),p)return p}return null}function c(f){let{join:p,normalize:d,sep:m}=Qo.posix;return p(".",d(m+f.split("\\").join(m)+m))}return{readFile:function(f,p){var d=u(f);return d&&d.getData(p)||null},readFileAsync:function(f,p){var d=u(f);d?d.getDataAsync(p):p(null,"getEntry failed for:"+f)},readAsText:function(f,p){var d=u(f);if(d){var m=d.getData();if(m&&m.length)return m.toString(p||"utf8")}return""},readAsTextAsync:function(f,p,d){var m=u(f);m?m.getDataAsync(function(v,_){if(_){p(v,_);return}v&&v.length?p(v.toString(d||"utf8")):p("")}):p("")},deleteFile:function(f){var p=u(f);p&&s.deleteEntry(p.entryName)},addZipComment:function(f){s.comment=f},getZipComment:function(){return s.comment||""},addZipEntryComment:function(f,p){var d=u(f);d&&(d.comment=p)},getZipEntryComment:function(f){var p=u(f);return p&&p.comment||""},updateFile:function(f,p){var d=u(f);d&&d.setData(p)},addLocalFile:function(f,p,d,m){if(i.fs.existsSync(f)){p=p?c(p):"";var v=f.split("\\").join("/").split("/").pop();p+=d||v;let _=i.fs.statSync(f);this.addFile(p,i.fs.readFileSync(f),m,_)}else throw new Error(_n.Errors.FILE_NOT_FOUND.replace("%s",f))},addLocalFolder:function(f,p,d,m){if(d instanceof RegExp?d=function(v){return function(_){return v.test(_)}}(d):typeof d!="function"&&(d=function(){return!0}),p=p?c(p):"",f=Qo.normalize(f),i.fs.existsSync(f)){let v=i.findFiles(f),_=this;v.length&&v.forEach(function(b){var y=Qo.relative(f,b).split("\\").join("/");if(d(y)){var T=i.fs.statSync(b);T.isFile()?_.addFile(p+y,i.fs.readFileSync(b),"",m||T):_.addFile(p+y+"/",Buffer.alloc(0),"",m||T)}})}else throw new Error(_n.Errors.FILE_NOT_FOUND.replace("%s",f))},addLocalFolderAsync:function(f,p,d,m){m instanceof RegExp?m=function(_){return function(b){return _.test(b)}}(m):typeof m!="function"&&(m=function(){return!0}),d=d?c(d):"",f=Qo.normalize(f);var v=this;i.fs.open(f,"r",function(_){if(_&&_.code==="ENOENT")p(void 0,_n.Errors.FILE_NOT_FOUND.replace("%s",f));else if(_)p(void 0,_);else{var b=i.findFiles(f),y=-1,T=function(){if(y+=1,y<b.length){var S=b[y],E=Qo.relative(f,S).split("\\").join("/");E=E.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),m(E)?i.fs.stat(S,function(C,I){C&&p(void 0,C),I.isFile()?i.fs.readFile(S,function(q,B){q?p(void 0,q):(v.addFile(d+E,B,"",I),T())}):(v.addFile(d+E+"/",Buffer.alloc(0),"",I),T())}):process.nextTick(()=>{T()})}else p(!0,void 0)};T()}})},addLocalFolderPromise:function(f,p){return new Promise((d,m)=>{let{filter:v,zipPath:_}=Object.assign({},p);this.addLocalFolderAsync(f,(b,y)=>{y&&m(y),b&&d(this)},_,v)})},addFile:function(f,p,d,m){let v=u(f),_=v!=null;_||(v=new Lyt,v.entryName=f),v.comment=d||"";let b=typeof m=="object"&&m instanceof i.fs.Stats;b&&(v.header.time=m.mtime);var y=v.isDirectory?16:0;let T=v.isDirectory?16384:32768;b?T|=4095&m.mode:typeof m=="number"?T|=4095&m:T|=v.isDirectory?493:420,y=(y|T<<16)>>>0,v.attr=y,v.setData(p),_||s.setEntry(v)},getEntries:function(){return s?s.entries:[]},getEntry:function(f){return u(f)},getEntryCount:function(){return s.getEntryCount()},forEach:function(f){return s.forEach(f)},extractEntryTo:function(f,p,d,m,v,_){m=tf(m,!1),v=tf(v,!1),d=tf(d,!0),_=oL(_,oL(v,void 0));var b=u(f);if(!b)throw new Error(_n.Errors.NO_ENTRY);var y=o(b.entryName),T=a(p,_&&!b.isDirectory?_:d?y:Qo.basename(y));if(b.isDirectory){var S=s.getEntryChildren(b);return S.forEach(function(I){if(I.isDirectory)return;var q=I.getData();if(!q)throw new Error(_n.Errors.CANT_EXTRACT_FILE);var B=o(I.entryName),M=a(p,d?B:Qo.basename(B));let R=v?I.header.fileAttr:void 0;i.writeFileTo(M,q,m,R)}),!0}var E=b.getData();if(!E)throw new Error(_n.Errors.CANT_EXTRACT_FILE);if(i.fs.existsSync(T)&&!m)throw new Error(_n.Errors.CANT_OVERRIDE);let C=v?f.header.fileAttr:void 0;return i.writeFileTo(T,E,m,C),!0},test:function(f){if(!s)return!1;for(var p in s.entries)try{if(p.isDirectory)continue;var d=s.entries[p].getData(f);if(!d)return!1}catch{return!1}return!0},extractAllTo:function(f,p,d,m){if(p=tf(p,!1),m=oL(d,m),d=tf(d,!1),!s)throw new Error(_n.Errors.NO_ZIP);s.entries.forEach(function(v){var _=a(f,o(v.entryName.toString()));if(v.isDirectory){i.makeDir(_);return}var b=v.getData(m);if(!b)throw new Error(_n.Errors.CANT_EXTRACT_FILE);let y=d?v.header.fileAttr:void 0;i.writeFileTo(_,b,p,y);try{i.fs.utimesSync(_,v.header.time,v.header.time)}catch{throw new Error(_n.Errors.CANT_EXTRACT_FILE)}})},extractAllToAsync:function(f,p,d,m){if(p=tf(p,!1),typeof d=="function"&&!m&&(m=d),d=tf(d,!1),m||(m=function(S){throw new Error(S)}),!s){m(new Error(_n.Errors.NO_ZIP));return}f=Qo.resolve(f);let v=S=>a(f,Qo.normalize(o(S.entryName.toString()))),_=(S,E)=>new Error(S+': "'+E+'"'),b=[],y=new Set;s.entries.forEach(S=>{S.isDirectory?b.push(S):y.add(S)});for(let S of b){let E=v(S),C=d?S.header.fileAttr:void 0;try{i.makeDir(E),C&&i.fs.chmodSync(E,C),i.fs.utimesSync(E,S.header.time,S.header.time)}catch{m(_("Unable to create folder",E))}}let T=()=>{y.size===0&&m()};for(let S of y.values()){let E=Qo.normalize(o(S.entryName.toString())),C=a(f,E);S.getDataAsync(function(I,q){if(q){m(new Error(q));return}if(!I)m(new Error(_n.Errors.CANT_EXTRACT_FILE));else{let B=d?S.header.fileAttr:void 0;i.writeFileToAsync(C,I,p,B,function(M){if(!M){m(_("Unable to write file",C));return}i.fs.utimes(C,S.header.time,S.header.time,function(R){if(R){m(_("Unable to set times",C));return}y.delete(S),T()})})}})}T()},writeZip:function(f,p){if(arguments.length===1&&typeof f=="function"&&(p=f,f=""),!f&&n.filename&&(f=n.filename),!!f){var d=s.compressToBuffer();if(d){var m=i.writeFileTo(f,d,!0);typeof p=="function"&&p(m?null:new Error("failed"),"")}}},writeZipPromise:function(f,p){let{overwrite:d,perm:m}=Object.assign({overwrite:!0},p);return new Promise((v,_)=>{!f&&n.filename&&(f=n.filename),f||_("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(b=>{let y=T=>T?v(T):_("ADM-ZIP: Wasn't able to write zip file");i.writeFileToAsync(f,b,d,m,y)},_)})},toBufferPromise:function(){return new Promise((f,p)=>{s.toAsyncBuffer(f,p)})},toBuffer:function(f,p,d,m){return this.valueOf=2,typeof f=="function"?(s.toAsyncBuffer(f,p,d,m),null):s.compressToBuffer()}}}});var whe=g((uL,bhe)=>{var hS=require("buffer"),ea=hS.Buffer;function _he(e,t){for(var r in e)t[r]=e[r]}ea.from&&ea.alloc&&ea.allocUnsafe&&ea.allocUnsafeSlow?bhe.exports=hS:(_he(hS,uL),uL.Buffer=rf);function rf(e,t,r){return ea(e,t,r)}rf.prototype=Object.create(ea.prototype);_he(ea,rf);rf.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ea(e,t,r)};rf.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=ea(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};rf.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ea(e)};rf.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return hS.SlowBuffer(e)}});var lL=g((Fir,cL)=>{"use strict";cL.exports=Xyt;cL.exports.parse=Qyt;var Ehe=require("path").basename,Byt=whe().Buffer,jyt=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,Uyt=/%[0-9A-Fa-f]{2}/,Hyt=/%([0-9A-Fa-f]{2})/g,Che=/[^\x20-\x7e\xa0-\xff]/g,zyt=/\\([\u0000-\u007f])/g,$yt=/([\\"])/g,She=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,Wyt=/^[\x20-\x7e\x80-\xff]+$/,Gyt=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,Vyt=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,Kyt=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function Xyt(e,t){var r=t||{},n=r.type||"attachment",i=Yyt(e,r.fallback);return Jyt(new Ahe(n,i))}function Yyt(e,t){if(e!==void 0){var r={};if(typeof e!="string")throw new TypeError("filename must be a string");if(t===void 0&&(t=!0),typeof t!="string"&&typeof t!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof t=="string"&&Che.test(t))throw new TypeError("fallback must be ISO-8859-1 string");var n=Ehe(e),i=Wyt.test(n),s=typeof t!="string"?t&&The(n):Ehe(t),o=typeof s=="string"&&s!==n;return(o||!i||Uyt.test(n))&&(r["filename*"]=n),(i||o)&&(r.filename=o?s:n),r}}function Jyt(e){var t=e.parameters,r=e.type;if(!r||typeof r!="string"||!Gyt.test(r))throw new TypeError("invalid type");var n=String(r).toLowerCase();if(t&&typeof t=="object")for(var i,s=Object.keys(t).sort(),o=0;o<s.length;o++){i=s[o];var a=i.substr(-1)==="*"?n_t(t[i]):r_t(t[i]);n+="; "+i+"="+a}return n}function Zyt(e){var t=Vyt.exec(e);if(!t)throw new TypeError("invalid extended field value");var r=t[1].toLowerCase(),n=t[2],i,s=n.replace(Hyt,e_t);switch(r){case"iso-8859-1":i=The(s);break;case"utf-8":i=Byt.from(s,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return i}function The(e){return String(e).replace(Che,"?")}function Qyt(e){if(!e||typeof e!="string")throw new TypeError("argument string is required");var t=Kyt.exec(e);if(!t)throw new TypeError("invalid type format");var r=t[0].length,n=t[1].toLowerCase(),i,s=[],o={},a;for(r=She.lastIndex=t[0].substr(-1)===";"?r-1:r;t=She.exec(e);){if(t.index!==r)throw new TypeError("invalid parameter format");if(r+=t[0].length,i=t[1].toLowerCase(),a=t[2],s.indexOf(i)!==-1)throw new TypeError("invalid duplicate parameter");if(s.push(i),i.indexOf("*")+1===i.length){i=i.slice(0,-1),a=Zyt(a),o[i]=a;continue}typeof o[i]!="string"&&(a[0]==='"'&&(a=a.substr(1,a.length-2).replace(zyt,"$1")),o[i]=a)}if(r!==-1&&r!==e.length)throw new TypeError("invalid parameter format");return new Ahe(n,o)}function e_t(e,t){return String.fromCharCode(parseInt(t,16))}function t_t(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function r_t(e){var t=String(e);return'"'+t.replace($yt,"\\$1")+'"'}function n_t(e){var t=String(e),r=encodeURIComponent(t).replace(jyt,t_t);return"UTF-8''"+r}function Ahe(e,t){this.type=e,this.parameters=t}});var Ihe=g((Mir,Ohe)=>{"use strict";Ohe.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i>=0){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"application/font-woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"application/font-woff"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"application/font-sfnt"}:r([79,84,84,79,0])?{ext:"otf",mime:"application/font-sfnt"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:null}});var fL=g((Bir,Rhe)=>{"use strict";var i_t=Ihe(),s_t=new Set(["7z","bz2","gz","rar","tar","zip","xz","gz"]);Rhe.exports=e=>{let t=i_t(e);return s_t.has(t&&t.ext)?t:null}});var qhe=g((jir,Nhe)=>{"use strict";Nhe.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i>=0){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var nu=g((Uir,pL)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?pL.exports={nextTick:o_t}:pL.exports=process;function o_t(e,t,r,n){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,s,o;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,n)});default:for(s=new Array(i-1),o=0;o<s.length;)s[o++]=arguments[o];return process.nextTick(function(){e.apply(null,s)})}}});var dL=g((Hir,Phe)=>{var a_t={}.toString;Phe.exports=Array.isArray||function(e){return a_t.call(e)=="[object Array]"}});var hL=g((zir,khe)=>{khe.exports=require("stream")});var Ms=g((mL,Lhe)=>{var mS=require("buffer"),iu=mS.Buffer;function Dhe(e,t){for(var r in e)t[r]=e[r]}iu.from&&iu.alloc&&iu.allocUnsafe&&iu.allocUnsafeSlow?Lhe.exports=mS:(Dhe(mS,mL),mL.Buffer=Wd);function Wd(e,t,r){return iu(e,t,r)}Dhe(iu,Wd);Wd.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return iu(e,t,r)};Wd.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=iu(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Wd.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return iu(e)};Wd.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return mS.SlowBuffer(e)}});var vo=g(ri=>{function u_t(e){return Array.isArray?Array.isArray(e):gS(e)==="[object Array]"}ri.isArray=u_t;function c_t(e){return typeof e=="boolean"}ri.isBoolean=c_t;function l_t(e){return e===null}ri.isNull=l_t;function f_t(e){return e==null}ri.isNullOrUndefined=f_t;function p_t(e){return typeof e=="number"}ri.isNumber=p_t;function d_t(e){return typeof e=="string"}ri.isString=d_t;function h_t(e){return typeof e=="symbol"}ri.isSymbol=h_t;function m_t(e){return e===void 0}ri.isUndefined=m_t;function g_t(e){return gS(e)==="[object RegExp]"}ri.isRegExp=g_t;function v_t(e){return typeof e=="object"&&e!==null}ri.isObject=v_t;function x_t(e){return gS(e)==="[object Date]"}ri.isDate=x_t;function y_t(e){return gS(e)==="[object Error]"||e instanceof Error}ri.isError=y_t;function __t(e){return typeof e=="function"}ri.isFunction=__t;function b_t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}ri.isPrimitive=b_t;ri.isBuffer=require("buffer").Buffer.isBuffer;function gS(e){return Object.prototype.toString.call(e)}});var Mhe=g((Wir,gL)=>{"use strict";function w_t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Fhe=Ms().Buffer,B0=require("util");function E_t(e,t,r){e.copy(t,r)}gL.exports=function(){function e(){w_t(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},e.prototype.concat=function(r){if(this.length===0)return Fhe.alloc(0);for(var n=Fhe.allocUnsafe(r>>>0),i=this.head,s=0;i;)E_t(i.data,n,s),s+=i.data.length,i=i.next;return n},e}();B0&&B0.inspect&&B0.inspect.custom&&(gL.exports.prototype[B0.inspect.custom]=function(){var e=B0.inspect({length:this.length});return this.constructor.name+" "+e})});var vL=g((Gir,Bhe)=>{"use strict";var vS=nu();function S_t(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vS.nextTick(xS,this,e)):vS.nextTick(xS,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,vS.nextTick(xS,r,s)):vS.nextTick(xS,r,s):t&&t(s)}),this)}function C_t(){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 xS(e,t){e.emit("error",t)}Bhe.exports={destroy:S_t,undestroy:C_t}});var yL=g((Vir,Vhe)=>{"use strict";var nf=nu();Vhe.exports=Yr;function Uhe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){z_t(t,e)}}var T_t=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:nf.nextTick,Gd;Yr.WritableState=U0;var Hhe=Object.create(vo());Hhe.inherits=vn();var A_t={deprecate:a_()},zhe=hL(),_S=Ms().Buffer,O_t=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function I_t(e){return _S.from(e)}function R_t(e){return _S.isBuffer(e)||e instanceof O_t}var $he=vL();Hhe.inherits(Yr,zhe);function N_t(){}function U0(e,t){Gd=Gd||sf(),e=e||{};var r=t instanceof Gd;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){M_t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Uhe(this)}U0.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(U0.prototype,"buffer",{get:A_t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var yS;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(yS=Function.prototype[Symbol.hasInstance],Object.defineProperty(Yr,Symbol.hasInstance,{value:function(e){return yS.call(this,e)?!0:this!==Yr?!1:e&&e._writableState instanceof U0}})):yS=function(e){return e instanceof this};function Yr(e){if(Gd=Gd||sf(),!yS.call(Yr,this)&&!(this instanceof Gd))return new Yr(e);this._writableState=new U0(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),zhe.call(this)}Yr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function q_t(e,t){var r=new Error("write after end");e.emit("error",r),nf.nextTick(t,r)}function P_t(e,t,r,n){var i=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),nf.nextTick(n,s),i=!1),i}Yr.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&R_t(e);return s&&!_S.isBuffer(e)&&(e=I_t(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=N_t),n.ended?q_t(this,r):(s||P_t(this,n,e,r))&&(n.pendingcb++,i=D_t(this,n,s,e,t,r)),i};Yr.prototype.cork=function(){var e=this._writableState;e.corked++};Yr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Whe(this,e))};Yr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function k_t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=_S.from(t,r)),t}Object.defineProperty(Yr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function D_t(e,t,r,n,i,s){if(!r){var o=k_t(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else xL(e,t,!1,a,n,i,s);return u}function xL(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function L_t(e,t,r,n,i){--t.pendingcb,r?(nf.nextTick(i,n),nf.nextTick(j0,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),j0(e,t))}function F_t(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function M_t(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(F_t(r),t)L_t(e,r,n,t,i);else{var s=Ghe(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Whe(e,r),n?T_t(jhe,e,r,s,i):jhe(e,r,s,i)}}function jhe(e,t,r,n){r||B_t(e,t),t.pendingcb--,n(),j0(e,t)}function B_t(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Whe(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,xL(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new Uhe(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(xL(e,t,!1,p,u,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Yr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Yr.prototype._writev=null;Yr.prototype.end=function(e,t,r){var n=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||H_t(this,n,r)};function Ghe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function j_t(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),j0(e,t)})}function U_t(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,nf.nextTick(j_t,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function j0(e,t){var r=Ghe(t);return r&&(U_t(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function H_t(e,t,r){t.ending=!0,j0(e,t),r&&(t.finished?nf.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function z_t(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Yr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Yr.prototype.destroy=$he.destroy;Yr.prototype._undestroy=$he.undestroy;Yr.prototype._destroy=function(e,t){this.end(),t(e)}});var sf=g((Kir,Jhe)=>{"use strict";var Khe=nu(),$_t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Jhe.exports=su;var Xhe=Object.create(vo());Xhe.inherits=vn();var Yhe=wL(),bL=yL();Xhe.inherits(su,Yhe);for(_L=$_t(bL.prototype),bS=0;bS<_L.length;bS++)wS=_L[bS],su.prototype[wS]||(su.prototype[wS]=bL.prototype[wS]);var _L,wS,bS;function su(e){if(!(this instanceof su))return new su(e);Yhe.call(this,e),bL.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",W_t)}Object.defineProperty(su.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W_t(){this.allowHalfOpen||this._writableState.ended||Khe.nextTick(G_t,this)}function G_t(e){e.end()}Object.defineProperty(su.prototype,"destroyed",{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)}});su.prototype._destroy=function(e,t){this.push(null),this.end(),Khe.nextTick(t,e)}});var CL=g(Qhe=>{"use strict";var SL=Ms().Buffer,Zhe=SL.isEncoding||function(e){switch(e=""+e,e&&e.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 V_t(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function K_t(e){var t=V_t(e);if(typeof t!="string"&&(SL.isEncoding===Zhe||!Zhe(e)))throw new Error("Unknown encoding: "+e);return t||e}Qhe.StringDecoder=H0;function H0(e){this.encoding=K_t(e);var t;switch(this.encoding){case"utf16le":this.text=ebt,this.end=tbt,t=4;break;case"utf8":this.fillLast=J_t,t=4;break;case"base64":this.text=rbt,this.end=nbt,t=3;break;default:this.write=ibt,this.end=sbt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=SL.allocUnsafe(t)}H0.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};H0.prototype.end=Q_t;H0.prototype.text=Z_t;H0.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function EL(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function X_t(e,t,r){var n=t.length-1;if(n<r)return 0;var i=EL(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=EL(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=EL(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function Y_t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function J_t(e){var t=this.lastTotal-this.lastNeed,r=Y_t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Z_t(e,t){var r=X_t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function Q_t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function ebt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function tbt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function rbt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function nbt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function ibt(e){return e.toString(this.encoding)}function sbt(e){return e&&e.length?this.write(e):""}});var wL=g((Jir,fme)=>{"use strict";var Kd=nu();fme.exports=or;var obt=dL(),z0;or.ReadableState=ome;var Yir=require("events").EventEmitter,nme=function(e,t){return e.listeners(t).length},RL=hL(),$0=Ms().Buffer,abt=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ubt(e){return $0.from(e)}function cbt(e){return $0.isBuffer(e)||e instanceof abt}var ime=Object.create(vo());ime.inherits=vn();var TL=require("util"),It=void 0;TL&&TL.debuglog?It=TL.debuglog("stream"):It=function(){};var lbt=Mhe(),sme=vL(),Vd;ime.inherits(or,RL);var AL=["error","close","destroy","pause","resume"];function fbt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):obt(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function ome(e,t){z0=z0||sf(),e=e||{};var r=t instanceof z0;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new lbt,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Vd||(Vd=CL().StringDecoder),this.decoder=new Vd(e.encoding),this.encoding=e.encoding)}function or(e){if(z0=z0||sf(),!(this instanceof or))return new or(e);this._readableState=new ome(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),RL.call(this)}Object.defineProperty(or.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});or.prototype.destroy=sme.destroy;or.prototype._undestroy=sme.undestroy;or.prototype._destroy=function(e,t){this.push(null),t(e)};or.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=$0.from(e,t),t=""),n=!0),ame(this,e,t,!1,n)};or.prototype.unshift=function(e){return ame(this,e,null,!0,!1)};function ame(e,t,r,n,i){var s=e._readableState;if(t===null)s.reading=!1,mbt(e,s);else{var o;i||(o=pbt(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==$0.prototype&&(t=ubt(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):OL(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?OL(e,s,t,!1):ume(e,s)):OL(e,s,t,!1))):n||(s.reading=!1)}return dbt(s)}function OL(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&ES(e)),ume(e,t)}function pbt(e,t){var r;return!cbt(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function dbt(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}or.prototype.isPaused=function(){return this._readableState.flowing===!1};or.prototype.setEncoding=function(e){return Vd||(Vd=CL().StringDecoder),this._readableState.decoder=new Vd(e),this._readableState.encoding=e,this};var eme=8388608;function hbt(e){return e>=eme?e=eme:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function tme(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=hbt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}or.prototype.read=function(e){It("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return It("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?IL(this):ES(this),null;if(e=tme(e,t),e===0&&t.ended)return t.length===0&&IL(this),null;var n=t.needReadable;It("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,It("length less than watermark",n)),t.ended||t.reading?(n=!1,It("reading or ended",n)):n&&(It("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=tme(r,t)));var i;return e>0?i=cme(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&IL(this)),i!==null&&this.emit("data",i),i};function mbt(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,ES(e)}}function ES(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(It("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Kd.nextTick(rme,e):rme(e))}function rme(e){It("emit readable"),e.emit("readable"),NL(e)}function ume(e,t){t.readingMore||(t.readingMore=!0,Kd.nextTick(gbt,e,t))}function gbt(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(It("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}or.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};or.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,It("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=i?a:b;n.endEmitted?Kd.nextTick(s):r.once("end",s),e.on("unpipe",o);function o(y,T){It("onunpipe"),y===r&&T&&T.hasUnpiped===!1&&(T.hasUnpiped=!0,f())}function a(){It("onend"),e.end()}var u=vbt(r);e.on("drain",u);var c=!1;function f(){It("cleanup"),e.removeListener("close",v),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",d),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var p=!1;r.on("data",d);function d(y){It("ondata"),p=!1;var T=e.write(y);T===!1&&!p&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&lme(n.pipes,e)!==-1)&&!c&&(It("false write response, pause",n.awaitDrain),n.awaitDrain++,p=!0),r.pause())}function m(y){It("onerror",y),b(),e.removeListener("error",m),nme(e,"error")===0&&e.emit("error",y)}fbt(e,"error",m);function v(){e.removeListener("finish",_),b()}e.once("close",v);function _(){It("onfinish"),e.removeListener("close",v),b()}e.once("finish",_);function b(){It("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(It("pipe resume"),r.resume()),e};function vbt(e){return function(){var t=e._readableState;It("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&nme(e,"data")&&(t.flowing=!0,NL(e))}}or.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=lme(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};or.prototype.on=function(e,t){var r=RL.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&ES(this):Kd.nextTick(xbt,this))}return r};or.prototype.addListener=or.prototype.on;function xbt(e){It("readable nexttick read 0"),e.read(0)}or.prototype.resume=function(){var e=this._readableState;return e.flowing||(It("resume"),e.flowing=!0,ybt(this,e)),this};function ybt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Kd.nextTick(_bt,e,t))}function _bt(e,t){t.reading||(It("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),NL(e),t.flowing&&!t.reading&&e.read(0)}or.prototype.pause=function(){return It("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(It("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function NL(e){var t=e._readableState;for(It("flow",t.flowing);t.flowing&&e.read()!==null;);}or.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(It("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(It("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(o){return function(){return e[o].apply(e,arguments)}}(i));for(var s=0;s<AL.length;s++)e.on(AL[s],this.emit.bind(this,AL[s]));return this._read=function(o){It("wrapped _read",o),n&&(n=!1,e.resume())},this};Object.defineProperty(or.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});or._fromList=cme;function cme(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=bbt(e,t.buffer,t.decoder),r}function bbt(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?wbt(e,t):Ebt(e,t),n}function wbt(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),e-=o,e===0){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}function Ebt(e,t){var r=$0.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),e-=o,e===0){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}function IL(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Kd.nextTick(Sbt,t,e))}function Sbt(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function lme(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var qL=g((Zir,hme)=>{"use strict";hme.exports=ou;var SS=sf(),dme=Object.create(vo());dme.inherits=vn();dme.inherits(ou,SS);function Cbt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function ou(e){if(!(this instanceof ou))return new ou(e);SS.call(this,e),this._transformState={afterTransform:Cbt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Tbt)}function Tbt(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){pme(e,t,r)}):pme(this,null,null)}ou.prototype.push=function(e,t){return this._transformState.needTransform=!1,SS.prototype.push.call(this,e,t)};ou.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};ou.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};ou.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};ou.prototype._destroy=function(e,t){var r=this;SS.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function pme(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var xme=g((Qir,vme)=>{"use strict";vme.exports=W0;var mme=qL(),gme=Object.create(vo());gme.inherits=vn();gme.inherits(W0,mme);function W0(e){if(!(this instanceof W0))return new W0(e);mme.call(this,e)}W0.prototype._transform=function(e,t,r){r(null,e)}});var Xd=g((jn,CS)=>{var ta=require("stream");process.env.READABLE_STREAM==="disable"&&ta?(CS.exports=ta,jn=CS.exports=ta.Readable,jn.Readable=ta.Readable,jn.Writable=ta.Writable,jn.Duplex=ta.Duplex,jn.Transform=ta.Transform,jn.PassThrough=ta.PassThrough,jn.Stream=ta):(jn=CS.exports=wL(),jn.Stream=ta||jn,jn.Readable=jn,jn.Writable=yL(),jn.Duplex=sf(),jn.Transform=qL(),jn.PassThrough=xme())});var _me=g((esr,yme)=>{yme.exports=Xd().Duplex});var wme=g((tsr,bme)=>{var PL=_me(),Abt=require("util"),Yd=Ms().Buffer;function kr(e){if(!(this instanceof kr))return new kr(e);if(this._bufs=[],this.length=0,typeof e=="function"){this._callback=e;var t=function(n){this._callback&&(this._callback(n),this._callback=null)}.bind(this);this.on("pipe",function(n){n.on("error",t)}),this.on("unpipe",function(n){n.removeListener("error",t)})}else this.append(e);PL.call(this)}Abt.inherits(kr,PL);kr.prototype._offset=function(t){var r=0,n=0,i;if(t===0)return[0,0];for(;n<this._bufs.length;n++){if(i=r+this._bufs[n].length,t<i||n==this._bufs.length-1)return[n,t-r];r=i}};kr.prototype.append=function(t){var r=0;if(Yd.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;r<t.length;r++)this.append(t[r]);else if(t instanceof kr)for(;r<t._bufs.length;r++)this.append(t._bufs[r]);else t!=null&&(typeof t=="number"&&(t=t.toString()),this._appendBuffer(Yd.from(t)));return this};kr.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};kr.prototype._write=function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()};kr.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};kr.prototype.end=function(t){PL.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};kr.prototype.get=function(t){return this.slice(t,t+1)[0]};kr.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};kr.prototype.copy=function(t,r,n,i){if((typeof n!="number"||n<0)&&(n=0),(typeof i!="number"||i>this.length)&&(i=this.length),n>=this.length||i<=0)return t||Yd.alloc(0);var s=!!t,o=this._offset(n),a=i-n,u=a,c=s&&r||0,f=o[1],p,d;if(n===0&&i==this.length){if(!s)return this._bufs.length===1?this._bufs[0]:Yd.concat(this._bufs,this.length);for(d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,c),c+=this._bufs[d].length;return t}if(u<=this._bufs[o[0]].length-f)return s?this._bufs[o[0]].copy(t,r,f,f+u):this._bufs[o[0]].slice(f,f+u);for(s||(t=Yd.allocUnsafe(a)),d=o[0];d<this._bufs.length;d++){if(p=this._bufs[d].length-f,u>p)this._bufs[d].copy(t,c,f),c+=p;else{this._bufs[d].copy(t,c,f,f+u),c+=p;break}u-=p,f&&(f=0)}return t.length>c?t.slice(0,c):t};kr.prototype.shallowSlice=function(t,r){t=t||0,r=r||this.length,t<0&&(t+=this.length),r<0&&(r+=this.length);var n=this._offset(t),i=this._offset(r),s=this._bufs.slice(n[0],i[0]+1);return i[1]==0?s.pop():s[s.length-1]=s[s.length-1].slice(0,i[1]),n[1]!=0&&(s[0]=s[0].slice(n[1])),new kr(s)};kr.prototype.toString=function(t,r,n){return this.slice(r,n).toString(t)};kr.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};kr.prototype.duplicate=function(){for(var t=0,r=new kr;t<this._bufs.length;t++)r.append(this._bufs[t]);return r};kr.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)};(function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)(function(r){kr.prototype[r]=function(n){return this.slice(n,n+e[r])[r](0)}})(t)})();bme.exports=kr});var Sme=g((rsr,Eme)=>{Eme.exports=Ibt;var Obt=Object.prototype.hasOwnProperty;function Ibt(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Obt.call(r,n)&&(e[n]=r[n])}return e}});var kL=g((nsr,Tme)=>{Tme.exports=Nbt;var Cme=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from:Rbt;function Rbt(e,t){return new Buffer(e,t)}function Nbt(e,t){if(Buffer.isBuffer(e))return e;if(typeof e=="string")return Cme(e,t);if(Array.isArray(e))return Cme(e);throw new Error("Input should be a buffer or a string")}});var Ome=g((isr,Ame)=>{var qbt=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var e=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return e.fill("ab","ucs2"),e.toString("hex")==="61006200"}catch{return!1}}();function Pbt(e){return e.length===1&&e.charCodeAt(0)<256}function TS(e,t,r,n){if(r<0||n>e.length)throw new RangeError("Out of range index");return r=r>>>0,n=n===void 0?e.length:n>>>0,n>r&&e.fill(t,r,n),e}function kbt(e,t,r,n){if(r<0||n>e.length)throw new RangeError("Out of range index");if(n<=r)return e;r=r>>>0,n=n===void 0?e.length:n>>>0;for(var i=r,s=t.length;i<=n-s;)t.copy(e,i),i+=s;return i!==n&&t.copy(e,i,0,n-i),e}function Dbt(e,t,r,n,i){if(qbt)return e.fill(t,r,n,i);if(typeof t=="number")return TS(e,t,r,n);if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=e.length):typeof n=="string"&&(i=n,n=e.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(i==="latin1"&&(i="binary"),typeof i=="string"&&!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t==="")return TS(e,0,r,n);if(Pbt(t))return TS(e,t.charCodeAt(0),r,n);t=new Buffer(t,i)}return Buffer.isBuffer(t)?kbt(e,t,r,n):TS(e,0,r,n)}Ame.exports=Dbt});var Rme=g((ssr,Ime)=>{function Lbt(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative');return Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e)}Ime.exports=Lbt});var DL=g((osr,qme)=>{var Nme=Ome(),Fbt=Rme();qme.exports=function(t,r,n){if(typeof t!="number")throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative');if(Buffer.alloc)return Buffer.alloc(t,r,n);var i=Fbt(t);return t===0?i:r===void 0?Nme(i,0):(typeof n!="string"&&(n=void 0),Nme(i,r,n))}});var FL=g(Zd=>{var Mbt=kL(),Bbt=DL(),jbt="0000000000000000000",Ubt="7777777777777777777",Pme="0".charCodeAt(0),Hbt="ustar\x0000",zbt=parseInt("7777",8),$bt=function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},Wbt=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},Gbt=function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},kme=function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},Dme=function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},Cc=function(e,t){return e=e.toString(8),e.length>t?Ubt.slice(0,t)+" ":jbt.slice(0,t-e.length)+e+" "};function Vbt(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=!1,n=[],i=e.length-1;i>0;i--){var s=e[i];t?n.push(s):r&&s===0?n.push(0):r?(r=!1,n.push(256-s)):n.push(255-s)}var o=0,a=n.length;for(i=0;i<a;i++)o+=n[i]*Math.pow(256,i);return t?o:-1*o}var Tc=function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return Vbt(e);for(;t<e.length&&e[t]===32;)t++;for(var n=$bt(kme(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},Jd=function(e,t,r,n){return e.slice(t,kme(e,0,t,t+r)).toString(n)},LL=function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e};Zd.decodeLongPath=function(e,t){return Jd(e,0,e.length,t)};Zd.encodePax=function(e){var t="";e.name&&(t+=LL(" path="+e.name+`
|
|
226
226
|
`)),e.linkname&&(t+=LL(" linkpath="+e.linkname+`
|
|
227
227
|
`));var r=e.pax;if(r)for(var n in r)t+=LL(" "+n+"="+r[n]+`
|
|
228
|
-
`);return Mbt(t)};Zd.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var n=parseInt(e.slice(0,r).toString(),10);if(!n)return t;var i=e.slice(r+1,n-1).toString(),s=i.indexOf("=");if(s===-1)return t;t[i.slice(0,s)]=i.slice(s+1),e=e.slice(n)}return t};Zd.encode=function(e){var t=Bbt(512),r=e.name,n="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var i=r.indexOf("/");if(i===-1)return null;n+=n?"/"+r.slice(0,i):r.slice(0,i),r=r.slice(i+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(Cc(e.mode&zbt,6),100),t.write(Cc(e.uid,6),108),t.write(Cc(e.gid,6),116),t.write(Cc(e.size,11),124),t.write(Cc(e.mtime.getTime()/1e3|0,11),136),t[156]=Pme+Gbt(e.type),e.linkname&&t.write(e.linkname,157),t.write(Hbt,257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(Cc(e.devmajor||0,6),329),t.write(Cc(e.devminor||0,6),337),n&&t.write(n,345),t.write(Cc(Dme(t),6),148),t)};Zd.decode=function(e,t){var r=e[156]===0?0:e[156]-Pme,n=Jd(e,0,100,t),i=Tc(e,100,8),s=Tc(e,108,8),o=Tc(e,116,8),a=Tc(e,124,12),u=Tc(e,136,12),c=Wbt(r),f=e[157]===0?null:Jd(e,157,100,t),p=Jd(e,265,32),d=Jd(e,297,32),m=Tc(e,329,8),v=Tc(e,337,8);e[345]&&(n=Jd(e,345,155,t)+"/"+n),r===0&&n&&n[n.length-1]==="/"&&(r=5);var _=Dme(e);if(_===8*32)return null;if(_!==Tc(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:n,mode:i,uid:s,gid:o,size:a,mtime:new Date(1e3*u),type:c,linkname:f,uname:p,gname:d,devmajor:m,devminor:v}}});var Hme=g((usr,Ume)=>{var Fme=require("util"),Kbt=wme(),Xbt=Sme(),G0=FL(),Mme=Xd().Writable,Bme=Xd().PassThrough,jme=function(){},Lme=function(e){return e&=511,e&&512-e},Ybt=function(e,t){var r=new AS(e,t);return r.end(),r},Jbt=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},AS=function(e,t){this._parent=e,this.offset=t,Bme.call(this)};Fme.inherits(AS,Bme);AS.prototype.destroy=function(e){this._parent.destroy(e)};var au=function(e){if(!(this instanceof au))return new au(e);Mme.call(this,e),e=e||{},this._offset=0,this._buffer=Kbt(),this._missing=0,this._partial=!1,this._onparse=jme,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,n=function(){t._continue()},i=function(d){if(t._locked=!1,d)return t.destroy(d);t._stream||n()},s=function(){t._stream=null;var d=Lme(t._header.size);d?t._parse(d,o):t._parse(512,p),t._locked||n()},o=function(){t._buffer.consume(Lme(t._header.size)),t._parse(512,p),n()},a=function(){var d=t._header.size;t._paxGlobal=G0.decodePax(r.slice(0,d)),r.consume(d),s()},u=function(){var d=t._header.size;t._pax=G0.decodePax(r.slice(0,d)),t._paxGlobal&&(t._pax=Xbt(t._paxGlobal,t._pax)),r.consume(d),s()},c=function(){var d=t._header.size;this._gnuLongPath=G0.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),s()},f=function(){var d=t._header.size;this._gnuLongLinkPath=G0.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),s()},p=function(){var d=t._offset,m;try{m=t._header=G0.decode(r.slice(0,512),e.filenameEncoding)}catch(v){t.emit("error",v)}if(r.consume(512),!m){t._parse(512,p),n();return}if(m.type==="gnu-long-path"){t._parse(m.size,c),n();return}if(m.type==="gnu-long-link-path"){t._parse(m.size,f),n();return}if(m.type==="pax-global-header"){t._parse(m.size,a),n();return}if(m.type==="pax-header"){t._parse(m.size,u),n();return}if(t._gnuLongPath&&(m.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(m.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=m=Jbt(m,t._pax),t._pax=null),t._locked=!0,!m.size||m.type==="directory"){t._parse(512,p),t.emit("entry",m,Ybt(t,d),i);return}t._stream=new AS(t,d),t.emit("entry",m,t._stream,i),t._parse(m.size,s),n()};this._onheader=p,this._parse(512,p)};Fme.inherits(au,Mme);au.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};au.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};au.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=jme,this._overflow?this._write(this._overflow,void 0,e):e()}};au.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,i=this._buffer,s=this._missing;if(e.length&&(this._partial=!0),e.length<s)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(i.append(e),r());this._cb=r,this._missing=0;var o=null;e.length>s&&(o=e.slice(s),e=e.slice(0,s)),n?n.end(e):i.append(e),this._overflow=o,this._onparse()}};au.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};Ume.exports=au});var $me=g((csr,zme)=>{zme.exports=require("fs").constants||require("constants")});var ML=g((lsr,Gme)=>{Gme.exports=Wme;function Wme(e,t){if(e&&t)return Wme(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(a){s[a]=o[a]}),s}}});var V0=g((fsr,BL)=>{var Vme=ML();BL.exports=Vme(OS);BL.exports.strict=Vme(Kme);OS.proto=OS(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return OS(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Kme(this)},configurable:!0})});function OS(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Kme(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var jL=g((psr,Yme)=>{var Zbt=V0(),Qbt=function(){},ewt=function(e){return e.setHeader&&typeof e.abort=="function"},twt=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Xme=function(e,t,r){if(typeof t=="function")return Xme(e,null,t);t||(t={}),r=Zbt(r||Qbt);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},f=function(){s=!1,o||r.call(e)},p=function(b){r.call(e,b?new Error("exited with error code: "+b):null)},d=function(b){r.call(e,b)},m=function(){process.nextTick(v)},v=function(){if(!a){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},_=function(){e.req.on("finish",c)};return ewt(e)?(e.on("complete",c),e.on("abort",m),e.req?_():e.on("request",_)):o&&!n&&(e.on("end",u),e.on("close",u)),twt(e)&&e.on("exit",p),e.on("end",f),e.on("finish",c),t.error!==!1&&e.on("error",d),e.on("close",m),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",m),e.removeListener("request",_),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",m)}};Yme.exports=Xme});var tge=g((dsr,ege)=>{var Qd=$me(),Jme=jL(),RS=require("util"),rwt=DL(),nwt=kL(),Zme=Xd().Readable,eh=Xd().Writable,iwt=require("string_decoder").StringDecoder,IS=FL(),swt=parseInt("755",8),owt=parseInt("644",8),Qme=rwt(1024),HL=function(){},UL=function(e,t){t&=511,t&&e.push(Qme.slice(0,512-t))};function awt(e){switch(e&Qd.S_IFMT){case Qd.S_IFBLK:return"block-device";case Qd.S_IFCHR:return"character-device";case Qd.S_IFDIR:return"directory";case Qd.S_IFIFO:return"fifo";case Qd.S_IFLNK:return"symlink"}return"file"}var NS=function(e){eh.call(this),this.written=0,this._to=e,this._destroyed=!1};RS.inherits(NS,eh);NS.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};NS.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var qS=function(){eh.call(this),this.linkname="",this._decoder=new iwt("utf-8"),this._destroyed=!1};RS.inherits(qS,eh);qS.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};qS.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var K0=function(){eh.call(this),this._destroyed=!1};RS.inherits(K0,eh);K0.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};K0.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var ra=function(e){if(!(this instanceof ra))return new ra(e);Zme.call(this,e),this._drain=HL,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};RS.inherits(ra,Zme);ra.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=HL);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=awt(e.mode)),e.mode||(e.mode=e.type==="directory"?swt:owt),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=nwt(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),UL(n,e.size),process.nextTick(r),new K0;if(e.type==="symlink"&&!e.linkname){var i=new qS;return Jme(i,function(o){if(o)return n.destroy(),r(o);e.linkname=i.linkname,n._encode(e),r()}),i}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new K0;var s=new NS(this);return this._stream=s,Jme(s,function(o){if(n._stream=null,o)return n.destroy(),r(o);if(s.written!==e.size)return n.destroy(),r(new Error("size mismatch"));UL(n,e.size),n._finalizing&&n.finalize(),r()}),s}};ra.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Qme),this.push(null))};ra.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};ra.prototype._encode=function(e){if(!e.pax){var t=IS.encode(e);if(t){this.push(t);return}}this._encodePax(e)};ra.prototype._encodePax=function(e){var t=IS.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(IS.encode(r)),this.push(t),UL(this,t.length),r.size=e.size,r.type=e.type,this.push(IS.encode(r))};ra.prototype._read=function(e){var t=this._drain;this._drain=HL,t()};ege.exports=ra});var rge=g(zL=>{zL.extract=Hme();zL.pack=tge()});var PS=g((msr,ige)=>{"use strict";var nge=qhe(),uwt=Lm(),cwt=rge();ige.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!uwt(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!nge(e)||nge(e).ext!=="tar"))return Promise.resolve([]);let t=cwt.extract(),r=[];t.on("entry",(i,s,o)=>{let a=[];s.on("data",u=>a.push(u)),s.on("end",()=>{let u={data:Buffer.concat(a),mode:i.mode,mtime:i.mtime,path:i.name,type:i.type};(i.type==="symlink"||i.type==="link")&&(u.linkname=i.linkname),r.push(u),o()})});let n=new Promise((i,s)=>{Buffer.isBuffer(e)||e.on("error",s),t.on("finish",()=>i(r)),t.on("error",s)});return t.then=n.then.bind(n),t.catch=n.catch.bind(n),Buffer.isBuffer(e)?t.end(e):e.pipe(t),t}});var oge=g((gsr,sge)=>{"use strict";var th=e=>Array.from(e).map(t=>t.charCodeAt(0)),lwt=th("META-INF/mozilla.rsa"),fwt=th("[Content_Types].xml"),pwt=th("_rels/.rels");sge.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(i.mask){if(n[s]!==(i.mask[s]&t[s+i.offset]))return!1}else if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(lwt,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r(fwt,{offset:30})||r(pwt,{offset:30})){let n=t.subarray(4,2004),i=o=>o.findIndex((a,u,c)=>c[u]===80&&c[u+1]===75&&c[u+2]===3&&c[u+3]===4),s=i(n);if(s!==-1){let o=t.subarray(s+8,s+8+1e3),a=i(o);if(a!==-1){let u=8+s+a+30;if(r(th("word/"),{offset:u}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(r(th("ppt/"),{offset:u}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(r(th("xl/"),{offset:u}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i!==-1){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])&&r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186]))return{ext:"mpg",mime:"video/mpeg"};for(let n=0;n<2&&n<t.length-16;n++)if(r([73,68,51],{offset:n})||r([255,226],{offset:n,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};return r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var cge=g((vsr,uge)=>{var age=[0,1,3,7,15,31,63,127,255],X0=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};X0.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)};X0.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=age[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&age[e]<<n)>>n,this.bitOffset+=e,e=0}}return t};X0.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1};X0.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString("hex")};uge.exports=X0});var fge=g((xsr,lge)=>{var of=function(){};of.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")};of.prototype.read=function(e,t,r){for(var n=0;n<r;){var i=this.readByte();if(i<0)return n===0?-1:n;e[t++]=i,n++}return n};of.prototype.seek=function(e){throw new Error("abstract method seek() not implemented")};of.prototype.writeByte=function(e){throw new Error("abstract method readByte() not implemented")};of.prototype.write=function(e,t,r){var n;for(n=0;n<r;n++)this.writeByte(e[t++]);return r};of.prototype.flush=function(){};lge.exports=of});var dge=g((ysr,pge)=>{pge.exports=function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),t=function(){var r=4294967295;this.getCRC=function(){return~r>>>0},this.updateCRC=function(n){r=r<<8^e[(r>>>24^n)&255]},this.updateCRCRun=function(n,i){for(;i-- >0;)r=r<<8^e[(r>>>24^n)&255]}};return t}()});var hge=g((_sr,dwt)=>{dwt.exports={name:"seek-bzip",version:"1.0.6",contributors:["C. Scott Ananian (http://cscott.net)","Eli Skeggs","Kevin Kwok","Rob Landley (http://landley.net)"],description:"a pure-JavaScript Node.JS module for random-access decoding bzip2 data",main:"./lib/index.js",repository:{type:"git",url:"https://github.com/cscott/seek-bzip.git"},license:"MIT",bin:{"seek-bunzip":"./bin/seek-bunzip","seek-table":"./bin/seek-bzip-table"},directories:{test:"test"},dependencies:{commander:"^2.8.1"},devDependencies:{fibers:"~1.0.6",mocha:"~2.2.5"},scripts:{test:"mocha"}}});var wge=g((bsr,bge)=>{var hwt=cge(),Y0=fge(),xge=dge(),yge=hge(),kS=20,mge=258,gge=0,mwt=1,gwt=2,vwt=6,xwt=50,ywt="314159265359",_wt="177245385090",vge=function(e,t){var r=e[t],n;for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},ar={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Ac={};Ac[ar.LAST_BLOCK]="Bad file checksum";Ac[ar.NOT_BZIP_DATA]="Not bzip data";Ac[ar.UNEXPECTED_INPUT_EOF]="Unexpected input EOF";Ac[ar.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF";Ac[ar.DATA_ERROR]="Data error";Ac[ar.OUT_OF_MEMORY]="Out of memory";Ac[ar.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Un=function(e,t){var r=Ac[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},yi=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};yi.prototype._init_block=function(){var e=this._get_next_block();return e?(this.blockCRC=new xge,!0):(this.writeCount=-1,!1)};yi.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!=="BZh")&&Un(ar.NOT_BZIP_DATA,"bad magic");var n=r[3]-48;(n<1||n>9)&&Un(ar.NOT_BZIP_DATA,"level out of range"),this.reader=new hwt(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0};yi.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if(i===_wt)return!1;i!==ywt&&Un(ar.NOT_BZIP_DATA),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Un(ar.OBSOLETE_INPUT);var s=n.read(24);s>this.dbufSize&&Un(ar.DATA_ERROR,"initial position out of bounds");var o=n.read(16),a=new Buffer(256),u=0;for(e=0;e<16;e++)if(o&1<<15-e){var c=e*16;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(a[u++]=c+t)}var f=n.read(3);(f<gwt||f>vwt)&&Un(ar.DATA_ERROR);var p=n.read(15);p===0&&Un(ar.DATA_ERROR);var d=new Buffer(256);for(e=0;e<f;e++)d[e]=e;var m=new Buffer(p);for(e=0;e<p;e++){for(t=0;n.read(1);t++)t>=f&&Un(ar.DATA_ERROR);m[e]=vge(d,t)}var v=u+2,_=[],b;for(t=0;t<f;t++){var y=new Buffer(v),T=new Uint16Array(kS+1);for(o=n.read(5),e=0;e<v;e++){for(;(o<1||o>kS)&&Un(ar.DATA_ERROR),!!n.read(1);)n.read(1)?o--:o++;y[e]=o}var S,E;for(S=E=y[0],e=1;e<v;e++)y[e]>E?E=y[e]:y[e]<S&&(S=y[e]);b={},_.push(b),b.permute=new Uint16Array(mge),b.limit=new Uint32Array(kS+2),b.base=new Uint32Array(kS+1),b.minLen=S,b.maxLen=E;var C=0;for(e=S;e<=E;e++)for(T[e]=b.limit[e]=0,o=0;o<v;o++)y[o]===e&&(b.permute[C++]=o);for(e=0;e<v;e++)T[y[e]]++;for(C=o=0,e=S;e<E;e++)C+=T[e],b.limit[e]=C-1,C<<=1,o+=T[e],b.base[e+1]=C-o;b.limit[E+1]=Number.MAX_VALUE,b.limit[E]=C+T[E]-1,b.base[S]=0}var I=new Uint32Array(256);for(e=0;e<256;e++)d[e]=e;var q=0,B=0,M=0,R,D=this.dbuf=new Uint32Array(this.dbufSize);for(v=0;;){for(v--||(v=xwt-1,M>=p&&Un(ar.DATA_ERROR),b=_[m[M++]]),e=b.minLen,t=n.read(e);e>b.maxLen&&Un(ar.DATA_ERROR),!(t<=b.limit[e]);e++)t=t<<1|n.read(1);t-=b.base[e],(t<0||t>=mge)&&Un(ar.DATA_ERROR);var N=b.permute[t];if(N===gge||N===mwt){q||(q=1,o=0),N===gge?o+=q:o+=2*q,q<<=1;continue}if(q)for(q=0,B+o>this.dbufSize&&Un(ar.DATA_ERROR),R=a[d[0]],I[R]+=o;o--;)D[B++]=R;if(N>u)break;B>=this.dbufSize&&Un(ar.DATA_ERROR),e=N-1,R=vge(d,e),R=a[R],I[R]++,D[B++]=R}for((s<0||s>=B)&&Un(ar.DATA_ERROR),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e<B;e++)R=D[e]&255,D[I[R]]|=e<<8,I[R]++;var Y=0,oe=0,H=0;return B&&(Y=D[s],oe=Y&255,Y>>=8,H=-1),this.writePos=Y,this.writeCurrent=oe,this.writeCount=B,this.writeRun=H,!0};yi.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;for(var s=0,o=this.dbuf,a=this.writePos,u=this.writeCurrent,c=this.writeCount,f=this.outputsize,p=this.writeRun;c;){for(c--,n=u,a=o[a],u=a&255,a>>=8,p++===3?(r=u,i=n,u=-1):(r=1,i=u),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;u!=n&&(p=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Un(ar.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var $L=function(e){if("readByte"in e)return e;var t=new Y0;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(r){this.pos=r},t.eof=function(){return this.pos>=e.length},t},_ge=function(e){var t=new Y0,r=!0;if(e)if(typeof e=="number")t.buffer=new Buffer(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(n){if(r&&this.pos>=this.buffer.length){var i=new Buffer(this.buffer.length*2);this.buffer.copy(i),this.buffer=i}this.buffer[this.pos++]=n},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var n=new Buffer(this.pos);this.buffer.copy(n,0,0,this.pos),this.buffer=n}return this.buffer},t._coerced=!0,t};yi.Err=ar;yi.decode=function(e,t,r){for(var n=$L(e),i=_ge(t),s=new yi(n,i);!("eof"in n&&n.eof());)if(s._init_block())s._read_bunzip();else{var o=s.reader.read(32)>>>0;if(o!==s.streamCRC&&Un(ar.DATA_ERROR,"Bad stream CRC (got "+s.streamCRC.toString(16)+" expected "+o.toString(16)+")"),r&&"eof"in n&&!n.eof())s._start_bunzip(n,i);else break}if("getBuffer"in i)return i.getBuffer()};yi.decodeBlock=function(e,t,r){var n=$L(e),i=_ge(r),s=new yi(n,i);s.reader.seek(t);var o=s._get_next_block();if(o&&(s.blockCRC=new xge,s.writeCopies=0,s._read_bunzip()),"getBuffer"in i)return i.getBuffer()};yi.table=function(e,t,r){var n=new Y0;n.delegate=$L(e),n.pos=0,n.readByte=function(){return this.pos++,this.delegate.readByte()},n.delegate.eof&&(n.eof=n.delegate.eof.bind(n.delegate));var i=new Y0;i.pos=0,i.writeByte=function(){this.pos++};for(var s=new yi(n,i),o=s.dbufSize;!("eof"in n&&n.eof());){var a=n.pos*8+s.reader.bitOffset;if(s.reader.hasByte&&(a-=8),s._init_block()){var u=i.pos;s._read_bunzip(),t(a,i.pos-u)}else{var c=s.reader.read(32);if(r&&"eof"in n&&!n.eof())s._start_bunzip(n,i),console.assert(s.dbufSize===o,"shouldn't change block size within multistream file");else break}}};yi.Stream=Y0;yi.version=yge.version;yi.license=yge.license;bge.exports=yi});var Cge=g((Ege,Sge)=>{var bwt=require("stream");Ege=Sge.exports=WL;WL.through=WL;function WL(e,t,r){e=e||function(f){this.queue(f)},t=t||function(){this.queue(null)};var n=!1,i=!1,s=[],o=!1,a=new bwt;a.readable=a.writable=!0,a.paused=!1,a.autoDestroy=!(r&&r.autoDestroy===!1),a.write=function(f){return e.call(this,f),!a.paused};function u(){for(;s.length&&!a.paused;){var f=s.shift();if(f===null)return a.emit("end");a.emit("data",f)}}a.queue=a.push=function(f){return o||(f===null&&(o=!0),s.push(f),u()),a},a.on("end",function(){a.readable=!1,!a.writable&&a.autoDestroy&&process.nextTick(function(){a.destroy()})});function c(){a.writable=!1,t.call(a),!a.readable&&a.autoDestroy&&a.destroy()}return a.end=function(f){if(!n)return n=!0,arguments.length&&a.write(f),c(),a},a.destroy=function(){if(!i)return i=!0,n=!0,s.length=0,a.writable=a.readable=!1,a.emit("close"),a},a.pause=function(){if(!a.paused)return a.paused=!0,a},a.resume=function(){return a.paused&&(a.paused=!1,a.emit("resume")),u(),a.paused||a.emit("drain"),a},a}});var Age=g((wsr,Tge)=>{function GL(e){this.name="Bzip2Error",this.message=e,this.stack=new Error().stack}GL.prototype=new Error;var Hn={Error:function(e){throw new GL(e)}},na={};na.Bzip2Error=GL;na.crcTable=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];na.array=function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var s=0;i>0;){var o=8-t;i>=o?(s<<=o,s|=n[o]&e[r++],t=0,i-=o):(s<<=i,s|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return s}};na.simple=function(e,t){var r=na.array(e),n=na.header(r),i=!1,s=1e5*n,o=new Int32Array(s);do i=na.decompress(r,t,o,s);while(!i)};na.header=function(e){this.byteCount=new Int32Array(256),this.symToByte=new Uint8Array(256),this.mtfSymbol=new Int32Array(256),this.selectors=new Uint8Array(32768),e(8*3)!=4348520&&Hn.Error("No magic number found");var t=e(8)-48;return(t<1||t>9)&&Hn.Error("Not a BZIP archive"),t};na.decompress=function(e,t,r,n,i){for(var s=20,o=258,a=0,u=1,c=50,f=-1,p="",d=0;d<6;d++)p+=e(8).toString(16);if(p=="177245385090"){var m=e(32)|0;return m!==i&&Hn.Error("Error in bzip2: crc32 do not match"),e(null),null}p!="314159265359"&&Hn.Error("eek not valid bzip data");var v=e(32)|0;e(1)&&Hn.Error("unsupported obsolete version");var _=e(24);_>n&&Hn.Error("Initial position larger than buffer size");var b=e(16),y=0;for(d=0;d<16;d++)if(b&1<<15-d){var T=e(16);for(ge=0;ge<16;ge++)T&1<<15-ge&&(this.symToByte[y++]=16*d+ge)}var S=e(3);(S<2||S>6)&&Hn.Error("another error");var E=e(15);E==0&&Hn.Error("meh");for(var d=0;d<S;d++)this.mtfSymbol[d]=d;for(var d=0;d<E;d++){for(var ge=0;e(1);ge++)ge>=S&&Hn.Error("whoops another error");for(var C=this.mtfSymbol[ge],T=ge-1;T>=0;T--)this.mtfSymbol[T+1]=this.mtfSymbol[T];this.mtfSymbol[0]=C,this.selectors[d]=C}for(var ee=y+2,I=[],q=new Uint8Array(o),B=new Uint16Array(s+1),M,ge=0;ge<S;ge++){b=e(5);for(var d=0;d<ee;d++){for(;(b<1||b>s)&&Hn.Error("I gave up a while ago on writing error messages"),!!e(1);)e(1)?b--:b++;q[d]=b}var R,D;R=D=q[0];for(var d=1;d<ee;d++)q[d]>D?D=q[d]:q[d]<R&&(R=q[d]);M=I[ge]={},M.permute=new Int32Array(o),M.limit=new Int32Array(s+1),M.base=new Int32Array(s+1),M.minLen=R,M.maxLen=D;for(var N=M.base,Y=M.limit,oe=0,d=R;d<=D;d++)for(var b=0;b<ee;b++)q[b]==d&&(M.permute[oe++]=b);for(d=R;d<=D;d++)B[d]=Y[d]=0;for(d=0;d<ee;d++)B[q[d]]++;for(oe=b=0,d=R;d<D;d++)oe+=B[d],Y[d]=oe-1,oe<<=1,N[d+1]=oe-(b+=B[d]);Y[D]=oe+B[D]-1,N[R]=0}for(var d=0;d<256;d++)this.mtfSymbol[d]=d,this.byteCount[d]=0;var H,U,ee,Q;for(H=U=ee=Q=0;;){for(ee--||(ee=c-1,Q>=E&&Hn.Error("meow i'm a kitty, that's an error"),M=I[this.selectors[Q++]],N=M.base,Y=M.limit),d=M.minLen,ge=e(d);d>M.maxLen&&Hn.Error("rawr i'm a dinosaur"),!(ge<=Y[d]);)d++,ge=ge<<1|e(1);ge-=N[d],(ge<0||ge>=o)&&Hn.Error("moo i'm a cow");var pe=M.permute[ge];if(pe==a||pe==u){H||(H=1,b=0),pe==a?b+=H:b+=2*H,H<<=1;continue}if(H)for(H=0,U+b>n&&Hn.Error("Boom."),C=this.symToByte[this.mtfSymbol[0]],this.byteCount[C]+=b;b--;)r[U++]=C;if(pe>y)break;U>=n&&Hn.Error("I can't think of anything. Error"),d=pe-1,C=this.mtfSymbol[d];for(var T=d-1;T>=0;T--)this.mtfSymbol[T+1]=this.mtfSymbol[T];this.mtfSymbol[0]=C,C=this.symToByte[C],this.byteCount[C]++,r[U++]=C}(_<0||_>=U)&&Hn.Error("I'm a monkey and I'm throwing something at someone, namely you");for(var ge=0,d=0;d<256;d++)T=ge+this.byteCount[d],this.byteCount[d]=ge,ge=T;for(var d=0;d<U;d++)C=r[d]&255,r[this.byteCount[C]]|=d<<8,this.byteCount[C]++;var be=0,We=0,et=0;U&&(be=r[_],We=be&255,be>>=8,et=-1),U=U;for(var tt,xt,Ne;U;){for(U--,xt=We,be=r[be],We=be&255,be>>=8,et++==3?(tt=We,Ne=xt,We=-1):(tt=1,Ne=We);tt--;)f=(f<<8^this.crcTable[(f>>24^Ne)&255])&4294967295,t(Ne);We!=xt&&(et=0)}return f=(f^-1)>>>0,(f|0)!=(v|0)&&Hn.Error("Error in bzip2: crc32 do not match"),i=(f^(i<<1|i>>>31))&4294967295,i};Tge.exports=na});var Rge=g((Esr,Ige)=>{var Oge=[0,1,3,7,15,31,63,127,255];Ige.exports=function(t){var r=0,n=0,i=t(),s=function(o){if(o===null&&r!=0){r=0,n++;return}for(var a=0;o>0;){n>=i.length&&(n=0,i=t());var u=8-r;r===0&&o>0&&s.bytesRead++,o>=u?(a<<=u,a|=Oge[u]&i[n++],r=0,o-=u):(a<<=o,a|=(i[n]&Oge[o]<<8-o-r)>>8-o-r,r+=o,o=0)}return a};return s.bytesRead=0,s}});var Pge=g((Ssr,qge)=>{var wwt=Cge(),Nge=Age(),Ewt=Rge();qge.exports=Swt;function Swt(){var e=[],t=0,r=0,n=!1,i=!1,s=null,o=null;function a(f){if(r){var p=1e5*r,d=new Int32Array(p),m=[],v=function(_){m.push(_)};return o=Nge.decompress(s,v,d,p,o),o===null?(r=0,!1):(f(Buffer.from(m)),!0)}else return r=Nge.header(s),o=0,!0}var u=0;function c(f){if(!n)try{return a(function(p){f.queue(p),p!==null&&(u+=p.length)})}catch(p){return f.emit("error",p),n=!0,!1}}return wwt(function(p){for(e.push(p),t+=p.length,s===null&&(s=Ewt(function(){return e.shift()}));!n&&t-s.bytesRead+1>=(25e3+1e5*r||4);)c(this)},function(p){for(;!n&&s&&t>s.bytesRead;)c(this);n||(o!==null&&this.emit("error",new Error("input stream ended prematurely")),this.queue(null))})}});var Fge=g((Csr,Lge)=>{"use strict";var kge=PS(),Dge=oge(),Cwt=Lm(),Twt=wge(),Awt=Pge();Lge.exports=()=>e=>!Buffer.isBuffer(e)&&!Cwt(e)?Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`)):Buffer.isBuffer(e)&&(!Dge(e)||Dge(e).ext!=="bz2")?Promise.resolve([]):Buffer.isBuffer(e)?kge()(Twt.decode(e)):kge()(e.pipe(Awt()))});var Bge=g((Tsr,Mge)=>{"use strict";Mge.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i>=0){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Hge=g((Asr,Uge)=>{"use strict";var Owt=require("zlib"),Iwt=PS(),jge=Bge(),Rwt=Lm();Uge.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!Rwt(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!jge(e)||jge(e).ext!=="gz"))return Promise.resolve([]);let t=Owt.createGunzip(),r=Iwt()(t);return Buffer.isBuffer(e)?t.end(e):e.pipe(t),r}});var $ge=g((Osr,zge)=>{"use strict";zge.exports=function(e){return e&&e.length>1?e[0]===255&&e[1]===216&&e[2]===255?{ext:"jpg",mime:"image/jpeg"}:e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?{ext:"png",mime:"image/png"}:e[0]===71&&e[1]===73&&e[2]===70?{ext:"gif",mime:"image/gif"}:e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?{ext:"webp",mime:"image/webp"}:e[0]===70&&e[1]===76&&e[2]===73&&e[3]===70?{ext:"flif",mime:"image/flif"}:(e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42)&&e[8]===67&&e[9]===82?{ext:"cr2",mime:"image/x-canon-cr2"}:e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42?{ext:"tif",mime:"image/tiff"}:e[0]===66&&e[1]===77?{ext:"bmp",mime:"image/bmp"}:e[0]===73&&e[1]===73&&e[2]===188?{ext:"jxr",mime:"image/vnd.ms-photo"}:e[0]===56&&e[1]===66&&e[2]===80&&e[3]===83?{ext:"psd",mime:"image/vnd.adobe.photoshop"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===109&&e[31]===105&&e[32]===109&&e[33]===101&&e[34]===116&&e[35]===121&&e[36]===112&&e[37]===101&&e[38]===97&&e[39]===112&&e[40]===112&&e[41]===108&&e[42]===105&&e[43]===99&&e[44]===97&&e[45]===116&&e[46]===105&&e[47]===111&&e[48]===110&&e[49]===47&&e[50]===101&&e[51]===112&&e[52]===117&&e[53]===98&&e[54]===43&&e[55]===122&&e[56]===105&&e[57]===112?{ext:"epub",mime:"application/epub+zip"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===77&&e[31]===69&&e[32]===84&&e[33]===65&&e[34]===45&&e[35]===73&&e[36]===78&&e[37]===70&&e[38]===47&&e[39]===109&&e[40]===111&&e[41]===122&&e[42]===105&&e[43]===108&&e[44]===108&&e[45]===97&&e[46]===46&&e[47]===114&&e[48]===115&&e[49]===97?{ext:"xpi",mime:"application/x-xpinstall"}:e[0]===80&&e[1]===75&&(e[2]===3||e[2]===5||e[2]===7)&&(e[3]===4||e[3]===6||e[3]===8)?{ext:"zip",mime:"application/zip"}:e[257]===117&&e[258]===115&&e[259]===116&&e[260]===97&&e[261]===114?{ext:"tar",mime:"application/x-tar"}:e[0]===82&&e[1]===97&&e[2]===114&&e[3]===33&&e[4]===26&&e[5]===7&&(e[6]===0||e[6]===1)?{ext:"rar",mime:"application/x-rar-compressed"}:e[0]===31&&e[1]===139&&e[2]===8?{ext:"gz",mime:"application/gzip"}:e[0]===66&&e[1]===90&&e[2]===104?{ext:"bz2",mime:"application/x-bzip2"}:e[0]===55&&e[1]===122&&e[2]===188&&e[3]===175&&e[4]===39&&e[5]===28?{ext:"7z",mime:"application/x-7z-compressed"}:e[0]===120&&e[1]===1?{ext:"dmg",mime:"application/x-apple-diskimage"}:e[0]===0&&e[1]===0&&e[2]===0&&(e[3]===24||e[3]===32)&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112||e[0]===51&&e[1]===103&&e[2]===112&&e[3]===53||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[16]===109&&e[17]===112&&e[18]===52&&e[19]===49&&e[20]===109&&e[21]===112&&e[22]===52&&e[23]===50&&e[24]===105&&e[25]===115&&e[26]===111&&e[27]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===105&&e[9]===115&&e[10]===111&&e[11]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[12]===0&&e[13]===0&&e[14]===0&&e[15]===0?{ext:"mp4",mime:"video/mp4"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===86?{ext:"m4v",mime:"video/x-m4v"}:e[0]===77&&e[1]===84&&e[2]===104&&e[3]===100?{ext:"mid",mime:"audio/midi"}:e[31]===109&&e[32]===97&&e[33]===116&&e[34]===114&&e[35]===111&&e[36]===115&&e[37]===107&&e[38]===97?{ext:"mkv",mime:"video/x-matroska"}:e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?{ext:"webm",mime:"video/webm"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===20&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112?{ext:"mov",mime:"video/quicktime"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===65&&e[9]===86&&e[10]===73?{ext:"avi",mime:"video/x-msvideo"}:e[0]===48&&e[1]===38&&e[2]===178&&e[3]===117&&e[4]===142&&e[5]===102&&e[6]===207&&e[7]===17&&e[8]===166&&e[9]===217?{ext:"wmv",mime:"video/x-ms-wmv"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3].toString(16)[0]==="b"?{ext:"mpg",mime:"video/mpeg"}:e[0]===73&&e[1]===68&&e[2]===51||e[0]===255&&e[1]===251?{ext:"mp3",mime:"audio/mpeg"}:e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===65||e[0]===77&&e[1]===52&&e[2]===65&&e[3]===32?{ext:"m4a",mime:"audio/m4a"}:e[28]===79&&e[29]===112&&e[30]===117&&e[31]===115&&e[32]===72&&e[33]===101&&e[34]===97&&e[35]===100?{ext:"opus",mime:"audio/opus"}:e[0]===79&&e[1]===103&&e[2]===103&&e[3]===83?{ext:"ogg",mime:"audio/ogg"}:e[0]===102&&e[1]===76&&e[2]===97&&e[3]===67?{ext:"flac",mime:"audio/x-flac"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===65&&e[10]===86&&e[11]===69?{ext:"wav",mime:"audio/x-wav"}:e[0]===35&&e[1]===33&&e[2]===65&&e[3]===77&&e[4]===82&&e[5]===10?{ext:"amr",mime:"audio/amr"}:e[0]===37&&e[1]===80&&e[2]===68&&e[3]===70?{ext:"pdf",mime:"application/pdf"}:e[0]===77&&e[1]===90?{ext:"exe",mime:"application/x-msdownload"}:(e[0]===67||e[0]===70)&&e[1]===87&&e[2]===83?{ext:"swf",mime:"application/x-shockwave-flash"}:e[0]===123&&e[1]===92&&e[2]===114&&e[3]===116&&e[4]===102?{ext:"rtf",mime:"application/rtf"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===70&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff",mime:"application/font-woff"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===50&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff2",mime:"application/font-woff"}:e[34]===76&&e[35]===80&&(e[8]===0&&e[9]===0&&e[10]===1||e[8]===1&&e[9]===0&&e[10]===2||e[8]===2&&e[9]===0&&e[10]===2)?{ext:"eot",mime:"application/octet-stream"}:e[0]===0&&e[1]===1&&e[2]===0&&e[3]===0&&e[4]===0?{ext:"ttf",mime:"application/font-sfnt"}:e[0]===79&&e[1]===84&&e[2]===84&&e[3]===79&&e[4]===0?{ext:"otf",mime:"application/font-sfnt"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0?{ext:"ico",mime:"image/x-icon"}:e[0]===70&&e[1]===76&&e[2]===86&&e[3]===1?{ext:"flv",mime:"video/x-flv"}:e[0]===37&&e[1]===33?{ext:"ps",mime:"application/postscript"}:e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0?{ext:"xz",mime:"application/x-xz"}:e[0]===83&&e[1]===81&&e[2]===76&&e[3]===105?{ext:"sqlite",mime:"application/x-sqlite3"}:e[0]===78&&e[1]===69&&e[2]===83&&e[3]===26?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:e[0]===67&&e[1]===114&&e[2]===50&&e[3]===52?{ext:"crx",mime:"application/x-google-chrome-extension"}:e[0]===77&&e[1]===83&&e[2]===67&&e[3]===70||e[0]===73&&e[1]===83&&e[2]===99&&e[3]===40?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62&&e[7]===10&&e[8]===100&&e[9]===101&&e[10]===98&&e[11]===105&&e[12]===97&&e[13]===110&&e[14]===45&&e[15]===98&&e[16]===105&&e[17]===110&&e[18]===97&&e[19]===114&&e[20]===121?{ext:"deb",mime:"application/x-deb"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62?{ext:"ar",mime:"application/x-unix-archive"}:e[0]===237&&e[1]===171&&e[2]===238&&e[3]===219?{ext:"rpm",mime:"application/x-rpm"}:e[0]===31&&e[1]===160||e[0]===31&&e[1]===157?{ext:"Z",mime:"application/x-compress"}:e[0]===76&&e[1]===90&&e[2]===73&&e[3]===80?{ext:"lz",mime:"application/x-lzip"}:e[0]===208&&e[1]===207&&e[2]===17&&e[3]===224&&e[4]===161&&e[5]===177&&e[6]===26&&e[7]===225?{ext:"msi",mime:"application/x-msi"}:null:null}});var Zge=g((Isr,Jge)=>{"use strict";var KL="pending",Wge="settled",DS="fulfilled",LS="rejected",Nwt=function(){},Gge=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",qwt=typeof setImmediate>"u"?setTimeout:setImmediate,J0=[],VL;function Pwt(){for(var e=0;e<J0.length;e++)J0[e][0](J0[e][1]);J0=[],VL=!1}function FS(e,t){J0.push([e,t]),VL||(VL=!0,qwt(Pwt,0))}function kwt(e,t){function r(i){XL(t,i)}function n(i){Z0(t,i)}try{e(r,n)}catch(i){n(i)}}function Vge(e){var t=e.owner,r=t._state,n=t._data,i=e[r],s=e.then;if(typeof i=="function"){r=DS;try{n=i(n)}catch(o){Z0(s,o)}}Kge(s,n)||(r===DS&&XL(s,n),r===LS&&Z0(s,n))}function Kge(e,t){var r;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&(typeof t=="function"||typeof t=="object")){var n=t.then;if(typeof n=="function")return n.call(t,function(i){r||(r=!0,t===i?Xge(e,i):XL(e,i))},function(i){r||(r=!0,Z0(e,i))}),!0}}catch(i){return r||Z0(e,i),!0}return!1}function XL(e,t){(e===t||!Kge(e,t))&&Xge(e,t)}function Xge(e,t){e._state===KL&&(e._state=Wge,e._data=t,FS(Dwt,e))}function Z0(e,t){e._state===KL&&(e._state=Wge,e._data=t,FS(Lwt,e))}function Yge(e){e._then=e._then.forEach(Vge)}function Dwt(e){e._state=DS,Yge(e)}function Lwt(e){e._state=LS,Yge(e),!e._handled&&Gge&&global.process.emit("unhandledRejection",e._data,e)}function Fwt(e){global.process.emit("rejectionHandled",e)}function os(e){if(typeof e!="function")throw new TypeError("Promise resolver "+e+" is not a function");if(!(this instanceof os))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],kwt(e,this)}os.prototype={constructor:os,_state:KL,_then:null,_data:void 0,_handled:!1,then:function(e,t){var r={owner:this,then:new this.constructor(Nwt),fulfilled:e,rejected:t};return(t||e)&&!this._handled&&(this._handled=!0,this._state===LS&&Gge&&FS(Fwt,this)),this._state===DS||this._state===LS?FS(Vge,r):this._then.push(r),r.then},catch:function(e){return this.then(null,e)}};os.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new os(function(t,r){var n=[],i=0;function s(u){return i++,function(c){n[u]=c,--i||t(n)}}for(var o=0,a;o<e.length;o++)a=e[o],a&&typeof a.then=="function"?a.then(s(o),r):n[o]=a;i||t(n)})};os.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new os(function(t,r){for(var n=0,i;n<e.length;n++)i=e[n],i&&typeof i.then=="function"?i.then(t,r):t(i)})};os.resolve=function(e){return e&&typeof e=="object"&&e.constructor===os?e:new os(function(t){t(e)})};os.reject=function(e){return new os(function(t,r){r(e)})};Jge.exports=os});var e0e=g((Rsr,Qge)=>{"use strict";Qge.exports=typeof Promise=="function"?Promise:Zge()});var MS=g((Nsr,r0e)=>{"use strict";var t0e=Object.getOwnPropertySymbols,Mwt=Object.prototype.hasOwnProperty,Bwt=Object.prototype.propertyIsEnumerable;function jwt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Uwt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(s){return t[s]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(s){i[s]=s}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r0e.exports=Uwt()?Object.assign:function(e,t){for(var r,n=jwt(e),i,s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var o in r)Mwt.call(r,o)&&(n[o]=r[o]);if(t0e){i=t0e(r);for(var a=0;a<i.length;a++)Bwt.call(r,i[a])&&(n[i[a]]=r[i[a]])}}return n}});var i0e=g((qsr,n0e)=>{var Hwt=require("stream").PassThrough,zwt=MS();n0e.exports=function(e){e=zwt({},e);var t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);var s=0,o=[],a=new Hwt({objectMode:i});return r&&a.setEncoding(r),a.on("data",function(u){o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=function(){return t?o:n?Buffer.concat(o,s):o.join("")},a.getBufferedLength=function(){return s},a}});var o0e=g((Psr,BS)=>{"use strict";var s0e=e0e(),YL=MS(),$wt=i0e();function JL(e,t){if(!e)return s0e.reject(new Error("Expected a stream"));t=YL({maxBuffer:1/0},t);var r=t.maxBuffer,n,i,s=new s0e(function(o,a){n=$wt(t),e.once("error",u),e.pipe(n),n.on("data",function(){n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=function(){e.unpipe&&e.unpipe(n)};function u(c){c&&(c.bufferedData=n.getBufferedValue()),a(c)}});return s.then(i,i),s.then(function(){return n.getBufferedValue()})}BS.exports=JL;BS.exports.buffer=function(e,t){return JL(e,YL({},t,{encoding:"buffer"}))};BS.exports.array=function(e,t){return JL(e,YL({},t,{array:!0}))}});var l0e=g((ksr,c0e)=>{"use strict";var a0e=function(e,t,r){return function(){for(var n=this,i=new Array(arguments.length),s=0;s<arguments.length;s++)i[s]=arguments[s];return new t(function(o,a){i.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var f=new Array(arguments.length-1),p=1;p<arguments.length;p++)f[p-1]=arguments[p];o(f)}else o(c)}),e.apply(n,i)})}},u0e=c0e.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var n=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},i=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):a0e(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(s,o){var a=e[o];return s[o]=typeof a=="function"&&n(o)?a0e(a,t,r):a,s},i)};u0e.all=u0e});var h0e=g((Dsr,d0e)=>{d0e.exports=jS;function jS(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}jS.prototype.go=function(e){this.pending<this.max?p0e(this,e):this.waiting.push(e)};jS.prototype.wait=function(e){this.pending===0?e(this.error):this.listeners.push(e)};jS.prototype.hold=function(){return f0e(this)};function f0e(e){e.pending+=1;var t=!1;return r;function r(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)p0e(e,e.waiting.shift());else if(e.pending===0){var s=e.listeners;e.listeners=[],s.forEach(n)}}function n(i){i(e.error)}}function p0e(e,t){t(f0e(e))}});var g0e=g(ev=>{var Q0=require("fs"),US=require("util"),ZL=require("stream"),m0e=ZL.Readable,QL=ZL.Writable,Wwt=ZL.PassThrough,Gwt=h0e(),HS=require("events").EventEmitter;ev.createFromBuffer=Vwt;ev.createFromFd=Kwt;ev.BufferSlicer=cu;ev.FdSlicer=uu;US.inherits(uu,HS);function uu(e,t){t=t||{},HS.call(this),this.fd=e,this.pend=new Gwt,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}uu.prototype.read=function(e,t,r,n,i){var s=this;s.pend.go(function(o){Q0.read(s.fd,e,t,r,n,function(a,u,c){o(),i(a,u,c)})})};uu.prototype.write=function(e,t,r,n,i){var s=this;s.pend.go(function(o){Q0.write(s.fd,e,t,r,n,function(a,u,c){o(),i(a,u,c)})})};uu.prototype.createReadStream=function(e){return new zS(this,e)};uu.prototype.createWriteStream=function(e){return new $S(this,e)};uu.prototype.ref=function(){this.refCount+=1};uu.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&Q0.close(e.fd,t);function t(r){r?e.emit("error",r):e.emit("close")}};US.inherits(zS,m0e);function zS(e,t){t=t||{},m0e.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}zS.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null&&(r=Math.min(r,t.endOffset-t.pos)),r<=0){t.destroyed=!0,t.push(null),t.context.unref();return}t.context.pend.go(function(n){if(t.destroyed)return n();var i=new Buffer(r);Q0.read(t.context.fd,i,0,r,t.pos,function(s,o){s?t.destroy(s):o===0?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=o,t.push(i.slice(0,o))),n()})})}};zS.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())};US.inherits($S,QL);function $S(e,t){t=t||{},QL.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end==null?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}$S.prototype._write=function(e,t,r){var n=this;if(!n.destroyed){if(n.pos+e.length>n.endOffset){var i=new Error("maximum file length exceeded");i.code="ETOOBIG",n.destroy(),r(i);return}n.context.pend.go(function(s){if(n.destroyed)return s();Q0.write(n.context.fd,e,0,e.length,n.pos,function(o,a){o?(n.destroy(),s(),r(o)):(n.bytesWritten+=a,n.pos+=a,n.emit("progress"),s(),r())})})}};$S.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())};US.inherits(cu,HS);function cu(e,t){HS.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}cu.prototype.read=function(e,t,r,n,i){var s=n+r,o=s-this.buffer.length,a=o>0?o:r;this.buffer.copy(e,t,n,s),setImmediate(function(){i(null,a)})};cu.prototype.write=function(e,t,r,n,i){e.copy(this.buffer,n,t,t+r),setImmediate(function(){i(null,r,e)})};cu.prototype.createReadStream=function(e){e=e||{};var t=new Wwt(e);t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),n=0;;){var i=n+this.maxChunkSize;if(i>=r.length){n<r.length&&t.write(r.slice(n,r.length));break}t.write(r.slice(n,i)),n=i}return t.end(),t.destroy=function(){t.destroyed=!0},t};cu.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new QL(e);return r.start=e.start||0,r.endOffset=e.end==null?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(n,i,s){if(!r.destroyed){var o=r.pos+n.length;if(o>r.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG",r.destroyed=!0,s(a);return}n.copy(t.buffer,r.pos,0,n.length),r.bytesWritten+=n.length,r.pos=o,r.emit("progress"),s()}},r.destroy=function(){r.destroyed=!0},r};cu.prototype.ref=function(){this.refCount+=1};cu.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function Vwt(e,t){return new cu(e,t)}function Kwt(e,t){return new uu(e,t)}});var y0e=g((Fsr,x0e)=>{var Oc=require("buffer").Buffer,eF=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(eF=new Int32Array(eF));function v0e(e){if(Oc.isBuffer(e))return e;var t=typeof Oc.alloc=="function"&&typeof Oc.from=="function";if(typeof e=="number")return t?Oc.alloc(e):new Oc(e);if(typeof e=="string")return t?Oc.from(e):new Oc(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Xwt(e){var t=v0e(4);return t.writeInt32BE(e,0),t}function tF(e,t){e=v0e(e),Oc.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=~~t^-1,n=0;n<e.length;n++)r=eF[(r^e[n])&255]^r>>>8;return r^-1}function rF(){return Xwt(tF.apply(null,arguments))}rF.signed=function(){return tF.apply(null,arguments)};rF.unsigned=function(){return tF.apply(null,arguments)>>>0};x0e.exports=rF});var T0e=g(sa=>{var nF=require("fs"),Ywt=require("zlib"),_0e=g0e(),Jwt=y0e(),VS=require("util"),KS=require("events").EventEmitter,b0e=require("stream").Transform,iF=require("stream").PassThrough,Zwt=require("stream").Writable;sa.open=Qwt;sa.fromFd=w0e;sa.fromBuffer=eEt;sa.fromRandomAccessReader=sF;sa.dosDateTimeToDate=S0e;sa.validateFileName=C0e;sa.ZipFile=Ic;sa.Entry=tv;sa.RandomAccessReader=Rc;function Qwt(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!0),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=GS),nF.open(e,"r",function(n,i){if(n)return r(n);w0e(i,t,function(s,o){s&&nF.close(i,GS),r(s,o)})})}function w0e(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!1),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=GS),nF.fstat(e,function(n,i){if(n)return r(n);var s=_0e.createFromFd(e,{autoClose:!0});sF(s,i.size,t,r)})}function eEt(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose=!1,t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1);var n=_0e.createFromBuffer(e,{maxChunkSize:65536});sF(n,e.length,t,r)}function sF(e,t,r,n){typeof r=="function"&&(n=r,r=null),r==null&&(r={}),r.autoClose==null&&(r.autoClose=!0),r.lazyEntries==null&&(r.lazyEntries=!1),r.decodeStrings==null&&(r.decodeStrings=!0);var i=!!r.decodeStrings;if(r.validateEntrySizes==null&&(r.validateEntrySizes=!0),r.strictFileNames==null&&(r.strictFileNames=!1),n==null&&(n=GS),typeof t!="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var s=22,o=65535,a=Math.min(s+o,t),u=ia(a),c=t-u.length;rh(e,u,0,a,c,function(f){if(f)return n(f);for(var p=a-s;p>=0;p-=1)if(u.readUInt32LE(p)===101010256){var d=u.slice(p),m=d.readUInt16LE(4);if(m!==0)return n(new Error("multi-disk zip files are not supported: found disk number: "+m));var v=d.readUInt16LE(10),_=d.readUInt32LE(16),b=d.readUInt16LE(20),y=d.length-s;if(b!==y)return n(new Error("invalid comment length. expected: "+y+". found: "+b));var T=i?WS(d,22,d.length,!1):d.slice(22);if(!(v===65535||_===4294967295))return n(null,new Ic(e,_,t,v,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames));var S=ia(20),E=c+p-S.length;rh(e,S,0,S.length,E,function(C){if(C)return n(C);if(S.readUInt32LE(0)!==117853008)return n(new Error("invalid zip64 end of central directory locator signature"));var I=nh(S,8),q=ia(56);rh(e,q,0,q.length,I,function(B){return B?n(B):q.readUInt32LE(0)!==101075792?n(new Error("invalid zip64 end of central directory record signature")):(v=nh(q,32),_=nh(q,48),n(null,new Ic(e,_,t,v,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames)))})});return}n(new Error("end of central directory record signature not found"))})}VS.inherits(Ic,KS);function Ic(e,t,r,n,i,s,o,a,u,c){var f=this;KS.call(f),f.reader=e,f.reader.on("error",function(p){E0e(f,p)}),f.reader.once("close",function(){f.emit("close")}),f.readEntryCursor=t,f.fileSize=r,f.entryCount=n,f.comment=i,f.entriesRead=0,f.autoClose=!!s,f.lazyEntries=!!o,f.decodeStrings=!!a,f.validateEntrySizes=!!u,f.strictFileNames=!!c,f.isOpen=!0,f.emittedError=!1,f.lazyEntries||f._readEntry()}Ic.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())};function xo(e,t){e.autoClose&&e.close(),E0e(e,t)}function E0e(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}Ic.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};Ic.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){e.autoClose&&e.close(),!e.emittedError&&e.emit("end")});return}if(!e.emittedError){var t=ia(46);rh(e.reader,t,0,t.length,e.readEntryCursor,function(r){if(r)return xo(e,r);if(!e.emittedError){var n=new tv,i=t.readUInt32LE(0);if(i!==33639248)return xo(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(n.versionMadeBy=t.readUInt16LE(4),n.versionNeededToExtract=t.readUInt16LE(6),n.generalPurposeBitFlag=t.readUInt16LE(8),n.compressionMethod=t.readUInt16LE(10),n.lastModFileTime=t.readUInt16LE(12),n.lastModFileDate=t.readUInt16LE(14),n.crc32=t.readUInt32LE(16),n.compressedSize=t.readUInt32LE(20),n.uncompressedSize=t.readUInt32LE(24),n.fileNameLength=t.readUInt16LE(28),n.extraFieldLength=t.readUInt16LE(30),n.fileCommentLength=t.readUInt16LE(32),n.internalFileAttributes=t.readUInt16LE(36),n.externalFileAttributes=t.readUInt32LE(38),n.relativeOffsetOfLocalHeader=t.readUInt32LE(42),n.generalPurposeBitFlag&64)return xo(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=ia(n.fileNameLength+n.extraFieldLength+n.fileCommentLength),rh(e.reader,t,0,t.length,e.readEntryCursor,function(s){if(s)return xo(e,s);if(!e.emittedError){var o=(n.generalPurposeBitFlag&2048)!==0;n.fileName=e.decodeStrings?WS(t,0,n.fileNameLength,o):t.slice(0,n.fileNameLength);var a=n.fileNameLength+n.extraFieldLength,u=t.slice(n.fileNameLength,a);n.extraFields=[];for(var c=0;c<u.length-3;){var f=u.readUInt16LE(c+0),p=u.readUInt16LE(c+2),d=c+4,m=d+p;if(m>u.length)return xo(e,new Error("extra field length exceeds extra field buffer size"));var v=ia(p);u.copy(v,0,d,m),n.extraFields.push({id:f,data:v}),c=m}if(n.fileComment=e.decodeStrings?WS(t,a,a+n.fileCommentLength,o):t.slice(a,a+n.fileCommentLength),n.comment=n.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,n.uncompressedSize===4294967295||n.compressedSize===4294967295||n.relativeOffsetOfLocalHeader===4294967295){for(var _=null,c=0;c<n.extraFields.length;c++){var b=n.extraFields[c];if(b.id===1){_=b.data;break}}if(_==null)return xo(e,new Error("expected zip64 extended information extra field"));var y=0;if(n.uncompressedSize===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include uncompressed size"));n.uncompressedSize=nh(_,y),y+=8}if(n.compressedSize===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include compressed size"));n.compressedSize=nh(_,y),y+=8}if(n.relativeOffsetOfLocalHeader===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include relative header offset"));n.relativeOffsetOfLocalHeader=nh(_,y),y+=8}}if(e.decodeStrings)for(var c=0;c<n.extraFields.length;c++){var b=n.extraFields[c];if(b.id===28789){if(b.data.length<6||b.data.readUInt8(0)!==1)continue;var T=b.data.readUInt32LE(1);if(Jwt.unsigned(t.slice(0,n.fileNameLength))!==T)continue;n.fileName=WS(b.data,5,b.data.length,!0);break}}if(e.validateEntrySizes&&n.compressionMethod===0){var S=n.uncompressedSize;if(n.isEncrypted()&&(S+=12),n.compressedSize!==S){var E="compressed/uncompressed size mismatch for stored file: "+n.compressedSize+" != "+n.uncompressedSize;return xo(e,new Error(E))}}if(e.decodeStrings){e.strictFileNames||(n.fileName=n.fileName.replace(/\\/g,"/"));var C=C0e(n.fileName,e.validateFileNameOptions);if(C!=null)return xo(e,new Error(C))}e.emit("entry",n),e.lazyEntries||e._readEntry()}})}})}};Ic.prototype.openReadStream=function(e,t,r){var n=this,i=0,s=e.compressedSize;if(r==null)r=t,t={};else{if(t.decrypt!=null){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(t.decrypt!==!1)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&t.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(t.decompress!=null){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(t.decompress===!1||t.decompress===!0))throw new Error("invalid options.decompress value: "+t.decompress)}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&t.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(t.start!=null){if(i=t.start,i<0)throw new Error("options.start < 0");if(i>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){if(s=t.end,s<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<i)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&t.decrypt!==!1)return r(new Error("entry is encrypted, and options.decrypt !== false"));n.reader.ref();var o=ia(30);rh(n.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,function(a){try{if(a)return r(a);var u=o.readUInt32LE(0);if(u!==67324752)return r(new Error("invalid local file header signature: 0x"+u.toString(16)));var c=o.readUInt16LE(26),f=o.readUInt16LE(28),p=e.relativeOffsetOfLocalHeader+o.length+c+f,d;if(e.compressionMethod===0)d=!1;else if(e.compressionMethod===8)d=t.decompress!=null?t.decompress:!0;else return r(new Error("unsupported compression method: "+e.compressionMethod));var m=p,v=m+e.compressedSize;if(e.compressedSize!==0&&v>n.fileSize)return r(new Error("file data overflows file bounds: "+m+" + "+e.compressedSize+" > "+n.fileSize));var _=n.reader.createReadStream({start:m+i,end:m+s}),b=_;if(d){var y=!1,T=Ywt.createInflateRaw();_.on("error",function(S){setImmediate(function(){y||T.emit("error",S)})}),_.pipe(T),n.validateEntrySizes?(b=new rv(e.uncompressedSize),T.on("error",function(S){setImmediate(function(){y||b.emit("error",S)})}),T.pipe(b)):b=T,b.destroy=function(){y=!0,T!==b&&T.unpipe(b),_.unpipe(T),_.destroy()}}r(null,b)}finally{n.reader.unref()}})};function tv(){}tv.prototype.getLastModDate=function(){return S0e(this.lastModFileDate,this.lastModFileTime)};tv.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};tv.prototype.isCompressed=function(){return this.compressionMethod===8};function S0e(e,t){var r=e&31,n=(e>>5&15)-1,i=(e>>9&127)+1980,s=0,o=(t&31)*2,a=t>>5&63,u=t>>11&31;return new Date(i,n,r,u,a,o,s)}function C0e(e){return e.indexOf("\\")!==-1?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:e.split("/").indexOf("..")!==-1?"invalid relative path: "+e:null}function rh(e,t,r,n,i,s){if(n===0)return setImmediate(function(){s(null,ia(0))});e.read(t,r,n,i,function(o,a){if(o)return s(o);if(a<n)return s(new Error("unexpected EOF"));s()})}VS.inherits(rv,b0e);function rv(e){b0e.call(this),this.actualByteCount=0,this.expectedByteCount=e}rv.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)};rv.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};VS.inherits(Rc,KS);function Rc(){KS.call(this),this.refCount=0}Rc.prototype.ref=function(){this.refCount+=1};Rc.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(t);function t(r){if(r)return e.emit("error",r);e.emit("close")}};Rc.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var n=new iF;return setImmediate(function(){n.end()}),n}var i=this._readStreamForRange(t,r),s=!1,o=new XS(this);i.on("error",function(u){setImmediate(function(){s||o.emit("error",u)})}),o.destroy=function(){i.unpipe(o),o.unref(),i.destroy()};var a=new rv(r-t);return o.on("error",function(u){setImmediate(function(){s||a.emit("error",u)})}),a.destroy=function(){s=!0,o.unpipe(a),o.destroy()},i.pipe(o).pipe(a)};Rc.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};Rc.prototype.read=function(e,t,r,n,i){var s=this.createReadStream({start:n,end:n+r}),o=new Zwt,a=0;o._write=function(u,c,f){u.copy(e,t+a,0,u.length),a+=u.length,f()},o.on("finish",i),s.on("error",function(u){i(u)}),s.pipe(o)};Rc.prototype.close=function(e){setImmediate(e)};VS.inherits(XS,iF);function XS(e){iF.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}XS.prototype._flush=function(e){this.unref(),e()};XS.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var tEt="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function WS(e,t,r,n){if(n)return e.toString("utf8",t,r);for(var i="",s=t;s<r;s++)i+=tEt[e[s]];return i}function nh(e,t){var r=e.readUInt32LE(t),n=e.readUInt32LE(t+4);return n*4294967296+r}var ia;typeof Buffer.allocUnsafe=="function"?ia=function(e){return Buffer.allocUnsafe(e)}:ia=function(e){return new Buffer(e)};function GS(e){if(e)throw e}});var R0e=g((Bsr,I0e)=>{"use strict";var A0e=$ge(),rEt=o0e(),O0e=l0e(),nEt=T0e(),iEt=(e,t)=>{let s=e.versionMadeBy>>8;return(t&61440)===40960?"symlink":(t&61440)===16384||s===0&&e.externalFileAttributes===16?"directory":"file"},sEt=(e,t)=>{let r={mode:e.externalFileAttributes>>16&65535,mtime:e.getLastModDate(),path:e.fileName};return r.type=iEt(e,r.mode),r.mode===0&&r.type==="directory"&&(r.mode=493),r.mode===0&&(r.mode=420),O0e(t.openReadStream.bind(t))(e).then(rEt.buffer).then(n=>(r.data=n,r.type==="symlink"&&(r.linkname=n.toString()),r)).catch(n=>{throw t.close(),n})},oEt=e=>new Promise((t,r)=>{let n=[];e.readEntry(),e.on("entry",i=>{sEt(i,e).catch(r).then(s=>{n.push(s),e.readEntry()})}),e.on("error",r),e.on("end",()=>t(n))});I0e.exports=()=>e=>Buffer.isBuffer(e)?!A0e(e)||A0e(e).ext!=="zip"?Promise.resolve([]):O0e(nEt.fromBuffer)(e,{lazyEntries:!0}).then(oEt):Promise.reject(new TypeError(`Expected a Buffer, got ${typeof e}`))});var P0e=g((jsr,q0e)=>{"use strict";var N0e=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};q0e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):N0e(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?N0e(s,t):s}return n}});var F0e=g((Usr,oF)=>{"use strict";var aEt=require("fs"),af=require("path"),k0e=P0e(),D0e={mode:511&~process.umask(),fs:aEt},L0e=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(af.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};oF.exports=(e,t)=>Promise.resolve().then(()=>{L0e(e),t=Object.assign({},D0e,t);let r=k0e(t.fs.mkdir),n=k0e(t.fs.stat),i=s=>r(s,t.mode).then(()=>s).catch(o=>{if(o.code==="ENOENT"){if(o.message.includes("null bytes")||af.dirname(s)===s)throw o;return i(af.dirname(s)).then(()=>i(s))}return n(s).then(a=>a.isDirectory()?s:Promise.reject()).catch(()=>{throw o})});return i(af.resolve(e))});oF.exports.sync=(e,t)=>{L0e(e),t=Object.assign({},D0e,t);let r=n=>{try{t.fs.mkdirSync(n,t.mode)}catch(i){if(i.code==="ENOENT"){if(i.message.includes("null bytes")||af.dirname(n)===n)throw i;return r(af.dirname(n)),r(n)}try{if(!t.fs.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}return n};return r(af.resolve(e))}});var U0e=g((Hsr,j0e)=>{"use strict";var M0e=function(e,t,r){return function(){for(var n=this,i=new Array(arguments.length),s=0;s<arguments.length;s++)i[s]=arguments[s];return new t(function(o,a){i.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var f=new Array(arguments.length-1),p=1;p<arguments.length;p++)f[p-1]=arguments[p];o(f)}else o(c)}),e.apply(n,i)})}},B0e=j0e.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var n=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},i=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):M0e(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(s,o){var a=e[o];return s[o]=typeof a=="function"&&n(o)?M0e(a,t,r):a,s},i)};B0e.all=B0e});var z0e=g((zsr,H0e)=>{"use strict";H0e.exports=function(t,r){if(r){if(typeof r!="object")throw new TypeError(String(r)+" is not an object. Expected an object that has boolean `includeZero` property.");if("includeZero"in r){if(typeof r.includeZero!="boolean")throw new TypeError(String(r.includeZero)+" is neither true nor false. `includeZero` option must be a Boolean value.");if(r.includeZero&&t===0)return!0}}return Number.isSafeInteger(t)&&t>=1}});var W0e=g(($sr,$0e)=>{"use strict";var nv=require("path"),iv=require("util"),uEt=z0e();$0e.exports=function(t,r,n){if(typeof t!="string")throw new TypeError(iv.inspect(t)+" is not a string. First argument to strip-dirs must be a path string.");if(nv.posix.isAbsolute(t)||nv.win32.isAbsolute(t))throw new Error(`${t} is an absolute path. strip-dirs requires a relative path.`);if(!uEt(r,{includeZero:!0}))throw new Error("The Second argument of strip-dirs must be a natural number or 0, but received "+iv.inspect(r)+".");if(n){if(typeof n!="object")throw new TypeError(iv.inspect(n)+" is not an object. Expected an object with a boolean `disallowOverflow` property.");if(Array.isArray(n))throw new TypeError(iv.inspect(n)+" is an array. Expected an object with a boolean `disallowOverflow` property.");if("disallowOverflow"in n&&typeof n.disallowOverflow!="boolean")throw new TypeError(iv.inspect(n.disallowOverflow)+" is neither true nor false. `disallowOverflow` option must be a Boolean value.")}else n={disallowOverflow:!1};let i=nv.normalize(t).split(nv.sep);if(i.length>1&&i[0]==="."&&i.shift(),r>i.length-1){if(n.disallowOverflow)throw new RangeError("Cannot strip more directories than there are.");r=i.length-1}return nv.join.apply(null,i.slice(r))}});var cF=g((Wsr,G0e)=>{"use strict";var YS=require("path"),cEt=In(),lEt=PS(),fEt=Fge(),pEt=Hge(),dEt=R0e(),aF=F0e(),hEt=U0e(),mEt=W0e(),as=hEt(cEt),gEt=(e,t)=>t.plugins.length===0?Promise.resolve([]):Promise.all(t.plugins.map(r=>r(e,t))).then(r=>r.reduce((n,i)=>n.concat(i))),uF=(e,t)=>as.realpath(e).catch(r=>{let n=YS.dirname(e);return uF(n,t)}).then(r=>{if(r.indexOf(t)!==0)throw new Error("Refusing to create a directory outside the output path.");return aF(e).then(as.realpath)}),vEt=(e,t)=>as.readlink(e).catch(r=>null).then(r=>{if(r)throw new Error("Refusing to write into a symlink");return t}),xEt=(e,t,r)=>gEt(e,r).then(n=>(r.strip>0&&(n=n.map(i=>(i.path=mEt(i.path,r.strip),i)).filter(i=>i.path!==".")),typeof r.filter=="function"&&(n=n.filter(r.filter)),typeof r.map=="function"&&(n=n.map(r.map)),t?Promise.all(n.map(i=>{let s=YS.join(t,i.path),o=i.mode&~process.umask(),a=new Date;return i.type==="directory"?aF(t).then(u=>as.realpath(u)).then(u=>uF(s,u)).then(()=>as.utimes(s,a,i.mtime)).then(()=>i):aF(t).then(u=>as.realpath(u)).then(u=>uF(YS.dirname(s),u).then(()=>u)).then(u=>i.type==="file"?vEt(s,u):u).then(u=>as.realpath(YS.dirname(s)).then(c=>{if(c.indexOf(u)!==0)throw new Error("Refusing to write outside output directory: "+c)})).then(()=>i.type==="link"||i.type==="symlink"&&process.platform==="win32"?as.link(i.linkname,s):i.type==="symlink"?as.symlink(i.linkname,s):as.writeFile(s,i.data,{mode:o})).then(()=>i.type==="file"&&as.utimes(s,a,i.mtime)).then(()=>i)})):n));G0e.exports=(e,t,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?Promise.reject(new TypeError("Input file required")):(typeof t=="object"&&(r=t,t=null),r=Object.assign({plugins:[lEt(),fEt(),pEt(),dEt()]},r),(typeof e=="string"?as.readFile(e):Promise.resolve(e)).then(i=>xEt(i,t,r)))});var K0e=g((Gsr,V0e)=>{"use strict";var yEt=/[|\\{}()[\]^$+*?.]/g;V0e.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(yEt,"\\$&")}});var lF=g((Vsr,X0e)=>{"use strict";var _Et=K0e();X0e.exports=function(e,t){if(typeof e!="string"||typeof t!="string")throw new TypeError("Expected a string");return e.replace(new RegExp("(?:"+_Et(t)+"){2,}","g"),t)}});var pF=g((Ksr,fF)=>{"use strict";fF.exports=()=>/[<>:"\/\\|?*\x00-\x1F]/g;fF.exports.windowsNames=()=>/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i});var J0e=g((Xsr,Y0e)=>{"use strict";var bEt=/[|\\{}()[\]^$+*?.]/g;Y0e.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(bEt,"\\$&")}});var dF=g((Ysr,Z0e)=>{"use strict";var wEt=J0e();Z0e.exports=function(e,t){if(typeof e!="string"||typeof t!="string")throw new TypeError;return t=wEt(t),e.replace(new RegExp("^"+t+"|"+t+"$","g"),"")}});var eve=g((Jsr,mF)=>{"use strict";var JS=require("path"),EEt=lF(),hF=pF(),SEt=dF(),CEt=100,Q0e=/[\u0000-\u001f\u0080-\u009f]/g,TEt=/^\.+/,ZS=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t.replacement===void 0?"!":t.replacement;if(hF().test(r)&&Q0e.test(r))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(hF(),r),e=e.replace(Q0e,r),e=e.replace(TEt,r),r.length>0&&(e=EEt(e,r),e=e.length>1?SEt(e,r):e),e=hF.windowsNames().test(e)?e+r:e,e=e.slice(0,CEt),e};ZS.path=(e,t)=>(e=JS.resolve(e),JS.join(JS.dirname(e),ZS(JS.basename(e),t)));mF.exports=ZS;mF.exports.default=ZS});var nve=g((Zsr,rve)=>{var AEt=V0(),OEt=jL(),gF=require("fs"),sv=function(){},IEt=/^v?\.0/.test(process.version),QS=function(e){return typeof e=="function"},REt=function(e){return!IEt||!gF?!1:(e instanceof(gF.ReadStream||sv)||e instanceof(gF.WriteStream||sv))&&QS(e.close)},NEt=function(e){return e.setHeader&&QS(e.abort)},qEt=function(e,t,r,n){n=AEt(n);var i=!1;e.on("close",function(){i=!0}),OEt(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,REt(e))return e.close(sv);if(NEt(e))return e.abort();if(QS(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},tve=function(e){e()},PEt=function(e,t){return e.pipe(t)},kEt=function(){var e=Array.prototype.slice.call(arguments),t=QS(e[e.length-1]||sv)&&e.pop()||sv;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,a=s>0;return qEt(i,o,a,function(u){r||(r=u),u&&n.forEach(tve),!o&&(n.forEach(tve),t(r))})});return e.reduce(PEt)};rve.exports=kEt});var sve=g((Qsr,ive)=>{"use strict";var{PassThrough:DEt}=require("stream");ive.exports=e=>{e=Object.assign({},e);let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new DEt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var ove=g((eor,ov)=>{"use strict";var LEt=nve(),FEt=sve(),e1=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};function vF(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let{maxBuffer:r}=t,n;return new Promise((i,s)=>{let o=a=>{a&&(a.bufferedData=n.getBufferedValue()),s(a)};n=LEt(e,FEt(t),a=>{if(a){o(a);return}i()}),n.on("data",()=>{n.getBufferedLength()>r&&o(new e1)})}).then(()=>n.getBufferedValue())}ov.exports=vF;ov.exports.buffer=(e,t)=>vF(e,Object.assign({},t,{encoding:"buffer"}));ov.exports.array=(e,t)=>vF(e,Object.assign({},t,{array:!0}));ov.exports.MaxBufferError=e1});var uve=g((tor,ave)=>{"use strict";ave.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}});var dve=g((ror,pve)=>{"use strict";var fve="%[a-f0-9]{2}",cve=new RegExp("("+fve+")|([^%]+?)","gi"),lve=new RegExp("("+fve+")+","gi");function xF(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],xF(r),xF(n))}function MEt(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(cve)||[],r=1;r<t.length;r++)e=xF(t,r).join(""),t=e.match(cve)||[];return e}}function BEt(e){for(var t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=lve.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=MEt(r[0]);n!==r[0]&&(t[r[0]]=n)}r=lve.exec(e)}t["%C2"]="\uFFFD";for(var i=Object.keys(t),s=0;s<i.length;s++){var o=i[s];e=e.replace(new RegExp(o,"g"),t[o])}return e}pve.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return BEt(e)}}});var yve=g(av=>{"use strict";var jEt=uve(),mve=MS(),hve=dve();function UEt(e){switch(e.arrayFormat){case"index":return function(t,r,n){return r===null?[us(t,e),"[",n,"]"].join(""):[us(t,e),"[",us(n,e),"]=",us(r,e)].join("")};case"bracket":return function(t,r){return r===null?us(t,e):[us(t,e),"[]=",us(r,e)].join("")};default:return function(t,r){return r===null?us(t,e):[us(t,e),"=",us(r,e)].join("")}}}function HEt(e){var t;switch(e.arrayFormat){case"index":return function(r,n,i){if(t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return function(r,n,i){if(t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),t){if(i[r]===void 0){i[r]=[n];return}}else{i[r]=n;return}i[r]=[].concat(i[r],n)};default:return function(r,n,i){if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function us(e,t){return t.encode?t.strict?jEt(e):encodeURIComponent(e):e}function gve(e){return Array.isArray(e)?e.sort():typeof e=="object"?gve(Object.keys(e)).sort(function(t,r){return Number(t)-Number(r)}).map(function(t){return e[t]}):e}function vve(e){var t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function xve(e,t){t=mve({arrayFormat:"none"},t);var r=HEt(t),n=Object.create(null);return typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e)?n:(e.split("&").forEach(function(i){var s=i.replace(/\+/g," ").split("="),o=s.shift(),a=s.length>0?s.join("="):void 0;a=a===void 0?null:hve(a),r(hve(o),a,n)}),Object.keys(n).sort().reduce(function(i,s){var o=n[s];return o&&typeof o=="object"&&!Array.isArray(o)?i[s]=gve(o):i[s]=o,i},Object.create(null)))}av.extract=vve;av.parse=xve;av.stringify=function(e,t){var r={encode:!0,strict:!0,arrayFormat:"none"};t=mve(r,t),t.sort===!1&&(t.sort=function(){});var n=UEt(t);return e?Object.keys(e).sort(t.sort).map(function(i){var s=e[i];if(s===void 0)return"";if(s===null)return us(i,t);if(Array.isArray(s)){var o=[];return s.slice().forEach(function(a){a!==void 0&&o.push(n(i,a,o.length))}),o.join("&")}return us(i,t)+"="+us(s,t)}).filter(function(i){return i.length>0}).join("&"):""};av.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:xve(vve(e),t)}}});var yF=g((ior,_ve)=>{"use strict";_ve.exports=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\``);return e=e.trim(),t=Object.assign({https:!1},t),/^\.*\/|^(?!localhost)\w+:/.test(e)?e:e.replace(/^(?!(?:\w+:)?\/\/)/,t.https?"https://":"http://")}});var _F=g((sor,bve)=>{"use strict";var zEt=Object.prototype.toString;bve.exports=function(e){var t;return zEt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var Eve=g((oor,wve)=>{"use strict";var bF=_F();wve.exports=(e,t)=>{if(!bF(e))throw new TypeError("Expected a plain object");if(t=t||{},typeof t=="function")throw new TypeError("Specify the compare function as an option instead");let r=t.deep,n=[],i=[],s=o=>{let a=n.indexOf(o);if(a!==-1)return i[a];let u={},c=Object.keys(o).sort(t.compare);n.push(o),i.push(u);for(let f=0;f<c.length;f++){let p=c[f],d=o[p];if(r&&Array.isArray(d)){let m=[];for(let v=0;v<d.length;v++)m[v]=bF(d[v])?s(d[v]):d[v];u[p]=m;continue}u[p]=r&&bF(d)?s(d):d}return u};return s(e)}});var Ave=g((aor,Tve)=>{"use strict";var wF=require("url"),$Et=require("punycode"),Sve=yve(),WEt=yF(),GEt=Eve(),VEt={"http:":80,"https:":443,"ftp:":21},KEt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cve(e,t){return t.some(r=>r instanceof RegExp?r.test(e):r===e)}Tve.exports=(e,t)=>{if(t=Object.assign({normalizeProtocol:!0,normalizeHttps:!1,stripFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},t),typeof e!="string")throw new TypeError("Expected a string");let r=e.startsWith("//");e=WEt(e.trim()).replace(/^\/\//,"http://");let n=wF.parse(e);if(t.normalizeHttps&&n.protocol==="https:"&&(n.protocol="http:"),!n.hostname&&!n.pathname)throw new Error("Invalid URL");delete n.host,delete n.query,t.stripFragment&&delete n.hash;let i=VEt[n.protocol];if(Number(n.port)===i&&delete n.port,n.pathname&&(n.pathname=n.pathname.replace(/\/{2,}/g,"/")),n.pathname&&(n.pathname=decodeURI(n.pathname)),t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let o=n.pathname.split("/"),a=o[o.length-1];Cve(a,t.removeDirectoryIndex)&&(o=o.slice(0,o.length-1),n.pathname=o.slice(1).join("/")+"/")}if(KEt[n.protocol]){let o=n.protocol+"//"+n.hostname,a=wF.resolve(o,n.pathname);n.pathname=a.replace(o,"")}n.hostname&&(n.hostname=$Et.toUnicode(n.hostname).toLowerCase(),n.hostname=n.hostname.replace(/\.$/,""),t.stripWWW&&(n.hostname=n.hostname.replace(/^www\./,""))),n.search==="?"&&delete n.search;let s=Sve.parse(n.search);if(Array.isArray(t.removeQueryParameters))for(let o in s)Cve(o,t.removeQueryParameters)&&delete s[o];return t.sortQueryParameters&&(n.search=Sve.stringify(GEt(s))),n.search!==null&&(n.search=decodeURIComponent(n.search)),e=wF.format(n),(t.removeTrailingSlash||n.pathname==="/")&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),e}});var Ive=g((uor,Ove)=>{"use strict";var XEt=require("stream").PassThrough;Ove.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new XEt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var Rve=g((cor,t1)=>{"use strict";var YEt=Ive();function EF(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=YEt(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}t1.exports=EF;t1.exports.buffer=(e,t)=>EF(e,Object.assign({},t,{encoding:"buffer"}));t1.exports.array=(e,t)=>EF(e,Object.assign({},t,{array:!0}))});var qve=g((lor,Nve)=>{"use strict";function JEt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ZEt=[200,203,204,206,300,301,404,405,410,414,501],QEt=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],eSt={connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},tSt={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function SF(e){var t={};if(!e)return t;for(var r=e.trim().split(/\s*,\s*/),s=r,n=Array.isArray(s),i=0,s=n?s:s[Symbol.iterator]();;){var o;if(n){if(i>=s.length)break;o=s[i++]}else{if(i=s.next(),i.done)break;o=i.value}var a=o,u=a.split(/\s*=\s*/,2),c=u[0],f=u[1];t[c]=f===void 0?!0:f.replace(/^"|"$/g,"")}return t}function rSt(e){var t=[];for(var r in e){var n=e[r];t.push(n===!0?r:r+"="+n)}if(t.length)return t.join(", ")}Nve.exports=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.shared,s=n.cacheHeuristic,o=n.immutableMinTimeToLive,a=n.ignoreCargoCult,u=n._fromObject;if(JEt(this,e),u){this._fromObject(u);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(t),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=o!==void 0?o:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=SF(r.headers["cache-control"]),this._method="method"in t?t.method:"GET",this._url=t.url,this._host=t.headers.host,this._noAuthorization=!t.headers.authorization,this._reqHeaders=r.headers.vary?t.headers:null,this._reqcc=SF(t.headers["cache-control"]),a&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":rSt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!r.headers["cache-control"]&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}return e.prototype.now=function(){return Date.now()},e.prototype.storable=function(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&QEt.indexOf(this._status)!==-1&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||ZEt.indexOf(this._status)!==-1))},e.prototype._hasExplicitExpiration=function(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires},e.prototype._assertRequestHasHeaders=function(r){if(!r||!r.headers)throw Error("Request headers missing")},e.prototype.satisfiesWithoutRevalidation=function(r){this._assertRequestHasHeaders(r);var n=SF(r.headers["cache-control"]);if(n["no-cache"]||/no-cache/.test(r.headers.pragma)||n["max-age"]&&this.age()>n["max-age"]||n["min-fresh"]&&this.timeToLive()<1e3*n["min-fresh"])return!1;if(this.stale()){var i=n["max-stale"]&&!this._rescc["must-revalidate"]&&(n["max-stale"]===!0||n["max-stale"]>this.age()-this.maxAge());if(!i)return!1}return this._requestMatches(r,!1)},e.prototype._requestMatches=function(r,n){return(!this._url||this._url===r.url)&&this._host===r.headers.host&&(!r.method||this._method===r.method||n&&r.method==="HEAD")&&this._varyMatches(r)},e.prototype._allowsStoringAuthenticated=function(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]},e.prototype._varyMatches=function(r){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;for(var n=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/),o=n,i=Array.isArray(o),s=0,o=i?o:o[Symbol.iterator]();;){var a;if(i){if(s>=o.length)break;a=o[s++]}else{if(s=o.next(),s.done)break;a=s.value}var u=a;if(r.headers[u]!==this._reqHeaders[u])return!1}return!0},e.prototype._copyWithoutHopByHopHeaders=function(r){var n={};for(var i in r)eSt[i]||(n[i]=r[i]);if(r.connection)for(var s=r.connection.trim().split(/\s*,\s*/),u=s,o=Array.isArray(u),a=0,u=o?u:u[Symbol.iterator]();;){var c;if(o){if(a>=u.length)break;c=u[a++]}else{if(a=u.next(),a.done)break;c=a.value}var f=c;delete n[f]}if(n.warning){var p=n.warning.split(/,/).filter(function(d){return!/^\s*1[0-9][0-9]/.test(d)});p.length?n.warning=p.join(",").trim():delete n.warning}return n},e.prototype.responseHeaders=function(){var r=this._copyWithoutHopByHopHeaders(this._resHeaders),n=this.age();return n>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(r.warning=(r.warning?`${r.warning}, `:"")+'113 - "rfc7234 5.5.4"'),r.age=`${Math.round(n)}`,r},e.prototype.date=function(){var r=Date.parse(this._resHeaders.date),n=8*3600*1e3;return Number.isNaN(r)||r<this._responseTime-n||r>this._responseTime+n?this._responseTime:r},e.prototype.age=function(){var r=Math.max(0,(this._responseTime-this.date())/1e3);if(this._resHeaders.age){var n=this._ageValue();n>r&&(r=n)}var i=(this.now()-this._responseTime)/1e3;return r+i},e.prototype._ageValue=function(){var r=parseInt(this._resHeaders.age);return isFinite(r)?r:0},e.prototype.maxAge=function(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);var r=this._rescc.immutable?this._immutableMinTtl:0,n=this.date();if(this._resHeaders.expires){var i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<n?0:Math.max(r,(i-n)/1e3)}if(this._resHeaders["last-modified"]){var s=Date.parse(this._resHeaders["last-modified"]);if(isFinite(s)&&n>s)return Math.max(r,(n-s)/1e3*this._cacheHeuristic)}return r},e.prototype.timeToLive=function(){return Math.max(0,this.maxAge()-this.age())*1e3},e.prototype.stale=function(){return this.maxAge()<=this.age()},e.fromObject=function(r){return new this(void 0,void 0,{_fromObject:r})},e.prototype._fromObject=function(r){if(this._responseTime)throw Error("Reinitialized");if(!r||r.v!==1)throw Error("Invalid serialization");this._responseTime=r.t,this._isShared=r.sh,this._cacheHeuristic=r.ch,this._immutableMinTtl=r.imm!==void 0?r.imm:24*3600*1e3,this._status=r.st,this._resHeaders=r.resh,this._rescc=r.rescc,this._method=r.m,this._url=r.u,this._host=r.h,this._noAuthorization=r.a,this._reqHeaders=r.reqh,this._reqcc=r.reqcc},e.prototype.toObject=function(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}},e.prototype.revalidationHeaders=function(r){this._assertRequestHasHeaders(r);var n=this._copyWithoutHopByHopHeaders(r.headers);if(delete n["if-range"],!this._requestMatches(r,!0)||!this.storable())return delete n["if-none-match"],delete n["if-modified-since"],n;this._resHeaders.etag&&(n["if-none-match"]=n["if-none-match"]?`${n["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);var i=n["accept-ranges"]||n["if-match"]||n["if-unmodified-since"]||this._method&&this._method!="GET";if(i){if(delete n["if-modified-since"],n["if-none-match"]){var s=n["if-none-match"].split(/,/).filter(function(o){return!/^\s*W\//.test(o)});s.length?n["if-none-match"]=s.join(",").trim():delete n["if-none-match"]}}else this._resHeaders["last-modified"]&&!n["if-modified-since"]&&(n["if-modified-since"]=this._resHeaders["last-modified"]);return n},e.prototype.revalidatedPolicy=function(r,n){if(this._assertRequestHasHeaders(r),!n||!n.headers)throw Error("Response headers missing");var i=!1;if(n.status!==void 0&&n.status!=304?i=!1:n.headers.etag&&!/^\s*W\//.test(n.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===n.headers.etag:this._resHeaders.etag&&n.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===n.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===n.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!n.headers.etag&&!n.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(r,n),modified:!0};var s={};for(var o in this._resHeaders)s[o]=o in n.headers&&!tSt[o]?n.headers[o]:this._resHeaders[o];var a=Object.assign({},n,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(r,a),modified:!1}},e}()});var CF=g((por,Pve)=>{"use strict";Pve.exports=function(e){for(var t={},r=Object.keys(Object(e)),n=0;n<r.length;n++)t[r[n].toLowerCase()]=e[r[n]];return t}});var Dve=g((dor,kve)=>{"use strict";var nSt=require("stream").Readable,iSt=CF(),TF=class extends nSt{constructor(t,r,n,i){if(typeof t!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof i!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=t,this.headers=iSt(r),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}};kve.exports=TF});var Fve=g((hor,Lve)=>{"use strict";Lve.exports=function(e){for(var t={},r=Object.keys(Object(e)),n=0;n<r.length;n++)t[r[n].toLowerCase()]=e[r[n]];return t}});var r1=g((mor,Mve)=>{"use strict";var sSt=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Mve.exports=(e,t)=>{let r=new Set(Object.keys(e).concat(sSt));for(let n of r)n in t||(t[n]=typeof e[n]=="function"?e[n].bind(e):e[n])}});var jve=g((gor,Bve)=>{"use strict";var oSt=require("stream").PassThrough,aSt=r1(),uSt=e=>{if(!(e&&e.pipe))throw new TypeError("Parameter `response` must be a response stream.");let t=new oSt;return aSt(e,t),e.pipe(t)};Bve.exports=uSt});var Uve=g(AF=>{AF.stringify=function e(t){if(typeof t>"u")return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&typeof t=="object"){var r="",n=Array.isArray(t);r=n?"[":"{";var i=!0;for(var s in t){var o=typeof t[s]=="function"||!n&&typeof t[s]>"u";Object.hasOwnProperty.call(t,s)&&!o&&(i||(r+=","),i=!1,n?t[s]==null?r+="null":r+=e(t[s]):t[s]!==void 0&&(r+=e(s)+":"+e(t[s])))}return r+=n?"]":"}",r}else return typeof t=="string"?JSON.stringify(/^:/.test(t)?":"+t:t):typeof t>"u"?"null":JSON.stringify(t)};AF.parse=function(e){return JSON.parse(e,function(t,r){return typeof r=="string"?/^:base64:/.test(r)?new Buffer(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var $ve=g((xor,zve)=>{"use strict";var cSt=require("events"),Hve=Uve(),lSt=e=>{let t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){let r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map},OF=class extends cSt{constructor(t,r){if(super(),this.opts=Object.assign({namespace:"keyv"},typeof t=="string"?{uri:t}:t,r),!this.opts.store){let n=Object.assign({},this.opts);this.opts.store=lSt(n)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(t){return`${this.opts.namespace}:${t}`}get(t){t=this._getKeyPrefix(t);let r=this.opts.store;return Promise.resolve().then(()=>r.get(t)).then(n=>{if(n=typeof n=="string"?Hve.parse(n):n,n!==void 0){if(typeof n.expires=="number"&&Date.now()>n.expires){this.delete(t);return}return n.value}})}set(t,r,n){t=this._getKeyPrefix(t),typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let i=this.opts.store;return Promise.resolve().then(()=>{let s=typeof n=="number"?Date.now()+n:null;return r={value:r,expires:s},i.set(t,Hve.stringify(r),n)}).then(()=>!0)}delete(t){t=this._getKeyPrefix(t);let r=this.opts.store;return Promise.resolve().then(()=>r.delete(t))}clear(){let t=this.opts.store;return Promise.resolve().then(()=>t.clear())}};zve.exports=OF});var Kve=g((yor,Vve)=>{"use strict";var fSt=require("events"),Wve=require("url"),pSt=Ave(),dSt=Rve(),IF=qve(),Gve=Dve(),hSt=Fve(),mSt=jve(),gSt=$ve(),yo=class{constructor(t,r){if(typeof t!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new gSt({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(t)}createCacheableRequest(t){return(r,n)=>{typeof r=="string"&&(r=Wve.parse(r)),r=Object.assign({headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1},r),r.headers=hSt(r.headers);let i=new fSt,s=pSt(Wve.format(r)),o=`${r.method}:${s}`,a=!1,u=!1,c=p=>{u=!0;let d=m=>{if(a){let _=IF.fromObject(a.cachePolicy).revalidatedPolicy(p,m);if(!_.modified){let b=_.policy.responseHeaders();m=new Gve(m.statusCode,b,a.body,a.url),m.cachePolicy=_.policy,m.fromCache=!0}}m.fromCache||(m.cachePolicy=new IF(p,m),m.fromCache=!1);let v;p.cache&&m.cachePolicy.storable()?(v=mSt(m),dSt.buffer(m).then(_=>{let b={cachePolicy:m.cachePolicy.toObject(),url:m.url,statusCode:m.fromCache?a.statusCode:m.statusCode,body:_},y=p.strictTtl?m.cachePolicy.timeToLive():void 0;return this.cache.set(o,b,y)}).catch(_=>i.emit("error",new yo.CacheError(_)))):p.cache&&a&&this.cache.delete(o).catch(_=>i.emit("error",new yo.CacheError(_))),i.emit("response",v||m),typeof n=="function"&&n(v||m)};try{let m=t(p,d);i.emit("request",m)}catch(m){i.emit("error",new yo.RequestError(m))}},f=p=>Promise.resolve().then(()=>p.cache?this.cache.get(o):void 0).then(d=>{if(typeof d>"u")return c(p);let m=IF.fromObject(d.cachePolicy);if(m.satisfiesWithoutRevalidation(p)){let v=m.responseHeaders(),_=new Gve(d.statusCode,v,d.body,d.url);_.cachePolicy=m,_.fromCache=!0,i.emit("response",_),typeof n=="function"&&n(_)}else a=d,p.headers=m.revalidationHeaders(p),c(p)});return this.cache.on("error",p=>i.emit("error",new yo.CacheError(p))),f(r).catch(p=>{r.automaticFailover&&!u&&c(r),i.emit("error",new yo.CacheError(p))}),i}}};yo.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}};yo.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}};Vve.exports=yo});var Xve=g((wor,NF)=>{"use strict";var RF=require("stream");function ih(e,t,r){typeof r>"u"&&(r=t,t=e,e=null),RF.Duplex.call(this,e),typeof r.read!="function"&&(r=new RF.Readable(e).wrap(r)),this._writable=t,this._readable=r,this._waiting=!1;var n=this;t.once("finish",function(){n.end()}),this.once("finish",function(){t.end()}),r.on("readable",function(){n._waiting&&(n._waiting=!1,n._read())}),r.once("end",function(){n.push(null)}),(!e||typeof e.bubbleErrors>"u"||e.bubbleErrors)&&(t.on("error",function(i){n.emit("error",i)}),r.on("error",function(i){n.emit("error",i)}))}ih.prototype=Object.create(RF.Duplex.prototype,{constructor:{value:ih}});ih.prototype._write=function(t,r,n){this._writable.write(t,r,n)};ih.prototype._read=function(){for(var t,r=0;(t=this._readable.read())!==null;)this.push(t),r++;r===0&&(this._waiting=!0)};NF.exports=function(t,r,n){return new ih(t,r,n)};NF.exports.DuplexWrapper=ih});var qF=g((Eor,Yve)=>{Yve.exports=require("stream")});var Zve=g((Sor,PF)=>{"use strict";function vSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Jve=Ms().Buffer,uv=require("util");function xSt(e,t,r){e.copy(t,r)}PF.exports=function(){function e(){vSt(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},e.prototype.concat=function(r){if(this.length===0)return Jve.alloc(0);for(var n=Jve.allocUnsafe(r>>>0),i=this.head,s=0;i;)xSt(i.data,n,s),s+=i.data.length,i=i.next;return n},e}();uv&&uv.inspect&&uv.inspect.custom&&(PF.exports.prototype[uv.inspect.custom]=function(){var e=uv.inspect({length:this.length});return this.constructor.name+" "+e})});var kF=g((Cor,Qve)=>{"use strict";var n1=nu();function ySt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n1.nextTick(i1,this,e)):n1.nextTick(i1,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n1.nextTick(i1,r,s)):n1.nextTick(i1,r,s):t&&t(s)}),this)}function _St(){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 i1(e,t){e.emit("error",t)}Qve.exports={destroy:ySt,undestroy:_St}});var LF=g((Tor,axe)=>{"use strict";var uf=nu();axe.exports=Jr;function txe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){MSt(t,e)}}var bSt=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:uf.nextTick,sh;Jr.WritableState=lv;var rxe=Object.create(vo());rxe.inherits=vn();var wSt={deprecate:a_()},nxe=qF(),o1=Ms().Buffer,ESt=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function SSt(e){return o1.from(e)}function CSt(e){return o1.isBuffer(e)||e instanceof ESt}var ixe=kF();rxe.inherits(Jr,nxe);function TSt(){}function lv(e,t){sh=sh||cf(),e=e||{};var r=t instanceof sh;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){PSt(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new txe(this)}lv.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(lv.prototype,"buffer",{get:wSt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var s1;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(s1=Function.prototype[Symbol.hasInstance],Object.defineProperty(Jr,Symbol.hasInstance,{value:function(e){return s1.call(this,e)?!0:this!==Jr?!1:e&&e._writableState instanceof lv}})):s1=function(e){return e instanceof this};function Jr(e){if(sh=sh||cf(),!s1.call(Jr,this)&&!(this instanceof sh))return new Jr(e);this._writableState=new lv(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),nxe.call(this)}Jr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ASt(e,t){var r=new Error("write after end");e.emit("error",r),uf.nextTick(t,r)}function OSt(e,t,r,n){var i=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),uf.nextTick(n,s),i=!1),i}Jr.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&CSt(e);return s&&!o1.isBuffer(e)&&(e=SSt(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=TSt),n.ended?ASt(this,r):(s||OSt(this,n,e,r))&&(n.pendingcb++,i=RSt(this,n,s,e,t,r)),i};Jr.prototype.cork=function(){var e=this._writableState;e.corked++};Jr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&sxe(this,e))};Jr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function ISt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=o1.from(t,r)),t}Object.defineProperty(Jr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function RSt(e,t,r,n,i,s){if(!r){var o=ISt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else DF(e,t,!1,a,n,i,s);return u}function DF(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function NSt(e,t,r,n,i){--t.pendingcb,r?(uf.nextTick(i,n),uf.nextTick(cv,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),cv(e,t))}function qSt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function PSt(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(qSt(r),t)NSt(e,r,n,t,i);else{var s=oxe(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sxe(e,r),n?bSt(exe,e,r,s,i):exe(e,r,s,i)}}function exe(e,t,r,n){r||kSt(e,t),t.pendingcb--,n(),cv(e,t)}function kSt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function sxe(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,DF(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new txe(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(DF(e,t,!1,p,u,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Jr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Jr.prototype._writev=null;Jr.prototype.end=function(e,t,r){var n=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||FSt(this,n,r)};function oxe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function DSt(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),cv(e,t)})}function LSt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,uf.nextTick(DSt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function cv(e,t){var r=oxe(t);return r&&(LSt(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function FSt(e,t,r){t.ending=!0,cv(e,t),r&&(t.finished?uf.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function MSt(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Jr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Jr.prototype.destroy=ixe.destroy;Jr.prototype._undestroy=ixe.undestroy;Jr.prototype._destroy=function(e,t){this.end(),t(e)}});var cf=g((Aor,fxe)=>{"use strict";var uxe=nu(),BSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};fxe.exports=lu;var cxe=Object.create(vo());cxe.inherits=vn();var lxe=BF(),MF=LF();cxe.inherits(lu,lxe);for(FF=BSt(MF.prototype),a1=0;a1<FF.length;a1++)u1=FF[a1],lu.prototype[u1]||(lu.prototype[u1]=MF.prototype[u1]);var FF,u1,a1;function lu(e){if(!(this instanceof lu))return new lu(e);lxe.call(this,e),MF.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",jSt)}Object.defineProperty(lu.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function jSt(){this.allowHalfOpen||this._writableState.ended||uxe.nextTick(USt,this)}function USt(e){e.end()}Object.defineProperty(lu.prototype,"destroyed",{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)}});lu.prototype._destroy=function(e,t){this.push(null),this.end(),uxe.nextTick(t,e)}});var HF=g(dxe=>{"use strict";var UF=Ms().Buffer,pxe=UF.isEncoding||function(e){switch(e=""+e,e&&e.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 HSt(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function zSt(e){var t=HSt(e);if(typeof t!="string"&&(UF.isEncoding===pxe||!pxe(e)))throw new Error("Unknown encoding: "+e);return t||e}dxe.StringDecoder=fv;function fv(e){this.encoding=zSt(e);var t;switch(this.encoding){case"utf16le":this.text=XSt,this.end=YSt,t=4;break;case"utf8":this.fillLast=GSt,t=4;break;case"base64":this.text=JSt,this.end=ZSt,t=3;break;default:this.write=QSt,this.end=e1t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=UF.allocUnsafe(t)}fv.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};fv.prototype.end=KSt;fv.prototype.text=VSt;fv.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function jF(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function $St(e,t,r){var n=t.length-1;if(n<r)return 0;var i=jF(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=jF(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=jF(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function WSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function GSt(e){var t=this.lastTotal-this.lastNeed,r=WSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function VSt(e,t){var r=$St(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function KSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function XSt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function YSt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function JSt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function ZSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function QSt(e){return e.toString(this.encoding)}function e1t(e){return e&&e.length?this.write(e):""}});var BF=g((Ror,Cxe)=>{"use strict";var ah=nu();Cxe.exports=ur;var t1t=dL(),pv;ur.ReadableState=_xe;var Ior=require("events").EventEmitter,vxe=function(e,t){return e.listeners(t).length},VF=qF(),dv=Ms().Buffer,r1t=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n1t(e){return dv.from(e)}function i1t(e){return dv.isBuffer(e)||e instanceof r1t}var xxe=Object.create(vo());xxe.inherits=vn();var zF=require("util"),Rt=void 0;zF&&zF.debuglog?Rt=zF.debuglog("stream"):Rt=function(){};var s1t=Zve(),yxe=kF(),oh;xxe.inherits(ur,VF);var $F=["error","close","destroy","pause","resume"];function o1t(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):t1t(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function _xe(e,t){pv=pv||cf(),e=e||{};var r=t instanceof pv;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new s1t,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(oh||(oh=HF().StringDecoder),this.decoder=new oh(e.encoding),this.encoding=e.encoding)}function ur(e){if(pv=pv||cf(),!(this instanceof ur))return new ur(e);this._readableState=new _xe(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),VF.call(this)}Object.defineProperty(ur.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});ur.prototype.destroy=yxe.destroy;ur.prototype._undestroy=yxe.undestroy;ur.prototype._destroy=function(e,t){this.push(null),t(e)};ur.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=dv.from(e,t),t=""),n=!0),bxe(this,e,t,!1,n)};ur.prototype.unshift=function(e){return bxe(this,e,null,!0,!1)};function bxe(e,t,r,n,i){var s=e._readableState;if(t===null)s.reading=!1,l1t(e,s);else{var o;i||(o=a1t(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==dv.prototype&&(t=n1t(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):WF(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?WF(e,s,t,!1):wxe(e,s)):WF(e,s,t,!1))):n||(s.reading=!1)}return u1t(s)}function WF(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&c1(e)),wxe(e,t)}function a1t(e,t){var r;return!i1t(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function u1t(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}ur.prototype.isPaused=function(){return this._readableState.flowing===!1};ur.prototype.setEncoding=function(e){return oh||(oh=HF().StringDecoder),this._readableState.decoder=new oh(e),this._readableState.encoding=e,this};var hxe=8388608;function c1t(e){return e>=hxe?e=hxe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function mxe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=c1t(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}ur.prototype.read=function(e){Rt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Rt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?GF(this):c1(this),null;if(e=mxe(e,t),e===0&&t.ended)return t.length===0&&GF(this),null;var n=t.needReadable;Rt("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,Rt("length less than watermark",n)),t.ended||t.reading?(n=!1,Rt("reading or ended",n)):n&&(Rt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=mxe(r,t)));var i;return e>0?i=Exe(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&GF(this)),i!==null&&this.emit("data",i),i};function l1t(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,c1(e)}}function c1(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Rt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ah.nextTick(gxe,e):gxe(e))}function gxe(e){Rt("emit readable"),e.emit("readable"),KF(e)}function wxe(e,t){t.readingMore||(t.readingMore=!0,ah.nextTick(f1t,e,t))}function f1t(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Rt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}ur.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};ur.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,Rt("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=i?a:b;n.endEmitted?ah.nextTick(s):r.once("end",s),e.on("unpipe",o);function o(y,T){Rt("onunpipe"),y===r&&T&&T.hasUnpiped===!1&&(T.hasUnpiped=!0,f())}function a(){Rt("onend"),e.end()}var u=p1t(r);e.on("drain",u);var c=!1;function f(){Rt("cleanup"),e.removeListener("close",v),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",d),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var p=!1;r.on("data",d);function d(y){Rt("ondata"),p=!1;var T=e.write(y);T===!1&&!p&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&Sxe(n.pipes,e)!==-1)&&!c&&(Rt("false write response, pause",n.awaitDrain),n.awaitDrain++,p=!0),r.pause())}function m(y){Rt("onerror",y),b(),e.removeListener("error",m),vxe(e,"error")===0&&e.emit("error",y)}o1t(e,"error",m);function v(){e.removeListener("finish",_),b()}e.once("close",v);function _(){Rt("onfinish"),e.removeListener("close",v),b()}e.once("finish",_);function b(){Rt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Rt("pipe resume"),r.resume()),e};function p1t(e){return function(){var t=e._readableState;Rt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&vxe(e,"data")&&(t.flowing=!0,KF(e))}}ur.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Sxe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};ur.prototype.on=function(e,t){var r=VF.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&c1(this):ah.nextTick(d1t,this))}return r};ur.prototype.addListener=ur.prototype.on;function d1t(e){Rt("readable nexttick read 0"),e.read(0)}ur.prototype.resume=function(){var e=this._readableState;return e.flowing||(Rt("resume"),e.flowing=!0,h1t(this,e)),this};function h1t(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ah.nextTick(m1t,e,t))}function m1t(e,t){t.reading||(Rt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),KF(e),t.flowing&&!t.reading&&e.read(0)}ur.prototype.pause=function(){return Rt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Rt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function KF(e){var t=e._readableState;for(Rt("flow",t.flowing);t.flowing&&e.read()!==null;);}ur.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Rt("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Rt("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(o){return function(){return e[o].apply(e,arguments)}}(i));for(var s=0;s<$F.length;s++)e.on($F[s],this.emit.bind(this,$F[s]));return this._read=function(o){Rt("wrapped _read",o),n&&(n=!1,e.resume())},this};Object.defineProperty(ur.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ur._fromList=Exe;function Exe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=g1t(e,t.buffer,t.decoder),r}function g1t(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?v1t(e,t):x1t(e,t),n}function v1t(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),e-=o,e===0){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}function x1t(e,t){var r=dv.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),e-=o,e===0){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}function GF(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ah.nextTick(y1t,t,e))}function y1t(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Sxe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var XF=g((Nor,Oxe)=>{"use strict";Oxe.exports=fu;var l1=cf(),Axe=Object.create(vo());Axe.inherits=vn();Axe.inherits(fu,l1);function _1t(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function fu(e){if(!(this instanceof fu))return new fu(e);l1.call(this,e),this._transformState={afterTransform:_1t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",b1t)}function b1t(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){Txe(e,t,r)}):Txe(this,null,null)}fu.prototype.push=function(e,t){return this._transformState.needTransform=!1,l1.prototype.push.call(this,e,t)};fu.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};fu.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};fu.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};fu.prototype._destroy=function(e,t){var r=this;l1.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function Txe(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var qxe=g((qor,Nxe)=>{"use strict";Nxe.exports=hv;var Ixe=XF(),Rxe=Object.create(vo());Rxe.inherits=vn();Rxe.inherits(hv,Ixe);function hv(e){if(!(this instanceof hv))return new hv(e);Ixe.call(this,e)}hv.prototype._transform=function(e,t,r){r(null,e)}});var Pxe=g((zn,f1)=>{var oa=require("stream");process.env.READABLE_STREAM==="disable"&&oa?(f1.exports=oa,zn=f1.exports=oa.Readable,zn.Readable=oa.Readable,zn.Writable=oa.Writable,zn.Duplex=oa.Duplex,zn.Transform=oa.Transform,zn.PassThrough=oa.PassThrough,zn.Stream=oa):(zn=f1.exports=BF(),zn.Stream=oa||zn,zn.Readable=zn,zn.Writable=LF(),zn.Duplex=cf(),zn.Transform=XF(),zn.PassThrough=qxe())});var Bxe=g((Por,Mxe)=>{var kxe=Pxe().Readable,w1t=vn();Mxe.exports=p1;p1.ctor=Dxe;p1.obj=C1t;var E1t=Dxe();function S1t(e){return e=e.slice(),function(t,r){var n=null,i=e.length?e.shift():null;i instanceof Error&&(n=i,i=null),r(n,i)}}function p1(e,t){(typeof e!="object"||Array.isArray(e))&&(t=e,e={});var r=new E1t(e);return r._from=Array.isArray(t)?S1t(t):t||Lxe,r}function Dxe(e,t){typeof e=="function"&&(t=e,e={}),e=Fxe(e),w1t(r,kxe);function r(n){if(!(this instanceof r))return new r(n);this._reading=!1,this._callback=o,this.destroyed=!1,kxe.call(this,n||e);var i=this,s=this._readableState.highWaterMark;function o(a,u){if(!i.destroyed){if(a)return i.destroy(a);if(u===null)return i.push(null);i._reading=!1,i.push(u)&&i._read(s)}}}return r.prototype._from=t||Lxe,r.prototype._read=function(n){this._reading||this.destroyed||(this._reading=!0,this._from(n,this._callback))},r.prototype.destroy=function(n){if(!this.destroyed){this.destroyed=!0;var i=this;process.nextTick(function(){n&&i.emit("error",n),i.emit("close")})}},r}function C1t(e,t){return(typeof e=="function"||Array.isArray(e))&&(t=e,e={}),e=Fxe(e),e.objectMode=!0,e.highWaterMark=16,p1(e,t)}function Lxe(){}function Fxe(e){return e=e||{},e}});var Uxe=g((kor,jxe)=>{"use strict";jxe.exports=e=>e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"});var $xe=g((Dor,YF)=>{"use strict";var Hxe=Bxe(),zxe=Uxe();YF.exports=e=>{Array.isArray(e)&&(e=e.slice());let t,r;n(e);function n(i){e=i,t=zxe(e)?e:null,r=!t&&e[Symbol.iterator]&&typeof e!="string"&&!Buffer.isBuffer(e)?e[Symbol.iterator]():null}return Hxe(function i(s,o){if(t){t.then(n).then(()=>i.call(this,s,o),o);return}if(r){let u=r.next();setImmediate(o,null,u.done?null:u.value);return}if(e.length===0){setImmediate(o,null,null);return}let a=e.slice(0,s);e=e.slice(s),setImmediate(o,null,a)})};YF.exports.obj=e=>{Array.isArray(e)&&(e=e.slice());let t,r;n(e);function n(i){e=i,t=zxe(e)?e:null,r=!t&&e[Symbol.iterator]?e[Symbol.iterator]():null}return Hxe.obj(function i(s,o){if(t){t.then(n).then(()=>i.call(this,s,o),o);return}if(r){let a=r.next();setImmediate(o,null,a.done?null:a.value);return}this.push(e),setImmediate(o,null,null)})}});var QF=g((JF,ZF)=>{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var Wxe=require("util"),T1t=Object.prototype.toString,mv=e=>t=>typeof t===e,d1=e=>{let t=T1t.call(e).slice(8,-1);return t||null},Zr=e=>t=>d1(t)===e;function aa(e){if(e===null)return"null";if(e===!0||e===!1)return"boolean";let t=typeof e;if(t==="undefined")return"undefined";if(t==="string")return"string";if(t==="number")return"number";if(t==="symbol")return"symbol";if(aa.function_(e))return"Function";if(Array.isArray(e))return"Array";if(Buffer.isBuffer(e))return"Buffer";let r=d1(e);if(r)return r;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}(function(e){let t=y=>typeof y=="object";e.undefined=mv("undefined"),e.string=mv("string"),e.number=mv("number"),e.function_=mv("function"),e.null_=y=>y===null,e.class_=y=>e.function_(y)&&y.toString().startsWith("class "),e.boolean=y=>y===!0||y===!1,e.symbol=mv("symbol"),e.array=Array.isArray,e.buffer=Buffer.isBuffer,e.nullOrUndefined=y=>e.null_(y)||e.undefined(y),e.object=y=>!e.nullOrUndefined(y)&&(e.function_(y)||t(y)),e.iterable=y=>!e.nullOrUndefined(y)&&e.function_(y[Symbol.iterator]),e.generator=y=>e.iterable(y)&&e.function_(y.next)&&e.function_(y.throw),e.nativePromise=Zr("Promise");let r=y=>!e.null_(y)&&t(y)&&e.function_(y.then)&&e.function_(y.catch);e.promise=y=>e.nativePromise(y)||r(y);let n=y=>T=>e.function_(T)&&e.function_(T.constructor)&&T.constructor.name===y;e.generatorFunction=n("GeneratorFunction"),e.asyncFunction=n("AsyncFunction"),e.boundFunction=y=>e.function_(y)&&!y.hasOwnProperty("prototype"),e.regExp=Zr("RegExp"),e.date=Zr("Date"),e.error=Zr("Error"),e.map=Zr("Map"),e.set=Zr("Set"),e.weakMap=Zr("WeakMap"),e.weakSet=Zr("WeakSet"),e.int8Array=Zr("Int8Array"),e.uint8Array=Zr("Uint8Array"),e.uint8ClampedArray=Zr("Uint8ClampedArray"),e.int16Array=Zr("Int16Array"),e.uint16Array=Zr("Uint16Array"),e.int32Array=Zr("Int32Array"),e.uint32Array=Zr("Uint32Array"),e.float32Array=Zr("Float32Array"),e.float64Array=Zr("Float64Array"),e.arrayBuffer=Zr("ArrayBuffer"),e.sharedArrayBuffer=Zr("SharedArrayBuffer"),e.dataView=Zr("DataView"),e.directInstanceOf=(y,T)=>e.object(y)&&e.object(T)&&Object.getPrototypeOf(y)===T.prototype,e.truthy=y=>!!y,e.falsy=y=>!y,e.nan=y=>Number.isNaN(y);let i=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=y=>e.null_(y)||i.has(typeof y),e.integer=y=>Number.isInteger(y),e.safeInteger=y=>Number.isSafeInteger(y),e.plainObject=y=>{let T;return d1(y)==="Object"&&(T=Object.getPrototypeOf(y),T===null||T===Object.getPrototypeOf({}))};let s=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=y=>{let T=d1(y);return T===null?!1:s.has(T)};let o=y=>e.safeInteger(y)&&y>-1;e.arrayLike=y=>!e.nullOrUndefined(y)&&!e.function_(y)&&o(y.length),e.inRange=(y,T)=>{if(e.number(T))return y>=Math.min(0,T)&&y<=Math.max(T,0);if(e.array(T)&&T.length===2)return y>=Math.min.apply(null,T)&&y<=Math.max.apply(null,T);throw new TypeError(`Invalid range: ${Wxe.inspect(T)}`)};let a=1,u=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=y=>e.object(y)&&y.nodeType===a&&e.string(y.nodeName)&&!e.plainObject(y)&&u.every(T=>T in y),e.nodeStream=y=>!e.nullOrUndefined(y)&&t(y)&&e.function_(y.pipe),e.infinite=y=>y===1/0||y===-1/0;let c=y=>T=>e.integer(T)&&Math.abs(T%2)===y;e.even=c(0),e.odd=c(1);let f=y=>e.string(y)&&/\S/.test(y)===!1,p=y=>(e.string(y)||e.array(y))&&y.length===0,d=y=>!e.map(y)&&!e.set(y)&&e.object(y)&&Object.keys(y).length===0,m=y=>(e.map(y)||e.set(y))&&y.size===0;e.empty=y=>e.falsy(y)||p(y)||d(y)||m(y),e.emptyOrWhitespace=y=>e.empty(y)||f(y);let v=(y,T,S)=>{let E=Array.prototype.slice.call(S,1);if(e.function_(T)===!1)throw new TypeError(`Invalid predicate: ${Wxe.inspect(T)}`);if(E.length===0)throw new TypeError("Invalid number of values");return y.call(E,T)};function _(y){return v(Array.prototype.some,y,arguments)}e.any=_;function b(y){return v(Array.prototype.every,y,arguments)}e.all=b})(aa||(aa={}));Object.defineProperties(aa,{class:{value:aa.class_},function:{value:aa.function_},null:{value:aa.null_}});JF.default=aa;ZF.exports=aa;ZF.exports.default=aa});var Vxe=g((Lor,Gxe)=>{"use strict";var A1t=require("stream").PassThrough;Gxe.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new A1t({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var Kxe=g((For,h1)=>{"use strict";var O1t=Vxe();function e4(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=O1t(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}h1.exports=e4;h1.exports.buffer=(e,t)=>e4(e,Object.assign({},t,{encoding:"buffer"}));h1.exports.array=(e,t)=>e4(e,Object.assign({},t,{array:!0}))});var Yxe=g((Mor,Xxe)=>{"use strict";Xxe.exports=function(e,t){if(e.timeoutTimer)return e;var r=isNaN(t)?t:{socket:t,connect:t},n=e._headers?" to "+e._headers.host:"";r.connect!==void 0&&(e.timeoutTimer=setTimeout(function(){e.abort();var a=new Error("Connection timed out on request"+n);a.code="ETIMEDOUT",e.emit("error",a)},r.connect)),e.on("socket",function(a){if(!(a.connecting||a._connecting)){s();return}a.once("connect",s)});function i(){e.timeoutTimer&&(clearTimeout(e.timeoutTimer),e.timeoutTimer=null)}function s(){i(),r.socket!==void 0&&e.setTimeout(r.socket,function(){e.abort();var a=new Error("Socket timed out on request"+n);a.code="ESOCKETTIMEDOUT",e.emit("error",a)})}return e.on("error",i)}});var Zxe=g((Bor,Jxe)=>{"use strict";var I1t=require("url"),R1t=yF();Jxe.exports=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\` instead.`);let r=R1t(e,Object.assign({https:!0},t));return I1t.parse(r)}});var t4=g((jor,Qxe)=>{"use strict";function N1t(e){var t={protocol:e.protocol,hostname:e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname}${e.search}`,href:e.href};return e.port!==""&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username}:${e.password}`),t}Qxe.exports=N1t});var tye=g((Uor,eye)=>{"use strict";var q1t=require("stream").PassThrough,P1t=require("zlib"),k1t=r1();eye.exports=e=>{if(["gzip","deflate"].indexOf(e.headers["content-encoding"])===-1)return e;let t=P1t.createUnzip(),r=new q1t;return k1t(e,r),t.on("error",n=>{if(n.code==="Z_BUF_ERROR"){r.end();return}r.emit("error",n)}),e.pipe(t).pipe(r),r}});var nye=g((Hor,rye)=>{"use strict";var D1t=["ETIMEDOUT","ECONNRESET","EADDRINUSE","ESOCKETTIMEDOUT","ECONNREFUSED","EPIPE","EHOSTUNREACH","EAI_AGAIN"],L1t=["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED"];rye.exports=function(e){return!e||!e.code||D1t.indexOf(e.code)!==-1?!0:L1t.indexOf(e.code)===-1}});var sye=g((zor,iye)=>{"use strict";iye.exports=typeof Symbol=="function"&&typeof Symbol("")=="symbol"});var aye=g(($or,oye)=>{"use strict";oye.exports=sye()&&typeof Symbol.toStringTag=="symbol"});var cye=g((Wor,uye)=>{"use strict";uye.exports=function(t){return typeof t=="object"&&t!==null}});var n4=g((Gor,fye)=>{"use strict";var F1t=aye(),lye=cye(),M1t=Object.prototype.toString,B1t="[object URL]",j1t="hash",U1t="host",H1t="hostname",z1t="href",$1t="password",W1t="pathname",G1t="port",V1t="protocol",K1t="search",X1t="username",r4=(e,t)=>lye(e)?!F1t&&M1t.call(e)===B1t?!0:!(!(z1t in e)||!(V1t in e)||!(X1t in e)||!($1t in e)||!(H1t in e)||!(G1t in e)||!(U1t in e)||!(W1t in e)||!(K1t in e)||!(j1t in e)||t!==!0&&!lye(e.searchParams)):!1;r4.lenient=e=>r4(e,!0);fye.exports=r4});var s4=g((Vor,i4)=>{"use strict";var m1=class extends Error{constructor(){super("Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},uh=class{static fn(t){return function(){let r=[].slice.apply(arguments);return new uh((n,i,s)=>{r.push(s),t.apply(null,r).then(n,i)})}}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._promise=new Promise((r,n)=>(this._reject=n,t(i=>{this._isPending=!1,r(i)},i=>{this._isPending=!1,n(i)},i=>{this._cancelHandlers.push(i)})))}then(t,r){return this._promise.then(t,r)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let t of this._cancelHandlers)t()}catch(t){this._reject(t)}this._isCanceled=!0,this._reject(new m1)}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(uh.prototype,Promise.prototype);i4.exports=uh;i4.exports.CancelError=m1});var dye=g((Kor,pye)=>{"use strict";pye.exports=(e,t)=>(t=t||(()=>{}),e.then(r=>new Promise(n=>{n(t())}).then(()=>r),r=>new Promise(n=>{n(t())}).then(()=>{throw r})))});var a4=g((Xor,o4)=>{"use strict";var Y1t=dye(),g1=class extends Error{constructor(t){super(t),this.name="TimeoutError"}};o4.exports=(e,t,r)=>new Promise((n,i)=>{if(typeof t!="number"||t<0)throw new TypeError("Expected `ms` to be a positive number");let s=setTimeout(()=>{if(typeof r=="function"){try{n(r())}catch(u){i(u)}return}let o=typeof r=="string"?r:`Promise timed out after ${t} milliseconds`,a=r instanceof Error?r:new g1(o);typeof e.cancel=="function"&&e.cancel(),i(a)},t);Y1t(e.then(n,i),()=>{clearTimeout(s)})});o4.exports.TimeoutError=g1});var gye=g((Yor,mye)=>{"use strict";var hye=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};mye.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):hye(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?hye(s,t):s}return n}});var vye=g((Jor,J1t)=>{J1t.exports={name:"got",version:"8.3.2",description:"Simplified HTTP requests",license:"MIT",repository:"sindresorhus/got",maintainers:[{name:"Sindre Sorhus",email:"sindresorhus@gmail.com",url:"sindresorhus.com"},{name:"Vsevolod Strukchinsky",email:"floatdrop@gmail.com",url:"github.com/floatdrop"},{name:"Alexander Tesfamichael",email:"alex.tesfamichael@gmail.com",url:"alextes.me"}],engines:{node:">=4"},scripts:{test:"xo && nyc ava",coveralls:"nyc report --reporter=text-lcov | coveralls"},files:["index.js","errors.js"],keywords:["http","https","get","got","url","uri","request","util","utility","simple","curl","wget","fetch","net","network","electron"],dependencies:{"@sindresorhus/is":"^0.7.0","cacheable-request":"^2.1.1","decompress-response":"^3.3.0",duplexer3:"^0.1.4","get-stream":"^3.0.0","into-stream":"^3.1.0","is-retry-allowed":"^1.1.0",isurl:"^1.0.0-alpha5","lowercase-keys":"^1.0.0","mimic-response":"^1.0.0","p-cancelable":"^0.4.0","p-timeout":"^2.0.1",pify:"^3.0.0","safe-buffer":"^5.1.1","timed-out":"^4.0.1","url-parse-lax":"^3.0.0","url-to-options":"^1.0.1"},devDependencies:{ava:"^0.25.0",coveralls:"^3.0.0","form-data":"^2.1.1","get-port":"^3.0.0",nyc:"^11.0.2","p-event":"^1.3.0",pem:"^1.4.4",proxyquire:"^1.8.0",sinon:"^4.0.0","slow-stream":"0.0.4",tempfile:"^2.0.0",tempy:"^0.2.1","universal-url":"1.0.0-alpha",xo:"^0.20.0"},ava:{concurrency:4},browser:{"decompress-response":!1,electron:!1}}});var xye=g((Zor,ca)=>{"use strict";var Z1t=require("url"),u4=require("http"),Q1t=s4(),eCt=QF(),ua=class extends Error{constructor(t,r,n){super(t),Error.captureStackTrace(this,this.constructor),this.name="GotError",eCt.undefined(r.code)||(this.code=r.code),Object.assign(this,{host:n.host,hostname:n.hostname,method:n.method,path:n.path,protocol:n.protocol,url:n.href})}};ca.exports.GotError=ua;ca.exports.CacheError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="CacheError"}};ca.exports.RequestError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="RequestError"}};ca.exports.ReadError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="ReadError"}};ca.exports.ParseError=class extends ua{constructor(e,t,r,n){super(`${e.message} in "${Z1t.format(r)}":
|
|
228
|
+
`);return Mbt(t)};Zd.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var n=parseInt(e.slice(0,r).toString(),10);if(!n)return t;var i=e.slice(r+1,n-1).toString(),s=i.indexOf("=");if(s===-1)return t;t[i.slice(0,s)]=i.slice(s+1),e=e.slice(n)}return t};Zd.encode=function(e){var t=Bbt(512),r=e.name,n="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var i=r.indexOf("/");if(i===-1)return null;n+=n?"/"+r.slice(0,i):r.slice(0,i),r=r.slice(i+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(Cc(e.mode&zbt,6),100),t.write(Cc(e.uid,6),108),t.write(Cc(e.gid,6),116),t.write(Cc(e.size,11),124),t.write(Cc(e.mtime.getTime()/1e3|0,11),136),t[156]=Pme+Gbt(e.type),e.linkname&&t.write(e.linkname,157),t.write(Hbt,257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(Cc(e.devmajor||0,6),329),t.write(Cc(e.devminor||0,6),337),n&&t.write(n,345),t.write(Cc(Dme(t),6),148),t)};Zd.decode=function(e,t){var r=e[156]===0?0:e[156]-Pme,n=Jd(e,0,100,t),i=Tc(e,100,8),s=Tc(e,108,8),o=Tc(e,116,8),a=Tc(e,124,12),u=Tc(e,136,12),c=Wbt(r),f=e[157]===0?null:Jd(e,157,100,t),p=Jd(e,265,32),d=Jd(e,297,32),m=Tc(e,329,8),v=Tc(e,337,8);e[345]&&(n=Jd(e,345,155,t)+"/"+n),r===0&&n&&n[n.length-1]==="/"&&(r=5);var _=Dme(e);if(_===8*32)return null;if(_!==Tc(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:n,mode:i,uid:s,gid:o,size:a,mtime:new Date(1e3*u),type:c,linkname:f,uname:p,gname:d,devmajor:m,devminor:v}}});var Hme=g((usr,Ume)=>{var Fme=require("util"),Kbt=wme(),Xbt=Sme(),G0=FL(),Mme=Xd().Writable,Bme=Xd().PassThrough,jme=function(){},Lme=function(e){return e&=511,e&&512-e},Ybt=function(e,t){var r=new AS(e,t);return r.end(),r},Jbt=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},AS=function(e,t){this._parent=e,this.offset=t,Bme.call(this)};Fme.inherits(AS,Bme);AS.prototype.destroy=function(e){this._parent.destroy(e)};var au=function(e){if(!(this instanceof au))return new au(e);Mme.call(this,e),e=e||{},this._offset=0,this._buffer=Kbt(),this._missing=0,this._partial=!1,this._onparse=jme,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,n=function(){t._continue()},i=function(d){if(t._locked=!1,d)return t.destroy(d);t._stream||n()},s=function(){t._stream=null;var d=Lme(t._header.size);d?t._parse(d,o):t._parse(512,p),t._locked||n()},o=function(){t._buffer.consume(Lme(t._header.size)),t._parse(512,p),n()},a=function(){var d=t._header.size;t._paxGlobal=G0.decodePax(r.slice(0,d)),r.consume(d),s()},u=function(){var d=t._header.size;t._pax=G0.decodePax(r.slice(0,d)),t._paxGlobal&&(t._pax=Xbt(t._paxGlobal,t._pax)),r.consume(d),s()},c=function(){var d=t._header.size;this._gnuLongPath=G0.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),s()},f=function(){var d=t._header.size;this._gnuLongLinkPath=G0.decodeLongPath(r.slice(0,d),e.filenameEncoding),r.consume(d),s()},p=function(){var d=t._offset,m;try{m=t._header=G0.decode(r.slice(0,512),e.filenameEncoding)}catch(v){t.emit("error",v)}if(r.consume(512),!m){t._parse(512,p),n();return}if(m.type==="gnu-long-path"){t._parse(m.size,c),n();return}if(m.type==="gnu-long-link-path"){t._parse(m.size,f),n();return}if(m.type==="pax-global-header"){t._parse(m.size,a),n();return}if(m.type==="pax-header"){t._parse(m.size,u),n();return}if(t._gnuLongPath&&(m.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(m.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=m=Jbt(m,t._pax),t._pax=null),t._locked=!0,!m.size||m.type==="directory"){t._parse(512,p),t.emit("entry",m,Ybt(t,d),i);return}t._stream=new AS(t,d),t.emit("entry",m,t._stream,i),t._parse(m.size,s),n()};this._onheader=p,this._parse(512,p)};Fme.inherits(au,Mme);au.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};au.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};au.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=jme,this._overflow?this._write(this._overflow,void 0,e):e()}};au.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,i=this._buffer,s=this._missing;if(e.length&&(this._partial=!0),e.length<s)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(i.append(e),r());this._cb=r,this._missing=0;var o=null;e.length>s&&(o=e.slice(s),e=e.slice(0,s)),n?n.end(e):i.append(e),this._overflow=o,this._onparse()}};au.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};Ume.exports=au});var $me=g((csr,zme)=>{zme.exports=require("fs").constants||require("constants")});var ML=g((lsr,Gme)=>{Gme.exports=Wme;function Wme(e,t){if(e&&t)return Wme(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(a){s[a]=o[a]}),s}}});var V0=g((fsr,BL)=>{var Vme=ML();BL.exports=Vme(OS);BL.exports.strict=Vme(Kme);OS.proto=OS(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return OS(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Kme(this)},configurable:!0})});function OS(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Kme(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var jL=g((psr,Yme)=>{var Zbt=V0(),Qbt=function(){},ewt=function(e){return e.setHeader&&typeof e.abort=="function"},twt=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Xme=function(e,t,r){if(typeof t=="function")return Xme(e,null,t);t||(t={}),r=Zbt(r||Qbt);var n=e._writableState,i=e._readableState,s=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){o=!1,s||r.call(e)},f=function(){s=!1,o||r.call(e)},p=function(b){r.call(e,b?new Error("exited with error code: "+b):null)},d=function(b){r.call(e,b)},m=function(){process.nextTick(v)},v=function(){if(!a){if(s&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"));if(o&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},_=function(){e.req.on("finish",c)};return ewt(e)?(e.on("complete",c),e.on("abort",m),e.req?_():e.on("request",_)):o&&!n&&(e.on("end",u),e.on("close",u)),twt(e)&&e.on("exit",p),e.on("end",f),e.on("finish",c),t.error!==!1&&e.on("error",d),e.on("close",m),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",m),e.removeListener("request",_),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",p),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",m)}};Yme.exports=Xme});var tge=g((dsr,ege)=>{var Qd=$me(),Jme=jL(),RS=require("util"),rwt=DL(),nwt=kL(),Zme=Xd().Readable,eh=Xd().Writable,iwt=require("string_decoder").StringDecoder,IS=FL(),swt=parseInt("755",8),owt=parseInt("644",8),Qme=rwt(1024),HL=function(){},UL=function(e,t){t&=511,t&&e.push(Qme.slice(0,512-t))};function awt(e){switch(e&Qd.S_IFMT){case Qd.S_IFBLK:return"block-device";case Qd.S_IFCHR:return"character-device";case Qd.S_IFDIR:return"directory";case Qd.S_IFIFO:return"fifo";case Qd.S_IFLNK:return"symlink"}return"file"}var NS=function(e){eh.call(this),this.written=0,this._to=e,this._destroyed=!1};RS.inherits(NS,eh);NS.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};NS.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var qS=function(){eh.call(this),this.linkname="",this._decoder=new iwt("utf-8"),this._destroyed=!1};RS.inherits(qS,eh);qS.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};qS.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var K0=function(){eh.call(this),this._destroyed=!1};RS.inherits(K0,eh);K0.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};K0.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var ra=function(e){if(!(this instanceof ra))return new ra(e);Zme.call(this,e),this._drain=HL,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};RS.inherits(ra,Zme);ra.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=HL);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=awt(e.mode)),e.mode||(e.mode=e.type==="directory"?swt:owt),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=nwt(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),UL(n,e.size),process.nextTick(r),new K0;if(e.type==="symlink"&&!e.linkname){var i=new qS;return Jme(i,function(o){if(o)return n.destroy(),r(o);e.linkname=i.linkname,n._encode(e),r()}),i}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new K0;var s=new NS(this);return this._stream=s,Jme(s,function(o){if(n._stream=null,o)return n.destroy(),r(o);if(s.written!==e.size)return n.destroy(),r(new Error("size mismatch"));UL(n,e.size),n._finalizing&&n.finalize(),r()}),s}};ra.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Qme),this.push(null))};ra.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};ra.prototype._encode=function(e){if(!e.pax){var t=IS.encode(e);if(t){this.push(t);return}}this._encodePax(e)};ra.prototype._encodePax=function(e){var t=IS.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(IS.encode(r)),this.push(t),UL(this,t.length),r.size=e.size,r.type=e.type,this.push(IS.encode(r))};ra.prototype._read=function(e){var t=this._drain;this._drain=HL,t()};ege.exports=ra});var rge=g(zL=>{zL.extract=Hme();zL.pack=tge()});var PS=g((msr,ige)=>{"use strict";var nge=qhe(),uwt=Lm(),cwt=rge();ige.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!uwt(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!nge(e)||nge(e).ext!=="tar"))return Promise.resolve([]);let t=cwt.extract(),r=[];t.on("entry",(i,s,o)=>{let a=[];s.on("data",u=>a.push(u)),s.on("end",()=>{let u={data:Buffer.concat(a),mode:i.mode,mtime:i.mtime,path:i.name,type:i.type};(i.type==="symlink"||i.type==="link")&&(u.linkname=i.linkname),r.push(u),o()})});let n=new Promise((i,s)=>{Buffer.isBuffer(e)||e.on("error",s),t.on("finish",()=>i(r)),t.on("error",s)});return t.then=n.then.bind(n),t.catch=n.catch.bind(n),Buffer.isBuffer(e)?t.end(e):e.pipe(t),t}});var oge=g((gsr,sge)=>{"use strict";var th=e=>Array.from(e).map(t=>t.charCodeAt(0)),lwt=th("META-INF/mozilla.rsa"),fwt=th("[Content_Types].xml"),pwt=th("_rels/.rels");sge.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(i.mask){if(n[s]!==(i.mask[s]&t[s+i.offset]))return!1}else if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(lwt,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r(fwt,{offset:30})||r(pwt,{offset:30})){let n=t.subarray(4,2004),i=o=>o.findIndex((a,u,c)=>c[u]===80&&c[u+1]===75&&c[u+2]===3&&c[u+3]===4),s=i(n);if(s!==-1){let o=t.subarray(s+8,s+8+1e3),a=i(o);if(a!==-1){let u=8+s+a+30;if(r(th("word/"),{offset:u}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(r(th("ppt/"),{offset:u}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(r(th("xl/"),{offset:u}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i!==-1){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])&&r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186]))return{ext:"mpg",mime:"video/mpeg"};for(let n=0;n<2&&n<t.length-16;n++)if(r([73,68,51],{offset:n})||r([255,226],{offset:n,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};return r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var cge=g((vsr,uge)=>{var age=[0,1,3,7,15,31,63,127,255],X0=function(e){this.stream=e,this.bitOffset=0,this.curByte=0,this.hasByte=!1};X0.prototype._ensureByte=function(){this.hasByte||(this.curByte=this.stream.readByte(),this.hasByte=!0)};X0.prototype.read=function(e){for(var t=0;e>0;){this._ensureByte();var r=8-this.bitOffset;if(e>=r)t<<=r,t|=age[r]&this.curByte,this.hasByte=!1,this.bitOffset=0,e-=r;else{t<<=e;var n=r-e;t|=(this.curByte&age[e]<<n)>>n,this.bitOffset+=e,e=0}}return t};X0.prototype.seek=function(e){var t=e%8,r=(e-t)/8;this.bitOffset=t,this.stream.seek(r),this.hasByte=!1};X0.prototype.pi=function(){var e=new Buffer(6),t;for(t=0;t<e.length;t++)e[t]=this.read(8);return e.toString("hex")};uge.exports=X0});var fge=g((xsr,lge)=>{var of=function(){};of.prototype.readByte=function(){throw new Error("abstract method readByte() not implemented")};of.prototype.read=function(e,t,r){for(var n=0;n<r;){var i=this.readByte();if(i<0)return n===0?-1:n;e[t++]=i,n++}return n};of.prototype.seek=function(e){throw new Error("abstract method seek() not implemented")};of.prototype.writeByte=function(e){throw new Error("abstract method readByte() not implemented")};of.prototype.write=function(e,t,r){var n;for(n=0;n<r;n++)this.writeByte(e[t++]);return r};of.prototype.flush=function(){};lge.exports=of});var dge=g((ysr,pge)=>{pge.exports=function(){var e=new Uint32Array([0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188]),t=function(){var r=4294967295;this.getCRC=function(){return~r>>>0},this.updateCRC=function(n){r=r<<8^e[(r>>>24^n)&255]},this.updateCRCRun=function(n,i){for(;i-- >0;)r=r<<8^e[(r>>>24^n)&255]}};return t}()});var hge=g((_sr,dwt)=>{dwt.exports={name:"seek-bzip",version:"1.0.6",contributors:["C. Scott Ananian (http://cscott.net)","Eli Skeggs","Kevin Kwok","Rob Landley (http://landley.net)"],description:"a pure-JavaScript Node.JS module for random-access decoding bzip2 data",main:"./lib/index.js",repository:{type:"git",url:"https://github.com/cscott/seek-bzip.git"},license:"MIT",bin:{"seek-bunzip":"./bin/seek-bunzip","seek-table":"./bin/seek-bzip-table"},directories:{test:"test"},dependencies:{commander:"^2.8.1"},devDependencies:{fibers:"~1.0.6",mocha:"~2.2.5"},scripts:{test:"mocha"}}});var wge=g((bsr,bge)=>{var hwt=cge(),Y0=fge(),xge=dge(),yge=hge(),kS=20,mge=258,gge=0,mwt=1,gwt=2,vwt=6,xwt=50,ywt="314159265359",_wt="177245385090",vge=function(e,t){var r=e[t],n;for(n=t;n>0;n--)e[n]=e[n-1];return e[0]=r,r},ar={OK:0,LAST_BLOCK:-1,NOT_BZIP_DATA:-2,UNEXPECTED_INPUT_EOF:-3,UNEXPECTED_OUTPUT_EOF:-4,DATA_ERROR:-5,OUT_OF_MEMORY:-6,OBSOLETE_INPUT:-7,END_OF_BLOCK:-8},Ac={};Ac[ar.LAST_BLOCK]="Bad file checksum";Ac[ar.NOT_BZIP_DATA]="Not bzip data";Ac[ar.UNEXPECTED_INPUT_EOF]="Unexpected input EOF";Ac[ar.UNEXPECTED_OUTPUT_EOF]="Unexpected output EOF";Ac[ar.DATA_ERROR]="Data error";Ac[ar.OUT_OF_MEMORY]="Out of memory";Ac[ar.OBSOLETE_INPUT]="Obsolete (pre 0.9.5) bzip format not supported.";var Un=function(e,t){var r=Ac[e]||"unknown error";t&&(r+=": "+t);var n=new TypeError(r);throw n.errorCode=e,n},yi=function(e,t){this.writePos=this.writeCurrent=this.writeCount=0,this._start_bunzip(e,t)};yi.prototype._init_block=function(){var e=this._get_next_block();return e?(this.blockCRC=new xge,!0):(this.writeCount=-1,!1)};yi.prototype._start_bunzip=function(e,t){var r=new Buffer(4);(e.read(r,0,4)!==4||String.fromCharCode(r[0],r[1],r[2])!=="BZh")&&Un(ar.NOT_BZIP_DATA,"bad magic");var n=r[3]-48;(n<1||n>9)&&Un(ar.NOT_BZIP_DATA,"level out of range"),this.reader=new hwt(e),this.dbufSize=1e5*n,this.nextoutput=0,this.outputStream=t,this.streamCRC=0};yi.prototype._get_next_block=function(){var e,t,r,n=this.reader,i=n.pi();if(i===_wt)return!1;i!==ywt&&Un(ar.NOT_BZIP_DATA),this.targetBlockCRC=n.read(32)>>>0,this.streamCRC=(this.targetBlockCRC^(this.streamCRC<<1|this.streamCRC>>>31))>>>0,n.read(1)&&Un(ar.OBSOLETE_INPUT);var s=n.read(24);s>this.dbufSize&&Un(ar.DATA_ERROR,"initial position out of bounds");var o=n.read(16),a=new Buffer(256),u=0;for(e=0;e<16;e++)if(o&1<<15-e){var c=e*16;for(r=n.read(16),t=0;t<16;t++)r&1<<15-t&&(a[u++]=c+t)}var f=n.read(3);(f<gwt||f>vwt)&&Un(ar.DATA_ERROR);var p=n.read(15);p===0&&Un(ar.DATA_ERROR);var d=new Buffer(256);for(e=0;e<f;e++)d[e]=e;var m=new Buffer(p);for(e=0;e<p;e++){for(t=0;n.read(1);t++)t>=f&&Un(ar.DATA_ERROR);m[e]=vge(d,t)}var v=u+2,_=[],b;for(t=0;t<f;t++){var y=new Buffer(v),T=new Uint16Array(kS+1);for(o=n.read(5),e=0;e<v;e++){for(;(o<1||o>kS)&&Un(ar.DATA_ERROR),!!n.read(1);)n.read(1)?o--:o++;y[e]=o}var S,E;for(S=E=y[0],e=1;e<v;e++)y[e]>E?E=y[e]:y[e]<S&&(S=y[e]);b={},_.push(b),b.permute=new Uint16Array(mge),b.limit=new Uint32Array(kS+2),b.base=new Uint32Array(kS+1),b.minLen=S,b.maxLen=E;var C=0;for(e=S;e<=E;e++)for(T[e]=b.limit[e]=0,o=0;o<v;o++)y[o]===e&&(b.permute[C++]=o);for(e=0;e<v;e++)T[y[e]]++;for(C=o=0,e=S;e<E;e++)C+=T[e],b.limit[e]=C-1,C<<=1,o+=T[e],b.base[e+1]=C-o;b.limit[E+1]=Number.MAX_VALUE,b.limit[E]=C+T[E]-1,b.base[S]=0}var I=new Uint32Array(256);for(e=0;e<256;e++)d[e]=e;var q=0,B=0,M=0,R,D=this.dbuf=new Uint32Array(this.dbufSize);for(v=0;;){for(v--||(v=xwt-1,M>=p&&Un(ar.DATA_ERROR),b=_[m[M++]]),e=b.minLen,t=n.read(e);e>b.maxLen&&Un(ar.DATA_ERROR),!(t<=b.limit[e]);e++)t=t<<1|n.read(1);t-=b.base[e],(t<0||t>=mge)&&Un(ar.DATA_ERROR);var N=b.permute[t];if(N===gge||N===mwt){q||(q=1,o=0),N===gge?o+=q:o+=2*q,q<<=1;continue}if(q)for(q=0,B+o>this.dbufSize&&Un(ar.DATA_ERROR),R=a[d[0]],I[R]+=o;o--;)D[B++]=R;if(N>u)break;B>=this.dbufSize&&Un(ar.DATA_ERROR),e=N-1,R=vge(d,e),R=a[R],I[R]++,D[B++]=R}for((s<0||s>=B)&&Un(ar.DATA_ERROR),t=0,e=0;e<256;e++)r=t+I[e],I[e]=t,t=r;for(e=0;e<B;e++)R=D[e]&255,D[I[R]]|=e<<8,I[R]++;var Y=0,oe=0,H=0;return B&&(Y=D[s],oe=Y&255,Y>>=8,H=-1),this.writePos=Y,this.writeCurrent=oe,this.writeCount=B,this.writeRun=H,!0};yi.prototype._read_bunzip=function(e,t){var r,n,i;if(this.writeCount<0)return 0;for(var s=0,o=this.dbuf,a=this.writePos,u=this.writeCurrent,c=this.writeCount,f=this.outputsize,p=this.writeRun;c;){for(c--,n=u,a=o[a],u=a&255,a>>=8,p++===3?(r=u,i=n,u=-1):(r=1,i=u),this.blockCRC.updateCRCRun(i,r);r--;)this.outputStream.writeByte(i),this.nextoutput++;u!=n&&(p=0)}return this.writeCount=c,this.blockCRC.getCRC()!==this.targetBlockCRC&&Un(ar.DATA_ERROR,"Bad block CRC (got "+this.blockCRC.getCRC().toString(16)+" expected "+this.targetBlockCRC.toString(16)+")"),this.nextoutput};var $L=function(e){if("readByte"in e)return e;var t=new Y0;return t.pos=0,t.readByte=function(){return e[this.pos++]},t.seek=function(r){this.pos=r},t.eof=function(){return this.pos>=e.length},t},_ge=function(e){var t=new Y0,r=!0;if(e)if(typeof e=="number")t.buffer=new Buffer(e),r=!1;else{if("writeByte"in e)return e;t.buffer=e,r=!1}else t.buffer=new Buffer(16384);return t.pos=0,t.writeByte=function(n){if(r&&this.pos>=this.buffer.length){var i=new Buffer(this.buffer.length*2);this.buffer.copy(i),this.buffer=i}this.buffer[this.pos++]=n},t.getBuffer=function(){if(this.pos!==this.buffer.length){if(!r)throw new TypeError("outputsize does not match decoded input");var n=new Buffer(this.pos);this.buffer.copy(n,0,0,this.pos),this.buffer=n}return this.buffer},t._coerced=!0,t};yi.Err=ar;yi.decode=function(e,t,r){for(var n=$L(e),i=_ge(t),s=new yi(n,i);!("eof"in n&&n.eof());)if(s._init_block())s._read_bunzip();else{var o=s.reader.read(32)>>>0;if(o!==s.streamCRC&&Un(ar.DATA_ERROR,"Bad stream CRC (got "+s.streamCRC.toString(16)+" expected "+o.toString(16)+")"),r&&"eof"in n&&!n.eof())s._start_bunzip(n,i);else break}if("getBuffer"in i)return i.getBuffer()};yi.decodeBlock=function(e,t,r){var n=$L(e),i=_ge(r),s=new yi(n,i);s.reader.seek(t);var o=s._get_next_block();if(o&&(s.blockCRC=new xge,s.writeCopies=0,s._read_bunzip()),"getBuffer"in i)return i.getBuffer()};yi.table=function(e,t,r){var n=new Y0;n.delegate=$L(e),n.pos=0,n.readByte=function(){return this.pos++,this.delegate.readByte()},n.delegate.eof&&(n.eof=n.delegate.eof.bind(n.delegate));var i=new Y0;i.pos=0,i.writeByte=function(){this.pos++};for(var s=new yi(n,i),o=s.dbufSize;!("eof"in n&&n.eof());){var a=n.pos*8+s.reader.bitOffset;if(s.reader.hasByte&&(a-=8),s._init_block()){var u=i.pos;s._read_bunzip(),t(a,i.pos-u)}else{var c=s.reader.read(32);if(r&&"eof"in n&&!n.eof())s._start_bunzip(n,i),console.assert(s.dbufSize===o,"shouldn't change block size within multistream file");else break}}};yi.Stream=Y0;yi.version=yge.version;yi.license=yge.license;bge.exports=yi});var Cge=g((Ege,Sge)=>{var bwt=require("stream");Ege=Sge.exports=WL;WL.through=WL;function WL(e,t,r){e=e||function(f){this.queue(f)},t=t||function(){this.queue(null)};var n=!1,i=!1,s=[],o=!1,a=new bwt;a.readable=a.writable=!0,a.paused=!1,a.autoDestroy=!(r&&r.autoDestroy===!1),a.write=function(f){return e.call(this,f),!a.paused};function u(){for(;s.length&&!a.paused;){var f=s.shift();if(f===null)return a.emit("end");a.emit("data",f)}}a.queue=a.push=function(f){return o||(f===null&&(o=!0),s.push(f),u()),a},a.on("end",function(){a.readable=!1,!a.writable&&a.autoDestroy&&process.nextTick(function(){a.destroy()})});function c(){a.writable=!1,t.call(a),!a.readable&&a.autoDestroy&&a.destroy()}return a.end=function(f){if(!n)return n=!0,arguments.length&&a.write(f),c(),a},a.destroy=function(){if(!i)return i=!0,n=!0,s.length=0,a.writable=a.readable=!1,a.emit("close"),a},a.pause=function(){if(!a.paused)return a.paused=!0,a},a.resume=function(){return a.paused&&(a.paused=!1,a.emit("resume")),u(),a.paused||a.emit("drain"),a},a}});var Age=g((wsr,Tge)=>{function GL(e){this.name="Bzip2Error",this.message=e,this.stack=new Error().stack}GL.prototype=new Error;var Hn={Error:function(e){throw new GL(e)}},na={};na.Bzip2Error=GL;na.crcTable=[0,79764919,159529838,222504665,319059676,398814059,445009330,507990021,638119352,583659535,797628118,726387553,890018660,835552979,1015980042,944750013,1276238704,1221641927,1167319070,1095957929,1595256236,1540665371,1452775106,1381403509,1780037320,1859660671,1671105958,1733955601,2031960084,2111593891,1889500026,1952343757,2552477408,2632100695,2443283854,2506133561,2334638140,2414271883,2191915858,2254759653,3190512472,3135915759,3081330742,3009969537,2905550212,2850959411,2762807018,2691435357,3560074640,3505614887,3719321342,3648080713,3342211916,3287746299,3467911202,3396681109,4063920168,4143685023,4223187782,4286162673,3779000052,3858754371,3904687514,3967668269,881225847,809987520,1023691545,969234094,662832811,591600412,771767749,717299826,311336399,374308984,453813921,533576470,25881363,88864420,134795389,214552010,2023205639,2086057648,1897238633,1976864222,1804852699,1867694188,1645340341,1724971778,1587496639,1516133128,1461550545,1406951526,1302016099,1230646740,1142491917,1087903418,2896545431,2825181984,2770861561,2716262478,3215044683,3143675388,3055782693,3001194130,2326604591,2389456536,2200899649,2280525302,2578013683,2640855108,2418763421,2498394922,3769900519,3832873040,3912640137,3992402750,4088425275,4151408268,4197601365,4277358050,3334271071,3263032808,3476998961,3422541446,3585640067,3514407732,3694837229,3640369242,1762451694,1842216281,1619975040,1682949687,2047383090,2127137669,1938468188,2001449195,1325665622,1271206113,1183200824,1111960463,1543535498,1489069629,1434599652,1363369299,622672798,568075817,748617968,677256519,907627842,853037301,1067152940,995781531,51762726,131386257,177728840,240578815,269590778,349224269,429104020,491947555,4046411278,4126034873,4172115296,4234965207,3794477266,3874110821,3953728444,4016571915,3609705398,3555108353,3735388376,3664026991,3290680682,3236090077,3449943556,3378572211,3174993278,3120533705,3032266256,2961025959,2923101090,2868635157,2813903052,2742672763,2604032198,2683796849,2461293480,2524268063,2284983834,2364738477,2175806836,2238787779,1569362073,1498123566,1409854455,1355396672,1317987909,1246755826,1192025387,1137557660,2072149281,2135122070,1912620623,1992383480,1753615357,1816598090,1627664531,1707420964,295390185,358241886,404320391,483945776,43990325,106832002,186451547,266083308,932423249,861060070,1041341759,986742920,613929101,542559546,756411363,701822548,3316196985,3244833742,3425377559,3370778784,3601682597,3530312978,3744426955,3689838204,3819031489,3881883254,3928223919,4007849240,4037393693,4100235434,4180117107,4259748804,2310601993,2373574846,2151335527,2231098320,2596047829,2659030626,2470359227,2550115596,2947551409,2876312838,2788305887,2733848168,3165939309,3094707162,3040238851,2985771188];na.array=function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var s=0;i>0;){var o=8-t;i>=o?(s<<=o,s|=n[o]&e[r++],t=0,i-=o):(s<<=i,s|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return s}};na.simple=function(e,t){var r=na.array(e),n=na.header(r),i=!1,s=1e5*n,o=new Int32Array(s);do i=na.decompress(r,t,o,s);while(!i)};na.header=function(e){this.byteCount=new Int32Array(256),this.symToByte=new Uint8Array(256),this.mtfSymbol=new Int32Array(256),this.selectors=new Uint8Array(32768),e(8*3)!=4348520&&Hn.Error("No magic number found");var t=e(8)-48;return(t<1||t>9)&&Hn.Error("Not a BZIP archive"),t};na.decompress=function(e,t,r,n,i){for(var s=20,o=258,a=0,u=1,c=50,f=-1,p="",d=0;d<6;d++)p+=e(8).toString(16);if(p=="177245385090"){var m=e(32)|0;return m!==i&&Hn.Error("Error in bzip2: crc32 do not match"),e(null),null}p!="314159265359"&&Hn.Error("eek not valid bzip data");var v=e(32)|0;e(1)&&Hn.Error("unsupported obsolete version");var _=e(24);_>n&&Hn.Error("Initial position larger than buffer size");var b=e(16),y=0;for(d=0;d<16;d++)if(b&1<<15-d){var T=e(16);for(ge=0;ge<16;ge++)T&1<<15-ge&&(this.symToByte[y++]=16*d+ge)}var S=e(3);(S<2||S>6)&&Hn.Error("another error");var E=e(15);E==0&&Hn.Error("meh");for(var d=0;d<S;d++)this.mtfSymbol[d]=d;for(var d=0;d<E;d++){for(var ge=0;e(1);ge++)ge>=S&&Hn.Error("whoops another error");for(var C=this.mtfSymbol[ge],T=ge-1;T>=0;T--)this.mtfSymbol[T+1]=this.mtfSymbol[T];this.mtfSymbol[0]=C,this.selectors[d]=C}for(var ee=y+2,I=[],q=new Uint8Array(o),B=new Uint16Array(s+1),M,ge=0;ge<S;ge++){b=e(5);for(var d=0;d<ee;d++){for(;(b<1||b>s)&&Hn.Error("I gave up a while ago on writing error messages"),!!e(1);)e(1)?b--:b++;q[d]=b}var R,D;R=D=q[0];for(var d=1;d<ee;d++)q[d]>D?D=q[d]:q[d]<R&&(R=q[d]);M=I[ge]={},M.permute=new Int32Array(o),M.limit=new Int32Array(s+1),M.base=new Int32Array(s+1),M.minLen=R,M.maxLen=D;for(var N=M.base,Y=M.limit,oe=0,d=R;d<=D;d++)for(var b=0;b<ee;b++)q[b]==d&&(M.permute[oe++]=b);for(d=R;d<=D;d++)B[d]=Y[d]=0;for(d=0;d<ee;d++)B[q[d]]++;for(oe=b=0,d=R;d<D;d++)oe+=B[d],Y[d]=oe-1,oe<<=1,N[d+1]=oe-(b+=B[d]);Y[D]=oe+B[D]-1,N[R]=0}for(var d=0;d<256;d++)this.mtfSymbol[d]=d,this.byteCount[d]=0;var H,U,ee,Q;for(H=U=ee=Q=0;;){for(ee--||(ee=c-1,Q>=E&&Hn.Error("meow i'm a kitty, that's an error"),M=I[this.selectors[Q++]],N=M.base,Y=M.limit),d=M.minLen,ge=e(d);d>M.maxLen&&Hn.Error("rawr i'm a dinosaur"),!(ge<=Y[d]);)d++,ge=ge<<1|e(1);ge-=N[d],(ge<0||ge>=o)&&Hn.Error("moo i'm a cow");var pe=M.permute[ge];if(pe==a||pe==u){H||(H=1,b=0),pe==a?b+=H:b+=2*H,H<<=1;continue}if(H)for(H=0,U+b>n&&Hn.Error("Boom."),C=this.symToByte[this.mtfSymbol[0]],this.byteCount[C]+=b;b--;)r[U++]=C;if(pe>y)break;U>=n&&Hn.Error("I can't think of anything. Error"),d=pe-1,C=this.mtfSymbol[d];for(var T=d-1;T>=0;T--)this.mtfSymbol[T+1]=this.mtfSymbol[T];this.mtfSymbol[0]=C,C=this.symToByte[C],this.byteCount[C]++,r[U++]=C}(_<0||_>=U)&&Hn.Error("I'm a monkey and I'm throwing something at someone, namely you");for(var ge=0,d=0;d<256;d++)T=ge+this.byteCount[d],this.byteCount[d]=ge,ge=T;for(var d=0;d<U;d++)C=r[d]&255,r[this.byteCount[C]]|=d<<8,this.byteCount[C]++;var we=0,We=0,et=0;U&&(we=r[_],We=we&255,we>>=8,et=-1),U=U;for(var tt,xt,Ne;U;){for(U--,xt=We,we=r[we],We=we&255,we>>=8,et++==3?(tt=We,Ne=xt,We=-1):(tt=1,Ne=We);tt--;)f=(f<<8^this.crcTable[(f>>24^Ne)&255])&4294967295,t(Ne);We!=xt&&(et=0)}return f=(f^-1)>>>0,(f|0)!=(v|0)&&Hn.Error("Error in bzip2: crc32 do not match"),i=(f^(i<<1|i>>>31))&4294967295,i};Tge.exports=na});var Rge=g((Esr,Ige)=>{var Oge=[0,1,3,7,15,31,63,127,255];Ige.exports=function(t){var r=0,n=0,i=t(),s=function(o){if(o===null&&r!=0){r=0,n++;return}for(var a=0;o>0;){n>=i.length&&(n=0,i=t());var u=8-r;r===0&&o>0&&s.bytesRead++,o>=u?(a<<=u,a|=Oge[u]&i[n++],r=0,o-=u):(a<<=o,a|=(i[n]&Oge[o]<<8-o-r)>>8-o-r,r+=o,o=0)}return a};return s.bytesRead=0,s}});var Pge=g((Ssr,qge)=>{var wwt=Cge(),Nge=Age(),Ewt=Rge();qge.exports=Swt;function Swt(){var e=[],t=0,r=0,n=!1,i=!1,s=null,o=null;function a(f){if(r){var p=1e5*r,d=new Int32Array(p),m=[],v=function(_){m.push(_)};return o=Nge.decompress(s,v,d,p,o),o===null?(r=0,!1):(f(Buffer.from(m)),!0)}else return r=Nge.header(s),o=0,!0}var u=0;function c(f){if(!n)try{return a(function(p){f.queue(p),p!==null&&(u+=p.length)})}catch(p){return f.emit("error",p),n=!0,!1}}return wwt(function(p){for(e.push(p),t+=p.length,s===null&&(s=Ewt(function(){return e.shift()}));!n&&t-s.bytesRead+1>=(25e3+1e5*r||4);)c(this)},function(p){for(;!n&&s&&t>s.bytesRead;)c(this);n||(o!==null&&this.emit("error",new Error("input stream ended prematurely")),this.queue(null))})}});var Fge=g((Csr,Lge)=>{"use strict";var kge=PS(),Dge=oge(),Cwt=Lm(),Twt=wge(),Awt=Pge();Lge.exports=()=>e=>!Buffer.isBuffer(e)&&!Cwt(e)?Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`)):Buffer.isBuffer(e)&&(!Dge(e)||Dge(e).ext!=="bz2")?Promise.resolve([]):Buffer.isBuffer(e)?kge()(Twt.decode(e)):kge()(e.pipe(Awt()))});var Bge=g((Tsr,Mge)=>{"use strict";Mge.exports=e=>{let t=new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(n,i)=>{i=Object.assign({offset:0},i);for(let s=0;s<n.length;s++)if(n[s]!==t[s+i.offset])return!1;return!0};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])&&r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r([80,75,3,4])&&r([77,69,84,65,45,73,78,70,47,109,111,122,105,108,108,97,46,114,115,97],{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([0,0,0])&&(t[3]===24||t[3]===32)&&r([102,116,121,112],{offset:4})||r([51,103,112,53])||r([0,0,0,28,102,116,121,112,109,112,52,50])&&r([109,112,52,49,109,112,52,50,105,115,111,109],{offset:16})||r([0,0,0,28,102,116,121,112,105,115,111,109])||r([0,0,0,28,102,116,121,112,109,112,52,50,0,0,0,0]))return{ext:"mp4",mime:"video/mp4"};if(r([0,0,0,28,102,116,121,112,77,52,86]))return{ext:"m4v",mime:"video/x-m4v"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let n=t.subarray(4,4100),i=n.findIndex((s,o,a)=>a[o]===66&&a[o+1]===130);if(i>=0){let s=i+3,o=a=>Array.from(a).every((u,c)=>n[s+c]===u.charCodeAt(0));if(o("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(o("webm"))return{ext:"webm",mime:"video/webm"}}}return r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4})?{ext:"mov",mime:"video/quicktime"}:r([82,73,70,70])&&r([65,86,73],{offset:8})?{ext:"avi",mime:"video/x-msvideo"}:r([48,38,178,117,142,102,207,17,166,217])?{ext:"wmv",mime:"video/x-ms-wmv"}:r([0,0,1,186])?{ext:"mpg",mime:"video/mpeg"}:r([73,68,51])||r([255,251])?{ext:"mp3",mime:"audio/mpeg"}:r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32])?{ext:"m4a",mime:"audio/m4a"}:r([79,112,117,115,72,101,97,100],{offset:28})?{ext:"opus",mime:"audio/opus"}:r([79,103,103,83])?{ext:"ogg",mime:"audio/ogg"}:r([102,76,97,67])?{ext:"flac",mime:"audio/x-flac"}:r([82,73,70,70])&&r([87,65,86,69],{offset:8})?{ext:"wav",mime:"audio/x-wav"}:r([35,33,65,77,82,10])?{ext:"amr",mime:"audio/amr"}:r([37,80,68,70])?{ext:"pdf",mime:"application/pdf"}:r([77,90])?{ext:"exe",mime:"application/x-msdownload"}:(t[0]===67||t[0]===70)&&r([87,83],{offset:1})?{ext:"swf",mime:"application/x-shockwave-flash"}:r([123,92,114,116,102])?{ext:"rtf",mime:"application/rtf"}:r([0,97,115,109])?{ext:"wasm",mime:"application/wasm"}:r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff",mime:"font/woff"}:r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4}))?{ext:"woff2",mime:"font/woff2"}:r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8}))?{ext:"eot",mime:"application/octet-stream"}:r([0,1,0,0,0])?{ext:"ttf",mime:"font/ttf"}:r([79,84,84,79,0])?{ext:"otf",mime:"font/otf"}:r([0,0,1,0])?{ext:"ico",mime:"image/x-icon"}:r([70,76,86,1])?{ext:"flv",mime:"video/x-flv"}:r([37,33])?{ext:"ps",mime:"application/postscript"}:r([253,55,122,88,90,0])?{ext:"xz",mime:"application/x-xz"}:r([83,81,76,105])?{ext:"sqlite",mime:"application/x-sqlite3"}:r([78,69,83,26])?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:r([67,114,50,52])?{ext:"crx",mime:"application/x-google-chrome-extension"}:r([77,83,67,70])||r([73,83,99,40])?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121])?{ext:"deb",mime:"application/x-deb"}:r([33,60,97,114,99,104,62])?{ext:"ar",mime:"application/x-unix-archive"}:r([237,171,238,219])?{ext:"rpm",mime:"application/x-rpm"}:r([31,160])||r([31,157])?{ext:"Z",mime:"application/x-compress"}:r([76,90,73,80])?{ext:"lz",mime:"application/x-lzip"}:r([208,207,17,224,161,177,26,225])?{ext:"msi",mime:"application/x-msi"}:r([6,14,43,52,2,5,1,1,13,1,2,1,1,2])?{ext:"mxf",mime:"application/mxf"}:r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196}))?{ext:"mts",mime:"video/mp2t"}:r([66,76,69,78,68,69,82])?{ext:"blend",mime:"application/x-blender"}:r([66,80,71,251])?{ext:"bpg",mime:"image/bpg"}:null}});var Hge=g((Asr,Uge)=>{"use strict";var Owt=require("zlib"),Iwt=PS(),jge=Bge(),Rwt=Lm();Uge.exports=()=>e=>{if(!Buffer.isBuffer(e)&&!Rwt(e))return Promise.reject(new TypeError(`Expected a Buffer or Stream, got ${typeof e}`));if(Buffer.isBuffer(e)&&(!jge(e)||jge(e).ext!=="gz"))return Promise.resolve([]);let t=Owt.createGunzip(),r=Iwt()(t);return Buffer.isBuffer(e)?t.end(e):e.pipe(t),r}});var $ge=g((Osr,zge)=>{"use strict";zge.exports=function(e){return e&&e.length>1?e[0]===255&&e[1]===216&&e[2]===255?{ext:"jpg",mime:"image/jpeg"}:e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?{ext:"png",mime:"image/png"}:e[0]===71&&e[1]===73&&e[2]===70?{ext:"gif",mime:"image/gif"}:e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?{ext:"webp",mime:"image/webp"}:e[0]===70&&e[1]===76&&e[2]===73&&e[3]===70?{ext:"flif",mime:"image/flif"}:(e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42)&&e[8]===67&&e[9]===82?{ext:"cr2",mime:"image/x-canon-cr2"}:e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42?{ext:"tif",mime:"image/tiff"}:e[0]===66&&e[1]===77?{ext:"bmp",mime:"image/bmp"}:e[0]===73&&e[1]===73&&e[2]===188?{ext:"jxr",mime:"image/vnd.ms-photo"}:e[0]===56&&e[1]===66&&e[2]===80&&e[3]===83?{ext:"psd",mime:"image/vnd.adobe.photoshop"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===109&&e[31]===105&&e[32]===109&&e[33]===101&&e[34]===116&&e[35]===121&&e[36]===112&&e[37]===101&&e[38]===97&&e[39]===112&&e[40]===112&&e[41]===108&&e[42]===105&&e[43]===99&&e[44]===97&&e[45]===116&&e[46]===105&&e[47]===111&&e[48]===110&&e[49]===47&&e[50]===101&&e[51]===112&&e[52]===117&&e[53]===98&&e[54]===43&&e[55]===122&&e[56]===105&&e[57]===112?{ext:"epub",mime:"application/epub+zip"}:e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4&&e[30]===77&&e[31]===69&&e[32]===84&&e[33]===65&&e[34]===45&&e[35]===73&&e[36]===78&&e[37]===70&&e[38]===47&&e[39]===109&&e[40]===111&&e[41]===122&&e[42]===105&&e[43]===108&&e[44]===108&&e[45]===97&&e[46]===46&&e[47]===114&&e[48]===115&&e[49]===97?{ext:"xpi",mime:"application/x-xpinstall"}:e[0]===80&&e[1]===75&&(e[2]===3||e[2]===5||e[2]===7)&&(e[3]===4||e[3]===6||e[3]===8)?{ext:"zip",mime:"application/zip"}:e[257]===117&&e[258]===115&&e[259]===116&&e[260]===97&&e[261]===114?{ext:"tar",mime:"application/x-tar"}:e[0]===82&&e[1]===97&&e[2]===114&&e[3]===33&&e[4]===26&&e[5]===7&&(e[6]===0||e[6]===1)?{ext:"rar",mime:"application/x-rar-compressed"}:e[0]===31&&e[1]===139&&e[2]===8?{ext:"gz",mime:"application/gzip"}:e[0]===66&&e[1]===90&&e[2]===104?{ext:"bz2",mime:"application/x-bzip2"}:e[0]===55&&e[1]===122&&e[2]===188&&e[3]===175&&e[4]===39&&e[5]===28?{ext:"7z",mime:"application/x-7z-compressed"}:e[0]===120&&e[1]===1?{ext:"dmg",mime:"application/x-apple-diskimage"}:e[0]===0&&e[1]===0&&e[2]===0&&(e[3]===24||e[3]===32)&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112||e[0]===51&&e[1]===103&&e[2]===112&&e[3]===53||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[16]===109&&e[17]===112&&e[18]===52&&e[19]===49&&e[20]===109&&e[21]===112&&e[22]===52&&e[23]===50&&e[24]===105&&e[25]===115&&e[26]===111&&e[27]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===105&&e[9]===115&&e[10]===111&&e[11]===109||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===109&&e[9]===112&&e[10]===52&&e[11]===50&&e[12]===0&&e[13]===0&&e[14]===0&&e[15]===0?{ext:"mp4",mime:"video/mp4"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===28&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===86?{ext:"m4v",mime:"video/x-m4v"}:e[0]===77&&e[1]===84&&e[2]===104&&e[3]===100?{ext:"mid",mime:"audio/midi"}:e[31]===109&&e[32]===97&&e[33]===116&&e[34]===114&&e[35]===111&&e[36]===115&&e[37]===107&&e[38]===97?{ext:"mkv",mime:"video/x-matroska"}:e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?{ext:"webm",mime:"video/webm"}:e[0]===0&&e[1]===0&&e[2]===0&&e[3]===20&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112?{ext:"mov",mime:"video/quicktime"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===65&&e[9]===86&&e[10]===73?{ext:"avi",mime:"video/x-msvideo"}:e[0]===48&&e[1]===38&&e[2]===178&&e[3]===117&&e[4]===142&&e[5]===102&&e[6]===207&&e[7]===17&&e[8]===166&&e[9]===217?{ext:"wmv",mime:"video/x-ms-wmv"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3].toString(16)[0]==="b"?{ext:"mpg",mime:"video/mpeg"}:e[0]===73&&e[1]===68&&e[2]===51||e[0]===255&&e[1]===251?{ext:"mp3",mime:"audio/mpeg"}:e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112&&e[8]===77&&e[9]===52&&e[10]===65||e[0]===77&&e[1]===52&&e[2]===65&&e[3]===32?{ext:"m4a",mime:"audio/m4a"}:e[28]===79&&e[29]===112&&e[30]===117&&e[31]===115&&e[32]===72&&e[33]===101&&e[34]===97&&e[35]===100?{ext:"opus",mime:"audio/opus"}:e[0]===79&&e[1]===103&&e[2]===103&&e[3]===83?{ext:"ogg",mime:"audio/ogg"}:e[0]===102&&e[1]===76&&e[2]===97&&e[3]===67?{ext:"flac",mime:"audio/x-flac"}:e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===65&&e[10]===86&&e[11]===69?{ext:"wav",mime:"audio/x-wav"}:e[0]===35&&e[1]===33&&e[2]===65&&e[3]===77&&e[4]===82&&e[5]===10?{ext:"amr",mime:"audio/amr"}:e[0]===37&&e[1]===80&&e[2]===68&&e[3]===70?{ext:"pdf",mime:"application/pdf"}:e[0]===77&&e[1]===90?{ext:"exe",mime:"application/x-msdownload"}:(e[0]===67||e[0]===70)&&e[1]===87&&e[2]===83?{ext:"swf",mime:"application/x-shockwave-flash"}:e[0]===123&&e[1]===92&&e[2]===114&&e[3]===116&&e[4]===102?{ext:"rtf",mime:"application/rtf"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===70&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff",mime:"application/font-woff"}:e[0]===119&&e[1]===79&&e[2]===70&&e[3]===50&&(e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0||e[4]===79&&e[5]===84&&e[6]===84&&e[7]===79)?{ext:"woff2",mime:"application/font-woff"}:e[34]===76&&e[35]===80&&(e[8]===0&&e[9]===0&&e[10]===1||e[8]===1&&e[9]===0&&e[10]===2||e[8]===2&&e[9]===0&&e[10]===2)?{ext:"eot",mime:"application/octet-stream"}:e[0]===0&&e[1]===1&&e[2]===0&&e[3]===0&&e[4]===0?{ext:"ttf",mime:"application/font-sfnt"}:e[0]===79&&e[1]===84&&e[2]===84&&e[3]===79&&e[4]===0?{ext:"otf",mime:"application/font-sfnt"}:e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0?{ext:"ico",mime:"image/x-icon"}:e[0]===70&&e[1]===76&&e[2]===86&&e[3]===1?{ext:"flv",mime:"video/x-flv"}:e[0]===37&&e[1]===33?{ext:"ps",mime:"application/postscript"}:e[0]===253&&e[1]===55&&e[2]===122&&e[3]===88&&e[4]===90&&e[5]===0?{ext:"xz",mime:"application/x-xz"}:e[0]===83&&e[1]===81&&e[2]===76&&e[3]===105?{ext:"sqlite",mime:"application/x-sqlite3"}:e[0]===78&&e[1]===69&&e[2]===83&&e[3]===26?{ext:"nes",mime:"application/x-nintendo-nes-rom"}:e[0]===67&&e[1]===114&&e[2]===50&&e[3]===52?{ext:"crx",mime:"application/x-google-chrome-extension"}:e[0]===77&&e[1]===83&&e[2]===67&&e[3]===70||e[0]===73&&e[1]===83&&e[2]===99&&e[3]===40?{ext:"cab",mime:"application/vnd.ms-cab-compressed"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62&&e[7]===10&&e[8]===100&&e[9]===101&&e[10]===98&&e[11]===105&&e[12]===97&&e[13]===110&&e[14]===45&&e[15]===98&&e[16]===105&&e[17]===110&&e[18]===97&&e[19]===114&&e[20]===121?{ext:"deb",mime:"application/x-deb"}:e[0]===33&&e[1]===60&&e[2]===97&&e[3]===114&&e[4]===99&&e[5]===104&&e[6]===62?{ext:"ar",mime:"application/x-unix-archive"}:e[0]===237&&e[1]===171&&e[2]===238&&e[3]===219?{ext:"rpm",mime:"application/x-rpm"}:e[0]===31&&e[1]===160||e[0]===31&&e[1]===157?{ext:"Z",mime:"application/x-compress"}:e[0]===76&&e[1]===90&&e[2]===73&&e[3]===80?{ext:"lz",mime:"application/x-lzip"}:e[0]===208&&e[1]===207&&e[2]===17&&e[3]===224&&e[4]===161&&e[5]===177&&e[6]===26&&e[7]===225?{ext:"msi",mime:"application/x-msi"}:null:null}});var Zge=g((Isr,Jge)=>{"use strict";var KL="pending",Wge="settled",DS="fulfilled",LS="rejected",Nwt=function(){},Gge=typeof global<"u"&&typeof global.process<"u"&&typeof global.process.emit=="function",qwt=typeof setImmediate>"u"?setTimeout:setImmediate,J0=[],VL;function Pwt(){for(var e=0;e<J0.length;e++)J0[e][0](J0[e][1]);J0=[],VL=!1}function FS(e,t){J0.push([e,t]),VL||(VL=!0,qwt(Pwt,0))}function kwt(e,t){function r(i){XL(t,i)}function n(i){Z0(t,i)}try{e(r,n)}catch(i){n(i)}}function Vge(e){var t=e.owner,r=t._state,n=t._data,i=e[r],s=e.then;if(typeof i=="function"){r=DS;try{n=i(n)}catch(o){Z0(s,o)}}Kge(s,n)||(r===DS&&XL(s,n),r===LS&&Z0(s,n))}function Kge(e,t){var r;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&(typeof t=="function"||typeof t=="object")){var n=t.then;if(typeof n=="function")return n.call(t,function(i){r||(r=!0,t===i?Xge(e,i):XL(e,i))},function(i){r||(r=!0,Z0(e,i))}),!0}}catch(i){return r||Z0(e,i),!0}return!1}function XL(e,t){(e===t||!Kge(e,t))&&Xge(e,t)}function Xge(e,t){e._state===KL&&(e._state=Wge,e._data=t,FS(Dwt,e))}function Z0(e,t){e._state===KL&&(e._state=Wge,e._data=t,FS(Lwt,e))}function Yge(e){e._then=e._then.forEach(Vge)}function Dwt(e){e._state=DS,Yge(e)}function Lwt(e){e._state=LS,Yge(e),!e._handled&&Gge&&global.process.emit("unhandledRejection",e._data,e)}function Fwt(e){global.process.emit("rejectionHandled",e)}function os(e){if(typeof e!="function")throw new TypeError("Promise resolver "+e+" is not a function");if(!(this instanceof os))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],kwt(e,this)}os.prototype={constructor:os,_state:KL,_then:null,_data:void 0,_handled:!1,then:function(e,t){var r={owner:this,then:new this.constructor(Nwt),fulfilled:e,rejected:t};return(t||e)&&!this._handled&&(this._handled=!0,this._state===LS&&Gge&&FS(Fwt,this)),this._state===DS||this._state===LS?FS(Vge,r):this._then.push(r),r.then},catch:function(e){return this.then(null,e)}};os.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new os(function(t,r){var n=[],i=0;function s(u){return i++,function(c){n[u]=c,--i||t(n)}}for(var o=0,a;o<e.length;o++)a=e[o],a&&typeof a.then=="function"?a.then(s(o),r):n[o]=a;i||t(n)})};os.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new os(function(t,r){for(var n=0,i;n<e.length;n++)i=e[n],i&&typeof i.then=="function"?i.then(t,r):t(i)})};os.resolve=function(e){return e&&typeof e=="object"&&e.constructor===os?e:new os(function(t){t(e)})};os.reject=function(e){return new os(function(t,r){r(e)})};Jge.exports=os});var e0e=g((Rsr,Qge)=>{"use strict";Qge.exports=typeof Promise=="function"?Promise:Zge()});var MS=g((Nsr,r0e)=>{"use strict";var t0e=Object.getOwnPropertySymbols,Mwt=Object.prototype.hasOwnProperty,Bwt=Object.prototype.propertyIsEnumerable;function jwt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Uwt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(s){return t[s]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(s){i[s]=s}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}r0e.exports=Uwt()?Object.assign:function(e,t){for(var r,n=jwt(e),i,s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var o in r)Mwt.call(r,o)&&(n[o]=r[o]);if(t0e){i=t0e(r);for(var a=0;a<i.length;a++)Bwt.call(r,i[a])&&(n[i[a]]=r[i[a]])}}return n}});var i0e=g((qsr,n0e)=>{var Hwt=require("stream").PassThrough,zwt=MS();n0e.exports=function(e){e=zwt({},e);var t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);var s=0,o=[],a=new Hwt({objectMode:i});return r&&a.setEncoding(r),a.on("data",function(u){o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=function(){return t?o:n?Buffer.concat(o,s):o.join("")},a.getBufferedLength=function(){return s},a}});var o0e=g((Psr,BS)=>{"use strict";var s0e=e0e(),YL=MS(),$wt=i0e();function JL(e,t){if(!e)return s0e.reject(new Error("Expected a stream"));t=YL({maxBuffer:1/0},t);var r=t.maxBuffer,n,i,s=new s0e(function(o,a){n=$wt(t),e.once("error",u),e.pipe(n),n.on("data",function(){n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=function(){e.unpipe&&e.unpipe(n)};function u(c){c&&(c.bufferedData=n.getBufferedValue()),a(c)}});return s.then(i,i),s.then(function(){return n.getBufferedValue()})}BS.exports=JL;BS.exports.buffer=function(e,t){return JL(e,YL({},t,{encoding:"buffer"}))};BS.exports.array=function(e,t){return JL(e,YL({},t,{array:!0}))}});var l0e=g((ksr,c0e)=>{"use strict";var a0e=function(e,t,r){return function(){for(var n=this,i=new Array(arguments.length),s=0;s<arguments.length;s++)i[s]=arguments[s];return new t(function(o,a){i.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var f=new Array(arguments.length-1),p=1;p<arguments.length;p++)f[p-1]=arguments[p];o(f)}else o(c)}),e.apply(n,i)})}},u0e=c0e.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var n=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},i=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):a0e(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(s,o){var a=e[o];return s[o]=typeof a=="function"&&n(o)?a0e(a,t,r):a,s},i)};u0e.all=u0e});var h0e=g((Dsr,d0e)=>{d0e.exports=jS;function jS(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}jS.prototype.go=function(e){this.pending<this.max?p0e(this,e):this.waiting.push(e)};jS.prototype.wait=function(e){this.pending===0?e(this.error):this.listeners.push(e)};jS.prototype.hold=function(){return f0e(this)};function f0e(e){e.pending+=1;var t=!1;return r;function r(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)p0e(e,e.waiting.shift());else if(e.pending===0){var s=e.listeners;e.listeners=[],s.forEach(n)}}function n(i){i(e.error)}}function p0e(e,t){t(f0e(e))}});var g0e=g(ev=>{var Q0=require("fs"),US=require("util"),ZL=require("stream"),m0e=ZL.Readable,QL=ZL.Writable,Wwt=ZL.PassThrough,Gwt=h0e(),HS=require("events").EventEmitter;ev.createFromBuffer=Vwt;ev.createFromFd=Kwt;ev.BufferSlicer=cu;ev.FdSlicer=uu;US.inherits(uu,HS);function uu(e,t){t=t||{},HS.call(this),this.fd=e,this.pend=new Gwt,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}uu.prototype.read=function(e,t,r,n,i){var s=this;s.pend.go(function(o){Q0.read(s.fd,e,t,r,n,function(a,u,c){o(),i(a,u,c)})})};uu.prototype.write=function(e,t,r,n,i){var s=this;s.pend.go(function(o){Q0.write(s.fd,e,t,r,n,function(a,u,c){o(),i(a,u,c)})})};uu.prototype.createReadStream=function(e){return new zS(this,e)};uu.prototype.createWriteStream=function(e){return new $S(this,e)};uu.prototype.ref=function(){this.refCount+=1};uu.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&Q0.close(e.fd,t);function t(r){r?e.emit("error",r):e.emit("close")}};US.inherits(zS,m0e);function zS(e,t){t=t||{},m0e.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}zS.prototype._read=function(e){var t=this;if(!t.destroyed){var r=Math.min(t._readableState.highWaterMark,e);if(t.endOffset!=null&&(r=Math.min(r,t.endOffset-t.pos)),r<=0){t.destroyed=!0,t.push(null),t.context.unref();return}t.context.pend.go(function(n){if(t.destroyed)return n();var i=new Buffer(r);Q0.read(t.context.fd,i,0,r,t.pos,function(s,o){s?t.destroy(s):o===0?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=o,t.push(i.slice(0,o))),n()})})}};zS.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())};US.inherits($S,QL);function $S(e,t){t=t||{},QL.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end==null?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}$S.prototype._write=function(e,t,r){var n=this;if(!n.destroyed){if(n.pos+e.length>n.endOffset){var i=new Error("maximum file length exceeded");i.code="ETOOBIG",n.destroy(),r(i);return}n.context.pend.go(function(s){if(n.destroyed)return s();Q0.write(n.context.fd,e,0,e.length,n.pos,function(o,a){o?(n.destroy(),s(),r(o)):(n.bytesWritten+=a,n.pos+=a,n.emit("progress"),s(),r())})})}};$S.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())};US.inherits(cu,HS);function cu(e,t){HS.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}cu.prototype.read=function(e,t,r,n,i){var s=n+r,o=s-this.buffer.length,a=o>0?o:r;this.buffer.copy(e,t,n,s),setImmediate(function(){i(null,a)})};cu.prototype.write=function(e,t,r,n,i){e.copy(this.buffer,n,t,t+r),setImmediate(function(){i(null,r,e)})};cu.prototype.createReadStream=function(e){e=e||{};var t=new Wwt(e);t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var r=this.buffer.slice(t.start,t.pos),n=0;;){var i=n+this.maxChunkSize;if(i>=r.length){n<r.length&&t.write(r.slice(n,r.length));break}t.write(r.slice(n,i)),n=i}return t.end(),t.destroy=function(){t.destroyed=!0},t};cu.prototype.createWriteStream=function(e){var t=this;e=e||{};var r=new QL(e);return r.start=e.start||0,r.endOffset=e.end==null?this.buffer.length:+e.end,r.bytesWritten=0,r.pos=r.start,r.destroyed=!1,r._write=function(n,i,s){if(!r.destroyed){var o=r.pos+n.length;if(o>r.endOffset){var a=new Error("maximum file length exceeded");a.code="ETOOBIG",r.destroyed=!0,s(a);return}n.copy(t.buffer,r.pos,0,n.length),r.bytesWritten+=n.length,r.pos=o,r.emit("progress"),s()}},r.destroy=function(){r.destroyed=!0},r};cu.prototype.ref=function(){this.refCount+=1};cu.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")};function Vwt(e,t){return new cu(e,t)}function Kwt(e,t){return new uu(e,t)}});var y0e=g((Fsr,x0e)=>{var Oc=require("buffer").Buffer,eF=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(eF=new Int32Array(eF));function v0e(e){if(Oc.isBuffer(e))return e;var t=typeof Oc.alloc=="function"&&typeof Oc.from=="function";if(typeof e=="number")return t?Oc.alloc(e):new Oc(e);if(typeof e=="string")return t?Oc.from(e):new Oc(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function Xwt(e){var t=v0e(4);return t.writeInt32BE(e,0),t}function tF(e,t){e=v0e(e),Oc.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=~~t^-1,n=0;n<e.length;n++)r=eF[(r^e[n])&255]^r>>>8;return r^-1}function rF(){return Xwt(tF.apply(null,arguments))}rF.signed=function(){return tF.apply(null,arguments)};rF.unsigned=function(){return tF.apply(null,arguments)>>>0};x0e.exports=rF});var T0e=g(sa=>{var nF=require("fs"),Ywt=require("zlib"),_0e=g0e(),Jwt=y0e(),VS=require("util"),KS=require("events").EventEmitter,b0e=require("stream").Transform,iF=require("stream").PassThrough,Zwt=require("stream").Writable;sa.open=Qwt;sa.fromFd=w0e;sa.fromBuffer=eEt;sa.fromRandomAccessReader=sF;sa.dosDateTimeToDate=S0e;sa.validateFileName=C0e;sa.ZipFile=Ic;sa.Entry=tv;sa.RandomAccessReader=Rc;function Qwt(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!0),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=GS),nF.open(e,"r",function(n,i){if(n)return r(n);w0e(i,t,function(s,o){s&&nF.close(i,GS),r(s,o)})})}function w0e(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose==null&&(t.autoClose=!1),t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1),r==null&&(r=GS),nF.fstat(e,function(n,i){if(n)return r(n);var s=_0e.createFromFd(e,{autoClose:!0});sF(s,i.size,t,r)})}function eEt(e,t,r){typeof t=="function"&&(r=t,t=null),t==null&&(t={}),t.autoClose=!1,t.lazyEntries==null&&(t.lazyEntries=!1),t.decodeStrings==null&&(t.decodeStrings=!0),t.validateEntrySizes==null&&(t.validateEntrySizes=!0),t.strictFileNames==null&&(t.strictFileNames=!1);var n=_0e.createFromBuffer(e,{maxChunkSize:65536});sF(n,e.length,t,r)}function sF(e,t,r,n){typeof r=="function"&&(n=r,r=null),r==null&&(r={}),r.autoClose==null&&(r.autoClose=!0),r.lazyEntries==null&&(r.lazyEntries=!1),r.decodeStrings==null&&(r.decodeStrings=!0);var i=!!r.decodeStrings;if(r.validateEntrySizes==null&&(r.validateEntrySizes=!0),r.strictFileNames==null&&(r.strictFileNames=!1),n==null&&(n=GS),typeof t!="number")throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var s=22,o=65535,a=Math.min(s+o,t),u=ia(a),c=t-u.length;rh(e,u,0,a,c,function(f){if(f)return n(f);for(var p=a-s;p>=0;p-=1)if(u.readUInt32LE(p)===101010256){var d=u.slice(p),m=d.readUInt16LE(4);if(m!==0)return n(new Error("multi-disk zip files are not supported: found disk number: "+m));var v=d.readUInt16LE(10),_=d.readUInt32LE(16),b=d.readUInt16LE(20),y=d.length-s;if(b!==y)return n(new Error("invalid comment length. expected: "+y+". found: "+b));var T=i?WS(d,22,d.length,!1):d.slice(22);if(!(v===65535||_===4294967295))return n(null,new Ic(e,_,t,v,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames));var S=ia(20),E=c+p-S.length;rh(e,S,0,S.length,E,function(C){if(C)return n(C);if(S.readUInt32LE(0)!==117853008)return n(new Error("invalid zip64 end of central directory locator signature"));var I=nh(S,8),q=ia(56);rh(e,q,0,q.length,I,function(B){return B?n(B):q.readUInt32LE(0)!==101075792?n(new Error("invalid zip64 end of central directory record signature")):(v=nh(q,32),_=nh(q,48),n(null,new Ic(e,_,t,v,T,r.autoClose,r.lazyEntries,i,r.validateEntrySizes,r.strictFileNames)))})});return}n(new Error("end of central directory record signature not found"))})}VS.inherits(Ic,KS);function Ic(e,t,r,n,i,s,o,a,u,c){var f=this;KS.call(f),f.reader=e,f.reader.on("error",function(p){E0e(f,p)}),f.reader.once("close",function(){f.emit("close")}),f.readEntryCursor=t,f.fileSize=r,f.entryCount=n,f.comment=i,f.entriesRead=0,f.autoClose=!!s,f.lazyEntries=!!o,f.decodeStrings=!!a,f.validateEntrySizes=!!u,f.strictFileNames=!!c,f.isOpen=!0,f.emittedError=!1,f.lazyEntries||f._readEntry()}Ic.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())};function xo(e,t){e.autoClose&&e.close(),E0e(e,t)}function E0e(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}Ic.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()};Ic.prototype._readEntry=function(){var e=this;if(e.entryCount===e.entriesRead){setImmediate(function(){e.autoClose&&e.close(),!e.emittedError&&e.emit("end")});return}if(!e.emittedError){var t=ia(46);rh(e.reader,t,0,t.length,e.readEntryCursor,function(r){if(r)return xo(e,r);if(!e.emittedError){var n=new tv,i=t.readUInt32LE(0);if(i!==33639248)return xo(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(n.versionMadeBy=t.readUInt16LE(4),n.versionNeededToExtract=t.readUInt16LE(6),n.generalPurposeBitFlag=t.readUInt16LE(8),n.compressionMethod=t.readUInt16LE(10),n.lastModFileTime=t.readUInt16LE(12),n.lastModFileDate=t.readUInt16LE(14),n.crc32=t.readUInt32LE(16),n.compressedSize=t.readUInt32LE(20),n.uncompressedSize=t.readUInt32LE(24),n.fileNameLength=t.readUInt16LE(28),n.extraFieldLength=t.readUInt16LE(30),n.fileCommentLength=t.readUInt16LE(32),n.internalFileAttributes=t.readUInt16LE(36),n.externalFileAttributes=t.readUInt32LE(38),n.relativeOffsetOfLocalHeader=t.readUInt32LE(42),n.generalPurposeBitFlag&64)return xo(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=ia(n.fileNameLength+n.extraFieldLength+n.fileCommentLength),rh(e.reader,t,0,t.length,e.readEntryCursor,function(s){if(s)return xo(e,s);if(!e.emittedError){var o=(n.generalPurposeBitFlag&2048)!==0;n.fileName=e.decodeStrings?WS(t,0,n.fileNameLength,o):t.slice(0,n.fileNameLength);var a=n.fileNameLength+n.extraFieldLength,u=t.slice(n.fileNameLength,a);n.extraFields=[];for(var c=0;c<u.length-3;){var f=u.readUInt16LE(c+0),p=u.readUInt16LE(c+2),d=c+4,m=d+p;if(m>u.length)return xo(e,new Error("extra field length exceeds extra field buffer size"));var v=ia(p);u.copy(v,0,d,m),n.extraFields.push({id:f,data:v}),c=m}if(n.fileComment=e.decodeStrings?WS(t,a,a+n.fileCommentLength,o):t.slice(a,a+n.fileCommentLength),n.comment=n.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,n.uncompressedSize===4294967295||n.compressedSize===4294967295||n.relativeOffsetOfLocalHeader===4294967295){for(var _=null,c=0;c<n.extraFields.length;c++){var b=n.extraFields[c];if(b.id===1){_=b.data;break}}if(_==null)return xo(e,new Error("expected zip64 extended information extra field"));var y=0;if(n.uncompressedSize===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include uncompressed size"));n.uncompressedSize=nh(_,y),y+=8}if(n.compressedSize===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include compressed size"));n.compressedSize=nh(_,y),y+=8}if(n.relativeOffsetOfLocalHeader===4294967295){if(y+8>_.length)return xo(e,new Error("zip64 extended information extra field does not include relative header offset"));n.relativeOffsetOfLocalHeader=nh(_,y),y+=8}}if(e.decodeStrings)for(var c=0;c<n.extraFields.length;c++){var b=n.extraFields[c];if(b.id===28789){if(b.data.length<6||b.data.readUInt8(0)!==1)continue;var T=b.data.readUInt32LE(1);if(Jwt.unsigned(t.slice(0,n.fileNameLength))!==T)continue;n.fileName=WS(b.data,5,b.data.length,!0);break}}if(e.validateEntrySizes&&n.compressionMethod===0){var S=n.uncompressedSize;if(n.isEncrypted()&&(S+=12),n.compressedSize!==S){var E="compressed/uncompressed size mismatch for stored file: "+n.compressedSize+" != "+n.uncompressedSize;return xo(e,new Error(E))}}if(e.decodeStrings){e.strictFileNames||(n.fileName=n.fileName.replace(/\\/g,"/"));var C=C0e(n.fileName,e.validateFileNameOptions);if(C!=null)return xo(e,new Error(C))}e.emit("entry",n),e.lazyEntries||e._readEntry()}})}})}};Ic.prototype.openReadStream=function(e,t,r){var n=this,i=0,s=e.compressedSize;if(r==null)r=t,t={};else{if(t.decrypt!=null){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(t.decrypt!==!1)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&t.decompress!==!1)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(t.decompress!=null){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!(t.decompress===!1||t.decompress===!0))throw new Error("invalid options.decompress value: "+t.decompress)}if(t.start!=null||t.end!=null){if(e.isCompressed()&&t.decompress!==!1)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&t.decrypt!==!1)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(t.start!=null){if(i=t.start,i<0)throw new Error("options.start < 0");if(i>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(t.end!=null){if(s=t.end,s<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<i)throw new Error("options.end < options.start")}}if(!n.isOpen)return r(new Error("closed"));if(e.isEncrypted()&&t.decrypt!==!1)return r(new Error("entry is encrypted, and options.decrypt !== false"));n.reader.ref();var o=ia(30);rh(n.reader,o,0,o.length,e.relativeOffsetOfLocalHeader,function(a){try{if(a)return r(a);var u=o.readUInt32LE(0);if(u!==67324752)return r(new Error("invalid local file header signature: 0x"+u.toString(16)));var c=o.readUInt16LE(26),f=o.readUInt16LE(28),p=e.relativeOffsetOfLocalHeader+o.length+c+f,d;if(e.compressionMethod===0)d=!1;else if(e.compressionMethod===8)d=t.decompress!=null?t.decompress:!0;else return r(new Error("unsupported compression method: "+e.compressionMethod));var m=p,v=m+e.compressedSize;if(e.compressedSize!==0&&v>n.fileSize)return r(new Error("file data overflows file bounds: "+m+" + "+e.compressedSize+" > "+n.fileSize));var _=n.reader.createReadStream({start:m+i,end:m+s}),b=_;if(d){var y=!1,T=Ywt.createInflateRaw();_.on("error",function(S){setImmediate(function(){y||T.emit("error",S)})}),_.pipe(T),n.validateEntrySizes?(b=new rv(e.uncompressedSize),T.on("error",function(S){setImmediate(function(){y||b.emit("error",S)})}),T.pipe(b)):b=T,b.destroy=function(){y=!0,T!==b&&T.unpipe(b),_.unpipe(T),_.destroy()}}r(null,b)}finally{n.reader.unref()}})};function tv(){}tv.prototype.getLastModDate=function(){return S0e(this.lastModFileDate,this.lastModFileTime)};tv.prototype.isEncrypted=function(){return(this.generalPurposeBitFlag&1)!==0};tv.prototype.isCompressed=function(){return this.compressionMethod===8};function S0e(e,t){var r=e&31,n=(e>>5&15)-1,i=(e>>9&127)+1980,s=0,o=(t&31)*2,a=t>>5&63,u=t>>11&31;return new Date(i,n,r,u,a,o,s)}function C0e(e){return e.indexOf("\\")!==-1?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:e.split("/").indexOf("..")!==-1?"invalid relative path: "+e:null}function rh(e,t,r,n,i,s){if(n===0)return setImmediate(function(){s(null,ia(0))});e.read(t,r,n,i,function(o,a){if(o)return s(o);if(a<n)return s(new Error("unexpected EOF"));s()})}VS.inherits(rv,b0e);function rv(e){b0e.call(this),this.actualByteCount=0,this.expectedByteCount=e}rv.prototype._transform=function(e,t,r){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var n="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return r(new Error(n))}r(null,e)};rv.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()};VS.inherits(Rc,KS);function Rc(){KS.call(this),this.refCount=0}Rc.prototype.ref=function(){this.refCount+=1};Rc.prototype.unref=function(){var e=this;if(e.refCount-=1,e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");e.close(t);function t(r){if(r)return e.emit("error",r);e.emit("close")}};Rc.prototype.createReadStream=function(e){var t=e.start,r=e.end;if(t===r){var n=new iF;return setImmediate(function(){n.end()}),n}var i=this._readStreamForRange(t,r),s=!1,o=new XS(this);i.on("error",function(u){setImmediate(function(){s||o.emit("error",u)})}),o.destroy=function(){i.unpipe(o),o.unref(),i.destroy()};var a=new rv(r-t);return o.on("error",function(u){setImmediate(function(){s||a.emit("error",u)})}),a.destroy=function(){s=!0,o.unpipe(a),o.destroy()},i.pipe(o).pipe(a)};Rc.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")};Rc.prototype.read=function(e,t,r,n,i){var s=this.createReadStream({start:n,end:n+r}),o=new Zwt,a=0;o._write=function(u,c,f){u.copy(e,t+a,0,u.length),a+=u.length,f()},o.on("finish",i),s.on("error",function(u){i(u)}),s.pipe(o)};Rc.prototype.close=function(e){setImmediate(e)};VS.inherits(XS,iF);function XS(e){iF.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}XS.prototype._flush=function(e){this.unref(),e()};XS.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var tEt="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function WS(e,t,r,n){if(n)return e.toString("utf8",t,r);for(var i="",s=t;s<r;s++)i+=tEt[e[s]];return i}function nh(e,t){var r=e.readUInt32LE(t),n=e.readUInt32LE(t+4);return n*4294967296+r}var ia;typeof Buffer.allocUnsafe=="function"?ia=function(e){return Buffer.allocUnsafe(e)}:ia=function(e){return new Buffer(e)};function GS(e){if(e)throw e}});var R0e=g((Bsr,I0e)=>{"use strict";var A0e=$ge(),rEt=o0e(),O0e=l0e(),nEt=T0e(),iEt=(e,t)=>{let s=e.versionMadeBy>>8;return(t&61440)===40960?"symlink":(t&61440)===16384||s===0&&e.externalFileAttributes===16?"directory":"file"},sEt=(e,t)=>{let r={mode:e.externalFileAttributes>>16&65535,mtime:e.getLastModDate(),path:e.fileName};return r.type=iEt(e,r.mode),r.mode===0&&r.type==="directory"&&(r.mode=493),r.mode===0&&(r.mode=420),O0e(t.openReadStream.bind(t))(e).then(rEt.buffer).then(n=>(r.data=n,r.type==="symlink"&&(r.linkname=n.toString()),r)).catch(n=>{throw t.close(),n})},oEt=e=>new Promise((t,r)=>{let n=[];e.readEntry(),e.on("entry",i=>{sEt(i,e).catch(r).then(s=>{n.push(s),e.readEntry()})}),e.on("error",r),e.on("end",()=>t(n))});I0e.exports=()=>e=>Buffer.isBuffer(e)?!A0e(e)||A0e(e).ext!=="zip"?Promise.resolve([]):O0e(nEt.fromBuffer)(e,{lazyEntries:!0}).then(oEt):Promise.reject(new TypeError(`Expected a Buffer, got ${typeof e}`))});var P0e=g((jsr,q0e)=>{"use strict";var N0e=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};q0e.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):N0e(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?N0e(s,t):s}return n}});var F0e=g((Usr,oF)=>{"use strict";var aEt=require("fs"),af=require("path"),k0e=P0e(),D0e={mode:511&~process.umask(),fs:aEt},L0e=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(af.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};oF.exports=(e,t)=>Promise.resolve().then(()=>{L0e(e),t=Object.assign({},D0e,t);let r=k0e(t.fs.mkdir),n=k0e(t.fs.stat),i=s=>r(s,t.mode).then(()=>s).catch(o=>{if(o.code==="ENOENT"){if(o.message.includes("null bytes")||af.dirname(s)===s)throw o;return i(af.dirname(s)).then(()=>i(s))}return n(s).then(a=>a.isDirectory()?s:Promise.reject()).catch(()=>{throw o})});return i(af.resolve(e))});oF.exports.sync=(e,t)=>{L0e(e),t=Object.assign({},D0e,t);let r=n=>{try{t.fs.mkdirSync(n,t.mode)}catch(i){if(i.code==="ENOENT"){if(i.message.includes("null bytes")||af.dirname(n)===n)throw i;return r(af.dirname(n)),r(n)}try{if(!t.fs.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}return n};return r(af.resolve(e))}});var U0e=g((Hsr,j0e)=>{"use strict";var M0e=function(e,t,r){return function(){for(var n=this,i=new Array(arguments.length),s=0;s<arguments.length;s++)i[s]=arguments[s];return new t(function(o,a){i.push(function(u,c){if(u)a(u);else if(r.multiArgs){for(var f=new Array(arguments.length-1),p=1;p<arguments.length;p++)f[p-1]=arguments[p];o(f)}else o(c)}),e.apply(n,i)})}},B0e=j0e.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var n=function(s){var o=function(a){return typeof a=="string"?s===a:a.test(s)};return r.include?r.include.some(o):!r.exclude.some(o)},i=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):M0e(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(s,o){var a=e[o];return s[o]=typeof a=="function"&&n(o)?M0e(a,t,r):a,s},i)};B0e.all=B0e});var z0e=g((zsr,H0e)=>{"use strict";H0e.exports=function(t,r){if(r){if(typeof r!="object")throw new TypeError(String(r)+" is not an object. Expected an object that has boolean `includeZero` property.");if("includeZero"in r){if(typeof r.includeZero!="boolean")throw new TypeError(String(r.includeZero)+" is neither true nor false. `includeZero` option must be a Boolean value.");if(r.includeZero&&t===0)return!0}}return Number.isSafeInteger(t)&&t>=1}});var W0e=g(($sr,$0e)=>{"use strict";var nv=require("path"),iv=require("util"),uEt=z0e();$0e.exports=function(t,r,n){if(typeof t!="string")throw new TypeError(iv.inspect(t)+" is not a string. First argument to strip-dirs must be a path string.");if(nv.posix.isAbsolute(t)||nv.win32.isAbsolute(t))throw new Error(`${t} is an absolute path. strip-dirs requires a relative path.`);if(!uEt(r,{includeZero:!0}))throw new Error("The Second argument of strip-dirs must be a natural number or 0, but received "+iv.inspect(r)+".");if(n){if(typeof n!="object")throw new TypeError(iv.inspect(n)+" is not an object. Expected an object with a boolean `disallowOverflow` property.");if(Array.isArray(n))throw new TypeError(iv.inspect(n)+" is an array. Expected an object with a boolean `disallowOverflow` property.");if("disallowOverflow"in n&&typeof n.disallowOverflow!="boolean")throw new TypeError(iv.inspect(n.disallowOverflow)+" is neither true nor false. `disallowOverflow` option must be a Boolean value.")}else n={disallowOverflow:!1};let i=nv.normalize(t).split(nv.sep);if(i.length>1&&i[0]==="."&&i.shift(),r>i.length-1){if(n.disallowOverflow)throw new RangeError("Cannot strip more directories than there are.");r=i.length-1}return nv.join.apply(null,i.slice(r))}});var cF=g((Wsr,G0e)=>{"use strict";var YS=require("path"),cEt=In(),lEt=PS(),fEt=Fge(),pEt=Hge(),dEt=R0e(),aF=F0e(),hEt=U0e(),mEt=W0e(),as=hEt(cEt),gEt=(e,t)=>t.plugins.length===0?Promise.resolve([]):Promise.all(t.plugins.map(r=>r(e,t))).then(r=>r.reduce((n,i)=>n.concat(i))),uF=(e,t)=>as.realpath(e).catch(r=>{let n=YS.dirname(e);return uF(n,t)}).then(r=>{if(r.indexOf(t)!==0)throw new Error("Refusing to create a directory outside the output path.");return aF(e).then(as.realpath)}),vEt=(e,t)=>as.readlink(e).catch(r=>null).then(r=>{if(r)throw new Error("Refusing to write into a symlink");return t}),xEt=(e,t,r)=>gEt(e,r).then(n=>(r.strip>0&&(n=n.map(i=>(i.path=mEt(i.path,r.strip),i)).filter(i=>i.path!==".")),typeof r.filter=="function"&&(n=n.filter(r.filter)),typeof r.map=="function"&&(n=n.map(r.map)),t?Promise.all(n.map(i=>{let s=YS.join(t,i.path),o=i.mode&~process.umask(),a=new Date;return i.type==="directory"?aF(t).then(u=>as.realpath(u)).then(u=>uF(s,u)).then(()=>as.utimes(s,a,i.mtime)).then(()=>i):aF(t).then(u=>as.realpath(u)).then(u=>uF(YS.dirname(s),u).then(()=>u)).then(u=>i.type==="file"?vEt(s,u):u).then(u=>as.realpath(YS.dirname(s)).then(c=>{if(c.indexOf(u)!==0)throw new Error("Refusing to write outside output directory: "+c)})).then(()=>i.type==="link"||i.type==="symlink"&&process.platform==="win32"?as.link(i.linkname,s):i.type==="symlink"?as.symlink(i.linkname,s):as.writeFile(s,i.data,{mode:o})).then(()=>i.type==="file"&&as.utimes(s,a,i.mtime)).then(()=>i)})):n));G0e.exports=(e,t,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?Promise.reject(new TypeError("Input file required")):(typeof t=="object"&&(r=t,t=null),r=Object.assign({plugins:[lEt(),fEt(),pEt(),dEt()]},r),(typeof e=="string"?as.readFile(e):Promise.resolve(e)).then(i=>xEt(i,t,r)))});var K0e=g((Gsr,V0e)=>{"use strict";var yEt=/[|\\{}()[\]^$+*?.]/g;V0e.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(yEt,"\\$&")}});var lF=g((Vsr,X0e)=>{"use strict";var _Et=K0e();X0e.exports=function(e,t){if(typeof e!="string"||typeof t!="string")throw new TypeError("Expected a string");return e.replace(new RegExp("(?:"+_Et(t)+"){2,}","g"),t)}});var pF=g((Ksr,fF)=>{"use strict";fF.exports=()=>/[<>:"\/\\|?*\x00-\x1F]/g;fF.exports.windowsNames=()=>/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i});var J0e=g((Xsr,Y0e)=>{"use strict";var bEt=/[|\\{}()[\]^$+*?.]/g;Y0e.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(bEt,"\\$&")}});var dF=g((Ysr,Z0e)=>{"use strict";var wEt=J0e();Z0e.exports=function(e,t){if(typeof e!="string"||typeof t!="string")throw new TypeError;return t=wEt(t),e.replace(new RegExp("^"+t+"|"+t+"$","g"),"")}});var eve=g((Jsr,mF)=>{"use strict";var JS=require("path"),EEt=lF(),hF=pF(),SEt=dF(),CEt=100,Q0e=/[\u0000-\u001f\u0080-\u009f]/g,TEt=/^\.+/,ZS=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t.replacement===void 0?"!":t.replacement;if(hF().test(r)&&Q0e.test(r))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(hF(),r),e=e.replace(Q0e,r),e=e.replace(TEt,r),r.length>0&&(e=EEt(e,r),e=e.length>1?SEt(e,r):e),e=hF.windowsNames().test(e)?e+r:e,e=e.slice(0,CEt),e};ZS.path=(e,t)=>(e=JS.resolve(e),JS.join(JS.dirname(e),ZS(JS.basename(e),t)));mF.exports=ZS;mF.exports.default=ZS});var nve=g((Zsr,rve)=>{var AEt=V0(),OEt=jL(),gF=require("fs"),sv=function(){},IEt=/^v?\.0/.test(process.version),QS=function(e){return typeof e=="function"},REt=function(e){return!IEt||!gF?!1:(e instanceof(gF.ReadStream||sv)||e instanceof(gF.WriteStream||sv))&&QS(e.close)},NEt=function(e){return e.setHeader&&QS(e.abort)},qEt=function(e,t,r,n){n=AEt(n);var i=!1;e.on("close",function(){i=!0}),OEt(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var s=!1;return function(o){if(!i&&!s){if(s=!0,REt(e))return e.close(sv);if(NEt(e))return e.abort();if(QS(e.destroy))return e.destroy();n(o||new Error("stream was destroyed"))}}},tve=function(e){e()},PEt=function(e,t){return e.pipe(t)},kEt=function(){var e=Array.prototype.slice.call(arguments),t=QS(e[e.length-1]||sv)&&e.pop()||sv;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(i,s){var o=s<e.length-1,a=s>0;return qEt(i,o,a,function(u){r||(r=u),u&&n.forEach(tve),!o&&(n.forEach(tve),t(r))})});return e.reduce(PEt)};rve.exports=kEt});var sve=g((Qsr,ive)=>{"use strict";var{PassThrough:DEt}=require("stream");ive.exports=e=>{e=Object.assign({},e);let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new DEt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var ove=g((eor,ov)=>{"use strict";var LEt=nve(),FEt=sve(),e1=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};function vF(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let{maxBuffer:r}=t,n;return new Promise((i,s)=>{let o=a=>{a&&(a.bufferedData=n.getBufferedValue()),s(a)};n=LEt(e,FEt(t),a=>{if(a){o(a);return}i()}),n.on("data",()=>{n.getBufferedLength()>r&&o(new e1)})}).then(()=>n.getBufferedValue())}ov.exports=vF;ov.exports.buffer=(e,t)=>vF(e,Object.assign({},t,{encoding:"buffer"}));ov.exports.array=(e,t)=>vF(e,Object.assign({},t,{array:!0}));ov.exports.MaxBufferError=e1});var uve=g((tor,ave)=>{"use strict";ave.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}});var dve=g((ror,pve)=>{"use strict";var fve="%[a-f0-9]{2}",cve=new RegExp("("+fve+")|([^%]+?)","gi"),lve=new RegExp("("+fve+")+","gi");function xF(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],xF(r),xF(n))}function MEt(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(cve)||[],r=1;r<t.length;r++)e=xF(t,r).join(""),t=e.match(cve)||[];return e}}function BEt(e){for(var t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=lve.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=MEt(r[0]);n!==r[0]&&(t[r[0]]=n)}r=lve.exec(e)}t["%C2"]="\uFFFD";for(var i=Object.keys(t),s=0;s<i.length;s++){var o=i[s];e=e.replace(new RegExp(o,"g"),t[o])}return e}pve.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return BEt(e)}}});var yve=g(av=>{"use strict";var jEt=uve(),mve=MS(),hve=dve();function UEt(e){switch(e.arrayFormat){case"index":return function(t,r,n){return r===null?[us(t,e),"[",n,"]"].join(""):[us(t,e),"[",us(n,e),"]=",us(r,e)].join("")};case"bracket":return function(t,r){return r===null?us(t,e):[us(t,e),"[]=",us(r,e)].join("")};default:return function(t,r){return r===null?us(t,e):[us(t,e),"=",us(r,e)].join("")}}}function HEt(e){var t;switch(e.arrayFormat){case"index":return function(r,n,i){if(t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return function(r,n,i){if(t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),t){if(i[r]===void 0){i[r]=[n];return}}else{i[r]=n;return}i[r]=[].concat(i[r],n)};default:return function(r,n,i){if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function us(e,t){return t.encode?t.strict?jEt(e):encodeURIComponent(e):e}function gve(e){return Array.isArray(e)?e.sort():typeof e=="object"?gve(Object.keys(e)).sort(function(t,r){return Number(t)-Number(r)}).map(function(t){return e[t]}):e}function vve(e){var t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function xve(e,t){t=mve({arrayFormat:"none"},t);var r=HEt(t),n=Object.create(null);return typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e)?n:(e.split("&").forEach(function(i){var s=i.replace(/\+/g," ").split("="),o=s.shift(),a=s.length>0?s.join("="):void 0;a=a===void 0?null:hve(a),r(hve(o),a,n)}),Object.keys(n).sort().reduce(function(i,s){var o=n[s];return o&&typeof o=="object"&&!Array.isArray(o)?i[s]=gve(o):i[s]=o,i},Object.create(null)))}av.extract=vve;av.parse=xve;av.stringify=function(e,t){var r={encode:!0,strict:!0,arrayFormat:"none"};t=mve(r,t),t.sort===!1&&(t.sort=function(){});var n=UEt(t);return e?Object.keys(e).sort(t.sort).map(function(i){var s=e[i];if(s===void 0)return"";if(s===null)return us(i,t);if(Array.isArray(s)){var o=[];return s.slice().forEach(function(a){a!==void 0&&o.push(n(i,a,o.length))}),o.join("&")}return us(i,t)+"="+us(s,t)}).filter(function(i){return i.length>0}).join("&"):""};av.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:xve(vve(e),t)}}});var yF=g((ior,_ve)=>{"use strict";_ve.exports=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\``);return e=e.trim(),t=Object.assign({https:!1},t),/^\.*\/|^(?!localhost)\w+:/.test(e)?e:e.replace(/^(?!(?:\w+:)?\/\/)/,t.https?"https://":"http://")}});var _F=g((sor,bve)=>{"use strict";var zEt=Object.prototype.toString;bve.exports=function(e){var t;return zEt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var Eve=g((oor,wve)=>{"use strict";var bF=_F();wve.exports=(e,t)=>{if(!bF(e))throw new TypeError("Expected a plain object");if(t=t||{},typeof t=="function")throw new TypeError("Specify the compare function as an option instead");let r=t.deep,n=[],i=[],s=o=>{let a=n.indexOf(o);if(a!==-1)return i[a];let u={},c=Object.keys(o).sort(t.compare);n.push(o),i.push(u);for(let f=0;f<c.length;f++){let p=c[f],d=o[p];if(r&&Array.isArray(d)){let m=[];for(let v=0;v<d.length;v++)m[v]=bF(d[v])?s(d[v]):d[v];u[p]=m;continue}u[p]=r&&bF(d)?s(d):d}return u};return s(e)}});var Ave=g((aor,Tve)=>{"use strict";var wF=require("url"),$Et=require("punycode"),Sve=yve(),WEt=yF(),GEt=Eve(),VEt={"http:":80,"https:":443,"ftp:":21},KEt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cve(e,t){return t.some(r=>r instanceof RegExp?r.test(e):r===e)}Tve.exports=(e,t)=>{if(t=Object.assign({normalizeProtocol:!0,normalizeHttps:!1,stripFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},t),typeof e!="string")throw new TypeError("Expected a string");let r=e.startsWith("//");e=WEt(e.trim()).replace(/^\/\//,"http://");let n=wF.parse(e);if(t.normalizeHttps&&n.protocol==="https:"&&(n.protocol="http:"),!n.hostname&&!n.pathname)throw new Error("Invalid URL");delete n.host,delete n.query,t.stripFragment&&delete n.hash;let i=VEt[n.protocol];if(Number(n.port)===i&&delete n.port,n.pathname&&(n.pathname=n.pathname.replace(/\/{2,}/g,"/")),n.pathname&&(n.pathname=decodeURI(n.pathname)),t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let o=n.pathname.split("/"),a=o[o.length-1];Cve(a,t.removeDirectoryIndex)&&(o=o.slice(0,o.length-1),n.pathname=o.slice(1).join("/")+"/")}if(KEt[n.protocol]){let o=n.protocol+"//"+n.hostname,a=wF.resolve(o,n.pathname);n.pathname=a.replace(o,"")}n.hostname&&(n.hostname=$Et.toUnicode(n.hostname).toLowerCase(),n.hostname=n.hostname.replace(/\.$/,""),t.stripWWW&&(n.hostname=n.hostname.replace(/^www\./,""))),n.search==="?"&&delete n.search;let s=Sve.parse(n.search);if(Array.isArray(t.removeQueryParameters))for(let o in s)Cve(o,t.removeQueryParameters)&&delete s[o];return t.sortQueryParameters&&(n.search=Sve.stringify(GEt(s))),n.search!==null&&(n.search=decodeURIComponent(n.search)),e=wF.format(n),(t.removeTrailingSlash||n.pathname==="/")&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),e}});var Ive=g((uor,Ove)=>{"use strict";var XEt=require("stream").PassThrough;Ove.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new XEt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var Rve=g((cor,t1)=>{"use strict";var YEt=Ive();function EF(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=YEt(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}t1.exports=EF;t1.exports.buffer=(e,t)=>EF(e,Object.assign({},t,{encoding:"buffer"}));t1.exports.array=(e,t)=>EF(e,Object.assign({},t,{array:!0}))});var qve=g((lor,Nve)=>{"use strict";function JEt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ZEt=[200,203,204,206,300,301,404,405,410,414,501],QEt=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],eSt={connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},tSt={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function SF(e){var t={};if(!e)return t;for(var r=e.trim().split(/\s*,\s*/),s=r,n=Array.isArray(s),i=0,s=n?s:s[Symbol.iterator]();;){var o;if(n){if(i>=s.length)break;o=s[i++]}else{if(i=s.next(),i.done)break;o=i.value}var a=o,u=a.split(/\s*=\s*/,2),c=u[0],f=u[1];t[c]=f===void 0?!0:f.replace(/^"|"$/g,"")}return t}function rSt(e){var t=[];for(var r in e){var n=e[r];t.push(n===!0?r:r+"="+n)}if(t.length)return t.join(", ")}Nve.exports=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.shared,s=n.cacheHeuristic,o=n.immutableMinTimeToLive,a=n.ignoreCargoCult,u=n._fromObject;if(JEt(this,e),u){this._fromObject(u);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(t),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=o!==void 0?o:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=SF(r.headers["cache-control"]),this._method="method"in t?t.method:"GET",this._url=t.url,this._host=t.headers.host,this._noAuthorization=!t.headers.authorization,this._reqHeaders=r.headers.vary?t.headers:null,this._reqcc=SF(t.headers["cache-control"]),a&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":rSt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!r.headers["cache-control"]&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}return e.prototype.now=function(){return Date.now()},e.prototype.storable=function(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&QEt.indexOf(this._status)!==-1&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||ZEt.indexOf(this._status)!==-1))},e.prototype._hasExplicitExpiration=function(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires},e.prototype._assertRequestHasHeaders=function(r){if(!r||!r.headers)throw Error("Request headers missing")},e.prototype.satisfiesWithoutRevalidation=function(r){this._assertRequestHasHeaders(r);var n=SF(r.headers["cache-control"]);if(n["no-cache"]||/no-cache/.test(r.headers.pragma)||n["max-age"]&&this.age()>n["max-age"]||n["min-fresh"]&&this.timeToLive()<1e3*n["min-fresh"])return!1;if(this.stale()){var i=n["max-stale"]&&!this._rescc["must-revalidate"]&&(n["max-stale"]===!0||n["max-stale"]>this.age()-this.maxAge());if(!i)return!1}return this._requestMatches(r,!1)},e.prototype._requestMatches=function(r,n){return(!this._url||this._url===r.url)&&this._host===r.headers.host&&(!r.method||this._method===r.method||n&&r.method==="HEAD")&&this._varyMatches(r)},e.prototype._allowsStoringAuthenticated=function(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]},e.prototype._varyMatches=function(r){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;for(var n=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/),o=n,i=Array.isArray(o),s=0,o=i?o:o[Symbol.iterator]();;){var a;if(i){if(s>=o.length)break;a=o[s++]}else{if(s=o.next(),s.done)break;a=s.value}var u=a;if(r.headers[u]!==this._reqHeaders[u])return!1}return!0},e.prototype._copyWithoutHopByHopHeaders=function(r){var n={};for(var i in r)eSt[i]||(n[i]=r[i]);if(r.connection)for(var s=r.connection.trim().split(/\s*,\s*/),u=s,o=Array.isArray(u),a=0,u=o?u:u[Symbol.iterator]();;){var c;if(o){if(a>=u.length)break;c=u[a++]}else{if(a=u.next(),a.done)break;c=a.value}var f=c;delete n[f]}if(n.warning){var p=n.warning.split(/,/).filter(function(d){return!/^\s*1[0-9][0-9]/.test(d)});p.length?n.warning=p.join(",").trim():delete n.warning}return n},e.prototype.responseHeaders=function(){var r=this._copyWithoutHopByHopHeaders(this._resHeaders),n=this.age();return n>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(r.warning=(r.warning?`${r.warning}, `:"")+'113 - "rfc7234 5.5.4"'),r.age=`${Math.round(n)}`,r},e.prototype.date=function(){var r=Date.parse(this._resHeaders.date),n=8*3600*1e3;return Number.isNaN(r)||r<this._responseTime-n||r>this._responseTime+n?this._responseTime:r},e.prototype.age=function(){var r=Math.max(0,(this._responseTime-this.date())/1e3);if(this._resHeaders.age){var n=this._ageValue();n>r&&(r=n)}var i=(this.now()-this._responseTime)/1e3;return r+i},e.prototype._ageValue=function(){var r=parseInt(this._resHeaders.age);return isFinite(r)?r:0},e.prototype.maxAge=function(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);var r=this._rescc.immutable?this._immutableMinTtl:0,n=this.date();if(this._resHeaders.expires){var i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<n?0:Math.max(r,(i-n)/1e3)}if(this._resHeaders["last-modified"]){var s=Date.parse(this._resHeaders["last-modified"]);if(isFinite(s)&&n>s)return Math.max(r,(n-s)/1e3*this._cacheHeuristic)}return r},e.prototype.timeToLive=function(){return Math.max(0,this.maxAge()-this.age())*1e3},e.prototype.stale=function(){return this.maxAge()<=this.age()},e.fromObject=function(r){return new this(void 0,void 0,{_fromObject:r})},e.prototype._fromObject=function(r){if(this._responseTime)throw Error("Reinitialized");if(!r||r.v!==1)throw Error("Invalid serialization");this._responseTime=r.t,this._isShared=r.sh,this._cacheHeuristic=r.ch,this._immutableMinTtl=r.imm!==void 0?r.imm:24*3600*1e3,this._status=r.st,this._resHeaders=r.resh,this._rescc=r.rescc,this._method=r.m,this._url=r.u,this._host=r.h,this._noAuthorization=r.a,this._reqHeaders=r.reqh,this._reqcc=r.reqcc},e.prototype.toObject=function(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}},e.prototype.revalidationHeaders=function(r){this._assertRequestHasHeaders(r);var n=this._copyWithoutHopByHopHeaders(r.headers);if(delete n["if-range"],!this._requestMatches(r,!0)||!this.storable())return delete n["if-none-match"],delete n["if-modified-since"],n;this._resHeaders.etag&&(n["if-none-match"]=n["if-none-match"]?`${n["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);var i=n["accept-ranges"]||n["if-match"]||n["if-unmodified-since"]||this._method&&this._method!="GET";if(i){if(delete n["if-modified-since"],n["if-none-match"]){var s=n["if-none-match"].split(/,/).filter(function(o){return!/^\s*W\//.test(o)});s.length?n["if-none-match"]=s.join(",").trim():delete n["if-none-match"]}}else this._resHeaders["last-modified"]&&!n["if-modified-since"]&&(n["if-modified-since"]=this._resHeaders["last-modified"]);return n},e.prototype.revalidatedPolicy=function(r,n){if(this._assertRequestHasHeaders(r),!n||!n.headers)throw Error("Response headers missing");var i=!1;if(n.status!==void 0&&n.status!=304?i=!1:n.headers.etag&&!/^\s*W\//.test(n.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===n.headers.etag:this._resHeaders.etag&&n.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===n.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===n.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!n.headers.etag&&!n.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(r,n),modified:!0};var s={};for(var o in this._resHeaders)s[o]=o in n.headers&&!tSt[o]?n.headers[o]:this._resHeaders[o];var a=Object.assign({},n,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(r,a),modified:!1}},e}()});var CF=g((por,Pve)=>{"use strict";Pve.exports=function(e){for(var t={},r=Object.keys(Object(e)),n=0;n<r.length;n++)t[r[n].toLowerCase()]=e[r[n]];return t}});var Dve=g((dor,kve)=>{"use strict";var nSt=require("stream").Readable,iSt=CF(),TF=class extends nSt{constructor(t,r,n,i){if(typeof t!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof i!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=t,this.headers=iSt(r),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}};kve.exports=TF});var Fve=g((hor,Lve)=>{"use strict";Lve.exports=function(e){for(var t={},r=Object.keys(Object(e)),n=0;n<r.length;n++)t[r[n].toLowerCase()]=e[r[n]];return t}});var r1=g((mor,Mve)=>{"use strict";var sSt=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Mve.exports=(e,t)=>{let r=new Set(Object.keys(e).concat(sSt));for(let n of r)n in t||(t[n]=typeof e[n]=="function"?e[n].bind(e):e[n])}});var jve=g((gor,Bve)=>{"use strict";var oSt=require("stream").PassThrough,aSt=r1(),uSt=e=>{if(!(e&&e.pipe))throw new TypeError("Parameter `response` must be a response stream.");let t=new oSt;return aSt(e,t),e.pipe(t)};Bve.exports=uSt});var Uve=g(AF=>{AF.stringify=function e(t){if(typeof t>"u")return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&typeof t=="object"){var r="",n=Array.isArray(t);r=n?"[":"{";var i=!0;for(var s in t){var o=typeof t[s]=="function"||!n&&typeof t[s]>"u";Object.hasOwnProperty.call(t,s)&&!o&&(i||(r+=","),i=!1,n?t[s]==null?r+="null":r+=e(t[s]):t[s]!==void 0&&(r+=e(s)+":"+e(t[s])))}return r+=n?"]":"}",r}else return typeof t=="string"?JSON.stringify(/^:/.test(t)?":"+t:t):typeof t>"u"?"null":JSON.stringify(t)};AF.parse=function(e){return JSON.parse(e,function(t,r){return typeof r=="string"?/^:base64:/.test(r)?new Buffer(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var $ve=g((xor,zve)=>{"use strict";var cSt=require("events"),Hve=Uve(),lSt=e=>{let t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){let r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map},OF=class extends cSt{constructor(t,r){if(super(),this.opts=Object.assign({namespace:"keyv"},typeof t=="string"?{uri:t}:t,r),!this.opts.store){let n=Object.assign({},this.opts);this.opts.store=lSt(n)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(t){return`${this.opts.namespace}:${t}`}get(t){t=this._getKeyPrefix(t);let r=this.opts.store;return Promise.resolve().then(()=>r.get(t)).then(n=>{if(n=typeof n=="string"?Hve.parse(n):n,n!==void 0){if(typeof n.expires=="number"&&Date.now()>n.expires){this.delete(t);return}return n.value}})}set(t,r,n){t=this._getKeyPrefix(t),typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let i=this.opts.store;return Promise.resolve().then(()=>{let s=typeof n=="number"?Date.now()+n:null;return r={value:r,expires:s},i.set(t,Hve.stringify(r),n)}).then(()=>!0)}delete(t){t=this._getKeyPrefix(t);let r=this.opts.store;return Promise.resolve().then(()=>r.delete(t))}clear(){let t=this.opts.store;return Promise.resolve().then(()=>t.clear())}};zve.exports=OF});var Kve=g((yor,Vve)=>{"use strict";var fSt=require("events"),Wve=require("url"),pSt=Ave(),dSt=Rve(),IF=qve(),Gve=Dve(),hSt=Fve(),mSt=jve(),gSt=$ve(),yo=class{constructor(t,r){if(typeof t!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new gSt({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(t)}createCacheableRequest(t){return(r,n)=>{typeof r=="string"&&(r=Wve.parse(r)),r=Object.assign({headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1},r),r.headers=hSt(r.headers);let i=new fSt,s=pSt(Wve.format(r)),o=`${r.method}:${s}`,a=!1,u=!1,c=p=>{u=!0;let d=m=>{if(a){let _=IF.fromObject(a.cachePolicy).revalidatedPolicy(p,m);if(!_.modified){let b=_.policy.responseHeaders();m=new Gve(m.statusCode,b,a.body,a.url),m.cachePolicy=_.policy,m.fromCache=!0}}m.fromCache||(m.cachePolicy=new IF(p,m),m.fromCache=!1);let v;p.cache&&m.cachePolicy.storable()?(v=mSt(m),dSt.buffer(m).then(_=>{let b={cachePolicy:m.cachePolicy.toObject(),url:m.url,statusCode:m.fromCache?a.statusCode:m.statusCode,body:_},y=p.strictTtl?m.cachePolicy.timeToLive():void 0;return this.cache.set(o,b,y)}).catch(_=>i.emit("error",new yo.CacheError(_)))):p.cache&&a&&this.cache.delete(o).catch(_=>i.emit("error",new yo.CacheError(_))),i.emit("response",v||m),typeof n=="function"&&n(v||m)};try{let m=t(p,d);i.emit("request",m)}catch(m){i.emit("error",new yo.RequestError(m))}},f=p=>Promise.resolve().then(()=>p.cache?this.cache.get(o):void 0).then(d=>{if(typeof d>"u")return c(p);let m=IF.fromObject(d.cachePolicy);if(m.satisfiesWithoutRevalidation(p)){let v=m.responseHeaders(),_=new Gve(d.statusCode,v,d.body,d.url);_.cachePolicy=m,_.fromCache=!0,i.emit("response",_),typeof n=="function"&&n(_)}else a=d,p.headers=m.revalidationHeaders(p),c(p)});return this.cache.on("error",p=>i.emit("error",new yo.CacheError(p))),f(r).catch(p=>{r.automaticFailover&&!u&&c(r),i.emit("error",new yo.CacheError(p))}),i}}};yo.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}};yo.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}};Vve.exports=yo});var Xve=g((wor,NF)=>{"use strict";var RF=require("stream");function ih(e,t,r){typeof r>"u"&&(r=t,t=e,e=null),RF.Duplex.call(this,e),typeof r.read!="function"&&(r=new RF.Readable(e).wrap(r)),this._writable=t,this._readable=r,this._waiting=!1;var n=this;t.once("finish",function(){n.end()}),this.once("finish",function(){t.end()}),r.on("readable",function(){n._waiting&&(n._waiting=!1,n._read())}),r.once("end",function(){n.push(null)}),(!e||typeof e.bubbleErrors>"u"||e.bubbleErrors)&&(t.on("error",function(i){n.emit("error",i)}),r.on("error",function(i){n.emit("error",i)}))}ih.prototype=Object.create(RF.Duplex.prototype,{constructor:{value:ih}});ih.prototype._write=function(t,r,n){this._writable.write(t,r,n)};ih.prototype._read=function(){for(var t,r=0;(t=this._readable.read())!==null;)this.push(t),r++;r===0&&(this._waiting=!0)};NF.exports=function(t,r,n){return new ih(t,r,n)};NF.exports.DuplexWrapper=ih});var qF=g((Eor,Yve)=>{Yve.exports=require("stream")});var Zve=g((Sor,PF)=>{"use strict";function vSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Jve=Ms().Buffer,uv=require("util");function xSt(e,t,r){e.copy(t,r)}PF.exports=function(){function e(){vSt(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},e.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},e.prototype.shift=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}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},e.prototype.concat=function(r){if(this.length===0)return Jve.alloc(0);for(var n=Jve.allocUnsafe(r>>>0),i=this.head,s=0;i;)xSt(i.data,n,s),s+=i.data.length,i=i.next;return n},e}();uv&&uv.inspect&&uv.inspect.custom&&(PF.exports.prototype[uv.inspect.custom]=function(){var e=uv.inspect({length:this.length});return this.constructor.name+" "+e})});var kF=g((Cor,Qve)=>{"use strict";var n1=nu();function ySt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n1.nextTick(i1,this,e)):n1.nextTick(i1,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n1.nextTick(i1,r,s)):n1.nextTick(i1,r,s):t&&t(s)}),this)}function _St(){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 i1(e,t){e.emit("error",t)}Qve.exports={destroy:ySt,undestroy:_St}});var LF=g((Tor,axe)=>{"use strict";var uf=nu();axe.exports=Jr;function txe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){MSt(t,e)}}var bSt=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:uf.nextTick,sh;Jr.WritableState=lv;var rxe=Object.create(vo());rxe.inherits=vn();var wSt={deprecate:a_()},nxe=qF(),o1=Ms().Buffer,ESt=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function SSt(e){return o1.from(e)}function CSt(e){return o1.isBuffer(e)||e instanceof ESt}var ixe=kF();rxe.inherits(Jr,nxe);function TSt(){}function lv(e,t){sh=sh||cf(),e=e||{};var r=t instanceof sh;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,i=e.writableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=e.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){PSt(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new txe(this)}lv.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(lv.prototype,"buffer",{get:wSt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var s1;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(s1=Function.prototype[Symbol.hasInstance],Object.defineProperty(Jr,Symbol.hasInstance,{value:function(e){return s1.call(this,e)?!0:this!==Jr?!1:e&&e._writableState instanceof lv}})):s1=function(e){return e instanceof this};function Jr(e){if(sh=sh||cf(),!s1.call(Jr,this)&&!(this instanceof sh))return new Jr(e);this._writableState=new lv(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),nxe.call(this)}Jr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ASt(e,t){var r=new Error("write after end");e.emit("error",r),uf.nextTick(t,r)}function OSt(e,t,r,n){var i=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),uf.nextTick(n,s),i=!1),i}Jr.prototype.write=function(e,t,r){var n=this._writableState,i=!1,s=!n.objectMode&&CSt(e);return s&&!o1.isBuffer(e)&&(e=SSt(e)),typeof t=="function"&&(r=t,t=null),s?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=TSt),n.ended?ASt(this,r):(s||OSt(this,n,e,r))&&(n.pendingcb++,i=RSt(this,n,s,e,t,r)),i};Jr.prototype.cork=function(){var e=this._writableState;e.corked++};Jr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&sxe(this,e))};Jr.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function ISt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=o1.from(t,r)),t}Object.defineProperty(Jr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function RSt(e,t,r,n,i,s){if(!r){var o=ISt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else DF(e,t,!1,a,n,i,s);return u}function DF(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function NSt(e,t,r,n,i){--t.pendingcb,r?(uf.nextTick(i,n),uf.nextTick(cv,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),cv(e,t))}function qSt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function PSt(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(qSt(r),t)NSt(e,r,n,t,i);else{var s=oxe(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sxe(e,r),n?bSt(exe,e,r,s,i):exe(e,r,s,i)}}function exe(e,t,r,n){r||kSt(e,t),t.pendingcb--,n(),cv(e,t)}function kSt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function sxe(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)i[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;i.allBuffers=a,DF(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new txe(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,f=r.callback,p=t.objectMode?1:u.length;if(DF(e,t,!1,p,u,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Jr.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};Jr.prototype._writev=null;Jr.prototype.end=function(e,t,r){var n=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||FSt(this,n,r)};function oxe(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function DSt(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),cv(e,t)})}function LSt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,uf.nextTick(DSt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function cv(e,t){var r=oxe(t);return r&&(LSt(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function FSt(e,t,r){t.ending=!0,cv(e,t),r&&(t.finished?uf.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function MSt(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}Object.defineProperty(Jr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Jr.prototype.destroy=ixe.destroy;Jr.prototype._undestroy=ixe.undestroy;Jr.prototype._destroy=function(e,t){this.end(),t(e)}});var cf=g((Aor,fxe)=>{"use strict";var uxe=nu(),BSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};fxe.exports=lu;var cxe=Object.create(vo());cxe.inherits=vn();var lxe=BF(),MF=LF();cxe.inherits(lu,lxe);for(FF=BSt(MF.prototype),a1=0;a1<FF.length;a1++)u1=FF[a1],lu.prototype[u1]||(lu.prototype[u1]=MF.prototype[u1]);var FF,u1,a1;function lu(e){if(!(this instanceof lu))return new lu(e);lxe.call(this,e),MF.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",jSt)}Object.defineProperty(lu.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function jSt(){this.allowHalfOpen||this._writableState.ended||uxe.nextTick(USt,this)}function USt(e){e.end()}Object.defineProperty(lu.prototype,"destroyed",{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)}});lu.prototype._destroy=function(e,t){this.push(null),this.end(),uxe.nextTick(t,e)}});var HF=g(dxe=>{"use strict";var UF=Ms().Buffer,pxe=UF.isEncoding||function(e){switch(e=""+e,e&&e.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 HSt(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function zSt(e){var t=HSt(e);if(typeof t!="string"&&(UF.isEncoding===pxe||!pxe(e)))throw new Error("Unknown encoding: "+e);return t||e}dxe.StringDecoder=fv;function fv(e){this.encoding=zSt(e);var t;switch(this.encoding){case"utf16le":this.text=XSt,this.end=YSt,t=4;break;case"utf8":this.fillLast=GSt,t=4;break;case"base64":this.text=JSt,this.end=ZSt,t=3;break;default:this.write=QSt,this.end=e1t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=UF.allocUnsafe(t)}fv.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};fv.prototype.end=KSt;fv.prototype.text=VSt;fv.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function jF(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function $St(e,t,r){var n=t.length-1;if(n<r)return 0;var i=jF(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||i===-2?0:(i=jF(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||i===-2?0:(i=jF(t[n]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function WSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function GSt(e){var t=this.lastTotal-this.lastNeed,r=WSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function VSt(e,t){var r=$St(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function KSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function XSt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function YSt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function JSt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function ZSt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function QSt(e){return e.toString(this.encoding)}function e1t(e){return e&&e.length?this.write(e):""}});var BF=g((Ror,Cxe)=>{"use strict";var ah=nu();Cxe.exports=ur;var t1t=dL(),pv;ur.ReadableState=_xe;var Ior=require("events").EventEmitter,vxe=function(e,t){return e.listeners(t).length},VF=qF(),dv=Ms().Buffer,r1t=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function n1t(e){return dv.from(e)}function i1t(e){return dv.isBuffer(e)||e instanceof r1t}var xxe=Object.create(vo());xxe.inherits=vn();var zF=require("util"),Rt=void 0;zF&&zF.debuglog?Rt=zF.debuglog("stream"):Rt=function(){};var s1t=Zve(),yxe=kF(),oh;xxe.inherits(ur,VF);var $F=["error","close","destroy","pause","resume"];function o1t(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):t1t(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function _xe(e,t){pv=pv||cf(),e=e||{};var r=t instanceof pv;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,s=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new s1t,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.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(oh||(oh=HF().StringDecoder),this.decoder=new oh(e.encoding),this.encoding=e.encoding)}function ur(e){if(pv=pv||cf(),!(this instanceof ur))return new ur(e);this._readableState=new _xe(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),VF.call(this)}Object.defineProperty(ur.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});ur.prototype.destroy=yxe.destroy;ur.prototype._undestroy=yxe.undestroy;ur.prototype._destroy=function(e,t){this.push(null),t(e)};ur.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=dv.from(e,t),t=""),n=!0),bxe(this,e,t,!1,n)};ur.prototype.unshift=function(e){return bxe(this,e,null,!0,!1)};function bxe(e,t,r,n,i){var s=e._readableState;if(t===null)s.reading=!1,l1t(e,s);else{var o;i||(o=a1t(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?(typeof t!="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==dv.prototype&&(t=n1t(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):WF(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||t.length!==0?WF(e,s,t,!1):wxe(e,s)):WF(e,s,t,!1))):n||(s.reading=!1)}return u1t(s)}function WF(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&c1(e)),wxe(e,t)}function a1t(e,t){var r;return!i1t(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function u1t(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}ur.prototype.isPaused=function(){return this._readableState.flowing===!1};ur.prototype.setEncoding=function(e){return oh||(oh=HF().StringDecoder),this._readableState.decoder=new oh(e),this._readableState.encoding=e,this};var hxe=8388608;function c1t(e){return e>=hxe?e=hxe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function mxe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=c1t(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}ur.prototype.read=function(e){Rt("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return Rt("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?GF(this):c1(this),null;if(e=mxe(e,t),e===0&&t.ended)return t.length===0&&GF(this),null;var n=t.needReadable;Rt("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,Rt("length less than watermark",n)),t.ended||t.reading?(n=!1,Rt("reading or ended",n)):n&&(Rt("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=mxe(r,t)));var i;return e>0?i=Exe(e,t):i=null,i===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&GF(this)),i!==null&&this.emit("data",i),i};function l1t(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,c1(e)}}function c1(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(Rt("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ah.nextTick(gxe,e):gxe(e))}function gxe(e){Rt("emit readable"),e.emit("readable"),KF(e)}function wxe(e,t){t.readingMore||(t.readingMore=!0,ah.nextTick(f1t,e,t))}function f1t(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(Rt("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}ur.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};ur.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,Rt("pipe count=%d opts=%j",n.pipesCount,t);var i=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,s=i?a:b;n.endEmitted?ah.nextTick(s):r.once("end",s),e.on("unpipe",o);function o(y,T){Rt("onunpipe"),y===r&&T&&T.hasUnpiped===!1&&(T.hasUnpiped=!0,f())}function a(){Rt("onend"),e.end()}var u=p1t(r);e.on("drain",u);var c=!1;function f(){Rt("cleanup"),e.removeListener("close",v),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",d),c=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u()}var p=!1;r.on("data",d);function d(y){Rt("ondata"),p=!1;var T=e.write(y);T===!1&&!p&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&Sxe(n.pipes,e)!==-1)&&!c&&(Rt("false write response, pause",n.awaitDrain),n.awaitDrain++,p=!0),r.pause())}function m(y){Rt("onerror",y),b(),e.removeListener("error",m),vxe(e,"error")===0&&e.emit("error",y)}o1t(e,"error",m);function v(){e.removeListener("finish",_),b()}e.once("close",v);function _(){Rt("onfinish"),e.removeListener("close",v),b()}e.once("finish",_);function b(){Rt("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Rt("pipe resume"),r.resume()),e};function p1t(e){return function(){var t=e._readableState;Rt("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&vxe(e,"data")&&(t.flowing=!0,KF(e))}}ur.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Sxe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};ur.prototype.on=function(e,t){var r=VF.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&c1(this):ah.nextTick(d1t,this))}return r};ur.prototype.addListener=ur.prototype.on;function d1t(e){Rt("readable nexttick read 0"),e.read(0)}ur.prototype.resume=function(){var e=this._readableState;return e.flowing||(Rt("resume"),e.flowing=!0,h1t(this,e)),this};function h1t(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ah.nextTick(m1t,e,t))}function m1t(e,t){t.reading||(Rt("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),KF(e),t.flowing&&!t.reading&&e.read(0)}ur.prototype.pause=function(){return Rt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Rt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function KF(e){var t=e._readableState;for(Rt("flow",t.flowing);t.flowing&&e.read()!==null;);}ur.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Rt("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Rt("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=t.push(o);a||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(o){return function(){return e[o].apply(e,arguments)}}(i));for(var s=0;s<$F.length;s++)e.on($F[s],this.emit.bind(this,$F[s]));return this._read=function(o){Rt("wrapped _read",o),n&&(n=!1,e.resume())},this};Object.defineProperty(ur.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ur._fromList=Exe;function Exe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=g1t(e,t.buffer,t.decoder),r}function g1t(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?n=t.shift():n=r?v1t(e,t):x1t(e,t),n}function v1t(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),e-=o,e===0){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}function x1t(e,t){var r=dv.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),e-=o,e===0){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}function GF(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ah.nextTick(y1t,t,e))}function y1t(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Sxe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}});var XF=g((Nor,Oxe)=>{"use strict";Oxe.exports=fu;var l1=cf(),Axe=Object.create(vo());Axe.inherits=vn();Axe.inherits(fu,l1);function _1t(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function fu(e){if(!(this instanceof fu))return new fu(e);l1.call(this,e),this._transformState={afterTransform:_1t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",b1t)}function b1t(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){Txe(e,t,r)}):Txe(this,null,null)}fu.prototype.push=function(e,t){return this._transformState.needTransform=!1,l1.prototype.push.call(this,e,t)};fu.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};fu.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};fu.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};fu.prototype._destroy=function(e,t){var r=this;l1.prototype._destroy.call(this,e,function(n){t(n),r.emit("close")})};function Txe(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var qxe=g((qor,Nxe)=>{"use strict";Nxe.exports=hv;var Ixe=XF(),Rxe=Object.create(vo());Rxe.inherits=vn();Rxe.inherits(hv,Ixe);function hv(e){if(!(this instanceof hv))return new hv(e);Ixe.call(this,e)}hv.prototype._transform=function(e,t,r){r(null,e)}});var Pxe=g((zn,f1)=>{var oa=require("stream");process.env.READABLE_STREAM==="disable"&&oa?(f1.exports=oa,zn=f1.exports=oa.Readable,zn.Readable=oa.Readable,zn.Writable=oa.Writable,zn.Duplex=oa.Duplex,zn.Transform=oa.Transform,zn.PassThrough=oa.PassThrough,zn.Stream=oa):(zn=f1.exports=BF(),zn.Stream=oa||zn,zn.Readable=zn,zn.Writable=LF(),zn.Duplex=cf(),zn.Transform=XF(),zn.PassThrough=qxe())});var Bxe=g((Por,Mxe)=>{var kxe=Pxe().Readable,w1t=vn();Mxe.exports=p1;p1.ctor=Dxe;p1.obj=C1t;var E1t=Dxe();function S1t(e){return e=e.slice(),function(t,r){var n=null,i=e.length?e.shift():null;i instanceof Error&&(n=i,i=null),r(n,i)}}function p1(e,t){(typeof e!="object"||Array.isArray(e))&&(t=e,e={});var r=new E1t(e);return r._from=Array.isArray(t)?S1t(t):t||Lxe,r}function Dxe(e,t){typeof e=="function"&&(t=e,e={}),e=Fxe(e),w1t(r,kxe);function r(n){if(!(this instanceof r))return new r(n);this._reading=!1,this._callback=o,this.destroyed=!1,kxe.call(this,n||e);var i=this,s=this._readableState.highWaterMark;function o(a,u){if(!i.destroyed){if(a)return i.destroy(a);if(u===null)return i.push(null);i._reading=!1,i.push(u)&&i._read(s)}}}return r.prototype._from=t||Lxe,r.prototype._read=function(n){this._reading||this.destroyed||(this._reading=!0,this._from(n,this._callback))},r.prototype.destroy=function(n){if(!this.destroyed){this.destroyed=!0;var i=this;process.nextTick(function(){n&&i.emit("error",n),i.emit("close")})}},r}function C1t(e,t){return(typeof e=="function"||Array.isArray(e))&&(t=e,e={}),e=Fxe(e),e.objectMode=!0,e.highWaterMark=16,p1(e,t)}function Lxe(){}function Fxe(e){return e=e||{},e}});var Uxe=g((kor,jxe)=>{"use strict";jxe.exports=e=>e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"});var $xe=g((Dor,YF)=>{"use strict";var Hxe=Bxe(),zxe=Uxe();YF.exports=e=>{Array.isArray(e)&&(e=e.slice());let t,r;n(e);function n(i){e=i,t=zxe(e)?e:null,r=!t&&e[Symbol.iterator]&&typeof e!="string"&&!Buffer.isBuffer(e)?e[Symbol.iterator]():null}return Hxe(function i(s,o){if(t){t.then(n).then(()=>i.call(this,s,o),o);return}if(r){let u=r.next();setImmediate(o,null,u.done?null:u.value);return}if(e.length===0){setImmediate(o,null,null);return}let a=e.slice(0,s);e=e.slice(s),setImmediate(o,null,a)})};YF.exports.obj=e=>{Array.isArray(e)&&(e=e.slice());let t,r;n(e);function n(i){e=i,t=zxe(e)?e:null,r=!t&&e[Symbol.iterator]?e[Symbol.iterator]():null}return Hxe.obj(function i(s,o){if(t){t.then(n).then(()=>i.call(this,s,o),o);return}if(r){let a=r.next();setImmediate(o,null,a.done?null:a.value);return}this.push(e),setImmediate(o,null,null)})}});var QF=g((JF,ZF)=>{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var Wxe=require("util"),T1t=Object.prototype.toString,mv=e=>t=>typeof t===e,d1=e=>{let t=T1t.call(e).slice(8,-1);return t||null},Zr=e=>t=>d1(t)===e;function aa(e){if(e===null)return"null";if(e===!0||e===!1)return"boolean";let t=typeof e;if(t==="undefined")return"undefined";if(t==="string")return"string";if(t==="number")return"number";if(t==="symbol")return"symbol";if(aa.function_(e))return"Function";if(Array.isArray(e))return"Array";if(Buffer.isBuffer(e))return"Buffer";let r=d1(e);if(r)return r;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}(function(e){let t=y=>typeof y=="object";e.undefined=mv("undefined"),e.string=mv("string"),e.number=mv("number"),e.function_=mv("function"),e.null_=y=>y===null,e.class_=y=>e.function_(y)&&y.toString().startsWith("class "),e.boolean=y=>y===!0||y===!1,e.symbol=mv("symbol"),e.array=Array.isArray,e.buffer=Buffer.isBuffer,e.nullOrUndefined=y=>e.null_(y)||e.undefined(y),e.object=y=>!e.nullOrUndefined(y)&&(e.function_(y)||t(y)),e.iterable=y=>!e.nullOrUndefined(y)&&e.function_(y[Symbol.iterator]),e.generator=y=>e.iterable(y)&&e.function_(y.next)&&e.function_(y.throw),e.nativePromise=Zr("Promise");let r=y=>!e.null_(y)&&t(y)&&e.function_(y.then)&&e.function_(y.catch);e.promise=y=>e.nativePromise(y)||r(y);let n=y=>T=>e.function_(T)&&e.function_(T.constructor)&&T.constructor.name===y;e.generatorFunction=n("GeneratorFunction"),e.asyncFunction=n("AsyncFunction"),e.boundFunction=y=>e.function_(y)&&!y.hasOwnProperty("prototype"),e.regExp=Zr("RegExp"),e.date=Zr("Date"),e.error=Zr("Error"),e.map=Zr("Map"),e.set=Zr("Set"),e.weakMap=Zr("WeakMap"),e.weakSet=Zr("WeakSet"),e.int8Array=Zr("Int8Array"),e.uint8Array=Zr("Uint8Array"),e.uint8ClampedArray=Zr("Uint8ClampedArray"),e.int16Array=Zr("Int16Array"),e.uint16Array=Zr("Uint16Array"),e.int32Array=Zr("Int32Array"),e.uint32Array=Zr("Uint32Array"),e.float32Array=Zr("Float32Array"),e.float64Array=Zr("Float64Array"),e.arrayBuffer=Zr("ArrayBuffer"),e.sharedArrayBuffer=Zr("SharedArrayBuffer"),e.dataView=Zr("DataView"),e.directInstanceOf=(y,T)=>e.object(y)&&e.object(T)&&Object.getPrototypeOf(y)===T.prototype,e.truthy=y=>!!y,e.falsy=y=>!y,e.nan=y=>Number.isNaN(y);let i=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=y=>e.null_(y)||i.has(typeof y),e.integer=y=>Number.isInteger(y),e.safeInteger=y=>Number.isSafeInteger(y),e.plainObject=y=>{let T;return d1(y)==="Object"&&(T=Object.getPrototypeOf(y),T===null||T===Object.getPrototypeOf({}))};let s=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=y=>{let T=d1(y);return T===null?!1:s.has(T)};let o=y=>e.safeInteger(y)&&y>-1;e.arrayLike=y=>!e.nullOrUndefined(y)&&!e.function_(y)&&o(y.length),e.inRange=(y,T)=>{if(e.number(T))return y>=Math.min(0,T)&&y<=Math.max(T,0);if(e.array(T)&&T.length===2)return y>=Math.min.apply(null,T)&&y<=Math.max.apply(null,T);throw new TypeError(`Invalid range: ${Wxe.inspect(T)}`)};let a=1,u=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=y=>e.object(y)&&y.nodeType===a&&e.string(y.nodeName)&&!e.plainObject(y)&&u.every(T=>T in y),e.nodeStream=y=>!e.nullOrUndefined(y)&&t(y)&&e.function_(y.pipe),e.infinite=y=>y===1/0||y===-1/0;let c=y=>T=>e.integer(T)&&Math.abs(T%2)===y;e.even=c(0),e.odd=c(1);let f=y=>e.string(y)&&/\S/.test(y)===!1,p=y=>(e.string(y)||e.array(y))&&y.length===0,d=y=>!e.map(y)&&!e.set(y)&&e.object(y)&&Object.keys(y).length===0,m=y=>(e.map(y)||e.set(y))&&y.size===0;e.empty=y=>e.falsy(y)||p(y)||d(y)||m(y),e.emptyOrWhitespace=y=>e.empty(y)||f(y);let v=(y,T,S)=>{let E=Array.prototype.slice.call(S,1);if(e.function_(T)===!1)throw new TypeError(`Invalid predicate: ${Wxe.inspect(T)}`);if(E.length===0)throw new TypeError("Invalid number of values");return y.call(E,T)};function _(y){return v(Array.prototype.some,y,arguments)}e.any=_;function b(y){return v(Array.prototype.every,y,arguments)}e.all=b})(aa||(aa={}));Object.defineProperties(aa,{class:{value:aa.class_},function:{value:aa.function_},null:{value:aa.null_}});JF.default=aa;ZF.exports=aa;ZF.exports.default=aa});var Vxe=g((Lor,Gxe)=>{"use strict";var A1t=require("stream").PassThrough;Gxe.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new A1t({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var Kxe=g((For,h1)=>{"use strict";var O1t=Vxe();function e4(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=O1t(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}h1.exports=e4;h1.exports.buffer=(e,t)=>e4(e,Object.assign({},t,{encoding:"buffer"}));h1.exports.array=(e,t)=>e4(e,Object.assign({},t,{array:!0}))});var Yxe=g((Mor,Xxe)=>{"use strict";Xxe.exports=function(e,t){if(e.timeoutTimer)return e;var r=isNaN(t)?t:{socket:t,connect:t},n=e._headers?" to "+e._headers.host:"";r.connect!==void 0&&(e.timeoutTimer=setTimeout(function(){e.abort();var a=new Error("Connection timed out on request"+n);a.code="ETIMEDOUT",e.emit("error",a)},r.connect)),e.on("socket",function(a){if(!(a.connecting||a._connecting)){s();return}a.once("connect",s)});function i(){e.timeoutTimer&&(clearTimeout(e.timeoutTimer),e.timeoutTimer=null)}function s(){i(),r.socket!==void 0&&e.setTimeout(r.socket,function(){e.abort();var a=new Error("Socket timed out on request"+n);a.code="ESOCKETTIMEDOUT",e.emit("error",a)})}return e.on("error",i)}});var Zxe=g((Bor,Jxe)=>{"use strict";var I1t=require("url"),R1t=yF();Jxe.exports=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof e}\` instead.`);let r=R1t(e,Object.assign({https:!0},t));return I1t.parse(r)}});var t4=g((jor,Qxe)=>{"use strict";function N1t(e){var t={protocol:e.protocol,hostname:e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname}${e.search}`,href:e.href};return e.port!==""&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username}:${e.password}`),t}Qxe.exports=N1t});var tye=g((Uor,eye)=>{"use strict";var q1t=require("stream").PassThrough,P1t=require("zlib"),k1t=r1();eye.exports=e=>{if(["gzip","deflate"].indexOf(e.headers["content-encoding"])===-1)return e;let t=P1t.createUnzip(),r=new q1t;return k1t(e,r),t.on("error",n=>{if(n.code==="Z_BUF_ERROR"){r.end();return}r.emit("error",n)}),e.pipe(t).pipe(r),r}});var nye=g((Hor,rye)=>{"use strict";var D1t=["ETIMEDOUT","ECONNRESET","EADDRINUSE","ESOCKETTIMEDOUT","ECONNREFUSED","EPIPE","EHOSTUNREACH","EAI_AGAIN"],L1t=["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED"];rye.exports=function(e){return!e||!e.code||D1t.indexOf(e.code)!==-1?!0:L1t.indexOf(e.code)===-1}});var sye=g((zor,iye)=>{"use strict";iye.exports=typeof Symbol=="function"&&typeof Symbol("")=="symbol"});var aye=g(($or,oye)=>{"use strict";oye.exports=sye()&&typeof Symbol.toStringTag=="symbol"});var cye=g((Wor,uye)=>{"use strict";uye.exports=function(t){return typeof t=="object"&&t!==null}});var n4=g((Gor,fye)=>{"use strict";var F1t=aye(),lye=cye(),M1t=Object.prototype.toString,B1t="[object URL]",j1t="hash",U1t="host",H1t="hostname",z1t="href",$1t="password",W1t="pathname",G1t="port",V1t="protocol",K1t="search",X1t="username",r4=(e,t)=>lye(e)?!F1t&&M1t.call(e)===B1t?!0:!(!(z1t in e)||!(V1t in e)||!(X1t in e)||!($1t in e)||!(H1t in e)||!(G1t in e)||!(U1t in e)||!(W1t in e)||!(K1t in e)||!(j1t in e)||t!==!0&&!lye(e.searchParams)):!1;r4.lenient=e=>r4(e,!0);fye.exports=r4});var s4=g((Vor,i4)=>{"use strict";var m1=class extends Error{constructor(){super("Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},uh=class{static fn(t){return function(){let r=[].slice.apply(arguments);return new uh((n,i,s)=>{r.push(s),t.apply(null,r).then(n,i)})}}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._promise=new Promise((r,n)=>(this._reject=n,t(i=>{this._isPending=!1,r(i)},i=>{this._isPending=!1,n(i)},i=>{this._cancelHandlers.push(i)})))}then(t,r){return this._promise.then(t,r)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let t of this._cancelHandlers)t()}catch(t){this._reject(t)}this._isCanceled=!0,this._reject(new m1)}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(uh.prototype,Promise.prototype);i4.exports=uh;i4.exports.CancelError=m1});var dye=g((Kor,pye)=>{"use strict";pye.exports=(e,t)=>(t=t||(()=>{}),e.then(r=>new Promise(n=>{n(t())}).then(()=>r),r=>new Promise(n=>{n(t())}).then(()=>{throw r})))});var a4=g((Xor,o4)=>{"use strict";var Y1t=dye(),g1=class extends Error{constructor(t){super(t),this.name="TimeoutError"}};o4.exports=(e,t,r)=>new Promise((n,i)=>{if(typeof t!="number"||t<0)throw new TypeError("Expected `ms` to be a positive number");let s=setTimeout(()=>{if(typeof r=="function"){try{n(r())}catch(u){i(u)}return}let o=typeof r=="string"?r:`Promise timed out after ${t} milliseconds`,a=r instanceof Error?r:new g1(o);typeof e.cancel=="function"&&e.cancel(),i(a)},t);Y1t(e.then(n,i),()=>{clearTimeout(s)})});o4.exports.TimeoutError=g1});var gye=g((Yor,mye)=>{"use strict";var hye=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};mye.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):hye(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?hye(s,t):s}return n}});var vye=g((Jor,J1t)=>{J1t.exports={name:"got",version:"8.3.2",description:"Simplified HTTP requests",license:"MIT",repository:"sindresorhus/got",maintainers:[{name:"Sindre Sorhus",email:"sindresorhus@gmail.com",url:"sindresorhus.com"},{name:"Vsevolod Strukchinsky",email:"floatdrop@gmail.com",url:"github.com/floatdrop"},{name:"Alexander Tesfamichael",email:"alex.tesfamichael@gmail.com",url:"alextes.me"}],engines:{node:">=4"},scripts:{test:"xo && nyc ava",coveralls:"nyc report --reporter=text-lcov | coveralls"},files:["index.js","errors.js"],keywords:["http","https","get","got","url","uri","request","util","utility","simple","curl","wget","fetch","net","network","electron"],dependencies:{"@sindresorhus/is":"^0.7.0","cacheable-request":"^2.1.1","decompress-response":"^3.3.0",duplexer3:"^0.1.4","get-stream":"^3.0.0","into-stream":"^3.1.0","is-retry-allowed":"^1.1.0",isurl:"^1.0.0-alpha5","lowercase-keys":"^1.0.0","mimic-response":"^1.0.0","p-cancelable":"^0.4.0","p-timeout":"^2.0.1",pify:"^3.0.0","safe-buffer":"^5.1.1","timed-out":"^4.0.1","url-parse-lax":"^3.0.0","url-to-options":"^1.0.1"},devDependencies:{ava:"^0.25.0",coveralls:"^3.0.0","form-data":"^2.1.1","get-port":"^3.0.0",nyc:"^11.0.2","p-event":"^1.3.0",pem:"^1.4.4",proxyquire:"^1.8.0",sinon:"^4.0.0","slow-stream":"0.0.4",tempfile:"^2.0.0",tempy:"^0.2.1","universal-url":"1.0.0-alpha",xo:"^0.20.0"},ava:{concurrency:4},browser:{"decompress-response":!1,electron:!1}}});var xye=g((Zor,ca)=>{"use strict";var Z1t=require("url"),u4=require("http"),Q1t=s4(),eCt=QF(),ua=class extends Error{constructor(t,r,n){super(t),Error.captureStackTrace(this,this.constructor),this.name="GotError",eCt.undefined(r.code)||(this.code=r.code),Object.assign(this,{host:n.host,hostname:n.hostname,method:n.method,path:n.path,protocol:n.protocol,url:n.href})}};ca.exports.GotError=ua;ca.exports.CacheError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="CacheError"}};ca.exports.RequestError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="RequestError"}};ca.exports.ReadError=class extends ua{constructor(e,t){super(e.message,e,t),this.name="ReadError"}};ca.exports.ParseError=class extends ua{constructor(e,t,r,n){super(`${e.message} in "${Z1t.format(r)}":
|
|
229
229
|
${n.slice(0,77)}...`,e,r),this.name="ParseError",this.statusCode=t,this.statusMessage=u4.STATUS_CODES[this.statusCode]}};ca.exports.HTTPError=class extends ua{constructor(e,t,r,n){t?t=t.replace(/\r?\n/g," ").trim():t=u4.STATUS_CODES[e],super(`Response code ${e} (${t})`,{},n),this.name="HTTPError",this.statusCode=e,this.statusMessage=t,this.headers=r}};ca.exports.MaxRedirectsError=class extends ua{constructor(e,t,r){super("Redirected 10 times. Aborting.",{},r),this.name="MaxRedirectsError",this.statusCode=e,this.statusMessage=u4.STATUS_CODES[this.statusCode],this.redirectUrls=t}};ca.exports.UnsupportedProtocolError=class extends ua{constructor(e){super(`Unsupported protocol "${e.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};ca.exports.CancelError=Q1t.CancelError});var l4=g((oar,Nye)=>{"use strict";var Aye=require("events"),tCt=require("http"),rCt=require("https"),yye=require("stream").PassThrough,nCt=require("stream").Transform,gv=require("url"),_ye=require("fs"),bye=require("querystring"),wye=Kve(),iCt=Xve(),sCt=$xe(),St=QF(),Eye=Kxe(),oCt=Yxe(),aCt=Zxe(),uCt=t4(),cCt=CF(),Sye=tye(),lCt=r1(),fCt=nye(),pCt=n4(),dCt=s4(),hCt=a4(),Cye=gye(),v1=Ms().Buffer,Tye=vye(),mCt=xye(),gCt=new Set([300,301,302,303,304,305,307,308]),vCt=new Set([300,303,307,308]),c4=e=>St.nodeStream(e)&&St.function(e.getBoundary),xCt=e=>{let t=e.body;return e.headers["content-length"]?Number(e.headers["content-length"]):!t&&!e.stream?0:St.string(t)?v1.byteLength(t):c4(t)?Cye(t.getLength.bind(t))():t instanceof _ye.ReadStream?Cye(_ye.stat)(t.path).then(r=>r.size):St.nodeStream(t)&&St.buffer(t._buffer)?t._buffer.length:null};function Oye(e){e=e||{};let t=new Aye,r=e.href||gv.resolve(gv.format(e),e.path),n=[],i=St.object(e.agent)?e.agent:null,s=0,o,a,u=0,c=f=>{if(f.protocol!=="http:"&&f.protocol!=="https:"){t.emit("error",new fn.UnsupportedProtocolError(f));return}let p=f.protocol==="https:"?rCt:tCt;if(i){let _=f.protocol==="https:"?"https":"http";f.agent=i[_]||f.agent}if(f.useElectronNet&&process.versions.electron){let _=require("electron");p=_.net||_.remote.net}let d,v=new wye(p.request,f.cache)(f,_=>{clearInterval(d),t.emit("uploadProgress",{percent:1,transferred:u,total:a});let b=_.statusCode;_.url=o||r,_.requestUrl=r;let y=f.followRedirect&&"location"in _.headers,T=y&&gCt.has(b);if(y&&vCt.has(b)||T&&(f.method==="GET"||f.method==="HEAD")){if(_.resume(),b===303&&(f.method="GET"),n.length>=10){t.emit("error",new fn.MaxRedirectsError(b,n,f),null,_);return}let E=v1.from(_.headers.location,"binary").toString();o=gv.resolve(gv.format(f),E),n.push(o);let C=Object.assign({},f,gv.parse(o));t.emit("redirect",_,C),c(C);return}setImmediate(()=>{try{yCt(_,f,t,n)}catch(E){t.emit("error",E)}})});v.on("error",_=>{_ instanceof wye.RequestError?t.emit("error",new fn.RequestError(_,f)):t.emit("error",new fn.CacheError(_,f))}),v.once("request",_=>{let b=!1;_.once("abort",y=>{b=!0}),_.once("error",y=>{if(clearInterval(d),b)return;let T=f.retries(++s,y);if(T){setTimeout(c,T,f);return}t.emit("error",new fn.RequestError(y,f))}),t.once("request",y=>{t.emit("uploadProgress",{percent:0,transferred:0,total:a});let T=y.connection;if(T){let S=T.connecting===void 0?T._connecting:T.connecting,E=()=>{d=setInterval(()=>{if(T.destroyed){clearInterval(d);return}let I=u,q=y._header?v1.byteLength(y._header):0;u=T.bytesWritten-q,a&&u>a&&(u=a),!(u===I||u===a)&&t.emit("uploadProgress",{percent:a?u/a:0,transferred:u,total:a})},150)};S?T.once("connect",E):E()}}),f.gotTimeout&&(clearInterval(d),oCt(_,f.gotTimeout)),setImmediate(()=>{t.emit("request",_)})})};return setImmediate(()=>{Promise.resolve(xCt(e)).then(f=>{a=f,St.undefined(e.headers["content-length"])&&St.undefined(e.headers["transfer-encoding"])&&c4(e.body)&&(e.headers["content-length"]=f),c(e)}).catch(f=>{t.emit("error",f)})}),t}function yCt(e,t,r,n){let i=Number(e.headers["content-length"])||null,s=0,o=new nCt({transform(u,c,f){s+=u.length;let p=i?s/i:0;p<1&&r.emit("downloadProgress",{percent:p,transferred:s,total:i}),f(null,u)},flush(u){r.emit("downloadProgress",{percent:1,transferred:s,total:i}),u()}});lCt(e,o),o.redirectUrls=n;let a=t.decompress===!0&&St.function(Sye)&&t.method!=="HEAD"?Sye(o):o;!t.decompress&&["gzip","deflate"].indexOf(e.headers["content-encoding"])!==-1&&(t.encoding=null),r.emit("response",a),r.emit("downloadProgress",{percent:0,transferred:0,total:i}),e.pipe(o)}function _Ct(e){let t=s=>e.gotTimeout&&e.gotTimeout.request?hCt(s,e.gotTimeout.request,new fn.RequestError({message:"Request timed out",code:"ETIMEDOUT"},e)):s,r=new Aye,n=new dCt((s,o,a)=>{let u=Oye(e),c=!1;a(()=>{c=!0}),u.on("request",f=>{if(c&&f.abort(),a(()=>{f.abort()}),St.nodeStream(e.body)){e.body.pipe(f),e.body=void 0;return}f.end(e.body)}),u.on("response",f=>{(St.null(e.encoding)?Eye.buffer(f):Eye(f,e)).catch(d=>o(new fn.ReadError(d,e))).then(d=>{let m=f.statusCode,v=e.followRedirect?299:399;if(f.body=d,e.json&&f.body)try{f.body=JSON.parse(f.body)}catch(_){if(m>=200&&m<300)throw new fn.ParseError(_,m,e,d)}if(e.throwHttpErrors&&m!==304&&(m<200||m>v))throw new fn.HTTPError(m,f.statusMessage,f.headers,e);s(f)}).catch(d=>{Object.defineProperty(d,"response",{value:f}),o(d)})}),u.once("error",o),u.on("redirect",r.emit.bind(r,"redirect")),u.on("uploadProgress",r.emit.bind(r,"uploadProgress")),u.on("downloadProgress",r.emit.bind(r,"downloadProgress"))});Object.defineProperty(n,"canceled",{get(){return n.isCanceled}});let i=t(n);return i.cancel=n.cancel.bind(n),i.on=(s,o)=>(r.on(s,o),i),i}function Iye(e){e.stream=!0;let t=new yye,r=new yye,n=iCt(t,r),i;if(e.gotTimeout&&e.gotTimeout.request&&(i=setTimeout(()=>{n.emit("error",new fn.RequestError({message:"Request timed out",code:"ETIMEDOUT"},e))},e.gotTimeout.request)),e.json)throw new Error("Got can not be used as a stream when the `json` option is used");e.body&&(n.write=()=>{throw new Error("Got's stream is not writable when the `body` option is used")});let s=Oye(e);return s.on("request",o=>{if(n.emit("request",o),St.nodeStream(e.body)){e.body.pipe(o);return}if(e.body){o.end(e.body);return}if(e.method==="POST"||e.method==="PUT"||e.method==="PATCH"){t.pipe(o);return}o.end()}),s.on("response",o=>{clearTimeout(i);let a=o.statusCode;if(o.on("error",u=>{n.emit("error",new fn.ReadError(u,e))}),o.pipe(r),e.throwHttpErrors&&a!==304&&(a<200||a>299)){n.emit("error",new fn.HTTPError(a,o.statusMessage,o.headers,e),null,o);return}n.emit("response",o)}),s.on("error",n.emit.bind(n,"error")),s.on("redirect",n.emit.bind(n,"redirect")),s.on("uploadProgress",n.emit.bind(n,"uploadProgress")),s.on("downloadProgress",n.emit.bind(n,"downloadProgress")),n}function Rye(e,t){if(!St.string(e)&&!St.object(e))throw new TypeError(`Parameter \`url\` must be a string or object, not ${St(e)}`);if(St.string(e)){e=e.replace(/^unix:/,"http://$&");try{decodeURI(e)}catch{throw new Error("Parameter `url` must contain valid UTF-8 character sequences")}if(e=aCt(e),e.auth)throw new Error("Basic authentication must be done with the `auth` option")}else pCt.lenient(e)&&(e=uCt(e));t=Object.assign({path:"",retries:2,cache:!1,decompress:!0,useElectronNet:!1,throwHttpErrors:!0},e,{protocol:e.protocol||"http:"},t);let r=cCt(t.headers);for(let s of Object.keys(r))St.nullOrUndefined(r[s])&&delete r[s];t.headers=Object.assign({"user-agent":`${Tye.name}/${Tye.version} (https://github.com/sindresorhus/got)`},r),t.decompress&&St.undefined(t.headers["accept-encoding"])&&(t.headers["accept-encoding"]="gzip, deflate");let n=t.query;n&&(St.string(n)||(t.query=bye.stringify(n)),t.path=`${t.path.split("?")[0]}?${t.query}`,delete t.query),t.json&&St.undefined(t.headers.accept)&&(t.headers.accept="application/json");let i=t.body;if(St.nullOrUndefined(i))t.method=(t.method||"GET").toUpperCase();else{let s=t.headers;if(!St.nodeStream(i)&&!St.string(i)&&!St.buffer(i)&&!(t.form||t.json))throw new TypeError("The `body` option must be a stream.Readable, string, Buffer or plain Object");let o=St.plainObject(i)||St.array(i);if((t.form||t.json)&&!o)throw new TypeError("The `body` option must be a plain Object or Array when the `form` or `json` option is used");if(c4(i)?s["content-type"]=s["content-type"]||`multipart/form-data; boundary=${i.getBoundary()}`:t.form&&o?(s["content-type"]=s["content-type"]||"application/x-www-form-urlencoded",t.body=bye.stringify(i)):t.json&&o&&(s["content-type"]=s["content-type"]||"application/json",t.body=JSON.stringify(i)),St.undefined(s["content-length"])&&St.undefined(s["transfer-encoding"])&&!St.nodeStream(i)){let a=St.string(t.body)?v1.byteLength(t.body):t.body.length;s["content-length"]=a}St.buffer(i)&&(t.body=sCt(i),t.body._buffer=i),t.method=(t.method||"POST").toUpperCase()}if(t.hostname==="unix"){let s=/(.+?):(.+)/.exec(t.path);s&&(t.socketPath=s[1],t.path=s[2],t.host=null)}if(!St.function(t.retries)){let s=t.retries;t.retries=(o,a)=>{if(o>s||!fCt(a))return 0;let u=Math.random()*100;return(1<<o)*1e3+u}}return St.undefined(t.followRedirect)&&(t.followRedirect=!0),t.timeout&&(St.number(t.timeout)?t.gotTimeout={request:t.timeout}:t.gotTimeout=t.timeout,delete t.timeout),t}function fn(e,t){try{let r=Rye(e,t);return r.stream?Iye(r):_Ct(r)}catch(r){return Promise.reject(r)}}fn.stream=(e,t)=>Iye(Rye(e,t));var bCt=["get","post","put","patch","head","delete"];for(let e of bCt)fn[e]=(t,r)=>fn(t,Object.assign({},r,{method:e})),fn.stream[e]=(t,r)=>fn.stream(t,Object.assign({},r,{method:e}));Object.assign(fn,mCt);Nye.exports=fn});var f4=g((aar,Pye)=>{"use strict";var qye=(e,t)=>function(...r){let n=t.promiseModule;return new n((i,s)=>{t.multiArgs?r.push((...o)=>{t.errorFirst?o[0]?s(o):(o.shift(),i(o)):i(o)}):t.errorFirst?r.push((o,a)=>{o?s(o):i(a)}):r.push(i),e.apply(this,r)})};Pye.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);let n=s=>{let o=a=>typeof a=="string"?s===a:a.test(s);return t.include?t.include.some(o):!t.exclude.some(o)},i;r==="function"?i=function(...s){return t.excludeMain?e(...s):qye(e,t).apply(this,s)}:i=Object.create(Object.getPrototypeOf(e));for(let s in e){let o=e[s];i[s]=typeof o=="function"&&n(s)?qye(o,t):o}return i}});var Yye=g((Je,Xye)=>{Je=Xye.exports=Et;var jt;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?jt=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:jt=function(){};Je.SEMVER_SPEC_VERSION="2.0.0";var d4=256,x1=Number.MAX_SAFE_INTEGER||9007199254740991,p4=16,Zt=Je.re=[],me=Je.src=[],vt=0,ch=vt++;me[ch]="0|[1-9]\\d*";var lh=vt++;me[lh]="[0-9]+";var v4=vt++;me[v4]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var Dye=vt++;me[Dye]="("+me[ch]+")\\.("+me[ch]+")\\.("+me[ch]+")";var Lye=vt++;me[Lye]="("+me[lh]+")\\.("+me[lh]+")\\.("+me[lh]+")";var h4=vt++;me[h4]="(?:"+me[ch]+"|"+me[v4]+")";var m4=vt++;me[m4]="(?:"+me[lh]+"|"+me[v4]+")";var x4=vt++;me[x4]="(?:-("+me[h4]+"(?:\\."+me[h4]+")*))";var y4=vt++;me[y4]="(?:-?("+me[m4]+"(?:\\."+me[m4]+")*))";var g4=vt++;me[g4]="[0-9A-Za-z-]+";var yv=vt++;me[yv]="(?:\\+("+me[g4]+"(?:\\."+me[g4]+")*))";var _4=vt++,Fye="v?"+me[Dye]+me[x4]+"?"+me[yv]+"?";me[_4]="^"+Fye+"$";var b4="[v=\\s]*"+me[Lye]+me[y4]+"?"+me[yv]+"?",w4=vt++;me[w4]="^"+b4+"$";var dh=vt++;me[dh]="((?:<|>)?=?)";var y1=vt++;me[y1]=me[lh]+"|x|X|\\*";var _1=vt++;me[_1]=me[ch]+"|x|X|\\*";var lf=vt++;me[lf]="[v=\\s]*("+me[_1]+")(?:\\.("+me[_1]+")(?:\\.("+me[_1]+")(?:"+me[x4]+")?"+me[yv]+"?)?)?";var ph=vt++;me[ph]="[v=\\s]*("+me[y1]+")(?:\\.("+me[y1]+")(?:\\.("+me[y1]+")(?:"+me[y4]+")?"+me[yv]+"?)?)?";var Mye=vt++;me[Mye]="^"+me[dh]+"\\s*"+me[lf]+"$";var Bye=vt++;me[Bye]="^"+me[dh]+"\\s*"+me[ph]+"$";var jye=vt++;me[jye]="(?:^|[^\\d])(\\d{1,"+p4+"})(?:\\.(\\d{1,"+p4+"}))?(?:\\.(\\d{1,"+p4+"}))?(?:$|[^\\d])";var T1=vt++;me[T1]="(?:~>?)";var b1=vt++;me[b1]="(\\s*)"+me[T1]+"\\s+";Zt[b1]=new RegExp(me[b1],"g");var wCt="$1~",Uye=vt++;me[Uye]="^"+me[T1]+me[lf]+"$";var Hye=vt++;me[Hye]="^"+me[T1]+me[ph]+"$";var A1=vt++;me[A1]="(?:\\^)";var w1=vt++;me[w1]="(\\s*)"+me[A1]+"\\s+";Zt[w1]=new RegExp(me[w1],"g");var ECt="$1^",zye=vt++;me[zye]="^"+me[A1]+me[lf]+"$";var $ye=vt++;me[$ye]="^"+me[A1]+me[ph]+"$";var E4=vt++;me[E4]="^"+me[dh]+"\\s*("+b4+")$|^$";var S4=vt++;me[S4]="^"+me[dh]+"\\s*("+Fye+")$|^$";var vv=vt++;me[vv]="(\\s*)"+me[dh]+"\\s*("+b4+"|"+me[lf]+")";Zt[vv]=new RegExp(me[vv],"g");var SCt="$1$2$3",Wye=vt++;me[Wye]="^\\s*("+me[lf]+")\\s+-\\s+("+me[lf]+")\\s*$";var Gye=vt++;me[Gye]="^\\s*("+me[ph]+")\\s+-\\s+("+me[ph]+")\\s*$";var Vye=vt++;me[Vye]="(<|>)?=?\\s*\\*";for(Nc=0;Nc<vt;Nc++)jt(Nc,me[Nc]),Zt[Nc]||(Zt[Nc]=new RegExp(me[Nc]));var Nc;Je.parse=ff;function ff(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Et)return e;if(typeof e!="string"||e.length>d4)return null;var r=t.loose?Zt[w4]:Zt[_4];if(!r.test(e))return null;try{return new Et(e,t)}catch{return null}}Je.valid=CCt;function CCt(e,t){var r=ff(e,t);return r?r.version:null}Je.clean=TCt;function TCt(e,t){var r=ff(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}Je.SemVer=Et;function Et(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Et){if(e.loose===t.loose)return e;e=e.version}else if(typeof e!="string")throw new TypeError("Invalid Version: "+e);if(e.length>d4)throw new TypeError("version is longer than "+d4+" characters");if(!(this instanceof Et))return new Et(e,t);jt("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?Zt[w4]:Zt[_4]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>x1||this.major<0)throw new TypeError("Invalid major version");if(this.minor>x1||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>x1||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var i=+n;if(i>=0&&i<x1)return i}return n}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}Et.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version};Et.prototype.toString=function(){return this.version};Et.prototype.compare=function(e){return jt("SemVer.compare",this.version,this.options,e),e instanceof Et||(e=new Et(e,this.options)),this.compareMain(e)||this.comparePre(e)};Et.prototype.compareMain=function(e){return e instanceof Et||(e=new Et(e,this.options)),fh(this.major,e.major)||fh(this.minor,e.minor)||fh(this.patch,e.patch)};Et.prototype.comparePre=function(e){if(e instanceof Et||(e=new Et(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(jt("prerelease compare",t,r,n),r===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(r===void 0)return-1;if(r===n)continue;return fh(r,n)}while(++t)};Et.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this};Je.inc=ACt;function ACt(e,t,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new Et(e,r).inc(t,n).version}catch{return null}}Je.diff=OCt;function OCt(e,t){if(C4(e,t))return null;var r=ff(e),n=ff(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return i+o;return s}Je.compareIdentifiers=fh;var kye=/^[0-9]+$/;function fh(e,t){var r=kye.test(e),n=kye.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}Je.rcompareIdentifiers=ICt;function ICt(e,t){return fh(t,e)}Je.major=RCt;function RCt(e,t){return new Et(e,t).major}Je.minor=NCt;function NCt(e,t){return new Et(e,t).minor}Je.patch=qCt;function qCt(e,t){return new Et(e,t).patch}Je.compare=pu;function pu(e,t,r){return new Et(e,r).compare(new Et(t,r))}Je.compareLoose=PCt;function PCt(e,t){return pu(e,t,!0)}Je.rcompare=kCt;function kCt(e,t,r){return pu(t,e,r)}Je.sort=DCt;function DCt(e,t){return e.sort(function(r,n){return Je.compare(r,n,t)})}Je.rsort=LCt;function LCt(e,t){return e.sort(function(r,n){return Je.rcompare(r,n,t)})}Je.gt=xv;function xv(e,t,r){return pu(e,t,r)>0}Je.lt=E1;function E1(e,t,r){return pu(e,t,r)<0}Je.eq=C4;function C4(e,t,r){return pu(e,t,r)===0}Je.neq=Kye;function Kye(e,t,r){return pu(e,t,r)!==0}Je.gte=T4;function T4(e,t,r){return pu(e,t,r)>=0}Je.lte=A4;function A4(e,t,r){return pu(e,t,r)<=0}Je.cmp=S1;function S1(e,t,r,n){switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return C4(e,r,n);case"!=":return Kye(e,r,n);case">":return xv(e,r,n);case">=":return T4(e,r,n);case"<":return E1(e,r,n);case"<=":return A4(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}Je.Comparator=Bs;function Bs(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Bs){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof Bs))return new Bs(e,t);jt("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===_v?this.value="":this.value=this.operator+this.semver.version,jt("comp",this)}var _v={};Bs.prototype.parse=function(e){var t=this.options.loose?Zt[E4]:Zt[S4],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],this.operator==="="&&(this.operator=""),r[2]?this.semver=new Et(r[2],this.options.loose):this.semver=_v};Bs.prototype.toString=function(){return this.value};Bs.prototype.test=function(e){return jt("Comparator.test",e,this.options.loose),this.semver===_v?!0:(typeof e=="string"&&(e=new Et(e,this.options)),S1(e,this.operator,this.semver,this.options))};Bs.prototype.intersects=function(e,t){if(!(e instanceof Bs))throw new TypeError("a Comparator is required");(!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1});var r;if(this.operator==="")return r=new Tr(e.value,t),C1(this.value,r,t);if(e.operator==="")return r=new Tr(this.value,t),C1(e.semver,r,t);var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=S1(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=S1(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&o||a||u};Je.Range=Tr;function Tr(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof Tr)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Tr(e.raw,t);if(e instanceof Bs)return new Tr(e.value,t);if(!(this instanceof Tr))return new Tr(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}Tr.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range};Tr.prototype.toString=function(){return this.range};Tr.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?Zt[Gye]:Zt[Wye];e=e.replace(r,GCt),jt("hyphen replace",e),e=e.replace(Zt[vv],SCt),jt("comparator trim",e,Zt[vv]),e=e.replace(Zt[b1],wCt),e=e.replace(Zt[w1],ECt),e=e.split(/\s+/).join(" ");var n=t?Zt[E4]:Zt[S4],i=e.split(" ").map(function(s){return MCt(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(s){return!!s.match(n)})),i=i.map(function(s){return new Bs(s,this.options)},this),i};Tr.prototype.intersects=function(e,t){if(!(e instanceof Tr))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(n){return e.set.some(function(i){return i.every(function(s){return n.intersects(s,t)})})})})};Je.toComparators=FCt;function FCt(e,t){return new Tr(e,t).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}function MCt(e,t){return jt("comp",e,t),e=UCt(e,t),jt("caret",e),e=BCt(e,t),jt("tildes",e),e=zCt(e,t),jt("xrange",e),e=WCt(e,t),jt("stars",e),e}function _i(e){return!e||e.toLowerCase()==="x"||e==="*"}function BCt(e,t){return e.trim().split(/\s+/).map(function(r){return jCt(r,t)}).join(" ")}function jCt(e,t){var r=t.loose?Zt[Hye]:Zt[Uye];return e.replace(r,function(n,i,s,o,a){jt("tilde",e,n,i,s,o,a);var u;return _i(i)?u="":_i(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":_i(o)?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":a?(jt("replaceTilde pr",a),u=">="+i+"."+s+"."+o+"-"+a+" <"+i+"."+(+s+1)+".0"):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0",jt("tilde return",u),u})}function UCt(e,t){return e.trim().split(/\s+/).map(function(r){return HCt(r,t)}).join(" ")}function HCt(e,t){jt("caret",e,t);var r=t.loose?Zt[$ye]:Zt[zye];return e.replace(r,function(n,i,s,o,a){jt("caret",e,n,i,s,o,a);var u;return _i(i)?u="":_i(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":_i(o)?i==="0"?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+".0 <"+(+i+1)+".0.0":a?(jt("replaceCaret pr",a),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+"-"+a+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+"-"+a+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+"-"+a+" <"+(+i+1)+".0.0"):(jt("no pr"),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+" <"+(+i+1)+".0.0"),jt("caret return",u),u})}function zCt(e,t){return jt("replaceXRanges",e,t),e.split(/\s+/).map(function(r){return $Ct(r,t)}).join(" ")}function $Ct(e,t){e=e.trim();var r=t.loose?Zt[Bye]:Zt[Mye];return e.replace(r,function(n,i,s,o,a,u){jt("xRange",e,n,i,s,o,a,u);var c=_i(s),f=c||_i(o),p=f||_i(a),d=p;return i==="="&&d&&(i=""),c?i===">"||i==="<"?n="<0.0.0":n="*":i&&d?(f&&(o=0),a=0,i===">"?(i=">=",f?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",f?s=+s+1:o=+o+1),n=i+s+"."+o+"."+a):f?n=">="+s+".0.0 <"+(+s+1)+".0.0":p&&(n=">="+s+"."+o+".0 <"+s+"."+(+o+1)+".0"),jt("xRange return",n),n})}function WCt(e,t){return jt("replaceStars",e,t),e.trim().replace(Zt[Vye],"")}function GCt(e,t,r,n,i,s,o,a,u,c,f,p,d){return _i(r)?t="":_i(n)?t=">="+r+".0.0":_i(i)?t=">="+r+"."+n+".0":t=">="+t,_i(u)?a="":_i(c)?a="<"+(+u+1)+".0.0":_i(f)?a="<"+u+"."+(+c+1)+".0":p?a="<="+u+"."+c+"."+f+"-"+p:a="<="+a,(t+" "+a).trim()}Tr.prototype.test=function(e){if(!e)return!1;typeof e=="string"&&(e=new Et(e,this.options));for(var t=0;t<this.set.length;t++)if(VCt(this.set[t],e,this.options))return!0;return!1};function VCt(e,t,r){for(var n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(n=0;n<e.length;n++)if(jt(e[n].semver),e[n].semver!==_v&&e[n].semver.prerelease.length>0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}Je.satisfies=C1;function C1(e,t,r){try{t=new Tr(t,r)}catch{return!1}return t.test(e)}Je.maxSatisfying=KCt;function KCt(e,t,r){var n=null,i=null;try{var s=new Tr(t,r)}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new Et(n,r))}),n}Je.minSatisfying=XCt;function XCt(e,t,r){var n=null,i=null;try{var s=new Tr(t,r)}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new Et(n,r))}),n}Je.minVersion=YCt;function YCt(e,t){e=new Tr(e,t);var r=new Et("0.0.0");if(e.test(r)||(r=new Et("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n<e.set.length;++n){var i=e.set[n];i.forEach(function(s){var o=new Et(s.semver.version);switch(s.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!r||xv(r,o))&&(r=o);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}})}return r&&e.test(r)?r:null}Je.validRange=JCt;function JCt(e,t){try{return new Tr(e,t).range||"*"}catch{return null}}Je.ltr=ZCt;function ZCt(e,t,r){return O4(e,t,"<",r)}Je.gtr=QCt;function QCt(e,t,r){return O4(e,t,">",r)}Je.outside=O4;function O4(e,t,r,n){e=new Et(e,n),t=new Tr(t,n);var i,s,o,a,u;switch(r){case">":i=xv,s=A4,o=E1,a=">",u=">=";break;case"<":i=E1,s=T4,o=xv,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(C1(e,t,n))return!1;for(var c=0;c<t.set.length;++c){var f=t.set[c],p=null,d=null;if(f.forEach(function(m){m.semver===_v&&(m=new Bs(">=0.0.0")),p=p||m,d=d||m,i(m.semver,p.semver,n)?p=m:o(m.semver,d.semver,n)&&(d=m)}),p.operator===a||p.operator===u||(!d.operator||d.operator===a)&&s(e,d.semver))return!1;if(d.operator===u&&o(e,d.semver))return!1}return!0}Je.prerelease=eTt;function eTt(e,t){var r=ff(e,t);return r&&r.prerelease.length?r.prerelease:null}Je.intersects=tTt;function tTt(e,t,r){return e=new Tr(e,r),t=new Tr(t,r),e.intersects(t)}Je.coerce=rTt;function rTt(e){if(e instanceof Et)return e;if(typeof e!="string")return null;var t=e.match(Zt[jye]);return t==null?null:ff(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}});var n_e=g((uar,I1)=>{"use strict";var O1=require("fs"),du=require("path"),Jye=f4(),nTt=Yye(),Zye={mode:511&~process.umask(),fs:O1},Qye=nTt.satisfies(process.version,">=10.12.0"),e_e=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(du.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},t_e=e=>{let t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t},r_e=(e,t)=>Promise.resolve().then(()=>{e_e(e),t=Object.assign({},Zye,t);let r=Jye(t.fs.mkdir),n=Jye(t.fs.stat);if(Qye&&t.fs.mkdir===O1.mkdir){let s=du.resolve(e);return r(s,{mode:t.mode,recursive:!0}).then(()=>s)}let i=s=>r(s,t.mode).then(()=>s).catch(o=>{if(o.code==="EPERM")throw o;if(o.code==="ENOENT"){if(du.dirname(s)===s)throw t_e(s);if(o.message.includes("null bytes"))throw o;return i(du.dirname(s)).then(()=>i(s))}return n(s).then(a=>a.isDirectory()?s:Promise.reject()).catch(()=>{throw o})});return i(du.resolve(e))});I1.exports=r_e;I1.exports.default=r_e;I1.exports.sync=(e,t)=>{if(e_e(e),t=Object.assign({},Zye,t),Qye&&t.fs.mkdirSync===O1.mkdirSync){let n=du.resolve(e);return O1.mkdirSync(n,{mode:t.mode,recursive:!0}),n}let r=n=>{try{t.fs.mkdirSync(n,t.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(du.dirname(n)===n)throw t_e(n);if(i.message.includes("null bytes"))throw i;return r(du.dirname(n)),r(n)}try{if(!t.fs.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}return n};return r(du.resolve(e))}});var I4=g((car,R1)=>{"use strict";var iTt=a4(),sTt=Symbol.asyncIterator||"@@asyncIterator",i_e=e=>{let t=e.on||e.addListener||e.addEventListener,r=e.off||e.removeListener||e.removeEventListener;if(!t||!r)throw new TypeError("Emitter is not compatible");return{addListener:t.bind(e),removeListener:r.bind(e)}},s_e=e=>Array.isArray(e)?e:[e],o_e=(e,t,r)=>{let n,i=new Promise((s,o)=>{if(r=Object.assign({rejectionEvents:["error"],multiArgs:!1,resolveImmediately:!1},r),!(r.count>=0&&(r.count===1/0||Number.isInteger(r.count))))throw new TypeError("The `count` option should be at least 0 or more");let a=s_e(t),u=[],{addListener:c,removeListener:f}=i_e(e),p=(...m)=>{let v=r.multiArgs?m:m[0];r.filter&&!r.filter(v)||(u.push(v),r.count===u.length&&(n(),s(u)))},d=m=>{n(),o(m)};n=()=>{for(let m of a)f(m,p);for(let m of r.rejectionEvents)f(m,d)};for(let m of a)c(m,p);for(let m of r.rejectionEvents)c(m,d);r.resolveImmediately&&s(u)});if(i.cancel=n,typeof r.timeout=="number"){let s=iTt(i,r.timeout);return s.cancel=n,s}return i};R1.exports=(e,t,r)=>{typeof r=="function"&&(r={filter:r}),r=Object.assign({},r,{count:1,resolveImmediately:!1});let n=o_e(e,t,r),i=n.then(s=>s[0]);return i.cancel=n.cancel,i};R1.exports.multiple=o_e;R1.exports.iterator=(e,t,r)=>{typeof r=="function"&&(r={filter:r});let n=s_e(t);r=Object.assign({rejectionEvents:["error"],resolutionEvents:[],limit:1/0,multiArgs:!1},r);let{limit:i}=r;if(!(i>=0&&(i===1/0||Number.isInteger(i))))throw new TypeError("The `limit` option should be a non-negative integer or Infinity");if(i===0)return{[Symbol.asyncIterator](){return this},next(){return Promise.resolve({done:!0,value:void 0})}};let o=!1,{addListener:a,removeListener:u}=i_e(e),c=!1,f,p=!1,d=[],m=[],v=0,_=(...S)=>{v++,o=v===i;let E=r.multiArgs?S:S[0];if(d.length>0){let{resolve:C}=d.shift();C({done:!1,value:E}),o&&b();return}m.push(E),o&&b()},b=()=>{c=!0;for(let S of n)u(S,_);for(let S of r.rejectionEvents)u(S,y);for(let S of r.resolutionEvents)u(S,T);for(;d.length>0;){let{resolve:S}=d.shift();S({done:!0,value:void 0})}},y=(...S)=>{if(f=r.multiArgs?S:S[0],d.length>0){let{reject:E}=d.shift();E(f)}else p=!0;b()},T=(...S)=>{let E=r.multiArgs?S:S[0];if(!(r.filter&&!r.filter(E))){if(d.length>0){let{resolve:C}=d.shift();C({done:!0,value:E})}else m.push(E);b()}};for(let S of n)a(S,_);for(let S of r.rejectionEvents)a(S,y);for(let S of r.resolutionEvents)a(S,T);return{[sTt](){return this},next(){if(m.length>0){let S=m.shift();return Promise.resolve({done:c&&m.length===0&&!o,value:S})}return p?(p=!1,Promise.reject(f)):c?Promise.resolve({done:!0,value:void 0}):new Promise((S,E)=>d.push({resolve:S,reject:E}))},return(S){return b(),Promise.resolve({done:c,value:S})}}}});var u_e=g(bv=>{"use strict";bv.stringToBytes=e=>[...e].map(t=>t.charCodeAt(0));var a_e=(e,t,r)=>String.fromCharCode(...e.slice(t,r));bv.readUInt64LE=(e,t=0)=>{let r=e[t],n=1,i=0;for(;++i<8;)n*=256,r+=e[t+i]*n;return r};bv.tarHeaderChecksumMatches=e=>{if(e.length<512)return!1;let t=128,r=256,n=0;for(let s=0;s<148;s++){let o=e[s];r+=o,n+=o&t}for(let s=156;s<512;s++){let o=e[s];r+=o,n+=o&t}let i=parseInt(a_e(e,148,154),8);return i===r||i===r-(n<<1)};bv.uint8ArrayUtf8ByteString=a_e});var c_e=g((exports,module)=>{"use strict";var{stringToBytes,readUInt64LE,tarHeaderChecksumMatches,uint8ArrayUtf8ByteString}=u_e(),xpiZipFilename=stringToBytes("META-INF/mozilla.rsa"),oxmlContentTypes=stringToBytes("[Content_Types].xml"),oxmlRels=stringToBytes("_rels/.rels"),fileType=e=>{if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return;let r=(i,s)=>{s=Object.assign({offset:0},s);for(let o=0;o<i.length;o++)if(s.mask){if(i[o]!==(s.mask[o]&t[o+s.offset]))return!1}else if(i[o]!==t[o+s.offset])return!1;return!0},n=(i,s)=>r(stringToBytes(i),s);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(r([73,73,42,0,16,251,134,1]))return{ext:"arw",mime:"image/x-sony-arw"};if(r([73,73,42,0,8,0,0,0,45]))return{ext:"dng",mime:"image/x-adobe-dng"};if(r([73,73,42,0,48,61,114,1,28]))return{ext:"nef",mime:"image/x-nikon-nef"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(xpiZipFilename,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(n("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(n("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};let i=(u,c=0)=>u.findIndex((f,p,d)=>p>=c&&d[p]===80&&d[p+1]===75&&d[p+2]===3&&d[p+3]===4),s=0,o=!1,a;do{let u=s+30;if(o||(o=r(oxmlContentTypes,{offset:u})||r(oxmlRels,{offset:u})),a||(n("word/",{offset:u})?a={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:n("ppt/",{offset:u})?a={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:n("xl/",{offset:u})&&(a={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),o&&a)return a;s=i(t,u)}while(s>=0);if(a)return a}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([48,48,48,48,48,48],{offset:148,mask:[248,248,248,248,248,248]})&&tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([102,116,121,112],{offset:4})&&t[8]&96&&t[9]&96&&t[10]&96&&t[11]&96){let i=uint8ArrayUtf8ByteString(t,8,12);switch(i){case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt ":return{ext:"mov",mime:"video/quicktime"};case"M4V ":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P ":return{ext:"m4p",mime:"video/mp4"};case"M4B ":return{ext:"m4b",mime:"audio/mp4"};case"M4A ":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V ":return{ext:"f4v",mime:"video/mp4"};case"F4P ":return{ext:"f4p",mime:"video/mp4"};case"F4A ":return{ext:"f4a",mime:"audio/mp4"};case"F4B ":return{ext:"f4b",mime:"audio/mp4"};default:return i.startsWith("3g")?i.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),s=i.findIndex((o,a,u)=>u[a]===66&&u[a+1]===130);if(s!==-1){let o=s+3,a=u=>[...u].every((c,f)=>i[o+f]===c.charCodeAt(0));if(a("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(a("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217])){let i=30;do{let s=readUInt64LE(t,i+16);if(r([145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101],{offset:i})){if(r([64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43],{offset:i+24}))return{ext:"wma",mime:"audio/x-ms-wma"};if(r([192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43],{offset:i+24}))return{ext:"wmv",mime:"video/x-ms-asf"};break}i+=s}while(i+24<=t.length);return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};for(let i=0;i<2&&i<t.length-16;i++){if(r([73,68,51],{offset:i})||r([255,226],{offset:i,mask:[255,230]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:i,mask:[255,230]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:i,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:i,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([119,118,112,107]))return{ext:"wv",mime:"audio/wavpack"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((t[0]===67||t[0]===70)&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77]))return{ext:"aif",mime:"audio/aiff"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([77,80,43]))return{ext:"mpc",mime:"audio/x-musepack"};if(r([77,80,67,75]))return{ext:"mpc",mime:"audio/x-musepack"};if(r([66,69,71,73,78,58]))return{ext:"ics",mime:"text/calendar"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(r([68,83,68,32]))return{ext:"dsf",mime:"audio/x-dsf"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"}};module.exports=fileType;Object.defineProperty(fileType,"minimumBytes",{value:4100});fileType.stream=readableStream=>new Promise((resolve,reject)=>{let stream=eval("require")("stream");readableStream.once("readable",()=>{let e=new stream.PassThrough,t=readableStream.read(module.exports.minimumBytes)||readableStream.read();try{e.fileType=fileType(t)}catch(r){reject(r)}readableStream.unshift(t),stream.pipeline?resolve(stream.pipeline(readableStream,e,()=>{})):resolve(readableStream.pipe(e))})})});var p_e=g((far,f_e)=>{"use strict";var l_e=uR();f_e.exports=function(){var e={};return Object.keys(l_e).forEach(function(t){var r=l_e[t];r.extensions&&r.extensions.length>0&&r.extensions.forEach(function(n){e[n]=t})}),e}});var m_e=g((par,h_e)=>{"use strict";var d_e=_F();h_e.exports=function(e,t){if(!d_e(e))throw new TypeError("Expected a plain object");t=t||{},typeof t=="function"&&(t={compare:t});var r=t.deep,n=[],i=[],s=function(o){var a=n.indexOf(o);if(a!==-1)return i[a];var u={},c=Object.keys(o).sort(t.compare);n.push(o),i.push(u);for(var f=0;f<c.length;f++){var p=c[f],d=o[p];u[p]=r&&d_e(d)?s(d):d}return u};return s(e)}});var v_e=g((dar,R4)=>{"use strict";var g_e=m_e();R4.exports.desc=function(e){return g_e(e,function(t,r){return r.length-t.length})};R4.exports.asc=function(e){return g_e(e,function(t,r){return t.length-r.length})}});var q4=g((har,N4)=>{"use strict";var x_e=p_e(),y_e=v_e();N4.exports=e=>{let t=y_e.desc(x_e()),r=Object.keys(t).filter(n=>e.endsWith(n));return r.length===0?[]:r.map(n=>({ext:n,mime:t[n]}))};N4.exports.mime=e=>{let t=y_e.desc(x_e()),r=Object.keys(t).filter(n=>t[n]===e);return r.length===0?[]:r.map(n=>({ext:n,mime:t[n]}))}});var E_e=g((mar,w_e)=>{"use strict";var oTt=require("fs"),wv=require("path"),{URL:aTt}=require("url"),uTt=lL(),__e=fL(),b_e=cF(),cTt=eve(),lTt=ove(),fTt=l4(),pTt=n_e(),dTt=f4(),hTt=I4(),mTt=c_e(),gTt=q4(),vTt=dTt(oTt),xTt=e=>wv.basename(new aTt(e.requestUrl).pathname),yTt=e=>{let t=e.headers["content-type"];if(!t)return null;let r=gTt.mime(t);return r.length!==1?null:r[0].ext},_Tt=(e,t)=>{let r=e.headers["content-disposition"];if(r){let i=uTt.parse(r);if(i.parameters&&i.parameters.filename)return i.parameters.filename}let n=xTt(e);if(!wv.extname(n)){let i=(mTt(t)||{}).ext||yTt(e);i&&(n=`${n}.${i}`)}return n};w_e.exports=(e,t,r)=>{typeof t=="object"&&(r=t,t=null),r=Object.assign({encoding:null,rejectUnauthorized:process.env.npm_config_strict_ssl!=="false"},r);let n=fTt.stream(e,r),i=hTt(n,"response").then(s=>{let o=r.encoding===null?"buffer":r.encoding;return Promise.all([lTt(n,{encoding:o}),s])}).then(s=>{let[o,a]=s;if(!t)return r.extract&&__e(o)?b_e(o,r):o;let u=r.filename||cTt(_Tt(a,o)),c=wv.join(t,u);return r.extract&&__e(o)?b_e(o,wv.dirname(c),r):pTt(wv.dirname(c)).then(()=>vTt.writeFile(c,o)).then(()=>o)});return n.then=i.then.bind(i),n.catch=i.catch.bind(i),n}});var N_e=g((gar,R_e)=>{"use strict";var Sv=require("fs"),{Readable:bTt}=require("stream"),Ev=require("path"),{promisify:P1}=require("util"),P4=tS(),wTt=P1(Sv.readdir),ETt=P1(Sv.stat),S_e=P1(Sv.lstat),STt=P1(Sv.realpath),CTt="!",O_e="READDIRP_RECURSIVE_ERROR",TTt=new Set(["ENOENT","EPERM","EACCES","ELOOP",O_e]),k4="files",I_e="directories",q1="files_directories",N1="all",C_e=[k4,I_e,q1,N1],ATt=e=>TTt.has(e.code),[T_e,OTt]=process.versions.node.split(".").slice(0,2).map(e=>Number.parseInt(e,10)),ITt=process.platform==="win32"&&(T_e>10||T_e===10&&OTt>=5),A_e=e=>{if(e!==void 0){if(typeof e=="function")return e;if(typeof e=="string"){let t=P4(e.trim());return r=>t(r.basename)}if(Array.isArray(e)){let t=[],r=[];for(let n of e){let i=n.trim();i.charAt(0)===CTt?r.push(P4(i.slice(1))):t.push(P4(i))}return r.length>0?t.length>0?n=>t.some(i=>i(n.basename))&&!r.some(i=>i(n.basename)):n=>!r.some(i=>i(n.basename)):n=>t.some(i=>i(n.basename))}}},hh=class extends bTt{static get defaultOptions(){return{root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:k4,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(t={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:t.highWaterMark||4096});let r={...hh.defaultOptions,...t},{root:n,type:i}=r;this._fileFilter=A_e(r.fileFilter),this._directoryFilter=A_e(r.directoryFilter);let s=r.lstat?S_e:ETt;ITt?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=r.depth,this._wantsDir=[I_e,q1,N1].includes(i),this._wantsFile=[k4,q1,N1].includes(i),this._wantsEverything=i===N1,this._root=Ev.resolve(n),this._isDirent="Dirent"in Sv&&!r.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(t){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&t>0;){let{path:r,depth:n,files:i=[]}=this.parent||{};if(i.length>0){let s=i.splice(0,t).map(o=>this._formatEntry(o,r));for(let o of await Promise.all(s)){if(this.destroyed)return;let a=await this._getEntryType(o);a==="directory"&&this._directoryFilter(o)?(n<=this._maxDepth&&this.parents.push(this._exploreDir(o.fullPath,n+1)),this._wantsDir&&(this.push(o),t--)):(a==="file"||this._includeAsFile(o))&&this._fileFilter(o)&&this._wantsFile&&(this.push(o),t--)}}else{let s=this.parents.pop();if(!s){this.push(null);break}if(this.parent=await s,this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=!1}}}async _exploreDir(t,r){let n;try{n=await wTt(t,this._rdOptions)}catch(i){this._onError(i)}return{files:n,depth:r,path:t}}async _formatEntry(t,r){let n;try{let i=this._isDirent?t.name:t,s=Ev.resolve(Ev.join(r,i));n={path:Ev.relative(this._root,s),fullPath:s,basename:i},n[this._statsProp]=this._isDirent?t:await this._stat(s)}catch(i){this._onError(i)}return n}_onError(t){ATt(t)&&!this.destroyed?this.emit("warn",t):this.destroy(t)}async _getEntryType(t){let r=t&&t[this._statsProp];if(r){if(r.isFile())return"file";if(r.isDirectory())return"directory";if(r&&r.isSymbolicLink()){let n=t.fullPath;try{let i=await STt(n),s=await S_e(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;if(n.startsWith(i)&&n.substr(o,1)===Ev.sep){let a=new Error(`Circular symlink detected: "${n}" points to "${i}"`);return a.code=O_e,this._onError(a)}return"directory"}}catch(i){this._onError(i)}}}}_includeAsFile(t){let r=t&&t[this._statsProp];return r&&this._wantsEverything&&!r.isDirectory()}},mh=(e,t={})=>{let r=t.entryType||t.type;if(r==="both"&&(r=q1),r&&(t.type=r),e){if(typeof e!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!C_e.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${C_e.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return t.root=e,new hh(t)},RTt=(e,t={})=>new Promise((r,n)=>{let i=[];mh(e,t).on("data",s=>i.push(s)).on("end",()=>r(i)).on("error",s=>n(s))});mh.promise=RTt;mh.ReaddirpStream=hh;mh.default=mh;R_e.exports=mh});var D4=g((xar,q_e)=>{q_e.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var r=e.length;if(r<=1)return e;var n="";if(r>4&&e[3]==="\\"){var i=e[2];(i==="?"||i===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),n="//")}var s=e.split(/[/\\]+/);return t!==!1&&s[s.length-1]===""&&s.pop(),n+s.join("/")}});var M_e=g((L_e,F_e)=>{"use strict";Object.defineProperty(L_e,"__esModule",{value:!0});var D_e=tS(),NTt=D4(),P_e="!",qTt={returnIndex:!1},PTt=e=>Array.isArray(e)?e:[e],kTt=(e,t)=>{if(typeof e=="function")return e;if(typeof e=="string"){let r=D_e(e,t);return n=>e===n||r(n)}return e instanceof RegExp?r=>e.test(r):r=>!1},k_e=(e,t,r,n)=>{let i=Array.isArray(r),s=i?r[0]:r;if(!i&&typeof s!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(s));let o=NTt(s,!1);for(let u=0;u<t.length;u++){let c=t[u];if(c(o))return n?-1:!1}let a=i&&[o].concat(r.slice(1));for(let u=0;u<e.length;u++){let c=e[u];if(i?c(...a):c(o))return n?u:!0}return n?-1:!1},L4=(e,t,r=qTt)=>{if(e==null)throw new TypeError("anymatch: specify first argument");let n=typeof r=="boolean"?{returnIndex:r}:r,i=n.returnIndex||!1,s=PTt(e),o=s.filter(u=>typeof u=="string"&&u.charAt(0)===P_e).map(u=>u.slice(1)).map(u=>D_e(u,n)),a=s.filter(u=>typeof u!="string"||typeof u=="string"&&u.charAt(0)!==P_e).map(u=>kTt(u,n));return t==null?(u,c=!1)=>k_e(a,o,u,typeof c=="boolean"?c:!1):k_e(a,o,t,i)};L4.default=L4;F_e.exports=L4});var j_e=g((yar,B_e)=>{B_e.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var F4=g((_ar,H_e)=>{var DTt=j_e(),U_e={"{":"}","(":")","[":"]"},LTt=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,i=-2,s=-2,o=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(o===-1||o>n||(o=e.indexOf("\\",t),o===-1||o>n)))||i!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(i=e.indexOf("}",t),i>t&&(o=e.indexOf("\\",t),o===-1||o>i))||s!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(s=e.indexOf(")",t),s>t&&(o=e.indexOf("\\",t),o===-1||o>s))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(s=e.indexOf(")",r),s>r&&(o=e.indexOf("\\",r),o===-1||o>s))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var u=U_e[a];if(u){var c=e.indexOf(u,t);c!==-1&&(t=c+1)}if(e[t]==="!")return!0}else t++}return!1},FTt=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=U_e[r];if(n){var i=e.indexOf(n,t);i!==-1&&(t=i+1)}if(e[t]==="!")return!0}else t++}return!1};H_e.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(DTt(t))return!0;var n=LTt;return r&&r.strict===!1&&(n=FTt),n(t)}});var $_e=g((bar,z_e)=>{"use strict";var MTt=F4(),BTt=require("path").posix.dirname,jTt=require("os").platform()==="win32",M4="/",UTt=/\\/g,HTt=/[\{\[].*[\}\]]$/,zTt=/(^|[^\\])([\{\[]|\([^\)]+$)/,$Tt=/\\([\!\*\?\|\[\]\(\)\{\}])/g;z_e.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&jTt&&t.indexOf(M4)<0&&(t=t.replace(UTt,M4)),HTt.test(t)&&(t+=M4),t+="a";do t=BTt(t);while(MTt(t)||zTt.test(t));return t.replace($Tt,"$1")}});var W_e=g((war,WTt)=>{WTt.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]});var V_e=g((Ear,G_e)=>{G_e.exports=W_e()});var X_e=g((Sar,K_e)=>{"use strict";var GTt=require("path"),VTt=V_e(),KTt=new Set(VTt);K_e.exports=e=>KTt.has(GTt.extname(e).slice(1).toLowerCase())});var k1=g(ke=>{"use strict";var{sep:XTt}=require("path"),{platform:B4}=process,YTt=require("os");ke.EV_ALL="all";ke.EV_READY="ready";ke.EV_ADD="add";ke.EV_CHANGE="change";ke.EV_ADD_DIR="addDir";ke.EV_UNLINK="unlink";ke.EV_UNLINK_DIR="unlinkDir";ke.EV_RAW="raw";ke.EV_ERROR="error";ke.STR_DATA="data";ke.STR_END="end";ke.STR_CLOSE="close";ke.FSEVENT_CREATED="created";ke.FSEVENT_MODIFIED="modified";ke.FSEVENT_DELETED="deleted";ke.FSEVENT_MOVED="moved";ke.FSEVENT_CLONED="cloned";ke.FSEVENT_UNKNOWN="unknown";ke.FSEVENT_TYPE_FILE="file";ke.FSEVENT_TYPE_DIRECTORY="directory";ke.FSEVENT_TYPE_SYMLINK="symlink";ke.KEY_LISTENERS="listeners";ke.KEY_ERR="errHandlers";ke.KEY_RAW="rawEmitters";ke.HANDLER_KEYS=[ke.KEY_LISTENERS,ke.KEY_ERR,ke.KEY_RAW];ke.DOT_SLASH=`.${XTt}`;ke.BACK_SLASH_RE=/\\/g;ke.DOUBLE_SLASH_RE=/\/\//;ke.SLASH_OR_BACK_SLASH_RE=/[/\\]/;ke.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;ke.REPLACER_RE=/^\.[/\\]/;ke.SLASH="/";ke.SLASH_SLASH="//";ke.BRACE_START="{";ke.BANG="!";ke.ONE_DOT=".";ke.TWO_DOTS="..";ke.STAR="*";ke.GLOBSTAR="**";ke.ROOT_GLOBSTAR="/**/*";ke.SLASH_GLOBSTAR="/**";ke.DIR_SUFFIX="Dir";ke.ANYMATCH_OPTS={dot:!0};ke.STRING_TYPE="string";ke.FUNCTION_TYPE="function";ke.EMPTY_STR="";ke.EMPTY_FN=()=>{};ke.IDENTITY_FN=e=>e;ke.isWindows=B4==="win32";ke.isMacos=B4==="darwin";ke.isLinux=B4==="linux";ke.isIBMi=YTt.type()==="OS400"});var tbe=g((Tar,ebe)=>{"use strict";var hu=require("fs"),bn=require("path"),{promisify:Ov}=require("util"),JTt=X_e(),{isWindows:ZTt,isLinux:QTt,EMPTY_FN:eAt,EMPTY_STR:tAt,KEY_LISTENERS:gh,KEY_ERR:j4,KEY_RAW:Cv,HANDLER_KEYS:rAt,EV_CHANGE:L1,EV_ADD:D1,EV_ADD_DIR:nAt,EV_ERROR:J_e,STR_DATA:iAt,STR_END:sAt,BRACE_START:oAt,STAR:aAt}=k1(),uAt="watch",cAt=Ov(hu.open),Z_e=Ov(hu.stat),lAt=Ov(hu.lstat),fAt=Ov(hu.close),U4=Ov(hu.realpath),pAt={lstat:lAt,stat:Z_e},z4=(e,t)=>{e instanceof Set?e.forEach(t):t(e)},Tv=(e,t,r)=>{let n=e[t];n instanceof Set||(e[t]=n=new Set([n])),n.add(r)},dAt=e=>t=>{let r=e[t];r instanceof Set?r.clear():delete e[t]},Av=(e,t,r)=>{let n=e[t];n instanceof Set?n.delete(r):n===r&&delete e[t]},Q_e=e=>e instanceof Set?e.size===0:!e,F1=new Map;function Y_e(e,t,r,n,i){let s=(o,a)=>{r(e),i(o,a,{watchedPath:e}),a&&e!==a&&M1(bn.resolve(e,a),gh,bn.join(e,a))};try{return hu.watch(e,t,s)}catch(o){n(o)}}var M1=(e,t,r,n,i)=>{let s=F1.get(e);s&&z4(s[t],o=>{o(r,n,i)})},hAt=(e,t,r,n)=>{let{listener:i,errHandler:s,rawEmitter:o}=n,a=F1.get(t),u;if(!r.persistent)return u=Y_e(e,r,i,s,o),u.close.bind(u);if(a)Tv(a,gh,i),Tv(a,j4,s),Tv(a,Cv,o);else{if(u=Y_e(e,r,M1.bind(null,t,gh),s,M1.bind(null,t,Cv)),!u)return;u.on(J_e,async c=>{let f=M1.bind(null,t,j4);if(a.watcherUnusable=!0,ZTt&&c.code==="EPERM")try{let p=await cAt(e,"r");await fAt(p),f(c)}catch{}else f(c)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:u},F1.set(t,a)}return()=>{Av(a,gh,i),Av(a,j4,s),Av(a,Cv,o),Q_e(a.listeners)&&(a.watcher.close(),F1.delete(t),rAt.forEach(dAt(a)),a.watcher=void 0,Object.freeze(a))}},H4=new Map,mAt=(e,t,r,n)=>{let{listener:i,rawEmitter:s}=n,o=H4.get(t),a=new Set,u=new Set,c=o&&o.options;return c&&(c.persistent<r.persistent||c.interval>r.interval)&&(a=o.listeners,u=o.rawEmitters,hu.unwatchFile(t),o=void 0),o?(Tv(o,gh,i),Tv(o,Cv,s)):(o={listeners:i,rawEmitters:s,options:r,watcher:hu.watchFile(t,r,(f,p)=>{z4(o.rawEmitters,m=>{m(L1,t,{curr:f,prev:p})});let d=f.mtimeMs;(f.size!==p.size||d>p.mtimeMs||d===0)&&z4(o.listeners,m=>m(e,f))})},H4.set(t,o)),()=>{Av(o,gh,i),Av(o,Cv,s),Q_e(o.listeners)&&(H4.delete(t),hu.unwatchFile(t),o.options=o.watcher=void 0,Object.freeze(o))}},$4=class{constructor(t){this.fsw=t,this._boundHandleError=r=>t._handleError(r)}_watchWithNodeFs(t,r){let n=this.fsw.options,i=bn.dirname(t),s=bn.basename(t);this.fsw._getWatchedDir(i).add(s);let a=bn.resolve(t),u={persistent:n.persistent};r||(r=eAt);let c;return n.usePolling?(u.interval=n.enableBinaryInterval&&JTt(s)?n.binaryInterval:n.interval,c=mAt(t,a,u,{listener:r,rawEmitter:this.fsw._emitRaw})):c=hAt(t,a,u,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),c}_handleFile(t,r,n){if(this.fsw.closed)return;let i=bn.dirname(t),s=bn.basename(t),o=this.fsw._getWatchedDir(i),a=r;if(o.has(s))return;let u=async(f,p)=>{if(this.fsw._throttle(uAt,t,5)){if(!p||p.mtimeMs===0)try{let d=await Z_e(t);if(this.fsw.closed)return;let m=d.atimeMs,v=d.mtimeMs;(!m||m<=v||v!==a.mtimeMs)&&this.fsw._emit(L1,t,d),QTt&&a.ino!==d.ino?(this.fsw._closeFile(f),a=d,this.fsw._addPathCloser(f,this._watchWithNodeFs(t,u))):a=d}catch{this.fsw._remove(i,s)}else if(o.has(s)){let d=p.atimeMs,m=p.mtimeMs;(!d||d<=m||m!==a.mtimeMs)&&this.fsw._emit(L1,t,p),a=p}}},c=this._watchWithNodeFs(t,u);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(t)){if(!this.fsw._throttle(D1,t,0))return;this.fsw._emit(D1,t,r)}return c}async _handleSymlink(t,r,n,i){if(this.fsw.closed)return;let s=t.fullPath,o=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await U4(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(i)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(L1,n,t.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(D1,n,t.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(t,r,n,i,s,o,a){if(t=bn.join(t,tAt),!n.hasGlob&&(a=this.fsw._throttle("readdir",t,1e3),!a))return;let u=this.fsw._getWatchedDir(n.path),c=new Set,f=this.fsw._readdirp(t,{fileFilter:p=>n.filterPath(p),directoryFilter:p=>n.filterDir(p),depth:0}).on(iAt,async p=>{if(this.fsw.closed){f=void 0;return}let d=p.path,m=bn.join(t,d);if(c.add(d),!(p.stats.isSymbolicLink()&&await this._handleSymlink(p,t,m,d))){if(this.fsw.closed){f=void 0;return}(d===i||!i&&!u.has(d))&&(this.fsw._incrReadyCount(),m=bn.join(s,bn.relative(s,m)),this._addToNodeFs(m,r,n,o+1))}}).on(J_e,this._boundHandleError);return new Promise(p=>f.once(sAt,()=>{if(this.fsw.closed){f=void 0;return}let d=a?a.clear():!1;p(),u.getChildren().filter(m=>m!==t&&!c.has(m)&&(!n.hasGlob||n.filterPath({fullPath:bn.resolve(t,m)}))).forEach(m=>{this.fsw._remove(t,m)}),f=void 0,d&&this._handleRead(t,!1,n,i,s,o,a)}))}async _handleDir(t,r,n,i,s,o,a){let u=this.fsw._getWatchedDir(bn.dirname(t)),c=u.has(bn.basename(t));!(n&&this.fsw.options.ignoreInitial)&&!s&&!c&&(!o.hasGlob||o.globFilter(t))&&this.fsw._emit(nAt,t,r),u.add(bn.basename(t)),this.fsw._getWatchedDir(t);let f,p,d=this.fsw.options.depth;if((d==null||i<=d)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(t,n,o,s,t,i,f),this.fsw.closed))return;p=this._watchWithNodeFs(t,(m,v)=>{v&&v.mtimeMs===0||this._handleRead(m,!1,o,s,t,i,f)})}return p}async _addToNodeFs(t,r,n,i,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(t)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(t,i);!a.hasGlob&&n&&(a.hasGlob=n.hasGlob,a.globFilter=n.globFilter,a.filterPath=u=>n.filterPath(u),a.filterDir=u=>n.filterDir(u));try{let u=await pAt[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,u))return o(),!1;let c=this.fsw.options.followSymlinks&&!t.includes(aAt)&&!t.includes(oAt),f;if(u.isDirectory()){let p=bn.resolve(t),d=c?await U4(t):t;if(this.fsw.closed||(f=await this._handleDir(a.watchPath,u,r,i,s,a,d),this.fsw.closed))return;p!==d&&d!==void 0&&this.fsw._symlinkPaths.set(p,d)}else if(u.isSymbolicLink()){let p=c?await U4(t):t;if(this.fsw.closed)return;let d=bn.dirname(a.watchPath);if(this.fsw._getWatchedDir(d).add(a.watchPath),this.fsw._emit(D1,a.watchPath,u),f=await this._handleDir(d,u,r,i,t,a,p),this.fsw.closed)return;p!==void 0&&this.fsw._symlinkPaths.set(bn.resolve(t),p)}else f=this._handleFile(a.watchPath,u,r);return o(),this.fsw._addPathCloser(t,f),!1}catch(u){if(this.fsw._handleError(u))return o(),t}}};ebe.exports=$4});var ube=g((Aar,Z4)=>{"use strict";var Y4=require("fs"),wn=require("path"),{promisify:J4}=require("util"),vh;try{vh=require("fsevents")}catch(e){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(e)}if(vh){let e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){let t=Number.parseInt(e[1],10),r=Number.parseInt(e[2],10);t===8&&r<16&&(vh=void 0)}}var{EV_ADD:W4,EV_CHANGE:gAt,EV_ADD_DIR:rbe,EV_UNLINK:B1,EV_ERROR:vAt,STR_DATA:xAt,STR_END:yAt,FSEVENT_CREATED:_At,FSEVENT_MODIFIED:bAt,FSEVENT_DELETED:wAt,FSEVENT_MOVED:EAt,FSEVENT_UNKNOWN:SAt,FSEVENT_TYPE_FILE:CAt,FSEVENT_TYPE_DIRECTORY:Iv,FSEVENT_TYPE_SYMLINK:abe,ROOT_GLOBSTAR:nbe,DIR_SUFFIX:TAt,DOT_SLASH:ibe,FUNCTION_TYPE:G4,EMPTY_FN:AAt,IDENTITY_FN:OAt}=k1(),IAt=e=>isNaN(e)?{}:{depth:e},K4=J4(Y4.stat),RAt=J4(Y4.lstat),sbe=J4(Y4.realpath),NAt={stat:K4,lstat:RAt},pf=new Map,qAt=10,PAt=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),kAt=(e,t)=>({stop:vh.watch(e,t)});function DAt(e,t,r,n){let i=wn.extname(t)?wn.dirname(t):t,s=wn.dirname(i),o=pf.get(i);LAt(s)&&(i=s);let a=wn.resolve(e),u=a!==t,c=(p,d,m)=>{u&&(p=p.replace(t,a)),(p===a||!p.indexOf(a+wn.sep))&&r(p,d,m)},f=!1;for(let p of pf.keys())if(t.indexOf(wn.resolve(p)+wn.sep)===0){i=p,o=pf.get(i),f=!0;break}return o||f?o.listeners.add(c):(o={listeners:new Set([c]),rawEmitter:n,watcher:kAt(i,(p,d)=>{if(!o.listeners.size)return;let m=vh.getInfo(p,d);o.listeners.forEach(v=>{v(p,d,m)}),o.rawEmitter(m.event,p,m)})},pf.set(i,o)),()=>{let p=o.listeners;if(p.delete(c),!p.size&&(pf.delete(i),o.watcher))return o.watcher.stop().then(()=>{o.rawEmitter=o.watcher=void 0,Object.freeze(o)})}}var LAt=e=>{let t=0;for(let r of pf.keys())if(r.indexOf(e)===0&&(t++,t>=qAt))return!0;return!1},FAt=()=>vh&&pf.size<128,V4=(e,t)=>{let r=0;for(;!e.indexOf(t)&&(e=wn.dirname(e))!==t;)r++;return r},obe=(e,t)=>e.type===Iv&&t.isDirectory()||e.type===abe&&t.isSymbolicLink()||e.type===CAt&&t.isFile(),X4=class{constructor(t){this.fsw=t}checkIgnored(t,r){let n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(t,r))return n.add(t),r&&r.isDirectory()&&n.add(t+nbe),!0;n.delete(t),n.delete(t+nbe)}addOrChange(t,r,n,i,s,o,a,u){let c=s.has(o)?gAt:W4;this.handleEvent(c,t,r,n,i,s,o,a,u)}async checkExists(t,r,n,i,s,o,a,u){try{let c=await K4(t);if(this.fsw.closed)return;obe(a,c)?this.addOrChange(t,r,n,i,s,o,a,u):this.handleEvent(B1,t,r,n,i,s,o,a,u)}catch(c){c.code==="EACCES"?this.addOrChange(t,r,n,i,s,o,a,u):this.handleEvent(B1,t,r,n,i,s,o,a,u)}}handleEvent(t,r,n,i,s,o,a,u,c){if(!(this.fsw.closed||this.checkIgnored(r)))if(t===B1){let f=u.type===Iv;(f||o.has(a))&&this.fsw._remove(s,a,f)}else{if(t===W4){if(u.type===Iv&&this.fsw._getWatchedDir(r),u.type===abe&&c.followSymlinks){let p=c.depth===void 0?void 0:V4(n,i)+1;return this._addToFsEvents(r,!1,!0,p)}this.fsw._getWatchedDir(s).add(a)}let f=u.type===Iv?t+TAt:t;this.fsw._emit(f,r),f===rbe&&this._addToFsEvents(r,!1,!0)}}_watchWithFsEvents(t,r,n,i){if(this.fsw.closed||this.fsw._isIgnored(t))return;let s=this.fsw.options,a=DAt(t,r,async(u,c,f)=>{if(this.fsw.closed||s.depth!==void 0&&V4(u,r)>s.depth)return;let p=n(wn.join(t,wn.relative(t,u)));if(i&&!i(p))return;let d=wn.dirname(p),m=wn.basename(p),v=this.fsw._getWatchedDir(f.type===Iv?p:d);if(PAt.has(c)||f.event===SAt)if(typeof s.ignored===G4){let _;try{_=await K4(p)}catch{}if(this.fsw.closed||this.checkIgnored(p,_))return;obe(f,_)?this.addOrChange(p,u,r,d,v,m,f,s):this.handleEvent(B1,p,u,r,d,v,m,f,s)}else this.checkExists(p,u,r,d,v,m,f,s);else switch(f.event){case _At:case bAt:return this.addOrChange(p,u,r,d,v,m,f,s);case wAt:case EAt:return this.checkExists(p,u,r,d,v,m,f,s)}},this.fsw._emitRaw);return this.fsw._emitReady(),a}async _handleFsEventsSymlink(t,r,n,i){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(r))){this.fsw._symlinkPaths.set(r,!0),this.fsw._incrReadyCount();try{let s=await sbe(t);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||t,o=>{let a=t;return s&&s!==ibe?a=o.replace(s,t):o!==ibe&&(a=wn.join(t,o)),n(a)},!1,i)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(t,r,n,i,s){let o=n(t),a=r.isDirectory(),u=this.fsw._getWatchedDir(wn.dirname(o)),c=wn.basename(o);a&&this.fsw._getWatchedDir(o),!u.has(c)&&(u.add(c),(!i.ignoreInitial||s===!0)&&this.fsw._emit(a?rbe:W4,o,r))}initWatch(t,r,n,i){if(this.fsw.closed)return;let s=this._watchWithFsEvents(n.watchPath,wn.resolve(t||n.watchPath),i,n.globFilter);this.fsw._addPathCloser(r,s)}async _addToFsEvents(t,r,n,i){if(this.fsw.closed)return;let s=this.fsw.options,o=typeof r===G4?r:OAt,a=this.fsw._getWatchHelpers(t);try{let u=await NAt[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,u))throw null;if(u.isDirectory()){if(a.globFilter||this.emitAdd(o(t),u,o,s,n),i&&i>s.depth)return;this.fsw._readdirp(a.watchPath,{fileFilter:c=>a.filterPath(c),directoryFilter:c=>a.filterDir(c),...IAt(s.depth-(i||0))}).on(xAt,c=>{if(this.fsw.closed||c.stats.isDirectory()&&!a.filterPath(c))return;let f=wn.join(a.watchPath,c.path),{fullPath:p}=c;if(a.followSymlinks&&c.stats.isSymbolicLink()){let d=s.depth===void 0?void 0:V4(f,wn.resolve(a.watchPath))+1;this._handleFsEventsSymlink(f,p,o,d)}else this.emitAdd(f,c.stats,o,s,n)}).on(vAt,AAt).on(yAt,()=>{this.fsw._emitReady()})}else this.emitAdd(a.watchPath,u,o,s,n),this.fsw._emitReady()}catch(u){(!u||this.fsw._handleError(u))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&n!==!0)if(typeof r===G4)this.initWatch(void 0,t,a,o);else{let u;try{u=await sbe(a.watchPath)}catch{}this.initWatch(u,t,a,o)}}};Z4.exports=X4;Z4.exports.canUse=FAt});var ybe=g(d3=>{"use strict";var{EventEmitter:MAt}=require("events"),f3=require("fs"),Ut=require("path"),{promisify:mbe}=require("util"),BAt=N_e(),i3=M_e().default,jAt=$_e(),Q4=F4(),UAt=OD(),HAt=D4(),zAt=tbe(),cbe=ube(),{EV_ALL:e3,EV_READY:$At,EV_ADD:j1,EV_CHANGE:Rv,EV_UNLINK:lbe,EV_ADD_DIR:WAt,EV_UNLINK_DIR:GAt,EV_RAW:VAt,EV_ERROR:t3,STR_CLOSE:KAt,STR_END:XAt,BACK_SLASH_RE:YAt,DOUBLE_SLASH_RE:fbe,SLASH_OR_BACK_SLASH_RE:JAt,DOT_RE:ZAt,REPLACER_RE:QAt,SLASH:r3,SLASH_SLASH:eOt,BRACE_START:tOt,BANG:s3,ONE_DOT:gbe,TWO_DOTS:rOt,GLOBSTAR:nOt,SLASH_GLOBSTAR:n3,ANYMATCH_OPTS:o3,STRING_TYPE:p3,FUNCTION_TYPE:iOt,EMPTY_STR:a3,EMPTY_FN:sOt,isWindows:oOt,isMacos:aOt,isIBMi:uOt}=k1(),cOt=mbe(f3.stat),lOt=mbe(f3.readdir),u3=(e=[])=>Array.isArray(e)?e:[e],vbe=(e,t=[])=>(e.forEach(r=>{Array.isArray(r)?vbe(r,t):t.push(r)}),t),pbe=e=>{let t=vbe(u3(e));if(!t.every(r=>typeof r===p3))throw new TypeError(`Non-string provided as watch path: ${t}`);return t.map(xbe)},dbe=e=>{let t=e.replace(YAt,r3),r=!1;for(t.startsWith(eOt)&&(r=!0);t.match(fbe);)t=t.replace(fbe,r3);return r&&(t=r3+t),t},xbe=e=>dbe(Ut.normalize(dbe(e))),hbe=(e=a3)=>t=>typeof t!==p3?t:xbe(Ut.isAbsolute(t)?t:Ut.join(e,t)),fOt=(e,t)=>Ut.isAbsolute(e)?e:e.startsWith(s3)?s3+Ut.join(t,e.slice(1)):Ut.join(t,e),_o=(e,t)=>e[t]===void 0,c3=class{constructor(t,r){this.path=t,this._removeWatcher=r,this.items=new Set}add(t){let{items:r}=this;r&&t!==gbe&&t!==rOt&&r.add(t)}async remove(t){let{items:r}=this;if(!r||(r.delete(t),r.size>0))return;let n=this.path;try{await lOt(n)}catch{this._removeWatcher&&this._removeWatcher(Ut.dirname(n),Ut.basename(n))}}has(t){let{items:r}=this;if(r)return r.has(t)}getChildren(){let{items:t}=this;if(t)return[...t.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},pOt="stat",dOt="lstat",l3=class{constructor(t,r,n,i){this.fsw=i,this.path=t=t.replace(QAt,a3),this.watchPath=r,this.fullWatchPath=Ut.resolve(r),this.hasGlob=r!==t,t===a3&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?i3(t,void 0,o3):!1,this.dirParts=this.getDirParts(t),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=n,this.statMethod=n?pOt:dOt}checkGlobSymlink(t){return this.globSymlink===void 0&&(this.globSymlink=t.fullParentDir===this.fullWatchPath?!1:{realPath:t.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?t.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):t.fullPath}entryPath(t){return Ut.join(this.watchPath,Ut.relative(this.watchPath,this.checkGlobSymlink(t)))}filterPath(t){let{stats:r}=t;if(r&&r.isSymbolicLink())return this.filterDir(t);let n=this.entryPath(t);return(this.hasGlob&&typeof this.globFilter===iOt?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,r)&&this.fsw._hasReadPermissions(r)}getDirParts(t){if(!this.hasGlob)return[];let r=[];return(t.includes(tOt)?UAt.expand(t):[t]).forEach(i=>{r.push(Ut.relative(this.watchPath,i).split(JAt))}),r}filterDir(t){if(this.hasGlob){let r=this.getDirParts(this.checkGlobSymlink(t)),n=!1;this.unmatchedGlob=!this.dirParts.some(i=>i.every((s,o)=>(s===nOt&&(n=!0),n||!r[0][o]||i3(s,r[0][o],o3))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(t),t.stats)}},U1=class extends MAt{constructor(t){super();let r={};t&&Object.assign(r,t),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,_o(r,"persistent")&&(r.persistent=!0),_o(r,"ignoreInitial")&&(r.ignoreInitial=!1),_o(r,"ignorePermissionErrors")&&(r.ignorePermissionErrors=!1),_o(r,"interval")&&(r.interval=100),_o(r,"binaryInterval")&&(r.binaryInterval=300),_o(r,"disableGlobbing")&&(r.disableGlobbing=!1),r.enableBinaryInterval=r.binaryInterval!==r.interval,_o(r,"useFsEvents")&&(r.useFsEvents=!r.usePolling),cbe.canUse()||(r.useFsEvents=!1),_o(r,"usePolling")&&!r.useFsEvents&&(r.usePolling=aOt),uOt&&(r.usePolling=!0);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let u=i.toLowerCase();u==="false"||u==="0"?r.usePolling=!1:u==="true"||u==="1"?r.usePolling=!0:r.usePolling=!!u}let s=process.env.CHOKIDAR_INTERVAL;s&&(r.interval=Number.parseInt(s,10)),_o(r,"atomic")&&(r.atomic=!r.usePolling&&!r.useFsEvents),r.atomic&&(this._pendingUnlinks=new Map),_o(r,"followSymlinks")&&(r.followSymlinks=!0),_o(r,"awaitWriteFinish")&&(r.awaitWriteFinish=!1),r.awaitWriteFinish===!0&&(r.awaitWriteFinish={});let o=r.awaitWriteFinish;o&&(o.stabilityThreshold||(o.stabilityThreshold=2e3),o.pollInterval||(o.pollInterval=100),this._pendingWrites=new Map),r.ignored&&(r.ignored=u3(r.ignored));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=sOt,this._readyEmitted=!0,process.nextTick(()=>this.emit($At)))},this._emitRaw=(...u)=>this.emit(VAt,...u),this._readyEmitted=!1,this.options=r,r.useFsEvents?this._fsEventsHandler=new cbe(this):this._nodeFsHandler=new zAt(this),Object.freeze(r)}add(t,r,n){let{cwd:i,disableGlobbing:s}=this.options;this.closed=!1;let o=pbe(t);return i&&(o=o.map(a=>{let u=fOt(a,i);return s||!Q4(a)?u:HAt(u)})),o=o.filter(a=>a.startsWith(s3)?(this._ignoredPaths.add(a.slice(1)),!1):(this._ignoredPaths.delete(a),this._ignoredPaths.delete(a+n3),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=o.length),this.options.persistent&&(this._readyCount*=2),o.forEach(a=>this._fsEventsHandler._addToFsEvents(a))):(this._readyCount||(this._readyCount=0),this._readyCount+=o.length,Promise.all(o.map(async a=>{let u=await this._nodeFsHandler._addToNodeFs(a,!n,0,0,r);return u&&this._emitReady(),u})).then(a=>{this.closed||a.filter(u=>u).forEach(u=>{this.add(Ut.dirname(u),Ut.basename(r||u))})})),this}unwatch(t){if(this.closed)return this;let r=pbe(t),{cwd:n}=this.options;return r.forEach(i=>{!Ut.isAbsolute(i)&&!this._closers.has(i)&&(n&&(i=Ut.join(n,i)),i=Ut.resolve(i)),this._closePath(i),this._ignoredPaths.add(i),this._watched.has(i)&&this._ignoredPaths.add(i+n3),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let t=[];return this._closers.forEach(r=>r.forEach(n=>{let i=n();i instanceof Promise&&t.push(i)})),this._streams.forEach(r=>r.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(r=>r.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(r=>{this[`_${r}`].clear()}),this._closePromise=t.length?Promise.all(t).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let t={};return this._watched.forEach((r,n)=>{let i=this.options.cwd?Ut.relative(this.options.cwd,n):n;t[i||gbe]=r.getChildren().sort()}),t}emitWithAll(t,r){this.emit(...r),t!==t3&&this.emit(e3,...r)}async _emit(t,r,n,i,s){if(this.closed)return;let o=this.options;oOt&&(r=Ut.normalize(r)),o.cwd&&(r=Ut.relative(o.cwd,r));let a=[t,r];s!==void 0?a.push(n,i,s):i!==void 0?a.push(n,i):n!==void 0&&a.push(n);let u=o.awaitWriteFinish,c;if(u&&(c=this._pendingWrites.get(r)))return c.lastChange=new Date,this;if(o.atomic){if(t===lbe)return this._pendingUnlinks.set(r,a),setTimeout(()=>{this._pendingUnlinks.forEach((f,p)=>{this.emit(...f),this.emit(e3,...f),this._pendingUnlinks.delete(p)})},typeof o.atomic=="number"?o.atomic:100),this;t===j1&&this._pendingUnlinks.has(r)&&(t=a[0]=Rv,this._pendingUnlinks.delete(r))}if(u&&(t===j1||t===Rv)&&this._readyEmitted){let f=(p,d)=>{p?(t=a[0]=t3,a[1]=p,this.emitWithAll(t,a)):d&&(a.length>2?a[2]=d:a.push(d),this.emitWithAll(t,a))};return this._awaitWriteFinish(r,u.stabilityThreshold,t,f),this}if(t===Rv&&!this._throttle(Rv,r,50))return this;if(o.alwaysStat&&n===void 0&&(t===j1||t===WAt||t===Rv)){let f=o.cwd?Ut.join(o.cwd,r):r,p;try{p=await cOt(f)}catch{}if(!p||this.closed)return;a.push(p)}return this.emitWithAll(t,a),this}_handleError(t){let r=t&&t.code;return t&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")&&this.emit(t3,t),t||this.closed}_throttle(t,r,n){this._throttled.has(t)||this._throttled.set(t,new Map);let i=this._throttled.get(t),s=i.get(r);if(s)return s.count++,!1;let o,a=()=>{let c=i.get(r),f=c?c.count:0;return i.delete(r),clearTimeout(o),c&&clearTimeout(c.timeoutObject),f};o=setTimeout(a,n);let u={timeoutObject:o,clear:a,count:0};return i.set(r,u),u}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(t,r,n,i){let s,o=t;this.options.cwd&&!Ut.isAbsolute(t)&&(o=Ut.join(this.options.cwd,t));let a=new Date,u=c=>{f3.stat(o,(f,p)=>{if(f||!this._pendingWrites.has(t)){f&&f.code!=="ENOENT"&&i(f);return}let d=Number(new Date);c&&p.size!==c.size&&(this._pendingWrites.get(t).lastChange=d);let m=this._pendingWrites.get(t);d-m.lastChange>=r?(this._pendingWrites.delete(t),i(void 0,p)):s=setTimeout(u,this.options.awaitWriteFinish.pollInterval,p)})};this._pendingWrites.has(t)||(this._pendingWrites.set(t,{lastChange:a,cancelWait:()=>(this._pendingWrites.delete(t),clearTimeout(s),n)}),s=setTimeout(u,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(t,r){if(this.options.atomic&&ZAt.test(t))return!0;if(!this._userIgnored){let{cwd:n}=this.options,i=this.options.ignored,s=i&&i.map(hbe(n)),o=u3(s).filter(u=>typeof u===p3&&!Q4(u)).map(u=>u+n3),a=this._getGlobIgnored().map(hbe(n)).concat(s,o);this._userIgnored=i3(a,void 0,o3)}return this._userIgnored([t,r])}_isntIgnored(t,r){return!this._isIgnored(t,r)}_getWatchHelpers(t,r){let n=r||this.options.disableGlobbing||!Q4(t)?t:jAt(t),i=this.options.followSymlinks;return new l3(t,n,i,this)}_getWatchedDir(t){this._boundRemove||(this._boundRemove=this._remove.bind(this));let r=Ut.resolve(t);return this._watched.has(r)||this._watched.set(r,new c3(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(t){if(this.options.ignorePermissionErrors)return!0;let n=(t&&Number.parseInt(t.mode,10))&511;return!!(4&Number.parseInt(n.toString(8)[0],10))}_remove(t,r,n){let i=Ut.join(t,r),s=Ut.resolve(i);if(n=n??(this._watched.has(i)||this._watched.has(s)),!this._throttle("remove",i,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(t,r,!0),this._getWatchedDir(i).getChildren().forEach(d=>this._remove(i,d));let u=this._getWatchedDir(t),c=u.has(r);u.remove(r),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=i;if(this.options.cwd&&(f=Ut.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===j1)return;this._watched.delete(i),this._watched.delete(s);let p=n?GAt:lbe;c&&!this._isIgnored(i)&&this._emit(p,i),this.options.useFsEvents||this._closePath(i)}_closePath(t){this._closeFile(t);let r=Ut.dirname(t);this._getWatchedDir(r).remove(Ut.basename(t))}_closeFile(t){let r=this._closers.get(t);r&&(r.forEach(n=>n()),this._closers.delete(t))}_addPathCloser(t,r){if(!r)return;let n=this._closers.get(t);n||(n=[],this._closers.set(t,n)),n.push(r)}_readdirp(t,r){if(this.closed)return;let n={type:e3,alwaysStat:!0,lstat:!0,...r},i=BAt(t,n);return this._streams.add(i),i.once(KAt,()=>{i=void 0}),i.once(XAt,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};d3.FSWatcher=U1;var hOt=(e,t)=>{let r=new U1(t);return r.add(e),r};d3.watch=hOt});var bbe=g((Iar,_be)=>{var mOt=/^(?:@([^/]+)\/)?(([^\.]+)(?:\.(.*))?)$/;_be.exports=function(t){var r={scope:null,fullName:"",projectName:"",moduleName:""},n=(typeof t=="object"?t.name||"":t||"").match(mOt);return n&&(r.scope=n[1]||null,r.fullName=n[2]||n[0],r.projectName=n[3]===n[2]?null:n[3],r.moduleName=n[4]||n[2]||null),r}});var Ebe=g((Rar,wbe)=>{wbe.exports=function(t){var r=/(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$/;return r.test(t)}});var Tbe=g((Nar,Cbe)=>{Cbe.exports=Sbe;function df(e,t){if(typeof Object.setPrototypeOf=="function")return Object.setPrototypeOf(e,t);e.__proto__=t}function Sbe(){this.list=[];var e=null;Object.defineProperty(this,"root",{get:function(){return e},set:function(t){e=t,this.list.length&&df(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}Sbe.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!="object"&&(e={valueOf:e}),this.list.length>=1&&df(this.list[this.list.length-1],e),df(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&df(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return df(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&df(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,r){return this.length||this.push({}),r&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var r in this.list[0])e.call(t,r,this.list[0][r])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)df(this.list[t],this.list[t+1]||this.root);return e}}});var Rbe=g(hf=>{hf.parse=hf.decode=gOt;hf.stringify=hf.encode=Abe;hf.safe=xh;hf.unsafe=H1;var h3=typeof process<"u"&&process.platform==="win32"?`\r
|
|
230
230
|
`:`
|
|
231
231
|
`;function Abe(e,t){var r=[],n="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||{},t.whitespace=t.whitespace===!0);var i=t.whitespace?" = ":"=";return Object.keys(e).forEach(function(s,o,a){var u=e[s];u&&Array.isArray(u)?u.forEach(function(c){n+=xh(s+"[]")+i+xh(c)+`
|
|
232
232
|
`}):u&&typeof u=="object"?r.push(s):n+=xh(s)+i+xh(u)+h3}),t.section&&n.length&&(n="["+xh(t.section)+"]"+h3+n),r.forEach(function(s,o,a){var u=Obe(s).join("\\."),c=(t.section?t.section+".":"")+u,f=Abe(e[s],{section:c,whitespace:t.whitespace});n.length&&f.length&&(n+=h3),n+=f}),n}function Obe(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(t){return t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function gOt(e){var t={},r=t,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g);return s.forEach(function(o,a,u){if(!(!o||o.match(/^\s*[;#]/))){var c=o.match(i);if(c){if(c[1]!==void 0){if(n=H1(c[1]),n==="__proto__"){r={};return}r=t[n]=t[n]||{};return}var f=H1(c[2]);if(f!=="__proto__"){var p=c[3]?H1(c[4]):!0;switch(p){case"true":case"false":case"null":p=JSON.parse(p)}if(f.length>2&&f.slice(-2)==="[]"){if(f=f.substring(0,f.length-2),f==="__proto__")return;r[f]?Array.isArray(r[f])||(r[f]=[r[f]]):r[f]=[]}Array.isArray(r[f])?r[f].push(p):r[f]=p}}}}),Object.keys(t).filter(function(o,a,u){if(!t[o]||typeof t[o]!="object"||Array.isArray(t[o]))return!1;var c=Obe(o),f=t,p=c.pop(),d=p.replace(/\\\./g,".");return c.forEach(function(m,v,_){m!=="__proto__"&&((!f[m]||typeof f[m]!="object")&&(f[m]={}),f=f[m])}),f===t&&d===p?!1:(f[d]=t[o],!0)}).forEach(function(o,a,u){delete t[o]}),t}function Ibe(e){return e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'"}function xh(e){return typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Ibe(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function H1(e,t){if(e=(e||"").trim(),Ibe(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var r=!1,n="",i=0,s=e.length;i<s;i++){var o=e.charAt(i);if(r)"\\;#".indexOf(o)!==-1?n+=o:n+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:n+=o}}return r&&(n+="\\"),n.trim()}return e}});var kbe=g((mu,Pbe)=>{var Nbe=Tbe(),Nv=require("path"),z1=require("fs"),m3=Rbe(),g3=require("events").EventEmitter,vOt=require("url"),xOt=require("http"),mu=Pbe.exports=function(){for(var e=[].slice.call(arguments),t=new ni;e.length;){var r=e.shift();r&&t.push(typeof r=="string"?_Ot(r):r)}return t},Par=mu.find=function(){var e=Nv.join.apply(null,[].slice.call(arguments));function t(r,n){var i=Nv.join(r,n);try{return z1.statSync(i),i}catch{if(Nv.dirname(r)!==r)return t(Nv.dirname(r),n)}}return t(__dirname,e)},yOt=mu.parse=function(e,t,r){if(e=""+e,r)if(r==="json")if(this.emit)try{return JSON.parse(e)}catch(n){this.emit("error",n)}else return JSON.parse(e);else return m3.parse(e);else try{return JSON.parse(e)}catch{return m3.parse(e)}},_Ot=mu.json=function(){var e=[].slice.call(arguments).filter(function(n){return n!=null}),t=Nv.join.apply(null,e),r;try{r=z1.readFileSync(t,"utf-8")}catch{return}return yOt(r,t,"json")},kar=mu.env=function(e,t){t=t||process.env;var r={},n=e.length;for(var i in t)i.indexOf(e)===0&&(r[i.substring(n)]=t[i]);return r};mu.ConfigChain=ni;function ni(){g3.apply(this),Nbe.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var qbe={constructor:{value:ni}};Object.keys(g3.prototype).forEach(function(e){qbe[e]=Object.getOwnPropertyDescriptor(g3.prototype,e)});ni.prototype=Object.create(Nbe.prototype,qbe);ni.prototype.del=function(e,t){if(t){var r=this.sources[t];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+t));delete r[e]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][e];return this};ni.prototype.set=function(e,t,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[e]=t,this};ni.prototype.get=function(e,t){return t?(t=this.sources[t],t&&(t=t.data),t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]};ni.prototype.save=function(e,s,r){typeof s=="function"&&(r=s,s=null);var n=this.sources[e];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+e));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[i+a]=n.data[a]}),this}var s=s||n.type,o=n.data;return n.type==="json"?o=JSON.stringify(o):o=m3.stringify(o),this._saving++,z1.writeFile(n.path,o,"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};ni.prototype.addFile=function(e,t,r){r=r||e;var n={__source__:r};return this.sources[r]={path:e,type:t},this.push(n),this._await(),z1.readFile(e,"utf8",function(i,s){i&&this.emit("error",i),this.addString(s,e,t,n)}.bind(this)),this};ni.prototype.addEnv=function(e,t,r){r=r||"env";var n=mu.env(e,t);return this.sources[r]={data:n,source:t,prefix:e},this.add(n,r)};ni.prototype.addUrl=function(e,t,r){this._await();var n=vOt.format(e);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:t},this.push(i),xOt.request(e,function(s){var o=[],a=s.headers["content-type"];t||(t=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=t),s.on("data",o.push.bind(o)).on("end",function(){this.addString(Buffer.concat(o),n,t,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};ni.prototype.addString=function(e,t,r,n){return e=this.parse(e,t,r),this.add(e,n),this};ni.prototype.add=function(e,t){if(t&&typeof t=="object"){var r=this.list.indexOf(t);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t=="string"&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this};ni.prototype.parse=mu.parse;ni.prototype._await=function(){this._awaiting++};ni.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var Fbe=g(Lbe=>{"use strict";var mf=require("path"),bOt=require("stream").Stream,$1=require("url"),wOt=()=>{},EOt=()=>[],Dbe=()=>{};Lbe.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:mf,cache:mf,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],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,global:Boolean,globalconfig:mf,"global-style":Boolean,group:[Number,String],"https-proxy":[null,$1],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":mf,"init-author-name":String,"init-author-email":String,"init-author-url":["",$1],"init-license":String,"init-version":Dbe,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":EOt(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:bOt,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-version":[null,Dbe],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:mf,production:Boolean,progress:Boolean,"proprietary-attribs":Boolean,proxy:[null,!1,$1],"rebuild-bundle":Boolean,registry:[null,$1],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:mf,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:mf,umask:wOt,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var Bbe=g(W1=>{"use strict";var SOt=require("fs"),gf=require("path"),COt=Fbe(),Mbe=e=>{if(typeof e!="string"||!e)return e;let t=/(\\*)\$\{([^}]+)\}/g;return e.replace(t,(r,n,i)=>{if(n=n.length>0&&n.length%2,n)return r;if(process.env[i]===void 0)throw new Error(`Failed to replace env in config: ${r}`);return process.env[i]})},TOt=(e,t)=>{if(typeof e!="string")return e;let r=[].concat(COt[t]),n=r.indexOf(gf)!==-1,i=r.indexOf(Boolean)!==-1,s=r.indexOf(String)!==-1,o=r.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${t}: ${e}`)}if(i&&!s&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=Mbe(e),n&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=gf.resolve(process.env.HOME,e.substr(2))),e=gf.resolve(e)),o&&!e.isNan()&&(e=Number(e)),e},AOt=e=>{e=gf.resolve(e);let t=!1;for(;gf.basename(e)==="node_modules";)e=gf.dirname(e),t=!0;if(t)return e;let r=(n,i)=>{let s=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&s.test(n))return i;try{let o=SOt.readdirSync(n);if(o.indexOf("node_modules")!==-1||o.indexOf("package.json")!==-1)return n;let a=gf.dirname(n);return a===n?i:r(a,i)}catch(o){if(n===i){if(o.code==="ENOENT")return i;throw o}return i}};return r(e,e)};W1.envReplace=Mbe;W1.findPrefix=AOt;W1.parseField=TOt});var Hbe=g((Far,Ube)=>{"use strict";var v3=require("fs"),x3=require("path"),OOt=kbe().ConfigChain,jbe=Bbe(),y3=class extends OOt{constructor(t){super(t),this.root=t}add(t,r){try{for(let n of Object.keys(t))t[n]=jbe.parseField(t[n],n)}catch(n){throw n}return super.add(t,r)}addFile(t,r){r=r||t;let n={__source__:r};this.sources[r]={path:t,type:"ini"},this.push(n),this._await();try{let i=v3.readFileSync(t,"utf8");this.addString(i,t,"ini",n)}catch{this.add({},n)}return this}addEnv(t){t=t||process.env;let r={};return Object.keys(t).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{if(!t[n])return;let i=n.toLowerCase().replace(/^npm_config_/,"").replace(/(?!^)_/g,"-");r[i]=t[n]}),super.addEnv("",r,"env")}loadPrefix(){let t=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:()=>x3.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(t,"prefix"))r=x3.resolve(t.prefix);else try{r=jbe.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(t){if(t)try{let r=v3.readFileSync(t,"utf8"),n="-----END CERTIFICATE-----",i=r.split(n).filter(s=>!!s.trim()).map(s=>s.trimLeft()+n);this.set("ca",i)}catch(r){if(r.code==="ENOENT")return;throw r}}loadUser(){let t=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){t.user=Number(process.env.SUDO_UID);return}let r=x3.resolve(this.get("prefix"));try{let n=v3.statSync(r);t.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};Ube.exports=y3});var Kbe=g(Vbe=>{"use strict";var Wbe=require("os"),gu=require("path"),Gbe=Wbe.tmpdir(),IOt=process.getuid?process.getuid():process.pid,ROt=()=>!0,zbe=process.platform==="win32",$be={editor:()=>process.env.EDITOR||process.env.VISUAL||(zbe?"notepad.exe":"vi"),shell:()=>zbe?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},NOt={fromString:()=>process.umask()},yh=Wbe.homedir();yh?process.env.HOME=yh:yh=gu.resolve(Gbe,"npm-"+IOt);var qOt=process.platform==="win32"?"npm-cache":".npm",POt=process.platform==="win32"?process.env.APPDATA:yh,kOt=gu.resolve(POt,qOt),G1,vf;Object.defineProperty(Vbe,"defaults",{get:function(){return G1||(process.env.PREFIX?vf=process.env.PREFIX:process.platform==="win32"?vf=gu.dirname(process.execPath):(vf=gu.dirname(gu.dirname(process.execPath)),process.env.DESTDIR&&(vf=gu.join(process.env.DESTDIR,vf))),G1={access:null,"allow-same-version":!1,"always-auth":!1,also:null,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:kOt,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,color:!0,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:$be.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,global:!1,globalconfig:gu.resolve(vf,"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":gu.resolve(yh,".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-version":process.version,offline:!1,"onload-script":!1,only:null,optional:!0,"package-lock":!0,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:vf,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,"proprietary-attribs":!0,proxy:null,"https-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","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:$be.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:Gbe,unicode:ROt(),"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:gu.resolve(yh,".npmrc"),umask:process.umask?process.umask():NOt.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},G1)}})});var Ybe=g((Bar,_3)=>{"use strict";var V1=require("path"),DOt=Hbe(),Xbe=Kbe();_3.exports=e=>{let t=new DOt(Object.assign({},Xbe.defaults));t.add(Object.assign({},e),"cli"),t.addEnv(),t.loadPrefix();let r=V1.resolve(t.localPrefix,".npmrc"),n=t.get("userconfig");if(!t.get("global")&&r!==n?t.addFile(r,"project"):t.add({},"project"),t.addFile(t.get("userconfig"),"user"),t.get("prefix")){let s=V1.resolve(t.get("prefix"),"etc");t.root.globalconfig=V1.resolve(s,"npmrc"),t.root.globalignorefile=V1.resolve(s,"npmignore")}t.addFile(t.get("globalconfig"),"global"),t.loadUser();let i=t.get("cafile");return i&&t.loadCAFile(i),t};_3.exports.defaults=Object.assign({},Xbe.defaults)});var Zbe=g((jar,Jbe)=>{"use strict";var b3=Ybe()();Jbe.exports=()=>process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||b3.get("https-proxy")||b3.get("http-proxy")||b3.get("proxy")||null});var rwe=g(_h=>{"use strict";var Uar=require("net"),LOt=require("tls"),w3=require("http"),Qbe=require("https"),FOt=require("events"),MOt=require("assert"),BOt=require("util"),jOt=Ms().Buffer;_h.httpOverHttp=UOt;_h.httpsOverHttp=HOt;_h.httpOverHttps=zOt;_h.httpsOverHttps=$Ot;function UOt(e){var t=new la(e);return t.request=w3.request,t}function HOt(e){var t=new la(e);return t.request=w3.request,t.createSocket=ewe,t.defaultPort=443,t}function zOt(e){var t=new la(e);return t.request=Qbe.request,t}function $Ot(e){var t=new la(e);return t.request=Qbe.request,t.createSocket=ewe,t.defaultPort=443,t}function la(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||w3.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(n,i,s){for(var o=0,a=t.requests.length;o<a;++o){var u=t.requests[o];if(u.host===i&&u.port===s){t.requests.splice(o,1),u.request.onSocket(n);return}}n.destroy(),t.removeSocket(n)})}BOt.inherits(la,FOt.EventEmitter);la.prototype.addRequest=function(t,r){var n=this;if(typeof r=="string"&&(r={host:r,port:arguments[2],path:arguments[3]}),n.sockets.length>=this.maxSockets){n.requests.push({host:r.host,port:r.port,request:t});return}n.createConnection({host:r.host,port:r.port,request:t})};la.prototype.createConnection=function(t){var r=this;r.createSocket(t,function(n){n.on("free",i),n.on("close",s),n.on("agentRemove",s),t.request.onSocket(n);function i(){r.emit("free",n,t.host,t.port)}function s(o){r.removeSocket(n),n.removeListener("free",i),n.removeListener("close",s),n.removeListener("agentRemove",s)}})};la.prototype.createSocket=function(t,r){var n=this,i={};n.sockets.push(i);var s=twe({},n.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:!1});s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+jOt.from(s.proxyAuth).toString("base64")),xf("making CONNECT request");var o=n.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",u),o.once("connect",c),o.once("error",f),o.end();function a(p){p.upgrade=!0}function u(p,d,m){process.nextTick(function(){c(p,d,m)})}function c(p,d,m){if(o.removeAllListeners(),d.removeAllListeners(),p.statusCode===200)MOt.equal(m.length,0),xf("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=d,r(d);else{xf("tunneling socket could not be established, statusCode=%d",p.statusCode);var v=new Error("tunneling socket could not be established, statusCode="+p.statusCode);v.code="ECONNRESET",t.request.emit("error",v),n.removeSocket(i)}}function f(p){o.removeAllListeners(),xf(`tunneling socket could not be established, cause=%s
|
|
233
|
-
`,p.message,p.stack);var d=new Error("tunneling socket could not be established, cause="+p.message);d.code="ECONNRESET",t.request.emit("error",d),n.removeSocket(i)}};la.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createConnection(n)}};function ewe(e,t){var r=this;la.prototype.createSocket.call(r,e,function(n){var i=LOt.connect(0,twe({},r.options,{servername:e.host,socket:n}));r.sockets[r.sockets.indexOf(n)]=i,t(i)})}function twe(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if(typeof n=="object")for(var i=Object.keys(n),s=0,o=i.length;s<o;++s){var a=i[s];n[a]!==void 0&&(e[a]=n[a])}}return e}var xf;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?xf=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:xf=function(){};_h.debug=xf});var swe=g((zar,iwe)=>{"use strict";var WOt=require("url"),nwe=Zbe(),GOt=n4(),VOt=rwe(),KOt=t4();iwe.exports=(e,t)=>{if(e=e||nwe(),t=Object.assign({},t),typeof e=="object"&&(t=e,e=nwe()),!e)return null;e=GOt.lenient(e)?KOt(e):WOt.parse(e);let r=t.protocol==="https"?"https":"http",n=e.protocol==="https:"?"Https":"Http",i=e.port||(n==="Https"?443:80),s=`${r}Over${n}`;return delete t.protocol,VOt[s](Object.assign({proxy:{port:i,host:e.hostname,proxyAuth:e.auth}},t))}});var uwe=g(($ar,awe)=>{"use strict";var K1=require("path"),XOt=lF(),E3=pF(),YOt=dF(),JOt=100,owe=/[\u0000-\u001f\u0080-\u009f]/g,ZOt=/^\.+/,S3=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");t=t||{};let r=t.replacement===void 0?"!":t.replacement;if(E3().test(r)&&owe.test(r))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(E3(),r),e=e.replace(owe,r),e=e.replace(ZOt,r),r.length>0&&(e=XOt(e,r),e=e.length>1?YOt(e,r):e),e=E3.windowsNames().test(e)?e+r:e,e=e.slice(0,JOt),e};S3.path=(e,t)=>(e=K1.resolve(e),K1.join(K1.dirname(e),S3(K1.basename(e),t)));awe.exports=S3});var lwe=g((War,cwe)=>{"use strict";var QOt=require("stream").PassThrough;cwe.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new QOt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var fwe=g((Gar,X1)=>{"use strict";var eIt=lwe();function C3(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=eIt(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}X1.exports=C3;X1.exports.buffer=(e,t)=>C3(e,Object.assign({},t,{encoding:"buffer"}));X1.exports.array=(e,t)=>C3(e,Object.assign({},t,{array:!0}))});var T3=g((Var,dwe)=>{"use strict";var pwe=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};dwe.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):pwe(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?pwe(s,t):s}return n}});var vwe=g((Kar,A3)=>{"use strict";var tIt=require("fs"),yf=require("path"),hwe=T3(),mwe={mode:511&~process.umask(),fs:tIt},gwe=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(yf.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};A3.exports=(e,t)=>Promise.resolve().then(()=>{gwe(e),t=Object.assign({},mwe,t);let r=hwe(t.fs.mkdir),n=hwe(t.fs.stat),i=s=>r(s,t.mode).then(()=>s).catch(o=>{if(o.code==="ENOENT"){if(o.message.includes("null bytes")||yf.dirname(s)===s)throw o;return i(yf.dirname(s)).then(()=>i(s))}return n(s).then(a=>a.isDirectory()?s:Promise.reject()).catch(()=>{throw o})});return i(yf.resolve(e))});A3.exports.sync=(e,t)=>{gwe(e),t=Object.assign({},mwe,t);let r=n=>{try{t.fs.mkdirSync(n,t.mode)}catch(i){if(i.code==="ENOENT"){if(i.message.includes("null bytes")||yf.dirname(n)===n)throw i;return r(yf.dirname(n)),r(n)}try{if(!t.fs.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}return n};return r(yf.resolve(e))}});var ywe=g((Xar,xwe)=>{"use strict";var Y1=e=>[...e].map(t=>t.charCodeAt(0)),rIt=Y1("META-INF/mozilla.rsa"),nIt=Y1("[Content_Types].xml"),iIt=Y1("_rels/.rels");xwe.exports=e=>{let t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,s)=>{s=Object.assign({offset:0},s);for(let o=0;o<i.length;o++)if(s.mask){if(i[o]!==(s.mask[o]&t[o+s.offset]))return!1}else if(i[o]!==t[o+s.offset])return!1;return!0},n=(i,s)=>r(Y1(i),s);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(rIt,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(n("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(n("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};if(r(nIt,{offset:30})||r(iIt,{offset:30})){let i=t.subarray(4,2004),s=a=>a.findIndex((u,c,f)=>f[c]===80&&f[c+1]===75&&f[c+2]===3&&f[c+3]===4),o=s(i);if(o!==-1){let a=t.subarray(o+8,o+8+1e3),u=s(a);if(u!==-1){let c=8+o+u+30;if(n("word/",{offset:c}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n("ppt/",{offset:c}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n("xl/",{offset:c}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),s=i.findIndex((o,a,u)=>u[a]===66&&u[a+1]===130);if(s!==-1){let o=s+3,a=u=>[...u].every((c,f)=>i[o+f]===c.charCodeAt(0));if(a("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(a("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/x-wav"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let i=0;i<2&&i<t.length-16;i++){if(r([73,68,51],{offset:i})||r([255,226],{offset:i,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:i,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:i,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:i,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32]))return{ext:"m4a",mime:"audio/m4a"};if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((t[0]===67||t[0]===70)&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/octet-stream"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77,0]))return{ext:"aif",mime:"audio/aiff"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([102,116,121,112],{offset:4})){if(r([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(r([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(r([104,101,105,99],{offset:8})||r([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(r([104,101,118,99],{offset:8})||r([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return r([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:null}});var Twe=g((Yar,Cwe)=>{"use strict";var sIt=require("fs"),qv=require("path"),Swe=require("url"),_we=swe(),oIt=lL(),bwe=fL(),wwe=cF(),aIt=uwe(),uIt=fwe(),cIt=l4(),lIt=vwe(),fIt=T3(),pIt=I4(),dIt=ywe(),hIt=q4(),mIt=fIt(sIt),gIt=e=>qv.basename(Swe.parse(e.requestUrl).pathname),vIt=e=>{let t=e.headers["content-type"];if(!t)return null;let r=hIt.mime(t);return r.length!==1?null:r[0].ext},xIt=(e,t)=>{let r=e.headers["content-disposition"];if(r){let i=oIt.parse(r);if(i.parameters&&i.parameters.filename)return i.parameters.filename}let n=gIt(e);if(!qv.extname(n)){let i=(dIt(t)||{}).ext||vIt(e);i&&(n=`${n}.${i}`)}return n},Ewe=e=>{let{protocol:t}=Swe.parse(e);return t&&(t=t.slice(0,-1)),t};Cwe.exports=(e,t,r)=>{typeof t=="object"&&(r=t,t=null);let n=Ewe(e);r=Object.assign({encoding:null,rejectUnauthorized:process.env.npm_config_strict_ssl!=="false"},r);let i=_we(r.proxy,{protocol:n}),s=cIt.stream(e,Object.assign({agent:i},r)).on("redirect",(a,u)=>{let c=Ewe(u.href);c&&c!==n&&(u.agent=_we(r.proxy,{protocol:c}))}),o=pIt(s,"response").then(a=>{let u=r.encoding===null?"buffer":r.encoding;return Promise.all([uIt(s,{encoding:u}),a])}).then(a=>{let[u,c]=a;if(!t)return r.extract&&bwe(u)?wwe(u,r):u;let f=r.filename||aIt(xIt(c,u)),p=qv.join(t,f);return r.extract&&bwe(u)?wwe(u,qv.dirname(p),r):lIt(qv.dirname(p)).then(()=>mIt.writeFile(p,u)).then(()=>u)});return s.then=o.then.bind(o),s.catch=o.catch.bind(o),s}});var Iwe=g((Jar,Owe)=>{var Awe=require("child_process").spawn;Owe.exports=function(e,t,r,n){typeof r=="function"&&(n=r,r=null),r=r||{};var i=r.git||"git",s=["clone"];r.shallow&&(s.push("--depth"),s.push("1")),s.push("--"),s.push(e),s.push(t);var o=Awe(i,s);o.on("close",function(u){u==0?r.checkout?a():n&&n():n&&n(new Error("'git clone' failed with status "+u))});function a(){var u=["checkout",r.checkout],c=Awe(i,u,{cwd:t});c.on("close",function(f){f==0?n&&n():n&&n(new Error("'git checkout' failed with status "+f))})}}});var Rwe=g(O3=>{var _f=require("path"),Pc=process.platform==="win32",qc=require("fs"),yIt=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function _It(){var e;if(yIt){var t=new Error;e=r}else e=n;return e;function r(i){i&&(t.message=i.message,i=t,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function bIt(e){return typeof e=="function"?e:_It()}var Zar=_f.normalize;Pc?vu=/(.*?)(?:[\/\\]+|$)/g:vu=/(.*?)(?:[\/]+|$)/g;var vu;Pc?Pv=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:Pv=/^[\/]*/;var Pv;O3.realpathSync=function(t,r){if(t=_f.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];var n=t,i={},s={},o,a,u,c;f();function f(){var b=Pv.exec(t);o=b[0].length,a=b[0],u=b[0],c="",Pc&&!s[u]&&(qc.lstatSync(u),s[u]=!0)}for(;o<t.length;){vu.lastIndex=o;var p=vu.exec(t);if(c=a,a+=p[0],u=c+p[1],o=vu.lastIndex,!(s[u]||r&&r[u]===u)){var d;if(r&&Object.prototype.hasOwnProperty.call(r,u))d=r[u];else{var m=qc.lstatSync(u);if(!m.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var v=null;if(!Pc){var _=m.dev.toString(32)+":"+m.ino.toString(32);i.hasOwnProperty(_)&&(v=i[_])}v===null&&(qc.statSync(u),v=qc.readlinkSync(u)),d=_f.resolve(c,v),r&&(r[u]=d),Pc||(i[_]=v)}t=_f.resolve(d,t.slice(o)),f()}}return r&&(r[n]=t),t};O3.realpath=function(t,r,n){if(typeof n!="function"&&(n=bIt(r),r=null),t=_f.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return process.nextTick(n.bind(null,null,r[t]));var i=t,s={},o={},a,u,c,f;p();function p(){var b=Pv.exec(t);a=b[0].length,u=b[0],c=b[0],f="",Pc&&!o[c]?qc.lstat(c,function(y){if(y)return n(y);o[c]=!0,d()}):process.nextTick(d)}function d(){if(a>=t.length)return r&&(r[i]=t),n(null,t);vu.lastIndex=a;var b=vu.exec(t);return f=u,u+=b[0],c=f+b[1],a=vu.lastIndex,o[c]||r&&r[c]===c?process.nextTick(d):r&&Object.prototype.hasOwnProperty.call(r,c)?_(r[c]):qc.lstat(c,m)}function m(b,y){if(b)return n(b);if(!y.isSymbolicLink())return o[c]=!0,r&&(r[c]=c),process.nextTick(d);if(!Pc){var T=y.dev.toString(32)+":"+y.ino.toString(32);if(s.hasOwnProperty(T))return v(null,s[T],c)}qc.stat(c,function(S){if(S)return n(S);qc.readlink(c,function(E,C){Pc||(s[T]=C),v(E,C)})})}function v(b,y,T){if(b)return n(b);var S=_f.resolve(f,y);r&&(r[T]=S),_(S)}function _(b){t=_f.resolve(b,t.slice(a)),p()}}});var q3=g((eur,kwe)=>{kwe.exports=kc;kc.realpath=kc;kc.sync=N3;kc.realpathSync=N3;kc.monkeypatch=EIt;kc.unmonkeypatch=SIt;var bh=require("fs"),I3=bh.realpath,R3=bh.realpathSync,wIt=process.version,Nwe=/^v[0-5]\./.test(wIt),qwe=Rwe();function Pwe(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function kc(e,t,r){if(Nwe)return I3(e,t,r);typeof t=="function"&&(r=t,t=null),I3(e,t,function(n,i){Pwe(n)?qwe.realpath(e,t,r):r(n,i)})}function N3(e,t){if(Nwe)return R3(e,t);try{return R3(e,t)}catch(r){if(Pwe(r))return qwe.realpathSync(e,t);throw r}}function EIt(){bh.realpath=kc,bh.realpathSync=N3}function SIt(){bh.realpath=I3,bh.realpathSync=R3}});var Lwe=g((tur,Dwe)=>{Dwe.exports=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);CIt(i)?r.push.apply(r,i):r.push(i)}return r};var CIt=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var Uwe=g((rur,jwe)=>{"use strict";jwe.exports=Mwe;function Mwe(e,t,r){e instanceof RegExp&&(e=Fwe(e,r)),t instanceof RegExp&&(t=Fwe(t,r));var n=Bwe(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function Fwe(e,t){var r=t.match(e);return r?r[0]:null}Mwe.range=Bwe;function Bwe(e,t,r){var n,i,s,o,a,u=r.indexOf(e),c=r.indexOf(t,u+1),f=u;if(u>=0&&c>0){if(e===t)return[u,c];for(n=[],s=r.length;f>=0&&!a;)f==u?(n.push(f),u=r.indexOf(e,f+1)):n.length==1?a=[n.pop(),c]:(i=n.pop(),i<s&&(s=i,o=c),c=r.indexOf(t,f+1)),f=u<c&&u>=0?u:c;n.length&&(a=[s,o])}return a}});var Xwe=g((nur,Kwe)=>{var TIt=Lwe(),Hwe=Uwe();Kwe.exports=IIt;var zwe="\0SLASH"+Math.random()+"\0",$we="\0OPEN"+Math.random()+"\0",k3="\0CLOSE"+Math.random()+"\0",Wwe="\0COMMA"+Math.random()+"\0",Gwe="\0PERIOD"+Math.random()+"\0";function P3(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function AIt(e){return e.split("\\\\").join(zwe).split("\\{").join($we).split("\\}").join(k3).split("\\,").join(Wwe).split("\\.").join(Gwe)}function OIt(e){return e.split(zwe).join("\\").split($we).join("{").split(k3).join("}").split(Wwe).join(",").split(Gwe).join(".")}function Vwe(e){if(!e)return[""];var t=[],r=Hwe("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var a=Vwe(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function IIt(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),wh(AIt(e),!0).map(OIt)):[]}function RIt(e){return"{"+e+"}"}function NIt(e){return/^-?0\d/.test(e)}function qIt(e,t){return e<=t}function PIt(e,t){return e>=t}function wh(e,t){var r=[],n=Hwe("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),o=i||s,a=n.body.indexOf(",")>=0;if(!o&&!a)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+k3+n.post,wh(e)):[e];var u;if(o)u=n.body.split(/\.\./);else if(u=Vwe(n.body),u.length===1&&(u=wh(u[0],!1).map(RIt),u.length===1)){var f=n.post.length?wh(n.post,!1):[""];return f.map(function(D){return n.pre+u[0]+D})}var c=n.pre,f=n.post.length?wh(n.post,!1):[""],p;if(o){var d=P3(u[0]),m=P3(u[1]),v=Math.max(u[0].length,u[1].length),_=u.length==3?Math.abs(P3(u[2])):1,b=qIt,y=m<d;y&&(_*=-1,b=PIt);var T=u.some(NIt);p=[];for(var S=d;b(S,m);S+=_){var E;if(s)E=String.fromCharCode(S),E==="\\"&&(E="");else if(E=String(S),T){var C=v-E.length;if(C>0){var I=new Array(C+1).join("0");S<0?E="-"+I+E.slice(1):E=I+E}}p.push(E)}}else p=TIt(u,function(R){return wh(R,!1)});for(var q=0;q<p.length;q++)for(var B=0;B<f.length;B++){var M=c+p[q]+f[B];(!t||o||M)&&r.push(M)}return r}});var Q1=g((iur,eEe)=>{eEe.exports=cs;cs.Minimatch=$n;var kv=function(){try{return require("path")}catch{}}()||{sep:"/"};cs.sep=kv.sep;var F3=cs.GLOBSTAR=$n.GLOBSTAR={},kIt=Xwe(),Ywe={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},D3="[^/]",L3=D3+"*?",DIt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",LIt="(?:(?!(?:\\/|^)\\.).)*?",Jwe=FIt("().*{}+?[]^$\\!");function FIt(e){return e.split("").reduce(function(t,r){return t[r]=!0,t},{})}var Zwe=/\/+/;cs.filter=MIt;function MIt(e,t){return t=t||{},function(r,n,i){return cs(r,e,t)}}function Dc(e,t){t=t||{};var r={};return Object.keys(e).forEach(function(n){r[n]=e[n]}),Object.keys(t).forEach(function(n){r[n]=t[n]}),r}cs.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return cs;var t=cs,r=function(i,s,o){return t(i,s,Dc(e,o))};return r.Minimatch=function(i,s){return new t.Minimatch(i,Dc(e,s))},r.Minimatch.defaults=function(i){return t.defaults(Dc(e,i)).Minimatch},r.filter=function(i,s){return t.filter(i,Dc(e,s))},r.defaults=function(i){return t.defaults(Dc(e,i))},r.makeRe=function(i,s){return t.makeRe(i,Dc(e,s))},r.braceExpand=function(i,s){return t.braceExpand(i,Dc(e,s))},r.match=function(n,i,s){return t.match(n,i,Dc(e,s))},r};$n.defaults=function(e){return cs.defaults(e).Minimatch};function cs(e,t,r){return Z1(t),r||(r={}),!r.nocomment&&t.charAt(0)==="#"?!1:new $n(t,r).match(e)}function $n(e,t){if(!(this instanceof $n))return new $n(e,t);Z1(e),t||(t={}),e=e.trim(),!t.allowWindowsEscape&&kv.sep!=="/"&&(e=e.split(kv.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}$n.prototype.debug=function(){};$n.prototype.make=BIt;function BIt(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(Zwe)}),this.debug(this.pattern,r),r=r.map(function(n,i,s){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}$n.prototype.parseNegate=jIt;function jIt(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}cs.braceExpand=function(e,t){return Qwe(e,t)};$n.prototype.braceExpand=Qwe;function Qwe(e,t){return t||(this instanceof $n?t=this.options:t={}),e=typeof e>"u"?this.pattern:e,Z1(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:kIt(e)}var UIt=1024*64,Z1=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>UIt)throw new TypeError("pattern is too long")};$n.prototype.parse=HIt;var J1={};function HIt(e,t){Z1(e);var r=this.options;if(e==="**")if(r.noglobstar)e="*";else return F3;if(e==="")return"";var n="",i=!!r.nocase,s=!1,o=[],a=[],u,c=!1,f=-1,p=-1,d=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function v(){if(u){switch(u){case"*":n+=L3,i=!0;break;case"?":n+=D3,i=!0;break;default:n+="\\"+u;break}m.debug("clearStateChar %j %j",u,n),u=!1}}for(var _=0,b=e.length,y;_<b&&(y=e.charAt(_));_++){if(this.debug("%s %s %s %j",e,_,n,y),s&&Jwe[y]){n+="\\"+y,s=!1;continue}switch(y){case"/":return!1;case"\\":v(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,_,n,y),c){this.debug(" in class"),y==="!"&&_===p+1&&(y="^"),n+=y;continue}m.debug("call clearStateChar %j",u),v(),u=y,r.noext&&v();continue;case"(":if(c){n+="(";continue}if(!u){n+="\\(";continue}o.push({type:u,start:_-1,reStart:n.length,open:Ywe[u].open,close:Ywe[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(c||!o.length){n+="\\)";continue}v(),i=!0;var T=o.pop();n+=T.close,T.type==="!"&&a.push(T),T.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|",s=!1;continue}v(),n+="|";continue;case"[":if(v(),c){n+="\\"+y;continue}c=!0,p=_,f=n.length,n+=y;continue;case"]":if(_===p+1||!c){n+="\\"+y,s=!1;continue}var S=e.substring(p+1,_);try{RegExp("["+S+"]")}catch{var E=this.parse(S,J1);n=n.substr(0,f)+"\\["+E[0]+"\\]",i=i||E[1],c=!1;continue}i=!0,c=!1,n+=y;continue;default:v(),s?s=!1:Jwe[y]&&!(y==="^"&&c)&&(n+="\\"),n+=y}}for(c&&(S=e.substr(p+1),E=this.parse(S,J1),n=n.substr(0,f)+"\\["+E[0],i=i||E[1]),T=o.pop();T;T=o.pop()){var C=n.slice(T.reStart+T.open.length);this.debug("setting tail",n,T),C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(ge,be,We){return We||(We="\\"),be+be+We+"|"}),this.debug(`tail=%j
|
|
233
|
+
`,p.message,p.stack);var d=new Error("tunneling socket could not be established, cause="+p.message);d.code="ECONNRESET",t.request.emit("error",d),n.removeSocket(i)}};la.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createConnection(n)}};function ewe(e,t){var r=this;la.prototype.createSocket.call(r,e,function(n){var i=LOt.connect(0,twe({},r.options,{servername:e.host,socket:n}));r.sockets[r.sockets.indexOf(n)]=i,t(i)})}function twe(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if(typeof n=="object")for(var i=Object.keys(n),s=0,o=i.length;s<o;++s){var a=i[s];n[a]!==void 0&&(e[a]=n[a])}}return e}var xf;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?xf=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:xf=function(){};_h.debug=xf});var swe=g((zar,iwe)=>{"use strict";var WOt=require("url"),nwe=Zbe(),GOt=n4(),VOt=rwe(),KOt=t4();iwe.exports=(e,t)=>{if(e=e||nwe(),t=Object.assign({},t),typeof e=="object"&&(t=e,e=nwe()),!e)return null;e=GOt.lenient(e)?KOt(e):WOt.parse(e);let r=t.protocol==="https"?"https":"http",n=e.protocol==="https:"?"Https":"Http",i=e.port||(n==="Https"?443:80),s=`${r}Over${n}`;return delete t.protocol,VOt[s](Object.assign({proxy:{port:i,host:e.hostname,proxyAuth:e.auth}},t))}});var uwe=g(($ar,awe)=>{"use strict";var K1=require("path"),XOt=lF(),E3=pF(),YOt=dF(),JOt=100,owe=/[\u0000-\u001f\u0080-\u009f]/g,ZOt=/^\.+/,S3=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");t=t||{};let r=t.replacement===void 0?"!":t.replacement;if(E3().test(r)&&owe.test(r))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(E3(),r),e=e.replace(owe,r),e=e.replace(ZOt,r),r.length>0&&(e=XOt(e,r),e=e.length>1?YOt(e,r):e),e=E3.windowsNames().test(e)?e+r:e,e=e.slice(0,JOt),e};S3.path=(e,t)=>(e=K1.resolve(e),K1.join(K1.dirname(e),S3(K1.basename(e),t)));awe.exports=S3});var lwe=g((War,cwe)=>{"use strict";var QOt=require("stream").PassThrough;cwe.exports=e=>{e=Object.assign({},e);let t=e.array,r=e.encoding,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let s=0,o=[],a=new QOt({objectMode:i});return r&&a.setEncoding(r),a.on("data",u=>{o.push(u),i?s=o.length:s+=u.length}),a.getBufferedValue=()=>t?o:n?Buffer.concat(o,s):o.join(""),a.getBufferedLength=()=>s,a}});var fwe=g((Gar,X1)=>{"use strict";var eIt=lwe();function C3(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t=Object.assign({maxBuffer:1/0},t);let r=t.maxBuffer,n,i,s=new Promise((o,a)=>{let u=c=>{c&&(c.bufferedData=n.getBufferedValue()),a(c)};n=eIt(t),e.once("error",u),e.pipe(n),n.on("data",()=>{n.getBufferedLength()>r&&a(new Error("maxBuffer exceeded"))}),n.once("error",u),n.on("end",o),i=()=>{e.unpipe&&e.unpipe(n)}});return s.then(i,i),s.then(()=>n.getBufferedValue())}X1.exports=C3;X1.exports.buffer=(e,t)=>C3(e,Object.assign({},t,{encoding:"buffer"}));X1.exports.array=(e,t)=>C3(e,Object.assign({},t,{array:!0}))});var T3=g((Var,dwe)=>{"use strict";var pwe=(e,t)=>function(){let r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(o,a){if(t.multiArgs){let u=new Array(arguments.length-1);for(let c=1;c<arguments.length;c++)u[c-1]=arguments[c];o?(u.unshift(o),s(u)):i(u)}else o?s(o):i(a)}):n.push(function(o){if(t.multiArgs){let a=new Array(arguments.length-1);for(let u=0;u<arguments.length;u++)a[u]=arguments[u];i(a)}else i(o)}),e.apply(this,n)})};dwe.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=i=>{let s=o=>typeof o=="string"?i===o:o.test(i);return t.include?t.include.some(s):!t.exclude.some(s)},n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):pwe(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(let i in e){let s=e[i];n[i]=typeof s=="function"&&r(i)?pwe(s,t):s}return n}});var vwe=g((Kar,A3)=>{"use strict";var tIt=require("fs"),yf=require("path"),hwe=T3(),mwe={mode:511&~process.umask(),fs:tIt},gwe=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(yf.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}};A3.exports=(e,t)=>Promise.resolve().then(()=>{gwe(e),t=Object.assign({},mwe,t);let r=hwe(t.fs.mkdir),n=hwe(t.fs.stat),i=s=>r(s,t.mode).then(()=>s).catch(o=>{if(o.code==="ENOENT"){if(o.message.includes("null bytes")||yf.dirname(s)===s)throw o;return i(yf.dirname(s)).then(()=>i(s))}return n(s).then(a=>a.isDirectory()?s:Promise.reject()).catch(()=>{throw o})});return i(yf.resolve(e))});A3.exports.sync=(e,t)=>{gwe(e),t=Object.assign({},mwe,t);let r=n=>{try{t.fs.mkdirSync(n,t.mode)}catch(i){if(i.code==="ENOENT"){if(i.message.includes("null bytes")||yf.dirname(n)===n)throw i;return r(yf.dirname(n)),r(n)}try{if(!t.fs.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}return n};return r(yf.resolve(e))}});var ywe=g((Xar,xwe)=>{"use strict";var Y1=e=>[...e].map(t=>t.charCodeAt(0)),rIt=Y1("META-INF/mozilla.rsa"),nIt=Y1("[Content_Types].xml"),iIt=Y1("_rels/.rels");xwe.exports=e=>{let t=e instanceof Uint8Array?e:new Uint8Array(e);if(!(t&&t.length>1))return null;let r=(i,s)=>{s=Object.assign({offset:0},s);for(let o=0;o<i.length;o++)if(s.mask){if(i[o]!==(s.mask[o]&t[o+s.offset]))return!1}else if(i[o]!==t[o+s.offset])return!1;return!0},n=(i,s)=>r(Y1(i),s);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(rIt,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(n("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(n("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(n("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};if(r(nIt,{offset:30})||r(iIt,{offset:30})){let i=t.subarray(4,2004),s=a=>a.findIndex((u,c,f)=>f[c]===80&&f[c+1]===75&&f[c+2]===3&&f[c+3]===4),o=s(i);if(o!==-1){let a=t.subarray(o+8,o+8+1e3),u=s(a);if(u!==-1){let c=8+o+u+30;if(n("word/",{offset:c}))return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(n("ppt/",{offset:c}))return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(n("xl/",{offset:c}))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}}}}if(r([80,75])&&(t[2]===3||t[2]===5||t[2]===7)&&(t[3]===4||t[3]===6||t[3]===8))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(t[6]===0||t[6]===1))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){let i=t.subarray(4,4100),s=i.findIndex((o,a,u)=>u[a]===66&&u[a+1]===130);if(s!==-1){let o=s+3,a=u=>[...u].every((c,f)=>i[o+f]===c.charCodeAt(0));if(a("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(a("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/x-msvideo"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/x-wav"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let i=0;i<2&&i<t.length-16;i++){if(r([73,68,51],{offset:i})||r([255,226],{offset:i,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:i,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:i,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:i,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32]))return{ext:"m4a",mime:"audio/m4a"};if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((t[0]===67||t[0]===70)&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/octet-stream"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77,0]))return{ext:"aif",mime:"audio/aiff"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([102,116,121,112],{offset:4})){if(r([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(r([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(r([104,101,105,99],{offset:8})||r([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(r([104,101,118,99],{offset:8})||r([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return r([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:null}});var Twe=g((Yar,Cwe)=>{"use strict";var sIt=require("fs"),qv=require("path"),Swe=require("url"),_we=swe(),oIt=lL(),bwe=fL(),wwe=cF(),aIt=uwe(),uIt=fwe(),cIt=l4(),lIt=vwe(),fIt=T3(),pIt=I4(),dIt=ywe(),hIt=q4(),mIt=fIt(sIt),gIt=e=>qv.basename(Swe.parse(e.requestUrl).pathname),vIt=e=>{let t=e.headers["content-type"];if(!t)return null;let r=hIt.mime(t);return r.length!==1?null:r[0].ext},xIt=(e,t)=>{let r=e.headers["content-disposition"];if(r){let i=oIt.parse(r);if(i.parameters&&i.parameters.filename)return i.parameters.filename}let n=gIt(e);if(!qv.extname(n)){let i=(dIt(t)||{}).ext||vIt(e);i&&(n=`${n}.${i}`)}return n},Ewe=e=>{let{protocol:t}=Swe.parse(e);return t&&(t=t.slice(0,-1)),t};Cwe.exports=(e,t,r)=>{typeof t=="object"&&(r=t,t=null);let n=Ewe(e);r=Object.assign({encoding:null,rejectUnauthorized:process.env.npm_config_strict_ssl!=="false"},r);let i=_we(r.proxy,{protocol:n}),s=cIt.stream(e,Object.assign({agent:i},r)).on("redirect",(a,u)=>{let c=Ewe(u.href);c&&c!==n&&(u.agent=_we(r.proxy,{protocol:c}))}),o=pIt(s,"response").then(a=>{let u=r.encoding===null?"buffer":r.encoding;return Promise.all([uIt(s,{encoding:u}),a])}).then(a=>{let[u,c]=a;if(!t)return r.extract&&bwe(u)?wwe(u,r):u;let f=r.filename||aIt(xIt(c,u)),p=qv.join(t,f);return r.extract&&bwe(u)?wwe(u,qv.dirname(p),r):lIt(qv.dirname(p)).then(()=>mIt.writeFile(p,u)).then(()=>u)});return s.then=o.then.bind(o),s.catch=o.catch.bind(o),s}});var Iwe=g((Jar,Owe)=>{var Awe=require("child_process").spawn;Owe.exports=function(e,t,r,n){typeof r=="function"&&(n=r,r=null),r=r||{};var i=r.git||"git",s=["clone"];r.shallow&&(s.push("--depth"),s.push("1")),s.push("--"),s.push(e),s.push(t);var o=Awe(i,s);o.on("close",function(u){u==0?r.checkout?a():n&&n():n&&n(new Error("'git clone' failed with status "+u))});function a(){var u=["checkout",r.checkout],c=Awe(i,u,{cwd:t});c.on("close",function(f){f==0?n&&n():n&&n(new Error("'git checkout' failed with status "+f))})}}});var Rwe=g(O3=>{var _f=require("path"),Pc=process.platform==="win32",qc=require("fs"),yIt=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function _It(){var e;if(yIt){var t=new Error;e=r}else e=n;return e;function r(i){i&&(t.message=i.message,i=t,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function bIt(e){return typeof e=="function"?e:_It()}var Zar=_f.normalize;Pc?vu=/(.*?)(?:[\/\\]+|$)/g:vu=/(.*?)(?:[\/]+|$)/g;var vu;Pc?Pv=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:Pv=/^[\/]*/;var Pv;O3.realpathSync=function(t,r){if(t=_f.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];var n=t,i={},s={},o,a,u,c;f();function f(){var b=Pv.exec(t);o=b[0].length,a=b[0],u=b[0],c="",Pc&&!s[u]&&(qc.lstatSync(u),s[u]=!0)}for(;o<t.length;){vu.lastIndex=o;var p=vu.exec(t);if(c=a,a+=p[0],u=c+p[1],o=vu.lastIndex,!(s[u]||r&&r[u]===u)){var d;if(r&&Object.prototype.hasOwnProperty.call(r,u))d=r[u];else{var m=qc.lstatSync(u);if(!m.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var v=null;if(!Pc){var _=m.dev.toString(32)+":"+m.ino.toString(32);i.hasOwnProperty(_)&&(v=i[_])}v===null&&(qc.statSync(u),v=qc.readlinkSync(u)),d=_f.resolve(c,v),r&&(r[u]=d),Pc||(i[_]=v)}t=_f.resolve(d,t.slice(o)),f()}}return r&&(r[n]=t),t};O3.realpath=function(t,r,n){if(typeof n!="function"&&(n=bIt(r),r=null),t=_f.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return process.nextTick(n.bind(null,null,r[t]));var i=t,s={},o={},a,u,c,f;p();function p(){var b=Pv.exec(t);a=b[0].length,u=b[0],c=b[0],f="",Pc&&!o[c]?qc.lstat(c,function(y){if(y)return n(y);o[c]=!0,d()}):process.nextTick(d)}function d(){if(a>=t.length)return r&&(r[i]=t),n(null,t);vu.lastIndex=a;var b=vu.exec(t);return f=u,u+=b[0],c=f+b[1],a=vu.lastIndex,o[c]||r&&r[c]===c?process.nextTick(d):r&&Object.prototype.hasOwnProperty.call(r,c)?_(r[c]):qc.lstat(c,m)}function m(b,y){if(b)return n(b);if(!y.isSymbolicLink())return o[c]=!0,r&&(r[c]=c),process.nextTick(d);if(!Pc){var T=y.dev.toString(32)+":"+y.ino.toString(32);if(s.hasOwnProperty(T))return v(null,s[T],c)}qc.stat(c,function(S){if(S)return n(S);qc.readlink(c,function(E,C){Pc||(s[T]=C),v(E,C)})})}function v(b,y,T){if(b)return n(b);var S=_f.resolve(f,y);r&&(r[T]=S),_(S)}function _(b){t=_f.resolve(b,t.slice(a)),p()}}});var q3=g((eur,kwe)=>{kwe.exports=kc;kc.realpath=kc;kc.sync=N3;kc.realpathSync=N3;kc.monkeypatch=EIt;kc.unmonkeypatch=SIt;var bh=require("fs"),I3=bh.realpath,R3=bh.realpathSync,wIt=process.version,Nwe=/^v[0-5]\./.test(wIt),qwe=Rwe();function Pwe(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function kc(e,t,r){if(Nwe)return I3(e,t,r);typeof t=="function"&&(r=t,t=null),I3(e,t,function(n,i){Pwe(n)?qwe.realpath(e,t,r):r(n,i)})}function N3(e,t){if(Nwe)return R3(e,t);try{return R3(e,t)}catch(r){if(Pwe(r))return qwe.realpathSync(e,t);throw r}}function EIt(){bh.realpath=kc,bh.realpathSync=N3}function SIt(){bh.realpath=I3,bh.realpathSync=R3}});var Lwe=g((tur,Dwe)=>{Dwe.exports=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);CIt(i)?r.push.apply(r,i):r.push(i)}return r};var CIt=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var Uwe=g((rur,jwe)=>{"use strict";jwe.exports=Mwe;function Mwe(e,t,r){e instanceof RegExp&&(e=Fwe(e,r)),t instanceof RegExp&&(t=Fwe(t,r));var n=Bwe(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function Fwe(e,t){var r=t.match(e);return r?r[0]:null}Mwe.range=Bwe;function Bwe(e,t,r){var n,i,s,o,a,u=r.indexOf(e),c=r.indexOf(t,u+1),f=u;if(u>=0&&c>0){if(e===t)return[u,c];for(n=[],s=r.length;f>=0&&!a;)f==u?(n.push(f),u=r.indexOf(e,f+1)):n.length==1?a=[n.pop(),c]:(i=n.pop(),i<s&&(s=i,o=c),c=r.indexOf(t,f+1)),f=u<c&&u>=0?u:c;n.length&&(a=[s,o])}return a}});var Xwe=g((nur,Kwe)=>{var TIt=Lwe(),Hwe=Uwe();Kwe.exports=IIt;var zwe="\0SLASH"+Math.random()+"\0",$we="\0OPEN"+Math.random()+"\0",k3="\0CLOSE"+Math.random()+"\0",Wwe="\0COMMA"+Math.random()+"\0",Gwe="\0PERIOD"+Math.random()+"\0";function P3(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function AIt(e){return e.split("\\\\").join(zwe).split("\\{").join($we).split("\\}").join(k3).split("\\,").join(Wwe).split("\\.").join(Gwe)}function OIt(e){return e.split(zwe).join("\\").split($we).join("{").split(k3).join("}").split(Wwe).join(",").split(Gwe).join(".")}function Vwe(e){if(!e)return[""];var t=[],r=Hwe("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var a=Vwe(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function IIt(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),wh(AIt(e),!0).map(OIt)):[]}function RIt(e){return"{"+e+"}"}function NIt(e){return/^-?0\d/.test(e)}function qIt(e,t){return e<=t}function PIt(e,t){return e>=t}function wh(e,t){var r=[],n=Hwe("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),o=i||s,a=n.body.indexOf(",")>=0;if(!o&&!a)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+k3+n.post,wh(e)):[e];var u;if(o)u=n.body.split(/\.\./);else if(u=Vwe(n.body),u.length===1&&(u=wh(u[0],!1).map(RIt),u.length===1)){var f=n.post.length?wh(n.post,!1):[""];return f.map(function(D){return n.pre+u[0]+D})}var c=n.pre,f=n.post.length?wh(n.post,!1):[""],p;if(o){var d=P3(u[0]),m=P3(u[1]),v=Math.max(u[0].length,u[1].length),_=u.length==3?Math.abs(P3(u[2])):1,b=qIt,y=m<d;y&&(_*=-1,b=PIt);var T=u.some(NIt);p=[];for(var S=d;b(S,m);S+=_){var E;if(s)E=String.fromCharCode(S),E==="\\"&&(E="");else if(E=String(S),T){var C=v-E.length;if(C>0){var I=new Array(C+1).join("0");S<0?E="-"+I+E.slice(1):E=I+E}}p.push(E)}}else p=TIt(u,function(R){return wh(R,!1)});for(var q=0;q<p.length;q++)for(var B=0;B<f.length;B++){var M=c+p[q]+f[B];(!t||o||M)&&r.push(M)}return r}});var Q1=g((iur,eEe)=>{eEe.exports=cs;cs.Minimatch=$n;var kv=function(){try{return require("path")}catch{}}()||{sep:"/"};cs.sep=kv.sep;var F3=cs.GLOBSTAR=$n.GLOBSTAR={},kIt=Xwe(),Ywe={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},D3="[^/]",L3=D3+"*?",DIt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",LIt="(?:(?!(?:\\/|^)\\.).)*?",Jwe=FIt("().*{}+?[]^$\\!");function FIt(e){return e.split("").reduce(function(t,r){return t[r]=!0,t},{})}var Zwe=/\/+/;cs.filter=MIt;function MIt(e,t){return t=t||{},function(r,n,i){return cs(r,e,t)}}function Dc(e,t){t=t||{};var r={};return Object.keys(e).forEach(function(n){r[n]=e[n]}),Object.keys(t).forEach(function(n){r[n]=t[n]}),r}cs.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return cs;var t=cs,r=function(i,s,o){return t(i,s,Dc(e,o))};return r.Minimatch=function(i,s){return new t.Minimatch(i,Dc(e,s))},r.Minimatch.defaults=function(i){return t.defaults(Dc(e,i)).Minimatch},r.filter=function(i,s){return t.filter(i,Dc(e,s))},r.defaults=function(i){return t.defaults(Dc(e,i))},r.makeRe=function(i,s){return t.makeRe(i,Dc(e,s))},r.braceExpand=function(i,s){return t.braceExpand(i,Dc(e,s))},r.match=function(n,i,s){return t.match(n,i,Dc(e,s))},r};$n.defaults=function(e){return cs.defaults(e).Minimatch};function cs(e,t,r){return Z1(t),r||(r={}),!r.nocomment&&t.charAt(0)==="#"?!1:new $n(t,r).match(e)}function $n(e,t){if(!(this instanceof $n))return new $n(e,t);Z1(e),t||(t={}),e=e.trim(),!t.allowWindowsEscape&&kv.sep!=="/"&&(e=e.split(kv.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}$n.prototype.debug=function(){};$n.prototype.make=BIt;function BIt(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(n){return n.split(Zwe)}),this.debug(this.pattern,r),r=r.map(function(n,i,s){return n.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}$n.prototype.parseNegate=jIt;function jIt(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}cs.braceExpand=function(e,t){return Qwe(e,t)};$n.prototype.braceExpand=Qwe;function Qwe(e,t){return t||(this instanceof $n?t=this.options:t={}),e=typeof e>"u"?this.pattern:e,Z1(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:kIt(e)}var UIt=1024*64,Z1=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>UIt)throw new TypeError("pattern is too long")};$n.prototype.parse=HIt;var J1={};function HIt(e,t){Z1(e);var r=this.options;if(e==="**")if(r.noglobstar)e="*";else return F3;if(e==="")return"";var n="",i=!!r.nocase,s=!1,o=[],a=[],u,c=!1,f=-1,p=-1,d=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function v(){if(u){switch(u){case"*":n+=L3,i=!0;break;case"?":n+=D3,i=!0;break;default:n+="\\"+u;break}m.debug("clearStateChar %j %j",u,n),u=!1}}for(var _=0,b=e.length,y;_<b&&(y=e.charAt(_));_++){if(this.debug("%s %s %s %j",e,_,n,y),s&&Jwe[y]){n+="\\"+y,s=!1;continue}switch(y){case"/":return!1;case"\\":v(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,_,n,y),c){this.debug(" in class"),y==="!"&&_===p+1&&(y="^"),n+=y;continue}m.debug("call clearStateChar %j",u),v(),u=y,r.noext&&v();continue;case"(":if(c){n+="(";continue}if(!u){n+="\\(";continue}o.push({type:u,start:_-1,reStart:n.length,open:Ywe[u].open,close:Ywe[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(c||!o.length){n+="\\)";continue}v(),i=!0;var T=o.pop();n+=T.close,T.type==="!"&&a.push(T),T.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|",s=!1;continue}v(),n+="|";continue;case"[":if(v(),c){n+="\\"+y;continue}c=!0,p=_,f=n.length,n+=y;continue;case"]":if(_===p+1||!c){n+="\\"+y,s=!1;continue}var S=e.substring(p+1,_);try{RegExp("["+S+"]")}catch{var E=this.parse(S,J1);n=n.substr(0,f)+"\\["+E[0]+"\\]",i=i||E[1],c=!1;continue}i=!0,c=!1,n+=y;continue;default:v(),s?s=!1:Jwe[y]&&!(y==="^"&&c)&&(n+="\\"),n+=y}}for(c&&(S=e.substr(p+1),E=this.parse(S,J1),n=n.substr(0,f)+"\\["+E[0],i=i||E[1]),T=o.pop();T;T=o.pop()){var C=n.slice(T.reStart+T.open.length);this.debug("setting tail",n,T),C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(ge,we,We){return We||(We="\\"),we+we+We+"|"}),this.debug(`tail=%j
|
|
234
234
|
%s`,C,C,T,n);var I=T.type==="*"?L3:T.type==="?"?D3:"\\"+T.type;i=!0,n=n.slice(0,T.reStart)+I+"\\("+C}v(),s&&(n+="\\\\");var q=!1;switch(n.charAt(0)){case"[":case".":case"(":q=!0}for(var B=a.length-1;B>-1;B--){var M=a[B],R=n.slice(0,M.reStart),D=n.slice(M.reStart,M.reEnd-8),N=n.slice(M.reEnd-8,M.reEnd),Y=n.slice(M.reEnd);N+=Y;var oe=R.split("(").length-1,H=Y;for(_=0;_<oe;_++)H=H.replace(/\)[+*?]?/,"");Y=H;var U="";Y===""&&t!==J1&&(U="$");var ee=R+D+Y+U+N;n=ee}if(n!==""&&i&&(n="(?=.)"+n),q&&(n=d+n),t===J1)return[n,i];if(!i)return $It(e);var Q=r.nocase?"i":"";try{var pe=new RegExp("^"+n+"$",Q)}catch{return new RegExp("$.")}return pe._glob=e,pe._src=n,pe}cs.makeRe=function(e,t){return new $n(e,t||{}).makeRe()};$n.prototype.makeRe=zIt;function zIt(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?L3:t.dot?DIt:LIt,n=t.nocase?"i":"",i=e.map(function(s){return s.map(function(o){return o===F3?r:typeof o=="string"?WIt(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}cs.match=function(e,t,r){r=r||{};var n=new $n(t,r);return e=e.filter(function(i){return n.match(i)}),n.options.nonull&&!e.length&&e.push(t),e};$n.prototype.match=function(t,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;var n=this.options;kv.sep!=="/"&&(t=t.split(kv.sep).join("/")),t=t.split(Zwe),this.debug(this.pattern,"split",t);var i=this.set;this.debug(this.pattern,"set",i);var s,o;for(o=t.length-1;o>=0&&(s=t[o],!s);o--);for(o=0;o<i.length;o++){var a=i[o],u=t;n.matchBase&&a.length===1&&(u=[s]);var c=this.matchOne(u,a,r);if(c)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};$n.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,a=t.length;i<o&&s<a;i++,s++){this.debug("matchOne loop");var u=t[s],c=e[i];if(this.debug(t,u,c),u===!1)return!1;if(u===F3){this.debug("GLOBSTAR",[t,u,c]);var f=i,p=s+1;if(p===a){for(this.debug("** at the end");i<o;i++)if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return!1;return!0}for(;f<o;){var d=e[f];if(this.debug(`
|
|
235
235
|
globstar while`,e,f,t,p,d),this.matchOne(e.slice(f),t.slice(p),r))return this.debug("globstar found match!",f,o,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,f,t,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(r&&(this.debug(`
|
|
236
236
|
>>> no match, partial?`,e,f,t,p),f===o))}var m;if(typeof u=="string"?(m=c===u,this.debug("string match",u,c,m)):(m=c.match(u),this.debug("pattern match",u,c,m)),!m)return!1}if(i===o&&s===a)return!0;if(i===o)return r;if(s===a)return i===o-1&&e[i]==="";throw new Error("wtf?")};function $It(e){return e.replace(/\\(.)/g,"$1")}function WIt(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var tC=g((sur,eC)=>{"use strict";function tEe(e){return e.charAt(0)==="/"}function rEe(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=!!(n&&n.charAt(1)!==":");return!!(r[2]||i)}eC.exports=process.platform==="win32"?rEe:tEe;eC.exports.posix=tEe;eC.exports.win32=rEe});var B3=g(Lc=>{Lc.setopts=JIt;Lc.ownProp=nEe;Lc.makeAbs=Dv;Lc.finish=ZIt;Lc.mark=QIt;Lc.isIgnored=sEe;Lc.childrenIgnored=eRt;function nEe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var GIt=require("fs"),Eh=require("path"),VIt=Q1(),iEe=tC(),M3=VIt.Minimatch;function KIt(e,t){return e.localeCompare(t,"en")}function XIt(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(YIt))}function YIt(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new M3(r,{dot:!0})}return{matcher:new M3(e,{dot:!0}),gmatcher:t}}function JIt(e,t,r){if(r||(r={}),r.matchBase&&t.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=r.strict!==!1,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0),e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.fs=r.fs||GIt,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),XIt(e,r),e.changedCwd=!1;var n=process.cwd();nEe(r,"cwd")?(e.cwd=Eh.resolve(r.cwd),e.changedCwd=e.cwd!==n):e.cwd=n,e.root=r.root||Eh.resolve(e.cwd,"/"),e.root=Eh.resolve(e.root),process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=iEe(e.cwd)?e.cwd:Dv(e,e.cwd),process.platform==="win32"&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!1,e.minimatch=new M3(t,r),e.options=e.minimatch.options}function ZIt(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[n];t?r.push(o):r[o]=!0}}else{var a=Object.keys(s);t?r.push.apply(r,a):a.forEach(function(u){r[u]=!0})}}if(t||(r=Object.keys(r)),e.nosort||(r=r.sort(KIt)),e.mark){for(var n=0;n<r.length;n++)r[n]=e._mark(r[n]);e.nodir&&(r=r.filter(function(u){var c=!/\/$/.test(u),f=e.cache[u]||e.cache[Dv(e,u)];return c&&f&&(c=f!=="DIR"&&!Array.isArray(f)),c}))}e.ignore.length&&(r=r.filter(function(u){return!sEe(e,u)})),e.found=r}function QIt(e,t){var r=Dv(e,t),n=e.cache[r],i=t;if(n){var s=n==="DIR"||Array.isArray(n),o=t.slice(-1)==="/";if(s&&!o?i+="/":!s&&o&&(i=i.slice(0,-1)),i!==t){var a=Dv(e,i);e.statCache[a]=e.statCache[r],e.cache[a]=e.cache[r]}}return i}function Dv(e,t){var r=t;return t.charAt(0)==="/"?r=Eh.join(e.root,t):iEe(t)||t===""?r=t:e.changedCwd?r=Eh.resolve(e.cwd,t):r=Eh.resolve(t),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function sEe(e,t){return e.ignore.length?e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))}):!1}function eRt(e,t){return e.ignore.length?e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))}):!1}});var lEe=g((lur,cEe)=>{cEe.exports=uEe;uEe.GlobSync=pn;var tRt=q3(),oEe=Q1(),aur=oEe.Minimatch,uur=H3().Glob,cur=require("util"),j3=require("path"),aEe=require("assert"),rC=tC(),bf=B3(),rRt=bf.setopts,U3=bf.ownProp,nRt=bf.childrenIgnored,iRt=bf.isIgnored;function uEe(e,t){if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
@@ -285,7 +285,7 @@ ${s}`)}}});var hHt,Ske=se(()=>{"use strict";Wr();hHt=async e=>{e.user&&e.user.is
|
|
|
285
285
|
|
|
286
286
|
Install @ampt/cloud to allow it to run on Ampt, or migrate
|
|
287
287
|
your project to use the Ampt SDK.
|
|
288
|
-
`),e.logQuestion("Install @ampt/cloud?"),await e.confirm(!0)&&(e.viewSpinner("Installing @ampt/cloud"),await t.installDependency("@ampt/cloud"),e.logInfo("Installed @ampt/cloud")),e.logInfo("Check out the Ampt migration guide for more info:"),e.logUrl("https://getampt.com/docs/migrate-serverless-cloud/"))),n.astro?n["@ampt/astro"]:n.next&&(n["@ampt/nextjs"]||(e.logInfo("This looks like a NextJS project."),e.logQuestion("Install @ampt/nextjs?"),await e.confirm(!0)&&(e.viewSpinner("Installing @ampt/nextjs"),await t.installDependency("@ampt/nextjs"),e.logInfo("Installed @ampt/nextjs")),e.logInfo("For more information on running NextJS on Ampt, check out the docs:"),e.logUrl("https://www.getampt.com/docs/frameworks/next"))),t.nodeModulesInstalled===!1){let i=t.servicePackageManager;e.viewSpinner(`[${i}] Installing dependencies`);try{await t.installDependenciesIfExists(),e.logInfo("Installed project dependencies")}catch(s){e.logWarning("Failed to install dependencies"),e.logError(s)}}}var Fke,eB=se(()=>{"use strict";Fke=ve(require("assert"));Wr()});var wHt,Mke=se(()=>{"use strict";Wr();wHt=async e=>{var C;e.viewSpinner("Loading");let t=new lt({session:e.session});if(await t.read(),!t.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");let{user:r}=e,n=e.options.overwrite,i=r.username,s=((C=e.args)==null?void 0:C[0])||`${i}-${Math.random().toString(36).substr(2,5)}`,o=e.options.app||t.serviceFile.ampt.app,a=e.options.org||t.serviceFile.ampt.org;a||(a=await e.selectOrg(r)),e.viewSpinner("Loading");let u=new Ht({orgName:a});await u.isAuthorized()||(e.logError(`You don't have access to the "${a}" org.`),a=await e.selectOrg(r)),u.update({orgName:a});let c=new er({org:u,serviceName:o}),p=(await c.listInstances()).find(I=>I.instanceName===s);if(p&&p.instanceType!=="preview")throw new Error(`You cannot overwrite an existing ${p.instanceType} environment.`);if(p&&!n&&(e.logInfo("This preview environment already exists. Are you sure you want to overwrite it?"),n=await e.confirm(),!n))if(e.isShellActive){await e.logCancelled();return}else await e.quit();let d=r.username,m=new xr({org:u,service:c,instanceName:d}),[v,_,b,y]=await Promise.all([c.get().catch(()=>({serviceName:o})),u.fetch(),p?m.get().catch(()=>{}):void 0,u.getRegions()]),T=await e.selectRegion({orgInfo:_,instanceInfo:b,serviceInfo:v,regions:y});if(!T)return e.logWarning("Deployment cancelled.");let S=new is({fs:t,org:u,service:c,instance:m,fullSync:e.options["full-sync"],cli:e});e.viewSpinner(`Creating new preview environment ${s} (${T.name})`,{timer:!0}),e.updateSpinnerStep("syncing"),await S.sync();let E=new xr({org:u,service:c,instanceName:s});if(i!==s){let{operationId:I}=await c.copy({sourceInstanceName:i,targetInstanceName:s,copyCode:!0,copyData:!0,copyStorage:!0,instanceType:"preview",region:T.code}),{success:q,message:B}=await e.messenger.waitForOperation({operationId:I,context:e,orgName:a,appName:o});if(B&&(q?e.logInfo(B):e.logError(B)),!q){e.logError("Share command failed"),e.setExitCode(1);return}}await E.get(),e.logSuccess(`Successfully created preview environment ${e.styles.bold(s)} (${T.name}).`),e.logUrl(E.url)}});var $C,EHt,Bke,jke=se(()=>{"use strict";$C=ve(require("path"));Wr();Sr();UP();Js();EHt=async(e,t)=>{var p,d,m,v;e.viewSpinner("Loading");let r=jP(e),n=e.user,i=(p=e.options)==null?void 0:p.org,s=(d=e.options)==null?void 0:d.app,o=(m=e.options)==null?void 0:m.template,a=t||new lt({session:e.session});i||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),i=await e.selectOrg(n),Ce.debug({orgName:i},"selected org")),e.viewSpinner("Loading");let u=new Ht({orgName:i});await u.isAuthorized()||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),e.logError(`You don't have access to the "${i}" org.`),i=await e.selectOrg(n)),u.update({orgName:i});let c,f=!1;if(!s){if(e.viewSpinner("Loading"),(await u.listServices()).map(b=>b.serviceName).length===0||e.options.template)c=!0;else{rr({eventName:"AnalyticEvent.DevPrompt",eventData:{promptName:"createOrClone"}});let b=await a.readJsonFileIfExists($C.default.join(a.serviceRoot,"package.json"));if(b&&!(b!=null&&b.ampt))f=!0;else if(!b){if(e.logError("No package.json file found in this directory!"),e.logQuestion("Do you want to create a new app?"),!await e.confirm()){await e.quit();return}c=!0}}if(f)s=await e.promptServiceName(e.isGitPod?o:$C.default.basename(a.serviceRoot)),e.viewSpinner(`Migrating ${s} to ampt`),await a.initService({orgName:i,serviceName:s,templateName:o,existingProject:!0}),e.viewSpinner("Installing dependencies"),await a.installDependenciesIfExists();else if(c){if(!o){e.viewSpinner("Loading"),rr({eventName:"ampt.dev.prompt",eventData:{promptName:"template"}});let b=await r;Ce.trace({coreTemplates:b},"templates list"),e.logInfo("Please choose an app template to generate in this directory."),o=(await e.select(b)).name}if(s=await e.promptServiceName(e.isGitPod?o:$C.default.basename(a.serviceRoot)),Ce.trace({serviceName:s},"entered service name"),!e.isWebIde&&!await a.isCwdEmpty())if(e.logInfo(`This directory is not empty. Would you like to make a new subdirectory ./${s}?`),await e.confirm())a.createServiceDir(s),await a.read({orgName:i});else{await e.quit();return}e.viewSpinner("Generating app files"),await a.initService({orgName:i,serviceName:s,templateName:o}),e.viewSpinner("Installing dependencies"),await a.installDependenciesIfExists(),e.logSuccess(`Successfully generated app ${(v=e.styles)==null?void 0:v.bold(s)} in this directory.`)}else await a.initService({orgName:i,existingProject:!0});(c||f)&&e.logInfo("Join our Discord! https://getampt.com/discord"),e.logSpace()}},Bke=EHt});function tB(e){(async()=>{let{orgName:t,serviceName:r,instanceName:n}=e;try{await ze({method:"POST",body:e,endpoint:`/orgs/${t}/services/${r}/instances/${n}/metrics`})}catch(i){sr.captureException(i),process.env.AMPT_DEBUG&&console.error(i)}})()}var Uke=se(()=>{"use strict";Sr();co()});var Hke,zke,Cu,$ke,WC,SHt,CHt,THt,Wke=se(()=>{"use strict";Hke=ve(require("path")),zke=ve(require("os")),Cu=ve(Vp()),$ke=ve(require("assert"));Wr();Sr();jke();eB();Uke();WC=(e,t)=>Hke.default.join(zke.default.homedir(),".serverless",`cloud_shell_activity_${e}_${t}.json`),SHt=async(e,t)=>{try{let r=JSON.parse(await(0,Cu.readFile)(WC(e,t),"utf8"));if(HP(r.pid))return r;(0,Cu.removeSync)(WC(e,t))}catch{return!1}},CHt=async(e,t)=>{let r=WC(e,t);(0,Cu.ensureFileSync)(r),(0,Cu.writeFileSync)(r,JSON.stringify({pid:process.pid},null,4))},THt=async e=>{var oe,H,U,ee,Q,pe,ge;e.isGitPod&&e.options.initial?await Fl(1e4):e.isGitPod&&!e.options.initial&&(e.isAnimationEnabled=e.options.animation!==!1),e.viewSpinner("Loading");let t=new lt({session:e.session,syncNodeModules:e.options.syncNodeModules,verbose:e.options.verbose??!1});await t.read();let r=await t.detectOutdatedAmptDependencies();r.length&&!e.fromClone&&(e._printOutOfDatePackages(r),e.logSpace(),e.logQuestion("Would you like to update them now?"),await e.confirm(!0)?await t.updateOutdatedAmptDependencies(e,r):(e.logInfo("Skipping package updates"),e.logWarning("You may experience issues using outdated @ampt packages.")));let n=e.options.seed||e.options.s,i=e.options.reseed||e.options.rs,s,o=null,a=e.user;if(!a)throw new Error("User not found");if(!a.orgs||!a.orgs.length)throw new Error("No orgs found for user");e.isAnimationEnabled=e.options.animation!==!1,t.serviceFile||(await Bke(e,t),t.dataFile&&(n=!0)),await QM(e),s=e.options.org||((H=(oe=t.serviceFile)==null?void 0:oe.ampt)==null?void 0:H.org),s&&!a.hasAccessToOrg(s)&&(e.logWarning(`Org "${s}" has either been deleted or you no longer have access to it.`),s=void 0);let u=e.options.app||((ee=(U=t.serviceFile)==null?void 0:U.ampt)==null?void 0:ee.app);s||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),s=await e.selectOrg(a),await t.writeServiceFile({orgName:s})),e.viewSpinner("Authorizing"),(0,$ke.default)(!!s,"orgName is required");let c=new Ht({orgName:s});Ce.info({org:e.org},"org set"),await c.isAuthorized()||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),e.logError(`You don't have access to the "${s}" org.`),s=await e.selectOrg(a)),e.viewSpinner("Starting"),c.update({orgName:s}),u||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"service"}}),u=await e.promptServiceName((Q=t.defaults)==null?void 0:Q.app),e.viewSpinner("Saving"),await t.writeServiceFile({serviceName:u}));let f=a.username,p=new er({org:c,serviceName:u}),d=new xr({org:c,service:p,instanceName:f,cli:e}),[m,v,_,b]=await Promise.all([d.get().catch(()=>{}),p.get().catch(()=>{}),c.fetch(),c.getRegions()]),y=await e.selectRegion({orgInfo:_,serviceInfo:v,instanceInfo:m,regions:b});if(!y){e.logError("No region selected."),await e.quit();return}d.region=y.code,e.viewSpinner("Connecting to your personal sandbox environment...");let T=process.hrtime.bigint();await SHt(s,u)&&(e.logError(`The Ampt shell for app "${u}" in org "${s}" is already running in another terminal.`),await e.quit("Shell already running")),await CHt(s,u),e.bindService({orgName:s,serviceName:u}),e.onQuit(async()=>{(0,Cu.removeSync)(WC(s,u)),await vi.stop(e,{hasQuit:!0,orgName:s,serviceName:u});let be=await t.readJsonFileIfExists(t.serviceFilePath),We=process.hrtime.bigint();o==null||o.close(),rr({eventName:"ampt.dev.ended",eventData:{source:e.isGitPod?"gitpod":"local",timeInSeconds:Number(We-T)/1e9,dependencies:Object.keys((be==null?void 0:be.dependencies)||{}),appName:`${s}:${u}`}})});let E=new is({fs:t,org:c,service:p,instance:d,user:a,fullSync:e.options["full-sync"],cli:e,verbose:e.options.verbose}),C=new Sc({fs:t,org:c,service:p,instance:d});e.viewSpinner("Syncing");let I=be=>e.viewSpinner(`Syncing (${be})`),q=await E.sync(void 0,I).catch(be=>{if(be.name==="ValidationError"||be.name==="AppLimitReachedError"||be.name==="EnvironmentLimitReachedError")return e.quit(be.message);throw be});tB({...q,source:e.isGitPod?"gitpod":"local",orgName:s,serviceName:p.serviceName,instanceName:d.instanceName,appName:`${s}:${u}`,region:d.region}),e.viewSpinner("Connecting to real time logs");let[B]=await Promise.all([d.connect({cli:e}),e.messenger.subscribe({orgName:s,appName:u,instanceName:f})]);o=B,e.logSuccess(`Connected to your personal sandbox of ${(pe=e.styles)==null?void 0:pe.blue(u)} app`),e.logUrl(d.url),e.logSpace(),e.logInfo("View your app in the dashboard");let M=`${process.env.AMPT_DASHBOARD_URL_ROOT}/orgs/${s}/apps/${u}/environments/${f}`;if(e.logUrl(M),i&&e.logSuccess("Enabled automatic data reseeding"),e.viewInput(),e.options.dev){let{url:be,region:We}=d,{credentials:et,env:tt}=E;vi.start({credentials:et,env:tt,url:be,cli:e,fs:t,user:a,scriptName:"dev",ifPresent:!1,orgName:s,serviceName:u,region:We}).catch(xt=>{Ce.error({err:xt},"Error starting dev server"),e.logError("Something went wrong starting the dev server.")})}rr({eventName:"ampt.dev.enabled",eventData:{dependencies:Object.keys(((ge=t.serviceFile)==null?void 0:ge.dependencies)||{}),appName:`${s}:${u}`}});let R=async()=>{var be;e.viewSpinner("Seeding"),await C.import(),e.logSuccess(`Seeded data from the ${(be=e.styles)==null?void 0:be.bold(t.dataFileName)} file.`),e.viewInput()};n&&await R();let D=!1,N=!1,Y=new Set;return t.watch(E.workspaceRoot,be=>{(async()=>{for(let et of be)Y.add(et);let We=await vi.isRunning({orgName:s,serviceName:u});if(e.isCommandRunningInShell&&!We&&(Ce.trace("waiting for command to finish"),await e.commandRunningInShellPromise,Ce.trace("command finished")),D){Ce.trace("sync in progress, skipping");return}for(D=!0;Y.size>0;){let et=Y;Y=new Set,i&&t.dataFilePath&&et.has(t.dataFilePath)&&(e.viewSpinner("Seeding",{timer:!0}),await R()),(!e.isCommandRunningInShell||We)&&e.spinInput(),Ce.trace({size:et.size,queued:Y.size},"starting sync");let tt=await E.sync(et);Ce.trace({size:et.size,queued:Y.size},"sync complete"),tB({...tt,source:e.isGitPod?"gitpod":"local",orgName:s,serviceName:p.serviceName,instanceName:d.instanceName,appName:`${s}:${u}`,region:d.region})}D=!1,Ce.trace("sync callback complete"),N||(e.logSuccess(`Successfully updated your code in ${gd(e.timer)}.`),N=!0),(!e.isCommandRunningInShell||We)&&e.stopSpinningInput()})().catch(We=>{Ce.error({err:We},"Error syncing code"),e.logError("Something went wrong syncing your code. Please try again.")})}),null}});var AHt,Gke=se(()=>{"use strict";Wr();AHt=async e=>{e.viewSpinner("Loading");let t=new lt({session:e.session});if(await t.read(),!t.serviceFile||!t.serviceFile.ampt||!t.serviceFile.ampt.app||!t.serviceFile.ampt.org){e.logInfo("This command must be run inside a service directory.");return}let{org:r,app:n}=t.serviceFile.ampt;if(!await vi.isRunning({orgName:r,serviceName:n})){e.logInfo(`There's no dev server running for app "${n}" in org "${r}" at the moment.`);return}await vi.stop(e,{orgName:r,serviceName:n}),e.logSuccess(`Successfully stopped the dev server for app "${n}" in org "${r}".`)}});var OHt,Vke=se(()=>{"use strict";Sr();Wr();Js();OHt=async e=>{e.viewSpinner("Loading");let t=new Mi,r=new lt({session:e.session});if(await r.read(),!r.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");let n=e.options.org||r.serviceFile.ampt.org,i=e.options.service||r.serviceFile.ampt.app||r.serviceFile.ampt.service,s=e.isShellActive?e.user.username:`test-${Math.random().toString(36).substring(2,7)}`;n||(n=await e.selectOrg(t)),e.viewSpinner("Loading");let o=new Ht({orgName:n});await o.isAuthorized()||(e.logError(`You don't have access to the "${n}" org.`),n=await e.selectOrg(t)),o.update({orgName:n}),e.isShellActive||e.viewSpinner(`Starting test stage (${s})`);let a=new er({org:o,serviceName:i}),u=new xr({org:o,service:a,instanceType:"test",instanceName:s,cli:e});e.isShellActive||(await new is({fs:r,org:o,service:a,instance:u,fullSync:e.options["full-sync"],cli:e}).sync(),e.logSuccess(`Test instance started: ${u.url}`)),await u.get();let c=await u.connect({cli:e});try{e.viewSpinner("Running tests");let f=e.options.coverage||e.options.collectCoverage,p=e.args[0],d=e.options.workers,{timeout:m=3e5}=await u.test({coverage:f,pattern:p,workers:d}),v=await(c==null?void 0:c.waitForEvent({eventType:"ampt.test.completed",timeout:m+5e3}));nK(e,v),v.data.coverage&&v.data.coverage.length&&f&&(e.viewSpinner("Collecting test coverage report"),await u.downloadTestCoverage(r.serviceRoot),e.logSuccess("Coverage report saved")),process.exitCode=v.data.results&&v.data.results.success?0:1}catch(f){e.logError(f)}e.isShellActive||(c==null||c.close(),e.viewSpinner("Deleting instance"),await u.delete(),e.logSuccess("Test instance deleted"),e.log(`Exiting with status code ${process.exitCode}`))}});var IHt,Kke=se(()=>{"use strict";Wr();IHt=async e=>{var n;let t=new lt({session:e.session});if(await t.read(),!t.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");if(e.args.length===0){e.logInfo("Please enter the name of the npm package you want to uninstall.");let i=await e.prompt("type a package name");e.args.push(i)}let r=t.servicePackageManager;e.args.length===1?e.viewSpinner(`[${r}] Uninstalling ${e.args[0]}`):e.args.length>1&&e.viewSpinner(`[${r}] Uninstalling ${String(e.args.length)} packages`);try{let i=e.argv.includes("--dev");i&&(e.argv=e.argv.filter(s=>s!=="--dev")),await t.removeDependency(e.argv.slice(1),i),e.args.length===1?e.logSuccess(`Successfully uninstalled the ${(n=e.styles)==null?void 0:n.bold(e.args[0])} package.`):e.args.length>1&&e.logSuccess(`Successfully uninstalled ${String(e.args.length)} packages.`)}catch(i){e.session.captureException(i);let s=i.stdBuffer.toString();throw new Error(`Failed to uninstall due to the following error:
|
|
288
|
+
`),e.logQuestion("Install @ampt/cloud?"),await e.confirm(!0)&&(e.viewSpinner("Installing @ampt/cloud"),await t.installDependency("@ampt/cloud"),e.logInfo("Installed @ampt/cloud")),e.logInfo("Check out the Ampt migration guide for more info:"),e.logUrl("https://getampt.com/docs/migrate-serverless-cloud/"))),n.astro?n["@ampt/astro"]:n.next&&(n["@ampt/nextjs"]||(e.logInfo("This looks like a NextJS project."),e.logQuestion("Install @ampt/nextjs?"),await e.confirm(!0)&&(e.viewSpinner("Installing @ampt/nextjs"),await t.installDependency("@ampt/nextjs"),e.logInfo("Installed @ampt/nextjs")),e.logInfo("For more information on running NextJS on Ampt, check out the docs:"),e.logUrl("https://www.getampt.com/docs/frameworks/next"))),t.nodeModulesInstalled===!1){let i=t.servicePackageManager;e.viewSpinner(`[${i}] Installing dependencies`);try{await t.installDependenciesIfExists(),e.logInfo("Installed project dependencies")}catch(s){e.logWarning("Failed to install dependencies"),e.logError(s)}}}var Fke,eB=se(()=>{"use strict";Fke=ve(require("assert"));Wr()});var wHt,Mke=se(()=>{"use strict";Wr();wHt=async e=>{var C;e.viewSpinner("Loading");let t=new lt({session:e.session});if(await t.read(),!t.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");let{user:r}=e,n=e.options.overwrite,i=r.username,s=((C=e.args)==null?void 0:C[0])||`${i}-${Math.random().toString(36).substr(2,5)}`,o=e.options.app||t.serviceFile.ampt.app,a=e.options.org||t.serviceFile.ampt.org;a||(a=await e.selectOrg(r)),e.viewSpinner("Loading");let u=new Ht({orgName:a});await u.isAuthorized()||(e.logError(`You don't have access to the "${a}" org.`),a=await e.selectOrg(r)),u.update({orgName:a});let c=new er({org:u,serviceName:o}),p=(await c.listInstances()).find(I=>I.instanceName===s);if(p&&p.instanceType!=="preview")throw new Error(`You cannot overwrite an existing ${p.instanceType} environment.`);if(p&&!n&&(e.logInfo("This preview environment already exists. Are you sure you want to overwrite it?"),n=await e.confirm(),!n))if(e.isShellActive){await e.logCancelled();return}else await e.quit();let d=r.username,m=new xr({org:u,service:c,instanceName:d}),[v,_,b,y]=await Promise.all([c.get().catch(()=>({serviceName:o})),u.fetch(),p?m.get().catch(()=>{}):void 0,u.getRegions()]),T=await e.selectRegion({orgInfo:_,instanceInfo:b,serviceInfo:v,regions:y});if(!T)return e.logWarning("Deployment cancelled.");let S=new is({fs:t,org:u,service:c,instance:m,fullSync:e.options["full-sync"],cli:e});e.viewSpinner(`Creating new preview environment ${s} (${T.name})`,{timer:!0}),e.updateSpinnerStep("syncing"),await S.sync();let E=new xr({org:u,service:c,instanceName:s});if(i!==s){let{operationId:I}=await c.copy({sourceInstanceName:i,targetInstanceName:s,copyCode:!0,copyData:!0,copyStorage:!0,instanceType:"preview",region:T.code}),{success:q,message:B}=await e.messenger.waitForOperation({operationId:I,context:e,orgName:a,appName:o});if(B&&(q?e.logInfo(B):e.logError(B)),!q){e.logError("Share command failed"),e.setExitCode(1);return}}await E.get(),e.logSuccess(`Successfully created preview environment ${e.styles.bold(s)} (${T.name}).`),e.logUrl(E.url)}});var $C,EHt,Bke,jke=se(()=>{"use strict";$C=ve(require("path"));Wr();Sr();UP();Js();EHt=async(e,t)=>{var p,d,m,v;e.viewSpinner("Loading");let r=jP(e),n=e.user,i=(p=e.options)==null?void 0:p.org,s=(d=e.options)==null?void 0:d.app,o=(m=e.options)==null?void 0:m.template,a=t||new lt({session:e.session});i||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),i=await e.selectOrg(n),Ce.debug({orgName:i},"selected org")),e.viewSpinner("Loading");let u=new Ht({orgName:i});await u.isAuthorized()||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),e.logError(`You don't have access to the "${i}" org.`),i=await e.selectOrg(n)),u.update({orgName:i});let c,f=!1;if(!s){if(e.viewSpinner("Loading"),(await u.listServices()).map(b=>b.serviceName).length===0||e.options.template)c=!0;else{rr({eventName:"AnalyticEvent.DevPrompt",eventData:{promptName:"createOrClone"}});let b=await a.readJsonFileIfExists($C.default.join(a.serviceRoot,"package.json"));if(b&&!(b!=null&&b.ampt))f=!0;else if(!b){if(e.logError("No package.json file found in this directory!"),e.logQuestion("Do you want to create a new app?"),!await e.confirm()){await e.quit();return}c=!0}}if(f)s=await e.promptServiceName(e.isGitPod?o:$C.default.basename(a.serviceRoot)),e.viewSpinner(`Migrating ${s} to ampt`),await a.initService({orgName:i,serviceName:s,templateName:o,existingProject:!0}),e.viewSpinner("Installing dependencies"),await a.installDependenciesIfExists();else if(c){if(!o){e.viewSpinner("Loading"),rr({eventName:"ampt.dev.prompt",eventData:{promptName:"template"}});let b=await r;Ce.trace({coreTemplates:b},"templates list"),e.logInfo("Please choose an app template to generate in this directory."),o=(await e.select(b)).name}if(s=await e.promptServiceName(e.isGitPod?o:$C.default.basename(a.serviceRoot)),Ce.trace({serviceName:s},"entered service name"),!e.isWebIde&&!await a.isCwdEmpty())if(e.logInfo(`This directory is not empty. Would you like to make a new subdirectory ./${s}?`),await e.confirm())a.createServiceDir(s),await a.read({orgName:i});else{await e.quit();return}e.viewSpinner("Generating app files"),await a.initService({orgName:i,serviceName:s,templateName:o}),e.viewSpinner("Installing dependencies"),await a.installDependenciesIfExists(),e.logSuccess(`Successfully generated app ${(v=e.styles)==null?void 0:v.bold(s)} in this directory.`)}else await a.initService({orgName:i,existingProject:!0});(c||f)&&e.logInfo("Join our Discord! https://getampt.com/discord"),e.logSpace()}},Bke=EHt});function tB(e){(async()=>{let{orgName:t,serviceName:r,instanceName:n}=e;try{await ze({method:"POST",body:e,endpoint:`/orgs/${t}/services/${r}/instances/${n}/metrics`})}catch(i){sr.captureException(i),process.env.AMPT_DEBUG&&console.error(i)}})()}var Uke=se(()=>{"use strict";Sr();co()});var Hke,zke,Cu,$ke,WC,SHt,CHt,THt,Wke=se(()=>{"use strict";Hke=ve(require("path")),zke=ve(require("os")),Cu=ve(Vp()),$ke=ve(require("assert"));Wr();Sr();jke();eB();Uke();WC=(e,t)=>Hke.default.join(zke.default.homedir(),".serverless",`cloud_shell_activity_${e}_${t}.json`),SHt=async(e,t)=>{try{let r=JSON.parse(await(0,Cu.readFile)(WC(e,t),"utf8"));if(HP(r.pid))return r;(0,Cu.removeSync)(WC(e,t))}catch{return!1}},CHt=async(e,t)=>{let r=WC(e,t);(0,Cu.ensureFileSync)(r),(0,Cu.writeFileSync)(r,JSON.stringify({pid:process.pid},null,4))},THt=async e=>{var oe,H,U,ee,Q,pe,ge;e.isGitPod&&e.options.initial?await Fl(1e4):e.isGitPod&&!e.options.initial&&(e.isAnimationEnabled=e.options.animation!==!1),e.viewSpinner("Loading");let t=new lt({session:e.session,syncNodeModules:e.options.syncNodeModules,verbose:e.options.verbose??!1});await t.read();let r=await t.detectOutdatedAmptDependencies();r.length&&!e.fromClone&&(e._printOutOfDatePackages(r),e.logSpace(),e.logQuestion("Would you like to update them now?"),await e.confirm(!0)?await t.updateOutdatedAmptDependencies(e,r):(e.logInfo("Skipping package updates"),e.logWarning("You may experience issues using outdated @ampt packages.")));let n=e.options.seed||e.options.s,i=e.options.reseed||e.options.rs,s,o=null,a=e.user;if(!a)throw new Error("User not found");if(!a.orgs||!a.orgs.length)throw new Error("No orgs found for user");e.isAnimationEnabled=e.options.animation!==!1,t.serviceFile||(await Bke(e,t),t.dataFile&&(n=!0)),await QM(e),s=e.options.org||((H=(oe=t.serviceFile)==null?void 0:oe.ampt)==null?void 0:H.org),s&&!a.hasAccessToOrg(s)&&(e.logWarning(`Org "${s}" has either been deleted or you no longer have access to it.`),s=void 0);let u=e.options.app||((ee=(U=t.serviceFile)==null?void 0:U.ampt)==null?void 0:ee.app);s||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),s=await e.selectOrg(a),await t.writeServiceFile({orgName:s})),e.viewSpinner("Authorizing"),(0,$ke.default)(!!s,"orgName is required");let c=new Ht({orgName:s});Ce.info({org:e.org},"org set"),await c.isAuthorized()||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"org"}}),e.logError(`You don't have access to the "${s}" org.`),s=await e.selectOrg(a)),e.viewSpinner("Starting"),c.update({orgName:s}),u||(rr({eventName:"ampt.dev.prompt",eventData:{promptName:"service"}}),u=await e.promptServiceName((Q=t.defaults)==null?void 0:Q.app),e.viewSpinner("Saving"),await t.writeServiceFile({serviceName:u}));let f=a.username,p=new er({org:c,serviceName:u}),d=new xr({org:c,service:p,instanceName:f,cli:e}),[m,v,_,b]=await Promise.all([d.get().catch(()=>{}),p.get().catch(()=>{}),c.fetch(),c.getRegions()]),y=await e.selectRegion({orgInfo:_,serviceInfo:v,instanceInfo:m,regions:b});if(!y){e.logError("No region selected."),await e.quit();return}d.region=y.code,e.viewSpinner("Connecting to your personal sandbox environment...");let T=process.hrtime.bigint();await SHt(s,u)&&(e.logError(`The Ampt shell for app "${u}" in org "${s}" is already running in another terminal.`),await e.quit("Shell already running")),await CHt(s,u),e.bindService({orgName:s,serviceName:u}),e.onQuit(async()=>{(0,Cu.removeSync)(WC(s,u)),await vi.stop(e,{hasQuit:!0,orgName:s,serviceName:u});let we=await t.readJsonFileIfExists(t.serviceFilePath),We=process.hrtime.bigint();o==null||o.close(),rr({eventName:"ampt.dev.ended",eventData:{source:e.isGitPod?"gitpod":"local",timeInSeconds:Number(We-T)/1e9,dependencies:Object.keys((we==null?void 0:we.dependencies)||{}),appName:`${s}:${u}`}})});let E=new is({fs:t,org:c,service:p,instance:d,user:a,fullSync:e.options["full-sync"],cli:e,verbose:e.options.verbose}),C=new Sc({fs:t,org:c,service:p,instance:d});e.viewSpinner("Syncing");let I=we=>e.viewSpinner(`Syncing (${we})`),q=await E.sync(void 0,I).catch(we=>{if(we.name==="ValidationError")return e.quit(we.message);throw we});tB({...q,source:e.isGitPod?"gitpod":"local",orgName:s,serviceName:p.serviceName,instanceName:d.instanceName,appName:`${s}:${u}`,region:d.region}),e.viewSpinner("Connecting to real time logs");let[B]=await Promise.all([d.connect({cli:e}),e.messenger.subscribe({orgName:s,appName:u,instanceName:f})]);o=B,e.logSuccess(`Connected to your personal sandbox of ${(pe=e.styles)==null?void 0:pe.blue(u)} app`),e.logUrl(d.url),e.logSpace(),e.logInfo("View your app in the dashboard");let M=`${process.env.AMPT_DASHBOARD_URL_ROOT}/orgs/${s}/apps/${u}/environments/${f}`;if(e.logUrl(M),i&&e.logSuccess("Enabled automatic data reseeding"),e.viewInput(),e.options.dev){let{url:we,region:We}=d,{credentials:et,env:tt}=E;vi.start({credentials:et,env:tt,url:we,cli:e,fs:t,user:a,scriptName:"dev",ifPresent:!1,orgName:s,serviceName:u,region:We}).catch(xt=>{Ce.error({err:xt},"Error starting dev server"),e.logError("Something went wrong starting the dev server.")})}rr({eventName:"ampt.dev.enabled",eventData:{dependencies:Object.keys(((ge=t.serviceFile)==null?void 0:ge.dependencies)||{}),appName:`${s}:${u}`}});let R=async()=>{var we;e.viewSpinner("Seeding"),await C.import(),e.logSuccess(`Seeded data from the ${(we=e.styles)==null?void 0:we.bold(t.dataFileName)} file.`),e.viewInput()};n&&await R();let D=!1,N=!1,Y=new Set;return t.watch(E.workspaceRoot,we=>{(async()=>{for(let et of we)Y.add(et);let We=await vi.isRunning({orgName:s,serviceName:u});if(e.isCommandRunningInShell&&!We&&(Ce.trace("waiting for command to finish"),await e.commandRunningInShellPromise,Ce.trace("command finished")),D){Ce.trace("sync in progress, skipping");return}for(D=!0;Y.size>0;){let et=Y;Y=new Set,i&&t.dataFilePath&&et.has(t.dataFilePath)&&(e.viewSpinner("Seeding",{timer:!0}),await R()),(!e.isCommandRunningInShell||We)&&e.spinInput(),Ce.trace({size:et.size,queued:Y.size},"starting sync");let tt=await E.sync(et);Ce.trace({size:et.size,queued:Y.size},"sync complete"),tB({...tt,source:e.isGitPod?"gitpod":"local",orgName:s,serviceName:p.serviceName,instanceName:d.instanceName,appName:`${s}:${u}`,region:d.region})}D=!1,Ce.trace("sync callback complete"),N||(e.logSuccess(`Successfully updated your code in ${gd(e.timer)}.`),N=!0),(!e.isCommandRunningInShell||We)&&e.stopSpinningInput()})().catch(We=>{Ce.error({err:We},"Error syncing code"),e.logError("Something went wrong syncing your code. Please try again.")})}),null}});var AHt,Gke=se(()=>{"use strict";Wr();AHt=async e=>{e.viewSpinner("Loading");let t=new lt({session:e.session});if(await t.read(),!t.serviceFile||!t.serviceFile.ampt||!t.serviceFile.ampt.app||!t.serviceFile.ampt.org){e.logInfo("This command must be run inside a service directory.");return}let{org:r,app:n}=t.serviceFile.ampt;if(!await vi.isRunning({orgName:r,serviceName:n})){e.logInfo(`There's no dev server running for app "${n}" in org "${r}" at the moment.`);return}await vi.stop(e,{orgName:r,serviceName:n}),e.logSuccess(`Successfully stopped the dev server for app "${n}" in org "${r}".`)}});var OHt,Vke=se(()=>{"use strict";Sr();Wr();Js();OHt=async e=>{e.viewSpinner("Loading");let t=new Mi,r=new lt({session:e.session});if(await r.read(),!r.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");let n=e.options.org||r.serviceFile.ampt.org,i=e.options.service||r.serviceFile.ampt.app||r.serviceFile.ampt.service,s=e.isShellActive?e.user.username:`test-${Math.random().toString(36).substring(2,7)}`;n||(n=await e.selectOrg(t)),e.viewSpinner("Loading");let o=new Ht({orgName:n});await o.isAuthorized()||(e.logError(`You don't have access to the "${n}" org.`),n=await e.selectOrg(t)),o.update({orgName:n}),e.isShellActive||e.viewSpinner(`Starting test stage (${s})`);let a=new er({org:o,serviceName:i}),u=new xr({org:o,service:a,instanceType:"test",instanceName:s,cli:e});e.isShellActive||(await new is({fs:r,org:o,service:a,instance:u,fullSync:e.options["full-sync"],cli:e}).sync(),e.logSuccess(`Test instance started: ${u.url}`)),await u.get();let c=await u.connect({cli:e});try{e.viewSpinner("Running tests");let f=e.options.coverage||e.options.collectCoverage,p=e.args[0],d=e.options.workers,{timeout:m=3e5}=await u.test({coverage:f,pattern:p,workers:d}),v=await(c==null?void 0:c.waitForEvent({eventType:"ampt.test.completed",timeout:m+5e3}));nK(e,v),v.data.coverage&&v.data.coverage.length&&f&&(e.viewSpinner("Collecting test coverage report"),await u.downloadTestCoverage(r.serviceRoot),e.logSuccess("Coverage report saved")),process.exitCode=v.data.results&&v.data.results.success?0:1}catch(f){e.logError(f)}e.isShellActive||(c==null||c.close(),e.viewSpinner("Deleting instance"),await u.delete(),e.logSuccess("Test instance deleted"),e.log(`Exiting with status code ${process.exitCode}`))}});var IHt,Kke=se(()=>{"use strict";Wr();IHt=async e=>{var n;let t=new lt({session:e.session});if(await t.read(),!t.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");if(e.args.length===0){e.logInfo("Please enter the name of the npm package you want to uninstall.");let i=await e.prompt("type a package name");e.args.push(i)}let r=t.servicePackageManager;e.args.length===1?e.viewSpinner(`[${r}] Uninstalling ${e.args[0]}`):e.args.length>1&&e.viewSpinner(`[${r}] Uninstalling ${String(e.args.length)} packages`);try{let i=e.argv.includes("--dev");i&&(e.argv=e.argv.filter(s=>s!=="--dev")),await t.removeDependency(e.argv.slice(1),i),e.args.length===1?e.logSuccess(`Successfully uninstalled the ${(n=e.styles)==null?void 0:n.bold(e.args[0])} package.`):e.args.length>1&&e.logSuccess(`Successfully uninstalled ${String(e.args.length)} packages.`)}catch(i){e.session.captureException(i);let s=i.stdBuffer.toString();throw new Error(`Failed to uninstall due to the following error:
|
|
289
289
|
${s}`)}}});var RHt,Xke=se(()=>{"use strict";Wr();RHt=async e=>{e.viewSpinner("Loading");let t=new lt({session:e.session});if(await t.read(),!t.serviceFile)throw new Error("You must be inside an Ampt app directory to run this command.");let{user:r}=e,n=e.options.org||t.serviceFile.ampt.org,i=e.options.app||t.serviceFile.ampt.app,s=e.args[0]||r.username;n||(n=await e.selectOrg(r)),e.viewSpinner("Loading");let o=new Ht({orgName:n});await o.isAuthorized()||(e.logError(`You don't have access to the "${n}" org.`),n=await e.selectOrg(r)),o.update({orgName:n}),e.viewSpinner("Loading");let a=new er({org:o,serviceName:i}),u=new xr({org:o,service:a,instanceName:s});await u.get(),e.logUrl(u.url)}});var Yke,NHt,Jke=se(()=>{"use strict";Yke=ve(Kg()),NHt=async e=>{e.log(`v${Yke.version}`)}});var Zke={};Kf(Zke,{clone:()=>oHt,delete:()=>aHt,deploy:()=>uHt,docs:()=>cHt,export:()=>lHt,help:()=>fHt,import:()=>pHt,install:()=>dHt,login:()=>hHt,logout:()=>mHt,open:()=>gHt,promote:()=>vHt,run:()=>yHt,sandbox:()=>_Ht,serverless:()=>bHt,setup:()=>QM,share:()=>wHt,start:()=>THt,stop:()=>AHt,test:()=>OHt,uninstall:()=>IHt,url:()=>RHt,version:()=>NHt});var Qke=se(()=>{"use strict";mke();gke();vke();xke();yke();bke();wke();Eke();Ske();Cke();Tke();Ake();qke();Pke();Lke();eB();Mke();Wke();Gke();Vke();Kke();Xke();Jke()});var rB=ve(require("os")),$s=ve(B5()),eDe=ve(Q5()),ma=ve(NU()),tDe=ve(kU()),Nf=ve(LU()),rDe=ve(jU()),nB=ve($U()),nDe=ve(a9()),iB=ve(NI()),sB=ve(PI()),oB=require("child_process"),VC=ve(LV()),XC=ve(rR());Sr();Wr();XM();var GC=(Qke(),pt(Zke)),{version:Bh}=Kg(),KC=class{session;messenger;user;showLogo=!0;fromClone=!1;inputValue;timer;isShellActive;isInteractive;isDevServerActive;isAnimationEnabled=!1;isCommandRunningInShell;commandRunningInShellPromise;styles;icons;argv;startupOptions;options;args;names;command;orgName;org;service;serviceName;_exitCode=0;isGitPod=!1;isWebIde=!1;_allowedInputCharacter;_isLoggedTopPadding;_commandsHistory;_viewType;_viewMessage;_spinnerMessage;_spinnerStep;_isPromptActive;_promptResponse;_timerInterval;_spinnerInterval;_inputSpinnerInterval;_inputSpinnerStartedAt;_inputSpinnerStoppedAt;_tipsInterval;_tipsFrequency;_tipsCollectionIndex;_spinnerFrequency;_spinnerFrames;_spinnerFrameIndex;_selectItems;_selectedItemIndex;_selectedItem;_onQuit;_quitting;_suggestions;_commandsHistoryIndex;_devTipsCollection=["type `dev` to start running the dev server","type `stop` to stop a running dev server"];_cloudScriptsCollection=["add a `ampt:dev` script to package.json to run code within the Ampt context"];_tipsCollection=[];version=Bh;constructor(t){process.title="Ampt CLI",this.session=t,this.messenger=new Ih,this.messenger.on("offline",(0,sB.default)(()=>{this.logError("Event Messenger offline")},1e3,!0)),this.messenger.on("online",(0,sB.default)(()=>{this.logInfo("Event Messenger online")},1e3,!0)),this.inputValue="",this.startupOptions={},this.options={},this.args=[],this.argv=[],this.command=void 0,this.names=void 0,this.icons={},this.commandRunningInShellPromise=null,this._allowedInputCharacter=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ~!@#$%^&*()-_=+.<>{}[]"'/`,this._viewType=null,this._viewMessage=void 0,this._spinnerMessage=null,this._spinnerStep=null,this._isPromptActive=void 0,this._promptResponse=void 0,this._commandsHistory=[],this._spinnerFrequency=100,this._spinnerFrames=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],this._spinnerFrameIndex=0,this.showLogo=!process.env.IS_CHILD_PROCESS&&!this.isGitPod&&this._canRenderBolt(),this.styles={dim:ma.default.dim,darkPurple:ma.default.hex("#B367FF"),purple:ma.default.hex("#F952FF"),blue:ma.default.hex("#727aff"),red:ma.default.rgb(255,99,99),grey:ma.default.hex("#324f59"),pastel:ma.default.hex("#dbd8ca"),bold:ma.default.bold,green:ma.default.hex("#22b9b7")},this._initIcons(),this._initTips(),this._initSuggestions(),process.env.GITPOD_HOST&&process.env.GITPOD_IDE_ALIAS&&(this.isGitPod=!0,this.isWebIde=!0,this.isAnimationEnabled=!1),this.isInteractive=process.stdin.isTTY}async login(){return new Mi}setExitCode(t){this._exitCode=t}async start(t){let{_:r,...n}=(0,nB.default)(process.argv);return this.startupOptions=n,this.fromClone=(t==null?void 0:t.fromClone)||!1,this.run()}async run(t){try{if(this._parseCommand(t),this.command==="sandbox")return await GC.sandbox(this);this.isShellActive||(this._hideCursor(),this._logLogo(),this.viewSpinner("Loading"),await this._autoUpdate()),await this.messenger.connect(),this._watchKeyboard();let r=["clone"],n=["promote","test"];if(this.command==="start"&&(this.isShellActive=!0),this.isShellActive&&r.includes(this.command))throw new Rf(`Command "${this.command}" is currently not supported in the shell`);if(n.includes(this.command))throw new Rf(`Command "${this.command}" is not available while Ampt is in Private Beta.`);if(!GC[this.command])throw new Rf(`Command "${this.command}" is not a valid command`);if(!this.user&&(this.user=await Mi.init(),!this.user.isLoggedIn())){this.logInfo("You must login to proceeed.");try{await this.user.performLogin(this)}catch(i){if(i.name==="UserDisabledError")return this.logError(i.message||"Your account has been disabled. Please contact support."),this._stop(0);throw i}}await GC[this.command](this),this.options={}}catch(r){if(r instanceof Rf)this.logError(r.message);else return r instanceof Mh?(this.logError(r.message),this._stop(this._exitCode)):r.name==="InstancesLimitError"?this.quit("You have reached your environment limit. Please upgrade your plan or delete an environment."):r.name==="ServicesLimitError"?this.quit("You have reached your app limit. Please upgrade your plan or delete an app."):(this.logError(`Something went wrong - please contact support and provide ${this.session.getSessionId()} as a reference ID`),this.session.captureException(r),this._stop(1))}return this.isShellActive?this.viewInput():this._stop(this._exitCode)}viewInput(t=this._getTip()){this._timerInterval=clearInterval(this._timerInterval),this._spinnerInterval=clearInterval(this._spinnerInterval),this._startTips(),this._switchView({viewType:"input",viewMessage:t})}spinInput(){if(this._viewType!=="input"){Ce.error({_viewType:this._viewType},"wrong viewType in spinInput");return}this.isAnimationEnabled&&(this._inputSpinnerStartedAt=Date.now(),clearInterval(this._inputSpinnerInterval),this._inputSpinnerInterval=setInterval(()=>this.updateInputSpinner(),this._spinnerFrequency).unref())}viewSpinner(t="Loading",{timer:r=!1}={}){if(!this.isInteractive){console.log(t);return}if(!this.isAnimationEnabled){this._switchView({viewType:"spinner",viewMessage:t});return}this._spinnerMessage=t,this._spinnerStep="",clearInterval(this._timerInterval),clearInterval(this._spinnerInterval),clearInterval(this._inputSpinnerInterval),this._timerInterval=void 0,this._spinnerInterval=void 0,this._inputSpinnerInterval=void 0,r&&(this.timer=0,this._timerInterval=setInterval(()=>this.timer=+this.timer+1,1e3).unref()),this._spinnerInterval=setInterval(()=>this._updateSpinner((this._spinnerMessage||"Loading")+(this._spinnerStep?` (${this._spinnerStep})`:""),{timer:r}),this._spinnerFrequency).unref()}updateInputSpinner(){this._spinnerFrameIndex=++this._spinnerFrameIndex%this._spinnerFrames.length,this._switchView({viewType:"input"})}stopSpinningInput(){this._inputSpinnerInterval&&(clearInterval(this._inputSpinnerInterval),this._inputSpinnerStoppedAt=Date.now(),this._inputSpinnerInterval=void 0),this.viewInput()}updateSpinnerStep(t){if(!process.stdin.isTTY){console.log(t);return}this._spinnerStep=t}pause(){this._clearIntervals(),this._switchView({viewType:"pause"}),this._eraseCursorLineAndBelow()}async prompt(t,r={}){for(this._isPromptActive=!0,r.default&&(this.inputValue=r.default),this.viewInput(t);!this._promptResponse;)await Fl(50);let n=this._promptResponse;return this.logInfo(`You've entered ${this.styles.bold(n)}.`),this._promptResponse=null,this._isPromptActive=!1,n}async promptServiceName(t=null){this.logInfo("Please enter a name for your app.");let r=await this.prompt("type an app name",{default:t});return r.match(/^[a-z0-9-]+$/)?r:(this.logError("App name must consist only of lowercase characters and hyphens. Please try again."),await this.promptServiceName())}async confirm(t=!1){let r=["no","yes"],n=await this.select(t?r.reverse():r);return n==="yes"}async select(t=[],r=0){if(clearInterval(this._timerInterval),clearInterval(this._spinnerInterval),clearInterval(this._inputSpinnerInterval),this._timerInterval=void 0,this._spinnerInterval=void 0,this._inputSpinnerInterval=void 0,this._selectItems=t,this._selectedItemIndex=r,this._switchView({viewType:"select"}),this._selectItems.length===1)return this._selectedItem=this._selectItems[0],this._selectedItem;for(;!this._selectedItem;)await Fl(50);let n=this._selectedItem;return typeof n=="object"?this.logInfo(`You've selected ${this.styles.bold(n.title)}.`):this.logInfo(`You've selected ${this.styles.bold(n)}.`),this._selectedItem=null,this._selectedItemIndex=null,this._selectItems=[],n}async selectOrg(t,r){this.viewSpinner("Loading");let n,i=(t.orgs||[]).map(s=>s.orgName);return i.length>1?(this.logInfo(r||"Please select an organization."),n=await this.select(i)):n=i[0],n}async selectService(t,r){let n;this.viewSpinner("Loading");let i=(await t.listServicesWithInstances()).map(s=>s.serviceName);return Ce.debug({servicesList:i},"select service"),i.length>1?(this.logInfo(r||"Please select a service."),n=await this.select(i)):n=i[0],n}async selectInstance({service:t,instanceType:r,instanceName:n,message:i}){let o=(await(t==null?void 0:t.listInstances().catch(()=>[]))||[]).filter(c=>!r||c.instanceType===r).map(c=>({instanceName:c.instanceName,region:c.region,displayRegion:c.region||"",display:`${c.instanceName} (${c.region})`}));if(n)return o.find(c=>c.instanceName===n)||{instanceName:n,isNewInstance:!0};if(o.length===0)return{instanceName:void 0};this.logInfo(i||"Please select an instance.");let a=await this.select(o.map(c=>c.display));return{instanceName:o.find(c=>c.display===a).instanceName,isNewInstance:!1}}logSuccess(t,r=0){this.log(`${this.icons.tick} ${t}`,r)}logError(t,r=0){this.log(`${this.icons.cross} ${this.styles.purple(t)}`,r)}logCancelled(){this.logError("Cancelled")}logInfo(t,r=0){this.log(`${this.icons.info} ${t}`,r)}logWarning(t,r=0){this.log(`${this.icons.warning} ${t}`,r)}logQuestion(t,r=0){this.log(`${this.icons.question} ${t}`,r)}logUrl(t,r=0){this.log(`${this.icons.arrow} ${t}`,r)}logTime(t,r=0){this.log(`${this.styles.dim(`${new Date(Date.now()).toLocaleTimeString()} ${this.icons.line}`)} ${t}`,r)}log(t="",r=0){this._ensureTopPadding(),this._eraseCursorLineAndBelow(),this._log(`${" ".repeat(r)}${t}
|
|
290
290
|
`),this._view()}logSpace(){this.log(" ")}write(t=""){this._ensureTopPadding(),this._eraseCursorLineAndBelow(),this._log(t),this._view()}onQuit(t){this._onQuit=t}async quit(t="Stopped"){return this.inputValue="",this._clearIntervals(),this._quitting||this.logError(t),this._eraseCursorLineAndBelow(),!this._quitting&&this._onQuit&&(this._quitting=!0,await Qne(this._onQuit(),1e3)),this.isDevServerActive&&await vi.stop(this,{orgName:this.orgName,serviceName:this.serviceName}),this._stop()}devServerOn(){this.isDevServerActive=!0,this.viewInput()}devServerOff(){this.isDevServerActive=!1,this.viewInput()}bindService({orgName:t,serviceName:r}){this.orgName=t,this.serviceName=r}_switchView({viewType:t,viewMessage:r}){return t&&(this._viewType=t),typeof r<"u"&&(this._viewMessage=r),this._view()}_stop(t=0){this._clearIntervals(),process.stdin.pause(),this._eraseCursorLineAndBelow(),t===0&&this._log(`
|
|
291
291
|
`),this._showCursor();try{if(/^win/.test(process.platform))(0,oB.execSync)(`taskkill /PID ${process.pid} /T /F`);else try{process.kill(-process.pid,"SIGINT")}catch{process.kill(-process.ppid,"SIGINT")}}catch(r){Ce.debug({error:r.message},"process.kill failed"),process.env.SLS_DEBUG&&this._log(r.message)}process.exit(t)}_clearIntervals(){clearInterval(this._timerInterval),clearInterval(this._spinnerInterval),clearInterval(this._inputSpinnerInterval),clearInterval(this._tipsInterval),this._timerInterval=void 0,this._spinnerInterval=void 0,this._inputSpinnerInterval=void 0,this._tipsInterval=void 0}_parseCommand(t){var a,u;let r=t?sie(t):process.argv.slice(2),n=(0,nB.default)(r);this.command=(a=n._[0])==null?void 0:a.toLowerCase(),this.args=(u=n._)==null?void 0:u.slice(1);let{_:i,...s}=n;if(this.options=Object.assign({},this.startupOptions,s),this.argv=r,(this.options.help||this.options.h)&&(this.command="help"),(this.options.version||this.options.v)&&(this.command="version"),this.names=sK(this.args[0]),this.names.orgName=this.names.orgName||this.options.org,this.names.serviceName=this.names.serviceName||this.options.app,this.names.instanceName=this.names.instanceName||this.options.stage||this.options.instance,t==="start"&&delete GC.start,!t&&(!this.command||this.command==="start")&&(this.command="start"),this.command==="dev"&&(this.isShellActive?(this.args[0]=this.command,this.command="run"):(this.command="start",this.options.dev=!0)),this.command==="build"&&(this.args[0]=this.command,this.command="run"),this.command==="npm"&&(this.command=this.args[0],this.args.shift(),this.argv.shift()),this.command!=="clone")try{Ce.enable()}catch(c){console.error(c)}this.isAnimationEnabled=this.options.animation!==!1,Ce.debug({args:this.args},"cli args"),Ce.debug({...this.options},"cli options"),Ce.debug({...this.names},"cli names")}_logLogo(){if(!this.showLogo)return;let t=rB.default.EOL;t+="ampt ",t+=`${this.icons.bolt}`,process.env.AMPT_STAGE!=="prod"&&(t+=`(${process.env.AMPT_STAGE})`),t+=rB.default.EOL,this._log(t)}_log(t){process.stdout.write(t)}_showCursor(){this._log(Nf.default.cursorShow)}_hideCursor(){this._log(Nf.default.cursorHide)}_moveCursorLeft(){this._log(Nf.default.cursorLeft)}_moveCursorUp(t){this._log(Nf.default.cursorUp(t))}_eraseCursorLineAndBelow(){this._log(Nf.default.eraseDown)}_restorCursorPosition(t){let r=this._getRelativeVerticalCursorPosition(t);this._moveCursorUp(r),this._moveCursorLeft()}_getRelativeVerticalCursorPosition(t){let n=(0,rDe.default)(t).split(`
|
|
@@ -298,7 +298,7 @@ ${t}
|
|
|
298
298
|
`,t+=`${this.icons.pointer} ${n}
|
|
299
299
|
`,t+=` ${this.styles.grey(`${i}`)}`),t}_getPreviousItemIndex(){return this._selectedItemIndex===0?this._selectItems.length-1:this._selectedItemIndex-1}_getNextItemIndex(){return this._selectedItemIndex===this._selectItems.length-1?0:this._selectedItemIndex+1}_printOutOfDatePackages(t=[]){t.length&&(this.logWarning("The following @ampt packages are out of date:"),t.forEach(r=>{let n=this.styles.darkPurple(r.name),i=this.styles.green(r.latestVersion),s=this.styles.dim(`(${r.currentVersion} installed)`);this.log(`${n} ${i} ${s}`,3)}))}async _autoUpdate(){if(process.env.AMPT_SKIP_UPDATE==="true"||process.argv.slice(2).includes("--skip-update"))return;let r=(i,s)=>{var c;this.session.captureException(i);let o=s?((c=i.stdBuffer)==null?void 0:c.toString())||i.stack:"Fetching latest version timed out",a=VC.default?"npm install @ampt/cli --global":"npm install @ampt/cli --save-development",u=s?`v${s}`:"@latest";return this.logWarning(`The Ampt CLI auto-update failed due to the following error:
|
|
300
300
|
`),this.logError(o+`
|
|
301
|
-
`),this.logWarning(`You are currently running ${this.styles.purple(`v${Bh}`)}. To proceed, please manually update the CLI to the latest version (${this.styles.purple(`${u}`)}) by running the ${a} command.`),this.logWarning(`You can skip auto update by passing the ${this.styles.purple("--skip-update")} flag.`),this._stop(1)},n=await kw("@ampt/cli",15e3);if(!n)return r(new Error("Failed to fetch latest version"),n);if((0,XC.gt)(n,Bh)){if(!(0,XC.satisfies)(n,`^${Bh}`)
|
|
301
|
+
`),this.logWarning(`You are currently running ${this.styles.purple(`v${Bh}`)}. To proceed, please manually update the CLI to the latest version (${this.styles.purple(`${u}`)}) by running the ${a} command.`),this.logWarning(`You can skip auto update by passing the ${this.styles.purple("--skip-update")} flag.`),this._stop(1)},n=await kw("@ampt/cli",15e3);if(!n)return r(new Error("Failed to fetch latest version"),n);if((0,XC.gt)(n,Bh)){if(!(0,XC.satisfies)(n,`^${Bh}`))return this.logError(`A new major version of the Ampt CLI is available (v${n}). You are currently running v${Bh}. To proceed, please update your Ampt CLI to the latest version.`),this._stop(1);if(this.viewSpinner(`Updating CLI ${this.styles.dim("(this may take a few minutes)")}`),process.env.IS_CHILD_PROCESS){this.logError("Update installed, but your environment is still loading the outdated version. It is possible that a project scoped version of the Ampt CLI is being used");let{argv:i,platform:s}=process;return Ce.debug({argv:i,platform:s,__dirname,isRunningGlobally:VC.default},"auto update failed"),this._stop(1)}try{await(0,iB.default)("npm",["install","@ampt/cli",VC.default?"--global":"--save-development"]),this.logInfo(`CLI updated to v${n} ${this.styles.dim(`(was v${Bh})`)}`),process.stdin.pause(),this._clearIntervals(),await(0,iB.default)(process.argv.shift(),process.argv,{cwd:process.cwd(),env:{...process.env,IS_CHILD_PROCESS:!0},detached:!1,stdio:"inherit"}),process.exit()}catch(i){return r(i,n)}}}_watchKeyboard(){if((0,tDe.default)(process.stdin),process.stdin.listenerCount("keypress")>0)return process.stdin.resume();process.stdin.setMaxListeners(1),process.stdin.on("keypress",(r,n={})=>{(async()=>{if(this._shouldUpdateInputValue(r))return this._updateInputValue(r);if(await this._shouldStopDevServer(n))return await this._stopDevServer();if(this._shouldQuit(n))return await this.quit();if(this._shouldSubmitSelection(n))return await this._submitSelection();if(this._shouldSelectPrevious(n))return await this._selectPrevious();if(this._shouldSelectNext(n))return await this._selectNext();if(this._shouldSubmitPromptResponse(n))return await this._submitPromptResponse();if(this._shouldGetPreviousCommand(n))return await this._getPreviousCommand();if(this._shouldGetNextCommand(n))return await this._getNextCommand();if(this._shouldClearScreen(n))return this._clearScreen();if(this._shouldRunCommand(n))return await this._runCommand();if(this._shouldAutoComplete(n))return this._autoComplete();if(this._shouldDeleteLastWord(n))return this._deleteLastWord();if(this._shouldDeleteLastCharacter(n))return this._deleteLastCharacter();if(this._shouldClearInputValue(n))return this._clearInputValue()})().catch(i=>console.error(i))}),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume()}_shouldSubmitPromptResponse(t){return!!(t.name==="return"&&this.inputValue!==""&&this._isPromptActive)}_shouldSubmitSelection(t){return t.name==="return"&&this._viewType==="select"}_shouldRunCommand(t){return t.name==="return"&&this.inputValue!==""&&this._viewType==="input"}_shouldAutoComplete(t){return(t.name==="tab"||t.name==="right")&&this.inputValue!==""&&!this._isPromptActive}_shouldDeleteLastCharacter(t){return t.name==="backspace"}_shouldDeleteLastWord(t){return!!(t.sequence===""||t.name==="backspace"&&t.meta)}_shouldClearInputValue(t){return t.sequence===""}_shouldGetPreviousCommand(t){return t.name==="up"}_shouldGetNextCommand(t){return t.name==="down"}_shouldSelectPrevious(t){return t.name==="up"&&this._viewType==="select"}_shouldSelectNext(t){return t.name==="down"&&this._viewType==="select"}_shouldClearScreen(t){let r=this.inputValue.trim();return t.name==="return"&&r==="clear"}async _shouldStopDevServer(t){return!this.orgName||!this.serviceName?!1:!!(await vi.isRunning({orgName:this.orgName,serviceName:this.serviceName})&&t.ctrl&&t.name==="c")}_shouldQuit(t){let r=this.inputValue.trim().toLowerCase(),n=["quit","q","exit","cancel"];return!!(t.name==="return"&&n.includes(r)||t.ctrl&&t.name==="c")}_shouldUpdateInputValue(t){return!!(this._allowedInputCharacter.includes(t)&&this._viewType==="input")}async _stopDevServer(){return this.inputValue="stop",await this._runCommand()}async _submitPromptResponse(){this._promptResponse=this.inputValue,this.inputValue=""}async _submitSelection(){this._selectedItem=this._selectItems[this._selectedItemIndex]}async _runCommand(){process.stdin.pause(),this._updateCommandsHistory(),this._ensureNoCloudRootCommand();let t=this.inputValue;this.inputValue="",this.isCommandRunningInShell=!0,this.commandRunningInShellPromise=this.run(t),await this.commandRunningInShellPromise,this.isCommandRunningInShell=!1,this.commandRunningInShellPromise=null,this.command="start",process.stdin.resume()}async _autoComplete(){let t=this._suggestCommand();t&&(this.inputValue=`${t} `,this.viewInput())}_suggestCommand(){return this._suggestions.find(t=>t.startsWith(this.inputValue)&&t!==this.inputValue)}_ensureNoCloudRootCommand(){this.inputValue.startsWith("ampt ")&&(this.inputValue=this.inputValue.replace("ampt ",""))}_updateCommandsHistory(){this.inputValue=this.inputValue.trim(),this._commandsHistory.push(this.inputValue),this._commandsHistoryIndex=null}_getPreviousCommand(){this._commandsHistory.length!==0&&(!this._commandsHistoryIndex&&this._commandsHistoryIndex!==0?this._commandsHistoryIndex=this._commandsHistory.length-1:this._commandsHistoryIndex=this._commandsHistoryIndex-1,this._commandsHistory[this._commandsHistoryIndex]||(this._commandsHistoryIndex=this._commandsHistory.length-1),this.inputValue=this._commandsHistory[this._commandsHistoryIndex],this.viewInput())}_getNextCommand(){this._commandsHistory.length!==0&&(!this._commandsHistoryIndex&&this._commandsHistoryIndex!==0?this._commandsHistoryIndex=0:this._commandsHistoryIndex=this._commandsHistoryIndex+1,this._commandsHistory[this._commandsHistoryIndex]||(this._commandsHistoryIndex=0),this.inputValue=this._commandsHistory[this._commandsHistoryIndex],this.viewInput())}_selectPrevious(){this._selectedItemIndex=this._getPreviousItemIndex(),this._switchView({viewType:"select"})}_selectNext(){this._selectedItemIndex=this._getNextItemIndex(),this._switchView({viewType:"select"})}_deleteLastCharacter(){this.inputValue=this.inputValue.slice(0,-1),this.viewInput(this._viewMessage)}_deleteLastWord(){this.inputValue=this.inputValue.trim(),this.inputValue=this.inputValue.substring(0,this.inputValue.lastIndexOf(" ")),this.viewInput(this._viewMessage)}_clearInputValue(){this.inputValue="",this.viewInput(this._viewMessage)}_updateInputValue(t){this.inputValue+=t,this.viewInput(this._viewMessage)}_clearScreen(){this._updateCommandsHistory(),this._log(Nf.default.clearScreen),this._logLogo(),this._isLoggedTopPadding=!1,this.inputValue="",this.viewInput(),this._hideCursor()}_ensureTopPadding(){this._isLoggedTopPadding||(this._log(`
|
|
302
302
|
`),this._isLoggedTopPadding=!0)}_updateSpinner(t,{timer:r=!1}={}){this._spinnerFrameIndex=++this._spinnerFrameIndex%this._spinnerFrames.length,r&&(t=`${t} ${this.styles.grey(`(${this.timer}s)`)}`),this._switchView({viewType:"spinner",viewMessage:t})}_getSpinnerFrame(){return this.styles.darkPurple(this._spinnerFrames[this._spinnerFrameIndex])}_initSuggestions(){this._suggestions=["deploy","deploy dev","share","import","import --overwrite","export","export --overwrite","exit","clear","cancel","login","logout","help","url","open","docs","quit","version","install","uninstall","run","dev","build"]}_initTips(){this._tipsFrequency=5e3,this._tipsCollectionIndex=0,this._startTips()}_startTips(){this.isAnimationEnabled&&(clearInterval(this._tipsInterval),this._tipsInterval=setInterval(()=>this._updateTip(),this._tipsFrequency).unref())}_getTip(){if(typeof this._tipsCollectionIndex>"u")return"";let t=this._tipsCollection[this._tipsCollectionIndex];return t?this.styles.dim(t):""}_updateTip(){var t;((t=this._tipsCollection)==null?void 0:t.length)>0&&(this._tipsCollectionIndex=++this._tipsCollectionIndex%this._tipsCollection.length,this._viewType==="input"&&!this._isPromptActive&&this.viewInput(this._getTip()))}_initIcons(){this.icons={},this.icons.bolt=this.styles.purple(nDe.default.get("zap")),this.icons.tick=this.styles.blue($s.default.tick),this.icons.cross=this.styles.purple($s.default.cross),this.icons.warning=this.styles.purple($s.default.warning),this.icons.info=this.styles.green($s.default.info),this.icons.line=$s.default.line,this.icons.arrow=this.styles.darkPurple($s.default.arrowRight),this.icons.arrowDown=$s.default.arrowDown,this.icons.pointer=this.styles.green($s.default.pointerSmall),this.icons.question=this.styles.darkPurple("?"),this.icons.pointerGreen=this.styles.green($s.default.pointerSmall),this.icons.live=this.styles.green($s.default.pointerSmall)}_canRenderBolt(){let{TERM_PROGRAM:t,TERM:r}=process.env,n=t||r;return process.platform==="darwin"&&["vscode","Hyper","WarpTerminal","iTerm.app"].includes(n)?!0:(["Apple_Terminal","MacTerm","screen","xterm-256color"].includes(n),!1)}selectRegion({orgInfo:t,serviceInfo:r,instanceInfo:n,regions:i}){var u,c;let s=(u=this.options)==null?void 0:u.region,o=i.filter(({enabled:f})=>f);if(Ce.debug({orgInfo:t,serviceInfo:r,instanceInfo:n,regions:i,availableRegions:o},"selectRegion"),s){let f=o.find(({code:p})=>p===s);if(!f){let p=o.map(({code:d,name:m})=>`${d} (${m})`).join(", ");this.logError(`Invalid region code specified: ${s}`),this.logError(`Available region codes: ${p}`);return}if(n){if(s!==n.code){this.logError(`Cannot change the region of an existing stage: ${n.instanceName} (${n.region}).`);return}return i.find(({code:p})=>p===n.region)}return f}let a=(n==null?void 0:n.region)||(r==null?void 0:r.region)||(t==null?void 0:t.region)||((c=o==null?void 0:o[0])==null?void 0:c.code)||"us-east-1";return i.find(({code:f})=>f===a)}openUrl(t){this.isGitPod?(0,oB.execSync)(`gp preview "${encodeURI(t)}" --external`):(0,eDe.default)(t).catch(r=>console.error(r))}};co();Ok().suppress=!0;(async()=>{try{await new KC(sr).start()}catch(e){console.log("error",e),sr.captureException(e)}})().catch(e=>console.error(e));
|
|
303
303
|
/*! Bundled license information:
|
|
304
304
|
|