astro-ghostcms/.pnpm-store/v3/files/75/3021b7f5b1f941d077b7023328c...

20 lines
109 KiB
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
var Ps=Object.defineProperty;var n=(i,o)=>Ps(i,"name",{value:o,configurable:!0});var ui=(i,o,a)=>{if(!o.has(i))throw TypeError("Cannot "+a)};var O=(i,o,a)=>(ui(i,o,"read from private field"),a?a.call(i):o.get(i)),be=(i,o,a)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,a)},X=(i,o,a,u)=>(ui(i,o,"write to private field"),u?u.call(i,a):o.set(i,a),a);var Pe,Wt,bt,Cr,Ve,qt,Ot,zt,ee,It,Ne,He,Ft;import Et from"node:http";import vs from"node:https";import st from"node:zlib";import me,{PassThrough as cr,pipeline as ut}from"node:stream";import{Buffer as x}from"node:buffer";import{types as dr,promisify as Es,deprecate as hr}from"node:util";import{c as En,g as As}from"./shared/node-fetch-native.1a4a356d.mjs";import{format as Bs}from"node:url";import{isIP as ks}from"node:net";import{statSync as li,createReadStream as Ws,promises as qs}from"node:fs";import{basename as Os}from"node:path";function zs(i){if(!/^data:/i.test(i))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');i=i.replace(/\r?\n/g,"");const o=i.indexOf(",");if(o===-1||o<=4)throw new TypeError("malformed data: URI");const a=i.substring(5,o).split(";");let u="",f=!1;const d=a[0]||"text/plain";let b=d;for(let D=1;D<a.length;D++)a[D]==="base64"?f=!0:a[D]&&(b+=`;${a[D]}`,a[D].indexOf("charset=")===0&&(u=a[D].substring(8)));!a[0]&&!u.length&&(b+=";charset=US-ASCII",u="US-ASCII");const p=f?"base64":"ascii",E=unescape(i.substring(o+1)),w=Buffer.from(E,p);return w.type=d,w.typeFull=b,w.charset=u,w}n(zs,"dataUriToBuffer");var pr={exports:{}};/**
* @license
* web-streams-polyfill v3.3.2
* Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
* This code is released under the MIT license.
* SPDX-License-Identifier: MIT
*/var fi;function Is(){return fi||(fi=1,function(i,o){(function(a,u){u(o)})(En,function(a){const u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:e=>`Symbol(${e})`;function f(){}n(f,"noop");function d(e){return typeof e=="object"&&e!==null||typeof e=="function"}n(d,"typeIsObject");const b=f;function p(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch{}}n(p,"setFunctionName");const E=Promise,w=Promise.prototype.then,D=Promise.reject.bind(E);function A(e){return new E(e)}n(A,"newPromise");function S(e){return A(t=>t(e))}n(S,"promiseResolvedWith");function m(e){return D(e)}n(m,"promiseRejectedWith");function R(e,t,r){return w.call(e,t,r)}n(R,"PerformPromiseThen");function q(e,t,r){R(R(e,t,r),void 0,b)}n(q,"uponPromise");function F(e,t){q(e,t)}n(F,"uponFulfillment");function Q(e,t){q(e,void 0,t)}n(Q,"uponRejection");function M(e,t,r){return R(e,t,r)}n(M,"transformPromiseWith");function ve(e){R(e,void 0,b)}n(ve,"setPromiseIsHandledToTrue");let z=n(e=>{if(typeof queueMicrotask=="function")z=queueMicrotask;else{const t=S(void 0);z=n(r=>R(t,r),"_queueMicrotask")}return z(e)},"_queueMicrotask");function j(e,t,r){if(typeof e!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}n(j,"reflectCall");function I(e,t,r){try{return S(j(e,t,r))}catch(s){return m(s)}}n(I,"promiseCall");const mt=16384,cn=class cn{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(t){const r=this._back;let s=r;r._elements.length===mt-1&&(s={_elements:[],_next:void 0}),r._elements.push(t),s!==r&&(this._back=s,r._next=s),++this._size}shift(){const t=this._front;let r=t;const s=this._cursor;let l=s+1;const c=t._elements,h=c[s];return l===mt&&(r=t._next,l=0),--this._size,this._cursor=l,t!==r&&(this._front=r),c[s]=void 0,h}forEach(t){let r=this._cursor,s=this._front,l=s._elements;for(;(r!==l.length||s._next!==void 0)&&!(r===l.length&&(s=s._next,l=s._elements,r=0,l.length===0));)t(l[r]),++r}peek(){const t=this._front,r=this._cursor;return t._elements[r]}};n(cn,"SimpleQueue");let U=cn;const xn=u("[[AbortSteps]]"),Nn=u("[[ErrorSteps]]"),Ar=u("[[CancelSteps]]"),Br=u("[[PullSteps]]"),kr=u("[[ReleaseSteps]]");function Hn(e,t){e._ownerReadableStream=t,t._reader=e,t._state==="readable"?qr(e):t._state==="closed"?Fi(e):Vn(e,t._storedError)}n(Hn,"ReadableStreamReaderGenericInitialize");function Wr(e,t){const r=e._ownerReadableStream;return ie(r,t)}n(Wr,"ReadableStreamReaderGenericCancel");function ge(e){const t=e._ownerReadableStream;t._state==="readable"?Or(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):ji(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),t._readableStreamController[kr](),t._reader=void 0,e._ownerReadableStream=void 0}n(ge,"ReadableStreamReaderGenericRelease");function jt(e){return new TypeError("Cannot "+e+" a stream using a released reader")}n(jt,"readerLockException");function qr(e){e._closedPromise=A((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}n(qr,"defaultReaderClosedPromiseInitialize");function Vn(e,t){qr(e),Or(e,t)}n(Vn,"defaultReaderClosedPromiseInitializeAsRejected");function Fi(e){qr(e),Qn(e)}n(Fi,"defaultReaderClosedPromiseInitializeAsResolved");function Or(e,t){e._closedPromise_reject!==void 0&&(ve(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}n(Or,"defaultReaderClosedPromiseReject");function ji(e,t){Vn(e,t)}n(ji,"defaultReaderClosedPromiseResetToRejected");function Qn(e){e._closedPromise_resolve!==void 0&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}n(Qn,"defaultReaderClosedPromiseResolve");const Yn=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Li=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function $i(e){return typeof e=="object"||typeof e=="function"}n($
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"e$1"),Me=n((i,o,a)=>{if(o.length<a)throw new TypeError(`Failed to execute '${i}' on 'FormData': ${a} arguments required, but only ${o.length} present.`)},"x");const br=(It=class{constructor(...o){be(this,ee,[]);if(o.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[At](){return"FormData"}[Ds](){return this.entries()}static[Ms](o){return o&&typeof o=="object"&&o[At]==="FormData"&&!Us.some(a=>typeof o[a]!="function")}append(...o){Me("append",arguments,2),O(this,ee).push(pi(...o))}delete(o){Me("delete",arguments,1),o+="",X(this,ee,O(this,ee).filter(([a])=>a!==o))}get(o){Me("get",arguments,1),o+="";for(var a=O(this,ee),u=a.length,f=0;f<u;f++)if(a[f][0]===o)return a[f][1];return null}getAll(o,a){return Me("getAll",arguments,1),a=[],o+="",O(this,ee).forEach(u=>u[0]===o&&a.push(u[1])),a}has(o){return Me("has",arguments,1),o+="",O(this,ee).some(a=>a[0]===o)}forEach(o,a){Me("forEach",arguments,1);for(var[u,f]of this)o.call(a,f,u,this)}set(...o){Me("set",arguments,2);var a=[],u=!0;o=pi(...o),O(this,ee).forEach(f=>{f[0]===o[0]?u&&(u=!a.push(o)):a.push(f)}),u&&a.push(o),X(this,ee,a)}*entries(){yield*O(this,ee)}*keys(){for(var[o]of this)yield o}*values(){for(var[,o]of this)yield o}},ee=new WeakMap,n(It,"FormData"),It);function xs(i,o=lt){var a=`${hi()}${hi()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),u=[],f=`--${a}\r
Content-Disposition: form-data; name="`;return i.forEach((d,b)=>typeof d=="string"?u.push(f+kn(b)+`"\r
\r
${d.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
`)}\r
`):u.push(f+kn(b)+`"; filename="${kn(d.name,1)}"\r
Content-Type: ${d.type||"application/octet-stream"}\r
\r
`,d,`\r
`)),u.push(`--${a}--`),new o(u,{type:"multipart/form-data; boundary="+a})}n(xs,"formDataToBlob");const Ln=class Ln extends Error{constructor(o,a){super(o),Error.captureStackTrace(this,this.constructor),this.type=a}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};n(Ln,"FetchBaseError");let ft=Ln;const $n=class $n extends ft{constructor(o,a,u){super(o,a),u&&(this.code=this.errno=u.code,this.erroredSysCall=u.syscall)}};n($n,"FetchError");let G=$n;const mr=Symbol.toStringTag,bi=n(i=>typeof i=="object"&&typeof i.append=="function"&&typeof i.delete=="function"&&typeof i.get=="function"&&typeof i.getAll=="function"&&typeof i.has=="function"&&typeof i.set=="function"&&typeof i.sort=="function"&&i[mr]==="URLSearchParams","isURLSearchParameters"),yr=n(i=>i&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.constructor=="function"&&/^(Blob|File)$/.test(i[mr]),"isBlob"),Ns=n(i=>typeof i=="object"&&(i[mr]==="AbortSignal"||i[mr]==="EventTarget"),"isAbortSignal"),Hs=n((i,o)=>{const a=new URL(o).hostname,u=new URL(i).hostname;return a===u||a.endsWith(`.${u}`)},"isDomainOrSubdomain"),Vs=n((i,o)=>{const a=new URL(o).protocol,u=new URL(i).protocol;return a===u},"isSameProtocol"),Qs=Es(me.pipeline),V=Symbol("Body internals"),Dn=class Dn{constructor(o,{size:a=0}={}){let u=null;o===null?o=null:bi(o)?o=x.from(o.toString()):yr(o)||x.isBuffer(o)||(dr.isAnyArrayBuffer(o)?o=x.from(o):ArrayBuffer.isView(o)?o=x.from(o.buffer,o.byteOffset,o.byteLength):o instanceof me||(o instanceof br?(o=xs(o),u=o.type.split("=")[1]):o=x.from(String(o))));let f=o;x.isBuffer(o)?f=me.Readable.from(o):yr(o)&&(f=me.Readable.from(o.stream())),this[V]={body:o,stream:f,boundary:u,disturbed:!1,error:null},this.size=a,o instanceof me&&o.on("error",d=>{const b=d instanceof ft?d:new G(`Invalid response body while trying to fetch ${this.url}: ${d.message}`,"system",d);this[V].error=b})}get body(){return this[V].stream}get bodyUsed(){return this[V].disturbed}async arrayBuffer(){const{buffer:o,byteOffset:a,byteLength:u}=await Wn(this);return o.slice(a,a+u)}async formData(){const o=this.headers.get("content-type");if(o.startsWith("application/x-www-form-urlencoded")){const u=new br,f=new URLSearchParams(await this.text());for(const[d,b]of f)u.append(d,b);return u}const{toFormData:a}=await import("./chunks/multipart-parser.mjs");return a(this.body,o)}async blob(){const o=this.headers&&this.headers.get("content-type")||this[V].body&&this[V].body.type||"",a=await this.arrayBuffer();return new lt([a],{type:o})}async json(){const o=await this.text();return JSON.parse(o)}async text(){const o=await Wn(this);return new TextDecoder().decode(o)}buffer(){return Wn(this)}};n(Dn,"Body");let Ue=Dn;Ue.prototype.buffer=hr(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer"),Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:hr(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Wn(i){if(i[V].disturbed)throw new TypeError(`body used already for: ${i.url}`);if(i[V].disturbed=!0,i[V].error)throw i[V].error;const{body:o}=i;if(o===null)return x.alloc(0);if(!(o instanceof me))return x.alloc(0);const a=[];let u=0;try{for await(const f of o){if(i.size>0&&u+f.length>i.size){const d=new G(`content size at ${i.url} over limit: ${i.size}`,"max-size");throw o.destroy(d),d}u+=f.length,a.push(f)}}catch(f){throw f instanceof ft?f:new G(`Invalid response body while trying to fetch ${i.url}: ${f.message}`,"system",f)}if(o.readableEnded===!0||o._readableState.ended===!0)try{return a.every(f=>typeof f=="string")?x.from(a.join("")):x.concat(a,u)}catch(f){throw new G(`Could not create Buffer from response body for ${i.url}: ${f.message}`,"system",f)}else throw new G(`Premature close of server response whil
\r
`);let u=!1,f=!1,d;i.on("response",b=>{const{headers:p}=b;u=p["transfer-encoding"]==="chunked"&&!p["content-length"]}),i.on("socket",b=>{const p=n(()=>{if(u&&!f){const w=new Error("Premature close");w.code="ERR_STREAM_PREMATURE_CLOSE",o(w)}},"onSocketClose"),E=n(w=>{f=x.compare(w.slice(-5),a)===0,!f&&d&&(f=x.compare(d.slice(-3),a.slice(0,3))===0&&x.compare(w.slice(-2),a.slice(3))===0),d=w},"onData");b.prependListener("close",p),b.on("data",E),i.on("close",()=>{b.removeListener("close",p),b.removeListener("data",E)})})}n(pu,"fixResponseChunkedTransferBadEnding");const Ri=new WeakMap,Fn=new WeakMap;function W(i){const o=Ri.get(i);return console.assert(o!=null,"'this' is expected an Event object, but got",i),o}n(W,"pd");function Ti(i){if(i.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",i.passiveListener);return}i.event.cancelable&&(i.canceled=!0,typeof i.event.preventDefault=="function"&&i.event.preventDefault())}n(Ti,"setCancelFlag");function ht(i,o){Ri.set(this,{eventTarget:i,event:o,eventPhase:2,currentTarget:i,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:o.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const a=Object.keys(o);for(let u=0;u<a.length;++u){const f=a[u];f in this||Object.defineProperty(this,f,Ci(f))}}n(ht,"Event"),ht.prototype={get type(){return W(this).event.type},get target(){return W(this).eventTarget},get currentTarget(){return W(this).currentTarget},composedPath(){const i=W(this).currentTarget;return i==null?[]:[i]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return W(this).eventPhase},stopPropagation(){const i=W(this);i.stopped=!0,typeof i.event.stopPropagation=="function"&&i.event.stopPropagation()},stopImmediatePropagation(){const i=W(this);i.stopped=!0,i.immediateStopped=!0,typeof i.event.stopImmediatePropagation=="function"&&i.event.stopImmediatePropagation()},get bubbles(){return!!W(this).event.bubbles},get cancelable(){return!!W(this).event.cancelable},preventDefault(){Ti(W(this))},get defaultPrevented(){return W(this).canceled},get composed(){return!!W(this).event.composed},get timeStamp(){return W(this).timeStamp},get srcElement(){return W(this).eventTarget},get cancelBubble(){return W(this).stopped},set cancelBubble(i){if(!i)return;const o=W(this);o.stopped=!0,typeof o.event.cancelBubble=="boolean"&&(o.event.cancelBubble=!0)},get returnValue(){return!W(this).canceled},set returnValue(i){i||Ti(W(this))},initEvent(){}},Object.defineProperty(ht.prototype,"constructor",{value:ht,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(ht.prototype,window.Event.prototype),Fn.set(window.Event.prototype,ht));function Ci(i){return{get(){return W(this).event[i]},set(o){W(this).event[i]=o},configurable:!0,enumerable:!0}}n(Ci,"defineRedirectDescriptor");function bu(i){return{value(){const o=W(this).event;return o[i].apply(o,arguments)},configurable:!0,enumerable:!0}}n(bu,"defineCallDescriptor");function mu(i,o){const a=Object.keys(o);if(a.length===0)return i;function u(f,d){i.call(this,f,d)}n(u,"CustomEvent"),u.prototype=Object.create(i.prototype,{constructor:{value:u,configurable:!0,writable:!0}});for(let f=0;f<a.length;++f){const d=a[f];if(!(d in i.prototype)){const p=typeof Object.getOwnPropertyDescriptor(o,d).value=="function";Object.defineProperty(u.prototype,d,p?bu(d):Ci(d))}}return u}n(mu,"defineWrapper");function Pi(i){if(i==null||i===Object.prototype)return ht;let o=Fn.get(i);return o==null&&(o=mu(Pi(Object.getPrototypeOf(i)),i),Fn.set(i,o)),o}n(Pi,"getWrapper");function yu(i,o){const a=Pi(Object.getPrototypeOf(o));return new a(i,o)}n(yu,"wrapEvent");function gu(i){return W(i).immediateStopped}n(gu,"isStopped");function _u(i,o){W(i).eventPhase=o}n(_u,"setEventPhase");function Su(i,o){W(i).currentTarget=o}n(Su,"setCurrentTarget");function vi(i,o){W(i).passiveListener=o}n(vi,"setPassiveListener"