@raycast/api 1.87.0 → 1.87.2
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/commands/build/index.js +36 -36
- package/dist/commands/develop/index.js +36 -36
- package/dist/commands/lint/index.js +11 -11
- package/dist/commands/logout/index.js +1 -1
- package/dist/commands/publish/index.js +62 -62
- package/dist/commands/pull-contributions/index.js +4 -4
- package/dist/commands/validate/index.js +44 -44
- package/dist/commands/version/index.js +1 -1
- package/dist/utils/esbuild-plugins/swift-files.js +3 -3
- package/dist/utils/output.js +1 -1
- package/dist/utils/publish/git.js +2 -2
- package/dist/utils/publish/publish-to-public-repo.js +4 -4
- package/dist/utils/publish/publish-to-store.js +47 -47
- package/dist/utils/publish/pull-contributions.js +4 -4
- package/dist/utils/publish/setup-github-fork.js +4 -4
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -11,21 +11,21 @@ Content-Type: ${l.type||"application/octet-stream"}\r
|
|
|
11
11
|
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),He=(e,r,o)=>{if(r.length<o)throw new TypeError(`Failed to execute '${e}' on 'FormData': ${o} arguments required, but only ${r.length} present.`)},Bt=class{#e=[];constructor(...r){if(r.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[wt](){return"FormData"}[Uu](){return this.entries()}static[Hu](r){return r&&typeof r=="object"&&r[wt]==="FormData"&&!Gu.some(o=>typeof r[o]!="function")}append(...r){He("append",arguments,2),this.#e.push(zo(...r))}delete(r){He("delete",arguments,1),r+="",this.#e=this.#e.filter(([o])=>o!==r)}get(r){He("get",arguments,1),r+="";for(var o=this.#e,i=o.length,u=0;u<i;u++)if(o[u][0]===r)return o[u][1];return null}getAll(r,o){return He("getAll",arguments,1),o=[],r+="",this.#e.forEach(i=>i[0]===r&&o.push(i[1])),o}has(r){return He("has",arguments,1),r+="",this.#e.some(o=>o[0]===r)}forEach(r,o){He("forEach",arguments,1);for(var[i,u]of this)r.call(o,u,i,this)}set(...r){He("set",arguments,2);var o=[],i=!0;r=zo(...r),this.#e.forEach(u=>{u[0]===r[0]?i&&(i=!o.push(r)):o.push(u)}),i&&o.push(r),this.#e=o}*entries(){yield*this.#e}*keys(){for(var[r]of this)yield r}*values(){for(var[,r]of this)yield r}}}}),qf=Xo({"node_modules/node-domexception/index.js"(e,r){if(!globalThis.DOMException)try{let{MessageChannel:o}=require("worker_threads"),i=new o().port1,u=new ArrayBuffer;i.postMessage(u,[u,u])}catch(o){o.constructor.name==="DOMException"&&(globalThis.DOMException=o.constructor)}r.exports=globalThis.DOMException}}),nr,Yu,Vu,an,ia,sa,ua,aa,Uo,Ho,ln,la=lr({"node_modules/fetch-blob/from.js"(){nr=K(require("fs")),Yu=K(require("path")),Vu=K(qf()),oa(),cr(),{stat:an}=nr.promises,ia=(e,r)=>Uo((0,nr.statSync)(e),e,r),sa=(e,r)=>an(e).then(o=>Uo(o,e,r)),ua=(e,r)=>an(e).then(o=>Ho(o,e,r)),aa=(e,r)=>Ho((0,nr.statSync)(e),e,r),Uo=(e,r,o="")=>new Rt([new ln({path:r,size:e.size,lastModified:e.mtimeMs,start:0})],{type:o}),Ho=(e,r,o="")=>new fr([new ln({path:r,size:e.size,lastModified:e.mtimeMs,start:0})],(0,Yu.basename)(r),{type:o,lastModified:e.mtimeMs}),ln=class{#e;#r;constructor(e){this.#e=e.path,this.#r=e.start,this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new ln({path:this.#e,lastModified:this.lastModified,size:r-e,start:this.#r+e})}async*stream(){let{mtimeMs:e}=await an(this.#e);if(e>this.lastModified)throw new Vu.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,nr.createReadStream)(this.#e,{start:this.#r,end:this.#r+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}}}),ca={};na(ca,{toFormData:()=>jf});function Nf(e){let r=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!r)return;let o=r[2]||r[3]||"",i=o.slice(o.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(u,l)=>String.fromCharCode(l)),i}async function jf(e,r){if(!/multipart/i.test(r))throw new TypeError("Failed to fetch");let o=r.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!o)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new fa(o[1]||o[2]),u,l,f,d,p,g,x=[],Y=new Bt,U=E=>{f+=R.decode(E,{stream:!0})},y=E=>{x.push(E)},m=()=>{let E=new fr(x,g,{type:p});Y.append(d,E)},b=()=>{Y.append(d,f)},R=new TextDecoder("utf-8");R.decode(),i.onPartBegin=function(){i.onPartData=U,i.onPartEnd=b,u="",l="",f="",d="",p="",g=null,x.length=0},i.onHeaderField=function(E){u+=R.decode(E,{stream:!0})},i.onHeaderValue=function(E){l+=R.decode(E,{stream:!0})},i.onHeaderEnd=function(){if(l+=R.decode(),u=u.toLowerCase(),u==="content-disposition"){let E=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);E&&(d=E[2]||E[3]||""),g=Nf(l),g&&(i.onPartData=y,i.onPartEnd=m)}else u==="content-type"&&(p=l);l="",u=""};for await(let E of e)i.write(E);return i.end(),Y}var ge,k,Go,ke,or,ir,Qu,St,Ju,Ku,Zu,Xu,Ge,fa,zf=lr({"node_modules/node-fetch/src/utils/multipart-parser.js"(){la(),gn(),ge=0,k={START_BOUNDARY:ge++,HEADER_FIELD_START:ge++,HEADER_FIELD:ge++,HEADER_VALUE_START:ge++,HEADER_VALUE:ge++,HEADER_VALUE_ALMOST_DONE:ge++,HEADERS_ALMOST_DONE:ge++,PART_DATA_START:ge++,PART_DATA:ge++,END:ge++},Go=1,ke={PART_BOUNDARY:Go,LAST_BOUNDARY:Go*=2},or=10,ir=13,Qu=32,St=45,Ju=58,Ku=97,Zu=122,Xu=e=>e|32,Ge=()=>{},fa=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=Ge,this.onHeaderField=Ge,this.onHeadersEnd=Ge,this.onHeaderValue=Ge,this.onPartBegin=Ge,this.onPartData=Ge,this.onPartEnd=Ge,this.boundaryChars={},e=`\r
|
|
12
12
|
--`+e;let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e.charCodeAt(o),this.boundaryChars[r[o]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=k.START_BOUNDARY}write(e){let r=0,o=e.length,i=this.index,{lookbehind:u,boundary:l,boundaryChars:f,index:d,state:p,flags:g}=this,x=this.boundary.length,Y=x-1,U=e.length,y,m,b=J=>{this[J+"Mark"]=r},R=J=>{delete this[J+"Mark"]},E=(J,O,$,H)=>{(O===void 0||O!==$)&&this[J](H&&H.subarray(O,$))},Q=(J,O)=>{let $=J+"Mark";$ in this&&(O?(E(J,this[$],r,e),delete this[$]):(E(J,this[$],e.length,e),this[$]=0))};for(r=0;r<o;r++)switch(y=e[r],p){case k.START_BOUNDARY:if(d===l.length-2){if(y===St)g|=ke.LAST_BOUNDARY;else if(y!==ir)return;d++;break}else if(d-1===l.length-2){if(g&ke.LAST_BOUNDARY&&y===St)p=k.END,g=0;else if(!(g&ke.LAST_BOUNDARY)&&y===or)d=0,E("onPartBegin"),p=k.HEADER_FIELD_START;else return;break}y!==l[d+2]&&(d=-2),y===l[d+2]&&d++;break;case k.HEADER_FIELD_START:p=k.HEADER_FIELD,b("onHeaderField"),d=0;case k.HEADER_FIELD:if(y===ir){R("onHeaderField"),p=k.HEADERS_ALMOST_DONE;break}if(d++,y===St)break;if(y===Ju){if(d===1)return;Q("onHeaderField",!0),p=k.HEADER_VALUE_START;break}if(m=Xu(y),m<Ku||m>Zu)return;break;case k.HEADER_VALUE_START:if(y===Qu)break;b("onHeaderValue"),p=k.HEADER_VALUE;case k.HEADER_VALUE:y===ir&&(Q("onHeaderValue",!0),E("onHeaderEnd"),p=k.HEADER_VALUE_ALMOST_DONE);break;case k.HEADER_VALUE_ALMOST_DONE:if(y!==or)return;p=k.HEADER_FIELD_START;break;case k.HEADERS_ALMOST_DONE:if(y!==or)return;E("onHeadersEnd"),p=k.PART_DATA_START;break;case k.PART_DATA_START:p=k.PART_DATA,b("onPartData");case k.PART_DATA:if(i=d,d===0){for(r+=Y;r<U&&!(e[r]in f);)r+=x;r-=Y,y=e[r]}if(d<l.length)l[d]===y?(d===0&&Q("onPartData",!0),d++):d=0;else if(d===l.length)d++,y===ir?g|=ke.PART_BOUNDARY:y===St?g|=ke.LAST_BOUNDARY:d=0;else if(d-1===l.length)if(g&ke.PART_BOUNDARY){if(d=0,y===or){g&=~ke.PART_BOUNDARY,E("onPartEnd"),E("onPartBegin"),p=k.HEADER_FIELD_START;break}}else g&ke.LAST_BOUNDARY&&y===St?(E("onPartEnd"),p=k.END,g=0):d=0;if(d>0)u[d-1]=y;else if(i>0){let J=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);E("onPartData",0,i,J),i=0,b("onPartData"),r--}break;case k.END:break;default:throw new Error(`Unexpected state entered: ${p}`)}Q("onHeaderField"),Q("onHeaderValue"),Q("onPartData"),this.index=d,this.state=p,this.flags=g}end(){if(this.state===k.HEADER_FIELD_START&&this.index===0||this.state===k.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==k.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}}});na(ga,{AbortError:()=>ma,Blob:()=>Qo,FetchError:()=>Fe,File:()=>fr,FormData:()=>Bt,Headers:()=>Ie,Request:()=>ar,Response:()=>re,blobFrom:()=>sa,blobFromSync:()=>ia,default:()=>pa,fileFrom:()=>ua,fileFromSync:()=>aa,isRedirect:()=>ti});var Uf=K(require("http")),Hf=K(require("https")),vt=K(require("zlib")),_e=K(require("stream")),cn=K(require("buffer"));function Gf(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");let o=e.substring(5,r).split(";"),i="",u=!1,l=o[0]||"text/plain",f=l;for(let x=1;x<o.length;x++)o[x]==="base64"?u=!0:o[x]&&(f+=`;${o[x]}`,o[x].indexOf("charset=")===0&&(i=o[x].substring(8)));!o[0]&&!i.length&&(f+=";charset=US-ASCII",i="US-ASCII");let d=u?"base64":"ascii",p=unescape(e.substring(r+1)),g=Buffer.from(p,d);return g.type=l,g.typeFull=f,g.charset=i,g}var Yf=Gf,Ee=K(require("stream")),Tt=K(require("util")),ue=K(require("buffer"));cr();gn();var bn=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}},Fe=class extends bn{constructor(e,r,o){super(e,r),o&&(this.code=this.errno=o.code,this.erroredSysCall=o.syscall)}},Dn=Symbol.toStringTag,da=e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[Dn]==="URLSearchParams",hn=e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[Dn]),Vf=e=>typeof e=="object"&&(e[Dn]==="AbortSignal"||e[Dn]==="EventTarget"),Qf=(e,r)=>{let o=new URL(r).hostname,i=new URL(e).hostname;return o===i||o.endsWith(`.${i}`)},Jf=(e,r)=>{let o=new URL(r).protocol,i=new URL(e).protocol;return o===i},Kf=(0,Tt.promisify)(Ee.default.pipeline),ee=Symbol("Body internals"),ur=class{constructor(e,{size:r=0}={}){let o=null;e===null?e=null:da(e)?e=ue.Buffer.from(e.toString()):hn(e)||ue.Buffer.isBuffer(e)||(Tt.types.isAnyArrayBuffer(e)?e=ue.Buffer.from(e):ArrayBuffer.isView(e)?e=ue.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof Ee.default||(e instanceof Bt?(e=Mf(e),o=e.type.split("=")[1]):e=ue.Buffer.from(String(e))));let i=e;ue.Buffer.isBuffer(e)?i=Ee.default.Readable.from(e):hn(e)&&(i=Ee.default.Readable.from(e.stream())),this[ee]={body:e,stream:i,boundary:o,disturbed:!1,error:null},this.size=r,e instanceof Ee.default&&e.on("error",u=>{let l=u instanceof bn?u:new Fe(`Invalid response body while trying to fetch ${this.url}: ${u.message}`,"system",u);this[ee].error=l})}get body(){return this[ee].stream}get bodyUsed(){return this[ee].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:o}=await Yo(this);return e.slice(r,r+o)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let o=new Bt,i=new URLSearchParams(await this.text());for(let[u,l]of i)o.append(u,l);return o}let{toFormData:r}=await Promise.resolve().then(()=>(zf(),ca));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[ee].body&&this[ee].body.type||"",r=await this.arrayBuffer();return new Rt([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await Yo(this);return new TextDecoder().decode(e)}buffer(){return Yo(this)}};ur.prototype.buffer=(0,Tt.deprecate)(ur.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(ur.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,Tt.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Yo(e){if(e[ee].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[ee].disturbed=!0,e[ee].error)throw e[ee].error;let{body:r}=e;if(r===null||!(r instanceof Ee.default))return ue.Buffer.alloc(0);let o=[],i=0;try{for await(let u of r){if(e.size>0&&i+u.length>e.size){let l=new Fe(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw r.destroy(l),l}i+=u.length,o.push(u)}}catch(u){throw u instanceof bn?u:new Fe(`Invalid response body while trying to fetch ${e.url}: ${u.message}`,"system",u)}if(r.readableEnded===!0||r._readableState.ended===!0)try{return o.every(u=>typeof u=="string")?ue.Buffer.from(o.join("")):ue.Buffer.concat(o,i)}catch(u){throw new Fe(`Could not create Buffer from response body for ${e.url}: ${u.message}`,"system",u)}else throw new Fe(`Premature close of server response while trying to fetch ${e.url}`)}var ei=(e,r)=>{let o,i,{body:u}=e[ee];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return u instanceof Ee.default&&typeof u.getBoundary!="function"&&(o=new Ee.PassThrough({highWaterMark:r}),i=new Ee.PassThrough({highWaterMark:r}),u.pipe(o),u.pipe(i),e[ee].stream=o,u=i),u},Zf=(0,Tt.deprecate)(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Da=(e,r)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":da(e)?"application/x-www-form-urlencoded;charset=UTF-8":hn(e)?e.type||null:ue.Buffer.isBuffer(e)||Tt.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof Bt?`multipart/form-data; boundary=${r[ee].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${Zf(e)}`:e instanceof Ee.default?null:"text/plain;charset=UTF-8",Xf=e=>{let{body:r}=e[ee];return r===null?0:hn(r)?r.size:ue.Buffer.isBuffer(r)?r.length:r&&typeof r.getLengthSync=="function"&&r.hasKnownLength&&r.hasKnownLength()?r.getLengthSync():null},ed=async(e,{body:r})=>{r===null?e.end():await Kf(r,e)},ea=K(require("util")),mn=K(require("http")),dn=typeof mn.default.validateHeaderName=="function"?mn.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let r=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),r}},Zo=typeof mn.default.validateHeaderValue=="function"?mn.default.validateHeaderValue:(e,r)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){let o=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(o,"code",{value:"ERR_INVALID_CHAR"}),o}},Ie=class extends URLSearchParams{constructor(e){let r=[];if(e instanceof Ie){let o=e.raw();for(let[i,u]of Object.entries(o))r.push(...u.map(l=>[i,l]))}else if(e!=null)if(typeof e=="object"&&!ea.types.isBoxedPrimitive(e)){let o=e[Symbol.iterator];if(o==null)r.push(...Object.entries(e));else{if(typeof o!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||ea.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([o,i])=>(dn(o),Zo(o,String(i)),[String(o).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(o,i,u){switch(i){case"append":case"set":return(l,f)=>(dn(l),Zo(l,String(f)),URLSearchParams.prototype[i].call(o,String(l).toLowerCase(),String(f)));case"delete":case"has":case"getAll":return l=>(dn(l),URLSearchParams.prototype[i].call(o,String(l).toLowerCase()));case"keys":return()=>(o.sort(),new Set(URLSearchParams.prototype.keys.call(o)).keys());default:return Reflect.get(o,i,u)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let o=r.join(", ");return/^content-encoding$/i.test(e)&&(o=o.toLowerCase()),o}forEach(e,r=void 0){for(let o of this.keys())Reflect.apply(e,r,[this.get(o),o,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let o=this.getAll(r);return r==="host"?e[r]=o[0]:e[r]=o.length>1?o:o[0],e},{})}};Object.defineProperties(Ie.prototype,["get","entries","forEach","values"].reduce((e,r)=>(e[r]={enumerable:!0},e),{}));function td(e=[]){return new Ie(e.reduce((r,o,i,u)=>(i%2===0&&r.push(u.slice(i,i+2)),r),[]).filter(([r,o])=>{try{return dn(r),Zo(r,String(o)),!0}catch{return!1}}))}var rd=new Set([301,302,303,307,308]),ti=e=>rd.has(e),be=Symbol("Response internals"),re=class extends ur{constructor(e=null,r={}){super(e,r);let o=r.status!=null?r.status:200,i=new Ie(r.headers);if(e!==null&&!i.has("Content-Type")){let u=Da(e,this);u&&i.append("Content-Type",u)}this[be]={type:"default",url:r.url,status:o,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[be].type}get url(){return this[be].url||""}get status(){return this[be].status}get ok(){return this[be].status>=200&&this[be].status<300}get redirected(){return this[be].counter>0}get statusText(){return this[be].statusText}get headers(){return this[be].headers}get highWaterMark(){return this[be].highWaterMark}clone(){return new re(ei(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!ti(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new re(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new re(null,{status:0,statusText:""});return e[be].type="error",e}static json(e=void 0,r={}){let o=JSON.stringify(e);if(o===void 0)throw new TypeError("data is not JSON serializable");let i=new Ie(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new re(o,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(re.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});var nd=K(require("url")),od=K(require("util")),id=e=>{if(e.search)return e.search;let r=e.href.length-1,o=e.hash||(e.href[r]==="#"?"#":"");return e.href[r-o.length]==="?"?"?":""},sd=K(require("net"));function ta(e,r=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",r&&(e.pathname="",e.search=""),e)}var ha=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),ud="strict-origin-when-cross-origin";function ad(e){if(!ha.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function ld(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let r=e.host.replace(/(^\[)|(]$)/g,""),o=(0,sd.isIP)(r);return o===4&&/^127\./.test(r)||o===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(r)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function At(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:ld(e)}function cd(e,{referrerURLCallback:r,referrerOriginCallback:o}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let i=e.referrerPolicy;if(e.referrer==="about:client")return"no-referrer";let u=e.referrer,l=ta(u),f=ta(u,!0);l.toString().length>4096&&(l=f),r&&(l=r(l)),o&&(f=o(f));let d=new URL(e.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return f;case"unsafe-url":return l;case"strict-origin":return At(l)&&!At(d)?"no-referrer":f.toString();case"strict-origin-when-cross-origin":return l.origin===d.origin?l:At(l)&&!At(d)?"no-referrer":f;case"same-origin":return l.origin===d.origin?l:"no-referrer";case"origin-when-cross-origin":return l.origin===d.origin?l:f;case"no-referrer-when-downgrade":return At(l)&&!At(d)?"no-referrer":l;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function fd(e){let r=(e.get("referrer-policy")||"").split(/[,\s]+/),o="";for(let i of r)i&&ha.has(i)&&(o=i);return o}var V=Symbol("Request internals"),sr=e=>typeof e=="object"&&typeof e[V]=="object",dd=(0,od.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),ar=class extends ur{constructor(e,r={}){let o;if(sr(e)?o=new URL(e.url):(o=new URL(e),e={}),o.username!==""||o.password!=="")throw new TypeError(`${o} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!sr(r)&&"data"in r&&dd(),(r.body!=null||sr(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let u=r.body?r.body:sr(e)&&e.body!==null?ei(e):null;super(u,{size:r.size||e.size||0});let l=new Ie(r.headers||e.headers||{});if(u!==null&&!l.has("Content-Type")){let p=Da(u,this);p&&l.set("Content-Type",p)}let f=sr(e)?e.signal:null;if("signal"in r&&(f=r.signal),f!=null&&!Vf(f))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let d=r.referrer==null?e.referrer:r.referrer;if(d==="")d="no-referrer";else if(d){let p=new URL(d);d=/^about:(\/\/)?client$/.test(p)?"client":p}else d=void 0;this[V]={method:i,redirect:r.redirect||e.redirect||"follow",headers:l,parsedURL:o,signal:f,referrer:d},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[V].method}get url(){return(0,nd.format)(this[V].parsedURL)}get headers(){return this[V].headers}get redirect(){return this[V].redirect}get signal(){return this[V].signal}get referrer(){if(this[V].referrer==="no-referrer")return"";if(this[V].referrer==="client")return"about:client";if(this[V].referrer)return this[V].referrer.toString()}get referrerPolicy(){return this[V].referrerPolicy}set referrerPolicy(e){this[V].referrerPolicy=ad(e)}clone(){return new ar(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(ar.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var Dd=e=>{let{parsedURL:r}=e[V],o=new Ie(e[V].headers);o.has("Accept")||o.set("Accept","*/*");let i=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(i="0"),e.body!==null){let d=Xf(e);typeof d=="number"&&!Number.isNaN(d)&&(i=String(d))}i&&o.set("Content-Length",i),e.referrerPolicy===""&&(e.referrerPolicy=ud),e.referrer&&e.referrer!=="no-referrer"?e[V].referrer=cd(e):e[V].referrer="no-referrer",e[V].referrer instanceof URL&&o.set("Referer",e.referrer),o.has("User-Agent")||o.set("User-Agent","node-fetch"),e.compress&&!o.has("Accept-Encoding")&&o.set("Accept-Encoding","gzip, deflate, br");let{agent:u}=e;typeof u=="function"&&(u=u(r));let l=id(r),f={path:r.pathname+l,method:e.method,headers:o[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:u};return{parsedURL:r,options:f}},ma=class extends bn{constructor(e,r="aborted"){super(e,r)}};gn();la();var hd=new Set(["data:","http:","https:"]);async function pa(e,r){return new Promise((o,i)=>{let u=new ar(e,r),{parsedURL:l,options:f}=Dd(u);if(!hd.has(l.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${l.protocol.replace(/:$/,"")}" is not supported.`);if(l.protocol==="data:"){let m=Yf(u.url),b=new re(m,{headers:{"Content-Type":m.typeFull}});o(b);return}let d=(l.protocol==="https:"?Hf.default:Uf.default).request,{signal:p}=u,g=null,x=()=>{let m=new ma("The operation was aborted.");i(m),u.body&&u.body instanceof _e.default.Readable&&u.body.destroy(m),!(!g||!g.body)&&g.body.emit("error",m)};if(p&&p.aborted){x();return}let Y=()=>{x(),y()},U=d(l.toString(),f);p&&p.addEventListener("abort",Y);let y=()=>{U.abort(),p&&p.removeEventListener("abort",Y)};U.on("error",m=>{i(new Fe(`request to ${u.url} failed, reason: ${m.message}`,"system",m)),y()}),md(U,m=>{g&&g.body&&g.body.destroy(m)}),process.version<"v14"&&U.on("socket",m=>{let b;m.prependListener("end",()=>{b=m._eventsCount}),m.prependListener("close",R=>{if(g&&b<m._eventsCount&&!R){let E=new Error("Premature close");E.code="ERR_STREAM_PREMATURE_CLOSE",g.body.emit("error",E)}})}),U.on("response",m=>{U.setTimeout(0);let b=td(m.rawHeaders);if(ti(m.statusCode)){let O=b.get("Location"),$=null;try{$=O===null?null:new URL(O,u.url)}catch{if(u.redirect!=="manual"){i(new Fe(`uri requested responds with an invalid redirect URL: ${O}`,"invalid-redirect")),y();return}}switch(u.redirect){case"error":i(new Fe(`uri requested responds with a redirect, redirect mode is set to error: ${u.url}`,"no-redirect")),y();return;case"manual":break;case"follow":{if($===null)break;if(u.counter>=u.follow){i(new Fe(`maximum redirect reached at: ${u.url}`,"max-redirect")),y();return}let H={headers:new Ie(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:ei(u),signal:u.signal,size:u.size,referrer:u.referrer,referrerPolicy:u.referrerPolicy};if(!Qf(u.url,$)||!Jf(u.url,$))for(let Ce of["authorization","www-authenticate","cookie","cookie2"])H.headers.delete(Ce);if(m.statusCode!==303&&u.body&&r.body instanceof _e.default.Readable){i(new Fe("Cannot follow redirect with body being a readable stream","unsupported-redirect")),y();return}(m.statusCode===303||(m.statusCode===301||m.statusCode===302)&&u.method==="POST")&&(H.method="GET",H.body=void 0,H.headers.delete("content-length"));let Ve=fd(b);Ve&&(H.referrerPolicy=Ve),o(pa(new ar($,H))),y();return}default:return i(new TypeError(`Redirect option '${u.redirect}' is not a valid value of RequestRedirect`))}}p&&m.once("end",()=>{p.removeEventListener("abort",Y)});let R=(0,_e.pipeline)(m,new _e.PassThrough,O=>{O&&i(O)});process.version<"v12.10"&&m.on("aborted",Y);let E={url:u.url,status:m.statusCode,statusText:m.statusMessage,headers:b,size:u.size,counter:u.counter,highWaterMark:u.highWaterMark},Q=b.get("Content-Encoding");if(!u.compress||u.method==="HEAD"||Q===null||m.statusCode===204||m.statusCode===304){g=new re(R,E),o(g);return}let J={flush:vt.default.Z_SYNC_FLUSH,finishFlush:vt.default.Z_SYNC_FLUSH};if(Q==="gzip"||Q==="x-gzip"){R=(0,_e.pipeline)(R,vt.default.createGunzip(J),O=>{O&&i(O)}),g=new re(R,E),o(g);return}if(Q==="deflate"||Q==="x-deflate"){let O=(0,_e.pipeline)(m,new _e.PassThrough,$=>{$&&i($)});O.once("data",$=>{($[0]&15)===8?R=(0,_e.pipeline)(R,vt.default.createInflate(),H=>{H&&i(H)}):R=(0,_e.pipeline)(R,vt.default.createInflateRaw(),H=>{H&&i(H)}),g=new re(R,E),o(g)}),O.once("end",()=>{g||(g=new re(R,E),o(g))});return}if(Q==="br"){R=(0,_e.pipeline)(R,vt.default.createBrotliDecompress(),O=>{O&&i(O)}),g=new re(R,E),o(g);return}g=new re(R,E),o(g)}),ed(U,u).catch(i)})}function md(e,r){let o=cn.Buffer.from(`0\r
|
|
13
13
|
\r
|
|
14
|
-
`),i=!1,u=!1,l;e.on("response",f=>{let{headers:d}=f;i=d["transfer-encoding"]==="chunked"&&!d["content-length"]}),e.on("socket",f=>{let d=()=>{if(i&&!u){let g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",r(g)}},p=g=>{u=cn.Buffer.compare(g.slice(-5),o)===0,!u&&l&&(u=cn.Buffer.compare(l.slice(-3),o.slice(0,3))===0&&cn.Buffer.compare(g.slice(-2),o.slice(3))===0),l=g};f.prependListener("close",d),f.on("data",p),e.on("close",()=>{f.removeListener("close",d),f.removeListener("data",p)})})}cr();gn();});var ni=Be((lh,ya)=>{"use strict";var Fa=require("fs"),ri;function pd(){try{return Fa.statSync("/.dockerenv"),!0}catch{return!1}}function gd(){try{return Fa.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}ya.exports=()=>(ri===void 0&&(ri=pd()||gd()),ri)});var Ca=Be((ch,oi)=>{"use strict";var bd=require("os"),Fd=require("fs"),_a=ni(),Ea=()=>{if(process.platform!=="linux")return!1;if(bd.release().toLowerCase().includes("microsoft"))return!_a();try{return Fd.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!_a():!1}catch{return!1}};process.env.__IS_WSL_TEST__?oi.exports=Ea:oi.exports=Ea()});var Sa=Be((fh,wa)=>{"use strict";wa.exports=(e,r,o)=>{let i=u=>Object.defineProperty(e,r,{value:u,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let u=o();return i(u),u},set(u){i(u)}}),e}});var Oa=Be((dh,Pa)=>{var yd=require("path"),_d=require("child_process"),{promises:yn,constants:Ta}=require("fs"),Fn=Ca(),Ed=ni(),si=Sa(),va=yd.join(__dirname,"xdg-open"),{platform:Pt,arch:Aa}=process,Cd=()=>{try{return yn.statSync("/run/.containerenv"),!0}catch{return!1}},ii;function wd(){return ii===void 0&&(ii=Cd()||Ed()),ii}var Sd=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let o="/etc/wsl.conf",i=!1;try{await yn.access(o,Ta.F_OK),i=!0}catch{}if(!i)return e;let u=await yn.readFile(o,{encoding:"utf8"}),l=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(u);return l?(r=l.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),Ra=async(e,r)=>{let o;for(let i of e)try{return await r(i)}catch(u){o=u}throw o},_n=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Ra(e.app,d=>_n({...e,app:d}));let{name:r,arguments:o=[]}=e.app||{};if(o=[...o],Array.isArray(r))return Ra(r,d=>_n({...e,app:{name:d,arguments:o}}));let i,u=[],l={};if(Pt==="darwin")i="open",e.wait&&u.push("--wait-apps"),e.background&&u.push("--background"),e.newInstance&&u.push("--new"),r&&u.push("-a",r);else if(Pt==="win32"||Fn&&!wd()&&!r){let d=await Sd();i=Fn?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,u.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Fn||(l.windowsVerbatimArguments=!0);let p=["Start"];e.wait&&p.push("-Wait"),r?(p.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&o.unshift(e.target)):e.target&&p.push(`"${e.target}"`),o.length>0&&(o=o.map(g=>`"\`"${g}\`""`),p.push(o.join(","))),e.target=Buffer.from(p.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let d=!__dirname||__dirname==="/",p=!1;try{await yn.access(va,Ta.X_OK),p=!0}catch{}i=process.versions.electron||Pt==="android"||d||!p?"xdg-open":va}o.length>0&&u.push(...o),e.wait||(l.stdio="ignore",l.detached=!0)}e.target&&u.push(e.target),Pt==="darwin"&&o.length>0&&u.push("--args",...o);let f=_d.spawn(i,u,l);return e.wait?new Promise((d,p)=>{f.once("error",p),f.once("close",g=>{if(!e.allowNonzeroExitCode&&g>0){p(new Error(`Exited with code ${g}`));return}d(f)})}):(f.unref(),f)},ui=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return _n({...r,target:e})},vd=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:o=[]}=r||{};if(o!=null&&!Array.isArray(o))throw new TypeError("Expected `appArguments` as Array type");return _n({...r,app:{name:e,arguments:o}})};function Ba(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Aa]:r}=e;if(!r)throw new Error(`${Aa} is not supported`);return r}function ai({[Pt]:e},{wsl:r}){if(r&&Fn)return Ba(r);if(!e)throw new Error(`${Pt} is not supported`);return Ba(e)}var En={};si(En,"chrome",()=>ai({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));si(En,"firefox",()=>ai({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));si(En,"edge",()=>ai({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));ui.apps=En;ui.openApp=vd;Pa.exports=ui});var Ad={};Sc(Ad,{default:()=>Cn});module.exports=vc(Ad);var Ts=P(require("node:path")),Ps=P(require("node:fs"));function ro(){let e;try{e=Ts.resolve("package.json")}catch(o){throw new Error(`cannot resolve package manifest path: ${o}`)}let r;try{r=JSON.parse(Ps.readFileSync(e,"utf8"))}catch(o){throw new Error(`cannot read package manifest: ${o}`)}return r.name=r.name.replace(/^@workaround/g,""),r}function Os(e){return!!e.owner&&e.access!=="public"}var Ue=require("@oclif/core");var mt=P(require("node:fs")),Hr=P(require("node:path")),xs=P(require("node:os"));var Ac="KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I",Rc="e69bae0ec90f5e838555",z={},ks;function Is(e){ks=e;try{z=JSON.parse(mt.readFileSync(Hr.join(Yr(),"config.json"),"utf8"))}catch(r){if(r instanceof Error&&r.code==="ENOENT")return;throw new Error(`Failed to read config file: ${r}`)}}function De(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||z.APIURL||"https://www.raycast.com";case"raycastAccessToken":return process.env.RAY_Token||z.Token||z.AccessToken||"";case"raycastClientId":return process.env.RAY_ClientID||z.ClientID||Ac;case"githubClientId":return process.env.RAY_GithubClientID||z.GithubClientID||Rc;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||z.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target||(typeof z.Target>"u"?$s("release"):z.Target)}}function Gr(e,r){switch(e){case"raycastApiURL":r===void 0?delete z.APIURL:z.APIURL=r;break;case"raycastAccessToken":r===void 0?delete z.Token:z.Token=r,delete z.AccessToken;break;case"raycastClientId":r===void 0?delete z.ClientID:z.ClientID=r;break;case"githubAccessToken":r===void 0?delete z.GithubAccessToken:z.GithubAccessToken=r;break;case"flavorName":r===void 0?delete z.Target:z.Target=r;break}let o=Yr();mt.writeFileSync(Hr.join(o,"config.json"),JSON.stringify(z,null," "),"utf8")}function $s(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case void 0:return De("flavorName")}}function Bc(){let e=$s(ks);return e==""?"raycast":`raycast-${e}`}function Yr(){let e=Hr.join(xs.default.homedir(),".config",Bc());return mt.mkdirSync(e,{recursive:!0}),e}var q=P(Ls());var er=P(require("node:process"),1);var Ms=(e=0)=>r=>`\x1B[${r+e}m`,qs=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,Ns=(e=0)=>(r,o,i)=>`\x1B[${38+e};2;${r};${o};${i}m`,L={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},kd=Object.keys(L.modifier),Oc=Object.keys(L.color),xc=Object.keys(L.bgColor),Id=[...Oc,...xc];function kc(){let e=new Map;for(let[r,o]of Object.entries(L)){for(let[i,u]of Object.entries(o))L[i]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},o[i]=L[i],e.set(u[0],u[1]);Object.defineProperty(L,r,{value:o,enumerable:!1})}return Object.defineProperty(L,"codes",{value:e,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=Ms(),L.color.ansi256=qs(),L.color.ansi16m=Ns(),L.bgColor.ansi=Ms(10),L.bgColor.ansi256=qs(10),L.bgColor.ansi16m=Ns(10),Object.defineProperties(L,{rgbToAnsi256:{value(r,o,i){return r===o&&o===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(r){let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map(l=>l+l).join(""));let u=Number.parseInt(i,16);return[u>>16&255,u>>8&255,u&255]},enumerable:!1},hexToAnsi256:{value:r=>L.rgbToAnsi256(...L.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let o,i,u;if(r>=232)o=((r-232)*10+8)/255,i=o,u=o;else{r-=16;let d=r%36;o=Math.floor(r/36)/5,i=Math.floor(d/6)/5,u=d%6/5}let l=Math.max(o,i,u)*2;if(l===0)return 30;let f=30+(Math.round(u)<<2|Math.round(i)<<1|Math.round(o));return l===2&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(r,o,i)=>L.ansi256ToAnsi(L.rgbToAnsi256(r,o,i)),enumerable:!1},hexToAnsi:{value:r=>L.ansi256ToAnsi(L.hexToAnsi256(r)),enumerable:!1}}),L}var Ic=kc(),he=Ic;var Qr=P(require("node:process"),1),zs=P(require("node:os"),1),no=P(require("node:tty"),1);function oe(e,r=globalThis.Deno?globalThis.Deno.args:Qr.default.argv){let o=e.startsWith("-")?"":e.length===1?"-":"--",i=r.indexOf(o+e),u=r.indexOf("--");return i!==-1&&(u===-1||i<u)}var{env:N}=Qr.default,Vr;oe("no-color")||oe("no-colors")||oe("color=false")||oe("color=never")?Vr=0:(oe("color")||oe("colors")||oe("color=true")||oe("color=always"))&&(Vr=1);function $c(){if("FORCE_COLOR"in N)return N.FORCE_COLOR==="true"?1:N.FORCE_COLOR==="false"?0:N.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(N.FORCE_COLOR,10),3)}function Wc(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Lc(e,{streamIsTTY:r,sniffFlags:o=!0}={}){let i=$c();i!==void 0&&(Vr=i);let u=o?Vr:i;if(u===0)return 0;if(o){if(oe("color=16m")||oe("color=full")||oe("color=truecolor"))return 3;if(oe("color=256"))return 2}if("TF_BUILD"in N&&"AGENT_NAME"in N)return 1;if(e&&!r&&u===void 0)return 0;let l=u||0;if(N.TERM==="dumb")return l;if(Qr.default.platform==="win32"){let f=zs.default.release().split(".");return Number(f[0])>=10&&Number(f[2])>=10586?Number(f[2])>=14931?3:2:1}if("CI"in N)return"GITHUB_ACTIONS"in N||"GITEA_ACTIONS"in N?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(f=>f in N)||N.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in N)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(N.TEAMCITY_VERSION)?1:0;if(N.COLORTERM==="truecolor"||N.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in N){let f=Number.parseInt((N.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(N.TERM_PROGRAM){case"iTerm.app":return f>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(N.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(N.TERM)||"COLORTERM"in N?1:l}function js(e,r={}){let o=Lc(e,{streamIsTTY:e&&e.isTTY,...r});return Wc(o)}var Mc={stdout:js({isTTY:no.default.isatty(1)}),stderr:js({isTTY:no.default.isatty(2)})},Us=Mc;function Hs(e,r,o){let i=e.indexOf(r);if(i===-1)return e;let u=r.length,l=0,f="";do f+=e.slice(l,i)+r+o,l=i+u,i=e.indexOf(r,l);while(i!==-1);return f+=e.slice(l),f}function Gs(e,r,o,i){let u=0,l="";do{let f=e[i-1]==="\r";l+=e.slice(u,f?i-1:i)+r+(f?`\r
|
|
14
|
+
`),i=!1,u=!1,l;e.on("response",f=>{let{headers:d}=f;i=d["transfer-encoding"]==="chunked"&&!d["content-length"]}),e.on("socket",f=>{let d=()=>{if(i&&!u){let g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",r(g)}},p=g=>{u=cn.Buffer.compare(g.slice(-5),o)===0,!u&&l&&(u=cn.Buffer.compare(l.slice(-3),o.slice(0,3))===0&&cn.Buffer.compare(g.slice(-2),o.slice(3))===0),l=g};f.prependListener("close",d),f.on("data",p),e.on("close",()=>{f.removeListener("close",d),f.removeListener("data",p)})})}cr();gn();});var ni=Be((lh,ya)=>{"use strict";var Fa=require("fs"),ri;function pd(){try{return Fa.statSync("/.dockerenv"),!0}catch{return!1}}function gd(){try{return Fa.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}ya.exports=()=>(ri===void 0&&(ri=pd()||gd()),ri)});var Ca=Be((ch,oi)=>{"use strict";var bd=require("os"),Fd=require("fs"),_a=ni(),Ea=()=>{if(process.platform!=="linux")return!1;if(bd.release().toLowerCase().includes("microsoft"))return!_a();try{return Fd.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!_a():!1}catch{return!1}};process.env.__IS_WSL_TEST__?oi.exports=Ea:oi.exports=Ea()});var Sa=Be((fh,wa)=>{"use strict";wa.exports=(e,r,o)=>{let i=u=>Object.defineProperty(e,r,{value:u,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let u=o();return i(u),u},set(u){i(u)}}),e}});var Oa=Be((dh,Pa)=>{var yd=require("path"),_d=require("child_process"),{promises:yn,constants:Ta}=require("fs"),Fn=Ca(),Ed=ni(),si=Sa(),va=yd.join(__dirname,"xdg-open"),{platform:Pt,arch:Aa}=process,Cd=()=>{try{return yn.statSync("/run/.containerenv"),!0}catch{return!1}},ii;function wd(){return ii===void 0&&(ii=Cd()||Ed()),ii}var Sd=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let o="/etc/wsl.conf",i=!1;try{await yn.access(o,Ta.F_OK),i=!0}catch{}if(!i)return e;let u=await yn.readFile(o,{encoding:"utf8"}),l=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(u);return l?(r=l.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),Ra=async(e,r)=>{let o;for(let i of e)try{return await r(i)}catch(u){o=u}throw o},_n=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Ra(e.app,d=>_n({...e,app:d}));let{name:r,arguments:o=[]}=e.app||{};if(o=[...o],Array.isArray(r))return Ra(r,d=>_n({...e,app:{name:d,arguments:o}}));let i,u=[],l={};if(Pt==="darwin")i="open",e.wait&&u.push("--wait-apps"),e.background&&u.push("--background"),e.newInstance&&u.push("--new"),r&&u.push("-a",r);else if(Pt==="win32"||Fn&&!wd()&&!r){let d=await Sd();i=Fn?`${d}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,u.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Fn||(l.windowsVerbatimArguments=!0);let p=["Start"];e.wait&&p.push("-Wait"),r?(p.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&o.unshift(e.target)):e.target&&p.push(`"${e.target}"`),o.length>0&&(o=o.map(g=>`"\`"${g}\`""`),p.push(o.join(","))),e.target=Buffer.from(p.join(" "),"utf16le").toString("base64")}else{if(r)i=r;else{let d=!__dirname||__dirname==="/",p=!1;try{await yn.access(va,Ta.X_OK),p=!0}catch{}i=process.versions.electron||Pt==="android"||d||!p?"xdg-open":va}o.length>0&&u.push(...o),e.wait||(l.stdio="ignore",l.detached=!0)}e.target&&u.push(e.target),Pt==="darwin"&&o.length>0&&u.push("--args",...o);let f=_d.spawn(i,u,l);return e.wait?new Promise((d,p)=>{f.once("error",p),f.once("close",g=>{if(!e.allowNonzeroExitCode&&g>0){p(new Error(`Exited with code ${g}`));return}d(f)})}):(f.unref(),f)},ui=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return _n({...r,target:e})},vd=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:o=[]}=r||{};if(o!=null&&!Array.isArray(o))throw new TypeError("Expected `appArguments` as Array type");return _n({...r,app:{name:e,arguments:o}})};function Ba(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Aa]:r}=e;if(!r)throw new Error(`${Aa} is not supported`);return r}function ai({[Pt]:e},{wsl:r}){if(r&&Fn)return Ba(r);if(!e)throw new Error(`${Pt} is not supported`);return Ba(e)}var En={};si(En,"chrome",()=>ai({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));si(En,"firefox",()=>ai({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));si(En,"edge",()=>ai({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));ui.apps=En;ui.openApp=vd;Pa.exports=ui});var Ad={};Sc(Ad,{default:()=>Cn});module.exports=vc(Ad);var Ts=P(require("node:path")),Ps=P(require("node:fs"));function ro(){let e;try{e=Ts.resolve("package.json")}catch(o){throw new Error(`cannot resolve package manifest path: ${o}`)}let r;try{r=JSON.parse(Ps.readFileSync(e,"utf8"))}catch(o){throw new Error(`cannot read package manifest: ${o}`)}return r.name=r.name.replace(/^@workaround/g,""),r}function Os(e){return!!e.owner&&e.access!=="public"}var Ue=require("@oclif/core");var mt=P(require("node:fs")),Hr=P(require("node:path")),xs=P(require("node:os"));var Ac="KqAdcGhNfBKiUpfjD3nU3VNgh1t0iMPoX2hYEkN9d4I",Rc="e69bae0ec90f5e838555",z={},ks;function Is(e){ks=e;try{z=JSON.parse(mt.readFileSync(Hr.join(Yr(),"config.json"),"utf8"))}catch(r){if(r instanceof Error&&r.code==="ENOENT")return;throw new Error(`Failed to read config file: ${r}`)}}function De(e){switch(e){case"raycastApiURL":return process.env.RAY_APIURL||z.APIURL||"https://www.raycast.com";case"raycastAccessToken":return process.env.RAY_Token||z.Token||z.AccessToken||"";case"raycastClientId":return process.env.RAY_ClientID||z.ClientID||Ac;case"githubClientId":return process.env.RAY_GithubClientID||z.GithubClientID||Rc;case"githubAccessToken":return process.env.GITHUB_ACCESS_TOKEN||z.GithubAccessToken||"";case"flavorName":return process.env.RAY_Target||(typeof z.Target>"u"?$s("release"):z.Target)}}function Gr(e,r){switch(e){case"raycastApiURL":r===void 0?delete z.APIURL:z.APIURL=r;break;case"raycastAccessToken":r===void 0?delete z.Token:z.Token=r,delete z.AccessToken;break;case"raycastClientId":r===void 0?delete z.ClientID:z.ClientID=r;break;case"githubAccessToken":r===void 0?delete z.GithubAccessToken:z.GithubAccessToken=r;break;case"flavorName":r===void 0?delete z.Target:z.Target=r;break}let o=Yr();mt.writeFileSync(Hr.join(o,"config.json"),JSON.stringify(z,null," "),"utf8")}function $s(e){switch(e){case"debug":return"debug";case"internal":return"internal";case"release":return"";case void 0:return De("flavorName")}}function Bc(){let e=$s(ks);return e==""?"raycast":`raycast-${e}`}function Yr(){let e=Hr.join(xs.default.homedir(),".config",Bc());return mt.mkdirSync(e,{recursive:!0}),e}var W=P(Ls());var er=P(require("node:process"),1);var Ms=(e=0)=>r=>`\x1B[${r+e}m`,qs=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,Ns=(e=0)=>(r,o,i)=>`\x1B[${38+e};2;${r};${o};${i}m`,M={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},kd=Object.keys(M.modifier),Oc=Object.keys(M.color),xc=Object.keys(M.bgColor),Id=[...Oc,...xc];function kc(){let e=new Map;for(let[r,o]of Object.entries(M)){for(let[i,u]of Object.entries(o))M[i]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},o[i]=M[i],e.set(u[0],u[1]);Object.defineProperty(M,r,{value:o,enumerable:!1})}return Object.defineProperty(M,"codes",{value:e,enumerable:!1}),M.color.close="\x1B[39m",M.bgColor.close="\x1B[49m",M.color.ansi=Ms(),M.color.ansi256=qs(),M.color.ansi16m=Ns(),M.bgColor.ansi=Ms(10),M.bgColor.ansi256=qs(10),M.bgColor.ansi16m=Ns(10),Object.defineProperties(M,{rgbToAnsi256:{value(r,o,i){return r===o&&o===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(r){let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map(l=>l+l).join(""));let u=Number.parseInt(i,16);return[u>>16&255,u>>8&255,u&255]},enumerable:!1},hexToAnsi256:{value:r=>M.rgbToAnsi256(...M.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let o,i,u;if(r>=232)o=((r-232)*10+8)/255,i=o,u=o;else{r-=16;let d=r%36;o=Math.floor(r/36)/5,i=Math.floor(d/6)/5,u=d%6/5}let l=Math.max(o,i,u)*2;if(l===0)return 30;let f=30+(Math.round(u)<<2|Math.round(i)<<1|Math.round(o));return l===2&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(r,o,i)=>M.ansi256ToAnsi(M.rgbToAnsi256(r,o,i)),enumerable:!1},hexToAnsi:{value:r=>M.ansi256ToAnsi(M.hexToAnsi256(r)),enumerable:!1}}),M}var Ic=kc(),he=Ic;var Qr=P(require("node:process"),1),zs=P(require("node:os"),1),no=P(require("node:tty"),1);function oe(e,r=globalThis.Deno?globalThis.Deno.args:Qr.default.argv){let o=e.startsWith("-")?"":e.length===1?"-":"--",i=r.indexOf(o+e),u=r.indexOf("--");return i!==-1&&(u===-1||i<u)}var{env:N}=Qr.default,Vr;oe("no-color")||oe("no-colors")||oe("color=false")||oe("color=never")?Vr=0:(oe("color")||oe("colors")||oe("color=true")||oe("color=always"))&&(Vr=1);function $c(){if("FORCE_COLOR"in N)return N.FORCE_COLOR==="true"?1:N.FORCE_COLOR==="false"?0:N.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(N.FORCE_COLOR,10),3)}function Wc(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Lc(e,{streamIsTTY:r,sniffFlags:o=!0}={}){let i=$c();i!==void 0&&(Vr=i);let u=o?Vr:i;if(u===0)return 0;if(o){if(oe("color=16m")||oe("color=full")||oe("color=truecolor"))return 3;if(oe("color=256"))return 2}if("TF_BUILD"in N&&"AGENT_NAME"in N)return 1;if(e&&!r&&u===void 0)return 0;let l=u||0;if(N.TERM==="dumb")return l;if(Qr.default.platform==="win32"){let f=zs.default.release().split(".");return Number(f[0])>=10&&Number(f[2])>=10586?Number(f[2])>=14931?3:2:1}if("CI"in N)return"GITHUB_ACTIONS"in N||"GITEA_ACTIONS"in N?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(f=>f in N)||N.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in N)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(N.TEAMCITY_VERSION)?1:0;if(N.COLORTERM==="truecolor"||N.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in N){let f=Number.parseInt((N.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(N.TERM_PROGRAM){case"iTerm.app":return f>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(N.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(N.TERM)||"COLORTERM"in N?1:l}function js(e,r={}){let o=Lc(e,{streamIsTTY:e&&e.isTTY,...r});return Wc(o)}var Mc={stdout:js({isTTY:no.default.isatty(1)}),stderr:js({isTTY:no.default.isatty(2)})},Us=Mc;function Hs(e,r,o){let i=e.indexOf(r);if(i===-1)return e;let u=r.length,l=0,f="";do f+=e.slice(l,i)+r+o,l=i+u,i=e.indexOf(r,l);while(i!==-1);return f+=e.slice(l),f}function Gs(e,r,o,i){let u=0,l="";do{let f=e[i-1]==="\r";l+=e.slice(u,f?i-1:i)+r+(f?`\r
|
|
15
15
|
`:`
|
|
16
16
|
`)+o,u=i+1,i=e.indexOf(`
|
|
17
17
|
`,u)}while(i!==-1);return l+=e.slice(u),l}var{stdout:Ys,stderr:Vs}=Us,oo=Symbol("GENERATOR"),pt=Symbol("STYLER"),Yt=Symbol("IS_EMPTY"),Qs=["ansi","ansi","ansi256","ansi16m"],gt=Object.create(null),qc=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let o=Ys?Ys.level:0;e.level=r.level===void 0?o:r.level};var Nc=e=>{let r=(...o)=>o.join(" ");return qc(r,e),Object.setPrototypeOf(r,Vt.prototype),r};function Vt(e){return Nc(e)}Object.setPrototypeOf(Vt.prototype,Function.prototype);for(let[e,r]of Object.entries(he))gt[e]={get(){let o=Jr(this,so(r.open,r.close,this[pt]),this[Yt]);return Object.defineProperty(this,e,{value:o}),o}};gt.visible={get(){let e=Jr(this,this[pt],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var io=(e,r,o,...i)=>e==="rgb"?r==="ansi16m"?he[o].ansi16m(...i):r==="ansi256"?he[o].ansi256(he.rgbToAnsi256(...i)):he[o].ansi(he.rgbToAnsi(...i)):e==="hex"?io("rgb",r,o,...he.hexToRgb(...i)):he[o][e](...i),jc=["rgb","hex","ansi256"];for(let e of jc){gt[e]={get(){let{level:o}=this;return function(...i){let u=so(io(e,Qs[o],"color",...i),he.color.close,this[pt]);return Jr(this,u,this[Yt])}}};let r="bg"+e[0].toUpperCase()+e.slice(1);gt[r]={get(){let{level:o}=this;return function(...i){let u=so(io(e,Qs[o],"bgColor",...i),he.bgColor.close,this[pt]);return Jr(this,u,this[Yt])}}}}var zc=Object.defineProperties(()=>{},{...gt,level:{enumerable:!0,get(){return this[oo].level},set(e){this[oo].level=e}}}),so=(e,r,o)=>{let i,u;return o===void 0?(i=e,u=r):(i=o.openAll+e,u=r+o.closeAll),{open:e,close:r,openAll:i,closeAll:u,parent:o}},Jr=(e,r,o)=>{let i=(...u)=>Uc(i,u.length===1?""+u[0]:u.join(" "));return Object.setPrototypeOf(i,zc),i[oo]=e,i[pt]=r,i[Yt]=o,i},Uc=(e,r)=>{if(e.level<=0||!r)return e[Yt]?"":r;let o=e[pt];if(o===void 0)return r;let{openAll:i,closeAll:u}=o;if(r.includes("\x1B"))for(;o!==void 0;)r=Hs(r,o.close,o.open),o=o.parent;let l=r.indexOf(`
|
|
18
18
|
`);return l!==-1&&(r=Gs(r,u,i,l)),i+r+u};Object.defineProperties(Vt.prototype,gt);var Hc=Vt(),jd=Vt({level:Vs?Vs.level:0});var Js=Hc;var mo=P(require("node:process"),1);var Qt=P(require("node:process"),1);var Gc=(e,r,o,i)=>{if(o==="length"||o==="prototype"||o==="arguments"||o==="caller")return;let u=Object.getOwnPropertyDescriptor(e,o),l=Object.getOwnPropertyDescriptor(r,o);!Yc(u,l)&&i||Object.defineProperty(e,o,l)},Yc=function(e,r){return e===void 0||e.configurable||e.writable===r.writable&&e.enumerable===r.enumerable&&e.configurable===r.configurable&&(e.writable||e.value===r.value)},Vc=(e,r)=>{let o=Object.getPrototypeOf(r);o!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,o)},Qc=(e,r)=>`/* Wrapped ${e}*/
|
|
19
|
-
${r}`,Jc=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Kc=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Zc=(e,r,o)=>{let i=o===""?"":`with ${o.trim()}() `,u=Qc.bind(null,i,r.toString());Object.defineProperty(u,"name",Kc);let{writable:l,enumerable:f,configurable:d}=Jc;Object.defineProperty(e,"toString",{value:u,writable:l,enumerable:f,configurable:d})};function uo(e,r,{ignoreNonConfigurable:o=!1}={}){let{name:i}=e;for(let u of Reflect.ownKeys(r))Gc(e,r,u,o);return Vc(e,r),Zc(e,r,i),e}var Kr=new WeakMap,Ks=(e,r={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let o,i=0,u=e.displayName||e.name||"<anonymous>",l=function(...f){if(Kr.set(l,++i),i===1)o=e.apply(this,f),e=void 0;else if(r.throw===!0)throw new Error(`Function \`${u}\` can only be called once`);return o};return uo(l,e),Kr.set(l,i),l};Ks.callCount=e=>{if(!Kr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Kr.get(e)};var Zs=Ks;var tt=[];tt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&tt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&tt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Zr=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ao=Symbol.for("signal-exit emitter"),lo=globalThis,Xc=Object.defineProperty.bind(Object),co=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(lo[ao])return lo[ao];Xc(lo,ao,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(r,o){this.listeners[r].push(o)}removeListener(r,o){let i=this.listeners[r],u=i.indexOf(o);u!==-1&&(u===0&&i.length===1?i.length=0:i.splice(u,1))}emit(r,o,i){if(this.emitted[r])return!1;this.emitted[r]=!0;let u=!1;for(let l of this.listeners[r])u=l(o,i)===!0||u;return r==="exit"&&(u=this.emit("afterExit",o,i)||u),u}},Xr=class{},ef=e=>({onExit(r,o){return e.onExit(r,o)},load(){return e.load()},unload(){return e.unload()}}),fo=class extends Xr{onExit(){return()=>{}}load(){}unload(){}},Do=class extends Xr{#e=ho.platform==="win32"?"SIGINT":"SIGHUP";#r=new co;#t;#o;#d;#n={};#s=!1;constructor(r){super(),this.#t=r,this.#n={};for(let o of tt)this.#n[o]=()=>{let i=this.#t.listeners(o),{count:u}=this.#r,l=r;if(typeof l.__signal_exit_emitter__=="object"&&typeof l.__signal_exit_emitter__.count=="number"&&(u+=l.__signal_exit_emitter__.count),i.length===u){this.unload();let f=this.#r.emit("exit",null,o),d=o==="SIGHUP"?this.#e:o;f||r.kill(r.pid,d)}};this.#d=r.reallyExit,this.#o=r.emit}onExit(r,o){if(!Zr(this.#t))return()=>{};this.#s===!1&&this.load();let i=o?.alwaysLast?"afterExit":"exit";return this.#r.on(i,r),()=>{this.#r.removeListener(i,r),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#r.count+=1;for(let r of tt)try{let o=this.#n[r];o&&this.#t.on(r,o)}catch{}this.#t.emit=(r,...o)=>this.#D(r,...o),this.#t.reallyExit=r=>this.#i(r)}}unload(){this.#s&&(this.#s=!1,tt.forEach(r=>{let o=this.#n[r];if(!o)throw new Error("Listener not defined for signal: "+r);try{this.#t.removeListener(r,o)}catch{}}),this.#t.emit=this.#o,this.#t.reallyExit=this.#d,this.#r.count-=1)}#i(r){return Zr(this.#t)?(this.#t.exitCode=r||0,this.#r.emit("exit",this.#t.exitCode,null),this.#d.call(this.#t,this.#t.exitCode)):0}#D(r,...o){let i=this.#o;if(r==="exit"&&Zr(this.#t)){typeof o[0]=="number"&&(this.#t.exitCode=o[0]);let u=i.call(this.#t,r,...o);return this.#r.emit("exit",this.#t.exitCode,null),u}else return i.call(this.#t,r,...o)}},ho=globalThis.process,{onExit:Xs,load:Qd,unload:Jd}=ef(Zr(ho)?new Do(ho):new fo);var eu=Qt.default.stderr.isTTY?Qt.default.stderr:Qt.default.stdout.isTTY?Qt.default.stdout:void 0,tf=eu?Zs(()=>{Xs(()=>{eu.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},tu=tf;var en=!1,bt={};bt.show=(e=mo.default.stderr)=>{e.isTTY&&(en=!1,e.write("\x1B[?25h"))};bt.hide=(e=mo.default.stderr)=>{e.isTTY&&(tu(),en=!0,e.write("\x1B[?25l"))};bt.toggle=(e,r)=>{e!==void 0&&(en=e),en?bt.show(r):bt.hide(r)};var po=bt;var tr=P(go(),1);var iu=(e=0)=>r=>`\x1B[${r+e}m`,su=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,uu=(e=0)=>(r,o,i)=>`\x1B[${38+e};2;${r};${o};${i}m`,
|
|
19
|
+
${r}`,Jc=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Kc=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Zc=(e,r,o)=>{let i=o===""?"":`with ${o.trim()}() `,u=Qc.bind(null,i,r.toString());Object.defineProperty(u,"name",Kc);let{writable:l,enumerable:f,configurable:d}=Jc;Object.defineProperty(e,"toString",{value:u,writable:l,enumerable:f,configurable:d})};function uo(e,r,{ignoreNonConfigurable:o=!1}={}){let{name:i}=e;for(let u of Reflect.ownKeys(r))Gc(e,r,u,o);return Vc(e,r),Zc(e,r,i),e}var Kr=new WeakMap,Ks=(e,r={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let o,i=0,u=e.displayName||e.name||"<anonymous>",l=function(...f){if(Kr.set(l,++i),i===1)o=e.apply(this,f),e=void 0;else if(r.throw===!0)throw new Error(`Function \`${u}\` can only be called once`);return o};return uo(l,e),Kr.set(l,i),l};Ks.callCount=e=>{if(!Kr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Kr.get(e)};var Zs=Ks;var tt=[];tt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&tt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&tt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Zr=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ao=Symbol.for("signal-exit emitter"),lo=globalThis,Xc=Object.defineProperty.bind(Object),co=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(lo[ao])return lo[ao];Xc(lo,ao,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(r,o){this.listeners[r].push(o)}removeListener(r,o){let i=this.listeners[r],u=i.indexOf(o);u!==-1&&(u===0&&i.length===1?i.length=0:i.splice(u,1))}emit(r,o,i){if(this.emitted[r])return!1;this.emitted[r]=!0;let u=!1;for(let l of this.listeners[r])u=l(o,i)===!0||u;return r==="exit"&&(u=this.emit("afterExit",o,i)||u),u}},Xr=class{},ef=e=>({onExit(r,o){return e.onExit(r,o)},load(){return e.load()},unload(){return e.unload()}}),fo=class extends Xr{onExit(){return()=>{}}load(){}unload(){}},Do=class extends Xr{#e=ho.platform==="win32"?"SIGINT":"SIGHUP";#r=new co;#t;#o;#d;#n={};#s=!1;constructor(r){super(),this.#t=r,this.#n={};for(let o of tt)this.#n[o]=()=>{let i=this.#t.listeners(o),{count:u}=this.#r,l=r;if(typeof l.__signal_exit_emitter__=="object"&&typeof l.__signal_exit_emitter__.count=="number"&&(u+=l.__signal_exit_emitter__.count),i.length===u){this.unload();let f=this.#r.emit("exit",null,o),d=o==="SIGHUP"?this.#e:o;f||r.kill(r.pid,d)}};this.#d=r.reallyExit,this.#o=r.emit}onExit(r,o){if(!Zr(this.#t))return()=>{};this.#s===!1&&this.load();let i=o?.alwaysLast?"afterExit":"exit";return this.#r.on(i,r),()=>{this.#r.removeListener(i,r),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#r.count+=1;for(let r of tt)try{let o=this.#n[r];o&&this.#t.on(r,o)}catch{}this.#t.emit=(r,...o)=>this.#D(r,...o),this.#t.reallyExit=r=>this.#i(r)}}unload(){this.#s&&(this.#s=!1,tt.forEach(r=>{let o=this.#n[r];if(!o)throw new Error("Listener not defined for signal: "+r);try{this.#t.removeListener(r,o)}catch{}}),this.#t.emit=this.#o,this.#t.reallyExit=this.#d,this.#r.count-=1)}#i(r){return Zr(this.#t)?(this.#t.exitCode=r||0,this.#r.emit("exit",this.#t.exitCode,null),this.#d.call(this.#t,this.#t.exitCode)):0}#D(r,...o){let i=this.#o;if(r==="exit"&&Zr(this.#t)){typeof o[0]=="number"&&(this.#t.exitCode=o[0]);let u=i.call(this.#t,r,...o);return this.#r.emit("exit",this.#t.exitCode,null),u}else return i.call(this.#t,r,...o)}},ho=globalThis.process,{onExit:Xs,load:Qd,unload:Jd}=ef(Zr(ho)?new Do(ho):new fo);var eu=Qt.default.stderr.isTTY?Qt.default.stderr:Qt.default.stdout.isTTY?Qt.default.stdout:void 0,tf=eu?Zs(()=>{Xs(()=>{eu.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},tu=tf;var en=!1,bt={};bt.show=(e=mo.default.stderr)=>{e.isTTY&&(en=!1,e.write("\x1B[?25h"))};bt.hide=(e=mo.default.stderr)=>{e.isTTY&&(tu(),en=!0,e.write("\x1B[?25l"))};bt.toggle=(e,r)=>{e!==void 0&&(en=e),en?bt.show(r):bt.hide(r)};var po=bt;var tr=P(go(),1);var iu=(e=0)=>r=>`\x1B[${r+e}m`,su=(e=0)=>r=>`\x1B[${38+e};5;${r}m`,uu=(e=0)=>(r,o,i)=>`\x1B[${38+e};2;${r};${o};${i}m`,q={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},iD=Object.keys(q.modifier),nf=Object.keys(q.color),of=Object.keys(q.bgColor),sD=[...nf,...of];function sf(){let e=new Map;for(let[r,o]of Object.entries(q)){for(let[i,u]of Object.entries(o))q[i]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},o[i]=q[i],e.set(u[0],u[1]);Object.defineProperty(q,r,{value:o,enumerable:!1})}return Object.defineProperty(q,"codes",{value:e,enumerable:!1}),q.color.close="\x1B[39m",q.bgColor.close="\x1B[49m",q.color.ansi=iu(),q.color.ansi256=su(),q.color.ansi16m=uu(),q.bgColor.ansi=iu(10),q.bgColor.ansi256=su(10),q.bgColor.ansi16m=uu(10),Object.defineProperties(q,{rgbToAnsi256:{value(r,o,i){return r===o&&o===i?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(o/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(r){let o=/[a-f\d]{6}|[a-f\d]{3}/i.exec(r.toString(16));if(!o)return[0,0,0];let[i]=o;i.length===3&&(i=[...i].map(l=>l+l).join(""));let u=Number.parseInt(i,16);return[u>>16&255,u>>8&255,u&255]},enumerable:!1},hexToAnsi256:{value:r=>q.rgbToAnsi256(...q.hexToRgb(r)),enumerable:!1},ansi256ToAnsi:{value(r){if(r<8)return 30+r;if(r<16)return 90+(r-8);let o,i,u;if(r>=232)o=((r-232)*10+8)/255,i=o,u=o;else{r-=16;let d=r%36;o=Math.floor(r/36)/5,i=Math.floor(d/6)/5,u=d%6/5}let l=Math.max(o,i,u)*2;if(l===0)return 30;let f=30+(Math.round(u)<<2|Math.round(i)<<1|Math.round(o));return l===2&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(r,o,i)=>q.ansi256ToAnsi(q.rgbToAnsi256(r,o,i)),enumerable:!1},hexToAnsi:{value:r=>q.ansi256ToAnsi(q.hexToAnsi256(r)),enumerable:!1}}),q}var uf=sf(),me=uf;var nn=P(require("node:process"),1),lu=P(require("node:os"),1),bo=P(require("node:tty"),1);function ie(e,r=globalThis.Deno?globalThis.Deno.args:nn.default.argv){let o=e.startsWith("-")?"":e.length===1?"-":"--",i=r.indexOf(o+e),u=r.indexOf("--");return i!==-1&&(u===-1||i<u)}var{env:j}=nn.default,rn;ie("no-color")||ie("no-colors")||ie("color=false")||ie("color=never")?rn=0:(ie("color")||ie("colors")||ie("color=true")||ie("color=always"))&&(rn=1);function af(){if("FORCE_COLOR"in j)return j.FORCE_COLOR==="true"?1:j.FORCE_COLOR==="false"?0:j.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(j.FORCE_COLOR,10),3)}function lf(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cf(e,{streamIsTTY:r,sniffFlags:o=!0}={}){let i=af();i!==void 0&&(rn=i);let u=o?rn:i;if(u===0)return 0;if(o){if(ie("color=16m")||ie("color=full")||ie("color=truecolor"))return 3;if(ie("color=256"))return 2}if("TF_BUILD"in j&&"AGENT_NAME"in j)return 1;if(e&&!r&&u===void 0)return 0;let l=u||0;if(j.TERM==="dumb")return l;if(nn.default.platform==="win32"){let f=lu.default.release().split(".");return Number(f[0])>=10&&Number(f[2])>=10586?Number(f[2])>=14931?3:2:1}if("CI"in j)return"GITHUB_ACTIONS"in j||"GITEA_ACTIONS"in j?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(f=>f in j)||j.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in j)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(j.TEAMCITY_VERSION)?1:0;if(j.COLORTERM==="truecolor"||j.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in j){let f=Number.parseInt((j.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(j.TERM_PROGRAM){case"iTerm.app":return f>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(j.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(j.TERM)||"COLORTERM"in j?1:l}function au(e,r={}){let o=cf(e,{streamIsTTY:e&&e.isTTY,...r});return lf(o)}var ff={stdout:au({isTTY:bo.default.isatty(1)}),stderr:au({isTTY:bo.default.isatty(2)})},cu=ff;function fu(e,r,o){let i=e.indexOf(r);if(i===-1)return e;let u=r.length,l=0,f="";do f+=e.slice(l,i)+r+o,l=i+u,i=e.indexOf(r,l);while(i!==-1);return f+=e.slice(l),f}function du(e,r,o,i){let u=0,l="";do{let f=e[i-1]==="\r";l+=e.slice(u,f?i-1:i)+r+(f?`\r
|
|
20
20
|
`:`
|
|
21
21
|
`)+o,u=i+1,i=e.indexOf(`
|
|
22
22
|
`,u)}while(i!==-1);return l+=e.slice(u),l}var{stdout:Du,stderr:hu}=cu,Fo=Symbol("GENERATOR"),Ft=Symbol("STYLER"),Jt=Symbol("IS_EMPTY"),mu=["ansi","ansi","ansi256","ansi16m"],yt=Object.create(null),df=(e,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let o=Du?Du.level:0;e.level=r.level===void 0?o:r.level};var Df=e=>{let r=(...o)=>o.join(" ");return df(r,e),Object.setPrototypeOf(r,Kt.prototype),r};function Kt(e){return Df(e)}Object.setPrototypeOf(Kt.prototype,Function.prototype);for(let[e,r]of Object.entries(me))yt[e]={get(){let o=on(this,_o(r.open,r.close,this[Ft]),this[Jt]);return Object.defineProperty(this,e,{value:o}),o}};yt.visible={get(){let e=on(this,this[Ft],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var yo=(e,r,o,...i)=>e==="rgb"?r==="ansi16m"?me[o].ansi16m(...i):r==="ansi256"?me[o].ansi256(me.rgbToAnsi256(...i)):me[o].ansi(me.rgbToAnsi(...i)):e==="hex"?yo("rgb",r,o,...me.hexToRgb(...i)):me[o][e](...i),hf=["rgb","hex","ansi256"];for(let e of hf){yt[e]={get(){let{level:o}=this;return function(...i){let u=_o(yo(e,mu[o],"color",...i),me.color.close,this[Ft]);return on(this,u,this[Jt])}}};let r="bg"+e[0].toUpperCase()+e.slice(1);yt[r]={get(){let{level:o}=this;return function(...i){let u=_o(yo(e,mu[o],"bgColor",...i),me.bgColor.close,this[Ft]);return on(this,u,this[Jt])}}}}var mf=Object.defineProperties(()=>{},{...yt,level:{enumerable:!0,get(){return this[Fo].level},set(e){this[Fo].level=e}}}),_o=(e,r,o)=>{let i,u;return o===void 0?(i=e,u=r):(i=o.openAll+e,u=r+o.closeAll),{open:e,close:r,openAll:i,closeAll:u,parent:o}},on=(e,r,o)=>{let i=(...u)=>pf(i,u.length===1?""+u[0]:u.join(" "));return Object.setPrototypeOf(i,mf),i[Fo]=e,i[Ft]=r,i[Jt]=o,i},pf=(e,r)=>{if(e.level<=0||!r)return e[Jt]?"":r;let o=e[Ft];if(o===void 0)return r;let{openAll:i,closeAll:u}=o;if(r.includes("\x1B"))for(;o!==void 0;)r=fu(r,o.close,o.open),o=o.parent;let l=r.indexOf(`
|
|
23
23
|
`);return l!==-1&&(r=du(r,u,i,l)),i+r+u};Object.defineProperties(Kt.prototype,yt);var gf=Kt(),DD=Kt({level:hu?hu.level:0});var Te=gf;var se=P(require("node:process"),1);function Eo(){return se.default.platform!=="win32"?se.default.env.TERM!=="linux":!!se.default.env.CI||!!se.default.env.WT_SESSION||!!se.default.env.TERMINUS_SUBLIME||se.default.env.ConEmuTask==="{cmd::Cmder}"||se.default.env.TERM_PROGRAM==="Terminus-Sublime"||se.default.env.TERM_PROGRAM==="vscode"||se.default.env.TERM==="xterm-256color"||se.default.env.TERM==="alacritty"||se.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var bf={info:Te.blue("\u2139"),success:Te.green("\u2714"),warning:Te.yellow("\u26A0"),error:Te.red("\u2716")},Ff={info:Te.blue("i"),success:Te.green("\u221A"),warning:Te.yellow("\u203C"),error:Te.red("\xD7")},yf=Eo()?bf:Ff,Zt=yf;function Co({onlyFirst:e=!1}={}){let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(o,e?void 0:"g")}var _f=Co();function Xt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(_f,"")}function pu(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function gu(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function bu(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Ef(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Fu(e,{ambiguousAsWide:r=!1}={}){return Ef(e),gu(e)||bu(e)||r&&pu(e)?2:1}var Eu=P(_u(),1),Cf=new Intl.Segmenter,wf=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function wo(e,r={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:o=!0,countAnsiEscapeCodes:i=!1}=r;if(i||(e=Xt(e)),e.length===0)return 0;let u=0,l={ambiguousAsWide:!o};for(let{segment:f}of Cf.segment(e)){let d=f.codePointAt(0);if(!(d<=31||d>=127&&d<=159)&&!(d>=8203&&d<=8207||d===65279)&&!(d>=768&&d<=879||d>=6832&&d<=6911||d>=7616&&d<=7679||d>=8400&&d<=8447||d>=65056&&d<=65071)&&!(d>=55296&&d<=57343)&&!(d>=65024&&d<=65039)&&!wf.test(f)){if((0,Eu.default)().test(f)){u+=2;continue}u+=Fu(d,l)}}return u}function So({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var vo=P(require("node:process"),1);function Ao(){let{env:e}=vo.default,{TERM:r,TERM_PROGRAM:o}=e;return vo.default.platform!=="win32"?r!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||o==="Terminus-Sublime"||o==="vscode"||r==="xterm-256color"||r==="alacritty"||r==="rxvt-unicode"||r==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var pe=P(require("node:process"),1),Sf=3,Ro=class{#e=0;start(){this.#e++,this.#e===1&&this.#r()}stop(){if(this.#e<=0)throw new Error("`stop` called more times than `start`");this.#e--,this.#e===0&&this.#t()}#r(){pe.default.platform==="win32"||!pe.default.stdin.isTTY||(pe.default.stdin.setRawMode(!0),pe.default.stdin.on("data",this.#o),pe.default.stdin.resume())}#t(){pe.default.stdin.isTTY&&(pe.default.stdin.off("data",this.#o),pe.default.stdin.pause(),pe.default.stdin.setRawMode(!1))}#o(r){r[0]===Sf&&pe.default.emit("SIGINT")}},vf=new Ro,Bo=vf;var Af=P(go(),1),To=class{#e=0;#r=!1;#t=0;#o=-1;#d=0;#n;#s;#i;#D;#m;#l;#c;#f;#p;#u;#a;color;constructor(r){typeof r=="string"&&(r={text:r}),this.#n={color:"cyan",stream:er.default.stderr,discardStdin:!0,hideCursor:!0,...r},this.color=this.#n.color,this.spinner=this.#n.spinner,this.#m=this.#n.interval,this.#i=this.#n.stream,this.#l=typeof this.#n.isEnabled=="boolean"?this.#n.isEnabled:So({stream:this.#i}),this.#c=typeof this.#n.isSilent=="boolean"?this.#n.isSilent:!1,this.text=this.#n.text,this.prefixText=this.#n.prefixText,this.suffixText=this.#n.suffixText,this.indent=this.#n.indent,er.default.env.NODE_ENV==="test"&&(this._stream=this.#i,this._isEnabled=this.#l,Object.defineProperty(this,"_linesToClear",{get(){return this.#e},set(o){this.#e=o}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#t}}))}get indent(){return this.#f}set indent(r=0){if(!(r>=0&&Number.isInteger(r)))throw new Error("The `indent` option must be an integer from 0 and up");this.#f=r,this.#h()}get interval(){return this.#m??this.#s.interval??100}get spinner(){return this.#s}set spinner(r){if(this.#o=-1,this.#m=void 0,typeof r=="object"){if(r.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#s=r}else if(!Ao())this.#s=tr.default.line;else if(r===void 0)this.#s=tr.default.dots;else if(r!=="default"&&tr.default[r])this.#s=tr.default[r];else throw new Error(`There is no built-in spinner named '${r}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#p}set text(r=""){this.#p=r,this.#h()}get prefixText(){return this.#u}set prefixText(r=""){this.#u=r,this.#h()}get suffixText(){return this.#a}set suffixText(r=""){this.#a=r,this.#h()}get isSpinning(){return this.#D!==void 0}#g(r=this.#u,o=" "){return typeof r=="string"&&r!==""?r+o:typeof r=="function"?r()+o:""}#b(r=this.#a,o=" "){return typeof r=="string"&&r!==""?o+r:typeof r=="function"?o+r():""}#h(){let r=this.#i.columns??80,o=this.#g(this.#u,"-"),i=this.#b(this.#a,"-"),u=" ".repeat(this.#f)+o+"--"+this.#p+"--"+i;this.#t=0;for(let l of Xt(u).split(`
|
|
24
24
|
`))this.#t+=Math.max(1,Math.ceil(wo(l,{countAnsiEscapeCodes:!0})/r))}get isEnabled(){return this.#l&&!this.#c}set isEnabled(r){if(typeof r!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#l=r}get isSilent(){return this.#c}set isSilent(r){if(typeof r!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#c=r}frame(){let r=Date.now();(this.#o===-1||r-this.#d>=this.interval)&&(this.#o=++this.#o%this.#s.frames.length,this.#d=r);let{frames:o}=this.#s,i=o[this.#o];this.color&&(i=Js[this.color](i));let u=typeof this.#u=="string"&&this.#u!==""?this.#u+" ":"",l=typeof this.text=="string"?" "+this.text:"",f=typeof this.#a=="string"&&this.#a!==""?" "+this.#a:"";return u+i+l+f}clear(){if(!this.#l||!this.#i.isTTY)return this;this.#i.cursorTo(0);for(let r=0;r<this.#e;r++)r>0&&this.#i.moveCursor(0,-1),this.#i.clearLine(1);return(this.#f||this.lastIndent!==this.#f)&&this.#i.cursorTo(this.#f),this.lastIndent=this.#f,this.#e=0,this}render(){return this.#c?this:(this.clear(),this.#i.write(this.frame()),this.#e=this.#t,this)}start(r){return r&&(this.text=r),this.#c?this:this.#l?this.isSpinning?this:(this.#n.hideCursor&&po.hide(this.#i),this.#n.discardStdin&&er.default.stdin.isTTY&&(this.#r=!0,Bo.start()),this.render(),this.#D=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#i.write(`- ${this.text}
|
|
25
25
|
`),this)}stop(){return this.#l?(clearInterval(this.#D),this.#D=void 0,this.#o=0,this.clear(),this.#n.hideCursor&&po.show(this.#i),this.#n.discardStdin&&er.default.stdin.isTTY&&this.#r&&(Bo.stop(),this.#r=!1),this):this}succeed(r){return this.stopAndPersist({symbol:Zt.success,text:r})}fail(r){return this.stopAndPersist({symbol:Zt.error,text:r})}warn(r){return this.stopAndPersist({symbol:Zt.warning,text:r})}info(r){return this.stopAndPersist({symbol:Zt.info,text:r})}stopAndPersist(r={}){if(this.#c)return this;let o=r.prefixText??this.#u,i=this.#g(o," "),u=r.symbol??" ",l=r.text??this.text,d=typeof l=="string"?(u?" ":"")+l:"",p=r.suffixText??this.#a,g=this.#b(p," "),x=i+u+d+g+`
|
|
26
|
-
`;return this.stop(),this.#i.write(x),this}};function Po(e){return new To(e)}var zD=(0,
|
|
26
|
+
`;return this.stop(),this.#i.write(x),this}};function Po(e){return new To(e)}var zD=(0,W.blue)((0,W.dim)("internal only"));function Oe(e,r,o){console.log(Pe[e]+r),typeof o?.exit<"u"&&process.exit(o.exit)}async function _t(e,r,o){if(!Cu){Oe("wait",e);try{let u=await r();u&&console.log(u),Oe("success",e);return}catch(u){return Oe("error",e),o?.printError!==!1&&(typeof u=="string"?console.log((0,W.red)(u)):console.error(u)),u}}let i=Po({spinner:"simpleDots",prefixText:Pe.wait+e}).start();try{let u=await r();i.stop(),Oe("success",e),u&&console.log(u)}catch(u){return i.stop(),Oe("error",e),o?.printError!==!1&&console.error(u.message),u}}var Pe={wait:`\u{1F550}${(0,W.blue)("wait")} - `,info:`${process.env.GITHUB_ACTIONS==="true"?"\u2139\uFE0F":"\u2139\uFE0F "}${(0,W.cyan)("info")} - `,success:`\u2705${(0,W.green)("ready")} - `,warn:`${process.env.GITHUB_ACTIONS==="true"?"\u26A0\uFE0F":"\u26A0\uFE0F "}${(0,W.yellow)("warn")} - `,error:`\u{1F4A5}${(0,W.red)("error")} - `,event:`\u26A1\uFE0F${(0,W.magenta)("event")} - `,paymentPrompt:`\u{1F4B0}${(0,W.yellowBright)("plan")} - `},Cu=!0;function wu(e,r){e||(Pe.wait=`${(0,W.blue)("wait")} - `,Pe.info=`${(0,W.cyan)("info")} - `,Pe.success=`${(0,W.green)("ready")} - `,Pe.warn=`${(0,W.yellow)("warn")} - `,Pe.error=`${(0,W.red)("error")} - `,Pe.event=`${(0,W.magenta)("event")} - `,Pe.paymentPrompt=`${(0,W.yellowBright)("plan")} - `),r&&(Cu=!1)}var sn=class extends Ue.Command{static baseFlags={"exit-on-error":Ue.Flags.boolean({default:!0,helpGroup:"GLOBAL",aliases:["exitOnError"],deprecateAliases:!0,summary:"Always exit with non-zero code on error",allowNo:!0}),emoji:Ue.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Prefix output with emojis \u{1F308}"}),help:Ue.Flags.boolean({default:!1,helpGroup:"GLOBAL",summary:"Show the help message for the command"}),"non-interactive":Ue.Flags.boolean({char:"I",default:!1,helpGroup:"GLOBAL",summary:"Disable interactive outputs, useful for CI"}),target:Ue.Flags.option({char:"t",description:"Raycast app target",helpGroup:"GLOBAL",multiple:!1,options:["debug","internal","release"],hidden:!0})()};flags;args;async init(){await super.init(),process.on("SIGINT",()=>process.exit(1));let{args:r,flags:o}=await this.parse({flags:this.ctor.flags,baseFlags:super.ctor.baseFlags,enableJsonFlag:this.ctor.enableJsonFlag,args:this.ctor.args,strict:this.ctor.strict});this.flags=o,this.args=r,Is(this.flags.target),wu(this.flags.emoji,this.flags["non-interactive"])}error(r,o){return o?.message&&r instanceof Error&&(r.message=`${o.message} (${r.message})`,delete o.message),super.error(r,o)}async catch(r){return super.catch(r)}async finally(r){return super.finally(r)}};var Ga=P(require("path")),Ya=P(require("fs"));var Oo=require("child_process");var Su=P(require("path"));var vu="-",Au="`git rev-list --max-parents=0 HEAD | tail -n 1`",xo;function rt(e){xo=e}function L(e,r){return new Promise((o,i)=>{(0,Oo.exec)(e,{cwd:xo},(u,l,f)=>{if(r.throwOnError&&u){i(new Error(`failed running git ${u.message.replace(/oauth2:gho_[a-zA-Z0-9]+@/g,"oauth2:gho_xxxxx")}
|
|
27
27
|
${l.trim()}
|
|
28
|
-
${f.trim()}`));return}o(l.trim())})})}function Rf(){return new Promise(e=>{(0,Oo.exec)("git --version",r=>{e(r===null)})})}async function Ru(){return await Rf()?await
|
|
28
|
+
${f.trim()}`));return}o(l.trim())})})}function Rf(){return new Promise(e=>{(0,Oo.exec)("git --version",r=>{e(r===null)})})}async function Ru(){return await Rf()?await L("git rev-parse --is-inside-work-tree",{throwOnError:!1})==="true":(Oe("info","git is not installed"),!1)}async function rr(){return await L("git status -s",{throwOnError:!0})!==""}async function Bu(){return await Bf()?L("git rev-parse HEAD",{throwOnError:!0}):""}async function Tu(e,r){xo=Su.default.dirname(r),await L(`git clone --filter=blob:none --no-checkout ${e} "${r}"`,{throwOnError:!0})}async function Pu(e,r){try{await L(`git remote set-url ${e} ${r}`,{throwOnError:!0})}catch{await L(`git remote add ${e} ${r}`,{throwOnError:!0})}}function ko(e){return L(`git config --get ${e}`,{throwOnError:!0})}function Io(e,r){return L(`git config --local ${e} "${r}"`,{throwOnError:!0})}function Ou(e){return L(`git sparse-checkout set ${e}`,{throwOnError:!0})}function xe(e){return L(`git checkout ${e}`,{throwOnError:!0})}function Et(e){return L(`git checkout -b ${e} || git checkout ${e}`,{throwOnError:!0})}function $o(e){return L(`git branch -D ${e}`,{throwOnError:!1})}async function xu(e){return await $o(e),L(`git push origin -d ${e}`,{throwOnError:!1})}async function un(e){return await L(`git ls-remote --heads origin ${e}`,{throwOnError:!1})!==""}function Wo(e,r){return L(`git fetch ${e} ${r} --depth=1`,{throwOnError:!1})}function ku(e){return L(`git reset --hard ${e}`,{throwOnError:!0})}async function Iu(e){let r=await L(`git rev-parse ${e}`,{throwOnError:!0}),o=await L(`git rev-parse origin/${e}`,{throwOnError:!0});return await L(`git merge-base --is-ancestor ${o} ${r} && echo "success"`,{throwOnError:!0})==="success"}async function $u(e){return await L(`git tag -l ${e}`,{throwOnError:!1})!==""}function Wu(e,r){return L(`git tag -f -a ${e} -m "${r}"`,{throwOnError:!0})}function Lu(e){return L(`git add . && git commit -m "${e}"`,{throwOnError:!0})}function Mu(e){return L(`git pull origin ${e} --ff-only`,{throwOnError:!0})}function qu(e){return L(`git merge ${e}`,{throwOnError:!0})}function Nu(e){return{latestPullTag:"__raycast_latest_pull_"+e+"__",latestPublishTag:"__raycast_latest_publish_"+e+"__"}}async function Bf(){try{return await L("git remote get-url origin",{throwOnError:!1}),!0}catch{return!1}}var Mo=P(require("path")),Ct=P(require("fs"));function qo(e,r,o=[".git",".github","node_modules","raycast-env.d.ts",".raycast-swift-build",".swiftpm","compiled_raycast_swift"]){let i=Ct.default.readdirSync(e);try{Ct.default.mkdirSync(r,{recursive:!0})}catch{}for(let u of i){let l=Mo.default.join(e,u),f=Mo.default.join(r,u);if(Ct.default.lstatSync(l).isDirectory()){if(!o.includes(u)){try{Ct.default.mkdirSync(f,{recursive:!0})}catch{}qo(l,f,o)}}else o.includes(u)||Ct.default.copyFileSync(l,f)}}var fi=P(require("path")),Ha=P(require("fs"));var xa=require("@oclif/core"),ka=P(ba()),Ia=P(Oa());async function $e(e,r){let o;try{o=await(0,ka.default)(e,{method:r.method||"GET",headers:{"Content-Type":"application/json",Accept:"application/json",...r.token?{Authorization:`Bearer ${r.token}`}:void 0},body:r.body})}catch(i){throw new Error(`HTTP request: ${i.message}`)}if(!o.ok){switch(o.status){case 401:throw new Ye(o,"not authorized - please log in first using `npx ray login`");case 403:throw new Ye(o,"forbidden - you don't have permissions to perform the request");case 402:throw new Ye(o,"the limit of free commands has been reached")}let i=await o.text(),u;try{u=JSON.parse(i)}catch{throw new Ye(o,`HTTP error: ${o.status} - ${i}`)}throw Array.isArray(u.errors)&&u.errors.length>0?new Ye(o,`error: ${u.errors[0].status} - ${u.errors[0].title}`):new Ye(o,`HTTP error: ${o.status} - ${i}`)}return await o.json()}var Ye=class extends Error{constructor(r,o){let i=r.headers.get("X-Request-Id");i?super(`${o} (${r.url} RequestID: ${i})`):super(o),this.name="HTTPError"}};function $a(e){(0,Ia.default)(e).catch(r=>{xa.ux.error(new Error(`failed opening browser to URL ${e}: ${r.message}`),{exit:1})})}var li=P(require("path"));async function Wa(){if(De("githubAccessToken"))return;let e=De("githubClientId"),r=await $e("https://github.com/login/device/code",{method:"POST",body:JSON.stringify({client_id:e,scope:"repo"})});Oe("info",`
|
|
29
29
|
|
|
30
30
|
\u{1F510} Raycast extensions are published on GitHub.
|
|
31
31
|
To automate this process, you have to authenticate with GitHub.
|