figura-cli 0.23.1 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +256 -194
- package/dist/mcp.js +32 -32
- package/package.json +2 -1
- package/skills/fig/SKILL.md +36 -11
- package/skills/skills.json +8 -2
package/dist/index.js
CHANGED
|
@@ -1,56 +1,113 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{createRequire as
|
|
3
|
-
`).forEach(function(
|
|
4
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...$){let Q=new this(c);return $.forEach((J)=>Q.set(J)),Q}static accessor(c){let Q=(this[BG]=this[BG]={accessors:{}}).accessors,J=this.prototype;function Y(X){let W=HQ(X);if(!Q[W])yw(J,X),Q[W]=!0}return V.isArray(c)?c.forEach(Y):Y(c),this}};OQ.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(OQ.prototype,({value:c},$)=>{let Q=$[0].toUpperCase()+$.slice(1);return{get:()=>c,set(J){this[Q]=J}}});V.freezeMethods(OQ);_c=OQ});function gw(c){if(V.hasOwnProp(c,"toJSON"))return!0;let $=Object.getPrototypeOf(c);while($&&$!==Object.prototype){if(V.hasOwnProp($,"toJSON"))return!0;$=Object.getPrototypeOf($)}return!1}function dw(c,$){let Q=new Set($.map((X)=>String(X).toLowerCase())),J=[],Y=(X)=>{if(X===null||typeof X!=="object")return X;if(V.isBuffer(X))return X;if(J.indexOf(X)!==-1)return;if(X instanceof _c)X=X.toJSON();J.push(X);let W;if(V.isArray(X))W=[],X.forEach((m,G)=>{let z=Y(m);if(!V.isUndefined(z))W[G]=z});else{if(!V.isPlainObject(X)&&gw(X))return J.pop(),X;W=Object.create(null);for(let[m,G]of Object.entries(X)){let z=Q.has(m.toLowerCase())?ow:Y(G);if(!V.isUndefined(z))W[m]=z}}return J.pop(),W};return Y(c)}var ow="[REDACTED ****]",yc,O;var X0=d(()=>{Lc();P0();yc=class yc extends Error{static from(c,$,Q,J,Y,X){let W=new yc(c.message,$||c.code,Q,J,Y);if(W.cause=c,W.name=c.name,c.status!=null&&W.status==null)W.status=c.status;return X&&Object.assign(W,X),W}constructor(c,$,Q,J,Y){super(c);if(Object.defineProperty(this,"message",{__proto__:null,value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,$&&(this.code=$),Q&&(this.config=Q),J&&(this.request=J),Y)this.response=Y,this.status=Y.status}toJSON(){let c=this.config,$=c&&V.hasOwnProp(c,"redact")?c.redact:void 0,Q=V.isArray($)&&$.length>0?dw(c,$):V.toJSONObject(c);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Q,code:this.code,status:this.status}}};yc.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";yc.ERR_BAD_OPTION="ERR_BAD_OPTION";yc.ECONNABORTED="ECONNABORTED";yc.ETIMEDOUT="ETIMEDOUT";yc.ECONNREFUSED="ECONNREFUSED";yc.ERR_NETWORK="ERR_NETWORK";yc.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";yc.ERR_DEPRECATED="ERR_DEPRECATED";yc.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";yc.ERR_BAD_REQUEST="ERR_BAD_REQUEST";yc.ERR_CANCELED="ERR_CANCELED";yc.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";yc.ERR_INVALID_URL="ERR_INVALID_URL";yc.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=yc});var RG=l((fZ,OG)=>{var HG=Zc("stream").Stream,sw=Zc("util");OG.exports=E0;function E0(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}sw.inherits(E0,HG);E0.create=function(c,$){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];Q.source=c;var Y=c.emit;if(c.emit=function(){return Q._handleEmit(arguments),Y.apply(c,arguments)},c.on("error",function(){}),Q.pauseStream)c.pause();return Q};Object.defineProperty(E0.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});E0.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};E0.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};E0.prototype.pause=function(){this.source.pause()};E0.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(c){this.emit.apply(this,c)}.bind(this)),this._bufferedEvents=[]};E0.prototype.pipe=function(){var c=HG.prototype.pipe.apply(this,arguments);return this.resume(),c};E0.prototype._handleEmit=function(c){if(this._released){this.emit.apply(this,c);return}if(c[0]==="data")this.dataSize+=c[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(c)};E0.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(c))}});var LG=l((nZ,ZG)=>{var rw=Zc("util"),IG=Zc("stream").Stream,pG=RG();ZG.exports=Ec;function Ec(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}rw.inherits(Ec,IG);Ec.create=function(c){var $=new this;c=c||{};for(var Q in c)$[Q]=c[Q];return $};Ec.isStreamLike=function(c){return typeof c!=="function"&&typeof c!=="string"&&typeof c!=="boolean"&&typeof c!=="number"&&!Buffer.isBuffer(c)};Ec.prototype.append=function(c){var $=Ec.isStreamLike(c);if($){if(!(c instanceof pG)){var Q=pG.create(c,{maxDataSize:1/0,pauseStream:this.pauseStreams});c.on("data",this._checkDataSize.bind(this)),c=Q}if(this._handleErrors(c),this.pauseStreams)c.pause()}return this._streams.push(c),this};Ec.prototype.pipe=function(c,$){return IG.prototype.pipe.call(this,c,$),this.resume(),c};Ec.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Ec.prototype._realGetNext=function(){var c=this._streams.shift();if(typeof c>"u"){this.end();return}if(typeof c!=="function"){this._pipeNext(c);return}var $=c;$(function(Q){var J=Ec.isStreamLike(Q);if(J)Q.on("data",this._checkDataSize.bind(this)),this._handleErrors(Q);this._pipeNext(Q)}.bind(this))};Ec.prototype._pipeNext=function(c){this._currentStream=c;var $=Ec.isStreamLike(c);if($){c.on("end",this._getNext.bind(this)),c.pipe(this,{end:!1});return}var Q=c;this.write(Q),this._getNext()};Ec.prototype._handleErrors=function(c){var $=this;c.on("error",function(Q){$._emitError(Q)})};Ec.prototype.write=function(c){this.emit("data",c)};Ec.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Ec.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};Ec.prototype.end=function(){this._reset(),this.emit("end")};Ec.prototype.destroy=function(){this._reset(),this.emit("close")};Ec.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ec.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(c))};Ec.prototype._updateDataSize=function(){this.dataSize=0;var c=this;if(this._streams.forEach(function($){if(!$.dataSize)return;c.dataSize+=$.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Ec.prototype._emitError=function(c){this._reset(),this.emit("error",c)}});var _G=l((uZ,tw)=>{tw.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var EG=l((Xi)=>{/*!
|
|
2
|
+
import{createRequire as __}from"node:module";var M_=Object.create;var{getPrototypeOf:H_,defineProperty:C5,getOwnPropertyNames:B_}=Object;var Z_=Object.prototype.hasOwnProperty;function w_($){return this[$]}var j_,L_,G7=($,Q,J)=>{var X=$!=null&&typeof $==="object";if(X){var Y=Q?j_??=new WeakMap:L_??=new WeakMap,G=Y.get($);if(G)return G}J=$!=null?M_(H_($)):{};let q=Q||!$||!$.__esModule?C5(J,"default",{value:$,enumerable:!0}):J;for(let W of B_($))if(!Z_.call(q,W))C5(q,W,{get:w_.bind($,W),enumerable:!0});if(X)Y.set($,q);return q};var g=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports);var R_=($)=>$;function D_($,Q){this[$]=R_.bind(null,Q)}var VJ=($,Q)=>{for(var J in Q)C5($,J,{get:Q[J],enumerable:!0,configurable:!0,set:D_.bind(Q,J)})};var R=($,Q)=>()=>($&&(Q=$($=0)),Q);var j0=__(import.meta.url);function TX($,Q){return function(){return $.apply(Q,arguments)}}function xJ($){return $!==null&&!UJ($)&&$.constructor!==null&&!UJ($.constructor)&&M8($.constructor.isBuffer)&&$.constructor.isBuffer($)}function O_($){let Q;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Q=ArrayBuffer.isView($);else Q=$&&$.buffer&&HV($.buffer);return Q}function b_(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}function kX($,Q,{allOwnKeys:J=!1}={}){if($===null||typeof $>"u")return;let X,Y;if(typeof $!=="object")$=[$];if(NQ($))for(X=0,Y=$.length;X<Y;X++)Q.call(null,$[X],X,$);else{if(xJ($))return;let G=J?Object.getOwnPropertyNames($):Object.keys($),q=G.length,W;for(X=0;X<q;X++)W=G[X],Q.call(null,$[W],W,$)}}function ZV($,Q){if(xJ($))return null;Q=Q.toLowerCase();let J=Object.keys($),X=J.length,Y;while(X-- >0)if(Y=J[X],Q===Y.toLowerCase())return Y;return null}function I5(...$){let{caseless:Q,skipUndefined:J}=wV(this)&&this||{},X={},Y=(G,q)=>{if(q==="__proto__"||q==="constructor"||q==="prototype")return;let W=Q&&typeof q==="string"&&ZV(X,q)||q,z=W7(X,W)?X[W]:void 0;if(q7(z)&&q7(G))X[W]=I5(z,G);else if(q7(G))X[W]=I5({},G);else if(NQ(G))X[W]=G.slice();else if(!J||!UJ(G))X[W]=G};for(let G=0,q=$.length;G<q;G++){let W=$[G];if(!W||xJ(W))continue;if(kX(W,Y),typeof W!=="object"||NQ(W))continue;let z=Object.getOwnPropertySymbols(W);for(let V=0;V<z.length;V++){let K=z[V];if(QN.call(W,K))Y(W[K],K)}}return X}function WN($){return!!($&&M8($.append)&&$[MV]==="FormData"&&$[EX])}var N_,KJ,EX,MV,W7,AX=($,Q)=>{let J=$,X=[];while(J!=null&&J!==Object.prototype){if(X.indexOf(J)!==-1)return!1;if(X.push(J),W7(J,Q))return!0;J=KJ(J)}return!1},v_=($,Q)=>$!=null&&AX($,Q)?$[Q]:void 0,P5,g8=($)=>{return $=$.toLowerCase(),(Q)=>P5(Q)===$},z7=($)=>(Q)=>typeof Q===$,NQ,UJ,HV,F_,M8,BV,MJ=($)=>$!==null&&typeof $==="object",C_=($)=>$===!0||$===!1,q7=($)=>{if(!MJ($))return!1;let Q=KJ($);return(Q===null||Q===Object.prototype||KJ(Q)===null)&&!AX($,MV)&&!AX($,EX)},I_=($)=>{if(!MJ($)||xJ($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Q){return!1}},P_,T_,A_=($)=>{return!!($&&typeof $.uri<"u")},E_=($)=>$&&typeof $.getParts<"u",k_,c_,S_=($)=>MJ($)&&M8($.pipe),UV,xV,f_=($)=>{if(!$)return!1;if(xV&&$ instanceof xV)return!0;let Q=KJ($);if(!Q||Q===Object.prototype)return!1;if(!M8($.append))return!1;let J=P5($);return J==="formdata"||J==="object"&&M8($.toString)&&$.toString()==="[object FormData]"},m_,y_,h_,p_,u_,g_=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_Q,wV=($)=>!UJ($)&&$!==_Q,l_=($,Q,J,{allOwnKeys:X}={})=>{return kX(Q,(Y,G)=>{if(J&&M8(Y))Object.defineProperty($,G,{__proto__:null,value:TX(Y,J),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,G,{__proto__:null,value:Y,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:X}),$},i_=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},n_=($,Q,J,X)=>{$.prototype=Object.create(Q.prototype,X),Object.defineProperty($.prototype,"constructor",{__proto__:null,value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{__proto__:null,value:Q.prototype}),J&&Object.assign($.prototype,J)},d_=($,Q,J,X)=>{let Y,G,q,W={};if(Q=Q||{},$==null)return Q;do{Y=Object.getOwnPropertyNames($),G=Y.length;while(G-- >0)if(q=Y[G],(!X||X(q,$,Q))&&!W[q])Q[q]=$[q],W[q]=!0;$=J!==!1&&KJ($)}while($&&(!J||J($,Q))&&$!==Object.prototype);return Q},a_=($,Q,J)=>{if($=String($),J===void 0||J>$.length)J=$.length;J-=Q.length;let X=$.indexOf(Q,J);return X!==-1&&X===J},o_=($)=>{if(!$)return null;if(NQ($))return $;let Q=$.length;if(!BV(Q))return null;let J=Array(Q);while(Q-- >0)J[Q]=$[Q];return J},s_,r_=($,Q)=>{let X=($&&$[EX]).call($),Y;while((Y=X.next())&&!Y.done){let G=Y.value;Q.call($,G[0],G[1])}},t_=($,Q)=>{let J,X=[];while((J=$.exec(Q))!==null)X.push(J);return X},e_,$N=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(J,X,Y){return X.toUpperCase()+Y})},QN,JN,jV=($,Q)=>{let J=Object.getOwnPropertyDescriptors($),X={};kX(J,(Y,G)=>{let q;if((q=Q(Y,G,$))!==!1)X[G]=q||Y}),Object.defineProperties($,X)},XN=($)=>{jV($,(Q,J)=>{if(M8($)&&["arguments","caller","callee"].includes(J))return!1;let X=$[J];if(!M8(X))return;if(Q.enumerable=!1,"writable"in Q){Q.writable=!1;return}if(!Q.set)Q.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},YN=($,Q)=>{let J={},X=(Y)=>{Y.forEach((G)=>{J[G]=!0})};return NQ($)?X($):X(String($).split(Q)),J},GN=()=>{},qN=($,Q)=>{return $!=null&&Number.isFinite($=+$)?$:Q},zN=($)=>{let Q=new WeakSet,J=(X)=>{if(MJ(X)){if(Q.has(X))return;if(xJ(X))return X;if(!("toJSON"in X)){Q.add(X);let Y=NQ(X)?[]:{};return kX(X,(G,q)=>{let W=J(G);!UJ(W)&&(Y[q]=W)}),Q.delete(X),Y}}return X};return J($)},VN,KN=($)=>$&&(MJ($)||M8($))&&M8($.then)&&M8($.catch),LV,UN,RV=($)=>$!=null&&M8($[EX]),xN=($)=>$!=null&&AX($,EX)&&RV($),B;var A0=R(()=>{({toString:N_}=Object.prototype),{getPrototypeOf:KJ}=Object,{iterator:EX,toStringTag:MV}=Symbol,W7=(({hasOwnProperty:$})=>(Q,J)=>$.call(Q,J))(Object.prototype),P5=(($)=>(Q)=>{let J=N_.call(Q);return $[J]||($[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:NQ}=Array,UJ=z7("undefined");HV=g8("ArrayBuffer");F_=z7("string"),M8=z7("function"),BV=z7("number"),P_=g8("Date"),T_=g8("File"),k_=g8("Blob"),c_=g8("FileList");UV=b_(),xV=typeof UV.FormData<"u"?UV.FormData:void 0,m_=g8("URLSearchParams"),[y_,h_,p_,u_]=["ReadableStream","Request","Response","Headers"].map(g8);_Q=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();s_=(($)=>{return(Q)=>{return $&&Q instanceof $}})(typeof Uint8Array<"u"&&KJ(Uint8Array)),e_=g8("HTMLFormElement"),{propertyIsEnumerable:QN}=Object.prototype,JN=g8("RegExp");VN=g8("AsyncFunction"),LV=(($,Q)=>{if($)return setImmediate;return Q?((J,X)=>{return _Q.addEventListener("message",({source:Y,data:G})=>{if(Y===_Q&&G===J)X.length&&X.shift()()},!1),(Y)=>{X.push(Y),_Q.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",M8(_Q.postMessage)),UN=typeof queueMicrotask<"u"?queueMicrotask.bind(_Q):typeof process<"u"&&process.nextTick||LV,B={isArray:NQ,isArrayBuffer:HV,isBuffer:xJ,isFormData:f_,isArrayBufferView:O_,isString:F_,isNumber:BV,isBoolean:C_,isObject:MJ,isPlainObject:q7,isEmptyObject:I_,isReadableStream:y_,isRequest:h_,isResponse:p_,isHeaders:u_,isUndefined:UJ,isDate:P_,isFile:T_,isReactNativeBlob:A_,isReactNative:E_,isBlob:k_,isRegExp:JN,isFunction:M8,isStream:S_,isURLSearchParams:m_,isTypedArray:s_,isFileList:c_,forEach:kX,merge:I5,extend:l_,trim:g_,stripBOM:i_,inherits:n_,toFlatObject:d_,kindOf:P5,kindOfTest:g8,endsWith:a_,toArray:o_,forEachEntry:r_,matchAll:t_,isHTMLForm:e_,hasOwnProperty:W7,hasOwnProp:W7,hasOwnInPrototypeChain:AX,getSafeProp:v_,reduceDescriptors:jV,freezeMethods:XN,toObjectSet:YN,toCamelCase:$N,noop:GN,toFiniteNumber:qN,findKey:ZV,global:_Q,isContextDefined:wV,isSpecCompliantForm:WN,toJSONObject:zN,isAsyncFn:VN,isThenable:KN,setImmediate:LV,asap:UN,isIterable:RV,isSafeIterable:xN}});var MN,DV=($)=>{let Q={},J,X,Y;return $&&$.split(`
|
|
3
|
+
`).forEach(function(q){if(Y=q.indexOf(":"),J=q.substring(0,Y).trim().toLowerCase(),X=q.substring(Y+1).trim(),!J||Q[J]&&MN[J])return;if(J==="set-cookie")if(Q[J])Q[J].push(X);else Q[J]=[X];else Q[J]=Q[J]?Q[J]+", "+X:X}),Q};var _V=R(()=>{A0();MN=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"])});function HN($){let Q=0,J=$.length;while(Q<J){let X=$.charCodeAt(Q);if(X!==9&&X!==32)break;Q+=1}while(J>Q){let X=$.charCodeAt(J-1);if(X!==9&&X!==32)break;J-=1}return Q===0&&J===$.length?$:$.slice(Q,J)}function T5($,Q){if(B.isArray($))return $.map((J)=>T5(J,Q));return HN(String($).replace(Q,""))}function HJ($){let Q=Object.create(null);return B.forEach($.toJSON(),(J,X)=>{Q[X]=wN(J)}),Q}var BN,ZN,NV=($)=>T5($,BN),wN=($)=>T5($,ZN);var cX=R(()=>{A0();BN=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ZN=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g")});function SX($){return $&&String($).trim().toLowerCase()}function V7($){if($===!1||$==null)return $;return B.isArray($)?$.map(V7):NV(String($))}function jN($){let Q=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,X;while(X=J.exec($))Q[X[1]]=X[2];return Q}function A5($,Q,J,X,Y){if(B.isFunction(X))return X.call(this,Q,J);if(Y)Q=J;if(!B.isString(Q))return;if(B.isString(X))return Q.indexOf(X)!==-1;if(B.isRegExp(X))return X.test(Q)}function RN($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Q,J,X)=>{return J.toUpperCase()+X})}function DN($,Q){let J=B.toCamelCase(" "+Q);["get","set","has"].forEach((X)=>{Object.defineProperty($,X+J,{__proto__:null,value:function(Y,G,q){return this[X].call(this,Q,Y,G,q)},configurable:!0})})}var vV,LN=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim()),bX,E0;var l8=R(()=>{A0();_V();cX();vV=Symbol("internals");bX=class bX{constructor($){$&&this.set($)}set($,Q,J){let X=this;function Y(q,W,z){let V=SX(W);if(!V)return;let K=B.findKey(X,V);if(!K||X[K]===void 0||z===!0||z===void 0&&X[K]!==!1)X[K||W]=V7(q)}let G=(q,W)=>B.forEach(q,(z,V)=>Y(z,V,W));if(B.isPlainObject($)||$ instanceof this.constructor)G($,Q);else if(B.isString($)&&($=$.trim())&&!LN($))G(DV($),Q);else if(B.isObject($)&&B.isSafeIterable($)){let q=Object.create(null),W,z;for(let V of $){if(!B.isArray(V))throw TypeError("Object iterator must return a key-value pair");if(z=V[0],B.hasOwnProp(q,z))W=q[z],q[z]=B.isArray(W)?[...W,V[1]]:[W,V[1]];else q[z]=V[1]}G(q,Q)}else $!=null&&Y(Q,$,J);return this}get($,Q){if($=SX($),$){let J=B.findKey(this,$);if(J){let X=this[J];if(!Q)return X;if(Q===!0)return jN(X);if(B.isFunction(Q))return Q.call(this,X,J);if(B.isRegExp(Q))return Q.exec(X);throw TypeError("parser must be boolean|regexp|function")}}}has($,Q){if($=SX($),$){let J=B.findKey(this,$);return!!(J&&this[J]!==void 0&&(!Q||A5(this,this[J],J,Q)))}return!1}delete($,Q){let J=this,X=!1;function Y(G){if(G=SX(G),G){let q=B.findKey(J,G);if(q&&(!Q||A5(J,J[q],q,Q)))delete J[q],X=!0}}if(B.isArray($))$.forEach(Y);else Y($);return X}clear($){let Q=Object.keys(this),J=Q.length,X=!1;while(J--){let Y=Q[J];if(!$||A5(this,this[Y],Y,$,!0))delete this[Y],X=!0}return X}normalize($){let Q=this,J={};return B.forEach(this,(X,Y)=>{let G=B.findKey(J,Y);if(G){Q[G]=V7(X),delete Q[Y];return}let q=$?RN(Y):String(Y).trim();if(q!==Y)delete Q[Y];Q[q]=V7(X),J[q]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Q=Object.create(null);return B.forEach(this,(J,X)=>{J!=null&&J!==!1&&(Q[X]=$&&B.isArray(J)?J.join(", "):J)}),Q}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Q])=>$+": "+Q).join(`
|
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Q){let J=new this($);return Q.forEach((X)=>J.set(X)),J}static accessor($){let J=(this[vV]=this[vV]={accessors:{}}).accessors,X=this.prototype;function Y(G){let q=SX(G);if(!J[q])DN(X,G),J[q]=!0}return B.isArray($)?$.forEach(Y):Y($),this}};bX.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(bX.prototype,({value:$},Q)=>{let J=Q[0].toUpperCase()+Q.slice(1);return{get:()=>$,set(X){this[J]=X}}});B.freezeMethods(bX);E0=bX});function NN($){if(B.hasOwnProp($,"toJSON"))return!0;let Q=Object.getPrototypeOf($);while(Q&&Q!==Object.prototype){if(B.hasOwnProp(Q,"toJSON"))return!0;Q=Object.getPrototypeOf(Q)}return!1}function vN($,Q){let J=new Set(Q.map((G)=>String(G).toLowerCase())),X=[],Y=(G)=>{if(G===null||typeof G!=="object")return G;if(B.isBuffer(G))return G;if(X.indexOf(G)!==-1)return;if(G instanceof E0)G=G.toJSON();X.push(G);let q;if(B.isArray(G))q=[],G.forEach((W,z)=>{let V=Y(W);if(!B.isUndefined(V))q[z]=V});else{if(!B.isPlainObject(G)&&NN(G))return X.pop(),G;q=Object.create(null);for(let[W,z]of Object.entries(G)){let V=J.has(W.toLowerCase())?_N:Y(z);if(!B.isUndefined(V))q[W]=V}}return X.pop(),q};return Y($)}var _N="[REDACTED ****]",o0,O;var K8=R(()=>{A0();l8();o0=class o0 extends Error{static from($,Q,J,X,Y,G){let q=new o0($.message,Q||$.code,J,X,Y);if(q.cause=$,q.name=$.name,$.status!=null&&q.status==null)q.status=$.status;return G&&Object.assign(q,G),q}constructor($,Q,J,X,Y){super($);if(Object.defineProperty(this,"message",{__proto__:null,value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Q&&(this.code=Q),J&&(this.config=J),X&&(this.request=X),Y)this.response=Y,this.status=Y.status}toJSON(){let $=this.config,Q=$&&B.hasOwnProp($,"redact")?$.redact:void 0,J=B.isArray(Q)&&Q.length>0?vN($,Q):B.toJSONObject($);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:J,code:this.code,status:this.status}}};o0.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";o0.ERR_BAD_OPTION="ERR_BAD_OPTION";o0.ECONNABORTED="ECONNABORTED";o0.ETIMEDOUT="ETIMEDOUT";o0.ECONNREFUSED="ECONNREFUSED";o0.ERR_NETWORK="ERR_NETWORK";o0.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";o0.ERR_DEPRECATED="ERR_DEPRECATED";o0.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";o0.ERR_BAD_REQUEST="ERR_BAD_REQUEST";o0.ERR_CANCELED="ERR_CANCELED";o0.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";o0.ERR_INVALID_URL="ERR_INVALID_URL";o0.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=o0});var CV=g((qd,FV)=>{var OV=j0("stream").Stream,ON=j0("util");FV.exports=i8;function i8(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}ON.inherits(i8,OV);i8.create=function($,Q){var J=new this;Q=Q||{};for(var X in Q)J[X]=Q[X];J.source=$;var Y=$.emit;if($.emit=function(){return J._handleEmit(arguments),Y.apply($,arguments)},$.on("error",function(){}),J.pauseStream)$.pause();return J};Object.defineProperty(i8.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});i8.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};i8.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};i8.prototype.pause=function(){this.source.pause()};i8.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function($){this.emit.apply(this,$)}.bind(this)),this._bufferedEvents=[]};i8.prototype.pipe=function(){var $=OV.prototype.pipe.apply(this,arguments);return this.resume(),$};i8.prototype._handleEmit=function($){if(this._released){this.emit.apply(this,$);return}if($[0]==="data")this.dataSize+=$[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push($)};i8.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error($))}});var AV=g((Wd,TV)=>{var FN=j0("util"),PV=j0("stream").Stream,IV=CV();TV.exports=f0;function f0(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}FN.inherits(f0,PV);f0.create=function($){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];return Q};f0.isStreamLike=function($){return typeof $!=="function"&&typeof $!=="string"&&typeof $!=="boolean"&&typeof $!=="number"&&!Buffer.isBuffer($)};f0.prototype.append=function($){var Q=f0.isStreamLike($);if(Q){if(!($ instanceof IV)){var J=IV.create($,{maxDataSize:1/0,pauseStream:this.pauseStreams});$.on("data",this._checkDataSize.bind(this)),$=J}if(this._handleErrors($),this.pauseStreams)$.pause()}return this._streams.push($),this};f0.prototype.pipe=function($,Q){return PV.prototype.pipe.call(this,$,Q),this.resume(),$};f0.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};f0.prototype._realGetNext=function(){var $=this._streams.shift();if(typeof $>"u"){this.end();return}if(typeof $!=="function"){this._pipeNext($);return}var Q=$;Q(function(J){var X=f0.isStreamLike(J);if(X)J.on("data",this._checkDataSize.bind(this)),this._handleErrors(J);this._pipeNext(J)}.bind(this))};f0.prototype._pipeNext=function($){this._currentStream=$;var Q=f0.isStreamLike($);if(Q){$.on("end",this._getNext.bind(this)),$.pipe(this,{end:!1});return}var J=$;this.write(J),this._getNext()};f0.prototype._handleErrors=function($){var Q=this;$.on("error",function(J){Q._emitError(J)})};f0.prototype.write=function($){this.emit("data",$)};f0.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};f0.prototype.resume=function(){if(!this._released)this._released=!0,this.writable=!0,this._getNext();if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};f0.prototype.end=function(){this._reset(),this.emit("end")};f0.prototype.destroy=function(){this._reset(),this.emit("close")};f0.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};f0.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var $="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error($))};f0.prototype._updateDataSize=function(){this.dataSize=0;var $=this;if(this._streams.forEach(function(Q){if(!Q.dataSize)return;$.dataSize+=Q.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};f0.prototype._emitError=function($){this._reset(),this.emit("error",$)}});var EV=g((zd,CN)=>{CN.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var fV=g((cN)=>{/*!
|
|
5
5
|
* mime-types
|
|
6
6
|
* Copyright(c) 2014 Jonathan Ong
|
|
7
7
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
8
8
|
* MIT Licensed
|
|
9
|
-
*/var SJ=_G(),ew=Zc("path").extname,SG=/^\s*([^;\s]*)(?:;|\s|$)/,ci=/^text\//i;Xi.charset=AG;Xi.charsets={lookup:AG};Xi.contentType=$i;Xi.extension=Qi;Xi.extensions=Object.create(null);Xi.lookup=Ji;Xi.types=Object.create(null);Yi(Xi.extensions,Xi.types);function AG(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&SJ[$[1].toLowerCase()];if(Q&&Q.charset)return Q.charset;if($&&ci.test($[1]))return"UTF-8";return!1}function $i(c){if(!c||typeof c!=="string")return!1;var $=c.indexOf("/")===-1?Xi.lookup(c):c;if(!$)return!1;if($.indexOf("charset")===-1){var Q=Xi.charset($);if(Q)$+="; charset="+Q.toLowerCase()}return $}function Qi(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&Xi.extensions[$[1].toLowerCase()];if(!Q||!Q.length)return!1;return Q[0]}function Ji(c){if(!c||typeof c!=="string")return!1;var $=ew("x."+c).toLowerCase().substr(1);if(!$)return!1;return Xi.types[$]||!1}function Yi(c,$){var Q=["nginx","apache",void 0,"iana"];Object.keys(SJ).forEach(function(Y){var X=SJ[Y],W=X.extensions;if(!W||!W.length)return;c[Y]=W;for(var m=0;m<W.length;m++){var G=W[m];if($[G]){var z=Q.indexOf(SJ[$[G]].source),x=Q.indexOf(X.source);if($[G]!=="application/octet-stream"&&(z>x||z===x&&$[G].substr(0,12)==="application/"))continue}$[G]=Y}})}});var FG=l((aZ,bG)=>{bG.exports=zi;function zi(c){var $=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if($)$(c);else setTimeout(c,0)}});var ZX=l((lZ,fG)=>{var TG=FG();fG.exports=xi;function xi(c){var $=!1;return TG(function(){$=!0}),function(J,Y){if($)c(J,Y);else TG(function(){c(J,Y)})}}});var LX=l((hZ,nG)=>{nG.exports=qi;function qi(c){Object.keys(c.jobs).forEach(Mi.bind(c)),c.jobs={}}function Mi(c){if(typeof this.jobs[c]=="function")this.jobs[c]()}});var _X=l((yZ,kG)=>{var uG=ZX(),Ni=LX();kG.exports=Vi;function Vi(c,$,Q,J){var Y=Q.keyedList?Q.keyedList[Q.index]:Q.index;Q.jobs[Y]=wi($,Y,c[Y],function(X,W){if(!(Y in Q.jobs))return;if(delete Q.jobs[Y],X)Ni(Q);else Q.results[Y]=W;J(X,Q.results)})}function wi(c,$,Q,J){var Y;if(c.length==2)Y=c(Q,uG(J));else Y=c(Q,$,uG(J));return Y}});var SX=l((oZ,aG)=>{aG.exports=ii;function ii(c,$){var Q=!Array.isArray(c),J={index:0,keyedList:Q||$?Object.keys(c):null,jobs:{},results:Q?{}:[],size:Q?Object.keys(c).length:c.length};if($)J.keyedList.sort(Q?$:function(Y,X){return $(c[Y],c[X])});return J}});var AX=l((gZ,lG)=>{var vi=LX(),Ui=ZX();lG.exports=ji;function ji(c){if(!Object.keys(this.jobs).length)return;this.index=this.size,vi(this),Ui(c)(null,this.results)}});var yG=l((dZ,hG)=>{var Ki=_X(),Di=SX(),Bi=AX();hG.exports=Hi;function Hi(c,$,Q){var J=Di(c);while(J.index<(J.keyedList||c).length)Ki(c,$,J,function(Y,X){if(Y){Q(Y,X);return}if(Object.keys(J.jobs).length===0){Q(null,J.results);return}}),J.index++;return Bi.bind(J,Q)}});var CX=l((sZ,AJ)=>{var oG=_X(),Oi=SX(),Ri=AX();AJ.exports=pi;AJ.exports.ascending=gG;AJ.exports.descending=Ii;function pi(c,$,Q,J){var Y=Oi(c,Q);return oG(c,$,Y,function X(W,m){if(W){J(W,m);return}if(Y.index++,Y.index<(Y.keyedList||c).length){oG(c,$,Y,X);return}J(null,Y.results)}),Ri.bind(Y,J)}function gG(c,$){return c<$?-1:c>$?1:0}function Ii(c,$){return-1*gG(c,$)}});var sG=l((rZ,dG)=>{var Zi=CX();dG.exports=Li;function Li(c,$,Q){return Zi(c,$,null,Q)}});var tG=l((tZ,rG)=>{rG.exports={parallel:yG(),serial:sG(),serialOrdered:CX()}});var PX=l((eZ,eG)=>{eG.exports=Object});var $7=l((cL,c7)=>{c7.exports=Error});var J7=l(($L,Q7)=>{Q7.exports=EvalError});var X7=l((QL,Y7)=>{Y7.exports=RangeError});var m7=l((JL,W7)=>{W7.exports=ReferenceError});var z7=l((YL,G7)=>{G7.exports=SyntaxError});var CJ=l((XL,x7)=>{x7.exports=TypeError});var M7=l((WL,q7)=>{q7.exports=URIError});var V7=l((mL,N7)=>{N7.exports=Math.abs});var i7=l((GL,w7)=>{w7.exports=Math.floor});var U7=l((zL,v7)=>{v7.exports=Math.max});var K7=l((xL,j7)=>{j7.exports=Math.min});var B7=l((qL,D7)=>{D7.exports=Math.pow});var O7=l((ML,H7)=>{H7.exports=Math.round});var p7=l((NL,R7)=>{R7.exports=Number.isNaN||function($){return $!==$}});var Z7=l((VL,I7)=>{var _i=p7();I7.exports=function($){if(_i($)||$===0)return $;return $<0?-1:1}});var _7=l((wL,L7)=>{L7.exports=Object.getOwnPropertyDescriptor});var EX=l((iL,S7)=>{var PJ=_7();if(PJ)try{PJ([],"length")}catch(c){PJ=null}S7.exports=PJ});var C7=l((vL,A7)=>{var EJ=Object.defineProperty||!1;if(EJ)try{EJ({},"a",{value:1})}catch(c){EJ=!1}A7.exports=EJ});var bX=l((UL,P7)=>{P7.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var $={},Q=Symbol("test"),J=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Y=42;$[Q]=Y;for(var X in $)return!1;if(typeof Object.keys==="function"&&Object.keys($).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames($).length!==0)return!1;var W=Object.getOwnPropertySymbols($);if(W.length!==1||W[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call($,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var m=Object.getOwnPropertyDescriptor($,Q);if(m.value!==Y||m.enumerable!==!0)return!1}return!0}});var F7=l((jL,b7)=>{var E7=typeof Symbol<"u"&&Symbol,Si=bX();b7.exports=function(){if(typeof E7!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof E7("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Si()}});var FX=l((KL,T7)=>{T7.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var TX=l((DL,f7)=>{var Ai=PX();f7.exports=Ai.getPrototypeOf||null});var k7=l((BL,u7)=>{var Ci="Function.prototype.bind called on incompatible ",Pi=Object.prototype.toString,Ei=Math.max,bi="[object Function]",n7=function($,Q){var J=[];for(var Y=0;Y<$.length;Y+=1)J[Y]=$[Y];for(var X=0;X<Q.length;X+=1)J[X+$.length]=Q[X];return J},Fi=function($,Q){var J=[];for(var Y=Q||0,X=0;Y<$.length;Y+=1,X+=1)J[X]=$[Y];return J},Ti=function(c,$){var Q="";for(var J=0;J<c.length;J+=1)if(Q+=c[J],J+1<c.length)Q+=$;return Q};u7.exports=function($){var Q=this;if(typeof Q!=="function"||Pi.apply(Q)!==bi)throw TypeError(Ci+Q);var J=Fi(arguments,1),Y,X=function(){if(this instanceof Y){var x=Q.apply(this,n7(J,arguments));if(Object(x)===x)return x;return this}return Q.apply($,n7(J,arguments))},W=Ei(0,Q.length-J.length),m=[];for(var G=0;G<W;G++)m[G]="$"+G;if(Y=Function("binder","return function ("+Ti(m,",")+"){ return binder.apply(this,arguments); }")(X),Q.prototype){var z=function(){};z.prototype=Q.prototype,Y.prototype=new z,z.prototype=null}return Y}});var RQ=l((HL,a7)=>{var fi=k7();a7.exports=Function.prototype.bind||fi});var bJ=l((OL,l7)=>{l7.exports=Function.prototype.call});var fX=l((RL,h7)=>{h7.exports=Function.prototype.apply});var o7=l((pL,y7)=>{y7.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var d7=l((IL,g7)=>{var ni=RQ(),ui=fX(),ki=bJ(),ai=o7();g7.exports=ai||ni.call(ki,ui)});var r7=l((ZL,s7)=>{var li=RQ(),hi=CJ(),yi=bJ(),oi=d7();s7.exports=function($){if($.length<1||typeof $[0]!=="function")throw new hi("a function is required");return oi(li,yi,$)}});var Jz=l((LL,Qz)=>{var gi=r7(),t7=EX(),cz;try{cz=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!=="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var nX=!!cz&&t7&&t7(Object.prototype,"__proto__"),$z=Object,e7=$z.getPrototypeOf;Qz.exports=nX&&typeof nX.get==="function"?gi([nX.get]):typeof e7==="function"?function($){return e7($==null?$:$z($))}:!1});var Gz=l((_L,mz)=>{var Yz=FX(),Xz=TX(),Wz=Jz();mz.exports=Yz?function($){return Yz($)}:Xz?function($){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("getProto: not an object");return Xz($)}:Wz?function($){return Wz($)}:null});var FJ=l((SL,zz)=>{var di=Function.prototype.call,si=Object.prototype.hasOwnProperty,ri=RQ();zz.exports=ri.call(di,si)});var wz=l((AL,Vz)=>{var Vc,ti=PX(),ei=$7(),c1=J7(),$1=X7(),Q1=m7(),p$=z7(),R$=CJ(),J1=M7(),Y1=V7(),X1=i7(),W1=U7(),m1=K7(),G1=B7(),z1=O7(),x1=Z7(),Mz=Function,uX=function(c){try{return Mz('"use strict"; return ('+c+").constructor;")()}catch($){}},pQ=EX(),q1=C7(),kX=function(){throw new R$},M1=pQ?function(){try{return arguments.callee,kX}catch(c){try{return pQ(arguments,"callee").get}catch($){return kX}}}():kX,H$=F7()(),kc=Gz(),N1=TX(),V1=FX(),Nz=fX(),IQ=bJ(),O$={},w1=typeof Uint8Array>"u"||!kc?Vc:kc(Uint8Array),a8={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Vc:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vc:ArrayBuffer,"%ArrayIteratorPrototype%":H$&&kc?kc([][Symbol.iterator]()):Vc,"%AsyncFromSyncIteratorPrototype%":Vc,"%AsyncFunction%":O$,"%AsyncGenerator%":O$,"%AsyncGeneratorFunction%":O$,"%AsyncIteratorPrototype%":O$,"%Atomics%":typeof Atomics>"u"?Vc:Atomics,"%BigInt%":typeof BigInt>"u"?Vc:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vc:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vc:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vc:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ei,"%eval%":eval,"%EvalError%":c1,"%Float16Array%":typeof Float16Array>"u"?Vc:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Vc:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vc:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vc:FinalizationRegistry,"%Function%":Mz,"%GeneratorFunction%":O$,"%Int8Array%":typeof Int8Array>"u"?Vc:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vc:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vc:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H$&&kc?kc(kc([][Symbol.iterator]())):Vc,"%JSON%":typeof JSON==="object"?JSON:Vc,"%Map%":typeof Map>"u"?Vc:Map,"%MapIteratorPrototype%":typeof Map>"u"||!H$||!kc?Vc:kc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ti,"%Object.getOwnPropertyDescriptor%":pQ,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vc:Promise,"%Proxy%":typeof Proxy>"u"?Vc:Proxy,"%RangeError%":$1,"%ReferenceError%":Q1,"%Reflect%":typeof Reflect>"u"?Vc:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vc:Set,"%SetIteratorPrototype%":typeof Set>"u"||!H$||!kc?Vc:kc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vc:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H$&&kc?kc(""[Symbol.iterator]()):Vc,"%Symbol%":H$?Symbol:Vc,"%SyntaxError%":p$,"%ThrowTypeError%":M1,"%TypedArray%":w1,"%TypeError%":R$,"%Uint8Array%":typeof Uint8Array>"u"?Vc:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vc:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vc:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vc:Uint32Array,"%URIError%":J1,"%WeakMap%":typeof WeakMap>"u"?Vc:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vc:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vc:WeakSet,"%Function.prototype.call%":IQ,"%Function.prototype.apply%":Nz,"%Object.defineProperty%":q1,"%Object.getPrototypeOf%":N1,"%Math.abs%":Y1,"%Math.floor%":X1,"%Math.max%":W1,"%Math.min%":m1,"%Math.pow%":G1,"%Math.round%":z1,"%Math.sign%":x1,"%Reflect.getPrototypeOf%":V1};if(kc)try{null.error}catch(c){aX=kc(kc(c)),a8["%Error.prototype%"]=aX}var aX,i1=function c($){var Q;if($==="%AsyncFunction%")Q=uX("async function () {}");else if($==="%GeneratorFunction%")Q=uX("function* () {}");else if($==="%AsyncGeneratorFunction%")Q=uX("async function* () {}");else if($==="%AsyncGenerator%"){var J=c("%AsyncGeneratorFunction%");if(J)Q=J.prototype}else if($==="%AsyncIteratorPrototype%"){var Y=c("%AsyncGenerator%");if(Y&&kc)Q=kc(Y.prototype)}return a8[$]=Q,Q},xz={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ZQ=RQ(),TJ=FJ(),v1=ZQ.call(IQ,Array.prototype.concat),U1=ZQ.call(Nz,Array.prototype.splice),qz=ZQ.call(IQ,String.prototype.replace),fJ=ZQ.call(IQ,String.prototype.slice),j1=ZQ.call(IQ,RegExp.prototype.exec),K1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D1=/\\(\\)?/g,B1=function($){var Q=fJ($,0,1),J=fJ($,-1);if(Q==="%"&&J!=="%")throw new p$("invalid intrinsic syntax, expected closing `%`");else if(J==="%"&&Q!=="%")throw new p$("invalid intrinsic syntax, expected opening `%`");var Y=[];return qz($,K1,function(X,W,m,G){Y[Y.length]=m?qz(G,D1,"$1"):W||X}),Y},H1=function($,Q){var J=$,Y;if(TJ(xz,J))Y=xz[J],J="%"+Y[0]+"%";if(TJ(a8,J)){var X=a8[J];if(X===O$)X=i1(J);if(typeof X>"u"&&!Q)throw new R$("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Y,name:J,value:X}}throw new p$("intrinsic "+$+" does not exist!")};Vz.exports=function($,Q){if(typeof $!=="string"||$.length===0)throw new R$("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!=="boolean")throw new R$('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,$)===null)throw new p$("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=B1($),Y=J.length>0?J[0]:"",X=H1("%"+Y+"%",Q),W=X.name,m=X.value,G=!1,z=X.alias;if(z)Y=z[0],U1(J,v1([0,1],z));for(var x=1,q=!0;x<J.length;x+=1){var M=J[x],N=fJ(M,0,1),w=fJ(M,-1);if((N==='"'||N==="'"||N==="`"||(w==='"'||w==="'"||w==="`"))&&N!==w)throw new p$("property names with quotes must have matching quotes");if(M==="constructor"||!q)G=!0;if(Y+="."+M,W="%"+Y+"%",TJ(a8,W))m=a8[W];else if(m!=null){if(!(M in m)){if(!Q)throw new R$("base intrinsic for "+$+" exists, but the property is not available.");return}if(pQ&&x+1>=J.length){var U=pQ(m,M);if(q=!!U,q&&"get"in U&&!("originalValue"in U.get))m=U.get;else m=m[M]}else q=TJ(m,M),m=m[M];if(q&&!G)a8[W]=m}}return m}});var vz=l((CL,iz)=>{var O1=bX();iz.exports=function(){return O1()&&!!Symbol.toStringTag}});var Kz=l((PL,jz)=>{var R1=wz(),Uz=R1("%Object.defineProperty%",!0),p1=vz()(),I1=FJ(),Z1=CJ(),nJ=p1?Symbol.toStringTag:null;jz.exports=function($,Q){var J=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof J<"u"&&typeof J!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new Z1("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(nJ&&(J||!I1($,nJ)))if(Uz)Uz($,nJ,{configurable:!Y,enumerable:!1,value:Q,writable:!1});else $[nJ]=Q}});var Bz=l((EL,Dz)=>{Dz.exports=function(c,$){return Object.keys($).forEach(function(Q){c[Q]=c[Q]||$[Q]}),c}});var Rz=l((bL,Oz)=>{var oX=LG(),L1=Zc("util"),lX=Zc("path"),_1=Zc("http"),S1=Zc("https"),A1=Zc("url").parse,C1=Zc("fs"),P1=Zc("stream").Stream,E1=Zc("crypto"),hX=EG(),b1=tG(),F1=Kz(),j8=FJ(),yX=Bz();function Hz(c){return String(c).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function jc(c){if(!(this instanceof jc))return new jc(c);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],oX.call(this),c=c||{};for(var $ in c)this[$]=c[$]}L1.inherits(jc,oX);jc.LINE_BREAK=`\r
|
|
10
|
-
`;jc.DEFAULT_CONTENT_TYPE="application/octet-stream";jc.prototype.append=function(c,$,Q){if(Q=Q||{},typeof Q==="string")Q={filename:Q};var J=oX.prototype.append.bind(this);if(typeof $==="number"||$==null)$=String($);if(Array.isArray($)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader(c,$,Q),X=this._multiPartFooter();J(Y),J($),J(X),this._trackLength(Y,$,Q)};jc.prototype._trackLength=function(c,$,Q){var J=0;if(Q.knownLength!=null)J+=Number(Q.knownLength);else if(Buffer.isBuffer($))J=$.length;else if(typeof $==="string")J=Buffer.byteLength($);if(this._valueLength+=J,this._overheadLength+=Buffer.byteLength(c)+jc.LINE_BREAK.length,!$||!$.path&&!($.readable&&j8($,"httpVersion"))&&!($ instanceof P1))return;if(!Q.knownLength)this._valuesToMeasure.push($)};jc.prototype._lengthRetriever=function(c,$){if(j8(c,"fd"))if(c.end!=null&&c.end!=1/0&&c.start!=null)$(null,c.end+1-(c.start?c.start:0));else C1.stat(c.path,function(Q,J){if(Q){$(Q);return}var Y=J.size-(c.start?c.start:0);$(null,Y)});else if(j8(c,"httpVersion"))$(null,Number(c.headers["content-length"]));else if(j8(c,"httpModule"))c.on("response",function(Q){c.pause(),$(null,Number(Q.headers["content-length"]))}),c.resume();else $("Unknown stream")};jc.prototype._multiPartHeader=function(c,$,Q){if(typeof Q.header==="string")return Q.header;var J=this._getContentDisposition($,Q),Y=this._getContentType($,Q),X="",W={"Content-Disposition":["form-data",'name="'+Hz(c)+'"'].concat(J||[]),"Content-Type":[].concat(Y||[])};if(typeof Q.header==="object")yX(W,Q.header);var m;for(var G in W)if(j8(W,G)){if(m=W[G],m==null)continue;if(!Array.isArray(m))m=[m];if(m.length)X+=G+": "+m.join("; ")+jc.LINE_BREAK}return"--"+this.getBoundary()+jc.LINE_BREAK+X+jc.LINE_BREAK};jc.prototype._getContentDisposition=function(c,$){var Q;if(typeof $.filepath==="string")Q=lX.normalize($.filepath).replace(/\\/g,"/");else if($.filename||c&&(c.name||c.path))Q=lX.basename($.filename||c&&(c.name||c.path));else if(c&&c.readable&&j8(c,"httpVersion"))Q=lX.basename(c.client._httpMessage.path||"");if(Q)return'filename="'+Hz(Q)+'"'};jc.prototype._getContentType=function(c,$){var Q=$.contentType;if(!Q&&c&&c.name)Q=hX.lookup(c.name);if(!Q&&c&&c.path)Q=hX.lookup(c.path);if(!Q&&c&&c.readable&&j8(c,"httpVersion"))Q=c.headers["content-type"];if(!Q&&($.filepath||$.filename))Q=hX.lookup($.filepath||$.filename);if(!Q&&c&&typeof c==="object")Q=jc.DEFAULT_CONTENT_TYPE;return Q};jc.prototype._multiPartFooter=function(){return function(c){var $=jc.LINE_BREAK,Q=this._streams.length===0;if(Q)$+=this._lastBoundary();c($)}.bind(this)};jc.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+jc.LINE_BREAK};jc.prototype.getHeaders=function(c){var $,Q={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for($ in c)if(j8(c,$))Q[$.toLowerCase()]=c[$];return Q};jc.prototype.setBoundary=function(c){if(typeof c!=="string")throw TypeError("FormData boundary must be a string");this._boundary=c};jc.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};jc.prototype.getBuffer=function(){var c=new Buffer.alloc(0),$=this.getBoundary();for(var Q=0,J=this._streams.length;Q<J;Q++)if(typeof this._streams[Q]!=="function"){if(Buffer.isBuffer(this._streams[Q]))c=Buffer.concat([c,this._streams[Q]]);else c=Buffer.concat([c,Buffer.from(this._streams[Q])]);if(typeof this._streams[Q]!=="string"||this._streams[Q].substring(2,$.length+2)!==$)c=Buffer.concat([c,Buffer.from(jc.LINE_BREAK)])}return Buffer.concat([c,Buffer.from(this._lastBoundary())])};jc.prototype._generateBoundary=function(){this._boundary="--------------------------"+E1.randomBytes(12).toString("hex")};jc.prototype.getLengthSync=function(){var c=this._overheadLength+this._valueLength;if(this._streams.length)c+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return c};jc.prototype.hasKnownLength=function(){var c=!0;if(this._valuesToMeasure.length)c=!1;return c};jc.prototype.getLength=function(c){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(c.bind(this,null,$));return}b1.parallel(this._valuesToMeasure,this._lengthRetriever,function(Q,J){if(Q){c(Q);return}J.forEach(function(Y){$+=Y}),c(null,$)})};jc.prototype.submit=function(c,$){var Q,J,Y={method:"post"};if(typeof c==="string")c=A1(c),J=yX({port:c.port,path:c.pathname,host:c.hostname,protocol:c.protocol},Y);else if(J=yX(c,Y),!J.port)J.port=J.protocol==="https:"?443:80;if(J.headers=this.getHeaders(c.headers),J.protocol==="https:")Q=S1.request(J);else Q=_1.request(J);return this.getLength(function(X,W){if(X&&X!=="Unknown stream"){this._error(X);return}if(W)Q.setHeader("Content-Length",W);if(this.pipe(Q),$){var m,G=function(z,x){return Q.removeListener("error",G),Q.removeListener("response",m),$.call(this,z,x)};m=G.bind(this,null),Q.on("error",G),Q.on("response",m)}}.bind(this)),Q};jc.prototype._error=function(c){if(!this.error)this.error=c,this.pause(),this.emit("error",c)};jc.prototype.toString=function(){return"[object FormData]"};F1(jc.prototype,"FormData");Oz.exports=jc});var pz,uJ;var gX=d(()=>{pz=DX(Rz(),1),uJ=pz.default});function sX(c){return V.isPlainObject(c)||V.isArray(c)}function Iz(c){return V.endsWith(c,"[]")?c.slice(0,-2):c}function dX(c,$,Q){if(!c)return $;return c.concat($).map(function(Y,X){return Y=Iz(Y),!Q&&X?"["+Y+"]":Y}).join(Q?".":"")}function T1(c){return V.isArray(c)&&!c.some(sX)}function n1(c,$,Q){if(!V.isObject(c))throw TypeError("target must be an object");$=$||new(uJ||FormData),Q=V.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,D){return!V.isUndefined(D[j])});let J=Q.metaTokens,Y=Q.visitor||w,X=Q.dots,W=Q.indexes,m=Q.Blob||typeof Blob<"u"&&Blob,G=Q.maxDepth===void 0?rX:Q.maxDepth,z=m&&V.isSpecCompliantForm($),x=[];if(!V.isFunction(Y))throw TypeError("visitor must be a function");function q(i){if(i===null)return"";if(V.isDate(i))return i.toISOString();if(V.isBoolean(i))return i.toString();if(!z&&V.isBlob(i))throw new O("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(i)||V.isTypedArray(i))return z&&typeof Blob==="function"?new Blob([i]):Buffer.from(i);return i}function M(i){if(i>G)throw new O("Object is too deeply nested ("+i+" levels). Max depth: "+G,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function N(i,j){if(G===1/0)return JSON.stringify(i);let D=[];return JSON.stringify(i,function(mc,g){if(!V.isObject(g))return g;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(g),M(j+D.length-1),g})}function w(i,j,D){let _=i;if(V.isReactNative($)&&V.isReactNativeBlob(i))return $.append(dX(D,j,X),q(i)),!1;if(i&&!D&&typeof i==="object"){if(V.endsWith(j,"{}"))j=J?j:j.slice(0,-2),i=N(i,1);else if(V.isArray(i)&&T1(i)||(V.isFileList(i)||V.endsWith(j,"[]"))&&(_=V.toArray(i)))return j=Iz(j),_.forEach(function(g,Jc){!(V.isUndefined(g)||g===null)&&$.append(W===!0?dX([j],Jc,X):W===null?j:j+"[]",q(g))}),!1}if(sX(i))return!0;return $.append(dX(D,j,X),q(i)),!1}let U=Object.assign(f1,{defaultVisitor:w,convertValue:q,isVisitable:sX});function v(i,j,D=0){if(V.isUndefined(i))return;if(M(D),x.indexOf(i)!==-1)throw Error("Circular reference detected in "+j.join("."));x.push(i),V.forEach(i,function(mc,g){if((!(V.isUndefined(mc)||mc===null)&&Y.call($,mc,V.isString(g)?g.trim():g,j,U))===!0)v(mc,j?j.concat(g):[g],D+1)}),x.pop()}if(!V.isObject(c))throw TypeError("data must be an object");return v(c),$}var rX=100,f1,K8;var I$=d(()=>{Lc();X0();gX();f1=V.toFlatObject(V,{},null,function($){return/^is[A-Z]/.test($)});K8=n1});function Zz(c){let $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(c).replace(/[!'()~]|%20/g,function(J){return $[J]})}function Lz(c,$){this._pairs=[],c&&K8(c,this,$)}var _z,Sz;var Az=d(()=>{I$();_z=Lz.prototype;_z.append=function($,Q){this._pairs.push([$,Q])};_z.toString=function($){let Q=$?function(J){return $.call(this,J,Zz)}:Zz;return this._pairs.map(function(Y){return Q(Y[0])+"="+Q(Y[1])},"").join("&")};Sz=Lz});function u1(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l8(c,$,Q){if(!$)return c;let J=V.isFunction(Q)?{serialize:Q}:Q,Y=V.getSafeProp(J,"encode")||u1,X=V.getSafeProp(J,"serialize"),W;if(X)W=X($,J);else W=V.isURLSearchParams($)?$.toString():new Sz($,J).toString(Y);if(W){let m=c.indexOf("#");if(m!==-1)c=c.slice(0,m);c+=(c.indexOf("?")===-1?"?":"&")+W}return c}var kJ=d(()=>{Lc();Az()});class Cz{constructor(){this.handlers=[]}use(c,$,Q){return this.handlers.push({fulfilled:c,rejected:$,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(c){if(this.handlers[c])this.handlers[c]=null}clear(){if(this.handlers)this.handlers=[]}forEach(c){V.forEach(this.handlers,function(Q){if(Q!==null)c(Q)})}}var tX;var Pz=d(()=>{Lc();tX=Cz});var D8;var LQ=d(()=>{D8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import k1 from"url";var Ez;var bz=d(()=>{Ez=k1.URLSearchParams});import a1 from"crypto";var eX="abcdefghijklmnopqrstuvwxyz",Fz="0123456789",Tz,l1=(c=16,$=Tz.ALPHA_DIGIT)=>{let Q="",{length:J}=$,Y=new Uint32Array(c);a1.randomFillSync(Y);for(let X=0;X<c;X++)Q+=$[Y[X]%J];return Q},fz;var nz=d(()=>{bz();gX();Tz={DIGIT:Fz,ALPHA:eX,ALPHA_DIGIT:eX+eX.toUpperCase()+Fz},fz={isNode:!0,classes:{URLSearchParams:Ez,FormData:uJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Tz,generateString:l1,protocols:["http","https","file","data"]}});var Q9={};vQ(Q9,{origin:()=>o1,navigator:()=>c9,hasStandardBrowserWebWorkerEnv:()=>y1,hasStandardBrowserEnv:()=>h1,hasBrowserEnv:()=>$9});var $9,c9,h1,y1,o1;var uz=d(()=>{$9=typeof window<"u"&&typeof document<"u",c9=typeof navigator==="object"&&navigator||void 0,h1=$9&&(!c9||["ReactNative","NativeScript","NS"].indexOf(c9.product)<0),y1=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),o1=$9&&window.location.href||"http://localhost"});var Bc;var b0=d(()=>{nz();uz();Bc={...Q9,...fz}});function J9(c,$){return K8(c,new Bc.classes.URLSearchParams,{visitor:function(Q,J,Y,X){if(Bc.isNode&&V.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return X.defaultVisitor.apply(this,arguments)},...$})}var kz=d(()=>{Lc();I$();b0()});function lz(c){if(c>az)throw new O("FormData field is too deeply nested ("+c+" levels). Max depth: "+az,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g1(c){let $=[],Q=/\w+|\[(\w*)]/g,J;while((J=Q.exec(c))!==null)lz($.length),$.push(J[0]==="[]"?"":J[1]||J[0]);return $}function d1(c){let $={},Q=Object.keys(c),J,Y=Q.length,X;for(J=0;J<Y;J++)X=Q[J],$[X]=c[X];return $}function s1(c){function $(Q,J,Y,X){lz(X);let W=Q[X++];if(W==="__proto__")return!0;let m=Number.isFinite(+W),G=X>=Q.length;if(W=!W&&V.isArray(Y)?Y.length:W,G){if(V.hasOwnProp(Y,W))Y[W]=V.isArray(Y[W])?Y[W].concat(J):[Y[W],J];else Y[W]=J;return!m}if(!V.hasOwnProp(Y,W)||!V.isObject(Y[W]))Y[W]=[];if($(Q,J,Y[W],X)&&V.isArray(Y[W]))Y[W]=d1(Y[W]);return!m}if(V.isFormData(c)&&V.isFunction(c.entries)){let Q={};return V.forEachEntry(c,(J,Y)=>{$(g1(J),Y,Q,0)}),Q}return null}var az,aJ;var Y9=d(()=>{Lc();X0();I$();az=rX;aJ=s1});function r1(c,$,Q){if(V.isString(c))try{return($||JSON.parse)(c),V.trim(c)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(c)}var Z$=(c,$)=>c!=null&&V.hasOwnProp(c,$)?c[$]:void 0,X9,L$;var lJ=d(()=>{Lc();X0();LQ();I$();kz();b0();Y9();X9={transitional:D8,adapter:["xhr","http","fetch"],transformRequest:[function($,Q){let J=Q.getContentType()||"",Y=J.indexOf("application/json")>-1,X=V.isObject($);if(X&&V.isHTMLForm($))$=new FormData($);if(V.isFormData($))return Y?JSON.stringify(aJ($)):$;if(V.isArrayBuffer($)||V.isBuffer($)||V.isStream($)||V.isFile($)||V.isBlob($)||V.isReadableStream($))return $;if(V.isArrayBufferView($))return $.buffer;if(V.isURLSearchParams($))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let m;if(X){let G=Z$(this,"formSerializer");if(J.indexOf("application/x-www-form-urlencoded")>-1)return J9($,G).toString();if((m=V.isFileList($))||J.indexOf("multipart/form-data")>-1){let z=Z$(this,"env"),x=z&&z.FormData;return K8(m?{"files[]":$}:$,x&&new x,G)}}if(X||Y)return Q.setContentType("application/json",!1),r1($);return $}],transformResponse:[function($){let Q=Z$(this,"transitional")||X9.transitional,J=Q&&Q.forcedJSONParsing,Y=Z$(this,"responseType"),X=Y==="json";if(V.isResponse($)||V.isReadableStream($))return $;if($&&V.isString($)&&(J&&!Y||X)){let m=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse($,Z$(this,"parseReviver"))}catch(G){if(m){if(G.name==="SyntaxError")throw O.from(G,O.ERR_BAD_RESPONSE,this,null,Z$(this,"response"));throw G}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bc.classes.FormData,Blob:Bc.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],(c)=>{X9.headers[c]={}});L$=X9});function _Q(c,$){let Q=this||L$,J=$||Q,Y=_c.from(J.headers),X=J.data;return V.forEach(c,function(m){X=m.call(Q,X,Y.normalize(),$?$.status:void 0)}),Y.normalize(),X}var hz=d(()=>{Lc();lJ();P0()});function SQ(c){return!!(c&&c.__CANCEL__)}var yz,w0;var h8=d(()=>{X0();yz=class yz extends O{constructor(c,$,Q){super(c==null?"canceled":c,O.ERR_CANCELED,$,Q);this.name="CanceledError",this.__CANCEL__=!0}};w0=yz});function d0(c,$,Q){let J=Q.config.validateStatus;if(!Q.status||!J||J(Q.status))c(Q);else $(new O("Request failed with status code "+Q.status,Q.status>=400&&Q.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,Q.config,Q.request,Q))}var hJ=d(()=>{X0()});function W9(c){if(typeof c!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function m9(c,$){return $?c.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):c}function cv(c){let $=0;while($<c.length&&c.charCodeAt($)<=32)$++;return c.slice($)}function $v(c){return cv(c).replace(e1,"")}function oz(c,$){if(typeof c==="string"&&t1.test($v(c)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,$)}function y8(c,$,Q,J){oz($,J);let Y=!W9($);if(c&&(Y||Q===!1))return oz(c,J),m9(c,$);return $}var t1,e1;var yJ=d(()=>{X0();t1=/^https?:(?!\/\/)/i,e1=/[\t\n\r]/g});function Jv(c){try{return new URL(c)}catch{return null}}function gz(c){var $=(typeof c==="string"?Jv(c):c)||{},Q=$.protocol,J=$.host,Y=$.port;if(typeof J!=="string"||!J||typeof Q!=="string")return"";if(Q=Q.split(":",1)[0],J=J.replace(/:\d*$/,""),Y=parseInt(Y)||Qv[Q]||0,!Yv(J,Y))return"";var X=G9(Q+"_proxy")||G9("all_proxy");if(X&&X.indexOf("://")===-1)X=Q+"://"+X;return X}function Yv(c,$){var Q=G9("no_proxy").toLowerCase();if(!Q)return!0;if(Q==="*")return!1;return Q.split(/[,\s]/).every(function(J){if(!J)return!0;var Y=J.match(/^(.+):(\d+)$/),X=Y?Y[1]:J,W=Y?parseInt(Y[2]):0;if(W&&W!==$)return!0;if(!/^[.*]/.test(X))return c!==X;if(X.charAt(0)==="*")X=X.slice(1);return!c.endsWith(X)})}function G9(c){return process.env[c.toLowerCase()]||process.env[c.toUpperCase()]||""}var Qv;var dz=d(()=>{Qv={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var rz=l((b3,sz)=>{var _$=1000,S$=_$*60,A$=S$*60,o8=A$*24,Xv=o8*7,Wv=o8*365.25;sz.exports=function(c,$){$=$||{};var Q=typeof c;if(Q==="string"&&c.length>0)return mv(c);else if(Q==="number"&&isFinite(c))return $.long?zv(c):Gv(c);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function mv(c){if(c=String(c),c.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(!$)return;var Q=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return Q*Wv;case"weeks":case"week":case"w":return Q*Xv;case"days":case"day":case"d":return Q*o8;case"hours":case"hour":case"hrs":case"hr":case"h":return Q*A$;case"minutes":case"minute":case"mins":case"min":case"m":return Q*S$;case"seconds":case"second":case"secs":case"sec":case"s":return Q*_$;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Q;default:return}}function Gv(c){var $=Math.abs(c);if($>=o8)return Math.round(c/o8)+"d";if($>=A$)return Math.round(c/A$)+"h";if($>=S$)return Math.round(c/S$)+"m";if($>=_$)return Math.round(c/_$)+"s";return c+"ms"}function zv(c){var $=Math.abs(c);if($>=o8)return oJ(c,$,o8,"day");if($>=A$)return oJ(c,$,A$,"hour");if($>=S$)return oJ(c,$,S$,"minute");if($>=_$)return oJ(c,$,_$,"second");return c+" ms"}function oJ(c,$,Q,J){var Y=$>=Q*1.5;return Math.round(c/Q)+" "+J+(Y?"s":"")}});var z9=l((F3,tz)=>{function xv(c){Q.debug=Q,Q.default=Q,Q.coerce=G,Q.disable=W,Q.enable=Y,Q.enabled=m,Q.humanize=rz(),Q.destroy=z,Object.keys(c).forEach((x)=>{Q[x]=c[x]}),Q.names=[],Q.skips=[],Q.formatters={};function $(x){let q=0;for(let M=0;M<x.length;M++)q=(q<<5)-q+x.charCodeAt(M),q|=0;return Q.colors[Math.abs(q)%Q.colors.length]}Q.selectColor=$;function Q(x){let q,M=null,N,w;function U(...v){if(!U.enabled)return;let i=U,j=Number(new Date),D=j-(q||j);if(i.diff=D,i.prev=q,i.curr=j,q=j,v[0]=Q.coerce(v[0]),typeof v[0]!=="string")v.unshift("%O");let _=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(g,Jc)=>{if(g==="%%")return"%";_++;let u=Q.formatters[Jc];if(typeof u==="function"){let a=v[_];g=u.call(i,a),v.splice(_,1),_--}return g}),Q.formatArgs.call(i,v),(i.log||Q.log).apply(i,v)}if(U.namespace=x,U.useColors=Q.useColors(),U.color=Q.selectColor(x),U.extend=J,U.destroy=Q.destroy,Object.defineProperty(U,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(M!==null)return M;if(N!==Q.namespaces)N=Q.namespaces,w=Q.enabled(x);return w},set:(v)=>{M=v}}),typeof Q.init==="function")Q.init(U);return U}function J(x,q){let M=Q(this.namespace+(typeof q>"u"?":":q)+x);return M.log=this.log,M}function Y(x){Q.save(x),Q.namespaces=x,Q.names=[],Q.skips=[];let q=(typeof x==="string"?x:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let M of q)if(M[0]==="-")Q.skips.push(M.slice(1));else Q.names.push(M)}function X(x,q){let M=0,N=0,w=-1,U=0;while(M<x.length)if(N<q.length&&(q[N]===x[M]||q[N]==="*"))if(q[N]==="*")w=N,U=M,N++;else M++,N++;else if(w!==-1)N=w+1,U++,M=U;else return!1;while(N<q.length&&q[N]==="*")N++;return N===q.length}function W(){let x=[...Q.names,...Q.skips.map((q)=>"-"+q)].join(",");return Q.enable(""),x}function m(x){for(let q of Q.skips)if(X(x,q))return!1;for(let q of Q.names)if(X(x,q))return!0;return!1}function G(x){if(x instanceof Error)return x.stack||x.message;return x}function z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Q.enable(Q.load()),Q}tz.exports=xv});var c5=l((ez,gJ)=>{ez.formatArgs=Mv;ez.save=Nv;ez.load=Vv;ez.useColors=qv;ez.storage=wv();ez.destroy=(()=>{let c=!1;return()=>{if(!c)c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();ez.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function qv(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Mv(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+gJ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;c.splice(1,0,$,"color: inherit");let Q=0,J=0;c[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(Q++,Y==="%c")J=Q}),c.splice(J,0,$)}ez.log=console.debug||console.log||(()=>{});function Nv(c){try{if(c)ez.storage.setItem("debug",c);else ez.storage.removeItem("debug")}catch($){}}function Vv(){let c;try{c=ez.storage.getItem("debug")||ez.storage.getItem("DEBUG")}catch($){}if(!c&&typeof process<"u"&&"env"in process)c=process.env.DEBUG;return c}function wv(){try{return localStorage}catch(c){}}gJ.exports=z9()(ez);var{formatters:iv}=gJ.exports;iv.j=function(c){try{return JSON.stringify(c)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var Q5=l((f3,$5)=>{$5.exports=(c,$=process.argv)=>{let Q=c.startsWith("-")?"":c.length===1?"-":"--",J=$.indexOf(Q+c),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var X5=l((n3,Y5)=>{var Ov=Zc("os"),J5=Zc("tty"),B0=Q5(),{env:ac}=process,B8;if(B0("no-color")||B0("no-colors")||B0("color=false")||B0("color=never"))B8=0;else if(B0("color")||B0("colors")||B0("color=true")||B0("color=always"))B8=1;if("FORCE_COLOR"in ac)if(ac.FORCE_COLOR==="true")B8=1;else if(ac.FORCE_COLOR==="false")B8=0;else B8=ac.FORCE_COLOR.length===0?1:Math.min(parseInt(ac.FORCE_COLOR,10),3);function x9(c){if(c===0)return!1;return{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function q9(c,$){if(B8===0)return 0;if(B0("color=16m")||B0("color=full")||B0("color=truecolor"))return 3;if(B0("color=256"))return 2;if(c&&!$&&B8===void 0)return 0;let Q=B8||0;if(ac.TERM==="dumb")return Q;if(process.platform==="win32"){let J=Ov.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in ac){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in ac))||ac.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in ac)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ac.TEAMCITY_VERSION)?1:0;if(ac.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ac){let J=parseInt((ac.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ac.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ac.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ac.TERM))return 1;if("COLORTERM"in ac)return 1;return Q}function Rv(c){let $=q9(c,c&&c.isTTY);return x9($)}Y5.exports={supportsColor:Rv,stdout:x9(q9(!0,J5.isatty(1))),stderr:x9(q9(!0,J5.isatty(2)))}});var z5=l((m5,sJ)=>{var pv=Zc("tty"),dJ=Zc("util");m5.init=Cv;m5.log=_v;m5.formatArgs=Zv;m5.save=Sv;m5.load=Av;m5.useColors=Iv;m5.destroy=dJ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");m5.colors=[6,2,3,4,5,1];try{let c=X5();if(c&&(c.stderr||c).level>=2)m5.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(c){}m5.inspectOpts=Object.keys(process.env).filter((c)=>{return/^debug_/i.test(c)}).reduce((c,$)=>{let Q=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,X)=>{return X.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return c[Q]=J,c},{});function Iv(){return"colors"in m5.inspectOpts?Boolean(m5.inspectOpts.colors):pv.isatty(process.stderr.fd)}function Zv(c){let{namespace:$,useColors:Q}=this;if(Q){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),X=` ${Y};1m${$} \x1B[0m`;c[0]=X+c[0].split(`
|
|
9
|
+
*/var K7=EV(),IN=j0("path").extname,kV=/^\s*([^;\s]*)(?:;|\s|$)/,PN=/^text\//i;cN.charset=cV;cN.charsets={lookup:cV};cN.contentType=TN;cN.extension=AN;cN.extensions=Object.create(null);cN.lookup=EN;cN.types=Object.create(null);kN(cN.extensions,cN.types);function cV($){if(!$||typeof $!=="string")return!1;var Q=kV.exec($),J=Q&&K7[Q[1].toLowerCase()];if(J&&J.charset)return J.charset;if(Q&&PN.test(Q[1]))return"UTF-8";return!1}function TN($){if(!$||typeof $!=="string")return!1;var Q=$.indexOf("/")===-1?cN.lookup($):$;if(!Q)return!1;if(Q.indexOf("charset")===-1){var J=cN.charset(Q);if(J)Q+="; charset="+J.toLowerCase()}return Q}function AN($){if(!$||typeof $!=="string")return!1;var Q=kV.exec($),J=Q&&cN.extensions[Q[1].toLowerCase()];if(!J||!J.length)return!1;return J[0]}function EN($){if(!$||typeof $!=="string")return!1;var Q=IN("x."+$).toLowerCase().substr(1);if(!Q)return!1;return cN.types[Q]||!1}function kN($,Q){var J=["nginx","apache",void 0,"iana"];Object.keys(K7).forEach(function(Y){var G=K7[Y],q=G.extensions;if(!q||!q.length)return;$[Y]=q;for(var W=0;W<q.length;W++){var z=q[W];if(Q[z]){var V=J.indexOf(K7[Q[z]].source),K=J.indexOf(G.source);if(Q[z]!=="application/octet-stream"&&(V>K||V===K&&Q[z].substr(0,12)==="application/"))continue}Q[z]=Y}})}});var yV=g((Kd,mV)=>{mV.exports=mN;function mN($){var Q=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(Q)Q($);else setTimeout($,0)}});var c5=g((Ud,pV)=>{var hV=yV();pV.exports=yN;function yN($){var Q=!1;return hV(function(){Q=!0}),function(X,Y){if(Q)$(X,Y);else hV(function(){$(X,Y)})}}});var S5=g((xd,uV)=>{uV.exports=hN;function hN($){Object.keys($.jobs).forEach(pN.bind($)),$.jobs={}}function pN($){if(typeof this.jobs[$]=="function")this.jobs[$]()}});var b5=g((Md,lV)=>{var gV=c5(),uN=S5();lV.exports=gN;function gN($,Q,J,X){var Y=J.keyedList?J.keyedList[J.index]:J.index;J.jobs[Y]=lN(Q,Y,$[Y],function(G,q){if(!(Y in J.jobs))return;if(delete J.jobs[Y],G)uN(J);else J.results[Y]=q;X(G,J.results)})}function lN($,Q,J,X){var Y;if($.length==2)Y=$(J,gV(X));else Y=$(J,Q,gV(X));return Y}});var f5=g((Hd,iV)=>{iV.exports=iN;function iN($,Q){var J=!Array.isArray($),X={index:0,keyedList:J||Q?Object.keys($):null,jobs:{},results:J?{}:[],size:J?Object.keys($).length:$.length};if(Q)X.keyedList.sort(J?Q:function(Y,G){return Q($[Y],$[G])});return X}});var m5=g((Bd,nV)=>{var nN=S5(),dN=c5();nV.exports=aN;function aN($){if(!Object.keys(this.jobs).length)return;this.index=this.size,nN(this),dN($)(null,this.results)}});var aV=g((Zd,dV)=>{var oN=b5(),sN=f5(),rN=m5();dV.exports=tN;function tN($,Q,J){var X=sN($);while(X.index<(X.keyedList||$).length)oN($,Q,X,function(Y,G){if(Y){J(Y,G);return}if(Object.keys(X.jobs).length===0){J(null,X.results);return}}),X.index++;return rN.bind(X,J)}});var y5=g((wd,U7)=>{var oV=b5(),eN=f5(),$v=m5();U7.exports=Qv;U7.exports.ascending=sV;U7.exports.descending=Jv;function Qv($,Q,J,X){var Y=eN($,J);return oV($,Q,Y,function G(q,W){if(q){X(q,W);return}if(Y.index++,Y.index<(Y.keyedList||$).length){oV($,Q,Y,G);return}X(null,Y.results)}),$v.bind(Y,X)}function sV($,Q){return $<Q?-1:$>Q?1:0}function Jv($,Q){return-1*sV($,Q)}});var tV=g((jd,rV)=>{var Xv=y5();rV.exports=Yv;function Yv($,Q,J){return Xv($,Q,null,J)}});var $4=g((Ld,eV)=>{eV.exports={parallel:aV(),serial:tV(),serialOrdered:y5()}});var h5=g((Rd,Q4)=>{Q4.exports=Object});var X4=g((Dd,J4)=>{J4.exports=Error});var G4=g((_d,Y4)=>{Y4.exports=EvalError});var W4=g((Nd,q4)=>{q4.exports=RangeError});var V4=g((vd,z4)=>{z4.exports=ReferenceError});var U4=g((Od,K4)=>{K4.exports=SyntaxError});var x7=g((Fd,x4)=>{x4.exports=TypeError});var H4=g((Cd,M4)=>{M4.exports=URIError});var Z4=g((Id,B4)=>{B4.exports=Math.abs});var j4=g((Pd,w4)=>{w4.exports=Math.floor});var R4=g((Td,L4)=>{L4.exports=Math.max});var _4=g((Ad,D4)=>{D4.exports=Math.min});var v4=g((Ed,N4)=>{N4.exports=Math.pow});var F4=g((kd,O4)=>{O4.exports=Math.round});var I4=g((cd,C4)=>{C4.exports=Number.isNaN||function(Q){return Q!==Q}});var T4=g((Sd,P4)=>{var Gv=I4();P4.exports=function(Q){if(Gv(Q)||Q===0)return Q;return Q<0?-1:1}});var E4=g((bd,A4)=>{A4.exports=Object.getOwnPropertyDescriptor});var p5=g((fd,k4)=>{var M7=E4();if(M7)try{M7([],"length")}catch($){M7=null}k4.exports=M7});var S4=g((md,c4)=>{var H7=Object.defineProperty||!1;if(H7)try{H7({},"a",{value:1})}catch($){H7=!1}c4.exports=H7});var u5=g((yd,b4)=>{b4.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Q={},J=Symbol("test"),X=Object(J);if(typeof J==="string")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(X)!=="[object Symbol]")return!1;var Y=42;Q[J]=Y;for(var G in Q)return!1;if(typeof Object.keys==="function"&&Object.keys(Q).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Q).length!==0)return!1;var q=Object.getOwnPropertySymbols(Q);if(q.length!==1||q[0]!==J)return!1;if(!Object.prototype.propertyIsEnumerable.call(Q,J))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var W=Object.getOwnPropertyDescriptor(Q,J);if(W.value!==Y||W.enumerable!==!0)return!1}return!0}});var y4=g((hd,m4)=>{var f4=typeof Symbol<"u"&&Symbol,qv=u5();m4.exports=function(){if(typeof f4!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof f4("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return qv()}});var g5=g((pd,h4)=>{h4.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var l5=g((ud,p4)=>{var Wv=h5();p4.exports=Wv.getPrototypeOf||null});var l4=g((gd,g4)=>{var zv="Function.prototype.bind called on incompatible ",Vv=Object.prototype.toString,Kv=Math.max,Uv="[object Function]",u4=function(Q,J){var X=[];for(var Y=0;Y<Q.length;Y+=1)X[Y]=Q[Y];for(var G=0;G<J.length;G+=1)X[G+Q.length]=J[G];return X},xv=function(Q,J){var X=[];for(var Y=J||0,G=0;Y<Q.length;Y+=1,G+=1)X[G]=Q[Y];return X},Mv=function($,Q){var J="";for(var X=0;X<$.length;X+=1)if(J+=$[X],X+1<$.length)J+=Q;return J};g4.exports=function(Q){var J=this;if(typeof J!=="function"||Vv.apply(J)!==Uv)throw TypeError(zv+J);var X=xv(arguments,1),Y,G=function(){if(this instanceof Y){var K=J.apply(this,u4(X,arguments));if(Object(K)===K)return K;return this}return J.apply(Q,u4(X,arguments))},q=Kv(0,J.length-X.length),W=[];for(var z=0;z<q;z++)W[z]="$"+z;if(Y=Function("binder","return function ("+Mv(W,",")+"){ return binder.apply(this,arguments); }")(G),J.prototype){var V=function(){};V.prototype=J.prototype,Y.prototype=new V,V.prototype=null}return Y}});var fX=g((ld,i4)=>{var Hv=l4();i4.exports=Function.prototype.bind||Hv});var B7=g((id,n4)=>{n4.exports=Function.prototype.call});var i5=g((nd,d4)=>{d4.exports=Function.prototype.apply});var o4=g((dd,a4)=>{a4.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var r4=g((ad,s4)=>{var Bv=fX(),Zv=i5(),wv=B7(),jv=o4();s4.exports=jv||Bv.call(wv,Zv)});var e4=g((od,t4)=>{var Lv=fX(),Rv=x7(),Dv=B7(),_v=r4();t4.exports=function(Q){if(Q.length<1||typeof Q[0]!=="function")throw new Rv("a function is required");return _v(Lv,Dv,Q)}});var G2=g((sd,Y2)=>{var Nv=e4(),$2=p5(),J2;try{J2=[].__proto__===Array.prototype}catch($){if(!$||typeof $!=="object"||!("code"in $)||$.code!=="ERR_PROTO_ACCESS")throw $}var n5=!!J2&&$2&&$2(Object.prototype,"__proto__"),X2=Object,Q2=X2.getPrototypeOf;Y2.exports=n5&&typeof n5.get==="function"?Nv([n5.get]):typeof Q2==="function"?function(Q){return Q2(Q==null?Q:X2(Q))}:!1});var K2=g((rd,V2)=>{var q2=g5(),W2=l5(),z2=G2();V2.exports=q2?function(Q){return q2(Q)}:W2?function(Q){if(!Q||typeof Q!=="object"&&typeof Q!=="function")throw TypeError("getProto: not an object");return W2(Q)}:z2?function(Q){return z2(Q)}:null});var Z7=g((td,U2)=>{var vv=Function.prototype.call,Ov=Object.prototype.hasOwnProperty,Fv=fX();U2.exports=Fv.call(vv,Ov)});var w2=g((ed,Z2)=>{var Z0,Cv=h5(),Iv=X4(),Pv=G4(),Tv=W4(),Av=V4(),jJ=U4(),wJ=x7(),Ev=H4(),kv=Z4(),cv=j4(),Sv=R4(),bv=_4(),fv=v4(),mv=F4(),yv=T4(),H2=Function,d5=function($){try{return H2('"use strict"; return ('+$+").constructor;")()}catch(Q){}},mX=p5(),hv=S4(),a5=function(){throw new wJ},pv=mX?function(){try{return arguments.callee,a5}catch($){try{return mX(arguments,"callee").get}catch(Q){return a5}}}():a5,BJ=y4()(),n0=K2(),uv=l5(),gv=g5(),B2=i5(),yX=B7(),ZJ={},lv=typeof Uint8Array>"u"||!n0?Z0:n0(Uint8Array),vQ={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Z0:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Z0:ArrayBuffer,"%ArrayIteratorPrototype%":BJ&&n0?n0([][Symbol.iterator]()):Z0,"%AsyncFromSyncIteratorPrototype%":Z0,"%AsyncFunction%":ZJ,"%AsyncGenerator%":ZJ,"%AsyncGeneratorFunction%":ZJ,"%AsyncIteratorPrototype%":ZJ,"%Atomics%":typeof Atomics>"u"?Z0:Atomics,"%BigInt%":typeof BigInt>"u"?Z0:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Z0:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Z0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Z0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Iv,"%eval%":eval,"%EvalError%":Pv,"%Float16Array%":typeof Float16Array>"u"?Z0:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Z0:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Z0:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Z0:FinalizationRegistry,"%Function%":H2,"%GeneratorFunction%":ZJ,"%Int8Array%":typeof Int8Array>"u"?Z0:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Z0:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Z0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":BJ&&n0?n0(n0([][Symbol.iterator]())):Z0,"%JSON%":typeof JSON==="object"?JSON:Z0,"%Map%":typeof Map>"u"?Z0:Map,"%MapIteratorPrototype%":typeof Map>"u"||!BJ||!n0?Z0:n0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Cv,"%Object.getOwnPropertyDescriptor%":mX,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Z0:Promise,"%Proxy%":typeof Proxy>"u"?Z0:Proxy,"%RangeError%":Tv,"%ReferenceError%":Av,"%Reflect%":typeof Reflect>"u"?Z0:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Z0:Set,"%SetIteratorPrototype%":typeof Set>"u"||!BJ||!n0?Z0:n0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Z0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":BJ&&n0?n0(""[Symbol.iterator]()):Z0,"%Symbol%":BJ?Symbol:Z0,"%SyntaxError%":jJ,"%ThrowTypeError%":pv,"%TypedArray%":lv,"%TypeError%":wJ,"%Uint8Array%":typeof Uint8Array>"u"?Z0:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Z0:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Z0:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Z0:Uint32Array,"%URIError%":Ev,"%WeakMap%":typeof WeakMap>"u"?Z0:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Z0:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Z0:WeakSet,"%Function.prototype.call%":yX,"%Function.prototype.apply%":B2,"%Object.defineProperty%":hv,"%Object.getPrototypeOf%":uv,"%Math.abs%":kv,"%Math.floor%":cv,"%Math.max%":Sv,"%Math.min%":bv,"%Math.pow%":fv,"%Math.round%":mv,"%Math.sign%":yv,"%Reflect.getPrototypeOf%":gv};if(n0)try{null.error}catch($){o5=n0(n0($)),vQ["%Error.prototype%"]=o5}var o5,iv=function $(Q){var J;if(Q==="%AsyncFunction%")J=d5("async function () {}");else if(Q==="%GeneratorFunction%")J=d5("function* () {}");else if(Q==="%AsyncGeneratorFunction%")J=d5("async function* () {}");else if(Q==="%AsyncGenerator%"){var X=$("%AsyncGeneratorFunction%");if(X)J=X.prototype}else if(Q==="%AsyncIteratorPrototype%"){var Y=$("%AsyncGenerator%");if(Y&&n0)J=n0(Y.prototype)}return vQ[Q]=J,J},x2={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hX=fX(),w7=Z7(),nv=hX.call(yX,Array.prototype.concat),dv=hX.call(B2,Array.prototype.splice),M2=hX.call(yX,String.prototype.replace),j7=hX.call(yX,String.prototype.slice),av=hX.call(yX,RegExp.prototype.exec),ov=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sv=/\\(\\)?/g,rv=function(Q){var J=j7(Q,0,1),X=j7(Q,-1);if(J==="%"&&X!=="%")throw new jJ("invalid intrinsic syntax, expected closing `%`");else if(X==="%"&&J!=="%")throw new jJ("invalid intrinsic syntax, expected opening `%`");var Y=[];return M2(Q,ov,function(G,q,W,z){Y[Y.length]=W?M2(z,sv,"$1"):q||G}),Y},tv=function(Q,J){var X=Q,Y;if(w7(x2,X))Y=x2[X],X="%"+Y[0]+"%";if(w7(vQ,X)){var G=vQ[X];if(G===ZJ)G=iv(X);if(typeof G>"u"&&!J)throw new wJ("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:Y,name:X,value:G}}throw new jJ("intrinsic "+Q+" does not exist!")};Z2.exports=function(Q,J){if(typeof Q!=="string"||Q.length===0)throw new wJ("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof J!=="boolean")throw new wJ('"allowMissing" argument must be a boolean');if(av(/^%?[^%]*%?$/,Q)===null)throw new jJ("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=rv(Q),Y=X.length>0?X[0]:"",G=tv("%"+Y+"%",J),q=G.name,W=G.value,z=!1,V=G.alias;if(V)Y=V[0],dv(X,nv([0,1],V));for(var K=1,U=!0;K<X.length;K+=1){var x=X[K],M=j7(x,0,1),H=j7(x,-1);if((M==='"'||M==="'"||M==="`"||(H==='"'||H==="'"||H==="`"))&&M!==H)throw new jJ("property names with quotes must have matching quotes");if(x==="constructor"||!U)z=!0;if(Y+="."+x,q="%"+Y+"%",w7(vQ,q))W=vQ[q];else if(W!=null){if(!(x in W)){if(!J)throw new wJ("base intrinsic for "+Q+" exists, but the property is not available.");return}if(mX&&K+1>=X.length){var w=mX(W,x);if(U=!!w,U&&"get"in w&&!("originalValue"in w.get))W=w.get;else W=W[x]}else U=w7(W,x),W=W[x];if(U&&!z)vQ[q]=W}}return W}});var L2=g(($a,j2)=>{var ev=u5();j2.exports=function(){return ev()&&!!Symbol.toStringTag}});var _2=g((Qa,D2)=>{var $O=w2(),R2=$O("%Object.defineProperty%",!0),QO=L2()(),JO=Z7(),XO=x7(),L7=QO?Symbol.toStringTag:null;D2.exports=function(Q,J){var X=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof X<"u"&&typeof X!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new XO("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(L7&&(X||!JO(Q,L7)))if(R2)R2(Q,L7,{configurable:!Y,enumerable:!1,value:J,writable:!1});else Q[L7]=J}});var v2=g((Ja,N2)=>{N2.exports=function($,Q){return Object.keys(Q).forEach(function(J){$[J]=$[J]||Q[J]}),$}});var C2=g((Xa,F2)=>{var e5=AV(),YO=j0("util"),s5=j0("path"),GO=j0("http"),qO=j0("https"),WO=j0("url").parse,zO=j0("fs"),VO=j0("stream").Stream,KO=j0("crypto"),r5=fV(),UO=$4(),xO=_2(),i$=Z7(),t5=v2();function O2($){return String($).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function _0($){if(!(this instanceof _0))return new _0($);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e5.call(this),$=$||{};for(var Q in $)this[Q]=$[Q]}YO.inherits(_0,e5);_0.LINE_BREAK=`\r
|
|
10
|
+
`;_0.DEFAULT_CONTENT_TYPE="application/octet-stream";_0.prototype.append=function($,Q,J){if(J=J||{},typeof J==="string")J={filename:J};var X=e5.prototype.append.bind(this);if(typeof Q==="number"||Q==null)Q=String(Q);if(Array.isArray(Q)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader($,Q,J),G=this._multiPartFooter();X(Y),X(Q),X(G),this._trackLength(Y,Q,J)};_0.prototype._trackLength=function($,Q,J){var X=0;if(J.knownLength!=null)X+=Number(J.knownLength);else if(Buffer.isBuffer(Q))X=Q.length;else if(typeof Q==="string")X=Buffer.byteLength(Q);if(this._valueLength+=X,this._overheadLength+=Buffer.byteLength($)+_0.LINE_BREAK.length,!Q||!Q.path&&!(Q.readable&&i$(Q,"httpVersion"))&&!(Q instanceof VO))return;if(!J.knownLength)this._valuesToMeasure.push(Q)};_0.prototype._lengthRetriever=function($,Q){if(i$($,"fd"))if($.end!=null&&$.end!=1/0&&$.start!=null)Q(null,$.end+1-($.start?$.start:0));else zO.stat($.path,function(J,X){if(J){Q(J);return}var Y=X.size-($.start?$.start:0);Q(null,Y)});else if(i$($,"httpVersion"))Q(null,Number($.headers["content-length"]));else if(i$($,"httpModule"))$.on("response",function(J){$.pause(),Q(null,Number(J.headers["content-length"]))}),$.resume();else Q("Unknown stream")};_0.prototype._multiPartHeader=function($,Q,J){if(typeof J.header==="string")return J.header;var X=this._getContentDisposition(Q,J),Y=this._getContentType(Q,J),G="",q={"Content-Disposition":["form-data",'name="'+O2($)+'"'].concat(X||[]),"Content-Type":[].concat(Y||[])};if(typeof J.header==="object")t5(q,J.header);var W;for(var z in q)if(i$(q,z)){if(W=q[z],W==null)continue;if(!Array.isArray(W))W=[W];if(W.length)G+=z+": "+W.join("; ")+_0.LINE_BREAK}return"--"+this.getBoundary()+_0.LINE_BREAK+G+_0.LINE_BREAK};_0.prototype._getContentDisposition=function($,Q){var J;if(typeof Q.filepath==="string")J=s5.normalize(Q.filepath).replace(/\\/g,"/");else if(Q.filename||$&&($.name||$.path))J=s5.basename(Q.filename||$&&($.name||$.path));else if($&&$.readable&&i$($,"httpVersion"))J=s5.basename($.client._httpMessage.path||"");if(J)return'filename="'+O2(J)+'"'};_0.prototype._getContentType=function($,Q){var J=Q.contentType;if(!J&&$&&$.name)J=r5.lookup($.name);if(!J&&$&&$.path)J=r5.lookup($.path);if(!J&&$&&$.readable&&i$($,"httpVersion"))J=$.headers["content-type"];if(!J&&(Q.filepath||Q.filename))J=r5.lookup(Q.filepath||Q.filename);if(!J&&$&&typeof $==="object")J=_0.DEFAULT_CONTENT_TYPE;return J};_0.prototype._multiPartFooter=function(){return function($){var Q=_0.LINE_BREAK,J=this._streams.length===0;if(J)Q+=this._lastBoundary();$(Q)}.bind(this)};_0.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+_0.LINE_BREAK};_0.prototype.getHeaders=function($){var Q,J={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(Q in $)if(i$($,Q))J[Q.toLowerCase()]=$[Q];return J};_0.prototype.setBoundary=function($){if(typeof $!=="string")throw TypeError("FormData boundary must be a string");this._boundary=$};_0.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};_0.prototype.getBuffer=function(){var $=new Buffer.alloc(0),Q=this.getBoundary();for(var J=0,X=this._streams.length;J<X;J++)if(typeof this._streams[J]!=="function"){if(Buffer.isBuffer(this._streams[J]))$=Buffer.concat([$,this._streams[J]]);else $=Buffer.concat([$,Buffer.from(this._streams[J])]);if(typeof this._streams[J]!=="string"||this._streams[J].substring(2,Q.length+2)!==Q)$=Buffer.concat([$,Buffer.from(_0.LINE_BREAK)])}return Buffer.concat([$,Buffer.from(this._lastBoundary())])};_0.prototype._generateBoundary=function(){this._boundary="--------------------------"+KO.randomBytes(12).toString("hex")};_0.prototype.getLengthSync=function(){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return $};_0.prototype.hasKnownLength=function(){var $=!0;if(this._valuesToMeasure.length)$=!1;return $};_0.prototype.getLength=function($){var Q=this._overheadLength+this._valueLength;if(this._streams.length)Q+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick($.bind(this,null,Q));return}UO.parallel(this._valuesToMeasure,this._lengthRetriever,function(J,X){if(J){$(J);return}X.forEach(function(Y){Q+=Y}),$(null,Q)})};_0.prototype.submit=function($,Q){var J,X,Y={method:"post"};if(typeof $==="string")$=WO($),X=t5({port:$.port,path:$.pathname,host:$.hostname,protocol:$.protocol},Y);else if(X=t5($,Y),!X.port)X.port=X.protocol==="https:"?443:80;if(X.headers=this.getHeaders($.headers),X.protocol==="https:")J=qO.request(X);else J=GO.request(X);return this.getLength(function(G,q){if(G&&G!=="Unknown stream"){this._error(G);return}if(q)J.setHeader("Content-Length",q);if(this.pipe(J),Q){var W,z=function(V,K){return J.removeListener("error",z),J.removeListener("response",W),Q.call(this,V,K)};W=z.bind(this,null),J.on("error",z),J.on("response",W)}}.bind(this)),J};_0.prototype._error=function($){if(!this.error)this.error=$,this.pause(),this.emit("error",$)};_0.prototype.toString=function(){return"[object FormData]"};xO(_0.prototype,"FormData");F2.exports=_0});var I2,R7;var $G=R(()=>{I2=G7(C2(),1),R7=I2.default});function JG($){return B.isPlainObject($)||B.isArray($)}function P2($){return B.endsWith($,"[]")?$.slice(0,-2):$}function QG($,Q,J){if(!$)return Q;return $.concat(Q).map(function(Y,G){return Y=P2(Y),!J&&G?"["+Y+"]":Y}).join(J?".":"")}function MO($){return B.isArray($)&&!$.some(JG)}function BO($,Q,J){if(!B.isObject($))throw TypeError("target must be an object");Q=Q||new(R7||FormData),J=B.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,D){return!B.isUndefined(D[L])});let X=J.metaTokens,Y=J.visitor||H,G=J.dots,q=J.indexes,W=J.Blob||typeof Blob<"u"&&Blob,z=J.maxDepth===void 0?XG:J.maxDepth,V=W&&B.isSpecCompliantForm(Q),K=[];if(!B.isFunction(Y))throw TypeError("visitor must be a function");function U(Z){if(Z===null)return"";if(B.isDate(Z))return Z.toISOString();if(B.isBoolean(Z))return Z.toString();if(!V&&B.isBlob(Z))throw new O("Blob is not supported. Use a Buffer instead.");if(B.isArrayBuffer(Z)||B.isTypedArray(Z))return V&&typeof Blob==="function"?new Blob([Z]):Buffer.from(Z);return Z}function x(Z){if(Z>z)throw new O("Object is too deeply nested ("+Z+" levels). Max depth: "+z,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function M(Z,L){if(z===1/0)return JSON.stringify(Z);let D=[];return JSON.stringify(Z,function(J0,n){if(!B.isObject(n))return n;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(n),x(L+D.length-1),n})}function H(Z,L,D){let F=Z;if(B.isReactNative(Q)&&B.isReactNativeBlob(Z))return Q.append(QG(D,L,G),U(Z)),!1;if(Z&&!D&&typeof Z==="object"){if(B.endsWith(L,"{}"))L=X?L:L.slice(0,-2),Z=M(Z,1);else if(B.isArray(Z)&&MO(Z)||(B.isFileList(Z)||B.endsWith(L,"[]"))&&(F=B.toArray(Z)))return L=P2(L),F.forEach(function(n,e){!(B.isUndefined(n)||n===null)&&Q.append(q===!0?QG([L],e,G):q===null?L:L+"[]",U(n))}),!1}if(JG(Z))return!0;return Q.append(QG(D,L,G),U(Z)),!1}let w=Object.assign(HO,{defaultVisitor:H,convertValue:U,isVisitable:JG});function j(Z,L,D=0){if(B.isUndefined(Z))return;if(x(D),K.indexOf(Z)!==-1)throw Error("Circular reference detected in "+L.join("."));K.push(Z),B.forEach(Z,function(J0,n){if((!(B.isUndefined(J0)||J0===null)&&Y.call(Q,J0,B.isString(n)?n.trim():n,L,w))===!0)j(J0,L?L.concat(n):[n],D+1)}),K.pop()}if(!B.isObject($))throw TypeError("data must be an object");return j($),Q}var XG=100,HO,n$;var LJ=R(()=>{A0();K8();$G();HO=B.toFlatObject(B,{},null,function(Q){return/^is[A-Z]/.test(Q)});n$=BO});function T2($){let Q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent($).replace(/[!'()~]|%20/g,function(X){return Q[X]})}function A2($,Q){this._pairs=[],$&&n$($,this,Q)}var E2,k2;var c2=R(()=>{LJ();E2=A2.prototype;E2.append=function(Q,J){this._pairs.push([Q,J])};E2.toString=function(Q){let J=Q?function(X){return Q.call(this,X,T2)}:T2;return this._pairs.map(function(Y){return J(Y[0])+"="+J(Y[1])},"").join("&")};k2=A2});function ZO($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function OQ($,Q,J){if(!Q)return $;let X=B.isFunction(J)?{serialize:J}:J,Y=B.getSafeProp(X,"encode")||ZO,G=B.getSafeProp(X,"serialize"),q;if(G)q=G(Q,X);else q=B.isURLSearchParams(Q)?Q.toString():new k2(Q,X).toString(Y);if(q){let W=$.indexOf("#");if(W!==-1)$=$.slice(0,W);$+=($.indexOf("?")===-1?"?":"&")+q}return $}var D7=R(()=>{A0();c2()});class S2{constructor(){this.handlers=[]}use($,Q,J){return this.handlers.push({fulfilled:$,rejected:Q,synchronous:J?J.synchronous:!1,runWhen:J?J.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){B.forEach(this.handlers,function(J){if(J!==null)$(J)})}}var YG;var b2=R(()=>{A0();YG=S2});var d$;var pX=R(()=>{d$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import wO from"url";var f2;var m2=R(()=>{f2=wO.URLSearchParams});import jO from"crypto";var GG="abcdefghijklmnopqrstuvwxyz",y2="0123456789",h2,LO=($=16,Q=h2.ALPHA_DIGIT)=>{let J="",{length:X}=Q,Y=new Uint32Array($);jO.randomFillSync(Y);for(let G=0;G<$;G++)J+=Q[Y[G]%X];return J},p2;var u2=R(()=>{m2();$G();h2={DIGIT:y2,ALPHA:GG,ALPHA_DIGIT:GG+GG.toUpperCase()+y2},p2={isNode:!0,classes:{URLSearchParams:f2,FormData:R7,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:h2,generateString:LO,protocols:["http","https","file","data"]}});var zG={};VJ(zG,{origin:()=>_O,navigator:()=>qG,hasStandardBrowserWebWorkerEnv:()=>DO,hasStandardBrowserEnv:()=>RO,hasBrowserEnv:()=>WG});var WG,qG,RO,DO,_O;var g2=R(()=>{WG=typeof window<"u"&&typeof document<"u",qG=typeof navigator==="object"&&navigator||void 0,RO=WG&&(!qG||["ReactNative","NativeScript","NS"].indexOf(qG.product)<0),DO=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),_O=WG&&window.location.href||"http://localhost"});var O0;var n8=R(()=>{u2();g2();O0={...zG,...p2}});function VG($,Q){return n$($,new O0.classes.URLSearchParams,{visitor:function(J,X,Y,G){if(O0.isNode&&B.isBuffer(J))return this.append(X,J.toString("base64")),!1;return G.defaultVisitor.apply(this,arguments)},...Q})}var l2=R(()=>{A0();LJ();n8()});function n2($){if($>i2)throw new O("FormData field is too deeply nested ("+$+" levels). Max depth: "+i2,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function NO($){let Q=[],J=/\w+|\[(\w*)]/g,X;while((X=J.exec($))!==null)n2(Q.length),Q.push(X[0]==="[]"?"":X[1]||X[0]);return Q}function vO($){let Q={},J=Object.keys($),X,Y=J.length,G;for(X=0;X<Y;X++)G=J[X],Q[G]=$[G];return Q}function OO($){function Q(J,X,Y,G){n2(G);let q=J[G++];if(q==="__proto__")return!0;let W=Number.isFinite(+q),z=G>=J.length;if(q=!q&&B.isArray(Y)?Y.length:q,z){if(B.hasOwnProp(Y,q))Y[q]=B.isArray(Y[q])?Y[q].concat(X):[Y[q],X];else Y[q]=X;return!W}if(!B.hasOwnProp(Y,q)||!B.isObject(Y[q]))Y[q]=[];if(Q(J,X,Y[q],G)&&B.isArray(Y[q]))Y[q]=vO(Y[q]);return!W}if(B.isFormData($)&&B.isFunction($.entries)){let J={};return B.forEachEntry($,(X,Y)=>{Q(NO(X),Y,J,0)}),J}return null}var i2,_7;var KG=R(()=>{A0();K8();LJ();i2=XG;_7=OO});function FO($,Q,J){if(B.isString($))try{return(Q||JSON.parse)($),B.trim($)}catch(X){if(X.name!=="SyntaxError")throw X}return(J||JSON.stringify)($)}var RJ=($,Q)=>$!=null&&B.hasOwnProp($,Q)?$[Q]:void 0,UG,DJ;var N7=R(()=>{A0();K8();pX();LJ();l2();n8();KG();UG={transitional:d$,adapter:["xhr","http","fetch"],transformRequest:[function(Q,J){let X=J.getContentType()||"",Y=X.indexOf("application/json")>-1,G=B.isObject(Q);if(G&&B.isHTMLForm(Q))Q=new FormData(Q);if(B.isFormData(Q))return Y?JSON.stringify(_7(Q)):Q;if(B.isArrayBuffer(Q)||B.isBuffer(Q)||B.isStream(Q)||B.isFile(Q)||B.isBlob(Q)||B.isReadableStream(Q))return Q;if(B.isArrayBufferView(Q))return Q.buffer;if(B.isURLSearchParams(Q))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Q.toString();let W;if(G){let z=RJ(this,"formSerializer");if(X.indexOf("application/x-www-form-urlencoded")>-1)return VG(Q,z).toString();if((W=B.isFileList(Q))||X.indexOf("multipart/form-data")>-1){let V=RJ(this,"env"),K=V&&V.FormData;return n$(W?{"files[]":Q}:Q,K&&new K,z)}}if(G||Y)return J.setContentType("application/json",!1),FO(Q);return Q}],transformResponse:[function(Q){let J=RJ(this,"transitional")||UG.transitional,X=J&&J.forcedJSONParsing,Y=RJ(this,"responseType"),G=Y==="json";if(B.isResponse(Q)||B.isReadableStream(Q))return Q;if(Q&&B.isString(Q)&&(X&&!Y||G)){let W=!(J&&J.silentJSONParsing)&&G;try{return JSON.parse(Q,RJ(this,"parseReviver"))}catch(z){if(W){if(z.name==="SyntaxError")throw O.from(z,O.ERR_BAD_RESPONSE,this,null,RJ(this,"response"));throw z}}}return Q}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O0.classes.FormData,Blob:O0.classes.Blob},validateStatus:function(Q){return Q>=200&&Q<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch","query"],($)=>{UG.headers[$]={}});DJ=UG});function uX($,Q){let J=this||DJ,X=Q||J,Y=E0.from(X.headers),G=X.data;return B.forEach($,function(W){G=W.call(J,G,Y.normalize(),Q?Q.status:void 0)}),Y.normalize(),G}var d2=R(()=>{A0();N7();l8()});function gX($){return!!($&&$.__CANCEL__)}var a2,D8;var FQ=R(()=>{K8();a2=class a2 extends O{constructor($,Q,J){super($==null?"canceled":$,O.ERR_CANCELED,Q,J);this.name="CanceledError",this.__CANCEL__=!0}};D8=a2});function z$($,Q,J){let X=J.config.validateStatus;if(!J.status||!X||X(J.status))$(J);else Q(new O("Request failed with status code "+J.status,J.status>=400&&J.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,J.config,J.request,J))}var v7=R(()=>{K8()});function xG($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function MG($,Q){return Q?$.replace(/\/?\/$/,"")+"/"+Q.replace(/^\/+/,""):$}function PO($){let Q=0;while(Q<$.length&&$.charCodeAt(Q)<=32)Q++;return $.slice(Q)}function TO($){return PO($).replace(IO,"")}function o2($,Q){if(typeof $==="string"&&CO.test(TO($)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,Q)}function CQ($,Q,J,X){o2(Q,X);let Y=!xG(Q);if($&&(Y||J===!1))return o2($,X),MG($,Q);return Q}var CO,IO;var O7=R(()=>{K8();CO=/^https?:(?!\/\/)/i,IO=/[\t\n\r]/g});function EO($){try{return new URL($)}catch{return null}}function s2($){var Q=(typeof $==="string"?EO($):$)||{},J=Q.protocol,X=Q.host,Y=Q.port;if(typeof X!=="string"||!X||typeof J!=="string")return"";if(J=J.split(":",1)[0],X=X.replace(/:\d*$/,""),Y=parseInt(Y)||AO[J]||0,!kO(X,Y))return"";var G=HG(J+"_proxy")||HG("all_proxy");if(G&&G.indexOf("://")===-1)G=J+"://"+G;return G}function kO($,Q){var J=HG("no_proxy").toLowerCase();if(!J)return!0;if(J==="*")return!1;return J.split(/[,\s]/).every(function(X){if(!X)return!0;var Y=X.match(/^(.+):(\d+)$/),G=Y?Y[1]:X,q=Y?parseInt(Y[2]):0;if(q&&q!==Q)return!0;if(!/^[.*]/.test(G))return $!==G;if(G.charAt(0)==="*")G=G.slice(1);return!$.endsWith(G)})}function HG($){return process.env[$.toLowerCase()]||process.env[$.toUpperCase()]||""}var AO;var r2=R(()=>{AO={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var e2=g((Xo,t2)=>{var _J=1000,NJ=_J*60,vJ=NJ*60,IQ=vJ*24,cO=IQ*7,SO=IQ*365.25;t2.exports=function($,Q){Q=Q||{};var J=typeof $;if(J==="string"&&$.length>0)return bO($);else if(J==="number"&&isFinite($))return Q.long?mO($):fO($);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify($))};function bO($){if($=String($),$.length>100)return;var Q=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec($);if(!Q)return;var J=parseFloat(Q[1]),X=(Q[2]||"ms").toLowerCase();switch(X){case"years":case"year":case"yrs":case"yr":case"y":return J*SO;case"weeks":case"week":case"w":return J*cO;case"days":case"day":case"d":return J*IQ;case"hours":case"hour":case"hrs":case"hr":case"h":return J*vJ;case"minutes":case"minute":case"mins":case"min":case"m":return J*NJ;case"seconds":case"second":case"secs":case"sec":case"s":return J*_J;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return J;default:return}}function fO($){var Q=Math.abs($);if(Q>=IQ)return Math.round($/IQ)+"d";if(Q>=vJ)return Math.round($/vJ)+"h";if(Q>=NJ)return Math.round($/NJ)+"m";if(Q>=_J)return Math.round($/_J)+"s";return $+"ms"}function mO($){var Q=Math.abs($);if(Q>=IQ)return F7($,Q,IQ,"day");if(Q>=vJ)return F7($,Q,vJ,"hour");if(Q>=NJ)return F7($,Q,NJ,"minute");if(Q>=_J)return F7($,Q,_J,"second");return $+" ms"}function F7($,Q,J,X){var Y=Q>=J*1.5;return Math.round($/J)+" "+X+(Y?"s":"")}});var BG=g((Yo,$K)=>{function yO($){J.debug=J,J.default=J,J.coerce=z,J.disable=q,J.enable=Y,J.enabled=W,J.humanize=e2(),J.destroy=V,Object.keys($).forEach((K)=>{J[K]=$[K]}),J.names=[],J.skips=[],J.formatters={};function Q(K){let U=0;for(let x=0;x<K.length;x++)U=(U<<5)-U+K.charCodeAt(x),U|=0;return J.colors[Math.abs(U)%J.colors.length]}J.selectColor=Q;function J(K){let U,x=null,M,H;function w(...j){if(!w.enabled)return;let Z=w,L=Number(new Date),D=L-(U||L);if(Z.diff=D,Z.prev=U,Z.curr=L,U=L,j[0]=J.coerce(j[0]),typeof j[0]!=="string")j.unshift("%O");let F=0;j[0]=j[0].replace(/%([a-zA-Z%])/g,(n,e)=>{if(n==="%%")return"%";F++;let y=J.formatters[e];if(typeof y==="function"){let p=j[F];n=y.call(Z,p),j.splice(F,1),F--}return n}),J.formatArgs.call(Z,j),(Z.log||J.log).apply(Z,j)}if(w.namespace=K,w.useColors=J.useColors(),w.color=J.selectColor(K),w.extend=X,w.destroy=J.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(x!==null)return x;if(M!==J.namespaces)M=J.namespaces,H=J.enabled(K);return H},set:(j)=>{x=j}}),typeof J.init==="function")J.init(w);return w}function X(K,U){let x=J(this.namespace+(typeof U>"u"?":":U)+K);return x.log=this.log,x}function Y(K){J.save(K),J.namespaces=K,J.names=[],J.skips=[];let U=(typeof K==="string"?K:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let x of U)if(x[0]==="-")J.skips.push(x.slice(1));else J.names.push(x)}function G(K,U){let x=0,M=0,H=-1,w=0;while(x<K.length)if(M<U.length&&(U[M]===K[x]||U[M]==="*"))if(U[M]==="*")H=M,w=x,M++;else x++,M++;else if(H!==-1)M=H+1,w++,x=w;else return!1;while(M<U.length&&U[M]==="*")M++;return M===U.length}function q(){let K=[...J.names,...J.skips.map((U)=>"-"+U)].join(",");return J.enable(""),K}function W(K){for(let U of J.skips)if(G(K,U))return!1;for(let U of J.names)if(G(K,U))return!0;return!1}function z(K){if(K instanceof Error)return K.stack||K.message;return K}function V(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return J.enable(J.load()),J}$K.exports=yO});var JK=g((QK,C7)=>{QK.formatArgs=pO;QK.save=uO;QK.load=gO;QK.useColors=hO;QK.storage=lO();QK.destroy=(()=>{let $=!1;return()=>{if(!$)$=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();QK.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function hO(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let $;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&($=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt($[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function pO($){if($[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+$[0]+(this.useColors?"%c ":" ")+"+"+C7.exports.humanize(this.diff),!this.useColors)return;let Q="color: "+this.color;$.splice(1,0,Q,"color: inherit");let J=0,X=0;$[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(J++,Y==="%c")X=J}),$.splice(X,0,Q)}QK.log=console.debug||console.log||(()=>{});function uO($){try{if($)QK.storage.setItem("debug",$);else QK.storage.removeItem("debug")}catch(Q){}}function gO(){let $;try{$=QK.storage.getItem("debug")||QK.storage.getItem("DEBUG")}catch(Q){}if(!$&&typeof process<"u"&&"env"in process)$=process.env.DEBUG;return $}function lO(){try{return localStorage}catch($){}}C7.exports=BG()(QK);var{formatters:iO}=C7.exports;iO.j=function($){try{return JSON.stringify($)}catch(Q){return"[UnexpectedJSONParseError]: "+Q.message}}});var YK=g((qo,XK)=>{XK.exports=($,Q=process.argv)=>{let J=$.startsWith("-")?"":$.length===1?"-":"--",X=Q.indexOf(J+$),Y=Q.indexOf("--");return X!==-1&&(Y===-1||X<Y)}});var WK=g((Wo,qK)=>{var eO=j0("os"),GK=j0("tty"),A8=YK(),{env:d0}=process,a$;if(A8("no-color")||A8("no-colors")||A8("color=false")||A8("color=never"))a$=0;else if(A8("color")||A8("colors")||A8("color=true")||A8("color=always"))a$=1;if("FORCE_COLOR"in d0)if(d0.FORCE_COLOR==="true")a$=1;else if(d0.FORCE_COLOR==="false")a$=0;else a$=d0.FORCE_COLOR.length===0?1:Math.min(parseInt(d0.FORCE_COLOR,10),3);function ZG($){if($===0)return!1;return{level:$,hasBasic:!0,has256:$>=2,has16m:$>=3}}function wG($,Q){if(a$===0)return 0;if(A8("color=16m")||A8("color=full")||A8("color=truecolor"))return 3;if(A8("color=256"))return 2;if($&&!Q&&a$===void 0)return 0;let J=a$||0;if(d0.TERM==="dumb")return J;if(process.platform==="win32"){let X=eO.release().split(".");if(Number(X[0])>=10&&Number(X[2])>=10586)return Number(X[2])>=14931?3:2;return 1}if("CI"in d0){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((X)=>(X in d0))||d0.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in d0)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d0.TEAMCITY_VERSION)?1:0;if(d0.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in d0){let X=parseInt((d0.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d0.TERM_PROGRAM){case"iTerm.app":return X>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(d0.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d0.TERM))return 1;if("COLORTERM"in d0)return 1;return J}function $F($){let Q=wG($,$&&$.isTTY);return ZG(Q)}qK.exports={supportsColor:$F,stdout:ZG(wG(!0,GK.isatty(1))),stderr:ZG(wG(!0,GK.isatty(2)))}});var UK=g((VK,P7)=>{var QF=j0("tty"),I7=j0("util");VK.init=zF;VK.log=GF;VK.formatArgs=XF;VK.save=qF;VK.load=WF;VK.useColors=JF;VK.destroy=I7.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");VK.colors=[6,2,3,4,5,1];try{let $=WK();if($&&($.stderr||$).level>=2)VK.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch($){}VK.inspectOpts=Object.keys(process.env).filter(($)=>{return/^debug_/i.test($)}).reduce(($,Q)=>{let J=Q.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,G)=>{return G.toUpperCase()}),X=process.env[Q];if(/^(yes|on|true|enabled)$/i.test(X))X=!0;else if(/^(no|off|false|disabled)$/i.test(X))X=!1;else if(X==="null")X=null;else X=Number(X);return $[J]=X,$},{});function JF(){return"colors"in VK.inspectOpts?Boolean(VK.inspectOpts.colors):QF.isatty(process.stderr.fd)}function XF($){let{namespace:Q,useColors:J}=this;if(J){let X=this.color,Y="\x1B[3"+(X<8?X:"8;5;"+X),G=` ${Y};1m${Q} \x1B[0m`;$[0]=G+$[0].split(`
|
|
11
11
|
`).join(`
|
|
12
|
-
`+
|
|
13
|
-
`)}function
|
|
14
|
-
`).map((
|
|
15
|
-
`).some((
|
|
12
|
+
`+G),$.push(Y+"m+"+P7.exports.humanize(this.diff)+"\x1B[0m")}else $[0]=YF()+Q+" "+$[0]}function YF(){if(VK.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function GF(...$){return process.stderr.write(I7.formatWithOptions(VK.inspectOpts,...$)+`
|
|
13
|
+
`)}function qF($){if($)process.env.DEBUG=$;else delete process.env.DEBUG}function WF(){return process.env.DEBUG}function zF($){$.inspectOpts={};let Q=Object.keys(VK.inspectOpts);for(let J=0;J<Q.length;J++)$.inspectOpts[Q[J]]=VK.inspectOpts[Q[J]]}P7.exports=BG()(VK);var{formatters:zK}=P7.exports;zK.o=function($){return this.inspectOpts.colors=this.useColors,I7.inspect($,this.inspectOpts).split(`
|
|
14
|
+
`).map((Q)=>Q.trim()).join(" ")};zK.O=function($){return this.inspectOpts.colors=this.useColors,I7.inspect($,this.inspectOpts)}});var iX=g((Vo,jG)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)jG.exports=JK();else jG.exports=UK()});var MK=g((xK)=>{Object.defineProperty(xK,"__esModule",{value:!0});function ZF($){return function(Q,J){return new Promise((X,Y)=>{$.call(this,Q,J,(G,q)=>{if(G)Y(G);else X(q)})})}}xK.default=ZF});var ZK=g((RG,BK)=>{var HK=RG&&RG.__importDefault||function($){return $&&$.__esModule?$:{default:$}},jF=j0("events"),LF=HK(iX()),RF=HK(MK()),nX=LF.default("agent-base");function DF($){return Boolean($)&&typeof $.addRequest==="function"}function LG(){let{stack:$}=Error();if(typeof $!=="string")return!1;return $.split(`
|
|
15
|
+
`).some((Q)=>Q.indexOf("(https.js:")!==-1||Q.indexOf("node:https:")!==-1)}function T7($,Q){return new T7.Agent($,Q)}(function($){class Q extends jF.EventEmitter{constructor(J,X){super();let Y=X;if(typeof J==="function")this.callback=J;else if(J)Y=J;if(this.timeout=null,Y&&typeof Y.timeout==="number")this.timeout=Y.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return LG()?443:80}set defaultPort(J){this.explicitDefaultPort=J}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return LG()?"https:":"http:"}set protocol(J){this.explicitProtocol=J}callback(J,X,Y){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(J,X){let Y=Object.assign({},X);if(typeof Y.secureEndpoint!=="boolean")Y.secureEndpoint=LG();if(Y.host==null)Y.host="localhost";if(Y.port==null)Y.port=Y.secureEndpoint?443:80;if(Y.protocol==null)Y.protocol=Y.secureEndpoint?"https:":"http:";if(Y.host&&Y.path)delete Y.path;delete Y.agent,delete Y.hostname,delete Y._defaultAgent,delete Y.defaultPort,delete Y.createConnection,J._last=!0,J.shouldKeepAlive=!1;let G=!1,q=null,W=Y.timeout||this.timeout,z=(x)=>{if(J._hadError)return;J.emit("error",x),J._hadError=!0},V=()=>{q=null,G=!0;let x=Error(`A "socket" was not created for HTTP request before ${W}ms`);x.code="ETIMEOUT",z(x)},K=(x)=>{if(G)return;if(q!==null)clearTimeout(q),q=null;z(x)},U=(x)=>{if(G)return;if(q!=null)clearTimeout(q),q=null;if(DF(x)){nX("Callback returned another Agent instance %o",x.constructor.name),x.addRequest(J,Y);return}if(x){x.once("free",()=>{this.freeSocket(x,Y)}),J.onSocket(x);return}let M=Error(`no Duplex stream was returned to agent-base for \`${J.method} ${J.path}\``);z(M)};if(typeof this.callback!=="function"){z(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)nX("Converting legacy callback function to promise"),this.promisifiedCallback=RF.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof W==="number"&&W>0)q=setTimeout(V,W);if("port"in Y&&typeof Y.port!=="number")Y.port=Number(Y.port);try{nX("Resolving socket for %o request: %o",Y.protocol,`${J.method} ${J.path}`),Promise.resolve(this.promisifiedCallback(J,Y)).then(U,K)}catch(x){Promise.reject(x).catch(K)}}freeSocket(J,X){nX("Freeing socket %o %o",J.constructor.name,X),J.destroy()}destroy(){nX("Destroying agent %o",this.constructor.name)}}$.Agent=Q,$.prototype=$.Agent.prototype})(T7||(T7={}));BK.exports=T7});var wK=g((aX)=>{var _F=aX&&aX.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(aX,"__esModule",{value:!0});var NF=_F(iX()),dX=NF.default("https-proxy-agent:parse-proxy-response");function vF($){return new Promise((Q,J)=>{let X=0,Y=[];function G(){let U=$.read();if(U)K(U);else $.once("readable",G)}function q(){$.removeListener("end",z),$.removeListener("error",V),$.removeListener("close",W),$.removeListener("readable",G)}function W(U){dX("onclose had error %o",U)}function z(){dX("onend")}function V(U){q(),dX("onerror %o",U),J(U)}function K(U){Y.push(U),X+=U.length;let x=Buffer.concat(Y,X);if(x.indexOf(`\r
|
|
16
16
|
\r
|
|
17
|
-
`)===-1){
|
|
18
|
-
`)),
|
|
19
|
-
`;if(
|
|
20
|
-
`;let
|
|
21
|
-
`);let{statusCode:M,buffered:N}=yield q;if(M===200){if(c.once("socket",QU),$.secureEndpoint){FQ("Upgrading socket connection to TLS");let U=$.servername||$.host;return v5.default.connect(Object.assign(Object.assign({},XU($,"host","hostname","path","port")),{socket:Y,servername:U}))}return Y}Y.destroy();let w=new i5.default.Socket({writable:!1});return w.readable=!0,c.once("socket",(U)=>{FQ("replaying proxy buffer for failed request"),tv.default(U.listenerCount("data")>0),U.push(N),U.push(null)}),w})}}d8.default=U5;function QU(c){c.resume()}function JU(c,$){return Boolean(!$&&c===80||$&&c===443)}function YU(c){return typeof c==="string"?/^https:?$/i.test(c):!1}function XU(c,...$){let Q={},J;for(J in c)if(!$.includes(J))Q[J]=c[J];return Q}});var D5=l((v9,K5)=>{var WU=v9&&v9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},w9=WU(j5());function i9(c){return new w9.default(c)}(function(c){c.HttpsProxyAgent=w9.default,c.prototype=w9.default.prototype})(i9||(i9={}));K5.exports=i9});var H5=l((y3,B5)=>{var TQ;B5.exports=function(){if(!TQ){try{TQ=CQ()("follow-redirects")}catch(c){}if(typeof TQ!=="function")TQ=function(){}}TQ.apply(null,arguments)}});var Z5=l((o3,L9)=>{var nQ=Zc("url"),fQ=nQ.URL,mU=Zc("http"),GU=Zc("https"),B9=Zc("stream").Writable,H9=Zc("assert"),O5=H5();(function(){var $=typeof process<"u",Q=typeof window<"u"&&typeof document<"u",J=r8(Error.captureStackTrace);if(!$&&(Q||!J))console.warn("The follow-redirects package should be excluded from browser builds.")})();var O9=!1;try{H9(new fQ(""))}catch(c){O9=c.code==="ERR_INVALID_URL"}var zU=["Authorization","Proxy-Authorization","Cookie"],xU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],R9=["abort","aborted","connect","error","socket","timeout"],p9=Object.create(null);R9.forEach(function(c){p9[c]=function($,Q,J){this._redirectable.emit(c,$,Q,J)}});var j9=uQ("ERR_INVALID_URL","Invalid URL",TypeError),K9=uQ("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),qU=uQ("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",K9),MU=uQ("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),NU=uQ("ERR_STREAM_WRITE_AFTER_END","write after end"),VU=B9.prototype.destroy||p5;function z0(c,$){if(B9.call(this),this._sanitizeOptions(c),this._options=c,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],$)this.on("response",$);var Q=this;this._onNativeResponse=function(J){try{Q._processResponse(J)}catch(Y){Q.emit("error",Y instanceof K9?Y:new K9({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+zU.concat(c.sensitiveHeaders).map(KU).join("|")+")$","i"),this._performRequest()}z0.prototype=Object.create(B9.prototype);z0.prototype.abort=function(){Z9(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};z0.prototype.destroy=function(c){return Z9(this._currentRequest,c),VU.call(this,c),this};z0.prototype.write=function(c,$,Q){if(this._ending)throw new NU;if(!s8(c)&&!UU(c))throw TypeError("data should be a string, Buffer or Uint8Array");if(r8($))Q=$,$=null;if(c.length===0){if(Q)Q();return}if(this._requestBodyLength+c.length<=this._options.maxBodyLength)this._requestBodyLength+=c.length,this._requestBodyBuffers.push({data:c,encoding:$}),this._currentRequest.write(c,$,Q);else this.emit("error",new MU),this.abort()};z0.prototype.end=function(c,$,Q){if(r8(c))Q=c,c=$=null;else if(r8($))Q=$,$=null;if(!c)this._ended=this._ending=!0,this._currentRequest.end(null,null,Q);else{var J=this,Y=this._currentRequest;this.write(c,$,function(){J._ended=!0,Y.end(null,null,Q)}),this._ending=!0}};z0.prototype.setHeader=function(c,$){this._options.headers[c]=$,this._currentRequest.setHeader(c,$)};z0.prototype.removeHeader=function(c){delete this._options.headers[c],this._currentRequest.removeHeader(c)};z0.prototype.setTimeout=function(c,$){var Q=this;function J(W){W.setTimeout(c),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function Y(W){if(Q._timeout)clearTimeout(Q._timeout);Q._timeout=setTimeout(function(){Q.emit("timeout"),X()},c),J(W)}function X(){if(Q._timeout)clearTimeout(Q._timeout),Q._timeout=null;if(Q.removeListener("abort",X),Q.removeListener("error",X),Q.removeListener("response",X),Q.removeListener("close",X),$)Q.removeListener("timeout",$);if(!Q.socket)Q._currentRequest.removeListener("socket",Y)}if($)this.on("timeout",$);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",J),this.on("abort",X),this.on("error",X),this.on("response",X),this.on("close",X),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(c){z0.prototype[c]=function($,Q){return this._currentRequest[c]($,Q)}});["aborted","connection","socket"].forEach(function(c){Object.defineProperty(z0.prototype,c,{get:function(){return this._currentRequest[c]}})});z0.prototype._sanitizeOptions=function(c){if(!c.headers)c.headers={};if(!vU(c.sensitiveHeaders))c.sensitiveHeaders=[];if(c.host){if(!c.hostname)c.hostname=c.host;delete c.host}if(!c.pathname&&c.path){var $=c.path.indexOf("?");if($<0)c.pathname=c.path;else c.pathname=c.path.substring(0,$),c.search=c.path.substring($)}};z0.prototype._performRequest=function(){var c=this._options.protocol,$=this._options.nativeProtocols[c];if(!$)throw TypeError("Unsupported protocol "+c);if(this._options.agents){var Q=c.slice(0,-1);this._options.agent=this._options.agents[Q]}var J=this._currentRequest=$.request(this._options,this._onNativeResponse);J._redirectable=this;for(var Y of R9)J.on(Y,p9[Y]);if(this._currentUrl=/^\//.test(this._options.path)?nQ.format(this._options):this._options.path,this._isRedirect){var X=0,W=this,m=this._requestBodyBuffers;(function G(z){if(J===W._currentRequest){if(z)W.emit("error",z);else if(X<m.length){var x=m[X++];if(!J.finished)J.write(x.data,x.encoding,G)}else if(W._ended)J.end()}})()}};z0.prototype._processResponse=function(c){var $=c.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:c.headers,statusCode:$});var Q=c.headers.location;if(!Q||this._options.followRedirects===!1||$<300||$>=400){c.responseUrl=this._currentUrl,c.redirects=this._redirects,this.emit("response",c),this._requestBodyBuffers=[];return}if(Z9(this._currentRequest),c.destroy(),++this._redirectCount>this._options.maxRedirects)throw new qU;var J,Y=this._options.beforeRedirect;if(Y)J=Object.assign({Host:c.req.getHeader("host")},this._options.headers);var X=this._options.method;if(($===301||$===302)&&this._options.method==="POST"||$===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],U9(/^content-/i,this._options.headers);var W=U9(/^host$/i,this._options.headers),m=I9(this._currentUrl),G=W||m.host,z=/^\w+:/.test(Q)?this._currentUrl:nQ.format(Object.assign(m,{host:G})),x=wU(Q,z);if(O5("redirecting to",x.href),this._isRedirect=!0,D9(x,this._options),x.protocol!==m.protocol&&x.protocol!=="https:"||x.host!==G&&!iU(x.host,G))U9(this._headerFilter,this._options.headers);if(r8(Y)){var q={headers:c.headers,statusCode:$},M={url:z,method:X,headers:J};Y(this._options,q,M),this._sanitizeOptions(this._options)}this._performRequest()};function R5(c){var $={maxRedirects:21,maxBodyLength:10485760},Q={};return Object.keys(c).forEach(function(J){var Y=J+":",X=Q[Y]=c[J],W=$[J]=Object.create(X);function m(z,x,q){if(jU(z))z=D9(z);else if(s8(z))z=D9(I9(z));else q=x,x=I5(z),z={protocol:Y};if(r8(x))q=x,x=null;if(x=Object.assign({maxRedirects:$.maxRedirects,maxBodyLength:$.maxBodyLength},z,x),x.nativeProtocols=Q,!s8(x.host)&&!s8(x.hostname))x.hostname="::1";return H9.equal(x.protocol,Y,"protocol mismatch"),O5("options",x),new z0(x,q)}function G(z,x,q){var M=W.request(z,x,q);return M.end(),M}Object.defineProperties(W,{request:{value:m,configurable:!0,enumerable:!0,writable:!0},get:{value:G,configurable:!0,enumerable:!0,writable:!0}})}),$}function p5(){}function I9(c){var $;if(O9)$=new fQ(c);else if($=I5(nQ.parse(c)),!s8($.protocol))throw new j9({input:c});return $}function wU(c,$){return O9?new fQ(c,$):I9(nQ.resolve($,c))}function I5(c){if(/^\[/.test(c.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(c.hostname))throw new j9({input:c.href||c});if(/^\[/.test(c.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(c.host))throw new j9({input:c.href||c});return c}function D9(c,$){var Q=$||{};for(var J of xU)Q[J]=c[J];if(Q.hostname.startsWith("["))Q.hostname=Q.hostname.slice(1,-1);if(Q.port!=="")Q.port=Number(Q.port);return Q.path=Q.search?Q.pathname+Q.search:Q.pathname,Q}function U9(c,$){var Q;for(var J in $)if(c.test(J))Q=$[J],delete $[J];return Q===null||typeof Q>"u"?void 0:String(Q).trim()}function uQ(c,$,Q){function J(Y){if(r8(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=c,this.message=this.cause?$+": "+this.cause.message:$}return J.prototype=new(Q||Error),Object.defineProperties(J.prototype,{constructor:{value:J,enumerable:!1},name:{value:"Error ["+c+"]",enumerable:!1}}),J}function Z9(c,$){for(var Q of R9)c.removeListener(Q,p9[Q]);c.on("error",p5),c.destroy($)}function iU(c,$){H9(s8(c)&&s8($));var Q=c.length-$.length-1;return Q>0&&c[Q]==="."&&c.endsWith($)}function vU(c){return c instanceof Array}function s8(c){return typeof c==="string"||c instanceof String}function r8(c){return typeof c==="function"}function UU(c){return typeof c==="object"&&"length"in c}function jU(c){return fQ&&c instanceof fQ}function KU(c){return c.replace(/[\]\\/()*+?.$]/g,"\\$&")}L9.exports=R5({http:mU,https:GU});L9.exports.wrap=R5});var $8="1.18.0";function kQ(c){let $=/^([-+\w]{1,25}):(?:\/\/)?/.exec(c);return $&&$[1]||""}function _9(c,$,Q){let J=Q&&Q.Blob||Bc.classes.Blob,Y=kQ(c);if($===void 0&&J)$=!0;if(Y==="data"){c=Y.length?c.slice(Y.length+1):c;let X=DU.exec(c);if(!X)throw new O("Invalid URL",O.ERR_INVALID_URL);let W=X[1],m=X[2],G=X[3]?"base64":"utf8",z=X[4],x;if(W)x=m?W+m:W;else if(m)x="text/plain"+m;let q=Buffer.from(decodeURIComponent(z),G);if($){if(!J)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new J([q],{type:x})}return q}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var DU;var L5=d(()=>{X0();b0();DU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import BU from"stream";var S9,_5,A9;var S5=d(()=>{Lc();S9=Symbol("internals");_5=class _5 extends BU.Transform{constructor(c){c=V.toFlatObject(c,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(Q,J)=>{return!V.isUndefined(J[Q])});super({readableHighWaterMark:c.chunkSize});let $=this[S9]={timeWindow:c.timeWindow,chunkSize:c.chunkSize,maxRate:c.maxRate,minChunkSize:c.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(Q)=>{if(Q==="progress"){if(!$.isCaptured)$.isCaptured=!0}})}_read(c){let $=this[S9];if($.onReadCallback)$.onReadCallback();return super._read(c)}_transform(c,$,Q){let J=this[S9],Y=J.maxRate,X=this.readableHighWaterMark,W=J.timeWindow,m=1000/W,G=Y/m,z=J.minChunkSize!==!1?Math.max(J.minChunkSize,G*0.01):0,x=(M,N)=>{let w=Buffer.byteLength(M);if(J.bytesSeen+=w,J.bytes+=w,J.isCaptured&&this.emit("progress",J.bytesSeen),this.push(M))process.nextTick(N);else J.onReadCallback=()=>{J.onReadCallback=null,process.nextTick(N)}},q=(M,N)=>{let w=Buffer.byteLength(M),U=null,v=X,i,j=0;if(Y){let D=Date.now();if(!J.ts||(j=D-J.ts)>=W)J.ts=D,i=G-J.bytes,J.bytes=i<0?-i:0,j=0;i=G-J.bytes}if(Y){if(i<=0)return setTimeout(()=>{N(null,M)},W-j);if(i<v)v=i}if(v&&w>v&&w-v>z)U=M.subarray(v),M=M.subarray(0,v);x(M,U?()=>{process.nextTick(N,null,U)}:N)};q(c,function M(N,w){if(N)return Q(N);if(w)q(w,M);else Q(null)})}};A9=_5});var A5,HU=async function*(c){if(c.stream)yield*c.stream();else if(c.arrayBuffer)yield await c.arrayBuffer();else if(c[A5])yield*c[A5]();else yield c},tJ;var C9=d(()=>{({asyncIterator:A5}=Symbol),tJ=HU});import OU from"util";import{Readable as RU}from"stream";class C5{constructor(c,$){let{escapeName:Q}=this.constructor,J=V.isString($),Y=`Content-Disposition: form-data; name="${Q(c)}"${!J&&$.name?`; filename="${Q($.name)}"`:""}${t8}`;if(J)$=aQ.encode(String($).replace(/\r?\n|\r\n?/g,t8));else{let X=String($.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${X}${t8}`}this.headers=aQ.encode(Y+t8),this.contentLength=J?$.byteLength:$.size,this.size=this.headers.byteLength+this.contentLength+ZU,this.name=c,this.value=$}async*encode(){yield this.headers;let{value:c}=this;if(V.isTypedArray(c))yield c;else yield*tJ(c);yield IU}static escapeName(c){return String(c).replace(/[\r\n"]/g,($)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[$])}}var pU,aQ,t8=`\r
|
|
22
|
-
`,IU,ZU=2,LU=(c,$,Q)=>{let{tag:J="form-data-boundary",size:Y=25,boundary:X=J+"-"+Bc.generateString(Y,pU)}=Q||{};if(!V.isFormData(c))throw TypeError("FormData instance required");if(X.length<1||X.length>70)throw Error("boundary must be 1-70 characters long");let W=aQ.encode("--"+X+t8),m=aQ.encode("--"+X+"--"+t8),G=m.byteLength,z=Array.from(c.entries()).map(([q,M])=>{let N=new C5(q,M);return G+=N.size,N});G+=W.byteLength*z.length,G=V.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${X}`};if(Number.isFinite(G))x["Content-Length"]=G;return $&&$(x),RU.from(async function*(){for(let q of z)yield W,yield*q.encode();yield m}())},P5;var E5=d(()=>{Lc();C9();b0();pU=Bc.ALPHABET.ALPHA_DIGIT+"-_",aQ=typeof TextEncoder==="function"?new TextEncoder:new OU.TextEncoder,IU=aQ.encode(t8);P5=LU});import _U from"stream";var b5,F5;var T5=d(()=>{b5=class b5 extends _U.Transform{__transform(c,$,Q){this.push(c),Q()}_transform(c,$,Q){if(c.length!==0){if(this._transform=this.__transform,c[0]!==120){let J=Buffer.alloc(2);J[0]=120,J[1]=156,this.push(J,$)}}this.__transform(c,$,Q)}};F5=b5});import SU from"http2";import AU from"util";class f5{constructor(){this.sessions=Object.create(null)}getSession(c,$){$=Object.assign({sessionTimeout:1000},$);let Q=this.sessions[c];if(Q){let x=Q.length;for(let q=0;q<x;q++){let[M,N]=Q[q];if(!M.destroyed&&!M.closed&&AU.isDeepStrictEqual(N,$))return M}}let J=SU.connect(c,$),Y,X,W=()=>{if(Y)return;if(Y=!0,X)clearTimeout(X),X=null;let x=Q,q=x.length,M=q;while(M--)if(x[M][0]===J){if(q===1)delete this.sessions[c];else x.splice(M,1);if(!J.closed)J.close();return}},m=J.request,{sessionTimeout:G}=$;if(G!=null){let x=0;J.request=function(){let q=m.apply(this,arguments);if(x++,X)clearTimeout(X),X=null;return q.once("close",()=>{if(!--x)X=setTimeout(()=>{X=null,W()},G)}),q}}J.once("close",W);let z=[J,$];return Q?Q.push(z):Q=this.sessions[c]=[z],J}}var n5;var u5=d(()=>{n5=f5});var CU=(c,$)=>{return V.isAsyncFn(c)?function(...Q){let J=Q.pop();c.apply(this,Q).then((Y)=>{try{$?J(null,...$(Y)):J(null,Y)}catch(X){J(X)}},J)}:c},k5;var a5=d(()=>{Lc();k5=CU});function E9(c){let $;try{$=new URL(c)}catch(X){return!1}let Q=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!Q)return!1;if(Q==="*")return!0;let J=Number.parseInt($.port,10)||FU[$.protocol.split(":",1)[0]]||0,Y=h5($.hostname.toLowerCase());return Q.split(/[\s,]+/).some((X)=>{if(!X)return!1;let[W,m]=TU(X);if(W=h5(W),!W)return!1;if(m&&m!==J)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return Y.endsWith(W);return Y===W||l5(Y)&&l5(W)})}var PU,y5=(c)=>{let $=c.split(".");if($.length!==4)return!1;if($[0]!=="127")return!1;return $.every((Q)=>/^\d+$/.test(Q)&&Number(Q)>=0&&Number(Q)<=255)},P9=(c)=>/^0{1,4}$/.test(c),EU=(c)=>{if(c==="::")return!0;let $=c.indexOf("::");if($!==-1){if($!==c.lastIndexOf("::"))return!1;let J=c.slice(0,$),Y=c.slice($+2),X=J?J.split(":"):[],W=Y?Y.split(":"):[];return X.length+W.length<8&&X.every(P9)&&W.every(P9)}let Q=c.split(":");return Q.length===8&&Q.every(P9)},bU=(c)=>{if(c==="::1")return!0;let $=c.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if($)return y5($[1]);let Q=c.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(Q){let Y=parseInt(Q[1],16);return Y>=32512&&Y<=32767}let J=c.split(":");if(J.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(J[Y]))return!1;return/^0*1$/.test(J[7])}return!1},l5=(c)=>{if(!c)return!1;if(PU.has(c))return!0;if(y5(c))return!0;if(EU(c))return!0;return bU(c)},FU,TU=(c)=>{let $=c,Q=0;if($.charAt(0)==="["){let X=$.indexOf("]");if(X!==-1){let W=$.slice(1,X),m=$.slice(X+1);if(m.charAt(0)===":"&&/^\d+$/.test(m.slice(1)))Q=Number.parseInt(m.slice(1),10);return[W,Q]}}let J=$.indexOf(":"),Y=$.lastIndexOf(":");if(J!==-1&&J===Y&&/^\d+$/.test($.slice(Y+1)))Q=Number.parseInt($.slice(Y+1),10),$=$.slice(0,Y);return[$,Q]},fU,nU,uU=(c)=>{if(typeof c!=="string"||c.indexOf(":")===-1)return c;let $=c.match(fU);if($)return $[1];let Q=c.match(nU);if(Q){let J=parseInt(Q[1],16),Y=parseInt(Q[2],16);return`${J>>8}.${J&255}.${Y>>8}.${Y&255}`}return c},h5=(c)=>{if(!c)return c;if(c.charAt(0)==="["&&c.charAt(c.length-1)==="]")c=c.slice(1,-1);return uU(c.replace(/\.+$/,""))};var o5=d(()=>{PU=new Set(["localhost","0.0.0.0"]),FU={http:80,https:443,ws:80,wss:443,ftp:21},fU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,nU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function kU(c,$){c=c||10;let Q=Array(c),J=Array(c),Y=0,X=0,W;return $=$!==void 0?$:1000,function(G){let z=Date.now(),x=J[X];if(!W)W=z;Q[Y]=G,J[Y]=z;let q=X,M=0;while(q!==Y)M+=Q[q++],q=q%c;if(Y=(Y+1)%c,Y===X)X=(X+1)%c;if(z-W<$)return;let N=x&&z-x;return N?Math.round(M*1000/N):void 0}}var g5;var d5=d(()=>{g5=kU});function aU(c,$){let Q=0,J=1000/$,Y,X,W=(z,x=Date.now())=>{if(Q=x,Y=null,X)clearTimeout(X),X=null;c(...z)};return[(...z)=>{let x=Date.now(),q=x-Q;if(q>=J)W(z,x);else if(Y=z,!X)X=setTimeout(()=>{X=null,W(Y)},J-q)},()=>Y&&W(Y)]}var s5;var r5=d(()=>{s5=aU});var Q8=(c,$,Q=3)=>{let J=0,Y=g5(50,250);return s5((X)=>{if(!X||typeof X.loaded!=="number")return;let W=X.loaded,m=X.lengthComputable?X.total:void 0,G=m!=null?Math.min(W,m):W,z=Math.max(0,G-J),x=Y(z);J=Math.max(J,G);let q={loaded:G,total:m,progress:m?G/m:void 0,bytes:z,rate:x?x:void 0,estimated:x&&m?(m-G)/x:void 0,event:X,lengthComputable:m!=null,[$?"download":"upload"]:!0};c(q)},Q)},P$=(c,$)=>{let Q=c!=null;return[(J)=>$[0]({lengthComputable:Q,total:c,loaded:J}),$[1]]},E$=(c)=>(...$)=>V.asap(()=>c(...$));var eJ=d(()=>{d5();r5();Lc()});function lQ(c){if(!c||typeof c!=="string")return 0;if(!c.startsWith("data:"))return 0;let $=c.indexOf(",");if($<0)return 0;let Q=c.slice(5,$),J=c.slice($+1);if(/;base64/i.test(Q)){let{length:W,length:m}=J;for(let N=0;N<m;N++)if(J.charCodeAt(N)===37&&N+2<m){let w=J.charCodeAt(N+1),U=J.charCodeAt(N+2);if(cY(w)&&cY(U))W-=2,N+=2}let G=0,z=m-1,x=(N)=>N>=2&&J.charCodeAt(N-2)===37&&J.charCodeAt(N-1)===51&&(J.charCodeAt(N)===68||J.charCodeAt(N)===100);if(z>=0){if(J.charCodeAt(z)===61)G++,z--;else if(x(z))G++,z-=3}if(G===1&&z>=0){if(J.charCodeAt(z)===61)G++;else if(x(z))G++}let M=Math.floor(W/4)*3-(G||0);return M>0?M:0}let X=0;for(let W=0,m=J.length;W<m;W++){let G=J.charCodeAt(W);if(G===37&&lU(J,W,m))X+=1,W+=2;else if(G<128)X+=1;else if(G<2048)X+=2;else if(G>=55296&&G<=56319&&W+1<m){let z=J.charCodeAt(W+1);if(z>=56320&&z<=57343)X+=4,W++;else X+=3}else X+=3}return X}var cY=(c)=>c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102,lU=(c,$,Q)=>$+2<Q&&cY(c.charCodeAt($+1))&&cY(c.charCodeAt($+2));import hU from"http";import yU from"https";import oU from"http2";import gU from"util";import{resolve as t5}from"path";import H0 from"zlib";import F0 from"stream";import{EventEmitter as dU}from"events";function Q4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if($4.includes(J.toLowerCase()))c.set(J,Y)})}function Y4(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||"")+"#"+(c.auth||""),J=$?$x.get($)||$x.set($,new Map).get($):J4,Y=J.get(Q);if(Y)return Y;let X=$&&$.options?{...$.options,...c}:c;if(Y=new b9.default(X),$&&$.options){let W={...$.options},m=Y.callback;Y.callback=function(z,x){return m.call(this,z,{...W,...x})}}return Y[qx]=!0,J.set(Q,Y),Y}function W4(c,$,Q){if(c.beforeRedirects.proxy)c.beforeRedirects.proxy(c);if(c.beforeRedirects.auth)c.beforeRedirects.auth(c);if(c.beforeRedirects.sensitiveHeaders)c.beforeRedirects.sensitiveHeaders(c,Q);if(c.beforeRedirects.config)c.beforeRedirects.config(c,$,Q)}function m4(c,$){if(!c)return;Object.keys(c).forEach((Q)=>{if($.has(Q.toLowerCase()))delete c[Q]})}function G4(c,$){if(!$)return!1;try{return new URL($.url).origin===new URL(c.href).origin}catch(Q){return!1}}function Mx(c,$,Q,J,Y){let X=$;if(!X&&X!==!1){let W=gz(Q);if(W){if(!E9(Q))X=new URL(W)}}if(J&&c.headers){for(let W of Object.keys(c.headers))if(W.toLowerCase()==="proxy-authorization")delete c.headers[W]}if(J&&c.agent&&c.agent[qx])c.agent=void 0;if(X){let W=X instanceof URL,m=(M)=>W||V.hasOwnProp(X,M)?X[M]:void 0,G=m("username"),z=m("password"),x=V.hasOwnProp(X,"auth")?X.auth:void 0;if(G)x=(G||"")+":"+(z||"");if(x){let M=typeof x==="object",N=M&&V.hasOwnProp(x,"username")?x.username:void 0,w=M&&V.hasOwnProp(x,"password")?x.password:void 0;if(Boolean(N||w))x=(N||"")+":"+(w||"");else if(M)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:X})}if(xx.test(c.protocol)){if(!(Y instanceof b9.default)){let M=m("hostname")||m("host"),N=m("port"),w=m("protocol"),U=w?w.includes(":")?w:`${w}:`:"http:",v=M&&M.includes(":")&&!M.startsWith("[")?`[${M}]`:M,i=new URL(`${U}//${v}${N?":"+N:""}`),j={protocol:i.protocol,hostname:i.hostname.replace(/^\[|\]$/g,""),port:i.port,auth:x&&typeof x==="string"?x:void 0};if(i.protocol==="https:")j.ALPNProtocols=["http/1.1"];let D=Y4(j,Y);if(c.agent=D,c.agents)c.agents.https=D}}else{if(x){let U=Buffer.from(x,"utf8").toString("base64");c.headers["Proxy-Authorization"]="Basic "+U}let M=!1;for(let U of Object.keys(c.headers))if(U.toLowerCase()==="host"){M=!0;break}if(!M)c.headers.host=c.hostname+(c.port?":"+c.port:"");let N=m("hostname")||m("host");c.hostname=N,c.host=N,c.port=m("port"),c.path=Q;let w=m("protocol");if(w)c.protocol=w.includes(":")?w:`${w}:`}}c.beforeRedirects.proxy=function(m){Mx(m,$,m.href,!0,Y)}}var b9,Wx,e5,sU,rU,mx,Gx,zx,tU,eU,c4,xx,$4,cx,$Y,qx,J4,$x,Qx,Jx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},Yx=(c,[$,Q])=>{return c.on("end",Q).on("error",Q),$},X4,z4,x4=(c)=>{return new Promise(($,Q)=>{let J,Y,X=(G,z)=>{if(Y)return;Y=!0,J&&J(G,z)},W=(G)=>{X(G),$(G)},m=(G)=>{X(G,!0),Q(G)};c(W,m,(G)=>J=G).catch(m)})},q4=({address:c,family:$})=>{if(!V.isString(c))throw TypeError("address must be a string");return{address:c,family:$||(c.indexOf(".")<0?6:4)}},Xx=(c,$)=>q4(V.isObject(c)?c:{address:c,family:$}),M4,Nx;var Vx=d(()=>{Lc();hJ();yJ();kJ();dz();LQ();X0();h8();b0();L5();P0();S5();E5();C9();T5();u5();a5();o5();BQ();eJ();b9=DX(D5(),1),Wx=DX(Z5(),1),e5={flush:H0.constants.Z_SYNC_FLUSH,finishFlush:H0.constants.Z_SYNC_FLUSH},sU={flush:H0.constants.BROTLI_OPERATION_FLUSH,finishFlush:H0.constants.BROTLI_OPERATION_FLUSH},rU={flush:H0.constants.ZSTD_e_flush,finishFlush:H0.constants.ZSTD_e_flush},mx=V.isFunction(H0.createBrotliDecompress),Gx=V.isFunction(H0.createZstdDecompress),zx="gzip, compress, deflate"+(mx?", br":""),tU=zx+(Gx?", zstd":""),{http:eU,https:c4}=Wx.default,xx=/https:?/,$4=["content-type","content-length"];cx=Symbol("axios.http.socketListener"),$Y=Symbol("axios.http.currentReq"),qx=Symbol("axios.http.installedTunnel"),J4=new Map,$x=new WeakMap;Qx=Bc.protocols.map((c)=>{return c+":"}),X4=new n5;z4=typeof process<"u"&&V.kindOf(process)==="process",M4={request(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||(c.protocol==="https:"?443:80)),{http2Options:J,headers:Y}=c,X=X4.getSession(Q,J),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:m,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:z}=oU.constants,x={[W]:c.protocol.replace(":",""),[m]:c.method,[G]:c.path};V.forEach(Y,(M,N)=>{N.charAt(0)!==":"&&(x[N]=M)});let q=X.request(x);return q.once("response",(M)=>{let N=q;M=Object.assign({},M);let w=M[z];delete M[z],N.headers=M,N.statusCode=+w,$(N)}),q}},Nx=z4&&function($){return x4(async function(J,Y,X){let W=(p)=>V.getSafeProp($,p),m=W("transitional")||D8,G=W("data"),z=W("lookup"),x=W("family"),q=W("httpVersion");if(q===void 0)q=1;let M=W("http2Options"),N=W("responseType"),w=W("responseEncoding"),U=W("httpAgent"),v=W("httpsAgent"),i=W("method").toUpperCase(),j=W("maxRedirects"),D=W("maxBodyLength"),_=W("maxContentLength"),mc=W("decompress"),g,Jc=!1,u,a;if(q=+q,Number.isNaN(q))throw TypeError(`Invalid protocol version: '${$.httpVersion}' is not a number`);if(q!==1&&q!==2)throw TypeError(`Unsupported protocol version '${q}'`);let Xc=q===2;if(z){let p=k5(z,(T)=>V.isArray(T)?T:[T]);z=(T,xc,pc)=>{p(T,xc,(Nc,Tc,Pc)=>{if(Nc)return pc(Nc);let bc=V.isArray(Tc)?Tc.map((v$)=>Xx(v$)):[Xx(Tc,Pc)];xc.all?pc(Nc,bc):pc(Nc,bc[0].address,bc[0].family)})}}let e=new dU;function B(p){try{e.emit("abort",!p||p.type?new w0(null,$,u):p)}catch(T){}}function C(){if(a)clearTimeout(a),a=null}function K(){let p=W("timeout"),T=p?"timeout of "+p+"ms exceeded":"timeout exceeded",xc=W("timeoutErrorMessage");if(xc)T=xc;return new O(T,m.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,u)}e.once("abort",Y);let R=()=>{if(C(),$.cancelToken)$.cancelToken.unsubscribe(B);if($.signal)$.signal.removeEventListener("abort",B);e.removeAllListeners()};if($.cancelToken||$.signal){if($.cancelToken&&$.cancelToken.subscribe(B),$.signal)$.signal.aborted?B():$.signal.addEventListener("abort",B)}X((p,T)=>{if(g=!0,C(),T){Jc=!0,R();return}let{data:xc}=p;if(xc instanceof F0.Readable||xc instanceof F0.Duplex){let pc=F0.finished(xc,()=>{pc(),R()})}else R()});let S=y8(W("baseURL"),W("url"),W("allowAbsoluteUrls"),$),Z=new URL(S,Bc.hasBrowserEnv?Bc.origin:void 0),H=Z.protocol||Qx[0];if(H==="data:"){if(_>-1){let T=String(W("url")||S||"");if(lQ(T)>_)return Y(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$))}let p;if(i!=="GET")return d0(J,Y,{status:405,statusText:"method not allowed",headers:{},config:$});try{p=_9(W("url"),N==="blob",{Blob:$.env&&$.env.Blob})}catch(T){throw O.from(T,O.ERR_BAD_REQUEST,$)}if(N==="text"){if(p=p.toString(w),!w||w==="utf8")p=V.stripBOM(p)}else if(N==="stream")p=F0.Readable.from(p);return d0(J,Y,{data:p,status:200,statusText:"OK",headers:new _c,config:$})}if(Qx.indexOf(H)===-1)return Y(new O("Unsupported protocol "+H,O.ERR_BAD_REQUEST,$));let A=_c.from($.headers).normalize();A.set("User-Agent","axios/"+$8,!1);let{onUploadProgress:b,onDownloadProgress:P}=$,r=$.maxRate,Yc=void 0,cc=void 0;if(V.isSpecCompliantForm(G)){let p=A.getContentType(/boundary=([-_\w\d]{10,70})/i);G=P5(G,(T)=>{A.set(T)},{tag:`axios-${$8}-boundary`,boundary:p&&p[1]||void 0})}else if(V.isFormData(G)&&V.isFunction(G.getHeaders)&&G.getHeaders!==Object.prototype.getHeaders){if(Q4(A,G.getHeaders(),W("formDataHeaderPolicy")),!A.hasContentLength())try{let p=await gU.promisify(G.getLength).call(G);Number.isFinite(p)&&p>=0&&A.setContentLength(p)}catch(p){}}else if(V.isBlob(G)||V.isFile(G))G.size&&A.setContentType(G.type||"application/octet-stream"),A.setContentLength(G.size||0),G=F0.Readable.from(tJ(G));else if(G&&!V.isStream(G)){if(Buffer.isBuffer(G));else if(V.isArrayBuffer(G))G=Buffer.from(new Uint8Array(G));else if(V.isString(G))G=Buffer.from(G,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,$));if(A.setContentLength(G.length,!1),D>-1&&G.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$))}let Oc=V.toFiniteNumber(A.getContentLength());if(V.isArray(r))Yc=r[0],cc=r[1];else Yc=cc=r;if(G&&(b||Yc)){if(!V.isStream(G))G=F0.Readable.from(G,{objectMode:!1});G=F0.pipeline([G,new A9({maxRate:V.toFiniteNumber(Yc)})],V.noop),b&&G.on("progress",Yx(G,P$(Oc,Q8(E$(b),!1,3))))}let o=void 0,Dc=W("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o=p+":"+T}if(!o&&(Z.username||Z.password)){let p=Jx(Z.username),T=Jx(Z.password);o=p+":"+T}o&&A.delete("authorization");let Uc;try{Uc=l8(Z.pathname+Z.search,W("params"),W("paramsSerializer")).replace(/^\?/,"")}catch(p){let T=Error(p.message);return T.config=$,T.url=W("url"),T.exists=!0,Y(T)}A.set("Accept-Encoding",V.hasOwnProp(m,"advertiseZstdAcceptEncoding")&&m.advertiseZstdAcceptEncoding===!0?tU:zx,!1);let qc=Object.assign(Object.create(null),{path:Uc,method:i,headers:B$(A),agents:{http:U,https:v},auth:o,protocol:H,family:x,beforeRedirect:W4,beforeRedirects:Object.create(null),http2Options:M});!V.isUndefined(z)&&(qc.lookup=z);let M0=W("socketPath");if(M0){if(typeof M0!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,$));let p=W("allowedSocketPaths");if(p!=null){let T=Array.isArray(p)?p:[p],xc=t5(M0);if(!T.some((Nc)=>typeof Nc==="string"&&t5(Nc)===xc))return Y(new O(`socketPath "${M0}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,$))}qc.socketPath=M0}else qc.hostname=Z.hostname.startsWith("[")?Z.hostname.slice(1,-1):Z.hostname,qc.port=Z.port,Mx(qc,W("proxy"),H+"//"+Z.hostname+(Z.port?":"+Z.port:"")+qc.path,!1,v);let N0,Y0=!1,U8=!1,n8=xx.test(qc.protocol);if(qc.agent==null)qc.agent=n8?v:U;if(Xc)N0=M4;else{let p=W("transport");if(p)N0=p;else if(j===0)N0=n8?yU:hU,Y0=!0;else{if(U8=!0,qc.sensitiveHeaders=[],j)qc.maxRedirects=j;let T=W("beforeRedirect");if(T)qc.beforeRedirects.config=T;if(o){let pc=Z.origin,Nc=o;qc.beforeRedirects.auth=function(Pc){try{if(new URL(Pc.href).origin===pc)Pc.auth=Nc}catch(bc){}}}let xc=W("sensitiveHeaders");if(xc!=null){if(!V.isArray(xc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));let pc=new Set;for(let Nc of xc){if(!V.isString(Nc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));pc.add(Nc.toLowerCase())}if(pc.size)qc.sensitiveHeaders=Array.from(pc),qc.beforeRedirects.sensitiveHeaders=function(Tc,Pc){if(!G4(Tc,Pc))m4(Tc.headers,pc)}}N0=n8?c4:eU}}if(D>-1)qc.maxBodyLength=D;else qc.maxBodyLength=1/0;qc.insecureHTTPParser=Boolean(W("insecureHTTPParser")),u=N0.request(qc,function(T){if(C(),u.destroyed)return;let xc=[T],pc=V.toFiniteNumber(T.headers["content-length"]);if(P||cc){let bc=new A9({maxRate:V.toFiniteNumber(cc)});P&&bc.on("progress",Yx(bc,P$(pc,Q8(E$(P),!0,3)))),xc.push(bc)}let Nc=T,Tc=T.req||u;if(mc!==!1&&T.headers["content-encoding"]){if(i==="HEAD"||T.statusCode===204)delete T.headers["content-encoding"];switch((T.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"deflate":xc.push(new F5),xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"br":if(mx)xc.push(H0.createBrotliDecompress(sU)),delete T.headers["content-encoding"];break;case"zstd":if(Gx)xc.push(H0.createZstdDecompress(rU)),delete T.headers["content-encoding"];break}}Nc=xc.length>1?F0.pipeline(xc,V.noop):xc[0];let Pc={status:T.statusCode,statusText:T.statusMessage,headers:new _c(T.headers),config:$,request:Tc};if(N==="stream"){if(_>-1){let bc=_,v$=Nc;async function*iQ(){let uc=0;for await(let GG of v$){if(uc+=GG.length,uc>bc)throw new O("maxContentLength size of "+bc+" exceeded",O.ERR_BAD_RESPONSE,$,Tc);yield GG}}Nc=F0.Readable.from(iQ(),{objectMode:!1})}Pc.data=Nc,d0(J,Y,Pc)}else{let bc=[],v$=0;Nc.on("data",function(uc){if(bc.push(uc),v$+=uc.length,_>-1&&v$>_)Jc=!0,Nc.destroy(),B(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$,Tc))}),Nc.on("aborted",function(){if(Jc)return;let uc=new O("stream has been aborted",O.ERR_BAD_RESPONSE,$,Tc,Pc);Nc.destroy(uc),Y(uc)}),Nc.on("error",function(uc){if(Jc)return;Y(O.from(uc,null,$,Tc,Pc))}),Nc.on("end",function(){try{let uc=bc.length===1?bc[0]:Buffer.concat(bc);if(N!=="arraybuffer"){if(uc=uc.toString(w),!w||w==="utf8")uc=V.stripBOM(uc)}Pc.data=uc}catch(uc){return Y(O.from(uc,null,$,Pc.request,Pc))}d0(J,Y,Pc)})}e.once("abort",(bc)=>{if(!Nc.destroyed)Nc.emit("error",bc),Nc.destroy()})}),e.once("abort",(p)=>{if(u.close)u.close();else u.destroy(p)}),u.on("error",function(T){Y(O.from(T,null,$,u))});let V0=new Set;if(u.on("socket",function(T){if(T.setKeepAlive(!0,60000),!T[cx])T.on("error",function(pc){let Nc=T[$Y];if(Nc&&!Nc.destroyed)Nc.destroy(pc)}),T[cx]=!0;T[$Y]=u,V0.add(T)}),u.once("close",function(){C();for(let T of V0)if(T[$Y]===u)T[$Y]=null;V0.clear()}),W("timeout")){let p=parseInt(W("timeout"),10);if(Number.isNaN(p)){B(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,$,u));return}let T=function(){if(g)return;B(K())};if(Y0&&p>0)a=setTimeout(T,p);u.setTimeout(p,T)}else u.setTimeout(0);if(V.isStream(G)){let p=!1,T=!1;G.on("end",()=>{p=!0}),G.once("error",(pc)=>{T=!0,u.destroy(pc)}),G.on("close",()=>{if(!p&&!T)B(new w0("Request stream has been aborted",$,u))});let xc=G;if(D>-1&&!U8){let pc=D,Nc=0;xc=F0.pipeline([G,new F0.Transform({transform(Tc,Pc,bc){if(Nc+=Tc.length,Nc>pc)return bc(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$,u));bc(null,Tc)}})],V.noop),xc.on("error",(Tc)=>{if(!u.destroyed)u.destroy(Tc)})}xc.pipe(u)}else G&&u.write(G),u.end()})}});var wx;var ix=d(()=>{b0();wx=Bc.hasStandardBrowserEnv?((c,$)=>(Q)=>{return Q=new URL(Q,Bc.origin),c.protocol===Q.protocol&&c.host===Q.host&&($||c.port===Q.port)})(new URL(Bc.origin),Bc.navigator&&/(msie|trident)/i.test(Bc.navigator.userAgent)):()=>!0});var vx;var Ux=d(()=>{Lc();b0();vx=Bc.hasStandardBrowserEnv?{write(c,$,Q,J,Y,X,W){if(typeof document>"u")return;let m=[`${c}=${encodeURIComponent($)}`];if(V.isNumber(Q))m.push(`expires=${new Date(Q).toUTCString()}`);if(V.isString(J))m.push(`path=${J}`);if(V.isString(Y))m.push(`domain=${Y}`);if(X===!0)m.push("secure");if(V.isString(W))m.push(`SameSite=${W}`);document.cookie=m.join("; ")},read(c){if(typeof document>"u")return null;let $=document.cookie.split(";");for(let Q=0;Q<$.length;Q++){let J=$[Q].replace(/^\s+/,""),Y=J.indexOf("=");if(Y!==-1&&J.slice(0,Y)===c)return decodeURIComponent(J.slice(Y+1))}return null},remove(c){this.write(c,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function T0(c,$){$=$||{};let Q=Object.create(null);Object.defineProperty(Q,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function J(x,q,M,N){if(V.isPlainObject(x)&&V.isPlainObject(q))return V.merge.call({caseless:N},x,q);else if(V.isPlainObject(q))return V.merge({},q);else if(V.isArray(q))return q.slice();return q}function Y(x,q,M,N){if(!V.isUndefined(q))return J(x,q,M,N);else if(!V.isUndefined(x))return J(void 0,x,M,N)}function X(x,q){if(!V.isUndefined(q))return J(void 0,q)}function W(x,q){if(!V.isUndefined(q))return J(void 0,q);else if(!V.isUndefined(x))return J(void 0,x)}function m(x){let q=V.hasOwnProp($,"transitional")?$.transitional:void 0;if(!V.isUndefined(q))if(V.isPlainObject(q)){if(V.hasOwnProp(q,x))return q[x]}else return;let M=V.hasOwnProp(c,"transitional")?c.transitional:void 0;if(V.isPlainObject(M)&&V.hasOwnProp(M,x))return M[x];return}function G(x,q,M){if(V.hasOwnProp($,M))return J(x,q);else if(V.hasOwnProp(c,M))return J(void 0,x)}let z={url:X,method:X,data:X,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:G,headers:(x,q,M)=>Y(jx(x),jx(q),M,!0)};if(V.forEach(Object.keys({...c,...$}),function(q){if(q==="__proto__"||q==="constructor"||q==="prototype")return;let M=V.hasOwnProp(z,q)?z[q]:Y,N=V.hasOwnProp(c,q)?c[q]:void 0,w=V.hasOwnProp($,q)?$[q]:void 0,U=M(N,w,q);V.isUndefined(U)&&M!==G||(Q[q]=U)}),V.hasOwnProp($,"validateStatus")&&V.isUndefined($.validateStatus)&&m("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(c,"validateStatus"))Q.validateStatus=J(void 0,c.validateStatus);else delete Q.validateStatus;return Q}var jx=(c)=>c instanceof _c?{...c}:c;var QY=d(()=>{Lc();P0()});function V4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(N4.includes(J.toLowerCase()))c.set(J,Y)})}function i4(c){let $=T0({},c),Q=(M)=>V.hasOwnProp($,M)?$[M]:void 0,J=Q("data"),Y=Q("withXSRFToken"),X=Q("xsrfHeaderName"),W=Q("xsrfCookieName"),m=Q("headers"),G=Q("auth"),z=Q("baseURL"),x=Q("allowAbsoluteUrls"),q=Q("url");if($.headers=m=_c.from(m),$.url=l8(y8(z,q,x,$),Q("params"),Q("paramsSerializer")),G){let M=V.getSafeProp(G,"username")||"",N=V.getSafeProp(G,"password")||"";m.set("Authorization","Basic "+btoa(M+":"+(N?w4(N):"")))}if(V.isFormData(J)){if(Bc.hasStandardBrowserEnv||Bc.hasStandardBrowserWebWorkerEnv||V.isReactNative(J))m.setContentType(void 0);else if(V.isFunction(J.getHeaders))V4(m,J.getHeaders(),Q("formDataHeaderPolicy"))}if(Bc.hasStandardBrowserEnv){if(V.isFunction(Y))Y=Y($);if(Y===!0||Y==null&&wx($.url)){let N=X&&W&&vx.read(W);if(N)m.set(X,N)}}return $}var N4,w4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),JY;var F9=d(()=>{b0();Lc();ix();Ux();yJ();QY();P0();kJ();N4=["content-type","content-length"];JY=i4});var v4,Kx;var Dx=d(()=>{Lc();hJ();LQ();X0();h8();b0();P0();eJ();F9();BQ();v4=typeof XMLHttpRequest<"u",Kx=v4&&function(c){return new Promise(function(Q,J){let Y=JY(c),X=Y.data,W=_c.from(Y.headers).normalize(),{responseType:m,onUploadProgress:G,onDownloadProgress:z}=Y,x,q,M,N,w;function U(){N&&N(),w&&w(),Y.cancelToken&&Y.cancelToken.unsubscribe(x),Y.signal&&Y.signal.removeEventListener("abort",x)}let v=new XMLHttpRequest;v.open(Y.method.toUpperCase(),Y.url,!0),v.timeout=Y.timeout;function i(){if(!v)return;let D=_c.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),mc={data:!m||m==="text"||m==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:c,request:v};d0(function(Jc){Q(Jc),U()},function(Jc){J(Jc),U()},mc),v=null}if("onloadend"in v)v.onloadend=i;else v.onreadystatechange=function(){if(!v||v.readyState!==4)return;if(v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:")))return;setTimeout(i)};if(v.onabort=function(){if(!v)return;J(new O("Request aborted",O.ECONNABORTED,c,v)),U(),v=null},v.onerror=function(_){let mc=_&&_.message?_.message:"Network Error",g=new O(mc,O.ERR_NETWORK,c,v);g.event=_||null,J(g),U(),v=null},v.ontimeout=function(){let _=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",mc=Y.transitional||D8;if(Y.timeoutErrorMessage)_=Y.timeoutErrorMessage;J(new O(_,mc.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,c,v)),U(),v=null},X===void 0&&W.setContentType(null),"setRequestHeader"in v)V.forEach(B$(W),function(_,mc){v.setRequestHeader(mc,_)});if(!V.isUndefined(Y.withCredentials))v.withCredentials=!!Y.withCredentials;if(m&&m!=="json")v.responseType=Y.responseType;if(z)[M,w]=Q8(z,!0),v.addEventListener("progress",M);if(G&&v.upload)[q,N]=Q8(G),v.upload.addEventListener("progress",q),v.upload.addEventListener("loadend",N);if(Y.cancelToken||Y.signal){if(x=(D)=>{if(!v)return;J(!D||D.type?new w0(null,c,v):D),v.abort(),U(),v=null},Y.cancelToken&&Y.cancelToken.subscribe(x),Y.signal)Y.signal.aborted?x():Y.signal.addEventListener("abort",x)}let j=kQ(Y.url);if(j&&!Bc.protocols.includes(j)){J(new O("Unsupported protocol "+j+":",O.ERR_BAD_REQUEST,c));return}v.send(X||null)})}});var U4=(c,$)=>{if(c=c?c.filter(Boolean):[],!$&&!c.length)return;let Q=new AbortController,J=!1,Y=function(G){if(!J){J=!0,W();let z=G instanceof Error?G:this.reason;Q.abort(z instanceof O?z:new w0(z instanceof Error?z.message:z))}},X=$&&setTimeout(()=>{X=null,Y(new O(`timeout of ${$}ms exceeded`,O.ETIMEDOUT))},$),W=()=>{if(!c)return;X&&clearTimeout(X),X=null,c.forEach((G)=>{G.unsubscribe?G.unsubscribe(Y):G.removeEventListener("abort",Y)}),c=null};c.forEach((G)=>G.addEventListener("abort",Y));let{signal:m}=Q;return m.unsubscribe=()=>V.asap(W),m},Bx;var Hx=d(()=>{h8();X0();Lc();Bx=U4});var j4=function*(c,$){let Q=c.byteLength;if(!$||Q<$){yield c;return}let J=0,Y;while(J<Q)Y=J+$,yield c.slice(J,Y),J=Y},K4=async function*(c,$){for await(let Q of D4(c))yield*j4(Q,$)},D4=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}let $=c.getReader();try{for(;;){let{done:Q,value:J}=await $.read();if(Q)break;yield J}}finally{await $.cancel()}},T9=(c,$,Q,J)=>{let Y=K4(c,$),X=0,W,m=(G)=>{if(!W)W=!0,J&&J(G)};return new ReadableStream({async pull(G){try{let{done:z,value:x}=await Y.next();if(z){m(),G.close();return}let q=x.byteLength;if(Q){let M=X+=q;Q(M)}G.enqueue(new Uint8Array(x))}catch(z){throw m(z),z}},cancel(G){return m(G),Y.return()}},{highWaterMark:2})};var Ox=65536,YY,B4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),Rx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},px=(c,...$)=>{try{return!!c(...$)}catch(Q){return!1}},H4=(c)=>{let $=c.indexOf("://"),Q=c;if($!==-1)Q=Q.slice($+3);return Q.includes("@")||Q.includes(":")},O4=(c)=>{let $=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:Q,TextEncoder:J}=$;c=V.merge.call({skipUndefined:!0},{Request:$.Request,Response:$.Response},c);let{fetch:Y,Request:X,Response:W}=c,m=Y?YY(Y):typeof fetch==="function",G=YY(X),z=YY(W);if(!m)return!1;let x=m&&YY(Q),q=m&&(typeof J==="function"?((i)=>(j)=>i.encode(j))(new J):async(i)=>new Uint8Array(await new X(i).arrayBuffer())),M=G&&x&&px(()=>{let i=!1,j=new X(Bc.origin,{body:new Q,method:"POST",get duplex(){return i=!0,"half"}}),D=j.headers.has("Content-Type");if(j.body!=null)j.body.cancel();return i&&!D}),N=z&&x&&px(()=>V.isReadableStream(new W("").body)),w={stream:N&&((i)=>i.body)};m&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((i)=>{!w[i]&&(w[i]=(j,D)=>{let _=j&&j[i];if(_)return _.call(j);throw new O(`Response type '${i}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let U=async(i)=>{if(i==null)return 0;if(V.isBlob(i))return i.size;if(V.isSpecCompliantForm(i))return(await new X(Bc.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(V.isArrayBufferView(i)||V.isArrayBuffer(i))return i.byteLength;if(V.isURLSearchParams(i))i=i+"";if(V.isString(i))return(await q(i)).byteLength},v=async(i,j)=>{let D=V.toFiniteNumber(i.getContentLength());return D==null?U(j):D};return async(i)=>{let{url:j,method:D,data:_,signal:mc,cancelToken:g,timeout:Jc,onDownloadProgress:u,onUploadProgress:a,responseType:Xc,headers:e,withCredentials:B="same-origin",fetchOptions:C,maxContentLength:K,maxBodyLength:R}=JY(i),S=V.isNumber(K)&&K>-1,Z=V.isNumber(R)&&R>-1,H=(o)=>V.hasOwnProp(i,o)?i[o]:void 0,A=Y||fetch;Xc=Xc?(Xc+"").toLowerCase():"text";let b=Bx([mc,g&&g.toAbortSignal()],Jc),P=null,r=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),Yc,cc=null,Oc=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,i,P);try{let o=void 0,Dc=H("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o={username:p,password:T}}if(H4(j)){let p=new URL(j,Bc.origin);if(!o&&(p.username||p.password)){let T=Rx(p.username),xc=Rx(p.password);o={username:T,password:xc}}if(p.username||p.password)p.username="",p.password="",j=p.href}if(o)e.delete("authorization"),e.set("Authorization","Basic "+btoa(B4((o.username||"")+":"+(o.password||""))));if(S&&typeof j==="string"&&j.startsWith("data:")){if(lQ(j)>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}if(Z&&D!=="get"&&D!=="head"){let p=await U(_);if(typeof p==="number"&&isFinite(p)){if(Yc=p,p>R)throw Oc()}}let Uc=Z&&(V.isReadableStream(_)||V.isStream(_)),qc=(p,T,xc)=>T9(p,Ox,(pc)=>{if(Z&&pc>R)throw cc=Oc();T&&T(pc)},xc);if(M&&D!=="get"&&D!=="head"&&(a||Uc)){if(Yc=Yc==null?await v(e,_):Yc,Yc!==0||Uc){let p=new X(j,{method:"POST",body:_,duplex:"half"}),T;if(V.isFormData(_)&&(T=p.headers.get("content-type")))e.setContentType(T);if(p.body){let[xc,pc]=a&&P$(Yc,Q8(E$(a)))||[];_=qc(p.body,xc,pc)}}}else if(Uc&&!G&&x&&D!=="get"&&D!=="head")_=qc(_);else if(Uc&&G&&!M&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,i,P);if(!V.isString(B))B=B?"include":"omit";let M0=G&&"credentials"in X.prototype;if(V.isFormData(_)){let p=e.getContentType();if(p&&/^multipart\/form-data/i.test(p)&&!/boundary=/i.test(p))e.delete("content-type")}e.set("User-Agent","axios/"+$8,!1);let N0={...C,signal:b,method:D.toUpperCase(),headers:B$(e.normalize()),body:_,duplex:"half",credentials:M0?B:void 0};P=G&&new X(j,N0);let Y0=await(G?A(P,C):A(j,N0)),U8=_c.from(Y0.headers);if(S){let p=V.toFiniteNumber(U8.getContentLength());if(p!=null&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}let n8=N&&(Xc==="stream"||Xc==="response");if(N&&Y0.body&&(u||S||n8&&r)){let p={};["status","statusText","headers"].forEach((Pc)=>{p[Pc]=Y0[Pc]});let T=V.toFiniteNumber(U8.getContentLength()),[xc,pc]=u&&P$(T,Q8(E$(u),!0))||[],Nc=0,Tc=(Pc)=>{if(S){if(Nc=Pc,Nc>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}xc&&xc(Pc)};Y0=new W(T9(Y0.body,Ox,Tc,()=>{pc&&pc(),r&&r()}),p)}Xc=Xc||"text";let V0=await w[V.findKey(w,Xc)||"text"](Y0,i);if(S&&!N&&!n8){let p;if(V0!=null){if(typeof V0.byteLength==="number")p=V0.byteLength;else if(typeof V0.size==="number")p=V0.size;else if(typeof V0==="string")p=typeof J==="function"?new J().encode(V0).byteLength:V0.length}if(typeof p==="number"&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}return!n8&&r&&r(),await new Promise((p,T)=>{d0(p,T,{data:V0,headers:_c.from(Y0.headers),status:Y0.status,statusText:Y0.statusText,config:i,request:P})})}catch(o){if(r&&r(),b&&b.aborted&&b.reason instanceof O){let Dc=b.reason;throw Dc.config=i,P&&(Dc.request=P),o!==Dc&&(Dc.cause=o),Dc}if(cc)throw P&&!cc.request&&(cc.request=P),cc;if(o instanceof O)throw P&&!o.request&&(o.request=P),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,i,P,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,i,P,o&&o.response)}}},R4,f9=(c)=>{let $=c&&c.env||{},{fetch:Q,Request:J,Response:Y}=$,X=[J,Y,Q],W=X.length,m=W,G,z,x=R4;while(m--)G=X[m],z=x.get(G),z===void 0&&x.set(G,z=m?new Map:O4($)),x=z;return z},gS;var Ix=d(()=>{b0();Lc();X0();Hx();P0();eJ();F9();hJ();BQ();({isFunction:YY}=V),R4=new Map,gS=f9()});function Z4(c,$){c=V.isArray(c)?c:[c];let{length:Q}=c,J,Y,X={};for(let W=0;W<Q;W++){J=c[W];let m;if(Y=J,!I4(J)){if(Y=n9[(m=String(J)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${m}'`)}if(Y&&(V.isFunction(Y)||(Y=Y.get($))))break;X[m||"#"+W]=Y}if(!Y){let W=Object.entries(X).map(([G,z])=>`adapter ${G} `+(z===!1?"is not supported by the environment":"is not available in the build")),m=Q?W.length>1?`since :
|
|
23
|
-
`+
|
|
24
|
-
`):" "+
|
|
25
|
-
`);return
|
|
26
|
-
`),
|
|
27
|
-
`,
|
|
28
|
-
`+Y}}catch(
|
|
29
|
-
`,{mode:384}),await
|
|
30
|
-
`,{mode:384})}function dx(c,$){return typeof c.checkedAt==="number"&&$-c.checkedAt<A4}async function e9(c){let $=new AbortController,Q=setTimeout(()=>$.abort(),c);try{let J=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:$.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!J.ok)return null;let Y=await J.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(Q)}}var ox,A4=86400000,C4=604800000,gx=21600000;var rQ=d(()=>{i0();ox=S4(F$,"update-check.json")});function P4(c,$=[]){for(let Q=0;Q<c.length;Q++){if(c[Q].startsWith("-"))continue;if(Q>0&&$.includes(c[Q-1]))continue;return{before:c.slice(0,Q),script:c[Q],after:c.slice(Q+1)}}return{before:c,script:void 0,after:[]}}function cW(c,$,Q=[]){return(J)=>{let{before:Y,script:X,after:W}=P4(J,Q);if(X===void 0)return[c,$,...Y];if(W.length>0)return[c,$,...Y,X,"--",...W];return[c,$,...Y,X]}}function tx(c){return{agent:[c,0],run:[c,"run",0],install:[c,"i",0],frozen:[c,"i","--frozen-lockfile",0],global:[c,"add","-g",0],add:[c,"add",0],upgrade:[c,"update",0],"upgrade-interactive":[c,"update","-i",0],dedupe:[c,"dedupe",0],execute:[c,"dlx",0],"execute-local":[c,"exec",0],uninstall:[c,"remove",0],global_uninstall:[c,"remove","--global",0]}}function ex(c,$,Q){let J=$W[c][$];return QW(J,Q)}function QW(c,$){if(c==null)return null;let Q=typeof c==="function"?c($):c.flatMap((J)=>{if(typeof J==="number")return $;return[J]});return{command:Q[0],args:Q.slice(1)}}var E4,rx,b4,sx,F4,T4,f4,n4,u4,$W;var c6=d(()=>{E4={agent:["npm",0],run:cW("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},rx={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":cW("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},b4={...rx,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};sx=tx("pnpm"),F4=tx("rush-pnpm"),T4={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},f4={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},n4={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},u4={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},$W={npm:E4,yarn:rx,"yarn@berry":b4,pnpm:sx,"pnpm@6":{...sx,run:cW("pnpm","run",["-F","--filter"])},"pnpm-rush":F4,bun:T4,aube:f4,deno:n4,nub:u4}});var tQ,eQ,cJ,$6;var JW=d(()=>{tQ=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],eQ={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},cJ={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},$6={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import J6 from"node:fs/promises";import J8 from"node:path";import Y6 from"node:process";async function xY(c,$){try{let Q=await J6.stat(c);return $==="file"?Q.isFile():Q.isDirectory()}catch{return!1}}function X6(){let c=Y6.env.npm_config_user_agent;if(!c)return null;let $=c.split("/")[0];return tQ.includes($)?$:null}function*k4(c=Y6.cwd()){let $=J8.resolve(c),{root:Q}=J8.parse($);while($&&$!==Q)yield $,$=J8.dirname($)}async function Q6(c,$){if(!c||!await xY(c,"file"))return null;return await l4(c,$)}async function W6(c={}){let{cwd:$,strategies:Q=["lockfile","packageManager-field","devEngines-field"]}=c,J;if(typeof c.stopDir==="string"){let Y=J8.resolve(c.stopDir);J=(X)=>X===Y}else J=c.stopDir;for(let Y of k4($)){for(let X of Q)switch(X){case"lockfile":{if(await xY(J8.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let W of Object.keys(eQ))if(await xY(J8.join(Y,W),"file")){let m=eQ[W],G=await Q6(J8.join(Y,"package.json"),c);if(G)return G;else return{name:m,agent:m}}break}case"packageManager-field":case"devEngines-field":{let W=await Q6(J8.join(Y,"package.json"),c);if(W)return W;break}case"install-metadata":{for(let W of Object.keys(cJ)){let m=W.endsWith("/")?"dir":"file";if(await xY(J8.join(Y,W),m)){let G=cJ[W],z=G==="yarn"?h4(W)?"yarn":"yarn@berry":G;return{name:G,agent:z}}}break}}if(J?.(Y))break}return null}function a4(c){let $=(Q)=>Q?.match(/\d+(\.\d+){0,2}/)?.[0]??Q;if(typeof c.packageManager==="string"){let[Q,J]=c.packageManager.replace(/^\^/,"").split("@");return{name:Q,ver:$(J)}}if(typeof c.devEngines?.packageManager?.name==="string")return{name:c.devEngines.packageManager.name,ver:$(c.devEngines.packageManager.version)};return}async function l4(c,$){try{let Q=await J6.readFile(c,"utf8"),J=$.packageJsonParser?await $.packageJsonParser(Q,c):JSON.parse(Q),Y,X=a4(J);if(X){let{name:W,ver:m}=X,G=m;if(W==="yarn"&&m&&Number.parseInt(m)>1)return Y="yarn@berry",G="berry",{name:W,agent:Y,version:G};else if(W==="pnpm"&&m&&Number.parseInt(m)<7)return Y="pnpm@6",{name:W,agent:Y,version:G};else if(tQ.includes(W))return Y=W,{name:W,agent:Y,version:G};else return $.onUnknown?.(J.packageManager)??null}}catch{}return null}function h4(c){return c.endsWith(".yarn_integrity")}var m6=d(()=>{JW()});var G6={};vQ(G6,{resolveCommand:()=>ex,getUserAgent:()=>X6,detect:()=>W6,constructCommand:()=>QW,LOCKS:()=>eQ,INSTALL_PAGE:()=>$6,INSTALL_METADATA:()=>cJ,COMMANDS:()=>$W,AGENTS:()=>tQ});var z6=d(()=>{c6();JW();m6()});import{existsSync as y4}from"node:fs";import{delimiter as o4,join as g4}from"node:path";import{fileURLToPath as d4}from"node:url";function s4(c){if(!c.isTTY)return"stdout-not-tty";if(c.json)return"json";if(c.env.CI)return"ci";if(c.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function r4(c){let $=c.replace(/\\/g,"/");if($.includes("/.bun/"))return"bun";if($.includes("/pnpm/")||$.includes("/.pnpm/"))return"pnpm";if($.includes("/.volta/"))return"volta";if($.includes("/node_modules/"))return"npm";return null}function t4(c=process.env,$=y4){let Q=(c.PATH??"").split(o4).filter(Boolean),J=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return Q.some((Y)=>J.some((X)=>$(g4(Y,X))))}async function qY(c,$="latest",Q,J,Y=d4(import.meta.url)){let X=await Promise.resolve().then(() => (z6(),G6)),W=(x)=>{let q=X.resolveCommand(x,"global",[`${c}@${$}`]);return q?{command:`${q.command} ${q.args.join(" ")}`,generic:!1}:null},m=Q!==void 0?Q:X.getUserAgent()??null;if(m){let x=W(m);if(x)return x}let G=r4(Y);if(G==="volta")return{command:`volta install ${c}@${$}`,generic:!1};if(G){let x=W(G);if(x)return x}let z=J??t4();return{command:`npm i -g ${c}@${$}`,generic:!z}}function q6(c){return c.generic?`Update with your package manager's global install, e.g. ${c.command}`:`Run: ${c.command}`}function e4(c,$,Q){return`⚠ figura ${c} → ${$} available. ${Q}`}function cj(c,$,Q){return`⚠ figura ${c} is below the minimum supported ${$} — `+`some commands may fail. ${Q}`}function $j(c,$,Q){let J=c.latest,Y=dQ(c,$,Q).latest;if(J&&Y)return O0(Y,J)?Y:J;return J??Y}function M6(c){let $=c("x-figura-min-cli")?.trim(),Q=c("x-figura-latest-cli")?.trim();return{min:$||void 0,latest:Q||void 0}}function Qj(c,$,Q,J){if(!Q.min&&!Q.latest)return null;let Y={...c.serverAdvice??{}},X=Y[$]??{},W={...X},m=!1,G=(z)=>typeof z!=="number"||J-z>=gx;if(Q.min&&(X.min!==Q.min||G(X.minAt)))W.min=Q.min,W.minAt=J,m=!0;if(Q.latest&&(X.latest!==Q.latest||G(X.latestAt)))W.latest=Q.latest,W.latestAt=J,m=!0;if(!m)return null;return Y[$]=W,{...c,serverAdvice:Y}}async function N6(c,$,Q=Date.now()){try{if(!$.min&&!$.latest)return;let J=Qj(await H8(),c,$,Q);if(J)await sQ(J)}catch{}}function Jj(c){return c.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.NO_UPDATE_NOTIFIER==="1"}function Yj(c){return c.some(($)=>$==="--json"||$.startsWith("--json="))}async function V6(c,$,Q=Date.now()){try{if(Jj(process.env))return;let J=await H8(),Y=f0(),X=n$($),W=dQ(J,X,Q);if(W.min&&O0(W.min,Y)){let z=q6(await qY(x6));process.stderr.write(cj(Y,W.min,z)+`
|
|
31
|
-
`);return}if(
|
|
32
|
-
`)}catch{}}var
|
|
33
|
-
`);let Y=
|
|
17
|
+
`)===-1){dX("have not received end of HTTP headers yet..."),G();return}let H=x.toString("ascii",0,x.indexOf(`\r
|
|
18
|
+
`)),w=+H.split(" ")[1];dX("got proxy server response: %o",H),Q({statusCode:w,buffered:x})}$.on("error",V),$.on("close",W),$.on("end",z),G()})}aX.default=vF});var DK=g((TQ)=>{var OF=TQ&&TQ.__awaiter||function($,Q,J,X){function Y(G){return G instanceof J?G:new J(function(q){q(G)})}return new(J||(J=Promise))(function(G,q){function W(K){try{V(X.next(K))}catch(U){q(U)}}function z(K){try{V(X.throw(K))}catch(U){q(U)}}function V(K){K.done?G(K.value):Y(K.value).then(W,z)}V((X=X.apply($,Q||[])).next())})},OJ=TQ&&TQ.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(TQ,"__esModule",{value:!0});var jK=OJ(j0("net")),LK=OJ(j0("tls")),FF=OJ(j0("url")),CF=OJ(j0("assert")),IF=OJ(iX()),PF=ZK(),TF=OJ(wK()),oX=IF.default("https-proxy-agent:agent");class RK extends PF.Agent{constructor($){let Q;if(typeof $==="string")Q=FF.default.parse($);else Q=$;if(!Q)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");oX("creating new HttpsProxyAgent instance: %o",Q);super(Q);let J=Object.assign({},Q);if(this.secureProxy=Q.secureProxy||kF(J.protocol),J.host=J.hostname||J.host,typeof J.port==="string")J.port=parseInt(J.port,10);if(!J.port&&J.host)J.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in J))J.ALPNProtocols=["http 1.1"];if(J.host&&J.path)delete J.path,delete J.pathname;this.proxy=J}callback($,Q){return OF(this,void 0,void 0,function*(){let{proxy:J,secureProxy:X}=this,Y;if(X)oX("Creating `tls.Socket`: %o",J),Y=LK.default.connect(J);else oX("Creating `net.Socket`: %o",J),Y=jK.default.connect(J);let G=Object.assign({},J.headers),W=`CONNECT ${`${Q.host}:${Q.port}`} HTTP/1.1\r
|
|
19
|
+
`;if(J.auth)G["Proxy-Authorization"]=`Basic ${Buffer.from(J.auth).toString("base64")}`;let{host:z,port:V,secureEndpoint:K}=Q;if(!EF(V,K))z+=`:${V}`;G.Host=z,G.Connection="close";for(let w of Object.keys(G))W+=`${w}: ${G[w]}\r
|
|
20
|
+
`;let U=TF.default(Y);Y.write(`${W}\r
|
|
21
|
+
`);let{statusCode:x,buffered:M}=yield U;if(x===200){if($.once("socket",AF),Q.secureEndpoint){oX("Upgrading socket connection to TLS");let w=Q.servername||Q.host;return LK.default.connect(Object.assign(Object.assign({},cF(Q,"host","hostname","path","port")),{socket:Y,servername:w}))}return Y}Y.destroy();let H=new jK.default.Socket({writable:!1});return H.readable=!0,$.once("socket",(w)=>{oX("replaying proxy buffer for failed request"),CF.default(w.listenerCount("data")>0),w.push(M),w.push(null)}),H})}}TQ.default=RK;function AF($){$.resume()}function EF($,Q){return Boolean(!Q&&$===80||Q&&$===443)}function kF($){return typeof $==="string"?/^https:?$/i.test($):!1}function cF($,...Q){let J={},X;for(X in $)if(!Q.includes(X))J[X]=$[X];return J}});var NK=g((NG,_K)=>{var SF=NG&&NG.__importDefault||function($){return $&&$.__esModule?$:{default:$}},DG=SF(DK());function _G($){return new DG.default($)}(function($){$.HttpsProxyAgent=DG.default,$.prototype=DG.default.prototype})(_G||(_G={}));_K.exports=_G});var OK=g((Mo,vK)=>{var sX;vK.exports=function(){if(!sX){try{sX=iX()("follow-redirects")}catch($){}if(typeof sX!=="function")sX=function(){}}sX.apply(null,arguments)}});var TK=g((Ho,SG)=>{var tX=j0("url"),rX=tX.URL,bF=j0("http"),fF=j0("https"),IG=j0("stream").Writable,PG=j0("assert"),FK=OK();(function(){var Q=typeof process<"u",J=typeof window<"u"&&typeof document<"u",X=EQ(Error.captureStackTrace);if(!Q&&(J||!X))console.warn("The follow-redirects package should be excluded from browser builds.")})();var TG=!1;try{PG(new rX(""))}catch($){TG=$.code==="ERR_INVALID_URL"}var mF=["Authorization","Proxy-Authorization","Cookie"],yF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],AG=["abort","aborted","connect","error","socket","timeout"],EG=Object.create(null);AG.forEach(function($){EG[$]=function(Q,J,X){this._redirectable.emit($,Q,J,X)}});var OG=eX("ERR_INVALID_URL","Invalid URL",TypeError),FG=eX("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),hF=eX("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",FG),pF=eX("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),uF=eX("ERR_STREAM_WRITE_AFTER_END","write after end"),gF=IG.prototype.destroy||IK;function H8($,Q){if(IG.call(this),this._sanitizeOptions($),this._options=$,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],Q)this.on("response",Q);var J=this;this._onNativeResponse=function(X){try{J._processResponse(X)}catch(Y){J.emit("error",Y instanceof FG?Y:new FG({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+mF.concat($.sensitiveHeaders).map(oF).join("|")+")$","i"),this._performRequest()}H8.prototype=Object.create(IG.prototype);H8.prototype.abort=function(){cG(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};H8.prototype.destroy=function($){return cG(this._currentRequest,$),gF.call(this,$),this};H8.prototype.write=function($,Q,J){if(this._ending)throw new uF;if(!AQ($)&&!dF($))throw TypeError("data should be a string, Buffer or Uint8Array");if(EQ(Q))J=Q,Q=null;if($.length===0){if(J)J();return}if(this._requestBodyLength+$.length<=this._options.maxBodyLength)this._requestBodyLength+=$.length,this._requestBodyBuffers.push({data:$,encoding:Q}),this._currentRequest.write($,Q,J);else this.emit("error",new pF),this.abort()};H8.prototype.end=function($,Q,J){if(EQ($))J=$,$=Q=null;else if(EQ(Q))J=Q,Q=null;if(!$)this._ended=this._ending=!0,this._currentRequest.end(null,null,J);else{var X=this,Y=this._currentRequest;this.write($,Q,function(){X._ended=!0,Y.end(null,null,J)}),this._ending=!0}};H8.prototype.setHeader=function($,Q){this._options.headers[$]=Q,this._currentRequest.setHeader($,Q)};H8.prototype.removeHeader=function($){delete this._options.headers[$],this._currentRequest.removeHeader($)};H8.prototype.setTimeout=function($,Q){var J=this;function X(q){q.setTimeout($),q.removeListener("timeout",q.destroy),q.addListener("timeout",q.destroy)}function Y(q){if(J._timeout)clearTimeout(J._timeout);J._timeout=setTimeout(function(){J.emit("timeout"),G()},$),X(q)}function G(){if(J._timeout)clearTimeout(J._timeout),J._timeout=null;if(J.removeListener("abort",G),J.removeListener("error",G),J.removeListener("response",G),J.removeListener("close",G),Q)J.removeListener("timeout",Q);if(!J.socket)J._currentRequest.removeListener("socket",Y)}if(Q)this.on("timeout",Q);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",X),this.on("abort",G),this.on("error",G),this.on("response",G),this.on("close",G),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function($){H8.prototype[$]=function(Q,J){return this._currentRequest[$](Q,J)}});["aborted","connection","socket"].forEach(function($){Object.defineProperty(H8.prototype,$,{get:function(){return this._currentRequest[$]}})});H8.prototype._sanitizeOptions=function($){if(!$.headers)$.headers={};if(!nF($.sensitiveHeaders))$.sensitiveHeaders=[];if($.host){if(!$.hostname)$.hostname=$.host;delete $.host}if(!$.pathname&&$.path){var Q=$.path.indexOf("?");if(Q<0)$.pathname=$.path;else $.pathname=$.path.substring(0,Q),$.search=$.path.substring(Q)}};H8.prototype._performRequest=function(){var $=this._options.protocol,Q=this._options.nativeProtocols[$];if(!Q)throw TypeError("Unsupported protocol "+$);if(this._options.agents){var J=$.slice(0,-1);this._options.agent=this._options.agents[J]}var X=this._currentRequest=Q.request(this._options,this._onNativeResponse);X._redirectable=this;for(var Y of AG)X.on(Y,EG[Y]);if(this._currentUrl=/^\//.test(this._options.path)?tX.format(this._options):this._options.path,this._isRedirect){var G=0,q=this,W=this._requestBodyBuffers;(function z(V){if(X===q._currentRequest){if(V)q.emit("error",V);else if(G<W.length){var K=W[G++];if(!X.finished)X.write(K.data,K.encoding,z)}else if(q._ended)X.end()}})()}};H8.prototype._processResponse=function($){var Q=$.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:$.headers,statusCode:Q});var J=$.headers.location;if(!J||this._options.followRedirects===!1||Q<300||Q>=400){$.responseUrl=this._currentUrl,$.redirects=this._redirects,this.emit("response",$),this._requestBodyBuffers=[];return}if(cG(this._currentRequest),$.destroy(),++this._redirectCount>this._options.maxRedirects)throw new hF;var X,Y=this._options.beforeRedirect;if(Y)X=Object.assign({Host:$.req.getHeader("host")},this._options.headers);var G=this._options.method;if((Q===301||Q===302)&&this._options.method==="POST"||Q===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],vG(/^content-/i,this._options.headers);var q=vG(/^host$/i,this._options.headers),W=kG(this._currentUrl),z=q||W.host,V=/^\w+:/.test(J)?this._currentUrl:tX.format(Object.assign(W,{host:z})),K=lF(J,V);if(FK("redirecting to",K.href),this._isRedirect=!0,CG(K,this._options),K.protocol!==W.protocol&&K.protocol!=="https:"||K.host!==z&&!iF(K.host,z))vG(this._headerFilter,this._options.headers);if(EQ(Y)){var U={headers:$.headers,statusCode:Q},x={url:V,method:G,headers:X};Y(this._options,U,x),this._sanitizeOptions(this._options)}this._performRequest()};function CK($){var Q={maxRedirects:21,maxBodyLength:10485760},J={};return Object.keys($).forEach(function(X){var Y=X+":",G=J[Y]=$[X],q=Q[X]=Object.create(G);function W(V,K,U){if(aF(V))V=CG(V);else if(AQ(V))V=CG(kG(V));else U=K,K=PK(V),V={protocol:Y};if(EQ(K))U=K,K=null;if(K=Object.assign({maxRedirects:Q.maxRedirects,maxBodyLength:Q.maxBodyLength},V,K),K.nativeProtocols=J,!AQ(K.host)&&!AQ(K.hostname))K.hostname="::1";return PG.equal(K.protocol,Y,"protocol mismatch"),FK("options",K),new H8(K,U)}function z(V,K,U){var x=q.request(V,K,U);return x.end(),x}Object.defineProperties(q,{request:{value:W,configurable:!0,enumerable:!0,writable:!0},get:{value:z,configurable:!0,enumerable:!0,writable:!0}})}),Q}function IK(){}function kG($){var Q;if(TG)Q=new rX($);else if(Q=PK(tX.parse($)),!AQ(Q.protocol))throw new OG({input:$});return Q}function lF($,Q){return TG?new rX($,Q):kG(tX.resolve(Q,$))}function PK($){if(/^\[/.test($.hostname)&&!/^\[[:0-9a-f]+\]$/i.test($.hostname))throw new OG({input:$.href||$});if(/^\[/.test($.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test($.host))throw new OG({input:$.href||$});return $}function CG($,Q){var J=Q||{};for(var X of yF)J[X]=$[X];if(J.hostname.startsWith("["))J.hostname=J.hostname.slice(1,-1);if(J.port!=="")J.port=Number(J.port);return J.path=J.search?J.pathname+J.search:J.pathname,J}function vG($,Q){var J;for(var X in Q)if($.test(X))J=Q[X],delete Q[X];return J===null||typeof J>"u"?void 0:String(J).trim()}function eX($,Q,J){function X(Y){if(EQ(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=$,this.message=this.cause?Q+": "+this.cause.message:Q}return X.prototype=new(J||Error),Object.defineProperties(X.prototype,{constructor:{value:X,enumerable:!1},name:{value:"Error ["+$+"]",enumerable:!1}}),X}function cG($,Q){for(var J of AG)$.removeListener(J,EG[J]);$.on("error",IK),$.destroy(Q)}function iF($,Q){PG(AQ($)&&AQ(Q));var J=$.length-Q.length-1;return J>0&&$[J]==="."&&$.endsWith(Q)}function nF($){return $ instanceof Array}function AQ($){return typeof $==="string"||$ instanceof String}function EQ($){return typeof $==="function"}function dF($){return typeof $==="object"&&"length"in $}function aF($){return rX&&$ instanceof rX}function oF($){return $.replace(/[\]\\/()*+?.$]/g,"\\$&")}SG.exports=CK({http:bF,https:fF});SG.exports.wrap=CK});var L$="1.18.0";function $Y($){let Q=/^([-+\w]{1,25}):(?:\/\/)?/.exec($);return Q&&Q[1]||""}function bG($,Q,J){let X=J&&J.Blob||O0.classes.Blob,Y=$Y($);if(Q===void 0&&X)Q=!0;if(Y==="data"){$=Y.length?$.slice(Y.length+1):$;let G=sF.exec($);if(!G)throw new O("Invalid URL",O.ERR_INVALID_URL);let q=G[1],W=G[2],z=G[3]?"base64":"utf8",V=G[4],K;if(q)K=W?q+W:q;else if(W)K="text/plain"+W;let U=Buffer.from(decodeURIComponent(V),z);if(Q){if(!X)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new X([U],{type:K})}return U}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var sF;var AK=R(()=>{K8();n8();sF=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import rF from"stream";var fG,EK,mG;var kK=R(()=>{A0();fG=Symbol("internals");EK=class EK extends rF.Transform{constructor($){$=B.toFlatObject($,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(J,X)=>{return!B.isUndefined(X[J])});super({readableHighWaterMark:$.chunkSize});let Q=this[fG]={timeWindow:$.timeWindow,chunkSize:$.chunkSize,maxRate:$.maxRate,minChunkSize:$.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(J)=>{if(J==="progress"){if(!Q.isCaptured)Q.isCaptured=!0}})}_read($){let Q=this[fG];if(Q.onReadCallback)Q.onReadCallback();return super._read($)}_transform($,Q,J){let X=this[fG],Y=X.maxRate,G=this.readableHighWaterMark,q=X.timeWindow,W=1000/q,z=Y/W,V=X.minChunkSize!==!1?Math.max(X.minChunkSize,z*0.01):0,K=(x,M)=>{let H=Buffer.byteLength(x);if(X.bytesSeen+=H,X.bytes+=H,X.isCaptured&&this.emit("progress",X.bytesSeen),this.push(x))process.nextTick(M);else X.onReadCallback=()=>{X.onReadCallback=null,process.nextTick(M)}},U=(x,M)=>{let H=Buffer.byteLength(x),w=null,j=G,Z,L=0;if(Y){let D=Date.now();if(!X.ts||(L=D-X.ts)>=q)X.ts=D,Z=z-X.bytes,X.bytes=Z<0?-Z:0,L=0;Z=z-X.bytes}if(Y){if(Z<=0)return setTimeout(()=>{M(null,x)},q-L);if(Z<j)j=Z}if(j&&H>j&&H-j>V)w=x.subarray(j),x=x.subarray(0,j);K(x,w?()=>{process.nextTick(M,null,w)}:M)};U($,function x(M,H){if(M)return J(M);if(H)U(H,x);else J(null)})}};mG=EK});var cK,tF=async function*($){if($.stream)yield*$.stream();else if($.arrayBuffer)yield await $.arrayBuffer();else if($[cK])yield*$[cK]();else yield $},A7;var yG=R(()=>{({asyncIterator:cK}=Symbol),A7=tF});import eF from"util";import{Readable as $C}from"stream";class SK{constructor($,Q){let{escapeName:J}=this.constructor,X=B.isString(Q),Y=`Content-Disposition: form-data; name="${J($)}"${!X&&Q.name?`; filename="${J(Q.name)}"`:""}${kQ}`;if(X)Q=QY.encode(String(Q).replace(/\r?\n|\r\n?/g,kQ));else{let G=String(Q.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${G}${kQ}`}this.headers=QY.encode(Y+kQ),this.contentLength=X?Q.byteLength:Q.size,this.size=this.headers.byteLength+this.contentLength+XC,this.name=$,this.value=Q}async*encode(){yield this.headers;let{value:$}=this;if(B.isTypedArray($))yield $;else yield*A7($);yield JC}static escapeName($){return String($).replace(/[\r\n"]/g,(Q)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[Q])}}var QC,QY,kQ=`\r
|
|
22
|
+
`,JC,XC=2,YC=($,Q,J)=>{let{tag:X="form-data-boundary",size:Y=25,boundary:G=X+"-"+O0.generateString(Y,QC)}=J||{};if(!B.isFormData($))throw TypeError("FormData instance required");if(G.length<1||G.length>70)throw Error("boundary must be 1-70 characters long");let q=QY.encode("--"+G+kQ),W=QY.encode("--"+G+"--"+kQ),z=W.byteLength,V=Array.from($.entries()).map(([U,x])=>{let M=new SK(U,x);return z+=M.size,M});z+=q.byteLength*V.length,z=B.toFiniteNumber(z);let K={"Content-Type":`multipart/form-data; boundary=${G}`};if(Number.isFinite(z))K["Content-Length"]=z;return Q&&Q(K),$C.from(async function*(){for(let U of V)yield q,yield*U.encode();yield W}())},bK;var fK=R(()=>{A0();yG();n8();QC=O0.ALPHABET.ALPHA_DIGIT+"-_",QY=typeof TextEncoder==="function"?new TextEncoder:new eF.TextEncoder,JC=QY.encode(kQ);bK=YC});import GC from"stream";var mK,yK;var hK=R(()=>{mK=class mK extends GC.Transform{__transform($,Q,J){this.push($),J()}_transform($,Q,J){if($.length!==0){if(this._transform=this.__transform,$[0]!==120){let X=Buffer.alloc(2);X[0]=120,X[1]=156,this.push(X,Q)}}this.__transform($,Q,J)}};yK=mK});import qC from"http2";import WC from"util";class pK{constructor(){this.sessions=Object.create(null)}getSession($,Q){Q=Object.assign({sessionTimeout:1000},Q);let J=this.sessions[$];if(J){let K=J.length;for(let U=0;U<K;U++){let[x,M]=J[U];if(!x.destroyed&&!x.closed&&WC.isDeepStrictEqual(M,Q))return x}}let X=qC.connect($,Q),Y,G,q=()=>{if(Y)return;if(Y=!0,G)clearTimeout(G),G=null;let K=J,U=K.length,x=U;while(x--)if(K[x][0]===X){if(U===1)delete this.sessions[$];else K.splice(x,1);if(!X.closed)X.close();return}},W=X.request,{sessionTimeout:z}=Q;if(z!=null){let K=0;X.request=function(){let U=W.apply(this,arguments);if(K++,G)clearTimeout(G),G=null;return U.once("close",()=>{if(!--K)G=setTimeout(()=>{G=null,q()},z)}),U}}X.once("close",q);let V=[X,Q];return J?J.push(V):J=this.sessions[$]=[V],X}}var uK;var gK=R(()=>{uK=pK});var zC=($,Q)=>{return B.isAsyncFn($)?function(...J){let X=J.pop();$.apply(this,J).then((Y)=>{try{Q?X(null,...Q(Y)):X(null,Y)}catch(G){X(G)}},X)}:$},lK;var iK=R(()=>{A0();lK=zC});function pG($){let Q;try{Q=new URL($)}catch(G){return!1}let J=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!J)return!1;if(J==="*")return!0;let X=Number.parseInt(Q.port,10)||xC[Q.protocol.split(":",1)[0]]||0,Y=dK(Q.hostname.toLowerCase());return J.split(/[\s,]+/).some((G)=>{if(!G)return!1;let[q,W]=MC(G);if(q=dK(q),!q)return!1;if(W&&W!==X)return!1;if(q.charAt(0)==="*")q=q.slice(1);if(q.charAt(0)===".")return Y.endsWith(q);return Y===q||nK(Y)&&nK(q)})}var VC,aK=($)=>{let Q=$.split(".");if(Q.length!==4)return!1;if(Q[0]!=="127")return!1;return Q.every((J)=>/^\d+$/.test(J)&&Number(J)>=0&&Number(J)<=255)},hG=($)=>/^0{1,4}$/.test($),KC=($)=>{if($==="::")return!0;let Q=$.indexOf("::");if(Q!==-1){if(Q!==$.lastIndexOf("::"))return!1;let X=$.slice(0,Q),Y=$.slice(Q+2),G=X?X.split(":"):[],q=Y?Y.split(":"):[];return G.length+q.length<8&&G.every(hG)&&q.every(hG)}let J=$.split(":");return J.length===8&&J.every(hG)},UC=($)=>{if($==="::1")return!0;let Q=$.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(Q)return aK(Q[1]);let J=$.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(J){let Y=parseInt(J[1],16);return Y>=32512&&Y<=32767}let X=$.split(":");if(X.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(X[Y]))return!1;return/^0*1$/.test(X[7])}return!1},nK=($)=>{if(!$)return!1;if(VC.has($))return!0;if(aK($))return!0;if(KC($))return!0;return UC($)},xC,MC=($)=>{let Q=$,J=0;if(Q.charAt(0)==="["){let G=Q.indexOf("]");if(G!==-1){let q=Q.slice(1,G),W=Q.slice(G+1);if(W.charAt(0)===":"&&/^\d+$/.test(W.slice(1)))J=Number.parseInt(W.slice(1),10);return[q,J]}}let X=Q.indexOf(":"),Y=Q.lastIndexOf(":");if(X!==-1&&X===Y&&/^\d+$/.test(Q.slice(Y+1)))J=Number.parseInt(Q.slice(Y+1),10),Q=Q.slice(0,Y);return[Q,J]},HC,BC,ZC=($)=>{if(typeof $!=="string"||$.indexOf(":")===-1)return $;let Q=$.match(HC);if(Q)return Q[1];let J=$.match(BC);if(J){let X=parseInt(J[1],16),Y=parseInt(J[2],16);return`${X>>8}.${X&255}.${Y>>8}.${Y&255}`}return $},dK=($)=>{if(!$)return $;if($.charAt(0)==="["&&$.charAt($.length-1)==="]")$=$.slice(1,-1);return ZC($.replace(/\.+$/,""))};var oK=R(()=>{VC=new Set(["localhost","0.0.0.0"]),xC={http:80,https:443,ws:80,wss:443,ftp:21},HC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,BC=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function wC($,Q){$=$||10;let J=Array($),X=Array($),Y=0,G=0,q;return Q=Q!==void 0?Q:1000,function(z){let V=Date.now(),K=X[G];if(!q)q=V;J[Y]=z,X[Y]=V;let U=G,x=0;while(U!==Y)x+=J[U++],U=U%$;if(Y=(Y+1)%$,Y===G)G=(G+1)%$;if(V-q<Q)return;let M=K&&V-K;return M?Math.round(x*1000/M):void 0}}var sK;var rK=R(()=>{sK=wC});function jC($,Q){let J=0,X=1000/Q,Y,G,q=(V,K=Date.now())=>{if(J=K,Y=null,G)clearTimeout(G),G=null;$(...V)};return[(...V)=>{let K=Date.now(),U=K-J;if(U>=X)q(V,K);else if(Y=V,!G)G=setTimeout(()=>{G=null,q(Y)},X-U)},()=>Y&&q(Y)]}var tK;var eK=R(()=>{tK=jC});var R$=($,Q,J=3)=>{let X=0,Y=sK(50,250);return tK((G)=>{if(!G||typeof G.loaded!=="number")return;let q=G.loaded,W=G.lengthComputable?G.total:void 0,z=W!=null?Math.min(q,W):q,V=Math.max(0,z-X),K=Y(V);X=Math.max(X,z);let U={loaded:z,total:W,progress:W?z/W:void 0,bytes:V,rate:K?K:void 0,estimated:K&&W?(W-z)/K:void 0,event:G,lengthComputable:W!=null,[Q?"download":"upload"]:!0};$(U)},J)},FJ=($,Q)=>{let J=$!=null;return[(X)=>Q[0]({lengthComputable:J,total:$,loaded:X}),Q[1]]},CJ=($)=>(...Q)=>B.asap(()=>$(...Q));var E7=R(()=>{rK();eK();A0()});function JY($){if(!$||typeof $!=="string")return 0;if(!$.startsWith("data:"))return 0;let Q=$.indexOf(",");if(Q<0)return 0;let J=$.slice(5,Q),X=$.slice(Q+1);if(/;base64/i.test(J)){let{length:q,length:W}=X;for(let M=0;M<W;M++)if(X.charCodeAt(M)===37&&M+2<W){let H=X.charCodeAt(M+1),w=X.charCodeAt(M+2);if(k7(H)&&k7(w))q-=2,M+=2}let z=0,V=W-1,K=(M)=>M>=2&&X.charCodeAt(M-2)===37&&X.charCodeAt(M-1)===51&&(X.charCodeAt(M)===68||X.charCodeAt(M)===100);if(V>=0){if(X.charCodeAt(V)===61)z++,V--;else if(K(V))z++,V-=3}if(z===1&&V>=0){if(X.charCodeAt(V)===61)z++;else if(K(V))z++}let x=Math.floor(q/4)*3-(z||0);return x>0?x:0}let G=0;for(let q=0,W=X.length;q<W;q++){let z=X.charCodeAt(q);if(z===37&&LC(X,q,W))G+=1,q+=2;else if(z<128)G+=1;else if(z<2048)G+=2;else if(z>=55296&&z<=56319&&q+1<W){let V=X.charCodeAt(q+1);if(V>=56320&&V<=57343)G+=4,q++;else G+=3}else G+=3}return G}var k7=($)=>$>=48&&$<=57||$>=65&&$<=70||$>=97&&$<=102,LC=($,Q,J)=>Q+2<J&&k7($.charCodeAt(Q+1))&&k7($.charCodeAt(Q+2));import RC from"http";import DC from"https";import _C from"http2";import NC from"util";import{resolve as $U}from"path";import E8 from"zlib";import d8 from"stream";import{EventEmitter as vC}from"events";function AC($,Q,J){if(J!=="content-only"){$.set(Q);return}Object.entries(Q).forEach(([X,Y])=>{if(TC.includes(X.toLowerCase()))$.set(X,Y)})}function kC($,Q){let J=$.protocol+"//"+$.hostname+":"+($.port||"")+"#"+($.auth||""),X=Q?XU.get(Q)||XU.set(Q,new Map).get(Q):EC,Y=X.get(J);if(Y)return Y;let G=Q&&Q.options?{...Q.options,...$}:$;if(Y=new uG.default(G),Q&&Q.options){let q={...Q.options},W=Y.callback;Y.callback=function(V,K){return W.call(this,V,{...q,...K})}}return Y[MU]=!0,X.set(J,Y),Y}function SC($,Q,J){if($.beforeRedirects.proxy)$.beforeRedirects.proxy($);if($.beforeRedirects.auth)$.beforeRedirects.auth($);if($.beforeRedirects.sensitiveHeaders)$.beforeRedirects.sensitiveHeaders($,J);if($.beforeRedirects.config)$.beforeRedirects.config($,Q,J)}function bC($,Q){if(!$)return;Object.keys($).forEach((J)=>{if(Q.has(J.toLowerCase()))delete $[J]})}function fC($,Q){if(!Q)return!1;try{return new URL(Q.url).origin===new URL($.href).origin}catch(J){return!1}}function HU($,Q,J,X,Y){let G=Q;if(!G&&G!==!1){let q=s2(J);if(q){if(!pG(J))G=new URL(q)}}if(X&&$.headers){for(let q of Object.keys($.headers))if(q.toLowerCase()==="proxy-authorization")delete $.headers[q]}if(X&&$.agent&&$.agent[MU])$.agent=void 0;if(G){let q=G instanceof URL,W=(x)=>q||B.hasOwnProp(G,x)?G[x]:void 0,z=W("username"),V=W("password"),K=B.hasOwnProp(G,"auth")?G.auth:void 0;if(z)K=(z||"")+":"+(V||"");if(K){let x=typeof K==="object",M=x&&B.hasOwnProp(K,"username")?K.username:void 0,H=x&&B.hasOwnProp(K,"password")?K.password:void 0;if(Boolean(M||H))K=(M||"")+":"+(H||"");else if(x)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:G})}if(xU.test($.protocol)){if(!(Y instanceof uG.default)){let x=W("hostname")||W("host"),M=W("port"),H=W("protocol"),w=H?H.includes(":")?H:`${H}:`:"http:",j=x&&x.includes(":")&&!x.startsWith("[")?`[${x}]`:x,Z=new URL(`${w}//${j}${M?":"+M:""}`),L={protocol:Z.protocol,hostname:Z.hostname.replace(/^\[|\]$/g,""),port:Z.port,auth:K&&typeof K==="string"?K:void 0};if(Z.protocol==="https:")L.ALPNProtocols=["http/1.1"];let D=kC(L,Y);if($.agent=D,$.agents)$.agents.https=D}}else{if(K){let w=Buffer.from(K,"utf8").toString("base64");$.headers["Proxy-Authorization"]="Basic "+w}let x=!1;for(let w of Object.keys($.headers))if(w.toLowerCase()==="host"){x=!0;break}if(!x)$.headers.host=$.hostname+($.port?":"+$.port:"");let M=W("hostname")||W("host");$.hostname=M,$.host=M,$.port=W("port"),$.path=J;let H=W("protocol");if(H)$.protocol=H.includes(":")?H:`${H}:`}}$.beforeRedirects.proxy=function(W){HU(W,Q,W.href,!0,Y)}}var uG,zU,QU,OC,FC,VU,KU,UU,CC,IC,PC,xU,TC,JU,c7,MU,EC,XU,YU,GU=($)=>{if(!B.isString($))return $;try{return decodeURIComponent($)}catch(Q){return $}},qU=($,[Q,J])=>{return $.on("end",J).on("error",J),Q},cC,mC,yC=($)=>{return new Promise((Q,J)=>{let X,Y,G=(z,V)=>{if(Y)return;Y=!0,X&&X(z,V)},q=(z)=>{G(z),Q(z)},W=(z)=>{G(z,!0),J(z)};$(q,W,(z)=>X=z).catch(W)})},hC=({address:$,family:Q})=>{if(!B.isString($))throw TypeError("address must be a string");return{address:$,family:Q||($.indexOf(".")<0?6:4)}},WU=($,Q)=>hC(B.isObject($)?$:{address:$,family:Q}),pC,BU;var ZU=R(()=>{A0();v7();O7();D7();r2();pX();K8();FQ();n8();AK();l8();kK();fK();yG();hK();gK();iK();oK();cX();E7();uG=G7(NK(),1),zU=G7(TK(),1),QU={flush:E8.constants.Z_SYNC_FLUSH,finishFlush:E8.constants.Z_SYNC_FLUSH},OC={flush:E8.constants.BROTLI_OPERATION_FLUSH,finishFlush:E8.constants.BROTLI_OPERATION_FLUSH},FC={flush:E8.constants.ZSTD_e_flush,finishFlush:E8.constants.ZSTD_e_flush},VU=B.isFunction(E8.createBrotliDecompress),KU=B.isFunction(E8.createZstdDecompress),UU="gzip, compress, deflate"+(VU?", br":""),CC=UU+(KU?", zstd":""),{http:IC,https:PC}=zU.default,xU=/https:?/,TC=["content-type","content-length"];JU=Symbol("axios.http.socketListener"),c7=Symbol("axios.http.currentReq"),MU=Symbol("axios.http.installedTunnel"),EC=new Map,XU=new WeakMap;YU=O0.protocols.map(($)=>{return $+":"}),cC=new uK;mC=typeof process<"u"&&B.kindOf(process)==="process",pC={request($,Q){let J=$.protocol+"//"+$.hostname+":"+($.port||($.protocol==="https:"?443:80)),{http2Options:X,headers:Y}=$,G=cC.getSession(J,X),{HTTP2_HEADER_SCHEME:q,HTTP2_HEADER_METHOD:W,HTTP2_HEADER_PATH:z,HTTP2_HEADER_STATUS:V}=_C.constants,K={[q]:$.protocol.replace(":",""),[W]:$.method,[z]:$.path};B.forEach(Y,(x,M)=>{M.charAt(0)!==":"&&(K[M]=x)});let U=G.request(K);return U.once("response",(x)=>{let M=U;x=Object.assign({},x);let H=x[V];delete x[V],M.headers=x,M.statusCode=+H,Q(M)}),U}},BU=mC&&function(Q){return yC(async function(X,Y,G){let q=(I)=>B.getSafeProp(Q,I),W=q("transitional")||d$,z=q("data"),V=q("lookup"),K=q("family"),U=q("httpVersion");if(U===void 0)U=1;let x=q("http2Options"),M=q("responseType"),H=q("responseEncoding"),w=q("httpAgent"),j=q("httpsAgent"),Z=q("method").toUpperCase(),L=q("maxRedirects"),D=q("maxBodyLength"),F=q("maxContentLength"),J0=q("decompress"),n,e=!1,y,p;if(U=+U,Number.isNaN(U))throw TypeError(`Invalid protocol version: '${Q.httpVersion}' is not a number`);if(U!==1&&U!==2)throw TypeError(`Unsupported protocol version '${U}'`);let q0=U===2;if(V){let I=lK(V,(u)=>B.isArray(u)?u:[u]);V=(u,U0,T0)=>{I(u,U0,(B0,p0,b0)=>{if(B0)return T0(B0);let m0=B.isArray(p0)?p0.map((zJ)=>WU(zJ)):[WU(p0,b0)];U0.all?T0(B0,m0):T0(B0,m0[0].address,m0[0].family)})}}let t=new vC;function N(I){try{t.emit("abort",!I||I.type?new D8(null,Q,y):I)}catch(u){}}function c(){if(p)clearTimeout(p),p=null}function _(){let I=q("timeout"),u=I?"timeout of "+I+"ms exceeded":"timeout exceeded",U0=q("timeoutErrorMessage");if(U0)u=U0;return new O(u,W.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,Q,y)}t.once("abort",Y);let C=()=>{if(c(),Q.cancelToken)Q.cancelToken.unsubscribe(N);if(Q.signal)Q.signal.removeEventListener("abort",N);t.removeAllListeners()};if(Q.cancelToken||Q.signal){if(Q.cancelToken&&Q.cancelToken.subscribe(N),Q.signal)Q.signal.aborted?N():Q.signal.addEventListener("abort",N)}G((I,u)=>{if(n=!0,c(),u){e=!0,C();return}let{data:U0}=I;if(U0 instanceof d8.Readable||U0 instanceof d8.Duplex){let T0=d8.finished(U0,()=>{T0(),C()})}else C()});let E=CQ(q("baseURL"),q("url"),q("allowAbsoluteUrls"),Q),T=new URL(E,O0.hasBrowserEnv?O0.origin:void 0),v=T.protocol||YU[0];if(v==="data:"){if(F>-1){let u=String(q("url")||E||"");if(JY(u)>F)return Y(new O("maxContentLength size of "+F+" exceeded",O.ERR_BAD_RESPONSE,Q))}let I;if(Z!=="GET")return z$(X,Y,{status:405,statusText:"method not allowed",headers:{},config:Q});try{I=bG(q("url"),M==="blob",{Blob:Q.env&&Q.env.Blob})}catch(u){throw O.from(u,O.ERR_BAD_REQUEST,Q)}if(M==="text"){if(I=I.toString(H),!H||H==="utf8")I=B.stripBOM(I)}else if(M==="stream")I=d8.Readable.from(I);return z$(X,Y,{data:I,status:200,statusText:"OK",headers:new E0,config:Q})}if(YU.indexOf(v)===-1)return Y(new O("Unsupported protocol "+v,O.ERR_BAD_REQUEST,Q));let k=E0.from(Q.headers).normalize();k.set("User-Agent","axios/"+L$,!1);let{onUploadProgress:f,onDownloadProgress:S}=Q,$0=Q.maxRate,W0=void 0,X0=void 0;if(B.isSpecCompliantForm(z)){let I=k.getContentType(/boundary=([-_\w\d]{10,70})/i);z=bK(z,(u)=>{k.set(u)},{tag:`axios-${L$}-boundary`,boundary:I&&I[1]||void 0})}else if(B.isFormData(z)&&B.isFunction(z.getHeaders)&&z.getHeaders!==Object.prototype.getHeaders){if(AC(k,z.getHeaders(),q("formDataHeaderPolicy")),!k.hasContentLength())try{let I=await NC.promisify(z.getLength).call(z);Number.isFinite(I)&&I>=0&&k.setContentLength(I)}catch(I){}}else if(B.isBlob(z)||B.isFile(z))z.size&&k.setContentType(z.type||"application/octet-stream"),k.setContentLength(z.size||0),z=d8.Readable.from(A7(z));else if(z&&!B.isStream(z)){if(Buffer.isBuffer(z));else if(B.isArrayBuffer(z))z=Buffer.from(new Uint8Array(z));else if(B.isString(z))z=Buffer.from(z,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,Q));if(k.setContentLength(z.length,!1),D>-1&&z.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Q))}let C0=B.toFiniteNumber(k.getContentLength());if(B.isArray($0))W0=$0[0],X0=$0[1];else W0=X0=$0;if(z&&(f||W0)){if(!B.isStream(z))z=d8.Readable.from(z,{objectMode:!1});z=d8.pipeline([z,new mG({maxRate:B.toFiniteNumber(W0)})],B.noop),f&&z.on("progress",qU(z,FJ(C0,R$(CJ(f),!1,3))))}let o=void 0,v0=q("auth");if(v0){let I=B.getSafeProp(v0,"username")||"",u=B.getSafeProp(v0,"password")||"";o=I+":"+u}if(!o&&(T.username||T.password)){let I=GU(T.username),u=GU(T.password);o=I+":"+u}o&&k.delete("authorization");let D0;try{D0=OQ(T.pathname+T.search,q("params"),q("paramsSerializer")).replace(/^\?/,"")}catch(I){let u=Error(I.message);return u.config=Q,u.url=q("url"),u.exists=!0,Y(u)}k.set("Accept-Encoding",B.hasOwnProp(W,"advertiseZstdAcceptEncoding")&&W.advertiseZstdAcceptEncoding===!0?CC:UU,!1);let M0=Object.assign(Object.create(null),{path:D0,method:Z,headers:HJ(k),agents:{http:w,https:j},auth:o,protocol:v,family:K,beforeRedirect:SC,beforeRedirects:Object.create(null),http2Options:x});!B.isUndefined(V)&&(M0.lookup=V);let j8=q("socketPath");if(j8){if(typeof j8!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,Q));let I=q("allowedSocketPaths");if(I!=null){let u=Array.isArray(I)?I:[I],U0=$U(j8);if(!u.some((B0)=>typeof B0==="string"&&$U(B0)===U0))return Y(new O(`socketPath "${j8}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,Q))}M0.socketPath=j8}else M0.hostname=T.hostname.startsWith("[")?T.hostname.slice(1,-1):T.hostname,M0.port=T.port,HU(M0,q("proxy"),v+"//"+T.hostname+(T.port?":"+T.port:"")+M0.path,!1,j);let L8,V8=!1,l$=!1,DQ=xU.test(M0.protocol);if(M0.agent==null)M0.agent=DQ?j:w;if(q0)L8=pC;else{let I=q("transport");if(I)L8=I;else if(L===0)L8=DQ?DC:RC,V8=!0;else{if(l$=!0,M0.sensitiveHeaders=[],L)M0.maxRedirects=L;let u=q("beforeRedirect");if(u)M0.beforeRedirects.config=u;if(o){let T0=T.origin,B0=o;M0.beforeRedirects.auth=function(b0){try{if(new URL(b0.href).origin===T0)b0.auth=B0}catch(m0){}}}let U0=q("sensitiveHeaders");if(U0!=null){if(!B.isArray(U0))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,Q));let T0=new Set;for(let B0 of U0){if(!B.isString(B0))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,Q));T0.add(B0.toLowerCase())}if(T0.size)M0.sensitiveHeaders=Array.from(T0),M0.beforeRedirects.sensitiveHeaders=function(p0,b0){if(!fC(p0,b0))bC(p0.headers,T0)}}L8=DQ?PC:IC}}if(D>-1)M0.maxBodyLength=D;else M0.maxBodyLength=1/0;M0.insecureHTTPParser=Boolean(q("insecureHTTPParser")),y=L8.request(M0,function(u){if(c(),y.destroyed)return;let U0=[u],T0=B.toFiniteNumber(u.headers["content-length"]);if(S||X0){let m0=new mG({maxRate:B.toFiniteNumber(X0)});S&&m0.on("progress",qU(m0,FJ(T0,R$(CJ(S),!0,3)))),U0.push(m0)}let B0=u,p0=u.req||y;if(J0!==!1&&u.headers["content-encoding"]){if(Z==="HEAD"||u.statusCode===204)delete u.headers["content-encoding"];switch((u.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":U0.push(E8.createUnzip(QU)),delete u.headers["content-encoding"];break;case"deflate":U0.push(new yK),U0.push(E8.createUnzip(QU)),delete u.headers["content-encoding"];break;case"br":if(VU)U0.push(E8.createBrotliDecompress(OC)),delete u.headers["content-encoding"];break;case"zstd":if(KU)U0.push(E8.createZstdDecompress(FC)),delete u.headers["content-encoding"];break}}B0=U0.length>1?d8.pipeline(U0,B.noop):U0[0];let b0={status:u.statusCode,statusText:u.statusMessage,headers:new E0(u.headers),config:Q,request:p0};if(M==="stream"){if(F>-1){let m0=F,zJ=B0;async function*PX(){let i0=0;for await(let KV of zJ){if(i0+=KV.length,i0>m0)throw new O("maxContentLength size of "+m0+" exceeded",O.ERR_BAD_RESPONSE,Q,p0);yield KV}}B0=d8.Readable.from(PX(),{objectMode:!1})}b0.data=B0,z$(X,Y,b0)}else{let m0=[],zJ=0;B0.on("data",function(i0){if(m0.push(i0),zJ+=i0.length,F>-1&&zJ>F)e=!0,B0.destroy(),N(new O("maxContentLength size of "+F+" exceeded",O.ERR_BAD_RESPONSE,Q,p0))}),B0.on("aborted",function(){if(e)return;let i0=new O("stream has been aborted",O.ERR_BAD_RESPONSE,Q,p0,b0);B0.destroy(i0),Y(i0)}),B0.on("error",function(i0){if(e)return;Y(O.from(i0,null,Q,p0,b0))}),B0.on("end",function(){try{let i0=m0.length===1?m0[0]:Buffer.concat(m0);if(M!=="arraybuffer"){if(i0=i0.toString(H),!H||H==="utf8")i0=B.stripBOM(i0)}b0.data=i0}catch(i0){return Y(O.from(i0,null,Q,b0.request,b0))}z$(X,Y,b0)})}t.once("abort",(m0)=>{if(!B0.destroyed)B0.emit("error",m0),B0.destroy()})}),t.once("abort",(I)=>{if(y.close)y.close();else y.destroy(I)}),y.on("error",function(u){Y(O.from(u,null,Q,y))});let R8=new Set;if(y.on("socket",function(u){if(u.setKeepAlive(!0,60000),!u[JU])u.on("error",function(T0){let B0=u[c7];if(B0&&!B0.destroyed)B0.destroy(T0)}),u[JU]=!0;u[c7]=y,R8.add(u)}),y.once("close",function(){c();for(let u of R8)if(u[c7]===y)u[c7]=null;R8.clear()}),q("timeout")){let I=parseInt(q("timeout"),10);if(Number.isNaN(I)){N(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,Q,y));return}let u=function(){if(n)return;N(_())};if(V8&&I>0)p=setTimeout(u,I);y.setTimeout(I,u)}else y.setTimeout(0);if(B.isStream(z)){let I=!1,u=!1;z.on("end",()=>{I=!0}),z.once("error",(T0)=>{u=!0,y.destroy(T0)}),z.on("close",()=>{if(!I&&!u)N(new D8("Request stream has been aborted",Q,y))});let U0=z;if(D>-1&&!l$){let T0=D,B0=0;U0=d8.pipeline([z,new d8.Transform({transform(p0,b0,m0){if(B0+=p0.length,B0>T0)return m0(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Q,y));m0(null,p0)}})],B.noop),U0.on("error",(p0)=>{if(!y.destroyed)y.destroy(p0)})}U0.pipe(y)}else z&&y.write(z),y.end()})}});var wU;var jU=R(()=>{n8();wU=O0.hasStandardBrowserEnv?(($,Q)=>(J)=>{return J=new URL(J,O0.origin),$.protocol===J.protocol&&$.host===J.host&&(Q||$.port===J.port)})(new URL(O0.origin),O0.navigator&&/(msie|trident)/i.test(O0.navigator.userAgent)):()=>!0});var LU;var RU=R(()=>{A0();n8();LU=O0.hasStandardBrowserEnv?{write($,Q,J,X,Y,G,q){if(typeof document>"u")return;let W=[`${$}=${encodeURIComponent(Q)}`];if(B.isNumber(J))W.push(`expires=${new Date(J).toUTCString()}`);if(B.isString(X))W.push(`path=${X}`);if(B.isString(Y))W.push(`domain=${Y}`);if(G===!0)W.push("secure");if(B.isString(q))W.push(`SameSite=${q}`);document.cookie=W.join("; ")},read($){if(typeof document>"u")return null;let Q=document.cookie.split(";");for(let J=0;J<Q.length;J++){let X=Q[J].replace(/^\s+/,""),Y=X.indexOf("=");if(Y!==-1&&X.slice(0,Y)===$)return decodeURIComponent(X.slice(Y+1))}return null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function a8($,Q){Q=Q||{};let J=Object.create(null);Object.defineProperty(J,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function X(K,U,x,M){if(B.isPlainObject(K)&&B.isPlainObject(U))return B.merge.call({caseless:M},K,U);else if(B.isPlainObject(U))return B.merge({},U);else if(B.isArray(U))return U.slice();return U}function Y(K,U,x,M){if(!B.isUndefined(U))return X(K,U,x,M);else if(!B.isUndefined(K))return X(void 0,K,x,M)}function G(K,U){if(!B.isUndefined(U))return X(void 0,U)}function q(K,U){if(!B.isUndefined(U))return X(void 0,U);else if(!B.isUndefined(K))return X(void 0,K)}function W(K){let U=B.hasOwnProp(Q,"transitional")?Q.transitional:void 0;if(!B.isUndefined(U))if(B.isPlainObject(U)){if(B.hasOwnProp(U,K))return U[K]}else return;let x=B.hasOwnProp($,"transitional")?$.transitional:void 0;if(B.isPlainObject(x)&&B.hasOwnProp(x,K))return x[K];return}function z(K,U,x){if(B.hasOwnProp(Q,x))return X(K,U);else if(B.hasOwnProp($,x))return X(void 0,K)}let V={url:G,method:G,data:G,baseURL:q,transformRequest:q,transformResponse:q,paramsSerializer:q,timeout:q,timeoutMessage:q,withCredentials:q,withXSRFToken:q,adapter:q,responseType:q,xsrfCookieName:q,xsrfHeaderName:q,onUploadProgress:q,onDownloadProgress:q,decompress:q,maxContentLength:q,maxBodyLength:q,beforeRedirect:q,transport:q,httpAgent:q,httpsAgent:q,cancelToken:q,socketPath:q,allowedSocketPaths:q,responseEncoding:q,validateStatus:z,headers:(K,U,x)=>Y(DU(K),DU(U),x,!0)};if(B.forEach(Object.keys({...$,...Q}),function(U){if(U==="__proto__"||U==="constructor"||U==="prototype")return;let x=B.hasOwnProp(V,U)?V[U]:Y,M=B.hasOwnProp($,U)?$[U]:void 0,H=B.hasOwnProp(Q,U)?Q[U]:void 0,w=x(M,H,U);B.isUndefined(w)&&x!==z||(J[U]=w)}),B.hasOwnProp(Q,"validateStatus")&&B.isUndefined(Q.validateStatus)&&W("validateStatusUndefinedResolves")===!1)if(B.hasOwnProp($,"validateStatus"))J.validateStatus=X(void 0,$.validateStatus);else delete J.validateStatus;return J}var DU=($)=>$ instanceof E0?{...$}:$;var S7=R(()=>{A0();l8()});function gC($,Q,J){if(J!=="content-only"){$.set(Q);return}Object.entries(Q).forEach(([X,Y])=>{if(uC.includes(X.toLowerCase()))$.set(X,Y)})}function iC($){let Q=a8({},$),J=(x)=>B.hasOwnProp(Q,x)?Q[x]:void 0,X=J("data"),Y=J("withXSRFToken"),G=J("xsrfHeaderName"),q=J("xsrfCookieName"),W=J("headers"),z=J("auth"),V=J("baseURL"),K=J("allowAbsoluteUrls"),U=J("url");if(Q.headers=W=E0.from(W),Q.url=OQ(CQ(V,U,K,Q),J("params"),J("paramsSerializer")),z){let x=B.getSafeProp(z,"username")||"",M=B.getSafeProp(z,"password")||"";W.set("Authorization","Basic "+btoa(x+":"+(M?lC(M):"")))}if(B.isFormData(X)){if(O0.hasStandardBrowserEnv||O0.hasStandardBrowserWebWorkerEnv||B.isReactNative(X))W.setContentType(void 0);else if(B.isFunction(X.getHeaders))gC(W,X.getHeaders(),J("formDataHeaderPolicy"))}if(O0.hasStandardBrowserEnv){if(B.isFunction(Y))Y=Y(Q);if(Y===!0||Y==null&&wU(Q.url)){let M=G&&q&&LU.read(q);if(M)W.set(G,M)}}return Q}var uC,lC=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Q,J)=>String.fromCharCode(parseInt(J,16))),b7;var gG=R(()=>{n8();A0();jU();RU();O7();S7();l8();D7();uC=["content-type","content-length"];b7=iC});var nC,_U;var NU=R(()=>{A0();v7();pX();K8();FQ();n8();l8();E7();gG();cX();nC=typeof XMLHttpRequest<"u",_U=nC&&function($){return new Promise(function(J,X){let Y=b7($),G=Y.data,q=E0.from(Y.headers).normalize(),{responseType:W,onUploadProgress:z,onDownloadProgress:V}=Y,K,U,x,M,H;function w(){M&&M(),H&&H(),Y.cancelToken&&Y.cancelToken.unsubscribe(K),Y.signal&&Y.signal.removeEventListener("abort",K)}let j=new XMLHttpRequest;j.open(Y.method.toUpperCase(),Y.url,!0),j.timeout=Y.timeout;function Z(){if(!j)return;let D=E0.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),J0={data:!W||W==="text"||W==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:D,config:$,request:j};z$(function(e){J(e),w()},function(e){X(e),w()},J0),j=null}if("onloadend"in j)j.onloadend=Z;else j.onreadystatechange=function(){if(!j||j.readyState!==4)return;if(j.status===0&&!(j.responseURL&&j.responseURL.startsWith("file:")))return;setTimeout(Z)};if(j.onabort=function(){if(!j)return;X(new O("Request aborted",O.ECONNABORTED,$,j)),w(),j=null},j.onerror=function(F){let J0=F&&F.message?F.message:"Network Error",n=new O(J0,O.ERR_NETWORK,$,j);n.event=F||null,X(n),w(),j=null},j.ontimeout=function(){let F=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",J0=Y.transitional||d$;if(Y.timeoutErrorMessage)F=Y.timeoutErrorMessage;X(new O(F,J0.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,j)),w(),j=null},G===void 0&&q.setContentType(null),"setRequestHeader"in j)B.forEach(HJ(q),function(F,J0){j.setRequestHeader(J0,F)});if(!B.isUndefined(Y.withCredentials))j.withCredentials=!!Y.withCredentials;if(W&&W!=="json")j.responseType=Y.responseType;if(V)[x,H]=R$(V,!0),j.addEventListener("progress",x);if(z&&j.upload)[U,M]=R$(z),j.upload.addEventListener("progress",U),j.upload.addEventListener("loadend",M);if(Y.cancelToken||Y.signal){if(K=(D)=>{if(!j)return;X(!D||D.type?new D8(null,$,j):D),j.abort(),w(),j=null},Y.cancelToken&&Y.cancelToken.subscribe(K),Y.signal)Y.signal.aborted?K():Y.signal.addEventListener("abort",K)}let L=$Y(Y.url);if(L&&!O0.protocols.includes(L)){X(new O("Unsupported protocol "+L+":",O.ERR_BAD_REQUEST,$));return}j.send(G||null)})}});var dC=($,Q)=>{if($=$?$.filter(Boolean):[],!Q&&!$.length)return;let J=new AbortController,X=!1,Y=function(z){if(!X){X=!0,q();let V=z instanceof Error?z:this.reason;J.abort(V instanceof O?V:new D8(V instanceof Error?V.message:V))}},G=Q&&setTimeout(()=>{G=null,Y(new O(`timeout of ${Q}ms exceeded`,O.ETIMEDOUT))},Q),q=()=>{if(!$)return;G&&clearTimeout(G),G=null,$.forEach((z)=>{z.unsubscribe?z.unsubscribe(Y):z.removeEventListener("abort",Y)}),$=null};$.forEach((z)=>z.addEventListener("abort",Y));let{signal:W}=J;return W.unsubscribe=()=>B.asap(q),W},vU;var OU=R(()=>{FQ();K8();A0();vU=dC});var aC=function*($,Q){let J=$.byteLength;if(!Q||J<Q){yield $;return}let X=0,Y;while(X<J)Y=X+Q,yield $.slice(X,Y),X=Y},oC=async function*($,Q){for await(let J of sC($))yield*aC(J,Q)},sC=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Q=$.getReader();try{for(;;){let{done:J,value:X}=await Q.read();if(J)break;yield X}}finally{await Q.cancel()}},lG=($,Q,J,X)=>{let Y=oC($,Q),G=0,q,W=(z)=>{if(!q)q=!0,X&&X(z)};return new ReadableStream({async pull(z){try{let{done:V,value:K}=await Y.next();if(V){W(),z.close();return}let U=K.byteLength;if(J){let x=G+=U;J(x)}z.enqueue(new Uint8Array(K))}catch(V){throw W(V),V}},cancel(z){return W(z),Y.return()}},{highWaterMark:2})};var FU=65536,f7,rC=($)=>encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(Q,J)=>String.fromCharCode(parseInt(J,16))),CU=($)=>{if(!B.isString($))return $;try{return decodeURIComponent($)}catch(Q){return $}},IU=($,...Q)=>{try{return!!$(...Q)}catch(J){return!1}},tC=($)=>{let Q=$.indexOf("://"),J=$;if(Q!==-1)J=J.slice(Q+3);return J.includes("@")||J.includes(":")},eC=($)=>{let Q=B.global!==void 0&&B.global!==null?B.global:globalThis,{ReadableStream:J,TextEncoder:X}=Q;$=B.merge.call({skipUndefined:!0},{Request:Q.Request,Response:Q.Response},$);let{fetch:Y,Request:G,Response:q}=$,W=Y?f7(Y):typeof fetch==="function",z=f7(G),V=f7(q);if(!W)return!1;let K=W&&f7(J),U=W&&(typeof X==="function"?((Z)=>(L)=>Z.encode(L))(new X):async(Z)=>new Uint8Array(await new G(Z).arrayBuffer())),x=z&&K&&IU(()=>{let Z=!1,L=new G(O0.origin,{body:new J,method:"POST",get duplex(){return Z=!0,"half"}}),D=L.headers.has("Content-Type");if(L.body!=null)L.body.cancel();return Z&&!D}),M=V&&K&&IU(()=>B.isReadableStream(new q("").body)),H={stream:M&&((Z)=>Z.body)};W&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((Z)=>{!H[Z]&&(H[Z]=(L,D)=>{let F=L&&L[Z];if(F)return F.call(L);throw new O(`Response type '${Z}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let w=async(Z)=>{if(Z==null)return 0;if(B.isBlob(Z))return Z.size;if(B.isSpecCompliantForm(Z))return(await new G(O0.origin,{method:"POST",body:Z}).arrayBuffer()).byteLength;if(B.isArrayBufferView(Z)||B.isArrayBuffer(Z))return Z.byteLength;if(B.isURLSearchParams(Z))Z=Z+"";if(B.isString(Z))return(await U(Z)).byteLength},j=async(Z,L)=>{let D=B.toFiniteNumber(Z.getContentLength());return D==null?w(L):D};return async(Z)=>{let{url:L,method:D,data:F,signal:J0,cancelToken:n,timeout:e,onDownloadProgress:y,onUploadProgress:p,responseType:q0,headers:t,withCredentials:N="same-origin",fetchOptions:c,maxContentLength:_,maxBodyLength:C}=b7(Z),E=B.isNumber(_)&&_>-1,T=B.isNumber(C)&&C>-1,v=(o)=>B.hasOwnProp(Z,o)?Z[o]:void 0,k=Y||fetch;q0=q0?(q0+"").toLowerCase():"text";let f=vU([J0,n&&n.toAbortSignal()],e),S=null,$0=f&&f.unsubscribe&&(()=>{f.unsubscribe()}),W0,X0=null,C0=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,Z,S);try{let o=void 0,v0=v("auth");if(v0){let I=B.getSafeProp(v0,"username")||"",u=B.getSafeProp(v0,"password")||"";o={username:I,password:u}}if(tC(L)){let I=new URL(L,O0.origin);if(!o&&(I.username||I.password)){let u=CU(I.username),U0=CU(I.password);o={username:u,password:U0}}if(I.username||I.password)I.username="",I.password="",L=I.href}if(o)t.delete("authorization"),t.set("Authorization","Basic "+btoa(rC((o.username||"")+":"+(o.password||""))));if(E&&typeof L==="string"&&L.startsWith("data:")){if(JY(L)>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}if(T&&D!=="get"&&D!=="head"){let I=await w(F);if(typeof I==="number"&&isFinite(I)){if(W0=I,I>C)throw C0()}}let D0=T&&(B.isReadableStream(F)||B.isStream(F)),M0=(I,u,U0)=>lG(I,FU,(T0)=>{if(T&&T0>C)throw X0=C0();u&&u(T0)},U0);if(x&&D!=="get"&&D!=="head"&&(p||D0)){if(W0=W0==null?await j(t,F):W0,W0!==0||D0){let I=new G(L,{method:"POST",body:F,duplex:"half"}),u;if(B.isFormData(F)&&(u=I.headers.get("content-type")))t.setContentType(u);if(I.body){let[U0,T0]=p&&FJ(W0,R$(CJ(p)))||[];F=M0(I.body,U0,T0)}}}else if(D0&&!z&&K&&D!=="get"&&D!=="head")F=M0(F);else if(D0&&z&&!x&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,Z,S);if(!B.isString(N))N=N?"include":"omit";let j8=z&&"credentials"in G.prototype;if(B.isFormData(F)){let I=t.getContentType();if(I&&/^multipart\/form-data/i.test(I)&&!/boundary=/i.test(I))t.delete("content-type")}t.set("User-Agent","axios/"+L$,!1);let L8={...c,signal:f,method:D.toUpperCase(),headers:HJ(t.normalize()),body:F,duplex:"half",credentials:j8?N:void 0};S=z&&new G(L,L8);let V8=await(z?k(S,c):k(L,L8)),l$=E0.from(V8.headers);if(E){let I=B.toFiniteNumber(l$.getContentLength());if(I!=null&&I>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}let DQ=M&&(q0==="stream"||q0==="response");if(M&&V8.body&&(y||E||DQ&&$0)){let I={};["status","statusText","headers"].forEach((b0)=>{I[b0]=V8[b0]});let u=B.toFiniteNumber(l$.getContentLength()),[U0,T0]=y&&FJ(u,R$(CJ(y),!0))||[],B0=0,p0=(b0)=>{if(E){if(B0=b0,B0>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}U0&&U0(b0)};V8=new q(lG(V8.body,FU,p0,()=>{T0&&T0(),$0&&$0()}),I)}q0=q0||"text";let R8=await H[B.findKey(H,q0)||"text"](V8,Z);if(E&&!M&&!DQ){let I;if(R8!=null){if(typeof R8.byteLength==="number")I=R8.byteLength;else if(typeof R8.size==="number")I=R8.size;else if(typeof R8==="string")I=typeof X==="function"?new X().encode(R8).byteLength:R8.length}if(typeof I==="number"&&I>_)throw new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,Z,S)}return!DQ&&$0&&$0(),await new Promise((I,u)=>{z$(I,u,{data:R8,headers:E0.from(V8.headers),status:V8.status,statusText:V8.statusText,config:Z,request:S})})}catch(o){if($0&&$0(),f&&f.aborted&&f.reason instanceof O){let v0=f.reason;throw v0.config=Z,S&&(v0.request=S),o!==v0&&(v0.cause=o),v0}if(X0)throw S&&!X0.request&&(X0.request=S),X0;if(o instanceof O)throw S&&!o.request&&(o.request=S),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,Z,S,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,Z,S,o&&o.response)}}},$I,iG=($)=>{let Q=$&&$.env||{},{fetch:J,Request:X,Response:Y}=Q,G=[X,Y,J],q=G.length,W=q,z,V,K=$I;while(W--)z=G[W],V=K.get(z),V===void 0&&K.set(z,V=W?new Map:eC(Q)),K=V;return V},Zr;var PU=R(()=>{n8();A0();K8();OU();l8();E7();gG();v7();cX();({isFunction:f7}=B),$I=new Map,Zr=iG()});function XI($,Q){$=B.isArray($)?$:[$];let{length:J}=$,X,Y,G={};for(let q=0;q<J;q++){X=$[q];let W;if(Y=X,!JI(X)){if(Y=nG[(W=String(X)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${W}'`)}if(Y&&(B.isFunction(Y)||(Y=Y.get(Q))))break;G[W||"#"+q]=Y}if(!Y){let q=Object.entries(G).map(([z,V])=>`adapter ${z} `+(V===!1?"is not supported by the environment":"is not available in the build")),W=J?q.length>1?`since :
|
|
23
|
+
`+q.map(TU).join(`
|
|
24
|
+
`):" "+TU(q[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+W,"ERR_NOT_SUPPORT")}return Y}var nG,TU=($)=>`- ${$}`,JI=($)=>B.isFunction($)||$===null||$===!1,m7;var dG=R(()=>{A0();ZU();NU();PU();K8();nG={http:BU,xhr:_U,fetch:{get:iG}};B.forEach(nG,($,Q)=>{if($){try{Object.defineProperty($,"name",{__proto__:null,value:Q})}catch(J){}Object.defineProperty($,"adapterName",{__proto__:null,value:Q})}});m7={getAdapter:XI,adapters:nG}});function aG($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new D8(null,$)}function y7($){if(aG($),$.headers=E0.from($.headers),$.data=uX.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return m7.getAdapter($.adapter||DJ.adapter,$)($).then(function(X){aG($),$.response=X;try{X.data=uX.call($,$.transformResponse,X)}finally{delete $.response}return X.headers=E0.from(X.headers),X},function(X){if(!gX(X)){if(aG($),X&&X.response){$.response=X.response;try{X.response.data=uX.call($,$.transformResponse,X.response)}finally{delete $.response}X.response.headers=E0.from(X.response.headers)}}return Promise.reject(X)})}var AU=R(()=>{d2();N7();FQ();l8();dG()});function YI($,Q,J){if(typeof $!=="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);let X=Object.keys($),Y=X.length;while(Y-- >0){let G=X[Y],q=Object.prototype.hasOwnProperty.call(Q,G)?Q[G]:void 0;if(q){let W=$[G],z=W===void 0||q(W,G,$);if(z!==!0)throw new O("option "+G+" must be "+z,O.ERR_BAD_OPTION_VALUE);continue}if(J!==!0)throw new O("Unknown option "+G,O.ERR_BAD_OPTION)}}var h7,EU,XY;var kU=R(()=>{K8();h7={};["object","boolean","number","function","string","symbol"].forEach(($,Q)=>{h7[$]=function(X){return typeof X===$||"a"+(Q<1?"n ":" ")+$}});EU={};h7.transitional=function(Q,J,X){function Y(G,q){return"[Axios v"+L$+"] Transitional option '"+G+"'"+q+(X?". "+X:"")}return(G,q,W)=>{if(Q===!1)throw new O(Y(q," has been removed"+(J?" in "+J:"")),O.ERR_DEPRECATED);if(J&&!EU[q])EU[q]=!0,console.warn(Y(q," has been deprecated since v"+J+" and will be removed in the near future"));return Q?Q(G,q,W):!0}};h7.spelling=function(Q){return(J,X)=>{return console.warn(`${X} is likely a misspelling of ${Q}`),!0}};XY={assertOptions:YI,validators:h7}});class YY{constructor($){this.defaults=$||{},this.interceptors={request:new YG,response:new YG}}async request($,Q){try{return await this._request($,Q)}catch(J){if(J instanceof Error){let X={};Error.captureStackTrace?Error.captureStackTrace(X):X=Error();let Y=(()=>{if(!X.stack)return"";let G=X.stack.indexOf(`
|
|
25
|
+
`);return G===-1?"":X.stack.slice(G+1)})();try{if(!J.stack)J.stack=Y;else if(Y){let G=Y.indexOf(`
|
|
26
|
+
`),q=G===-1?-1:Y.indexOf(`
|
|
27
|
+
`,G+1),W=q===-1?"":Y.slice(q+1);if(!String(J.stack).endsWith(W))J.stack+=`
|
|
28
|
+
`+Y}}catch(G){}}throw J}}_request($,Q){if(typeof $==="string")Q=Q||{},Q.url=$;else Q=$||{};Q=a8(this.defaults,Q);let{transitional:J,paramsSerializer:X,headers:Y}=Q;if(J!==void 0)XY.assertOptions(J,{silentJSONParsing:X8.transitional(X8.boolean),forcedJSONParsing:X8.transitional(X8.boolean),clarifyTimeoutError:X8.transitional(X8.boolean),legacyInterceptorReqResOrdering:X8.transitional(X8.boolean),advertiseZstdAcceptEncoding:X8.transitional(X8.boolean),validateStatusUndefinedResolves:X8.transitional(X8.boolean)},!1);if(X!=null)if(B.isFunction(X))Q.paramsSerializer={serialize:X};else XY.assertOptions(X,{encode:X8.function,serialize:X8.function},!0);if(Q.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Q.allowAbsoluteUrls=!0;XY.assertOptions(Q,{baseUrl:X8.spelling("baseURL"),withXsrfToken:X8.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let G=Y&&B.merge(Y.common,Y[Q.method]);Y&&B.forEach(["delete","get","head","post","put","patch","query","common"],(M)=>{delete Y[M]}),Q.headers=E0.concat(G,Y);let q=[],W=!0;this.interceptors.request.forEach(function(H){if(typeof H.runWhen==="function"&&H.runWhen(Q)===!1)return;W=W&&H.synchronous;let w=Q.transitional||d$;if(w&&w.legacyInterceptorReqResOrdering)q.unshift(H.fulfilled,H.rejected);else q.push(H.fulfilled,H.rejected)});let z=[];this.interceptors.response.forEach(function(H){z.push(H.fulfilled,H.rejected)});let V,K=0,U;if(!W){let M=[y7.bind(this),void 0];M.unshift(...q),M.push(...z),U=M.length,V=Promise.resolve(Q);while(K<U)V=V.then(M[K++],M[K++]);return V}U=q.length;let x=Q;while(K<U){let M=q[K++],H=q[K++];try{x=M(x)}catch(w){H.call(this,w);break}}try{V=y7.call(this,x)}catch(M){return Promise.reject(M)}K=0,U=z.length;while(K<U)V=V.then(z[K++],z[K++]);return V}getUri($){$=a8(this.defaults,$);let Q=CQ($.baseURL,$.url,$.allowAbsoluteUrls,$);return OQ(Q,$.params,$.paramsSerializer)}}var X8,GY;var cU=R(()=>{A0();D7();b2();AU();S7();O7();kU();l8();pX();X8=XY.validators;B.forEach(["delete","get","head","options"],function(Q){YY.prototype[Q]=function(J,X){return this.request(a8(X||{},{method:Q,url:J,data:X&&B.hasOwnProp(X,"data")?X.data:void 0}))}});B.forEach(["post","put","patch","query"],function(Q){function J(X){return function(G,q,W){return this.request(a8(W||{},{method:Q,headers:X?{"Content-Type":"multipart/form-data"}:{},url:G,data:q}))}}if(YY.prototype[Q]=J(),Q!=="query")YY.prototype[Q+"Form"]=J(!0)});GY=YY});class oG{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Q;this.promise=new Promise(function(Y){Q=Y});let J=this;this.promise.then((X)=>{if(!J._listeners)return;let Y=J._listeners.length;while(Y-- >0)J._listeners[Y](X);J._listeners=null}),this.promise.then=(X)=>{let Y,G=new Promise((q)=>{J.subscribe(q),Y=q}).then(X);return G.cancel=function(){J.unsubscribe(Y)},G},$(function(Y,G,q){if(J.reason)return;J.reason=new D8(Y,G,q),Q(J.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Q=this._listeners.indexOf($);if(Q!==-1)this._listeners.splice(Q,1)}toAbortSignal(){let $=new AbortController,Q=(J)=>{$.abort(J)};return this.subscribe(Q),$.signal.unsubscribe=()=>this.unsubscribe(Q),$.signal}static source(){let $;return{token:new oG(function(X){$=X}),cancel:$}}}var SU;var bU=R(()=>{FQ();SU=oG});function sG($){return function(J){return $.apply(null,J)}}function rG($){return B.isObject($)&&$.isAxiosError===!0}var fU=R(()=>{A0()});var tG,mU;var yU=R(()=>{tG={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tG).forEach(([$,Q])=>{tG[Q]=$});mU=tG});function hU($){let Q=new GY($),J=TX(GY.prototype.request,Q);return B.extend(J,GY.prototype,Q,{allOwnKeys:!0}),B.extend(J,Q,null,{allOwnKeys:!0}),J.create=function(Y){return hU(a8($,Y))},J}var u0,p7;var pU=R(()=>{A0();cU();S7();N7();KG();FQ();bU();LJ();K8();fU();l8();dG();yU();u0=hU(DJ);u0.Axios=GY;u0.CanceledError=D8;u0.CancelToken=SU;u0.isCancel=gX;u0.VERSION=L$;u0.toFormData=n$;u0.AxiosError=O;u0.Cancel=u0.CanceledError;u0.all=function(Q){return Promise.all(Q)};u0.spread=sG;u0.isAxiosError=rG;u0.mergeConfig=a8;u0.AxiosHeaders=E0;u0.formToJSON=($)=>_7(B.isHTMLForm($)?new FormData($):$);u0.getAdapter=m7.getAdapter;u0.HttpStatusCode=mU;u0.default=u0;p7=u0});var uU=R(()=>{pU()});import{readFileSync as GI}from"node:fs";function o8(){try{let $=JSON.parse(GI(new URL("../package.json",import.meta.url),"utf8"));return typeof $.version==="string"?$.version:"0.0.0"}catch{return"0.0.0"}}function k8($,Q){let J=(G)=>{let q=/^\D*(\d+)\.(\d+)\.(\d+)/.exec(G.trim());return q?[Number(q[1]),Number(q[2]),Number(q[3])]:null},X=J($),Y=J(Q);if(!X||!Y)return!1;for(let G=0;G<3;G++){if(X[G]>Y[G])return!0;if(X[G]<Y[G])return!1}return!1}var IJ=()=>{};import{promises as qY}from"node:fs";import{homedir as gU}from"node:os";import{dirname as lU,join as PJ}from"node:path";async function $q($){try{let Q=await qY.readFile($,"utf8"),J=JSON.parse(Q);if(J&&typeof J==="object")return J;return{}}catch{return{}}}async function iU(){return $q(_8)}async function u7($=process.cwd()){let Q=gU(),J=$;for(;;){if(J!==Q){let Y=PJ(J,SQ);try{return await qY.access(Y),Y}catch{}}let X=lU(J);if(X===J)return null;J=X}}async function nU($,Q){await qY.mkdir(lU($),{recursive:!0,mode:448}),await qY.writeFile($,JSON.stringify(Q,null,2)+`
|
|
29
|
+
`,{mode:384}),await qY.chmod($,384).catch(()=>{})}async function dU($){await nU(_8,$)}async function aU($,Q=process.cwd()){let J=PJ(Q,SQ);return await nU(J,$),J}function oU($,Q){if($!=="global")return"ok";if(Q.mutate&&!Q.allowGlobal)return"refuse";return"warn"}var cQ,_8,eG,SQ;var Qq=R(()=>{cQ=PJ(gU(),".figura"),_8=PJ(cQ,"config.json"),eG=PJ(cQ,"figs"),SQ=PJ(".figura","config.json")});var sU={};VJ(sU,{writeProjectConfig:()=>Yq,writeConfig:()=>Xq,resolveFigsDir:()=>Jq,resolveConfig:()=>s0,readConfig:()=>g7,findProjectConfigPath:()=>u7,PROJECT_CONFIG_REL:()=>SQ,FIGS_DIR:()=>eG,CONFIG_PATH:()=>_8,CONFIG_DIR:()=>cQ});import{dirname as qI,join as WI}from"node:path";async function g7(){return iU()}async function Jq($=process.cwd()){let Q=await u7($);if(Q)return WI(qI(Q),"figs");return eG}async function Xq($){await dU($)}async function Yq($,Q=process.cwd()){return aU($,Q)}async function s0($={}){let Q=await g7(),J=await u7($.cwd),X=J?await $q(J):{},Y={...Q,...X},G=process.env.FIGURA_TOKEN||$.tokenFlag||Y.token||void 0,q=process.env.FIGURA_TOKEN?"env":$.tokenFlag?"flag":X.token?"project":Q.token?"global":"none",W=process.env.FIGURA_API_URL||$.apiUrlFlag||Y.apiUrl||TJ;return{token:G,apiUrl:W,team:Y.team,config:Y,tokenSource:q,projectConfigPath:J}}var B8=R(()=>{Qq();N8()});import{promises as Gq}from"node:fs";import{join as zI}from"node:path";function AJ($){try{let Q=new URL($);return`${Q.protocol}//${Q.host}`.toLowerCase()}catch{return $.trim().toLowerCase().replace(/\/+$/,"")}}function rU($,Q){return typeof $==="number"&&Q-$<KI}function WY($,Q,J){let X=$.serverAdvice?.[Q];if(!X)return{};return{min:rU(X.minAt,J)?X.min:void 0,latest:rU(X.latestAt,J)?X.latest:void 0}}async function o$(){try{let $=await Gq.readFile(tU,"utf8"),Q=JSON.parse($);return Q&&typeof Q==="object"?Q:{}}catch{return{}}}async function zY($){await Gq.mkdir(cQ,{recursive:!0,mode:448}),await Gq.writeFile(tU,JSON.stringify($,null,2)+`
|
|
30
|
+
`,{mode:384})}function $x($,Q){return typeof $.checkedAt==="number"&&Q-$.checkedAt<VI}async function qq($){let Q=new AbortController,J=setTimeout(()=>Q.abort(),$);try{let X=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:Q.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!X.ok)return null;let Y=await X.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(J)}}var tU,VI=86400000,KI=604800000,eU=21600000;var VY=R(()=>{B8();tU=zI(cQ,"update-check.json")});function UI($,Q=[]){for(let J=0;J<$.length;J++){if($[J].startsWith("-"))continue;if(J>0&&Q.includes($[J-1]))continue;return{before:$.slice(0,J),script:$[J],after:$.slice(J+1)}}return{before:$,script:void 0,after:[]}}function Wq($,Q,J=[]){return(X)=>{let{before:Y,script:G,after:q}=UI(X,J);if(G===void 0)return[$,Q,...Y];if(q.length>0)return[$,Q,...Y,G,"--",...q];return[$,Q,...Y,G]}}function Xx($){return{agent:[$,0],run:[$,"run",0],install:[$,"i",0],frozen:[$,"i","--frozen-lockfile",0],global:[$,"add","-g",0],add:[$,"add",0],upgrade:[$,"update",0],"upgrade-interactive":[$,"update","-i",0],dedupe:[$,"dedupe",0],execute:[$,"dlx",0],"execute-local":[$,"exec",0],uninstall:[$,"remove",0],global_uninstall:[$,"remove","--global",0]}}function Yx($,Q,J){let X=zq[$][Q];return Vq(X,J)}function Vq($,Q){if($==null)return null;let J=typeof $==="function"?$(Q):$.flatMap((X)=>{if(typeof X==="number")return Q;return[X]});return{command:J[0],args:J.slice(1)}}var xI,Jx,MI,Qx,HI,BI,ZI,wI,jI,zq;var Gx=R(()=>{xI={agent:["npm",0],run:Wq("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},Jx={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":Wq("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},MI={...Jx,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};Qx=Xx("pnpm"),HI=Xx("rush-pnpm"),BI={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},ZI={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},wI={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},jI={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},zq={npm:xI,yarn:Jx,"yarn@berry":MI,pnpm:Qx,"pnpm@6":{...Qx,run:Wq("pnpm","run",["-F","--filter"])},"pnpm-rush":HI,bun:BI,aube:ZI,deno:wI,nub:jI}});var KY,UY,xY,qx;var Kq=R(()=>{KY=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],UY={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},xY={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},qx={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import zx from"node:fs/promises";import D$ from"node:path";import Vx from"node:process";async function l7($,Q){try{let J=await zx.stat($);return Q==="file"?J.isFile():J.isDirectory()}catch{return!1}}function Kx(){let $=Vx.env.npm_config_user_agent;if(!$)return null;let Q=$.split("/")[0];return KY.includes(Q)?Q:null}function*LI($=Vx.cwd()){let Q=D$.resolve($),{root:J}=D$.parse(Q);while(Q&&Q!==J)yield Q,Q=D$.dirname(Q)}async function Wx($,Q){if(!$||!await l7($,"file"))return null;return await DI($,Q)}async function Ux($={}){let{cwd:Q,strategies:J=["lockfile","packageManager-field","devEngines-field"]}=$,X;if(typeof $.stopDir==="string"){let Y=D$.resolve($.stopDir);X=(G)=>G===Y}else X=$.stopDir;for(let Y of LI(Q)){for(let G of J)switch(G){case"lockfile":{if(await l7(D$.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let q of Object.keys(UY))if(await l7(D$.join(Y,q),"file")){let W=UY[q],z=await Wx(D$.join(Y,"package.json"),$);if(z)return z;else return{name:W,agent:W}}break}case"packageManager-field":case"devEngines-field":{let q=await Wx(D$.join(Y,"package.json"),$);if(q)return q;break}case"install-metadata":{for(let q of Object.keys(xY)){let W=q.endsWith("/")?"dir":"file";if(await l7(D$.join(Y,q),W)){let z=xY[q],V=z==="yarn"?_I(q)?"yarn":"yarn@berry":z;return{name:z,agent:V}}}break}}if(X?.(Y))break}return null}function RI($){let Q=(J)=>J?.match(/\d+(\.\d+){0,2}/)?.[0]??J;if(typeof $.packageManager==="string"){let[J,X]=$.packageManager.replace(/^\^/,"").split("@");return{name:J,ver:Q(X)}}if(typeof $.devEngines?.packageManager?.name==="string")return{name:$.devEngines.packageManager.name,ver:Q($.devEngines.packageManager.version)};return}async function DI($,Q){try{let J=await zx.readFile($,"utf8"),X=Q.packageJsonParser?await Q.packageJsonParser(J,$):JSON.parse(J),Y,G=RI(X);if(G){let{name:q,ver:W}=G,z=W;if(q==="yarn"&&W&&Number.parseInt(W)>1)return Y="yarn@berry",z="berry",{name:q,agent:Y,version:z};else if(q==="pnpm"&&W&&Number.parseInt(W)<7)return Y="pnpm@6",{name:q,agent:Y,version:z};else if(KY.includes(q))return Y=q,{name:q,agent:Y,version:z};else return Q.onUnknown?.(X.packageManager)??null}}catch{}return null}function _I($){return $.endsWith(".yarn_integrity")}var xx=R(()=>{Kq()});var Mx={};VJ(Mx,{resolveCommand:()=>Yx,getUserAgent:()=>Kx,detect:()=>Ux,constructCommand:()=>Vq,LOCKS:()=>UY,INSTALL_PAGE:()=>qx,INSTALL_METADATA:()=>xY,COMMANDS:()=>zq,AGENTS:()=>KY});var Hx=R(()=>{Gx();Kq();xx()});import{existsSync as NI}from"node:fs";import{delimiter as vI,join as OI}from"node:path";import{fileURLToPath as FI}from"node:url";function CI($){if(!$.isTTY)return"stdout-not-tty";if($.json)return"json";if($.env.CI)return"ci";if($.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||$.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function II($){let Q=$.replace(/\\/g,"/");if(Q.includes("/.bun/"))return"bun";if(Q.includes("/pnpm/")||Q.includes("/.pnpm/"))return"pnpm";if(Q.includes("/.volta/"))return"volta";if(Q.includes("/node_modules/"))return"npm";return null}function PI($=process.env,Q=NI){let J=($.PATH??"").split(vI).filter(Boolean),X=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return J.some((Y)=>X.some((G)=>Q(OI(Y,G))))}async function i7($,Q="latest",J,X,Y=FI(import.meta.url)){let G=await Promise.resolve().then(() => (Hx(),Mx)),q=(K)=>{let U=G.resolveCommand(K,"global",[`${$}@${Q}`]);return U?{command:`${U.command} ${U.args.join(" ")}`,generic:!1}:null},W=J!==void 0?J:G.getUserAgent()??null;if(W){let K=q(W);if(K)return K}let z=II(Y);if(z==="volta")return{command:`volta install ${$}@${Q}`,generic:!1};if(z){let K=q(z);if(K)return K}let V=X??PI();return{command:`npm i -g ${$}@${Q}`,generic:!V}}function Zx($){return $.generic?`Update with your package manager's global install, e.g. ${$.command}`:`Run: ${$.command}`}function TI($,Q,J){return`⚠ figura ${$} → ${Q} available. ${J}`}function AI($,Q,J){return`⚠ figura ${$} is below the minimum supported ${Q} — `+`some commands may fail. ${J}`}function EI($,Q,J){let X=$.latest,Y=WY($,Q,J).latest;if(X&&Y)return k8(Y,X)?Y:X;return X??Y}function wx($){let Q=$("x-figura-min-cli")?.trim(),J=$("x-figura-latest-cli")?.trim();return{min:Q||void 0,latest:J||void 0}}function kI($,Q,J,X){if(!J.min&&!J.latest)return null;let Y={...$.serverAdvice??{}},G=Y[Q]??{},q={...G},W=!1,z=(V)=>typeof V!=="number"||X-V>=eU;if(J.min&&(G.min!==J.min||z(G.minAt)))q.min=J.min,q.minAt=X,W=!0;if(J.latest&&(G.latest!==J.latest||z(G.latestAt)))q.latest=J.latest,q.latestAt=X,W=!0;if(!W)return null;return Y[Q]=q,{...$,serverAdvice:Y}}async function jx($,Q,J=Date.now()){try{if(!Q.min&&!Q.latest)return;let X=kI(await o$(),$,Q,J);if(X)await zY(X)}catch{}}function cI($){return $.FIGURA_NO_UPDATE_NOTIFIER==="1"||$.NO_UPDATE_NOTIFIER==="1"}function SI($){return $.some((Q)=>Q==="--json"||Q.startsWith("--json="))}async function Lx($,Q,J=Date.now()){try{if(cI(process.env))return;let X=await o$(),Y=o8(),G=AJ(Q),q=WY(X,G,J);if(q.min&&k8(q.min,Y)){let V=Zx(await i7(Bx));process.stderr.write(AI(Y,q.min,V)+`
|
|
31
|
+
`);return}if(CI({isTTY:Boolean(process.stdout.isTTY),json:SI($),env:process.env}))return;let W=EI(X,G,J);if(!W||!k8(W,Y))return;let z=Zx(await i7(Bx));process.stderr.write(TI(Y,W,z)+`
|
|
32
|
+
`)}catch{}}var Bx="figura-cli";var n7=R(()=>{IJ();VY()});function Rx($,Q){if(!Q)return;let J=(X)=>{let Y=Q[X];return typeof Y==="string"?Y:void 0};jx(AJ($),wx(J))}async function z0($,Q={}){let J=(Q.apiUrl||TJ).replace(/\/+$/,""),X=$.startsWith("http")?$:`${J}${$.startsWith("/")?"":"/"}${$}`,Y={Accept:"application/json",...Q.headers??{}};if(Q.token)Y.Authorization=`Bearer ${Q.token}`;if(Q.source)Y["X-Figura-Source"]=Q.source;let G;if(Q.body!==void 0)Y["Content-Type"]="application/json",G=JSON.stringify(Q.body);let q;try{q=await p7.request({url:X,method:Q.method??"GET",headers:Y,data:G,signal:Q.signal,validateStatus:()=>!0,transformRequest:[(V)=>V],transformResponse:[(V)=>V]})}catch(V){let K=V instanceof Error?V.message:String(V);throw new _$(0,`network error: ${K}`)}Rx(J,q.headers);let W=typeof q.data==="string"?q.data:"",z=void 0;if(W)try{z=JSON.parse(W)}catch{z=W}if(q.status<200||q.status>=300){let V=z&&typeof z==="object"&&z!==null&&"error"in z?String(z.error):typeof z==="string"&&z?z:q.statusText||`HTTP ${q.status}`;throw new _$(q.status,V,z)}return z}async function d7($,Q={}){let J=(Q.apiUrl||TJ).replace(/\/+$/,""),X=$.startsWith("http")?$:`${J}${$.startsWith("/")?"":"/"}${$}`,Y={...Q.headers??{}};if(Q.token)Y.Authorization=`Bearer ${Q.token}`;if(Q.source)Y["X-Figura-Source"]=Q.source;let G;try{G=await p7.request({url:X,method:Q.method??"GET",headers:Y,signal:Q.signal,responseType:"text",validateStatus:()=>!0,transformResponse:[(W)=>W]})}catch(W){let z=W instanceof Error?W.message:String(W);throw new _$(0,`network error: ${z}`)}Rx(J,G.headers);let q=typeof G.data==="string"?G.data:String(G.data??"");if(G.status<200||G.status>=300){let W=G.statusText||`HTTP ${G.status}`;try{let z=JSON.parse(q);if(z&&typeof z==="object"&&"error"in z)W=String(z.error)}catch{}throw new _$(G.status,W)}return q}var TJ="https://api.figura.so",_$;var N8=R(()=>{uU();n7();VY();_$=class _$ extends Error{status;payload;constructor($,Q,J){super(Q);this.name="FiguraApiError",this.status=$,this.payload=J}}});import{existsSync as bI}from"node:fs";import{homedir as fI}from"node:os";import{dirname as mI,join as yI,relative as hI}from"node:path";function Q0($){let Q={},J=[];for(let X=0;X<$.length;X++){let Y=$[X];if(Y.startsWith("--")){let G=Y.slice(2),q=G.indexOf("=");if(q>=0)Q[G.slice(0,q)]=G.slice(q+1);else{let W=$[X+1];if(W!==void 0&&!W.startsWith("--"))Q[G]=W,X++;else Q[G]=!0}}else J.push(Y)}return{flags:Q,positionals:J}}function h($,Q){let J=$[Q];return typeof J==="string"?J:void 0}function i($,Q){return $[Q]===!0||$[Q]==="true"}function _x($=process.cwd()){let Q=$;for(;;){if(bI(yI(Q,".git")))return!0;let J=mI(Q);if(J===Q)return!1;Q=J}}function Dx($){let Q=fI();return $.startsWith(Q)?"~"+$.slice(Q.length):$}function pI($,Q=process.cwd()){switch($.tokenSource){case"env":return"→ auth: env FIGURA_TOKEN (team comes from the token)";case"flag":return"→ auth: --token flag (team comes from the token)";case"project":{let J=$.projectConfigPath,X=hI(Q,J);return`→ team: ${$.team??"(unset)"} — ${X.startsWith("..")?Dx(J):X}`}case"global":return`→ team: ${$.team??"(unset)"} — ${Dx(_8)} (GLOBAL fallback)`;case"none":return"→ not logged in"}}async function N0($,Q={}){let J=await s0({tokenFlag:h($,"token"),apiUrlFlag:h($,"api-url")});if(!J.token)P("You're not logged in. Run `figura login` to sign in via your browser.\n For CI or headless use: set FIGURA_TOKEN, or pass --token fig_...");if(!(Q.announce||Q.mutate))return J;process.stderr.write(pI(J)+`
|
|
33
|
+
`);let Y=oU(J.tokenSource,{mutate:Q.mutate,allowGlobal:i($,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),G=J.team?`'${J.team}'`:"the global config team";if(Y==="refuse")P(`this directory isn't linked to a Figura team, so this would land on ${G} — the
|
|
34
34
|
`+` global credential's team, not necessarily this project's. Run \`figura link\` to
|
|
35
|
-
bind it to its own team, or pass --allow-global to use ${
|
|
36
|
-
`),process.exit(1)}function
|
|
37
|
-
`)}import{
|
|
38
|
-
`),{
|
|
39
|
-
`)+(X.length
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`).map((
|
|
43
|
-
`))z
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`))z+=`
|
|
47
|
-
|
|
35
|
+
bind it to its own team, or pass --allow-global to use ${G} anyway.`);if(Y==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${G}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return J}function P($){process.stderr.write(`figura: ${$}
|
|
36
|
+
`),process.exit(1)}function a($){if($ instanceof _$)return $.status?`${$.message} (HTTP ${$.status})`:$.message;if($ instanceof Error)return $.message;return String($)}function L0($){process.stdout.write(JSON.stringify($,null,2)+`
|
|
37
|
+
`)}var V0="cli";var r0=R(()=>{N8();B8();Qq()});var Hq={};VJ(Hq,{verifySkillPayload:()=>$P,materializeSkill:()=>QP,hashSkillFiles:()=>Px,hashPayload:()=>Tx,fetchLatestSkill:()=>s$,SkillPathTraversalError:()=>o7,SkillHashMismatchError:()=>Mq});import{createHash as iI,randomBytes as nI}from"node:crypto";import{mkdirSync as dI,renameSync as aI,rmSync as Cx,writeFileSync as oI}from"node:fs";import{dirname as sI,isAbsolute as rI,join as tI,relative as eI,resolve as xq,sep as Ix}from"node:path";function Px($){if($.length===0)return null;let Q=[...$].sort((X,Y)=>X.path<Y.path?-1:X.path>Y.path?1:0),J=iI("sha256");for(let X of Q)J.update(X.path),J.update("\x00"),J.update(X.content,"utf8"),J.update("\x00");return J.digest("hex").slice(0,16)}function Tx($){return Px(Object.entries($.files).map(([Q,J])=>({path:Q,content:J})))}async function s$($,Q={}){let J=Q.signal??(Q.timeoutMs?AbortSignal.timeout(Q.timeoutMs):AbortSignal.timeout(4000));try{return await z0(`/v1/skills/${encodeURIComponent($)}/latest`,{apiUrl:Q.apiUrl,token:Q.token,source:"cli",signal:J})}catch{return null}}function $P($){let Q=Tx($);if(Q!==$.hash)throw new Mq($.skill,$.hash,Q);return $}function QP($,Q){let J=xq($,Q.skill),X=Q.skill+"/",Y=[];for(let[q,W]of Object.entries(Q.files)){if(!q.startsWith(X))throw new o7(Q.skill,q);let z=q.slice(X.length),V=xq(J,z.split("/").join(Ix)),K=eI(J,V);if(K===""||K.startsWith("..")||rI(K))throw new o7(Q.skill,q);Y.push({relInSkill:z,content:W})}if(Y.length===0)return Q.skill;let G=xq($,`.${Q.skill}.tmp-${nI(6).toString("hex")}`);try{for(let{relInSkill:q,content:W}of Y){let z=tI(G,q.split("/").join(Ix));dI(sI(z),{recursive:!0}),oI(z,W)}Cx(J,{recursive:!0,force:!0}),aI(G,J)}finally{Cx(G,{recursive:!0,force:!0})}return Q.skill}var Mq,o7;var EJ=R(()=>{N8();Mq=class Mq extends Error{skill;served;computed;constructor($,Q,J){super(`skill '${$}' failed hash verification (served ${Q}, computed ${J??"null"}) — refusing to install`);this.skill=$;this.served=Q;this.computed=J;this.name="SkillHashMismatchError"}};o7=class o7 extends Error{skill;badPath;constructor($,Q){super(`skill '${$}' payload carries an unsafe path '${Q}' — refusing to install`);this.skill=$;this.badPath=Q;this.name="SkillPathTraversalError"}}});function y0($){if(typeof $!=="object"||$===null)return!1;let Q=Object.getPrototypeOf($);return(Q===null||Q===Object.prototype||Object.getPrototypeOf(Q)===null)&&!(Symbol.toStringTag in $)&&!(Symbol.iterator in $)}import{fileURLToPath as JP}from"node:url";var kJ=($,Q)=>{let J=Zq(XP($));if(typeof J!=="string")throw TypeError(`${Q} must be a string or a file URL: ${J}.`);return J},XP=($)=>Bq($)?$.toString():$,Bq=($)=>typeof $!=="string"&&$&&Object.getPrototypeOf($)===String.prototype,Zq=($)=>$ instanceof URL?JP($):$;var cJ=()=>{};var s7=($,Q=[],J={})=>{let X=kJ($,"First argument"),[Y,G]=y0(Q)?[[],Q]:[Q,J];if(!Array.isArray(Y))throw TypeError(`Second argument must be either an array of arguments or an options object: ${Y}`);if(Y.some((z)=>typeof z==="object"&&z!==null))throw TypeError(`Second argument must be an array of strings: ${Y}`);let q=Y.map(String),W=q.find((z)=>z.includes("\x00"));if(W!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${W}`);if(!y0(G))throw TypeError(`Last argument must be an options object: ${G}`);return[X,q,G]};var wq=R(()=>{cJ()});import{StringDecoder as YP}from"node:string_decoder";var Ax,Ex=($)=>Ax.call($)==="[object ArrayBuffer]",g0=($)=>Ax.call($)==="[object Uint8Array]",N$=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),GP,kx=($)=>GP.encode($),qP,r7=($)=>qP.decode($),cx=($,Q)=>{return WP($,Q).join("")},WP=($,Q)=>{if(Q==="utf8"&&$.every((G)=>typeof G==="string"))return $;let J=new YP(Q),X=$.map((G)=>typeof G==="string"?kx(G):G).map((G)=>J.write(G)),Y=J.end();return Y===""?X:[...X,Y]},MY=($)=>{if($.length===1&&g0($[0]))return $[0];return jq(zP($))},zP=($)=>$.map((Q)=>typeof Q==="string"?kx(Q):Q),jq=($)=>{let Q=new Uint8Array(VP($)),J=0;for(let X of $)Q.set(X,J),J+=X.length;return Q},VP=($)=>{let Q=0;for(let J of $)Q+=J.length;return Q};var v8=R(()=>{({toString:Ax}=Object.prototype),GP=new TextEncoder,qP=new TextDecoder});import{ChildProcess as KP}from"node:child_process";var mx=($)=>Array.isArray($)&&Array.isArray($.raw),yx=($,Q)=>{let J=[];for(let[G,q]of $.entries())J=UP({templates:$,expressions:Q,tokens:J,index:G,template:q});if(J.length===0)throw TypeError("Template script must not be empty");let[X,...Y]=J;return[X,Y,{}]},UP=({templates:$,expressions:Q,tokens:J,index:X,template:Y})=>{if(Y===void 0)throw TypeError(`Invalid backslash sequence: ${$.raw[X]}`);let{nextTokens:G,leadingWhitespaces:q,trailingWhitespaces:W}=xP(Y,$.raw[X]),z=bx(J,G,q);if(X===Q.length)return z;let V=Q[X],K=Array.isArray(V)?V.map((U)=>fx(U)):[fx(V)];return bx(z,K,W)},xP=($,Q)=>{if(Q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],X=0,Y=Sx.has(Q[0]);for(let q=0,W=0;q<$.length;q+=1,W+=1){let z=Q[W];if(Sx.has(z)){if(X!==q)J.push($.slice(X,q));X=q+1}else if(z==="\\"){let V=Q[W+1];if(V===`
|
|
38
|
+
`)q-=1,W+=1;else if(V==="u"&&Q[W+2]==="{")W=Q.indexOf("}",W+3);else W+=MP[V]??1}}let G=X===$.length;if(!G)J.push($.slice(X));return{nextTokens:J,leadingWhitespaces:Y,trailingWhitespaces:G}},Sx,MP,bx=($,Q,J)=>J||$.length===0||Q.length===0?[...$,...Q]:[...$.slice(0,-1),`${$.at(-1)}${Q[0]}`,...Q.slice(1)],fx=($)=>{let Q=typeof $;if(Q==="string")return $;if(Q==="number")return String($);if(y0($)&&(("stdout"in $)||("isMaxBuffer"in $)))return HP($);if($ instanceof KP||Object.prototype.toString.call($)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${Q}" in template expression`)},HP=({stdout:$})=>{if(typeof $==="string")return $;if(g0($))return r7($);if($===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof $}" stdout in template expression`)};var hx=R(()=>{v8();Sx=new Set([" ","\t","\r",`
|
|
39
|
+
`]),MP={x:3,u:5}});import Lq from"node:process";var s8=($)=>t7.includes($),t7,c8,e7=($)=>c8[$]??`stdio[${$}]`;var v$=R(()=>{t7=[Lq.stdin,Lq.stdout,Lq.stderr],c8=["stdin","stdout","stderr"]});import{debuglog as BP}from"node:util";var ux=($)=>{let Q={...$};for(let J of _q)Q[J]=Rq($,J);return Q},Rq=($,Q)=>{let J=Array.from({length:ZP($)+1}),X=wP($[Q],J,Q);return _P(X,Q)},ZP=({stdio:$})=>Array.isArray($)?Math.max($.length,c8.length):c8.length,wP=($,Q,J)=>y0($)?jP($,Q,J):Q.fill($),jP=($,Q,J)=>{for(let X of Object.keys($).sort(LP))for(let Y of RP(X,J,Q))Q[Y]=$[X];return Q},LP=($,Q)=>px($)<px(Q)?1:-1,px=($)=>{if($==="stdout"||$==="stderr")return 0;return $==="all"?2:1},RP=($,Q,J)=>{if($==="ipc")return[J.length-1];let X=Dq($);if(X===void 0||X===0)throw TypeError(`"${Q}.${$}" is invalid.
|
|
40
|
+
It must be "${Q}.stdout", "${Q}.stderr", "${Q}.all", "${Q}.ipc", or "${Q}.fd3", "${Q}.fd4" (and so on).`);if(X>=J.length)throw TypeError(`"${Q}.${$}" is invalid: that file descriptor does not exist.
|
|
41
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},Dq=($)=>{if($==="all")return $;if(c8.includes($))return c8.indexOf($);let Q=DP.exec($);if(Q!==null)return Number(Q[1])},DP,_P=($,Q)=>$.map((J)=>J===void 0?vP[Q]:J),NP,vP,_q,O$=($,Q)=>Q==="ipc"?$.at(-1):$[Q];var F$=R(()=>{v$();DP=/^fd(\d+)$/,NP=BP("execa").enabled?"full":"none",vP={lines:!1,buffer:!0,maxBuffer:1e8,verbose:NP,stripFinalNewline:!0},_q=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var SJ=({verbose:$},Q)=>Nq($,Q)!=="none",bJ=({verbose:$},Q)=>!["none","short"].includes(Nq($,Q)),gx=({verbose:$},Q)=>{let J=Nq($,Q);return $9(J)?J:void 0},Nq=($,Q)=>Q===void 0?OP($):O$($,Q),OP=($)=>$.find((Q)=>$9(Q))??Q9.findLast((Q)=>$.includes(Q)),$9=($)=>typeof $==="function",Q9;var r$=R(()=>{F$();Q9=["none","short","full"]});import{platform as FP}from"node:process";import{stripVTControlCharacters as CP}from"node:util";var lx=($,Q)=>{let J=[$,...Q],X=J.join(" "),Y=J.map((G)=>kP(ix(G))).join(" ");return{command:X,escapedCommand:Y}},HY=($)=>CP($).split(`
|
|
42
|
+
`).map((Q)=>ix(Q)).join(`
|
|
43
|
+
`),ix=($)=>$.replaceAll(TP,(Q)=>IP(Q)),IP=($)=>{let Q=AP[$];if(Q!==void 0)return Q;let J=$.codePointAt(0),X=J.toString(16);return J<=EP?`\\u${X.padStart(4,"0")}`:`\\U${X}`},PP=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},TP,AP,EP=65535,kP=($)=>{if(cP.test($))return $;return FP==="win32"?`"${$.replaceAll('"','""')}"`:`'${$.replaceAll("'","'\\''")}'`},cP;var J9=R(()=>{TP=PP(),AP={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},cP=/^[\w./-]+$/});import nx from"node:process";function vq(){let{env:$}=nx,{TERM:Q,TERM_PROGRAM:J}=$;if(nx.platform!=="win32")return Q!=="linux";return Boolean($.WT_SESSION)||Boolean($.TERMINUS_SUBLIME)||$.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||Q==="xterm-256color"||Q==="alacritty"||Q==="rxvt-unicode"||Q==="rxvt-unicode-256color"||$.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var dx=()=>{};var ax,ox,SP,bP,fP,mP,yP,X9,be;var sx=R(()=>{dx();ax={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},ox={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},SP={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},bP={...ax,...ox},fP={...ax,...SP},mP=vq(),yP=mP?bP:fP,X9=yP,be=Object.entries(ox)});import hP from"node:tty";var pP,s=($,Q)=>{if(!pP)return(Y)=>Y;let J=`\x1B[${$}m`,X=`\x1B[${Q}m`;return(Y)=>{let G=Y+"",q=G.indexOf(X);if(q===-1)return J+G+X;let W=J,z=0,K=(Q===22?X:"")+J;while(q!==-1)W+=G.slice(z,q)+K,z=q+X.length,q=G.indexOf(X,z);return W+=G.slice(z)+X,W}},ye,rx,he,pe,ue,ge,le,ie,ne,de,ae,oe,se,re,te,ee,$00,Q00,J00,X00,Y00,Y9,G00,q00,W00,z00,V00,K00,U00,x00,M00,tx,H00,ex,B00,Z00,w00,j00,L00,R00,D00,_00,N00,v00,O00,F00,C00,I00,P00,T00,A00,E00,k00,c00,S00,b00,f00,m00,y00,h00,p00;var $M=R(()=>{pP=hP?.WriteStream?.prototype?.hasColors?.()??!1,ye=s(0,0),rx=s(1,22),he=s(2,22),pe=s(3,23),ue=s(4,24),ge=s("4:2",24),le=s("4:3",24),ie=s("4:4",24),ne=s("4:5",24),de=s(53,55),ae=s(7,27),oe=s(8,28),se=s(9,29),re=s(30,39),te=s(31,39),ee=s(32,39),$00=s(33,39),Q00=s(34,39),J00=s(35,39),X00=s(36,39),Y00=s(37,39),Y9=s(90,39),G00=s(40,49),q00=s(41,49),W00=s(42,49),z00=s(43,49),V00=s(44,49),K00=s(45,49),U00=s(46,49),x00=s(47,49),M00=s(100,49),tx=s(91,39),H00=s(92,39),ex=s(93,39),B00=s(94,39),Z00=s(95,39),w00=s(96,39),j00=s(97,39),L00=s(101,49),R00=s(102,49),D00=s(103,49),_00=s(104,49),N00=s(105,49),v00=s(106,49),O00=s(107,49),F00=s("58;5;0",59),C00=s("58;5;1",59),I00=s("58;5;2",59),P00=s("58;5;3",59),T00=s("58;5;4",59),A00=s("58;5;5",59),E00=s("58;5;6",59),k00=s("58;5;7",59),c00=s("58;5;8",59),S00=s("58;5;9",59),b00=s("58;5;10",59),f00=s("58;5;11",59),m00=s("58;5;12",59),y00=s("58;5;13",59),h00=s("58;5;14",59),p00=s("58;5;15",59)});var QM=R(()=>{$M()});var YM=({type:$,message:Q,timestamp:J,piped:X,commandId:Y,result:{failed:G=!1}={},options:{reject:q=!0}})=>{let W=uP(J),z=gP[$]({failed:G,reject:q,piped:X}),V=lP[$]({reject:q});return`${Y9(`[${W}]`)} ${Y9(`[${Y}]`)} ${V(z)} ${V(Q)}`},uP=($)=>`${G9($.getHours(),2)}:${G9($.getMinutes(),2)}:${G9($.getSeconds(),2)}.${G9($.getMilliseconds(),3)}`,G9=($,Q)=>String($).padStart(Q,"0"),JM=({failed:$,reject:Q})=>{if(!$)return X9.tick;return Q?X9.cross:X9.warning},gP,XM=($)=>$,lP;var GM=R(()=>{sx();QM();gP={command:({piped:$})=>$?"|":"$",output:()=>" ",ipc:()=>"*",error:JM,duration:JM},lP={command:()=>rx,output:()=>XM,ipc:()=>XM,error:({reject:$})=>$?tx:ex,duration:()=>Y9}});var qM=($,Q,J)=>{let X=gx(Q,J);return $.map(({verboseLine:Y,verboseObject:G})=>iP(Y,G,X)).filter((Y)=>Y!==void 0).map((Y)=>nP(Y)).join("")},iP=($,Q,J)=>{if(J===void 0)return $;let X=J($,Q);if(typeof X==="string")return X},nP=($)=>$.endsWith(`
|
|
44
|
+
`)?$:`${$}
|
|
45
|
+
`;var WM=R(()=>{r$()});import{inspect as dP}from"node:util";var V$=({type:$,verboseMessage:Q,fdNumber:J,verboseInfo:X,result:Y})=>{let G=aP({type:$,result:Y,verboseInfo:X}),q=oP(Q,G),W=qM(q,X,J);if(W!=="")console.warn(W.slice(0,-1))},aP=({type:$,result:Q,verboseInfo:{escapedCommand:J,commandId:X,rawOptions:{piped:Y=!1,...G}}})=>({type:$,escapedCommand:J,commandId:`${X}`,timestamp:new Date,piped:Y,result:Q,options:G}),oP=($,Q)=>$.split(`
|
|
46
|
+
`).map((J)=>sP({...Q,message:J})),sP=($)=>{return{verboseLine:YM($),verboseObject:$}},q9=($)=>{let Q=typeof $==="string"?$:dP($);return HY(Q).replaceAll("\t"," ".repeat(rP))},rP=2;var fJ=R(()=>{J9();GM();WM()});var zM=($,Q)=>{if(!SJ(Q))return;V$({type:"command",verboseMessage:$,verboseInfo:Q})};var VM=R(()=>{r$();fJ()});var KM=($,Q,J)=>{$T($);let X=tP($);return{verbose:$,escapedCommand:Q,commandId:X,rawOptions:J}},tP=($)=>SJ({verbose:$})?eP++:void 0,eP=0n,$T=($)=>{for(let Q of $){if(Q===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(Q===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!Q9.includes(Q)&&!$9(Q)){let J=Q9.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${Q}. Allowed values are: ${J} or a function.`)}}};var UM=R(()=>{r$()});import{hrtime as xM}from"node:process";var W9=()=>xM.bigint(),Oq=($)=>Number(xM.bigint()-$)/1e6;var z9=()=>{};var V9=($,Q,J)=>{let X=W9(),{command:Y,escapedCommand:G}=lx($,Q),q=Rq(J,"verbose"),W=KM(q,G,{...J});return zM(G,W),{command:Y,escapedCommand:G,startTime:X,verboseInfo:W}};var Fq=R(()=>{VM();UM();z9();J9();F$()});var wM=g((B80,ZM)=>{ZM.exports=BM;BM.sync=JT;var MM=j0("fs");function QT($,Q){var J=Q.pathExt!==void 0?Q.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var X=0;X<J.length;X++){var Y=J[X].toLowerCase();if(Y&&$.substr(-Y.length).toLowerCase()===Y)return!0}return!1}function HM($,Q,J){if(!$.isSymbolicLink()&&!$.isFile())return!1;return QT(Q,J)}function BM($,Q,J){MM.stat($,function(X,Y){J(X,X?!1:HM(Y,$,Q))})}function JT($,Q){return HM(MM.statSync($),$,Q)}});var _M=g((Z80,DM)=>{DM.exports=LM;LM.sync=XT;var jM=j0("fs");function LM($,Q,J){jM.stat($,function(X,Y){J(X,X?!1:RM(Y,Q))})}function XT($,Q){return RM(jM.statSync($),Q)}function RM($,Q){return $.isFile()&&YT($,Q)}function YT($,Q){var{mode:J,uid:X,gid:Y}=$,G=Q.uid!==void 0?Q.uid:process.getuid&&process.getuid(),q=Q.gid!==void 0?Q.gid:process.getgid&&process.getgid(),W=parseInt("100",8),z=parseInt("010",8),V=parseInt("001",8),K=W|z,U=J&V||J&z&&Y===q||J&W&&X===G||J&K&&G===0;return U}});var vM=g((j80,NM)=>{var w80=j0("fs"),K9;if(process.platform==="win32"||global.TESTING_WINDOWS)K9=wM();else K9=_M();NM.exports=Cq;Cq.sync=GT;function Cq($,Q,J){if(typeof Q==="function")J=Q,Q={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(X,Y){Cq($,Q||{},function(G,q){if(G)Y(G);else X(q)})})}K9($,Q||{},function(X,Y){if(X){if(X.code==="EACCES"||Q&&Q.ignoreErrors)X=null,Y=!1}J(X,Y)})}function GT($,Q){try{return K9.sync($,Q||{})}catch(J){if(Q&&Q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var AM=g((L80,TM)=>{var mJ=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",OM=j0("path"),qT=mJ?";":":",FM=vM(),CM=($)=>Object.assign(Error(`not found: ${$}`),{code:"ENOENT"}),IM=($,Q)=>{let J=Q.colon||qT,X=$.match(/\//)||mJ&&$.match(/\\/)?[""]:[...mJ?[process.cwd()]:[],...(Q.path||process.env.PATH||"").split(J)],Y=mJ?Q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",G=mJ?Y.split(J):[""];if(mJ){if($.indexOf(".")!==-1&&G[0]!=="")G.unshift("")}return{pathEnv:X,pathExt:G,pathExtExe:Y}},PM=($,Q,J)=>{if(typeof Q==="function")J=Q,Q={};if(!Q)Q={};let{pathEnv:X,pathExt:Y,pathExtExe:G}=IM($,Q),q=[],W=(V)=>new Promise((K,U)=>{if(V===X.length)return Q.all&&q.length?K(q):U(CM($));let x=X[V],M=/^".*"$/.test(x)?x.slice(1,-1):x,H=OM.join(M,$),w=!M&&/^\.[\\\/]/.test($)?$.slice(0,2)+H:H;K(z(w,V,0))}),z=(V,K,U)=>new Promise((x,M)=>{if(U===Y.length)return x(W(K+1));let H=Y[U];FM(V+H,{pathExt:G},(w,j)=>{if(!w&&j)if(Q.all)q.push(V+H);else return x(V+H);return x(z(V,K,U+1))})});return J?W(0).then((V)=>J(null,V),J):W(0)},WT=($,Q)=>{Q=Q||{};let{pathEnv:J,pathExt:X,pathExtExe:Y}=IM($,Q),G=[];for(let q=0;q<J.length;q++){let W=J[q],z=/^".*"$/.test(W)?W.slice(1,-1):W,V=OM.join(z,$),K=!z&&/^\.[\\\/]/.test($)?$.slice(0,2)+V:V;for(let U=0;U<X.length;U++){let x=K+X[U];try{if(FM.sync(x,{pathExt:Y}))if(Q.all)G.push(x);else return x}catch(M){}}}if(Q.all&&G.length)return G;if(Q.nothrow)return null;throw CM($)};TM.exports=PM;PM.sync=WT});var kM=g((R80,Iq)=>{var EM=($={})=>{let Q=$.env||process.env;if(($.platform||process.platform)!=="win32")return"PATH";return Object.keys(Q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};Iq.exports=EM;Iq.exports.default=EM});var fM=g((D80,bM)=>{var cM=j0("path"),zT=AM(),VT=kM();function SM($,Q){let J=$.options.env||process.env,X=process.cwd(),Y=$.options.cwd!=null,G=Y&&process.chdir!==void 0&&!process.chdir.disabled;if(G)try{process.chdir($.options.cwd)}catch(W){}let q;try{q=zT.sync($.command,{path:J[VT({env:J})],pathExt:Q?cM.delimiter:void 0})}catch(W){}finally{if(G)process.chdir(X)}if(q)q=cM.resolve(Y?$.options.cwd:"",q);return q}function KT($){return SM($)||SM($,!0)}bM.exports=KT});var mM=g((MT,Tq)=>{var Pq=/([()\][%!^"`<>&|;, *?])/g;function UT($){return $=$.replace(Pq,"^$1"),$}function xT($,Q){if($=`${$}`,$=$.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),$=$.replace(/(?=(\\+?)?)\1$/,"$1$1"),$=`"${$}"`,$=$.replace(Pq,"^$1"),Q)$=$.replace(Pq,"^$1");return $}MT.command=UT;MT.argument=xT});var hM=g((_80,yM)=>{yM.exports=/^#!(.*)/});var uM=g((N80,pM)=>{var ZT=hM();pM.exports=($="")=>{let Q=$.match(ZT);if(!Q)return null;let[J,X]=Q[0].replace(/#! ?/,"").split(" "),Y=J.split("/").pop();if(Y==="env")return X;return X?`${Y} ${X}`:Y}});var lM=g((v80,gM)=>{var Aq=j0("fs"),wT=uM();function jT($){let J=Buffer.alloc(150),X;try{X=Aq.openSync($,"r"),Aq.readSync(X,J,0,150,0),Aq.closeSync(X)}catch(Y){}return wT(J.toString())}gM.exports=jT});var aM=g((O80,dM)=>{var LT=j0("path"),iM=fM(),nM=mM(),RT=lM(),DT=process.platform==="win32",_T=/\.(?:com|exe)$/i,NT=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function vT($){$.file=iM($);let Q=$.file&&RT($.file);if(Q)return $.args.unshift($.file),$.command=Q,iM($);return $.file}function OT($){if(!DT)return $;let Q=vT($),J=!_T.test(Q);if($.options.forceShell||J){let X=NT.test(Q);$.command=LT.normalize($.command),$.command=nM.command($.command),$.args=$.args.map((G)=>nM.argument(G,X));let Y=[$.command].concat($.args).join(" ");$.args=["/d","/s","/c",`"${Y}"`],$.command=process.env.comspec||"cmd.exe",$.options.windowsVerbatimArguments=!0}return $}function FT($,Q,J){if(Q&&!Array.isArray(Q))J=Q,Q=null;Q=Q?Q.slice(0):[],J=Object.assign({},J);let X={command:$,args:Q,options:J,file:void 0,original:{command:$,args:Q}};return J.shell?X:OT(X)}dM.exports=FT});var rM=g((F80,sM)=>{var Eq=process.platform==="win32";function kq($,Q){return Object.assign(Error(`${Q} ${$.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${Q} ${$.command}`,path:$.command,spawnargs:$.args})}function CT($,Q){if(!Eq)return;let J=$.emit;$.emit=function(X,Y){if(X==="exit"){let G=oM(Y,Q);if(G)return J.call($,"error",G)}return J.apply($,arguments)}}function oM($,Q){if(Eq&&$===1&&!Q.file)return kq(Q.original,"spawn");return null}function IT($,Q){if(Eq&&$===1&&!Q.file)return kq(Q.original,"spawnSync");return null}sM.exports={hookChildProcess:CT,verifyENOENT:oM,verifyENOENTSync:IT,notFoundError:kq}});var $H=g((C80,yJ)=>{var tM=j0("child_process"),cq=aM(),Sq=rM();function eM($,Q,J){let X=cq($,Q,J),Y=tM.spawn(X.command,X.args,X.options);return Sq.hookChildProcess(Y,X),Y}function PT($,Q,J){let X=cq($,Q,J),Y=tM.spawnSync(X.command,X.args,X.options);return Y.error=Y.error||Sq.verifyENOENTSync(Y.status,X),Y}yJ.exports=eM;yJ.exports.spawn=eM;yJ.exports.sync=PT;yJ.exports._parse=cq;yJ.exports._enoent=Sq});function U9($={}){let{env:Q=process.env,platform:J=process.platform}=$;if(J!=="win32")return"PATH";return Object.keys(Q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}import{promisify as TT}from"node:util";import{execFile as AT,execFileSync as A80}from"node:child_process";import QH from"node:path";import{fileURLToPath as ET}from"node:url";function x9($){return $ instanceof URL?ET($):$}function JH($){return{*[Symbol.iterator](){let Q=QH.resolve(x9($)),J;while(J!==Q)yield Q,J=Q,Q=QH.resolve(Q,"..")}}}var c80;var XH=R(()=>{c80=TT(AT)});import M9 from"node:process";import fQ from"node:path";var kT=({cwd:$=M9.cwd(),path:Q=M9.env[U9()],preferLocal:J=!0,execPath:X=M9.execPath,addExecPath:Y=!0}={})=>{let G=fQ.resolve(x9($)),q=[],W=Q.split(fQ.delimiter);if(J)cT(q,W,G);if(Y)ST(q,W,X,G);return Q===""||Q===fQ.delimiter?`${q.join(fQ.delimiter)}${Q}`:[...q,Q].join(fQ.delimiter)},cT=($,Q,J)=>{for(let X of JH(J)){let Y=fQ.join(X,"node_modules/.bin");if(!Q.includes(Y))$.push(Y)}},ST=($,Q,J,X)=>{let Y=fQ.resolve(X,x9(J),"..");if(!Q.includes(Y))$.push(Y)},YH=({env:$=M9.env,...Q}={})=>{$={...$};let J=U9({env:$});return Q.path=$[J],$[J]=kT(Q),$};var GH=R(()=>{XH()});var qH=($,Q,J)=>{let X=J?B9:H9,Y=$ instanceof K$?{}:{cause:$};return new X(Q,Y)},K$,WH=($,Q)=>{Object.defineProperty($.prototype,"name",{value:Q,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,VH,{value:!0,writable:!1,enumerable:!1,configurable:!1})},zH=($)=>Z9($)&&(VH in $),VH,Z9=($)=>Object.prototype.toString.call($)==="[object Error]",H9,B9;var mQ=R(()=>{K$=class K$ extends Error{};VH=Symbol("isExecaError");H9=class H9 extends Error{};WH(H9,H9.name);B9=class B9 extends Error{};WH(B9,B9.name)});var KH=()=>{let $=bq-UH+1;return Array.from({length:$},bT)},bT=($,Q)=>({name:`SIGRT${Q+1}`,number:UH+Q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),UH=34,bq=64;var xH;var MH=R(()=>{xH=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as fT}from"node:os";var fq=()=>{let $=KH();return[...xH,...$].map(mT)},mT=({name:$,number:Q,description:J,action:X,forced:Y=!1,standard:G})=>{let{signals:{[$]:q}}=fT,W=q!==void 0;return{name:$,number:W?q:Q,description:J,supported:W,action:X,forced:Y,standard:G}};var HH=R(()=>{MH()});import{constants as yT}from"node:os";var hT=()=>{let $=fq();return Object.fromEntries($.map(pT))},pT=({name:$,number:Q,description:J,supported:X,action:Y,forced:G,standard:q})=>[$,{name:$,number:Q,description:J,supported:X,action:Y,forced:G,standard:q}],BH,uT=()=>{let $=fq(),Q=bq+1,J=Array.from({length:Q},(X,Y)=>gT(Y,$));return Object.assign({},...J)},gT=($,Q)=>{let J=lT($,Q);if(J===void 0)return{};let{name:X,description:Y,supported:G,action:q,forced:W,standard:z}=J;return{[$]:{name:X,number:$,description:Y,supported:G,action:q,forced:W,standard:z}}},lT=($,Q)=>{let J=Q.find(({name:X})=>yT.signals[X]===$);if(J!==void 0)return J;return Q.find((X)=>X.number===$)},t80;var ZH=R(()=>{HH();BH=hT(),t80=uT()});import{constants as BY}from"node:os";var jH=($)=>{if($===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return RH($,"option `killSignal`")},LH=($)=>$===0?$:RH($,"`subprocess.kill()`'s argument"),RH=($,Q)=>{if(Number.isInteger($))return iT($,Q);if(typeof $==="string")return dT($,Q);throw TypeError(`Invalid ${Q} ${String($)}: it must be a string or an integer.
|
|
47
|
+
${mq()}`)},iT=($,Q)=>{if(wH.has($))return wH.get($);throw TypeError(`Invalid ${Q} ${$}: this signal integer does not exist.
|
|
48
|
+
${mq()}`)},nT=()=>new Map(Object.entries(BY.signals).reverse().map(([$,Q])=>[Q,$])),wH,dT=($,Q)=>{if($ in BY.signals)return $;if($.toUpperCase()in BY.signals)throw TypeError(`Invalid ${Q} '${$}': please rename it to '${$.toUpperCase()}'.`);throw TypeError(`Invalid ${Q} '${$}': this signal name does not exist.
|
|
49
|
+
${mq()}`)},mq=()=>`Available signal names: ${aT()}.
|
|
50
|
+
Available signal numbers: ${oT()}.`,aT=()=>Object.keys(BY.signals).sort().map(($)=>`'${$}'`).join(", "),oT=()=>[...new Set(Object.values(BY.signals).sort(($,Q)=>$-Q))].join(", "),w9=($)=>BH[$].description;var ZY=R(()=>{ZH();wH=nT()});import{setTimeout as sT}from"node:timers/promises";var DH=($)=>{if($===!1)return $;if($===!0)return rT;if(!Number.isFinite($)||$<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${$}\` (${typeof $})`);return $},rT=5000,_H=({kill:$,options:{forceKillAfterDelay:Q,killSignal:J},onInternalError:X,context:Y,controller:G},q,W)=>{let{signal:z,error:V}=tT(q,W,J);eT(V,X);let K=$(z);return $A({kill:$,signal:z,forceKillAfterDelay:Q,killSignal:J,killResult:K,context:Y,controller:G}),K},tT=($,Q,J)=>{let[X=J,Y]=Z9($)?[void 0,$]:[$,Q];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(Y!==void 0&&!Z9(Y))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Y}`);return{signal:LH(X),error:Y}},eT=($,Q)=>{if($!==void 0)Q.reject($)},$A=async({kill:$,signal:Q,forceKillAfterDelay:J,killSignal:X,killResult:Y,context:G,controller:q})=>{if(Q===X&&Y)yq({kill:$,forceKillAfterDelay:J,context:G,controllerSignal:q.signal})},yq=async({kill:$,forceKillAfterDelay:Q,context:J,controllerSignal:X})=>{if(Q===!1)return;try{if(await sT(Q,void 0,{signal:X}),$("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var j9=R(()=>{mQ();ZY()});import{once as QA}from"node:events";var L9=async($,Q)=>{if(!$.aborted)await QA($,"abort",{signal:Q})};var hq=()=>{};var NH=({cancelSignal:$})=>{if($!==void 0&&Object.prototype.toString.call($)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String($)}`)},vH=({subprocess:$,cancelSignal:Q,gracefulCancel:J,context:X,controller:Y})=>Q===void 0||J?[]:[JA($,Q,X,Y)],JA=async($,Q,J,{signal:X})=>{throw await L9(Q,X),J.terminationReason??="cancel",$.kill(),Q.reason};var pq=R(()=>{hq()});var hJ=({methodName:$,isSubprocess:Q,ipc:J,isConnected:X})=>{XA($,Q,J),uq($,Q,X)},XA=($,Q,J)=>{if(!J)throw Error(`${r8($,Q)} can only be used if the \`ipc\` option is \`true\`.`)},uq=($,Q,J)=>{if(!J)throw Error(`${r8($,Q)} cannot be used: the ${t$(Q)} has already exited or disconnected.`)},OH=($)=>{throw Error(`${r8("getOneMessage",$)} could not complete: the ${t$($)} exited or disconnected.`)},FH=($)=>{throw Error(`${r8("sendMessage",$)} failed: the ${t$($)} is sending a message too, instead of listening to incoming messages.
|
|
51
|
+
This can be fixed by both sending a message and listening to incoming messages at the same time:
|
|
52
|
+
|
|
53
|
+
const [receivedMessage] = await Promise.all([
|
|
54
|
+
${r8("getOneMessage",$)},
|
|
55
|
+
${r8("sendMessage",$,"message, {strict: true}")},
|
|
56
|
+
]);`)},R9=($,Q)=>Error(`${r8("sendMessage",Q)} failed when sending an acknowledgment response to the ${t$(Q)}.`,{cause:$}),CH=($)=>{throw Error(`${r8("sendMessage",$)} failed: the ${t$($)} is not listening to incoming messages.`)},IH=($)=>{throw Error(`${r8("sendMessage",$)} failed: the ${t$($)} exited without listening to incoming messages.`)},PH=()=>Error(`\`cancelSignal\` aborted: the ${t$(!0)} disconnected.`),TH=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},AH=({error:$,methodName:Q,isSubprocess:J})=>{if($.code==="EPIPE")throw Error(`${r8(Q,J)} cannot be used: the ${t$(J)} is disconnecting.`,{cause:$})},EH=({error:$,methodName:Q,isSubprocess:J,message:X})=>{if(YA($))throw Error(`${r8(Q,J)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:$})},YA=({code:$,message:Q})=>GA.has($)||qA.some((J)=>Q.includes(J)),GA,qA,r8=($,Q,J="")=>$==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${WA(Q)}${$}(${J})`,WA=($)=>$?"":"subprocess.",t$=($)=>$?"parent process":"subprocess",pJ=($)=>{if($.connected)$.disconnect()};var uJ=R(()=>{GA=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),qA=["could not be cloned","circular structure","call stack size exceeded"]});var U$=()=>{let $={},Q=new Promise((J,X)=>{Object.assign($,{resolve:J,reject:X})});return Object.assign(Q,$)};var _9=($,Q="stdin")=>{let{options:X,fileDescriptors:Y}=x$.get($),G=kH(Y,Q,!0),q=$.stdio[G];if(q===null)throw TypeError(cH(G,Q,X,!0));return q},gJ=($,Q="stdout")=>{let{options:X,fileDescriptors:Y}=x$.get($),G=kH(Y,Q,!1),q=G==="all"?$.all:$.stdio[G];if(q===null||q===void 0)throw TypeError(cH(G,Q,X,!1));return q},x$,kH=($,Q,J)=>{let X=zA(Q,J);return VA(X,Q,J,$),X},zA=($,Q)=>{let J=Dq($);if(J!==void 0)return J;let{validOptions:X,defaultValue:Y}=Q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${wY(Q)}" must not be "${$}".
|
|
57
|
+
It must be ${X} or "fd3", "fd4" (and so on).
|
|
58
|
+
It is optional and defaults to "${Y}".`)},VA=($,Q,J,X)=>{let Y=X[SH($)];if(Y===void 0)throw TypeError(`"${wY(J)}" must not be ${Q}. That file descriptor does not exist.
|
|
59
|
+
Please set the "stdio" option to ensure that file descriptor exists.`);if(Y.direction==="input"&&!J)throw TypeError(`"${wY(J)}" must not be ${Q}. It must be a readable stream, not writable.`);if(Y.direction!=="input"&&J)throw TypeError(`"${wY(J)}" must not be ${Q}. It must be a writable stream, not readable.`)},cH=($,Q,J,X)=>{if($==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Y,optionValue:G}=KA($,J);return`The "${Y}: ${D9(G)}" option is incompatible with using "${wY(X)}: ${D9(Q)}".
|
|
60
|
+
Please set this option with "pipe" instead.`},KA=($,{stdin:Q,stdout:J,stderr:X,stdio:Y})=>{let G=SH($);if(G===0&&Q!==void 0)return{optionName:"stdin",optionValue:Q};if(G===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if(G===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${G}]`,optionValue:Y[G]}},SH=($)=>$==="all"?1:$,wY=($)=>$?"to":"from",D9=($)=>{if(typeof $==="string")return`'${$}'`;return typeof $==="number"?`${$}`:"Stream"};var e$=R(()=>{F$();x$=new WeakMap});import{addAbortListener as UA}from"node:events";var yQ=($,Q,J)=>{let X=$.getMaxListeners();if(X===0||X===Number.POSITIVE_INFINITY)return;$.setMaxListeners(X+Q),UA(J,()=>{$.setMaxListeners($.getMaxListeners()-Q)})};var N9=()=>{};var v9=($,Q)=>{if(Q)gq($)},gq=($)=>{$.refCounted()},O9=($,Q)=>{if(Q)lq($)},lq=($)=>{$.unrefCounted()},bH=($,Q)=>{if(Q)lq($),lq($)},fH=($,Q)=>{if(Q)gq($),gq($)};import{once as xA}from"node:events";import{scheduler as MA}from"node:timers/promises";var mH=async({anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X},Y)=>{if(uH(Y)||lH(Y))return;if(!F9.has($))F9.set($,[]);let G=F9.get($);if(G.push(Y),G.length>1)return;while(G.length>0){await gH($,X,Y),await MA.yield();let q=await pH({wrappedMessage:G[0],anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X});G.shift(),X.emit("message",q),X.emit("message:done")}},yH=async({anyProcess:$,channel:Q,isSubprocess:J,ipcEmitter:X,boundOnMessage:Y})=>{iq();let G=F9.get($);while(G?.length>0)await xA(X,"message:done");$.removeListener("message",Y),fH(Q,J),X.connected=!1,X.emit("disconnect")},F9;var hH=R(()=>{I9();C9();P9();F9=new WeakMap});import{EventEmitter as HA}from"node:events";var $Q=($,Q,J)=>{if(T9.has($))return T9.get($);let X=new HA;return X.connected=!0,T9.set($,X),BA({ipcEmitter:X,anyProcess:$,channel:Q,isSubprocess:J}),X},T9,BA=({ipcEmitter:$,anyProcess:Q,channel:J,isSubprocess:X})=>{let Y=mH.bind(void 0,{anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:$});Q.on("message",Y),Q.once("disconnect",yH.bind(void 0,{anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:$,boundOnMessage:Y})),bH(J,X)},A9=($)=>{let Q=T9.get($);return Q===void 0?$.channel!==null:Q.connected};var jY=R(()=>{hH();T9=new WeakMap});import{once as ZA}from"node:events";var iH=({anyProcess:$,channel:Q,isSubprocess:J,message:X,strict:Y})=>{if(!Y)return X;let G=$Q($,Q,J),q=c9($,G);return{id:wA++,type:k9,message:X,hasListeners:q}},wA=0n,nH=($,Q)=>{if(Q?.type!==k9||Q.hasListeners)return;for(let{id:J}of $)if(J!==void 0)E9[J].resolve({isDeadlock:!0,hasListeners:!1})},pH=async({wrappedMessage:$,anyProcess:Q,channel:J,isSubprocess:X,ipcEmitter:Y})=>{if($?.type!==k9||!Q.connected)return $;let{id:G,message:q}=$,W={id:G,type:aH,message:c9(Q,Y)};try{await S9({anyProcess:Q,channel:J,isSubprocess:X,ipc:!0},W)}catch(z){Y.emit("strict:error",z)}return q},uH=($)=>{if($?.type!==aH)return!1;let{id:Q,message:J}=$;return E9[Q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},dH=async($,Q,J)=>{if($?.type!==k9)return;let X=U$();E9[$.id]=X;let Y=new AbortController;try{let{isDeadlock:G,hasListeners:q}=await Promise.race([X,jA(Q,J,Y)]);if(G)FH(J);if(!q)CH(J)}finally{Y.abort(),delete E9[$.id]}},E9,jA=async($,Q,{signal:J})=>{yQ($,1,J),await ZA($,"disconnect",{signal:J}),IH(Q)},k9="execa:ipc:request",aH="execa:ipc:response";var C9=R(()=>{N9();b9();uJ();jY();I9();E9={}});var oH=($,Q,J)=>{if(!LY.has($))LY.set($,new Set);let X=LY.get($),Y=U$(),G=J?Q.id:void 0,q={onMessageSent:Y,id:G};return X.add(q),{outgoingMessages:X,outgoingMessage:q}},sH=({outgoingMessages:$,outgoingMessage:Q})=>{$.delete(Q),Q.onMessageSent.resolve()},gH=async($,Q,J)=>{while(!c9($,Q)&&LY.get($)?.size>0){let X=[...LY.get($)];nH(X,J),await Promise.all(X.map(({onMessageSent:Y})=>Y))}},LY,c9=($,Q)=>Q.listenerCount("message")>LA($),LA=($)=>x$.has($)&&!O$(x$.get($).options.buffer,"ipc")?1:0;var I9=R(()=>{F$();e$();C9();LY=new WeakMap});import{promisify as RA}from"node:util";var S9=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},Y,{strict:G=!1}={})=>{return hJ({methodName:"sendMessage",isSubprocess:J,ipc:X,isConnected:$.connected}),DA({anyProcess:$,channel:Q,methodName:"sendMessage",isSubprocess:J,message:Y,strict:G})},DA=async({anyProcess:$,channel:Q,methodName:J,isSubprocess:X,message:Y,strict:G})=>{let q=iH({anyProcess:$,channel:Q,isSubprocess:X,message:Y,strict:G}),W=oH($,q,G);try{await dq({anyProcess:$,methodName:J,isSubprocess:X,wrappedMessage:q,message:Y})}catch(z){throw pJ($),z}finally{sH(W)}},dq=async({anyProcess:$,methodName:Q,isSubprocess:J,wrappedMessage:X,message:Y})=>{let G=_A($);try{await Promise.all([dH(X,$,J),G(X)])}catch(q){throw AH({error:q,methodName:Q,isSubprocess:J}),EH({error:q,methodName:Q,isSubprocess:J,message:Y}),q}},_A=($)=>{if(nq.has($))return nq.get($);let Q=RA($.send.bind($));return nq.set($,Q),Q},nq;var b9=R(()=>{uJ();I9();C9();nq=new WeakMap});import{scheduler as NA}from"node:timers/promises";var tH=($,Q)=>{return uq("cancelSignal",!1,$.connected),dq({anyProcess:$,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:$B,message:Q},message:Q})},eH=async({anyProcess:$,channel:Q,isSubprocess:J,ipc:X})=>{return await vA({anyProcess:$,channel:Q,isSubprocess:J,ipc:X}),aq.signal},vA=async({anyProcess:$,channel:Q,isSubprocess:J,ipc:X})=>{if(rH)return;if(rH=!0,!X){TH();return}if(Q===null){iq();return}$Q($,Q,J),await NA.yield()},rH=!1,lH=($)=>{if($?.type!==$B)return!1;return aq.abort($.message),!0},$B="execa:ipc:cancel",iq=()=>{aq.abort(PH())},aq;var P9=R(()=>{b9();jY();uJ();aq=new AbortController});var QB=({gracefulCancel:$,cancelSignal:Q,ipc:J,serialization:X})=>{if(!$)return;if(Q===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!J)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},JB=({subprocess:$,cancelSignal:Q,gracefulCancel:J,forceKillAfterDelay:X,context:Y,controller:G})=>J?[OA({subprocess:$,cancelSignal:Q,forceKillAfterDelay:X,context:Y,controller:G})]:[],OA=async({subprocess:$,cancelSignal:Q,forceKillAfterDelay:J,context:X,controller:{signal:Y}})=>{await L9(Q,Y);let G=FA(Q);throw await tH($,G),yq({kill:$.kill,forceKillAfterDelay:J,context:X,controllerSignal:Y}),X.terminationReason??="gracefulCancel",Q.reason},FA=({reason:$})=>{if(!($ instanceof DOMException))return $;let Q=Error($.message);return Object.defineProperty(Q,"stack",{value:$.stack,enumerable:!1,configurable:!0,writable:!0}),Q};var oq=R(()=>{hq();P9();j9()});import{setTimeout as CA}from"node:timers/promises";var XB=({timeout:$})=>{if($!==void 0&&(!Number.isFinite($)||$<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${$}\` (${typeof $})`)},YB=($,Q,J,X)=>Q===0||Q===void 0?[]:[IA($,Q,J,X)],IA=async($,Q,J,{signal:X})=>{throw await CA(Q,void 0,{signal:X}),J.terminationReason??="timeout",$.kill(),new K$};var sq=R(()=>{mQ()});import{execPath as PA,execArgv as TA}from"node:process";import GB from"node:path";var qB=({options:$})=>{if($.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...$,node:!0}}},WB=($,Q,{node:J=!1,nodePath:X=PA,nodeOptions:Y=TA.filter((z)=>!z.startsWith("--inspect")),cwd:G,execPath:q,...W})=>{if(q!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let z=kJ(X,'The "nodePath" option'),V=GB.resolve(G,z),K={...W,nodePath:V,node:J,cwd:G};if(!J)return[$,Q,K];if(GB.basename($,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[V,[...Y,$,...Q],{ipc:!0,...K,shell:!1}]};var rq=R(()=>{cJ()});import{serialize as AA}from"node:v8";var zB=({ipcInput:$,ipc:Q,serialization:J})=>{if($===void 0)return;if(!Q)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");cA[J]($)},EA=($)=>{try{AA($)}catch(Q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:Q})}},kA=($)=>{try{JSON.stringify($)}catch(Q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:Q})}},cA,VB=async($,Q)=>{if(Q===void 0)return;await $.sendMessage(Q)};var tq=R(()=>{cA={advanced:EA,json:kA}});var UB=({encoding:$})=>{if(eq.has($))return;let Q=bA($);if(Q!==void 0)throw TypeError(`Invalid option \`encoding: ${f9($)}\`.
|
|
61
|
+
Please rename it to ${f9(Q)}.`);let J=[...eq].map((X)=>f9(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${f9($)}\`.
|
|
62
|
+
Please rename it to one of: ${J}.`)},SA,O8,eq,bA=($)=>{if($===null)return"buffer";if(typeof $!=="string")return;let Q=$.toLowerCase();if(Q in KB)return KB[Q];if(eq.has(Q))return Q},KB,f9=($)=>typeof $==="string"?`"${$}"`:String($);var hQ=R(()=>{SA=new Set(["utf8","utf16le"]),O8=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),eq=new Set([...SA,...O8]),KB={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as fA}from"node:fs";import mA from"node:path";import yA from"node:process";var xB=($=MB())=>{let Q=kJ($,'The "cwd" option');return mA.resolve(Q)},MB=()=>{try{return yA.cwd()}catch($){throw $.message=`The current directory does not exist.
|
|
63
|
+
${$.message}`,$}},HB=($,Q)=>{if(Q===MB())return $;let J;try{J=fA(Q)}catch(X){return`The "cwd" option is invalid: ${Q}.
|
|
64
|
+
${X.message}
|
|
65
|
+
${$}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${Q}.
|
|
66
|
+
${$}`;return $};var $W=R(()=>{cJ()});import hA from"node:path";import BB from"node:process";var ZB,m9=($,Q,J)=>{J.cwd=xB(J.cwd);let[X,Y,G]=WB($,Q,J),{command:q,args:W,options:z}=ZB.default._parse(X,Y,G),V=ux(z),K=pA(V);if(XB(K),UB(K),zB(K),NH(K),QB(K),K.shell=Zq(K.shell),K.env=uA(K),K.killSignal=jH(K.killSignal),K.forceKillAfterDelay=DH(K.forceKillAfterDelay),K.lines=K.lines.map((U,x)=>U&&!O8.has(K.encoding)&&K.buffer[x]),BB.platform==="win32"&&hA.basename(q,".exe")==="cmd")W.unshift("/q");return{file:q,commandArguments:W,options:K}},pA=({extendEnv:$=!0,preferLocal:Q=!1,cwd:J,localDir:X=J,encoding:Y="utf8",reject:G=!0,cleanup:q=!0,all:W=!1,windowsHide:z=!0,killSignal:V="SIGTERM",forceKillAfterDelay:K=!0,gracefulCancel:U=!1,ipcInput:x,ipc:M=x!==void 0||U,serialization:H="advanced",...w})=>({...w,extendEnv:$,preferLocal:Q,cwd:J,localDirectory:X,encoding:Y,reject:G,cleanup:q,all:W,windowsHide:z,killSignal:V,forceKillAfterDelay:K,gracefulCancel:U,ipcInput:x,ipc:M,serialization:H}),uA=({env:$,extendEnv:Q,preferLocal:J,node:X,localDirectory:Y,nodePath:G})=>{let q=Q?{...BB.env,...$}:$;if(J||X)return YH({env:q,cwd:Y,execPath:G,preferLocal:J,addExecPath:X});return q};var QW=R(()=>{GH();j9();ZY();pq();oq();sq();rq();tq();hQ();$W();cJ();F$();ZB=G7($H(),1)});var y9=($,Q,J)=>J.shell&&Q.length>0?[[$,...Q].join(" "),[],J]:[$,Q,J];function lJ($){if(typeof $==="string")return gA($);if(!(ArrayBuffer.isView($)&&$.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return lA($)}var gA=($)=>$.at(-1)===wB?$.slice(0,$.at(-2)===jB?-2:-1):$,lA=($)=>$.at(-1)===iA?$.subarray(0,$.at(-2)===nA?-2:-1):$,wB=`
|
|
67
|
+
`,iA,jB="\r",nA;var JW=R(()=>{iA=wB.codePointAt(0),nA=jB.codePointAt(0)});function t8($,{checkOpen:Q=!0}={}){return $!==null&&typeof $==="object"&&($.writable||$.readable||!Q||$.writable===void 0&&$.readable===void 0)&&typeof $.pipe==="function"}function XW($,{checkOpen:Q=!0}={}){return t8($,{checkOpen:Q})&&($.writable||!Q)&&typeof $.write==="function"&&typeof $.end==="function"&&typeof $.writable==="boolean"&&typeof $.writableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function pQ($,{checkOpen:Q=!0}={}){return t8($,{checkOpen:Q})&&($.readable||!Q)&&typeof $.read==="function"&&typeof $.readable==="boolean"&&typeof $.readableObjectMode==="boolean"&&typeof $.destroy==="function"&&typeof $.destroyed==="boolean"}function YW($,Q){return XW($,Q)&&pQ($,Q)}class LB{#Q;#J;#$=!1;#X=void 0;constructor($,Q){this.#Q=$,this.#J=Q}next(){let $=()=>this.#G();return this.#X=this.#X?this.#X.then($,$):$(),this.#X}return($){let Q=()=>this.#Y($);return this.#X?this.#X.then(Q,Q):Q()}async#G(){if(this.#$)return{done:!0,value:void 0};let $;try{$=await this.#Q.read()}catch(Q){throw this.#X=void 0,this.#$=!0,this.#Q.releaseLock(),Q}return $.done&&(this.#X=void 0,this.#$=!0,this.#Q.releaseLock()),$}async#Y($){if(this.#$)return{done:!0,value:$};if(this.#$=!0,!this.#J){let Q=this.#Q.cancel($);return this.#Q.releaseLock(),await Q,{done:!0,value:$}}return this.#Q.releaseLock(),{done:!0,value:$}}}function RB(){return this[GW].next()}function DB($){return this[GW].return($)}function qW({preventCancel:$=!1}={}){let Q=this.getReader(),J=new LB(Q,$),X=Object.create(aA);return X[GW]=J,X}var dA,GW,aA;var _B=R(()=>{dA=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);GW=Symbol();Object.defineProperty(RB,"name",{value:"next"});Object.defineProperty(DB,"name",{value:"return"});aA=Object.create(dA,{next:{enumerable:!0,configurable:!0,writable:!0,value:RB},return:{enumerable:!0,configurable:!0,writable:!0,value:DB}})});var NB=()=>{};var vB=R(()=>{_B();NB()});var OB=($)=>{if(pQ($,{checkOpen:!1})&&RY.on!==void 0)return sA($);if(typeof $?.[Symbol.asyncIterator]==="function")return $;if(oA.call($)==="[object ReadableStream]")return qW.call($);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},oA,sA=async function*($){let Q=new AbortController,J={};rA($,Q,J);try{for await(let[X]of RY.on($,"data",{signal:Q.signal}))yield X}catch(X){if(J.error!==void 0)throw J.error;else if(!Q.signal.aborted)throw X}finally{$.destroy()}},rA=async($,Q,J)=>{try{await RY.finished($,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){J.error=X}finally{Q.abort()}},RY;var WW=R(()=>{vB();({toString:oA}=Object.prototype),RY={}});var iJ=async($,{init:Q,convertChunk:J,getSize:X,truncateChunk:Y,addChunk:G,getFinalChunk:q,finalize:W},{maxBuffer:z=Number.POSITIVE_INFINITY}={})=>{let V=OB($),K=Q();K.length=0;try{for await(let U of V){let x=eA(U),M=J[x](U,K);IB({convertedChunk:M,state:K,getSize:X,truncateChunk:Y,addChunk:G,maxBuffer:z})}return tA({state:K,convertChunk:J,getSize:X,truncateChunk:Y,addChunk:G,getFinalChunk:q,maxBuffer:z}),W(K)}catch(U){let x=typeof U==="object"&&U!==null?U:Error(U);throw x.bufferedData=W(K),x}},tA=({state:$,getSize:Q,truncateChunk:J,addChunk:X,getFinalChunk:Y,maxBuffer:G})=>{let q=Y($);if(q!==void 0)IB({convertedChunk:q,state:$,getSize:Q,truncateChunk:J,addChunk:X,maxBuffer:G})},IB=({convertedChunk:$,state:Q,getSize:J,truncateChunk:X,addChunk:Y,maxBuffer:G})=>{let q=J($),W=Q.length+q;if(W<=G){FB($,Q,Y,W);return}let z=X($,G-Q.length);if(z!==void 0)FB(z,Q,Y,G);throw new C$},FB=($,Q,J,X)=>{Q.contents=J($,Q,X),Q.length=X},eA=($)=>{let Q=typeof $;if(Q==="string")return"string";if(Q!=="object"||$===null)return"others";if(globalThis.Buffer?.isBuffer($))return"buffer";let J=CB.call($);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger($.byteLength)&&Number.isInteger($.byteOffset)&&CB.call($.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},CB,C$;var DY=R(()=>{WW();({toString:CB}=Object.prototype);C$=class C$ extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var I$=($)=>$,_Y=()=>{return},h9=({contents:$})=>$,p9=($)=>{throw Error(`Streams in object mode are not supported: ${String($)}`)},u9=($)=>$.length;async function g9($,Q){return iJ($,XE,Q)}var $E=()=>({contents:[]}),QE=()=>1,JE=($,{contents:Q})=>{return Q.push($),Q},XE;var PB=R(()=>{DY();XE={init:$E,convertChunk:{string:I$,buffer:I$,arrayBuffer:I$,dataView:I$,typedArray:I$,others:I$},getSize:QE,truncateChunk:_Y,addChunk:JE,getFinalChunk:_Y,finalize:h9}});async function l9($,Q){return iJ($,xE,Q)}var YE=()=>({contents:new ArrayBuffer(0)}),GE=($)=>qE.encode($),qE,TB=($)=>new Uint8Array($),AB=($)=>new Uint8Array($.buffer,$.byteOffset,$.byteLength),WE=($,Q)=>$.slice(0,Q),zE=($,{contents:Q,length:J},X)=>{let Y=cB()?KE(Q,X):VE(Q,X);return new Uint8Array(Y).set($,J),Y},VE=($,Q)=>{if(Q<=$.byteLength)return $;let J=new ArrayBuffer(kB(Q));return new Uint8Array(J).set(new Uint8Array($),0),J},KE=($,Q)=>{if(Q<=$.maxByteLength)return $.resize(Q),$;let J=new ArrayBuffer(Q,{maxByteLength:kB(Q)});return new Uint8Array(J).set(new Uint8Array($),0),J},kB=($)=>EB**Math.ceil(Math.log($)/Math.log(EB)),EB=2,UE=({contents:$,length:Q})=>cB()?$:$.slice(0,Q),cB=()=>("resize"in ArrayBuffer.prototype),xE;var SB=R(()=>{DY();qE=new TextEncoder,xE={init:YE,convertChunk:{string:GE,buffer:TB,arrayBuffer:TB,dataView:AB,typedArray:AB,others:p9},getSize:u9,truncateChunk:WE,addChunk:zE,getFinalChunk:_Y,finalize:UE}});async function n9($,Q){return iJ($,wE,Q)}var ME=()=>({contents:"",textDecoder:new TextDecoder}),i9=($,{textDecoder:Q})=>Q.decode($,{stream:!0}),HE=($,{contents:Q})=>Q+$,BE=($,Q)=>$.slice(0,Q),ZE=({textDecoder:$})=>{let Q=$.decode();return Q===""?void 0:Q},wE;var bB=R(()=>{DY();wE={init:ME,convertChunk:{string:I$,buffer:i9,arrayBuffer:i9,dataView:i9,typedArray:i9,others:p9},getSize:u9,truncateChunk:BE,addChunk:HE,getFinalChunk:ZE,finalize:h9}});var fB=R(()=>{PB();SB();bB();DY()});import{on as jE}from"node:events";import{finished as LE}from"node:stream/promises";var d9=R(()=>{WW();fB();Object.assign(RY,{on:jE,finished:LE})});var mB=({error:$,stream:Q,readableObjectMode:J,lines:X,encoding:Y,fdNumber:G})=>{if(!($ instanceof C$))throw $;if(G==="all")return $;let q=RE(J,X,Y);throw $.maxBufferInfo={fdNumber:G,unit:q},Q.destroy(),$},RE=($,Q,J)=>{if($)return"objects";if(Q)return"lines";if(J==="buffer")return"bytes";return"characters"},yB=($,Q,J)=>{if(Q.length!==J)return;let X=new C$;throw X.maxBufferInfo={fdNumber:"ipc"},X},hB=($,Q)=>{let{streamName:J,threshold:X,unit:Y}=DE($,Q);return`Command's ${J} was larger than ${X} ${Y}`},DE=($,Q)=>{if($?.maxBufferInfo===void 0)return{streamName:"output",threshold:Q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:X}}=$;delete $.maxBufferInfo;let Y=O$(Q,J);if(J==="ipc")return{streamName:"IPC output",threshold:Y,unit:"messages"};return{streamName:e7(J),threshold:Y,unit:X}},pB=($,Q,J)=>$?.code==="ENOBUFS"&&Q!==null&&Q.some((X)=>X!==null&&X.length>a9(J)),uB=($,Q,J)=>{if(!Q)return $;let X=a9(J);return $.length>X?$.slice(0,X):$},a9=([,$])=>$;var uQ=R(()=>{d9();v$();F$()});import{inspect as _E}from"node:util";var lB=({stdio:$,all:Q,ipcOutput:J,originalError:X,signal:Y,signalDescription:G,exitCode:q,escapedCommand:W,timedOut:z,isCanceled:V,isGracefullyCanceled:K,isMaxBuffer:U,isForcefullyTerminated:x,forceKillAfterDelay:M,killSignal:H,maxBuffer:w,timeout:j,cwd:Z})=>{let L=X?.code,D=NE({originalError:X,timedOut:z,timeout:j,isMaxBuffer:U,maxBuffer:w,errorCode:L,signal:Y,signalDescription:G,exitCode:q,isCanceled:V,isGracefullyCanceled:K,isForcefullyTerminated:x,forceKillAfterDelay:M,killSignal:H}),F=OE(X,Z),J0=F===void 0?"":`
|
|
68
|
+
${F}`,n=`${D}: ${W}${J0}`,e=Q===void 0?[$[2],$[1]]:[Q],y=[n,...e,...$.slice(3),J.map((p)=>FE(p)).join(`
|
|
69
|
+
`)].map((p)=>HY(lJ(CE(p)))).filter(Boolean).join(`
|
|
70
|
+
|
|
71
|
+
`);return{originalMessage:F,shortMessage:n,message:y}},NE=({originalError:$,timedOut:Q,timeout:J,isMaxBuffer:X,maxBuffer:Y,errorCode:G,signal:q,signalDescription:W,exitCode:z,isCanceled:V,isGracefullyCanceled:K,isForcefullyTerminated:U,forceKillAfterDelay:x,killSignal:M})=>{let H=vE(U,x);if(Q)return`Command timed out after ${J} milliseconds${H}`;if(K){if(q===void 0)return`Command was gracefully canceled with exit code ${z}`;return U?`Command was gracefully canceled${H}`:`Command was gracefully canceled with ${q} (${W})`}if(V)return`Command was canceled${H}`;if(X)return`${hB($,Y)}${H}`;if(G!==void 0)return`Command failed with ${G}${H}`;if(U)return`Command was killed with ${M} (${w9(M)})${H}`;if(q!==void 0)return`Command was killed with ${q} (${W})`;if(z!==void 0)return`Command failed with exit code ${z}`;return"Command failed"},vE=($,Q)=>$?` and was forcefully terminated after ${Q} milliseconds`:"",OE=($,Q)=>{if($ instanceof K$)return;let J=zH($)?$.originalMessage:String($?.message??$),X=HY(HB(J,Q));return X===""?void 0:X},FE=($)=>typeof $==="string"?$:_E($),CE=($)=>Array.isArray($)?$.map((Q)=>lJ(gB(Q))).filter(Boolean).join(`
|
|
72
|
+
`):gB($),gB=($)=>{if(typeof $==="string")return $;if(g0($))return r7($);return""};var iB=R(()=>{JW();v8();$W();J9();uQ();ZY();mQ()});var o9=({command:$,escapedCommand:Q,stdio:J,all:X,ipcOutput:Y,options:{cwd:G},startTime:q})=>nB({command:$,escapedCommand:Q,cwd:G,durationMs:Oq(q),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:X,stdio:J,ipcOutput:Y,pipedFrom:[]}),nJ=({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,isSync:q})=>NY({error:$,command:Q,escapedCommand:J,startTime:G,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:Y,isSync:q}),NY=({error:$,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:q,isMaxBuffer:W,isForcefullyTerminated:z,exitCode:V,signal:K,stdio:U,all:x,ipcOutput:M,options:{timeoutDuration:H,timeout:w=H,forceKillAfterDelay:j,killSignal:Z,cwd:L,maxBuffer:D},isSync:F})=>{let{exitCode:J0,signal:n,signalDescription:e}=PE(V,K),{originalMessage:y,shortMessage:p,message:q0}=lB({stdio:U,all:x,ipcOutput:M,originalError:$,signal:n,signalDescription:e,exitCode:J0,escapedCommand:J,timedOut:Y,isCanceled:G,isGracefullyCanceled:q,isMaxBuffer:W,isForcefullyTerminated:z,forceKillAfterDelay:j,killSignal:Z,maxBuffer:D,timeout:w,cwd:L}),t=qH($,q0,F);return Object.assign(t,IE({error:t,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:q,isMaxBuffer:W,isForcefullyTerminated:z,exitCode:J0,signal:n,signalDescription:e,stdio:U,all:x,ipcOutput:M,cwd:L,originalMessage:y,shortMessage:p})),t},IE=({error:$,command:Q,escapedCommand:J,startTime:X,timedOut:Y,isCanceled:G,isGracefullyCanceled:q,isMaxBuffer:W,isForcefullyTerminated:z,exitCode:V,signal:K,signalDescription:U,stdio:x,all:M,ipcOutput:H,cwd:w,originalMessage:j,shortMessage:Z})=>nB({shortMessage:Z,originalMessage:j,command:Q,escapedCommand:J,cwd:w,durationMs:Oq(X),failed:!0,timedOut:Y,isCanceled:G,isGracefullyCanceled:q,isTerminated:K!==void 0,isMaxBuffer:W,isForcefullyTerminated:z,exitCode:V,signal:K,signalDescription:U,code:$.cause?.code,stdout:x[1],stderr:x[2],all:M,stdio:x,ipcOutput:H,pipedFrom:[]}),nB=($)=>Object.fromEntries(Object.entries($).filter(([,Q])=>Q!==void 0)),PE=($,Q)=>{let J=$===null?void 0:$,X=Q===null?void 0:Q,Y=X===void 0?void 0:w9(Q);return{exitCode:J,signal:X,signalDescription:Y}};var vY=R(()=>{ZY();z9();mQ();iB()});function TE($){return{days:Math.trunc($/86400000),hours:Math.trunc($/3600000%24),minutes:Math.trunc($/60000%60),seconds:Math.trunc($/1000%60),milliseconds:Math.trunc($%1000),microseconds:Math.trunc(dB($*1000)%1000),nanoseconds:Math.trunc(dB($*1e6)%1000)}}function AE($){return{days:$/86400000n,hours:$/3600000n%24n,minutes:$/60000n%60n,seconds:$/1000n%60n,milliseconds:$%1000n,microseconds:0n,nanoseconds:0n}}function zW($){switch(typeof $){case"number":{if(Number.isFinite($))return TE($);break}case"bigint":return AE($)}throw TypeError("Expected a finite number or bigint")}var dB=($)=>Number.isFinite($)?$:0;function VW($,Q){let J=typeof $==="bigint";if(!J&&!Number.isFinite($))throw TypeError("Expected a finite number or bigint");Q={...Q};let X=$<0?"-":"";if($=$<0?-$:$,Q.colonNotation)Q.compact=!1,Q.formatSubMilliseconds=!1,Q.separateMilliseconds=!1,Q.verbose=!1;if(Q.compact)Q.unitCount=1,Q.secondsDecimalDigits=0,Q.millisecondsDecimalDigits=0;let Y=[],G=(K,U)=>{let x=Math.floor(K*10**U+cE);return(Math.round(x)/10**U).toFixed(U)},q=(K,U,x,M)=>{if((Y.length===0||!Q.colonNotation)&&EE(K)&&!(Q.colonNotation&&x==="m"))return;if(M??=String(K),Q.colonNotation){let H=M.includes(".")?M.split(".")[0].length:M.length,w=Y.length>0?2:1;M="0".repeat(Math.max(0,w-H))+M}else M+=Q.verbose?" "+kE(U,K):x;Y.push(M)},W=zW($),z=BigInt(W.days);if(Q.hideYearAndDays)q(BigInt(z)*24n+BigInt(W.hours),"hour","h");else{if(Q.hideYear)q(z,"day","d");else q(z/365n,"year","y"),q(z%365n,"day","d");q(Number(W.hours),"hour","h")}if(q(Number(W.minutes),"minute","m"),!Q.hideSeconds)if(Q.separateMilliseconds||Q.formatSubMilliseconds||!Q.colonNotation&&$<1000&&!Q.subSecondsAsDecimals){let K=Number(W.seconds),U=Number(W.milliseconds),x=Number(W.microseconds),M=Number(W.nanoseconds);if(q(K,"second","s"),Q.formatSubMilliseconds)q(U,"millisecond","ms"),q(x,"microsecond","µs"),q(M,"nanosecond","ns");else{let H=U+x/1000+M/1e6,w=typeof Q.millisecondsDecimalDigits==="number"?Q.millisecondsDecimalDigits:0,j=H>=1?Math.round(H):Math.ceil(H),Z=w?H.toFixed(w):j;q(Number.parseFloat(Z),"millisecond","ms",Z)}}else{let K=(J?Number($%SE):$)/1000%60,U=typeof Q.secondsDecimalDigits==="number"?Q.secondsDecimalDigits:1,x=G(K,U),M=Q.keepDecimalsOnWholeSeconds?x:x.replace(/\.0+$/,"");q(Number.parseFloat(M),"second","s",M)}if(Y.length===0)return X+"0"+(Q.verbose?" milliseconds":"ms");let V=Q.colonNotation?":":" ";if(typeof Q.unitCount==="number")Y=Y.slice(0,Math.max(Q.unitCount,1));return X+Y.join(V)}var EE=($)=>$===0||$===0n,kE=($,Q)=>Q===1||Q===1n?$:`${$}s`,cE=0.0000001,SE;var aB=R(()=>{SE=24n*60n*60n*1000n});var oB=($,Q)=>{if($.failed)V$({type:"error",verboseMessage:$.shortMessage,verboseInfo:Q,result:$})};var sB=R(()=>{fJ()});var rB=($,Q)=>{if(!SJ(Q))return;oB($,Q),bE($,Q)},bE=($,Q)=>{let J=`(done in ${VW($.durationMs)})`;V$({type:"duration",verboseMessage:J,verboseInfo:Q,result:$})};var tB=R(()=>{aB();r$();fJ();sB()});var dJ=($,Q,{reject:J})=>{if(rB($,Q),$.failed&&J)throw $;return $};var s9=R(()=>{tB()});var QZ=($,Q)=>{if(gQ($))return"asyncGenerator";if(YZ($))return"generator";if(r9($))return"fileUrl";if(pE($))return"filePath";if(lE($))return"webStream";if(t8($,{checkOpen:!1}))return"native";if(g0($))return"uint8Array";if(iE($))return"asyncIterable";if(nE($))return"iterable";if(xW($))return JZ({transform:$},Q);if(hE($))return fE($,Q);return"native"},fE=($,Q)=>{if(YW($.transform,{checkOpen:!1}))return mE($,Q);if(xW($.transform))return JZ($,Q);return yE($,Q)},mE=($,Q)=>{return XZ($,Q,"Duplex stream"),"duplex"},JZ=($,Q)=>{return XZ($,Q,"web TransformStream"),"webTransform"},XZ=({final:$,binary:Q,objectMode:J},X,Y)=>{eB($,`${X}.final`,Y),eB(Q,`${X}.binary`,Y),KW(J,`${X}.objectMode`)},eB=($,Q,J)=>{if($!==void 0)throw TypeError(`The \`${Q}\` option can only be defined when using a generator, not a ${J}.`)},yE=({transform:$,final:Q,binary:J,objectMode:X},Y)=>{if($!==void 0&&!$Z($))throw TypeError(`The \`${Y}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(YW(Q,{checkOpen:!1}))throw TypeError(`The \`${Y}.final\` option must not be a Duplex stream.`);if(xW(Q))throw TypeError(`The \`${Y}.final\` option must not be a web TransformStream.`);if(Q!==void 0&&!$Z(Q))throw TypeError(`The \`${Y}.final\` option must be a generator.`);return KW(J,`${Y}.binary`),KW(X,`${Y}.objectMode`),gQ($)||gQ(Q)?"asyncGenerator":"generator"},KW=($,Q)=>{if($!==void 0&&typeof $!=="boolean")throw TypeError(`The \`${Q}\` option must use a boolean.`)},$Z=($)=>gQ($)||YZ($),gQ=($)=>Object.prototype.toString.call($)==="[object AsyncGeneratorFunction]",YZ=($)=>Object.prototype.toString.call($)==="[object GeneratorFunction]",hE=($)=>y0($)&&($.transform!==void 0||$.final!==void 0),r9=($)=>Object.prototype.toString.call($)==="[object URL]",GZ=($)=>r9($)&&$.protocol!=="file:",pE=($)=>y0($)&&Object.keys($).length>0&&Object.keys($).every((Q)=>uE.has(Q))&&UW($.file),uE,UW=($)=>typeof $==="string",qZ=($,Q)=>$==="native"&&typeof Q==="string"&&!gE.has(Q),gE,WZ=($)=>Object.prototype.toString.call($)==="[object ReadableStream]",t9=($)=>Object.prototype.toString.call($)==="[object WritableStream]",lE=($)=>WZ($)||t9($),xW=($)=>WZ($?.readable)&&t9($?.writable),iE=($)=>zZ($)&&typeof $[Symbol.asyncIterator]==="function",nE=($)=>zZ($)&&typeof $[Symbol.iterator]==="function",zZ=($)=>typeof $==="object"&&$!==null,S8,e9,MW,VZ,KZ,QQ;var U8=R(()=>{v8();uE=new Set(["file","append"]),gE=new Set(["ipc","ignore","inherit","overlapped","pipe"]),S8=new Set(["generator","asyncGenerator","duplex","webTransform"]),e9=new Set(["fileUrl","filePath","fileNumber"]),MW=new Set(["fileUrl","filePath"]),VZ=new Set([...MW,"webStream","nodeStream"]),KZ=new Set(["webTransform","duplex"]),QQ={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var HW=($,Q,J,X)=>X==="output"?dE($,Q,J):aE($,Q,J),dE=($,Q,J)=>{let X=Q!==0&&J[Q-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:$??X}},aE=($,Q,J)=>{let X=Q===0?$===!0:J[Q-1].value.readableObjectMode,Y=Q!==J.length-1&&($??X);return{writableObjectMode:X,readableObjectMode:Y}},UZ=($,Q)=>{let J=$.findLast(({type:X})=>S8.has(X));if(J===void 0)return!1;return Q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var BW=R(()=>{U8()});var xZ=($,Q,J,X)=>[...$.filter(({type:Y})=>!S8.has(Y)),...oE($,Q,J,X)],oE=($,Q,J,{encoding:X})=>{let Y=$.filter(({type:q})=>S8.has(q)),G=Array.from({length:Y.length});for(let[q,W]of Object.entries(Y))G[q]=sE({stdioItem:W,index:Number(q),newTransforms:G,optionName:Q,direction:J,encoding:X});return $k(G,J)},sE=({stdioItem:$,stdioItem:{type:Q},index:J,newTransforms:X,optionName:Y,direction:G,encoding:q})=>{if(Q==="duplex")return rE({stdioItem:$,optionName:Y});if(Q==="webTransform")return tE({stdioItem:$,index:J,newTransforms:X,direction:G});return eE({stdioItem:$,index:J,newTransforms:X,direction:G,encoding:q})},rE=({stdioItem:$,stdioItem:{value:{transform:Q,transform:{writableObjectMode:J,readableObjectMode:X},objectMode:Y=X}},optionName:G})=>{if(Y&&!X)throw TypeError(`The \`${G}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Y&&X)throw TypeError(`The \`${G}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...$,value:{transform:Q,writableObjectMode:J,readableObjectMode:X}}},tE=({stdioItem:$,stdioItem:{value:Q},index:J,newTransforms:X,direction:Y})=>{let{transform:G,objectMode:q}=y0(Q)?Q:{transform:Q},{writableObjectMode:W,readableObjectMode:z}=HW(q,J,X,Y);return{...$,value:{transform:G,writableObjectMode:W,readableObjectMode:z}}},eE=({stdioItem:$,stdioItem:{value:Q},index:J,newTransforms:X,direction:Y,encoding:G})=>{let{transform:q,final:W,binary:z=!1,preserveNewlines:V=!1,objectMode:K}=y0(Q)?Q:{transform:Q},U=z||O8.has(G),{writableObjectMode:x,readableObjectMode:M}=HW(K,J,X,Y);return{...$,value:{transform:q,final:W,binary:U,preserveNewlines:V,writableObjectMode:x,readableObjectMode:M}}},$k=($,Q)=>Q==="input"?$.reverse():$;var MZ=R(()=>{hQ();U8();BW()});import ZW from"node:process";var HZ=($,Q,J)=>{let X=$.map((Y)=>Qk(Y,Q));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??Yk},Qk=({type:$,value:Q},J)=>Jk[J]??BZ[$](Q),Jk,aJ=()=>{return},wW=()=>"input",BZ,Xk=($)=>{if([0,ZW.stdin].includes($))return"input";if([1,2,ZW.stdout,ZW.stderr].includes($))return"output"},Yk="output";var ZZ=R(()=>{U8();Jk=["input","output","output"],BZ={generator:aJ,asyncGenerator:aJ,fileUrl:aJ,filePath:aJ,iterable:wW,asyncIterable:wW,uint8Array:wW,webStream:($)=>t9($)?"output":"input",nodeStream($){if(!pQ($,{checkOpen:!1}))return"output";return XW($,{checkOpen:!1})?void 0:"input"},webTransform:aJ,duplex:aJ,native($){let Q=Xk($);if(Q!==void 0)return Q;if(t8($,{checkOpen:!1}))return BZ.nodeStream($)}}});var wZ=($,Q)=>Q&&!$.includes("ipc")?[...$,"ipc"]:$;var jZ=({stdio:$,ipc:Q,buffer:J,...X},Y,G)=>{let q=Gk($,X).map((W,z)=>LZ(W,z));return G?Wk(q,J,Y):wZ(q,Q)},Gk=($,Q)=>{if($===void 0)return c8.map((X)=>Q[X]);if(qk(Q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${c8.map((X)=>`\`${X}\``).join(", ")}`);if(typeof $==="string")return[$,$,$];if(!Array.isArray($))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof $}\``);let J=Math.max($.length,c8.length);return Array.from({length:J},(X,Y)=>$[Y])},qk=($)=>c8.some((Q)=>$[Q]!==void 0),LZ=($,Q)=>{if(Array.isArray($))return $.map((J)=>LZ(J,Q));if($===null||$===void 0)return Q>=c8.length?"ignore":"pipe";return $},Wk=($,Q,J)=>$.map((X,Y)=>!Q[Y]&&Y!==0&&!bJ(J,Y)&&zk(X)?"ignore":X),zk=($)=>$==="pipe"||Array.isArray($)&&$.every((Q)=>Q==="pipe");var RZ=R(()=>{v$();r$()});import{readFileSync as Vk}from"node:fs";import Kk from"node:tty";var _Z=({stdioItem:$,stdioItem:{type:Q},isStdioArray:J,fdNumber:X,direction:Y,isSync:G})=>{if(!J||Q!=="native")return $;return G?Uk({stdioItem:$,fdNumber:X,direction:Y}):Hk({stdioItem:$,fdNumber:X})},Uk=({stdioItem:$,stdioItem:{value:Q,optionName:J},fdNumber:X,direction:Y})=>{let G=xk({value:Q,optionName:J,fdNumber:X,direction:Y});if(G!==void 0)return G;if(t8(Q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return $},xk=({value:$,optionName:Q,fdNumber:J,direction:X})=>{let Y=Mk($,J);if(Y===void 0)return;if(X==="output")return{type:"fileNumber",value:Y,optionName:Q};if(Kk.isatty(Y))throw TypeError(`The \`${Q}: ${D9($)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:N$(Vk(Y)),optionName:Q}},Mk=($,Q)=>{if($==="inherit")return Q;if(typeof $==="number")return $;let J=t7.indexOf($);if(J!==-1)return J},Hk=({stdioItem:$,stdioItem:{value:Q,optionName:J},fdNumber:X})=>{if(Q==="inherit")return{type:"nodeStream",value:DZ(X,Q,J),optionName:J};if(typeof Q==="number")return{type:"nodeStream",value:DZ(Q,Q,J),optionName:J};if(t8(Q,{checkOpen:!1}))return{type:"nodeStream",value:Q,optionName:J};return $},DZ=($,Q,J)=>{let X=t7[$];if(X===void 0)throw TypeError(`The \`${J}: ${Q}\` option is invalid: no such standard stream.`);return X};var NZ=R(()=>{v$();v8();e$()});var vZ=({input:$,inputFile:Q},J)=>J===0?[...Bk($),...wk(Q)]:[],Bk=($)=>$===void 0?[]:[{type:Zk($),value:$,optionName:"input"}],Zk=($)=>{if(pQ($,{checkOpen:!1}))return"nodeStream";if(typeof $==="string")return"string";if(g0($))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},wk=($)=>$===void 0?[]:[{...jk($),optionName:"inputFile"}],jk=($)=>{if(r9($))return{type:"fileUrl",value:$};if(UW($))return{type:"filePath",value:{file:$}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var OZ=R(()=>{v8();U8()});var FZ=($)=>$.filter((Q,J)=>$.every((X,Y)=>Q.value!==X.value||J>=Y||Q.type==="generator"||Q.type==="asyncGenerator")),CZ=({stdioItem:{type:$,value:Q,optionName:J},direction:X,fileDescriptors:Y,isSync:G})=>{let q=Lk(Y,$);if(q.length===0)return;if(G){Rk({otherStdioItems:q,type:$,value:Q,optionName:J,direction:X});return}if(VZ.has($))return IZ({otherStdioItems:q,type:$,value:Q,optionName:J,direction:X});if(KZ.has($))_k({otherStdioItems:q,type:$,value:Q,optionName:J})},Lk=($,Q)=>$.flatMap(({direction:J,stdioItems:X})=>X.filter((Y)=>Y.type===Q).map((Y)=>({...Y,direction:J}))),Rk=({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})=>{if(MW.has(Q))IZ({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})},IZ=({otherStdioItems:$,type:Q,value:J,optionName:X,direction:Y})=>{let G=$.filter((W)=>Dk(W,J));if(G.length===0)return;let q=G.find((W)=>W.direction!==Y);return PZ(q,X,Q),Y==="output"?G[0].stream:void 0},Dk=({type:$,value:Q},J)=>{if($==="filePath")return Q.file===J.file;if($==="fileUrl")return Q.href===J.href;return Q===J},_k=({otherStdioItems:$,type:Q,value:J,optionName:X})=>{let Y=$.find(({value:{transform:G}})=>G===J.transform);PZ(Y,X,Q)},PZ=($,Q,J)=>{if($!==void 0)throw TypeError(`The \`${$.optionName}\` and \`${Q}\` options must not target ${QQ[J]} that is the same.`)};var TZ=R(()=>{U8()});var $6=($,Q,J,X)=>{let G=jZ(Q,J,X).map((W,z)=>Nk({stdioOption:W,fdNumber:z,options:Q,isSync:X})),q=Ak({initialFileDescriptors:G,addProperties:$,options:Q,isSync:X});return Q.stdio=q.map(({stdioItems:W})=>ck(W)),q},Nk=({stdioOption:$,fdNumber:Q,options:J,isSync:X})=>{let Y=e7(Q),{stdioItems:G,isStdioArray:q}=vk({stdioOption:$,fdNumber:Q,options:J,optionName:Y}),W=HZ(G,Q,Y),z=G.map((U)=>_Z({stdioItem:U,isStdioArray:q,fdNumber:Q,direction:W,isSync:X})),V=xZ(z,Y,W,J),K=UZ(V,W);return Tk(V,K),{direction:W,objectMode:K,stdioItems:V}},vk=({stdioOption:$,fdNumber:Q,options:J,optionName:X})=>{let G=[...(Array.isArray($)?$:[$]).map((z)=>Ok(z,X)),...vZ(J,Q)],q=FZ(G),W=q.length>1;return Fk(q,W,X),Ik(q),{stdioItems:q,isStdioArray:W}},Ok=($,Q)=>({type:QZ($,Q),value:$,optionName:Q}),Fk=($,Q,J)=>{if($.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!Q)return;for(let{value:X,optionName:Y}of $)if(Ck.has(X))throw Error(`The \`${Y}\` option must not include \`${X}\`.`)},Ck,Ik=($)=>{for(let Q of $)Pk(Q)},Pk=({type:$,value:Q,optionName:J})=>{if(GZ(Q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
|
|
73
|
+
For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(qZ($,Q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},Tk=($,Q)=>{if(!Q)return;let J=$.find(({type:X})=>e9.has(X));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},Ak=({initialFileDescriptors:$,addProperties:Q,options:J,isSync:X})=>{let Y=[];try{for(let G of $)Y.push(Ek({fileDescriptor:G,fileDescriptors:Y,addProperties:Q,options:J,isSync:X}));return Y}catch(G){throw jW(Y),G}},Ek=({fileDescriptor:{direction:$,objectMode:Q,stdioItems:J},fileDescriptors:X,addProperties:Y,options:G,isSync:q})=>{let W=J.map((z)=>kk({stdioItem:z,addProperties:Y,direction:$,options:G,fileDescriptors:X,isSync:q}));return{direction:$,objectMode:Q,stdioItems:W}},kk=({stdioItem:$,addProperties:Q,direction:J,options:X,fileDescriptors:Y,isSync:G})=>{let q=CZ({stdioItem:$,direction:J,fileDescriptors:Y,isSync:G});if(q!==void 0)return{...$,stream:q};return{...$,...Q[J][$.type]($,X)}},jW=($)=>{for(let{stdioItems:Q}of $)for(let{stream:J}of Q)if(J!==void 0&&!s8(J))J.destroy()},ck=($)=>{if($.length>1)return $.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:Q,value:J}]=$;return Q==="native"?J:"pipe"};var Q6=R(()=>{v$();MZ();BW();U8();ZZ();RZ();NZ();OZ();TZ();Ck=new Set(["ignore","ipc"])});import{readFileSync as AZ}from"node:fs";var kZ=($,Q)=>$6(bk,$,Q,!0),M$=({type:$,optionName:Q})=>{cZ(Q,QQ[$])},Sk=({optionName:$,value:Q})=>{if(Q==="ipc"||Q==="overlapped")cZ($,`"${Q}"`);return{}},cZ=($,Q)=>{throw TypeError(`The \`${$}\` option cannot be ${Q} with synchronous methods.`)},EZ,bk;var SZ=R(()=>{v8();Q6();U8();EZ={generator(){},asyncGenerator:M$,webStream:M$,nodeStream:M$,webTransform:M$,duplex:M$,asyncIterable:M$,native:Sk},bk={input:{...EZ,fileUrl:({value:$})=>({contents:[N$(AZ($))]}),filePath:({value:{file:$}})=>({contents:[N$(AZ($))]}),fileNumber:M$,iterable:({value:$})=>({contents:[...$]}),string:({value:$})=>({contents:[$]}),uint8Array:({value:$})=>({contents:[$]})},output:{...EZ,fileUrl:({value:$})=>({path:$}),filePath:({value:{file:$,append:Q}})=>({path:$,append:Q}),fileNumber:({value:$})=>({path:$}),iterable:M$,string:M$,uint8Array:M$}}});var P$=($,{stripFinalNewline:Q},J)=>LW(Q,J)&&$!==void 0&&!Array.isArray($)?lJ($):$,LW=($,Q)=>Q==="all"?$[1]||$[2]:$[Q];var OY=R(()=>{JW()});var J6=($,Q,J,X)=>$||J?void 0:fZ(Q,X),DW=($,Q,J)=>J?$.flatMap((X)=>bZ(X,Q)):bZ($,Q),bZ=($,Q)=>{let{transform:J,final:X}=fZ(Q,{});return[...J($),...X()]},fZ=($,Q)=>{return Q.previousChunks="",{transform:fk.bind(void 0,Q,$),final:yk.bind(void 0,Q)}},fk=function*($,Q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:X}=$,Y=-1;for(let G=0;G<J.length;G+=1)if(J[G]===`
|
|
74
|
+
`){let q=mk(J,G,Q,$),W=J.slice(Y+1,G+1-q);if(X.length>0)W=RW(X,W),X="";yield W,Y=G}if(Y!==J.length-1)X=RW(X,J.slice(Y+1));$.previousChunks=X},mk=($,Q,J,X)=>{if(J)return 0;return X.isWindowsNewline=Q!==0&&$[Q-1]==="\r",X.isWindowsNewline?2:1},yk=function*({previousChunks:$}){if($.length>0)yield $},mZ=({binary:$,preserveNewlines:Q,readableObjectMode:J,state:X})=>$||Q||J?void 0:{transform:hk.bind(void 0,X)},hk=function*({isWindowsNewline:$=!1},Q){let{unixNewline:J,windowsNewline:X,LF:Y,concatBytes:G}=typeof Q==="string"?pk:gk;if(Q.at(-1)===Y){yield Q;return}yield G(Q,$?X:J)},RW=($,Q)=>`${$}${Q}`,pk,uk=($,Q)=>{let J=new Uint8Array($.length+Q.length);return J.set($,0),J.set(Q,$.length),J},gk;var X6=R(()=>{pk={windowsNewline:`\r
|
|
75
|
+
`,unixNewline:`
|
|
76
|
+
`,LF:`
|
|
77
|
+
`,concatBytes:RW},gk={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:uk}});import{Buffer as lk}from"node:buffer";var yZ=($,Q)=>$?void 0:ik.bind(void 0,Q),ik=function*($,Q){if(typeof Q!=="string"&&!g0(Q)&&!lk.isBuffer(Q))throw TypeError(`The \`${$}\` option's transform must use "objectMode: true" to receive as input: ${typeof Q}.`);yield Q},hZ=($,Q)=>$?nk.bind(void 0,Q):dk.bind(void 0,Q),nk=function*($,Q){pZ($,Q),yield Q},dk=function*($,Q){if(pZ($,Q),typeof Q!=="string"&&!g0(Q))throw TypeError(`The \`${$}\` option's function must yield a string or an Uint8Array, not ${typeof Q}.`);yield Q},pZ=($,Q)=>{if(Q===null||Q===void 0)throw TypeError(`The \`${$}\` option's function must not call \`yield ${Q}\`.
|
|
78
|
+
Instead, \`yield\` should either be called with a value, or not be called at all. For example:
|
|
79
|
+
if (condition) { yield value; }`)};var uZ=R(()=>{v8()});import{Buffer as ak}from"node:buffer";import{StringDecoder as ok}from"node:string_decoder";var Y6=($,Q,J)=>{if(J)return;if($)return{transform:sk.bind(void 0,new TextEncoder)};let X=new ok(Q);return{transform:rk.bind(void 0,X),final:tk.bind(void 0,X)}},sk=function*($,Q){if(ak.isBuffer(Q))yield N$(Q);else if(typeof Q==="string")yield $.encode(Q);else yield Q},rk=function*($,Q){yield g0(Q)?$.write(Q):Q},tk=function*($){let Q=$.end();if(Q!=="")yield Q};var _W=R(()=>{v8()});import{callbackify as gZ}from"node:util";var NW,G6=async function*($,Q,J){if(J===Q.length){yield $;return}let{transform:X=$c}=Q[J];for await(let Y of X($))yield*G6(Y,Q,J+1)},lZ=async function*($){for(let[Q,{final:J}]of Object.entries($))yield*ek(J,Number(Q),$)},ek=async function*($,Q,J){if($===void 0)return;for await(let X of $())yield*G6(X,J,Q+1)},iZ,$c=function*($){yield $};var nZ=R(()=>{NW=gZ(async($,Q,J,X)=>{Q.currentIterable=$(...J);try{for await(let Y of Q.currentIterable)X.push(Y)}finally{delete Q.currentIterable}}),iZ=gZ(async({currentIterable:$},Q)=>{if($!==void 0){await(Q?$.throw(Q):$.return());return}if(Q)throw Q})});var vW=($,Q,J,X)=>{try{for(let Y of $(...Q))J.push(Y);X()}catch(Y){X(Y)}},dZ=($,Q)=>[...Q.flatMap((J)=>[...lQ(J,$,0)]),...FY($)],lQ=function*($,Q,J){if(J===Q.length){yield $;return}let{transform:X=Jc}=Q[J];for(let Y of X($))yield*lQ(Y,Q,J+1)},FY=function*($){for(let[Q,{final:J}]of Object.entries($))yield*Qc(J,Number(Q),$)},Qc=function*($,Q,J){if($===void 0)return;for(let X of $())yield*lQ(X,J,Q+1)},Jc=function*($){yield $};import{Transform as Xc,getDefaultHighWaterMark as aZ}from"node:stream";var OW=({value:$,value:{transform:Q,final:J,writableObjectMode:X,readableObjectMode:Y},optionName:G},{encoding:q})=>{let W={},z=oZ($,q,G),V=gQ(Q),K=gQ(J),U=V?NW.bind(void 0,G6,W):vW.bind(void 0,lQ),x=V||K?NW.bind(void 0,lZ,W):vW.bind(void 0,FY),M=V||K?iZ.bind(void 0,W):void 0;return{stream:new Xc({writableObjectMode:X,writableHighWaterMark:aZ(X),readableObjectMode:Y,readableHighWaterMark:aZ(Y),transform(w,j,Z){U([w,z,0],this,Z)},flush(w){x([z],this,w)},destroy:M})}},q6=($,Q,J,X)=>{let Y=Q.filter(({type:q})=>q==="generator"),G=X?Y.reverse():Y;for(let{value:q,optionName:W}of G){let z=oZ(q,J,W);$=dZ(z,$)}return $},oZ=({transform:$,final:Q,binary:J,writableObjectMode:X,readableObjectMode:Y,preserveNewlines:G},q,W)=>{let z={};return[{transform:yZ(X,W)},Y6(J,q,X),J6(J,G,X,z),{transform:$,final:Q},{transform:hZ(Y,W)},mZ({binary:J,preserveNewlines:G,readableObjectMode:Y,state:z})].filter(Boolean)};var W6=R(()=>{U8();X6();uZ();_W();nZ()});var sZ=($,Q)=>{for(let J of Yc($))Gc($,J,Q)},Yc=($)=>new Set(Object.entries($).filter(([,{direction:Q}])=>Q==="input").map(([Q])=>Number(Q))),Gc=($,Q,J)=>{let{stdioItems:X}=$[Q],Y=X.filter(({contents:W})=>W!==void 0);if(Y.length===0)return;if(Q!==0){let[{type:W,optionName:z}]=Y;throw TypeError(`Only the \`stdin\` option, not \`${z}\`, can be ${QQ[W]} with synchronous methods.`)}let q=Y.map(({contents:W})=>W).map((W)=>qc(W,X));J.input=MY(q)},qc=($,Q)=>{let J=q6($,Q,"utf8",!0);return Wc(J),MY(J)},Wc=($)=>{let Q=$.find((J)=>typeof J!=="string"&&!g0(J));if(Q!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${Q}.`)};var rZ=R(()=>{W6();v8();U8()});var z6=({stdioItems:$,encoding:Q,verboseInfo:J,fdNumber:X})=>X!=="all"&&bJ(J,X)&&!O8.has(Q)&&zc(X)&&($.some(({type:Y,value:G})=>Y==="native"&&Vc.has(G))||$.every(({type:Y})=>S8.has(Y))),zc=($)=>$===1||$===2,Vc,tZ=async($,Q,J,X)=>{for await(let Y of $)if(!Kc(Q))$3(Y,J,X)},eZ=($,Q,J)=>{for(let X of $)$3(X,Q,J)},Kc=($)=>$._readableState.pipes.length>0,$3=($,Q,J)=>{let X=q9($);V$({type:"output",verboseMessage:X,fdNumber:Q,verboseInfo:J})};var FW=R(()=>{hQ();U8();fJ();r$();Vc=new Set(["pipe","overlapped"])});import{writeFileSync as Uc,appendFileSync as xc}from"node:fs";var Q3=({fileDescriptors:$,syncResult:{output:Q},options:J,isMaxBuffer:X,verboseInfo:Y})=>{if(Q===null)return{output:Array.from({length:3})};let G={},q=new Set([]);return{output:Q.map((z,V)=>Mc({result:z,fileDescriptors:$,fdNumber:V,state:G,outputFiles:q,isMaxBuffer:X,verboseInfo:Y},J)),...G}},Mc=({result:$,fileDescriptors:Q,fdNumber:J,state:X,outputFiles:Y,isMaxBuffer:G,verboseInfo:q},{buffer:W,encoding:z,lines:V,stripFinalNewline:K,maxBuffer:U})=>{if($===null)return;let x=uB($,G,U),M=N$(x),{stdioItems:H,objectMode:w}=Q[J],j=Hc([M],H,z,X),{serializedResult:Z,finalResult:L=Z}=Bc({chunks:j,objectMode:w,encoding:z,lines:V,stripFinalNewline:K,fdNumber:J});Zc({serializedResult:Z,fdNumber:J,state:X,verboseInfo:q,encoding:z,stdioItems:H,objectMode:w});let D=W[J]?L:void 0;try{if(X.error===void 0)wc(Z,H,Y);return D}catch(F){return X.error=F,D}},Hc=($,Q,J,X)=>{try{return q6($,Q,J,!1)}catch(Y){return X.error=Y,$}},Bc=({chunks:$,objectMode:Q,encoding:J,lines:X,stripFinalNewline:Y,fdNumber:G})=>{if(Q)return{serializedResult:$};if(J==="buffer")return{serializedResult:MY($)};let q=cx($,J);if(X[G])return{serializedResult:q,finalResult:DW(q,!Y[G],Q)};return{serializedResult:q}},Zc=({serializedResult:$,fdNumber:Q,state:J,verboseInfo:X,encoding:Y,stdioItems:G,objectMode:q})=>{if(!z6({stdioItems:G,encoding:Y,verboseInfo:X,fdNumber:Q}))return;let W=DW($,!1,q);try{eZ(W,Q,X)}catch(z){J.error??=z}},wc=($,Q,J)=>{for(let{path:X,append:Y}of Q.filter(({type:G})=>e9.has(G))){let G=typeof X==="string"?X:X.toString();if(Y||J.has(G))xc(X,$);else J.add(G),Uc(X,$)}};var J3=R(()=>{FW();W6();X6();v8();U8();uQ()});var X3=([,$,Q],J)=>{if(!J.all)return;if($===void 0)return Q;if(Q===void 0)return $;if(Array.isArray($))return Array.isArray(Q)?[...$,...Q]:[...$,P$(Q,J,"all")];if(Array.isArray(Q))return[P$($,J,"all"),...Q];if(g0($)&&g0(Q))return jq([$,Q]);return`${$}${Q}`};var Y3=R(()=>{v8();OY()});import{once as CW}from"node:events";var G3=async($,Q)=>{let[J,X]=await jc($);return Q.isForcefullyTerminated??=!1,[J,X]},jc=async($)=>{let[Q,J]=await Promise.allSettled([CW($,"spawn"),CW($,"exit")]);if(Q.status==="rejected")return[];return J.status==="rejected"?q3($):J.value},q3=async($)=>{try{return await CW($,"exit")}catch{return q3($)}},W3=async($)=>{let[Q,J]=await $;if(!Lc(Q,J)&&IW(Q,J))throw new K$;return[Q,J]},Lc=($,Q)=>$===void 0&&Q===void 0,IW=($,Q)=>$!==0||Q!==null;var PW=R(()=>{mQ()});var z3=({error:$,status:Q,signal:J,output:X},{maxBuffer:Y})=>{let G=Rc($,Q,J),q=G?.code==="ETIMEDOUT",W=pB(G,X,Y);return{resultError:G,exitCode:Q,signal:J,timedOut:q,isMaxBuffer:W}},Rc=($,Q,J)=>{if($!==void 0)return $;return IW(Q,J)?new K$:void 0};var V3=R(()=>{mQ();uQ();PW()});import{spawnSync as Dc}from"node:child_process";var K3=($,Q,J)=>{let{file:X,commandArguments:Y,command:G,escapedCommand:q,startTime:W,verboseInfo:z,options:V,fileDescriptors:K}=_c($,Q,J),U=Oc({file:X,commandArguments:Y,options:V,command:G,escapedCommand:q,verboseInfo:z,fileDescriptors:K,startTime:W});return dJ(U,z,V)},_c=($,Q,J)=>{let{command:X,escapedCommand:Y,startTime:G,verboseInfo:q}=V9($,Q,J),W=Nc(J),{file:z,commandArguments:V,options:K}=m9($,Q,W);vc(K);let U=kZ(K,q);return{file:z,commandArguments:V,command:X,escapedCommand:Y,startTime:G,verboseInfo:q,options:K,fileDescriptors:U}},Nc=($)=>$.node&&!$.ipc?{...$,ipc:!1}:$,vc=({ipc:$,ipcInput:Q,detached:J,cancelSignal:X})=>{if(Q)V6("ipcInput");if($)V6("ipc: true");if(J)V6("detached: true");if(X)V6("cancelSignal")},V6=($)=>{throw TypeError(`The "${$}" option cannot be used with synchronous methods.`)},Oc=({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,verboseInfo:G,fileDescriptors:q,startTime:W})=>{let z=Fc({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,fileDescriptors:q,startTime:W});if(z.failed)return z;let{resultError:V,exitCode:K,signal:U,timedOut:x,isMaxBuffer:M}=z3(z,J),{output:H,error:w=V}=Q3({fileDescriptors:q,syncResult:z,options:J,isMaxBuffer:M,verboseInfo:G}),j=H.map((L,D)=>P$(L,J,D)),Z=P$(X3(H,J),J,"all");return Ic({error:w,exitCode:K,signal:U,timedOut:x,isMaxBuffer:M,stdio:j,all:Z,options:J,command:X,escapedCommand:Y,startTime:W})},Fc=({file:$,commandArguments:Q,options:J,command:X,escapedCommand:Y,fileDescriptors:G,startTime:q})=>{try{sZ(G,J);let W=Cc(J);return Dc(...y9($,Q,W))}catch(W){return nJ({error:W,command:X,escapedCommand:Y,fileDescriptors:G,options:J,startTime:q,isSync:!0})}},Cc=({encoding:$,maxBuffer:Q,...J})=>({...J,encoding:"buffer",maxBuffer:a9(Q)}),Ic=({error:$,exitCode:Q,signal:J,timedOut:X,isMaxBuffer:Y,stdio:G,all:q,options:W,command:z,escapedCommand:V,startTime:K})=>$===void 0?o9({command:z,escapedCommand:V,stdio:G,all:q,ipcOutput:[],options:W,startTime:K}):NY({error:$,command:z,escapedCommand:V,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Y,isForcefullyTerminated:!1,exitCode:Q,signal:J,stdio:G,all:q,ipcOutput:[],options:W,startTime:K,isSync:!0});var U3=R(()=>{Fq();QW();vY();s9();SZ();OY();rZ();J3();uQ();Y3();V3()});import{once as TW,on as Pc}from"node:events";var x3=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},{reference:Y=!0,filter:G}={})=>{return hJ({methodName:"getOneMessage",isSubprocess:J,ipc:X,isConnected:A9($)}),Tc({anyProcess:$,channel:Q,isSubprocess:J,filter:G,reference:Y})},Tc=async({anyProcess:$,channel:Q,isSubprocess:J,filter:X,reference:Y})=>{v9(Q,Y);let G=$Q($,Q,J),q=new AbortController;try{return await Promise.race([Ac(G,X,q),Ec(G,J,q),kc(G,J,q)])}catch(W){throw pJ($),W}finally{q.abort(),O9(Q,Y)}},Ac=async($,Q,{signal:J})=>{if(Q===void 0){let[X]=await TW($,"message",{signal:J});return X}for await(let[X]of Pc($,"message",{signal:J}))if(Q(X))return X},Ec=async($,Q,{signal:J})=>{await TW($,"disconnect",{signal:J}),OH(Q)},kc=async($,Q,{signal:J})=>{let[X]=await TW($,"strict:error",{signal:J});throw R9(X,Q)};var M3=R(()=>{uJ();jY()});import{once as B3,on as cc}from"node:events";var Z3=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X},{reference:Y=!0}={})=>AW({anyProcess:$,channel:Q,isSubprocess:J,ipc:X,shouldAwait:!J,reference:Y}),AW=({anyProcess:$,channel:Q,isSubprocess:J,ipc:X,shouldAwait:Y,reference:G})=>{hJ({methodName:"getEachMessage",isSubprocess:J,ipc:X,isConnected:A9($)}),v9(Q,G);let q=$Q($,Q,J),W=new AbortController,z={};return Sc($,q,W),bc({ipcEmitter:q,isSubprocess:J,controller:W,state:z}),fc({anyProcess:$,channel:Q,ipcEmitter:q,isSubprocess:J,shouldAwait:Y,controller:W,state:z,reference:G})},Sc=async($,Q,J)=>{try{await B3(Q,"disconnect",{signal:J.signal}),J.abort()}catch{}},bc=async({ipcEmitter:$,isSubprocess:Q,controller:J,state:X})=>{try{let[Y]=await B3($,"strict:error",{signal:J.signal});X.error=R9(Y,Q),J.abort()}catch{}},fc=async function*({anyProcess:$,channel:Q,ipcEmitter:J,isSubprocess:X,shouldAwait:Y,controller:G,state:q,reference:W}){try{for await(let[z]of cc(J,"message",{signal:G.signal}))H3(q),yield z}catch{H3(q)}finally{if(G.abort(),O9(Q,W),!X)pJ($);if(Y)await $}},H3=({error:$})=>{if($)throw $};var EW=R(()=>{uJ();jY()});import w3 from"node:process";var j3=($,{ipc:Q})=>{Object.assign($,R3($,!1,Q))},L3=()=>{let $=w3,Q=!0,J=w3.channel!==void 0;return{...R3($,!0,J),getCancelSignal:eH.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:!0,ipc:J})}},R3=($,Q,J)=>({sendMessage:S9.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J}),getOneMessage:x3.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J}),getEachMessage:Z3.bind(void 0,{anyProcess:$,channel:$.channel,isSubprocess:Q,ipc:J})});var kW=R(()=>{b9();M3();EW();P9()});import{ChildProcess as mc}from"node:child_process";import{PassThrough as yc,Readable as hc,Writable as pc,Duplex as uc}from"node:stream";var D3=({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,verboseInfo:q})=>{jW(X);let W=new mc;gc(W,X),Object.assign(W,{readable:lc,writable:ic,duplex:nc});let z=nJ({error:$,command:Q,escapedCommand:J,fileDescriptors:X,options:Y,startTime:G,isSync:!1}),V=dc(z,q,Y);return{subprocess:W,promise:V}},gc=($,Q)=>{let J=CY(),X=CY(),Y=CY(),G=Array.from({length:Q.length-3},CY),q=CY(),W=[J,X,Y,...G];Object.assign($,{stdin:J,stdout:X,stderr:Y,all:q,stdio:W})},CY=()=>{let $=new yc;return $.end(),$},lc=()=>new hc({read(){}}),ic=()=>new pc({write(){}}),nc=()=>new uc({read(){},write(){}}),dc=async($,Q,J)=>dJ($,Q,J);var _3=R(()=>{Q6();vY();s9()});import{createReadStream as N3,createWriteStream as v3}from"node:fs";import{Buffer as ac}from"node:buffer";import{Readable as IY,Writable as oc,Duplex as sc}from"node:stream";var F3=($,Q)=>$6(rc,$,Q,!1),PY=({type:$,optionName:Q})=>{throw TypeError(`The \`${Q}\` option cannot be ${QQ[$]}.`)},O3,rc;var C3=R(()=>{W6();Q6();U8();O3={fileNumber:PY,generator:OW,asyncGenerator:OW,nodeStream:({value:$})=>({stream:$}),webTransform({value:{transform:$,writableObjectMode:Q,readableObjectMode:J}}){let X=Q||J;return{stream:sc.fromWeb($,{objectMode:X})}},duplex:({value:{transform:$}})=>({stream:$}),native(){}},rc={input:{...O3,fileUrl:({value:$})=>({stream:N3($)}),filePath:({value:{file:$}})=>({stream:N3($)}),webStream:({value:$})=>({stream:IY.fromWeb($)}),iterable:({value:$})=>({stream:IY.from($)}),asyncIterable:({value:$})=>({stream:IY.from($)}),string:({value:$})=>({stream:IY.from($)}),uint8Array:({value:$})=>({stream:IY.from(ac.from($))})},output:{...O3,fileUrl:({value:$})=>({stream:v3($)}),filePath:({value:{file:$,append:Q}})=>({stream:v3($,Q?{flags:"a"}:{})}),webStream:({value:$})=>({stream:oc.fromWeb($)}),iterable:PY,asyncIterable:PY,string:PY,uint8Array:PY}}});import{on as tc,once as I3}from"node:events";import{PassThrough as ec,getDefaultHighWaterMark as $S}from"node:stream";import{finished as A3}from"node:stream/promises";function iQ($){if(!Array.isArray($))throw TypeError(`Expected an array, got \`${typeof $}\`.`);for(let Y of $)cW(Y);let Q=$.some(({readableObjectMode:Y})=>Y),J=QS($,Q),X=new E3({objectMode:Q,writableHighWaterMark:J,readableHighWaterMark:J});for(let Y of $)X.add(Y);return X}var QS=($,Q)=>{if($.length===0)return $S(Q);let J=$.filter(({readableObjectMode:X})=>X===Q).map(({readableHighWaterMark:X})=>X);return Math.max(...J)},E3,JS=async($,Q,J)=>{K6($,P3);let X=new AbortController;try{await Promise.race([XS($,X),YS($,Q,J,X)])}finally{X.abort(),K6($,-P3)}},XS=async($,{signal:Q})=>{try{await A3($,{signal:Q,cleanup:!0})}catch(J){throw k3($,J),J}},YS=async($,Q,J,{signal:X})=>{for await(let[Y]of tc($,"unpipe",{signal:X}))if(Q.has(Y))Y.emit(J)},cW=($)=>{if(typeof $?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof $}\`.`)},GS=async({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,onFinished:G,unpipeEvent:q})=>{K6($,T3);let W=new AbortController;try{await Promise.race([qS(G,Q,W),WS({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,controller:W}),zS({stream:Q,streams:J,ended:X,aborted:Y,unpipeEvent:q,controller:W})])}finally{W.abort(),K6($,-T3)}if(J.size>0&&J.size===X.size+Y.size)if(X.size===0&&Y.size>0)SW($);else VS($)},qS=async($,Q,{signal:J})=>{try{if(await $,!J.aborted)SW(Q)}catch(X){if(!J.aborted)k3(Q,X)}},WS=async({passThroughStream:$,stream:Q,streams:J,ended:X,aborted:Y,controller:{signal:G}})=>{try{if(await A3(Q,{signal:G,cleanup:!0,readable:!0,writable:!1}),J.has(Q))X.add(Q)}catch(q){if(G.aborted||!J.has(Q))return;if(c3(q))Y.add(Q);else S3($,q)}},zS=async({stream:$,streams:Q,ended:J,aborted:X,unpipeEvent:Y,controller:{signal:G}})=>{if(await I3($,Y,{signal:G}),!$.readable)return I3(G,"abort",{signal:G});Q.delete($),J.delete($),X.delete($)},VS=($)=>{if($.writable)$.end()},k3=($,Q)=>{if(c3(Q))SW($);else S3($,Q)},c3=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",SW=($)=>{if($.readable||$.writable)$.destroy()},S3=($,Q)=>{if(!$.destroyed)$.once("error",KS),$.destroy(Q)},KS=()=>{},K6=($,Q)=>{let J=$.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)$.setMaxListeners(J+Q)},P3=2,T3=1;var U6=R(()=>{E3=class E3 extends ec{#Q=new Set([]);#J=new Set([]);#$=new Set([]);#X;#G=Symbol("unpipe");#Y=new WeakMap;add($){if(cW($),this.#Q.has($))return;this.#Q.add($),this.#X??=JS(this,this.#Q,this.#G);let Q=GS({passThroughStream:this,stream:$,streams:this.#Q,ended:this.#J,aborted:this.#$,onFinished:this.#X,unpipeEvent:this.#G});this.#Y.set($,Q),$.pipe(this,{end:!1})}async remove($){if(cW($),!this.#Q.has($))return!1;let Q=this.#Y.get($);if(Q===void 0)return!1;return this.#Y.delete($),$.unpipe(this),await Q,!0}}});import{finished as b3}from"node:stream/promises";var oJ=($,Q)=>{$.pipe(Q),US($,Q),xS($,Q)},US=async($,Q)=>{if(s8($)||s8(Q))return;try{await b3($,{cleanup:!0,readable:!0,writable:!1})}catch{}bW(Q)},bW=($)=>{if($.writable)$.end()},xS=async($,Q)=>{if(s8($)||s8(Q))return;try{await b3(Q,{cleanup:!0,readable:!1,writable:!0})}catch{}fW($)},fW=($)=>{if($.readable)$.destroy()};var x6=R(()=>{v$()});var f3=($,Q,J)=>{let X=new Map;for(let[Y,{stdioItems:G,direction:q}]of Object.entries(Q)){for(let{stream:W}of G.filter(({type:z})=>S8.has(z)))MS($,W,q,Y);for(let{stream:W}of G.filter(({type:z})=>!S8.has(z)))BS({subprocess:$,stream:W,direction:q,fdNumber:Y,pipeGroups:X,controller:J})}for(let[Y,G]of X.entries()){let q=G.length===1?G[0]:iQ(G);oJ(q,Y)}},MS=($,Q,J,X)=>{if(J==="output")oJ($.stdio[X],Q);else oJ(Q,$.stdio[X]);let Y=HS[X];if(Y!==void 0)$[Y]=Q;$.stdio[X]=Q},HS,BS=({subprocess:$,stream:Q,direction:J,fdNumber:X,pipeGroups:Y,controller:G})=>{if(Q===void 0)return;ZS(Q,G);let[q,W]=J==="output"?[Q,$.stdio[X]]:[$.stdio[X],Q],z=Y.get(q)??[];Y.set(q,[...z,W])},ZS=($,{signal:Q})=>{if(s8($))yQ($,wS,Q)},wS=2;var m3=R(()=>{U6();v$();N9();U8();x6();HS=["stdin","stdout","stderr"]});var nQ;var y3=R(()=>{nQ=[];nQ.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")nQ.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")nQ.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class h3{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(yW[mW])return yW[mW];jS(yW,mW,{value:this,writable:!1,enumerable:!1,configurable:!1})}on($,Q){this.listeners[$].push(Q)}removeListener($,Q){let J=this.listeners[$],X=J.indexOf(Q);if(X===-1)return;if(X===0&&J.length===1)J.length=0;else J.splice(X,1)}emit($,Q,J){if(this.emitted[$])return!1;this.emitted[$]=!0;let X=!1;for(let Y of this.listeners[$])X=Y(Q,J)===!0||X;if($==="exit")X=this.emit("afterExit",Q,J)||X;return X}}class pW{}var M6=($)=>!!$&&typeof $==="object"&&typeof $.removeListener==="function"&&typeof $.emit==="function"&&typeof $.reallyExit==="function"&&typeof $.listeners==="function"&&typeof $.kill==="function"&&typeof $.pid==="number"&&typeof $.on==="function",mW,yW,jS,LS=($)=>{return{onExit(Q,J){return $.onExit(Q,J)},load(){return $.load()},unload(){return $.unload()}}},p3,u3,hW,g3,S70,b70;var l3=R(()=>{y3();mW=Symbol.for("signal-exit emitter"),yW=globalThis,jS=Object.defineProperty.bind(Object);p3=class p3 extends pW{onExit(){return()=>{}}load(){}unload(){}};u3=class u3 extends pW{#Q=hW.platform==="win32"?"SIGINT":"SIGHUP";#J=new h3;#$;#X;#G;#Y={};#q=!1;constructor($){super();this.#$=$,this.#Y={};for(let Q of nQ)this.#Y[Q]=()=>{let J=this.#$.listeners(Q),{count:X}=this.#J,Y=$;if(typeof Y.__signal_exit_emitter__==="object"&&typeof Y.__signal_exit_emitter__.count==="number")X+=Y.__signal_exit_emitter__.count;if(J.length===X){this.unload();let G=this.#J.emit("exit",null,Q),q=Q==="SIGHUP"?this.#Q:Q;if(!G)$.kill($.pid,q)}};this.#G=$.reallyExit,this.#X=$.emit}onExit($,Q){if(!M6(this.#$))return()=>{};if(this.#q===!1)this.load();let J=Q?.alwaysLast?"afterExit":"exit";return this.#J.on(J,$),()=>{if(this.#J.removeListener(J,$),this.#J.listeners.exit.length===0&&this.#J.listeners.afterExit.length===0)this.unload()}}load(){if(this.#q)return;this.#q=!0,this.#J.count+=1;for(let $ of nQ)try{let Q=this.#Y[$];if(Q)this.#$.on($,Q)}catch(Q){}this.#$.emit=($,...Q)=>{return this.#z($,...Q)},this.#$.reallyExit=($)=>{return this.#W($)}}unload(){if(!this.#q)return;this.#q=!1,nQ.forEach(($)=>{let Q=this.#Y[$];if(!Q)throw Error("Listener not defined for signal: "+$);try{this.#$.removeListener($,Q)}catch(J){}}),this.#$.emit=this.#X,this.#$.reallyExit=this.#G,this.#J.count-=1}#W($){if(!M6(this.#$))return 0;return this.#$.exitCode=$||0,this.#J.emit("exit",this.#$.exitCode,null),this.#G.call(this.#$,this.#$.exitCode)}#z($,...Q){let J=this.#X;if($==="exit"&&M6(this.#$)){if(typeof Q[0]==="number")this.#$.exitCode=Q[0];let X=J.call(this.#$,$,...Q);return this.#J.emit("exit",this.#$.exitCode,null),X}else return J.call(this.#$,$,...Q)}};hW=globalThis.process,{onExit:g3,load:S70,unload:b70}=LS(M6(hW)?new u3(hW):new p3)});import{addAbortListener as RS}from"node:events";var i3=($,{cleanup:Q,detached:J},{signal:X})=>{if(!Q||J)return;let Y=g3(()=>{$.kill()});RS(X,()=>{Y()})};var n3=R(()=>{l3()});var a3=({source:$,sourcePromise:Q,boundOptions:J,createNested:X},...Y)=>{let G=W9(),{destination:q,destinationStream:W,destinationError:z,from:V,unpipeSignal:K}=DS(J,X,Y),{sourceStream:U,sourceError:x}=NS($,V),{options:M,fileDescriptors:H}=x$.get($);return{sourcePromise:Q,sourceStream:U,sourceOptions:M,sourceError:x,destination:q,destinationStream:W,destinationError:z,unpipeSignal:K,fileDescriptors:H,startTime:G}},DS=($,Q,J)=>{try{let{destination:X,pipeOptions:{from:Y,to:G,unpipeSignal:q}={}}=_S($,Q,...J),W=_9(X,G);return{destination:X,destinationStream:W,from:Y,unpipeSignal:q}}catch(X){return{destinationError:X}}},_S=($,Q,J,...X)=>{if(Array.isArray(J))return{destination:Q(d3,$)(J,...X),pipeOptions:$};if(typeof J==="string"||J instanceof URL||Bq(J)){if(Object.keys($).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Y,G,q]=s7(J,...X);return{destination:Q(d3)(Y,G,q),pipeOptions:q}}if(x$.has(J)){if(Object.keys($).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},d3=({options:$})=>({options:{...$,stdin:"pipe",piped:!0}}),NS=($,Q)=>{try{return{sourceStream:gJ($,Q)}}catch(J){return{sourceError:J}}};var o3=R(()=>{wq();z9();e$();cJ()});var r3=({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X,fileDescriptors:Y,sourceOptions:G,startTime:q})=>{let W=vS({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X});if(W!==void 0)throw uW({error:W,fileDescriptors:Y,sourceOptions:G,startTime:q})},vS=({sourceStream:$,sourceError:Q,destinationStream:J,destinationError:X})=>{if(Q!==void 0&&X!==void 0)return X;if(X!==void 0)return fW($),X;if(Q!==void 0)return bW(J),Q},uW=({error:$,fileDescriptors:Q,sourceOptions:J,startTime:X})=>nJ({error:$,command:s3,escapedCommand:s3,fileDescriptors:Q,options:J,startTime:X,isSync:!1}),s3="source.pipe(destination)";var gW=R(()=>{vY();x6()});var t3=async($)=>{let[{status:Q,reason:J,value:X=J},{status:Y,reason:G,value:q=G}]=await $;if(!q.pipedFrom.includes(X))q.pipedFrom.push(X);if(Y==="rejected")throw q;if(Q==="rejected")throw X;return q};import{finished as OS}from"node:stream/promises";var e3=($,Q,J)=>{let X=H6.has(Q)?CS($,Q):FS($,Q);return yQ($,PS,J.signal),yQ(Q,TS,J.signal),IS(Q),X},FS=($,Q)=>{let J=iQ([$]);return oJ(J,Q),H6.set(Q,J),J},CS=($,Q)=>{let J=H6.get(Q);return J.add($),J},IS=async($)=>{try{await OS($,{cleanup:!0,readable:!1,writable:!0})}catch{}H6.delete($)},H6,PS=2,TS=1;var $w=R(()=>{U6();N9();x6();H6=new WeakMap});import{aborted as AS}from"node:util";var Qw=($,Q)=>$===void 0?[]:[ES($,Q)],ES=async($,{sourceStream:Q,mergedStream:J,fileDescriptors:X,sourceOptions:Y,startTime:G})=>{await AS($,Q),await J.remove(Q);let q=Error("Pipe canceled by `unpipeSignal` option.");throw uW({error:q,fileDescriptors:X,sourceOptions:Y,startTime:G})};var Jw=R(()=>{gW()});var B6=($,...Q)=>{if(y0(Q[0]))return B6.bind(void 0,{...$,boundOptions:{...$.boundOptions,...Q[0]}});let{destination:J,...X}=a3($,...Q),Y=kS({...X,destination:J});return Y.pipe=B6.bind(void 0,{...$,source:J,sourcePromise:Y,boundOptions:{}}),Y},kS=async({sourcePromise:$,sourceStream:Q,sourceOptions:J,sourceError:X,destination:Y,destinationStream:G,destinationError:q,unpipeSignal:W,fileDescriptors:z,startTime:V})=>{let K=cS($,Y);r3({sourceStream:Q,sourceError:X,destinationStream:G,destinationError:q,fileDescriptors:z,sourceOptions:J,startTime:V});let U=new AbortController;try{let x=e3(Q,G,U);return await Promise.race([t3(K),...Qw(W,{sourceStream:Q,mergedStream:x,sourceOptions:J,fileDescriptors:z,startTime:V})])}finally{U.abort()}},cS=($,Q)=>Promise.allSettled([$,Q]);var Xw=R(()=>{o3();gW();$w();Jw()});import{on as SS}from"node:events";import{getDefaultHighWaterMark as bS}from"node:stream";var Z6=({subprocessStdout:$,subprocess:Q,binary:J,shouldEncode:X,encoding:Y,preserveNewlines:G})=>{let q=new AbortController;return fS(Q,q),Gw({stream:$,controller:q,binary:J,shouldEncode:!$.readableObjectMode&&X,encoding:Y,shouldSplit:!$.readableObjectMode,preserveNewlines:G})},fS=async($,Q)=>{try{await $}catch{}finally{Q.abort()}},lW=({stream:$,onStreamEnd:Q,lines:J,encoding:X,stripFinalNewline:Y,allMixed:G})=>{let q=new AbortController;mS(Q,q,$);let W=$.readableObjectMode&&!G;return Gw({stream:$,controller:q,binary:X==="buffer",shouldEncode:!W,encoding:X,shouldSplit:!W&&J,preserveNewlines:!Y})},mS=async($,Q,J)=>{try{await $}catch{J.destroy()}finally{Q.abort()}},Gw=({stream:$,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:q})=>{let W=SS($,"data",{signal:Q.signal,highWaterMark:Yw,highWatermark:Yw});return yS({onStdoutChunk:W,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:q})},iW,Yw,yS=async function*({onStdoutChunk:$,controller:Q,binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:q}){let W=hS({binary:J,shouldEncode:X,encoding:Y,shouldSplit:G,preserveNewlines:q});try{for await(let[z]of $)yield*lQ(z,W,0)}catch(z){if(!Q.signal.aborted)throw z}finally{yield*FY(W)}},hS=({binary:$,shouldEncode:Q,encoding:J,shouldSplit:X,preserveNewlines:Y})=>[Y6($,J,!Q),J6($,Y,!X,{})].filter(Boolean);var w6=R(()=>{_W();X6();iW=bS(!0),Yw=iW});import{setImmediate as pS}from"node:timers/promises";var qw=async({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,buffer:Y,maxBuffer:G,lines:q,allMixed:W,stripFinalNewline:z,verboseInfo:V,streamInfo:K})=>{let U=uS({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,allMixed:W,verboseInfo:V,streamInfo:K});if(!Y){await Promise.all([gS($),U]);return}let x=LW(z,J),M=lW({stream:$,onStreamEnd:Q,lines:q,encoding:X,stripFinalNewline:x,allMixed:W}),[H]=await Promise.all([lS({stream:$,iterable:M,fdNumber:J,encoding:X,maxBuffer:G,lines:q}),U]);return H},uS=async({stream:$,onStreamEnd:Q,fdNumber:J,encoding:X,allMixed:Y,verboseInfo:G,streamInfo:{fileDescriptors:q}})=>{if(!z6({stdioItems:q[J]?.stdioItems,encoding:X,verboseInfo:G,fdNumber:J}))return;let W=lW({stream:$,onStreamEnd:Q,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:Y});await tZ(W,$,J,G)},gS=async($)=>{if(await pS(),$.readableFlowing===null)$.resume()},lS=async({stream:$,stream:{readableObjectMode:Q},iterable:J,fdNumber:X,encoding:Y,maxBuffer:G,lines:q})=>{try{if(Q||q)return await g9(J,{maxBuffer:G});if(Y==="buffer")return new Uint8Array(await l9(J,{maxBuffer:G}));return await n9(J,{maxBuffer:G})}catch(W){return Ww(mB({error:W,stream:$,readableObjectMode:Q,lines:q,encoding:Y,fdNumber:X}))}},nW=async($)=>{try{return await $}catch(Q){return Ww(Q)}},Ww=({bufferedData:$})=>Ex($)?new Uint8Array($):$;var dW=R(()=>{d9();v8();FW();w6();uQ();OY()});import{finished as iS}from"node:stream/promises";var TY=async($,Q,J,{isSameDirection:X,stopOnExit:Y=!1}={})=>{let G=nS($,J),q=new AbortController;try{await Promise.race([...Y?[J.exitPromise]:[],iS($,{cleanup:!0,signal:q.signal})])}catch(W){if(!G.stdinCleanedUp)oS(W,Q,J,X)}finally{q.abort()}},nS=($,{originalStreams:[Q],subprocess:J})=>{let X={stdinCleanedUp:!1};if($===Q)dS($,J,X);return X},dS=($,Q,J)=>{let{_destroy:X}=$;$._destroy=(...Y)=>{aS(Q,J),X.call($,...Y)}},aS=({exitCode:$,signalCode:Q},J)=>{if($!==null||Q!==null)J.stdinCleanedUp=!0},oS=($,Q,J,X)=>{if(!sS($,Q,J,X))throw $},sS=($,Q,J,X=!0)=>{if(J.propagating)return zw($)||j6($);return J.propagating=!0,aW(J,Q)===X?zw($):j6($)},aW=({fileDescriptors:$},Q)=>Q!=="all"&&$[Q].direction==="input",j6=($)=>$?.code==="ERR_STREAM_PREMATURE_CLOSE",zw=($)=>$?.code==="EPIPE";var L6=()=>{};var Vw=({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:G,verboseInfo:q,streamInfo:W})=>$.stdio.map((z,V)=>oW({stream:z,fdNumber:V,encoding:Q,buffer:J[V],maxBuffer:X[V],lines:Y[V],allMixed:!1,stripFinalNewline:G,verboseInfo:q,streamInfo:W})),oW=async({stream:$,fdNumber:Q,encoding:J,buffer:X,maxBuffer:Y,lines:G,allMixed:q,stripFinalNewline:W,verboseInfo:z,streamInfo:V})=>{if(!$)return;let K=TY($,Q,V);if(aW(V,Q)){await K;return}let[U]=await Promise.all([qw({stream:$,onStreamEnd:K,fdNumber:Q,encoding:J,buffer:X,maxBuffer:Y,lines:G,allMixed:q,stripFinalNewline:W,verboseInfo:z,streamInfo:V}),K]);return U};var sW=R(()=>{dW();L6()});var Kw=({stdout:$,stderr:Q},{all:J})=>J&&($||Q)?iQ([$,Q].filter(Boolean)):void 0,Uw=({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:G,verboseInfo:q,streamInfo:W})=>oW({...rS($,J),fdNumber:"all",encoding:Q,maxBuffer:X[1]+X[2],lines:Y[1]||Y[2],allMixed:tS($),stripFinalNewline:G,verboseInfo:q,streamInfo:W}),rS=({stdout:$,stderr:Q,all:J},[,X,Y])=>{let G=X||Y;if(!G)return{stream:J,buffer:G};if(!X)return{stream:Q,buffer:G};if(!Y)return{stream:$,buffer:G};return{stream:J,buffer:G}},tS=({all:$,stdout:Q,stderr:J})=>$&&Q&&J&&Q.readableObjectMode!==J.readableObjectMode;var rW=R(()=>{U6();sW()});var xw=($)=>bJ($,"ipc"),Mw=($,Q)=>{let J=q9($);V$({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:Q})};var Hw=R(()=>{fJ();r$()});var Bw=async({subprocess:$,buffer:Q,maxBuffer:J,ipc:X,ipcOutput:Y,verboseInfo:G})=>{if(!X)return Y;let q=xw(G),W=O$(Q,"ipc"),z=O$(J,"ipc");for await(let V of AW({anyProcess:$,channel:$.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(W)yB($,Y,z),Y.push(V);if(q)Mw(V,G)}return Y},Zw=async($,Q)=>{return await Promise.allSettled([$]),Q};var ww=R(()=>{uQ();Hw();F$();EW()});import{once as eS}from"node:events";var jw=async({subprocess:$,options:{encoding:Q,buffer:J,maxBuffer:X,lines:Y,timeoutDuration:G,cancelSignal:q,gracefulCancel:W,forceKillAfterDelay:z,stripFinalNewline:V,ipc:K,ipcInput:U},context:x,verboseInfo:M,fileDescriptors:H,originalStreams:w,onInternalError:j,controller:Z})=>{let L=G3($,x),D={originalStreams:w,fileDescriptors:H,subprocess:$,exitPromise:L,propagating:!1},F=Vw({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:D}),J0=Uw({subprocess:$,encoding:Q,buffer:J,maxBuffer:X,lines:Y,stripFinalNewline:V,verboseInfo:M,streamInfo:D}),n=[],e=Bw({subprocess:$,buffer:J,maxBuffer:X,ipc:K,ipcOutput:n,verboseInfo:M}),y=$b(w,$,D),p=Qb(H,D);try{return await Promise.race([Promise.all([{},W3(L),Promise.all(F),J0,e,VB($,U),...y,...p]),j,Jb($,Z),...YB($,G,x,Z),...vH({subprocess:$,cancelSignal:q,gracefulCancel:W,context:x,controller:Z}),...JB({subprocess:$,cancelSignal:q,gracefulCancel:W,forceKillAfterDelay:z,context:x,controller:Z})])}catch(q0){return x.terminationReason??="other",Promise.all([{error:q0},L,Promise.all(F.map((t)=>nW(t))),nW(J0),Zw(e,n),Promise.allSettled(y),Promise.allSettled(p)])}},$b=($,Q,J)=>$.map((X,Y)=>X===Q.stdio[Y]?void 0:TY(X,Y,J)),Qb=($,Q)=>$.flatMap(({stdioItems:J},X)=>J.filter(({value:Y,stream:G=Y})=>t8(G,{checkOpen:!1})&&!s8(G)).map(({type:Y,value:G,stream:q=G})=>TY(q,X,Q,{isSameDirection:S8.has(Y),stopOnExit:Y==="native"}))),Jb=async($,{signal:Q})=>{let[J]=await eS($,"error",{signal:Q});throw J};var Lw=R(()=>{sq();pq();oq();v$();U8();dW();ww();tq();rW();sW();PW();L6()});var Rw=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),AY=($,Q,J)=>{let X=$[J];if(!X.has(Q))X.set(Q,[]);let Y=X.get(Q),G=U$();return Y.push(G),{resolve:G.resolve.bind(G),promises:Y}},sJ=async({resolve:$,promises:Q},J)=>{$();let[X]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...Q])]);return!X};var R6=()=>{};import{finished as Dw}from"node:stream/promises";var tW=async($)=>{if($===void 0)return;try{await eW($)}catch{}},_w=async($)=>{if($===void 0)return;try{await $z($)}catch{}},eW=async($)=>{await Dw($,{cleanup:!0,readable:!1,writable:!0})},$z=async($)=>{await Dw($,{cleanup:!0,readable:!0,writable:!1})},D6=async($,Q)=>{if(await $,Q)throw Q},_6=($,Q,J)=>{if(J&&!j6(J))$.destroy(J);else if(Q)$.destroy()};var Qz=R(()=>{L6()});import{Readable as Xb}from"node:stream";import{callbackify as Yb}from"node:util";var Nw=({subprocess:$,concurrentStreams:Q,encoding:J},{from:X,binary:Y=!0,preserveNewlines:G=!0}={})=>{let q=Y||O8.has(J),{subprocessStdout:W,waitReadableDestroy:z}=Jz($,X,Q),{readableEncoding:V,readableObjectMode:K,readableHighWaterMark:U}=Xz(W,q),{read:x,onStdoutDataDone:M}=Yz({subprocessStdout:W,subprocess:$,binary:q,encoding:J,preserveNewlines:G}),H=new Xb({read:x,destroy:Yb(qz.bind(void 0,{subprocessStdout:W,subprocess:$,waitReadableDestroy:z})),highWaterMark:U,objectMode:K,encoding:V});return Gz({subprocessStdout:W,onStdoutDataDone:M,readable:H,subprocess:$}),H},Jz=($,Q,J)=>{let X=gJ($,Q),Y=AY(J,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:Y}},Xz=({readableEncoding:$,readableObjectMode:Q,readableHighWaterMark:J},X)=>X?{readableEncoding:$,readableObjectMode:Q,readableHighWaterMark:J}:{readableEncoding:$,readableObjectMode:!0,readableHighWaterMark:iW},Yz=({subprocessStdout:$,subprocess:Q,binary:J,encoding:X,preserveNewlines:Y})=>{let G=U$(),q=Z6({subprocessStdout:$,subprocess:Q,binary:J,shouldEncode:!J,encoding:X,preserveNewlines:Y});return{read(){Gb(this,q,G)},onStdoutDataDone:G}},Gb=async($,Q,J)=>{try{let{value:X,done:Y}=await Q.next();if(Y)J.resolve();else $.push(X)}catch{}},Gz=async({subprocessStdout:$,onStdoutDataDone:Q,readable:J,subprocess:X,subprocessStdin:Y})=>{try{if(await $z($),await X,await tW(Y),await Q,J.readable)J.push(null)}catch(G){await tW(Y),vw(J,G)}},qz=async({subprocessStdout:$,subprocess:Q,waitReadableDestroy:J},X)=>{if(await sJ(J,Q))vw($,X),await D6(Q,X)},vw=($,Q)=>{_6($,$.readable,Q)};var Wz=R(()=>{hQ();e$();w6();R6();Qz()});import{Writable as qb}from"node:stream";import{callbackify as Ow}from"node:util";var Fw=({subprocess:$,concurrentStreams:Q},{to:J}={})=>{let{subprocessStdin:X,waitWritableFinal:Y,waitWritableDestroy:G}=zz($,J,Q),q=new qb({...Vz(X,$,Y),destroy:Ow(Uz.bind(void 0,{subprocessStdin:X,subprocess:$,waitWritableFinal:Y,waitWritableDestroy:G})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return Kz(X,q),q},zz=($,Q,J)=>{let X=_9($,Q),Y=AY(J,X,"writableFinal"),G=AY(J,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:Y,waitWritableDestroy:G}},Vz=($,Q,J)=>({write:Wb.bind(void 0,$),final:Ow(zb.bind(void 0,$,Q,J))}),Wb=($,Q,J,X)=>{if($.write(Q,J))X();else $.once("drain",X)},zb=async($,Q,J)=>{if(await sJ(J,Q)){if($.writable)$.end();await Q}},Kz=async($,Q,J)=>{try{if(await eW($),Q.writable)Q.end()}catch(X){await _w(J),Cw(Q,X)}},Uz=async({subprocessStdin:$,subprocess:Q,waitWritableFinal:J,waitWritableDestroy:X},Y)=>{if(await sJ(J,Q),await sJ(X,Q))Cw($,Y),await D6(Q,Y)},Cw=($,Q)=>{_6($,$.writable,Q)};var xz=R(()=>{e$();R6();Qz()});import{Duplex as Vb}from"node:stream";import{callbackify as Kb}from"node:util";var Iw=({subprocess:$,concurrentStreams:Q,encoding:J},{from:X,to:Y,binary:G=!0,preserveNewlines:q=!0}={})=>{let W=G||O8.has(J),{subprocessStdout:z,waitReadableDestroy:V}=Jz($,X,Q),{subprocessStdin:K,waitWritableFinal:U,waitWritableDestroy:x}=zz($,Y,Q),{readableEncoding:M,readableObjectMode:H,readableHighWaterMark:w}=Xz(z,W),{read:j,onStdoutDataDone:Z}=Yz({subprocessStdout:z,subprocess:$,binary:W,encoding:J,preserveNewlines:q}),L=new Vb({read:j,...Vz(K,$,U),destroy:Kb(Ub.bind(void 0,{subprocessStdout:z,subprocessStdin:K,subprocess:$,waitReadableDestroy:V,waitWritableFinal:U,waitWritableDestroy:x})),readableHighWaterMark:w,writableHighWaterMark:K.writableHighWaterMark,readableObjectMode:H,writableObjectMode:K.writableObjectMode,encoding:M});return Gz({subprocessStdout:z,onStdoutDataDone:Z,readable:L,subprocess:$,subprocessStdin:K}),Kz(K,L,z),L},Ub=async({subprocessStdout:$,subprocessStdin:Q,subprocess:J,waitReadableDestroy:X,waitWritableFinal:Y,waitWritableDestroy:G},q)=>{await Promise.all([qz({subprocessStdout:$,subprocess:J,waitReadableDestroy:X},q),Uz({subprocessStdin:Q,subprocess:J,waitWritableFinal:Y,waitWritableDestroy:G},q)])};var Pw=R(()=>{hQ();Wz();xz()});var Mz=($,Q,{from:J,binary:X=!1,preserveNewlines:Y=!1}={})=>{let G=X||O8.has(Q),q=gJ($,J),W=Z6({subprocessStdout:q,subprocess:$,binary:G,shouldEncode:!0,encoding:Q,preserveNewlines:Y});return xb(W,q,$)},xb=async function*($,Q,J){try{yield*$}finally{if(Q.readable)Q.destroy();await J}};var Tw=R(()=>{hQ();e$();w6()});var Aw=($,{encoding:Q})=>{let J=Rw();$.readable=Nw.bind(void 0,{subprocess:$,concurrentStreams:J,encoding:Q}),$.writable=Fw.bind(void 0,{subprocess:$,concurrentStreams:J}),$.duplex=Iw.bind(void 0,{subprocess:$,concurrentStreams:J,encoding:Q}),$.iterable=Mz.bind(void 0,$,Q),$[Symbol.asyncIterator]=Mz.bind(void 0,$,Q,{})};var Ew=R(()=>{R6();Wz();xz();Pw();Tw()});var kw=($,Q)=>{for(let[J,X]of Hb){let Y=X.value.bind(Q);Reflect.defineProperty($,J,{...X,value:Y})}},Mb,Hb;var cw=R(()=>{Mb=(async()=>{})().constructor.prototype,Hb=["then","catch","finally"].map(($)=>[$,Reflect.getOwnPropertyDescriptor(Mb,$)])});import{setMaxListeners as Bb}from"node:events";import{spawn as Zb}from"node:child_process";var Sw=($,Q,J,X)=>{let{file:Y,commandArguments:G,command:q,escapedCommand:W,startTime:z,verboseInfo:V,options:K,fileDescriptors:U}=wb($,Q,J),{subprocess:x,promise:M}=Lb({file:Y,commandArguments:G,options:K,startTime:z,verboseInfo:V,command:q,escapedCommand:W,fileDescriptors:U});return x.pipe=B6.bind(void 0,{source:x,sourcePromise:M,boundOptions:{},createNested:X}),kw(x,M),x$.set(x,{options:K,fileDescriptors:U}),x},wb=($,Q,J)=>{let{command:X,escapedCommand:Y,startTime:G,verboseInfo:q}=V9($,Q,J),{file:W,commandArguments:z,options:V}=m9($,Q,J),K=jb(V),U=F3(K,q);return{file:W,commandArguments:z,command:X,escapedCommand:Y,startTime:G,verboseInfo:q,options:K,fileDescriptors:U}},jb=({timeout:$,signal:Q,...J})=>{if(Q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:$}},Lb=({file:$,commandArguments:Q,options:J,startTime:X,verboseInfo:Y,command:G,escapedCommand:q,fileDescriptors:W})=>{let z;try{z=Zb(...y9($,Q,J))}catch(H){return D3({error:H,command:G,escapedCommand:q,fileDescriptors:W,options:J,startTime:X,verboseInfo:Y})}let V=new AbortController;Bb(Number.POSITIVE_INFINITY,V.signal);let K=[...z.stdio];f3(z,W,V),i3(z,J,V);let U={},x=U$();z.kill=_H.bind(void 0,{kill:z.kill.bind(z),options:J,onInternalError:x,context:U,controller:V}),z.all=Kw(z,J),Aw(z,J),j3(z,J);let M=Rb({subprocess:z,options:J,startTime:X,verboseInfo:Y,fileDescriptors:W,originalStreams:K,command:G,escapedCommand:q,context:U,onInternalError:x,controller:V});return{subprocess:z,promise:M}},Rb=async({subprocess:$,options:Q,startTime:J,verboseInfo:X,fileDescriptors:Y,originalStreams:G,command:q,escapedCommand:W,context:z,onInternalError:V,controller:K})=>{let[U,[x,M],H,w,j]=await jw({subprocess:$,options:Q,context:z,verboseInfo:X,fileDescriptors:Y,originalStreams:G,onInternalError:V,controller:K});K.abort(),V.resolve();let Z=H.map((F,J0)=>P$(F,Q,J0)),L=P$(w,Q,"all"),D=Db({errorInfo:U,exitCode:x,signal:M,stdio:Z,all:L,ipcOutput:j,context:z,options:Q,command:q,escapedCommand:W,startTime:J});return dJ(D,X,Q)},Db=({errorInfo:$,exitCode:Q,signal:J,stdio:X,all:Y,ipcOutput:G,context:q,options:W,command:z,escapedCommand:V,startTime:K})=>("error"in $)?NY({error:$.error,command:z,escapedCommand:V,timedOut:q.terminationReason==="timeout",isCanceled:q.terminationReason==="cancel"||q.terminationReason==="gracefulCancel",isGracefullyCanceled:q.terminationReason==="gracefulCancel",isMaxBuffer:$.error instanceof C$,isForcefullyTerminated:q.isForcefullyTerminated,exitCode:Q,signal:J,stdio:X,all:Y,ipcOutput:G,options:W,startTime:K,isSync:!1}):o9({command:z,escapedCommand:V,stdio:X,all:Y,ipcOutput:G,options:W,startTime:K});var bw=R(()=>{d9();Fq();QW();e$();kW();vY();s9();_3();C3();OY();m3();j9();n3();Xw();rW();Lw();Ew();cw()});var N6=($,Q)=>{let J=Object.fromEntries(Object.entries(Q).map(([X,Y])=>[X,_b(X,$[X],Y)]));return{...$,...J}},_b=($,Q,J)=>{if(Nb.has($)&&y0(Q)&&y0(J))return{...Q,...J};return J},Nb;var fw=R(()=>{F$();Nb=new Set(["env",..._q])});var JQ=($,Q,J,X)=>{let Y=(q,W,z)=>JQ(q,W,J,z),G=(...q)=>vb({mapArguments:$,deepOptions:J,boundOptions:Q,setBoundExeca:X,createNested:Y},...q);if(X!==void 0)X(G,Y,Q);return G},vb=({mapArguments:$,deepOptions:Q={},boundOptions:J={},setBoundExeca:X,createNested:Y},G,...q)=>{if(y0(G))return Y($,N6(J,G),X);let{file:W,commandArguments:z,options:V,isSync:K}=Ob({mapArguments:$,firstArgument:G,nextArguments:q,deepOptions:Q,boundOptions:J});return K?K3(W,z,V):Sw(W,z,V,Y)},Ob=({mapArguments:$,firstArgument:Q,nextArguments:J,deepOptions:X,boundOptions:Y})=>{let G=mx(Q)?yx(Q,J):[Q,...J],[q,W,z]=s7(...G),V=N6(N6(X,Y),z),{file:K=q,commandArguments:U=W,options:x=V,isSync:M=!1}=$({file:q,commandArguments:W,options:V});return{file:K,commandArguments:U,options:x,isSync:M}};var mw=R(()=>{wq();hx();U3();bw();fw()});var yw=({file:$,commandArguments:Q})=>pw($,Q),hw=({file:$,commandArguments:Q})=>({...pw($,Q),isSync:!0}),pw=($,Q)=>{if(Q.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${$} ${Q}.`);let[J,...X]=Fb($);return{file:J,commandArguments:X}},Fb=($)=>{if(typeof $!=="string")throw TypeError(`The command must be a string: ${String($)}.`);let Q=$.trim();if(Q==="")return[];let J=[];for(let X of Q.split(Cb)){let Y=J.at(-1);if(Y&&Y.endsWith("\\"))J[J.length-1]=`${Y.slice(0,-1)} ${X}`;else J.push(X)}return J},Cb;var uw=R(()=>{Cb=/ +/g});var gw=($,Q,J)=>{$.sync=Q(Ib,J),$.s=$.sync},lw=({options:$})=>iw($),Ib=({options:$})=>({...iw($),isSync:!0}),iw=($)=>({options:{...Pb($),...$}}),Pb=({input:$,inputFile:Q,stdio:J})=>$===void 0&&Q===void 0&&J===void 0?{stdin:"inherit"}:{},nw;var dw=R(()=>{nw={preferLocal:!0}});var aw,O50,F50,C50,I50,P50,T50,A50,E50,k50;var ow=R(()=>{mw();uw();rq();dw();kW();aw=JQ(()=>({})),O50=JQ(()=>({isSync:!0})),F50=JQ(yw),C50=JQ(hw),I50=JQ(qB),P50=JQ(lw,{},nw,gw),{sendMessage:T50,getOneMessage:A50,getEachMessage:E50,getCancelSignal:k50}=L3()});var ew={};VJ(ew,{skillDiff:()=>hb});import{mkdirSync as Tb,mkdtempSync as Ab,readdirSync as Eb,readFileSync as kb,rmSync as cb,writeFileSync as Sb}from"node:fs";import{tmpdir as bb}from"node:os";import{dirname as fb,join as rJ,relative as mb,sep as yb}from"node:path";function sw($){let Q={},J=rJ($,F8),X=(Y)=>{for(let G of Eb(Y,{withFileTypes:!0})){let q=rJ(Y,G.name);if(G.isDirectory())X(q);else if(G.isFile())Q[mb(J,q).split(yb).join("/")]=kb(q,"utf8")}};try{X(J)}catch{}return Q}function rw($,Q,J){for(let[X,Y]of Object.entries(J)){let G=rJ($,Q,X);Tb(fb(G),{recursive:!0}),Sb(G,Y)}}function tw($,Q){return[...new Set([...Object.keys($),...Object.keys(Q)])].sort().filter((X)=>$[X]!==Q[X]).map((X)=>$[X]===void 0?` only yours: ${X}`:Q[X]===void 0?` only canonical: ${X}`:` differs: ${X}`)}async function hb($,Q={}){let{apiUrl:J,token:X}=await s0({apiUrlFlag:Q.apiUrlFlag,tokenFlag:Q.tokenFlag}).catch(()=>({})),Y=await s$(F8,{apiUrl:J,token:X}),G=Y?Object.fromEntries(Object.entries(Y.files).map(([V,K])=>[V.replace(/^fig\//,""),K])):sw(tJ()),q=Y?`engine registry (v${Y.version})`:`the CLI-bundled copy (v${XQ()??"?"}) — the registry was unreachable`,W=sw($);if(process.stdout.write(`canonical: ${q}
|
|
80
|
+
installed: ${rJ($,F8)}
|
|
81
|
+
|
|
82
|
+
`),Object.keys(G).length===0){process.stdout.write(`No canonical /fig skill to compare against.
|
|
83
|
+
`);return}if(Object.keys(W).length===0){process.stdout.write(`No /fig skill installed at ${rJ($,F8)} — run \`figura skill install\`.
|
|
84
|
+
`+`The canonical skill has ${Object.keys(G).length} file(s):
|
|
85
|
+
`+tw(G,W).join(`
|
|
86
|
+
`)+`
|
|
87
|
+
`);return}let z=Ab(rJ(bb(),"figura-skill-"));try{rw(z,"canonical",G),rw(z,"yours",W);let V=await aw("git",["diff","--no-index","--src-prefix=","--dst-prefix=","--","canonical","yours"],{cwd:z,stdio:"inherit",reject:!1});if(V.exitCode===0)process.stdout.write(`Your /fig skill matches the canonical one.
|
|
88
|
+
`);else if(V.exitCode!==1){let K=tw(G,W);process.stdout.write(K.length?K.join(`
|
|
89
|
+
`)+`
|
|
90
|
+
`:`Your /fig skill matches the canonical one.
|
|
91
|
+
`)}}finally{cb(z,{recursive:!0,force:!0})}}var $j=R(()=>{ow();B8();EJ();eJ()});import{createHash as pb}from"node:crypto";import{existsSync as YQ,mkdirSync as ub,readdirSync as dQ,readFileSync as F6,writeFileSync as v6,copyFileSync as gb,rmSync as Hz}from"node:fs";import{homedir as O6}from"node:os";import{fileURLToPath as Qj}from"node:url";import{dirname as lb,join as I0,relative as ib,sep as nb}from"node:path";function $X($){try{return F6(I0($,C6),"utf8").trim()||null}catch{return null}}function QX($){try{return F6(I0($,I6),"utf8").trim()||null}catch{return null}}function db($,Q=T6){let J=[],X=(G)=>{for(let q of dQ(G,{withFileTypes:!0})){let W=I0(G,q.name);if(q.isDirectory())X(W);else if(q.isFile())J.push(W)}};try{for(let G of dQ($,{withFileTypes:!0}))if(G.isDirectory()&&Q(G.name))X(I0($,G.name))}catch{return null}if(J.length===0)return null;let Y=pb("sha256");for(let G of J.sort()){let q=ib($,G).split(nb).join("/");Y.update(q),Y.update("\x00"),Y.update(F6(G)),Y.update("\x00")}return Y.digest("hex").slice(0,16)}function T$($){return db($,(Q)=>Q===F8)}function P6(){try{return T$(tJ())}catch{return null}}function ab($){try{return JSON.parse(F6(I0($,"skills.json"),"utf8"))}catch{return null}}function XQ($=F8){try{return ab(tJ())?.skills?.[$]?.version??null}catch{return null}}function EY($){let{stamp:Q,stampedHash:J,installedHash:X,referenceHash:Y,referenceVersion:G}=$;if(X==null)return"absent";if(Y!=null&&X===Y)return"pristine";if(J!=null&&X!==J)return"diverged";if(Q==null)return Y!=null?"unstamped":"unknown";if(G!=null){if(k8(G,Q))return"behind";if(k8(Q,G))return"ahead"}if(Y!=null)return"diverged";return"unknown"}function ob($){switch($){case"pristine":return"pristine";case"behind":return"stale";case"ahead":case"diverged":case"unstamped":return"modified";case"absent":return"absent";case"unknown":return}}function JX(){return{version:XQ(),hash:P6()}}function sb($=I0(O6(),".claude","skills"),Q=JX()){let J=$X($),X=T$($),Y=EY({stamp:J,stampedHash:QX($),installedHash:X,referenceHash:Q.hash,referenceVersion:Q.version});return{version:J,hash:X,status:ob(Y)}}function Xj($=JX()){return{channel:"cli",cliVersion:o8(),skill:sb(I0(O6(),".claude","skills"),$)}}function Jj($){try{return dQ($,{withFileTypes:!0}).some((Q)=>Q.isDirectory()&&YQ(I0($,Q.name,"SKILL.md")))}catch{return!1}}function tJ(){let $=[new URL("../skills/",import.meta.url),new URL("../../skills/",import.meta.url)].map((J)=>Qj(J));for(let J of $)if(Jj(J))return J;let Q=Qj(new URL("./",import.meta.url));for(let J=0;J<8;J++){let X=I0(Q,".claude","skills");if(Jj(X))return X;let Y=lb(Q);if(Y===Q)break;Q=Y}P(`bundled skills not found — reinstall figura-cli:
|
|
92
|
+
`+" curl -fsSL https://figura.so/install.sh | bash")}function Yj($,Q){ub(Q,{recursive:!0});for(let J of dQ($,{withFileTypes:!0})){let X=I0($,J.name),Y=I0(Q,J.name);if(J.isDirectory())Yj(X,Y);else gb(X,Y)}}function Bz($){let Q=tJ(),X=dQ(Q,{withFileTypes:!0}).filter((Y)=>Y.isDirectory()&&T6(Y.name)&&YQ(I0(Q,Y.name,"SKILL.md"))).map((Y)=>Y.name).sort().map((Y)=>{let G=I0($,Y),q=YQ(I0(G,"SKILL.md"));return Yj(I0(Q,Y),G),{name:Y,existed:q}});if(X.length){try{let Y=XQ();if(Y)v6(I0($,C6),Y+`
|
|
93
|
+
`)}catch{}try{let Y=T$($);if(Y)v6(I0($,I6),Y+`
|
|
94
|
+
`)}catch{}}return{baseDir:$,installed:X}}async function Zz($,Q={}){let{fetchLatestSkill:J,verifySkillPayload:X,materializeSkill:Y,SkillHashMismatchError:G}=await Promise.resolve().then(() => (EJ(),Hq)),q=tJ(),W=dQ(q,{withFileTypes:!0}).filter((z)=>z.isDirectory()&&T6(z.name)&&YQ(I0(q,z.name,"SKILL.md"))).map((z)=>z.name).sort();try{let z=[];for(let U of W){let x=await J(U,Q);if(!x)throw Error(`engine unreachable for skill '${U}'`);X(x),z.push(x)}let V=z.map((U)=>{let x=YQ(I0($,U.skill,"SKILL.md"));return Y($,U),{name:U.skill,existed:x}}),K=z.find((U)=>U.skill===F8)?.version??z[0]?.version??null;if(V.length){if(K)try{v6(I0($,C6),K+`
|
|
95
|
+
`)}catch{}try{let U=T$($);if(U)v6(I0($,I6),U+`
|
|
96
|
+
`)}catch{}}return{baseDir:$,installed:V,source:"engine",version:K}}catch(z){if(z instanceof G)throw z;return{...Bz($),source:"bundled",version:XQ()}}}function Gj($){let Q=[],J=[];try{J=dQ($,{withFileTypes:!0}).filter((X)=>X.isDirectory()&&T6(X.name)).map((X)=>X.name)}catch{return{removed:Q}}for(let X of J.sort()){let Y=I0($,X);if(!YQ(I0(Y,"SKILL.md")))continue;try{Hz(Y,{recursive:!0,force:!0}),Q.push(X)}catch{}}if(Q.length)for(let X of[C6,I6])try{Hz(I0($,X),{force:!0})}catch{}return{removed:Q}}async function qj($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(i(Q,"help")||i(Q,"h")||!X){process.stdout.write(rb+`
|
|
97
|
+
`);return}if(X!=="install"&&X!=="diff")P(`unknown subcommand 'skill ${X}'. Run \`figura skill --help\`.`);let Y=i(Q,"project"),G=h(Q,"dir")??(Y?I0(process.cwd(),".claude","skills"):I0(O6(),".claude","skills"));if(X==="diff"){let{skillDiff:M}=await Promise.resolve().then(() => ($j(),ew));await M(G,{apiUrlFlag:h(Q,"api-url"),tokenFlag:h(Q,"token")});return}let{resolveConfig:q}=await Promise.resolve().then(() => (B8(),sU)),{apiUrl:W,token:z}=await q({apiUrlFlag:h(Q,"api-url"),tokenFlag:h(Q,"token")}),V,K;try{let M=await Zz(G,{apiUrl:W,token:z});V=M.installed,K=M.source}catch(M){let{SkillHashMismatchError:H}=await Promise.resolve().then(() => (EJ(),Hq));if(M instanceof H)P(`${M.message}
|
|
98
|
+
`+"The engine served a skill whose content did not match its hash — your "+"existing skill was left untouched. Retry later; if it persists, report it.");throw M}let U=V.map((M)=>M.name),x=V.map(({name:M,existed:H})=>` ${H?"updated":"installed"} ${M}${K==="engine"?"":" (bundled — engine unreachable)"}`);if(U.includes("fig")){let M=new Set([I0(G,"figura-fig"),I0(O6(),".claude","skills","figura-fig")]);for(let w of M)if(YQ(I0(w,"SKILL.md")))Hz(w,{recursive:!0,force:!0}),x.push(` removed figura-fig (renamed → fig) — ${w}`);let H=I0(process.cwd(),".claude","skills","figura-fig");if(!M.has(H)&&YQ(I0(H,"SKILL.md")))x.push(` note: found ${H} (the old /figura-fig skill) — run \`figura skill install --project\` to replace it, then commit the removal`)}process.stdout.write(`Figura skills → ${G}
|
|
99
|
+
`+x.join(`
|
|
100
|
+
`)+'\nClaude Code loads them automatically. Try `/fig <a screen>`, or ask it to "introduce this repo to Figura".\n'+(Y?`Commit .claude/skills/ to share them with your team.
|
|
101
|
+
`:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}var C6=".figura-version",I6=".figura-skills-hash",F8="fig",rb=`figura skill — install + inspect Figura's Claude Code skills
|
|
48
102
|
|
|
49
103
|
Usage:
|
|
50
104
|
figura skill install [--project] [--dir <path>]
|
|
105
|
+
figura skill diff [--project] [--dir <path>]
|
|
51
106
|
|
|
52
|
-
Writes the bundled Figura skills (fig, figura-brand) into your Claude
|
|
53
|
-
skills directory. Re-run after upgrading figura-cli to update them.
|
|
107
|
+
install Writes the bundled Figura skills (fig, figura-brand) into your Claude
|
|
108
|
+
Code skills directory. Re-run after upgrading figura-cli to update them.
|
|
109
|
+
diff Shows what your installed /fig skill has that the canonical one does
|
|
110
|
+
not (and the reverse) — read-only, writes nothing.
|
|
54
111
|
|
|
55
112
|
Options:
|
|
56
113
|
--project Install into ./.claude/skills (the current repo) instead of
|
|
@@ -58,44 +115,44 @@ Options:
|
|
|
58
115
|
--dir <path> Install into a custom skills directory
|
|
59
116
|
--help, -h Show this help
|
|
60
117
|
|
|
61
|
-
Default target: ~/.claude/skills
|
|
62
|
-
|
|
63
|
-
`)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`)
|
|
67
|
-
`)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
`)
|
|
71
|
-
|
|
118
|
+
Default target: ~/.claude/skills/`,T6=($)=>$==="fig"||$.startsWith("figura-");var eJ=R(()=>{r0();IJ()});N8();B8();r0();import{spawn as Lf}from"node:child_process";import{join as Rf}from"node:path";import{promises as Nx}from"node:fs";import{join as uI}from"node:path";var bQ=".mcp.json",a7={command:"figura",args:["mcp"]};function gI($){if(!$||typeof $!=="object")return!1;let Q=$;return Q.command===a7.command&&Array.isArray(Q.args)&&Q.args.length===a7.args.length&&Q.args.every((J,X)=>J===a7.args[X])}async function vx($=process.cwd()){let Q=uI($,bQ),J={},X=!1;try{let W=await Nx.readFile(Q,"utf8");X=!0;let z=JSON.parse(W);if(!z||typeof z!=="object"||Array.isArray(z))return{status:"unparsable",path:Q};J=z}catch(W){if(X)return{status:"unparsable",path:Q};if(W.code!=="ENOENT")return{status:"unparsable",path:Q}}let Y=J.mcpServers&&typeof J.mcpServers==="object"?J.mcpServers:{};if(gI(Y.figura))return{status:"present",path:Q};let G="figura"in Y?"updated":"added",q={...J,mcpServers:{...Y,figura:{...a7}}};return await Nx.writeFile(Q,JSON.stringify(q,null,2)+`
|
|
119
|
+
`),{status:G,path:Q}}import{promises as Uq}from"node:fs";import{join as lI}from"node:path";function Ox($){return $.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function Fx($,Q=process.cwd(),J){let X=lI(Q,".gitignore"),Y=Ox($),G=J==null?[]:Array.isArray(J)?J:[J],q=G.map((K)=>`# ${K}`).join(`
|
|
120
|
+
`)+(G.length?`
|
|
121
|
+
`:"")+$+`
|
|
122
|
+
`,W=null;try{W=await Uq.readFile(X,"utf8")}catch{W=null}if(W===null)return await Uq.writeFile(X,q),"created";if(W.split(`
|
|
123
|
+
`).map((K)=>K.trim()).filter((K)=>K&&!K.startsWith("#")).some((K)=>Ox(K)===Y))return"present";let V="";if(W!==""){if(!W.endsWith(`
|
|
124
|
+
`))V+=`
|
|
125
|
+
`;if(G.length&&!W.endsWith(`
|
|
126
|
+
|
|
127
|
+
`))V+=`
|
|
128
|
+
`}return await Uq.writeFile(X,W+V+q),"added"}r0();eJ();import{homedir as Hf}from"node:os";import{join as jj}from"node:path";r0();import{promises as XX}from"node:fs";import{homedir as wz}from"node:os";import{join as jz}from"node:path";var b8=jz(wz(),".claude","settings.json"),A6="figura doctor --session-start",tb=`figura hook install — keep Figura current on every Claude Code launch
|
|
72
129
|
|
|
73
130
|
Usage:
|
|
74
131
|
figura hook install [--uninstall]
|
|
75
132
|
|
|
76
|
-
Adds a SessionStart hook to ${
|
|
77
|
-
\`${
|
|
133
|
+
Adds a SessionStart hook to ${b8} that runs
|
|
134
|
+
\`${A6}\` — it reinstalls drifted skills in place and, when the CLI is
|
|
78
135
|
behind (checked at most once a day), prints a one-line notice to run
|
|
79
136
|
\`figura upgrade\`. It never self-executes an install and never blocks startup.
|
|
80
|
-
Re-running is safe; --uninstall removes it.`;function
|
|
81
|
-
`);return
|
|
82
|
-
`);return
|
|
83
|
-
`);return}let Y=
|
|
84
|
-
Add this SessionStart hook by hand: ${
|
|
85
|
-
`),process.exit(1)}let{settings:
|
|
86
|
-
`:`Figura version check already installed in ${
|
|
87
|
-
`);return}await
|
|
88
|
-
`),process.stdout.write(Y?`Removed the Figura version check from ${
|
|
89
|
-
`:`Installed the Figura version check in ${
|
|
137
|
+
Re-running is safe; --uninstall removes it.`;function Lz($){return($.hooks??[]).some((Q)=>typeof Q.command==="string"&&Q.command.includes("figura doctor"))}function Wj($){let Q=$.hooks??{},J=Q.SessionStart??[];if(J.some(Lz))return{settings:$,changed:!1};return{settings:{...$,hooks:{...Q,SessionStart:[...J,{matcher:"",hooks:[{type:"command",command:A6}]}]}},changed:!0}}function eb($){return($.hooks?.SessionStart??[]).some(Lz)}function zj($){let Q=$.hooks?.SessionStart;if(!Q)return{settings:$,changed:!1};let J=Q.filter((Y)=>!Lz(Y));if(J.length===Q.length)return{settings:$,changed:!1};let X={...$.hooks};if(J.length)X.SessionStart=J;else delete X.SessionStart;return{settings:{...$,hooks:X},changed:!0}}async function E6($){try{let Q=await XX.readFile($,"utf8"),J=JSON.parse(Q);if(!J||typeof J!=="object"||Array.isArray(J))throw Error(`${$} is not a JSON object`);return J}catch(Q){if(Q.code==="ENOENT")return{};throw Q}}async function Vj(){let $=await E6(b8),{settings:Q,changed:J}=Wj($);if(J)await XX.mkdir(jz(wz(),".claude"),{recursive:!0}),await XX.writeFile(b8,JSON.stringify(Q,null,2)+`
|
|
138
|
+
`);return J}async function Kj(){let $;try{$=await E6(b8)}catch{return!1}let{settings:Q,changed:J}=zj($);if(J)await XX.writeFile(b8,JSON.stringify(Q,null,2)+`
|
|
139
|
+
`);return J}async function Uj($=b8){try{return eb(await E6($))}catch{return!1}}async function xj($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(i(Q,"help")||i(Q,"h")||X&&X!=="install"){process.stdout.write(tb+`
|
|
140
|
+
`);return}let Y=i(Q,"uninstall"),G;try{G=await E6(b8)}catch(z){process.stderr.write(`figura: couldn't read ${b8} (${a(z)}).
|
|
141
|
+
Add this SessionStart hook by hand: ${A6}
|
|
142
|
+
`),process.exit(1)}let{settings:q,changed:W}=Y?zj(G):Wj(G);if(!W){process.stdout.write(Y?`No Figura SessionStart hook was installed.
|
|
143
|
+
`:`Figura version check already installed in ${b8}.
|
|
144
|
+
`);return}await XX.mkdir(jz(wz(),".claude"),{recursive:!0}),await XX.writeFile(b8,JSON.stringify(q,null,2)+`
|
|
145
|
+
`),process.stdout.write(Y?`Removed the Figura version check from ${b8}.
|
|
146
|
+
`:`Installed the Figura version check in ${b8} — it runs \`${A6}\`
|
|
90
147
|
on each Claude Code launch and keeps the CLI, MCP, and skills current.
|
|
91
|
-
`)}import{spawnSync as
|
|
92
|
-
`)}async function
|
|
93
|
-
`),process.exit(1)}let Q
|
|
148
|
+
`)}r0();IJ();VY();B8();import{spawnSync as $f}from"node:child_process";import{promises as E$}from"node:fs";import{homedir as c6}from"node:os";import{join as S6}from"node:path";var Mj=3200,A$=S6(c6(),".claude","settings.json"),k6="figura statusline",GQ="\x1B[0m",Hj="\x1B[2m",Qf="\x1B[38;2;255;177;58m",Jf="\x1B[38;2;62;224;122m",Xf="\x1B[38;2;255;77;61m",Yf="\x1B[38;2;198;199;204m",Gf="\x1B[38;2;60;60;66m",Rz=[[255,77,61],[255,177,58],[62,224,122],[31,182,255],[106,92,255]];function qf($,Q){let J=Q?[...Rz,Rz[0]]:Rz,Y=(Q?($%1+1)%1:Math.max(0,Math.min(1,$)))*(J.length-1),G=Math.min(J.length-2,Math.floor(Y)),q=Y-G,[W,z]=[J[G],J[G+1]];return[0,1,2].map((V)=>Math.round(W[V]+(z[V]-W[V])*q))}function Wf($,Q){let J=[...$],X=J.length-1||1,Y=Q!==void 0;return J.map((G,q)=>{if(G===" ")return G;let[W,z,V]=qf(q/X+(Q??0),Y);return`\x1B[38;2;${W};${z};${V}m${G}`}).join("")+GQ}function zf($,Q={}){let J=Wf("⬡ figura",Q.phase);if(Q.team)J+=` ${Gf}·${GQ} ${Yf}@${Q.team}${GQ}`;if(Q.linked!==void 0)J+=Q.linked?` ${Jf}●${GQ}`:` ${Xf}○${GQ} ${Hj}login${GQ}`;if(J+=` ${Hj}${$}${GQ}`,Q.latest&&k8(Q.latest,$))J+=` ${Qf}↑ ${Q.latest}${GQ}`;return J}function Vf($){return`'${$.replace(/'/g,"'\\''")}'`}function Kf($){let Q=/--wrap\s+'((?:[^']|'\\'')*)'/.exec($);if(!Q)return null;return Q[1].replace(/'\\''/g,"'")}function Dz($,Q){let J=$?.command??"",X=J.includes(k6);if(Q){if(!X)return{statusLine:$??null,changed:!1};let Y=Kf(J);return Y?{statusLine:{type:"command",command:Y},changed:!0}:{statusLine:null,changed:!0}}if(X)return{statusLine:$??null,changed:!1};if(!$)return{statusLine:{type:"command",command:k6},changed:!0};return{statusLine:{type:"command",command:`${k6} --wrap ${Vf(J)}`},changed:!0}}async function Uf($){let Q="";try{let V=[];for await(let K of process.stdin)V.push(Buffer.from(K));Q=Buffer.concat(V).toString("utf8")}catch{}let J="";if($)try{J=($f($,{shell:!0,input:Q,encoding:"utf8"}).stdout??"").replace(/\n+$/,"")}catch{}let X=o8(),Y,G,q;try{Y=(await o$()).latest}catch{}try{let V=await s0({});G=V.team,q=Boolean(V.token)}catch{}let W=Date.now()%Mj/Mj,z=zf(X,{latest:Y,team:G,phase:W,linked:q});process.stdout.write((J?`${J} · ${z}`:z)+`
|
|
149
|
+
`)}async function xf($){let Q={};try{let G=await E$.readFile(A$,"utf8"),q=JSON.parse(G);if(!q||typeof q!=="object"||Array.isArray(q))throw Error("settings.json is not a JSON object");Q=q}catch(G){if(G.code!=="ENOENT")process.stderr.write(`figura: couldn't read ${A$} (${a(G)}). Set statusLine to "${k6}" by hand.
|
|
150
|
+
`),process.exit(1)}let J=Q.statusLine,{statusLine:X,changed:Y}=Dz(J,$);if(!Y){process.stdout.write($?`No Figura statusline was installed.
|
|
94
151
|
`:`Figura statusline already installed.
|
|
95
|
-
`);return}if(
|
|
96
|
-
`),process.stdout.write(
|
|
97
|
-
`:`Added the Figura badge to your status bar (${
|
|
98
|
-
`)}var
|
|
152
|
+
`);return}if(X===null)delete Q.statusLine;else Q.statusLine=X;await E$.mkdir(S6(c6(),".claude"),{recursive:!0}),await E$.writeFile(A$,JSON.stringify(Q,null,2)+`
|
|
153
|
+
`),process.stdout.write($?`Removed the Figura badge from ${A$}.
|
|
154
|
+
`:`Added the Figura badge to your status bar (${A$}). `+`It shows ⬡ figura <version>, with ↑ when an update is ready.
|
|
155
|
+
`)}var Mf=`figura statusline — a status-bar badge showing Figura is installed
|
|
99
156
|
|
|
100
157
|
Usage:
|
|
101
158
|
figura statusline [--wrap <cmd>] render the badge (used by the status bar)
|
|
@@ -104,10 +161,10 @@ Usage:
|
|
|
104
161
|
|
|
105
162
|
The badge reads ⬡ figura <version> and adds ↑ when \`figura doctor\` has found a
|
|
106
163
|
newer release. \`install\` never replaces an existing statusline — it wraps it, so
|
|
107
|
-
a caveman (or any other) badge keeps showing alongside Figura's.`;async function
|
|
108
|
-
`);return}if(
|
|
109
|
-
`),!0}async function
|
|
110
|
-
`),!0}var
|
|
164
|
+
a caveman (or any other) badge keeps showing alongside Figura's.`;async function Bj($){let{flags:Q,positionals:J}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Mf+`
|
|
165
|
+
`);return}if(J[0]==="install")return xf(i(Q,"uninstall"));let X=typeof Q.wrap==="string"?Q.wrap:void 0;await Uf(X)}async function Zj(){let $={};try{let X=await E$.readFile(A$,"utf8"),Y=JSON.parse(X);if(Y&&typeof Y==="object"&&!Array.isArray(Y))$=Y}catch{return!1}let{statusLine:Q,changed:J}=Dz($.statusLine,!0);if(!J)return!1;if(Q===null)delete $.statusLine;else $.statusLine=Q;return await E$.mkdir(S6(c6(),".claude"),{recursive:!0}),await E$.writeFile(A$,JSON.stringify($,null,2)+`
|
|
166
|
+
`),!0}async function wj(){let $={};try{let X=await E$.readFile(A$,"utf8"),Y=JSON.parse(X);if(Y&&typeof Y==="object"&&!Array.isArray(Y))$=Y}catch{}let{statusLine:Q,changed:J}=Dz($.statusLine,!1);if(!J)return!1;return $.statusLine=Q,await E$.mkdir(S6(c6(),".claude"),{recursive:!0}),await E$.writeFile(A$,JSON.stringify($,null,2)+`
|
|
167
|
+
`),!0}function Bf($){let Q=JX();return EY({stamp:$X($),stampedHash:QX($),installedHash:T$($),referenceHash:Q.hash,referenceVersion:Q.version})}var Lj={installSkills:Bz,classifySkills:Bf,uninstallSkills:Gj,ensureHook:Vj,disableHook:Kj,ensureStatusline:wj,removeStatusline:Zj};function Zf(){return jj(Hf(),".claude","skills")}async function _z($,Q=Lj){let J={baseDir:$.skillsBaseDir};if($.skipSkills)J.skipped=!0;else try{let G=Q.classifySkills($.skillsBaseDir);if(G==="diverged"||G==="unstamped")J.preserved=G,J.skipped=!0;else J.installed=Q.installSkills($.skillsBaseDir).installed}catch(G){J.error=a(G)}let X={changed:!1};try{X.changed=await Q.ensureHook()}catch(G){X.error=a(G)}let Y={changed:!1};try{Y.changed=await Q.ensureStatusline()}catch(G){Y.error=a(G)}return{skills:J,hook:X,statusline:Y}}async function wf($,Q=Lj){let J={baseDir:$.skillsBaseDir};try{J.removed=Q.uninstallSkills($.skillsBaseDir).removed}catch(G){J.error=a(G)}let X={changed:!1};try{X.changed=await Q.disableHook()}catch(G){X.error=a(G)}let Y={changed:!1};try{Y.changed=await Q.removeStatusline()}catch(G){Y.error=a(G)}return{skills:J,hook:X,statusline:Y}}var jf=`figura install — set up the full Claude Code integration in one command
|
|
111
168
|
|
|
112
169
|
Usage:
|
|
113
170
|
figura install [--project] [--dir <path>] [--uninstall]
|
|
@@ -126,13 +183,13 @@ Options:
|
|
|
126
183
|
the global ~/.claude/skills. The hook + badge are always global.
|
|
127
184
|
--dir <path> Install the skills into a custom directory
|
|
128
185
|
--uninstall Reverse all three
|
|
129
|
-
--help, -h Show this help`;async function
|
|
130
|
-
`);return}let
|
|
186
|
+
--help, -h Show this help`;async function Rj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(jf+`
|
|
187
|
+
`);return}let J=i(Q,"project"),X=h(Q,"dir")??(J?jj(process.cwd(),".claude","skills"):Zf()),Y=i(Q,"uninstall"),G=Y?await wf({skillsBaseDir:X}):await _z({skillsBaseDir:X}),q=[];if(Y)q.push(G.skills.error?`! skills ${G.skills.error} — remove ${X} by hand`:`✓ skills removed ${(G.skills.removed??[]).map((W)=>"/"+W).join(", ")||"(none)"}`);else{let W=(G.skills.installed??[]).map((z)=>"/"+z.name).join(", ");q.push(G.skills.error?`! skills ${G.skills.error} — run: figura skill install`:G.skills.preserved?`~ skills kept your /fig skill (${G.skills.preserved} — it has bytes Figura didn't write) — run: figura skill diff, then figura skill install to adopt the canonical one`:`✓ skills ${X} — ${W||"(none bundled)"}`)}q.push(G.hook.error?`! auto-update ${G.hook.error} — run: figura hook install${Y?" --uninstall":""}`:Y?`✓ auto-update ${G.hook.changed?"removed":"was not installed"}`:`✓ auto-update ${G.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),q.push(G.statusline.error?`! badge ${G.statusline.error} — run: figura statusline install${Y?" --uninstall":""}`:Y?`✓ badge ${G.statusline.changed?"removed ⬡ figura from your status bar":"was not installed"}`:`✓ badge ${G.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write((Y?`Removed the Figura Claude Code integration:
|
|
131
188
|
`:`Set up the Figura Claude Code integration:
|
|
132
|
-
`)+
|
|
189
|
+
`)+q.map((W)=>" "+W).join(`
|
|
133
190
|
`)+`
|
|
134
191
|
`+(Y?"":`Restart Claude Code to load the skills and badge.
|
|
135
|
-
`))}var
|
|
192
|
+
`))}var Df=`figura login — authenticate and save credentials
|
|
136
193
|
|
|
137
194
|
Usage:
|
|
138
195
|
figura login [--token <fig_...>] [--no-browser] [--api-url <url>] [--project]
|
|
@@ -147,13 +204,13 @@ By default this opens your browser to a short authorize page — approve there a
|
|
|
147
204
|
the CLI picks up the credential automatically (no port, nothing to copy-paste;
|
|
148
205
|
works over SSH too). Use --no-browser to print the URL instead of opening it, or
|
|
149
206
|
--token to pass a token directly (CI / headless). Credentials are written to
|
|
150
|
-
${
|
|
207
|
+
${_8} (mode 0600).
|
|
151
208
|
|
|
152
209
|
--project sets a repo up end-to-end from one command. In the current directory it:
|
|
153
|
-
• writes ${
|
|
210
|
+
• writes ${SQ} (the team token) and pins every figura call in
|
|
154
211
|
this tree to that team — one team per repo;
|
|
155
212
|
• adds .figura/ to .gitignore so the live token is never committed;
|
|
156
|
-
• registers the Figura MCP in ${
|
|
213
|
+
• registers the Figura MCP in ${bQ} so Claude Code wires it up on
|
|
157
214
|
its own — no manual \`claude mcp add\` (--no-mcp to skip);
|
|
158
215
|
• installs the /fig and /figura-brand skills into .claude/skills (--no-skills
|
|
159
216
|
to skip);
|
|
@@ -161,36 +218,36 @@ ${R0} (mode 0600).
|
|
|
161
218
|
date (see \`figura hook install\`);
|
|
162
219
|
• adds a "⬡ figura" badge to the Claude Code status bar (wrapping any existing
|
|
163
220
|
statusline, so nothing else disappears; see \`figura statusline install\`).
|
|
164
|
-
${
|
|
165
|
-
setup — teammates just run \`figura login --project\` for their own credential.`;function
|
|
166
|
-
`+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function
|
|
167
|
-
To sign in, open this URL and confirm the code ${
|
|
221
|
+
${bQ} and .claude/skills hold no token, so commit them to share the
|
|
222
|
+
setup — teammates just run \`figura login --project\` for their own credential.`;function _f($){try{let Q=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open",J=process.platform==="win32"?["/c","start","",$]:[$],X=Lf(Q,J,{stdio:"ignore",detached:!0});X.on("error",()=>{}),X.unref()}catch{}}var Nf=($)=>new Promise((Q)=>setTimeout(Q,$));async function vf($,Q){try{if((await z0("/v1/brand",{token:$,apiUrl:Q,source:V0})).isCustom)return null;return`Next: your team has no brand profile yet — figs render with the built-in neutral look.
|
|
223
|
+
`+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function Of($,Q){let J=await z0("/v1/cli/device",{method:"POST",apiUrl:$,source:V0}),X=J.verification_uri_complete||J.verification_uri;if(process.stdout.write(`
|
|
224
|
+
To sign in, open this URL and confirm the code ${J.user_code}:
|
|
168
225
|
|
|
169
|
-
${
|
|
226
|
+
${X}
|
|
170
227
|
|
|
171
|
-
`)
|
|
172
|
-
`);let Y=Math.max(1,
|
|
173
|
-
`);return}let
|
|
174
|
-
Retry, or pass --token <fig_...> for CI/headless.`)}if(!
|
|
228
|
+
`),Q)_f(X);process.stdout.write(`Waiting for authorization...
|
|
229
|
+
`);let Y=Math.max(1,J.interval??5)*1000,G=Date.now()+(J.expires_in??600)*1000;while(Date.now()<G){await Nf(Y);let q;try{q=await z0("/v1/cli/device/token",{method:"POST",apiUrl:$,source:V0,body:{device_code:J.device_code}})}catch(W){if(W instanceof _$&&W.status===0)continue;throw W}if(q.token)return q.token}throw Error("timed out waiting for authorization")}async function Nz($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(Df+`
|
|
230
|
+
`);return}let J=process.env.FIGURA_API_URL||h(Q,"api-url")||TJ,X=process.env.FIGURA_TOKEN||h(Q,"token");if(!X)try{X=await Of(J,!i(Q,"no-browser"))}catch(W){P(`login failed: ${a(W)}
|
|
231
|
+
Retry, or pass --token <fig_...> for CI/headless.`)}if(!X)P("A token is required.");let Y;try{Y=await z0("/v1/whoami",{token:X,apiUrl:J,source:V0})}catch(W){P(`token validation failed: ${a(W)}`)}let G=Y.team?.name||Y.team?.slug||Y.team?.id||"your team";if(i(Q,"project")){let W=process.cwd();await Yq({apiUrl:J,token:X,team:Y.team?.slug||Y.team?.id},W);let z=[`✓ token ${SQ}`];try{let U=await Fx(".figura/",W,"Figura CLI credentials (figura login --project) — holds a live API token; never commit");z.push(`✓ gitignore .figura/ ${U==="present"?"already ignored":"ignored"}`)}catch(U){z.push(`! gitignore couldn't update .gitignore (${a(U)}) — ignore .figura/ by hand`)}if(i(Q,"no-mcp"))z.push("- MCP skipped (--no-mcp)");else try{let U=await vx(W);z.push(U.status==="unparsable"?`! MCP ${bQ} unparsable — add by hand: claude mcp add figura -- figura mcp`:`✓ MCP ${bQ} — restart Claude Code and approve`)}catch(U){z.push(`! MCP couldn't write ${bQ} (${a(U)}) — add by hand: claude mcp add figura -- figura mcp`)}let V=await _z({skillsBaseDir:Rf(W,".claude","skills"),skipSkills:i(Q,"no-skills")});if(V.skills.preserved)z.push(`~ skills kept your /fig skill (${V.skills.preserved} — it has bytes Figura didn't write) — run: figura skill diff, then figura skill install to adopt the canonical one`);else if(V.skills.skipped)z.push("- skills skipped (--no-skills)");else if(V.skills.error)z.push(`! skills couldn't install skills (${V.skills.error}) — run: figura skill install --project`);else{let U=(V.skills.installed??[]).map((x)=>"/"+x.name).join(", ");z.push(`✓ skills .claude/skills — ${U||"(none bundled)"}`)}z.push(V.hook.error?`! auto-update couldn't install the update hook (${V.hook.error}) — run: figura hook install`:`✓ auto-update ${V.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),z.push(V.statusline.error?`! badge couldn't add the status-bar badge (${V.statusline.error}) — run: figura statusline install`:`✓ badge ${V.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write(`Logged in to ${G}.
|
|
175
232
|
|
|
176
233
|
Set up this repo:
|
|
177
|
-
`+
|
|
234
|
+
`+z.map((U)=>" "+U).join(`
|
|
178
235
|
`)+`
|
|
179
|
-
`);let
|
|
180
|
-
`+
|
|
181
|
-
`);return}let
|
|
182
|
-
`),
|
|
183
|
-
`)}
|
|
236
|
+
`);let K=await vf(X,J);if(K)process.stdout.write(`
|
|
237
|
+
`+K+`
|
|
238
|
+
`);return}let q=await g7();if(await Xq({...q,apiUrl:J,token:X,team:Y.team?.slug||Y.team?.id||q.team}),process.stdout.write(`Logged in to ${G}. Credentials saved to ${_8}
|
|
239
|
+
`),_x())process.stdout.write("\nYou're inside a git repo — run `figura link` to pin this repo to a\n"+`team and wire up the MCP, skills, and status badge in one step.
|
|
240
|
+
`)}N8();r0();B8();var Ff=`figura whoami — show the authenticated identity
|
|
184
241
|
|
|
185
242
|
Also reports the BINDING: which config tier supplied the token (env, --token,
|
|
186
243
|
this repo's .figura/config.json, or the global ~/.figura fallback). A 'global'
|
|
187
244
|
binding means nothing pins this directory to that team — run \`figura link\`.
|
|
188
245
|
|
|
189
246
|
Usage:
|
|
190
|
-
figura whoami [--json]`;async function
|
|
191
|
-
`);return}let
|
|
247
|
+
figura whoami [--json]`;async function Dj($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(Ff+`
|
|
248
|
+
`);return}let J=await N0(Q),{token:X,apiUrl:Y,tokenSource:G,projectConfigPath:q}=J,W;try{W=await z0("/v1/whoami",{token:X,apiUrl:Y,source:V0})}catch(K){P(a(K))}let z={source:G,configPath:G==="project"?q:G==="global"?_8:null};if(i(Q,"json")){L0({...W,binding:z});return}let V=[];if(W.user){let K=W.user,U=K.name&&K.email?`${K.name} (${K.email})`:K.email??K.name??K.id??"";V.push(`user: ${U}`)}else V.push(`actor: ${W.actor??"token"}`);if(W.team)V.push(`team: ${W.team.name??""} (${W.team.slug??W.team.id??""})`);if(W.token)V.push(`token: ${W.token.name??W.token.prefix??W.token.id??""}`);if(W.scopes?.length)V.push(`scopes: ${W.scopes.join(", ")}`);V.push(`bound: ${z.source}${z.configPath?` (${z.configPath})`:""}`+(z.source==="global"?" — not pinned to this repo; run `figura link`":"")),process.stdout.write(V.join(`
|
|
192
249
|
`)+`
|
|
193
|
-
`)}
|
|
250
|
+
`)}N8();r0();import{readFileSync as b6}from"node:fs";var f6=`figura brand — show or set your team's brand profile (design system)
|
|
194
251
|
|
|
195
252
|
The /fig skill and generator render with these tokens. Falls back to the built-in
|
|
196
253
|
neutral profile until your team sets its own.
|
|
@@ -243,27 +300,27 @@ you by scanning your repo ("introduce my repo to Figura").
|
|
|
243
300
|
|
|
244
301
|
Both forms print WHICH team they're bound to and from where. In a directory that
|
|
245
302
|
isn't linked to a team — a repo or not — \`brand set\` refuses the global
|
|
246
|
-
~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,
|
|
247
|
-
`);return}let{token:
|
|
303
|
+
~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,_j=["mobile","web","desktop"];async function vz(){let $=[];for await(let Q of process.stdin)$.push(Buffer.from(Q));return Buffer.concat($).toString("utf8")}async function Nj($){let Q=$[0]&&!$[0].startsWith("-")?$[0]:void 0;if(Q==="set")return Cf($.slice(1));if(Q==="structure")return Pf($.slice(1));if(Q==="schema")return If($.slice(1));let{flags:J}=Q0($);if(i(J,"help")||i(J,"h")){process.stdout.write(f6+`
|
|
304
|
+
`);return}let{token:X,apiUrl:Y}=await N0(J,{announce:!0}),G=h(J,"platform");if(G!==void 0&&!_j.includes(G))P(`--platform must be one of ${_j.join(", ")}`);let q=G?`/v1/brand?platform=${encodeURIComponent(G)}`:"/v1/brand",W;try{W=await z0(q,{token:X,apiUrl:Y,source:V0})}catch(K){P(a(K))}if(i(J,"json")){L0(W);return}let z=[],V=W.kind==="starter"||!W.kind&&!W.isCustom?" (starter kit — no brand set; run `figura brand set` to customize)":"";if(z.push(`name: ${W.name??""}${V}`),z.push(`product: ${W.appDescription??""}`),z.push(`tokens: ${(W.tokensBlock??"").length} chars`),z.push(`surfaces: ${(W.surfaces??[]).join(", ")||"(none)"}`),z.push(`forbidden: ${(W.forbidden??"").length} chars`),z.push(`platform: ${W.platformProfile??"(unknown — Studio uses its own defaults)"}`),W.availablePlatforms?.length||W.colors?.length)z.push(`structured: ${(W.colors??[]).length} colors, surfaces for [${(W.availablePlatforms??[]).join(", ")}]${W.platform?` (composed for ${W.platform})`:""}`);process.stdout.write(z.join(`
|
|
248
305
|
`)+`
|
|
249
|
-
`)}async function
|
|
250
|
-
`);return}let{token:
|
|
251
|
-
${(
|
|
252
|
-
`)}async function
|
|
253
|
-
`);return}let{token:
|
|
254
|
-
`);return}let{token:
|
|
306
|
+
`)}async function Cf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(f6+`
|
|
307
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"name");if(!Y)P("--name is required for `brand set`.");let G={name:Y},q=h(Q,"description");if(q!==void 0)G.appDescription=q;let W=h(Q,"tokens");if(W==="-")G.tokensBlock=await vz();else if(W&&W.startsWith("@"))try{G.tokensBlock=b6(W.slice(1),"utf8")}catch(x){P(`could not read --tokens file ${W.slice(1)}: ${a(x)}`)}else if(W!==void 0)G.tokensBlock=W;let z=h(Q,"surfaces");if(z!==void 0)G.surfaces=z.split(",").map((x)=>x.trim()).filter((x)=>x.length>0);let V=h(Q,"structured");if(V!==void 0){let x;if(V==="-")x=await vz();else if(V.startsWith("@"))try{x=b6(V.slice(1),"utf8")}catch(w){return P(`could not read --structured file ${V.slice(1)}: ${a(w)}`)}else x=V;let M;try{M=JSON.parse(x)}catch(w){return P(`--structured must be valid JSON: ${a(w)}`)}if(typeof M!=="object"||M===null||Array.isArray(M))return P('--structured must be a JSON object like { "identity": {…}, "platforms": {…} }');let H=M;if(H.identity===void 0&&H.platforms===void 0)return P('--structured JSON must have an "identity" and/or "platforms" key');if(H.identity!==void 0)G.identity=H.identity;if(H.platforms!==void 0)G.platforms=H.platforms}let K=h(Q,"prose-source");if(K!==void 0)if(K==="-")return P("--prose-source cannot read stdin (- is reserved for --structured); pass @file or literal text.");else if(K.startsWith("@"))try{G.proseSource=b6(K.slice(1),"utf8")}catch(x){return P(`could not read --prose-source file ${K.slice(1)}: ${a(x)}`)}else G.proseSource=K;let U;try{U=await z0("/brand",{method:"PUT",body:G,token:J,apiUrl:X,source:V0})}catch(x){P(a(x))}if(i(Q,"json")){L0(U);return}process.stdout.write(`Brand saved: ${U.name}
|
|
308
|
+
${(U.tokensBlock??"").length} chars of tokens — the /fig generator now renders on-brand.
|
|
309
|
+
`)}async function If($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(f6+`
|
|
310
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/brand/schema",{token:J,apiUrl:X,source:V0})}catch(G){P(a(G))}L0(Y.schema??Y)}async function Pf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(f6+`
|
|
311
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"prose"),G;if(Y===void 0||Y==="-")G=await vz();else if(Y.startsWith("@"))try{G=b6(Y.slice(1),"utf8")}catch(W){return P(`could not read --prose file ${Y.slice(1)}: ${a(W)}`)}else G=Y;if(!G.trim())P("no prose to structure — pass --prose @file / - / text or pipe it in.");let q;try{q=await z0("/brand/structure",{method:"POST",body:{prose:G},token:J,apiUrl:X,source:V0})}catch(W){P(a(W))}L0(q)}N8();r0();var Tf=`figura teams — list teams accessible to the current credentials
|
|
255
312
|
|
|
256
313
|
Usage:
|
|
257
|
-
figura teams [--json]`;async function
|
|
258
|
-
`);return}let{token:
|
|
259
|
-
`);return}for(let
|
|
260
|
-
`)}}
|
|
314
|
+
figura teams [--json]`;async function vj($){let{flags:Q}=Q0($);if(Q.help||Q.h){process.stdout.write(Tf+`
|
|
315
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/teams",{token:J,apiUrl:X,source:V0})}catch(q){P(a(q))}let G=Array.isArray(Y)?Y:Y.teams??[];if(i(Q,"json")){L0(G);return}if(!G.length){process.stdout.write(`No teams.
|
|
316
|
+
`);return}for(let q of G){let W=q.role?` [${q.role}]`:"";process.stdout.write(`${q.slug} ${q.name}${W} ${q.id}
|
|
317
|
+
`)}}N8();r0();B8();import{promises as m6}from"node:fs";import{join as kf}from"node:path";import{spawn as cf}from"node:child_process";var Af=process.env.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function Oj($){return`'${$.replace(/'/g,"'\\''")}'`}function Ef($,Q,J){return`## ${$}
|
|
261
318
|
|
|
262
|
-
[Open the fig →](${
|
|
319
|
+
[Open the fig →](${Q})
|
|
263
320
|
|
|
264
|
-
}var
|
|
321
|
+

|
|
322
|
+
`}function Fj($){let Q=($.appOrigin??Af).replace(/\/+$/,""),J=$.publicId,X=$.title||"Untitled fig",Y=$.isPublic===!0,G=`${Q}/f/${J}`,q=`${G}/opengraph-image`,W=Y?G:$.viewUrl||G,z=$.channel||"<CHANNEL>",V=`buzz messages send --channel ${z} --content ${Oj(`${X}: ${G}`)}`,K=`buzz canvas set --channel ${z} --content ${Oj(Ef(X,G,q))}`,U={figId:$.figId,title:X,published:Y,link:W,externalLink:G,ogImage:q,buzz:{message:V,canvas:K}};if(!Y)U.note="This fig is a draft — the public link + OG preview don't resolve until it's "+`published. Run \`figura fig publish ${$.figId}\` first, then post ${G}.`;return U}function Cj($){let Q=[];if(Q.push($.title),Q.push($.published?"(published)":"(draft — not shareable yet)"),Q.push(""),Q.push(`link: ${$.link}`),Q.push(`ogImage: ${$.ogImage}`),$.note)Q.push(""),Q.push(`note: ${$.note}`);return Q.push(""),Q.push("# post the fig to a Buzz channel:"),Q.push($.buzz.message),Q.push(""),Q.push("# …or set a channel canvas (markdown, with the preview):"),Q.push($.buzz.canvas),Q.push(""),Q.join(`
|
|
323
|
+
`)}eJ();EJ();var Sf=1500;async function bf($){try{let Q=await s$(F8,{...$,timeoutMs:Sf});if(Q?.hash)return{version:Q.version,hash:Q.hash}}catch{}return JX()}var Oz=`figura fig — manage visualizations
|
|
267
324
|
|
|
268
325
|
Usage:
|
|
269
326
|
figura fig create [--file <path> | (reads stdin)] [options]
|
|
@@ -271,7 +328,7 @@ Usage:
|
|
|
271
328
|
figura fig revisions <id> [--json]
|
|
272
329
|
figura fig request-feedback <id> --from <name|email> [--note <text>]
|
|
273
330
|
figura fig update <id> [options]
|
|
274
|
-
figura fig delete <id> [--
|
|
331
|
+
figura fig delete <id> [--json]
|
|
275
332
|
figura fig commit <id> [--json]
|
|
276
333
|
figura fig uncommit <id> [--json]
|
|
277
334
|
figura fig publish <id> [--unpublish] [--json]
|
|
@@ -289,8 +346,10 @@ Verify:
|
|
|
289
346
|
unstyled: rendering it headless cannot tell a healthy fig from one whose kit
|
|
290
347
|
never landed. \`verify\` fetches what a reviewer will open and asserts that
|
|
291
348
|
every frame class the markup uses is actually sized by CSS that shipped with
|
|
292
|
-
it, then reports the fig's own manifest checks.
|
|
293
|
-
|
|
349
|
+
it, then reports the fig's own manifest checks. These are static checks over
|
|
350
|
+
the served bytes — nothing is laid out and nothing runs locally. Exits
|
|
351
|
+
non-zero on any failure, so it can gate a publish. Run it after
|
|
352
|
+
\`fig create\`/\`fig revise\`.
|
|
294
353
|
|
|
295
354
|
Scaffold:
|
|
296
355
|
Print the canonical fig authoring scaffold — the exact system prompt Figura
|
|
@@ -348,9 +407,10 @@ Update:
|
|
|
348
407
|
which also notify the team)
|
|
349
408
|
|
|
350
409
|
Delete:
|
|
351
|
-
Archives the fig
|
|
352
|
-
resolving
|
|
353
|
-
--
|
|
410
|
+
Archives the fig — always. It leaves the library and its public link stops
|
|
411
|
+
resolving, but the fig and its comments are kept; restore by setting
|
|
412
|
+
--status published with fig update. There is no permanent delete here:
|
|
413
|
+
that is a human action in the web app, by the author or a team admin.
|
|
354
414
|
|
|
355
415
|
Commit:
|
|
356
416
|
Machine-created figs land as workspace DRAFTS — visible to you, NOT in the
|
|
@@ -394,31 +454,31 @@ Team binding:
|
|
|
394
454
|
When the cwd isn't linked to a team (no .figura/config.json above it — inside
|
|
395
455
|
a git repo or not, including a bare temp/scratchpad dir), they refuse to fall
|
|
396
456
|
back to the global ~/.figura credential — run \`figura link\` to bind this
|
|
397
|
-
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function
|
|
398
|
-
`)}async function
|
|
399
|
-
`),
|
|
400
|
-
`)}async function
|
|
401
|
-
`);return}for(let
|
|
402
|
-
`)}async function
|
|
403
|
-
`);return}let{token:
|
|
404
|
-
`)}async function
|
|
405
|
-
`);return}let{token:
|
|
457
|
+
directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function Tj(){let $=[];for await(let Q of process.stdin)$.push(Buffer.from(Q));return Buffer.concat($).toString("utf8")}function Fz($){if(!$)return;let Q=$.split(",").map((J)=>J.trim()).filter(Boolean);return Q.length?Q:void 0}function y6($){if($.status!=="draft")return;process.stderr.write(`→ draft — not in the team library yet · commit with: figura fig commit ${$.id}
|
|
458
|
+
`)}async function ff($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"file"),G;if(Y)try{G=await m6.readFile(Y,"utf8")}catch(L){P(`could not read --file: ${a(L)}`)}else{if(process.stdin.isTTY)P("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");G=await Tj()}if(!G.trim())P("HTML content is empty.");let q=h(Q,"issue"),W=q!==void 0?Number(q):void 0;if(W!==void 0&&!Number.isFinite(W))P("--issue must be a number.");let z={html:G},V=h(Q,"title"),K=h(Q,"description"),U=h(Q,"area"),x=Fz(h(Q,"tags")),M=h(Q,"orientation"),H=h(Q,"mode"),w=h(Q,"model"),j=h(Q,"device");if(V!==void 0)z.title=V;if(K!==void 0)z.description=K;if(U!==void 0)z.area=U;if(x!==void 0)z.tags=x;if(M!==void 0)z.orientation=M;if(H!==void 0)z.mode=H;if(w!==void 0)z.model=w;if(j!==void 0)z.device=j;if(W!==void 0)z.issue=W;if(i(Q,"publish"))z.publish=!0;if(i(Q,"commit"))z.status="published";z.toolchain=Xj(await bf({apiUrl:X,token:J}));let Z;try{Z=await z0("/v1/figs",{method:"POST",body:z,token:J,apiUrl:X,source:V0})}catch(L){P(a(L))}if(i(Q,"json")){L0(Z),y6(Z);return}L0({id:Z.id,slug:Z.slug,status:Z.status??null,isPublic:Z.isPublic??!1,url:Z.url??null,viewUrl:Z.viewUrl??null}),y6(Z)}async function mf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig revise <id> [--file <path>]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q=h(Q,"file"),W;if(q)try{W=await m6.readFile(q,"utf8")}catch(F){P(`could not read --file: ${a(F)}`)}else{if(process.stdin.isTTY)P("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");W=await Tj()}if(!W.trim())P("HTML content is empty.");let z=h(Q,"issue"),V=z!==void 0?Number(z):void 0;if(V!==void 0&&!Number.isFinite(V))P("--issue must be a number.");let K={html:W},U=h(Q,"title"),x=h(Q,"description"),M=h(Q,"area"),H=Fz(h(Q,"tags")),w=h(Q,"orientation"),j=h(Q,"mode"),Z=h(Q,"model"),L=h(Q,"device");if(U!==void 0)K.title=U;if(x!==void 0)K.description=x;if(M!==void 0)K.area=M;if(H!==void 0)K.tags=H;if(w!==void 0)K.orientation=w;if(j!==void 0)K.mode=j;if(Z!==void 0)K.model=Z;if(L!==void 0)K.device=L;if(V!==void 0)K.issue=V;if(i(Q,"publish"))K.publish=!0;if(i(Q,"commit"))K.status="published";let D;try{D=await z0(`/v1/figs/${encodeURIComponent(X)}/revise`,{method:"POST",body:K,token:Y,apiUrl:G,source:V0})}catch(F){P(a(F))}if(i(Q,"json")){L0(D),y6(D);return}L0({id:D.id,slug:D.slug,version:D.version,rootFigId:D.rootFigId,status:D.status??null,isPublic:D.isPublic??!1,url:D.url??null,viewUrl:D.viewUrl??null}),y6(D)}async function yf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig request-feedback <id> --from <name|email> [--note <text>]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q=h(Q,"from");if(!q)P("--from is required (the teammate to ask, by name or email).");let W=h(Q,"note"),z={from:q};if(W!==void 0)z.note=W;let V;try{V=await z0(`/v1/figs/${encodeURIComponent(X)}/request-feedback`,{method:"POST",body:z,token:Y,apiUrl:G,source:V0})}catch(U){P(a(U))}if(i(Q,"json")){L0(V);return}let K=V.request?.to??q;if(process.stdout.write(`Requested ${K}'s feedback.
|
|
459
|
+
`),V.figUrl)process.stdout.write(`${V.figUrl}
|
|
460
|
+
`)}async function hf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig update <id> [options]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q={},W=h(Q,"title"),z=h(Q,"description"),V=h(Q,"area"),K=Fz(h(Q,"tags")),U=h(Q,"status");if(W!==void 0)q.title=W;if(z!==void 0)q.description=z;if(V!==void 0)q.area=V;if(K!==void 0)q.tags=K;if(U!==void 0)q.status=U;if(h(Q,"file"))P("`fig update` changes metadata only — it can't replace the HTML. Use `fig revise <id> --file <html>` to save a new version (the old one is kept).");if(Object.keys(q).length===0)P("Nothing to update. Pass at least one of --title/--description/--area/--tags/--status.");let x;try{x=await z0(`/v1/figs/${encodeURIComponent(X)}`,{method:"PATCH",body:q,token:Y,apiUrl:G,source:V0})}catch(M){P(a(M))}if(i(Q,"json")){L0(x);return}L0({id:x.id,slug:x.slug,status:x.status})}async function pf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig delete <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}`,{method:"DELETE",token:Y,apiUrl:G,source:V0})}catch(W){P(a(W))}L0(q??{ok:!0})}async function uf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig revisions <id>");let{token:Y,apiUrl:G}=await N0(Q),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}/revisions`,{token:Y,apiUrl:G,source:V0})}catch(z){P(a(z))}if(i(Q,"json")){L0(q);return}let W=Array.isArray(q)?q:q.revisions??q.items??[];if(!W.length){process.stdout.write(`No revisions.
|
|
461
|
+
`);return}for(let z of W)process.stdout.write(`v${z.version} ${z.id} ${z.title??z.slug}
|
|
462
|
+
`)}async function gf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Oz+`
|
|
463
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y=new URLSearchParams;for(let W of["platform","device","area","orientation","mode"]){let z=h(Q,W);if(z!==void 0)Y.set(W,z)}let G=Y.toString(),q;try{q=await z0(`/v1/fig/scaffold${G?`?${G}`:""}`,{token:J,apiUrl:X,source:V0})}catch(W){P(a(W))}if(i(Q,"json")){L0(q);return}process.stdout.write((q.scaffold??"")+`
|
|
464
|
+
`)}async function lf($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Oz+`
|
|
465
|
+
`);return}let{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/fig/devices",{token:J,apiUrl:X,source:V0})}catch(q){P(a(q))}if(i(Q,"json")){L0(Y);return}let G=Y.devices??[];if(!G.length){process.stdout.write(`No devices.
|
|
406
466
|
`);return}process.stdout.write(`ID LABEL PORTRAIT CUTOUT RADIUS
|
|
407
|
-
`);for(let
|
|
408
|
-
`)}}async function
|
|
409
|
-
`);return}for(let
|
|
410
|
-
`)}}async function
|
|
411
|
-
`)}),Y.unref()}async function
|
|
467
|
+
`);for(let q of G){let W=q.id===Y.default?" (default)":"";process.stdout.write(`${q.id}${W} ${q.label} ${q.logical.portrait.w}×${q.logical.portrait.h} ${q.cutout} ${q.cornerRadius}
|
|
468
|
+
`)}}async function nf($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q),Y=new URLSearchParams,G=h(Q,"area"),q=h(Q,"tag"),W=h(Q,"limit");if(G)Y.set("area",G);if(q)Y.set("tag",q);if(W)Y.set("limit",W);let z=Y.toString(),V;try{V=await z0(`/v1/figs${z?`?${z}`:""}`,{token:J,apiUrl:X,source:V0})}catch(U){P(a(U))}let K=Array.isArray(V)?V:V.items??[];if(i(Q,"json")){L0(V);return}if(!K.length){process.stdout.write(`No figs.
|
|
469
|
+
`);return}for(let U of K){let x=U.tags?.length?` #${U.tags.join(" #")}`:"";process.stdout.write(`${U.id} ${U.area??"-"} ${U.title??U.slug}${x}
|
|
470
|
+
`)}}async function df($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig get <id>");let{token:Y,apiUrl:G}=await N0(Q),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:Y,apiUrl:G,source:V0})}catch(W){P(a(W))}L0(q)}async function af($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig buzz-payload <id> [--channel <uuid>] [--json]");let Y=await N0(Q),{token:G,apiUrl:q}=Y,W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:G,apiUrl:q,source:V0})}catch(U){P(a(U))}let z=W.id??X,V=z.replace(/^fig_/,"").trim();if(!V)P("Could not resolve the fig public id from the API response.");let K=Fj({figId:z,publicId:V,title:W.title||W.slug||"Untitled fig",isPublic:W.isPublic,viewUrl:typeof W.viewUrl==="string"?W.viewUrl:void 0,channel:h(Q,"channel")});if(i(Q,"json")){L0(K);return}process.stdout.write(Cj(K))}async function of($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig commit <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}/commit`,{method:"POST",body:{},token:Y,apiUrl:G,source:V0})}catch(W){P(a(W))}L0(q)}async function sf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig uncommit <id>");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q;try{q=await z0(`/v1/figs/${encodeURIComponent(X)}/uncommit`,{method:"POST",body:{},token:Y,apiUrl:G,source:V0})}catch(W){P(a(W))}L0(q)}async function rf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig publish <id> [--unpublish]");let{token:Y,apiUrl:G}=await N0(Q,{mutate:!0}),q=!i(Q,"unpublish"),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}/publish`,{method:"POST",body:{isPublic:q},token:Y,apiUrl:G,source:V0})}catch(z){P(a(z))}L0(W)}function Ij($){let Q=process.platform,J,X;if(Q==="darwin")J="open",X=[$];else if(Q==="win32")J="cmd",X=["/c","start","",$];else J="xdg-open",X=[$];let Y=cf(J,X,{stdio:"ignore",detached:!0});Y.on("error",()=>{process.stderr.write(`figura: could not open browser; file is at ${$}
|
|
471
|
+
`)}),Y.unref()}async function tf($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig open <id> [--print] [--local]");let{token:Y,apiUrl:G}=await N0(Q);if(i(Q,"print")){let V;try{V=await d7(`/v1/figs/${encodeURIComponent(X)}/raw`,{token:Y,apiUrl:G,source:V0})}catch(K){P(a(K))}if(process.stdout.write(V),!V.endsWith(`
|
|
412
472
|
`))process.stdout.write(`
|
|
413
|
-
`);return}if(!
|
|
414
|
-
`);return}}let
|
|
415
|
-
`)}var
|
|
416
|
-
`);if(
|
|
417
|
-
figura: ${
|
|
473
|
+
`);return}if(!i(Q,"local")){let V;try{V=await z0(`/v1/figs/${encodeURIComponent(X)}`,{token:Y,apiUrl:G,source:V0})}catch(K){P(a(K))}if(V.viewUrl){Ij(V.viewUrl),process.stdout.write(`Opening ${V.viewUrl}
|
|
474
|
+
`);return}}let q;try{q=await d7(`/v1/figs/${encodeURIComponent(X)}/raw`,{token:Y,apiUrl:G,source:V0})}catch(V){P(a(V))}let W=await Jq(),z=kf(W,`figura-fig-${X.replace(/[^a-zA-Z0-9_-]/g,"")}.html`);await m6.mkdir(W,{recursive:!0}),await m6.writeFile(z,Gm(q),"utf8"),Ij(z),process.stdout.write(`Opening ${z}
|
|
475
|
+
`)}var ef=[{marker:"fig-device",component:"device-frame",sizedBy:/\.fig-device\.portrait\s*\{[^}]*width\s*:/i},{marker:"frame-web",component:"browser-chrome",sizedBy:/\.frame-web\s*\{[^}]*width\s*:/i},{marker:"fig-statusbar",component:"status-bar",sizedBy:/\.fig-statusbar\s*\{[^}]*height\s*:/i},{marker:"fig-controls",component:"control-bar",sizedBy:/\.fig-controls\s*\{[^}]*display\s*:/i}];function $m($){let Q=$.match(/<script\b[^>]*id=["']fig-manifest["'][^>]*>([\s\S]*?)<\/script>/i)?.[1];if(!Q)return null;try{return JSON.parse(Q)}catch{return null}}function Qm($,Q){return new RegExp(`class\\s*=\\s*["'][^"']*(?<![\\w-])${Q}(?![\\w-])`,"i").test($)}function Jm($){let Q=[],J=$m($),X=Array.isArray(J?.components)?J.components:[];Q.push({check:"manifest",ok:!!J,detail:J?"fig manifest present and parseable":"no readable fig manifest in the served HTML"});for(let{marker:G,component:q,sizedBy:W}of ef){if(!Qm($,G))continue;let z=W.test($);if(Q.push({check:`component:${q}`,ok:z,detail:z?`.${G} is used in markup and the served CSS sizes it`:`.${G} is used in markup but NO served CSS gives it dimensions — every one of them renders as an empty box`}),!X.includes(q)&&!z)Q.push({check:`manifest.components:${q}`,ok:!1,detail:`manifest components ${JSON.stringify(X)} omits "${q}" while the markup uses .${G}`})}let Y=J?.checks??{};if(Y.frameKit===!1)Q.push({check:"checks.frameKit",ok:!1,detail:"the fig records its own frame-kit contradiction — it draws a .fig-device but no frame geometry was stamped, so every phone renders with no dimensions"});if(Y.complete===!1)Q.push({check:"checks.complete",ok:!1,detail:"the document looks truncated (unclosed html/body — the generation was cut off)"});if(Y.doubleFramed===!0)Q.push({check:"checks.doubleFramed",ok:!1,detail:"declares a whole-fig figura:artboard meta AND draws an in-fig .fig-device — it renders framed twice"});return Q}async function Xm($){let{flags:Q,positionals:J}=Q0($),X=J[0];if(!X)P("Usage: figura fig verify <id> [--json]");let{token:Y,apiUrl:G}=await N0(Q),q;try{q=await d7(`/v1/figs/${encodeURIComponent(X)}/raw`,{token:Y,apiUrl:G,source:V0})}catch(V){P(a(V))}let W=Jm(q),z=W.filter((V)=>!V.ok);if(i(Q,"json")){if(L0({id:X,ok:z.length===0,findings:W}),z.length)process.exit(1);return}for(let V of W)process.stdout.write(`${V.ok?"ok ":"FAIL"} ${V.check} — ${V.detail}
|
|
476
|
+
`);if(z.length)process.stderr.write(`
|
|
477
|
+
figura: ${z.length} check(s) failed on the served fig — it will not render as authored.
|
|
418
478
|
`+`If a frame class is unsized, re-land the fig; the kit is stamped at save time.
|
|
419
479
|
`),process.exit(1);process.stdout.write(`
|
|
420
480
|
The served fig renders as authored.
|
|
421
|
-
`)}var
|
|
481
|
+
`)}var Pj=`<meta http-equiv="Content-Security-Policy" content="connect-src 'none'; base-uri 'none'; form-action 'none';">`;function Ym($){let Q=$.match(/<head[^>]*>/i);if(Q){let J=Q.index+Q[0].length;return $.slice(0,J)+Pj+$.slice(J)}return Pj+$}function Gm($){return`<!DOCTYPE html>
|
|
422
482
|
<html lang="en">
|
|
423
483
|
<head>
|
|
424
484
|
<meta charset="utf-8">
|
|
@@ -427,23 +487,23 @@ The served fig renders as authored.
|
|
|
427
487
|
<style>html,body{margin:0;height:100%;background:#0a0a0a}iframe{border:0;display:block;width:100vw;height:100vh}</style>
|
|
428
488
|
</head>
|
|
429
489
|
<body>
|
|
430
|
-
<iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${
|
|
490
|
+
<iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${Ym($).replace(/&/g,"&").replace(/"/g,""")}"></iframe>
|
|
431
491
|
</body>
|
|
432
492
|
</html>
|
|
433
|
-
`}async function
|
|
434
|
-
`);return}switch(
|
|
493
|
+
`}async function Aj($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(Oz+`
|
|
494
|
+
`);return}switch(Q){case"create":return ff(J);case"revise":return mf(J);case"revisions":return uf(J);case"request-feedback":return yf(J);case"update":return hf(J);case"delete":return pf(J);case"commit":return of(J);case"uncommit":return sf(J);case"publish":return rf(J);case"list":return nf(J);case"get":return df(J);case"buzz-payload":return af(J);case"scaffold":return gf(J);case"devices":return lf(J);case"open":return tf(J);case"verify":return Xm(J);default:P(`Unknown fig subcommand '${Q}'. See \`figura fig --help\`.`)}}N8();r0();var qm=`figura comment — add a comment to a fig
|
|
435
495
|
|
|
436
496
|
Usage:
|
|
437
|
-
figura comment <fig-id> --body "your comment" [--json]`;async function
|
|
438
|
-
`);return}let J
|
|
439
|
-
`)}
|
|
497
|
+
figura comment <fig-id> --body "your comment" [--json]`;async function Ej($){let{flags:Q,positionals:J}=Q0($);if(Q.help||Q.h){process.stdout.write(qm+`
|
|
498
|
+
`);return}let X=J[0];if(!X)P('Usage: figura comment <fig-id> --body "..."');let Y=h(Q,"body");if(!Y)P("--body is required.");let{token:G,apiUrl:q}=await N0(Q,{mutate:!0}),W;try{W=await z0(`/v1/figs/${encodeURIComponent(X)}/comments`,{method:"POST",body:{body:Y},token:G,apiUrl:q,source:V0})}catch(z){P(a(z))}if(i(Q,"json")){L0(W);return}process.stdout.write(`Comment ${W.id} added.
|
|
499
|
+
`)}N8();B8();r0();var Wm=`figura token — inspect API token state
|
|
440
500
|
|
|
441
501
|
Usage:
|
|
442
|
-
figura token current [--json] Show details of the active token`;async function
|
|
443
|
-
`);return}let
|
|
502
|
+
figura token current [--json] Show details of the active token`;async function zm($){let{flags:Q}=Q0($),J=await N0(Q),{token:X,apiUrl:Y,tokenSource:G,projectConfigPath:q}=J,W;try{W=await z0("/v1/whoami",{token:X,apiUrl:Y,source:V0})}catch(K){P(a(K))}let z={source:G,configPath:G==="project"?q:G==="global"?_8:null};if(i(Q,"json")){L0({token:W.token??null,team:W.team??null,scopes:W.scopes??[],binding:z});return}if(W.actor&&W.actor!=="token"){process.stdout.write(`The active credentials are a ${W.actor} session, not an API token.
|
|
503
|
+
`);return}let V=[];if(V.push(`id: ${W.token?.id??"-"}`),V.push(`name: ${W.token?.name??"-"}`),V.push(`prefix: ${W.token?.prefix??"-"}`),W.team)V.push(`team: ${W.team.slug??W.team.id??"-"}`);if(W.scopes?.length)V.push(`scopes: ${W.scopes.join(", ")}`);V.push(`bound: ${z.source}${z.configPath?` (${z.configPath})`:""}`),process.stdout.write(V.join(`
|
|
444
504
|
`)+`
|
|
445
|
-
`)}async function
|
|
446
|
-
`);return}switch(
|
|
505
|
+
`)}async function kj($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(Wm+`
|
|
506
|
+
`);return}switch(Q){case"current":return zm(J);default:P(`Unknown token subcommand '${Q}'. See \`figura token --help\`.`)}}N8();r0();var Vm=`figura sources — manage the company-brain source spine
|
|
447
507
|
|
|
448
508
|
Usage:
|
|
449
509
|
figura sources connect --kind <git|claude_mem> --ref <owner/repo> [options]
|
|
@@ -458,13 +518,13 @@ Connect options:
|
|
|
458
518
|
--export-path <str> claude_mem export file path (.json/.jsonl)
|
|
459
519
|
|
|
460
520
|
Sync:
|
|
461
|
-
--id <id> Sync one source; omit to sync every connected source`;async function
|
|
462
|
-
`);return}for(let
|
|
463
|
-
`)}}async function
|
|
464
|
-
`);return}for(let
|
|
465
|
-
`)}catch(
|
|
466
|
-
`)}}async function
|
|
467
|
-
`);return}switch(
|
|
521
|
+
--id <id> Sync one source; omit to sync every connected source`;async function Km($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"kind");if(!Y)P("--kind is required (git | claude_mem).");let G=h(Q,"ref"),q={},W=h(Q,"branch"),z=h(Q,"export-path");if(W!==void 0)q.defaultBranch=W;if(z!==void 0)q.exportPath=z;let V={kind:Y};if(G!==void 0)V.externalRef=G;let K=h(Q,"name");if(K!==void 0)V.displayName=K;if(Object.keys(q).length)V.config=q;let U;try{U=await z0("/v1/sources",{method:"POST",body:V,token:J,apiUrl:X,source:V0})}catch(x){P(a(x))}L0(U.source)}async function Um($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q),Y;try{Y=await z0("/v1/sources",{token:J,apiUrl:X,source:V0})}catch(q){P(a(q))}if(i(Q,"json")){L0(Y);return}let G=Y.sources??[];if(!G.length){process.stdout.write(`No sources connected.
|
|
522
|
+
`);return}for(let q of G){let W=q.lastSyncedAt?q.lastSyncedAt:"never";process.stdout.write(`${q.id} ${q.kind} ${q.externalRef??"-"} ${q.eventCount??0} events ${q.status??"-"} synced ${W}
|
|
523
|
+
`)}}async function cj($,Q,J){return z0(`/v1/sources/${encodeURIComponent($)}/sync`,{method:"POST",token:Q,apiUrl:J,source:V0})}async function xm($){let{flags:Q}=Q0($),{token:J,apiUrl:X}=await N0(Q,{mutate:!0}),Y=h(Q,"id");if(Y){try{L0({id:Y,...await cj(Y,J,X)})}catch(W){P(a(W))}return}let G;try{G=await z0("/v1/sources",{token:J,apiUrl:X,source:V0})}catch(W){P(a(W))}let q=G.sources??[];if(!q.length){process.stdout.write(`No sources to sync.
|
|
524
|
+
`);return}for(let W of q)try{let z=await cj(W.id,J,X);process.stdout.write(`${W.id} ${W.kind} ${W.externalRef??"-"} ingested ${z.ingested}/${z.fetched}
|
|
525
|
+
`)}catch(z){process.stderr.write(`${W.id} ERROR ${a(z)}
|
|
526
|
+
`)}}async function Sj($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(Vm+`
|
|
527
|
+
`);return}switch(Q){case"connect":return Km(J);case"list":return Um(J);case"sync":return xm(J);default:P(`Unknown sources subcommand '${Q}'. See \`figura sources --help\`.`)}}eJ();B8();import{spawn as Mm}from"node:child_process";import{existsSync as Hm}from"node:fs";import{fileURLToPath as Bm}from"node:url";var Zm=`figura mcp — run the Figura MCP server (stdio) for Claude Code
|
|
468
528
|
|
|
469
529
|
Usage:
|
|
470
530
|
figura mcp
|
|
@@ -475,11 +535,11 @@ Add it to Claude Code with:
|
|
|
475
535
|
Serves the same tools as the standalone figura-mcp package, but ships inside the
|
|
476
536
|
CLI (one install, nothing to fetch) and resolves your team from the nearest
|
|
477
537
|
.figura/config.json — so a per-project login (figura login --project) gives each
|
|
478
|
-
repo its own team automatically.`;function
|
|
538
|
+
repo its own team automatically.`;function wm(){let $=[new URL("./mcp.js",import.meta.url),new URL("../../../mcp/src/index.ts",import.meta.url)].map((Q)=>Bm(Q));for(let Q of $)if(Hm(Q))return Q;process.stderr.write(`figura: MCP server not found — reinstall figura-cli:
|
|
479
539
|
`+` curl -fsSL https://figura.so/install.sh | bash
|
|
480
|
-
`),process.exit(1)}async function
|
|
481
|
-
`);return}let
|
|
482
|
-
`),process.exit(1)}),Y.on("exit",(
|
|
540
|
+
`),process.exit(1)}async function bj($){if($.includes("--help")||$.includes("-h")){process.stdout.write(Zm+`
|
|
541
|
+
`);return}let Q=await s0({}),J={...process.env};if(Q.token&&!J.FIGURA_TOKEN)J.FIGURA_TOKEN=Q.token;if(Q.apiUrl&&!J.FIGURA_API_URL)J.FIGURA_API_URL=Q.apiUrl;let X=wm(),Y=Mm(process.execPath,[X],{stdio:"inherit",env:J});Y.on("error",(G)=>{process.stderr.write(`figura: failed to start MCP server: ${G.message}
|
|
542
|
+
`),process.exit(1)}),Y.on("exit",(G,q)=>{if(q)process.kill(process.pid,q);else process.exit(G??0)})}r0();n7();import{fileURLToPath as jm}from"node:url";var h6="figura-cli",Lm=`figura upgrade — print the command to update the Figura CLI
|
|
483
543
|
|
|
484
544
|
Usage:
|
|
485
545
|
figura upgrade [--version <v>]
|
|
@@ -493,18 +553,18 @@ no self-mutation. Copy the printed command and run it yourself.
|
|
|
493
553
|
|
|
494
554
|
Options:
|
|
495
555
|
--version <v> print the command for a specific version instead of latest
|
|
496
|
-
--help, -h show this help`;function
|
|
556
|
+
--help, -h show this help`;function Rm($,Q){let J=Q.replace(/\\/g,"/");if(J.includes("/_npx/")||$.npm_command==="exec")return"npx";if(J.includes("/.bun/install/cache/"))return"bunx";return null}function Dm($,Q){let J=$.generic?`Update ${h6} (and the bundled MCP server) with your package manager's global install, e.g.:`:`To update ${h6} (and the bundled MCP server), run:`,X=Q?"Your skills refresh automatically the next time Claude Code starts.":`Then finish the Claude Code integration (skills, auto-update, badge):
|
|
497
557
|
|
|
498
|
-
figura install`;return`${
|
|
558
|
+
figura install`;return`${J}
|
|
499
559
|
|
|
500
|
-
${
|
|
560
|
+
${$.command}
|
|
501
561
|
|
|
502
|
-
${
|
|
503
|
-
`}async function
|
|
504
|
-
`);return}let
|
|
562
|
+
${X}
|
|
563
|
+
`}async function fj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(Lm+`
|
|
564
|
+
`);return}let J=h(Q,"version")||"latest",X=jm(import.meta.url),Y=Rm(process.env,X);if(Y){process.stdout.write(`figura is running via ${Y} — there's no installed copy to update. `+`Rerun with @latest to get the newest:
|
|
505
565
|
|
|
506
|
-
${Y} ${
|
|
507
|
-
`);return}let
|
|
566
|
+
${Y} ${h6}@${J}
|
|
567
|
+
`);return}let G=await i7(h6,J),q=await Uj();process.stdout.write(Dm(G,q))}r0();IJ();B8();VY();eJ();EJ();import{homedir as _m}from"node:os";import{join as Nm}from"node:path";var vm=`figura doctor — check the CLI, MCP, and skills are up to date
|
|
508
568
|
|
|
509
569
|
Usage:
|
|
510
570
|
figura doctor [--session-start]
|
|
@@ -520,24 +580,24 @@ at \`figura upgrade\` / \`figura skill install\` if anything is behind.
|
|
|
520
580
|
(engine \`latest\`, hash-verified; bundled fallback offline) and,
|
|
521
581
|
if the CLI is behind, prints a one-line notice pointing at
|
|
522
582
|
\`figura upgrade\` — never self-executes, never blocks startup,
|
|
523
|
-
never errors out. The registry is checked at most once a day.`,
|
|
524
|
-
`)}async function
|
|
583
|
+
never errors out. The registry is checked at most once a day.`,qQ=Nm(_m(),".claude","skills"),mj=1500;async function Om($=4000){try{let{apiUrl:Q,token:J}=await s0({});return await s$(F8,{apiUrl:Q,token:J,timeoutMs:$})}catch{return null}}function yj($){let{stamp:Q,installedFigHash:J,stampedFigHash:X,referenceVersion:Y,referenceHash:G}=$,q=EY({stamp:Q,stampedHash:X,installedHash:J,referenceHash:G,referenceVersion:Y});return{status:q,behind:q==="behind",reference:Y}}var Fm=1e4;function Cm($,Q,J,X){if($)return $;return WY(Q,J,X).latest??null}async function Im(){let $=o8(),Q=Date.now(),J=[];try{let X=$X(qQ),Y=T$(qQ),G=QX(qQ),{apiUrl:q,token:W}=await s0({}).catch(()=>({apiUrl:void 0,token:void 0})),z=await s$(F8,{apiUrl:q,token:W,timeoutMs:mj}),V=z?.version??XQ(),K=z?.hash??P6(),{status:U,behind:x}=yj({stamp:X,installedFigHash:Y,stampedFigHash:G,referenceVersion:V,referenceHash:K});if(Y!=null&&U==="behind"){let M=await Zz(qQ,{apiUrl:q,token:W,timeoutMs:mj}).catch(()=>null);if(M)J.push(`skill was behind (${X??"?"} → ${V??"?"}); reinstalled from ${M.source}.`)}else if(U==="diverged"||U==="unstamped")J.push("your /fig skill differs from the canonical one: run `figura skill diff`.")}catch{}try{let X=await o$(),Y=$x(X,Q)?X.latest:void 0;if(!Y){let G=await qq(1500);if(G)Y=G,await zY({...X,latest:G,checkedAt:Q})}if(Y&&k8(Y,$))J.push(`figura-cli ${$} → ${Y}: run \`figura upgrade\` to update.`)}catch{}if(J.length)process.stdout.write("[figura] "+J.join(" ")+`
|
|
584
|
+
`)}async function Pm($){let Q=o8(),J=await qq(Fm),X=$X(qQ),Y=T$(qQ),G=QX(qQ),q={};try{q=await o$()}catch{}let{apiUrl:W}=await s0({apiUrlFlag:h($,"api-url")}).catch(()=>({apiUrl:""})),z=AJ(W),V=Cm(J,q,z,Date.now());if(J)try{await zY({...q,latest:J,checkedAt:Date.now()})}catch{}let K=await Om(),U=K?.version??XQ(),x=K?.hash??P6(),{status:M,behind:H}=yj({stamp:X,installedFigHash:Y,stampedFigHash:G,referenceVersion:U,referenceHash:x}),w=K?"":" (offline — vs bundled floor)",j=(()=>{switch(M){case"pristine":return`pristine (v${X??U??"?"})${w}`;case"behind":return`behind (v${X??"?"} → v${U??"?"}) — run \`figura skill install\`${w}`;case"ahead":return`AHEAD of the canonical /fig skill (v${X??"?"} > v${U??"?"}) — reinstalling would downgrade it; see \`figura skill diff\`${w}`;case"diverged":return`DIVERGED from the canonical /fig skill (same version line, different bytes) — run \`figura skill diff\` to see what differs${w}`;case"unstamped":return`UNSTAMPED (no .figura-version) and different from the canonical /fig skill — figura didn't install this copy; run \`figura skill diff\`, then \`figura skill install\` to adopt the canonical one${w}`;case"absent":return"not installed — run `figura skill install`";case"unknown":return"couldn't reach the skill registry and this build bundles no skill — nothing to compare against"}})(),Z=[];Z.push(`figura-cli ${Q}${V?` (latest ${V})`:" (latest: unknown)"}`),Z.push("MCP server bundled in the CLI — same version"),Z.push(`skill /fig ${X??"unstamped"}${U?` (canonical ${U})`:""} in ${qQ}`),Z.push(` ${j}`);let L=V&&k8(V,Q);Z.push(""),Z.push(L?`Update available (${Q} → ${V}): run \`figura upgrade\` for the command.`:H?"Your /fig skill is behind: run `figura skill install`.":M==="ahead"||M==="diverged"||M==="unstamped"?"Your /fig skill differs from the canonical one: run `figura skill diff` before you reinstall.":V?"✓ Everything is up to date.":"Couldn't reach the npm registry to check for a newer CLI — try again later."),process.stdout.write(Z.join(`
|
|
525
585
|
`)+`
|
|
526
|
-
`)}async function
|
|
527
|
-
`);return}if(k($,"session-start")){await G2().catch(()=>{});return}await z2($)}import{readFile as MZ}from"node:fs/promises";var E={};vQ(E,{void:()=>o2,util:()=>wc,unknown:()=>h2,union:()=>r2,undefined:()=>k2,tuple:()=>cD,transformer:()=>xD,symbol:()=>u2,string:()=>Kq,strictObject:()=>s2,setErrorMap:()=>M2,set:()=>JD,record:()=>$D,quotelessJson:()=>x2,promise:()=>zD,preprocess:()=>ND,pipeline:()=>VD,ostring:()=>wD,optional:()=>qD,onumber:()=>iD,oboolean:()=>vD,objectUtil:()=>RW,object:()=>d2,number:()=>Dq,nullable:()=>MD,null:()=>a2,never:()=>y2,nativeEnum:()=>GD,nan:()=>T2,map:()=>QD,makeIssue:()=>$J,literal:()=>WD,lazy:()=>XD,late:()=>b2,isValid:()=>p8,isDirty:()=>EY,isAsync:()=>y$,isAborted:()=>PY,intersection:()=>e2,instanceof:()=>F2,getParsedType:()=>s0,getErrorMap:()=>h$,function:()=>YD,enum:()=>mD,effect:()=>xD,discriminatedUnion:()=>t2,defaultErrorMap:()=>m8,datetimeRegex:()=>vq,date:()=>n2,custom:()=>jq,coerce:()=>UD,boolean:()=>Bq,bigint:()=>f2,array:()=>g2,any:()=>l2,addIssueToContext:()=>n,ZodVoid:()=>JJ,ZodUnknown:()=>I8,ZodUnion:()=>t$,ZodUndefined:()=>s$,ZodType:()=>Mc,ZodTuple:()=>t0,ZodTransformer:()=>l0,ZodSymbol:()=>QJ,ZodString:()=>n0,ZodSet:()=>W$,ZodSchema:()=>Mc,ZodRecord:()=>YJ,ZodReadonly:()=>XQ,ZodPromise:()=>m$,ZodPipeline:()=>mJ,ZodParsedType:()=>F,ZodOptional:()=>k0,ZodObject:()=>Cc,ZodNumber:()=>Z8,ZodNullable:()=>z8,ZodNull:()=>r$,ZodNever:()=>r0,ZodNativeEnum:()=>QQ,ZodNaN:()=>WJ,ZodMap:()=>XJ,ZodLiteral:()=>$Q,ZodLazy:()=>cQ,ZodIssueCode:()=>L,ZodIntersection:()=>e$,ZodFunction:()=>g$,ZodFirstPartyTypeKind:()=>Qc,ZodError:()=>x0,ZodEnum:()=>_8,ZodEffects:()=>l0,ZodDiscriminatedUnion:()=>bY,ZodDefault:()=>JQ,ZodDate:()=>Y$,ZodCatch:()=>YQ,ZodBranded:()=>FY,ZodBoolean:()=>d$,ZodBigInt:()=>L8,ZodArray:()=>u0,ZodAny:()=>X$,Schema:()=>Mc,ParseStatus:()=>oc,OK:()=>ec,NEVER:()=>jD,INVALID:()=>$c,EMPTY_PATH:()=>N2,DIRTY:()=>J$,BRAND:()=>E2});var wc;(function(c){c.assertEqual=(Y)=>{};function $(Y){}c.assertIs=$;function Q(Y){throw Error()}c.assertNever=Q,c.arrayToEnum=(Y)=>{let X={};for(let W of Y)X[W]=W;return X},c.getValidEnumValues=(Y)=>{let X=c.objectKeys(Y).filter((m)=>typeof Y[Y[m]]!=="number"),W={};for(let m of X)W[m]=Y[m];return c.objectValues(W)},c.objectValues=(Y)=>{return c.objectKeys(Y).map(function(X){return Y[X]})},c.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let X=[];for(let W in Y)if(Object.prototype.hasOwnProperty.call(Y,W))X.push(W);return X},c.find=(Y,X)=>{for(let W of Y)if(X(W))return W;return},c.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function J(Y,X=" | "){return Y.map((W)=>typeof W==="string"?`'${W}'`:W).join(X)}c.joinValues=J,c.jsonStringifyReplacer=(Y,X)=>{if(typeof X==="bigint")return X.toString();return X}})(wc||(wc={}));var RW;(function(c){c.mergeShapes=($,Q)=>{return{...$,...Q}}})(RW||(RW={}));var F=wc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s0=(c)=>{switch(typeof c){case"undefined":return F.undefined;case"string":return F.string;case"number":return Number.isNaN(c)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":if(Array.isArray(c))return F.array;if(c===null)return F.null;if(c.then&&typeof c.then==="function"&&c.catch&&typeof c.catch==="function")return F.promise;if(typeof Map<"u"&&c instanceof Map)return F.map;if(typeof Set<"u"&&c instanceof Set)return F.set;if(typeof Date<"u"&&c instanceof Date)return F.date;return F.object;default:return F.unknown}};var L=wc.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),x2=(c)=>{return JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:")};class x0 extends Error{get errors(){return this.issues}constructor(c){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=c}format(c){let $=c||function(Y){return Y.message},Q={_errors:[]},J=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union")X.unionErrors.map(J);else if(X.code==="invalid_return_type")J(X.returnTypeError);else if(X.code==="invalid_arguments")J(X.argumentsError);else if(X.path.length===0)Q._errors.push($(X));else{let W=Q,m=0;while(m<X.path.length){let G=X.path[m];if(m!==X.path.length-1)W[G]=W[G]||{_errors:[]};else W[G]=W[G]||{_errors:[]},W[G]._errors.push($(X));W=W[G],m++}}};return J(this),Q}static assert(c){if(!(c instanceof x0))throw Error(`Not a ZodError: ${c}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wc.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(c=($)=>$.message){let $={},Q=[];for(let J of this.issues)if(J.path.length>0){let Y=J.path[0];$[Y]=$[Y]||[],$[Y].push(c(J))}else Q.push(c(J));return{formErrors:Q,fieldErrors:$}}get formErrors(){return this.flatten()}}x0.create=(c)=>{return new x0(c)};var q2=(c,$)=>{let Q;switch(c.code){case L.invalid_type:if(c.received===F.undefined)Q="Required";else Q=`Expected ${c.expected}, received ${c.received}`;break;case L.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify(c.expected,wc.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:Q=`Unrecognized key(s) in object: ${wc.joinValues(c.keys,", ")}`;break;case L.invalid_union:Q="Invalid input";break;case L.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${wc.joinValues(c.options)}`;break;case L.invalid_enum_value:Q=`Invalid enum value. Expected ${wc.joinValues(c.options)}, received '${c.received}'`;break;case L.invalid_arguments:Q="Invalid function arguments";break;case L.invalid_return_type:Q="Invalid function return type";break;case L.invalid_date:Q="Invalid date";break;case L.invalid_string:if(typeof c.validation==="object")if("includes"in c.validation){if(Q=`Invalid input: must include "${c.validation.includes}"`,typeof c.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${c.validation.position}`}else if("startsWith"in c.validation)Q=`Invalid input: must start with "${c.validation.startsWith}"`;else if("endsWith"in c.validation)Q=`Invalid input: must end with "${c.validation.endsWith}"`;else wc.assertNever(c.validation);else if(c.validation!=="regex")Q=`Invalid ${c.validation}`;else Q="Invalid";break;case L.too_small:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at least":"more than"} ${c.minimum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at least":"over"} ${c.minimum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="bigint")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(c.minimum))}`;else Q="Invalid input";break;case L.too_big:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at most":"less than"} ${c.maximum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at most":"under"} ${c.maximum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="bigint")Q=`BigInt must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly":c.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(c.maximum))}`;else Q="Invalid input";break;case L.custom:Q="Invalid input";break;case L.invalid_intersection_types:Q="Intersection results could not be merged";break;case L.not_multiple_of:Q=`Number must be a multiple of ${c.multipleOf}`;break;case L.not_finite:Q="Number must be finite";break;default:Q=$.defaultError,wc.assertNever(c)}return{message:Q}},m8=q2;var Mq=m8;function M2(c){Mq=c}function h$(){return Mq}var $J=(c)=>{let{data:$,path:Q,errorMaps:J,issueData:Y}=c,X=[...Q,...Y.path||[]],W={...Y,path:X};if(Y.message!==void 0)return{...Y,path:X,message:Y.message};let m="",G=J.filter((z)=>!!z).slice().reverse();for(let z of G)m=z(W,{data:$,defaultError:m}).message;return{...Y,path:X,message:m}},N2=[];function n(c,$){let Q=h$(),J=$J({issueData:$,data:c.data,path:c.path,errorMaps:[c.common.contextualErrorMap,c.schemaErrorMap,Q,Q===m8?void 0:m8].filter((Y)=>!!Y)});c.common.issues.push(J)}class oc{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(c,$){let Q=[];for(let J of $){if(J.status==="aborted")return $c;if(J.status==="dirty")c.dirty();Q.push(J.value)}return{status:c.value,value:Q}}static async mergeObjectAsync(c,$){let Q=[];for(let J of $){let Y=await J.key,X=await J.value;Q.push({key:Y,value:X})}return oc.mergeObjectSync(c,Q)}static mergeObjectSync(c,$){let Q={};for(let J of $){let{key:Y,value:X}=J;if(Y.status==="aborted")return $c;if(X.status==="aborted")return $c;if(Y.status==="dirty")c.dirty();if(X.status==="dirty")c.dirty();if(Y.value!=="__proto__"&&(typeof X.value<"u"||J.alwaysSet))Q[Y.value]=X.value}return{status:c.value,value:Q}}}var $c=Object.freeze({status:"aborted"}),J$=(c)=>({status:"dirty",value:c}),ec=(c)=>({status:"valid",value:c}),PY=(c)=>c.status==="aborted",EY=(c)=>c.status==="dirty",p8=(c)=>c.status==="valid",y$=(c)=>typeof Promise<"u"&&c instanceof Promise;var s;(function(c){c.errToObj=($)=>typeof $==="string"?{message:$}:$||{},c.toString=($)=>typeof $==="string"?$:$?.message})(s||(s={}));class a0{constructor(c,$,Q,J){this._cachedPath=[],this.parent=c,this.data=$,this._path=Q,this._key=J}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var Nq=(c,$)=>{if(p8($))return{success:!0,data:$.value};else{if(!c.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new x0(c.common.issues);return this._error=Q,this._error}}}};function zc(c){if(!c)return{};let{errorMap:$,invalid_type_error:Q,required_error:J,description:Y}=c;if($&&(Q||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:Y};return{errorMap:(W,m)=>{let{message:G}=c;if(W.code==="invalid_enum_value")return{message:G??m.defaultError};if(typeof m.data>"u")return{message:G??J??m.defaultError};if(W.code!=="invalid_type")return{message:m.defaultError};return{message:G??Q??m.defaultError}},description:Y}}class Mc{get description(){return this._def.description}_getType(c){return s0(c.data)}_getOrReturnCtx(c,$){return $||{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}_processInputParams(c){return{status:new oc,ctx:{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}}_parseSync(c){let $=this._parse(c);if(y$($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(c){let $=this._parse(c);return Promise.resolve($)}parse(c,$){let Q=this.safeParse(c,$);if(Q.success)return Q.data;throw Q.error}safeParse(c,$){let Q={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parseSync({data:c,path:Q.path,parent:Q});return Nq(Q,J)}"~validate"(c){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)};if(!this["~standard"].async)try{let Q=this._parseSync({data:c,path:[],parent:$});return p8(Q)?{value:Q.value}:{issues:$.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:c,path:[],parent:$}).then((Q)=>p8(Q)?{value:Q.value}:{issues:$.common.issues})}async parseAsync(c,$){let Q=await this.safeParseAsync(c,$);if(Q.success)return Q.data;throw Q.error}async safeParseAsync(c,$){let Q={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parse({data:c,path:Q.path,parent:Q}),Y=await(y$(J)?J:Promise.resolve(J));return Nq(Q,Y)}refine(c,$){let Q=(J)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(J);else return $};return this._refinement((J,Y)=>{let X=c(J),W=()=>Y.addIssue({code:L.custom,...Q(J)});if(typeof Promise<"u"&&X instanceof Promise)return X.then((m)=>{if(!m)return W(),!1;else return!0});if(!X)return W(),!1;else return!0})}refinement(c,$){return this._refinement((Q,J)=>{if(!c(Q))return J.addIssue(typeof $==="function"?$(Q,J):$),!1;else return!0})}_refinement(c){return new l0({schema:this,typeName:Qc.ZodEffects,effect:{type:"refinement",refinement:c}})}superRefine(c){return this._refinement(c)}constructor(c){this.spa=this.safeParseAsync,this._def=c,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:($)=>this["~validate"]($)}}optional(){return k0.create(this,this._def)}nullable(){return z8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return u0.create(this)}promise(){return m$.create(this,this._def)}or(c){return t$.create([this,c],this._def)}and(c){return e$.create(this,c,this._def)}transform(c){return new l0({...zc(this._def),schema:this,typeName:Qc.ZodEffects,effect:{type:"transform",transform:c}})}default(c){let $=typeof c==="function"?c:()=>c;return new JQ({...zc(this._def),innerType:this,defaultValue:$,typeName:Qc.ZodDefault})}brand(){return new FY({typeName:Qc.ZodBranded,type:this,...zc(this._def)})}catch(c){let $=typeof c==="function"?c:()=>c;return new YQ({...zc(this._def),innerType:this,catchValue:$,typeName:Qc.ZodCatch})}describe(c){return new this.constructor({...this._def,description:c})}pipe(c){return mJ.create(this,c)}readonly(){return XQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var V2=/^c[^\s-]{8,}$/i,w2=/^[0-9a-z]+$/,i2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,v2=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,U2=/^[a-z0-9_-]{21}$/i,j2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,K2=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,D2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,B2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pW,H2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,O2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,R2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,p2=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Z2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wq="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L2=new RegExp(`^${wq}$`);function iq(c){let $="[0-5]\\d";if(c.precision)$=`${$}\\.\\d{${c.precision}}`;else if(c.precision==null)$=`${$}(\\.\\d+)?`;let Q=c.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${Q}`}function _2(c){return new RegExp(`^${iq(c)}$`)}function vq(c){let $=`${wq}T${iq(c)}`,Q=[];if(Q.push(c.local?"Z?":"Z"),c.offset)Q.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${Q.join("|")})`,new RegExp(`^${$}$`)}function S2(c,$){if(($==="v4"||!$)&&H2.test(c))return!0;if(($==="v6"||!$)&&R2.test(c))return!0;return!1}function A2(c,$){if(!j2.test(c))return!1;try{let[Q]=c.split(".");if(!Q)return!1;let J=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),Y=JSON.parse(atob(J));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if($&&Y.alg!==$)return!1;return!0}catch{return!1}}function C2(c,$){if(($==="v4"||!$)&&O2.test(c))return!0;if(($==="v6"||!$)&&p2.test(c))return!0;return!1}class n0 extends Mc{_parse(c){if(this._def.coerce)c.data=String(c.data);if(this._getType(c)!==F.string){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.string,received:Y.parsedType}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.length<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="max"){if(c.data.length>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="length"){let X=c.data.length>Y.value,W=c.data.length<Y.value;if(X||W){if(J=this._getOrReturnCtx(c,J),X)n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(W)n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});Q.dirty()}}else if(Y.kind==="email"){if(!D2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"email",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="emoji"){if(!pW)pW=new RegExp(B2,"u");if(!pW.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"emoji",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="uuid"){if(!v2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"uuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="nanoid"){if(!U2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"nanoid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid"){if(!V2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid2"){if(!w2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid2",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ulid"){if(!i2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"ulid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="url")try{new URL(c.data)}catch{J=this._getOrReturnCtx(c,J),n(J,{validation:"url",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"regex",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="trim")c.data=c.data.trim();else if(Y.kind==="includes"){if(!c.data.includes(Y.value,Y.position))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),Q.dirty()}else if(Y.kind==="toLowerCase")c.data=c.data.toLowerCase();else if(Y.kind==="toUpperCase")c.data=c.data.toUpperCase();else if(Y.kind==="startsWith"){if(!c.data.startsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{startsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="endsWith"){if(!c.data.endsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{endsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="datetime"){if(!vq(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"datetime",message:Y.message}),Q.dirty()}else if(Y.kind==="date"){if(!L2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"date",message:Y.message}),Q.dirty()}else if(Y.kind==="time"){if(!_2(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"time",message:Y.message}),Q.dirty()}else if(Y.kind==="duration"){if(!K2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"duration",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ip"){if(!S2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"ip",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="jwt"){if(!A2(c.data,Y.alg))J=this._getOrReturnCtx(c,J),n(J,{validation:"jwt",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cidr"){if(!C2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"cidr",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64"){if(!I2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64url"){if(!Z2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64url",code:L.invalid_string,message:Y.message}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:c.data}}_regex(c,$,Q){return this.refinement((J)=>c.test(J),{validation:$,code:L.invalid_string,...s.errToObj(Q)})}_addCheck(c){return new n0({...this._def,checks:[...this._def.checks,c]})}email(c){return this._addCheck({kind:"email",...s.errToObj(c)})}url(c){return this._addCheck({kind:"url",...s.errToObj(c)})}emoji(c){return this._addCheck({kind:"emoji",...s.errToObj(c)})}uuid(c){return this._addCheck({kind:"uuid",...s.errToObj(c)})}nanoid(c){return this._addCheck({kind:"nanoid",...s.errToObj(c)})}cuid(c){return this._addCheck({kind:"cuid",...s.errToObj(c)})}cuid2(c){return this._addCheck({kind:"cuid2",...s.errToObj(c)})}ulid(c){return this._addCheck({kind:"ulid",...s.errToObj(c)})}base64(c){return this._addCheck({kind:"base64",...s.errToObj(c)})}base64url(c){return this._addCheck({kind:"base64url",...s.errToObj(c)})}jwt(c){return this._addCheck({kind:"jwt",...s.errToObj(c)})}ip(c){return this._addCheck({kind:"ip",...s.errToObj(c)})}cidr(c){return this._addCheck({kind:"cidr",...s.errToObj(c)})}datetime(c){if(typeof c==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:c});return this._addCheck({kind:"datetime",precision:typeof c?.precision>"u"?null:c?.precision,offset:c?.offset??!1,local:c?.local??!1,...s.errToObj(c?.message)})}date(c){return this._addCheck({kind:"date",message:c})}time(c){if(typeof c==="string")return this._addCheck({kind:"time",precision:null,message:c});return this._addCheck({kind:"time",precision:typeof c?.precision>"u"?null:c?.precision,...s.errToObj(c?.message)})}duration(c){return this._addCheck({kind:"duration",...s.errToObj(c)})}regex(c,$){return this._addCheck({kind:"regex",regex:c,...s.errToObj($)})}includes(c,$){return this._addCheck({kind:"includes",value:c,position:$?.position,...s.errToObj($?.message)})}startsWith(c,$){return this._addCheck({kind:"startsWith",value:c,...s.errToObj($)})}endsWith(c,$){return this._addCheck({kind:"endsWith",value:c,...s.errToObj($)})}min(c,$){return this._addCheck({kind:"min",value:c,...s.errToObj($)})}max(c,$){return this._addCheck({kind:"max",value:c,...s.errToObj($)})}length(c,$){return this._addCheck({kind:"length",value:c,...s.errToObj($)})}nonempty(c){return this.min(1,s.errToObj(c))}trim(){return new n0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((c)=>c.kind==="datetime")}get isDate(){return!!this._def.checks.find((c)=>c.kind==="date")}get isTime(){return!!this._def.checks.find((c)=>c.kind==="time")}get isDuration(){return!!this._def.checks.find((c)=>c.kind==="duration")}get isEmail(){return!!this._def.checks.find((c)=>c.kind==="email")}get isURL(){return!!this._def.checks.find((c)=>c.kind==="url")}get isEmoji(){return!!this._def.checks.find((c)=>c.kind==="emoji")}get isUUID(){return!!this._def.checks.find((c)=>c.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((c)=>c.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((c)=>c.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((c)=>c.kind==="cuid2")}get isULID(){return!!this._def.checks.find((c)=>c.kind==="ulid")}get isIP(){return!!this._def.checks.find((c)=>c.kind==="ip")}get isCIDR(){return!!this._def.checks.find((c)=>c.kind==="cidr")}get isBase64(){return!!this._def.checks.find((c)=>c.kind==="base64")}get isBase64url(){return!!this._def.checks.find((c)=>c.kind==="base64url")}get minLength(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxLength(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}n0.create=(c)=>{return new n0({checks:[],typeName:Qc.ZodString,coerce:c?.coerce??!1,...zc(c)})};function P2(c,$){let Q=(c.toString().split(".")[1]||"").length,J=($.toString().split(".")[1]||"").length,Y=Q>J?Q:J,X=Number.parseInt(c.toFixed(Y).replace(".","")),W=Number.parseInt($.toFixed(Y).replace(".",""));return X%W/10**Y}class Z8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(c){if(this._def.coerce)c.data=Number(c.data);if(this._getType(c)!==F.number){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.number,received:Y.parsedType}),$c}let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="int"){if(!wc.isInteger(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.invalid_type,expected:"integer",received:"float",message:Y.message}),J.dirty()}else if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(P2(c.data,Y.value)!==0)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_finite,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new Z8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new Z8({...this._def,checks:[...this._def.checks,c]})}int(c){return this._addCheck({kind:"int",message:s.toString(c)})}positive(c){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}finite(c){return this._addCheck({kind:"finite",message:s.toString(c)})}safe(c){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(c)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(c)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}get isInt(){return!!this._def.checks.find((c)=>c.kind==="int"||c.kind==="multipleOf"&&wc.isInteger(c.value))}get isFinite(){let c=null,$=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}else if(Q.kind==="max"){if(c===null||Q.value<c)c=Q.value}return Number.isFinite($)&&Number.isFinite(c)}}Z8.create=(c)=>{return new Z8({checks:[],typeName:Qc.ZodNumber,coerce:c?.coerce||!1,...zc(c)})};class L8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(c){if(this._def.coerce)try{c.data=BigInt(c.data)}catch{return this._getInvalidInput(c)}if(this._getType(c)!==F.bigint)return this._getInvalidInput(c);let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(c.data%Y.value!==BigInt(0))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}_getInvalidInput(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.bigint,received:$.parsedType}),$c}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new L8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new L8({...this._def,checks:[...this._def.checks,c]})}positive(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}L8.create=(c)=>{return new L8({checks:[],typeName:Qc.ZodBigInt,coerce:c?.coerce??!1,...zc(c)})};class d$ extends Mc{_parse(c){if(this._def.coerce)c.data=Boolean(c.data);if(this._getType(c)!==F.boolean){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.boolean,received:Q.parsedType}),$c}return ec(c.data)}}d$.create=(c)=>{return new d$({typeName:Qc.ZodBoolean,coerce:c?.coerce||!1,...zc(c)})};class Y$ extends Mc{_parse(c){if(this._def.coerce)c.data=new Date(c.data);if(this._getType(c)!==F.date){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.date,received:Y.parsedType}),$c}if(Number.isNaN(c.data.getTime())){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_date}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.getTime()<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),Q.dirty()}else if(Y.kind==="max"){if(c.data.getTime()>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:new Date(c.data.getTime())}}_addCheck(c){return new Y$({...this._def,checks:[...this._def.checks,c]})}min(c,$){return this._addCheck({kind:"min",value:c.getTime(),message:s.toString($)})}max(c,$){return this._addCheck({kind:"max",value:c.getTime(),message:s.toString($)})}get minDate(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c!=null?new Date(c):null}get maxDate(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c!=null?new Date(c):null}}Y$.create=(c)=>{return new Y$({checks:[],coerce:c?.coerce||!1,typeName:Qc.ZodDate,...zc(c)})};class QJ extends Mc{_parse(c){if(this._getType(c)!==F.symbol){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.symbol,received:Q.parsedType}),$c}return ec(c.data)}}QJ.create=(c)=>{return new QJ({typeName:Qc.ZodSymbol,...zc(c)})};class s$ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.undefined,received:Q.parsedType}),$c}return ec(c.data)}}s$.create=(c)=>{return new s$({typeName:Qc.ZodUndefined,...zc(c)})};class r$ extends Mc{_parse(c){if(this._getType(c)!==F.null){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.null,received:Q.parsedType}),$c}return ec(c.data)}}r$.create=(c)=>{return new r$({typeName:Qc.ZodNull,...zc(c)})};class X$ extends Mc{constructor(){super(...arguments);this._any=!0}_parse(c){return ec(c.data)}}X$.create=(c)=>{return new X$({typeName:Qc.ZodAny,...zc(c)})};class I8 extends Mc{constructor(){super(...arguments);this._unknown=!0}_parse(c){return ec(c.data)}}I8.create=(c)=>{return new I8({typeName:Qc.ZodUnknown,...zc(c)})};class r0 extends Mc{_parse(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.never,received:$.parsedType}),$c}}r0.create=(c)=>{return new r0({typeName:Qc.ZodNever,...zc(c)})};class JJ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.void,received:Q.parsedType}),$c}return ec(c.data)}}JJ.create=(c)=>{return new JJ({typeName:Qc.ZodVoid,...zc(c)})};class u0 extends Mc{_parse(c){let{ctx:$,status:Q}=this._processInputParams(c),J=this._def;if($.parsedType!==F.array)return n($,{code:L.invalid_type,expected:F.array,received:$.parsedType}),$c;if(J.exactLength!==null){let X=$.data.length>J.exactLength.value,W=$.data.length<J.exactLength.value;if(X||W)n($,{code:X?L.too_big:L.too_small,minimum:W?J.exactLength.value:void 0,maximum:X?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),Q.dirty()}if(J.minLength!==null){if($.data.length<J.minLength.value)n($,{code:L.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),Q.dirty()}if(J.maxLength!==null){if($.data.length>J.maxLength.value)n($,{code:L.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),Q.dirty()}if($.common.async)return Promise.all([...$.data].map((X,W)=>{return J.type._parseAsync(new a0($,X,$.path,W))})).then((X)=>{return oc.mergeArray(Q,X)});let Y=[...$.data].map((X,W)=>{return J.type._parseSync(new a0($,X,$.path,W))});return oc.mergeArray(Q,Y)}get element(){return this._def.type}min(c,$){return new u0({...this._def,minLength:{value:c,message:s.toString($)}})}max(c,$){return new u0({...this._def,maxLength:{value:c,message:s.toString($)}})}length(c,$){return new u0({...this._def,exactLength:{value:c,message:s.toString($)}})}nonempty(c){return this.min(1,c)}}u0.create=(c,$)=>{return new u0({type:c,minLength:null,maxLength:null,exactLength:null,typeName:Qc.ZodArray,...zc($)})};function o$(c){if(c instanceof Cc){let $={};for(let Q in c.shape){let J=c.shape[Q];$[Q]=k0.create(o$(J))}return new Cc({...c._def,shape:()=>$})}else if(c instanceof u0)return new u0({...c._def,type:o$(c.element)});else if(c instanceof k0)return k0.create(o$(c.unwrap()));else if(c instanceof z8)return z8.create(o$(c.unwrap()));else if(c instanceof t0)return t0.create(c.items.map(($)=>o$($)));else return c}class Cc extends Mc{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let c=this._def.shape(),$=wc.objectKeys(c);return this._cached={shape:c,keys:$},this._cached}_parse(c){if(this._getType(c)!==F.object){let G=this._getOrReturnCtx(c);return n(G,{code:L.invalid_type,expected:F.object,received:G.parsedType}),$c}let{status:Q,ctx:J}=this._processInputParams(c),{shape:Y,keys:X}=this._getCached(),W=[];if(!(this._def.catchall instanceof r0&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!X.includes(G))W.push(G)}let m=[];for(let G of X){let z=Y[G],x=J.data[G];m.push({key:{status:"valid",value:G},value:z._parse(new a0(J,x,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof r0){let G=this._def.unknownKeys;if(G==="passthrough")for(let z of W)m.push({key:{status:"valid",value:z},value:{status:"valid",value:J.data[z]}});else if(G==="strict"){if(W.length>0)n(J,{code:L.unrecognized_keys,keys:W}),Q.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let z of W){let x=J.data[z];m.push({key:{status:"valid",value:z},value:G._parse(new a0(J,x,J.path,z)),alwaysSet:z in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let z of m){let x=await z.key,q=await z.value;G.push({key:x,value:q,alwaysSet:z.alwaysSet})}return G}).then((G)=>{return oc.mergeObjectSync(Q,G)});else return oc.mergeObjectSync(Q,m)}get shape(){return this._def.shape()}strict(c){return s.errToObj,new Cc({...this._def,unknownKeys:"strict",...c!==void 0?{errorMap:($,Q)=>{let J=this._def.errorMap?.($,Q).message??Q.defaultError;if($.code==="unrecognized_keys")return{message:s.errToObj(c).message??J};return{message:J}}}:{}})}strip(){return new Cc({...this._def,unknownKeys:"strip"})}passthrough(){return new Cc({...this._def,unknownKeys:"passthrough"})}extend(c){return new Cc({...this._def,shape:()=>({...this._def.shape(),...c})})}merge(c){return new Cc({unknownKeys:c._def.unknownKeys,catchall:c._def.catchall,shape:()=>({...this._def.shape(),...c._def.shape()}),typeName:Qc.ZodObject})}setKey(c,$){return this.augment({[c]:$})}catchall(c){return new Cc({...this._def,catchall:c})}pick(c){let $={};for(let Q of wc.objectKeys(c))if(c[Q]&&this.shape[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}omit(c){let $={};for(let Q of wc.objectKeys(this.shape))if(!c[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}deepPartial(){return o$(this)}partial(c){let $={};for(let Q of wc.objectKeys(this.shape)){let J=this.shape[Q];if(c&&!c[Q])$[Q]=J;else $[Q]=J.optional()}return new Cc({...this._def,shape:()=>$})}required(c){let $={};for(let Q of wc.objectKeys(this.shape))if(c&&!c[Q])$[Q]=this.shape[Q];else{let Y=this.shape[Q];while(Y instanceof k0)Y=Y._def.innerType;$[Q]=Y}return new Cc({...this._def,shape:()=>$})}keyof(){return Uq(wc.objectKeys(this.shape))}}Cc.create=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.strictCreate=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strict",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.lazycreate=(c,$)=>{return new Cc({shape:c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};class t$ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=this._def.options;function J(Y){for(let W of Y)if(W.result.status==="valid")return W.result;for(let W of Y)if(W.result.status==="dirty")return $.common.issues.push(...W.ctx.common.issues),W.result;let X=Y.map((W)=>new x0(W.ctx.common.issues));return n($,{code:L.invalid_union,unionErrors:X}),$c}if($.common.async)return Promise.all(Q.map(async(Y)=>{let X={...$,common:{...$.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:$.data,path:$.path,parent:X}),ctx:X}})).then(J);else{let Y=void 0,X=[];for(let m of Q){let G={...$,common:{...$.common,issues:[]},parent:null},z=m._parseSync({data:$.data,path:$.path,parent:G});if(z.status==="valid")return z;else if(z.status==="dirty"&&!Y)Y={result:z,ctx:G};if(G.common.issues.length)X.push(G.common.issues)}if(Y)return $.common.issues.push(...Y.ctx.common.issues),Y.result;let W=X.map((m)=>new x0(m));return n($,{code:L.invalid_union,unionErrors:W}),$c}}get options(){return this._def.options}}t$.create=(c,$)=>{return new t$({options:c,typeName:Qc.ZodUnion,...zc($)})};var G8=(c)=>{if(c instanceof cQ)return G8(c.schema);else if(c instanceof l0)return G8(c.innerType());else if(c instanceof $Q)return[c.value];else if(c instanceof _8)return c.options;else if(c instanceof QQ)return wc.objectValues(c.enum);else if(c instanceof JQ)return G8(c._def.innerType);else if(c instanceof s$)return[void 0];else if(c instanceof r$)return[null];else if(c instanceof k0)return[void 0,...G8(c.unwrap())];else if(c instanceof z8)return[null,...G8(c.unwrap())];else if(c instanceof FY)return G8(c.unwrap());else if(c instanceof XQ)return G8(c.unwrap());else if(c instanceof YQ)return G8(c._def.innerType);else return[]};class bY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.object)return n($,{code:L.invalid_type,expected:F.object,received:$.parsedType}),$c;let Q=this.discriminator,J=$.data[Q],Y=this.optionsMap.get(J);if(!Y)return n($,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),$c;if($.common.async)return Y._parseAsync({data:$.data,path:$.path,parent:$});else return Y._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(c,$,Q){let J=new Map;for(let Y of $){let X=G8(Y.shape[c]);if(!X.length)throw Error(`A discriminator value for key \`${c}\` could not be extracted from all schema options`);for(let W of X){if(J.has(W))throw Error(`Discriminator property ${String(c)} has duplicate value ${String(W)}`);J.set(W,Y)}}return new bY({typeName:Qc.ZodDiscriminatedUnion,discriminator:c,options:$,optionsMap:J,...zc(Q)})}}function IW(c,$){let Q=s0(c),J=s0($);if(c===$)return{valid:!0,data:c};else if(Q===F.object&&J===F.object){let Y=wc.objectKeys($),X=wc.objectKeys(c).filter((m)=>Y.indexOf(m)!==-1),W={...c,...$};for(let m of X){let G=IW(c[m],$[m]);if(!G.valid)return{valid:!1};W[m]=G.data}return{valid:!0,data:W}}else if(Q===F.array&&J===F.array){if(c.length!==$.length)return{valid:!1};let Y=[];for(let X=0;X<c.length;X++){let W=c[X],m=$[X],G=IW(W,m);if(!G.valid)return{valid:!1};Y.push(G.data)}return{valid:!0,data:Y}}else if(Q===F.date&&J===F.date&&+c===+$)return{valid:!0,data:c};else return{valid:!1}}class e$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=(Y,X)=>{if(PY(Y)||PY(X))return $c;let W=IW(Y.value,X.value);if(!W.valid)return n(Q,{code:L.invalid_intersection_types}),$c;if(EY(Y)||EY(X))$.dirty();return{status:$.value,value:W.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([Y,X])=>J(Y,X));else return J(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}e$.create=(c,$,Q)=>{return new e$({left:c,right:$,typeName:Qc.ZodIntersection,...zc(Q)})};class t0 extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.array)return n(Q,{code:L.invalid_type,expected:F.array,received:Q.parsedType}),$c;if(Q.data.length<this._def.items.length)return n(Q,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$c;if(!this._def.rest&&Q.data.length>this._def.items.length)n(Q,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let Y=[...Q.data].map((X,W)=>{let m=this._def.items[W]||this._def.rest;if(!m)return null;return m._parse(new a0(Q,X,Q.path,W))}).filter((X)=>!!X);if(Q.common.async)return Promise.all(Y).then((X)=>{return oc.mergeArray($,X)});else return oc.mergeArray($,Y)}get items(){return this._def.items}rest(c){return new t0({...this._def,rest:c})}}t0.create=(c,$)=>{if(!Array.isArray(c))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new t0({items:c,typeName:Qc.ZodTuple,rest:null,...zc($)})};class YJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.object)return n(Q,{code:L.invalid_type,expected:F.object,received:Q.parsedType}),$c;let J=[],Y=this._def.keyType,X=this._def.valueType;for(let W in Q.data)J.push({key:Y._parse(new a0(Q,W,Q.path,W)),value:X._parse(new a0(Q,Q.data[W],Q.path,W)),alwaysSet:W in Q.data});if(Q.common.async)return oc.mergeObjectAsync($,J);else return oc.mergeObjectSync($,J)}get element(){return this._def.valueType}static create(c,$,Q){if($ instanceof Mc)return new YJ({keyType:c,valueType:$,typeName:Qc.ZodRecord,...zc(Q)});return new YJ({keyType:n0.create(),valueType:c,typeName:Qc.ZodRecord,...zc($)})}}class XJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.map)return n(Q,{code:L.invalid_type,expected:F.map,received:Q.parsedType}),$c;let J=this._def.keyType,Y=this._def.valueType,X=[...Q.data.entries()].map(([W,m],G)=>{return{key:J._parse(new a0(Q,W,Q.path,[G,"key"])),value:Y._parse(new a0(Q,m,Q.path,[G,"value"]))}});if(Q.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let m of X){let G=await m.key,z=await m.value;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}})}else{let W=new Map;for(let m of X){let{key:G,value:z}=m;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}}}}XJ.create=(c,$,Q)=>{return new XJ({valueType:$,keyType:c,typeName:Qc.ZodMap,...zc(Q)})};class W$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.set)return n(Q,{code:L.invalid_type,expected:F.set,received:Q.parsedType}),$c;let J=this._def;if(J.minSize!==null){if(Q.data.size<J.minSize.value)n(Q,{code:L.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),$.dirty()}if(J.maxSize!==null){if(Q.data.size>J.maxSize.value)n(Q,{code:L.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),$.dirty()}let Y=this._def.valueType;function X(m){let G=new Set;for(let z of m){if(z.status==="aborted")return $c;if(z.status==="dirty")$.dirty();G.add(z.value)}return{status:$.value,value:G}}let W=[...Q.data.values()].map((m,G)=>Y._parse(new a0(Q,m,Q.path,G)));if(Q.common.async)return Promise.all(W).then((m)=>X(m));else return X(W)}min(c,$){return new W$({...this._def,minSize:{value:c,message:s.toString($)}})}max(c,$){return new W$({...this._def,maxSize:{value:c,message:s.toString($)}})}size(c,$){return this.min(c,$).max(c,$)}nonempty(c){return this.min(1,c)}}W$.create=(c,$)=>{return new W$({valueType:c,minSize:null,maxSize:null,typeName:Qc.ZodSet,...zc($)})};class g$ extends Mc{constructor(){super(...arguments);this.validate=this.implement}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.function)return n($,{code:L.invalid_type,expected:F.function,received:$.parsedType}),$c;function Q(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_arguments,argumentsError:m}})}function J(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_return_type,returnTypeError:m}})}let Y={errorMap:$.common.contextualErrorMap},X=$.data;if(this._def.returns instanceof m$){let W=this;return ec(async function(...m){let G=new x0([]),z=await W._def.args.parseAsync(m,Y).catch((M)=>{throw G.addIssue(Q(m,M)),G}),x=await Reflect.apply(X,this,z);return await W._def.returns._def.type.parseAsync(x,Y).catch((M)=>{throw G.addIssue(J(x,M)),G})})}else{let W=this;return ec(function(...m){let G=W._def.args.safeParse(m,Y);if(!G.success)throw new x0([Q(m,G.error)]);let z=Reflect.apply(X,this,G.data),x=W._def.returns.safeParse(z,Y);if(!x.success)throw new x0([J(z,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...c){return new g$({...this._def,args:t0.create(c).rest(I8.create())})}returns(c){return new g$({...this._def,returns:c})}implement(c){return this.parse(c)}strictImplement(c){return this.parse(c)}static create(c,$,Q){return new g$({args:c?c:t0.create([]).rest(I8.create()),returns:$||I8.create(),typeName:Qc.ZodFunction,...zc(Q)})}}class cQ extends Mc{get schema(){return this._def.getter()}_parse(c){let{ctx:$}=this._processInputParams(c);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}cQ.create=(c,$)=>{return new cQ({getter:c,typeName:Qc.ZodLazy,...zc($)})};class $Q extends Mc{_parse(c){if(c.data!==this._def.value){let $=this._getOrReturnCtx(c);return n($,{received:$.data,code:L.invalid_literal,expected:this._def.value}),$c}return{status:"valid",value:c.data}}get value(){return this._def.value}}$Q.create=(c,$)=>{return new $Q({value:c,typeName:Qc.ZodLiteral,...zc($)})};function Uq(c,$){return new _8({values:c,typeName:Qc.ZodEnum,...zc($)})}class _8 extends Mc{_parse(c){if(typeof c.data!=="string"){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{expected:wc.joinValues(Q),received:$.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(c.data)){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{received:$.data,code:L.invalid_enum_value,options:Q}),$c}return ec(c.data)}get options(){return this._def.values}get enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Values(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}extract(c,$=this._def){return _8.create(c,{...this._def,...$})}exclude(c,$=this._def){return _8.create(this.options.filter((Q)=>!c.includes(Q)),{...this._def,...$})}}_8.create=Uq;class QQ extends Mc{_parse(c){let $=wc.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx(c);if(Q.parsedType!==F.string&&Q.parsedType!==F.number){let J=wc.objectValues($);return n(Q,{expected:wc.joinValues(J),received:Q.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(wc.getValidEnumValues(this._def.values));if(!this._cache.has(c.data)){let J=wc.objectValues($);return n(Q,{received:Q.data,code:L.invalid_enum_value,options:J}),$c}return ec(c.data)}get enum(){return this._def.values}}QQ.create=(c,$)=>{return new QQ({values:c,typeName:Qc.ZodNativeEnum,...zc($)})};class m$ extends Mc{unwrap(){return this._def.type}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.promise&&$.common.async===!1)return n($,{code:L.invalid_type,expected:F.promise,received:$.parsedType}),$c;let Q=$.parsedType===F.promise?$.data:Promise.resolve($.data);return ec(Q.then((J)=>{return this._def.type.parseAsync(J,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}m$.create=(c,$)=>{return new m$({type:c,typeName:Qc.ZodPromise,...zc($)})};class l0 extends Mc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Qc.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=this._def.effect||null,Y={addIssue:(X)=>{if(n(Q,X),X.fatal)$.abort();else $.dirty()},get path(){return Q.path}};if(Y.addIssue=Y.addIssue.bind(Y),J.type==="preprocess"){let X=J.transform(Q.data,Y);if(Q.common.async)return Promise.resolve(X).then(async(W)=>{if($.value==="aborted")return $c;let m=await this._def.schema._parseAsync({data:W,path:Q.path,parent:Q});if(m.status==="aborted")return $c;if(m.status==="dirty")return J$(m.value);if($.value==="dirty")return J$(m.value);return m});else{if($.value==="aborted")return $c;let W=this._def.schema._parseSync({data:X,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")return J$(W.value);if($.value==="dirty")return J$(W.value);return W}}if(J.type==="refinement"){let X=(W)=>{let m=J.refinement(W,Y);if(Q.common.async)return Promise.resolve(m);if(m instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(Q.common.async===!1){let W=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value),{status:$.value,value:W.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((W)=>{if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value).then(()=>{return{status:$.value,value:W.value}})})}if(J.type==="transform")if(Q.common.async===!1){let X=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!p8(X))return $c;let W=J.transform(X.value,Y);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:W}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((X)=>{if(!p8(X))return $c;return Promise.resolve(J.transform(X.value,Y)).then((W)=>({status:$.value,value:W}))});wc.assertNever(J)}}l0.create=(c,$,Q)=>{return new l0({schema:c,typeName:Qc.ZodEffects,effect:$,...zc(Q)})};l0.createWithPreprocess=(c,$,Q)=>{return new l0({schema:$,effect:{type:"preprocess",transform:c},typeName:Qc.ZodEffects,...zc(Q)})};class k0 extends Mc{_parse(c){if(this._getType(c)===F.undefined)return ec(void 0);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}k0.create=(c,$)=>{return new k0({innerType:c,typeName:Qc.ZodOptional,...zc($)})};class z8 extends Mc{_parse(c){if(this._getType(c)===F.null)return ec(null);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}z8.create=(c,$)=>{return new z8({innerType:c,typeName:Qc.ZodNullable,...zc($)})};class JQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;if($.parsedType===F.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}JQ.create=(c,$)=>{return new JQ({innerType:c,typeName:Qc.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...zc($)})};class YQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q={...$,common:{...$.common,issues:[]}},J=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(y$(J))return J.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}YQ.create=(c,$)=>{return new YQ({innerType:c,typeName:Qc.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...zc($)})};class WJ extends Mc{_parse(c){if(this._getType(c)!==F.nan){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.nan,received:Q.parsedType}),$c}return{status:"valid",value:c.data}}}WJ.create=(c)=>{return new WJ({typeName:Qc.ZodNaN,...zc(c)})};var E2=Symbol("zod_brand");class FY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;return this._def.type._parse({data:Q,path:$.path,parent:$})}unwrap(){return this._def.type}}class mJ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(Y.status==="aborted")return $c;if(Y.status==="dirty")return $.dirty(),J$(Y.value);else return this._def.out._parseAsync({data:Y.value,path:Q.path,parent:Q})})();else{let J=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(J.status==="aborted")return $c;if(J.status==="dirty")return $.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:Q.path,parent:Q})}}static create(c,$){return new mJ({in:c,out:$,typeName:Qc.ZodPipeline})}}class XQ extends Mc{_parse(c){let $=this._def.innerType._parse(c),Q=(J)=>{if(p8(J))J.value=Object.freeze(J.value);return J};return y$($)?$.then((J)=>Q(J)):Q($)}unwrap(){return this._def.innerType}}XQ.create=(c,$)=>{return new XQ({innerType:c,typeName:Qc.ZodReadonly,...zc($)})};function Vq(c,$){let Q=typeof c==="function"?c($):typeof c==="string"?{message:c}:c;return typeof Q==="string"?{message:Q}:Q}function jq(c,$={},Q){if(c)return X$.create().superRefine((J,Y)=>{let X=c(J);if(X instanceof Promise)return X.then((W)=>{if(!W){let m=Vq($,J),G=m.fatal??Q??!0;Y.addIssue({code:"custom",...m,fatal:G})}});if(!X){let W=Vq($,J),m=W.fatal??Q??!0;Y.addIssue({code:"custom",...W,fatal:m})}return});return X$.create()}var b2={object:Cc.lazycreate},Qc;(function(c){c.ZodString="ZodString",c.ZodNumber="ZodNumber",c.ZodNaN="ZodNaN",c.ZodBigInt="ZodBigInt",c.ZodBoolean="ZodBoolean",c.ZodDate="ZodDate",c.ZodSymbol="ZodSymbol",c.ZodUndefined="ZodUndefined",c.ZodNull="ZodNull",c.ZodAny="ZodAny",c.ZodUnknown="ZodUnknown",c.ZodNever="ZodNever",c.ZodVoid="ZodVoid",c.ZodArray="ZodArray",c.ZodObject="ZodObject",c.ZodUnion="ZodUnion",c.ZodDiscriminatedUnion="ZodDiscriminatedUnion",c.ZodIntersection="ZodIntersection",c.ZodTuple="ZodTuple",c.ZodRecord="ZodRecord",c.ZodMap="ZodMap",c.ZodSet="ZodSet",c.ZodFunction="ZodFunction",c.ZodLazy="ZodLazy",c.ZodLiteral="ZodLiteral",c.ZodEnum="ZodEnum",c.ZodEffects="ZodEffects",c.ZodNativeEnum="ZodNativeEnum",c.ZodOptional="ZodOptional",c.ZodNullable="ZodNullable",c.ZodDefault="ZodDefault",c.ZodCatch="ZodCatch",c.ZodPromise="ZodPromise",c.ZodBranded="ZodBranded",c.ZodPipeline="ZodPipeline",c.ZodReadonly="ZodReadonly"})(Qc||(Qc={}));var F2=(c,$={message:`Input not instance of ${c.name}`})=>jq((Q)=>Q instanceof c,$),Kq=n0.create,Dq=Z8.create,T2=WJ.create,f2=L8.create,Bq=d$.create,n2=Y$.create,u2=QJ.create,k2=s$.create,a2=r$.create,l2=X$.create,h2=I8.create,y2=r0.create,o2=JJ.create,g2=u0.create,d2=Cc.create,s2=Cc.strictCreate,r2=t$.create,t2=bY.create,e2=e$.create,cD=t0.create,$D=YJ.create,QD=XJ.create,JD=W$.create,YD=g$.create,XD=cQ.create,WD=$Q.create,mD=_8.create,GD=QQ.create,zD=m$.create,xD=l0.create,qD=k0.create,MD=z8.create,ND=l0.createWithPreprocess,VD=mJ.create,wD=()=>Kq().optional(),iD=()=>Dq().optional(),vD=()=>Bq().optional(),UD={string:(c)=>n0.create({...c,coerce:!0}),number:(c)=>Z8.create({...c,coerce:!0}),boolean:(c)=>d$.create({...c,coerce:!0}),bigint:(c)=>L8.create({...c,coerce:!0}),date:(c)=>Y$.create({...c,coerce:!0})};var jD=$c;var KD=/^(wss?|https?):\/\//i,DD=/^nsec1[0-9a-z]+$/i,pq=/^[0-9a-f]{64}$/i,BD=/^[^/\s]+\/[^/\s]+$/,HD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Hq(c){try{let $=new URL(c);return $.protocol==="http:"||$.protocol==="https:"}catch{return!1}}function OD(c){if(!KD.test(c))return!1;try{return new URL(c.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function Oq(c){if(!Array.isArray(c))return c;return c.map(($)=>typeof $==="string"?$.trim():$).filter(($)=>$!=="")}var RD=E.object({kind:E.literal("github"),token:E.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:E.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine((c)=>BD.test(c),{message:"tracker.repo must be owner/repo"})}).strict(),pD=E.object({kind:E.literal("buzz"),ownerHex:E.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(pq,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:E.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),ID=E.discriminatedUnion("kind",[RD,pD]),Iq=E.object({label:E.string().trim().optional(),relayUrl:E.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(OD,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:E.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine((c)=>DD.test(c)||pq.test(c),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:E.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:E.preprocess(Oq,E.array(E.string()).default([]).superRefine((c,$)=>{for(let Q of c)if(!HD.test(Q))$.addIssue({code:E.ZodIssueCode.custom,message:`channel "${Q}" is not a UUID`})})),triggers:E.preprocess((c)=>c===void 0?void 0:Oq(c),E.array(E.string()).optional().superRefine((c,$)=>{if(c!==void 0&&c.length===0)$.addIssue({code:E.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:E.string().trim().refine(Hq,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:E.string().trim().refine(Hq,{message:"apiUrl must be an http(s) URL"}).optional(),device:E.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:E.string().trim().optional().superRefine((c,$)=>{if(c!==void 0&&c!=="mobile"&&c!=="web")$.addIssue({code:E.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:ID.optional()}).strict();function G$(c){if(c.label)return c.label;let $=c.relayUrl??"";try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return $||"binding"}}function Zq(c){if(c.code===E.ZodIssueCode.unrecognized_keys){let $=c.keys.join(", ");return c.path.includes("tracker")?`tracker unknown key(s): ${$}`:`unknown key(s): ${$} (check spelling of the known fields)`}if(c.code===E.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return c.message}function Lq(c){let $=Iq.safeParse(c);return $.success?[]:$.error.issues.map(Zq)}function Rq(c){let $=c??{},Q=typeof $.label==="string"&&$.label.trim()?$.label.trim():void 0,J=typeof $.relayUrl==="string"?$.relayUrl:"";return G$({label:Q,relayUrl:J})}function ZW(c,$="bindings config"){let Q=typeof $==="string"?{source:$}:$,J=Q.source??"bindings config",Y;try{Y=JSON.parse(c)}catch(z){throw Error(`${J} is not valid JSON: ${z instanceof Error?z.message:String(z)}`)}let X=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!X)throw Error(`${J} must be a JSON array of bindings (or { "bindings": [...] })`);if(X.length===0)throw Error(`${J} has no bindings`);let W=[],m=[];X.forEach((z,x)=>{let q=Iq.safeParse(z);if(q.success)m.push(q.data);else W.push(`binding[${x}] (${Rq(z)}): ${q.error.issues.map(Zq).join("; ")}`)});let G=new Map;for(let z of X){let x=Rq(z);G.set(x,(G.get(x)??0)+1)}for(let[z,x]of G)if(x>1)W.push(`duplicate label "${z}" across ${x} bindings — give each a distinct label`);if(W.length)throw Error(`invalid ${J}:
|
|
528
|
-
${
|
|
529
|
-
`)}`);if(Q.onWarn){let z=new Set;for(let x of m){let q=`${x.relayUrl} ${x.privateKey}`;if(z.has(q))Q.onWarn(`two bindings share the same relayUrl + privateKey (${G$(x)}) — is that intentional?`);z.add(q)}}return m}i0();import{createHash as lI,randomUUID as hI}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function GJ(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function I0(c,$=""){if(!Number.isSafeInteger(c)||c<0){let Q=$&&`"${$}" `;throw Error(`${Q}expected integer >= 0, got ${c}`)}}function vc(c,$,Q=""){let J=GJ(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function z$(c){if(typeof c!=="function"||typeof c.create!=="function")throw Error("Hash must wrapped by utils.createHasher");I0(c.outputLen),I0(c.blockLen)}function WQ(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function Sq(c,$){vc(c,void 0,"digestInto() output");let Q=$.outputLen;if(c.length<Q)throw Error('"digestInto() output" expected to be of length >='+Q)}function h0(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function TY(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function y0(c,$){return c<<32-$|c>>>$}var Aq=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),ZD=Array.from({length:256},(c,$)=>$.toString(16).padStart(2,"0"));function Hc(c){if(vc(c),Aq)return c.toHex();let $="";for(let Q=0;Q<c.length;Q++)$+=ZD[c[Q]];return $}var x8={_0:48,_9:57,A:65,F:70,a:97,f:102};function _q(c){if(c>=x8._0&&c<=x8._9)return c-x8._0;if(c>=x8.A&&c<=x8.F)return c-(x8.A-10);if(c>=x8.a&&c<=x8.f)return c-(x8.a-10);return}function Rc(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);if(Aq)return Uint8Array.fromHex(c);let $=c.length,Q=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let J=new Uint8Array(Q);for(let Y=0,X=0;Y<Q;Y++,X+=2){let W=_q(c.charCodeAt(X)),m=_q(c.charCodeAt(X+1));if(W===void 0||m===void 0){let G=c[X]+c[X+1];throw Error('hex string expected, got non-hex character "'+G+'" at index '+X)}J[Y]=W*16+m}return J}function Fc(...c){let $=0;for(let J=0;J<c.length;J++){let Y=c[J];vc(Y),$+=Y.length}let Q=new Uint8Array($);for(let J=0,Y=0;J<c.length;J++){let X=c[J];Q.set(X,Y),Y+=X.length}return Q}function Cq(c,$={}){let Q=(Y,X)=>c(X).update(Y).digest(),J=c(void 0);return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(Y)=>c(Y),Object.assign(Q,$),Object.freeze(Q)}function o0(c=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(c))}var Pq=(c)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,c])});function Eq(c,$,Q){return c&$^~c&Q}function bq(c,$,Q){return c&$^c&Q^$&Q}class fY{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(c,$,Q,J){this.blockLen=c,this.outputLen=$,this.padOffset=Q,this.isLE=J,this.buffer=new Uint8Array(c),this.view=TY(this.buffer)}update(c){WQ(this),vc(c);let{view:$,buffer:Q,blockLen:J}=this,Y=c.length;for(let X=0;X<Y;){let W=Math.min(J-this.pos,Y-X);if(W===J){let m=TY(c);for(;J<=Y-X;X+=J)this.process(m,X);continue}if(Q.set(c.subarray(X,X+W),this.pos),this.pos+=W,X+=W,this.pos===J)this.process($,0),this.pos=0}return this.length+=c.length,this.roundClean(),this}digestInto(c){WQ(this),Sq(c,this),this.finished=!0;let{buffer:$,view:Q,blockLen:J,isLE:Y}=this,{pos:X}=this;if($[X++]=128,h0(this.buffer.subarray(X)),this.padOffset>J-X)this.process(Q,0),X=0;for(let x=X;x<J;x++)$[x]=0;Q.setBigUint64(J-8,BigInt(this.length*8),Y),this.process(Q,0);let W=TY(c),m=this.outputLen;if(m%4)throw Error("_sha2: outputLen must be aligned to 32bit");let G=m/4,z=this.get();if(G>z.length)throw Error("_sha2: outputLen bigger than state");for(let x=0;x<G;x++)W.setUint32(4*x,z[x],Y)}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}_cloneInto(c){c||=new this.constructor,c.set(...this.get());let{blockLen:$,buffer:Q,length:J,finished:Y,destroyed:X,pos:W}=this;if(c.destroyed=X,c.finished=Y,c.length=J,c.pos=W,J%$)c.buffer.set(Q);return c}clone(){return this._cloneInto()}}var q8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),M8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),gc=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),dc=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var nY=BigInt(4294967295),Fq=BigInt(32);function LD(c,$=!1){if($)return{h:Number(c&nY),l:Number(c>>Fq&nY)};return{h:Number(c>>Fq&nY)|0,l:Number(c&nY)|0}}function Tq(c,$=!1){let Q=c.length,J=new Uint32Array(Q),Y=new Uint32Array(Q);for(let X=0;X<Q;X++){let{h:W,l:m}=LD(c[X],$);[J[X],Y[X]]=[W,m]}return[J,Y]}var LW=(c,$,Q)=>c>>>Q,_W=(c,$,Q)=>c<<32-Q|$>>>Q,x$=(c,$,Q)=>c>>>Q|$<<32-Q,q$=(c,$,Q)=>c<<32-Q|$>>>Q,zJ=(c,$,Q)=>c<<64-Q|$>>>Q-32,xJ=(c,$,Q)=>c>>>Q-32|$<<64-Q;function e0(c,$,Q,J){let Y=($>>>0)+(J>>>0);return{h:c+Q+(Y/4294967296|0)|0,l:Y|0}}var fq=(c,$,Q)=>(c>>>0)+($>>>0)+(Q>>>0),nq=(c,$,Q,J)=>$+Q+J+(c/4294967296|0)|0,uq=(c,$,Q,J)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0),kq=(c,$,Q,J,Y)=>$+Q+J+Y+(c/4294967296|0)|0,aq=(c,$,Q,J,Y)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0)+(Y>>>0),lq=(c,$,Q,J,Y,X)=>$+Q+J+Y+X+(c/4294967296|0)|0;var SD=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S8=new Uint32Array(64);class SW extends fY{constructor(c){super(64,c,8,!1)}get(){let{A:c,B:$,C:Q,D:J,E:Y,F:X,G:W,H:m}=this;return[c,$,Q,J,Y,X,W,m]}set(c,$,Q,J,Y,X,W,m){this.A=c|0,this.B=$|0,this.C=Q|0,this.D=J|0,this.E=Y|0,this.F=X|0,this.G=W|0,this.H=m|0}process(c,$){for(let x=0;x<16;x++,$+=4)S8[x]=c.getUint32($,!1);for(let x=16;x<64;x++){let q=S8[x-15],M=S8[x-2],N=y0(q,7)^y0(q,18)^q>>>3,w=y0(M,17)^y0(M,19)^M>>>10;S8[x]=w+S8[x-7]+N+S8[x-16]|0}let{A:Q,B:J,C:Y,D:X,E:W,F:m,G,H:z}=this;for(let x=0;x<64;x++){let q=y0(W,6)^y0(W,11)^y0(W,25),M=z+q+Eq(W,m,G)+SD[x]+S8[x]|0,w=(y0(Q,2)^y0(Q,13)^y0(Q,22))+bq(Q,J,Y)|0;z=G,G=m,m=W,W=X+M|0,X=Y,Y=J,J=Q,Q=M+w|0}Q=Q+this.A|0,J=J+this.B|0,Y=Y+this.C|0,X=X+this.D|0,W=W+this.E|0,m=m+this.F|0,G=G+this.G|0,z=z+this.H|0,this.set(Q,J,Y,X,W,m,G,z)}roundClean(){h0(S8)}destroy(){this.set(0,0,0,0,0,0,0,0),h0(this.buffer)}}class hq extends SW{A=q8[0]|0;B=q8[1]|0;C=q8[2]|0;D=q8[3]|0;E=q8[4]|0;F=q8[5]|0;G=q8[6]|0;H=q8[7]|0;constructor(){super(32)}}class AD extends SW{A=M8[0]|0;B=M8[1]|0;C=M8[2]|0;D=M8[3]|0;E=M8[4]|0;F=M8[5]|0;G=M8[6]|0;H=M8[7]|0;constructor(){super(28)}}var yq=(()=>Tq(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((c)=>BigInt(c))))(),CD=(()=>yq[0])(),PD=(()=>yq[1])(),A8=new Uint32Array(80),C8=new Uint32Array(80);class qJ extends fY{constructor(c){super(128,c,16,!1)}get(){let{Ah:c,Al:$,Bh:Q,Bl:J,Ch:Y,Cl:X,Dh:W,Dl:m,Eh:G,El:z,Fh:x,Fl:q,Gh:M,Gl:N,Hh:w,Hl:U}=this;return[c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U]}set(c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U){this.Ah=c|0,this.Al=$|0,this.Bh=Q|0,this.Bl=J|0,this.Ch=Y|0,this.Cl=X|0,this.Dh=W|0,this.Dl=m|0,this.Eh=G|0,this.El=z|0,this.Fh=x|0,this.Fl=q|0,this.Gh=M|0,this.Gl=N|0,this.Hh=w|0,this.Hl=U|0}process(c,$){for(let j=0;j<16;j++,$+=4)A8[j]=c.getUint32($),C8[j]=c.getUint32($+=4);for(let j=16;j<80;j++){let D=A8[j-15]|0,_=C8[j-15]|0,mc=x$(D,_,1)^x$(D,_,8)^LW(D,_,7),g=q$(D,_,1)^q$(D,_,8)^_W(D,_,7),Jc=A8[j-2]|0,u=C8[j-2]|0,a=x$(Jc,u,19)^zJ(Jc,u,61)^LW(Jc,u,6),Xc=q$(Jc,u,19)^xJ(Jc,u,61)^_W(Jc,u,6),e=uq(g,Xc,C8[j-7],C8[j-16]),B=kq(e,mc,a,A8[j-7],A8[j-16]);A8[j]=B|0,C8[j]=e|0}let{Ah:Q,Al:J,Bh:Y,Bl:X,Ch:W,Cl:m,Dh:G,Dl:z,Eh:x,El:q,Fh:M,Fl:N,Gh:w,Gl:U,Hh:v,Hl:i}=this;for(let j=0;j<80;j++){let D=x$(x,q,14)^x$(x,q,18)^zJ(x,q,41),_=q$(x,q,14)^q$(x,q,18)^xJ(x,q,41),mc=x&M^~x&w,g=q&N^~q&U,Jc=aq(i,_,g,PD[j],C8[j]),u=lq(Jc,v,D,mc,CD[j],A8[j]),a=Jc|0,Xc=x$(Q,J,28)^zJ(Q,J,34)^zJ(Q,J,39),e=q$(Q,J,28)^xJ(Q,J,34)^xJ(Q,J,39),B=Q&Y^Q&W^Y&W,C=J&X^J&m^X&m;v=w|0,i=U|0,w=M|0,U=N|0,M=x|0,N=q|0,{h:x,l:q}=e0(G|0,z|0,u|0,a|0),G=W|0,z=m|0,W=Y|0,m=X|0,Y=Q|0,X=J|0;let K=fq(a,e,C);Q=nq(K,u,Xc,B),J=K|0}({h:Q,l:J}=e0(this.Ah|0,this.Al|0,Q|0,J|0)),{h:Y,l:X}=e0(this.Bh|0,this.Bl|0,Y|0,X|0),{h:W,l:m}=e0(this.Ch|0,this.Cl|0,W|0,m|0),{h:G,l:z}=e0(this.Dh|0,this.Dl|0,G|0,z|0),{h:x,l:q}=e0(this.Eh|0,this.El|0,x|0,q|0),{h:M,l:N}=e0(this.Fh|0,this.Fl|0,M|0,N|0),{h:w,l:U}=e0(this.Gh|0,this.Gl|0,w|0,U|0),{h:v,l:i}=e0(this.Hh|0,this.Hl|0,v|0,i|0),this.set(Q,J,Y,X,W,m,G,z,x,q,M,N,w,U,v,i)}roundClean(){h0(A8,C8)}destroy(){h0(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ED extends qJ{Ah=dc[0]|0;Al=dc[1]|0;Bh=dc[2]|0;Bl=dc[3]|0;Ch=dc[4]|0;Cl=dc[5]|0;Dh=dc[6]|0;Dl=dc[7]|0;Eh=dc[8]|0;El=dc[9]|0;Fh=dc[10]|0;Fl=dc[11]|0;Gh=dc[12]|0;Gl=dc[13]|0;Hh=dc[14]|0;Hl=dc[15]|0;constructor(){super(64)}}class bD extends qJ{Ah=gc[0]|0;Al=gc[1]|0;Bh=gc[2]|0;Bl=gc[3]|0;Ch=gc[4]|0;Cl=gc[5]|0;Dh=gc[6]|0;Dl=gc[7]|0;Eh=gc[8]|0;El=gc[9]|0;Fh=gc[10]|0;Fl=gc[11]|0;Gh=gc[12]|0;Gl=gc[13]|0;Hh=gc[14]|0;Hl=gc[15]|0;constructor(){super(48)}}var c0=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),$0=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class FD extends qJ{Ah=c0[0]|0;Al=c0[1]|0;Bh=c0[2]|0;Bl=c0[3]|0;Ch=c0[4]|0;Cl=c0[5]|0;Dh=c0[6]|0;Dl=c0[7]|0;Eh=c0[8]|0;El=c0[9]|0;Fh=c0[10]|0;Fl=c0[11]|0;Gh=c0[12]|0;Gl=c0[13]|0;Hh=c0[14]|0;Hl=c0[15]|0;constructor(){super(28)}}class TD extends qJ{Ah=$0[0]|0;Al=$0[1]|0;Bh=$0[2]|0;Bl=$0[3]|0;Ch=$0[4]|0;Cl=$0[5]|0;Dh=$0[6]|0;Dl=$0[7]|0;Eh=$0[8]|0;El=$0[9]|0;Fh=$0[10]|0;Fl=$0[11]|0;Gh=$0[12]|0;Gl=$0[13]|0;Hh=$0[14]|0;Hl=$0[15]|0;constructor(){super(32)}}var Q0=Cq(()=>new hq,Pq(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var CW=BigInt(0),AW=BigInt(1);function MJ(c,$=""){if(typeof c!=="boolean"){let Q=$&&`"${$}" `;throw Error(Q+"expected boolean, got type="+typeof c)}return c}function oq(c){if(typeof c==="bigint"){if(!uY(c))throw Error("positive bigint expected, got "+c)}else I0(c);return c}function NJ(c){let $=oq(c).toString(16);return $.length&1?"0"+$:$}function gq(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);return c===""?CW:BigInt("0x"+c)}function P8(c){return gq(Hc(c))}function PW(c){return gq(Hc(fD(vc(c)).reverse()))}function kY(c,$){I0($),c=oq(c);let Q=Rc(c.toString(16).padStart($*2,"0"));if(Q.length!==$)throw Error("number too large");return Q}function EW(c,$){return kY(c,$).reverse()}function fD(c){return Uint8Array.from(c)}function dq(c){return Uint8Array.from(c,($,Q)=>{let J=$.charCodeAt(0);if($.length!==1||J>127)throw Error(`string contains non-ASCII character "${c[Q]}" with code ${J} at position ${Q}`);return J})}var uY=(c)=>typeof c==="bigint"&&CW<=c;function nD(c,$,Q){return uY(c)&&uY($)&&uY(Q)&&$<=c&&c<Q}function sq(c,$,Q,J){if(!nD($,Q,J))throw Error("expected valid "+c+": "+Q+" <= n < "+J+", got "+$)}function bW(c){let $;for($=0;c>CW;c>>=AW,$+=1);return $}var VJ=(c)=>(AW<<BigInt(c))-AW;function rq(c,$,Q){if(I0(c,"hashLen"),I0($,"qByteLen"),typeof Q!=="function")throw Error("hmacFn must be a function");let J=(v)=>new Uint8Array(v),Y=Uint8Array.of(),X=Uint8Array.of(0),W=Uint8Array.of(1),m=1000,G=J(c),z=J(c),x=0,q=()=>{G.fill(1),z.fill(0),x=0},M=(...v)=>Q(z,Fc(G,...v)),N=(v=Y)=>{if(z=M(X,v),G=M(),v.length===0)return;z=M(W,v),G=M()},w=()=>{if(x++>=m)throw Error("drbg: tried max amount of iterations");let v=0,i=[];while(v<$){G=M();let j=G.slice();i.push(j),v+=G.length}return Fc(...i)};return(v,i)=>{q(),N(v);let j=void 0;while(!(j=i(w())))N();return q(),j}}function wJ(c,$={},Q={}){if(!c||typeof c!=="object")throw Error("expected valid options object");function J(X,W,m){let G=c[X];if(m&&G===void 0)return;let z=typeof G;if(z!==W||G===null)throw Error(`param "${X}" is invalid: expected ${W}, got ${z}`)}let Y=(X,W)=>Object.entries(X).forEach(([m,G])=>J(m,G,W));Y($,!1),Y(Q,!0)}function FW(c){let $=new WeakMap;return(Q,...J)=>{let Y=$.get(Q);if(Y!==void 0)return Y;let X=c(Q,...J);return $.set(Q,X),X}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var m0=BigInt(0),J0=BigInt(1),M$=BigInt(2),cM=BigInt(3),$M=BigInt(4),QM=BigInt(5),uD=BigInt(7),JM=BigInt(8),kD=BigInt(9),YM=BigInt(16);function g0(c,$){let Q=c%$;return Q>=m0?Q:$+Q}function U0(c,$,Q){let J=c;while($-- >m0)J*=J,J%=Q;return J}function tq(c,$){if(c===m0)throw Error("invert: expected non-zero number");if($<=m0)throw Error("invert: expected positive modulus, got "+$);let Q=g0(c,$),J=$,Y=m0,X=J0,W=J0,m=m0;while(Q!==m0){let z=J/Q,x=J%Q,q=Y-W*z,M=X-m*z;J=Q,Q=x,Y=W,X=m,W=q,m=M}if(J!==J0)throw Error("invert: does not exist");return g0(Y,$)}function TW(c,$,Q){if(!c.eql(c.sqr($),Q))throw Error("Cannot find square root")}function XM(c,$){let Q=(c.ORDER+J0)/$M,J=c.pow($,Q);return TW(c,J,$),J}function aD(c,$){let Q=(c.ORDER-QM)/JM,J=c.mul($,M$),Y=c.pow(J,Q),X=c.mul($,Y),W=c.mul(c.mul(X,M$),Y),m=c.mul(X,c.sub(W,c.ONE));return TW(c,m,$),m}function lD(c){let $=mQ(c),Q=WM(c),J=Q($,$.neg($.ONE)),Y=Q($,J),X=Q($,$.neg(J)),W=(c+uD)/YM;return(m,G)=>{let z=m.pow(G,W),x=m.mul(z,J),q=m.mul(z,Y),M=m.mul(z,X),N=m.eql(m.sqr(x),G),w=m.eql(m.sqr(q),G);z=m.cmov(z,x,N),x=m.cmov(M,q,w);let U=m.eql(m.sqr(x),G),v=m.cmov(z,x,U);return TW(m,v,G),v}}function WM(c){if(c<cM)throw Error("sqrt is not defined for small field");let $=c-J0,Q=0;while($%M$===m0)$/=M$,Q++;let J=M$,Y=mQ(c);while(eq(Y,J)===1)if(J++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return XM;let X=Y.pow(J,$),W=($+J0)/M$;return function(G,z){if(G.is0(z))return z;if(eq(G,z)!==1)throw Error("Cannot find square root");let x=Q,q=G.mul(G.ONE,X),M=G.pow(z,$),N=G.pow(z,W);while(!G.eql(M,G.ONE)){if(G.is0(M))return G.ZERO;let w=1,U=G.sqr(M);while(!G.eql(U,G.ONE))if(w++,U=G.sqr(U),w===x)throw Error("Cannot find square root");let v=J0<<BigInt(x-w-1),i=G.pow(q,v);x=w,q=G.sqr(i),M=G.mul(M,q),N=G.mul(N,i)}return N}}function hD(c){if(c%$M===cM)return XM;if(c%JM===QM)return aD;if(c%YM===kD)return lD(c);return WM(c)}var yD=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fW(c){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},Q=yD.reduce((J,Y)=>{return J[Y]="function",J},$);return wJ(c,Q),c}function oD(c,$,Q){if(Q<m0)throw Error("invalid exponent, negatives unsupported");if(Q===m0)return c.ONE;if(Q===J0)return $;let J=c.ONE,Y=$;while(Q>m0){if(Q&J0)J=c.mul(J,Y);Y=c.sqr(Y),Q>>=J0}return J}function aY(c,$,Q=!1){let J=Array($.length).fill(Q?c.ZERO:void 0),Y=$.reduce((W,m,G)=>{if(c.is0(m))return W;return J[G]=W,c.mul(W,m)},c.ONE),X=c.inv(Y);return $.reduceRight((W,m,G)=>{if(c.is0(m))return W;return J[G]=c.mul(W,J[G]),c.mul(W,m)},X),J}function eq(c,$){let Q=(c.ORDER-J0)/M$,J=c.pow($,Q),Y=c.eql(J,c.ONE),X=c.eql(J,c.ZERO),W=c.eql(J,c.neg(c.ONE));if(!Y&&!X&&!W)throw Error("invalid Legendre symbol result");return Y?1:X?0:-1}function gD(c,$){if($!==void 0)I0($);let Q=$!==void 0?$:c.toString(2).length,J=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:J}}class mM{ORDER;BITS;BYTES;isLE;ZERO=m0;ONE=J0;_lengths;_sqrt;_mod;constructor(c,$={}){if(c<=m0)throw Error("invalid field: expected ORDER > 0, got "+c);let Q=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")Q=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:J,nByteLength:Y}=gD(c,Q);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=c,this.BITS=J,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create(c){return g0(c,this.ORDER)}isValid(c){if(typeof c!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof c);return m0<=c&&c<this.ORDER}is0(c){return c===m0}isValidNot0(c){return!this.is0(c)&&this.isValid(c)}isOdd(c){return(c&J0)===J0}neg(c){return g0(-c,this.ORDER)}eql(c,$){return c===$}sqr(c){return g0(c*c,this.ORDER)}add(c,$){return g0(c+$,this.ORDER)}sub(c,$){return g0(c-$,this.ORDER)}mul(c,$){return g0(c*$,this.ORDER)}pow(c,$){return oD(this,c,$)}div(c,$){return g0(c*tq($,this.ORDER),this.ORDER)}sqrN(c){return c*c}addN(c,$){return c+$}subN(c,$){return c-$}mulN(c,$){return c*$}inv(c){return tq(c,this.ORDER)}sqrt(c){if(!this._sqrt)this._sqrt=hD(this.ORDER);return this._sqrt(this,c)}toBytes(c){return this.isLE?EW(c,this.BYTES):kY(c,this.BYTES)}fromBytes(c,$=!1){vc(c);let{_lengths:Q,BYTES:J,isLE:Y,ORDER:X,_mod:W}=this;if(Q){if(!Q.includes(c.length)||c.length>J)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+c.length);let G=new Uint8Array(J);G.set(c,Y?0:G.length-c.length),c=G}if(c.length!==J)throw Error("Field.fromBytes: expected "+J+" bytes, got "+c.length);let m=Y?PW(c):P8(c);if(W)m=g0(m,X);if(!$){if(!this.isValid(m))throw Error("invalid field element: outside of range 0..ORDER")}return m}invertBatch(c){return aY(this,c)}cmov(c,$,Q){return Q?$:c}}function mQ(c,$={}){return new mM(c,$)}function GM(c){if(typeof c!=="bigint")throw Error("field order must be bigint");let $=c.toString(2).length;return Math.ceil($/8)}function nW(c){let $=GM(c);return $+Math.ceil($/2)}function lY(c,$,Q=!1){vc(c);let J=c.length,Y=GM($),X=nW($);if(J<16||J<X||J>1024)throw Error("expected "+X+"-1024 bytes of input, got "+J);let W=Q?PW(c):P8(c),m=g0(W,$-J0)+J0;return Q?EW(m,Y):kY(m,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var GQ=BigInt(0),N$=BigInt(1);function iJ(c,$){let Q=$.negate();return c?Q:$}function lW(c,$){let Q=aY(c.Fp,$.map((J)=>J.Z));return $.map((J,Y)=>c.fromAffine(J.toAffine(Q[Y])))}function MM(c,$){if(!Number.isSafeInteger(c)||c<=0||c>$)throw Error("invalid window size, expected [1.."+$+"], got W="+c)}function uW(c,$){MM(c,$);let Q=Math.ceil($/c)+1,J=2**(c-1),Y=2**c,X=VJ(c),W=BigInt(c);return{windows:Q,windowSize:J,mask:X,maxNumber:Y,shiftBy:W}}function zM(c,$,Q){let{windowSize:J,mask:Y,maxNumber:X,shiftBy:W}=Q,m=Number(c&Y),G=c>>W;if(m>J)m-=X,G+=N$;let z=$*J,x=z+Math.abs(m)-1,q=m===0,M=m<0,N=$%2!==0;return{nextN:G,offset:x,isZero:q,isNeg:M,isNegF:N,offsetF:z}}var kW=new WeakMap,NM=new WeakMap;function aW(c){return NM.get(c)||1}function xM(c){if(c!==GQ)throw Error("invalid wNAF")}class hW{BASE;ZERO;Fn;bits;constructor(c,$){this.BASE=c.BASE,this.ZERO=c.ZERO,this.Fn=c.Fn,this.bits=$}_unsafeLadder(c,$,Q=this.ZERO){let J=c;while($>GQ){if($&N$)Q=Q.add(J);J=J.double(),$>>=N$}return Q}precomputeWindow(c,$){let{windows:Q,windowSize:J}=uW($,this.bits),Y=[],X=c,W=X;for(let m=0;m<Q;m++){W=X,Y.push(W);for(let G=1;G<J;G++)W=W.add(X),Y.push(W);X=W.double()}return Y}wNAF(c,$,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let J=this.ZERO,Y=this.BASE,X=uW(c,this.bits);for(let W=0;W<X.windows;W++){let{nextN:m,offset:G,isZero:z,isNeg:x,isNegF:q,offsetF:M}=zM(Q,W,X);if(Q=m,z)Y=Y.add(iJ(q,$[M]));else J=J.add(iJ(x,$[G]))}return xM(Q),{p:J,f:Y}}wNAFUnsafe(c,$,Q,J=this.ZERO){let Y=uW(c,this.bits);for(let X=0;X<Y.windows;X++){if(Q===GQ)break;let{nextN:W,offset:m,isZero:G,isNeg:z}=zM(Q,X,Y);if(Q=W,G)continue;else{let x=$[m];J=J.add(z?x.negate():x)}}return xM(Q),J}getPrecomputes(c,$,Q){let J=kW.get($);if(!J){if(J=this.precomputeWindow($,c),c!==1){if(typeof Q==="function")J=Q(J);kW.set($,J)}}return J}cached(c,$,Q){let J=aW(c);return this.wNAF(J,this.getPrecomputes(J,c,Q),$)}unsafe(c,$,Q,J){let Y=aW(c);if(Y===1)return this._unsafeLadder(c,$,J);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,c,Q),$,J)}createCache(c,$){MM($,this.bits),NM.set(c,$),kW.delete(c)}hasCache(c){return aW(c)!==1}}function VM(c,$,Q,J){let Y=$,X=c.ZERO,W=c.ZERO;while(Q>GQ||J>GQ){if(Q&N$)X=X.add(Y);if(J&N$)W=W.add(Y);Y=Y.double(),Q>>=N$,J>>=N$}return{p1:X,p2:W}}function qM(c,$,Q){if($){if($.ORDER!==c)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return fW($),$}else return mQ(c,{isLE:Q})}function wM(c,$,Q={},J){if(J===void 0)J=c==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${c} CURVE object`);for(let G of["p","n","h"]){let z=$[G];if(!(typeof z==="bigint"&&z>GQ))throw Error(`CURVE.${G} must be positive bigint`)}let Y=qM($.p,Q.Fp,J),X=qM($.n,Q.Fn,J),m=["Gx","Gy","a",c==="weierstrass"?"b":"d"];for(let G of m)if(!Y.isValid($[G]))throw Error(`CURVE.${G} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:Y,Fn:X}}function hY(c,$){return function(J){let Y=c(J);return{secretKey:Y,publicKey:$(Y)}}}class yW{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(c,$){if(z$(c),vc($,void 0,"key"),this.iHash=c.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let Q=this.blockLen,J=new Uint8Array(Q);J.set($.length>Q?c.create().update($).digest():$);for(let Y=0;Y<J.length;Y++)J[Y]^=54;this.iHash.update(J),this.oHash=c.create();for(let Y=0;Y<J.length;Y++)J[Y]^=106;this.oHash.update(J),h0(J)}update(c){return WQ(this),this.iHash.update(c),this}digestInto(c){WQ(this),vc(c,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(c),this.oHash.update(c),this.oHash.digestInto(c),this.destroy()}digest(){let c=new Uint8Array(this.oHash.outputLen);return this.digestInto(c),c}_cloneInto(c){c||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:Q,finished:J,destroyed:Y,blockLen:X,outputLen:W}=this;return c=c,c.finished=J,c.destroyed=Y,c.blockLen=X,c.outputLen=W,c.oHash=$._cloneInto(c.oHash),c.iHash=Q._cloneInto(c.iHash),c}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var E8=(c,$,Q)=>new yW(c,$).update(Q).digest();E8.create=(c,$)=>new yW(c,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var iM=(c,$)=>(c+(c>=0?$:-$)/UM)/$;function dD(c,$,Q){let[[J,Y],[X,W]]=$,m=iM(W*c,Q),G=iM(-Y*c,Q),z=c-m*J-G*X,x=-m*Y-G*W,q=z<N8,M=x<N8;if(q)z=-z;if(M)x=-x;let N=VJ(Math.ceil(bW(Q)/2))+zQ;if(z<N8||z>=N||x<N8||x>=N)throw Error("splitScalar (endomorphism): failed, k="+c);return{k1neg:q,k1:z,k2neg:M,k2:x}}function gW(c){if(!["compact","recovered","der"].includes(c))throw Error('Signature format must be "compact", "recovered", or "der"');return c}function oW(c,$){let Q={};for(let J of Object.keys($))Q[J]=c[J]===void 0?$[J]:c[J];if(MJ(Q.lowS,"lowS"),MJ(Q.prehash,"prehash"),Q.format!==void 0)gW(Q.format);return Q}class vM extends Error{constructor(c=""){super(c)}}var b8={Err:vM,_tlv:{encode:(c,$)=>{let{Err:Q}=b8;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length&1)throw new Q("tlv.encode: unpadded data");let J=$.length/2,Y=NJ(J);if(Y.length/2&128)throw new Q("tlv.encode: long form length too big");let X=J>127?NJ(Y.length/2|128):"";return NJ(c)+X+Y+$},decode(c,$){let{Err:Q}=b8,J=0;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length<2||$[J++]!==c)throw new Q("tlv.decode: wrong tlv");let Y=$[J++],X=!!(Y&128),W=0;if(!X)W=Y;else{let G=Y&127;if(!G)throw new Q("tlv.decode(long): indefinite length not supported");if(G>4)throw new Q("tlv.decode(long): byte length is too big");let z=$.subarray(J,J+G);if(z.length!==G)throw new Q("tlv.decode: length bytes not complete");if(z[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let x of z)W=W<<8|x;if(J+=G,W<128)throw new Q("tlv.decode(long): not minimal encoding")}let m=$.subarray(J,J+W);if(m.length!==W)throw new Q("tlv.decode: wrong value length");return{v:m,l:$.subarray(J+W)}}},_int:{encode(c){let{Err:$}=b8;if(c<N8)throw new $("integer: negative integers are not allowed");let Q=NJ(c);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return Q},decode(c){let{Err:$}=b8;if(c[0]&128)throw new $("invalid signature integer: negative");if(c[0]===0&&!(c[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return P8(c)}},toSig(c){let{Err:$,_int:Q,_tlv:J}=b8,Y=vc(c,void 0,"signature"),{v:X,l:W}=J.decode(48,Y);if(W.length)throw new $("invalid signature: left bytes after parsing");let{v:m,l:G}=J.decode(2,X),{v:z,l:x}=J.decode(2,G);if(x.length)throw new $("invalid signature: left bytes after parsing");return{r:Q.decode(m),s:Q.decode(z)}},hexFromSig(c){let{_tlv:$,_int:Q}=b8,J=$.encode(2,Q.encode(c.r)),Y=$.encode(2,Q.encode(c.s)),X=J+Y;return $.encode(48,X)}},N8=BigInt(0),zQ=BigInt(1),UM=BigInt(2),yY=BigInt(3),sD=BigInt(4);function jM(c,$={}){let Q=wM("weierstrass",c,$),{Fp:J,Fn:Y}=Q,X=Q.CURVE,{h:W,n:m}=X;wJ($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:G}=$;if(G){if(!J.is0(X.a)||typeof G.beta!=="bigint"||!Array.isArray(G.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let z=DM(J,Y);function x(){if(!J.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function q(B,C,K){let{x:R,y:S}=C.toAffine(),Z=J.toBytes(R);if(MJ(K,"isCompressed"),K){x();let H=!J.isOdd(S);return Fc(KM(H),Z)}else return Fc(Uint8Array.of(4),Z,J.toBytes(S))}function M(B){vc(B,void 0,"Point");let{publicKey:C,publicKeyUncompressed:K}=z,R=B.length,S=B[0],Z=B.subarray(1);if(R===C&&(S===2||S===3)){let H=J.fromBytes(Z);if(!J.isValid(H))throw Error("bad point: is not on curve, wrong x");let A=U(H),b;try{b=J.sqrt(A)}catch(Yc){let cc=Yc instanceof Error?": "+Yc.message:"";throw Error("bad point: is not on curve, sqrt error"+cc)}x();let P=J.isOdd(b);if((S&1)===1!==P)b=J.neg(b);return{x:H,y:b}}else if(R===K&&S===4){let H=J.BYTES,A=J.fromBytes(Z.subarray(0,H)),b=J.fromBytes(Z.subarray(H,H*2));if(!v(A,b))throw Error("bad point: is not on curve");return{x:A,y:b}}else throw Error(`bad point: got length ${R}, expected compressed=${C} or uncompressed=${K}`)}let N=$.toBytes||q,w=$.fromBytes||M;function U(B){let C=J.sqr(B),K=J.mul(C,B);return J.add(J.add(K,J.mul(B,X.a)),X.b)}function v(B,C){let K=J.sqr(C),R=U(B);return J.eql(K,R)}if(!v(X.Gx,X.Gy))throw Error("bad curve params: generator point");let i=J.mul(J.pow(X.a,yY),sD),j=J.mul(J.sqr(X.b),BigInt(27));if(J.is0(J.add(i,j)))throw Error("bad curve params: a or b");function D(B,C,K=!1){if(!J.isValid(C)||K&&J.is0(C))throw Error(`bad point coordinate ${B}`);return C}function _(B){if(!(B instanceof a))throw Error("Weierstrass Point expected")}function mc(B){if(!G||!G.basises)throw Error("no endo");return dD(B,G.basises,Y.ORDER)}let g=FW((B,C)=>{let{X:K,Y:R,Z:S}=B;if(J.eql(S,J.ONE))return{x:K,y:R};let Z=B.is0();if(C==null)C=Z?J.ONE:J.inv(S);let H=J.mul(K,C),A=J.mul(R,C),b=J.mul(S,C);if(Z)return{x:J.ZERO,y:J.ZERO};if(!J.eql(b,J.ONE))throw Error("invZ was invalid");return{x:H,y:A}}),Jc=FW((B)=>{if(B.is0()){if($.allowInfinityPoint&&!J.is0(B.Y))return;throw Error("bad point: ZERO")}let{x:C,y:K}=B.toAffine();if(!J.isValid(C)||!J.isValid(K))throw Error("bad point: x or y not field elements");if(!v(C,K))throw Error("bad point: equation left != right");if(!B.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function u(B,C,K,R,S){return K=new a(J.mul(K.X,B),K.Y,K.Z),C=iJ(R,C),K=iJ(S,K),C.add(K)}class a{static BASE=new a(X.Gx,X.Gy,J.ONE);static ZERO=new a(J.ZERO,J.ONE,J.ZERO);static Fp=J;static Fn=Y;X;Y;Z;constructor(B,C,K){this.X=D("x",B),this.Y=D("y",C,!0),this.Z=D("z",K),Object.freeze(this)}static CURVE(){return X}static fromAffine(B){let{x:C,y:K}=B||{};if(!B||!J.isValid(C)||!J.isValid(K))throw Error("invalid affine point");if(B instanceof a)throw Error("projective point not allowed");if(J.is0(C)&&J.is0(K))return a.ZERO;return new a(C,K,J.ONE)}static fromBytes(B){let C=a.fromAffine(w(vc(B,void 0,"point")));return C.assertValidity(),C}static fromHex(B){return a.fromBytes(Rc(B))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=8,C=!0){if(e.createCache(this,B),!C)this.multiply(yY);return this}assertValidity(){Jc(this)}hasEvenY(){let{y:B}=this.toAffine();if(!J.isOdd)throw Error("Field doesn't support isOdd");return!J.isOdd(B)}equals(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.eql(J.mul(C,H),J.mul(S,R)),b=J.eql(J.mul(K,H),J.mul(Z,R));return A&&b}negate(){return new a(this.X,J.neg(this.Y),this.Z)}double(){let{a:B,b:C}=X,K=J.mul(C,yY),{X:R,Y:S,Z}=this,H=J.ZERO,A=J.ZERO,b=J.ZERO,P=J.mul(R,R),r=J.mul(S,S),Yc=J.mul(Z,Z),cc=J.mul(R,S);return cc=J.add(cc,cc),b=J.mul(R,Z),b=J.add(b,b),H=J.mul(B,b),A=J.mul(K,Yc),A=J.add(H,A),H=J.sub(r,A),A=J.add(r,A),A=J.mul(H,A),H=J.mul(cc,H),b=J.mul(K,b),Yc=J.mul(B,Yc),cc=J.sub(P,Yc),cc=J.mul(B,cc),cc=J.add(cc,b),b=J.add(P,P),P=J.add(b,P),P=J.add(P,Yc),P=J.mul(P,cc),A=J.add(A,P),Yc=J.mul(S,Z),Yc=J.add(Yc,Yc),P=J.mul(Yc,cc),H=J.sub(H,P),b=J.mul(Yc,r),b=J.add(b,b),b=J.add(b,b),new a(H,A,b)}add(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.ZERO,b=J.ZERO,P=J.ZERO,r=X.a,Yc=J.mul(X.b,yY),cc=J.mul(C,S),Oc=J.mul(K,Z),o=J.mul(R,H),Dc=J.add(C,K),Uc=J.add(S,Z);Dc=J.mul(Dc,Uc),Uc=J.add(cc,Oc),Dc=J.sub(Dc,Uc),Uc=J.add(C,R);let qc=J.add(S,H);return Uc=J.mul(Uc,qc),qc=J.add(cc,o),Uc=J.sub(Uc,qc),qc=J.add(K,R),A=J.add(Z,H),qc=J.mul(qc,A),A=J.add(Oc,o),qc=J.sub(qc,A),P=J.mul(r,Uc),A=J.mul(Yc,o),P=J.add(A,P),A=J.sub(Oc,P),P=J.add(Oc,P),b=J.mul(A,P),Oc=J.add(cc,cc),Oc=J.add(Oc,cc),o=J.mul(r,o),Uc=J.mul(Yc,Uc),Oc=J.add(Oc,o),o=J.sub(cc,o),o=J.mul(r,o),Uc=J.add(Uc,o),cc=J.mul(Oc,Uc),b=J.add(b,cc),cc=J.mul(qc,Uc),A=J.mul(Dc,A),A=J.sub(A,cc),cc=J.mul(Dc,Oc),P=J.mul(qc,P),P=J.add(P,cc),new a(A,b,P)}subtract(B){return this.add(B.negate())}is0(){return this.equals(a.ZERO)}multiply(B){let{endo:C}=$;if(!Y.isValidNot0(B))throw Error("invalid scalar: out of range");let K,R,S=(Z)=>e.cached(this,Z,(H)=>lW(a,H));if(C){let{k1neg:Z,k1:H,k2neg:A,k2:b}=mc(B),{p:P,f:r}=S(H),{p:Yc,f:cc}=S(b);R=r.add(cc),K=u(C.beta,P,Yc,Z,A)}else{let{p:Z,f:H}=S(B);K=Z,R=H}return lW(a,[K,R])[0]}multiplyUnsafe(B){let{endo:C}=$,K=this;if(!Y.isValid(B))throw Error("invalid scalar: out of range");if(B===N8||K.is0())return a.ZERO;if(B===zQ)return K;if(e.hasCache(this))return this.multiply(B);if(C){let{k1neg:R,k1:S,k2neg:Z,k2:H}=mc(B),{p1:A,p2:b}=VM(a,K,S,H);return u(C.beta,A,b,R,Z)}else return e.unsafe(K,B)}toAffine(B){return g(this,B)}isTorsionFree(){let{isTorsionFree:B}=$;if(W===zQ)return!0;if(B)return B(a,this);return e.unsafe(this,m).is0()}clearCofactor(){let{clearCofactor:B}=$;if(W===zQ)return this;if(B)return B(a,this);return this.multiplyUnsafe(W)}isSmallOrder(){return this.multiplyUnsafe(W).is0()}toBytes(B=!0){return MJ(B,"isCompressed"),this.assertValidity(),N(a,this,B)}toHex(B=!0){return Hc(this.toBytes(B))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let Xc=Y.BITS,e=new hW(a,$.endo?Math.ceil(Xc/2):Xc);return a.BASE.precompute(8),a}function KM(c){return Uint8Array.of(c?2:3)}function DM(c,$){return{secretKey:$.BYTES,publicKey:1+c.BYTES,publicKeyUncompressed:1+2*c.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function rD(c,$={}){let{Fn:Q}=c,J=$.randomBytes||o0,Y=Object.assign(DM(c.Fp,Q),{seed:nW(Q.ORDER)});function X(N){try{let w=Q.fromBytes(N);return Q.isValidNot0(w)}catch(w){return!1}}function W(N,w){let{publicKey:U,publicKeyUncompressed:v}=Y;try{let i=N.length;if(w===!0&&i!==U)return!1;if(w===!1&&i!==v)return!1;return!!c.fromBytes(N)}catch(i){return!1}}function m(N=J(Y.seed)){return lY(vc(N,Y.seed,"seed"),Q.ORDER)}function G(N,w=!0){return c.BASE.multiply(Q.fromBytes(N)).toBytes(w)}function z(N){let{secretKey:w,publicKey:U,publicKeyUncompressed:v}=Y;if(!GJ(N))return;if("_lengths"in Q&&Q._lengths||w===U)return;let i=vc(N,void 0,"key").length;return i===U||i===v}function x(N,w,U=!0){if(z(N)===!0)throw Error("first arg must be private key");if(z(w)===!1)throw Error("second arg must be public key");let v=Q.fromBytes(N);return c.fromBytes(w).multiply(v).toBytes(U)}let q={isValidSecretKey:X,isValidPublicKey:W,randomSecretKey:m},M=hY(m,G);return Object.freeze({getPublicKey:G,getSharedSecret:x,keygen:M,Point:c,utils:q,lengths:Y})}function BM(c,$,Q={}){z$($),wJ(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),Q=Object.assign({},Q);let J=Q.randomBytes||o0,Y=Q.hmac||((K,R)=>E8($,K,R)),{Fp:X,Fn:W}=c,{ORDER:m,BITS:G}=W,{keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N}=rD(c,Q),w={prehash:!0,lowS:typeof Q.lowS==="boolean"?Q.lowS:!0,format:"compact",extraEntropy:!1},U=m*UM<X.ORDER;function v(K){let R=m>>zQ;return K>R}function i(K,R){if(!W.isValidNot0(R))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return R}function j(){if(U)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(K,R){gW(R);let S=N.signature,Z=R==="compact"?S:R==="recovered"?S+1:void 0;return vc(K,Z)}class _{r;s;recovery;constructor(K,R,S){if(this.r=i("r",K),this.s=i("s",R),S!=null){if(j(),![0,1,2,3].includes(S))throw Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(K,R=w.format){D(K,R);let S;if(R==="der"){let{r:b,s:P}=b8.toSig(vc(K));return new _(b,P)}if(R==="recovered")S=K[0],R="compact",K=K.subarray(1);let Z=N.signature/2,H=K.subarray(0,Z),A=K.subarray(Z,Z*2);return new _(W.fromBytes(H),W.fromBytes(A),S)}static fromHex(K,R){return this.fromBytes(Rc(K),R)}assertRecovery(){let{recovery:K}=this;if(K==null)throw Error("invalid recovery id: must be present");return K}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){let{r:R,s:S}=this,Z=this.assertRecovery(),H=Z===2||Z===3?R+m:R;if(!X.isValid(H))throw Error("invalid recovery id: sig.r+curve.n != R.x");let A=X.toBytes(H),b=c.fromBytes(Fc(KM((Z&1)===0),A)),P=W.inv(H),r=g(vc(K,void 0,"msgHash")),Yc=W.create(-r*P),cc=W.create(S*P),Oc=c.BASE.multiplyUnsafe(Yc).add(b.multiplyUnsafe(cc));if(Oc.is0())throw Error("invalid recovery: point at infinify");return Oc.assertValidity(),Oc}hasHighS(){return v(this.s)}toBytes(K=w.format){if(gW(K),K==="der")return Rc(b8.hexFromSig(this));let{r:R,s:S}=this,Z=W.toBytes(R),H=W.toBytes(S);if(K==="recovered")return j(),Fc(Uint8Array.of(this.assertRecovery()),Z,H);return Fc(Z,H)}toHex(K){return Hc(this.toBytes(K))}}let mc=Q.bits2int||function(R){if(R.length>8192)throw Error("input is too large");let S=P8(R),Z=R.length*8-G;return Z>0?S>>BigInt(Z):S},g=Q.bits2int_modN||function(R){return W.create(mc(R))},Jc=VJ(G);function u(K){return sq("num < 2^"+G,K,N8,Jc),W.toBytes(K)}function a(K,R){return vc(K,void 0,"message"),R?vc($(K),void 0,"prehashed message"):K}function Xc(K,R,S){let{lowS:Z,prehash:H,extraEntropy:A}=oW(S,w);K=a(K,H);let b=g(K),P=W.fromBytes(R);if(!W.isValidNot0(P))throw Error("invalid private key");let r=[u(P),u(b)];if(A!=null&&A!==!1){let o=A===!0?J(N.secretKey):A;r.push(vc(o,void 0,"extraEntropy"))}let Yc=Fc(...r),cc=b;function Oc(o){let Dc=mc(o);if(!W.isValidNot0(Dc))return;let Uc=W.inv(Dc),qc=c.BASE.multiply(Dc).toAffine(),M0=W.create(qc.x);if(M0===N8)return;let N0=W.create(Uc*W.create(cc+M0*P));if(N0===N8)return;let Y0=(qc.x===M0?0:2)|Number(qc.y&zQ),U8=N0;if(Z&&v(N0))U8=W.neg(N0),Y0^=1;return new _(M0,U8,U?void 0:Y0)}return{seed:Yc,k2sig:Oc}}function e(K,R,S={}){let{seed:Z,k2sig:H}=Xc(K,R,S);return rq($.outputLen,W.BYTES,Y)(Z,H).toBytes(S.format)}function B(K,R,S,Z={}){let{lowS:H,prehash:A,format:b}=oW(Z,w);if(S=vc(S,void 0,"publicKey"),R=a(R,A),!GJ(K)){let P=K instanceof _?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+P)}D(K,b);try{let P=_.fromBytes(K,b),r=c.fromBytes(S);if(H&&P.hasHighS())return!1;let{r:Yc,s:cc}=P,Oc=g(R),o=W.inv(cc),Dc=W.create(Oc*o),Uc=W.create(Yc*o),qc=c.BASE.multiplyUnsafe(Dc).add(r.multiplyUnsafe(Uc));if(qc.is0())return!1;return W.create(qc.x)===Yc}catch(P){return!1}}function C(K,R,S={}){let{prehash:Z}=oW(S,w);return R=a(R,Z),_.fromBytes(K,"recovered").recoverPublicKey(R).toBytes()}return Object.freeze({keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N,Point:c,sign:e,verify:B,recoverPublicKey:C,Signature:_,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var dY={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},tD={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},eD=BigInt(0),dW=BigInt(2);function cB(c){let $=dY.p,Q=BigInt(3),J=BigInt(6),Y=BigInt(11),X=BigInt(22),W=BigInt(23),m=BigInt(44),G=BigInt(88),z=c*c*c%$,x=z*z*c%$,q=U0(x,Q,$)*x%$,M=U0(q,Q,$)*x%$,N=U0(M,dW,$)*z%$,w=U0(N,Y,$)*N%$,U=U0(w,X,$)*w%$,v=U0(U,m,$)*U%$,i=U0(v,G,$)*v%$,j=U0(i,m,$)*U%$,D=U0(j,Q,$)*x%$,_=U0(D,W,$)*w%$,mc=U0(_,J,$)*z%$,g=U0(mc,dW,$);if(!oY.eql(oY.sqr(g),c))throw Error("Cannot find square root");return g}var oY=mQ(dY.p,{sqrt:cB}),V$=jM(dY,{Fp:oY,endo:tD}),UJ=BM(V$,Q0),HM={};function gY(c,...$){let Q=HM[c];if(Q===void 0){let J=Q0(dq(c));Q=Fc(J,J),HM[c]=Q}return Q0(Fc(Q,...$))}var rW=(c)=>c.toBytes(!0).slice(1),tW=(c)=>c%dW===eD;function sW(c){let{Fn:$,BASE:Q}=V$,J=$.fromBytes(c),Y=Q.multiply(J);return{scalar:tW(Y.y)?J:$.neg(J),bytes:rW(Y)}}function RM(c){let $=oY;if(!$.isValidNot0(c))throw Error("invalid x: Fail if x ≥ p");let Q=$.create(c*c),J=$.create(Q*c+BigInt(7)),Y=$.sqrt(J);if(!tW(Y))Y=$.neg(Y);let X=V$.fromAffine({x:c,y:Y});return X.assertValidity(),X}var vJ=P8;function pM(...c){return V$.Fn.create(vJ(gY("BIP0340/challenge",...c)))}function OM(c){return sW(c).bytes}function $B(c,$,Q=o0(32)){let{Fn:J}=V$,Y=vc(c,void 0,"message"),{bytes:X,scalar:W}=sW($),m=vc(Q,32,"auxRand"),G=J.toBytes(W^vJ(gY("BIP0340/aux",m))),z=gY("BIP0340/nonce",G,X,Y),{bytes:x,scalar:q}=sW(z),M=pM(x,X,Y),N=new Uint8Array(64);if(N.set(x,0),N.set(J.toBytes(J.create(q+M*W)),32),!IM(N,Y,X))throw Error("sign: Invalid signature produced");return N}function IM(c,$,Q){let{Fp:J,Fn:Y,BASE:X}=V$,W=vc(c,64,"signature"),m=vc($,void 0,"message"),G=vc(Q,32,"publicKey");try{let z=RM(vJ(G)),x=vJ(W.subarray(0,32));if(!J.isValidNot0(x))return!1;let q=vJ(W.subarray(32,64));if(!Y.isValidNot0(q))return!1;let M=pM(Y.toBytes(x),rW(z),m),N=X.multiplyUnsafe(q).add(z.multiplyUnsafe(Y.neg(M))),{x:w,y:U}=N.toAffine();if(N.is0()||!tW(U)||w!==x)return!1;return!0}catch(z){return!1}}var xQ=(()=>{let Q=(J=o0(48))=>{return lY(J,dY.n)};return{keygen:hY(Q,OM),getPublicKey:OM,sign:$B,verify:IM,Point:V$,utils:{randomSecretKey:Q,taggedHash:gY,lift_x:RM,pointToBytes:rW},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function cX(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function $m(c){if(!cX(c))throw Error("Uint8Array expected")}function AM(c,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(c)return $.every((Q)=>typeof Q==="string");else return $.every((Q)=>Number.isSafeInteger(Q))}function CM(c){if(typeof c!=="function")throw Error("function expected");return!0}function F8(c,$){if(typeof $!=="string")throw Error(`${c}: string expected`);return!0}function KJ(c){if(!Number.isSafeInteger(c))throw Error(`invalid integer: ${c}`)}function rY(c){if(!Array.isArray(c))throw Error("array expected")}function tY(c,$){if(!AM(!0,$))throw Error(`${c}: array of strings expected`)}function Qm(c,$){if(!AM(!1,$))throw Error(`${c}: array of numbers expected`)}function j0(...c){let $=(X)=>X,Q=(X,W)=>(m)=>X(W(m)),J=c.map((X)=>X.encode).reduceRight(Q,$),Y=c.map((X)=>X.decode).reduce(Q,$);return{encode:J,decode:Y}}function K0(c){let $=typeof c==="string"?c.split(""):c,Q=$.length;tY("alphabet",$);let J=new Map($.map((Y,X)=>[Y,X]));return{encode:(Y)=>{return rY(Y),Y.map((X)=>{if(!Number.isSafeInteger(X)||X<0||X>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${c}`);return $[X]})},decode:(Y)=>{return rY(Y),Y.map((X)=>{F8("alphabet.decode",X);let W=J.get(X);if(W===void 0)throw Error(`Unknown letter: "${X}". Allowed: ${c}`);return W})}}}function D0(c=""){return F8("join",c),{encode:($)=>{return tY("join.decode",$),$.join(c)},decode:($)=>{return F8("join.decode",$),$.split(c)}}}function $X(c,$="="){return KJ(c),F8("padding",$),{encode(Q){tY("padding.encode",Q);while(Q.length*c%8)Q.push($);return Q},decode(Q){tY("padding.decode",Q);let J=Q.length;if(J*c%8)throw Error("padding: invalid, string should have whole number of bytes");for(;J>0&&Q[J-1]===$;J--)if((J-1)*c%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,J)}}}function PM(c){return CM(c),{encode:($)=>$,decode:($)=>c($)}}function ZM(c,$,Q){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(rY(c),!c.length)return[];let J=0,Y=[],X=Array.from(c,(m)=>{if(KJ(m),m<0||m>=$)throw Error(`invalid integer: ${m}`);return m}),W=X.length;while(!0){let m=0,G=!0;for(let z=J;z<W;z++){let x=X[z],q=$*m,M=q+x;if(!Number.isSafeInteger(M)||q/$!==m||M-x!==q)throw Error("convertRadix: carry overflow");let N=M/Q;m=M%Q;let w=Math.floor(N);if(X[z]=w,!Number.isSafeInteger(w)||w*Q+m!==M)throw Error("convertRadix: carry overflow");if(!G)continue;else if(!w)J=z;else G=!1}if(Y.push(m),G)break}for(let m=0;m<c.length-1&&c[m]===0;m++)Y.push(0);return Y.reverse()}var EM=(c,$)=>$===0?c:EM($,c%$),eY=(c,$)=>c+($-EM(c,$)),sY=(()=>{let c=[];for(let $=0;$<40;$++)c.push(2**$);return c})();function eW(c,$,Q,J){if(rY(c),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(eY($,Q)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${Q} carryBits=${eY($,Q)}`);let Y=0,X=0,W=sY[$],m=sY[Q]-1,G=[];for(let z of c){if(KJ(z),z>=W)throw Error(`convertRadix2: invalid data word=${z} from=${$}`);if(Y=Y<<$|z,X+$>32)throw Error(`convertRadix2: carry overflow pos=${X} from=${$}`);X+=$;for(;X>=Q;X-=Q)G.push((Y>>X-Q&m)>>>0);let x=sY[X];if(x===void 0)throw Error("invalid carry");Y&=x-1}if(Y=Y<<Q-X&m,!J&&X>=$)throw Error("Excess padding");if(!J&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(J&&X>0)G.push(Y>>>0);return G}function QB(c){KJ(c);let $=256;return{encode:(Q)=>{if(!cX(Q))throw Error("radix.encode input should be Uint8Array");return ZM(Array.from(Q),$,c)},decode:(Q)=>{return Qm("radix.decode",Q),Uint8Array.from(ZM(Q,c,$))}}}function Z0(c,$=!1){if(KJ(c),c<=0||c>32)throw Error("radix2: bits should be in (0..32]");if(eY(8,c)>32||eY(c,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!cX(Q))throw Error("radix2.encode input should be Uint8Array");return eW(Array.from(Q),8,c,!$)},decode:(Q)=>{return Qm("radix2.decode",Q),Uint8Array.from(eW(Q,c,8,$))}}}function LM(c){return CM(c),function(...$){try{return c.apply(null,$)}catch(Q){}}}var Bb=j0(Z0(4),K0("0123456789ABCDEF"),D0("")),Hb=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),$X(5),D0("")),Ob=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),D0("")),Rb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),$X(5),D0("")),pb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),D0("")),Ib=j0(Z0(5),K0("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),D0(""),PM((c)=>c.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),bM=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),FM=(c,$)=>{F8("base64",c);let Q=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=$?"base64url":"base64";if(c.length>0&&!Q.test(c))throw Error("invalid base64");return Uint8Array.fromBase64(c,{alphabet:J,lastChunkHandling:"strict"})},L0=bM?{encode(c){return $m(c),c.toBase64()},decode(c){return FM(c,!1)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),$X(6),D0("")),Zb=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),D0("")),Lb=bM?{encode(c){return $m(c),c.toBase64({alphabet:"base64url"})},decode(c){return FM(c,!0)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),$X(6),D0("")),_b=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),D0("")),Jm=(c)=>j0(QB(58),K0(c),D0("")),Sb=Jm("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Ab=Jm("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),Cb=Jm("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var cm=j0(K0("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),D0("")),_M=[996825010,642813549,513874426,1027748829,705979059];function jJ(c){let $=c>>25,Q=(c&33554431)<<5;for(let J=0;J<_M.length;J++)if(($>>J&1)===1)Q^=_M[J];return Q}function SM(c,$,Q=1){let J=c.length,Y=1;for(let X=0;X<J;X++){let W=c.charCodeAt(X);if(W<33||W>126)throw Error(`Invalid prefix (${c})`);Y=jJ(Y)^W>>5}Y=jJ(Y);for(let X=0;X<J;X++)Y=jJ(Y)^c.charCodeAt(X)&31;for(let X of $)Y=jJ(Y)^X;for(let X=0;X<6;X++)Y=jJ(Y);return Y^=Q,cm.encode(eW([Y%sY[30]],30,5,!1))}function TM(c){let $=c==="bech32"?1:734539939,Q=Z0(5),J=Q.decode,Y=Q.encode,X=LM(J);function W(q,M,N=90){if(F8("bech32.encode prefix",q),cX(M))M=Array.from(M);Qm("bech32.encode",M);let w=q.length;if(w===0)throw TypeError(`Invalid prefix length ${w}`);let U=w+7+M.length;if(N!==!1&&U>N)throw TypeError(`Length ${U} exceeds limit ${N}`);let v=q.toLowerCase(),i=SM(v,M,$);return`${v}1${cm.encode(M)}${i}`}function m(q,M=90){F8("bech32.decode input",q);let N=q.length;if(N<8||M!==!1&&N>M)throw TypeError(`invalid string length: ${N} (${q}). Expected (8..${M})`);let w=q.toLowerCase();if(q!==w&&q!==q.toUpperCase())throw Error("String must be lowercase or uppercase");let U=w.lastIndexOf("1");if(U===0||U===-1)throw Error('Letter "1" must be present between prefix and data only');let v=w.slice(0,U),i=w.slice(U+1);if(i.length<6)throw Error("Data must be at least 6 characters long");let j=cm.decode(i).slice(0,-6),D=SM(v,j,$);if(!i.endsWith(D))throw Error(`Invalid checksum in ${q}: expected "${D}"`);return{prefix:v,words:j}}let G=LM(m);function z(q){let{prefix:M,words:N}=m(q,!1);return{prefix:M,words:N,bytes:J(N)}}function x(q,M){return W(q,Y(M))}return{encode:W,decode:m,encodeFromBytes:x,decodeToBytes:z,decodeUnsafe:G,fromWords:J,fromWordsUnsafe:X,toWords:Y}}var T8=TM("bech32"),Pb=TM("bech32m");var JB=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),YB={encode(c){return $m(c),c.toHex()},decode(c){return F8("hex",c),Uint8Array.fromHex(c)}},Eb=JB?YB:j0(Z0(4),K0("0123456789abcdef"),D0(""),PM((c)=>{if(typeof c!=="string"||c.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof c} with length ${c.length}`);return c.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function XB(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function QX(c){if(typeof c!=="boolean")throw Error(`boolean expected, not ${c}`)}function DJ(c){if(!Number.isSafeInteger(c)||c<0)throw Error("positive integer expected, got "+c)}function Ac(c,$,Q=""){let J=XB(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function Ym(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function fM(c,$){Ac(c,void 0,"output");let Q=$.outputLen;if(c.length<Q)throw Error("digestInto() expects output buffer of length at least "+Q)}function nc(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function sc(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function nM(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}var WB=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function uM(c,$){return c.buffer===$.buffer&&c.byteOffset<$.byteOffset+$.byteLength&&$.byteOffset<c.byteOffset+c.byteLength}function Xm(c,$){if(uM(c,$)&&c.byteOffset<$.byteOffset)throw Error("complex overlap of input and output is not supported")}function kM(c,$){if($==null||typeof $!=="object")throw Error("options must be defined");return Object.assign(c,$)}function BJ(c,$){if(c.length!==$.length)return!1;let Q=0;for(let J=0;J<c.length;J++)Q|=c[J]^$[J];return Q===0}var HJ=(c,$)=>{function Q(J,...Y){if(Ac(J,void 0,"key"),!WB)throw Error("Non little-endian hardware is not yet supported");if(c.nonceLength!==void 0){let x=Y[0];Ac(x,c.varSizeNonce?void 0:c.nonceLength,"nonce")}let X=c.tagLength;if(X&&Y[1]!==void 0)Ac(Y[1],void 0,"AAD");let W=$(J,...Y),m=(x,q)=>{if(q!==void 0){if(x!==2)throw Error("cipher output not supported");Ac(q,void 0,"output")}},G=!1;return{encrypt(x,q){if(G)throw Error("cannot encrypt() twice with same key + nonce");return G=!0,Ac(x),m(W.encrypt.length,q),W.encrypt(x,q)},decrypt(x,q){if(Ac(x),X&&x.length<X)throw Error('"ciphertext" expected length bigger than tagLength='+X);return m(W.decrypt.length,q),W.decrypt(x,q)}}}return Object.assign(Q,c),Q};function qQ(c,$,Q=!0){if($===void 0)return new Uint8Array(c);if($.length!==c)throw Error('"output" expected Uint8Array of length '+c+", got: "+$.length);if(Q&&!w$($))throw Error("invalid output, must be aligned");return $}function Wm(c,$,Q){QX(Q);let J=new Uint8Array(16),Y=nM(J);return Y.setBigUint64(0,BigInt($),Q),Y.setBigUint64(8,BigInt(c),Q),J}function w$(c){return c.byteOffset%4===0}function _0(c){return Uint8Array.from(c)}var lc=16;var GB=283;function lM(c){if(![16,24,32].includes(c.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+c.length)}function qm(c){return c<<1^GB&-(c>>7)}function MQ(c,$){let Q=0;for(;$>0;$>>=1)Q^=c&-($&1),c=qm(c);return Q}var zm=(()=>{let c=new Uint8Array(256);for(let Q=0,J=1;Q<256;Q++,J^=qm(J))c[Q]=J;let $=new Uint8Array(256);$[0]=99;for(let Q=0;Q<255;Q++){let J=c[255-Q];J|=J<<8,$[c[Q]]=(J^J>>4^J>>5^J>>6^J>>7^99)&255}return sc(c),$})(),zB=zm.map((c,$)=>zm.indexOf($)),xB=(c)=>c<<24|c>>>8,mm=(c)=>c<<8|c>>>24;function hM(c,$){if(c.length!==256)throw Error("Wrong sbox length");let Q=new Uint32Array(256).map((z,x)=>$(c[x])),J=Q.map(mm),Y=J.map(mm),X=Y.map(mm),W=new Uint32Array(65536),m=new Uint32Array(65536),G=new Uint16Array(65536);for(let z=0;z<256;z++)for(let x=0;x<256;x++){let q=z*256+x;W[q]=Q[z]^J[x],m[q]=Y[z]^X[x],G[q]=c[z]<<8|c[x]}return{sbox:c,sbox2:G,T0:Q,T1:J,T2:Y,T3:X,T01:W,T23:m}}var Mm=hM(zm,(c)=>MQ(c,3)<<24|c<<16|c<<8|MQ(c,2)),yM=hM(zB,(c)=>MQ(c,11)<<24|MQ(c,13)<<16|MQ(c,9)<<8|MQ(c,14)),qB=(()=>{let c=new Uint8Array(16);for(let $=0,Q=1;$<16;$++,Q=qm(Q))c[$]=Q;return c})();function Nm(c){Ac(c);let $=c.length;lM(c);let{sbox2:Q}=Mm,J=[];if(!w$(c))J.push(c=_0(c));let Y=nc(c),X=Y.length,W=(G)=>c8(Q,G,G,G,G),m=new Uint32Array($+28);m.set(Y);for(let G=X;G<m.length;G++){let z=m[G-1];if(G%X===0)z=W(xB(z))^qB[G/X-1];else if(X>6&&G%X===4)z=W(z);m[G]=m[G-X]^z}return sc(...J),m}function MB(c){let $=Nm(c),Q=$.slice(),J=$.length,{sbox2:Y}=Mm,{T0:X,T1:W,T2:m,T3:G}=yM;for(let z=0;z<J;z+=4)for(let x=0;x<4;x++)Q[z+x]=$[J-z-4+x];sc($);for(let z=4;z<J-4;z++){let x=Q[z],q=c8(Y,x,x,x,x);Q[z]=X[q&255]^W[q>>>8&255]^m[q>>>16&255]^G[q>>>24]}return Q}function f8(c,$,Q,J,Y,X){return c[Q<<8&65280|J>>>8&255]^$[Y>>>8&65280|X>>>24&255]}function c8(c,$,Q,J,Y){return c[$&255|Q&65280]|c[J>>>16&255|Y>>>16&65280]<<16}function xm(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=Mm,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Q,J,Y),v=c[G++]^f8(W,m,Q,J,Y,$),i=c[G++]^f8(W,m,J,Y,$,Q),j=c[G++]^f8(W,m,Y,$,Q,J);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Q,J,Y),q=c[G++]^c8(X,Q,J,Y,$),M=c[G++]^c8(X,J,Y,$,Q),N=c[G++]^c8(X,Y,$,Q,J);return{s0:x,s1:q,s2:M,s3:N}}function NB(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=yM,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Y,J,Q),v=c[G++]^f8(W,m,Q,$,Y,J),i=c[G++]^f8(W,m,J,Q,$,Y),j=c[G++]^f8(W,m,Y,J,Q,$);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Y,J,Q),q=c[G++]^c8(X,Q,$,Y,J),M=c[G++]^c8(X,J,Q,$,Y),N=c[G++]^c8(X,Y,J,Q,$);return{s0:x,s1:q,s2:M,s3:N}}function VB(c){if(Ac(c),c.length%lc!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+lc)}function wB(c,$,Q){Ac(c);let J=c.length,Y=J%lc;if(!$&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!w$(c))c=_0(c);let X=nc(c);if($){let m=lc-Y;if(!m)m=lc;J=J+m}Q=qQ(J,Q),Xm(c,Q);let W=nc(Q);return{b:X,o:W,out:Q}}function iB(c,$){if(!$)return c;let Q=c.length;if(!Q)throw Error("aes/pcks5: empty ciphertext not allowed");let J=c[Q-1];if(J<=0||J>16)throw Error("aes/pcks5: wrong padding");let Y=c.subarray(0,-J);for(let X=0;X<J;X++)if(c[Q-X-1]!==J)throw Error("aes/pcks5: wrong padding");return Y}function vB(c){let $=new Uint8Array(16),Q=nc($);$.set(c);let J=lc-c.length;for(let Y=lc-J;Y<lc;Y++)$[Y]=J;return Q}var Vm=HJ({blockSize:16,nonceLength:16},function($,Q,J={}){let Y=!J.disablePadding;return{encrypt(X,W){let m=Nm($),{b:G,o:z,out:x}=wB(X,Y,W),q=Q,M=[m];if(!w$(q))M.push(q=_0(q));let N=nc(q),w=N[0],U=N[1],v=N[2],i=N[3],j=0;for(;j+4<=G.length;)w^=G[j+0],U^=G[j+1],v^=G[j+2],i^=G[j+3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i;if(Y){let D=vB(X.subarray(j*4));w^=D[0],U^=D[1],v^=D[2],i^=D[3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i}return sc(...M),x},decrypt(X,W){VB(X);let m=MB($),G=Q,z=[m];if(!w$(G))z.push(G=_0(G));let x=nc(G);if(W=qQ(X.length,W),!w$(X))z.push(X=_0(X));Xm(X,W);let q=nc(X),M=nc(W),N=x[0],w=x[1],U=x[2],v=x[3];for(let i=0;i+4<=q.length;){let j=N,D=w,_=U,mc=v;N=q[i+0],w=q[i+1],U=q[i+2],v=q[i+3];let{s0:g,s1:Jc,s2:u,s3:a}=NB(m,N,w,U,v);M[i++]=g^j,M[i++]=Jc^D,M[i++]=u^_,M[i++]=a^mc}return sc(...z),iB(W,Y)}}});function UB(c){return c instanceof Uint32Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint32Array"}function Gm(c,$){if(Ac($,16,"block"),!UB(c))throw Error("_encryptBlock accepts result of expandKeyLE");let Q=nc($),{s0:J,s1:Y,s2:X,s3:W}=xm(c,Q[0],Q[1],Q[2],Q[3]);return Q[0]=J,Q[1]=Y,Q[2]=X,Q[3]=W,$}function aM(c){let $=0;for(let Q=lc-1;Q>=0;Q--){let J=(c[Q]&128)>>>7;c[Q]=c[Q]<<1|$,$=J}if($)c[lc-1]^=135;return c}function JX(c,$){if(c.length!==$.length)throw Error("xorBlock: blocks must have same length");for(let Q=0;Q<c.length;Q++)c[Q]=c[Q]^$[Q];return c}class wm{buffer;destroyed;k1;k2;xk;constructor(c){Ac(c),lM(c),this.xk=Nm(c),this.buffer=new Uint8Array(0),this.destroyed=!1;let $=new Uint8Array(lc);Gm(this.xk,$),this.k1=aM($),this.k2=aM(new Uint8Array(this.k1))}update(c){let{destroyed:$,buffer:Q}=this;if($)throw Error("CMAC instance was destroyed");Ac(c);let J=new Uint8Array(Q.length+c.length);return J.set(Q),J.set(c,Q.length),this.buffer=J,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:c}=this,$=c.length,Q=Math.ceil($/lc),J;if(Q===0)Q=1,J=!1;else J=$%lc===0;let Y=(Q-1)*lc,X=c.subarray(Y),W;if(J)W=JX(new Uint8Array(X),this.k1);else{let G=new Uint8Array(lc);G.set(X),G[X.length]=128,W=JX(G,this.k2)}let m=new Uint8Array(lc);for(let G=0;G<Q-1;G++){let z=c.subarray(G*lc,(G+1)*lc);JX(m,z),Gm(this.xk,m)}return JX(m,W),Gm(this.xk,m),sc(W),m}destroy(){let{buffer:c,destroyed:$,xk:Q,k1:J,k2:Y}=this;if($)return;this.destroyed=!0,sc(c,Q,J,Y)}}var jB=(c,$)=>new wm(c).update($).digest();jB.create=(c)=>new wm(c);var gM=(c)=>Uint8Array.from(c.split(""),($)=>$.charCodeAt(0)),KB=gM("expand 16-byte k"),DB=gM("expand 32-byte k"),BB=nc(KB),HB=nc(DB);function h(c,$){return c<<$|c>>>32-$}function im(c){return c.byteOffset%4===0}var YX=64,OB=16,dM=4294967295,oM=Uint32Array.of();function RB(c,$,Q,J,Y,X,W,m){let G=Y.length,z=new Uint8Array(YX),x=nc(z),q=im(Y)&&im(X),M=q?nc(Y):oM,N=q?nc(X):oM;for(let w=0;w<G;W++){if(c($,Q,J,x,W,m),W>=dM)throw Error("arx: counter overflow");let U=Math.min(YX,G-w);if(q&&U===YX){let v=w/4;if(w%4!==0)throw Error("arx: invalid block position");for(let i=0,j;i<OB;i++)j=v+i,N[j]=M[j]^x[i];w+=YX;continue}for(let v=0,i;v<U;v++)i=w+v,X[i]=Y[i]^z[v];w+=U}}function vm(c,$){let{allowShortKeys:Q,extendNonceFn:J,counterLength:Y,counterRight:X,rounds:W}=kM({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},$);if(typeof c!=="function")throw Error("core must be a function");return DJ(Y),DJ(W),QX(X),QX(Q),(m,G,z,x,q=0)=>{Ac(m,void 0,"key"),Ac(G,void 0,"nonce"),Ac(z,void 0,"data");let M=z.length;if(x===void 0)x=new Uint8Array(M);if(Ac(x,void 0,"output"),DJ(q),q<0||q>=dM)throw Error("arx: counter overflow");if(x.length<M)throw Error(`arx: output (${x.length}) is shorter than data (${M})`);let N=[],w=m.length,U,v;if(w===32)N.push(U=_0(m)),v=HB;else if(w===16&&Q)U=new Uint8Array(32),U.set(m),U.set(m,16),v=BB,N.push(U);else throw Ac(m,32,"arx key"),Error("invalid key size");if(!im(G))N.push(G=_0(G));let i=nc(U);if(J){if(G.length!==24)throw Error("arx: extended nonce must be 24 bytes");J(v,i,nc(G.subarray(0,16)),i),G=G.subarray(16)}let j=16-Y;if(j!==G.length)throw Error(`arx: nonce must be ${j} or 16 bytes`);if(j!==12){let _=new Uint8Array(12);_.set(G,X?0:12-G.length),G=_,N.push(G)}let D=nc(G);return RB(c,v,i,D,z,x,q,W),sc(...N),x}}function rc(c,$){return c[$++]&255|(c[$++]&255)<<8}class sM{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(c){c=_0(Ac(c,32,"key"));let $=rc(c,0),Q=rc(c,2),J=rc(c,4),Y=rc(c,6),X=rc(c,8),W=rc(c,10),m=rc(c,12),G=rc(c,14);this.r[0]=$&8191,this.r[1]=($>>>13|Q<<3)&8191,this.r[2]=(Q>>>10|J<<6)&7939,this.r[3]=(J>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|X<<12)&255,this.r[5]=X>>>1&8190,this.r[6]=(X>>>14|W<<2)&8191,this.r[7]=(W>>>11|m<<5)&8065,this.r[8]=(m>>>8|G<<8)&8191,this.r[9]=G>>>5&127;for(let z=0;z<8;z++)this.pad[z]=rc(c,16+2*z)}process(c,$,Q=!1){let J=Q?0:2048,{h:Y,r:X}=this,W=X[0],m=X[1],G=X[2],z=X[3],x=X[4],q=X[5],M=X[6],N=X[7],w=X[8],U=X[9],v=rc(c,$+0),i=rc(c,$+2),j=rc(c,$+4),D=rc(c,$+6),_=rc(c,$+8),mc=rc(c,$+10),g=rc(c,$+12),Jc=rc(c,$+14),u=Y[0]+(v&8191),a=Y[1]+((v>>>13|i<<3)&8191),Xc=Y[2]+((i>>>10|j<<6)&8191),e=Y[3]+((j>>>7|D<<9)&8191),B=Y[4]+((D>>>4|_<<12)&8191),C=Y[5]+(_>>>1&8191),K=Y[6]+((_>>>14|mc<<2)&8191),R=Y[7]+((mc>>>11|g<<5)&8191),S=Y[8]+((g>>>8|Jc<<8)&8191),Z=Y[9]+(Jc>>>5|J),H=0,A=H+u*W+a*(5*U)+Xc*(5*w)+e*(5*N)+B*(5*M);H=A>>>13,A&=8191,A+=C*(5*q)+K*(5*x)+R*(5*z)+S*(5*G)+Z*(5*m),H+=A>>>13,A&=8191;let b=H+u*m+a*W+Xc*(5*U)+e*(5*w)+B*(5*N);H=b>>>13,b&=8191,b+=C*(5*M)+K*(5*q)+R*(5*x)+S*(5*z)+Z*(5*G),H+=b>>>13,b&=8191;let P=H+u*G+a*m+Xc*W+e*(5*U)+B*(5*w);H=P>>>13,P&=8191,P+=C*(5*N)+K*(5*M)+R*(5*q)+S*(5*x)+Z*(5*z),H+=P>>>13,P&=8191;let r=H+u*z+a*G+Xc*m+e*W+B*(5*U);H=r>>>13,r&=8191,r+=C*(5*w)+K*(5*N)+R*(5*M)+S*(5*q)+Z*(5*x),H+=r>>>13,r&=8191;let Yc=H+u*x+a*z+Xc*G+e*m+B*W;H=Yc>>>13,Yc&=8191,Yc+=C*(5*U)+K*(5*w)+R*(5*N)+S*(5*M)+Z*(5*q),H+=Yc>>>13,Yc&=8191;let cc=H+u*q+a*x+Xc*z+e*G+B*m;H=cc>>>13,cc&=8191,cc+=C*W+K*(5*U)+R*(5*w)+S*(5*N)+Z*(5*M),H+=cc>>>13,cc&=8191;let Oc=H+u*M+a*q+Xc*x+e*z+B*G;H=Oc>>>13,Oc&=8191,Oc+=C*m+K*W+R*(5*U)+S*(5*w)+Z*(5*N),H+=Oc>>>13,Oc&=8191;let o=H+u*N+a*M+Xc*q+e*x+B*z;H=o>>>13,o&=8191,o+=C*G+K*m+R*W+S*(5*U)+Z*(5*w),H+=o>>>13,o&=8191;let Dc=H+u*w+a*N+Xc*M+e*q+B*x;H=Dc>>>13,Dc&=8191,Dc+=C*z+K*G+R*m+S*W+Z*(5*U),H+=Dc>>>13,Dc&=8191;let Uc=H+u*U+a*w+Xc*N+e*M+B*q;H=Uc>>>13,Uc&=8191,Uc+=C*x+K*z+R*G+S*m+Z*W,H+=Uc>>>13,Uc&=8191,H=(H<<2)+H|0,H=H+A|0,A=H&8191,H=H>>>13,b+=H,Y[0]=A,Y[1]=b,Y[2]=P,Y[3]=r,Y[4]=Yc,Y[5]=cc,Y[6]=Oc,Y[7]=o,Y[8]=Dc,Y[9]=Uc}finalize(){let{h:c,pad:$}=this,Q=new Uint16Array(10),J=c[1]>>>13;c[1]&=8191;for(let W=2;W<10;W++)c[W]+=J,J=c[W]>>>13,c[W]&=8191;c[0]+=J*5,J=c[0]>>>13,c[0]&=8191,c[1]+=J,J=c[1]>>>13,c[1]&=8191,c[2]+=J,Q[0]=c[0]+5,J=Q[0]>>>13,Q[0]&=8191;for(let W=1;W<10;W++)Q[W]=c[W]+J,J=Q[W]>>>13,Q[W]&=8191;Q[9]-=8192;let Y=(J^1)-1;for(let W=0;W<10;W++)Q[W]&=Y;Y=~Y;for(let W=0;W<10;W++)c[W]=c[W]&Y|Q[W];c[0]=(c[0]|c[1]<<13)&65535,c[1]=(c[1]>>>3|c[2]<<10)&65535,c[2]=(c[2]>>>6|c[3]<<7)&65535,c[3]=(c[3]>>>9|c[4]<<4)&65535,c[4]=(c[4]>>>12|c[5]<<1|c[6]<<14)&65535,c[5]=(c[6]>>>2|c[7]<<11)&65535,c[6]=(c[7]>>>5|c[8]<<8)&65535,c[7]=(c[8]>>>8|c[9]<<5)&65535;let X=c[0]+$[0];c[0]=X&65535;for(let W=1;W<8;W++)X=(c[W]+$[W]|0)+(X>>>16)|0,c[W]=X&65535;sc(Q)}update(c){Ym(this),Ac(c),c=_0(c);let{buffer:$,blockLen:Q}=this,J=c.length;for(let Y=0;Y<J;){let X=Math.min(Q-this.pos,J-Y);if(X===Q){for(;Q<=J-Y;Y+=Q)this.process(c,Y);continue}if($.set(c.subarray(Y,Y+X),this.pos),this.pos+=X,Y+=X,this.pos===Q)this.process($,0,!1),this.pos=0}return this}destroy(){sc(this.h,this.r,this.buffer,this.pad)}digestInto(c){Ym(this),fM(c,this),this.finished=!0;let{buffer:$,h:Q}=this,{pos:J}=this;if(J){$[J++]=1;for(;J<16;J++)$[J]=0;this.process($,0,!0)}this.finalize();let Y=0;for(let X=0;X<8;X++)c[Y++]=Q[X]>>>0,c[Y++]=Q[X]>>>8;return c}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}}function pB(c){let $=(J,Y)=>c(Y).update(J).digest(),Q=c(new Uint8Array(32));return $.outputLen=Q.outputLen,$.blockLen=Q.blockLen,$.create=(J)=>c(J),$}var rM=(()=>pB((c)=>new sM(c)))();function cN(c,$,Q,J,Y,X=20){let W=c[0],m=c[1],G=c[2],z=c[3],x=$[0],q=$[1],M=$[2],N=$[3],w=$[4],U=$[5],v=$[6],i=$[7],j=Y,D=Q[0],_=Q[1],mc=Q[2],g=W,Jc=m,u=G,a=z,Xc=x,e=q,B=M,C=N,K=w,R=U,S=v,Z=i,H=j,A=D,b=_,P=mc;for(let Yc=0;Yc<X;Yc+=2)g=g+Xc|0,H=h(H^g,16),K=K+H|0,Xc=h(Xc^K,12),g=g+Xc|0,H=h(H^g,8),K=K+H|0,Xc=h(Xc^K,7),Jc=Jc+e|0,A=h(A^Jc,16),R=R+A|0,e=h(e^R,12),Jc=Jc+e|0,A=h(A^Jc,8),R=R+A|0,e=h(e^R,7),u=u+B|0,b=h(b^u,16),S=S+b|0,B=h(B^S,12),u=u+B|0,b=h(b^u,8),S=S+b|0,B=h(B^S,7),a=a+C|0,P=h(P^a,16),Z=Z+P|0,C=h(C^Z,12),a=a+C|0,P=h(P^a,8),Z=Z+P|0,C=h(C^Z,7),g=g+e|0,P=h(P^g,16),S=S+P|0,e=h(e^S,12),g=g+e|0,P=h(P^g,8),S=S+P|0,e=h(e^S,7),Jc=Jc+B|0,H=h(H^Jc,16),Z=Z+H|0,B=h(B^Z,12),Jc=Jc+B|0,H=h(H^Jc,8),Z=Z+H|0,B=h(B^Z,7),u=u+C|0,A=h(A^u,16),K=K+A|0,C=h(C^K,12),u=u+C|0,A=h(A^u,8),K=K+A|0,C=h(C^K,7),a=a+Xc|0,b=h(b^a,16),R=R+b|0,Xc=h(Xc^R,12),a=a+Xc|0,b=h(b^a,8),R=R+b|0,Xc=h(Xc^R,7);let r=0;J[r++]=W+g|0,J[r++]=m+Jc|0,J[r++]=G+u|0,J[r++]=z+a|0,J[r++]=x+Xc|0,J[r++]=q+e|0,J[r++]=M+B|0,J[r++]=N+C|0,J[r++]=w+K|0,J[r++]=U+R|0,J[r++]=v+S|0,J[r++]=i+Z|0,J[r++]=j+H|0,J[r++]=D+A|0,J[r++]=_+b|0,J[r++]=mc+P|0}function IB(c,$,Q,J){let Y=c[0],X=c[1],W=c[2],m=c[3],G=$[0],z=$[1],x=$[2],q=$[3],M=$[4],N=$[5],w=$[6],U=$[7],v=Q[0],i=Q[1],j=Q[2],D=Q[3];for(let mc=0;mc<20;mc+=2)Y=Y+G|0,v=h(v^Y,16),M=M+v|0,G=h(G^M,12),Y=Y+G|0,v=h(v^Y,8),M=M+v|0,G=h(G^M,7),X=X+z|0,i=h(i^X,16),N=N+i|0,z=h(z^N,12),X=X+z|0,i=h(i^X,8),N=N+i|0,z=h(z^N,7),W=W+x|0,j=h(j^W,16),w=w+j|0,x=h(x^w,12),W=W+x|0,j=h(j^W,8),w=w+j|0,x=h(x^w,7),m=m+q|0,D=h(D^m,16),U=U+D|0,q=h(q^U,12),m=m+q|0,D=h(D^m,8),U=U+D|0,q=h(q^U,7),Y=Y+z|0,D=h(D^Y,16),w=w+D|0,z=h(z^w,12),Y=Y+z|0,D=h(D^Y,8),w=w+D|0,z=h(z^w,7),X=X+x|0,v=h(v^X,16),U=U+v|0,x=h(x^U,12),X=X+x|0,v=h(v^X,8),U=U+v|0,x=h(x^U,7),W=W+q|0,i=h(i^W,16),M=M+i|0,q=h(q^M,12),W=W+q|0,i=h(i^W,8),M=M+i|0,q=h(q^M,7),m=m+G|0,j=h(j^m,16),N=N+j|0,G=h(G^N,12),m=m+G|0,j=h(j^m,8),N=N+j|0,G=h(G^N,7);let _=0;J[_++]=Y,J[_++]=X,J[_++]=W,J[_++]=m,J[_++]=v,J[_++]=i,J[_++]=j,J[_++]=D}var XX=vm(cN,{counterRight:!1,counterLength:4,allowShortKeys:!1}),ZB=vm(cN,{counterRight:!1,counterLength:8,extendNonceFn:IB,allowShortKeys:!1});var LB=new Uint8Array(16),tM=(c,$)=>{c.update($);let Q=$.length%16;if(Q)c.update(LB.subarray(Q))},_B=new Uint8Array(32);function eM(c,$,Q,J,Y){if(Y!==void 0)Ac(Y,void 0,"AAD");let X=c($,Q,_B),W=Wm(J.length,Y?Y.length:0,!0),m=rM.create(X);if(Y)tM(m,Y);tM(m,J),m.update(W);let G=m.digest();return sc(X,W),G}var $N=(c)=>($,Q,J)=>{return{encrypt(X,W){let m=X.length;W=qQ(m+16,W,!1),W.set(X);let G=W.subarray(0,-16);c($,Q,G,G,1);let z=eM(c,$,Q,G,J);return W.set(z,m),sc(z),W},decrypt(X,W){W=qQ(X.length-16,W,!1);let m=X.subarray(0,-16),G=X.subarray(-16),z=eM(c,$,Q,m,J);if(!BJ(G,z))throw Error("invalid tag");return W.set(X.subarray(0,-16)),c($,Q,W,W,1),sc(z),W}}},eb=HJ({blockSize:64,nonceLength:12,tagLength:16},$N(XX)),cF=HJ({blockSize:64,nonceLength:24,tagLength:16},$N(ZB));function JN(c,$,Q){if(z$(c),Q===void 0)Q=new Uint8Array(c.outputLen);return E8(c,Q,$)}var Um=Uint8Array.of(0),QN=Uint8Array.of();function YN(c,$,Q,J=32){z$(c),I0(J,"length");let Y=c.outputLen;if(J>255*Y)throw Error("Length must be <= 255*HashLen");let X=Math.ceil(J/Y);if(Q===void 0)Q=QN;else vc(Q,void 0,"info");let W=new Uint8Array(X*Y),m=E8.create(c,$),G=m._cloneInto(),z=new Uint8Array(m.outputLen);for(let x=0;x<X;x++)Um[0]=x+1,G.update(x===0?QN:z).update(Q).update(Um).digestInto(z),W.set(z,Y*x),m._cloneInto(G);return m.destroy(),G.destroy(),h0(z,Um),W.slice(0,J)}var SB=Object.defineProperty,Sc=(c,$)=>{for(var Q in $)SB(c,Q,{get:$[Q],enumerable:!0})},AB={};Sc(AB,{binarySearch:()=>Rm,bytesToHex:()=>Hc,hexToBytes:()=>Rc,insertEventIntoAscendingList:()=>PB,insertEventIntoDescendingList:()=>CB,isHex32:()=>q0,mergeReverseSortedLists:()=>EB,normalizeURL:()=>xN,utf8Decoder:()=>i8,utf8Encoder:()=>S0});var i8=new TextDecoder("utf-8"),S0=new TextEncoder;function xN(c){try{if(c.indexOf("://")===-1)c="wss://"+c;let $=new URL(c);if($.protocol==="http:")$.protocol="ws:";else if($.protocol==="https:")$.protocol="wss:";if($.pathname=$.pathname.replace(/\/+/g,"/"),$.pathname.endsWith("/"))$.pathname=$.pathname.slice(0,-1);if($.port==="80"&&$.protocol==="ws:"||$.port==="443"&&$.protocol==="wss:")$.port="";return $.searchParams.sort(),$.hash="",$.toString()}catch($){throw Error(`Invalid URL: ${c}`)}}function CB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return Y.created_at-$.created_at});if(!J)c.splice(Q,0,$);return c}function PB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return $.created_at-Y.created_at});if(!J)c.splice(Q,0,$);return c}function Rm(c,$){let Q=0,J=c.length-1;while(Q<=J){let Y=Math.floor((Q+J)/2),X=$(c[Y]);if(X===0)return[Y,!0];if(X<0)J=Y-1;else Q=Y+1}return[Q,!1]}function EB(c,$){let Q=Array(c.length+$.length);Q.length=0;let J=0,Y=0,X=[];while(J<c.length&&Y<$.length){let W;if(c[J]?.created_at>$[Y]?.created_at)W=c[J],J++;else W=$[Y],Y++;if(Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(J<c.length){let W=c[J];if(J++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(Y<$.length){let W=$[Y];if(Y++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}return Q}function q0(c){for(let $=0;$<64;$++){let Q=c.charCodeAt($);if(isNaN(Q)||Q<48||Q>102||Q>57&&Q<97)return!1}return!0}var NQ=Symbol("verified"),bB=(c)=>c instanceof Object;function pm(c){if(!bB(c))return!1;if(typeof c.kind!=="number")return!1;if(typeof c.content!=="string")return!1;if(typeof c.created_at!=="number")return!1;if(typeof c.pubkey!=="string")return!1;if(!q0(c.pubkey))return!1;if(!Array.isArray(c.tags))return!1;for(let $=0;$<c.tags.length;$++){let Q=c.tags[$];if(!Array.isArray(Q))return!1;for(let J=0;J<Q.length;J++)if(typeof Q[J]!=="string")return!1}return!0}var FB=class{generateSecretKey(){return xQ.utils.randomSecretKey()}getPublicKey(c){return Hc(xQ.getPublicKey(c))}finalizeEvent(c,$){let Q=c;return Q.pubkey=Hc(xQ.getPublicKey($)),Q.id=mX(Q),Q.sig=Hc(xQ.sign(Rc(mX(Q)),$)),Q[NQ]=!0,Q}verifyEvent(c){if(typeof c[NQ]==="boolean")return c[NQ];try{let $=mX(c);if($!==c.id)return c[NQ]=!1,!1;let Q=xQ.verify(Rc(c.sig),Rc($),Rc(c.pubkey));return c[NQ]=Q,Q}catch($){return c[NQ]=!1,!1}}};function TB(c){if(!pm(c))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,c.pubkey,c.created_at,c.kind,c.tags,c.content])}function mX(c){let $=Q0(S0.encode(TB(c)));return Hc($)}var xX=new FB,fB=xX.generateSecretKey,OJ=xX.getPublicKey,A0=xX.finalizeEvent,RJ=xX.verifyEvent,nB={};Sc(nB,{AIEmbeddings:()=>PH,AppCurationSet:()=>wR,Application:()=>NR,AuthoredPodcasts:()=>PO,BadgeAward:()=>gB,BadgeDefinition:()=>$R,Bid:()=>zH,BidConfirmation:()=>xH,BlobsAuth:()=>yO,BlockedRelaysList:()=>iO,BlossomServerList:()=>LO,BookmarkList:()=>NO,Bookmarksets:()=>sO,Calendar:()=>AR,CalendarEventRSVP:()=>CR,CashuMintAnnouncement:()=>lR,CashuWalletEvent:()=>kO,CashuWalletHistory:()=>yH,CashuWalletTokens:()=>hH,ChannelCreation:()=>iN,ChannelHideMessage:()=>jN,ChannelMessage:()=>UN,ChannelMetadata:()=>vN,ChannelMuteUser:()=>KN,ChatMessage:()=>dB,Chess:()=>WH,ClassifiedListing:()=>DR,ClientAuth:()=>BN,CodeSnippet:()=>jH,CoinjoinPool:()=>FH,Comment:()=>VH,CommunitiesList:()=>VO,CommunityDefinition:()=>nR,CommunityPostApproval:()=>nH,ConferenceEvent:()=>UR,Contacts:()=>hB,CreateOrUpdateProduct:()=>YR,CreateOrUpdateStall:()=>JR,CuratedVideoSets:()=>tO,Curationsets:()=>rO,Date:()=>_R,DecoupledEncryptionKeyDistribution:()=>fH,DecoupledKeyAnnouncement:()=>pO,DecoupledKeyClientAnnouncement:()=>TH,DirectMessageRelaysList:()=>IO,DraftClassifiedListing:()=>BR,DraftEvent:()=>IR,DraftLong:()=>GR,Emojisets:()=>zR,EncryptedDirectMessage:()=>yB,EventDeletion:()=>oB,FavoriteFollowSets:()=>OO,FavoritePodcasts:()=>ZO,FavoriteRelays:()=>jO,FedimintAnnouncement:()=>hR,Feed:()=>LR,FileMessage:()=>eB,FileMetadata:()=>MH,FileServerPreference:()=>_O,Followsets:()=>oO,ForumThread:()=>rB,GenericRepost:()=>Sm,Genericlists:()=>gO,GeocacheListing:()=>kR,GeocacheLog:()=>oH,GeocacheLogEntry:()=>aR,GeocacheProofOfFind:()=>gH,GiftWrap:()=>DN,GitPullRequest:()=>DH,GitPullRequestUpdate:()=>BH,GoodWikiAuthorList:()=>SO,GoodWikiRelayList:()=>AO,GroupMetadata:()=>oR,HTTPAuth:()=>Am,Handlerinformation:()=>bR,Handlerrecommendation:()=>ER,Highlights:()=>zO,InteractiveRoom:()=>vR,InterestsList:()=>DO,Interestsets:()=>QR,Issue:()=>HH,JobFeedback:()=>aH,JobRequest:()=>uH,JobResult:()=>kH,Label:()=>AH,LegacyNsiteFile:()=>TR,LightningPubRPC:()=>aO,LinkSet:()=>ZR,LiveChatMessage:()=>UH,LiveEvent:()=>iR,LongFormArticle:()=>mR,MarketplaceUI:()=>XR,MediaFollows:()=>HO,MediaStarterPacks:()=>eR,MergeRequests:()=>mH,Metadata:()=>aB,ModularArticleContent:()=>qR,ModularArticleHeader:()=>xR,MuteSets:()=>eO,Mutelist:()=>xO,NWCWalletInfo:()=>nO,NWCWalletRequest:()=>HN,NWCWalletResponse:()=>lO,NormalVideo:()=>QH,NostrConnect:()=>hO,NsiteNamed:()=>uR,NsiteRoot:()=>uO,NutZap:()=>XO,NutZapInfo:()=>BO,OpenTimestamps:()=>qH,Patch:()=>KH,PeerToPeerOrderEvents:()=>yR,Photo:()=>$H,Pinlist:()=>qO,PodcastEpisode:()=>XH,PodcastMetadata:()=>CO,Poll:()=>NH,PollResponse:()=>GH,PrivateDirectMessage:()=>wN,PrivateEventRelayList:()=>KO,ProblemTracker:()=>LH,ProductSoldAsAuction:()=>WR,ProfileBadges:()=>cR,ProxyAnnouncement:()=>TO,PublicChatsList:()=>wO,PublicMessage:()=>YH,Reaction:()=>_m,ReactionToWebsite:()=>cH,RecommendRelay:()=>lB,Redirects:()=>pR,RelayDiscovery:()=>VR,RelayList:()=>MO,RelayMonitorAnnouncement:()=>EO,RelayReview:()=>PR,RelayReviews:()=>CH,Relaysets:()=>dO,ReleaseArtifactSets:()=>MR,Reply:()=>OH,Report:()=>_H,Reporting:()=>SH,RepositoryAnnouncement:()=>HR,RepositoryState:()=>OR,Repost:()=>Lm,ReservedCashuWalletTokens:()=>lH,RoomPresence:()=>bO,Scroll:()=>iH,Seal:()=>VN,SearchRelaysList:()=>vO,ShortTextNote:()=>NN,ShortVideo:()=>JH,SimpleGroupAdmins:()=>gR,SimpleGroupCreateGroup:()=>eH,SimpleGroupCreateInvite:()=>$O,SimpleGroupDeleteEvent:()=>tH,SimpleGroupDeleteGroup:()=>cO,SimpleGroupEditMetadata:()=>rH,SimpleGroupJoinRequest:()=>QO,SimpleGroupLeaveRequest:()=>JO,SimpleGroupList:()=>UO,SimpleGroupLiveKitParticipants:()=>rR,SimpleGroupMembers:()=>dR,SimpleGroupPutUser:()=>dH,SimpleGroupRemoveUser:()=>sH,SimpleGroupReply:()=>tB,SimpleGroupRoles:()=>sR,SimpleGroupThreadedReply:()=>sB,SlideSet:()=>KR,SoftwareApplication:()=>FR,StarterPacks:()=>tR,StatusApplied:()=>pH,StatusClosed:()=>IH,StatusDraft:()=>ZH,StatusOpen:()=>RH,TidalLogin:()=>WO,Time:()=>SR,Torrent:()=>EH,TorrentComment:()=>bH,TransportMethodAnnouncement:()=>fO,UserEmojiList:()=>RO,UserGraspList:()=>FO,UserStatuses:()=>jR,VideoViewEvent:()=>fR,Voice:()=>wH,VoiceComment:()=>vH,WebBookmarks:()=>cp,WikiArticle:()=>RR,Zap:()=>GO,ZapGoal:()=>YO,ZapRequest:()=>mO,classifyKind:()=>uB,isAddressableKind:()=>Zm,isEphemeralKind:()=>MN,isKind:()=>kB,isRegularKind:()=>qN,isReplaceableKind:()=>Im});function qN(c){return c<1e4&&c!==0&&c!==3}function Im(c){return c===0||c===3||1e4<=c&&c<20000}function MN(c){return 20000<=c&&c<30000}function Zm(c){return 30000<=c&&c<40000}function uB(c){if(qN(c))return"regular";if(Im(c))return"replaceable";if(MN(c))return"ephemeral";if(Zm(c))return"parameterized";return"unknown"}function kB(c,$){let Q=$ instanceof Array?$:[$];return pm(c)&&Q.includes(c.kind)||!1}var aB=0,NN=1,lB=2,hB=3,yB=4,oB=5,Lm=6,_m=7,gB=8,dB=9,sB=10,rB=11,tB=12,VN=13,wN=14,eB=15,Sm=16,cH=17,$H=20,QH=21,JH=22,YH=24,iN=40,vN=41,UN=42,jN=43,KN=44,XH=54,WH=64,mH=818,GH=1018,zH=1021,xH=1022,qH=1040,DN=1059,MH=1063,NH=1068,VH=1111,wH=1222,iH=1227,vH=1244,UH=1311,jH=1337,KH=1617,DH=1618,BH=1619,HH=1621,OH=1622,RH=1630,pH=1631,IH=1632,ZH=1633,LH=1971,_H=1984,SH=1984,AH=1985,CH=1986,PH=1987,EH=2003,bH=2004,FH=2022,TH=4454,fH=4455,nH=4550,uH=5999,kH=6999,aH=7000,lH=7374,hH=7375,yH=7376,oH=7516,gH=7517,dH=9000,sH=9001,rH=9002,tH=9005,eH=9007,cO=9008,$O=9009,QO=9021,JO=9022,YO=9041,XO=9321,WO=9467,mO=9734,GO=9735,zO=9802,xO=1e4,qO=10001,MO=10002,NO=10003,VO=10004,wO=10005,iO=10006,vO=10007,UO=10009,jO=10012,KO=10013,DO=10015,BO=10019,HO=10020,OO=10021,RO=10030,pO=10044,IO=10050,ZO=10054,LO=10063,_O=10096,SO=10101,AO=10102,CO=10154,PO=10164,EO=10166,bO=10312,FO=10317,TO=10377,fO=11111,nO=13194,uO=15128,kO=17375,aO=21000,BN=22242,HN=23194,lO=23195,hO=24133,yO=24242,Am=27235,oO=30000,gO=30001,dO=30002,sO=30003,rO=30004,tO=30005,eO=30007,cR=30008,$R=30009,QR=30015,JR=30017,YR=30018,XR=30019,WR=30020,mR=30023,GR=30024,zR=30030,xR=30040,qR=30041,MR=30063,NR=30078,VR=30166,wR=30267,iR=30311,vR=30312,UR=30313,jR=30315,KR=30388,DR=30402,BR=30403,HR=30617,OR=30618,RR=30818,pR=30819,IR=31234,ZR=31388,LR=31890,_R=31922,SR=31923,AR=31924,CR=31925,PR=31987,ER=31989,bR=31990,FR=32267,TR=34128,fR=34237,nR=34550,uR=35128,kR=37515,aR=37516,lR=38172,hR=38173,yR=38383,oR=39000,gR=39001,dR=39002,sR=39003,rR=39004,tR=39089,eR=39092,cp=39701;function $p(c,$){if(c.ids&&c.ids.indexOf($.id)===-1)return!1;if(c.kinds&&c.kinds.indexOf($.kind)===-1)return!1;if(c.authors&&c.authors.indexOf($.pubkey)===-1)return!1;for(let Q in c)if(Q[0]==="#"){let J=Q.slice(1),Y=c[`#${J}`];if(Y&&!$.tags.find(([X,W])=>X===Q.slice(1)&&Y.indexOf(W)!==-1))return!1}if(c.since&&$.created_at<c.since)return!1;if(c.until&&$.created_at>c.until)return!1;return!0}function Qp(c,$){for(let Q=0;Q<c.length;Q++)if($p(c[Q],$))return!0;return!1}var Jp={};Sc(Jp,{getHex64:()=>qX,getInt:()=>ON,getSubscriptionId:()=>RN,matchEventId:()=>Yp,matchEventKind:()=>Wp,matchEventPubkey:()=>Xp});function qX(c,$){let Q=$.length+3,J=c.indexOf(`"${$}":`)+Q,Y=c.slice(J).indexOf('"')+J+1;return c.slice(Y,Y+64)}function ON(c,$){let Q=$.length,J=c.indexOf(`"${$}":`)+Q+3,Y=c.slice(J),X=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,X),10)}function RN(c){let $=c.slice(0,22).indexOf('"EVENT"');if($===-1)return null;let Q=c.slice($+7+1).indexOf('"');if(Q===-1)return null;let J=$+7+1+Q,Y=c.slice(J+1,80).indexOf('"');if(Y===-1)return null;let X=J+1+Y;return c.slice(J+1,X)}function Yp(c,$){return $===qX(c,"id")}function Xp(c,$){return $===qX(c,"pubkey")}function Wp(c,$){return $===ON(c,"kind")}var mp={};Sc(mp,{makeAuthEvent:()=>pN});function pN(c,$){return{kind:BN,created_at:Math.floor(Date.now()/1000),tags:[["relay",c],["challenge",$]],content:""}}var Om=class extends Error{constructor(c,$){super(`Tried to send message '${c} on a closed connection to ${$}.`);this.name="SendingOnClosedConnection"}},Gp=class{url;_connected=!1;onclose=null;onnotice=(c)=>console.debug(`NOTICE from ${this.url}: ${c}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(c,$){if(this.url=xN(c),this.verifyEvent=$.verifyEvent,this._WebSocket=$.websocketImplementation||WebSocket,this.enablePing=$.enablePing,this.enableReconnect=$.enableReconnect||!1,$.idleTimeout)this.idleTimeout=$.idleTimeout}static async connect(c,$){let Q=new Gp(c,$);return await Q.connect($),Q}closeAllSubscriptions(c){for(let[$,Q]of this.openSubs)Q.close(c);this.openSubs.clear();for(let[$,Q]of this.openEventPublishes)Q.reject(Error(c));this.openEventPublishes.clear();for(let[$,Q]of this.openCountRequests)Q.reject(Error(c));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let c=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch($){}},c)}handleHardClose(c){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions(c)}async connect(c){let $;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((Q,J)=>{if(c?.timeout)$=setTimeout(()=>{if(J("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},c.timeout);if(c?.abort)c.abort.onabort=J;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout($),J(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout($),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let X of this.openSubs.values()){if(X.eosed=!1,Y){for(let W=0;W<X.filters.length;W++)if(X.lastEmitted)X.filters[W].since=X.lastEmitted+1}X.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);Q()},this.ws.onerror=()=>{if(clearTimeout($),J("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout($),J(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise((c)=>{this.ws.once("pong",()=>c(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((c,$)=>{if(!this.connectionPromise)return $(Error(`no connection to ${this.url}, can't ping`));try{let Q=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{c(!0),Q.close()},onclose(){c(!0)},eoseTimeout:this.pingTimeout+1000})}catch(Q){$(Q)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(($)=>setTimeout(()=>$(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send(c){if(!this.connectionPromise)throw new Om(c,this.url);this.connectionPromise.then(()=>{this.ws?.send(c)})}async auth(c){let $=this.challenge;if(!$)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(Q,J)=>{try{let Y=await c(pN(this.url,$)),X=setTimeout(()=>{let W=this.openEventPublishes.get(Y.id);if(W)W.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:Q,reject:J,timeout:X}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish(c){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let $=new Promise((Q,J)=>{let Y=setTimeout(()=>{let X=this.openEventPublishes.get(c.id);if(X)X.reject(Error("publish timed out")),this.openEventPublishes.delete(c.id)},this.publishTimeout);this.openEventPublishes.set(c.id,{resolve:Q,reject:J,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify(c)+"]")}catch(Q){let J=this.openEventPublishes.get(c.id);if(J)J.reject(Q),this.openEventPublishes.delete(c.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return $}async count(c,$){return(await this.countWithHLL(c,$)).count}async countWithHLL(c,$){this.serial++;let Q=$?.id||"count:"+this.serial,J=new Promise((Y,X)=>{this.openCountRequests.set(Q,{resolve:Y,reject:X})});try{await this.send('["COUNT","'+Q+'",'+JSON.stringify(c).substring(1))}catch(Y){let X=this.openCountRequests.get(Q);if(X)X.reject(Y),this.openCountRequests.delete(Q)}return J}subscribe(c,$){if($.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=this.prepareSubscription(c,$);if(Q.fire(),$.abort)$.abort.onabort=()=>Q.close(String($.abort.reason||"<aborted>"));return Q}prepareSubscription(c,$){this.serial++;let Q=$.id||($.label?$.label+":":"sub:")+this.serial,J=new zp(this,Q,c,$);return this.openSubs.set(Q,J),J}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage(c){let $=c.data;if(!$)return;let Q=RN($);if(Q){let J=this.openSubs.get(Q);if(!J)return;let Y=qX($,"id"),X=J.alreadyHaveEvent?.(Y);if(J.receivedEvent?.(this,Y),X)return}try{let J=JSON.parse($);switch(J[0]){case"EVENT":{let Y=this.openSubs.get(J[1]),X=J[2];if(Qp(Y.filters,X)&&this.verifyEvent(X,this.url))Y.onevent(X);else Y.oninvalidevent?.(X);if(!Y.lastEmitted||Y.lastEmitted<X.created_at)Y.lastEmitted=X.created_at;return}case"COUNT":{let Y=J[1],X=J[2],W=this.openCountRequests.get(Y);if(W)W.resolve(X),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(J[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=J[1],X=J[2],W=J[3],m=this.openEventPublishes.get(Y);if(m){if(clearTimeout(m.timeout),X)m.resolve(W);else m.reject(Error(W));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=J[1],X=this.openSubs.get(Y);if(!X){let W=this.openCountRequests.get(Y);if(W)W.reject(Error(J[2])),this.openCountRequests.delete(Y);return}X.closed=!0,X.close(J[2]);return}case"NOTICE":{this.onnotice(J[1]);return}case"AUTH":{if(this.challenge=J[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof Om))throw Y});return}default:{this.openSubs.get(J[1])?.oncustom?.(J);return}}}catch(J){try{let[Y,X,W]=JSON.parse($);console.warn(`[nostr] relay ${this.url} error processing message:`,J,W)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,J)}return}}},zp=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor(c,$,Q,J){if(Q.length===0)throw Error("subscription can't be created with zero filters");this.relay=c,this.filters=Q,this.id=$,this.alreadyHaveEvent=J.alreadyHaveEvent,this.receivedEvent=J.receivedEvent,this.eoseTimeout=J.eoseTimeout||c.baseEoseTimeout,this.oneose=J.oneose,this.onclose=J.onclose,this.oninvalidevent=J.oninvalidevent,this.onevent=J.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close(c="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch($){if($ instanceof Om);else throw $}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.(c)}},xp;try{xp=WebSocket}catch{}var qp=256,zF=qp*2;var Mp;try{Mp=WebSocket}catch{}var MX={};Sc(MX,{BECH32_REGEX:()=>IN,Bech32MaxSize:()=>Cm,NostrTypeGuard:()=>Np,decode:()=>NX,decodeNostrURI:()=>wp,encodeBytes:()=>wX,naddrEncode:()=>Dp,neventEncode:()=>Kp,noteEncode:()=>Up,nprofileEncode:()=>jp,npubEncode:()=>vp,nsecEncode:()=>ip});var Np={isNProfile:(c)=>/^nprofile1[a-z\d]+$/.test(c||""),isNEvent:(c)=>/^nevent1[a-z\d]+$/.test(c||""),isNAddr:(c)=>/^naddr1[a-z\d]+$/.test(c||""),isNSec:(c)=>/^nsec1[a-z\d]{58}$/.test(c||""),isNPub:(c)=>/^npub1[a-z\d]{58}$/.test(c||""),isNote:(c)=>/^note1[a-z\d]+$/.test(c||""),isNcryptsec:(c)=>/^ncryptsec1[a-z\d]+$/.test(c||"")},Cm=5000,IN=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Vp(c){let $=new Uint8Array(4);return $[0]=c>>24&255,$[1]=c>>16&255,$[2]=c>>8&255,$[3]=c&255,$}function wp(c){try{if(c.startsWith("nostr:"))c=c.substring(6);return NX(c)}catch($){return{type:"invalid",data:null}}}function NX(c){let{prefix:$,words:Q}=T8.decode(c,Cm),J=new Uint8Array(T8.fromWords(Q));switch($){case"nprofile":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nevent":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[],author:Y[2]?.[0]?Hc(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(Hc(Y[3][0]),16):void 0}}}case"naddr":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:i8.decode(Y[0][0]),pubkey:Hc(Y[2][0]),kind:parseInt(Hc(Y[3][0]),16),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nsec":return{type:$,data:J};case"npub":case"note":return{type:$,data:Hc(J)};default:throw Error(`unknown prefix ${$}`)}}function jm(c){let $={},Q=c;while(Q.length>0){if(Q.length<2)throw Error("not enough data to read TLV");let J=Q[0],Y=Q[1],X=Q.slice(2,2+Y);if(Q=Q.slice(2+Y),X.length<Y)throw Error(`not enough data to read on TLV ${J}`);$[J]=$[J]||[],$[J].push(X)}return $}function ip(c){return wX("nsec",c)}function vp(c){return wX("npub",Rc(c))}function Up(c){return wX("note",Rc(c))}function VX(c,$){let Q=T8.toWords($);return T8.encode(c,Q,Cm)}function wX(c,$){return VX(c,$)}function jp(c){let $=Pm({0:[Rc(c.pubkey)],1:(c.relays||[]).map((Q)=>S0.encode(Q))});return VX("nprofile",$)}function Kp(c){let $;if(c.kind!==void 0)$=Vp(c.kind);let Q=Pm({0:[Rc(c.id)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:c.author?[Rc(c.author)]:[],3:$?[new Uint8Array($)]:[]});return VX("nevent",Q)}function Dp(c){let $=new ArrayBuffer(4);new DataView($).setUint32(0,c.kind,!1);let Q=Pm({0:[S0.encode(c.identifier)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:[Rc(c.pubkey)],3:[new Uint8Array($)]});return VX("naddr",Q)}function Pm(c){let $=[];return Object.entries(c).reverse().forEach(([Q,J])=>{J.forEach((Y)=>{let X=new Uint8Array(Y.length+2);X.set([parseInt(Q)],0),X.set([Y.length],1),X.set(Y,2),$.push(X)})}),Fc(...$)}var Bp={};Sc(Bp,{decrypt:()=>Hp,encrypt:()=>ZN});function ZN(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),Y=UJ.getSharedSecret(J,Rc("02"+$)),X=LN(Y),W=Uint8Array.from(o0(16)),m=S0.encode(Q),G=Vm(X,W).encrypt(m),z=L0.encode(new Uint8Array(G)),x=L0.encode(new Uint8Array(W.buffer));return`${z}?iv=${x}`}function Hp(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),[Y,X]=Q.split("?iv="),W=UJ.getSharedSecret(J,Rc("02"+$)),m=LN(W),G=L0.decode(X),z=L0.decode(Y),x=Vm(m,G).decrypt(z);return i8.decode(x)}function LN(c){return c.slice(1,33)}var Op={};Sc(Op,{NIP05_REGEX:()=>Em,isNip05:()=>Rp,isValid:()=>Zp,queryProfile:()=>_N,searchDomain:()=>Ip,useFetchImplementation:()=>pp});var Em=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Rp=(c)=>Em.test(c||""),iX;try{iX=fetch}catch(c){}function pp(c){iX=c}async function Ip(c,$=""){try{let Q=`https://${c}/.well-known/nostr.json?name=${$}`,J=await iX(Q,{redirect:"manual"});if(J.status!==200)throw Error("Wrong response code");return(await J.json()).names}catch(Q){return{}}}async function _N(c){let $=c.match(Em);if(!$)return null;let[,Q="_",J]=$;try{let Y=`https://${J}/.well-known/nostr.json?name=${Q}`,X=await iX(Y,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");let W=await X.json(),m=W.names[Q];return m?{pubkey:m,relays:W.relays?.[m]}:null}catch(Y){return null}}async function Zp(c,$){let Q=await _N($);return Q?Q.pubkey===c:!1}var Lp={};Sc(Lp,{parse:()=>_p});function _p(c){let $={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},Q,J;for(let Y=c.tags.length-1;Y>=0;Y--){let X=c.tags[Y];if(X[0]==="e"&&X[1]&&q0(X[1])){let[W,m,G,z,x]=X,q={id:m,relays:G?[G]:[],author:x&&q0(x)?x:void 0};if(z==="root"){$.root=q;continue}if(z==="reply"){$.reply=q;continue}if(z==="mention"){$.mentions.push(q);continue}if(!Q)Q=q;else J=q;$.mentions.push(q);continue}if(X[0]==="q"&&X[1]&&q0(X[1])){let[W,m,G]=X;$.quotes.push({id:m,relays:G?[G]:[]})}if(X[0]==="p"&&X[1]&&q0(X[1])){$.profiles.push({pubkey:X[1],relays:X[2]?[X[2]]:[]});continue}}if(!$.root)$.root=J||Q||$.reply;if(!$.reply)$.reply=Q||$.root;return[$.reply,$.root].forEach((Y)=>{if(!Y)return;let X=$.mentions.indexOf(Y);if(X!==-1)$.mentions.splice(X,1);if(Y.author){let W=$.profiles.find((m)=>m.pubkey===Y.author);if(W&&W.relays){if(!Y.relays)Y.relays=[];W.relays.forEach((m)=>{if(Y.relays?.indexOf(m)===-1)Y.relays.push(m)}),W.relays=Y.relays}}}),$.mentions.forEach((Y)=>{if(Y.author){let X=$.profiles.find((W)=>W.pubkey===Y.author);if(X&&X.relays){if(!Y.relays)Y.relays=[];X.relays.forEach((W)=>{if(Y.relays.indexOf(W)===-1)Y.relays.push(W)}),X.relays=Y.relays}}}),$}var Sp={};Sc(Sp,{fetchRelayInformation:()=>Cp,useFetchImplementation:()=>Ap});var SN;try{SN=fetch}catch{}function Ap(c){SN=c}async function Cp(c){return await(await fetch(c.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Pp={};Sc(Pp,{getPow:()=>Ep,minePow:()=>Fp});function Ep(c){let $=0;for(let Q=0;Q<64;Q+=8){let J=parseInt(c.substring(Q,Q+8),16);if(J===0)$+=32;else{$+=Math.clz32(J);break}}return $}function bp(c){let $=0;for(let Q=0;Q<c.length;Q++){let J=c[Q];if(J===0)$+=8;else{$+=Math.clz32(J)-24;break}}return $}function Fp(c,$){let Q=0,J=c,Y=["nonce",Q.toString(),$.toString()];J.tags.push(Y);while(!0){let X=Math.floor(new Date().getTime()/1000);if(X!==J.created_at)Q=0,J.created_at=X;Y[1]=(++Q).toString();let W=Q0(S0.encode(JSON.stringify([0,J.pubkey,J.created_at,J.kind,J.tags,J.content])));if(bp(W)>=$){J.id=Hc(W);break}}return J}var Tp={};Sc(Tp,{unwrapEvent:()=>dp,unwrapManyEvents:()=>sp,wrapEvent:()=>lN,wrapManyEvents:()=>gp});var fp={};Sc(fp,{createRumor:()=>nN,createSeal:()=>uN,createWrap:()=>kN,unwrapEvent:()=>am,unwrapManyEvents:()=>aN,wrapEvent:()=>zX,wrapManyEvents:()=>yp});var np={};Sc(np,{decrypt:()=>km,encrypt:()=>um,getConversationKey:()=>fm,v2:()=>lp});var bm=1,Fm=4294967295,Tm=65536;function fm(c,$){let Q=UJ.getSharedSecret(c,Rc("02"+$)).subarray(1,33);return JN(Q0,Q,S0.encode("nip44-v2"))}function AN(c,$){let Q=YN(Q0,c,$,76);return{chacha_key:Q.subarray(0,32),chacha_nonce:Q.subarray(32,44),hmac_key:Q.subarray(44,76)}}function nm(c){if(!Number.isSafeInteger(c)||c<1)throw Error("expected positive integer");if(c<=32)return 32;let $=2**(Math.floor(Math.log2(c-1))+1),Q=$<=256?32:$/8;return Q*(Math.floor((c-1)/Q)+1)}function up(c){if(!Number.isSafeInteger(c)||c<bm||c>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let $=new Uint8Array(2);return new DataView($.buffer).setUint16(0,c,!1),$}function kp(c){if(!Number.isSafeInteger(c)||c<Tm||c>Fm)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let $=new Uint8Array(4);return new DataView($.buffer).setUint32(0,c,!1),$}function CN(c){let $=S0.encode(c),Q=$.length;if(Q<bm||Q>Fm)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let J=Q>=Tm?Fc(new Uint8Array([0,0]),kp(Q)):up(Q),Y=new Uint8Array(nm(Q)-Q);return Fc(J,$,Y)}function PN(c){let $=new DataView(c.buffer,c.byteOffset,c.byteLength),Q=$.getUint16(0),J,Y;if(Q===0){if(J=$.getUint32(2),J<Tm)throw Error("invalid padding");Y=6}else J=Q,Y=2;let X=c.subarray(Y,Y+J);if(J<bm||J>Fm||X.length!==J||c.length!==Y+nm(J))throw Error("invalid padding");return i8.decode(X)}function EN(c,$,Q){if(Q.length!==32)throw Error("AAD associated data must be 32 bytes");let J=Fc(Q,$);return E8(Q0,c,J)}function ap(c){if(typeof c!=="string")throw Error("payload must be a valid string");let $=c.length;if($<132)throw Error("invalid payload length: "+$);if(c[0]==="#")throw Error("unknown encryption version");let Q;try{Q=L0.decode(c)}catch(X){throw Error("invalid base64: "+X.message)}let J=Q.length;if(J<99)throw Error("invalid data length: "+J);let Y=Q[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:Q.subarray(1,33),ciphertext:Q.subarray(33,-32),mac:Q.subarray(-32)}}function um(c,$,Q=o0(32)){let{chacha_key:J,chacha_nonce:Y,hmac_key:X}=AN($,Q),W=CN(c),m=XX(J,Y,W),G=EN(X,m,Q);return L0.encode(Fc(new Uint8Array([2]),Q,m,G))}function km(c,$){let{nonce:Q,ciphertext:J,mac:Y}=ap(c),{chacha_key:X,chacha_nonce:W,hmac_key:m}=AN($,Q),G=EN(m,J,Q);if(!BJ(G,Y))throw Error("invalid MAC");let z=XX(X,W,J);return PN(z)}var lp={utils:{getConversationKey:fm,calcPaddedLen:nm,pad:CN,unpad:PN},encrypt:um,decrypt:km},hp=172800,bN=()=>Math.round(Date.now()/1000),FN=()=>Math.round(bN()-Math.random()*hp),TN=(c,$)=>fm(c,$),fN=(c,$,Q)=>um(JSON.stringify(c),TN($,Q)),XN=(c,$)=>JSON.parse(km(c.content,TN($,c.pubkey)));function nN(c,$){let Q={created_at:bN(),content:"",tags:[],...c,pubkey:OJ($)};return Q.id=mX(Q),Q}function uN(c,$,Q){return A0({kind:VN,content:fN(c,$,Q),created_at:FN(),tags:[]},$)}function kN(c,$){let Q=fB();return A0({kind:DN,content:fN(c,Q,$),created_at:FN(),tags:[["p",$]]},Q)}function zX(c,$,Q){let J=nN(c,$),Y=uN(J,$,Q);return kN(Y,Q)}function yp(c,$,Q){if(!Q||Q.length===0)throw Error("At least one recipient is required.");let J=OJ($),Y=[zX(c,$,J)];return Q.forEach((X)=>{Y.push(zX(c,$,X))}),Y}function am(c,$){let Q=XN(c,$);return XN(Q,$)}function aN(c,$){let Q=[];return c.forEach((J)=>{Q.push(am(J,$))}),Q.sort((J,Y)=>J.created_at-Y.created_at),Q}function op(c,$,Q,J){let Y={created_at:Math.ceil(Date.now()/1000),kind:wN,tags:[],content:$};if((Array.isArray(c)?c:[c]).forEach(({publicKey:W,relayUrl:m})=>{Y.tags.push(m?["p",W,m]:["p",W])}),J)Y.tags.push(["e",J.eventId,J.relayUrl||"","reply"]);if(Q)Y.tags.push(["subject",Q]);return Y}function lN(c,$,Q,J,Y){let X=op($,Q,J,Y);return zX(X,c,$.publicKey)}function gp(c,$,Q,J,Y){if(!$||$.length===0)throw Error("At least one recipient is required.");return[{publicKey:OJ(c)},...$].map((W)=>lN(c,W,Q,J,Y))}var dp=am,sp=aN,rp={};Sc(rp,{finishRepostEvent:()=>tp,getRepostedEvent:()=>ep,getRepostedEventPointer:()=>hN});function tp(c,$,Q,J){let Y,X=[...c.tags??[],["e",$.id,Q],["p",$.pubkey]];if($.kind===NN)Y=Lm;else Y=Sm,X.push(["k",String($.kind)]);return A0({kind:Y,tags:X,content:c.content===""||$.tags?.find((W)=>W[0]==="-")?"":JSON.stringify($),created_at:c.created_at},J)}function hN(c){if(![Lm,Sm].includes(c.kind))return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0)return;return{id:$[1],relays:[$[2],Q?.[2]].filter((J)=>typeof J==="string"),author:Q?.[1]}}function ep(c,{skipVerification:$}={}){let Q=hN(c);if(Q===void 0||c.content==="")return;let J;try{J=JSON.parse(c.content)}catch(Y){return}if(J.id!==Q.id)return;if(!$&&!RJ(J))return;return J}var cI={};Sc(cI,{NOSTR_URI_REGEX:()=>lm,parse:()=>QI,test:()=>$I});var lm=new RegExp(`nostr:(${IN.source})`);function $I(c){return typeof c==="string"&&new RegExp(`^${lm.source}$`).test(c)}function QI(c){let $=c.match(new RegExp(`^${lm.source}$`));if(!$)throw Error(`Invalid Nostr URI: ${c}`);return{uri:$[0],value:$[1],decoded:NX($[1])}}var JI={};Sc(JI,{parse:()=>XI});function WN(c){if(!c)return;return/^\d+$/.test(c)?parseInt(c,10):c}function yN(c,$){let Q=c.indexOf(":"),J=c.indexOf(":",Q+1);if(Q===-1||J===-1)return;let Y=parseInt(c.slice(0,Q),10);if(Number.isNaN(Y))return;let X=c.slice(Q+1,J);if(!q0(X))return;return{kind:Y,pubkey:X,identifier:c.slice(J+1),relays:$?[$]:[]}}function mN(c){switch(c[0]){case"E":case"e":if(!c[1]||!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0};case"A":case"a":if(!c[1])return;return yN(c[1],c[2]);case"I":case"i":if(!c[1])return;return{value:c[1],hint:c[2]}}}function YI(c){if(!c[1])return;if(c[1].includes(":"))return yN(c[1],c[2]);if(!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0}}function GN(c){return c.findLast(($)=>$.tagName==="A"||$.tagName==="a")?.pointer||c.findLast(($)=>$.tagName==="I"||$.tagName==="i")?.pointer||c.findLast(($)=>$.tagName==="E"||$.tagName==="e")?.pointer}function Km(c,$){if(!c||!("id"in c)||!c.author)return;let Q=$.find((J)=>J.pubkey===c.author);if(!Q||!Q.relays)return;if(!c.relays)c.relays=[];Q.relays.forEach((J)=>{if(c.relays.indexOf(J)===-1)c.relays.push(J)}),Q.relays=c.relays}function XI(c){let $={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},Q=[],J=[];for(let Y of c.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let X=mN(Y);if(X)Q.push({tagName:Y[0],pointer:X});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let X=mN(Y);if(X)J.push({tagName:Y[0],pointer:X});continue}if(Y[0]==="K"){$.rootKind=WN(Y[1]);continue}if(Y[0]==="k"){$.replyKind=WN(Y[1]);continue}if(Y[0]==="q"){let X=YI(Y);if(X)$.quotes.push(X);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&q0(Y[1]))$.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return $.root=GN(Q),$.reply=GN(J),Km($.root,$.profiles),Km($.reply,$.profiles),$.quotes.forEach((Y)=>Km(Y,$.profiles)),$}var WI={};Sc(WI,{finishReactionEvent:()=>mI,getReactedEventPointer:()=>GI});function mI(c,$,Q){let J=$.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return A0({...c,kind:_m,tags:[...c.tags??[],...J,["e",$.id],["p",$.pubkey]],content:c.content??"+"},Q)}function GI(c){if(c.kind!==_m)return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0||Q===void 0)return;return{id:$[1],relays:[$[2],Q[2]].filter((J)=>J!==void 0),author:Q[1]}}var zI={};Sc(zI,{parse:()=>qI});var Dm=/\W/m,zN=/[^\w\/] |[^\w\/]$|$|,| /m,xI=42;function*qI(c){let $=[];if(typeof c!=="string"){for(let X=0;X<c.tags.length;X++){let W=c.tags[X];if(W[0]==="emoji"&&W.length>=3)$.push({type:"emoji",shortcode:W[1],url:W[2]})}c=c.content}let Q=c.length,J=0,Y=0;c:while(Y<Q){let X=c.indexOf(":",Y),W=c.indexOf("#",Y);if(X===-1&&W===-1)break c;if(X===-1||W>=0&&W<X){if(W===0||c[W-1].match(Dm)){let m=c.slice(W+1,W+xI).match(Dm),G=m?W+1+m.index:Q;yield{type:"text",text:c.slice(J,W)},yield{type:"hashtag",value:c.slice(W+1,G)},Y=G,J=Y;continue c}Y=W+1;continue c}if(c.slice(X-5,X)==="nostr"){let m=c.slice(X+60).match(Dm),G=m?X+60+m.index:Q;try{let z,{data:x,type:q}=NX(c.slice(X+1,G));switch(q){case"npub":z={pubkey:x};break;case"note":z={id:x};break;case"nsec":Y=G+1;continue;default:z=x}if(J!==X-5)yield{type:"text",text:c.slice(J,X-5)};yield{type:"reference",pointer:z},Y=G,J=Y;continue c}catch(z){Y=X+1;continue c}}else if(c.slice(X-5,X)==="https"||c.slice(X-4,X)==="http"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?5:4;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(x.pathname)){yield{type:"image",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(x.pathname)){yield{type:"video",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(x.pathname)){yield{type:"audio",url:x.toString()},Y=G,J=Y;continue c}yield{type:"url",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else if(c.slice(X-3,X)==="wss"||c.slice(X-2,X)==="ws"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?3:2;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};yield{type:"relay",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else{for(let m=0;m<$.length;m++){let G=$[m];if(c[X+G.shortcode.length+1]===":"&&c.slice(X+1,X+G.shortcode.length+1)===G.shortcode){if(J!==X)yield{type:"text",text:c.slice(J,X)};yield G,Y=X+G.shortcode.length+2,J=Y;continue c}}Y=X+1;continue c}}if(J!==Q)yield{type:"text",text:c.slice(J)}}var MI={};Sc(MI,{channelCreateEvent:()=>NI,channelHideMessageEvent:()=>iI,channelMessageEvent:()=>wI,channelMetadataEvent:()=>VI,channelMuteUserEvent:()=>vI});var NI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:iN,tags:[...c.tags??[]],content:Q,created_at:c.created_at},$)},VI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:vN,tags:[["e",c.channel_create_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},wI=(c,$)=>{let Q=[["e",c.channel_create_event_id,c.relay_url,"root"]];if(c.reply_to_channel_message_event_id)Q.push(["e",c.reply_to_channel_message_event_id,c.relay_url,"reply"]);return A0({kind:UN,tags:[...Q,...c.tags??[]],content:c.content,created_at:c.created_at},$)},iI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:jN,tags:[["e",c.channel_message_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},vI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:KN,tags:[["p",c.pubkey_to_mute],...c.tags??[]],content:Q,created_at:c.created_at},$)},UI={};Sc(UI,{EMOJI_SHORTCODE_REGEX:()=>oN,matchAll:()=>jI,regex:()=>hm,replaceAll:()=>KI});var oN=/:(\w+):/,hm=()=>new RegExp(`\\B${oN.source}\\B`,"g");function*jI(c){let $=c.matchAll(hm());for(let Q of $)try{let[J,Y]=Q;yield{shortcode:J,name:Y,start:Q.index,end:Q.index+J.length}}catch(J){}}function KI(c,$){return c.replaceAll(hm(),(Q,J)=>{return $({shortcode:Q,name:J})})}var DI={};Sc(DI,{useFetchImplementation:()=>BI,validateGithub:()=>HI});var ym;try{ym=fetch}catch{}function BI(c){ym=c}async function HI(c,$,Q){try{return await(await ym(`https://gist.github.com/${$}/${Q}/raw`)).text()===`Verifying that I control the following Nostr public key: ${c}`}catch(J){return!1}}var OI={};Sc(OI,{makeNwcRequestEvent:()=>pI,parseConnectionString:()=>RI});function RI(c){let{host:$,pathname:Q,searchParams:J}=new URL(c),Y=Q||$,X=J.getAll("relay"),W=J.get("secret");if(!Y||X.length===0||!W)throw Error("invalid connection string");return{pubkey:Y,relay:X[0],relays:X,secret:W}}async function pI(c,$,Q){let Y=ZN($,c,JSON.stringify({method:"pay_invoice",params:{invoice:Q}})),X={kind:HN,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",c]]};return A0(X,$)}var II={};Sc(II,{normalizeIdentifier:()=>ZI});function ZI(c){return c=c.trim().toLowerCase(),c=c.normalize("NFKC"),Array.from(c).map(($)=>{if(/\p{Letter}/u.test($)||/\p{Number}/u.test($))return $;return"-"}).join("")}var LI={};Sc(LI,{getSatoshisAmountFromBolt11:()=>EI,getZapEndpoint:()=>SI,makeZapReceipt:()=>PI,makeZapRequest:()=>AI,useFetchImplementation:()=>_I,validateZapRequest:()=>CI});var om;try{om=fetch}catch{}function _I(c){om=c}async function SI(c){try{let $="",{lud06:Q,lud16:J}=JSON.parse(c.content);if(J){let[W,m]=J.split("@");$=new URL(`/.well-known/lnurlp/${W}`,`https://${m}`).toString()}else if(Q){let{words:W}=T8.decode(Q,1000),m=T8.fromWords(W);$=i8.decode(m)}else return null;let X=await(await om($)).json();if(X.allowsNostr&&X.nostrPubkey)return X.callback}catch($){}return null}function AI(c){let $={kind:9734,created_at:Math.round(Date.now()/1000),content:c.comment||"",tags:[["p","pubkey"in c?c.pubkey:c.event.pubkey],["amount",c.amount.toString()],["relays",...c.relays]]};if("event"in c){if($.tags.push(["e",c.event.id]),Im(c.event.kind)){let Q=["a",`${c.event.kind}:${c.event.pubkey}:`];$.tags.push(Q)}else if(Zm(c.event.kind)){let Q=c.event.tags.find(([Y,X])=>Y==="d"&&X);if(!Q)throw Error("d tag not found or is empty");let J=["a",`${c.event.kind}:${c.event.pubkey}:${Q[1]}`];$.tags.push(J)}$.tags.push(["k",c.event.kind.toString()])}return $}function CI(c){let $;try{$=JSON.parse(c)}catch(X){return"Invalid zap request JSON."}if(!pm($))return"Zap request is not a valid Nostr event.";if(!RJ($))return"Invalid signature on zap request.";let Q=$.tags.find(([X,W])=>X==="p"&&W);if(!Q)return"Zap request doesn't have a 'p' tag.";if(!q0(Q[1]))return"Zap request 'p' tag is not valid hex.";let J=$.tags.find(([X,W])=>X==="e"&&W);if(J&&!q0(J[1]))return"Zap request 'e' tag is not valid hex.";if(!$.tags.find(([X,W])=>X==="relays"&&W))return"Zap request doesn't have a 'relays' tag.";return null}function PI({zapRequest:c,preimage:$,bolt11:Q,paidAt:J}){let Y=JSON.parse(c),X=Y.tags.filter(([m])=>m==="e"||m==="p"||m==="a"),W={kind:9735,created_at:Math.round(J.getTime()/1000),content:"",tags:[...X,["P",Y.pubkey],["bolt11",Q],["description",c]]};if($)W.tags.push(["preimage",$]);return W}function EI(c){if(c.length<50)return 0;c=c.substring(0,50);let $=c.lastIndexOf("1");if($===-1)return 0;let Q=c.substring(0,$);if(!Q.startsWith("lnbc"))return 0;let J=Q.substring(4);if(J.length<1)return 0;let Y=J[J.length-1],X=Y.charCodeAt(0)-48,W=X>=0&&X<=9,m=J.length-1;if(W)m++;if(m<1)return 0;let G=parseInt(J.substring(0,m));switch(Y){case"m":return G*1e5;case"u":return G*100;case"n":return G/10;case"p":return G/1e4;default:return G*1e8}}var bI={};Sc(bI,{Negentropy:()=>dN,NegentropyStorageVector:()=>fI,NegentropySync:()=>nI});var Bm=97,VQ=32,gN=16,i$={Skip:0,Fingerprint:1,IdList:2},w8=class{_raw;length;constructor(c){if(typeof c==="number")this._raw=new Uint8Array(c),this.length=0;else if(c instanceof Uint8Array)this._raw=new Uint8Array(c),this.length=c.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(c){if(c instanceof w8)c=c.unwrap();if(typeof c.length!=="number")throw Error("bad length");let $=c.length+this.length;if(this.capacity<$){let Q=this._raw,J=Math.max(this.capacity*2,$);this._raw=new Uint8Array(J),this._raw.set(Q)}this._raw.set(c,this.length),this.length+=c.length}shift(){let c=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,c}shiftN(c=1){let $=this._raw.subarray(0,c);return this._raw=this._raw.subarray(c),this.length-=c,$}};function WX(c){let $=0;while(!0){if(c.length===0)throw Error("parse ends prematurely");let Q=c.shift();if($=$<<7|Q&127,(Q&128)===0)break}return $}function V8(c){if(c===0)return new w8(new Uint8Array([0]));let $=[];while(c!==0)$.push(c&127),c>>>=7;$.reverse();for(let Q=0;Q<$.length-1;Q++)$[Q]|=128;return new w8(new Uint8Array($))}function FI(c){return GX(c,1)[0]}function GX(c,$){if(c.length<$)throw Error("parse ends prematurely");return c.shiftN($)}var TI=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(VQ)}add(c){let $=0,Q=0,J=new DataView(this.buf.buffer),Y=new DataView(c.buffer);for(let X=0;X<8;X++){let W=X*4,m=J.getUint32(W,!0),G=Y.getUint32(W,!0),z=m;if(z+=$,z+=G,z>4294967295)Q=1;J.setUint32(W,z&4294967295,!0),$=Q,Q=0}}negate(){let c=new DataView(this.buf.buffer);for(let Q=0;Q<8;Q++){let J=Q*4;c.setUint32(J,~c.getUint32(J,!0))}let $=new Uint8Array(VQ);$[0]=1,this.add($)}getFingerprint(c){let $=new w8;return $.extend(this.buf),$.extend(V8(c)),Q0($.unwrap()).subarray(0,gN)}},fI=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert(c,$){if(this.sealed)throw Error("already sealed");let Q=Rc($);if(Q.byteLength!==VQ)throw Error("bad id size for added item");this.items.push({timestamp:c,id:Q})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Hm);for(let c=1;c<this.items.length;c++)if(Hm(this.items[c-1],this.items[c])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(c){if(this._checkSealed(),c>=this.items.length)throw Error("out of range");return this.items[c]}iterate(c,$,Q){this._checkSealed(),this._checkBounds(c,$);for(let J=c;J<$;++J)if(!Q(this.items[J],J))break}findLowerBound(c,$,Q){return this._checkSealed(),this._checkBounds(c,$),this._binarySearch(this.items,c,$,(J)=>Hm(J,Q)<0)}fingerprint(c,$){let Q=new TI;return Q.setToZero(),this.iterate(c,$,(J)=>{return Q.add(J.id),!0}),Q.getFingerprint($-c)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(c,$){if(c>$||$>this.items.length)throw Error("bad range")}_binarySearch(c,$,Q,J){let Y=Q-$;while(Y>0){let X=$,W=Math.floor(Y/2);if(X+=W,J(c[X]))$=++X,Y-=W+1;else Y=W}return $}},dN=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor(c,$=60000){if($<4096)throw Error("frameSizeLimit too small");this.storage=c,this.frameSizeLimit=$,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(c,$){return{timestamp:c,id:$||new Uint8Array(0)}}initiate(){let c=new w8;return c.extend(new Uint8Array([Bm])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),c),Hc(c.unwrap())}reconcile(c,$,Q){let J=new w8(Rc(c));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new w8;Y.extend(new Uint8Array([Bm]));let X=FI(J);if(X<96||X>111)throw Error("invalid negentropy protocol version byte");if(X!==Bm)throw Error("unsupported negentropy protocol version requested: "+(X-96));let W=this.storage.size(),m=this._bound(0),G=0,z=!1;while(J.length!==0){let x=new w8,q=()=>{if(z)z=!1,x.extend(this.encodeBound(m)),x.extend(V8(i$.Skip))},M=this.decodeBound(J),N=WX(J),w=G,U=this.storage.findLowerBound(G,W,M);if(N===i$.Skip)z=!0;else if(N===i$.Fingerprint){let v=GX(J,gN),i=this.storage.fingerprint(w,U);if(sN(v,i)!==0)q(),this.splitRange(w,U,M,x);else z=!0}else if(N===i$.IdList){let v=WX(J),i={};for(let j=0;j<v;j++){let D=GX(J,VQ);i[Hc(D)]=D}if(z=!0,this.storage.iterate(w,U,(j)=>{let D=j.id,_=Hc(D);if(!i[_])$?.(_);else delete i[Hc(D)];return!0}),Q)for(let j of Object.values(i))Q(Hc(j))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+x.length)){let v=this.storage.fingerprint(U,W);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(V8(i$.Fingerprint)),Y.extend(v);break}else Y.extend(x);G=U,m=M}return Y.length===1?null:Hc(Y.unwrap())}splitRange(c,$,Q,J){let Y=$-c,X=16;if(Y<X*2)J.extend(this.encodeBound(Q)),J.extend(V8(i$.IdList)),J.extend(V8(Y)),this.storage.iterate(c,$,(W)=>{return J.extend(W.id),!0});else{let W=Math.floor(Y/X),m=Y%X,G=c;for(let z=0;z<X;z++){let x=W+(z<m?1:0),q=this.storage.fingerprint(G,G+x);G+=x;let M;if(G===$)M=Q;else{let N,w;this.storage.iterate(G-1,G+1,(U,v)=>{if(v===G-1)N=U;else w=U;return!0}),M=this.getMinimalBound(N,w)}J.extend(this.encodeBound(M)),J.extend(V8(i$.Fingerprint)),J.extend(q)}}}exceededFrameSizeLimit(c){return c>this.frameSizeLimit-200}decodeTimestampIn(c){let $=WX(c);if($=$===0?Number.MAX_VALUE:$-1,this.lastTimestampIn===Number.MAX_VALUE||$===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return $+=this.lastTimestampIn,this.lastTimestampIn=$,$}decodeBound(c){let $=this.decodeTimestampIn(c),Q=WX(c);if(Q>VQ)throw Error("bound key too long");let J=GX(c,Q);return{timestamp:$,id:J}}encodeTimestampOut(c){if(c===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,V8(0);let $=c;return c-=this.lastTimestampOut,this.lastTimestampOut=$,V8(c+1)}encodeBound(c){let $=new w8;return $.extend(this.encodeTimestampOut(c.timestamp)),$.extend(V8(c.id.length)),$.extend(c.id),$}getMinimalBound(c,$){if($.timestamp!==c.timestamp)return this._bound($.timestamp);else{let Q=0,J=$.id,Y=c.id;for(let X=0;X<VQ;X++){if(J[X]!==Y[X])break;Q++}return this._bound($.timestamp,$.id.subarray(0,Q+1))}}};function sN(c,$){for(let Q=0;Q<c.byteLength;Q++){if(c[Q]<$[Q])return-1;if(c[Q]>$[Q])return 1}if(c.byteLength>$.byteLength)return 1;if(c.byteLength<$.byteLength)return-1;return 0}function Hm(c,$){if(c.timestamp===$.timestamp)return sN(c.id,$.id);return c.timestamp-$.timestamp}var nI=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor(c,$,Q,J={}){this.relay=c,this.storage=$,this.neg=new dN($),this.onhave=J.onhave,this.onneed=J.onneed,this.filter=Q,this.subscription=this.relay.prepareSubscription([{}],{label:J.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let X=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(X)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${X}"]`);else this.close(),J.onclose?.()}catch(X){console.error("negentropy reconcile error:",X),J?.onclose?.(`reconcile error: ${X}`)}break}case"NEG-CLOSE":{let X=Y[2];console.warn("negentropy error:",X),J.onclose?.(X);break}case"NEG-ERR":J.onclose?.()}}}async start(){let c=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${c}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},uI={};Sc(uI,{getToken:()=>kI,hashPayload:()=>gm,unpackEventFromToken:()=>tN,validateEvent:()=>YV,validateEventKind:()=>cV,validateEventMethodTag:()=>QV,validateEventPayloadTag:()=>JV,validateEventTimestamp:()=>eN,validateEventUrlTag:()=>$V,validateToken:()=>aI});var rN="Nostr ";async function kI(c,$,Q,J=!1,Y){let X={kind:Am,tags:[["u",c],["method",$]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)X.tags.push(["payload",gm(Y)]);let W=await Q(X);return(J?rN:"")+L0.encode(S0.encode(JSON.stringify(W)))}async function aI(c,$,Q){let J=await tN(c).catch((X)=>{throw X});return await YV(J,$,Q).catch((X)=>{throw X})}async function tN(c){if(!c)throw Error("Missing token");c=c.replace(rN,"");let $=i8.decode(L0.decode(c));if(!$||$.length===0||!$.startsWith("{"))throw Error("Invalid token");return JSON.parse($)}function eN(c){if(!c.created_at)return!1;return Math.round(new Date().getTime()/1000)-c.created_at<60}function cV(c){return c.kind===Am}function $V(c,$){let Q=c.tags.find((J)=>J[0]==="u");if(!Q)return!1;return Q.length>0&&Q[1]===$}function QV(c,$){let Q=c.tags.find((J)=>J[0]==="method");if(!Q)return!1;return Q.length>0&&Q[1].toLowerCase()===$.toLowerCase()}function gm(c){let $=Q0(S0.encode(JSON.stringify(c)));return Hc($)}function JV(c,$){let Q=c.tags.find((Y)=>Y[0]==="payload");if(!Q)return!1;let J=gm($);return Q.length>0&&Q[1]===J}async function YV(c,$,Q,J){if(!RJ(c))throw Error("Invalid nostr event, signature invalid");if(!cV(c))throw Error("Invalid nostr event, kind invalid");if(!eN(c))throw Error("Invalid nostr event, created_at timestamp invalid");if(!$V(c,$))throw Error("Invalid nostr event, url tag invalid");if(!QV(c,Q))throw Error("Invalid nostr event, method tag invalid");if(Boolean(J)&&typeof J==="object"&&Object.keys(J).length>0){if(!JV(c,J))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function yI(c){let $=c.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test($))throw Error("expected 64-char hex private key");let Q=new Uint8Array(32);for(let J=0;J<32;J++)Q[J]=parseInt($.slice(J*2,J*2+2),16);return Q}function pJ(c){let $=(c??"").trim();if(!$)throw Error("BUZZ_PRIVATE_KEY is empty");let Q;if($.startsWith("nsec")){let Y=MX.decode($);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");Q=Y.data}else Q=yI($);let J=OJ(Q);return{secretKey:Q,pubkeyHex:J,npub:MX.npubEncode(J)}}function v8(c,$){return A0(c,$.secretKey)}function XV(c){return lI("sha256").update(c).digest("hex")}function WV(){return hI()}var oI=["/fig","@figura"];function mV(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GV(c){return c.replace(/^[\s:,\-—]+/,"").trim()}function zV(c,$={}){let Q=(c??"").trim();if(!Q)return null;let J=$.triggers??oI,Y=null;for(let X of J){let m=new RegExp(`(?:^|\\s)${mV(X)}\\b`,"i").exec(Q);if(m){let G=m.index+m[0].length-X.length;if(!Y||G<Y.index)Y={index:G,end:m.index+m[0].length,via:"trigger"}}}if($.agentNpub){let W=new RegExp(`(?:nostr:)?${mV($.agentNpub)}`,"i").exec(Q);if(W&&(!Y||W.index<Y.index))Y={index:W.index,end:W.index+W[0].length,via:"npub"}}if(Y){let X=GV(Q.slice(Y.end));if(X)return{brief:X,via:Y.via};return null}if($.mentioned){let X=GV(Q);if(X)return{brief:X,via:"mention"}}return null}function gI(c){return c.replace(/^fig\s+/i,"").trim()}function xV(c){let $=(c??"").trim();if(!$)return null;let Q=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec($);if(Q){let X=Q[1].trim();if(X)return{kind:"fig-and-file",description:X}}let J=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec($);if(J){let X=J[1].trim();if(X)return{kind:"file-issue",title:X}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec($);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:gI($)||$}}var qV=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function MV(c,$=qV){return`${($||qV).replace(/\/+$/,"")}/f/${c}`}function vX(c){let Q=[c.title?`Here's your fig: **${c.title}**`:"Here's your fig"];if(c.note)Q.push(c.note);return Q.push(""),Q.push(c.link),Q.join(`
|
|
530
|
-
`)}function
|
|
586
|
+
`)}async function hj($){let{flags:Q}=Q0($);if(i(Q,"help")||i(Q,"h")){process.stdout.write(vm+`
|
|
587
|
+
`);return}if(i(Q,"session-start")){await Im().catch(()=>{});return}await Pm(Q)}import{readFile as En}from"node:fs/promises";var b={};VJ(b,{void:()=>My,util:()=>w0,unknown:()=>Uy,union:()=>wy,undefined:()=>zy,tuple:()=>Ry,transformer:()=>Ty,symbol:()=>Wy,string:()=>oj,strictObject:()=>Zy,setErrorMap:()=>Em,set:()=>Ny,record:()=>Dy,quotelessJson:()=>Tm,promise:()=>Py,preprocess:()=>ky,pipeline:()=>cy,ostring:()=>Sy,optional:()=>Ay,onumber:()=>by,oboolean:()=>fy,objectUtil:()=>Cz,object:()=>By,number:()=>sj,nullable:()=>Ey,null:()=>Vy,never:()=>xy,nativeEnum:()=>Iy,nan:()=>Yy,map:()=>_y,makeIssue:()=>kY,literal:()=>Fy,lazy:()=>Oy,late:()=>Jy,isValid:()=>WQ,isDirty:()=>u6,isAsync:()=>GX,isAborted:()=>p6,intersection:()=>Ly,instanceof:()=>Xy,getParsedType:()=>H$,getErrorMap:()=>YX,function:()=>vy,enum:()=>Cy,effect:()=>Ty,discriminatedUnion:()=>jy,defaultErrorMap:()=>k$,datetimeRegex:()=>nj,date:()=>qy,custom:()=>aj,coerce:()=>my,boolean:()=>rj,bigint:()=>Gy,array:()=>Hy,any:()=>Ky,addIssueToContext:()=>l,ZodVoid:()=>SY,ZodUnknown:()=>zQ,ZodUnion:()=>UX,ZodUndefined:()=>VX,ZodType:()=>H0,ZodTuple:()=>Z$,ZodTransformer:()=>X$,ZodSymbol:()=>cY,ZodString:()=>e8,ZodSet:()=>rQ,ZodSchema:()=>H0,ZodRecord:()=>bY,ZodReadonly:()=>jX,ZodPromise:()=>tQ,ZodPipeline:()=>yY,ZodParsedType:()=>m,ZodOptional:()=>Q$,ZodObject:()=>S0,ZodNumber:()=>VQ,ZodNullable:()=>S$,ZodNull:()=>KX,ZodNever:()=>B$,ZodNativeEnum:()=>BX,ZodNaN:()=>mY,ZodMap:()=>fY,ZodLiteral:()=>HX,ZodLazy:()=>MX,ZodIssueCode:()=>A,ZodIntersection:()=>xX,ZodFunction:()=>WX,ZodFirstPartyTypeKind:()=>G0,ZodError:()=>Z8,ZodEnum:()=>UQ,ZodEffects:()=>X$,ZodDiscriminatedUnion:()=>g6,ZodDefault:()=>ZX,ZodDate:()=>oQ,ZodCatch:()=>wX,ZodBranded:()=>l6,ZodBoolean:()=>zX,ZodBigInt:()=>KQ,ZodArray:()=>$$,ZodAny:()=>sQ,Schema:()=>H0,ParseStatus:()=>t0,OK:()=>Y8,NEVER:()=>yy,INVALID:()=>Y0,EMPTY_PATH:()=>km,DIRTY:()=>aQ,BRAND:()=>Qy});var w0;(function($){$.assertEqual=(Y)=>{};function Q(Y){}$.assertIs=Q;function J(Y){throw Error()}$.assertNever=J,$.arrayToEnum=(Y)=>{let G={};for(let q of Y)G[q]=q;return G},$.getValidEnumValues=(Y)=>{let G=$.objectKeys(Y).filter((W)=>typeof Y[Y[W]]!=="number"),q={};for(let W of G)q[W]=Y[W];return $.objectValues(q)},$.objectValues=(Y)=>{return $.objectKeys(Y).map(function(G){return Y[G]})},$.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let G=[];for(let q in Y)if(Object.prototype.hasOwnProperty.call(Y,q))G.push(q);return G},$.find=(Y,G)=>{for(let q of Y)if(G(q))return q;return},$.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function X(Y,G=" | "){return Y.map((q)=>typeof q==="string"?`'${q}'`:q).join(G)}$.joinValues=X,$.jsonStringifyReplacer=(Y,G)=>{if(typeof G==="bigint")return G.toString();return G}})(w0||(w0={}));var Cz;(function($){$.mergeShapes=(Q,J)=>{return{...Q,...J}}})(Cz||(Cz={}));var m=w0.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),H$=($)=>{switch(typeof $){case"undefined":return m.undefined;case"string":return m.string;case"number":return Number.isNaN($)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":if(Array.isArray($))return m.array;if($===null)return m.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return m.promise;if(typeof Map<"u"&&$ instanceof Map)return m.map;if(typeof Set<"u"&&$ instanceof Set)return m.set;if(typeof Date<"u"&&$ instanceof Date)return m.date;return m.object;default:return m.unknown}};var A=w0.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Tm=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class Z8 extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(J)=>{this.issues=[...this.issues,J]},this.addIssues=(J=[])=>{this.issues=[...this.issues,...J]};let Q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,Q);else this.__proto__=Q;this.name="ZodError",this.issues=$}format($){let Q=$||function(Y){return Y.message},J={_errors:[]},X=(Y)=>{for(let G of Y.issues)if(G.code==="invalid_union")G.unionErrors.map(X);else if(G.code==="invalid_return_type")X(G.returnTypeError);else if(G.code==="invalid_arguments")X(G.argumentsError);else if(G.path.length===0)J._errors.push(Q(G));else{let q=J,W=0;while(W<G.path.length){let z=G.path[W];if(W!==G.path.length-1)q[z]=q[z]||{_errors:[]};else q[z]=q[z]||{_errors:[]},q[z]._errors.push(Q(G));q=q[z],W++}}};return X(this),J}static assert($){if(!($ instanceof Z8))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w0.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(Q)=>Q.message){let Q={},J=[];for(let X of this.issues)if(X.path.length>0){let Y=X.path[0];Q[Y]=Q[Y]||[],Q[Y].push($(X))}else J.push($(X));return{formErrors:J,fieldErrors:Q}}get formErrors(){return this.flatten()}}Z8.create=($)=>{return new Z8($)};var Am=($,Q)=>{let J;switch($.code){case A.invalid_type:if($.received===m.undefined)J="Required";else J=`Expected ${$.expected}, received ${$.received}`;break;case A.invalid_literal:J=`Invalid literal value, expected ${JSON.stringify($.expected,w0.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:J=`Unrecognized key(s) in object: ${w0.joinValues($.keys,", ")}`;break;case A.invalid_union:J="Invalid input";break;case A.invalid_union_discriminator:J=`Invalid discriminator value. Expected ${w0.joinValues($.options)}`;break;case A.invalid_enum_value:J=`Invalid enum value. Expected ${w0.joinValues($.options)}, received '${$.received}'`;break;case A.invalid_arguments:J="Invalid function arguments";break;case A.invalid_return_type:J="Invalid function return type";break;case A.invalid_date:J="Invalid date";break;case A.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(J=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")J=`${J} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)J=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)J=`Invalid input: must end with "${$.validation.endsWith}"`;else w0.assertNever($.validation);else if($.validation!=="regex")J=`Invalid ${$.validation}`;else J="Invalid";break;case A.too_small:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")J=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else J="Invalid input";break;case A.too_big:if($.type==="array")J=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")J=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")J=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")J=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")J=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else J="Invalid input";break;case A.custom:J="Invalid input";break;case A.invalid_intersection_types:J="Intersection results could not be merged";break;case A.not_multiple_of:J=`Number must be a multiple of ${$.multipleOf}`;break;case A.not_finite:J="Number must be finite";break;default:J=Q.defaultError,w0.assertNever($)}return{message:J}},k$=Am;var pj=k$;function Em($){pj=$}function YX(){return pj}var kY=($)=>{let{data:Q,path:J,errorMaps:X,issueData:Y}=$,G=[...J,...Y.path||[]],q={...Y,path:G};if(Y.message!==void 0)return{...Y,path:G,message:Y.message};let W="",z=X.filter((V)=>!!V).slice().reverse();for(let V of z)W=V(q,{data:Q,defaultError:W}).message;return{...Y,path:G,message:W}},km=[];function l($,Q){let J=YX(),X=kY({issueData:Q,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,J,J===k$?void 0:k$].filter((Y)=>!!Y)});$.common.issues.push(X)}class t0{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,Q){let J=[];for(let X of Q){if(X.status==="aborted")return Y0;if(X.status==="dirty")$.dirty();J.push(X.value)}return{status:$.value,value:J}}static async mergeObjectAsync($,Q){let J=[];for(let X of Q){let Y=await X.key,G=await X.value;J.push({key:Y,value:G})}return t0.mergeObjectSync($,J)}static mergeObjectSync($,Q){let J={};for(let X of Q){let{key:Y,value:G}=X;if(Y.status==="aborted")return Y0;if(G.status==="aborted")return Y0;if(Y.status==="dirty")$.dirty();if(G.status==="dirty")$.dirty();if(Y.value!=="__proto__"&&(typeof G.value<"u"||X.alwaysSet))J[Y.value]=G.value}return{status:$.value,value:J}}}var Y0=Object.freeze({status:"aborted"}),aQ=($)=>({status:"dirty",value:$}),Y8=($)=>({status:"valid",value:$}),p6=($)=>$.status==="aborted",u6=($)=>$.status==="dirty",WQ=($)=>$.status==="valid",GX=($)=>typeof Promise<"u"&&$ instanceof Promise;var r;(function($){$.errToObj=(Q)=>typeof Q==="string"?{message:Q}:Q||{},$.toString=(Q)=>typeof Q==="string"?Q:Q?.message})(r||(r={}));class J${constructor($,Q,J,X){this._cachedPath=[],this.parent=$,this.data=Q,this._path=J,this._key=X}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var uj=($,Q)=>{if(WQ(Q))return{success:!0,data:Q.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let J=new Z8($.common.issues);return this._error=J,this._error}}}};function K0($){if(!$)return{};let{errorMap:Q,invalid_type_error:J,required_error:X,description:Y}=$;if(Q&&(J||X))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(Q)return{errorMap:Q,description:Y};return{errorMap:(q,W)=>{let{message:z}=$;if(q.code==="invalid_enum_value")return{message:z??W.defaultError};if(typeof W.data>"u")return{message:z??X??W.defaultError};if(q.code!=="invalid_type")return{message:W.defaultError};return{message:z??J??W.defaultError}},description:Y}}class H0{get description(){return this._def.description}_getType($){return H$($.data)}_getOrReturnCtx($,Q){return Q||{common:$.parent.common,data:$.data,parsedType:H$($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new t0,ctx:{common:$.parent.common,data:$.data,parsedType:H$($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let Q=this._parse($);if(GX(Q))throw Error("Synchronous parse encountered promise.");return Q}_parseAsync($){let Q=this._parse($);return Promise.resolve(Q)}parse($,Q){let J=this.safeParse($,Q);if(J.success)return J.data;throw J.error}safeParse($,Q){let J={common:{issues:[],async:Q?.async??!1,contextualErrorMap:Q?.errorMap},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H$($)},X=this._parseSync({data:$,path:J.path,parent:J});return uj(J,X)}"~validate"($){let Q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H$($)};if(!this["~standard"].async)try{let J=this._parseSync({data:$,path:[],parent:Q});return WQ(J)?{value:J.value}:{issues:Q.common.issues}}catch(J){if(J?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;Q.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:Q}).then((J)=>WQ(J)?{value:J.value}:{issues:Q.common.issues})}async parseAsync($,Q){let J=await this.safeParseAsync($,Q);if(J.success)return J.data;throw J.error}async safeParseAsync($,Q){let J={common:{issues:[],contextualErrorMap:Q?.errorMap,async:!0},path:Q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:H$($)},X=this._parse({data:$,path:J.path,parent:J}),Y=await(GX(X)?X:Promise.resolve(X));return uj(J,Y)}refine($,Q){let J=(X)=>{if(typeof Q==="string"||typeof Q>"u")return{message:Q};else if(typeof Q==="function")return Q(X);else return Q};return this._refinement((X,Y)=>{let G=$(X),q=()=>Y.addIssue({code:A.custom,...J(X)});if(typeof Promise<"u"&&G instanceof Promise)return G.then((W)=>{if(!W)return q(),!1;else return!0});if(!G)return q(),!1;else return!0})}refinement($,Q){return this._refinement((J,X)=>{if(!$(J))return X.addIssue(typeof Q==="function"?Q(J,X):Q),!1;else return!0})}_refinement($){return new X$({schema:this,typeName:G0.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(Q)=>this["~validate"](Q)}}optional(){return Q$.create(this,this._def)}nullable(){return S$.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $$.create(this)}promise(){return tQ.create(this,this._def)}or($){return UX.create([this,$],this._def)}and($){return xX.create(this,$,this._def)}transform($){return new X$({...K0(this._def),schema:this,typeName:G0.ZodEffects,effect:{type:"transform",transform:$}})}default($){let Q=typeof $==="function"?$:()=>$;return new ZX({...K0(this._def),innerType:this,defaultValue:Q,typeName:G0.ZodDefault})}brand(){return new l6({typeName:G0.ZodBranded,type:this,...K0(this._def)})}catch($){let Q=typeof $==="function"?$:()=>$;return new wX({...K0(this._def),innerType:this,catchValue:Q,typeName:G0.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return yY.create(this,$)}readonly(){return jX.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var cm=/^c[^\s-]{8,}$/i,Sm=/^[0-9a-z]+$/,bm=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fm=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mm=/^[a-z0-9_-]{21}$/i,ym=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hm=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,um="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Iz,gm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,im=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,nm=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,am=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",om=new RegExp(`^${lj}$`);function ij($){let Q="[0-5]\\d";if($.precision)Q=`${Q}\\.\\d{${$.precision}}`;else if($.precision==null)Q=`${Q}(\\.\\d+)?`;let J=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${Q})${J}`}function sm($){return new RegExp(`^${ij($)}$`)}function nj($){let Q=`${lj}T${ij($)}`,J=[];if(J.push($.local?"Z?":"Z"),$.offset)J.push("([+-]\\d{2}:?\\d{2})");return Q=`${Q}(${J.join("|")})`,new RegExp(`^${Q}$`)}function rm($,Q){if((Q==="v4"||!Q)&&gm.test($))return!0;if((Q==="v6"||!Q)&&im.test($))return!0;return!1}function tm($,Q){if(!ym.test($))return!1;try{let[J]=$.split(".");if(!J)return!1;let X=J.replace(/-/g,"+").replace(/_/g,"/").padEnd(J.length+(4-J.length%4)%4,"="),Y=JSON.parse(atob(X));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if(Q&&Y.alg!==Q)return!1;return!0}catch{return!1}}function em($,Q){if((Q==="v4"||!Q)&&lm.test($))return!0;if((Q==="v6"||!Q)&&nm.test($))return!0;return!1}class e8 extends H0{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==m.string){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.string,received:Y.parsedType}),Y0}let J=new t0,X=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if($.data.length<Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if($.data.length>Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="length"){let G=$.data.length>Y.value,q=$.data.length<Y.value;if(G||q){if(X=this._getOrReturnCtx($,X),G)l(X,{code:A.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(q)l(X,{code:A.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});J.dirty()}}else if(Y.kind==="email"){if(!pm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"email",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="emoji"){if(!Iz)Iz=new RegExp(um,"u");if(!Iz.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"emoji",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="uuid"){if(!fm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"uuid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="nanoid"){if(!mm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"nanoid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cuid"){if(!cm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"cuid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cuid2"){if(!Sm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"cuid2",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="ulid"){if(!bm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"ulid",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="url")try{new URL($.data)}catch{X=this._getOrReturnCtx($,X),l(X,{validation:"url",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"regex",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="trim")$.data=$.data.trim();else if(Y.kind==="includes"){if(!$.data.includes(Y.value,Y.position))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),J.dirty()}else if(Y.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(Y.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(Y.kind==="startsWith"){if(!$.data.startsWith(Y.value))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{startsWith:Y.value},message:Y.message}),J.dirty()}else if(Y.kind==="endsWith"){if(!$.data.endsWith(Y.value))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:{endsWith:Y.value},message:Y.message}),J.dirty()}else if(Y.kind==="datetime"){if(!nj(Y).test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"datetime",message:Y.message}),J.dirty()}else if(Y.kind==="date"){if(!om.test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"date",message:Y.message}),J.dirty()}else if(Y.kind==="time"){if(!sm(Y).test($.data))X=this._getOrReturnCtx($,X),l(X,{code:A.invalid_string,validation:"time",message:Y.message}),J.dirty()}else if(Y.kind==="duration"){if(!hm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"duration",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="ip"){if(!rm($.data,Y.version))X=this._getOrReturnCtx($,X),l(X,{validation:"ip",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="jwt"){if(!tm($.data,Y.alg))X=this._getOrReturnCtx($,X),l(X,{validation:"jwt",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="cidr"){if(!em($.data,Y.version))X=this._getOrReturnCtx($,X),l(X,{validation:"cidr",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="base64"){if(!dm.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"base64",code:A.invalid_string,message:Y.message}),J.dirty()}else if(Y.kind==="base64url"){if(!am.test($.data))X=this._getOrReturnCtx($,X),l(X,{validation:"base64url",code:A.invalid_string,message:Y.message}),J.dirty()}else w0.assertNever(Y);return{status:J.value,value:$.data}}_regex($,Q,J){return this.refinement((X)=>$.test(X),{validation:Q,code:A.invalid_string,...r.errToObj(J)})}_addCheck($){return new e8({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...r.errToObj($)})}url($){return this._addCheck({kind:"url",...r.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...r.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...r.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...r.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...r.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...r.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...r.errToObj($)})}base64($){return this._addCheck({kind:"base64",...r.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...r.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...r.errToObj($)})}ip($){return this._addCheck({kind:"ip",...r.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...r.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...r.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...r.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...r.errToObj($)})}regex($,Q){return this._addCheck({kind:"regex",regex:$,...r.errToObj(Q)})}includes($,Q){return this._addCheck({kind:"includes",value:$,position:Q?.position,...r.errToObj(Q?.message)})}startsWith($,Q){return this._addCheck({kind:"startsWith",value:$,...r.errToObj(Q)})}endsWith($,Q){return this._addCheck({kind:"endsWith",value:$,...r.errToObj(Q)})}min($,Q){return this._addCheck({kind:"min",value:$,...r.errToObj(Q)})}max($,Q){return this._addCheck({kind:"max",value:$,...r.errToObj(Q)})}length($,Q){return this._addCheck({kind:"length",value:$,...r.errToObj(Q)})}nonempty($){return this.min(1,r.errToObj($))}trim(){return new e8({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e8({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e8({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxLength(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}e8.create=($)=>{return new e8({checks:[],typeName:G0.ZodString,coerce:$?.coerce??!1,...K0($)})};function $y($,Q){let J=($.toString().split(".")[1]||"").length,X=(Q.toString().split(".")[1]||"").length,Y=J>X?J:X,G=Number.parseInt($.toFixed(Y).replace(".","")),q=Number.parseInt(Q.toFixed(Y).replace(".",""));return G%q/10**Y}class VQ extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==m.number){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.number,received:Y.parsedType}),Y0}let J=void 0,X=new t0;for(let Y of this._def.checks)if(Y.kind==="int"){if(!w0.isInteger($.data))J=this._getOrReturnCtx($,J),l(J,{code:A.invalid_type,expected:"integer",received:"float",message:Y.message}),X.dirty()}else if(Y.kind==="min"){if(Y.inclusive?$.data<Y.value:$.data<=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),X.dirty()}else if(Y.kind==="max"){if(Y.inclusive?$.data>Y.value:$.data>=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),X.dirty()}else if(Y.kind==="multipleOf"){if($y($.data,Y.value)!==0)J=this._getOrReturnCtx($,J),l(J,{code:A.not_multiple_of,multipleOf:Y.value,message:Y.message}),X.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite($.data))J=this._getOrReturnCtx($,J),l(J,{code:A.not_finite,message:Y.message}),X.dirty()}else w0.assertNever(Y);return{status:X.value,value:$.data}}gte($,Q){return this.setLimit("min",$,!0,r.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,r.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,r.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,r.toString(Q))}setLimit($,Q,J,X){return new VQ({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:r.toString(X)}]})}_addCheck($){return new VQ({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:r.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:r.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:r.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:r.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:r.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:r.toString(Q)})}finite($){return this._addCheck({kind:"finite",message:r.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:r.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:r.toString($)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&w0.isInteger($.value))}get isFinite(){let $=null,Q=null;for(let J of this._def.checks)if(J.kind==="finite"||J.kind==="int"||J.kind==="multipleOf")return!0;else if(J.kind==="min"){if(Q===null||J.value>Q)Q=J.value}else if(J.kind==="max"){if($===null||J.value<$)$=J.value}return Number.isFinite(Q)&&Number.isFinite($)}}VQ.create=($)=>{return new VQ({checks:[],typeName:G0.ZodNumber,coerce:$?.coerce||!1,...K0($)})};class KQ extends H0{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==m.bigint)return this._getInvalidInput($);let J=void 0,X=new t0;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?$.data<Y.value:$.data<=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),X.dirty()}else if(Y.kind==="max"){if(Y.inclusive?$.data>Y.value:$.data>=Y.value)J=this._getOrReturnCtx($,J),l(J,{code:A.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),X.dirty()}else if(Y.kind==="multipleOf"){if($.data%Y.value!==BigInt(0))J=this._getOrReturnCtx($,J),l(J,{code:A.not_multiple_of,multipleOf:Y.value,message:Y.message}),X.dirty()}else w0.assertNever(Y);return{status:X.value,value:$.data}}_getInvalidInput($){let Q=this._getOrReturnCtx($);return l(Q,{code:A.invalid_type,expected:m.bigint,received:Q.parsedType}),Y0}gte($,Q){return this.setLimit("min",$,!0,r.toString(Q))}gt($,Q){return this.setLimit("min",$,!1,r.toString(Q))}lte($,Q){return this.setLimit("max",$,!0,r.toString(Q))}lt($,Q){return this.setLimit("max",$,!1,r.toString(Q))}setLimit($,Q,J,X){return new KQ({...this._def,checks:[...this._def.checks,{kind:$,value:Q,inclusive:J,message:r.toString(X)}]})}_addCheck($){return new KQ({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:r.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:r.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:r.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:r.toString($)})}multipleOf($,Q){return this._addCheck({kind:"multipleOf",value:$,message:r.toString(Q)})}get minValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $}get maxValue(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $}}KQ.create=($)=>{return new KQ({checks:[],typeName:G0.ZodBigInt,coerce:$?.coerce??!1,...K0($)})};class zX extends H0{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==m.boolean){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.boolean,received:J.parsedType}),Y0}return Y8($.data)}}zX.create=($)=>{return new zX({typeName:G0.ZodBoolean,coerce:$?.coerce||!1,...K0($)})};class oQ extends H0{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==m.date){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_type,expected:m.date,received:Y.parsedType}),Y0}if(Number.isNaN($.data.getTime())){let Y=this._getOrReturnCtx($);return l(Y,{code:A.invalid_date}),Y0}let J=new t0,X=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if($.data.getTime()<Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),J.dirty()}else if(Y.kind==="max"){if($.data.getTime()>Y.value)X=this._getOrReturnCtx($,X),l(X,{code:A.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),J.dirty()}else w0.assertNever(Y);return{status:J.value,value:new Date($.data.getTime())}}_addCheck($){return new oQ({...this._def,checks:[...this._def.checks,$]})}min($,Q){return this._addCheck({kind:"min",value:$.getTime(),message:r.toString(Q)})}max($,Q){return this._addCheck({kind:"max",value:$.getTime(),message:r.toString(Q)})}get minDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let Q of this._def.checks)if(Q.kind==="max"){if($===null||Q.value<$)$=Q.value}return $!=null?new Date($):null}}oQ.create=($)=>{return new oQ({checks:[],coerce:$?.coerce||!1,typeName:G0.ZodDate,...K0($)})};class cY extends H0{_parse($){if(this._getType($)!==m.symbol){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.symbol,received:J.parsedType}),Y0}return Y8($.data)}}cY.create=($)=>{return new cY({typeName:G0.ZodSymbol,...K0($)})};class VX extends H0{_parse($){if(this._getType($)!==m.undefined){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.undefined,received:J.parsedType}),Y0}return Y8($.data)}}VX.create=($)=>{return new VX({typeName:G0.ZodUndefined,...K0($)})};class KX extends H0{_parse($){if(this._getType($)!==m.null){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.null,received:J.parsedType}),Y0}return Y8($.data)}}KX.create=($)=>{return new KX({typeName:G0.ZodNull,...K0($)})};class sQ extends H0{constructor(){super(...arguments);this._any=!0}_parse($){return Y8($.data)}}sQ.create=($)=>{return new sQ({typeName:G0.ZodAny,...K0($)})};class zQ extends H0{constructor(){super(...arguments);this._unknown=!0}_parse($){return Y8($.data)}}zQ.create=($)=>{return new zQ({typeName:G0.ZodUnknown,...K0($)})};class B$ extends H0{_parse($){let Q=this._getOrReturnCtx($);return l(Q,{code:A.invalid_type,expected:m.never,received:Q.parsedType}),Y0}}B$.create=($)=>{return new B$({typeName:G0.ZodNever,...K0($)})};class SY extends H0{_parse($){if(this._getType($)!==m.undefined){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.void,received:J.parsedType}),Y0}return Y8($.data)}}SY.create=($)=>{return new SY({typeName:G0.ZodVoid,...K0($)})};class $$ extends H0{_parse($){let{ctx:Q,status:J}=this._processInputParams($),X=this._def;if(Q.parsedType!==m.array)return l(Q,{code:A.invalid_type,expected:m.array,received:Q.parsedType}),Y0;if(X.exactLength!==null){let G=Q.data.length>X.exactLength.value,q=Q.data.length<X.exactLength.value;if(G||q)l(Q,{code:G?A.too_big:A.too_small,minimum:q?X.exactLength.value:void 0,maximum:G?X.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:X.exactLength.message}),J.dirty()}if(X.minLength!==null){if(Q.data.length<X.minLength.value)l(Q,{code:A.too_small,minimum:X.minLength.value,type:"array",inclusive:!0,exact:!1,message:X.minLength.message}),J.dirty()}if(X.maxLength!==null){if(Q.data.length>X.maxLength.value)l(Q,{code:A.too_big,maximum:X.maxLength.value,type:"array",inclusive:!0,exact:!1,message:X.maxLength.message}),J.dirty()}if(Q.common.async)return Promise.all([...Q.data].map((G,q)=>{return X.type._parseAsync(new J$(Q,G,Q.path,q))})).then((G)=>{return t0.mergeArray(J,G)});let Y=[...Q.data].map((G,q)=>{return X.type._parseSync(new J$(Q,G,Q.path,q))});return t0.mergeArray(J,Y)}get element(){return this._def.type}min($,Q){return new $$({...this._def,minLength:{value:$,message:r.toString(Q)}})}max($,Q){return new $$({...this._def,maxLength:{value:$,message:r.toString(Q)}})}length($,Q){return new $$({...this._def,exactLength:{value:$,message:r.toString(Q)}})}nonempty($){return this.min(1,$)}}$$.create=($,Q)=>{return new $$({type:$,minLength:null,maxLength:null,exactLength:null,typeName:G0.ZodArray,...K0(Q)})};function qX($){if($ instanceof S0){let Q={};for(let J in $.shape){let X=$.shape[J];Q[J]=Q$.create(qX(X))}return new S0({...$._def,shape:()=>Q})}else if($ instanceof $$)return new $$({...$._def,type:qX($.element)});else if($ instanceof Q$)return Q$.create(qX($.unwrap()));else if($ instanceof S$)return S$.create(qX($.unwrap()));else if($ instanceof Z$)return Z$.create($.items.map((Q)=>qX(Q)));else return $}class S0 extends H0{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),Q=w0.objectKeys($);return this._cached={shape:$,keys:Q},this._cached}_parse($){if(this._getType($)!==m.object){let z=this._getOrReturnCtx($);return l(z,{code:A.invalid_type,expected:m.object,received:z.parsedType}),Y0}let{status:J,ctx:X}=this._processInputParams($),{shape:Y,keys:G}=this._getCached(),q=[];if(!(this._def.catchall instanceof B$&&this._def.unknownKeys==="strip")){for(let z in X.data)if(!G.includes(z))q.push(z)}let W=[];for(let z of G){let V=Y[z],K=X.data[z];W.push({key:{status:"valid",value:z},value:V._parse(new J$(X,K,X.path,z)),alwaysSet:z in X.data})}if(this._def.catchall instanceof B$){let z=this._def.unknownKeys;if(z==="passthrough")for(let V of q)W.push({key:{status:"valid",value:V},value:{status:"valid",value:X.data[V]}});else if(z==="strict"){if(q.length>0)l(X,{code:A.unrecognized_keys,keys:q}),J.dirty()}else if(z==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let z=this._def.catchall;for(let V of q){let K=X.data[V];W.push({key:{status:"valid",value:V},value:z._parse(new J$(X,K,X.path,V)),alwaysSet:V in X.data})}}if(X.common.async)return Promise.resolve().then(async()=>{let z=[];for(let V of W){let K=await V.key,U=await V.value;z.push({key:K,value:U,alwaysSet:V.alwaysSet})}return z}).then((z)=>{return t0.mergeObjectSync(J,z)});else return t0.mergeObjectSync(J,W)}get shape(){return this._def.shape()}strict($){return r.errToObj,new S0({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(Q,J)=>{let X=this._def.errorMap?.(Q,J).message??J.defaultError;if(Q.code==="unrecognized_keys")return{message:r.errToObj($).message??X};return{message:X}}}:{}})}strip(){return new S0({...this._def,unknownKeys:"strip"})}passthrough(){return new S0({...this._def,unknownKeys:"passthrough"})}extend($){return new S0({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new S0({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:G0.ZodObject})}setKey($,Q){return this.augment({[$]:Q})}catchall($){return new S0({...this._def,catchall:$})}pick($){let Q={};for(let J of w0.objectKeys($))if($[J]&&this.shape[J])Q[J]=this.shape[J];return new S0({...this._def,shape:()=>Q})}omit($){let Q={};for(let J of w0.objectKeys(this.shape))if(!$[J])Q[J]=this.shape[J];return new S0({...this._def,shape:()=>Q})}deepPartial(){return qX(this)}partial($){let Q={};for(let J of w0.objectKeys(this.shape)){let X=this.shape[J];if($&&!$[J])Q[J]=X;else Q[J]=X.optional()}return new S0({...this._def,shape:()=>Q})}required($){let Q={};for(let J of w0.objectKeys(this.shape))if($&&!$[J])Q[J]=this.shape[J];else{let Y=this.shape[J];while(Y instanceof Q$)Y=Y._def.innerType;Q[J]=Y}return new S0({...this._def,shape:()=>Q})}keyof(){return dj(w0.objectKeys(this.shape))}}S0.create=($,Q)=>{return new S0({shape:()=>$,unknownKeys:"strip",catchall:B$.create(),typeName:G0.ZodObject,...K0(Q)})};S0.strictCreate=($,Q)=>{return new S0({shape:()=>$,unknownKeys:"strict",catchall:B$.create(),typeName:G0.ZodObject,...K0(Q)})};S0.lazycreate=($,Q)=>{return new S0({shape:$,unknownKeys:"strip",catchall:B$.create(),typeName:G0.ZodObject,...K0(Q)})};class UX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=this._def.options;function X(Y){for(let q of Y)if(q.result.status==="valid")return q.result;for(let q of Y)if(q.result.status==="dirty")return Q.common.issues.push(...q.ctx.common.issues),q.result;let G=Y.map((q)=>new Z8(q.ctx.common.issues));return l(Q,{code:A.invalid_union,unionErrors:G}),Y0}if(Q.common.async)return Promise.all(J.map(async(Y)=>{let G={...Q,common:{...Q.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:Q.data,path:Q.path,parent:G}),ctx:G}})).then(X);else{let Y=void 0,G=[];for(let W of J){let z={...Q,common:{...Q.common,issues:[]},parent:null},V=W._parseSync({data:Q.data,path:Q.path,parent:z});if(V.status==="valid")return V;else if(V.status==="dirty"&&!Y)Y={result:V,ctx:z};if(z.common.issues.length)G.push(z.common.issues)}if(Y)return Q.common.issues.push(...Y.ctx.common.issues),Y.result;let q=G.map((W)=>new Z8(W));return l(Q,{code:A.invalid_union,unionErrors:q}),Y0}}get options(){return this._def.options}}UX.create=($,Q)=>{return new UX({options:$,typeName:G0.ZodUnion,...K0(Q)})};var c$=($)=>{if($ instanceof MX)return c$($.schema);else if($ instanceof X$)return c$($.innerType());else if($ instanceof HX)return[$.value];else if($ instanceof UQ)return $.options;else if($ instanceof BX)return w0.objectValues($.enum);else if($ instanceof ZX)return c$($._def.innerType);else if($ instanceof VX)return[void 0];else if($ instanceof KX)return[null];else if($ instanceof Q$)return[void 0,...c$($.unwrap())];else if($ instanceof S$)return[null,...c$($.unwrap())];else if($ instanceof l6)return c$($.unwrap());else if($ instanceof jX)return c$($.unwrap());else if($ instanceof wX)return c$($._def.innerType);else return[]};class g6 extends H0{_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.object)return l(Q,{code:A.invalid_type,expected:m.object,received:Q.parsedType}),Y0;let J=this.discriminator,X=Q.data[J],Y=this.optionsMap.get(X);if(!Y)return l(Q,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[J]}),Y0;if(Q.common.async)return Y._parseAsync({data:Q.data,path:Q.path,parent:Q});else return Y._parseSync({data:Q.data,path:Q.path,parent:Q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,Q,J){let X=new Map;for(let Y of Q){let G=c$(Y.shape[$]);if(!G.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let q of G){if(X.has(q))throw Error(`Discriminator property ${String($)} has duplicate value ${String(q)}`);X.set(q,Y)}}return new g6({typeName:G0.ZodDiscriminatedUnion,discriminator:$,options:Q,optionsMap:X,...K0(J)})}}function Pz($,Q){let J=H$($),X=H$(Q);if($===Q)return{valid:!0,data:$};else if(J===m.object&&X===m.object){let Y=w0.objectKeys(Q),G=w0.objectKeys($).filter((W)=>Y.indexOf(W)!==-1),q={...$,...Q};for(let W of G){let z=Pz($[W],Q[W]);if(!z.valid)return{valid:!1};q[W]=z.data}return{valid:!0,data:q}}else if(J===m.array&&X===m.array){if($.length!==Q.length)return{valid:!1};let Y=[];for(let G=0;G<$.length;G++){let q=$[G],W=Q[G],z=Pz(q,W);if(!z.valid)return{valid:!1};Y.push(z.data)}return{valid:!0,data:Y}}else if(J===m.date&&X===m.date&&+$===+Q)return{valid:!0,data:$};else return{valid:!1}}class xX extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($),X=(Y,G)=>{if(p6(Y)||p6(G))return Y0;let q=Pz(Y.value,G.value);if(!q.valid)return l(J,{code:A.invalid_intersection_types}),Y0;if(u6(Y)||u6(G))Q.dirty();return{status:Q.value,value:q.data}};if(J.common.async)return Promise.all([this._def.left._parseAsync({data:J.data,path:J.path,parent:J}),this._def.right._parseAsync({data:J.data,path:J.path,parent:J})]).then(([Y,G])=>X(Y,G));else return X(this._def.left._parseSync({data:J.data,path:J.path,parent:J}),this._def.right._parseSync({data:J.data,path:J.path,parent:J}))}}xX.create=($,Q,J)=>{return new xX({left:$,right:Q,typeName:G0.ZodIntersection,...K0(J)})};class Z$ extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.array)return l(J,{code:A.invalid_type,expected:m.array,received:J.parsedType}),Y0;if(J.data.length<this._def.items.length)return l(J,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Y0;if(!this._def.rest&&J.data.length>this._def.items.length)l(J,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q.dirty();let Y=[...J.data].map((G,q)=>{let W=this._def.items[q]||this._def.rest;if(!W)return null;return W._parse(new J$(J,G,J.path,q))}).filter((G)=>!!G);if(J.common.async)return Promise.all(Y).then((G)=>{return t0.mergeArray(Q,G)});else return t0.mergeArray(Q,Y)}get items(){return this._def.items}rest($){return new Z$({...this._def,rest:$})}}Z$.create=($,Q)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z$({items:$,typeName:G0.ZodTuple,rest:null,...K0(Q)})};class bY extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.object)return l(J,{code:A.invalid_type,expected:m.object,received:J.parsedType}),Y0;let X=[],Y=this._def.keyType,G=this._def.valueType;for(let q in J.data)X.push({key:Y._parse(new J$(J,q,J.path,q)),value:G._parse(new J$(J,J.data[q],J.path,q)),alwaysSet:q in J.data});if(J.common.async)return t0.mergeObjectAsync(Q,X);else return t0.mergeObjectSync(Q,X)}get element(){return this._def.valueType}static create($,Q,J){if(Q instanceof H0)return new bY({keyType:$,valueType:Q,typeName:G0.ZodRecord,...K0(J)});return new bY({keyType:e8.create(),valueType:$,typeName:G0.ZodRecord,...K0(Q)})}}class fY extends H0{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.map)return l(J,{code:A.invalid_type,expected:m.map,received:J.parsedType}),Y0;let X=this._def.keyType,Y=this._def.valueType,G=[...J.data.entries()].map(([q,W],z)=>{return{key:X._parse(new J$(J,q,J.path,[z,"key"])),value:Y._parse(new J$(J,W,J.path,[z,"value"]))}});if(J.common.async){let q=new Map;return Promise.resolve().then(async()=>{for(let W of G){let z=await W.key,V=await W.value;if(z.status==="aborted"||V.status==="aborted")return Y0;if(z.status==="dirty"||V.status==="dirty")Q.dirty();q.set(z.value,V.value)}return{status:Q.value,value:q}})}else{let q=new Map;for(let W of G){let{key:z,value:V}=W;if(z.status==="aborted"||V.status==="aborted")return Y0;if(z.status==="dirty"||V.status==="dirty")Q.dirty();q.set(z.value,V.value)}return{status:Q.value,value:q}}}}fY.create=($,Q,J)=>{return new fY({valueType:Q,keyType:$,typeName:G0.ZodMap,...K0(J)})};class rQ extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.parsedType!==m.set)return l(J,{code:A.invalid_type,expected:m.set,received:J.parsedType}),Y0;let X=this._def;if(X.minSize!==null){if(J.data.size<X.minSize.value)l(J,{code:A.too_small,minimum:X.minSize.value,type:"set",inclusive:!0,exact:!1,message:X.minSize.message}),Q.dirty()}if(X.maxSize!==null){if(J.data.size>X.maxSize.value)l(J,{code:A.too_big,maximum:X.maxSize.value,type:"set",inclusive:!0,exact:!1,message:X.maxSize.message}),Q.dirty()}let Y=this._def.valueType;function G(W){let z=new Set;for(let V of W){if(V.status==="aborted")return Y0;if(V.status==="dirty")Q.dirty();z.add(V.value)}return{status:Q.value,value:z}}let q=[...J.data.values()].map((W,z)=>Y._parse(new J$(J,W,J.path,z)));if(J.common.async)return Promise.all(q).then((W)=>G(W));else return G(q)}min($,Q){return new rQ({...this._def,minSize:{value:$,message:r.toString(Q)}})}max($,Q){return new rQ({...this._def,maxSize:{value:$,message:r.toString(Q)}})}size($,Q){return this.min($,Q).max($,Q)}nonempty($){return this.min(1,$)}}rQ.create=($,Q)=>{return new rQ({valueType:$,minSize:null,maxSize:null,typeName:G0.ZodSet,...K0(Q)})};class WX extends H0{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.function)return l(Q,{code:A.invalid_type,expected:m.function,received:Q.parsedType}),Y0;function J(q,W){return kY({data:q,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,YX(),k$].filter((z)=>!!z),issueData:{code:A.invalid_arguments,argumentsError:W}})}function X(q,W){return kY({data:q,path:Q.path,errorMaps:[Q.common.contextualErrorMap,Q.schemaErrorMap,YX(),k$].filter((z)=>!!z),issueData:{code:A.invalid_return_type,returnTypeError:W}})}let Y={errorMap:Q.common.contextualErrorMap},G=Q.data;if(this._def.returns instanceof tQ){let q=this;return Y8(async function(...W){let z=new Z8([]),V=await q._def.args.parseAsync(W,Y).catch((x)=>{throw z.addIssue(J(W,x)),z}),K=await Reflect.apply(G,this,V);return await q._def.returns._def.type.parseAsync(K,Y).catch((x)=>{throw z.addIssue(X(K,x)),z})})}else{let q=this;return Y8(function(...W){let z=q._def.args.safeParse(W,Y);if(!z.success)throw new Z8([J(W,z.error)]);let V=Reflect.apply(G,this,z.data),K=q._def.returns.safeParse(V,Y);if(!K.success)throw new Z8([X(V,K.error)]);return K.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new WX({...this._def,args:Z$.create($).rest(zQ.create())})}returns($){return new WX({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,Q,J){return new WX({args:$?$:Z$.create([]).rest(zQ.create()),returns:Q||zQ.create(),typeName:G0.ZodFunction,...K0(J)})}}class MX extends H0{get schema(){return this._def.getter()}_parse($){let{ctx:Q}=this._processInputParams($);return this._def.getter()._parse({data:Q.data,path:Q.path,parent:Q})}}MX.create=($,Q)=>{return new MX({getter:$,typeName:G0.ZodLazy,...K0(Q)})};class HX extends H0{_parse($){if($.data!==this._def.value){let Q=this._getOrReturnCtx($);return l(Q,{received:Q.data,code:A.invalid_literal,expected:this._def.value}),Y0}return{status:"valid",value:$.data}}get value(){return this._def.value}}HX.create=($,Q)=>{return new HX({value:$,typeName:G0.ZodLiteral,...K0(Q)})};function dj($,Q){return new UQ({values:$,typeName:G0.ZodEnum,...K0(Q)})}class UQ extends H0{_parse($){if(typeof $.data!=="string"){let Q=this._getOrReturnCtx($),J=this._def.values;return l(Q,{expected:w0.joinValues(J),received:Q.parsedType,code:A.invalid_type}),Y0}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let Q=this._getOrReturnCtx($),J=this._def.values;return l(Q,{received:Q.data,code:A.invalid_enum_value,options:J}),Y0}return Y8($.data)}get options(){return this._def.values}get enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Values(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}get Enum(){let $={};for(let Q of this._def.values)$[Q]=Q;return $}extract($,Q=this._def){return UQ.create($,{...this._def,...Q})}exclude($,Q=this._def){return UQ.create(this.options.filter((J)=>!$.includes(J)),{...this._def,...Q})}}UQ.create=dj;class BX extends H0{_parse($){let Q=w0.getValidEnumValues(this._def.values),J=this._getOrReturnCtx($);if(J.parsedType!==m.string&&J.parsedType!==m.number){let X=w0.objectValues(Q);return l(J,{expected:w0.joinValues(X),received:J.parsedType,code:A.invalid_type}),Y0}if(!this._cache)this._cache=new Set(w0.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let X=w0.objectValues(Q);return l(J,{received:J.data,code:A.invalid_enum_value,options:X}),Y0}return Y8($.data)}get enum(){return this._def.values}}BX.create=($,Q)=>{return new BX({values:$,typeName:G0.ZodNativeEnum,...K0(Q)})};class tQ extends H0{unwrap(){return this._def.type}_parse($){let{ctx:Q}=this._processInputParams($);if(Q.parsedType!==m.promise&&Q.common.async===!1)return l(Q,{code:A.invalid_type,expected:m.promise,received:Q.parsedType}),Y0;let J=Q.parsedType===m.promise?Q.data:Promise.resolve(Q.data);return Y8(J.then((X)=>{return this._def.type.parseAsync(X,{path:Q.path,errorMap:Q.common.contextualErrorMap})}))}}tQ.create=($,Q)=>{return new tQ({type:$,typeName:G0.ZodPromise,...K0(Q)})};class X$ extends H0{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===G0.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:Q,ctx:J}=this._processInputParams($),X=this._def.effect||null,Y={addIssue:(G)=>{if(l(J,G),G.fatal)Q.abort();else Q.dirty()},get path(){return J.path}};if(Y.addIssue=Y.addIssue.bind(Y),X.type==="preprocess"){let G=X.transform(J.data,Y);if(J.common.async)return Promise.resolve(G).then(async(q)=>{if(Q.value==="aborted")return Y0;let W=await this._def.schema._parseAsync({data:q,path:J.path,parent:J});if(W.status==="aborted")return Y0;if(W.status==="dirty")return aQ(W.value);if(Q.value==="dirty")return aQ(W.value);return W});else{if(Q.value==="aborted")return Y0;let q=this._def.schema._parseSync({data:G,path:J.path,parent:J});if(q.status==="aborted")return Y0;if(q.status==="dirty")return aQ(q.value);if(Q.value==="dirty")return aQ(q.value);return q}}if(X.type==="refinement"){let G=(q)=>{let W=X.refinement(q,Y);if(J.common.async)return Promise.resolve(W);if(W instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return q};if(J.common.async===!1){let q=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(q.status==="aborted")return Y0;if(q.status==="dirty")Q.dirty();return G(q.value),{status:Q.value,value:q.value}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((q)=>{if(q.status==="aborted")return Y0;if(q.status==="dirty")Q.dirty();return G(q.value).then(()=>{return{status:Q.value,value:q.value}})})}if(X.type==="transform")if(J.common.async===!1){let G=this._def.schema._parseSync({data:J.data,path:J.path,parent:J});if(!WQ(G))return Y0;let q=X.transform(G.value,Y);if(q instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:Q.value,value:q}}else return this._def.schema._parseAsync({data:J.data,path:J.path,parent:J}).then((G)=>{if(!WQ(G))return Y0;return Promise.resolve(X.transform(G.value,Y)).then((q)=>({status:Q.value,value:q}))});w0.assertNever(X)}}X$.create=($,Q,J)=>{return new X$({schema:$,typeName:G0.ZodEffects,effect:Q,...K0(J)})};X$.createWithPreprocess=($,Q,J)=>{return new X$({schema:Q,effect:{type:"preprocess",transform:$},typeName:G0.ZodEffects,...K0(J)})};class Q$ extends H0{_parse($){if(this._getType($)===m.undefined)return Y8(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}Q$.create=($,Q)=>{return new Q$({innerType:$,typeName:G0.ZodOptional,...K0(Q)})};class S$ extends H0{_parse($){if(this._getType($)===m.null)return Y8(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}S$.create=($,Q)=>{return new S$({innerType:$,typeName:G0.ZodNullable,...K0(Q)})};class ZX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;if(Q.parsedType===m.undefined)J=this._def.defaultValue();return this._def.innerType._parse({data:J,path:Q.path,parent:Q})}removeDefault(){return this._def.innerType}}ZX.create=($,Q)=>{return new ZX({innerType:$,typeName:G0.ZodDefault,defaultValue:typeof Q.default==="function"?Q.default:()=>Q.default,...K0(Q)})};class wX extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J={...Q,common:{...Q.common,issues:[]}},X=this._def.innerType._parse({data:J.data,path:J.path,parent:{...J}});if(GX(X))return X.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new Z8(J.common.issues)},input:J.data})}});else return{status:"valid",value:X.status==="valid"?X.value:this._def.catchValue({get error(){return new Z8(J.common.issues)},input:J.data})}}removeCatch(){return this._def.innerType}}wX.create=($,Q)=>{return new wX({innerType:$,typeName:G0.ZodCatch,catchValue:typeof Q.catch==="function"?Q.catch:()=>Q.catch,...K0(Q)})};class mY extends H0{_parse($){if(this._getType($)!==m.nan){let J=this._getOrReturnCtx($);return l(J,{code:A.invalid_type,expected:m.nan,received:J.parsedType}),Y0}return{status:"valid",value:$.data}}}mY.create=($)=>{return new mY({typeName:G0.ZodNaN,...K0($)})};var Qy=Symbol("zod_brand");class l6 extends H0{_parse($){let{ctx:Q}=this._processInputParams($),J=Q.data;return this._def.type._parse({data:J,path:Q.path,parent:Q})}unwrap(){return this._def.type}}class yY extends H0{_parse($){let{status:Q,ctx:J}=this._processInputParams($);if(J.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:J.data,path:J.path,parent:J});if(Y.status==="aborted")return Y0;if(Y.status==="dirty")return Q.dirty(),aQ(Y.value);else return this._def.out._parseAsync({data:Y.value,path:J.path,parent:J})})();else{let X=this._def.in._parseSync({data:J.data,path:J.path,parent:J});if(X.status==="aborted")return Y0;if(X.status==="dirty")return Q.dirty(),{status:"dirty",value:X.value};else return this._def.out._parseSync({data:X.value,path:J.path,parent:J})}}static create($,Q){return new yY({in:$,out:Q,typeName:G0.ZodPipeline})}}class jX extends H0{_parse($){let Q=this._def.innerType._parse($),J=(X)=>{if(WQ(X))X.value=Object.freeze(X.value);return X};return GX(Q)?Q.then((X)=>J(X)):J(Q)}unwrap(){return this._def.innerType}}jX.create=($,Q)=>{return new jX({innerType:$,typeName:G0.ZodReadonly,...K0(Q)})};function gj($,Q){let J=typeof $==="function"?$(Q):typeof $==="string"?{message:$}:$;return typeof J==="string"?{message:J}:J}function aj($,Q={},J){if($)return sQ.create().superRefine((X,Y)=>{let G=$(X);if(G instanceof Promise)return G.then((q)=>{if(!q){let W=gj(Q,X),z=W.fatal??J??!0;Y.addIssue({code:"custom",...W,fatal:z})}});if(!G){let q=gj(Q,X),W=q.fatal??J??!0;Y.addIssue({code:"custom",...q,fatal:W})}return});return sQ.create()}var Jy={object:S0.lazycreate},G0;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(G0||(G0={}));var Xy=($,Q={message:`Input not instance of ${$.name}`})=>aj((J)=>J instanceof $,Q),oj=e8.create,sj=VQ.create,Yy=mY.create,Gy=KQ.create,rj=zX.create,qy=oQ.create,Wy=cY.create,zy=VX.create,Vy=KX.create,Ky=sQ.create,Uy=zQ.create,xy=B$.create,My=SY.create,Hy=$$.create,By=S0.create,Zy=S0.strictCreate,wy=UX.create,jy=g6.create,Ly=xX.create,Ry=Z$.create,Dy=bY.create,_y=fY.create,Ny=rQ.create,vy=WX.create,Oy=MX.create,Fy=HX.create,Cy=UQ.create,Iy=BX.create,Py=tQ.create,Ty=X$.create,Ay=Q$.create,Ey=S$.create,ky=X$.createWithPreprocess,cy=yY.create,Sy=()=>oj().optional(),by=()=>sj().optional(),fy=()=>rj().optional(),my={string:($)=>e8.create({...$,coerce:!0}),number:($)=>VQ.create({...$,coerce:!0}),boolean:($)=>zX.create({...$,coerce:!0}),bigint:($)=>KQ.create({...$,coerce:!0}),date:($)=>oQ.create({...$,coerce:!0})};var yy=Y0;var hy=/^(wss?|https?):\/\//i,py=/^nsec1[0-9a-z]+$/i,QL=/^[0-9a-f]{64}$/i,uy=/^[^/\s]+\/[^/\s]+$/,gy=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function tj($){try{let Q=new URL($);return Q.protocol==="http:"||Q.protocol==="https:"}catch{return!1}}function ly($){if(!hy.test($))return!1;try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function ej($){if(!Array.isArray($))return $;return $.map((Q)=>typeof Q==="string"?Q.trim():Q).filter((Q)=>Q!=="")}var iy=b.object({kind:b.literal("github"),token:b.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:b.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine(($)=>uy.test($),{message:"tracker.repo must be owner/repo"})}).strict(),ny=b.object({kind:b.literal("buzz"),ownerHex:b.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(QL,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:b.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),dy=b.discriminatedUnion("kind",[iy,ny]),JL=b.object({label:b.string().trim().optional(),relayUrl:b.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(ly,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:b.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine(($)=>py.test($)||QL.test($),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:b.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:b.preprocess(ej,b.array(b.string()).default([]).superRefine(($,Q)=>{for(let J of $)if(!gy.test(J))Q.addIssue({code:b.ZodIssueCode.custom,message:`channel "${J}" is not a UUID`})})),triggers:b.preprocess(($)=>$===void 0?void 0:ej($),b.array(b.string()).optional().superRefine(($,Q)=>{if($!==void 0&&$.length===0)Q.addIssue({code:b.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:b.string().trim().refine(tj,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:b.string().trim().refine(tj,{message:"apiUrl must be an http(s) URL"}).optional(),device:b.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:b.string().trim().optional().superRefine(($,Q)=>{if($!==void 0&&$!=="mobile"&&$!=="web")Q.addIssue({code:b.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:dy.optional()}).strict();function eQ($){if($.label)return $.label;let Q=$.relayUrl??"";try{return new URL(Q.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return Q||"binding"}}function XL($){if($.code===b.ZodIssueCode.unrecognized_keys){let Q=$.keys.join(", ");return $.path.includes("tracker")?`tracker unknown key(s): ${Q}`:`unknown key(s): ${Q} (check spelling of the known fields)`}if($.code===b.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return $.message}function YL($){let Q=JL.safeParse($);return Q.success?[]:Q.error.issues.map(XL)}function $L($){let Q=$??{},J=typeof Q.label==="string"&&Q.label.trim()?Q.label.trim():void 0,X=typeof Q.relayUrl==="string"?Q.relayUrl:"";return eQ({label:J,relayUrl:X})}function Tz($,Q="bindings config"){let J=typeof Q==="string"?{source:Q}:Q,X=J.source??"bindings config",Y;try{Y=JSON.parse($)}catch(V){throw Error(`${X} is not valid JSON: ${V instanceof Error?V.message:String(V)}`)}let G=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!G)throw Error(`${X} must be a JSON array of bindings (or { "bindings": [...] })`);if(G.length===0)throw Error(`${X} has no bindings`);let q=[],W=[];G.forEach((V,K)=>{let U=JL.safeParse(V);if(U.success)W.push(U.data);else q.push(`binding[${K}] (${$L(V)}): ${U.error.issues.map(XL).join("; ")}`)});let z=new Map;for(let V of G){let K=$L(V);z.set(K,(z.get(K)??0)+1)}for(let[V,K]of z)if(K>1)q.push(`duplicate label "${V}" across ${K} bindings — give each a distinct label`);if(q.length)throw Error(`invalid ${X}:
|
|
588
|
+
${q.join(`
|
|
589
|
+
`)}`);if(J.onWarn){let V=new Set;for(let K of W){let U=`${K.relayUrl} ${K.privateKey}`;if(V.has(U))J.onWarn(`two bindings share the same relayUrl + privateKey (${eQ(K)}) — is that intentional?`);V.add(U)}}return W}B8();r0();import{createHash as Kn,randomUUID as Un}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hY($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function f8($,Q=""){if(!Number.isSafeInteger($)||$<0){let J=Q&&`"${Q}" `;throw Error(`${J}expected integer >= 0, got ${$}`)}}function R0($,Q,J=""){let X=hY($),Y=$?.length,G=Q!==void 0;if(!X||G&&Y!==Q){let q=J&&`"${J}" `,W=G?` of length ${Q}`:"",z=X?`length=${Y}`:`type=${typeof $}`;throw Error(q+"expected Uint8Array"+W+", got "+z)}return $}function $J($){if(typeof $!=="function"||typeof $.create!=="function")throw Error("Hash must wrapped by utils.createHasher");f8($.outputLen),f8($.blockLen)}function LX($,Q=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Q&&$.finished)throw Error("Hash#digest() has already been called")}function qL($,Q){R0($,void 0,"digestInto() output");let J=Q.outputLen;if($.length<J)throw Error('"digestInto() output" expected to be of length >='+J)}function Y$(...$){for(let Q=0;Q<$.length;Q++)$[Q].fill(0)}function i6($){return new DataView($.buffer,$.byteOffset,$.byteLength)}function G$($,Q){return $<<32-Q|$>>>Q}var WL=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),ay=Array.from({length:256},($,Q)=>Q.toString(16).padStart(2,"0"));function F0($){if(R0($),WL)return $.toHex();let Q="";for(let J=0;J<$.length;J++)Q+=ay[$[J]];return Q}var b$={_0:48,_9:57,A:65,F:70,a:97,f:102};function GL($){if($>=b$._0&&$<=b$._9)return $-b$._0;if($>=b$.A&&$<=b$.F)return $-(b$.A-10);if($>=b$.a&&$<=b$.f)return $-(b$.a-10);return}function P0($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);if(WL)return Uint8Array.fromHex($);let Q=$.length,J=Q/2;if(Q%2)throw Error("hex string expected, got unpadded hex of length "+Q);let X=new Uint8Array(J);for(let Y=0,G=0;Y<J;Y++,G+=2){let q=GL($.charCodeAt(G)),W=GL($.charCodeAt(G+1));if(q===void 0||W===void 0){let z=$[G]+$[G+1];throw Error('hex string expected, got non-hex character "'+z+'" at index '+G)}X[Y]=q*16+W}return X}function h0(...$){let Q=0;for(let X=0;X<$.length;X++){let Y=$[X];R0(Y),Q+=Y.length}let J=new Uint8Array(Q);for(let X=0,Y=0;X<$.length;X++){let G=$[X];J.set(G,Y),Y+=G.length}return J}function zL($,Q={}){let J=(Y,G)=>$(G).update(Y).digest(),X=$(void 0);return J.outputLen=X.outputLen,J.blockLen=X.blockLen,J.create=(Y)=>$(Y),Object.assign(J,Q),Object.freeze(J)}function q$($=32){let Q=typeof globalThis==="object"?globalThis.crypto:null;if(typeof Q?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return Q.getRandomValues(new Uint8Array($))}var VL=($)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,$])});function KL($,Q,J){return $&Q^~$&J}function UL($,Q,J){return $&Q^$&J^Q&J}class n6{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor($,Q,J,X){this.blockLen=$,this.outputLen=Q,this.padOffset=J,this.isLE=X,this.buffer=new Uint8Array($),this.view=i6(this.buffer)}update($){LX(this),R0($);let{view:Q,buffer:J,blockLen:X}=this,Y=$.length;for(let G=0;G<Y;){let q=Math.min(X-this.pos,Y-G);if(q===X){let W=i6($);for(;X<=Y-G;G+=X)this.process(W,G);continue}if(J.set($.subarray(G,G+q),this.pos),this.pos+=q,G+=q,this.pos===X)this.process(Q,0),this.pos=0}return this.length+=$.length,this.roundClean(),this}digestInto($){LX(this),qL($,this),this.finished=!0;let{buffer:Q,view:J,blockLen:X,isLE:Y}=this,{pos:G}=this;if(Q[G++]=128,Y$(this.buffer.subarray(G)),this.padOffset>X-G)this.process(J,0),G=0;for(let K=G;K<X;K++)Q[K]=0;J.setBigUint64(X-8,BigInt(this.length*8),Y),this.process(J,0);let q=i6($),W=this.outputLen;if(W%4)throw Error("_sha2: outputLen must be aligned to 32bit");let z=W/4,V=this.get();if(z>V.length)throw Error("_sha2: outputLen bigger than state");for(let K=0;K<z;K++)q.setUint32(4*K,V[K],Y)}digest(){let{buffer:$,outputLen:Q}=this;this.digestInto($);let J=$.slice(0,Q);return this.destroy(),J}_cloneInto($){$||=new this.constructor,$.set(...this.get());let{blockLen:Q,buffer:J,length:X,finished:Y,destroyed:G,pos:q}=this;if($.destroyed=G,$.finished=Y,$.length=X,$.pos=q,X%Q)$.buffer.set(J);return $}clone(){return this._cloneInto()}}var f$=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),m$=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),e0=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),$8=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var d6=BigInt(4294967295),xL=BigInt(32);function oy($,Q=!1){if(Q)return{h:Number($&d6),l:Number($>>xL&d6)};return{h:Number($>>xL&d6)|0,l:Number($&d6)|0}}function ML($,Q=!1){let J=$.length,X=new Uint32Array(J),Y=new Uint32Array(J);for(let G=0;G<J;G++){let{h:q,l:W}=oy($[G],Q);[X[G],Y[G]]=[q,W]}return[X,Y]}var Az=($,Q,J)=>$>>>J,Ez=($,Q,J)=>$<<32-J|Q>>>J,QJ=($,Q,J)=>$>>>J|Q<<32-J,JJ=($,Q,J)=>$<<32-J|Q>>>J,pY=($,Q,J)=>$<<64-J|Q>>>J-32,uY=($,Q,J)=>$>>>J-32|Q<<64-J;function w$($,Q,J,X){let Y=(Q>>>0)+(X>>>0);return{h:$+J+(Y/4294967296|0)|0,l:Y|0}}var HL=($,Q,J)=>($>>>0)+(Q>>>0)+(J>>>0),BL=($,Q,J,X)=>Q+J+X+($/4294967296|0)|0,ZL=($,Q,J,X)=>($>>>0)+(Q>>>0)+(J>>>0)+(X>>>0),wL=($,Q,J,X,Y)=>Q+J+X+Y+($/4294967296|0)|0,jL=($,Q,J,X,Y)=>($>>>0)+(Q>>>0)+(J>>>0)+(X>>>0)+(Y>>>0),LL=($,Q,J,X,Y,G)=>Q+J+X+Y+G+($/4294967296|0)|0;var ry=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),xQ=new Uint32Array(64);class kz extends n6{constructor($){super(64,$,8,!1)}get(){let{A:$,B:Q,C:J,D:X,E:Y,F:G,G:q,H:W}=this;return[$,Q,J,X,Y,G,q,W]}set($,Q,J,X,Y,G,q,W){this.A=$|0,this.B=Q|0,this.C=J|0,this.D=X|0,this.E=Y|0,this.F=G|0,this.G=q|0,this.H=W|0}process($,Q){for(let K=0;K<16;K++,Q+=4)xQ[K]=$.getUint32(Q,!1);for(let K=16;K<64;K++){let U=xQ[K-15],x=xQ[K-2],M=G$(U,7)^G$(U,18)^U>>>3,H=G$(x,17)^G$(x,19)^x>>>10;xQ[K]=H+xQ[K-7]+M+xQ[K-16]|0}let{A:J,B:X,C:Y,D:G,E:q,F:W,G:z,H:V}=this;for(let K=0;K<64;K++){let U=G$(q,6)^G$(q,11)^G$(q,25),x=V+U+KL(q,W,z)+ry[K]+xQ[K]|0,H=(G$(J,2)^G$(J,13)^G$(J,22))+UL(J,X,Y)|0;V=z,z=W,W=q,q=G+x|0,G=Y,Y=X,X=J,J=x+H|0}J=J+this.A|0,X=X+this.B|0,Y=Y+this.C|0,G=G+this.D|0,q=q+this.E|0,W=W+this.F|0,z=z+this.G|0,V=V+this.H|0,this.set(J,X,Y,G,q,W,z,V)}roundClean(){Y$(xQ)}destroy(){this.set(0,0,0,0,0,0,0,0),Y$(this.buffer)}}class RL extends kz{A=f$[0]|0;B=f$[1]|0;C=f$[2]|0;D=f$[3]|0;E=f$[4]|0;F=f$[5]|0;G=f$[6]|0;H=f$[7]|0;constructor(){super(32)}}class ty extends kz{A=m$[0]|0;B=m$[1]|0;C=m$[2]|0;D=m$[3]|0;E=m$[4]|0;F=m$[5]|0;G=m$[6]|0;H=m$[7]|0;constructor(){super(28)}}var DL=(()=>ML(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(($)=>BigInt($))))(),ey=(()=>DL[0])(),$h=(()=>DL[1])(),MQ=new Uint32Array(80),HQ=new Uint32Array(80);class gY extends n6{constructor($){super(128,$,16,!1)}get(){let{Ah:$,Al:Q,Bh:J,Bl:X,Ch:Y,Cl:G,Dh:q,Dl:W,Eh:z,El:V,Fh:K,Fl:U,Gh:x,Gl:M,Hh:H,Hl:w}=this;return[$,Q,J,X,Y,G,q,W,z,V,K,U,x,M,H,w]}set($,Q,J,X,Y,G,q,W,z,V,K,U,x,M,H,w){this.Ah=$|0,this.Al=Q|0,this.Bh=J|0,this.Bl=X|0,this.Ch=Y|0,this.Cl=G|0,this.Dh=q|0,this.Dl=W|0,this.Eh=z|0,this.El=V|0,this.Fh=K|0,this.Fl=U|0,this.Gh=x|0,this.Gl=M|0,this.Hh=H|0,this.Hl=w|0}process($,Q){for(let L=0;L<16;L++,Q+=4)MQ[L]=$.getUint32(Q),HQ[L]=$.getUint32(Q+=4);for(let L=16;L<80;L++){let D=MQ[L-15]|0,F=HQ[L-15]|0,J0=QJ(D,F,1)^QJ(D,F,8)^Az(D,F,7),n=JJ(D,F,1)^JJ(D,F,8)^Ez(D,F,7),e=MQ[L-2]|0,y=HQ[L-2]|0,p=QJ(e,y,19)^pY(e,y,61)^Az(e,y,6),q0=JJ(e,y,19)^uY(e,y,61)^Ez(e,y,6),t=ZL(n,q0,HQ[L-7],HQ[L-16]),N=wL(t,J0,p,MQ[L-7],MQ[L-16]);MQ[L]=N|0,HQ[L]=t|0}let{Ah:J,Al:X,Bh:Y,Bl:G,Ch:q,Cl:W,Dh:z,Dl:V,Eh:K,El:U,Fh:x,Fl:M,Gh:H,Gl:w,Hh:j,Hl:Z}=this;for(let L=0;L<80;L++){let D=QJ(K,U,14)^QJ(K,U,18)^pY(K,U,41),F=JJ(K,U,14)^JJ(K,U,18)^uY(K,U,41),J0=K&x^~K&H,n=U&M^~U&w,e=jL(Z,F,n,$h[L],HQ[L]),y=LL(e,j,D,J0,ey[L],MQ[L]),p=e|0,q0=QJ(J,X,28)^pY(J,X,34)^pY(J,X,39),t=JJ(J,X,28)^uY(J,X,34)^uY(J,X,39),N=J&Y^J&q^Y&q,c=X&G^X&W^G&W;j=H|0,Z=w|0,H=x|0,w=M|0,x=K|0,M=U|0,{h:K,l:U}=w$(z|0,V|0,y|0,p|0),z=q|0,V=W|0,q=Y|0,W=G|0,Y=J|0,G=X|0;let _=HL(p,t,c);J=BL(_,y,q0,N),X=_|0}({h:J,l:X}=w$(this.Ah|0,this.Al|0,J|0,X|0)),{h:Y,l:G}=w$(this.Bh|0,this.Bl|0,Y|0,G|0),{h:q,l:W}=w$(this.Ch|0,this.Cl|0,q|0,W|0),{h:z,l:V}=w$(this.Dh|0,this.Dl|0,z|0,V|0),{h:K,l:U}=w$(this.Eh|0,this.El|0,K|0,U|0),{h:x,l:M}=w$(this.Fh|0,this.Fl|0,x|0,M|0),{h:H,l:w}=w$(this.Gh|0,this.Gl|0,H|0,w|0),{h:j,l:Z}=w$(this.Hh|0,this.Hl|0,j|0,Z|0),this.set(J,X,Y,G,q,W,z,V,K,U,x,M,H,w,j,Z)}roundClean(){Y$(MQ,HQ)}destroy(){Y$(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Qh extends gY{Ah=$8[0]|0;Al=$8[1]|0;Bh=$8[2]|0;Bl=$8[3]|0;Ch=$8[4]|0;Cl=$8[5]|0;Dh=$8[6]|0;Dl=$8[7]|0;Eh=$8[8]|0;El=$8[9]|0;Fh=$8[10]|0;Fl=$8[11]|0;Gh=$8[12]|0;Gl=$8[13]|0;Hh=$8[14]|0;Hl=$8[15]|0;constructor(){super(64)}}class Jh extends gY{Ah=e0[0]|0;Al=e0[1]|0;Bh=e0[2]|0;Bl=e0[3]|0;Ch=e0[4]|0;Cl=e0[5]|0;Dh=e0[6]|0;Dl=e0[7]|0;Eh=e0[8]|0;El=e0[9]|0;Fh=e0[10]|0;Fl=e0[11]|0;Gh=e0[12]|0;Gl=e0[13]|0;Hh=e0[14]|0;Hl=e0[15]|0;constructor(){super(48)}}var G8=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),q8=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class Xh extends gY{Ah=G8[0]|0;Al=G8[1]|0;Bh=G8[2]|0;Bl=G8[3]|0;Ch=G8[4]|0;Cl=G8[5]|0;Dh=G8[6]|0;Dl=G8[7]|0;Eh=G8[8]|0;El=G8[9]|0;Fh=G8[10]|0;Fl=G8[11]|0;Gh=G8[12]|0;Gl=G8[13]|0;Hh=G8[14]|0;Hl=G8[15]|0;constructor(){super(28)}}class Yh extends gY{Ah=q8[0]|0;Al=q8[1]|0;Bh=q8[2]|0;Bl=q8[3]|0;Ch=q8[4]|0;Cl=q8[5]|0;Dh=q8[6]|0;Dl=q8[7]|0;Eh=q8[8]|0;El=q8[9]|0;Fh=q8[10]|0;Fl=q8[11]|0;Gh=q8[12]|0;Gl=q8[13]|0;Hh=q8[14]|0;Hl=q8[15]|0;constructor(){super(32)}}var W8=zL(()=>new RL,VL(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Sz=BigInt(0),cz=BigInt(1);function lY($,Q=""){if(typeof $!=="boolean"){let J=Q&&`"${Q}" `;throw Error(J+"expected boolean, got type="+typeof $)}return $}function _L($){if(typeof $==="bigint"){if(!a6($))throw Error("positive bigint expected, got "+$)}else f8($);return $}function iY($){let Q=_L($).toString(16);return Q.length&1?"0"+Q:Q}function NL($){if(typeof $!=="string")throw Error("hex string expected, got "+typeof $);return $===""?Sz:BigInt("0x"+$)}function BQ($){return NL(F0($))}function bz($){return NL(F0(Gh(R0($)).reverse()))}function o6($,Q){f8(Q),$=_L($);let J=P0($.toString(16).padStart(Q*2,"0"));if(J.length!==Q)throw Error("number too large");return J}function fz($,Q){return o6($,Q).reverse()}function Gh($){return Uint8Array.from($)}function vL($){return Uint8Array.from($,(Q,J)=>{let X=Q.charCodeAt(0);if(Q.length!==1||X>127)throw Error(`string contains non-ASCII character "${$[J]}" with code ${X} at position ${J}`);return X})}var a6=($)=>typeof $==="bigint"&&Sz<=$;function qh($,Q,J){return a6($)&&a6(Q)&&a6(J)&&Q<=$&&$<J}function OL($,Q,J,X){if(!qh(Q,J,X))throw Error("expected valid "+$+": "+J+" <= n < "+X+", got "+Q)}function mz($){let Q;for(Q=0;$>Sz;$>>=cz,Q+=1);return Q}var nY=($)=>(cz<<BigInt($))-cz;function FL($,Q,J){if(f8($,"hashLen"),f8(Q,"qByteLen"),typeof J!=="function")throw Error("hmacFn must be a function");let X=(j)=>new Uint8Array(j),Y=Uint8Array.of(),G=Uint8Array.of(0),q=Uint8Array.of(1),W=1000,z=X($),V=X($),K=0,U=()=>{z.fill(1),V.fill(0),K=0},x=(...j)=>J(V,h0(z,...j)),M=(j=Y)=>{if(V=x(G,j),z=x(),j.length===0)return;V=x(q,j),z=x()},H=()=>{if(K++>=W)throw Error("drbg: tried max amount of iterations");let j=0,Z=[];while(j<Q){z=x();let L=z.slice();Z.push(L),j+=z.length}return h0(...Z)};return(j,Z)=>{U(),M(j);let L=void 0;while(!(L=Z(H())))M();return U(),L}}function dY($,Q={},J={}){if(!$||typeof $!=="object")throw Error("expected valid options object");function X(G,q,W){let z=$[G];if(W&&z===void 0)return;let V=typeof z;if(V!==q||z===null)throw Error(`param "${G}" is invalid: expected ${q}, got ${V}`)}let Y=(G,q)=>Object.entries(G).forEach(([W,z])=>X(W,z,q));Y(Q,!1),Y(J,!0)}function yz($){let Q=new WeakMap;return(J,...X)=>{let Y=Q.get(J);if(Y!==void 0)return Y;let G=$(J,...X);return Q.set(J,G),G}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var x8=BigInt(0),z8=BigInt(1),XJ=BigInt(2),PL=BigInt(3),TL=BigInt(4),AL=BigInt(5),Wh=BigInt(7),EL=BigInt(8),zh=BigInt(9),kL=BigInt(16);function W$($,Q){let J=$%Q;return J>=x8?J:Q+J}function C8($,Q,J){let X=$;while(Q-- >x8)X*=X,X%=J;return X}function CL($,Q){if($===x8)throw Error("invert: expected non-zero number");if(Q<=x8)throw Error("invert: expected positive modulus, got "+Q);let J=W$($,Q),X=Q,Y=x8,G=z8,q=z8,W=x8;while(J!==x8){let V=X/J,K=X%J,U=Y-q*V,x=G-W*V;X=J,J=K,Y=q,G=W,q=U,W=x}if(X!==z8)throw Error("invert: does not exist");return W$(Y,Q)}function hz($,Q,J){if(!$.eql($.sqr(Q),J))throw Error("Cannot find square root")}function cL($,Q){let J=($.ORDER+z8)/TL,X=$.pow(Q,J);return hz($,X,Q),X}function Vh($,Q){let J=($.ORDER-AL)/EL,X=$.mul(Q,XJ),Y=$.pow(X,J),G=$.mul(Q,Y),q=$.mul($.mul(G,XJ),Y),W=$.mul(G,$.sub(q,$.ONE));return hz($,W,Q),W}function Kh($){let Q=RX($),J=SL($),X=J(Q,Q.neg(Q.ONE)),Y=J(Q,X),G=J(Q,Q.neg(X)),q=($+Wh)/kL;return(W,z)=>{let V=W.pow(z,q),K=W.mul(V,X),U=W.mul(V,Y),x=W.mul(V,G),M=W.eql(W.sqr(K),z),H=W.eql(W.sqr(U),z);V=W.cmov(V,K,M),K=W.cmov(x,U,H);let w=W.eql(W.sqr(K),z),j=W.cmov(V,K,w);return hz(W,j,z),j}}function SL($){if($<PL)throw Error("sqrt is not defined for small field");let Q=$-z8,J=0;while(Q%XJ===x8)Q/=XJ,J++;let X=XJ,Y=RX($);while(IL(Y,X)===1)if(X++>1000)throw Error("Cannot find square root: probably non-prime P");if(J===1)return cL;let G=Y.pow(X,Q),q=(Q+z8)/XJ;return function(z,V){if(z.is0(V))return V;if(IL(z,V)!==1)throw Error("Cannot find square root");let K=J,U=z.mul(z.ONE,G),x=z.pow(V,Q),M=z.pow(V,q);while(!z.eql(x,z.ONE)){if(z.is0(x))return z.ZERO;let H=1,w=z.sqr(x);while(!z.eql(w,z.ONE))if(H++,w=z.sqr(w),H===K)throw Error("Cannot find square root");let j=z8<<BigInt(K-H-1),Z=z.pow(U,j);K=H,U=z.sqr(Z),x=z.mul(x,U),M=z.mul(M,Z)}return M}}function Uh($){if($%TL===PL)return cL;if($%EL===AL)return Vh;if($%kL===zh)return Kh($);return SL($)}var xh=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function pz($){let Q={ORDER:"bigint",BYTES:"number",BITS:"number"},J=xh.reduce((X,Y)=>{return X[Y]="function",X},Q);return dY($,J),$}function Mh($,Q,J){if(J<x8)throw Error("invalid exponent, negatives unsupported");if(J===x8)return $.ONE;if(J===z8)return Q;let X=$.ONE,Y=Q;while(J>x8){if(J&z8)X=$.mul(X,Y);Y=$.sqr(Y),J>>=z8}return X}function s6($,Q,J=!1){let X=Array(Q.length).fill(J?$.ZERO:void 0),Y=Q.reduce((q,W,z)=>{if($.is0(W))return q;return X[z]=q,$.mul(q,W)},$.ONE),G=$.inv(Y);return Q.reduceRight((q,W,z)=>{if($.is0(W))return q;return X[z]=$.mul(q,X[z]),$.mul(q,W)},G),X}function IL($,Q){let J=($.ORDER-z8)/XJ,X=$.pow(Q,J),Y=$.eql(X,$.ONE),G=$.eql(X,$.ZERO),q=$.eql(X,$.neg($.ONE));if(!Y&&!G&&!q)throw Error("invalid Legendre symbol result");return Y?1:G?0:-1}function Hh($,Q){if(Q!==void 0)f8(Q);let J=Q!==void 0?Q:$.toString(2).length,X=Math.ceil(J/8);return{nBitLength:J,nByteLength:X}}class bL{ORDER;BITS;BYTES;isLE;ZERO=x8;ONE=z8;_lengths;_sqrt;_mod;constructor($,Q={}){if($<=x8)throw Error("invalid field: expected ORDER > 0, got "+$);let J=void 0;if(this.isLE=!1,Q!=null&&typeof Q==="object"){if(typeof Q.BITS==="number")J=Q.BITS;if(typeof Q.sqrt==="function")this.sqrt=Q.sqrt;if(typeof Q.isLE==="boolean")this.isLE=Q.isLE;if(Q.allowedLengths)this._lengths=Q.allowedLengths?.slice();if(typeof Q.modFromBytes==="boolean")this._mod=Q.modFromBytes}let{nBitLength:X,nByteLength:Y}=Hh($,J);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=$,this.BITS=X,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create($){return W$($,this.ORDER)}isValid($){if(typeof $!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof $);return x8<=$&&$<this.ORDER}is0($){return $===x8}isValidNot0($){return!this.is0($)&&this.isValid($)}isOdd($){return($&z8)===z8}neg($){return W$(-$,this.ORDER)}eql($,Q){return $===Q}sqr($){return W$($*$,this.ORDER)}add($,Q){return W$($+Q,this.ORDER)}sub($,Q){return W$($-Q,this.ORDER)}mul($,Q){return W$($*Q,this.ORDER)}pow($,Q){return Mh(this,$,Q)}div($,Q){return W$($*CL(Q,this.ORDER),this.ORDER)}sqrN($){return $*$}addN($,Q){return $+Q}subN($,Q){return $-Q}mulN($,Q){return $*Q}inv($){return CL($,this.ORDER)}sqrt($){if(!this._sqrt)this._sqrt=Uh(this.ORDER);return this._sqrt(this,$)}toBytes($){return this.isLE?fz($,this.BYTES):o6($,this.BYTES)}fromBytes($,Q=!1){R0($);let{_lengths:J,BYTES:X,isLE:Y,ORDER:G,_mod:q}=this;if(J){if(!J.includes($.length)||$.length>X)throw Error("Field.fromBytes: expected "+J+" bytes, got "+$.length);let z=new Uint8Array(X);z.set($,Y?0:z.length-$.length),$=z}if($.length!==X)throw Error("Field.fromBytes: expected "+X+" bytes, got "+$.length);let W=Y?bz($):BQ($);if(q)W=W$(W,G);if(!Q){if(!this.isValid(W))throw Error("invalid field element: outside of range 0..ORDER")}return W}invertBatch($){return s6(this,$)}cmov($,Q,J){return J?Q:$}}function RX($,Q={}){return new bL($,Q)}function fL($){if(typeof $!=="bigint")throw Error("field order must be bigint");let Q=$.toString(2).length;return Math.ceil(Q/8)}function uz($){let Q=fL($);return Q+Math.ceil(Q/2)}function r6($,Q,J=!1){R0($);let X=$.length,Y=fL(Q),G=uz(Q);if(X<16||X<G||X>1024)throw Error("expected "+G+"-1024 bytes of input, got "+X);let q=J?bz($):BQ($),W=W$(q,Q-z8)+z8;return J?fz(W,Y):o6(W,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var DX=BigInt(0),YJ=BigInt(1);function aY($,Q){let J=Q.negate();return $?J:Q}function nz($,Q){let J=s6($.Fp,Q.map((X)=>X.Z));return Q.map((X,Y)=>$.fromAffine(X.toAffine(J[Y])))}function pL($,Q){if(!Number.isSafeInteger($)||$<=0||$>Q)throw Error("invalid window size, expected [1.."+Q+"], got W="+$)}function gz($,Q){pL($,Q);let J=Math.ceil(Q/$)+1,X=2**($-1),Y=2**$,G=nY($),q=BigInt($);return{windows:J,windowSize:X,mask:G,maxNumber:Y,shiftBy:q}}function mL($,Q,J){let{windowSize:X,mask:Y,maxNumber:G,shiftBy:q}=J,W=Number($&Y),z=$>>q;if(W>X)W-=G,z+=YJ;let V=Q*X,K=V+Math.abs(W)-1,U=W===0,x=W<0,M=Q%2!==0;return{nextN:z,offset:K,isZero:U,isNeg:x,isNegF:M,offsetF:V}}var lz=new WeakMap,uL=new WeakMap;function iz($){return uL.get($)||1}function yL($){if($!==DX)throw Error("invalid wNAF")}class dz{BASE;ZERO;Fn;bits;constructor($,Q){this.BASE=$.BASE,this.ZERO=$.ZERO,this.Fn=$.Fn,this.bits=Q}_unsafeLadder($,Q,J=this.ZERO){let X=$;while(Q>DX){if(Q&YJ)J=J.add(X);X=X.double(),Q>>=YJ}return J}precomputeWindow($,Q){let{windows:J,windowSize:X}=gz(Q,this.bits),Y=[],G=$,q=G;for(let W=0;W<J;W++){q=G,Y.push(q);for(let z=1;z<X;z++)q=q.add(G),Y.push(q);G=q.double()}return Y}wNAF($,Q,J){if(!this.Fn.isValid(J))throw Error("invalid scalar");let X=this.ZERO,Y=this.BASE,G=gz($,this.bits);for(let q=0;q<G.windows;q++){let{nextN:W,offset:z,isZero:V,isNeg:K,isNegF:U,offsetF:x}=mL(J,q,G);if(J=W,V)Y=Y.add(aY(U,Q[x]));else X=X.add(aY(K,Q[z]))}return yL(J),{p:X,f:Y}}wNAFUnsafe($,Q,J,X=this.ZERO){let Y=gz($,this.bits);for(let G=0;G<Y.windows;G++){if(J===DX)break;let{nextN:q,offset:W,isZero:z,isNeg:V}=mL(J,G,Y);if(J=q,z)continue;else{let K=Q[W];X=X.add(V?K.negate():K)}}return yL(J),X}getPrecomputes($,Q,J){let X=lz.get(Q);if(!X){if(X=this.precomputeWindow(Q,$),$!==1){if(typeof J==="function")X=J(X);lz.set(Q,X)}}return X}cached($,Q,J){let X=iz($);return this.wNAF(X,this.getPrecomputes(X,$,J),Q)}unsafe($,Q,J,X){let Y=iz($);if(Y===1)return this._unsafeLadder($,Q,X);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,$,J),Q,X)}createCache($,Q){pL(Q,this.bits),uL.set($,Q),lz.delete($)}hasCache($){return iz($)!==1}}function gL($,Q,J,X){let Y=Q,G=$.ZERO,q=$.ZERO;while(J>DX||X>DX){if(J&YJ)G=G.add(Y);if(X&YJ)q=q.add(Y);Y=Y.double(),J>>=YJ,X>>=YJ}return{p1:G,p2:q}}function hL($,Q,J){if(Q){if(Q.ORDER!==$)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return pz(Q),Q}else return RX($,{isLE:J})}function lL($,Q,J={},X){if(X===void 0)X=$==="edwards";if(!Q||typeof Q!=="object")throw Error(`expected valid ${$} CURVE object`);for(let z of["p","n","h"]){let V=Q[z];if(!(typeof V==="bigint"&&V>DX))throw Error(`CURVE.${z} must be positive bigint`)}let Y=hL(Q.p,J.Fp,X),G=hL(Q.n,J.Fn,X),W=["Gx","Gy","a",$==="weierstrass"?"b":"d"];for(let z of W)if(!Y.isValid(Q[z]))throw Error(`CURVE.${z} must be valid field element of CURVE.Fp`);return Q=Object.freeze(Object.assign({},Q)),{CURVE:Q,Fp:Y,Fn:G}}function t6($,Q){return function(X){let Y=$(X);return{secretKey:Y,publicKey:Q(Y)}}}class az{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor($,Q){if($J($),R0(Q,void 0,"key"),this.iHash=$.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let J=this.blockLen,X=new Uint8Array(J);X.set(Q.length>J?$.create().update(Q).digest():Q);for(let Y=0;Y<X.length;Y++)X[Y]^=54;this.iHash.update(X),this.oHash=$.create();for(let Y=0;Y<X.length;Y++)X[Y]^=106;this.oHash.update(X),Y$(X)}update($){return LX(this),this.iHash.update($),this}digestInto($){LX(this),R0($,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto($),this.oHash.update($),this.oHash.digestInto($),this.destroy()}digest(){let $=new Uint8Array(this.oHash.outputLen);return this.digestInto($),$}_cloneInto($){$||=Object.create(Object.getPrototypeOf(this),{});let{oHash:Q,iHash:J,finished:X,destroyed:Y,blockLen:G,outputLen:q}=this;return $=$,$.finished=X,$.destroyed=Y,$.blockLen=G,$.outputLen=q,$.oHash=Q._cloneInto($.oHash),$.iHash=J._cloneInto($.iHash),$}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var ZQ=($,Q,J)=>new az($,Q).update(J).digest();ZQ.create=($,Q)=>new az($,Q);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var iL=($,Q)=>($+($>=0?Q:-Q)/dL)/Q;function Bh($,Q,J){let[[X,Y],[G,q]]=Q,W=iL(q*$,J),z=iL(-Y*$,J),V=$-W*X-z*G,K=-W*Y-z*q,U=V<y$,x=K<y$;if(U)V=-V;if(x)K=-K;let M=nY(Math.ceil(mz(J)/2))+_X;if(V<y$||V>=M||K<y$||K>=M)throw Error("splitScalar (endomorphism): failed, k="+$);return{k1neg:U,k1:V,k2neg:x,k2:K}}function sz($){if(!["compact","recovered","der"].includes($))throw Error('Signature format must be "compact", "recovered", or "der"');return $}function oz($,Q){let J={};for(let X of Object.keys(Q))J[X]=$[X]===void 0?Q[X]:$[X];if(lY(J.lowS,"lowS"),lY(J.prehash,"prehash"),J.format!==void 0)sz(J.format);return J}class nL extends Error{constructor($=""){super($)}}var wQ={Err:nL,_tlv:{encode:($,Q)=>{let{Err:J}=wQ;if($<0||$>256)throw new J("tlv.encode: wrong tag");if(Q.length&1)throw new J("tlv.encode: unpadded data");let X=Q.length/2,Y=iY(X);if(Y.length/2&128)throw new J("tlv.encode: long form length too big");let G=X>127?iY(Y.length/2|128):"";return iY($)+G+Y+Q},decode($,Q){let{Err:J}=wQ,X=0;if($<0||$>256)throw new J("tlv.encode: wrong tag");if(Q.length<2||Q[X++]!==$)throw new J("tlv.decode: wrong tlv");let Y=Q[X++],G=!!(Y&128),q=0;if(!G)q=Y;else{let z=Y&127;if(!z)throw new J("tlv.decode(long): indefinite length not supported");if(z>4)throw new J("tlv.decode(long): byte length is too big");let V=Q.subarray(X,X+z);if(V.length!==z)throw new J("tlv.decode: length bytes not complete");if(V[0]===0)throw new J("tlv.decode(long): zero leftmost byte");for(let K of V)q=q<<8|K;if(X+=z,q<128)throw new J("tlv.decode(long): not minimal encoding")}let W=Q.subarray(X,X+q);if(W.length!==q)throw new J("tlv.decode: wrong value length");return{v:W,l:Q.subarray(X+q)}}},_int:{encode($){let{Err:Q}=wQ;if($<y$)throw new Q("integer: negative integers are not allowed");let J=iY($);if(Number.parseInt(J[0],16)&8)J="00"+J;if(J.length&1)throw new Q("unexpected DER parsing assertion: unpadded hex");return J},decode($){let{Err:Q}=wQ;if($[0]&128)throw new Q("invalid signature integer: negative");if($[0]===0&&!($[1]&128))throw new Q("invalid signature integer: unnecessary leading zero");return BQ($)}},toSig($){let{Err:Q,_int:J,_tlv:X}=wQ,Y=R0($,void 0,"signature"),{v:G,l:q}=X.decode(48,Y);if(q.length)throw new Q("invalid signature: left bytes after parsing");let{v:W,l:z}=X.decode(2,G),{v:V,l:K}=X.decode(2,z);if(K.length)throw new Q("invalid signature: left bytes after parsing");return{r:J.decode(W),s:J.decode(V)}},hexFromSig($){let{_tlv:Q,_int:J}=wQ,X=Q.encode(2,J.encode($.r)),Y=Q.encode(2,J.encode($.s)),G=X+Y;return Q.encode(48,G)}},y$=BigInt(0),_X=BigInt(1),dL=BigInt(2),e6=BigInt(3),Zh=BigInt(4);function aL($,Q={}){let J=lL("weierstrass",$,Q),{Fp:X,Fn:Y}=J,G=J.CURVE,{h:q,n:W}=G;dY(Q,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:z}=Q;if(z){if(!X.is0(G.a)||typeof z.beta!=="bigint"||!Array.isArray(z.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let V=sL(X,Y);function K(){if(!X.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function U(N,c,_){let{x:C,y:E}=c.toAffine(),T=X.toBytes(C);if(lY(_,"isCompressed"),_){K();let v=!X.isOdd(E);return h0(oL(v),T)}else return h0(Uint8Array.of(4),T,X.toBytes(E))}function x(N){R0(N,void 0,"Point");let{publicKey:c,publicKeyUncompressed:_}=V,C=N.length,E=N[0],T=N.subarray(1);if(C===c&&(E===2||E===3)){let v=X.fromBytes(T);if(!X.isValid(v))throw Error("bad point: is not on curve, wrong x");let k=w(v),f;try{f=X.sqrt(k)}catch(W0){let X0=W0 instanceof Error?": "+W0.message:"";throw Error("bad point: is not on curve, sqrt error"+X0)}K();let S=X.isOdd(f);if((E&1)===1!==S)f=X.neg(f);return{x:v,y:f}}else if(C===_&&E===4){let v=X.BYTES,k=X.fromBytes(T.subarray(0,v)),f=X.fromBytes(T.subarray(v,v*2));if(!j(k,f))throw Error("bad point: is not on curve");return{x:k,y:f}}else throw Error(`bad point: got length ${C}, expected compressed=${c} or uncompressed=${_}`)}let M=Q.toBytes||U,H=Q.fromBytes||x;function w(N){let c=X.sqr(N),_=X.mul(c,N);return X.add(X.add(_,X.mul(N,G.a)),G.b)}function j(N,c){let _=X.sqr(c),C=w(N);return X.eql(_,C)}if(!j(G.Gx,G.Gy))throw Error("bad curve params: generator point");let Z=X.mul(X.pow(G.a,e6),Zh),L=X.mul(X.sqr(G.b),BigInt(27));if(X.is0(X.add(Z,L)))throw Error("bad curve params: a or b");function D(N,c,_=!1){if(!X.isValid(c)||_&&X.is0(c))throw Error(`bad point coordinate ${N}`);return c}function F(N){if(!(N instanceof p))throw Error("Weierstrass Point expected")}function J0(N){if(!z||!z.basises)throw Error("no endo");return Bh(N,z.basises,Y.ORDER)}let n=yz((N,c)=>{let{X:_,Y:C,Z:E}=N;if(X.eql(E,X.ONE))return{x:_,y:C};let T=N.is0();if(c==null)c=T?X.ONE:X.inv(E);let v=X.mul(_,c),k=X.mul(C,c),f=X.mul(E,c);if(T)return{x:X.ZERO,y:X.ZERO};if(!X.eql(f,X.ONE))throw Error("invZ was invalid");return{x:v,y:k}}),e=yz((N)=>{if(N.is0()){if(Q.allowInfinityPoint&&!X.is0(N.Y))return;throw Error("bad point: ZERO")}let{x:c,y:_}=N.toAffine();if(!X.isValid(c)||!X.isValid(_))throw Error("bad point: x or y not field elements");if(!j(c,_))throw Error("bad point: equation left != right");if(!N.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function y(N,c,_,C,E){return _=new p(X.mul(_.X,N),_.Y,_.Z),c=aY(C,c),_=aY(E,_),c.add(_)}class p{static BASE=new p(G.Gx,G.Gy,X.ONE);static ZERO=new p(X.ZERO,X.ONE,X.ZERO);static Fp=X;static Fn=Y;X;Y;Z;constructor(N,c,_){this.X=D("x",N),this.Y=D("y",c,!0),this.Z=D("z",_),Object.freeze(this)}static CURVE(){return G}static fromAffine(N){let{x:c,y:_}=N||{};if(!N||!X.isValid(c)||!X.isValid(_))throw Error("invalid affine point");if(N instanceof p)throw Error("projective point not allowed");if(X.is0(c)&&X.is0(_))return p.ZERO;return new p(c,_,X.ONE)}static fromBytes(N){let c=p.fromAffine(H(R0(N,void 0,"point")));return c.assertValidity(),c}static fromHex(N){return p.fromBytes(P0(N))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(N=8,c=!0){if(t.createCache(this,N),!c)this.multiply(e6);return this}assertValidity(){e(this)}hasEvenY(){let{y:N}=this.toAffine();if(!X.isOdd)throw Error("Field doesn't support isOdd");return!X.isOdd(N)}equals(N){F(N);let{X:c,Y:_,Z:C}=this,{X:E,Y:T,Z:v}=N,k=X.eql(X.mul(c,v),X.mul(E,C)),f=X.eql(X.mul(_,v),X.mul(T,C));return k&&f}negate(){return new p(this.X,X.neg(this.Y),this.Z)}double(){let{a:N,b:c}=G,_=X.mul(c,e6),{X:C,Y:E,Z:T}=this,v=X.ZERO,k=X.ZERO,f=X.ZERO,S=X.mul(C,C),$0=X.mul(E,E),W0=X.mul(T,T),X0=X.mul(C,E);return X0=X.add(X0,X0),f=X.mul(C,T),f=X.add(f,f),v=X.mul(N,f),k=X.mul(_,W0),k=X.add(v,k),v=X.sub($0,k),k=X.add($0,k),k=X.mul(v,k),v=X.mul(X0,v),f=X.mul(_,f),W0=X.mul(N,W0),X0=X.sub(S,W0),X0=X.mul(N,X0),X0=X.add(X0,f),f=X.add(S,S),S=X.add(f,S),S=X.add(S,W0),S=X.mul(S,X0),k=X.add(k,S),W0=X.mul(E,T),W0=X.add(W0,W0),S=X.mul(W0,X0),v=X.sub(v,S),f=X.mul(W0,$0),f=X.add(f,f),f=X.add(f,f),new p(v,k,f)}add(N){F(N);let{X:c,Y:_,Z:C}=this,{X:E,Y:T,Z:v}=N,k=X.ZERO,f=X.ZERO,S=X.ZERO,$0=G.a,W0=X.mul(G.b,e6),X0=X.mul(c,E),C0=X.mul(_,T),o=X.mul(C,v),v0=X.add(c,_),D0=X.add(E,T);v0=X.mul(v0,D0),D0=X.add(X0,C0),v0=X.sub(v0,D0),D0=X.add(c,C);let M0=X.add(E,v);return D0=X.mul(D0,M0),M0=X.add(X0,o),D0=X.sub(D0,M0),M0=X.add(_,C),k=X.add(T,v),M0=X.mul(M0,k),k=X.add(C0,o),M0=X.sub(M0,k),S=X.mul($0,D0),k=X.mul(W0,o),S=X.add(k,S),k=X.sub(C0,S),S=X.add(C0,S),f=X.mul(k,S),C0=X.add(X0,X0),C0=X.add(C0,X0),o=X.mul($0,o),D0=X.mul(W0,D0),C0=X.add(C0,o),o=X.sub(X0,o),o=X.mul($0,o),D0=X.add(D0,o),X0=X.mul(C0,D0),f=X.add(f,X0),X0=X.mul(M0,D0),k=X.mul(v0,k),k=X.sub(k,X0),X0=X.mul(v0,C0),S=X.mul(M0,S),S=X.add(S,X0),new p(k,f,S)}subtract(N){return this.add(N.negate())}is0(){return this.equals(p.ZERO)}multiply(N){let{endo:c}=Q;if(!Y.isValidNot0(N))throw Error("invalid scalar: out of range");let _,C,E=(T)=>t.cached(this,T,(v)=>nz(p,v));if(c){let{k1neg:T,k1:v,k2neg:k,k2:f}=J0(N),{p:S,f:$0}=E(v),{p:W0,f:X0}=E(f);C=$0.add(X0),_=y(c.beta,S,W0,T,k)}else{let{p:T,f:v}=E(N);_=T,C=v}return nz(p,[_,C])[0]}multiplyUnsafe(N){let{endo:c}=Q,_=this;if(!Y.isValid(N))throw Error("invalid scalar: out of range");if(N===y$||_.is0())return p.ZERO;if(N===_X)return _;if(t.hasCache(this))return this.multiply(N);if(c){let{k1neg:C,k1:E,k2neg:T,k2:v}=J0(N),{p1:k,p2:f}=gL(p,_,E,v);return y(c.beta,k,f,C,T)}else return t.unsafe(_,N)}toAffine(N){return n(this,N)}isTorsionFree(){let{isTorsionFree:N}=Q;if(q===_X)return!0;if(N)return N(p,this);return t.unsafe(this,W).is0()}clearCofactor(){let{clearCofactor:N}=Q;if(q===_X)return this;if(N)return N(p,this);return this.multiplyUnsafe(q)}isSmallOrder(){return this.multiplyUnsafe(q).is0()}toBytes(N=!0){return lY(N,"isCompressed"),this.assertValidity(),M(p,this,N)}toHex(N=!0){return F0(this.toBytes(N))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let q0=Y.BITS,t=new dz(p,Q.endo?Math.ceil(q0/2):q0);return p.BASE.precompute(8),p}function oL($){return Uint8Array.of($?2:3)}function sL($,Q){return{secretKey:Q.BYTES,publicKey:1+$.BYTES,publicKeyUncompressed:1+2*$.BYTES,publicKeyHasPrefix:!0,signature:2*Q.BYTES}}function wh($,Q={}){let{Fn:J}=$,X=Q.randomBytes||q$,Y=Object.assign(sL($.Fp,J),{seed:uz(J.ORDER)});function G(M){try{let H=J.fromBytes(M);return J.isValidNot0(H)}catch(H){return!1}}function q(M,H){let{publicKey:w,publicKeyUncompressed:j}=Y;try{let Z=M.length;if(H===!0&&Z!==w)return!1;if(H===!1&&Z!==j)return!1;return!!$.fromBytes(M)}catch(Z){return!1}}function W(M=X(Y.seed)){return r6(R0(M,Y.seed,"seed"),J.ORDER)}function z(M,H=!0){return $.BASE.multiply(J.fromBytes(M)).toBytes(H)}function V(M){let{secretKey:H,publicKey:w,publicKeyUncompressed:j}=Y;if(!hY(M))return;if("_lengths"in J&&J._lengths||H===w)return;let Z=R0(M,void 0,"key").length;return Z===w||Z===j}function K(M,H,w=!0){if(V(M)===!0)throw Error("first arg must be private key");if(V(H)===!1)throw Error("second arg must be public key");let j=J.fromBytes(M);return $.fromBytes(H).multiply(j).toBytes(w)}let U={isValidSecretKey:G,isValidPublicKey:q,randomSecretKey:W},x=t6(W,z);return Object.freeze({getPublicKey:z,getSharedSecret:K,keygen:x,Point:$,utils:U,lengths:Y})}function rL($,Q,J={}){$J(Q),dY(J,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),J=Object.assign({},J);let X=J.randomBytes||q$,Y=J.hmac||((_,C)=>ZQ(Q,_,C)),{Fp:G,Fn:q}=$,{ORDER:W,BITS:z}=q,{keygen:V,getPublicKey:K,getSharedSecret:U,utils:x,lengths:M}=wh($,J),H={prehash:!0,lowS:typeof J.lowS==="boolean"?J.lowS:!0,format:"compact",extraEntropy:!1},w=W*dL<G.ORDER;function j(_){let C=W>>_X;return _>C}function Z(_,C){if(!q.isValidNot0(C))throw Error(`invalid signature ${_}: out of range 1..Point.Fn.ORDER`);return C}function L(){if(w)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(_,C){sz(C);let E=M.signature,T=C==="compact"?E:C==="recovered"?E+1:void 0;return R0(_,T)}class F{r;s;recovery;constructor(_,C,E){if(this.r=Z("r",_),this.s=Z("s",C),E!=null){if(L(),![0,1,2,3].includes(E))throw Error("invalid recovery id");this.recovery=E}Object.freeze(this)}static fromBytes(_,C=H.format){D(_,C);let E;if(C==="der"){let{r:f,s:S}=wQ.toSig(R0(_));return new F(f,S)}if(C==="recovered")E=_[0],C="compact",_=_.subarray(1);let T=M.signature/2,v=_.subarray(0,T),k=_.subarray(T,T*2);return new F(q.fromBytes(v),q.fromBytes(k),E)}static fromHex(_,C){return this.fromBytes(P0(_),C)}assertRecovery(){let{recovery:_}=this;if(_==null)throw Error("invalid recovery id: must be present");return _}addRecoveryBit(_){return new F(this.r,this.s,_)}recoverPublicKey(_){let{r:C,s:E}=this,T=this.assertRecovery(),v=T===2||T===3?C+W:C;if(!G.isValid(v))throw Error("invalid recovery id: sig.r+curve.n != R.x");let k=G.toBytes(v),f=$.fromBytes(h0(oL((T&1)===0),k)),S=q.inv(v),$0=n(R0(_,void 0,"msgHash")),W0=q.create(-$0*S),X0=q.create(E*S),C0=$.BASE.multiplyUnsafe(W0).add(f.multiplyUnsafe(X0));if(C0.is0())throw Error("invalid recovery: point at infinify");return C0.assertValidity(),C0}hasHighS(){return j(this.s)}toBytes(_=H.format){if(sz(_),_==="der")return P0(wQ.hexFromSig(this));let{r:C,s:E}=this,T=q.toBytes(C),v=q.toBytes(E);if(_==="recovered")return L(),h0(Uint8Array.of(this.assertRecovery()),T,v);return h0(T,v)}toHex(_){return F0(this.toBytes(_))}}let J0=J.bits2int||function(C){if(C.length>8192)throw Error("input is too large");let E=BQ(C),T=C.length*8-z;return T>0?E>>BigInt(T):E},n=J.bits2int_modN||function(C){return q.create(J0(C))},e=nY(z);function y(_){return OL("num < 2^"+z,_,y$,e),q.toBytes(_)}function p(_,C){return R0(_,void 0,"message"),C?R0(Q(_),void 0,"prehashed message"):_}function q0(_,C,E){let{lowS:T,prehash:v,extraEntropy:k}=oz(E,H);_=p(_,v);let f=n(_),S=q.fromBytes(C);if(!q.isValidNot0(S))throw Error("invalid private key");let $0=[y(S),y(f)];if(k!=null&&k!==!1){let o=k===!0?X(M.secretKey):k;$0.push(R0(o,void 0,"extraEntropy"))}let W0=h0(...$0),X0=f;function C0(o){let v0=J0(o);if(!q.isValidNot0(v0))return;let D0=q.inv(v0),M0=$.BASE.multiply(v0).toAffine(),j8=q.create(M0.x);if(j8===y$)return;let L8=q.create(D0*q.create(X0+j8*S));if(L8===y$)return;let V8=(M0.x===j8?0:2)|Number(M0.y&_X),l$=L8;if(T&&j(L8))l$=q.neg(L8),V8^=1;return new F(j8,l$,w?void 0:V8)}return{seed:W0,k2sig:C0}}function t(_,C,E={}){let{seed:T,k2sig:v}=q0(_,C,E);return FL(Q.outputLen,q.BYTES,Y)(T,v).toBytes(E.format)}function N(_,C,E,T={}){let{lowS:v,prehash:k,format:f}=oz(T,H);if(E=R0(E,void 0,"publicKey"),C=p(C,k),!hY(_)){let S=_ instanceof F?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+S)}D(_,f);try{let S=F.fromBytes(_,f),$0=$.fromBytes(E);if(v&&S.hasHighS())return!1;let{r:W0,s:X0}=S,C0=n(C),o=q.inv(X0),v0=q.create(C0*o),D0=q.create(W0*o),M0=$.BASE.multiplyUnsafe(v0).add($0.multiplyUnsafe(D0));if(M0.is0())return!1;return q.create(M0.x)===W0}catch(S){return!1}}function c(_,C,E={}){let{prehash:T}=oz(E,H);return C=p(C,T),F.fromBytes(_,"recovered").recoverPublicKey(C).toBytes()}return Object.freeze({keygen:V,getPublicKey:K,getSharedSecret:U,utils:x,lengths:M,Point:$,sign:t,verify:N,recoverPublicKey:c,Signature:F,hash:Q})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var J5={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},jh={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Lh=BigInt(0),rz=BigInt(2);function Rh($){let Q=J5.p,J=BigInt(3),X=BigInt(6),Y=BigInt(11),G=BigInt(22),q=BigInt(23),W=BigInt(44),z=BigInt(88),V=$*$*$%Q,K=V*V*$%Q,U=C8(K,J,Q)*K%Q,x=C8(U,J,Q)*K%Q,M=C8(x,rz,Q)*V%Q,H=C8(M,Y,Q)*M%Q,w=C8(H,G,Q)*H%Q,j=C8(w,W,Q)*w%Q,Z=C8(j,z,Q)*j%Q,L=C8(Z,W,Q)*w%Q,D=C8(L,J,Q)*K%Q,F=C8(D,q,Q)*H%Q,J0=C8(F,X,Q)*V%Q,n=C8(J0,rz,Q);if(!$5.eql($5.sqr(n),$))throw Error("Cannot find square root");return n}var $5=RX(J5.p,{sqrt:Rh}),GJ=aL(J5,{Fp:$5,endo:jh}),sY=rL(GJ,W8),tL={};function Q5($,...Q){let J=tL[$];if(J===void 0){let X=W8(vL($));J=h0(X,X),tL[$]=J}return W8(h0(J,...Q))}var ez=($)=>$.toBytes(!0).slice(1),$1=($)=>$%rz===Lh;function tz($){let{Fn:Q,BASE:J}=GJ,X=Q.fromBytes($),Y=J.multiply(X);return{scalar:$1(Y.y)?X:Q.neg(X),bytes:ez(Y)}}function $R($){let Q=$5;if(!Q.isValidNot0($))throw Error("invalid x: Fail if x ≥ p");let J=Q.create($*$),X=Q.create(J*$+BigInt(7)),Y=Q.sqrt(X);if(!$1(Y))Y=Q.neg(Y);let G=GJ.fromAffine({x:$,y:Y});return G.assertValidity(),G}var oY=BQ;function QR(...$){return GJ.Fn.create(oY(Q5("BIP0340/challenge",...$)))}function eL($){return tz($).bytes}function Dh($,Q,J=q$(32)){let{Fn:X}=GJ,Y=R0($,void 0,"message"),{bytes:G,scalar:q}=tz(Q),W=R0(J,32,"auxRand"),z=X.toBytes(q^oY(Q5("BIP0340/aux",W))),V=Q5("BIP0340/nonce",z,G,Y),{bytes:K,scalar:U}=tz(V),x=QR(K,G,Y),M=new Uint8Array(64);if(M.set(K,0),M.set(X.toBytes(X.create(U+x*q)),32),!JR(M,Y,G))throw Error("sign: Invalid signature produced");return M}function JR($,Q,J){let{Fp:X,Fn:Y,BASE:G}=GJ,q=R0($,64,"signature"),W=R0(Q,void 0,"message"),z=R0(J,32,"publicKey");try{let V=$R(oY(z)),K=oY(q.subarray(0,32));if(!X.isValidNot0(K))return!1;let U=oY(q.subarray(32,64));if(!Y.isValidNot0(U))return!1;let x=QR(Y.toBytes(K),ez(V),W),M=G.multiplyUnsafe(U).add(V.multiplyUnsafe(Y.neg(x))),{x:H,y:w}=M.toAffine();if(M.is0()||!$1(w)||H!==K)return!1;return!0}catch(V){return!1}}var NX=(()=>{let J=(X=q$(48))=>{return r6(X,J5.n)};return{keygen:t6(J,eL),getPublicKey:eL,sign:Dh,verify:JR,Point:GJ,utils:{randomSecretKey:J,taggedHash:Q5,lift_x:$R,pointToBytes:ez},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function W5($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function X1($){if(!W5($))throw Error("Uint8Array expected")}function WR($,Q){if(!Array.isArray(Q))return!1;if(Q.length===0)return!0;if($)return Q.every((J)=>typeof J==="string");else return Q.every((J)=>Number.isSafeInteger(J))}function zR($){if(typeof $!=="function")throw Error("function expected");return!0}function jQ($,Q){if(typeof Q!=="string")throw Error(`${$}: string expected`);return!0}function tY($){if(!Number.isSafeInteger($))throw Error(`invalid integer: ${$}`)}function Y5($){if(!Array.isArray($))throw Error("array expected")}function G5($,Q){if(!WR(!0,Q))throw Error(`${$}: array of strings expected`)}function Y1($,Q){if(!WR(!1,Q))throw Error(`${$}: array of numbers expected`)}function I8(...$){let Q=(G)=>G,J=(G,q)=>(W)=>G(q(W)),X=$.map((G)=>G.encode).reduceRight(J,Q),Y=$.map((G)=>G.decode).reduce(J,Q);return{encode:X,decode:Y}}function P8($){let Q=typeof $==="string"?$.split(""):$,J=Q.length;G5("alphabet",Q);let X=new Map(Q.map((Y,G)=>[Y,G]));return{encode:(Y)=>{return Y5(Y),Y.map((G)=>{if(!Number.isSafeInteger(G)||G<0||G>=J)throw Error(`alphabet.encode: digit index outside alphabet "${G}". Allowed: ${$}`);return Q[G]})},decode:(Y)=>{return Y5(Y),Y.map((G)=>{jQ("alphabet.decode",G);let q=X.get(G);if(q===void 0)throw Error(`Unknown letter: "${G}". Allowed: ${$}`);return q})}}}function T8($=""){return jQ("join",$),{encode:(Q)=>{return G5("join.decode",Q),Q.join($)},decode:(Q)=>{return jQ("join.decode",Q),Q.split($)}}}function z5($,Q="="){return tY($),jQ("padding",Q),{encode(J){G5("padding.encode",J);while(J.length*$%8)J.push(Q);return J},decode(J){G5("padding.decode",J);let X=J.length;if(X*$%8)throw Error("padding: invalid, string should have whole number of bytes");for(;X>0&&J[X-1]===Q;X--)if((X-1)*$%8===0)throw Error("padding: invalid, string has too much padding");return J.slice(0,X)}}}function VR($){return zR($),{encode:(Q)=>Q,decode:(Q)=>$(Q)}}function XR($,Q,J){if(Q<2)throw Error(`convertRadix: invalid from=${Q}, base cannot be less than 2`);if(J<2)throw Error(`convertRadix: invalid to=${J}, base cannot be less than 2`);if(Y5($),!$.length)return[];let X=0,Y=[],G=Array.from($,(W)=>{if(tY(W),W<0||W>=Q)throw Error(`invalid integer: ${W}`);return W}),q=G.length;while(!0){let W=0,z=!0;for(let V=X;V<q;V++){let K=G[V],U=Q*W,x=U+K;if(!Number.isSafeInteger(x)||U/Q!==W||x-K!==U)throw Error("convertRadix: carry overflow");let M=x/J;W=x%J;let H=Math.floor(M);if(G[V]=H,!Number.isSafeInteger(H)||H*J+W!==x)throw Error("convertRadix: carry overflow");if(!z)continue;else if(!H)X=V;else z=!1}if(Y.push(W),z)break}for(let W=0;W<$.length-1&&$[W]===0;W++)Y.push(0);return Y.reverse()}var KR=($,Q)=>Q===0?$:KR(Q,$%Q),q5=($,Q)=>$+(Q-KR($,Q)),X5=(()=>{let $=[];for(let Q=0;Q<40;Q++)$.push(2**Q);return $})();function Q1($,Q,J,X){if(Y5($),Q<=0||Q>32)throw Error(`convertRadix2: wrong from=${Q}`);if(J<=0||J>32)throw Error(`convertRadix2: wrong to=${J}`);if(q5(Q,J)>32)throw Error(`convertRadix2: carry overflow from=${Q} to=${J} carryBits=${q5(Q,J)}`);let Y=0,G=0,q=X5[Q],W=X5[J]-1,z=[];for(let V of $){if(tY(V),V>=q)throw Error(`convertRadix2: invalid data word=${V} from=${Q}`);if(Y=Y<<Q|V,G+Q>32)throw Error(`convertRadix2: carry overflow pos=${G} from=${Q}`);G+=Q;for(;G>=J;G-=J)z.push((Y>>G-J&W)>>>0);let K=X5[G];if(K===void 0)throw Error("invalid carry");Y&=K-1}if(Y=Y<<J-G&W,!X&&G>=Q)throw Error("Excess padding");if(!X&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(X&&G>0)z.push(Y>>>0);return z}function _h($){tY($);let Q=256;return{encode:(J)=>{if(!W5(J))throw Error("radix.encode input should be Uint8Array");return XR(Array.from(J),Q,$)},decode:(J)=>{return Y1("radix.decode",J),Uint8Array.from(XR(J,$,Q))}}}function m8($,Q=!1){if(tY($),$<=0||$>32)throw Error("radix2: bits should be in (0..32]");if(q5(8,$)>32||q5($,8)>32)throw Error("radix2: carry overflow");return{encode:(J)=>{if(!W5(J))throw Error("radix2.encode input should be Uint8Array");return Q1(Array.from(J),8,$,!Q)},decode:(J)=>{return Y1("radix2.decode",J),Uint8Array.from(Q1(J,$,8,Q))}}}function YR($){return zR($),function(...Q){try{return $.apply(null,Q)}catch(J){}}}var CW0=I8(m8(4),P8("0123456789ABCDEF"),T8("")),IW0=I8(m8(5),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),z5(5),T8("")),PW0=I8(m8(5),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),T8("")),TW0=I8(m8(5),P8("0123456789ABCDEFGHIJKLMNOPQRSTUV"),z5(5),T8("")),AW0=I8(m8(5),P8("0123456789ABCDEFGHIJKLMNOPQRSTUV"),T8("")),EW0=I8(m8(5),P8("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),T8(""),VR(($)=>$.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),UR=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),xR=($,Q)=>{jQ("base64",$);let J=Q?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,X=Q?"base64url":"base64";if($.length>0&&!J.test($))throw Error("invalid base64");return Uint8Array.fromBase64($,{alphabet:X,lastChunkHandling:"strict"})},y8=UR?{encode($){return X1($),$.toBase64()},decode($){return xR($,!1)}}:I8(m8(6),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),z5(6),T8("")),kW0=I8(m8(6),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),T8("")),cW0=UR?{encode($){return X1($),$.toBase64({alphabet:"base64url"})},decode($){return xR($,!0)}}:I8(m8(6),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),z5(6),T8("")),SW0=I8(m8(6),P8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),T8("")),G1=($)=>I8(_h(58),P8($),T8("")),bW0=G1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),fW0=G1("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),mW0=G1("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var J1=I8(P8("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),T8("")),GR=[996825010,642813549,513874426,1027748829,705979059];function rY($){let Q=$>>25,J=($&33554431)<<5;for(let X=0;X<GR.length;X++)if((Q>>X&1)===1)J^=GR[X];return J}function qR($,Q,J=1){let X=$.length,Y=1;for(let G=0;G<X;G++){let q=$.charCodeAt(G);if(q<33||q>126)throw Error(`Invalid prefix (${$})`);Y=rY(Y)^q>>5}Y=rY(Y);for(let G=0;G<X;G++)Y=rY(Y)^$.charCodeAt(G)&31;for(let G of Q)Y=rY(Y)^G;for(let G=0;G<6;G++)Y=rY(Y);return Y^=J,J1.encode(Q1([Y%X5[30]],30,5,!1))}function MR($){let Q=$==="bech32"?1:734539939,J=m8(5),X=J.decode,Y=J.encode,G=YR(X);function q(U,x,M=90){if(jQ("bech32.encode prefix",U),W5(x))x=Array.from(x);Y1("bech32.encode",x);let H=U.length;if(H===0)throw TypeError(`Invalid prefix length ${H}`);let w=H+7+x.length;if(M!==!1&&w>M)throw TypeError(`Length ${w} exceeds limit ${M}`);let j=U.toLowerCase(),Z=qR(j,x,Q);return`${j}1${J1.encode(x)}${Z}`}function W(U,x=90){jQ("bech32.decode input",U);let M=U.length;if(M<8||x!==!1&&M>x)throw TypeError(`invalid string length: ${M} (${U}). Expected (8..${x})`);let H=U.toLowerCase();if(U!==H&&U!==U.toUpperCase())throw Error("String must be lowercase or uppercase");let w=H.lastIndexOf("1");if(w===0||w===-1)throw Error('Letter "1" must be present between prefix and data only');let j=H.slice(0,w),Z=H.slice(w+1);if(Z.length<6)throw Error("Data must be at least 6 characters long");let L=J1.decode(Z).slice(0,-6),D=qR(j,L,Q);if(!Z.endsWith(D))throw Error(`Invalid checksum in ${U}: expected "${D}"`);return{prefix:j,words:L}}let z=YR(W);function V(U){let{prefix:x,words:M}=W(U,!1);return{prefix:x,words:M,bytes:X(M)}}function K(U,x){return q(U,Y(x))}return{encode:q,decode:W,encodeFromBytes:K,decodeToBytes:V,decodeUnsafe:z,fromWords:X,fromWordsUnsafe:G,toWords:Y}}var LQ=MR("bech32"),yW0=MR("bech32m");var Nh=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),vh={encode($){return X1($),$.toHex()},decode($){return jQ("hex",$),Uint8Array.fromHex($)}},hW0=Nh?vh:I8(m8(4),P8("0123456789abcdef"),T8(""),VR(($)=>{if(typeof $!=="string"||$.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof $} with length ${$.length}`);return $.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Oh($){return $ instanceof Uint8Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint8Array"}function V5($){if(typeof $!=="boolean")throw Error(`boolean expected, not ${$}`)}function eY($){if(!Number.isSafeInteger($)||$<0)throw Error("positive integer expected, got "+$)}function c0($,Q,J=""){let X=Oh($),Y=$?.length,G=Q!==void 0;if(!X||G&&Y!==Q){let q=J&&`"${J}" `,W=G?` of length ${Q}`:"",z=X?`length=${Y}`:`type=${typeof $}`;throw Error(q+"expected Uint8Array"+W+", got "+z)}return $}function q1($,Q=!0){if($.destroyed)throw Error("Hash instance has been destroyed");if(Q&&$.finished)throw Error("Hash#digest() has already been called")}function HR($,Q){c0($,void 0,"output");let J=Q.outputLen;if($.length<J)throw Error("digestInto() expects output buffer of length at least "+J)}function l0($){return new Uint32Array($.buffer,$.byteOffset,Math.floor($.byteLength/4))}function Q8(...$){for(let Q=0;Q<$.length;Q++)$[Q].fill(0)}function BR($){return new DataView($.buffer,$.byteOffset,$.byteLength)}var Fh=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function ZR($,Q){return $.buffer===Q.buffer&&$.byteOffset<Q.byteOffset+Q.byteLength&&Q.byteOffset<$.byteOffset+$.byteLength}function W1($,Q){if(ZR($,Q)&&$.byteOffset<Q.byteOffset)throw Error("complex overlap of input and output is not supported")}function wR($,Q){if(Q==null||typeof Q!=="object")throw Error("options must be defined");return Object.assign($,Q)}function $7($,Q){if($.length!==Q.length)return!1;let J=0;for(let X=0;X<$.length;X++)J|=$[X]^Q[X];return J===0}var Q7=($,Q)=>{function J(X,...Y){if(c0(X,void 0,"key"),!Fh)throw Error("Non little-endian hardware is not yet supported");if($.nonceLength!==void 0){let K=Y[0];c0(K,$.varSizeNonce?void 0:$.nonceLength,"nonce")}let G=$.tagLength;if(G&&Y[1]!==void 0)c0(Y[1],void 0,"AAD");let q=Q(X,...Y),W=(K,U)=>{if(U!==void 0){if(K!==2)throw Error("cipher output not supported");c0(U,void 0,"output")}},z=!1;return{encrypt(K,U){if(z)throw Error("cannot encrypt() twice with same key + nonce");return z=!0,c0(K),W(q.encrypt.length,U),q.encrypt(K,U)},decrypt(K,U){if(c0(K),G&&K.length<G)throw Error('"ciphertext" expected length bigger than tagLength='+G);return W(q.decrypt.length,U),q.decrypt(K,U)}}}return Object.assign(J,$),J};function vX($,Q,J=!0){if(Q===void 0)return new Uint8Array($);if(Q.length!==$)throw Error('"output" expected Uint8Array of length '+$+", got: "+Q.length);if(J&&!qJ(Q))throw Error("invalid output, must be aligned");return Q}function z1($,Q,J){V5(J);let X=new Uint8Array(16),Y=BR(X);return Y.setBigUint64(0,BigInt(Q),J),Y.setBigUint64(8,BigInt($),J),X}function qJ($){return $.byteOffset%4===0}function h8($){return Uint8Array.from($)}var a0=16;var Ih=283;function LR($){if(![16,24,32].includes($.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+$.length)}function M1($){return $<<1^Ih&-($>>7)}function OX($,Q){let J=0;for(;Q>0;Q>>=1)J^=$&-(Q&1),$=M1($);return J}var U1=(()=>{let $=new Uint8Array(256);for(let J=0,X=1;J<256;J++,X^=M1(X))$[J]=X;let Q=new Uint8Array(256);Q[0]=99;for(let J=0;J<255;J++){let X=$[255-J];X|=X<<8,Q[$[J]]=(X^X>>4^X>>5^X>>6^X>>7^99)&255}return Q8($),Q})(),Ph=U1.map(($,Q)=>U1.indexOf(Q)),Th=($)=>$<<24|$>>>8,V1=($)=>$<<8|$>>>24;function RR($,Q){if($.length!==256)throw Error("Wrong sbox length");let J=new Uint32Array(256).map((V,K)=>Q($[K])),X=J.map(V1),Y=X.map(V1),G=Y.map(V1),q=new Uint32Array(65536),W=new Uint32Array(65536),z=new Uint16Array(65536);for(let V=0;V<256;V++)for(let K=0;K<256;K++){let U=V*256+K;q[U]=J[V]^X[K],W[U]=Y[V]^G[K],z[U]=$[V]<<8|$[K]}return{sbox:$,sbox2:z,T0:J,T1:X,T2:Y,T3:G,T01:q,T23:W}}var H1=RR(U1,($)=>OX($,3)<<24|$<<16|$<<8|OX($,2)),DR=RR(Ph,($)=>OX($,11)<<24|OX($,13)<<16|OX($,9)<<8|OX($,14)),Ah=(()=>{let $=new Uint8Array(16);for(let Q=0,J=1;Q<16;Q++,J=M1(J))$[Q]=J;return $})();function B1($){c0($);let Q=$.length;LR($);let{sbox2:J}=H1,X=[];if(!qJ($))X.push($=h8($));let Y=l0($),G=Y.length,q=(z)=>j$(J,z,z,z,z),W=new Uint32Array(Q+28);W.set(Y);for(let z=G;z<W.length;z++){let V=W[z-1];if(z%G===0)V=q(Th(V))^Ah[z/G-1];else if(G>6&&z%G===4)V=q(V);W[z]=W[z-G]^V}return Q8(...X),W}function Eh($){let Q=B1($),J=Q.slice(),X=Q.length,{sbox2:Y}=H1,{T0:G,T1:q,T2:W,T3:z}=DR;for(let V=0;V<X;V+=4)for(let K=0;K<4;K++)J[V+K]=Q[X-V-4+K];Q8(Q);for(let V=4;V<X-4;V++){let K=J[V],U=j$(Y,K,K,K,K);J[V]=G[U&255]^q[U>>>8&255]^W[U>>>16&255]^z[U>>>24]}return J}function RQ($,Q,J,X,Y,G){return $[J<<8&65280|X>>>8&255]^Q[Y>>>8&65280|G>>>24&255]}function j$($,Q,J,X,Y){return $[Q&255|J&65280]|$[X>>>16&255|Y>>>16&65280]<<16}function x1($,Q,J,X,Y){let{sbox2:G,T01:q,T23:W}=H1,z=0;Q^=$[z++],J^=$[z++],X^=$[z++],Y^=$[z++];let V=$.length/4-2;for(let H=0;H<V;H++){let w=$[z++]^RQ(q,W,Q,J,X,Y),j=$[z++]^RQ(q,W,J,X,Y,Q),Z=$[z++]^RQ(q,W,X,Y,Q,J),L=$[z++]^RQ(q,W,Y,Q,J,X);Q=w,J=j,X=Z,Y=L}let K=$[z++]^j$(G,Q,J,X,Y),U=$[z++]^j$(G,J,X,Y,Q),x=$[z++]^j$(G,X,Y,Q,J),M=$[z++]^j$(G,Y,Q,J,X);return{s0:K,s1:U,s2:x,s3:M}}function kh($,Q,J,X,Y){let{sbox2:G,T01:q,T23:W}=DR,z=0;Q^=$[z++],J^=$[z++],X^=$[z++],Y^=$[z++];let V=$.length/4-2;for(let H=0;H<V;H++){let w=$[z++]^RQ(q,W,Q,Y,X,J),j=$[z++]^RQ(q,W,J,Q,Y,X),Z=$[z++]^RQ(q,W,X,J,Q,Y),L=$[z++]^RQ(q,W,Y,X,J,Q);Q=w,J=j,X=Z,Y=L}let K=$[z++]^j$(G,Q,Y,X,J),U=$[z++]^j$(G,J,Q,Y,X),x=$[z++]^j$(G,X,J,Q,Y),M=$[z++]^j$(G,Y,X,J,Q);return{s0:K,s1:U,s2:x,s3:M}}function ch($){if(c0($),$.length%a0!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+a0)}function Sh($,Q,J){c0($);let X=$.length,Y=X%a0;if(!Q&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!qJ($))$=h8($);let G=l0($);if(Q){let W=a0-Y;if(!W)W=a0;X=X+W}J=vX(X,J),W1($,J);let q=l0(J);return{b:G,o:q,out:J}}function bh($,Q){if(!Q)return $;let J=$.length;if(!J)throw Error("aes/pcks5: empty ciphertext not allowed");let X=$[J-1];if(X<=0||X>16)throw Error("aes/pcks5: wrong padding");let Y=$.subarray(0,-X);for(let G=0;G<X;G++)if($[J-G-1]!==X)throw Error("aes/pcks5: wrong padding");return Y}function fh($){let Q=new Uint8Array(16),J=l0(Q);Q.set($);let X=a0-$.length;for(let Y=a0-X;Y<a0;Y++)Q[Y]=X;return J}var Z1=Q7({blockSize:16,nonceLength:16},function(Q,J,X={}){let Y=!X.disablePadding;return{encrypt(G,q){let W=B1(Q),{b:z,o:V,out:K}=Sh(G,Y,q),U=J,x=[W];if(!qJ(U))x.push(U=h8(U));let M=l0(U),H=M[0],w=M[1],j=M[2],Z=M[3],L=0;for(;L+4<=z.length;)H^=z[L+0],w^=z[L+1],j^=z[L+2],Z^=z[L+3],{s0:H,s1:w,s2:j,s3:Z}=x1(W,H,w,j,Z),V[L++]=H,V[L++]=w,V[L++]=j,V[L++]=Z;if(Y){let D=fh(G.subarray(L*4));H^=D[0],w^=D[1],j^=D[2],Z^=D[3],{s0:H,s1:w,s2:j,s3:Z}=x1(W,H,w,j,Z),V[L++]=H,V[L++]=w,V[L++]=j,V[L++]=Z}return Q8(...x),K},decrypt(G,q){ch(G);let W=Eh(Q),z=J,V=[W];if(!qJ(z))V.push(z=h8(z));let K=l0(z);if(q=vX(G.length,q),!qJ(G))V.push(G=h8(G));W1(G,q);let U=l0(G),x=l0(q),M=K[0],H=K[1],w=K[2],j=K[3];for(let Z=0;Z+4<=U.length;){let L=M,D=H,F=w,J0=j;M=U[Z+0],H=U[Z+1],w=U[Z+2],j=U[Z+3];let{s0:n,s1:e,s2:y,s3:p}=kh(W,M,H,w,j);x[Z++]=n^L,x[Z++]=e^D,x[Z++]=y^F,x[Z++]=p^J0}return Q8(...V),bh(q,Y)}}});function mh($){return $ instanceof Uint32Array||ArrayBuffer.isView($)&&$.constructor.name==="Uint32Array"}function K1($,Q){if(c0(Q,16,"block"),!mh($))throw Error("_encryptBlock accepts result of expandKeyLE");let J=l0(Q),{s0:X,s1:Y,s2:G,s3:q}=x1($,J[0],J[1],J[2],J[3]);return J[0]=X,J[1]=Y,J[2]=G,J[3]=q,Q}function jR($){let Q=0;for(let J=a0-1;J>=0;J--){let X=($[J]&128)>>>7;$[J]=$[J]<<1|Q,Q=X}if(Q)$[a0-1]^=135;return $}function K5($,Q){if($.length!==Q.length)throw Error("xorBlock: blocks must have same length");for(let J=0;J<$.length;J++)$[J]=$[J]^Q[J];return $}class w1{buffer;destroyed;k1;k2;xk;constructor($){c0($),LR($),this.xk=B1($),this.buffer=new Uint8Array(0),this.destroyed=!1;let Q=new Uint8Array(a0);K1(this.xk,Q),this.k1=jR(Q),this.k2=jR(new Uint8Array(this.k1))}update($){let{destroyed:Q,buffer:J}=this;if(Q)throw Error("CMAC instance was destroyed");c0($);let X=new Uint8Array(J.length+$.length);return X.set(J),X.set($,J.length),this.buffer=X,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:$}=this,Q=$.length,J=Math.ceil(Q/a0),X;if(J===0)J=1,X=!1;else X=Q%a0===0;let Y=(J-1)*a0,G=$.subarray(Y),q;if(X)q=K5(new Uint8Array(G),this.k1);else{let z=new Uint8Array(a0);z.set(G),z[G.length]=128,q=K5(z,this.k2)}let W=new Uint8Array(a0);for(let z=0;z<J-1;z++){let V=$.subarray(z*a0,(z+1)*a0);K5(W,V),K1(this.xk,W)}return K5(W,q),K1(this.xk,W),Q8(q),W}destroy(){let{buffer:$,destroyed:Q,xk:J,k1:X,k2:Y}=this;if(Q)return;this.destroyed=!0,Q8($,J,X,Y)}}var yh=($,Q)=>new w1($).update(Q).digest();yh.create=($)=>new w1($);var NR=($)=>Uint8Array.from($.split(""),(Q)=>Q.charCodeAt(0)),hh=NR("expand 16-byte k"),ph=NR("expand 32-byte k"),uh=l0(hh),gh=l0(ph);function d($,Q){return $<<Q|$>>>32-Q}function j1($){return $.byteOffset%4===0}var U5=64,lh=16,vR=4294967295,_R=Uint32Array.of();function ih($,Q,J,X,Y,G,q,W){let z=Y.length,V=new Uint8Array(U5),K=l0(V),U=j1(Y)&&j1(G),x=U?l0(Y):_R,M=U?l0(G):_R;for(let H=0;H<z;q++){if($(Q,J,X,K,q,W),q>=vR)throw Error("arx: counter overflow");let w=Math.min(U5,z-H);if(U&&w===U5){let j=H/4;if(H%4!==0)throw Error("arx: invalid block position");for(let Z=0,L;Z<lh;Z++)L=j+Z,M[L]=x[L]^K[Z];H+=U5;continue}for(let j=0,Z;j<w;j++)Z=H+j,G[Z]=Y[Z]^V[j];H+=w}}function L1($,Q){let{allowShortKeys:J,extendNonceFn:X,counterLength:Y,counterRight:G,rounds:q}=wR({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},Q);if(typeof $!=="function")throw Error("core must be a function");return eY(Y),eY(q),V5(G),V5(J),(W,z,V,K,U=0)=>{c0(W,void 0,"key"),c0(z,void 0,"nonce"),c0(V,void 0,"data");let x=V.length;if(K===void 0)K=new Uint8Array(x);if(c0(K,void 0,"output"),eY(U),U<0||U>=vR)throw Error("arx: counter overflow");if(K.length<x)throw Error(`arx: output (${K.length}) is shorter than data (${x})`);let M=[],H=W.length,w,j;if(H===32)M.push(w=h8(W)),j=gh;else if(H===16&&J)w=new Uint8Array(32),w.set(W),w.set(W,16),j=uh,M.push(w);else throw c0(W,32,"arx key"),Error("invalid key size");if(!j1(z))M.push(z=h8(z));let Z=l0(w);if(X){if(z.length!==24)throw Error("arx: extended nonce must be 24 bytes");X(j,Z,l0(z.subarray(0,16)),Z),z=z.subarray(16)}let L=16-Y;if(L!==z.length)throw Error(`arx: nonce must be ${L} or 16 bytes`);if(L!==12){let F=new Uint8Array(12);F.set(z,G?0:12-z.length),z=F,M.push(z)}let D=l0(z);return ih($,j,Z,D,V,K,U,q),Q8(...M),K}}function J8($,Q){return $[Q++]&255|($[Q++]&255)<<8}class OR{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor($){$=h8(c0($,32,"key"));let Q=J8($,0),J=J8($,2),X=J8($,4),Y=J8($,6),G=J8($,8),q=J8($,10),W=J8($,12),z=J8($,14);this.r[0]=Q&8191,this.r[1]=(Q>>>13|J<<3)&8191,this.r[2]=(J>>>10|X<<6)&7939,this.r[3]=(X>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|G<<12)&255,this.r[5]=G>>>1&8190,this.r[6]=(G>>>14|q<<2)&8191,this.r[7]=(q>>>11|W<<5)&8065,this.r[8]=(W>>>8|z<<8)&8191,this.r[9]=z>>>5&127;for(let V=0;V<8;V++)this.pad[V]=J8($,16+2*V)}process($,Q,J=!1){let X=J?0:2048,{h:Y,r:G}=this,q=G[0],W=G[1],z=G[2],V=G[3],K=G[4],U=G[5],x=G[6],M=G[7],H=G[8],w=G[9],j=J8($,Q+0),Z=J8($,Q+2),L=J8($,Q+4),D=J8($,Q+6),F=J8($,Q+8),J0=J8($,Q+10),n=J8($,Q+12),e=J8($,Q+14),y=Y[0]+(j&8191),p=Y[1]+((j>>>13|Z<<3)&8191),q0=Y[2]+((Z>>>10|L<<6)&8191),t=Y[3]+((L>>>7|D<<9)&8191),N=Y[4]+((D>>>4|F<<12)&8191),c=Y[5]+(F>>>1&8191),_=Y[6]+((F>>>14|J0<<2)&8191),C=Y[7]+((J0>>>11|n<<5)&8191),E=Y[8]+((n>>>8|e<<8)&8191),T=Y[9]+(e>>>5|X),v=0,k=v+y*q+p*(5*w)+q0*(5*H)+t*(5*M)+N*(5*x);v=k>>>13,k&=8191,k+=c*(5*U)+_*(5*K)+C*(5*V)+E*(5*z)+T*(5*W),v+=k>>>13,k&=8191;let f=v+y*W+p*q+q0*(5*w)+t*(5*H)+N*(5*M);v=f>>>13,f&=8191,f+=c*(5*x)+_*(5*U)+C*(5*K)+E*(5*V)+T*(5*z),v+=f>>>13,f&=8191;let S=v+y*z+p*W+q0*q+t*(5*w)+N*(5*H);v=S>>>13,S&=8191,S+=c*(5*M)+_*(5*x)+C*(5*U)+E*(5*K)+T*(5*V),v+=S>>>13,S&=8191;let $0=v+y*V+p*z+q0*W+t*q+N*(5*w);v=$0>>>13,$0&=8191,$0+=c*(5*H)+_*(5*M)+C*(5*x)+E*(5*U)+T*(5*K),v+=$0>>>13,$0&=8191;let W0=v+y*K+p*V+q0*z+t*W+N*q;v=W0>>>13,W0&=8191,W0+=c*(5*w)+_*(5*H)+C*(5*M)+E*(5*x)+T*(5*U),v+=W0>>>13,W0&=8191;let X0=v+y*U+p*K+q0*V+t*z+N*W;v=X0>>>13,X0&=8191,X0+=c*q+_*(5*w)+C*(5*H)+E*(5*M)+T*(5*x),v+=X0>>>13,X0&=8191;let C0=v+y*x+p*U+q0*K+t*V+N*z;v=C0>>>13,C0&=8191,C0+=c*W+_*q+C*(5*w)+E*(5*H)+T*(5*M),v+=C0>>>13,C0&=8191;let o=v+y*M+p*x+q0*U+t*K+N*V;v=o>>>13,o&=8191,o+=c*z+_*W+C*q+E*(5*w)+T*(5*H),v+=o>>>13,o&=8191;let v0=v+y*H+p*M+q0*x+t*U+N*K;v=v0>>>13,v0&=8191,v0+=c*V+_*z+C*W+E*q+T*(5*w),v+=v0>>>13,v0&=8191;let D0=v+y*w+p*H+q0*M+t*x+N*U;v=D0>>>13,D0&=8191,D0+=c*K+_*V+C*z+E*W+T*q,v+=D0>>>13,D0&=8191,v=(v<<2)+v|0,v=v+k|0,k=v&8191,v=v>>>13,f+=v,Y[0]=k,Y[1]=f,Y[2]=S,Y[3]=$0,Y[4]=W0,Y[5]=X0,Y[6]=C0,Y[7]=o,Y[8]=v0,Y[9]=D0}finalize(){let{h:$,pad:Q}=this,J=new Uint16Array(10),X=$[1]>>>13;$[1]&=8191;for(let q=2;q<10;q++)$[q]+=X,X=$[q]>>>13,$[q]&=8191;$[0]+=X*5,X=$[0]>>>13,$[0]&=8191,$[1]+=X,X=$[1]>>>13,$[1]&=8191,$[2]+=X,J[0]=$[0]+5,X=J[0]>>>13,J[0]&=8191;for(let q=1;q<10;q++)J[q]=$[q]+X,X=J[q]>>>13,J[q]&=8191;J[9]-=8192;let Y=(X^1)-1;for(let q=0;q<10;q++)J[q]&=Y;Y=~Y;for(let q=0;q<10;q++)$[q]=$[q]&Y|J[q];$[0]=($[0]|$[1]<<13)&65535,$[1]=($[1]>>>3|$[2]<<10)&65535,$[2]=($[2]>>>6|$[3]<<7)&65535,$[3]=($[3]>>>9|$[4]<<4)&65535,$[4]=($[4]>>>12|$[5]<<1|$[6]<<14)&65535,$[5]=($[6]>>>2|$[7]<<11)&65535,$[6]=($[7]>>>5|$[8]<<8)&65535,$[7]=($[8]>>>8|$[9]<<5)&65535;let G=$[0]+Q[0];$[0]=G&65535;for(let q=1;q<8;q++)G=($[q]+Q[q]|0)+(G>>>16)|0,$[q]=G&65535;Q8(J)}update($){q1(this),c0($),$=h8($);let{buffer:Q,blockLen:J}=this,X=$.length;for(let Y=0;Y<X;){let G=Math.min(J-this.pos,X-Y);if(G===J){for(;J<=X-Y;Y+=J)this.process($,Y);continue}if(Q.set($.subarray(Y,Y+G),this.pos),this.pos+=G,Y+=G,this.pos===J)this.process(Q,0,!1),this.pos=0}return this}destroy(){Q8(this.h,this.r,this.buffer,this.pad)}digestInto($){q1(this),HR($,this),this.finished=!0;let{buffer:Q,h:J}=this,{pos:X}=this;if(X){Q[X++]=1;for(;X<16;X++)Q[X]=0;this.process(Q,0,!0)}this.finalize();let Y=0;for(let G=0;G<8;G++)$[Y++]=J[G]>>>0,$[Y++]=J[G]>>>8;return $}digest(){let{buffer:$,outputLen:Q}=this;this.digestInto($);let J=$.slice(0,Q);return this.destroy(),J}}function nh($){let Q=(X,Y)=>$(Y).update(X).digest(),J=$(new Uint8Array(32));return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(X)=>$(X),Q}var FR=(()=>nh(($)=>new OR($)))();function PR($,Q,J,X,Y,G=20){let q=$[0],W=$[1],z=$[2],V=$[3],K=Q[0],U=Q[1],x=Q[2],M=Q[3],H=Q[4],w=Q[5],j=Q[6],Z=Q[7],L=Y,D=J[0],F=J[1],J0=J[2],n=q,e=W,y=z,p=V,q0=K,t=U,N=x,c=M,_=H,C=w,E=j,T=Z,v=L,k=D,f=F,S=J0;for(let W0=0;W0<G;W0+=2)n=n+q0|0,v=d(v^n,16),_=_+v|0,q0=d(q0^_,12),n=n+q0|0,v=d(v^n,8),_=_+v|0,q0=d(q0^_,7),e=e+t|0,k=d(k^e,16),C=C+k|0,t=d(t^C,12),e=e+t|0,k=d(k^e,8),C=C+k|0,t=d(t^C,7),y=y+N|0,f=d(f^y,16),E=E+f|0,N=d(N^E,12),y=y+N|0,f=d(f^y,8),E=E+f|0,N=d(N^E,7),p=p+c|0,S=d(S^p,16),T=T+S|0,c=d(c^T,12),p=p+c|0,S=d(S^p,8),T=T+S|0,c=d(c^T,7),n=n+t|0,S=d(S^n,16),E=E+S|0,t=d(t^E,12),n=n+t|0,S=d(S^n,8),E=E+S|0,t=d(t^E,7),e=e+N|0,v=d(v^e,16),T=T+v|0,N=d(N^T,12),e=e+N|0,v=d(v^e,8),T=T+v|0,N=d(N^T,7),y=y+c|0,k=d(k^y,16),_=_+k|0,c=d(c^_,12),y=y+c|0,k=d(k^y,8),_=_+k|0,c=d(c^_,7),p=p+q0|0,f=d(f^p,16),C=C+f|0,q0=d(q0^C,12),p=p+q0|0,f=d(f^p,8),C=C+f|0,q0=d(q0^C,7);let $0=0;X[$0++]=q+n|0,X[$0++]=W+e|0,X[$0++]=z+y|0,X[$0++]=V+p|0,X[$0++]=K+q0|0,X[$0++]=U+t|0,X[$0++]=x+N|0,X[$0++]=M+c|0,X[$0++]=H+_|0,X[$0++]=w+C|0,X[$0++]=j+E|0,X[$0++]=Z+T|0,X[$0++]=L+v|0,X[$0++]=D+k|0,X[$0++]=F+f|0,X[$0++]=J0+S|0}function dh($,Q,J,X){let Y=$[0],G=$[1],q=$[2],W=$[3],z=Q[0],V=Q[1],K=Q[2],U=Q[3],x=Q[4],M=Q[5],H=Q[6],w=Q[7],j=J[0],Z=J[1],L=J[2],D=J[3];for(let J0=0;J0<20;J0+=2)Y=Y+z|0,j=d(j^Y,16),x=x+j|0,z=d(z^x,12),Y=Y+z|0,j=d(j^Y,8),x=x+j|0,z=d(z^x,7),G=G+V|0,Z=d(Z^G,16),M=M+Z|0,V=d(V^M,12),G=G+V|0,Z=d(Z^G,8),M=M+Z|0,V=d(V^M,7),q=q+K|0,L=d(L^q,16),H=H+L|0,K=d(K^H,12),q=q+K|0,L=d(L^q,8),H=H+L|0,K=d(K^H,7),W=W+U|0,D=d(D^W,16),w=w+D|0,U=d(U^w,12),W=W+U|0,D=d(D^W,8),w=w+D|0,U=d(U^w,7),Y=Y+V|0,D=d(D^Y,16),H=H+D|0,V=d(V^H,12),Y=Y+V|0,D=d(D^Y,8),H=H+D|0,V=d(V^H,7),G=G+K|0,j=d(j^G,16),w=w+j|0,K=d(K^w,12),G=G+K|0,j=d(j^G,8),w=w+j|0,K=d(K^w,7),q=q+U|0,Z=d(Z^q,16),x=x+Z|0,U=d(U^x,12),q=q+U|0,Z=d(Z^q,8),x=x+Z|0,U=d(U^x,7),W=W+z|0,L=d(L^W,16),M=M+L|0,z=d(z^M,12),W=W+z|0,L=d(L^W,8),M=M+L|0,z=d(z^M,7);let F=0;X[F++]=Y,X[F++]=G,X[F++]=q,X[F++]=W,X[F++]=j,X[F++]=Z,X[F++]=L,X[F++]=D}var x5=L1(PR,{counterRight:!1,counterLength:4,allowShortKeys:!1}),ah=L1(PR,{counterRight:!1,counterLength:8,extendNonceFn:dh,allowShortKeys:!1});var oh=new Uint8Array(16),CR=($,Q)=>{$.update(Q);let J=Q.length%16;if(J)$.update(oh.subarray(J))},sh=new Uint8Array(32);function IR($,Q,J,X,Y){if(Y!==void 0)c0(Y,void 0,"AAD");let G=$(Q,J,sh),q=z1(X.length,Y?Y.length:0,!0),W=FR.create(G);if(Y)CR(W,Y);CR(W,X),W.update(q);let z=W.digest();return Q8(G,q),z}var TR=($)=>(Q,J,X)=>{return{encrypt(G,q){let W=G.length;q=vX(W+16,q,!1),q.set(G);let z=q.subarray(0,-16);$(Q,J,z,z,1);let V=IR($,Q,J,z,X);return q.set(V,W),Q8(V),q},decrypt(G,q){q=vX(G.length-16,q,!1);let W=G.subarray(0,-16),z=G.subarray(-16),V=IR($,Q,J,W,X);if(!$7(z,V))throw Error("invalid tag");return q.set(G.subarray(0,-16)),$(Q,J,q,q,1),Q8(V),q}}},Yz0=Q7({blockSize:64,nonceLength:12,tagLength:16},TR(x5)),Gz0=Q7({blockSize:64,nonceLength:24,tagLength:16},TR(ah));function ER($,Q,J){if($J($),J===void 0)J=new Uint8Array($.outputLen);return ZQ($,J,Q)}var R1=Uint8Array.of(0),AR=Uint8Array.of();function kR($,Q,J,X=32){$J($),f8(X,"length");let Y=$.outputLen;if(X>255*Y)throw Error("Length must be <= 255*HashLen");let G=Math.ceil(X/Y);if(J===void 0)J=AR;else R0(J,void 0,"info");let q=new Uint8Array(G*Y),W=ZQ.create($,Q),z=W._cloneInto(),V=new Uint8Array(W.outputLen);for(let K=0;K<G;K++)R1[0]=K+1,z.update(K===0?AR:V).update(J).update(R1).digestInto(V),q.set(V,Y*K),W._cloneInto(z);return W.destroy(),z.destroy(),Y$(V,R1),q.slice(0,X)}var rh=Object.defineProperty,k0=($,Q)=>{for(var J in Q)rh($,J,{get:Q[J],enumerable:!0})},th={};k0(th,{binarySearch:()=>C1,bytesToHex:()=>F0,hexToBytes:()=>P0,insertEventIntoAscendingList:()=>$p,insertEventIntoDescendingList:()=>eh,isHex32:()=>w8,mergeReverseSortedLists:()=>Qp,normalizeURL:()=>yR,utf8Decoder:()=>u$,utf8Encoder:()=>p8});var u$=new TextDecoder("utf-8"),p8=new TextEncoder;function yR($){try{if($.indexOf("://")===-1)$="wss://"+$;let Q=new URL($);if(Q.protocol==="http:")Q.protocol="ws:";else if(Q.protocol==="https:")Q.protocol="wss:";if(Q.pathname=Q.pathname.replace(/\/+/g,"/"),Q.pathname.endsWith("/"))Q.pathname=Q.pathname.slice(0,-1);if(Q.port==="80"&&Q.protocol==="ws:"||Q.port==="443"&&Q.protocol==="wss:")Q.port="";return Q.searchParams.sort(),Q.hash="",Q.toString()}catch(Q){throw Error(`Invalid URL: ${$}`)}}function eh($,Q){let[J,X]=C1($,(Y)=>{if(Q.id===Y.id)return 0;if(Q.created_at===Y.created_at)return-1;return Y.created_at-Q.created_at});if(!X)$.splice(J,0,Q);return $}function $p($,Q){let[J,X]=C1($,(Y)=>{if(Q.id===Y.id)return 0;if(Q.created_at===Y.created_at)return-1;return Q.created_at-Y.created_at});if(!X)$.splice(J,0,Q);return $}function C1($,Q){let J=0,X=$.length-1;while(J<=X){let Y=Math.floor((J+X)/2),G=Q($[Y]);if(G===0)return[Y,!0];if(G<0)X=Y-1;else J=Y+1}return[J,!1]}function Qp($,Q){let J=Array($.length+Q.length);J.length=0;let X=0,Y=0,G=[];while(X<$.length&&Y<Q.length){let q;if($[X]?.created_at>Q[Y]?.created_at)q=$[X],X++;else q=Q[Y],Y++;if(J.length>0&&J[J.length-1].created_at===q.created_at){if(G.includes(q.id))continue}else G.length=0;J.push(q),G.push(q.id)}while(X<$.length){let q=$[X];if(X++,J.length>0&&J[J.length-1].created_at===q.created_at){if(G.includes(q.id))continue}else G.length=0;J.push(q),G.push(q.id)}while(Y<Q.length){let q=Q[Y];if(Y++,J.length>0&&J[J.length-1].created_at===q.created_at){if(G.includes(q.id))continue}else G.length=0;J.push(q),G.push(q.id)}return J}function w8($){for(let Q=0;Q<64;Q++){let J=$.charCodeAt(Q);if(isNaN(J)||J<48||J>102||J>57&&J<97)return!1}return!0}var FX=Symbol("verified"),Jp=($)=>$ instanceof Object;function I1($){if(!Jp($))return!1;if(typeof $.kind!=="number")return!1;if(typeof $.content!=="string")return!1;if(typeof $.created_at!=="number")return!1;if(typeof $.pubkey!=="string")return!1;if(!w8($.pubkey))return!1;if(!Array.isArray($.tags))return!1;for(let Q=0;Q<$.tags.length;Q++){let J=$.tags[Q];if(!Array.isArray(J))return!1;for(let X=0;X<J.length;X++)if(typeof J[X]!=="string")return!1}return!0}var Xp=class{generateSecretKey(){return NX.utils.randomSecretKey()}getPublicKey($){return F0(NX.getPublicKey($))}finalizeEvent($,Q){let J=$;return J.pubkey=F0(NX.getPublicKey(Q)),J.id=H5(J),J.sig=F0(NX.sign(P0(H5(J)),Q)),J[FX]=!0,J}verifyEvent($){if(typeof $[FX]==="boolean")return $[FX];try{let Q=H5($);if(Q!==$.id)return $[FX]=!1,!1;let J=NX.verify(P0($.sig),P0(Q),P0($.pubkey));return $[FX]=J,J}catch(Q){return $[FX]=!1,!1}}};function Yp($){if(!I1($))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,$.pubkey,$.created_at,$.kind,$.tags,$.content])}function H5($){let Q=W8(p8.encode(Yp($)));return F0(Q)}var w5=new Xp,Gp=w5.generateSecretKey,J7=w5.getPublicKey,u8=w5.finalizeEvent,X7=w5.verifyEvent,qp={};k0(qp,{AIEmbeddings:()=>$u,AppCurationSet:()=>Sg,Application:()=>kg,AuthoredPodcasts:()=>$g,BadgeAward:()=>Hp,BadgeDefinition:()=>Dg,Bid:()=>Pp,BidConfirmation:()=>Tp,BlobsAuth:()=>xg,BlockedRelaysList:()=>bu,BlossomServerList:()=>ou,BookmarkList:()=>ku,Bookmarksets:()=>Zg,Calendar:()=>tg,CalendarEventRSVP:()=>eg,CashuMintAnnouncement:()=>Kl,CashuWalletEvent:()=>zg,CashuWalletHistory:()=>xu,CashuWalletTokens:()=>Uu,ChannelCreation:()=>iR,ChannelHideMessage:()=>aR,ChannelMessage:()=>dR,ChannelMetadata:()=>nR,ChannelMuteUser:()=>oR,ChatMessage:()=>Bp,Chess:()=>Fp,ClassifiedListing:()=>pg,ClientAuth:()=>rR,CodeSnippet:()=>yp,CoinjoinPool:()=>Xu,Comment:()=>cp,CommunitiesList:()=>cu,CommunityDefinition:()=>ql,CommunityPostApproval:()=>qu,ConferenceEvent:()=>mg,Contacts:()=>Up,CreateOrUpdateProduct:()=>vg,CreateOrUpdateStall:()=>Ng,CuratedVideoSets:()=>jg,Curationsets:()=>wg,Date:()=>sg,DecoupledEncryptionKeyDistribution:()=>Gu,DecoupledKeyAnnouncement:()=>nu,DecoupledKeyClientAnnouncement:()=>Yu,DirectMessageRelaysList:()=>du,DraftClassifiedListing:()=>ug,DraftEvent:()=>dg,DraftLong:()=>Ig,Emojisets:()=>Pg,EncryptedDirectMessage:()=>xp,EventDeletion:()=>Mp,FavoriteFollowSets:()=>lu,FavoritePodcasts:()=>au,FavoriteRelays:()=>yu,FedimintAnnouncement:()=>Ul,Feed:()=>og,FileMessage:()=>Lp,FileMetadata:()=>Ep,FileServerPreference:()=>su,Followsets:()=>Mg,ForumThread:()=>wp,GenericRepost:()=>k1,Genericlists:()=>Hg,GeocacheListing:()=>zl,GeocacheLog:()=>Mu,GeocacheLogEntry:()=>Vl,GeocacheProofOfFind:()=>Hu,GiftWrap:()=>sR,GitPullRequest:()=>pp,GitPullRequestUpdate:()=>up,GoodWikiAuthorList:()=>ru,GoodWikiRelayList:()=>tu,GroupMetadata:()=>Ml,HTTPAuth:()=>c1,Handlerinformation:()=>Jl,Handlerrecommendation:()=>Ql,Highlights:()=>Pu,InteractiveRoom:()=>fg,InterestsList:()=>pu,Interestsets:()=>_g,Issue:()=>gp,JobFeedback:()=>Vu,JobRequest:()=>Wu,JobResult:()=>zu,Label:()=>tp,LegacyNsiteFile:()=>Yl,LightningPubRPC:()=>Vg,LinkSet:()=>ag,LiveChatMessage:()=>mp,LiveEvent:()=>bg,LongFormArticle:()=>Cg,MarketplaceUI:()=>Og,MediaFollows:()=>gu,MediaStarterPacks:()=>Ll,MergeRequests:()=>Cp,Metadata:()=>Vp,ModularArticleContent:()=>Ag,ModularArticleHeader:()=>Tg,MuteSets:()=>Lg,Mutelist:()=>Tu,NWCWalletInfo:()=>qg,NWCWalletRequest:()=>tR,NWCWalletResponse:()=>Kg,NormalVideo:()=>_p,NostrConnect:()=>Ug,NsiteNamed:()=>Wl,NsiteRoot:()=>Wg,NutZap:()=>Ou,NutZapInfo:()=>uu,OpenTimestamps:()=>Ap,Patch:()=>hp,PeerToPeerOrderEvents:()=>xl,Photo:()=>Dp,Pinlist:()=>Au,PodcastEpisode:()=>Op,PodcastMetadata:()=>eu,Poll:()=>kp,PollResponse:()=>Ip,PrivateDirectMessage:()=>lR,PrivateEventRelayList:()=>hu,ProblemTracker:()=>op,ProductSoldAsAuction:()=>Fg,ProfileBadges:()=>Rg,ProxyAnnouncement:()=>Yg,PublicChatsList:()=>Su,PublicMessage:()=>vp,Reaction:()=>E1,ReactionToWebsite:()=>Rp,RecommendRelay:()=>Kp,Redirects:()=>ng,RelayDiscovery:()=>cg,RelayList:()=>Eu,RelayMonitorAnnouncement:()=>Qg,RelayReview:()=>$l,RelayReviews:()=>ep,Relaysets:()=>Bg,ReleaseArtifactSets:()=>Eg,Reply:()=>lp,Report:()=>sp,Reporting:()=>rp,RepositoryAnnouncement:()=>gg,RepositoryState:()=>lg,Repost:()=>A1,ReservedCashuWalletTokens:()=>Ku,RoomPresence:()=>Jg,Scroll:()=>bp,Seal:()=>gR,SearchRelaysList:()=>fu,ShortTextNote:()=>uR,ShortVideo:()=>Np,SimpleGroupAdmins:()=>Hl,SimpleGroupCreateGroup:()=>Lu,SimpleGroupCreateInvite:()=>Du,SimpleGroupDeleteEvent:()=>ju,SimpleGroupDeleteGroup:()=>Ru,SimpleGroupEditMetadata:()=>wu,SimpleGroupJoinRequest:()=>_u,SimpleGroupLeaveRequest:()=>Nu,SimpleGroupList:()=>mu,SimpleGroupLiveKitParticipants:()=>wl,SimpleGroupMembers:()=>Bl,SimpleGroupPutUser:()=>Bu,SimpleGroupRemoveUser:()=>Zu,SimpleGroupReply:()=>jp,SimpleGroupRoles:()=>Zl,SimpleGroupThreadedReply:()=>Zp,SlideSet:()=>hg,SoftwareApplication:()=>Xl,StarterPacks:()=>jl,StatusApplied:()=>np,StatusClosed:()=>dp,StatusDraft:()=>ap,StatusOpen:()=>ip,TidalLogin:()=>Fu,Time:()=>rg,Torrent:()=>Qu,TorrentComment:()=>Ju,TransportMethodAnnouncement:()=>Gg,UserEmojiList:()=>iu,UserGraspList:()=>Xg,UserStatuses:()=>yg,VideoViewEvent:()=>Gl,Voice:()=>Sp,VoiceComment:()=>fp,WebBookmarks:()=>Rl,WikiArticle:()=>ig,Zap:()=>Iu,ZapGoal:()=>vu,ZapRequest:()=>Cu,classifyKind:()=>Wp,isAddressableKind:()=>T1,isEphemeralKind:()=>pR,isKind:()=>zp,isRegularKind:()=>hR,isReplaceableKind:()=>P1});function hR($){return $<1e4&&$!==0&&$!==3}function P1($){return $===0||$===3||1e4<=$&&$<20000}function pR($){return 20000<=$&&$<30000}function T1($){return 30000<=$&&$<40000}function Wp($){if(hR($))return"regular";if(P1($))return"replaceable";if(pR($))return"ephemeral";if(T1($))return"parameterized";return"unknown"}function zp($,Q){let J=Q instanceof Array?Q:[Q];return I1($)&&J.includes($.kind)||!1}var Vp=0,uR=1,Kp=2,Up=3,xp=4,Mp=5,A1=6,E1=7,Hp=8,Bp=9,Zp=10,wp=11,jp=12,gR=13,lR=14,Lp=15,k1=16,Rp=17,Dp=20,_p=21,Np=22,vp=24,iR=40,nR=41,dR=42,aR=43,oR=44,Op=54,Fp=64,Cp=818,Ip=1018,Pp=1021,Tp=1022,Ap=1040,sR=1059,Ep=1063,kp=1068,cp=1111,Sp=1222,bp=1227,fp=1244,mp=1311,yp=1337,hp=1617,pp=1618,up=1619,gp=1621,lp=1622,ip=1630,np=1631,dp=1632,ap=1633,op=1971,sp=1984,rp=1984,tp=1985,ep=1986,$u=1987,Qu=2003,Ju=2004,Xu=2022,Yu=4454,Gu=4455,qu=4550,Wu=5999,zu=6999,Vu=7000,Ku=7374,Uu=7375,xu=7376,Mu=7516,Hu=7517,Bu=9000,Zu=9001,wu=9002,ju=9005,Lu=9007,Ru=9008,Du=9009,_u=9021,Nu=9022,vu=9041,Ou=9321,Fu=9467,Cu=9734,Iu=9735,Pu=9802,Tu=1e4,Au=10001,Eu=10002,ku=10003,cu=10004,Su=10005,bu=10006,fu=10007,mu=10009,yu=10012,hu=10013,pu=10015,uu=10019,gu=10020,lu=10021,iu=10030,nu=10044,du=10050,au=10054,ou=10063,su=10096,ru=10101,tu=10102,eu=10154,$g=10164,Qg=10166,Jg=10312,Xg=10317,Yg=10377,Gg=11111,qg=13194,Wg=15128,zg=17375,Vg=21000,rR=22242,tR=23194,Kg=23195,Ug=24133,xg=24242,c1=27235,Mg=30000,Hg=30001,Bg=30002,Zg=30003,wg=30004,jg=30005,Lg=30007,Rg=30008,Dg=30009,_g=30015,Ng=30017,vg=30018,Og=30019,Fg=30020,Cg=30023,Ig=30024,Pg=30030,Tg=30040,Ag=30041,Eg=30063,kg=30078,cg=30166,Sg=30267,bg=30311,fg=30312,mg=30313,yg=30315,hg=30388,pg=30402,ug=30403,gg=30617,lg=30618,ig=30818,ng=30819,dg=31234,ag=31388,og=31890,sg=31922,rg=31923,tg=31924,eg=31925,$l=31987,Ql=31989,Jl=31990,Xl=32267,Yl=34128,Gl=34237,ql=34550,Wl=35128,zl=37515,Vl=37516,Kl=38172,Ul=38173,xl=38383,Ml=39000,Hl=39001,Bl=39002,Zl=39003,wl=39004,jl=39089,Ll=39092,Rl=39701;function Dl($,Q){if($.ids&&$.ids.indexOf(Q.id)===-1)return!1;if($.kinds&&$.kinds.indexOf(Q.kind)===-1)return!1;if($.authors&&$.authors.indexOf(Q.pubkey)===-1)return!1;for(let J in $)if(J[0]==="#"){let X=J.slice(1),Y=$[`#${X}`];if(Y&&!Q.tags.find(([G,q])=>G===J.slice(1)&&Y.indexOf(q)!==-1))return!1}if($.since&&Q.created_at<$.since)return!1;if($.until&&Q.created_at>$.until)return!1;return!0}function _l($,Q){for(let J=0;J<$.length;J++)if(Dl($[J],Q))return!0;return!1}var Nl={};k0(Nl,{getHex64:()=>j5,getInt:()=>eR,getSubscriptionId:()=>$D,matchEventId:()=>vl,matchEventKind:()=>Fl,matchEventPubkey:()=>Ol});function j5($,Q){let J=Q.length+3,X=$.indexOf(`"${Q}":`)+J,Y=$.slice(X).indexOf('"')+X+1;return $.slice(Y,Y+64)}function eR($,Q){let J=Q.length,X=$.indexOf(`"${Q}":`)+J+3,Y=$.slice(X),G=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,G),10)}function $D($){let Q=$.slice(0,22).indexOf('"EVENT"');if(Q===-1)return null;let J=$.slice(Q+7+1).indexOf('"');if(J===-1)return null;let X=Q+7+1+J,Y=$.slice(X+1,80).indexOf('"');if(Y===-1)return null;let G=X+1+Y;return $.slice(X+1,G)}function vl($,Q){return Q===j5($,"id")}function Ol($,Q){return Q===j5($,"pubkey")}function Fl($,Q){return Q===eR($,"kind")}var Cl={};k0(Cl,{makeAuthEvent:()=>QD});function QD($,Q){return{kind:rR,created_at:Math.floor(Date.now()/1000),tags:[["relay",$],["challenge",Q]],content:""}}var F1=class extends Error{constructor($,Q){super(`Tried to send message '${$} on a closed connection to ${Q}.`);this.name="SendingOnClosedConnection"}},Il=class{url;_connected=!1;onclose=null;onnotice=($)=>console.debug(`NOTICE from ${this.url}: ${$}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor($,Q){if(this.url=yR($),this.verifyEvent=Q.verifyEvent,this._WebSocket=Q.websocketImplementation||WebSocket,this.enablePing=Q.enablePing,this.enableReconnect=Q.enableReconnect||!1,Q.idleTimeout)this.idleTimeout=Q.idleTimeout}static async connect($,Q){let J=new Il($,Q);return await J.connect(Q),J}closeAllSubscriptions($){for(let[Q,J]of this.openSubs)J.close($);this.openSubs.clear();for(let[Q,J]of this.openEventPublishes)J.reject(Error($));this.openEventPublishes.clear();for(let[Q,J]of this.openCountRequests)J.reject(Error($));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let $=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch(Q){}},$)}handleHardClose($){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions($)}async connect($){let Q;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((J,X)=>{if($?.timeout)Q=setTimeout(()=>{if(X("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},$.timeout);if($?.abort)$.abort.onabort=X;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout(Q),X(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout(Q),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let G of this.openSubs.values()){if(G.eosed=!1,Y){for(let q=0;q<G.filters.length;q++)if(G.lastEmitted)G.filters[q].since=G.lastEmitted+1}G.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);J()},this.ws.onerror=()=>{if(clearTimeout(Q),X("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout(Q),X(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise(($)=>{this.ws.once("pong",()=>$(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise(($,Q)=>{if(!this.connectionPromise)return Q(Error(`no connection to ${this.url}, can't ping`));try{let J=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{$(!0),J.close()},onclose(){$(!0)},eoseTimeout:this.pingTimeout+1000})}catch(J){Q(J)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise((Q)=>setTimeout(()=>Q(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send($){if(!this.connectionPromise)throw new F1($,this.url);this.connectionPromise.then(()=>{this.ws?.send($)})}async auth($){let Q=this.challenge;if(!Q)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(J,X)=>{try{let Y=await $(QD(this.url,Q)),G=setTimeout(()=>{let q=this.openEventPublishes.get(Y.id);if(q)q.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:J,reject:X,timeout:G}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish($){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=new Promise((J,X)=>{let Y=setTimeout(()=>{let G=this.openEventPublishes.get($.id);if(G)G.reject(Error("publish timed out")),this.openEventPublishes.delete($.id)},this.publishTimeout);this.openEventPublishes.set($.id,{resolve:J,reject:X,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify($)+"]")}catch(J){let X=this.openEventPublishes.get($.id);if(X)X.reject(J),this.openEventPublishes.delete($.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return Q}async count($,Q){return(await this.countWithHLL($,Q)).count}async countWithHLL($,Q){this.serial++;let J=Q?.id||"count:"+this.serial,X=new Promise((Y,G)=>{this.openCountRequests.set(J,{resolve:Y,reject:G})});try{await this.send('["COUNT","'+J+'",'+JSON.stringify($).substring(1))}catch(Y){let G=this.openCountRequests.get(J);if(G)G.reject(Y),this.openCountRequests.delete(J)}return X}subscribe($,Q){if(Q.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let J=this.prepareSubscription($,Q);if(J.fire(),Q.abort)Q.abort.onabort=()=>J.close(String(Q.abort.reason||"<aborted>"));return J}prepareSubscription($,Q){this.serial++;let J=Q.id||(Q.label?Q.label+":":"sub:")+this.serial,X=new Pl(this,J,$,Q);return this.openSubs.set(J,X),X}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage($){let Q=$.data;if(!Q)return;let J=$D(Q);if(J){let X=this.openSubs.get(J);if(!X)return;let Y=j5(Q,"id"),G=X.alreadyHaveEvent?.(Y);if(X.receivedEvent?.(this,Y),G)return}try{let X=JSON.parse(Q);switch(X[0]){case"EVENT":{let Y=this.openSubs.get(X[1]),G=X[2];if(_l(Y.filters,G)&&this.verifyEvent(G,this.url))Y.onevent(G);else Y.oninvalidevent?.(G);if(!Y.lastEmitted||Y.lastEmitted<G.created_at)Y.lastEmitted=G.created_at;return}case"COUNT":{let Y=X[1],G=X[2],q=this.openCountRequests.get(Y);if(q)q.resolve(G),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(X[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=X[1],G=X[2],q=X[3],W=this.openEventPublishes.get(Y);if(W){if(clearTimeout(W.timeout),G)W.resolve(q);else W.reject(Error(q));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=X[1],G=this.openSubs.get(Y);if(!G){let q=this.openCountRequests.get(Y);if(q)q.reject(Error(X[2])),this.openCountRequests.delete(Y);return}G.closed=!0,G.close(X[2]);return}case"NOTICE":{this.onnotice(X[1]);return}case"AUTH":{if(this.challenge=X[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof F1))throw Y});return}default:{this.openSubs.get(X[1])?.oncustom?.(X);return}}}catch(X){try{let[Y,G,q]=JSON.parse(Q);console.warn(`[nostr] relay ${this.url} error processing message:`,X,q)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,X)}return}}},Pl=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor($,Q,J,X){if(J.length===0)throw Error("subscription can't be created with zero filters");this.relay=$,this.filters=J,this.id=Q,this.alreadyHaveEvent=X.alreadyHaveEvent,this.receivedEvent=X.receivedEvent,this.eoseTimeout=X.eoseTimeout||$.baseEoseTimeout,this.oneose=X.oneose,this.onclose=X.onclose,this.oninvalidevent=X.oninvalidevent,this.onevent=X.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close($="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch(Q){if(Q instanceof F1);else throw Q}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.($)}},Tl;try{Tl=WebSocket}catch{}var Al=256,Hz0=Al*2;var El;try{El=WebSocket}catch{}var L5={};k0(L5,{BECH32_REGEX:()=>JD,Bech32MaxSize:()=>S1,NostrTypeGuard:()=>kl,decode:()=>R5,decodeNostrURI:()=>Sl,encodeBytes:()=>_5,naddrEncode:()=>pl,neventEncode:()=>hl,noteEncode:()=>ml,nprofileEncode:()=>yl,npubEncode:()=>fl,nsecEncode:()=>bl});var kl={isNProfile:($)=>/^nprofile1[a-z\d]+$/.test($||""),isNEvent:($)=>/^nevent1[a-z\d]+$/.test($||""),isNAddr:($)=>/^naddr1[a-z\d]+$/.test($||""),isNSec:($)=>/^nsec1[a-z\d]{58}$/.test($||""),isNPub:($)=>/^npub1[a-z\d]{58}$/.test($||""),isNote:($)=>/^note1[a-z\d]+$/.test($||""),isNcryptsec:($)=>/^ncryptsec1[a-z\d]+$/.test($||"")},S1=5000,JD=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function cl($){let Q=new Uint8Array(4);return Q[0]=$>>24&255,Q[1]=$>>16&255,Q[2]=$>>8&255,Q[3]=$&255,Q}function Sl($){try{if($.startsWith("nostr:"))$=$.substring(6);return R5($)}catch(Q){return{type:"invalid",data:null}}}function R5($){let{prefix:Q,words:J}=LQ.decode($,S1),X=new Uint8Array(LQ.fromWords(J));switch(Q){case"nprofile":{let Y=D1(X);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:F0(Y[0][0]),relays:Y[1]?Y[1].map((G)=>u$.decode(G)):[]}}}case"nevent":{let Y=D1(X);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:F0(Y[0][0]),relays:Y[1]?Y[1].map((G)=>u$.decode(G)):[],author:Y[2]?.[0]?F0(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(F0(Y[3][0]),16):void 0}}}case"naddr":{let Y=D1(X);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:u$.decode(Y[0][0]),pubkey:F0(Y[2][0]),kind:parseInt(F0(Y[3][0]),16),relays:Y[1]?Y[1].map((G)=>u$.decode(G)):[]}}}case"nsec":return{type:Q,data:X};case"npub":case"note":return{type:Q,data:F0(X)};default:throw Error(`unknown prefix ${Q}`)}}function D1($){let Q={},J=$;while(J.length>0){if(J.length<2)throw Error("not enough data to read TLV");let X=J[0],Y=J[1],G=J.slice(2,2+Y);if(J=J.slice(2+Y),G.length<Y)throw Error(`not enough data to read on TLV ${X}`);Q[X]=Q[X]||[],Q[X].push(G)}return Q}function bl($){return _5("nsec",$)}function fl($){return _5("npub",P0($))}function ml($){return _5("note",P0($))}function D5($,Q){let J=LQ.toWords(Q);return LQ.encode($,J,S1)}function _5($,Q){return D5($,Q)}function yl($){let Q=b1({0:[P0($.pubkey)],1:($.relays||[]).map((J)=>p8.encode(J))});return D5("nprofile",Q)}function hl($){let Q;if($.kind!==void 0)Q=cl($.kind);let J=b1({0:[P0($.id)],1:($.relays||[]).map((X)=>p8.encode(X)),2:$.author?[P0($.author)]:[],3:Q?[new Uint8Array(Q)]:[]});return D5("nevent",J)}function pl($){let Q=new ArrayBuffer(4);new DataView(Q).setUint32(0,$.kind,!1);let J=b1({0:[p8.encode($.identifier)],1:($.relays||[]).map((X)=>p8.encode(X)),2:[P0($.pubkey)],3:[new Uint8Array(Q)]});return D5("naddr",J)}function b1($){let Q=[];return Object.entries($).reverse().forEach(([J,X])=>{X.forEach((Y)=>{let G=new Uint8Array(Y.length+2);G.set([parseInt(J)],0),G.set([Y.length],1),G.set(Y,2),Q.push(G)})}),h0(...Q)}var ul={};k0(ul,{decrypt:()=>gl,encrypt:()=>XD});function XD($,Q,J){let X=$ instanceof Uint8Array?$:P0($),Y=sY.getSharedSecret(X,P0("02"+Q)),G=YD(Y),q=Uint8Array.from(q$(16)),W=p8.encode(J),z=Z1(G,q).encrypt(W),V=y8.encode(new Uint8Array(z)),K=y8.encode(new Uint8Array(q.buffer));return`${V}?iv=${K}`}function gl($,Q,J){let X=$ instanceof Uint8Array?$:P0($),[Y,G]=J.split("?iv="),q=sY.getSharedSecret(X,P0("02"+Q)),W=YD(q),z=y8.decode(G),V=y8.decode(Y),K=Z1(W,z).decrypt(V);return u$.decode(K)}function YD($){return $.slice(1,33)}var ll={};k0(ll,{NIP05_REGEX:()=>f1,isNip05:()=>il,isValid:()=>al,queryProfile:()=>GD,searchDomain:()=>dl,useFetchImplementation:()=>nl});var f1=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,il=($)=>f1.test($||""),N5;try{N5=fetch}catch($){}function nl($){N5=$}async function dl($,Q=""){try{let J=`https://${$}/.well-known/nostr.json?name=${Q}`,X=await N5(J,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");return(await X.json()).names}catch(J){return{}}}async function GD($){let Q=$.match(f1);if(!Q)return null;let[,J="_",X]=Q;try{let Y=`https://${X}/.well-known/nostr.json?name=${J}`,G=await N5(Y,{redirect:"manual"});if(G.status!==200)throw Error("Wrong response code");let q=await G.json(),W=q.names[J];return W?{pubkey:W,relays:q.relays?.[W]}:null}catch(Y){return null}}async function al($,Q){let J=await GD(Q);return J?J.pubkey===$:!1}var ol={};k0(ol,{parse:()=>sl});function sl($){let Q={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},J,X;for(let Y=$.tags.length-1;Y>=0;Y--){let G=$.tags[Y];if(G[0]==="e"&&G[1]&&w8(G[1])){let[q,W,z,V,K]=G,U={id:W,relays:z?[z]:[],author:K&&w8(K)?K:void 0};if(V==="root"){Q.root=U;continue}if(V==="reply"){Q.reply=U;continue}if(V==="mention"){Q.mentions.push(U);continue}if(!J)J=U;else X=U;Q.mentions.push(U);continue}if(G[0]==="q"&&G[1]&&w8(G[1])){let[q,W,z]=G;Q.quotes.push({id:W,relays:z?[z]:[]})}if(G[0]==="p"&&G[1]&&w8(G[1])){Q.profiles.push({pubkey:G[1],relays:G[2]?[G[2]]:[]});continue}}if(!Q.root)Q.root=X||J||Q.reply;if(!Q.reply)Q.reply=J||Q.root;return[Q.reply,Q.root].forEach((Y)=>{if(!Y)return;let G=Q.mentions.indexOf(Y);if(G!==-1)Q.mentions.splice(G,1);if(Y.author){let q=Q.profiles.find((W)=>W.pubkey===Y.author);if(q&&q.relays){if(!Y.relays)Y.relays=[];q.relays.forEach((W)=>{if(Y.relays?.indexOf(W)===-1)Y.relays.push(W)}),q.relays=Y.relays}}}),Q.mentions.forEach((Y)=>{if(Y.author){let G=Q.profiles.find((q)=>q.pubkey===Y.author);if(G&&G.relays){if(!Y.relays)Y.relays=[];G.relays.forEach((q)=>{if(Y.relays.indexOf(q)===-1)Y.relays.push(q)}),G.relays=Y.relays}}}),Q}var rl={};k0(rl,{fetchRelayInformation:()=>el,useFetchImplementation:()=>tl});var qD;try{qD=fetch}catch{}function tl($){qD=$}async function el($){return await(await fetch($.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var $i={};k0($i,{getPow:()=>Qi,minePow:()=>Xi});function Qi($){let Q=0;for(let J=0;J<64;J+=8){let X=parseInt($.substring(J,J+8),16);if(X===0)Q+=32;else{Q+=Math.clz32(X);break}}return Q}function Ji($){let Q=0;for(let J=0;J<$.length;J++){let X=$[J];if(X===0)Q+=8;else{Q+=Math.clz32(X)-24;break}}return Q}function Xi($,Q){let J=0,X=$,Y=["nonce",J.toString(),Q.toString()];X.tags.push(Y);while(!0){let G=Math.floor(new Date().getTime()/1000);if(G!==X.created_at)J=0,X.created_at=G;Y[1]=(++J).toString();let q=W8(p8.encode(JSON.stringify([0,X.pubkey,X.created_at,X.kind,X.tags,X.content])));if(Ji(q)>=Q){X.id=F0(q);break}}return X}var Yi={};k0(Yi,{unwrapEvent:()=>Bi,unwrapManyEvents:()=>Zi,wrapEvent:()=>LD,wrapManyEvents:()=>Hi});var Gi={};k0(Gi,{createRumor:()=>BD,createSeal:()=>ZD,createWrap:()=>wD,unwrapEvent:()=>i1,unwrapManyEvents:()=>jD,wrapEvent:()=>Z5,wrapManyEvents:()=>xi});var qi={};k0(qi,{decrypt:()=>l1,encrypt:()=>g1,getConversationKey:()=>p1,v2:()=>Ki});var m1=1,y1=4294967295,h1=65536;function p1($,Q){let J=sY.getSharedSecret($,P0("02"+Q)).subarray(1,33);return ER(W8,J,p8.encode("nip44-v2"))}function WD($,Q){let J=kR(W8,$,Q,76);return{chacha_key:J.subarray(0,32),chacha_nonce:J.subarray(32,44),hmac_key:J.subarray(44,76)}}function u1($){if(!Number.isSafeInteger($)||$<1)throw Error("expected positive integer");if($<=32)return 32;let Q=2**(Math.floor(Math.log2($-1))+1),J=Q<=256?32:Q/8;return J*(Math.floor(($-1)/J)+1)}function Wi($){if(!Number.isSafeInteger($)||$<m1||$>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let Q=new Uint8Array(2);return new DataView(Q.buffer).setUint16(0,$,!1),Q}function zi($){if(!Number.isSafeInteger($)||$<h1||$>y1)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,$,!1),Q}function zD($){let Q=p8.encode($),J=Q.length;if(J<m1||J>y1)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let X=J>=h1?h0(new Uint8Array([0,0]),zi(J)):Wi(J),Y=new Uint8Array(u1(J)-J);return h0(X,Q,Y)}function VD($){let Q=new DataView($.buffer,$.byteOffset,$.byteLength),J=Q.getUint16(0),X,Y;if(J===0){if(X=Q.getUint32(2),X<h1)throw Error("invalid padding");Y=6}else X=J,Y=2;let G=$.subarray(Y,Y+X);if(X<m1||X>y1||G.length!==X||$.length!==Y+u1(X))throw Error("invalid padding");return u$.decode(G)}function KD($,Q,J){if(J.length!==32)throw Error("AAD associated data must be 32 bytes");let X=h0(J,Q);return ZQ(W8,$,X)}function Vi($){if(typeof $!=="string")throw Error("payload must be a valid string");let Q=$.length;if(Q<132)throw Error("invalid payload length: "+Q);if($[0]==="#")throw Error("unknown encryption version");let J;try{J=y8.decode($)}catch(G){throw Error("invalid base64: "+G.message)}let X=J.length;if(X<99)throw Error("invalid data length: "+X);let Y=J[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:J.subarray(1,33),ciphertext:J.subarray(33,-32),mac:J.subarray(-32)}}function g1($,Q,J=q$(32)){let{chacha_key:X,chacha_nonce:Y,hmac_key:G}=WD(Q,J),q=zD($),W=x5(X,Y,q),z=KD(G,W,J);return y8.encode(h0(new Uint8Array([2]),J,W,z))}function l1($,Q){let{nonce:J,ciphertext:X,mac:Y}=Vi($),{chacha_key:G,chacha_nonce:q,hmac_key:W}=WD(Q,J),z=KD(W,X,J);if(!$7(z,Y))throw Error("invalid MAC");let V=x5(G,q,X);return VD(V)}var Ki={utils:{getConversationKey:p1,calcPaddedLen:u1,pad:zD,unpad:VD},encrypt:g1,decrypt:l1},Ui=172800,UD=()=>Math.round(Date.now()/1000),xD=()=>Math.round(UD()-Math.random()*Ui),MD=($,Q)=>p1($,Q),HD=($,Q,J)=>g1(JSON.stringify($),MD(Q,J)),cR=($,Q)=>JSON.parse(l1($.content,MD(Q,$.pubkey)));function BD($,Q){let J={created_at:UD(),content:"",tags:[],...$,pubkey:J7(Q)};return J.id=H5(J),J}function ZD($,Q,J){return u8({kind:gR,content:HD($,Q,J),created_at:xD(),tags:[]},Q)}function wD($,Q){let J=Gp();return u8({kind:sR,content:HD($,J,Q),created_at:xD(),tags:[["p",Q]]},J)}function Z5($,Q,J){let X=BD($,Q),Y=ZD(X,Q,J);return wD(Y,J)}function xi($,Q,J){if(!J||J.length===0)throw Error("At least one recipient is required.");let X=J7(Q),Y=[Z5($,Q,X)];return J.forEach((G)=>{Y.push(Z5($,Q,G))}),Y}function i1($,Q){let J=cR($,Q);return cR(J,Q)}function jD($,Q){let J=[];return $.forEach((X)=>{J.push(i1(X,Q))}),J.sort((X,Y)=>X.created_at-Y.created_at),J}function Mi($,Q,J,X){let Y={created_at:Math.ceil(Date.now()/1000),kind:lR,tags:[],content:Q};if((Array.isArray($)?$:[$]).forEach(({publicKey:q,relayUrl:W})=>{Y.tags.push(W?["p",q,W]:["p",q])}),X)Y.tags.push(["e",X.eventId,X.relayUrl||"","reply"]);if(J)Y.tags.push(["subject",J]);return Y}function LD($,Q,J,X,Y){let G=Mi(Q,J,X,Y);return Z5(G,$,Q.publicKey)}function Hi($,Q,J,X,Y){if(!Q||Q.length===0)throw Error("At least one recipient is required.");return[{publicKey:J7($)},...Q].map((q)=>LD($,q,J,X,Y))}var Bi=i1,Zi=jD,wi={};k0(wi,{finishRepostEvent:()=>ji,getRepostedEvent:()=>Li,getRepostedEventPointer:()=>RD});function ji($,Q,J,X){let Y,G=[...$.tags??[],["e",Q.id,J],["p",Q.pubkey]];if(Q.kind===uR)Y=A1;else Y=k1,G.push(["k",String(Q.kind)]);return u8({kind:Y,tags:G,content:$.content===""||Q.tags?.find((q)=>q[0]==="-")?"":JSON.stringify(Q),created_at:$.created_at},X)}function RD($){if(![A1,k1].includes($.kind))return;let Q,J;for(let X=$.tags.length-1;X>=0&&(Q===void 0||J===void 0);X--){let Y=$.tags[X];if(Y.length>=2){if(Y[0]==="e"&&Q===void 0)Q=Y;else if(Y[0]==="p"&&J===void 0)J=Y}}if(Q===void 0)return;return{id:Q[1],relays:[Q[2],J?.[2]].filter((X)=>typeof X==="string"),author:J?.[1]}}function Li($,{skipVerification:Q}={}){let J=RD($);if(J===void 0||$.content==="")return;let X;try{X=JSON.parse($.content)}catch(Y){return}if(X.id!==J.id)return;if(!Q&&!X7(X))return;return X}var Ri={};k0(Ri,{NOSTR_URI_REGEX:()=>n1,parse:()=>_i,test:()=>Di});var n1=new RegExp(`nostr:(${JD.source})`);function Di($){return typeof $==="string"&&new RegExp(`^${n1.source}$`).test($)}function _i($){let Q=$.match(new RegExp(`^${n1.source}$`));if(!Q)throw Error(`Invalid Nostr URI: ${$}`);return{uri:Q[0],value:Q[1],decoded:R5(Q[1])}}var Ni={};k0(Ni,{parse:()=>Oi});function SR($){if(!$)return;return/^\d+$/.test($)?parseInt($,10):$}function DD($,Q){let J=$.indexOf(":"),X=$.indexOf(":",J+1);if(J===-1||X===-1)return;let Y=parseInt($.slice(0,J),10);if(Number.isNaN(Y))return;let G=$.slice(J+1,X);if(!w8(G))return;return{kind:Y,pubkey:G,identifier:$.slice(X+1),relays:Q?[Q]:[]}}function bR($){switch($[0]){case"E":case"e":if(!$[1]||!w8($[1]))return;return{id:$[1],relays:$[2]?[$[2]]:[],author:$[3]&&w8($[3])?$[3]:void 0};case"A":case"a":if(!$[1])return;return DD($[1],$[2]);case"I":case"i":if(!$[1])return;return{value:$[1],hint:$[2]}}}function vi($){if(!$[1])return;if($[1].includes(":"))return DD($[1],$[2]);if(!w8($[1]))return;return{id:$[1],relays:$[2]?[$[2]]:[],author:$[3]&&w8($[3])?$[3]:void 0}}function fR($){return $.findLast((Q)=>Q.tagName==="A"||Q.tagName==="a")?.pointer||$.findLast((Q)=>Q.tagName==="I"||Q.tagName==="i")?.pointer||$.findLast((Q)=>Q.tagName==="E"||Q.tagName==="e")?.pointer}function _1($,Q){if(!$||!("id"in $)||!$.author)return;let J=Q.find((X)=>X.pubkey===$.author);if(!J||!J.relays)return;if(!$.relays)$.relays=[];J.relays.forEach((X)=>{if($.relays.indexOf(X)===-1)$.relays.push(X)}),J.relays=$.relays}function Oi($){let Q={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},J=[],X=[];for(let Y of $.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let G=bR(Y);if(G)J.push({tagName:Y[0],pointer:G});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let G=bR(Y);if(G)X.push({tagName:Y[0],pointer:G});continue}if(Y[0]==="K"){Q.rootKind=SR(Y[1]);continue}if(Y[0]==="k"){Q.replyKind=SR(Y[1]);continue}if(Y[0]==="q"){let G=vi(Y);if(G)Q.quotes.push(G);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&w8(Y[1]))Q.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return Q.root=fR(J),Q.reply=fR(X),_1(Q.root,Q.profiles),_1(Q.reply,Q.profiles),Q.quotes.forEach((Y)=>_1(Y,Q.profiles)),Q}var Fi={};k0(Fi,{finishReactionEvent:()=>Ci,getReactedEventPointer:()=>Ii});function Ci($,Q,J){let X=Q.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return u8({...$,kind:E1,tags:[...$.tags??[],...X,["e",Q.id],["p",Q.pubkey]],content:$.content??"+"},J)}function Ii($){if($.kind!==E1)return;let Q,J;for(let X=$.tags.length-1;X>=0&&(Q===void 0||J===void 0);X--){let Y=$.tags[X];if(Y.length>=2){if(Y[0]==="e"&&Q===void 0)Q=Y;else if(Y[0]==="p"&&J===void 0)J=Y}}if(Q===void 0||J===void 0)return;return{id:Q[1],relays:[Q[2],J[2]].filter((X)=>X!==void 0),author:J[1]}}var Pi={};k0(Pi,{parse:()=>Ai});var N1=/\W/m,mR=/[^\w\/] |[^\w\/]$|$|,| /m,Ti=42;function*Ai($){let Q=[];if(typeof $!=="string"){for(let G=0;G<$.tags.length;G++){let q=$.tags[G];if(q[0]==="emoji"&&q.length>=3)Q.push({type:"emoji",shortcode:q[1],url:q[2]})}$=$.content}let J=$.length,X=0,Y=0;$:while(Y<J){let G=$.indexOf(":",Y),q=$.indexOf("#",Y);if(G===-1&&q===-1)break $;if(G===-1||q>=0&&q<G){if(q===0||$[q-1].match(N1)){let W=$.slice(q+1,q+Ti).match(N1),z=W?q+1+W.index:J;yield{type:"text",text:$.slice(X,q)},yield{type:"hashtag",value:$.slice(q+1,z)},Y=z,X=Y;continue $}Y=q+1;continue $}if($.slice(G-5,G)==="nostr"){let W=$.slice(G+60).match(N1),z=W?G+60+W.index:J;try{let V,{data:K,type:U}=R5($.slice(G+1,z));switch(U){case"npub":V={pubkey:K};break;case"note":V={id:K};break;case"nsec":Y=z+1;continue;default:V=K}if(X!==G-5)yield{type:"text",text:$.slice(X,G-5)};yield{type:"reference",pointer:V},Y=z,X=Y;continue $}catch(V){Y=G+1;continue $}}else if($.slice(G-5,G)==="https"||$.slice(G-4,G)==="http"){let W=$.slice(G+4).match(mR),z=W?G+4+W.index:J,V=$[G-1]==="s"?5:4;try{let K=new URL($.slice(G-V,z));if(K.hostname.indexOf(".")===-1)throw Error("invalid url");if(X!==G-V)yield{type:"text",text:$.slice(X,G-V)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(K.pathname)){yield{type:"image",url:K.toString()},Y=z,X=Y;continue $}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(K.pathname)){yield{type:"video",url:K.toString()},Y=z,X=Y;continue $}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(K.pathname)){yield{type:"audio",url:K.toString()},Y=z,X=Y;continue $}yield{type:"url",url:K.toString()},Y=z,X=Y;continue $}catch(K){Y=z+1;continue $}}else if($.slice(G-3,G)==="wss"||$.slice(G-2,G)==="ws"){let W=$.slice(G+4).match(mR),z=W?G+4+W.index:J,V=$[G-1]==="s"?3:2;try{let K=new URL($.slice(G-V,z));if(K.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(X!==G-V)yield{type:"text",text:$.slice(X,G-V)};yield{type:"relay",url:K.toString()},Y=z,X=Y;continue $}catch(K){Y=z+1;continue $}}else{for(let W=0;W<Q.length;W++){let z=Q[W];if($[G+z.shortcode.length+1]===":"&&$.slice(G+1,G+z.shortcode.length+1)===z.shortcode){if(X!==G)yield{type:"text",text:$.slice(X,G)};yield z,Y=G+z.shortcode.length+2,X=Y;continue $}}Y=G+1;continue $}}if(X!==J)yield{type:"text",text:$.slice(X)}}var Ei={};k0(Ei,{channelCreateEvent:()=>ki,channelHideMessageEvent:()=>bi,channelMessageEvent:()=>Si,channelMetadataEvent:()=>ci,channelMuteUserEvent:()=>fi});var ki=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return u8({kind:iR,tags:[...$.tags??[]],content:J,created_at:$.created_at},Q)},ci=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return u8({kind:nR,tags:[["e",$.channel_create_event_id],...$.tags??[]],content:J,created_at:$.created_at},Q)},Si=($,Q)=>{let J=[["e",$.channel_create_event_id,$.relay_url,"root"]];if($.reply_to_channel_message_event_id)J.push(["e",$.reply_to_channel_message_event_id,$.relay_url,"reply"]);return u8({kind:dR,tags:[...J,...$.tags??[]],content:$.content,created_at:$.created_at},Q)},bi=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return u8({kind:aR,tags:[["e",$.channel_message_event_id],...$.tags??[]],content:J,created_at:$.created_at},Q)},fi=($,Q)=>{let J;if(typeof $.content==="object")J=JSON.stringify($.content);else if(typeof $.content==="string")J=$.content;else return;return u8({kind:oR,tags:[["p",$.pubkey_to_mute],...$.tags??[]],content:J,created_at:$.created_at},Q)},mi={};k0(mi,{EMOJI_SHORTCODE_REGEX:()=>_D,matchAll:()=>yi,regex:()=>d1,replaceAll:()=>hi});var _D=/:(\w+):/,d1=()=>new RegExp(`\\B${_D.source}\\B`,"g");function*yi($){let Q=$.matchAll(d1());for(let J of Q)try{let[X,Y]=J;yield{shortcode:X,name:Y,start:J.index,end:J.index+X.length}}catch(X){}}function hi($,Q){return $.replaceAll(d1(),(J,X)=>{return Q({shortcode:J,name:X})})}var pi={};k0(pi,{useFetchImplementation:()=>ui,validateGithub:()=>gi});var a1;try{a1=fetch}catch{}function ui($){a1=$}async function gi($,Q,J){try{return await(await a1(`https://gist.github.com/${Q}/${J}/raw`)).text()===`Verifying that I control the following Nostr public key: ${$}`}catch(X){return!1}}var li={};k0(li,{makeNwcRequestEvent:()=>ni,parseConnectionString:()=>ii});function ii($){let{host:Q,pathname:J,searchParams:X}=new URL($),Y=J||Q,G=X.getAll("relay"),q=X.get("secret");if(!Y||G.length===0||!q)throw Error("invalid connection string");return{pubkey:Y,relay:G[0],relays:G,secret:q}}async function ni($,Q,J){let Y=XD(Q,$,JSON.stringify({method:"pay_invoice",params:{invoice:J}})),G={kind:tR,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",$]]};return u8(G,Q)}var di={};k0(di,{normalizeIdentifier:()=>ai});function ai($){return $=$.trim().toLowerCase(),$=$.normalize("NFKC"),Array.from($).map((Q)=>{if(/\p{Letter}/u.test(Q)||/\p{Number}/u.test(Q))return Q;return"-"}).join("")}var oi={};k0(oi,{getSatoshisAmountFromBolt11:()=>Qn,getZapEndpoint:()=>ri,makeZapReceipt:()=>$n,makeZapRequest:()=>ti,useFetchImplementation:()=>si,validateZapRequest:()=>ei});var o1;try{o1=fetch}catch{}function si($){o1=$}async function ri($){try{let Q="",{lud06:J,lud16:X}=JSON.parse($.content);if(X){let[q,W]=X.split("@");Q=new URL(`/.well-known/lnurlp/${q}`,`https://${W}`).toString()}else if(J){let{words:q}=LQ.decode(J,1000),W=LQ.fromWords(q);Q=u$.decode(W)}else return null;let G=await(await o1(Q)).json();if(G.allowsNostr&&G.nostrPubkey)return G.callback}catch(Q){}return null}function ti($){let Q={kind:9734,created_at:Math.round(Date.now()/1000),content:$.comment||"",tags:[["p","pubkey"in $?$.pubkey:$.event.pubkey],["amount",$.amount.toString()],["relays",...$.relays]]};if("event"in $){if(Q.tags.push(["e",$.event.id]),P1($.event.kind)){let J=["a",`${$.event.kind}:${$.event.pubkey}:`];Q.tags.push(J)}else if(T1($.event.kind)){let J=$.event.tags.find(([Y,G])=>Y==="d"&&G);if(!J)throw Error("d tag not found or is empty");let X=["a",`${$.event.kind}:${$.event.pubkey}:${J[1]}`];Q.tags.push(X)}Q.tags.push(["k",$.event.kind.toString()])}return Q}function ei($){let Q;try{Q=JSON.parse($)}catch(G){return"Invalid zap request JSON."}if(!I1(Q))return"Zap request is not a valid Nostr event.";if(!X7(Q))return"Invalid signature on zap request.";let J=Q.tags.find(([G,q])=>G==="p"&&q);if(!J)return"Zap request doesn't have a 'p' tag.";if(!w8(J[1]))return"Zap request 'p' tag is not valid hex.";let X=Q.tags.find(([G,q])=>G==="e"&&q);if(X&&!w8(X[1]))return"Zap request 'e' tag is not valid hex.";if(!Q.tags.find(([G,q])=>G==="relays"&&q))return"Zap request doesn't have a 'relays' tag.";return null}function $n({zapRequest:$,preimage:Q,bolt11:J,paidAt:X}){let Y=JSON.parse($),G=Y.tags.filter(([W])=>W==="e"||W==="p"||W==="a"),q={kind:9735,created_at:Math.round(X.getTime()/1000),content:"",tags:[...G,["P",Y.pubkey],["bolt11",J],["description",$]]};if(Q)q.tags.push(["preimage",Q]);return q}function Qn($){if($.length<50)return 0;$=$.substring(0,50);let Q=$.lastIndexOf("1");if(Q===-1)return 0;let J=$.substring(0,Q);if(!J.startsWith("lnbc"))return 0;let X=J.substring(4);if(X.length<1)return 0;let Y=X[X.length-1],G=Y.charCodeAt(0)-48,q=G>=0&&G<=9,W=X.length-1;if(q)W++;if(W<1)return 0;let z=parseInt(X.substring(0,W));switch(Y){case"m":return z*1e5;case"u":return z*100;case"n":return z/10;case"p":return z/1e4;default:return z*1e8}}var Jn={};k0(Jn,{Negentropy:()=>vD,NegentropyStorageVector:()=>Gn,NegentropySync:()=>qn});var v1=97,CX=32,ND=16,WJ={Skip:0,Fingerprint:1,IdList:2},p$=class{_raw;length;constructor($){if(typeof $==="number")this._raw=new Uint8Array($),this.length=0;else if($ instanceof Uint8Array)this._raw=new Uint8Array($),this.length=$.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend($){if($ instanceof p$)$=$.unwrap();if(typeof $.length!=="number")throw Error("bad length");let Q=$.length+this.length;if(this.capacity<Q){let J=this._raw,X=Math.max(this.capacity*2,Q);this._raw=new Uint8Array(X),this._raw.set(J)}this._raw.set($,this.length),this.length+=$.length}shift(){let $=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,$}shiftN($=1){let Q=this._raw.subarray(0,$);return this._raw=this._raw.subarray($),this.length-=$,Q}};function M5($){let Q=0;while(!0){if($.length===0)throw Error("parse ends prematurely");let J=$.shift();if(Q=Q<<7|J&127,(J&128)===0)break}return Q}function h$($){if($===0)return new p$(new Uint8Array([0]));let Q=[];while($!==0)Q.push($&127),$>>>=7;Q.reverse();for(let J=0;J<Q.length-1;J++)Q[J]|=128;return new p$(new Uint8Array(Q))}function Xn($){return B5($,1)[0]}function B5($,Q){if($.length<Q)throw Error("parse ends prematurely");return $.shiftN(Q)}var Yn=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(CX)}add($){let Q=0,J=0,X=new DataView(this.buf.buffer),Y=new DataView($.buffer);for(let G=0;G<8;G++){let q=G*4,W=X.getUint32(q,!0),z=Y.getUint32(q,!0),V=W;if(V+=Q,V+=z,V>4294967295)J=1;X.setUint32(q,V&4294967295,!0),Q=J,J=0}}negate(){let $=new DataView(this.buf.buffer);for(let J=0;J<8;J++){let X=J*4;$.setUint32(X,~$.getUint32(X,!0))}let Q=new Uint8Array(CX);Q[0]=1,this.add(Q)}getFingerprint($){let Q=new p$;return Q.extend(this.buf),Q.extend(h$($)),W8(Q.unwrap()).subarray(0,ND)}},Gn=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert($,Q){if(this.sealed)throw Error("already sealed");let J=P0(Q);if(J.byteLength!==CX)throw Error("bad id size for added item");this.items.push({timestamp:$,id:J})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(O1);for(let $=1;$<this.items.length;$++)if(O1(this.items[$-1],this.items[$])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem($){if(this._checkSealed(),$>=this.items.length)throw Error("out of range");return this.items[$]}iterate($,Q,J){this._checkSealed(),this._checkBounds($,Q);for(let X=$;X<Q;++X)if(!J(this.items[X],X))break}findLowerBound($,Q,J){return this._checkSealed(),this._checkBounds($,Q),this._binarySearch(this.items,$,Q,(X)=>O1(X,J)<0)}fingerprint($,Q){let J=new Yn;return J.setToZero(),this.iterate($,Q,(X)=>{return J.add(X.id),!0}),J.getFingerprint(Q-$)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds($,Q){if($>Q||Q>this.items.length)throw Error("bad range")}_binarySearch($,Q,J,X){let Y=J-Q;while(Y>0){let G=Q,q=Math.floor(Y/2);if(G+=q,X($[G]))Q=++G,Y-=q+1;else Y=q}return Q}},vD=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor($,Q=60000){if(Q<4096)throw Error("frameSizeLimit too small");this.storage=$,this.frameSizeLimit=Q,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound($,Q){return{timestamp:$,id:Q||new Uint8Array(0)}}initiate(){let $=new p$;return $.extend(new Uint8Array([v1])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),$),F0($.unwrap())}reconcile($,Q,J){let X=new p$(P0($));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new p$;Y.extend(new Uint8Array([v1]));let G=Xn(X);if(G<96||G>111)throw Error("invalid negentropy protocol version byte");if(G!==v1)throw Error("unsupported negentropy protocol version requested: "+(G-96));let q=this.storage.size(),W=this._bound(0),z=0,V=!1;while(X.length!==0){let K=new p$,U=()=>{if(V)V=!1,K.extend(this.encodeBound(W)),K.extend(h$(WJ.Skip))},x=this.decodeBound(X),M=M5(X),H=z,w=this.storage.findLowerBound(z,q,x);if(M===WJ.Skip)V=!0;else if(M===WJ.Fingerprint){let j=B5(X,ND),Z=this.storage.fingerprint(H,w);if(OD(j,Z)!==0)U(),this.splitRange(H,w,x,K);else V=!0}else if(M===WJ.IdList){let j=M5(X),Z={};for(let L=0;L<j;L++){let D=B5(X,CX);Z[F0(D)]=D}if(V=!0,this.storage.iterate(H,w,(L)=>{let D=L.id,F=F0(D);if(!Z[F])Q?.(F);else delete Z[F0(D)];return!0}),J)for(let L of Object.values(Z))J(F0(L))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+K.length)){let j=this.storage.fingerprint(w,q);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(h$(WJ.Fingerprint)),Y.extend(j);break}else Y.extend(K);z=w,W=x}return Y.length===1?null:F0(Y.unwrap())}splitRange($,Q,J,X){let Y=Q-$,G=16;if(Y<G*2)X.extend(this.encodeBound(J)),X.extend(h$(WJ.IdList)),X.extend(h$(Y)),this.storage.iterate($,Q,(q)=>{return X.extend(q.id),!0});else{let q=Math.floor(Y/G),W=Y%G,z=$;for(let V=0;V<G;V++){let K=q+(V<W?1:0),U=this.storage.fingerprint(z,z+K);z+=K;let x;if(z===Q)x=J;else{let M,H;this.storage.iterate(z-1,z+1,(w,j)=>{if(j===z-1)M=w;else H=w;return!0}),x=this.getMinimalBound(M,H)}X.extend(this.encodeBound(x)),X.extend(h$(WJ.Fingerprint)),X.extend(U)}}}exceededFrameSizeLimit($){return $>this.frameSizeLimit-200}decodeTimestampIn($){let Q=M5($);if(Q=Q===0?Number.MAX_VALUE:Q-1,this.lastTimestampIn===Number.MAX_VALUE||Q===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return Q+=this.lastTimestampIn,this.lastTimestampIn=Q,Q}decodeBound($){let Q=this.decodeTimestampIn($),J=M5($);if(J>CX)throw Error("bound key too long");let X=B5($,J);return{timestamp:Q,id:X}}encodeTimestampOut($){if($===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,h$(0);let Q=$;return $-=this.lastTimestampOut,this.lastTimestampOut=Q,h$($+1)}encodeBound($){let Q=new p$;return Q.extend(this.encodeTimestampOut($.timestamp)),Q.extend(h$($.id.length)),Q.extend($.id),Q}getMinimalBound($,Q){if(Q.timestamp!==$.timestamp)return this._bound(Q.timestamp);else{let J=0,X=Q.id,Y=$.id;for(let G=0;G<CX;G++){if(X[G]!==Y[G])break;J++}return this._bound(Q.timestamp,Q.id.subarray(0,J+1))}}};function OD($,Q){for(let J=0;J<$.byteLength;J++){if($[J]<Q[J])return-1;if($[J]>Q[J])return 1}if($.byteLength>Q.byteLength)return 1;if($.byteLength<Q.byteLength)return-1;return 0}function O1($,Q){if($.timestamp===Q.timestamp)return OD($.id,Q.id);return $.timestamp-Q.timestamp}var qn=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor($,Q,J,X={}){this.relay=$,this.storage=Q,this.neg=new vD(Q),this.onhave=X.onhave,this.onneed=X.onneed,this.filter=J,this.subscription=this.relay.prepareSubscription([{}],{label:X.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let G=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(G)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${G}"]`);else this.close(),X.onclose?.()}catch(G){console.error("negentropy reconcile error:",G),X?.onclose?.(`reconcile error: ${G}`)}break}case"NEG-CLOSE":{let G=Y[2];console.warn("negentropy error:",G),X.onclose?.(G);break}case"NEG-ERR":X.onclose?.()}}}async start(){let $=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${$}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},Wn={};k0(Wn,{getToken:()=>zn,hashPayload:()=>s1,unpackEventFromToken:()=>CD,validateEvent:()=>kD,validateEventKind:()=>PD,validateEventMethodTag:()=>AD,validateEventPayloadTag:()=>ED,validateEventTimestamp:()=>ID,validateEventUrlTag:()=>TD,validateToken:()=>Vn});var FD="Nostr ";async function zn($,Q,J,X=!1,Y){let G={kind:c1,tags:[["u",$],["method",Q]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)G.tags.push(["payload",s1(Y)]);let q=await J(G);return(X?FD:"")+y8.encode(p8.encode(JSON.stringify(q)))}async function Vn($,Q,J){let X=await CD($).catch((G)=>{throw G});return await kD(X,Q,J).catch((G)=>{throw G})}async function CD($){if(!$)throw Error("Missing token");$=$.replace(FD,"");let Q=u$.decode(y8.decode($));if(!Q||Q.length===0||!Q.startsWith("{"))throw Error("Invalid token");return JSON.parse(Q)}function ID($){if(!$.created_at)return!1;return Math.round(new Date().getTime()/1000)-$.created_at<60}function PD($){return $.kind===c1}function TD($,Q){let J=$.tags.find((X)=>X[0]==="u");if(!J)return!1;return J.length>0&&J[1]===Q}function AD($,Q){let J=$.tags.find((X)=>X[0]==="method");if(!J)return!1;return J.length>0&&J[1].toLowerCase()===Q.toLowerCase()}function s1($){let Q=W8(p8.encode(JSON.stringify($)));return F0(Q)}function ED($,Q){let J=$.tags.find((Y)=>Y[0]==="payload");if(!J)return!1;let X=s1(Q);return J.length>0&&J[1]===X}async function kD($,Q,J,X){if(!X7($))throw Error("Invalid nostr event, signature invalid");if(!PD($))throw Error("Invalid nostr event, kind invalid");if(!ID($))throw Error("Invalid nostr event, created_at timestamp invalid");if(!TD($,Q))throw Error("Invalid nostr event, url tag invalid");if(!AD($,J))throw Error("Invalid nostr event, method tag invalid");if(Boolean(X)&&typeof X==="object"&&Object.keys(X).length>0){if(!ED($,X))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function xn($){let Q=$.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test(Q))throw Error("expected 64-char hex private key");let J=new Uint8Array(32);for(let X=0;X<32;X++)J[X]=parseInt(Q.slice(X*2,X*2+2),16);return J}function Y7($){let Q=($??"").trim();if(!Q)throw Error("BUZZ_PRIVATE_KEY is empty");let J;if(Q.startsWith("nsec")){let Y=L5.decode(Q);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");J=Y.data}else J=xn(Q);let X=J7(J);return{secretKey:J,pubkeyHex:X,npub:L5.npubEncode(X)}}function g$($,Q){return u8($,Q.secretKey)}function cD($){return Kn("sha256").update($).digest("hex")}function SD(){return Un()}var Mn=["/fig","@figura"];function bD($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fD($){return $.replace(/^[\s:,\-—]+/,"").trim()}function mD($,Q={}){let J=($??"").trim();if(!J)return null;let X=Q.triggers??Mn,Y=null;for(let G of X){let W=new RegExp(`(?:^|\\s)${bD(G)}\\b`,"i").exec(J);if(W){let z=W.index+W[0].length-G.length;if(!Y||z<Y.index)Y={index:z,end:W.index+W[0].length,via:"trigger"}}}if(Q.agentNpub){let q=new RegExp(`(?:nostr:)?${bD(Q.agentNpub)}`,"i").exec(J);if(q&&(!Y||q.index<Y.index))Y={index:q.index,end:q.index+q[0].length,via:"npub"}}if(Y){let G=fD(J.slice(Y.end));if(G)return{brief:G,via:Y.via};return null}if(Q.mentioned){let G=fD(J);if(G)return{brief:G,via:"mention"}}return null}function Hn($){return $.replace(/^fig\s+/i,"").trim()}function yD($){let Q=($??"").trim();if(!Q)return null;let J=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec(Q);if(J){let G=J[1].trim();if(G)return{kind:"fig-and-file",description:G}}let X=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec(Q);if(X){let G=X[1].trim();if(G)return{kind:"file-issue",title:G}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec(Q);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:Hn(Q)||Q}}var hD=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function pD($,Q=hD){return`${(Q||hD).replace(/\/+$/,"")}/f/${$}`}function v5($){let J=[$.title?`Here's your fig: **${$.title}**`:"Here's your fig"];if($.note)J.push($.note);return J.push(""),J.push($.link),J.join(`
|
|
590
|
+
`)}function IX($){return`Sorry — I couldn't make that fig. ${$}`}function O5($){return`Filed ${typeof $.number==="number"?`issue #${$.number}`:"the issue"}: **${$.title}**
|
|
531
591
|
|
|
532
|
-
${
|
|
592
|
+
${$.url}`}function r1($){return`Figura mock for this issue: ${$}`}function uD($,Q){return`From issue #${$}: ${Q}`}function gD($){let Q=[`Design a screen for this issue: ${$.title}`],J=($.body??"").trim();if(J)Q.push(J.length>2000?`${J.slice(0,2000)}…`:J);if($.labels&&$.labels.length)Q.push(`Labels: ${$.labels.join(", ")}`);return Q.join(`
|
|
533
593
|
|
|
534
|
-
`)}class
|
|
594
|
+
`)}class t1 extends Error{input;constructor($,Q){super($);this.input=Q}}function Bn($){return $.tags.find((Q)=>Q[0]==="h")?.[1]??null}function Zn($,Q){return $.tags.some((J)=>J[0]==="p"&&(J[1]??"").toLowerCase()===Q)}async function lD($,Q){let J=Q.log??(()=>{});if($.pubkey.toLowerCase()===Q.identity.pubkeyHex.toLowerCase())return{action:"skip",reason:"self"};let X=Bn($),Y=async(K)=>{let U={channelId:X??"",content:K,replyTo:$.id,mentions:[$.pubkey]},x=X?await Q.postReply(U):{ok:!1};if(!x||x.ok!==!0)throw new t1("the relay did not accept the reply",U)},G=Q.pendingReplies.get($.id);if(G){let K=await Q.postReply(G.input);if(K&&K.ok===!0)return Q.pendingReplies.delete($.id),J("delivered cached reply on redelivery (no re-run)"),G.outcome;return{action:"delivery-failed",reason:"the relay did not accept the reply"}}if(Q.seen.has($.id))return{action:"skip",reason:"duplicate"};let q=mD($.content,{triggers:Q.triggers,agentNpub:Q.identity.npub,mentioned:Zn($,Q.identity.pubkeyHex)});if(!q)return{action:"skip",reason:"no-trigger"};if(!X)return{action:"skip",reason:"no-channel"};let W=yD(q.brief);if(!W)return{action:"skip",reason:"empty-brief"};Q.seen.add($.id),J(`request in ${X} via ${q.via}: ${W.kind}`);let z=!1,V=async(K,U)=>{try{return await Y(K),U}catch(x){if(!(x instanceof t1))throw x;if(z)Q.pendingReplies.set($.id,{input:x.input,outcome:U}),J("reply delivery failed — cached for independent retry (no re-run)");else Q.seen.delete($.id),J("reply delivery failed before any side effect — un-claimed for reprocess");return{action:"delivery-failed",reason:x.message}}};try{switch(W.kind){case"fig":{let K=await Q.generate(W.brief);return z=!0,await V(v5({link:K.url??"(link unavailable)",title:K.title,note:W.brief}),{action:"replied",via:q.via,kind:W.kind,link:K.url})}case"fig-issue":{if(!Q.tracker||!Q.tracker.supportsNumericFetch)return await V(IX("no numeric issue tracker is configured — set FIGURA_ISSUE_TRACKER=github with GITHUB_REPO/GITHUB_TOKEN."),{action:"error-replied",reason:"no-numeric-tracker"});let K=await Q.tracker.fetchIssue(W.issue),U=await Q.generate(gD(K),{issue:W.issue});if(z=!0,U.url)await Q.tracker.commentIssue({number:W.issue,url:K.url},r1(U.url)).catch((x)=>J(`issue back-link failed: ${String(x)}`));return await V(v5({link:U.url??"(link unavailable)",title:U.title,note:uD(W.issue,K.title)}),{action:"replied",via:q.via,kind:W.kind,link:U.url})}case"file-issue":{if(!Q.tracker)return await V(IX("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let K=await Q.tracker.createIssue({title:W.title,body:W.title});return z=!0,await V(O5({url:K.url,title:W.title,number:K.number}),{action:"filed",issue:K.url})}case"fig-and-file":{if(!Q.tracker)return await V(IX("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let K=await Q.tracker.createIssue({title:W.description,body:W.description});z=!0;let U;try{U=await Q.generate(W.description,{issue:K.number})}catch(M){let H=M instanceof Error?M.message:String(M);return J(`fig-and-file generation failed after filing ${K.url}: ${H}`),await V(`${O5({url:K.url,title:W.description,number:K.number})}
|
|
535
595
|
|
|
536
|
-
${
|
|
596
|
+
${IX(H)}`,{action:"error-replied",reason:H})}if(U.url)await Q.tracker.commentIssue(K,r1(U.url)).catch((M)=>J(`issue back-link failed: ${String(M)}`));let x=`${O5({url:K.url,title:W.description,number:K.number})}
|
|
537
597
|
|
|
538
|
-
${vX({link:q.url??"(link unavailable)",title:q.title})}`;return await z(M,{action:"replied",via:W.via,kind:m.kind,link:q.url})}}}catch(x){let q=x instanceof Error?x.message:String(x);return Q(`request failed: ${q}`),await z(wQ(q),{action:"error-replied",reason:q})}}class rm{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor(c,$){this.pending=c;this.opts=$;this.max=$.maxAttempts??6,this.base=$.baseDelayMs??1000,this.schedule=$.schedule??((Q,J)=>setTimeout(Q,J)),this.cancel=$.cancel??((Q)=>clearTimeout(Q))}log(c){this.opts.log?.(c)}get inFlight(){return this.active.size}start(c){if(this.active.has(c))return;if(!this.pending.has(c))return;this.active.add(c),this.arm(c)}arm(c){let $=this.attempts.get(c)??0,Q=this.base*2**$,J=this.schedule(()=>{this.timers.delete(c),this.tick(c)},Q);this.timers.set(c,J)}finish(c){this.active.delete(c),this.attempts.delete(c);let $=this.timers.get(c);if($!==void 0)this.cancel($),this.timers.delete(c)}async tick(c){let $=this.pending.get(c);if(!$){this.finish(c);return}let Q=(this.attempts.get(c)??0)+1;this.attempts.set(c,Q);let J=!1;try{J=(await this.opts.postReply($.input))?.ok===!0}catch{J=!1}if(J){this.pending.delete(c),this.finish(c),this.log(`delivered pending reply for ${c} on retry ${Q}`);return}if(Q>=this.max){this.pending.delete(c),this.finish(c),this.log(`giving up on pending reply for ${c} after ${Q} attempts`);return}this.arm(c)}stop(){for(let c of this.timers.values())this.cancel(c);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function iV(c){let $=[["h",c.channelId]];if(c.replyTo)$.push(["e",c.replyTo,"","reply"]);let Q=new Set;for(let J of c.mentions??[]){let Y=J.toLowerCase();if(Q.has(Y))continue;Q.add(Y),$.push(["p",Y])}return{kind:9,content:c.content,tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function vV(c){let $=[["u",c.url],["method",c.method],["nonce",c.nonce]];if(c.payloadSha256)$.push(["payload",c.payloadSha256]);return{kind:27235,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function UV(c){let $=[["relay",c.relayUrl],["challenge",c.challenge]];if(c.authTag)$.push(c.authTag);return{kind:22242,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}var jV=/^[0-9a-f]{64}$/i,rI=/^[0-9a-f]{128}$/i,tI=E.object({id:E.string().regex(jV,"id must be 64-char hex"),pubkey:E.string().regex(jV,"pubkey must be 64-char hex"),sig:E.string().regex(rI,"sig must be 128-char hex"),kind:E.number().int(),created_at:E.number().int(),tags:E.array(E.array(E.string())),content:E.string()});function KV(c){let $=tI.safeParse(c);return $.success?$.data:null}function tm(c){return c.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function eI(c){return c.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function DV(c){return eI(c).replace(/\/+$/,"")}var cZ=(c)=>{try{return RJ(c)}catch{return!1}};async function $Z(){let c=globalThis;if(c.WebSocket)return c.WebSocket;return(await import("ws")).default}var BV="figura-buzz-agent",QZ=60,JZ=1e4;class em{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor(c){this.opts=c;this.since=c.since??Math.floor(Date.now()/1000),this.verify=c.verifyEvent??cZ,this.channelSet=new Set(c.channels)}channelAllowed(c){if(this.channelSet.size===0)return!0;let $=c.tags.filter((Q)=>Q[0]==="h").map((Q)=>Q[1]);if($.length!==1||!this.channelSet.has($[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify($)})`),!1;return!0}get cursor(){return this.since}ingest(c){this.handleMessage(c)}start(){this.connect().catch((c)=>this.status(`connect failed: ${String(c)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status(c){this.opts.onStatus?.(c)}async connect(){if(this.closed)return;let c=tm(this.opts.relayUrl),$;try{$=await $Z()}catch(J){this.status(`no WebSocket implementation: ${String(J)}`);return}this.authed=!1,this.authEventId=null;let Q;try{Q=new $(c)}catch(J){this.status(`failed to open ${c}: ${String(J)}`),this.scheduleReconnect();return}this.socket=Q,Q.onopen=()=>{this.status(`connected to ${c}`),this.armStability(),this.sendReq()},Q.onmessage=(J)=>this.handleMessage(this.decode(J.data)),Q.onerror=(J)=>this.status(`socket error: ${String(J)}`),Q.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},JZ)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode(c){if(typeof c==="string")return c;if(c instanceof Uint8Array)return new TextDecoder().decode(c);return String(c)}send(c){try{this.socket?.send(JSON.stringify(c))}catch($){this.status(`send failed: ${String($)}`)}}sendReq(){let c={kinds:[9],since:this.since};if(this.opts.channels.length>0)c["#h"]=this.opts.channels;this.send(["REQ",BV,c])}handleMessage(c){let $;try{$=JSON.parse(c)}catch{return}if(!Array.isArray($)||typeof $[0]!=="string")return;switch($[0]){case"AUTH":if(typeof $[1]==="string")this.respondToAuth($[1]);break;case"OK":if($[1]===this.authEventId&&$[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if($[1]===BV)this.markUsable();break;case"EVENT":{let J=KV($[2]);if(!J){this.status("dropped malformed event");break}if(!this.verify(J)){this.status(`dropped event with invalid signature (pubkey ${J.pubkey.slice(0,12)}…)`);break}if(J.kind===9&&this.channelAllowed(J)){if(J.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+QZ;if(J.created_at<=Y)this.since=J.created_at;this.opts.onEvent(J)}break}case"CLOSED":this.status(`subscription closed: ${String($[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String($[1]??"")}`);break;default:break}}respondToAuth(c){let $=UV({challenge:c,relayUrl:tm(this.opts.relayUrl)}),Q=v8($,this.opts.identity);this.authEventId=Q.id,this.send(["AUTH",Q])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let c=Math.min(30000,500*2**(this.reconnectAttempt-1)),$=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),c+$)}}function YZ(c){let $=globalThis;if($.Buffer)return $.Buffer.from(c).toString("base64");let Q="";for(let J of c)Q+=String.fromCharCode(J);return btoa(Q)}function HV(c){return`Nostr ${YZ(new TextEncoder().encode(c))}`}function XZ(c,$,Q,J){let Y=vV({method:$,url:Q,nonce:WV(),payloadSha256:J?XV(J):void 0}),X=v8(Y,c);return HV(JSON.stringify(X))}async function jX(c,$,Q,J={}){let Y=J.fetchImpl??fetch,X=`${DV(c)}/events`,W=JSON.stringify(Q),m={ok:!1,status:0,body:""};for(let G=0;G<2;G++){let z=XZ($,"POST",X,W),x;try{x=await Y(X,{method:"POST",headers:{Authorization:z,"Content-Type":"application/json"},body:W})}catch(M){m={ok:!1,status:0,body:M instanceof Error?M.message:String(M)};continue}let q=await x.text().catch(()=>"");if(m={ok:x.ok,status:x.status,body:q},x.ok)return m;if(x.status!==429&&x.status<500)return m}return m}v0();var WZ=E.object({id:E.string(),publicId:E.string().nullish(),url:E.string().nullish(),title:E.string().optional(),slug:E.string().optional(),isPublic:E.boolean().optional()});async function OV(c){let $={prompt:c.prompt,publish:!0};if(c.device)$.device=c.device;if(c.platform)$.platform=c.platform;if(typeof c.issue==="number")$.issue=c.issue;let Q=await Wc("/v1/figs/generate",{method:"POST",body:$,token:c.token,apiUrl:c.apiUrl,source:"buzz-agent"}),J=WZ.safeParse(Q);if(!J.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=J.data,X=Y.publicId??null,W=Y.url??(X?MV(X,c.appOrigin):null);return{id:Y.id,publicId:X,url:W,title:Y.title||Y.slug||"Untitled fig"}}var mZ=E.object({number:E.number().int(),title:E.string().default(""),body:E.string().nullish(),html_url:E.string().optional(),state:E.string().optional(),labels:E.array(E.union([E.string(),E.object({name:E.string().optional()})])).optional()}),GZ=E.object({number:E.number().int(),html_url:E.string().optional()}),cG="https://api.github.com";function $G(c){return{Authorization:`Bearer ${c}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function QG(c,$){return`https://github.com/${c}/issues/${$}`}function RV(c,$,Q){return{method:"GET",url:`${cG}/repos/${c}/issues/${$}`,headers:$G(Q)}}function pV(c,$,Q){let J={title:Q.title};if(Q.body)J.body=Q.body;if(Q.labels&&Q.labels.length)J.labels=Q.labels;return{method:"POST",url:`${cG}/repos/${c}/issues`,headers:{...$G($),"Content-Type":"application/json"},body:JSON.stringify(J)}}function IV(c,$,Q,J){return{method:"POST",url:`${cG}/repos/${c}/issues/${$}/comments`,headers:{...$G(Q),"Content-Type":"application/json"},body:JSON.stringify({body:J})}}function ZV(c){let $=mZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub issue response: ${$.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let Q=$.data,J=(Q.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:Q.number,title:Q.title,body:Q.body??"",labels:J,url:Q.html_url??QG("",Q.number),state:Q.state}}function LV(c){let $=GZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub create response: ${$.error.issues.map((Q)=>`${Q.path.join(".")||"(root)"} ${Q.message}`).join("; ")}`);return $.data}function _V(c){return/^[^/\s]+\/[^/\s]+$/.test(c)}function SV(c,$){return`30617:${c}:${$}`}function AV(c){let $=c.subject.trim();if(!$)throw Error("issue subject must not be empty");let Q=[["a",SV(c.ownerHex,c.repoId)],["p",c.ownerHex]];for(let J of c.recipients??[])Q.push(["p",J]);Q.push(["subject",$]);for(let J of c.labels??[])Q.push(["t",J]);return{kind:1621,content:c.content,tags:Q,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function CV(c){return{kind:1622,content:c.content,tags:[["a",SV(c.ownerHex,c.repoId)],["e",c.issueId,"","root"],["p",c.ownerHex]],created_at:c.createdAt??Math.floor(Date.now()/1000)}}async function JG(c,$){let Q=await $(c.url,{method:c.method,headers:c.headers,body:c.body}),J=await Q.text().catch(()=>"");if(!Q.ok){let Y=Q.headers.get("x-ratelimit-remaining");if((Q.status===403||Q.status===429)&&Y==="0"){let X=Q.headers.get("x-ratelimit-reset"),W=X?` (resets at ${new Date(Number(X)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${W} — try again shortly.`)}throw Error(`GitHub ${c.method} → ${Q.status}: ${J.slice(0,200)}`)}try{return J?JSON.parse(J):{}}catch{throw Error(`GitHub returned a non-JSON ${Q.status} body: ${J.slice(0,120)}`)}}class YG{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor(c){this.cfg=c;if(!c.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!_V(c.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${c.repo})`);this.fetchImpl=c.fetchImpl??fetch}async fetchIssue(c){let $=await JG(RV(this.cfg.repo,c,this.cfg.token),this.fetchImpl);return ZV($)}async createIssue(c){let $=LV(await JG(pV(this.cfg.repo,this.cfg.token,c),this.fetchImpl));return{number:$.number,url:$.html_url??QG(this.cfg.repo,$.number),title:c.title}}async commentIssue(c,$){if(typeof c.number!=="number")return;await JG(IV(this.cfg.repo,c.number,this.cfg.token,$),this.fetchImpl)}}class XG{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor(c){this.cfg=c;if(!/^[0-9a-f]{64}$/i.test(c.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!c.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=c.submit??jX}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue(c){let $=AV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:c.title,content:c.body??"",labels:c.labels}),Q=v8($,this.cfg.identity),J=await this.submit(this.cfg.relayUrl,this.cfg.identity,Q);if(!J.ok)throw Error(`relay rejected issue event: ${J.status} ${J.body.slice(0,200)}`);return{eventId:Q.id,url:`nostr:${Q.id}`,title:c.title}}async commentIssue(c,$){if(!c.eventId)return;let Q=CV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:c.eventId,content:$}),J=v8(Q,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var zZ=E.object({label:E.string().optional(),relayUrl:E.string(),privateKey:E.string(),figuraToken:E.string(),apiUrl:E.string().optional(),channels:E.array(E.string()),triggers:E.array(E.string()).optional(),device:E.string().optional(),platform:E.string().optional(),appOrigin:E.string().optional(),issueTracker:E.enum(["github","buzz"]).optional(),github:E.object({token:E.string(),repo:E.string()}).optional(),buzzRepo:E.object({ownerHex:E.string(),repoId:E.string()}).optional()});function xZ(c,$){if(c.issueTracker==="github"&&c.github)return new YG({token:c.github.token,repo:c.github.repo});if(c.issueTracker==="buzz"&&c.buzzRepo)return new XG({relayUrl:c.relayUrl,identity:$,ownerHex:c.buzzRepo.ownerHex,repoId:c.buzzRepo.repoId});return null}class WG{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor(c){this.config=zZ.parse(c),this.identity=pJ(this.config.privateKey),this.tracker=xZ(this.config,this.identity),this.deliveryQueue=new rm(this.pendingReplies,{postReply:($)=>this.postReply($),log:($)=>this.log($)})}get npub(){return this.identity.npub}log(c){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${c}
|
|
539
|
-
`)}postReply(
|
|
540
|
-
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let
|
|
598
|
+
${v5({link:U.url??"(link unavailable)",title:U.title})}`;return await V(x,{action:"replied",via:q.via,kind:W.kind,link:U.url})}}}catch(K){let U=K instanceof Error?K.message:String(K);return J(`request failed: ${U}`),await V(IX(U),{action:"error-replied",reason:U})}}class e1{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor($,Q){this.pending=$;this.opts=Q;this.max=Q.maxAttempts??6,this.base=Q.baseDelayMs??1000,this.schedule=Q.schedule??((J,X)=>setTimeout(J,X)),this.cancel=Q.cancel??((J)=>clearTimeout(J))}log($){this.opts.log?.($)}get inFlight(){return this.active.size}start($){if(this.active.has($))return;if(!this.pending.has($))return;this.active.add($),this.arm($)}arm($){let Q=this.attempts.get($)??0,J=this.base*2**Q,X=this.schedule(()=>{this.timers.delete($),this.tick($)},J);this.timers.set($,X)}finish($){this.active.delete($),this.attempts.delete($);let Q=this.timers.get($);if(Q!==void 0)this.cancel(Q),this.timers.delete($)}async tick($){let Q=this.pending.get($);if(!Q){this.finish($);return}let J=(this.attempts.get($)??0)+1;this.attempts.set($,J);let X=!1;try{X=(await this.opts.postReply(Q.input))?.ok===!0}catch{X=!1}if(X){this.pending.delete($),this.finish($),this.log(`delivered pending reply for ${$} on retry ${J}`);return}if(J>=this.max){this.pending.delete($),this.finish($),this.log(`giving up on pending reply for ${$} after ${J} attempts`);return}this.arm($)}stop(){for(let $ of this.timers.values())this.cancel($);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function iD($){let Q=[["h",$.channelId]];if($.replyTo)Q.push(["e",$.replyTo,"","reply"]);let J=new Set;for(let X of $.mentions??[]){let Y=X.toLowerCase();if(J.has(Y))continue;J.add(Y),Q.push(["p",Y])}return{kind:9,content:$.content,tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function nD($){let Q=[["u",$.url],["method",$.method],["nonce",$.nonce]];if($.payloadSha256)Q.push(["payload",$.payloadSha256]);return{kind:27235,content:"",tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function dD($){let Q=[["relay",$.relayUrl],["challenge",$.challenge]];if($.authTag)Q.push($.authTag);return{kind:22242,content:"",tags:Q,created_at:$.createdAt??Math.floor(Date.now()/1000)}}var aD=/^[0-9a-f]{64}$/i,wn=/^[0-9a-f]{128}$/i,jn=b.object({id:b.string().regex(aD,"id must be 64-char hex"),pubkey:b.string().regex(aD,"pubkey must be 64-char hex"),sig:b.string().regex(wn,"sig must be 128-char hex"),kind:b.number().int(),created_at:b.number().int(),tags:b.array(b.array(b.string())),content:b.string()});function oD($){let Q=jn.safeParse($);return Q.success?Q.data:null}function $V($){return $.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function Ln($){return $.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function sD($){return Ln($).replace(/\/+$/,"")}var Rn=($)=>{try{return X7($)}catch{return!1}};async function Dn(){let $=globalThis;if($.WebSocket)return $.WebSocket;return(await import("ws")).default}var rD="figura-buzz-agent",_n=60,Nn=1e4;class QV{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor($){this.opts=$;this.since=$.since??Math.floor(Date.now()/1000),this.verify=$.verifyEvent??Rn,this.channelSet=new Set($.channels)}channelAllowed($){if(this.channelSet.size===0)return!0;let Q=$.tags.filter((J)=>J[0]==="h").map((J)=>J[1]);if(Q.length!==1||!this.channelSet.has(Q[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify(Q)})`),!1;return!0}get cursor(){return this.since}ingest($){this.handleMessage($)}start(){this.connect().catch(($)=>this.status(`connect failed: ${String($)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status($){this.opts.onStatus?.($)}async connect(){if(this.closed)return;let $=$V(this.opts.relayUrl),Q;try{Q=await Dn()}catch(X){this.status(`no WebSocket implementation: ${String(X)}`);return}this.authed=!1,this.authEventId=null;let J;try{J=new Q($)}catch(X){this.status(`failed to open ${$}: ${String(X)}`),this.scheduleReconnect();return}this.socket=J,J.onopen=()=>{this.status(`connected to ${$}`),this.armStability(),this.sendReq()},J.onmessage=(X)=>this.handleMessage(this.decode(X.data)),J.onerror=(X)=>this.status(`socket error: ${String(X)}`),J.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},Nn)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode($){if(typeof $==="string")return $;if($ instanceof Uint8Array)return new TextDecoder().decode($);return String($)}send($){try{this.socket?.send(JSON.stringify($))}catch(Q){this.status(`send failed: ${String(Q)}`)}}sendReq(){let $={kinds:[9],since:this.since};if(this.opts.channels.length>0)$["#h"]=this.opts.channels;this.send(["REQ",rD,$])}handleMessage($){let Q;try{Q=JSON.parse($)}catch{return}if(!Array.isArray(Q)||typeof Q[0]!=="string")return;switch(Q[0]){case"AUTH":if(typeof Q[1]==="string")this.respondToAuth(Q[1]);break;case"OK":if(Q[1]===this.authEventId&&Q[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if(Q[1]===rD)this.markUsable();break;case"EVENT":{let X=oD(Q[2]);if(!X){this.status("dropped malformed event");break}if(!this.verify(X)){this.status(`dropped event with invalid signature (pubkey ${X.pubkey.slice(0,12)}…)`);break}if(X.kind===9&&this.channelAllowed(X)){if(X.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+_n;if(X.created_at<=Y)this.since=X.created_at;this.opts.onEvent(X)}break}case"CLOSED":this.status(`subscription closed: ${String(Q[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String(Q[1]??"")}`);break;default:break}}respondToAuth($){let Q=dD({challenge:$,relayUrl:$V(this.opts.relayUrl)}),J=g$(Q,this.opts.identity);this.authEventId=J.id,this.send(["AUTH",J])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let $=Math.min(30000,500*2**(this.reconnectAttempt-1)),Q=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),$+Q)}}function vn($){let Q=globalThis;if(Q.Buffer)return Q.Buffer.from($).toString("base64");let J="";for(let X of $)J+=String.fromCharCode(X);return btoa(J)}function tD($){return`Nostr ${vn(new TextEncoder().encode($))}`}function On($,Q,J,X){let Y=nD({method:Q,url:J,nonce:SD(),payloadSha256:X?cD(X):void 0}),G=g$(Y,$);return tD(JSON.stringify(G))}async function F5($,Q,J,X={}){let Y=X.fetchImpl??fetch,G=`${sD($)}/events`,q=JSON.stringify(J),W={ok:!1,status:0,body:""};for(let z=0;z<2;z++){let V=On(Q,"POST",G,q),K;try{K=await Y(G,{method:"POST",headers:{Authorization:V,"Content-Type":"application/json"},body:q})}catch(x){W={ok:!1,status:0,body:x instanceof Error?x.message:String(x)};continue}let U=await K.text().catch(()=>"");if(W={ok:K.ok,status:K.status,body:U},K.ok)return W;if(K.status!==429&&K.status<500)return W}return W}N8();var Fn=b.object({id:b.string(),publicId:b.string().nullish(),url:b.string().nullish(),title:b.string().optional(),slug:b.string().optional(),isPublic:b.boolean().optional()});async function eD($){let Q={prompt:$.prompt,publish:!0};if($.device)Q.device=$.device;if($.platform)Q.platform=$.platform;if(typeof $.issue==="number")Q.issue=$.issue;let J=await z0("/v1/figs/generate",{method:"POST",body:Q,token:$.token,apiUrl:$.apiUrl,source:"buzz-agent"}),X=Fn.safeParse(J);if(!X.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=X.data,G=Y.publicId??null,q=Y.url??(G?pD(G,$.appOrigin):null);return{id:Y.id,publicId:G,url:q,title:Y.title||Y.slug||"Untitled fig"}}var Cn=b.object({number:b.number().int(),title:b.string().default(""),body:b.string().nullish(),html_url:b.string().optional(),state:b.string().optional(),labels:b.array(b.union([b.string(),b.object({name:b.string().optional()})])).optional()}),In=b.object({number:b.number().int(),html_url:b.string().optional()}),JV="https://api.github.com";function XV($){return{Authorization:`Bearer ${$}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function YV($,Q){return`https://github.com/${$}/issues/${Q}`}function $_($,Q,J){return{method:"GET",url:`${JV}/repos/${$}/issues/${Q}`,headers:XV(J)}}function Q_($,Q,J){let X={title:J.title};if(J.body)X.body=J.body;if(J.labels&&J.labels.length)X.labels=J.labels;return{method:"POST",url:`${JV}/repos/${$}/issues`,headers:{...XV(Q),"Content-Type":"application/json"},body:JSON.stringify(X)}}function J_($,Q,J,X){return{method:"POST",url:`${JV}/repos/${$}/issues/${Q}/comments`,headers:{...XV(J),"Content-Type":"application/json"},body:JSON.stringify({body:X})}}function X_($){let Q=Cn.safeParse($);if(!Q.success)throw Error(`unexpected GitHub issue response: ${Q.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let J=Q.data,X=(J.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:J.number,title:J.title,body:J.body??"",labels:X,url:J.html_url??YV("",J.number),state:J.state}}function Y_($){let Q=In.safeParse($);if(!Q.success)throw Error(`unexpected GitHub create response: ${Q.error.issues.map((J)=>`${J.path.join(".")||"(root)"} ${J.message}`).join("; ")}`);return Q.data}function G_($){return/^[^/\s]+\/[^/\s]+$/.test($)}function q_($,Q){return`30617:${$}:${Q}`}function W_($){let Q=$.subject.trim();if(!Q)throw Error("issue subject must not be empty");let J=[["a",q_($.ownerHex,$.repoId)],["p",$.ownerHex]];for(let X of $.recipients??[])J.push(["p",X]);J.push(["subject",Q]);for(let X of $.labels??[])J.push(["t",X]);return{kind:1621,content:$.content,tags:J,created_at:$.createdAt??Math.floor(Date.now()/1000)}}function z_($){return{kind:1622,content:$.content,tags:[["a",q_($.ownerHex,$.repoId)],["e",$.issueId,"","root"],["p",$.ownerHex]],created_at:$.createdAt??Math.floor(Date.now()/1000)}}async function GV($,Q){let J=await Q($.url,{method:$.method,headers:$.headers,body:$.body}),X=await J.text().catch(()=>"");if(!J.ok){let Y=J.headers.get("x-ratelimit-remaining");if((J.status===403||J.status===429)&&Y==="0"){let G=J.headers.get("x-ratelimit-reset"),q=G?` (resets at ${new Date(Number(G)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${q} — try again shortly.`)}throw Error(`GitHub ${$.method} → ${J.status}: ${X.slice(0,200)}`)}try{return X?JSON.parse(X):{}}catch{throw Error(`GitHub returned a non-JSON ${J.status} body: ${X.slice(0,120)}`)}}class qV{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor($){this.cfg=$;if(!$.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!G_($.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${$.repo})`);this.fetchImpl=$.fetchImpl??fetch}async fetchIssue($){let Q=await GV($_(this.cfg.repo,$,this.cfg.token),this.fetchImpl);return X_(Q)}async createIssue($){let Q=Y_(await GV(Q_(this.cfg.repo,this.cfg.token,$),this.fetchImpl));return{number:Q.number,url:Q.html_url??YV(this.cfg.repo,Q.number),title:$.title}}async commentIssue($,Q){if(typeof $.number!=="number")return;await GV(J_(this.cfg.repo,$.number,this.cfg.token,Q),this.fetchImpl)}}class WV{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor($){this.cfg=$;if(!/^[0-9a-f]{64}$/i.test($.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!$.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=$.submit??F5}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue($){let Q=W_({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:$.title,content:$.body??"",labels:$.labels}),J=g$(Q,this.cfg.identity),X=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!X.ok)throw Error(`relay rejected issue event: ${X.status} ${X.body.slice(0,200)}`);return{eventId:J.id,url:`nostr:${J.id}`,title:$.title}}async commentIssue($,Q){if(!$.eventId)return;let J=z_({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:$.eventId,content:Q}),X=g$(J,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,X);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var Pn=b.object({label:b.string().optional(),relayUrl:b.string(),privateKey:b.string(),figuraToken:b.string(),apiUrl:b.string().optional(),channels:b.array(b.string()),triggers:b.array(b.string()).optional(),device:b.string().optional(),platform:b.string().optional(),appOrigin:b.string().optional(),issueTracker:b.enum(["github","buzz"]).optional(),github:b.object({token:b.string(),repo:b.string()}).optional(),buzzRepo:b.object({ownerHex:b.string(),repoId:b.string()}).optional()});function Tn($,Q){if($.issueTracker==="github"&&$.github)return new qV({token:$.github.token,repo:$.github.repo});if($.issueTracker==="buzz"&&$.buzzRepo)return new WV({relayUrl:$.relayUrl,identity:Q,ownerHex:$.buzzRepo.ownerHex,repoId:$.buzzRepo.repoId});return null}class zV{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor($){this.config=Pn.parse($),this.identity=Y7(this.config.privateKey),this.tracker=Tn(this.config,this.identity),this.deliveryQueue=new e1(this.pendingReplies,{postReply:(Q)=>this.postReply(Q),log:(Q)=>this.log(Q)})}get npub(){return this.identity.npub}log($){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${$}
|
|
599
|
+
`)}postReply($){let Q=iD({channelId:$.channelId,content:$.content,replyTo:$.replyTo,mentions:$.mentions}),J=g$(Q,this.identity);return F5(this.config.relayUrl,this.identity,J)}deps(){return{identity:{pubkeyHex:this.identity.pubkeyHex,npub:this.identity.npub},triggers:this.config.triggers,tracker:this.tracker,generate:($,Q)=>eD({token:this.config.figuraToken,apiUrl:this.config.apiUrl,prompt:$,device:this.config.device,platform:this.config.platform,appOrigin:this.config.appOrigin,issue:Q?.issue}),postReply:($)=>this.postReply($),seen:this.seen,pendingReplies:this.pendingReplies,log:($)=>this.log($)}}start(){let $=this.deps();if(this.log(`agent npub: ${this.identity.npub}`),this.log(`watching ${this.config.channels.length||"(all subscribed)"} channel(s) on ${this.config.relayUrl}`),this.tracker)this.log(`issue tracker: ${this.tracker.kind}`);this.watcher=new QV({relayUrl:this.config.relayUrl,identity:this.identity,channels:this.config.channels,onStatus:(Q)=>this.log(Q),onEvent:(Q)=>{this.queue=this.queue.then(()=>lD(Q,$)).then((J)=>{if(J.action==="delivery-failed"&&this.pendingReplies.has(Q.id))this.deliveryQueue.start(Q.id)}).catch((J)=>this.log(`handler error: ${String(J)}`))}}),this.watcher.start()}stop(){this.deliveryQueue.stop(),this.watcher?.close()}}function An($){let Q={label:eQ($),relayUrl:$.relayUrl,privateKey:$.privateKey,figuraToken:$.figuraToken,apiUrl:$.apiUrl,channels:$.channels,appOrigin:$.appOrigin,device:$.device,platform:$.platform,issueTracker:$.tracker?.kind};if($.triggers&&$.triggers.length)Q.triggers=$.triggers;if($.tracker?.kind==="github")Q.github={token:$.tracker.token??"",repo:$.tracker.repo??""};if($.tracker?.kind==="buzz")Q.buzzRepo={ownerHex:$.tracker.ownerHex??"",repoId:$.tracker.repoId??""};return Q}class VV{bindings;agentFactory;log;running=[];constructor($,Q={}){this.bindings=$;this.agentFactory=Q.agentFactory??((J)=>new zV(An(J))),this.log=Q.log??((J)=>process.stderr.write(`${J}
|
|
600
|
+
`))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let $ of this.bindings){let Q=eQ($);try{let J=this.agentFactory($);J.start(),this.running.push({label:Q,agent:J})}catch(J){this.log(`[${Q}] failed to start: ${J instanceof Error?J.message:String(J)}`)}}this.log(`[supervisor] ${this.running.length}/${this.bindings.length} binding(s) running`)}stop(){for(let{label:$,agent:Q}of this.running)try{Q.stop()}catch(J){this.log(`[${$}] error on stop: ${J instanceof Error?J.message:String(J)}`)}this.running.length=0}}var kn=`figura buzz — run a Figura agent inside one or more Buzz communities
|
|
541
601
|
|
|
542
602
|
Usage:
|
|
543
603
|
figura buzz agent [options] Connect + watch channels, fig on request
|
|
@@ -580,14 +640,14 @@ Trigger grammar (in a watched channel):
|
|
|
580
640
|
@figura file issue: <title> File a new tracker issue.
|
|
581
641
|
@figura fig this and file it: <desc>
|
|
582
642
|
File an issue AND fig it, cross-linked.
|
|
583
|
-
`;function
|
|
643
|
+
`;function V_($,Q){let J=[];for(let X=0;X<$.length;X++)if($[X]===`--${Q}`&&$[X+1])J.push($[X+1]);return J}function K_($){return($??"").split(",").map((Q)=>Q.trim()).filter(Boolean)}async function U_($){let{flags:Q}=Q0($),J=h(Q,"config"),X=process.env.BUZZ_AGENTS_JSON;if(J&&X)P("both --config and BUZZ_AGENTS_JSON are set — pass exactly one bindings source.");if(J){let Y;try{Y=await En(J,"utf8")}catch(G){P(`could not read --config ${J}: ${G instanceof Error?G.message:String(G)}`)}return{raw:Y,source:`--config ${J}`}}if(X)return{raw:X,source:"BUZZ_AGENTS_JSON"};return null}function cn($){let{flags:Q}=Q0($);return Boolean(process.env.BUZZ_RELAY_URL||process.env.BUZZ_PRIVATE_KEY||process.env.BUZZ_CHANNELS||h(Q,"relay")||h(Q,"key"))}async function Sn($){let{flags:Q}=Q0($),J=h(Q,"relay")||process.env.BUZZ_RELAY_URL||"";if(!J)P("BUZZ_RELAY_URL (or --relay) is required.");let X=h(Q,"key")||process.env.BUZZ_PRIVATE_KEY||"";if(!X)P("BUZZ_PRIVATE_KEY (or --key) is required.");let Y=await s0({tokenFlag:h(Q,"token"),apiUrlFlag:h(Q,"api-url")}),G=Y.token;if(!G)P("FIGURA_TOKEN (or --token / `figura login`) is required — it binds figs to the team brand.");let q=[...V_($,"channel"),...K_(process.env.BUZZ_CHANNELS)],W=V_($,"trigger"),z=W.length?W:K_(process.env.BUZZ_TRIGGERS),V=(process.env.FIGURA_ISSUE_TRACKER||"").trim().toLowerCase();if(V&&V!=="github"&&V!=="buzz")P(`FIGURA_ISSUE_TRACKER must be "github" or "buzz" (got: ${process.env.FIGURA_ISSUE_TRACKER}).`);let K=process.env.GITHUB_REPO,U=process.env.GITHUB_TOKEN,x=process.env.BUZZ_REPO_OWNER,M=process.env.BUZZ_REPO_ID,H,w=V==="github"||V==="buzz"?V:K?"github":x&&M?"buzz":void 0;if(w==="github")H={kind:"github",token:U??"",repo:K??""};else if(w==="buzz")H={kind:"buzz",ownerHex:x??"",repoId:M??""};let j={relayUrl:J,privateKey:X,figuraToken:G,channels:q};if(z.length)j.triggers=z;if(Y.apiUrl)j.apiUrl=Y.apiUrl;if(process.env.FIGURA_APP_URL)j.appOrigin=process.env.FIGURA_APP_URL;let Z=h(Q,"device")||process.env.BUZZ_FIG_DEVICE;if(Z)j.device=Z;let L=h(Q,"platform")||process.env.BUZZ_FIG_PLATFORM;if(L)j.platform=L;if(H)j.tracker=H;let D=YL(j);if(D.length)P(`invalid configuration (check the BUZZ_*/FIGURA_*/GITHUB_* env + flags):
|
|
584
644
|
${D.join(`
|
|
585
|
-
`)}`);return
|
|
586
|
-
`)})}return[await
|
|
645
|
+
`)}`);return j}async function bn($){let Q=await U_($);if(Q){if(cn($))P(`a bindings config (${Q.source}) and flat BUZZ_RELAY_URL/BUZZ_PRIVATE_KEY are both set — `+"use one or the other (the config is not merged with the flat env).");return Tz(Q.raw,{source:Q.source,onWarn:(J)=>process.stderr.write(`[supervisor] warning: ${J}
|
|
646
|
+
`)})}return[await Sn($)]}async function fn($){let Q=await bn($),J=new VV(Q);J.start();let X=()=>{process.stderr.write(`
|
|
587
647
|
[supervisor] shutting down
|
|
588
|
-
`),
|
|
589
|
-
`)}return}let
|
|
590
|
-
`)}async function
|
|
648
|
+
`),J.stop(),process.exit(0)};process.on("SIGINT",X),process.on("SIGTERM",X),await new Promise(()=>{})}async function mn($){let Q=await U_($);if(Q){let X=Tz(Q.raw,Q.source);for(let Y of X){let G=Y7(Y.privateKey);process.stdout.write(`${eQ(Y)} ${G.npub}
|
|
649
|
+
`)}return}let J=process.env.BUZZ_PRIVATE_KEY;if(!J)P("BUZZ_PRIVATE_KEY is required to derive the agent npub.");process.stdout.write(`${Y7(J).npub}
|
|
650
|
+
`)}async function x_($){let Q=$[0],J=$.slice(1);if(!Q||Q==="--help"||Q==="-h"||Q==="help"){process.stdout.write(kn);return}switch(Q){case"agent":return fn(J);case"whoami":return mn(J);default:P(`unknown buzz subcommand '${Q}'. Run \`figura buzz --help\`.`)}}n7();B8();r0();IJ();var yn=o8(),hn=new Set(["upgrade","update","doctor","hook","mcp"]),pn=`figura — command-line client for the Figura visualization SaaS
|
|
591
651
|
|
|
592
652
|
Usage:
|
|
593
653
|
figura <command> [options]
|
|
@@ -612,6 +672,8 @@ Commands:
|
|
|
612
672
|
install Set up the full Claude Code integration in one command
|
|
613
673
|
(skill + update hook + status badge; --uninstall reverses)
|
|
614
674
|
skill install Install the /fig skill into Claude Code (~/.claude/skills)
|
|
675
|
+
skill diff Show what your installed /fig skill has that the canonical
|
|
676
|
+
one does not (read-only)
|
|
615
677
|
mcp Run the Figura MCP server (claude mcp add figura -- figura mcp)
|
|
616
678
|
buzz agent Run a Figura agent in a Buzz community (figs on request)
|
|
617
679
|
doctor Check the CLI, MCP, and skills are up to date
|
|
@@ -625,8 +687,8 @@ Global options:
|
|
|
625
687
|
--help, -h Show help
|
|
626
688
|
--version, -v Show version
|
|
627
689
|
|
|
628
|
-
Run \`figura <command> --help\` for command-specific help.`;async function
|
|
629
|
-
`);return}if(
|
|
630
|
-
`);return}if(!
|
|
631
|
-
`),process.exit(1)}}
|
|
690
|
+
Run \`figura <command> --help\` for command-specific help.`;async function un(){let $=process.argv.slice(2),Q=$[0],J=$.slice(1);if(!Q||Q==="help"||Q==="--help"||Q==="-h"){process.stdout.write(pn+`
|
|
691
|
+
`);return}if(Q==="--version"||Q==="-v"||Q==="version"){process.stdout.write(yn+`
|
|
692
|
+
`);return}if(!hn.has(Q)){let{apiUrl:X}=await s0({apiUrlFlag:h(Q0(J).flags,"api-url")});await Lx($,X)}switch(Q){case"login":return Nz(J);case"link":return Nz([...J,"--project"]);case"whoami":return Dj(J);case"brand":return Nj(J);case"teams":return vj(J);case"fig":return Aj(J);case"comment":return Ej(J);case"token":return kj(J);case"sources":return Sj(J);case"install":return Rj(J);case"skill":return qj(J);case"mcp":return bj(J);case"buzz":return x_(J);case"doctor":return hj(J);case"hook":return xj(J);case"statusline":return Bj(J);case"upgrade":case"update":return fj(J);default:process.stderr.write(`figura: unknown command '${Q}'. Run \`figura --help\`.
|
|
693
|
+
`),process.exit(1)}}un().catch(($)=>{process.stderr.write(`figura: ${a($)}
|
|
632
694
|
`),process.exit(1)});
|