diff --git a/dist/index.js b/dist/index.js index f67270f..fd07010 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,10 +1,10 @@ -require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.restoreCache=i.isFeatureAvailable=i.ReserveCacheError=i.ValidationError=void 0;const d=l(a(2186));const u=l(a(1017));const m=l(a(1518));const h=l(a(8245));const g=a(3434);class ValidationError extends Error{constructor(r){super(r);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}i.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(r){super(r);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}i.ReserveCacheError=ReserveCacheError;function checkPaths(r){if(!r||r.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(r){if(r.length>512){throw new ValidationError(`Key Validation Error: ${r} cannot be larger than 512 characters.`)}const i=/^[^,]*$/;if(!i.test(r)){throw new ValidationError(`Key Validation Error: ${r} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}i.isFeatureAvailable=isFeatureAvailable;function restoreCache(r,i,a,s,p=false){return c(this,void 0,void 0,(function*(){checkPaths(r);a=a||[];const l=[i,...a];d.debug("Resolved Keys:");d.debug(JSON.stringify(l));if(l.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const r of l){checkKey(r)}const c=yield m.getCompressionMethod();let y="";try{const i=yield h.getCacheEntry(l,r,{compressionMethod:c,enableCrossOsArchive:p});if(!(i===null||i===void 0?void 0:i.archiveLocation)){return undefined}if(s===null||s===void 0?void 0:s.lookupOnly){d.info("Lookup only - skipping download");return i.cacheKey}y=u.join(yield m.createTempDirectory(),m.getCacheFileName(c));d.debug(`Archive Path: ${y}`);yield h.downloadCache(i.archiveLocation,y,s);if(d.isDebug()){yield(0,g.listTar)(y,c)}const a=m.getArchiveFileSizeInBytes(y);d.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield(0,g.extractTar)(y,c);d.info("Cache restored successfully");return i.cacheKey}catch(r){const i=r;if(i.name===ValidationError.name){throw r}else{d.warning(`Failed to restore: ${r.message}`)}}finally{try{yield m.unlinkFile(y)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}return undefined}))}i.restoreCache=restoreCache;function saveCache(r,i,a,s=false){var p,l,y,v,b;return c(this,void 0,void 0,(function*(){checkPaths(r);checkKey(i);const c=yield m.getCompressionMethod();let x=-1;const w=yield m.resolvePaths(r);d.debug("Cache Paths:");d.debug(`${JSON.stringify(w)}`);if(w.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const S=yield m.createTempDirectory();const _=u.join(S,m.getCacheFileName(c));d.debug(`Archive Path: ${_}`);try{yield(0,g.createTar)(S,w,c);if(d.isDebug()){yield(0,g.listTar)(_,c)}const u=10*1024*1024*1024;const E=m.getArchiveFileSizeInBytes(_);d.debug(`File Size: ${E}`);if(E>u&&!m.isGhes()){throw new Error(`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the 10GB limit, not saving cache.`)}d.debug("Reserving Cache");const T=yield h.reserveCache(i,r,{compressionMethod:c,enableCrossOsArchive:s,cacheSize:E});if((p=T===null||T===void 0?void 0:T.result)===null||p===void 0?void 0:p.cacheId){x=(l=T===null||T===void 0?void 0:T.result)===null||l===void 0?void 0:l.cacheId}else if((T===null||T===void 0?void 0:T.statusCode)===400){throw new Error((v=(y=T===null||T===void 0?void 0:T.error)===null||y===void 0?void 0:y.message)!==null&&v!==void 0?v:`Cache size of ~${Math.round(E/(1024*1024))} MB (${E} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${i}, another job may be creating this cache. More details: ${(b=T===null||T===void 0?void 0:T.error)===null||b===void 0?void 0:b.message}`)}d.debug(`Saving Cache (ID: ${x})`);yield h.saveCache(x,_,a)}catch(r){const i=r;if(i.name===ValidationError.name){throw r}else if(i.name===ReserveCacheError.name){d.info(`Failed to save: ${i.message}`)}else{d.warning(`Failed to save: ${i.message}`)}}finally{try{yield m.unlinkFile(_)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}return x}))}i.saveCache=saveCache},8245:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.reserveCache=i.downloadCache=i.getCacheEntry=i.getCacheVersion=void 0;const d=l(a(2186));const u=a(1825);const m=a(2001);const h=l(a(6113));const g=l(a(7147));const y=a(7310);const v=l(a(1518));const b=a(5500);const x=a(6215);const w=a(3981);const S="1.0";function getCacheApiUrl(r){const i=process.env["ACTIONS_CACHE_URL"]||"";if(!i){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${i}_apis/artifactcache/${r}`;d.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(r,i){return`${r};api-version=${i}`}function getRequestOptions(){const r={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return r}function createHttpClient(){const r=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const i=new m.BearerCredentialHandler(r);return new u.HttpClient("actions/cache",[i],getRequestOptions())}function getCacheVersion(r,i,a=false){const s=r;if(i){s.push(i)}if(process.platform==="win32"&&!a){s.push("windows-only")}s.push(S);return h.createHash("sha256").update(s.join("|")).digest("hex")}i.getCacheVersion=getCacheVersion;function getCacheEntry(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();const p=getCacheVersion(i,a===null||a===void 0?void 0:a.compressionMethod,a===null||a===void 0?void 0:a.enableCrossOsArchive);const l=`cache?keys=${encodeURIComponent(r.join(","))}&version=${p}`;const u=yield(0,w.retryTypedResponse)("getCacheEntry",(()=>c(this,void 0,void 0,(function*(){return s.getJson(getCacheApiUrl(l))}))));if(u.statusCode===204){if(d.isDebug()){yield printCachesListForDiagnostics(r[0],s,p)}return null}if(!(0,w.isSuccessStatusCode)(u.statusCode)){throw new Error(`Cache service responded with ${u.statusCode}`)}const m=u.result;const h=m===null||m===void 0?void 0:m.archiveLocation;if(!h){throw new Error("Cache not found.")}d.setSecret(h);d.debug(`Cache Result:`);d.debug(JSON.stringify(m));return m}))}i.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(r,i,a){return c(this,void 0,void 0,(function*(){const s=`caches?key=${encodeURIComponent(r)}`;const p=yield(0,w.retryTypedResponse)("listCache",(()=>c(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(s))}))));if(p.statusCode===200){const i=p.result;const s=i===null||i===void 0?void 0:i.totalCount;if(s&&s>0){d.debug(`No matching cache found for cache key '${r}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const r of(i===null||i===void 0?void 0:i.artifactCaches)||[]){d.debug(`Cache Key: ${r===null||r===void 0?void 0:r.cacheKey}, Cache Version: ${r===null||r===void 0?void 0:r.cacheVersion}, Cache Scope: ${r===null||r===void 0?void 0:r.scope}, Cache Created: ${r===null||r===void 0?void 0:r.creationTime}`)}}}}))}function downloadCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=new y.URL(r);const p=(0,x.getDownloadOptions)(a);if(s.hostname.endsWith(".blob.core.windows.net")){if(p.useAzureSdk){yield(0,b.downloadCacheStorageSDK)(r,i,p)}else if(p.concurrentBlobDownloads){yield(0,b.downloadCacheHttpClientConcurrent)(r,i,p)}else{yield(0,b.downloadCacheHttpClient)(r,i)}}else{yield(0,b.downloadCacheHttpClient)(r,i)}}))}i.downloadCache=downloadCache;function reserveCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();const p=getCacheVersion(i,a===null||a===void 0?void 0:a.compressionMethod,a===null||a===void 0?void 0:a.enableCrossOsArchive);const l={key:r,version:p,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const d=yield(0,w.retryTypedResponse)("reserveCache",(()=>c(this,void 0,void 0,(function*(){return s.postJson(getCacheApiUrl("caches"),l)}))));return d}))}i.reserveCache=reserveCache;function getContentRange(r,i){return`bytes ${r}-${i}/*`}function uploadChunk(r,i,a,s,p){return c(this,void 0,void 0,(function*(){d.debug(`Uploading chunk of size ${p-s+1} bytes at offset ${s} with content range: ${getContentRange(s,p)}`);const l={"Content-Type":"application/octet-stream","Content-Range":getContentRange(s,p)};const u=yield(0,w.retryHttpClientResponse)(`uploadChunk (start: ${s}, end: ${p})`,(()=>c(this,void 0,void 0,(function*(){return r.sendStream("PATCH",i,a(),l)}))));if(!(0,w.isSuccessStatusCode)(u.message.statusCode)){throw new Error(`Cache service responded with ${u.message.statusCode} during upload chunk.`)}}))}function uploadFile(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=v.getArchiveFileSizeInBytes(a);const l=getCacheApiUrl(`caches/${i.toString()}`);const u=g.openSync(a,"r");const m=(0,x.getUploadOptions)(s);const h=v.assertDefined("uploadConcurrency",m.uploadConcurrency);const y=v.assertDefined("uploadChunkSize",m.uploadChunkSize);const b=[...new Array(h).keys()];d.debug("Awaiting all uploads");let w=0;try{yield Promise.all(b.map((()=>c(this,void 0,void 0,(function*(){while(w
g.createReadStream(a,{fd:u,start:s,end:c,autoClose:false}).on("error",(r=>{throw new Error(`Cache upload failed because file read failed with ${r.message}`)}))),s,c)}})))))}finally{g.closeSync(u)}return}))}function commitCache(r,i,a){return c(this,void 0,void 0,(function*(){const s={size:a};return yield(0,w.retryTypedResponse)("commitCache",(()=>c(this,void 0,void 0,(function*(){return r.postJson(getCacheApiUrl(`caches/${i.toString()}`),s)}))))}))}function saveCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();d.debug("Upload cache");yield uploadFile(s,r,i,a);d.debug("Commiting cache");const p=v.getArchiveFileSizeInBytes(i);d.info(`Cache Size: ~${Math.round(p/(1024*1024))} MB (${p} B)`);const l=yield commitCache(s,r,p);if(!(0,w.isSuccessStatusCode)(l.statusCode)){throw new Error(`Cache service responded with ${l.statusCode} during commit cache.`)}d.info("Cache saved successfully")}))}i.saveCache=saveCache},1518:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};var d=this&&this.__asyncValues||function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r[Symbol.asyncIterator],a;return i?i.call(r):(r=typeof __values==="function"?__values(r):r[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(i){a[i]=r[i]&&function(a){return new Promise((function(s,p){a=r[i](a),settle(s,p,a.done,a.value)}))}}function settle(r,i,a,s){Promise.resolve(s).then((function(i){r({value:i,done:a})}),i)}};Object.defineProperty(i,"__esModule",{value:true});i.isGhes=i.assertDefined=i.getGnuTarPathOnWindows=i.getCacheFileName=i.getCompressionMethod=i.unlinkFile=i.resolvePaths=i.getArchiveFileSizeInBytes=i.createTempDirectory=void 0;const u=l(a(2186));const m=l(a(1514));const h=l(a(8090));const g=l(a(7436));const y=l(a(7147));const v=l(a(1017));const b=l(a(5911));const x=l(a(3837));const w=a(4138);const S=a(8840);function createTempDirectory(){return c(this,void 0,void 0,(function*(){const r=process.platform==="win32";let i=process.env["RUNNER_TEMP"]||"";if(!i){let a;if(r){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}i=v.join(a,"actions","temp")}const a=v.join(i,(0,w.v4)());yield g.mkdirP(a);return a}))}i.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(r){return y.statSync(r).size}i.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(r){var i,a,s,p;var l;return c(this,void 0,void 0,(function*(){const c=[];const m=(l=process.env["GITHUB_WORKSPACE"])!==null&&l!==void 0?l:process.cwd();const g=yield h.create(r.join("\n"),{implicitDescendants:false});try{for(var y=true,b=d(g.globGenerator()),x;x=yield b.next(),i=x.done,!i;){p=x.value;y=false;try{const r=p;const i=v.relative(m,r).replace(new RegExp(`\\${v.sep}`,"g"),"/");u.debug(`Matched: ${i}`);if(i===""){c.push(".")}else{c.push(`${i}`)}}finally{y=true}}}catch(r){a={error:r}}finally{try{if(!y&&!i&&(s=b.return))yield s.call(b)}finally{if(a)throw a.error}}return c}))}i.resolvePaths=resolvePaths;function unlinkFile(r){return c(this,void 0,void 0,(function*(){return x.promisify(y.unlink)(r)}))}i.unlinkFile=unlinkFile;function getVersion(r,i=[]){return c(this,void 0,void 0,(function*(){let a="";i.push("--version");u.debug(`Checking ${r} ${i.join(" ")}`);try{yield m.exec(`${r}`,i,{ignoreReturnCode:true,silent:true,listeners:{stdout:r=>a+=r.toString(),stderr:r=>a+=r.toString()}})}catch(r){u.debug(r.message)}a=a.trim();u.debug(a);return a}))}function getCompressionMethod(){return c(this,void 0,void 0,(function*(){const r=yield getVersion("zstd",["--quiet"]);const i=b.clean(r);u.debug(`zstd version: ${i}`);if(r===""){return S.CompressionMethod.Gzip}else{return S.CompressionMethod.ZstdWithoutLong}}))}i.getCompressionMethod=getCompressionMethod;function getCacheFileName(r){return r===S.CompressionMethod.Gzip?S.CacheFilename.Gzip:S.CacheFilename.Zstd}i.getCacheFileName=getCacheFileName;function getGnuTarPathOnWindows(){return c(this,void 0,void 0,(function*(){if(y.existsSync(S.GnuTarPathOnWindows)){return S.GnuTarPathOnWindows}const r=yield getVersion("tar");return r.toLowerCase().includes("gnu tar")?g.which("tar"):""}))}i.getGnuTarPathOnWindows=getGnuTarPathOnWindows;function assertDefined(r,i){if(i===undefined){throw Error(`Expected ${r} but value was undefiend`)}return i}i.assertDefined=assertDefined;function isGhes(){const r=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return r.hostname.toUpperCase()!=="GITHUB.COM"}i.isGhes=isGhes},8840:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.ManifestFilename=i.TarFilename=i.SystemTarPathOnWindows=i.GnuTarPathOnWindows=i.SocketTimeout=i.DefaultRetryDelay=i.DefaultRetryAttempts=i.ArchiveToolType=i.CompressionMethod=i.CacheFilename=void 0;var a;(function(r){r["Gzip"]="cache.tgz";r["Zstd"]="cache.tzst"})(a=i.CacheFilename||(i.CacheFilename={}));var s;(function(r){r["Gzip"]="gzip";r["ZstdWithoutLong"]="zstd-without-long";r["Zstd"]="zstd"})(s=i.CompressionMethod||(i.CompressionMethod={}));var p;(function(r){r["GNU"]="gnu";r["BSD"]="bsd"})(p=i.ArchiveToolType||(i.ArchiveToolType={}));i.DefaultRetryAttempts=2;i.DefaultRetryDelay=5e3;i.SocketTimeout=5e3;i.GnuTarPathOnWindows=`${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`;i.SystemTarPathOnWindows=`${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`;i.TarFilename="cache.tar";i.ManifestFilename="manifest.txt"},5500:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.downloadCacheStorageSDK=i.downloadCacheHttpClientConcurrent=i.downloadCacheHttpClient=i.DownloadProgress=void 0;const d=l(a(2186));const u=a(1825);const m=a(4100);const h=l(a(4300));const g=l(a(7147));const y=l(a(2781));const v=l(a(3837));const b=l(a(1518));const x=a(8840);const w=a(3981);const S=a(2557);function pipeResponseToStream(r,i){return c(this,void 0,void 0,(function*(){const a=v.promisify(y.pipeline);yield a(r.message,i)}))}class DownloadProgress{constructor(r){this.contentLength=r;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(r){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=r;this.receivedBytes=0;d.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(r){this.receivedBytes=r}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const r=this.segmentOffset+this.receivedBytes;const i=(100*(r/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const s=(r/(1024*1024)/(a/1e3)).toFixed(1);d.info(`Received ${r} of ${this.contentLength} (${i}%), ${s} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return r=>{this.setReceivedBytes(r.loadedBytes)}}startDisplayTimer(r=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,r)}};this.timeoutHandle=setTimeout(displayCallback,r)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}i.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(r,i){return c(this,void 0,void 0,(function*(){const a=g.createWriteStream(i);const s=new u.HttpClient("actions/cache");const p=yield(0,w.retryHttpClientResponse)("downloadCache",(()=>c(this,void 0,void 0,(function*(){return s.get(r)}))));p.message.socket.setTimeout(x.SocketTimeout,(()=>{p.message.destroy();d.debug(`Aborting download, socket timed out after ${x.SocketTimeout} ms`)}));yield pipeResponseToStream(p,a);const l=p.message.headers["content-length"];if(l){const r=parseInt(l);const a=b.getArchiveFileSizeInBytes(i);if(a!==r){throw new Error(`Incomplete download. Expected file size: ${r}, actual file size: ${a}`)}}else{d.debug("Unable to validate download, no Content-Length header")}}))}i.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheHttpClientConcurrent(r,i,a){var s;return c(this,void 0,void 0,(function*(){const p=yield g.promises.open(i,"w");const l=new u.HttpClient("actions/cache",undefined,{socketTimeout:a.timeoutInMs,keepAlive:true});try{const i=yield(0,w.retryHttpClientResponse)("downloadCacheMetadata",(()=>c(this,void 0,void 0,(function*(){return yield l.request("HEAD",r,null,{})}))));const d=i.message.headers["content-length"];if(d===undefined||d===null){throw new Error("Content-Length not found on blob response")}const u=parseInt(d);if(Number.isNaN(u)){throw new Error(`Could not interpret Content-Length: ${u}`)}const m=[];const h=4*1024*1024;for(let i=0;ic(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(l,r,i,a)}))})}m.reverse();let g=0;let y=0;const v=new DownloadProgress(u);v.startDisplayTimer();const b=v.onProgress();const x=[];let S;const waitAndWrite=()=>c(this,void 0,void 0,(function*(){const r=yield Promise.race(Object.values(x));yield p.write(r.buffer,0,r.count,r.offset);g--;delete x[r.offset];y+=r.count;b({loadedBytes:y})}));while(S=m.pop()){x[S.offset]=S.promiseGetter();g++;if(g>=((s=a.downloadConcurrency)!==null&&s!==void 0?s:10)){yield waitAndWrite()}}while(g>0){yield waitAndWrite()}}finally{l.dispose();yield p.close()}}))}i.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=5;let l=0;while(true){try{const p=3e4;const l=yield promiseWithTimeout(p,downloadSegment(r,i,a,s));if(typeof l==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return l}catch(r){if(l>=p){throw r}l++}}}))}function downloadSegment(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=yield(0,w.retryHttpClientResponse)("downloadCachePart",(()=>c(this,void 0,void 0,(function*(){return yield r.get(i,{Range:`bytes=${a}-${a+s-1}`})}))));if(!p.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:a,count:s,buffer:yield p.readBodyBuffer()}}))}function downloadCacheStorageSDK(r,i,a){var s;return c(this,void 0,void 0,(function*(){const p=new m.BlockBlobClient(r,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const l=yield p.getProperties();const c=(s=l.contentLength)!==null&&s!==void 0?s:-1;if(c<0){d.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(r,i)}else{const r=Math.min(134217728,h.constants.MAX_LENGTH);const s=new DownloadProgress(c);const l=g.openSync(i,"w");try{s.startDisplayTimer();const i=new S.AbortController;const d=i.signal;while(!s.isDone()){const u=s.segmentOffset+s.segmentSize;const m=Math.min(r,c-u);s.nextSegment(m);const h=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,p.downloadToBuffer(u,m,{abortSignal:d,concurrency:a.downloadConcurrency,onProgress:s.onProgress()}));if(h==="timeout"){i.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(h)){g.writeFileSync(l,h)}}}finally{s.stopDisplayTimer();g.closeSync(l)}}}))}i.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(r,i)=>c(void 0,void 0,void 0,(function*(){let a;const s=new Promise((i=>{a=setTimeout((()=>i("timeout")),r)}));return Promise.race([i,s]).then((r=>{clearTimeout(a);return r}))}))},3981:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.retryHttpClientResponse=i.retryTypedResponse=i.retry=i.isRetryableStatusCode=i.isServerErrorStatusCode=i.isSuccessStatusCode=void 0;const d=l(a(2186));const u=a(1825);const m=a(8840);function isSuccessStatusCode(r){if(!r){return false}return r>=200&&r<300}i.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(r){if(!r){return true}return r>=500}i.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(r){if(!r){return false}const i=[u.HttpCodes.BadGateway,u.HttpCodes.ServiceUnavailable,u.HttpCodes.GatewayTimeout];return i.includes(r)}i.isRetryableStatusCode=isRetryableStatusCode;function sleep(r){return c(this,void 0,void 0,(function*(){return new Promise((i=>setTimeout(i,r)))}))}function retry(r,i,a,s=m.DefaultRetryAttempts,p=m.DefaultRetryDelay,l=undefined){return c(this,void 0,void 0,(function*(){let c="";let u=1;while(u<=s){let m=undefined;let h=undefined;let g=false;try{m=yield i()}catch(r){if(l){m=l(r)}g=true;c=r.message}if(m){h=a(m);if(!isServerErrorStatusCode(h)){return m}}if(h){g=isRetryableStatusCode(h);c=`Cache service responded with ${h}`}d.debug(`${r} - Attempt ${u} of ${s} failed with error: ${c}`);if(!g){d.debug(`${r} - Error is not retryable`);break}yield sleep(p);u++}throw Error(`${r} failed: ${c}`)}))}i.retry=retry;function retryTypedResponse(r,i,a=m.DefaultRetryAttempts,s=m.DefaultRetryDelay){return c(this,void 0,void 0,(function*(){return yield retry(r,i,(r=>r.statusCode),a,s,(r=>{if(r instanceof u.HttpClientError){return{statusCode:r.statusCode,result:null,headers:{},error:r}}else{return undefined}}))}))}i.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(r,i,a=m.DefaultRetryAttempts,s=m.DefaultRetryDelay){return c(this,void 0,void 0,(function*(){return yield retry(r,i,(r=>r.message.statusCode),a,s)}))}i.retryHttpClientResponse=retryHttpClientResponse},3434:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.createTar=i.extractTar=i.listTar=void 0;const d=a(1514);const u=l(a(7436));const m=a(7147);const h=l(a(1017));const g=l(a(1518));const y=a(8840);const v=process.platform==="win32";function getTarPath(){return c(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const r=yield g.getGnuTarPathOnWindows();const i=y.SystemTarPathOnWindows;if(r){return{path:r,type:y.ArchiveToolType.GNU}}else if((0,m.existsSync)(i)){return{path:i,type:y.ArchiveToolType.BSD}}break}case"darwin":{const r=yield u.which("gtar",false);if(r){return{path:r,type:y.ArchiveToolType.GNU}}else{return{path:yield u.which("tar",true),type:y.ArchiveToolType.BSD}}}default:break}return{path:yield u.which("tar",true),type:y.ArchiveToolType.GNU}}))}function getTarArgs(r,i,a,s=""){return c(this,void 0,void 0,(function*(){const p=[`"${r.path}"`];const l=g.getCacheFileName(i);const c="cache.tar";const d=getWorkingDirectory();const u=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(a){case"create":p.push("--posix","-cf",u?c:l.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"--exclude",u?c:l.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"--files-from",y.ManifestFilename);break;case"extract":p.push("-xf",u?c:s.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${h.sep}`,"g"),"/"));break;case"list":p.push("-tf",u?c:s.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P");break}if(r.type===y.ArchiveToolType.GNU){switch(process.platform){case"win32":p.push("--force-local");break;case"darwin":p.push("--delay-directory-restore");break}}return p}))}function getCommands(r,i,a=""){return c(this,void 0,void 0,(function*(){let s;const p=yield getTarPath();const l=yield getTarArgs(p,r,i,a);const c=i!=="create"?yield getDecompressionProgram(p,r,a):yield getCompressionProgram(p,r);const d=p.type===y.ArchiveToolType.BSD&&r!==y.CompressionMethod.Gzip&&v;if(d&&i!=="create"){s=[[...c].join(" "),[...l].join(" ")]}else{s=[[...l].join(" "),[...c].join(" ")]}if(d){return s}return[s.join(" ")]}))}function getWorkingDirectory(){var r;return(r=process.env["GITHUB_WORKSPACE"])!==null&&r!==void 0?r:process.cwd()}function getDecompressionProgram(r,i,a){return c(this,void 0,void 0,(function*(){const s=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(i){case y.CompressionMethod.Zstd:return s?["zstd -d --long=30 --force -o",y.TarFilename,a.replace(new RegExp(`\\${h.sep}`,"g"),"/")]:["--use-compress-program",v?'"zstd -d --long=30"':"unzstd --long=30"];case y.CompressionMethod.ZstdWithoutLong:return s?["zstd -d --force -o",y.TarFilename,a.replace(new RegExp(`\\${h.sep}`,"g"),"/")]:["--use-compress-program",v?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(r,i){return c(this,void 0,void 0,(function*(){const a=g.getCacheFileName(i);const s=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(i){case y.CompressionMethod.Zstd:return s?["zstd -T0 --long=30 --force -o",a.replace(new RegExp(`\\${h.sep}`,"g"),"/"),y.TarFilename]:["--use-compress-program",v?'"zstd -T0 --long=30"':"zstdmt --long=30"];case y.CompressionMethod.ZstdWithoutLong:return s?["zstd -T0 --force -o",a.replace(new RegExp(`\\${h.sep}`,"g"),"/"),y.TarFilename]:["--use-compress-program",v?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(r,i){return c(this,void 0,void 0,(function*(){for(const a of r){try{yield(0,d.exec)(a,undefined,{cwd:i,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(r){throw new Error(`${a.split(" ")[0]} failed with error: ${r===null||r===void 0?void 0:r.message}`)}}}))}function listTar(r,i){return c(this,void 0,void 0,(function*(){const a=yield getCommands(i,"list",r);yield execCommands(a)}))}i.listTar=listTar;function extractTar(r,i){return c(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield u.mkdirP(a);const s=yield getCommands(i,"extract",r);yield execCommands(s)}))}i.extractTar=extractTar;function createTar(r,i,a){return c(this,void 0,void 0,(function*(){(0,m.writeFileSync)(h.join(r,y.ManifestFilename),i.join("\n"));const s=yield getCommands(a,"create");yield execCommands(s,r)}))}i.createTar=createTar},6215:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.getDownloadOptions=i.getUploadOptions=void 0;const c=l(a(2186));function getUploadOptions(r){const i={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(r){if(typeof r.uploadConcurrency==="number"){i.uploadConcurrency=r.uploadConcurrency}if(typeof r.uploadChunkSize==="number"){i.uploadChunkSize=r.uploadChunkSize}}c.debug(`Upload concurrency: ${i.uploadConcurrency}`);c.debug(`Upload chunk size: ${i.uploadChunkSize}`);return i}i.getUploadOptions=getUploadOptions;function getDownloadOptions(r){const i={useAzureSdk:false,concurrentBlobDownloads:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:false};if(r){if(typeof r.useAzureSdk==="boolean"){i.useAzureSdk=r.useAzureSdk}if(typeof r.concurrentBlobDownloads==="boolean"){i.concurrentBlobDownloads=r.concurrentBlobDownloads}if(typeof r.downloadConcurrency==="number"){i.downloadConcurrency=r.downloadConcurrency}if(typeof r.timeoutInMs==="number"){i.timeoutInMs=r.timeoutInMs}if(typeof r.segmentTimeoutInMs==="number"){i.segmentTimeoutInMs=r.segmentTimeoutInMs}if(typeof r.lookupOnly==="boolean"){i.lookupOnly=r.lookupOnly}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){i.segmentTimeoutInMs=Number(a)*60*1e3}c.debug(`Use Azure SDK: ${i.useAzureSdk}`);c.debug(`Download concurrency: ${i.downloadConcurrency}`);c.debug(`Request timeout (ms): ${i.timeoutInMs}`);c.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);c.debug(`Segment download timeout (ms): ${i.segmentTimeoutInMs}`);c.debug(`Lookup only: ${i.lookupOnly}`);return i}i.getDownloadOptions=getDownloadOptions},2001:function(r,i){"use strict";var a=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.PersonalAccessTokenCredentialHandler=i.BearerCredentialHandler=i.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(r,i){this.username=r;this.password=i}prepareRequest(r){if(!r.headers){throw Error("The request has no headers")}r.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}i.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(r){this.token=r}prepareRequest(r){if(!r.headers){throw Error("The request has no headers")}r.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}i.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(r){this.token=r}prepareRequest(r){if(!r.headers){throw Error("The request has no headers")}r.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}i.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},1825:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;Object.defineProperty(r,s,{enumerable:true,get:function(){return i[a]}})}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.HttpClient=i.isHttps=i.HttpClientResponse=i.HttpClientError=i.getProxyUrl=i.MediaTypes=i.Headers=i.HttpCodes=void 0;const d=l(a(3685));const u=l(a(5687));const m=l(a(4977));const h=l(a(4294));var g;(function(r){r[r["OK"]=200]="OK";r[r["MultipleChoices"]=300]="MultipleChoices";r[r["MovedPermanently"]=301]="MovedPermanently";r[r["ResourceMoved"]=302]="ResourceMoved";r[r["SeeOther"]=303]="SeeOther";r[r["NotModified"]=304]="NotModified";r[r["UseProxy"]=305]="UseProxy";r[r["SwitchProxy"]=306]="SwitchProxy";r[r["TemporaryRedirect"]=307]="TemporaryRedirect";r[r["PermanentRedirect"]=308]="PermanentRedirect";r[r["BadRequest"]=400]="BadRequest";r[r["Unauthorized"]=401]="Unauthorized";r[r["PaymentRequired"]=402]="PaymentRequired";r[r["Forbidden"]=403]="Forbidden";r[r["NotFound"]=404]="NotFound";r[r["MethodNotAllowed"]=405]="MethodNotAllowed";r[r["NotAcceptable"]=406]="NotAcceptable";r[r["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";r[r["RequestTimeout"]=408]="RequestTimeout";r[r["Conflict"]=409]="Conflict";r[r["Gone"]=410]="Gone";r[r["TooManyRequests"]=429]="TooManyRequests";r[r["InternalServerError"]=500]="InternalServerError";r[r["NotImplemented"]=501]="NotImplemented";r[r["BadGateway"]=502]="BadGateway";r[r["ServiceUnavailable"]=503]="ServiceUnavailable";r[r["GatewayTimeout"]=504]="GatewayTimeout"})(g=i.HttpCodes||(i.HttpCodes={}));var y;(function(r){r["Accept"]="accept";r["ContentType"]="content-type"})(y=i.Headers||(i.Headers={}));var v;(function(r){r["ApplicationJson"]="application/json"})(v=i.MediaTypes||(i.MediaTypes={}));function getProxyUrl(r){const i=m.getProxyUrl(new URL(r));return i?i.href:""}i.getProxyUrl=getProxyUrl;const b=[g.MovedPermanently,g.ResourceMoved,g.SeeOther,g.TemporaryRedirect,g.PermanentRedirect];const x=[g.BadGateway,g.ServiceUnavailable,g.GatewayTimeout];const w=["OPTIONS","GET","DELETE","HEAD"];const S=10;const _=5;class HttpClientError extends Error{constructor(r,i){super(r);this.name="HttpClientError";this.statusCode=i;Object.setPrototypeOf(this,HttpClientError.prototype)}}i.HttpClientError=HttpClientError;class HttpClientResponse{constructor(r){this.message=r}readBody(){return c(this,void 0,void 0,(function*(){return new Promise((r=>c(this,void 0,void 0,(function*(){let i=Buffer.alloc(0);this.message.on("data",(r=>{i=Buffer.concat([i,r])}));this.message.on("end",(()=>{r(i.toString())}))}))))}))}readBodyBuffer(){return c(this,void 0,void 0,(function*(){return new Promise((r=>c(this,void 0,void 0,(function*(){const i=[];this.message.on("data",(r=>{i.push(r)}));this.message.on("end",(()=>{r(Buffer.concat(i))}))}))))}))}}i.HttpClientResponse=HttpClientResponse;function isHttps(r){const i=new URL(r);return i.protocol==="https:"}i.isHttps=isHttps;class HttpClient{constructor(r,i,a){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=r;this.handlers=i||[];this.requestOptions=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(r,i){return c(this,void 0,void 0,(function*(){return this.request("OPTIONS",r,null,i||{})}))}get(r,i){return c(this,void 0,void 0,(function*(){return this.request("GET",r,null,i||{})}))}del(r,i){return c(this,void 0,void 0,(function*(){return this.request("DELETE",r,null,i||{})}))}post(r,i,a){return c(this,void 0,void 0,(function*(){return this.request("POST",r,i,a||{})}))}patch(r,i,a){return c(this,void 0,void 0,(function*(){return this.request("PATCH",r,i,a||{})}))}put(r,i,a){return c(this,void 0,void 0,(function*(){return this.request("PUT",r,i,a||{})}))}head(r,i){return c(this,void 0,void 0,(function*(){return this.request("HEAD",r,null,i||{})}))}sendStream(r,i,a,s){return c(this,void 0,void 0,(function*(){return this.request(r,i,a,s)}))}getJson(r,i={}){return c(this,void 0,void 0,(function*(){i[y.Accept]=this._getExistingOrDefaultHeader(i,y.Accept,v.ApplicationJson);const a=yield this.get(r,i);return this._processResponse(a,this.requestOptions)}))}postJson(r,i,a={}){return c(this,void 0,void 0,(function*(){const s=JSON.stringify(i,null,2);a[y.Accept]=this._getExistingOrDefaultHeader(a,y.Accept,v.ApplicationJson);a[y.ContentType]=this._getExistingOrDefaultHeader(a,y.ContentType,v.ApplicationJson);const p=yield this.post(r,s,a);return this._processResponse(p,this.requestOptions)}))}putJson(r,i,a={}){return c(this,void 0,void 0,(function*(){const s=JSON.stringify(i,null,2);a[y.Accept]=this._getExistingOrDefaultHeader(a,y.Accept,v.ApplicationJson);a[y.ContentType]=this._getExistingOrDefaultHeader(a,y.ContentType,v.ApplicationJson);const p=yield this.put(r,s,a);return this._processResponse(p,this.requestOptions)}))}patchJson(r,i,a={}){return c(this,void 0,void 0,(function*(){const s=JSON.stringify(i,null,2);a[y.Accept]=this._getExistingOrDefaultHeader(a,y.Accept,v.ApplicationJson);a[y.ContentType]=this._getExistingOrDefaultHeader(a,y.ContentType,v.ApplicationJson);const p=yield this.patch(r,s,a);return this._processResponse(p,this.requestOptions)}))}request(r,i,a,s){return c(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const p=new URL(i);let l=this._prepareRequest(r,p,s);const c=this._allowRetries&&w.includes(r)?this._maxRetries+1:1;let d=0;let u;do{u=yield this.requestRaw(l,a);if(u&&u.message&&u.message.statusCode===g.Unauthorized){let r;for(const i of this.handlers){if(i.canHandleAuthentication(u)){r=i;break}}if(r){return r.handleAuthentication(this,l,a)}else{return u}}let i=this._maxRedirects;while(u.message.statusCode&&b.includes(u.message.statusCode)&&this._allowRedirects&&i>0){const c=u.message.headers["location"];if(!c){break}const d=new URL(c);if(p.protocol==="https:"&&p.protocol!==d.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield u.readBody();if(d.hostname!==p.hostname){for(const r in s){if(r.toLowerCase()==="authorization"){delete s[r]}}}l=this._prepareRequest(r,d,s);u=yield this.requestRaw(l,a);i--}if(!u.message.statusCode||!x.includes(u.message.statusCode)){return u}d+=1;if(d {const m=generateBlockID(d,s);const h=a.blockSize*s;const g=s===p-1?i:h+a.blockSize;const y=g-h;l.push(m);await this.stageBlock(m,r(h,y),y,{abortSignal:a.abortSignal,conditions:a.conditions,encryptionScope:a.encryptionScope,tracingOptions:c.tracingOptions});u+=y;if(a.onProgress){a.onProgress({loadedBytes:u})}}))}await m.do();return this.commitBlockList(l,c)}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async uploadFile(r,i={}){const{span:a,updatedOptions:s}=Lo("BlockBlobClient-uploadFile",i);try{const a=(await Wo(r)).size;return await this.uploadSeekableInternal(((i,a)=>()=>Ko(r,{autoClose:true,end:a?i+a-1:Infinity,start:i})),a,Object.assign(Object.assign({},i),{tracingOptions:Object.assign(Object.assign({},i.tracingOptions),convertTracingToRequestOptionsBase(s))}))}catch(r){a.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{a.end()}}async uploadStream(r,i=no,a=5,p={}){if(!p.blobHTTPHeaders){p.blobHTTPHeaders={}}if(!p.conditions){p.conditions={}}const{span:c,updatedOptions:d}=Lo("BlockBlobClient-uploadStream",p);try{let l=0;const c=s.generateUuid();let u=0;const m=[];const h=new BufferScheduler(r,i,a,(async(r,i)=>{const a=generateBlockID(c,l);m.push(a);l++;await this.stageBlock(a,r,i,{conditions:p.conditions,encryptionScope:p.encryptionScope,tracingOptions:d.tracingOptions});u+=i;if(p.onProgress){p.onProgress({loadedBytes:u})}}),Math.ceil(a/4*3));await h.do();return await this.commitBlockList(m,Object.assign(Object.assign({},p),{tracingOptions:Object.assign(Object.assign({},p.tracingOptions),convertTracingToRequestOptionsBase(d))}))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}}class PageBlobClient extends BlobClient{constructor(r,i,a,p){let l;let c;p=p||{};if(isPipelineLike(i)){c=r;l=i}else if(s.isNode&&i instanceof StorageSharedKeyCredential||i instanceof AnonymousCredential||s.isTokenCredential(i)){c=r;p=a;l=newPipeline(i,p)}else if(!i&&typeof i!=="string"){c=r;l=newPipeline(new AnonymousCredential,p)}else if(i&&typeof i==="string"&&a&&typeof a==="string"){const d=i;const u=a;const m=extractConnectionStringParts(r);if(m.kind==="AccountConnString"){if(s.isNode){const r=new StorageSharedKeyCredential(m.accountName,m.accountKey);c=appendToURLPath(appendToURLPath(m.url,encodeURIComponent(d)),encodeURIComponent(u));if(!p.proxyOptions){p.proxyOptions=s.getDefaultProxySettings(m.proxyUri)}l=newPipeline(r,p)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(m.kind==="SASConnString"){c=appendToURLPath(appendToURLPath(m.url,encodeURIComponent(d)),encodeURIComponent(u))+"?"+m.accountSas;l=newPipeline(new AnonymousCredential,p)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(c,l);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(r){return new PageBlobClient(setURLParameter(this.url,co.Parameters.SNAPSHOT,r.length===0?undefined:r),this.pipeline)}async create(r,i={}){var a,s,p;i.conditions=i.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-create",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.pageBlobContext.create(0,r,Object.assign({abortSignal:i.abortSignal,blobHttpHeaders:i.blobHTTPHeaders,blobSequenceNumber:i.blobSequenceNumber,leaseAccessConditions:i.conditions,metadata:i.metadata,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions}),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,immutabilityPolicyExpiry:(s=i.immutabilityPolicy)===null||s===void 0?void 0:s.expiriesOn,immutabilityPolicyMode:(p=i.immutabilityPolicy)===null||p===void 0?void 0:p.policyMode,legalHold:i.legalHold,tier:toAccessTier(i.tier),blobTagsString:toBlobTagsString(i.tags)},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async createIfNotExists(r,i={}){var a,s;const{span:p,updatedOptions:c}=Lo("PageBlobClient-createIfNotExists",i);try{const a={ifNoneMatch:ho};const s=await this.create(r,Object.assign(Object.assign({},i),{conditions:a,tracingOptions:c.tracingOptions}));return Object.assign(Object.assign({succeeded:true},s),{_response:s._response})}catch(r){if(((a=r.details)===null||a===void 0?void 0:a.errorCode)==="BlobAlreadyExists"){p.setStatus({code:l.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(s=r.response)===null||s===void 0?void 0:s.parsedHeaders),{_response:r.response})}p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async uploadPages(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-uploadPages",s);try{ensureCpkIfSpecified(s.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPages(a,r,Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),requestOptions:{onUploadProgress:s.onProgress},range:rangeToString({offset:i,count:a}),sequenceNumberAccessConditions:s.conditions,transactionalContentMD5:s.transactionalContentMD5,transactionalContentCrc64:s.transactionalContentCrc64,cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async uploadPagesFromURL(r,i,a,s,p={}){var c;p.conditions=p.conditions||{};p.sourceConditions=p.sourceConditions||{};const{span:d,updatedOptions:u}=Lo("PageBlobClient-uploadPagesFromURL",p);try{ensureCpkIfSpecified(p.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(r,rangeToString({offset:i,count:s}),0,rangeToString({offset:a,count:s}),Object.assign({abortSignal:p.abortSignal,sourceContentMD5:p.sourceContentMD5,sourceContentCrc64:p.sourceContentCrc64,leaseAccessConditions:p.conditions,sequenceNumberAccessConditions:p.conditions,modifiedAccessConditions:Object.assign(Object.assign({},p.conditions),{ifTags:(c=p.conditions)===null||c===void 0?void 0:c.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:p.sourceConditions.ifMatch,sourceIfModifiedSince:p.sourceConditions.ifModifiedSince,sourceIfNoneMatch:p.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:p.sourceConditions.ifUnmodifiedSince},cpkInfo:p.customerProvidedKey,encryptionScope:p.encryptionScope,copySourceAuthorization:httpAuthorizationToString(p.sourceAuthorization)},convertTracingToRequestOptionsBase(u)))}catch(r){d.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{d.end()}}async clearPages(r=0,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-clearPages",a);try{return await this.pageBlobContext.clearPages(0,Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:r,count:i}),sequenceNumberAccessConditions:a.conditions,cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope},convertTracingToRequestOptionsBase(c)))}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async getPageRanges(r=0,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-getPageRanges",a);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(c))).then(rangeResponseFromModel)}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async listPageRangesSegment(r=0,i,a,s={}){var p;const{span:c,updatedOptions:d}=Lo("PageBlobClient-getPageRangesSegment",s);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),range:rangeToString({offset:r,count:i}),marker:a,maxPageSize:s.maxPageSize},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}listPageRangeItemSegments(r=0,i,a,s={}){return p.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let l;if(!!a||a===undefined){do{l=yield p.__await(this.listPageRangesSegment(r,i,a,s));a=l.continuationToken;yield yield p.__await(yield p.__await(l))}while(a)}}))}listPageRangeItems(r=0,i,a={}){return p.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var s,l;let c;try{for(var d=p.__asyncValues(this.listPageRangeItemSegments(r,i,c,a)),u;u=yield p.__await(d.next()),!u.done;){const r=u.value;yield p.__await(yield*p.__asyncDelegator(p.__asyncValues(ExtractPageRangeInfoItems(r))))}}catch(r){s={error:r}}finally{try{if(u&&!u.done&&(l=d.return))yield p.__await(l.call(d))}finally{if(s)throw s.error}}}))}listPageRanges(r=0,i,a={}){a.conditions=a.conditions||{};const s=this.listPageRangeItems(r,i,a);return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.listPageRangeItemSegments(r,i,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},a))}}async getPageRangesDiff(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-getPageRangesDiff",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),prevsnapshot:a,range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(d))).then(rangeResponseFromModel)}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async listPageRangesDiffSegment(r,i,a,s,p){var c;const{span:d,updatedOptions:u}=Lo("PageBlobClient-getPageRangesDiffSegment",p);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:p===null||p===void 0?void 0:p.abortSignal,leaseAccessConditions:p===null||p===void 0?void 0:p.conditions,modifiedAccessConditions:Object.assign(Object.assign({},p===null||p===void 0?void 0:p.conditions),{ifTags:(c=p===null||p===void 0?void 0:p.conditions)===null||c===void 0?void 0:c.tagConditions}),prevsnapshot:a,range:rangeToString({offset:r,count:i}),marker:s,maxPageSize:p===null||p===void 0?void 0:p.maxPageSize},convertTracingToRequestOptionsBase(u)))}catch(r){d.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{d.end()}}listPageRangeDiffItemSegments(r,i,a,s,l){return p.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let c;if(!!s||s===undefined){do{c=yield p.__await(this.listPageRangesDiffSegment(r,i,a,s,l));s=c.continuationToken;yield yield p.__await(yield p.__await(c))}while(s)}}))}listPageRangeDiffItems(r,i,a,s){return p.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var l,c;let d;try{for(var u=p.__asyncValues(this.listPageRangeDiffItemSegments(r,i,a,d,s)),m;m=yield p.__await(u.next()),!m.done;){const r=m.value;yield p.__await(yield*p.__asyncDelegator(p.__asyncValues(ExtractPageRangeInfoItems(r))))}}catch(r){l={error:r}}finally{try{if(m&&!m.done&&(c=u.return))yield p.__await(c.call(u))}finally{if(l)throw l.error}}}))}listPageRangesDiff(r,i,a,s={}){s.conditions=s.conditions||{};const p=this.listPageRangeDiffItems(r,i,a,Object.assign({},s));return{next(){return p.next()},[Symbol.asyncIterator](){return this},byPage:(p={})=>this.listPageRangeDiffItemSegments(r,i,a,p.continuationToken,Object.assign({maxPageSize:p.maxPageSize},s))}}async getPageRangesDiffForManagedDisks(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-GetPageRangesDiffForManagedDisks",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),prevSnapshotUrl:a,range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(d))).then(rangeResponseFromModel)}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async resize(r,i={}){var a;i.conditions=i.conditions||{};const{span:s,updatedOptions:p}=Lo("PageBlobClient-resize",i);try{return await this.pageBlobContext.resize(r,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions}),encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(p)))}catch(r){s.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{s.end()}}async updateSequenceNumber(r,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-updateSequenceNumber",a);try{return await this.pageBlobContext.updateSequenceNumber(r,Object.assign({abortSignal:a.abortSignal,blobSequenceNumber:i,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async startCopyIncremental(r,i={}){var a;const{span:s,updatedOptions:p}=Lo("PageBlobClient-startCopyIncremental",i);try{return await this.pageBlobContext.copyIncremental(r,Object.assign({abortSignal:i.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions})},convertTracingToRequestOptionsBase(p)))}catch(r){s.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{s.end()}}}async function getBodyAsText(r){let i=Buffer.alloc(vo);const a=await streamToBuffer2(r.readableStreamBody,i);i=i.slice(0,a);return i.toString()}function utf8ByteLength(r){return Buffer.byteLength(r)}const Qo=": ";const Yo=" ";const Jo=-1;class BatchResponseParser{constructor(r,i){if(!r||!r.contentType){throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.")}if(!i||i.size===0){throw new RangeError("Invalid state: subRequests is not provided or size is 0.")}this.batchResponse=r;this.subRequests=i;this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1];this.perResponsePrefix=`--${this.responseBatchBoundary}${bo}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==uo.HTTP_ACCEPTED){throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`)}const r=await getBodyAsText(this.batchResponse);const i=r.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1);const a=i.length;if(a!==this.subRequests.size&&a!==1){throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.")}const p=new Array(a);let l=0;let c=0;for(let r=0;r=0&&y {r.exports=glob;var s=a(7147);var p=a(6863);var l=a(3973);var c=l.Minimatch;var d=a(4124);var u=a(2361).EventEmitter;var m=a(1017);var h=a(9491);var g=a(8714);var y=a(9010);var v=a(7625);var b=v.setopts;var x=v.ownProp;var w=a(2492);var S=a(3837);var _=v.childrenIgnored;var E=v.isIgnored;var T=a(1223);function glob(r,i,a){if(typeof i==="function")a=i,i={};if(!i)i={};if(i.sync){if(a)throw new TypeError("callback provided to sync glob");return y(r,i)}return new Glob(r,i,a)}glob.sync=y;var N=glob.GlobSync=y.GlobSync;glob.glob=glob;function extend(r,i){if(i===null||typeof i!=="object"){return r}var a=Object.keys(i);var s=a.length;while(s--){r[a[s]]=i[a[s]]}return r}glob.hasMagic=function(r,i){var a=extend({},i);a.noprocess=true;var s=new Glob(r,a);var p=s.minimatch.set;if(!r)return false;if(p.length>1)return true;for(var l=0;l this.maxLength)return i();if(!this.stat&&x(this.cache,a)){var l=this.cache[a];if(Array.isArray(l))l="DIR";if(!p||l==="DIR")return i(null,l);if(p&&l==="FILE")return i()}var c;var d=this.statCache[a];if(d!==undefined){if(d===false)return i(null,d);else{var u=d.isDirectory()?"DIR":"FILE";if(p&&u==="FILE")return i();else return i(null,u,d)}}var m=this;var h=w("stat\0"+a,lstatcb_);if(h)s.lstat(a,h);function lstatcb_(p,l){if(l&&l.isSymbolicLink()){return s.stat(a,(function(s,p){if(s)m._stat2(r,a,null,l,i);else m._stat2(r,a,s,p,i)}))}else{m._stat2(r,a,p,l,i)}}};Glob.prototype._stat2=function(r,i,a,s,p){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR")){this.statCache[i]=false;return p()}var l=r.slice(-1)==="/";this.statCache[i]=s;if(i.slice(-1)==="/"&&s&&!s.isDirectory())return p(null,false,s);var c=true;if(s)c=s.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||c;if(l&&c==="FILE")return p();return p(null,c,s)}},9010:(r,i,a)=>{r.exports=globSync;globSync.GlobSync=GlobSync;var s=a(7147);var p=a(6863);var l=a(3973);var c=l.Minimatch;var d=a(1957).Glob;var u=a(3837);var m=a(1017);var h=a(9491);var g=a(8714);var y=a(7625);var v=y.setopts;var b=y.ownProp;var x=y.childrenIgnored;var w=y.isIgnored;function globSync(r,i){if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(r,i).found}function GlobSync(r,i){if(!r)throw new Error("must provide pattern");if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(r,i);v(this,r,i);if(this.noprocess)return this;var a=this.minimatch.set.length;this.matches=new Array(a);for(var s=0;sthis.maxLength)return false;if(!this.stat&&b(this.cache,i)){var p=this.cache[i];if(Array.isArray(p))p="DIR";if(!a||p==="DIR")return p;if(a&&p==="FILE")return false}var l;var c=this.statCache[i];if(!c){var d;try{d=s.lstatSync(i)}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[i]=false;return false}}if(d&&d.isSymbolicLink()){try{c=s.statSync(i)}catch(r){c=d}}else{c=d}}this.statCache[i]=c;var p=true;if(c)p=c.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||p;if(a&&p==="FILE")return false;return p};GlobSync.prototype._mark=function(r){return y.mark(this,r)};GlobSync.prototype._makeAbs=function(r){return y.makeAbs(this,r)}},2492:(r,i,a)=>{var s=a(2940);var p=Object.create(null);var l=a(1223);r.exports=s(inflight);function inflight(r,i){if(p[r]){p[r].push(i);return null}else{p[r]=[i];return makeres(r)}}function makeres(r){return l((function RES(){var i=p[r];var a=i.length;var s=slice(arguments);try{for(var l=0;la){i.splice(0,a);process.nextTick((function(){RES.apply(null,s)}))}else{delete p[r]}}}))}function slice(r){var i=r.length;var a=[];for(var s=0;s{try{var s=a(3837);if(typeof s.inherits!=="function")throw"";r.exports=s.inherits}catch(i){r.exports=a(8544)}},8544:r=>{if(typeof Object.create==="function"){r.exports=function inherits(r,i){if(i){r.super_=i;r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,i){if(i){r.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},3287:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});
+require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.restoreCache=i.isFeatureAvailable=i.ReserveCacheError=i.ValidationError=void 0;const d=l(a(2186));const u=l(a(1017));const m=l(a(1518));const h=l(a(8245));const g=a(3434);class ValidationError extends Error{constructor(r){super(r);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}i.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(r){super(r);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}i.ReserveCacheError=ReserveCacheError;function checkPaths(r){if(!r||r.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(r){if(r.length>512){throw new ValidationError(`Key Validation Error: ${r} cannot be larger than 512 characters.`)}const i=/^[^,]*$/;if(!i.test(r)){throw new ValidationError(`Key Validation Error: ${r} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}i.isFeatureAvailable=isFeatureAvailable;function restoreCache(r,i,a,s,p=false){return c(this,void 0,void 0,(function*(){checkPaths(r);a=a||[];const l=[i,...a];d.debug("Resolved Keys:");d.debug(JSON.stringify(l));if(l.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const r of l){checkKey(r)}const c=yield m.getCompressionMethod();let y="";try{const i=yield h.getCacheEntry(l,r,{compressionMethod:c,enableCrossOsArchive:p});if(!(i===null||i===void 0?void 0:i.archiveLocation)){return undefined}if(s===null||s===void 0?void 0:s.lookupOnly){d.info("Lookup only - skipping download");return i.cacheKey}y=u.join(yield m.createTempDirectory(),m.getCacheFileName(c));d.debug(`Archive Path: ${y}`);yield h.downloadCache(i.archiveLocation,y,s);if(d.isDebug()){yield(0,g.listTar)(y,c)}const a=m.getArchiveFileSizeInBytes(y);d.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);yield(0,g.extractTar)(y,c);d.info("Cache restored successfully");return i.cacheKey}catch(r){const i=r;if(i.name===ValidationError.name){throw r}else{d.warning(`Failed to restore: ${r.message}`)}}finally{try{yield m.unlinkFile(y)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}return undefined}))}i.restoreCache=restoreCache;function saveCache(r,i,a,s=false){var p,l,y,v,b;return c(this,void 0,void 0,(function*(){checkPaths(r);checkKey(i);const c=yield m.getCompressionMethod();let x=-1;const w=yield m.resolvePaths(r);d.debug("Cache Paths:");d.debug(`${JSON.stringify(w)}`);if(w.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const S=yield m.createTempDirectory();const E=u.join(S,m.getCacheFileName(c));d.debug(`Archive Path: ${E}`);try{yield(0,g.createTar)(S,w,c);if(d.isDebug()){yield(0,g.listTar)(E,c)}const u=10*1024*1024*1024;const _=m.getArchiveFileSizeInBytes(E);d.debug(`File Size: ${_}`);if(_>u&&!m.isGhes()){throw new Error(`Cache size of ~${Math.round(_/(1024*1024))} MB (${_} B) is over the 10GB limit, not saving cache.`)}d.debug("Reserving Cache");const T=yield h.reserveCache(i,r,{compressionMethod:c,enableCrossOsArchive:s,cacheSize:_});if((p=T===null||T===void 0?void 0:T.result)===null||p===void 0?void 0:p.cacheId){x=(l=T===null||T===void 0?void 0:T.result)===null||l===void 0?void 0:l.cacheId}else if((T===null||T===void 0?void 0:T.statusCode)===400){throw new Error((v=(y=T===null||T===void 0?void 0:T.error)===null||y===void 0?void 0:y.message)!==null&&v!==void 0?v:`Cache size of ~${Math.round(_/(1024*1024))} MB (${_} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${i}, another job may be creating this cache. More details: ${(b=T===null||T===void 0?void 0:T.error)===null||b===void 0?void 0:b.message}`)}d.debug(`Saving Cache (ID: ${x})`);yield h.saveCache(x,E,a)}catch(r){const i=r;if(i.name===ValidationError.name){throw r}else if(i.name===ReserveCacheError.name){d.info(`Failed to save: ${i.message}`)}else{d.warning(`Failed to save: ${i.message}`)}}finally{try{yield m.unlinkFile(E)}catch(r){d.debug(`Failed to delete archive: ${r}`)}}return x}))}i.saveCache=saveCache},8245:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.saveCache=i.reserveCache=i.downloadCache=i.getCacheEntry=i.getCacheVersion=void 0;const d=l(a(2186));const u=a(6255);const m=a(5526);const h=l(a(6113));const g=l(a(7147));const y=a(7310);const v=l(a(1518));const b=a(5500);const x=a(6215);const w=a(3981);const S="1.0";function getCacheApiUrl(r){const i=process.env["ACTIONS_CACHE_URL"]||"";if(!i){throw new Error("Cache Service Url not found, unable to restore cache.")}const a=`${i}_apis/artifactcache/${r}`;d.debug(`Resource Url: ${a}`);return a}function createAcceptHeader(r,i){return`${r};api-version=${i}`}function getRequestOptions(){const r={headers:{Accept:createAcceptHeader("application/json","6.0-preview.1")}};return r}function createHttpClient(){const r=process.env["ACTIONS_RUNTIME_TOKEN"]||"";const i=new m.BearerCredentialHandler(r);return new u.HttpClient("actions/cache",[i],getRequestOptions())}function getCacheVersion(r,i,a=false){const s=r;if(i){s.push(i)}if(process.platform==="win32"&&!a){s.push("windows-only")}s.push(S);return h.createHash("sha256").update(s.join("|")).digest("hex")}i.getCacheVersion=getCacheVersion;function getCacheEntry(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();const p=getCacheVersion(i,a===null||a===void 0?void 0:a.compressionMethod,a===null||a===void 0?void 0:a.enableCrossOsArchive);const l=`cache?keys=${encodeURIComponent(r.join(","))}&version=${p}`;const u=yield(0,w.retryTypedResponse)("getCacheEntry",(()=>c(this,void 0,void 0,(function*(){return s.getJson(getCacheApiUrl(l))}))));if(u.statusCode===204){if(d.isDebug()){yield printCachesListForDiagnostics(r[0],s,p)}return null}if(!(0,w.isSuccessStatusCode)(u.statusCode)){throw new Error(`Cache service responded with ${u.statusCode}`)}const m=u.result;const h=m===null||m===void 0?void 0:m.archiveLocation;if(!h){throw new Error("Cache not found.")}d.setSecret(h);d.debug(`Cache Result:`);d.debug(JSON.stringify(m));return m}))}i.getCacheEntry=getCacheEntry;function printCachesListForDiagnostics(r,i,a){return c(this,void 0,void 0,(function*(){const s=`caches?key=${encodeURIComponent(r)}`;const p=yield(0,w.retryTypedResponse)("listCache",(()=>c(this,void 0,void 0,(function*(){return i.getJson(getCacheApiUrl(s))}))));if(p.statusCode===200){const i=p.result;const s=i===null||i===void 0?void 0:i.totalCount;if(s&&s>0){d.debug(`No matching cache found for cache key '${r}', version '${a} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \nOther caches with similar key:`);for(const r of(i===null||i===void 0?void 0:i.artifactCaches)||[]){d.debug(`Cache Key: ${r===null||r===void 0?void 0:r.cacheKey}, Cache Version: ${r===null||r===void 0?void 0:r.cacheVersion}, Cache Scope: ${r===null||r===void 0?void 0:r.scope}, Cache Created: ${r===null||r===void 0?void 0:r.creationTime}`)}}}}))}function downloadCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=new y.URL(r);const p=(0,x.getDownloadOptions)(a);if(s.hostname.endsWith(".blob.core.windows.net")){if(p.useAzureSdk){yield(0,b.downloadCacheStorageSDK)(r,i,p)}else if(p.concurrentBlobDownloads){yield(0,b.downloadCacheHttpClientConcurrent)(r,i,p)}else{yield(0,b.downloadCacheHttpClient)(r,i)}}else{yield(0,b.downloadCacheHttpClient)(r,i)}}))}i.downloadCache=downloadCache;function reserveCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();const p=getCacheVersion(i,a===null||a===void 0?void 0:a.compressionMethod,a===null||a===void 0?void 0:a.enableCrossOsArchive);const l={key:r,version:p,cacheSize:a===null||a===void 0?void 0:a.cacheSize};const d=yield(0,w.retryTypedResponse)("reserveCache",(()=>c(this,void 0,void 0,(function*(){return s.postJson(getCacheApiUrl("caches"),l)}))));return d}))}i.reserveCache=reserveCache;function getContentRange(r,i){return`bytes ${r}-${i}/*`}function uploadChunk(r,i,a,s,p){return c(this,void 0,void 0,(function*(){d.debug(`Uploading chunk of size ${p-s+1} bytes at offset ${s} with content range: ${getContentRange(s,p)}`);const l={"Content-Type":"application/octet-stream","Content-Range":getContentRange(s,p)};const u=yield(0,w.retryHttpClientResponse)(`uploadChunk (start: ${s}, end: ${p})`,(()=>c(this,void 0,void 0,(function*(){return r.sendStream("PATCH",i,a(),l)}))));if(!(0,w.isSuccessStatusCode)(u.message.statusCode)){throw new Error(`Cache service responded with ${u.message.statusCode} during upload chunk.`)}}))}function uploadFile(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=v.getArchiveFileSizeInBytes(a);const l=getCacheApiUrl(`caches/${i.toString()}`);const u=g.openSync(a,"r");const m=(0,x.getUploadOptions)(s);const h=v.assertDefined("uploadConcurrency",m.uploadConcurrency);const y=v.assertDefined("uploadChunkSize",m.uploadChunkSize);const b=[...new Array(h).keys()];d.debug("Awaiting all uploads");let w=0;try{yield Promise.all(b.map((()=>c(this,void 0,void 0,(function*(){while(w g.createReadStream(a,{fd:u,start:s,end:c,autoClose:false}).on("error",(r=>{throw new Error(`Cache upload failed because file read failed with ${r.message}`)}))),s,c)}})))))}finally{g.closeSync(u)}return}))}function commitCache(r,i,a){return c(this,void 0,void 0,(function*(){const s={size:a};return yield(0,w.retryTypedResponse)("commitCache",(()=>c(this,void 0,void 0,(function*(){return r.postJson(getCacheApiUrl(`caches/${i.toString()}`),s)}))))}))}function saveCache(r,i,a){return c(this,void 0,void 0,(function*(){const s=createHttpClient();d.debug("Upload cache");yield uploadFile(s,r,i,a);d.debug("Commiting cache");const p=v.getArchiveFileSizeInBytes(i);d.info(`Cache Size: ~${Math.round(p/(1024*1024))} MB (${p} B)`);const l=yield commitCache(s,r,p);if(!(0,w.isSuccessStatusCode)(l.statusCode)){throw new Error(`Cache service responded with ${l.statusCode} during commit cache.`)}d.info("Cache saved successfully")}))}i.saveCache=saveCache},1518:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};var d=this&&this.__asyncValues||function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r[Symbol.asyncIterator],a;return i?i.call(r):(r=typeof __values==="function"?__values(r):r[Symbol.iterator](),a={},verb("next"),verb("throw"),verb("return"),a[Symbol.asyncIterator]=function(){return this},a);function verb(i){a[i]=r[i]&&function(a){return new Promise((function(s,p){a=r[i](a),settle(s,p,a.done,a.value)}))}}function settle(r,i,a,s){Promise.resolve(s).then((function(i){r({value:i,done:a})}),i)}};Object.defineProperty(i,"__esModule",{value:true});i.isGhes=i.assertDefined=i.getGnuTarPathOnWindows=i.getCacheFileName=i.getCompressionMethod=i.unlinkFile=i.resolvePaths=i.getArchiveFileSizeInBytes=i.createTempDirectory=void 0;const u=l(a(2186));const m=l(a(1514));const h=l(a(8090));const g=l(a(7436));const y=l(a(7147));const v=l(a(1017));const b=l(a(5911));const x=l(a(3837));const w=a(4138);const S=a(8840);function createTempDirectory(){return c(this,void 0,void 0,(function*(){const r=process.platform==="win32";let i=process.env["RUNNER_TEMP"]||"";if(!i){let a;if(r){a=process.env["USERPROFILE"]||"C:\\"}else{if(process.platform==="darwin"){a="/Users"}else{a="/home"}}i=v.join(a,"actions","temp")}const a=v.join(i,(0,w.v4)());yield g.mkdirP(a);return a}))}i.createTempDirectory=createTempDirectory;function getArchiveFileSizeInBytes(r){return y.statSync(r).size}i.getArchiveFileSizeInBytes=getArchiveFileSizeInBytes;function resolvePaths(r){var i,a,s,p;var l;return c(this,void 0,void 0,(function*(){const c=[];const m=(l=process.env["GITHUB_WORKSPACE"])!==null&&l!==void 0?l:process.cwd();const g=yield h.create(r.join("\n"),{implicitDescendants:false});try{for(var y=true,b=d(g.globGenerator()),x;x=yield b.next(),i=x.done,!i;){p=x.value;y=false;try{const r=p;const i=v.relative(m,r).replace(new RegExp(`\\${v.sep}`,"g"),"/");u.debug(`Matched: ${i}`);if(i===""){c.push(".")}else{c.push(`${i}`)}}finally{y=true}}}catch(r){a={error:r}}finally{try{if(!y&&!i&&(s=b.return))yield s.call(b)}finally{if(a)throw a.error}}return c}))}i.resolvePaths=resolvePaths;function unlinkFile(r){return c(this,void 0,void 0,(function*(){return x.promisify(y.unlink)(r)}))}i.unlinkFile=unlinkFile;function getVersion(r,i=[]){return c(this,void 0,void 0,(function*(){let a="";i.push("--version");u.debug(`Checking ${r} ${i.join(" ")}`);try{yield m.exec(`${r}`,i,{ignoreReturnCode:true,silent:true,listeners:{stdout:r=>a+=r.toString(),stderr:r=>a+=r.toString()}})}catch(r){u.debug(r.message)}a=a.trim();u.debug(a);return a}))}function getCompressionMethod(){return c(this,void 0,void 0,(function*(){const r=yield getVersion("zstd",["--quiet"]);const i=b.clean(r);u.debug(`zstd version: ${i}`);if(r===""){return S.CompressionMethod.Gzip}else{return S.CompressionMethod.ZstdWithoutLong}}))}i.getCompressionMethod=getCompressionMethod;function getCacheFileName(r){return r===S.CompressionMethod.Gzip?S.CacheFilename.Gzip:S.CacheFilename.Zstd}i.getCacheFileName=getCacheFileName;function getGnuTarPathOnWindows(){return c(this,void 0,void 0,(function*(){if(y.existsSync(S.GnuTarPathOnWindows)){return S.GnuTarPathOnWindows}const r=yield getVersion("tar");return r.toLowerCase().includes("gnu tar")?g.which("tar"):""}))}i.getGnuTarPathOnWindows=getGnuTarPathOnWindows;function assertDefined(r,i){if(i===undefined){throw Error(`Expected ${r} but value was undefiend`)}return i}i.assertDefined=assertDefined;function isGhes(){const r=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return r.hostname.toUpperCase()!=="GITHUB.COM"}i.isGhes=isGhes},8840:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.ManifestFilename=i.TarFilename=i.SystemTarPathOnWindows=i.GnuTarPathOnWindows=i.SocketTimeout=i.DefaultRetryDelay=i.DefaultRetryAttempts=i.ArchiveToolType=i.CompressionMethod=i.CacheFilename=void 0;var a;(function(r){r["Gzip"]="cache.tgz";r["Zstd"]="cache.tzst"})(a=i.CacheFilename||(i.CacheFilename={}));var s;(function(r){r["Gzip"]="gzip";r["ZstdWithoutLong"]="zstd-without-long";r["Zstd"]="zstd"})(s=i.CompressionMethod||(i.CompressionMethod={}));var p;(function(r){r["GNU"]="gnu";r["BSD"]="bsd"})(p=i.ArchiveToolType||(i.ArchiveToolType={}));i.DefaultRetryAttempts=2;i.DefaultRetryDelay=5e3;i.SocketTimeout=5e3;i.GnuTarPathOnWindows=`${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`;i.SystemTarPathOnWindows=`${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`;i.TarFilename="cache.tar";i.ManifestFilename="manifest.txt"},5500:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.downloadCacheStorageSDK=i.downloadCacheHttpClientConcurrent=i.downloadCacheHttpClient=i.DownloadProgress=void 0;const d=l(a(2186));const u=a(6255);const m=a(4100);const h=l(a(4300));const g=l(a(7147));const y=l(a(2781));const v=l(a(3837));const b=l(a(1518));const x=a(8840);const w=a(3981);const S=a(2557);function pipeResponseToStream(r,i){return c(this,void 0,void 0,(function*(){const a=v.promisify(y.pipeline);yield a(r.message,i)}))}class DownloadProgress{constructor(r){this.contentLength=r;this.segmentIndex=0;this.segmentSize=0;this.segmentOffset=0;this.receivedBytes=0;this.displayedComplete=false;this.startTime=Date.now()}nextSegment(r){this.segmentOffset=this.segmentOffset+this.segmentSize;this.segmentIndex=this.segmentIndex+1;this.segmentSize=r;this.receivedBytes=0;d.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(r){this.receivedBytes=r}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete){return}const r=this.segmentOffset+this.receivedBytes;const i=(100*(r/this.contentLength)).toFixed(1);const a=Date.now()-this.startTime;const s=(r/(1024*1024)/(a/1e3)).toFixed(1);d.info(`Received ${r} of ${this.contentLength} (${i}%), ${s} MBs/sec`);if(this.isDone()){this.displayedComplete=true}}onProgress(){return r=>{this.setReceivedBytes(r.loadedBytes)}}startDisplayTimer(r=1e3){const displayCallback=()=>{this.display();if(!this.isDone()){this.timeoutHandle=setTimeout(displayCallback,r)}};this.timeoutHandle=setTimeout(displayCallback,r)}stopDisplayTimer(){if(this.timeoutHandle){clearTimeout(this.timeoutHandle);this.timeoutHandle=undefined}this.display()}}i.DownloadProgress=DownloadProgress;function downloadCacheHttpClient(r,i){return c(this,void 0,void 0,(function*(){const a=g.createWriteStream(i);const s=new u.HttpClient("actions/cache");const p=yield(0,w.retryHttpClientResponse)("downloadCache",(()=>c(this,void 0,void 0,(function*(){return s.get(r)}))));p.message.socket.setTimeout(x.SocketTimeout,(()=>{p.message.destroy();d.debug(`Aborting download, socket timed out after ${x.SocketTimeout} ms`)}));yield pipeResponseToStream(p,a);const l=p.message.headers["content-length"];if(l){const r=parseInt(l);const a=b.getArchiveFileSizeInBytes(i);if(a!==r){throw new Error(`Incomplete download. Expected file size: ${r}, actual file size: ${a}`)}}else{d.debug("Unable to validate download, no Content-Length header")}}))}i.downloadCacheHttpClient=downloadCacheHttpClient;function downloadCacheHttpClientConcurrent(r,i,a){var s;return c(this,void 0,void 0,(function*(){const p=yield g.promises.open(i,"w");const l=new u.HttpClient("actions/cache",undefined,{socketTimeout:a.timeoutInMs,keepAlive:true});try{const i=yield(0,w.retryHttpClientResponse)("downloadCacheMetadata",(()=>c(this,void 0,void 0,(function*(){return yield l.request("HEAD",r,null,{})}))));const d=i.message.headers["content-length"];if(d===undefined||d===null){throw new Error("Content-Length not found on blob response")}const u=parseInt(d);if(Number.isNaN(u)){throw new Error(`Could not interpret Content-Length: ${u}`)}const m=[];const h=4*1024*1024;for(let i=0;ic(this,void 0,void 0,(function*(){return yield downloadSegmentRetry(l,r,i,a)}))})}m.reverse();let g=0;let y=0;const v=new DownloadProgress(u);v.startDisplayTimer();const b=v.onProgress();const x=[];let S;const waitAndWrite=()=>c(this,void 0,void 0,(function*(){const r=yield Promise.race(Object.values(x));yield p.write(r.buffer,0,r.count,r.offset);g--;delete x[r.offset];y+=r.count;b({loadedBytes:y})}));while(S=m.pop()){x[S.offset]=S.promiseGetter();g++;if(g>=((s=a.downloadConcurrency)!==null&&s!==void 0?s:10)){yield waitAndWrite()}}while(g>0){yield waitAndWrite()}}finally{l.dispose();yield p.close()}}))}i.downloadCacheHttpClientConcurrent=downloadCacheHttpClientConcurrent;function downloadSegmentRetry(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=5;let l=0;while(true){try{const p=3e4;const l=yield promiseWithTimeout(p,downloadSegment(r,i,a,s));if(typeof l==="string"){throw new Error("downloadSegmentRetry failed due to timeout")}return l}catch(r){if(l>=p){throw r}l++}}}))}function downloadSegment(r,i,a,s){return c(this,void 0,void 0,(function*(){const p=yield(0,w.retryHttpClientResponse)("downloadCachePart",(()=>c(this,void 0,void 0,(function*(){return yield r.get(i,{Range:`bytes=${a}-${a+s-1}`})}))));if(!p.readBodyBuffer){throw new Error("Expected HttpClientResponse to implement readBodyBuffer")}return{offset:a,count:s,buffer:yield p.readBodyBuffer()}}))}function downloadCacheStorageSDK(r,i,a){var s;return c(this,void 0,void 0,(function*(){const p=new m.BlockBlobClient(r,undefined,{retryOptions:{tryTimeoutInMs:a.timeoutInMs}});const l=yield p.getProperties();const c=(s=l.contentLength)!==null&&s!==void 0?s:-1;if(c<0){d.debug("Unable to determine content length, downloading file with http-client...");yield downloadCacheHttpClient(r,i)}else{const r=Math.min(134217728,h.constants.MAX_LENGTH);const s=new DownloadProgress(c);const l=g.openSync(i,"w");try{s.startDisplayTimer();const i=new S.AbortController;const d=i.signal;while(!s.isDone()){const u=s.segmentOffset+s.segmentSize;const m=Math.min(r,c-u);s.nextSegment(m);const h=yield promiseWithTimeout(a.segmentTimeoutInMs||36e5,p.downloadToBuffer(u,m,{abortSignal:d,concurrency:a.downloadConcurrency,onProgress:s.onProgress()}));if(h==="timeout"){i.abort();throw new Error("Aborting cache download as the download time exceeded the timeout.")}else if(Buffer.isBuffer(h)){g.writeFileSync(l,h)}}}finally{s.stopDisplayTimer();g.closeSync(l)}}}))}i.downloadCacheStorageSDK=downloadCacheStorageSDK;const promiseWithTimeout=(r,i)=>c(void 0,void 0,void 0,(function*(){let a;const s=new Promise((i=>{a=setTimeout((()=>i("timeout")),r)}));return Promise.race([i,s]).then((r=>{clearTimeout(a);return r}))}))},3981:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.retryHttpClientResponse=i.retryTypedResponse=i.retry=i.isRetryableStatusCode=i.isServerErrorStatusCode=i.isSuccessStatusCode=void 0;const d=l(a(2186));const u=a(6255);const m=a(8840);function isSuccessStatusCode(r){if(!r){return false}return r>=200&&r<300}i.isSuccessStatusCode=isSuccessStatusCode;function isServerErrorStatusCode(r){if(!r){return true}return r>=500}i.isServerErrorStatusCode=isServerErrorStatusCode;function isRetryableStatusCode(r){if(!r){return false}const i=[u.HttpCodes.BadGateway,u.HttpCodes.ServiceUnavailable,u.HttpCodes.GatewayTimeout];return i.includes(r)}i.isRetryableStatusCode=isRetryableStatusCode;function sleep(r){return c(this,void 0,void 0,(function*(){return new Promise((i=>setTimeout(i,r)))}))}function retry(r,i,a,s=m.DefaultRetryAttempts,p=m.DefaultRetryDelay,l=undefined){return c(this,void 0,void 0,(function*(){let c="";let u=1;while(u<=s){let m=undefined;let h=undefined;let g=false;try{m=yield i()}catch(r){if(l){m=l(r)}g=true;c=r.message}if(m){h=a(m);if(!isServerErrorStatusCode(h)){return m}}if(h){g=isRetryableStatusCode(h);c=`Cache service responded with ${h}`}d.debug(`${r} - Attempt ${u} of ${s} failed with error: ${c}`);if(!g){d.debug(`${r} - Error is not retryable`);break}yield sleep(p);u++}throw Error(`${r} failed: ${c}`)}))}i.retry=retry;function retryTypedResponse(r,i,a=m.DefaultRetryAttempts,s=m.DefaultRetryDelay){return c(this,void 0,void 0,(function*(){return yield retry(r,i,(r=>r.statusCode),a,s,(r=>{if(r instanceof u.HttpClientError){return{statusCode:r.statusCode,result:null,headers:{},error:r}}else{return undefined}}))}))}i.retryTypedResponse=retryTypedResponse;function retryHttpClientResponse(r,i,a=m.DefaultRetryAttempts,s=m.DefaultRetryDelay){return c(this,void 0,void 0,(function*(){return yield retry(r,i,(r=>r.message.statusCode),a,s)}))}i.retryHttpClientResponse=retryHttpClientResponse},3434:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.createTar=i.extractTar=i.listTar=void 0;const d=a(1514);const u=l(a(7436));const m=a(7147);const h=l(a(1017));const g=l(a(1518));const y=a(8840);const v=process.platform==="win32";function getTarPath(){return c(this,void 0,void 0,(function*(){switch(process.platform){case"win32":{const r=yield g.getGnuTarPathOnWindows();const i=y.SystemTarPathOnWindows;if(r){return{path:r,type:y.ArchiveToolType.GNU}}else if((0,m.existsSync)(i)){return{path:i,type:y.ArchiveToolType.BSD}}break}case"darwin":{const r=yield u.which("gtar",false);if(r){return{path:r,type:y.ArchiveToolType.GNU}}else{return{path:yield u.which("tar",true),type:y.ArchiveToolType.BSD}}}default:break}return{path:yield u.which("tar",true),type:y.ArchiveToolType.GNU}}))}function getTarArgs(r,i,a,s=""){return c(this,void 0,void 0,(function*(){const p=[`"${r.path}"`];const l=g.getCacheFileName(i);const c="cache.tar";const d=getWorkingDirectory();const u=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(a){case"create":p.push("--posix","-cf",u?c:l.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"--exclude",u?c:l.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"--files-from",y.ManifestFilename);break;case"extract":p.push("-xf",u?c:s.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P","-C",d.replace(new RegExp(`\\${h.sep}`,"g"),"/"));break;case"list":p.push("-tf",u?c:s.replace(new RegExp(`\\${h.sep}`,"g"),"/"),"-P");break}if(r.type===y.ArchiveToolType.GNU){switch(process.platform){case"win32":p.push("--force-local");break;case"darwin":p.push("--delay-directory-restore");break}}return p}))}function getCommands(r,i,a=""){return c(this,void 0,void 0,(function*(){let s;const p=yield getTarPath();const l=yield getTarArgs(p,r,i,a);const c=i!=="create"?yield getDecompressionProgram(p,r,a):yield getCompressionProgram(p,r);const d=p.type===y.ArchiveToolType.BSD&&r!==y.CompressionMethod.Gzip&&v;if(d&&i!=="create"){s=[[...c].join(" "),[...l].join(" ")]}else{s=[[...l].join(" "),[...c].join(" ")]}if(d){return s}return[s.join(" ")]}))}function getWorkingDirectory(){var r;return(r=process.env["GITHUB_WORKSPACE"])!==null&&r!==void 0?r:process.cwd()}function getDecompressionProgram(r,i,a){return c(this,void 0,void 0,(function*(){const s=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(i){case y.CompressionMethod.Zstd:return s?["zstd -d --long=30 --force -o",y.TarFilename,a.replace(new RegExp(`\\${h.sep}`,"g"),"/")]:["--use-compress-program",v?'"zstd -d --long=30"':"unzstd --long=30"];case y.CompressionMethod.ZstdWithoutLong:return s?["zstd -d --force -o",y.TarFilename,a.replace(new RegExp(`\\${h.sep}`,"g"),"/")]:["--use-compress-program",v?'"zstd -d"':"unzstd"];default:return["-z"]}}))}function getCompressionProgram(r,i){return c(this,void 0,void 0,(function*(){const a=g.getCacheFileName(i);const s=r.type===y.ArchiveToolType.BSD&&i!==y.CompressionMethod.Gzip&&v;switch(i){case y.CompressionMethod.Zstd:return s?["zstd -T0 --long=30 --force -o",a.replace(new RegExp(`\\${h.sep}`,"g"),"/"),y.TarFilename]:["--use-compress-program",v?'"zstd -T0 --long=30"':"zstdmt --long=30"];case y.CompressionMethod.ZstdWithoutLong:return s?["zstd -T0 --force -o",a.replace(new RegExp(`\\${h.sep}`,"g"),"/"),y.TarFilename]:["--use-compress-program",v?'"zstd -T0"':"zstdmt"];default:return["-z"]}}))}function execCommands(r,i){return c(this,void 0,void 0,(function*(){for(const a of r){try{yield(0,d.exec)(a,undefined,{cwd:i,env:Object.assign(Object.assign({},process.env),{MSYS:"winsymlinks:nativestrict"})})}catch(r){throw new Error(`${a.split(" ")[0]} failed with error: ${r===null||r===void 0?void 0:r.message}`)}}}))}function listTar(r,i){return c(this,void 0,void 0,(function*(){const a=yield getCommands(i,"list",r);yield execCommands(a)}))}i.listTar=listTar;function extractTar(r,i){return c(this,void 0,void 0,(function*(){const a=getWorkingDirectory();yield u.mkdirP(a);const s=yield getCommands(i,"extract",r);yield execCommands(s)}))}i.extractTar=extractTar;function createTar(r,i,a){return c(this,void 0,void 0,(function*(){(0,m.writeFileSync)(h.join(r,y.ManifestFilename),i.join("\n"));const s=yield getCommands(a,"create");yield execCommands(s,r)}))}i.createTar=createTar},6215:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;var p=Object.getOwnPropertyDescriptor(i,a);if(!p||("get"in p?!i.__esModule:p.writable||p.configurable)){p={enumerable:true,get:function(){return i[a]}}}Object.defineProperty(r,s,p)}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.getDownloadOptions=i.getUploadOptions=void 0;const c=l(a(2186));function getUploadOptions(r){const i={uploadConcurrency:4,uploadChunkSize:32*1024*1024};if(r){if(typeof r.uploadConcurrency==="number"){i.uploadConcurrency=r.uploadConcurrency}if(typeof r.uploadChunkSize==="number"){i.uploadChunkSize=r.uploadChunkSize}}c.debug(`Upload concurrency: ${i.uploadConcurrency}`);c.debug(`Upload chunk size: ${i.uploadChunkSize}`);return i}i.getUploadOptions=getUploadOptions;function getDownloadOptions(r){const i={useAzureSdk:false,concurrentBlobDownloads:true,downloadConcurrency:8,timeoutInMs:3e4,segmentTimeoutInMs:6e5,lookupOnly:false};if(r){if(typeof r.useAzureSdk==="boolean"){i.useAzureSdk=r.useAzureSdk}if(typeof r.concurrentBlobDownloads==="boolean"){i.concurrentBlobDownloads=r.concurrentBlobDownloads}if(typeof r.downloadConcurrency==="number"){i.downloadConcurrency=r.downloadConcurrency}if(typeof r.timeoutInMs==="number"){i.timeoutInMs=r.timeoutInMs}if(typeof r.segmentTimeoutInMs==="number"){i.segmentTimeoutInMs=r.segmentTimeoutInMs}if(typeof r.lookupOnly==="boolean"){i.lookupOnly=r.lookupOnly}}const a=process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"];if(a&&!isNaN(Number(a))&&isFinite(Number(a))){i.segmentTimeoutInMs=Number(a)*60*1e3}c.debug(`Use Azure SDK: ${i.useAzureSdk}`);c.debug(`Download concurrency: ${i.downloadConcurrency}`);c.debug(`Request timeout (ms): ${i.timeoutInMs}`);c.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`);c.debug(`Segment download timeout (ms): ${i.segmentTimeoutInMs}`);c.debug(`Lookup only: ${i.lookupOnly}`);return i}i.getDownloadOptions=getDownloadOptions},4138:(r,i,a)=>{var s=a(1610);var p=a(8373);var l=p;l.v1=s;l.v4=p;r.exports=l},5694:r=>{var i=[];for(var a=0;a<256;++a){i[a]=(a+256).toString(16).substr(1)}function bytesToUuid(r,a){var s=a||0;var p=i;return[p[r[s++]],p[r[s++]],p[r[s++]],p[r[s++]],"-",p[r[s++]],p[r[s++]],"-",p[r[s++]],p[r[s++]],"-",p[r[s++]],p[r[s++]],"-",p[r[s++]],p[r[s++]],p[r[s++]],p[r[s++]],p[r[s++]],p[r[s++]]].join("")}r.exports=bytesToUuid},4069:(r,i,a)=>{var s=a(6113);r.exports=function nodeRNG(){return s.randomBytes(16)}},1610:(r,i,a)=>{var s=a(4069);var p=a(5694);var l;var c;var d=0;var u=0;function v1(r,i,a){var m=i&&a||0;var h=i||[];r=r||{};var g=r.node||l;var y=r.clockseq!==undefined?r.clockseq:c;if(g==null||y==null){var v=s();if(g==null){g=l=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]}if(y==null){y=c=(v[6]<<8|v[7])&16383}}var b=r.msecs!==undefined?r.msecs:(new Date).getTime();var x=r.nsecs!==undefined?r.nsecs:u+1;var w=b-d+(x-u)/1e4;if(w<0&&r.clockseq===undefined){y=y+1&16383}if((w<0||b>d)&&r.nsecs===undefined){x=0}if(x>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}d=b;u=x;c=y;b+=122192928e5;var S=((b&268435455)*1e4+x)%4294967296;h[m++]=S>>>24&255;h[m++]=S>>>16&255;h[m++]=S>>>8&255;h[m++]=S&255;var E=b/4294967296*1e4&268435455;h[m++]=E>>>8&255;h[m++]=E&255;h[m++]=E>>>24&15|16;h[m++]=E>>>16&255;h[m++]=y>>>8|128;h[m++]=y&255;for(var _=0;_<6;++_){h[m+_]=g[_]}return i?i:p(h)}r.exports=v1},8373:(r,i,a)=>{var s=a(4069);var p=a(5694);function v4(r,i,a){var l=i&&a||0;if(typeof r=="string"){i=r==="binary"?new Array(16):null;r=null}r=r||{};var c=r.random||(r.rng||s)();c[6]=c[6]&15|64;c[8]=c[8]&63|128;if(i){for(var d=0;d<16;++d){i[l+d]=c[d]}}return i||p(c)}r.exports=v4},7351:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;Object.defineProperty(r,s,{enumerable:true,get:function(){return i[a]}})}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.issue=i.issueCommand=void 0;const c=l(a(2037));const d=a(5278);function issueCommand(r,i,a){const s=new Command(r,i,a);process.stdout.write(s.toString()+c.EOL)}i.issueCommand=issueCommand;function issue(r,i=""){issueCommand(r,{},i)}i.issue=issue;const u="::";class Command{constructor(r,i,a){if(!r){r="missing.command"}this.command=r;this.properties=i;this.message=a}toString(){let r=u+this.command;if(this.properties&&Object.keys(this.properties).length>0){r+=" ";let i=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const s=this.properties[a];if(s){if(i){i=false}else{r+=","}r+=`${a}=${escapeProperty(s)}`}}}}r+=`${u}${escapeData(this.message)}`;return r}}function escapeData(r){return d.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(r){return d.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;Object.defineProperty(r,s,{enumerable:true,get:function(){return i[a]}})}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};var c=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.getIDToken=i.getState=i.saveState=i.group=i.endGroup=i.startGroup=i.info=i.notice=i.warning=i.error=i.debug=i.isDebug=i.setFailed=i.setCommandEcho=i.setOutput=i.getBooleanInput=i.getMultilineInput=i.getInput=i.addPath=i.setSecret=i.exportVariable=i.ExitCode=void 0;const d=a(7351);const u=a(717);const m=a(5278);const h=l(a(2037));const g=l(a(1017));const y=a(8041);var v;(function(r){r[r["Success"]=0]="Success";r[r["Failure"]=1]="Failure"})(v=i.ExitCode||(i.ExitCode={}));function exportVariable(r,i){const a=m.toCommandValue(i);process.env[r]=a;const s=process.env["GITHUB_ENV"]||"";if(s){return u.issueFileCommand("ENV",u.prepareKeyValueMessage(r,i))}d.issueCommand("set-env",{name:r},a)}i.exportVariable=exportVariable;function setSecret(r){d.issueCommand("add-mask",{},r)}i.setSecret=setSecret;function addPath(r){const i=process.env["GITHUB_PATH"]||"";if(i){u.issueFileCommand("PATH",r)}else{d.issueCommand("add-path",{},r)}process.env["PATH"]=`${r}${g.delimiter}${process.env["PATH"]}`}i.addPath=addPath;function getInput(r,i){const a=process.env[`INPUT_${r.replace(/ /g,"_").toUpperCase()}`]||"";if(i&&i.required&&!a){throw new Error(`Input required and not supplied: ${r}`)}if(i&&i.trimWhitespace===false){return a}return a.trim()}i.getInput=getInput;function getMultilineInput(r,i){const a=getInput(r,i).split("\n").filter((r=>r!==""));if(i&&i.trimWhitespace===false){return a}return a.map((r=>r.trim()))}i.getMultilineInput=getMultilineInput;function getBooleanInput(r,i){const a=["true","True","TRUE"];const s=["false","False","FALSE"];const p=getInput(r,i);if(a.includes(p))return true;if(s.includes(p))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${r}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i.getBooleanInput=getBooleanInput;function setOutput(r,i){const a=process.env["GITHUB_OUTPUT"]||"";if(a){return u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(r,i))}process.stdout.write(h.EOL);d.issueCommand("set-output",{name:r},m.toCommandValue(i))}i.setOutput=setOutput;function setCommandEcho(r){d.issue("echo",r?"on":"off")}i.setCommandEcho=setCommandEcho;function setFailed(r){process.exitCode=v.Failure;error(r)}i.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}i.isDebug=isDebug;function debug(r){d.issueCommand("debug",{},r)}i.debug=debug;function error(r,i={}){d.issueCommand("error",m.toCommandProperties(i),r instanceof Error?r.toString():r)}i.error=error;function warning(r,i={}){d.issueCommand("warning",m.toCommandProperties(i),r instanceof Error?r.toString():r)}i.warning=warning;function notice(r,i={}){d.issueCommand("notice",m.toCommandProperties(i),r instanceof Error?r.toString():r)}i.notice=notice;function info(r){process.stdout.write(r+h.EOL)}i.info=info;function startGroup(r){d.issue("group",r)}i.startGroup=startGroup;function endGroup(){d.issue("endgroup")}i.endGroup=endGroup;function group(r,i){return c(this,void 0,void 0,(function*(){startGroup(r);let a;try{a=yield i()}finally{endGroup()}return a}))}i.group=group;function saveState(r,i){const a=process.env["GITHUB_STATE"]||"";if(a){return u.issueFileCommand("STATE",u.prepareKeyValueMessage(r,i))}d.issueCommand("save-state",{name:r},m.toCommandValue(i))}i.saveState=saveState;function getState(r){return process.env[`STATE_${r}`]||""}i.getState=getState;function getIDToken(r){return c(this,void 0,void 0,(function*(){return yield y.OidcClient.getIDToken(r)}))}i.getIDToken=getIDToken;var b=a(1327);Object.defineProperty(i,"summary",{enumerable:true,get:function(){return b.summary}});var x=a(1327);Object.defineProperty(i,"markdownSummary",{enumerable:true,get:function(){return x.markdownSummary}});var w=a(2981);Object.defineProperty(i,"toPosixPath",{enumerable:true,get:function(){return w.toPosixPath}});Object.defineProperty(i,"toWin32Path",{enumerable:true,get:function(){return w.toWin32Path}});Object.defineProperty(i,"toPlatformPath",{enumerable:true,get:function(){return w.toPlatformPath}})},717:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;Object.defineProperty(r,s,{enumerable:true,get:function(){return i[a]}})}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.prepareKeyValueMessage=i.issueFileCommand=void 0;const c=l(a(7147));const d=l(a(2037));const u=a(8974);const m=a(5278);function issueFileCommand(r,i){const a=process.env[`GITHUB_${r}`];if(!a){throw new Error(`Unable to find environment variable for file command ${r}`)}if(!c.existsSync(a)){throw new Error(`Missing file at path: ${a}`)}c.appendFileSync(a,`${m.toCommandValue(i)}${d.EOL}`,{encoding:"utf8"})}i.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(r,i){const a=`ghadelimiter_${u.v4()}`;const s=m.toCommandValue(i);if(r.includes(a)){throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`)}if(s.includes(a)){throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`)}return`${r}<<${a}${d.EOL}${s}${d.EOL}${a}`}i.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(r,i,a){"use strict";var s=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.OidcClient=void 0;const p=a(6255);const l=a(5526);const c=a(2186);class OidcClient{static createHttpClient(r=true,i=10){const a={allowRetries:r,maxRetries:i};return new p.HttpClient("actions/oidc-client",[new l.BearerCredentialHandler(OidcClient.getRequestToken())],a)}static getRequestToken(){const r=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!r){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return r}static getIDTokenUrl(){const r=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!r){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return r}static getCall(r){var i;return s(this,void 0,void 0,(function*(){const a=OidcClient.createHttpClient();const s=yield a.getJson(r).catch((r=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${r.statusCode}\n \n Error Message: ${r.message}`)}));const p=(i=s.result)===null||i===void 0?void 0:i.value;if(!p){throw new Error("Response json body do not have ID Token field")}return p}))}static getIDToken(r){return s(this,void 0,void 0,(function*(){try{let i=OidcClient.getIDTokenUrl();if(r){const a=encodeURIComponent(r);i=`${i}&audience=${a}`}c.debug(`ID token url is ${i}`);const a=yield OidcClient.getCall(i);c.setSecret(a);return a}catch(r){throw new Error(`Error message: ${r.message}`)}}))}}i.OidcClient=OidcClient},2981:function(r,i,a){"use strict";var s=this&&this.__createBinding||(Object.create?function(r,i,a,s){if(s===undefined)s=a;Object.defineProperty(r,s,{enumerable:true,get:function(){return i[a]}})}:function(r,i,a,s){if(s===undefined)s=a;r[s]=i[a]});var p=this&&this.__setModuleDefault||(Object.create?function(r,i){Object.defineProperty(r,"default",{enumerable:true,value:i})}:function(r,i){r["default"]=i});var l=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a in r)if(a!=="default"&&Object.hasOwnProperty.call(r,a))s(i,r,a);p(i,r);return i};Object.defineProperty(i,"__esModule",{value:true});i.toPlatformPath=i.toWin32Path=i.toPosixPath=void 0;const c=l(a(1017));function toPosixPath(r){return r.replace(/[\\]/g,"/")}i.toPosixPath=toPosixPath;function toWin32Path(r){return r.replace(/[/]/g,"\\")}i.toWin32Path=toWin32Path;function toPlatformPath(r){return r.replace(/[/\\]/g,c.sep)}i.toPlatformPath=toPlatformPath},1327:function(r,i,a){"use strict";var s=this&&this.__awaiter||function(r,i,a,s){function adopt(r){return r instanceof a?r:new a((function(i){i(r)}))}return new(a||(a=Promise))((function(a,p){function fulfilled(r){try{step(s.next(r))}catch(r){p(r)}}function rejected(r){try{step(s["throw"](r))}catch(r){p(r)}}function step(r){r.done?a(r.value):adopt(r.value).then(fulfilled,rejected)}step((s=s.apply(r,i||[])).next())}))};Object.defineProperty(i,"__esModule",{value:true});i.summary=i.markdownSummary=i.SUMMARY_DOCS_URL=i.SUMMARY_ENV_VAR=void 0;const p=a(2037);const l=a(7147);const{access:c,appendFile:d,writeFile:u}=l.promises;i.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";i.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const r=process.env[i.SUMMARY_ENV_VAR];if(!r){throw new Error(`Unable to find environment variable for $${i.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield c(r,l.constants.R_OK|l.constants.W_OK)}catch(i){throw new Error(`Unable to access summary file: '${r}'. Check if the file has correct read/write permissions.`)}this._filePath=r;return this._filePath}))}wrap(r,i,a={}){const s=Object.entries(a).map((([r,i])=>` ${r}="${i}"`)).join("");if(!i){return`<${r}${s}>`}return`<${r}${s}>${i}${r}>`}write(r){return s(this,void 0,void 0,(function*(){const i=!!(r===null||r===void 0?void 0:r.overwrite);const a=yield this.filePath();const s=i?u:d;yield s(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(r,i=false){this._buffer+=r;return i?this.addEOL():this}addEOL(){return this.addRaw(p.EOL)}addCodeBlock(r,i){const a=Object.assign({},i&&{lang:i});const s=this.wrap("pre",this.wrap("code",r),a);return this.addRaw(s).addEOL()}addList(r,i=false){const a=i?"ol":"ul";const s=r.map((r=>this.wrap("li",r))).join("");const p=this.wrap(a,s);return this.addRaw(p).addEOL()}addTable(r){const i=r.map((r=>{const i=r.map((r=>{if(typeof r==="string"){return this.wrap("td",r)}const{header:i,data:a,colspan:s,rowspan:p}=r;const l=i?"th":"td";const c=Object.assign(Object.assign({},s&&{colspan:s}),p&&{rowspan:p});return this.wrap(l,a,c)})).join("");return this.wrap("tr",i)})).join("");const a=this.wrap("table",i);return this.addRaw(a).addEOL()}addDetails(r,i){const a=this.wrap("details",this.wrap("summary",r)+i);return this.addRaw(a).addEOL()}addImage(r,i,a){const{width:s,height:p}=a||{};const l=Object.assign(Object.assign({},s&&{width:s}),p&&{height:p});const c=this.wrap("img",null,Object.assign({src:r,alt:i},l));return this.addRaw(c).addEOL()}addHeading(r,i){const a=`h${i}`;const s=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const p=this.wrap(s,r);return this.addRaw(p).addEOL()}addSeparator(){const r=this.wrap("hr",null);return this.addRaw(r).addEOL()}addBreak(){const r=this.wrap("br",null);return this.addRaw(r).addEOL()}addQuote(r,i){const a=Object.assign({},i&&{cite:i});const s=this.wrap("blockquote",r,a);return this.addRaw(s).addEOL()}addLink(r,i){const a=this.wrap("a",r,{href:i});return this.addRaw(a).addEOL()}}const m=new Summary;i.markdownSummary=m;i.summary=m},5278:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i.toCommandProperties=i.toCommandValue=void 0;function toCommandValue(r){if(r===null||r===undefined){return""}else if(typeof r==="string"||r instanceof String){return r}return JSON.stringify(r)}i.toCommandValue=toCommandValue;function toCommandProperties(r){if(!Object.keys(r).length){return{}}return{title:r.title,file:r.file,line:r.startLine,endLine:r.endLine,col:r.startColumn,endColumn:r.endColumn}}i.toCommandProperties=toCommandProperties},8974:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});Object.defineProperty(i,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(i,"v3",{enumerable:true,get:function(){return p.default}});Object.defineProperty(i,"v4",{enumerable:true,get:function(){return l.default}});Object.defineProperty(i,"v5",{enumerable:true,get:function(){return c.default}});Object.defineProperty(i,"NIL",{enumerable:true,get:function(){return d.default}});Object.defineProperty(i,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(i,"validate",{enumerable:true,get:function(){return m.default}});Object.defineProperty(i,"stringify",{enumerable:true,get:function(){return h.default}});Object.defineProperty(i,"parse",{enumerable:true,get:function(){return g.default}});var s=_interopRequireDefault(a(1595));var p=_interopRequireDefault(a(6993));var l=_interopRequireDefault(a(1472));var c=_interopRequireDefault(a(6217));var d=_interopRequireDefault(a(2381));var u=_interopRequireDefault(a(427));var m=_interopRequireDefault(a(2609));var h=_interopRequireDefault(a(1458));var g=_interopRequireDefault(a(6385));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}},5842:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function md5(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("md5").update(r).digest()}var p=md5;i["default"]=p},2381:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";i["default"]=a},6385:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(2609));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function parse(r){if(!(0,s.default)(r)){throw TypeError("Invalid UUID")}let i;const a=new Uint8Array(16);a[0]=(i=parseInt(r.slice(0,8),16))>>>24;a[1]=i>>>16&255;a[2]=i>>>8&255;a[3]=i&255;a[4]=(i=parseInt(r.slice(9,13),16))>>>8;a[5]=i&255;a[6]=(i=parseInt(r.slice(14,18),16))>>>8;a[7]=i&255;a[8]=(i=parseInt(r.slice(19,23),16))>>>8;a[9]=i&255;a[10]=(i=parseInt(r.slice(24,36),16))/1099511627776&255;a[11]=i/4294967296&255;a[12]=i>>>24&255;a[13]=i>>>16&255;a[14]=i>>>8&255;a[15]=i&255;return a}var p=parse;i["default"]=p},6230:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;i["default"]=a},9784:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=rng;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=new Uint8Array(256);let l=p.length;function rng(){if(l>p.length-16){s.default.randomFillSync(p);l=0}return p.slice(l,l+=16)}},8844:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function sha1(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("sha1").update(r).digest()}var p=sha1;i["default"]=p},1458:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(2609));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=[];for(let r=0;r<256;++r){p.push((r+256).toString(16).substr(1))}function stringify(r,i=0){const a=(p[r[i+0]]+p[r[i+1]]+p[r[i+2]]+p[r[i+3]]+"-"+p[r[i+4]]+p[r[i+5]]+"-"+p[r[i+6]]+p[r[i+7]]+"-"+p[r[i+8]]+p[r[i+9]]+"-"+p[r[i+10]]+p[r[i+11]]+p[r[i+12]]+p[r[i+13]]+p[r[i+14]]+p[r[i+15]]).toLowerCase();if(!(0,s.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var l=stringify;i["default"]=l},1595:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(9784));var p=_interopRequireDefault(a(1458));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}let l;let c;let d=0;let u=0;function v1(r,i,a){let m=i&&a||0;const h=i||new Array(16);r=r||{};let g=r.node||l;let y=r.clockseq!==undefined?r.clockseq:c;if(g==null||y==null){const i=r.random||(r.rng||s.default)();if(g==null){g=l=[i[0]|1,i[1],i[2],i[3],i[4],i[5]]}if(y==null){y=c=(i[6]<<8|i[7])&16383}}let v=r.msecs!==undefined?r.msecs:Date.now();let b=r.nsecs!==undefined?r.nsecs:u+1;const x=v-d+(b-u)/1e4;if(x<0&&r.clockseq===undefined){y=y+1&16383}if((x<0||v>d)&&r.nsecs===undefined){b=0}if(b>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}d=v;u=b;c=y;v+=122192928e5;const w=((v&268435455)*1e4+b)%4294967296;h[m++]=w>>>24&255;h[m++]=w>>>16&255;h[m++]=w>>>8&255;h[m++]=w&255;const S=v/4294967296*1e4&268435455;h[m++]=S>>>8&255;h[m++]=S&255;h[m++]=S>>>24&15|16;h[m++]=S>>>16&255;h[m++]=y>>>8|128;h[m++]=y&255;for(let r=0;r<6;++r){h[m+r]=g[r]}return i||(0,p.default)(h)}var m=v1;i["default"]=m},6993:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(5920));var p=_interopRequireDefault(a(5842));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const l=(0,s.default)("v3",48,p.default);var c=l;i["default"]=c},5920:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=_default;i.URL=i.DNS=void 0;var s=_interopRequireDefault(a(1458));var p=_interopRequireDefault(a(6385));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function stringToBytes(r){r=unescape(encodeURIComponent(r));const i=[];for(let a=0;a {const m=generateBlockID(d,s);const h=a.blockSize*s;const g=s===p-1?i:h+a.blockSize;const y=g-h;l.push(m);await this.stageBlock(m,r(h,y),y,{abortSignal:a.abortSignal,conditions:a.conditions,encryptionScope:a.encryptionScope,tracingOptions:c.tracingOptions});u+=y;if(a.onProgress){a.onProgress({loadedBytes:u})}}))}await m.do();return this.commitBlockList(l,c)}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async uploadFile(r,i={}){const{span:a,updatedOptions:s}=Lo("BlockBlobClient-uploadFile",i);try{const a=(await Wo(r)).size;return await this.uploadSeekableInternal(((i,a)=>()=>Ko(r,{autoClose:true,end:a?i+a-1:Infinity,start:i})),a,Object.assign(Object.assign({},i),{tracingOptions:Object.assign(Object.assign({},i.tracingOptions),convertTracingToRequestOptionsBase(s))}))}catch(r){a.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{a.end()}}async uploadStream(r,i=no,a=5,p={}){if(!p.blobHTTPHeaders){p.blobHTTPHeaders={}}if(!p.conditions){p.conditions={}}const{span:c,updatedOptions:d}=Lo("BlockBlobClient-uploadStream",p);try{let l=0;const c=s.generateUuid();let u=0;const m=[];const h=new BufferScheduler(r,i,a,(async(r,i)=>{const a=generateBlockID(c,l);m.push(a);l++;await this.stageBlock(a,r,i,{conditions:p.conditions,encryptionScope:p.encryptionScope,tracingOptions:d.tracingOptions});u+=i;if(p.onProgress){p.onProgress({loadedBytes:u})}}),Math.ceil(a/4*3));await h.do();return await this.commitBlockList(m,Object.assign(Object.assign({},p),{tracingOptions:Object.assign(Object.assign({},p.tracingOptions),convertTracingToRequestOptionsBase(d))}))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}}class PageBlobClient extends BlobClient{constructor(r,i,a,p){let l;let c;p=p||{};if(isPipelineLike(i)){c=r;l=i}else if(s.isNode&&i instanceof StorageSharedKeyCredential||i instanceof AnonymousCredential||s.isTokenCredential(i)){c=r;p=a;l=newPipeline(i,p)}else if(!i&&typeof i!=="string"){c=r;l=newPipeline(new AnonymousCredential,p)}else if(i&&typeof i==="string"&&a&&typeof a==="string"){const d=i;const u=a;const m=extractConnectionStringParts(r);if(m.kind==="AccountConnString"){if(s.isNode){const r=new StorageSharedKeyCredential(m.accountName,m.accountKey);c=appendToURLPath(appendToURLPath(m.url,encodeURIComponent(d)),encodeURIComponent(u));if(!p.proxyOptions){p.proxyOptions=s.getDefaultProxySettings(m.proxyUri)}l=newPipeline(r,p)}else{throw new Error("Account connection string is only supported in Node.js environment")}}else if(m.kind==="SASConnString"){c=appendToURLPath(appendToURLPath(m.url,encodeURIComponent(d)),encodeURIComponent(u))+"?"+m.accountSas;l=newPipeline(new AnonymousCredential,p)}else{throw new Error("Connection string must be either an Account connection string or a SAS connection string")}}else{throw new Error("Expecting non-empty strings for containerName and blobName parameters")}super(c,l);this.pageBlobContext=new PageBlob(this.storageClientContext)}withSnapshot(r){return new PageBlobClient(setURLParameter(this.url,co.Parameters.SNAPSHOT,r.length===0?undefined:r),this.pipeline)}async create(r,i={}){var a,s,p;i.conditions=i.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-create",i);try{ensureCpkIfSpecified(i.customerProvidedKey,this.isHttps);return await this.pageBlobContext.create(0,r,Object.assign({abortSignal:i.abortSignal,blobHttpHeaders:i.blobHTTPHeaders,blobSequenceNumber:i.blobSequenceNumber,leaseAccessConditions:i.conditions,metadata:i.metadata,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions}),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,immutabilityPolicyExpiry:(s=i.immutabilityPolicy)===null||s===void 0?void 0:s.expiriesOn,immutabilityPolicyMode:(p=i.immutabilityPolicy)===null||p===void 0?void 0:p.policyMode,legalHold:i.legalHold,tier:toAccessTier(i.tier),blobTagsString:toBlobTagsString(i.tags)},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async createIfNotExists(r,i={}){var a,s;const{span:p,updatedOptions:c}=Lo("PageBlobClient-createIfNotExists",i);try{const a={ifNoneMatch:ho};const s=await this.create(r,Object.assign(Object.assign({},i),{conditions:a,tracingOptions:c.tracingOptions}));return Object.assign(Object.assign({succeeded:true},s),{_response:s._response})}catch(r){if(((a=r.details)===null||a===void 0?void 0:a.errorCode)==="BlobAlreadyExists"){p.setStatus({code:l.SpanStatusCode.ERROR,message:"Expected exception when creating a blob only if it does not already exist."});return Object.assign(Object.assign({succeeded:false},(s=r.response)===null||s===void 0?void 0:s.parsedHeaders),{_response:r.response})}p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async uploadPages(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-uploadPages",s);try{ensureCpkIfSpecified(s.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPages(a,r,Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),requestOptions:{onUploadProgress:s.onProgress},range:rangeToString({offset:i,count:a}),sequenceNumberAccessConditions:s.conditions,transactionalContentMD5:s.transactionalContentMD5,transactionalContentCrc64:s.transactionalContentCrc64,cpkInfo:s.customerProvidedKey,encryptionScope:s.encryptionScope},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async uploadPagesFromURL(r,i,a,s,p={}){var c;p.conditions=p.conditions||{};p.sourceConditions=p.sourceConditions||{};const{span:d,updatedOptions:u}=Lo("PageBlobClient-uploadPagesFromURL",p);try{ensureCpkIfSpecified(p.customerProvidedKey,this.isHttps);return await this.pageBlobContext.uploadPagesFromURL(r,rangeToString({offset:i,count:s}),0,rangeToString({offset:a,count:s}),Object.assign({abortSignal:p.abortSignal,sourceContentMD5:p.sourceContentMD5,sourceContentCrc64:p.sourceContentCrc64,leaseAccessConditions:p.conditions,sequenceNumberAccessConditions:p.conditions,modifiedAccessConditions:Object.assign(Object.assign({},p.conditions),{ifTags:(c=p.conditions)===null||c===void 0?void 0:c.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:p.sourceConditions.ifMatch,sourceIfModifiedSince:p.sourceConditions.ifModifiedSince,sourceIfNoneMatch:p.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:p.sourceConditions.ifUnmodifiedSince},cpkInfo:p.customerProvidedKey,encryptionScope:p.encryptionScope,copySourceAuthorization:httpAuthorizationToString(p.sourceAuthorization)},convertTracingToRequestOptionsBase(u)))}catch(r){d.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{d.end()}}async clearPages(r=0,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-clearPages",a);try{return await this.pageBlobContext.clearPages(0,Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:r,count:i}),sequenceNumberAccessConditions:a.conditions,cpkInfo:a.customerProvidedKey,encryptionScope:a.encryptionScope},convertTracingToRequestOptionsBase(c)))}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async getPageRanges(r=0,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-getPageRanges",a);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:a.abortSignal,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions}),range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(c))).then(rangeResponseFromModel)}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async listPageRangesSegment(r=0,i,a,s={}){var p;const{span:c,updatedOptions:d}=Lo("PageBlobClient-getPageRangesSegment",s);try{return await this.pageBlobContext.getPageRanges(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),range:rangeToString({offset:r,count:i}),marker:a,maxPageSize:s.maxPageSize},convertTracingToRequestOptionsBase(d)))}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}listPageRangeItemSegments(r=0,i,a,s={}){return p.__asyncGenerator(this,arguments,(function*listPageRangeItemSegments_1(){let l;if(!!a||a===undefined){do{l=yield p.__await(this.listPageRangesSegment(r,i,a,s));a=l.continuationToken;yield yield p.__await(yield p.__await(l))}while(a)}}))}listPageRangeItems(r=0,i,a={}){return p.__asyncGenerator(this,arguments,(function*listPageRangeItems_1(){var s,l;let c;try{for(var d=p.__asyncValues(this.listPageRangeItemSegments(r,i,c,a)),u;u=yield p.__await(d.next()),!u.done;){const r=u.value;yield p.__await(yield*p.__asyncDelegator(p.__asyncValues(ExtractPageRangeInfoItems(r))))}}catch(r){s={error:r}}finally{try{if(u&&!u.done&&(l=d.return))yield p.__await(l.call(d))}finally{if(s)throw s.error}}}))}listPageRanges(r=0,i,a={}){a.conditions=a.conditions||{};const s=this.listPageRangeItems(r,i,a);return{next(){return s.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.listPageRangeItemSegments(r,i,s.continuationToken,Object.assign({maxPageSize:s.maxPageSize},a))}}async getPageRangesDiff(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-getPageRangesDiff",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),prevsnapshot:a,range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(d))).then(rangeResponseFromModel)}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async listPageRangesDiffSegment(r,i,a,s,p){var c;const{span:d,updatedOptions:u}=Lo("PageBlobClient-getPageRangesDiffSegment",p);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:p===null||p===void 0?void 0:p.abortSignal,leaseAccessConditions:p===null||p===void 0?void 0:p.conditions,modifiedAccessConditions:Object.assign(Object.assign({},p===null||p===void 0?void 0:p.conditions),{ifTags:(c=p===null||p===void 0?void 0:p.conditions)===null||c===void 0?void 0:c.tagConditions}),prevsnapshot:a,range:rangeToString({offset:r,count:i}),marker:s,maxPageSize:p===null||p===void 0?void 0:p.maxPageSize},convertTracingToRequestOptionsBase(u)))}catch(r){d.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{d.end()}}listPageRangeDiffItemSegments(r,i,a,s,l){return p.__asyncGenerator(this,arguments,(function*listPageRangeDiffItemSegments_1(){let c;if(!!s||s===undefined){do{c=yield p.__await(this.listPageRangesDiffSegment(r,i,a,s,l));s=c.continuationToken;yield yield p.__await(yield p.__await(c))}while(s)}}))}listPageRangeDiffItems(r,i,a,s){return p.__asyncGenerator(this,arguments,(function*listPageRangeDiffItems_1(){var l,c;let d;try{for(var u=p.__asyncValues(this.listPageRangeDiffItemSegments(r,i,a,d,s)),m;m=yield p.__await(u.next()),!m.done;){const r=m.value;yield p.__await(yield*p.__asyncDelegator(p.__asyncValues(ExtractPageRangeInfoItems(r))))}}catch(r){l={error:r}}finally{try{if(m&&!m.done&&(c=u.return))yield p.__await(c.call(u))}finally{if(l)throw l.error}}}))}listPageRangesDiff(r,i,a,s={}){s.conditions=s.conditions||{};const p=this.listPageRangeDiffItems(r,i,a,Object.assign({},s));return{next(){return p.next()},[Symbol.asyncIterator](){return this},byPage:(p={})=>this.listPageRangeDiffItemSegments(r,i,a,p.continuationToken,Object.assign({maxPageSize:p.maxPageSize},s))}}async getPageRangesDiffForManagedDisks(r,i,a,s={}){var p;s.conditions=s.conditions||{};const{span:c,updatedOptions:d}=Lo("PageBlobClient-GetPageRangesDiffForManagedDisks",s);try{return await this.pageBlobContext.getPageRangesDiff(Object.assign({abortSignal:s.abortSignal,leaseAccessConditions:s.conditions,modifiedAccessConditions:Object.assign(Object.assign({},s.conditions),{ifTags:(p=s.conditions)===null||p===void 0?void 0:p.tagConditions}),prevSnapshotUrl:a,range:rangeToString({offset:r,count:i})},convertTracingToRequestOptionsBase(d))).then(rangeResponseFromModel)}catch(r){c.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{c.end()}}async resize(r,i={}){var a;i.conditions=i.conditions||{};const{span:s,updatedOptions:p}=Lo("PageBlobClient-resize",i);try{return await this.pageBlobContext.resize(r,Object.assign({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions}),encryptionScope:i.encryptionScope},convertTracingToRequestOptionsBase(p)))}catch(r){s.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{s.end()}}async updateSequenceNumber(r,i,a={}){var s;a.conditions=a.conditions||{};const{span:p,updatedOptions:c}=Lo("PageBlobClient-updateSequenceNumber",a);try{return await this.pageBlobContext.updateSequenceNumber(r,Object.assign({abortSignal:a.abortSignal,blobSequenceNumber:i,leaseAccessConditions:a.conditions,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(s=a.conditions)===null||s===void 0?void 0:s.tagConditions})},convertTracingToRequestOptionsBase(c)))}catch(r){p.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{p.end()}}async startCopyIncremental(r,i={}){var a;const{span:s,updatedOptions:p}=Lo("PageBlobClient-startCopyIncremental",i);try{return await this.pageBlobContext.copyIncremental(r,Object.assign({abortSignal:i.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:(a=i.conditions)===null||a===void 0?void 0:a.tagConditions})},convertTracingToRequestOptionsBase(p)))}catch(r){s.setStatus({code:l.SpanStatusCode.ERROR,message:r.message});throw r}finally{s.end()}}}async function getBodyAsText(r){let i=Buffer.alloc(vo);const a=await streamToBuffer2(r.readableStreamBody,i);i=i.slice(0,a);return i.toString()}function utf8ByteLength(r){return Buffer.byteLength(r)}const Qo=": ";const Yo=" ";const Jo=-1;class BatchResponseParser{constructor(r,i){if(!r||!r.contentType){throw new RangeError("batchResponse is malformed or doesn't contain valid content-type.")}if(!i||i.size===0){throw new RangeError("Invalid state: subRequests is not provided or size is 0.")}this.batchResponse=r;this.subRequests=i;this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1];this.perResponsePrefix=`--${this.responseBatchBoundary}${bo}`;this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==uo.HTTP_ACCEPTED){throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`)}const r=await getBodyAsText(this.batchResponse);const i=r.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1);const a=i.length;if(a!==this.subRequests.size&&a!==1){throw new Error("Invalid state: sub responses' count is not equal to sub requests' count.")}const p=new Array(a);let l=0;let c=0;for(let r=0;r=0&&y {r.exports=glob;var s=a(7147);var p=a(6863);var l=a(3973);var c=l.Minimatch;var d=a(4124);var u=a(2361).EventEmitter;var m=a(1017);var h=a(9491);var g=a(8714);var y=a(9010);var v=a(7625);var b=v.setopts;var x=v.ownProp;var w=a(2492);var S=a(3837);var E=v.childrenIgnored;var _=v.isIgnored;var T=a(1223);function glob(r,i,a){if(typeof i==="function")a=i,i={};if(!i)i={};if(i.sync){if(a)throw new TypeError("callback provided to sync glob");return y(r,i)}return new Glob(r,i,a)}glob.sync=y;var N=glob.GlobSync=y.GlobSync;glob.glob=glob;function extend(r,i){if(i===null||typeof i!=="object"){return r}var a=Object.keys(i);var s=a.length;while(s--){r[a[s]]=i[a[s]]}return r}glob.hasMagic=function(r,i){var a=extend({},i);a.noprocess=true;var s=new Glob(r,a);var p=s.minimatch.set;if(!r)return false;if(p.length>1)return true;for(var l=0;l this.maxLength)return i();if(!this.stat&&x(this.cache,a)){var l=this.cache[a];if(Array.isArray(l))l="DIR";if(!p||l==="DIR")return i(null,l);if(p&&l==="FILE")return i()}var c;var d=this.statCache[a];if(d!==undefined){if(d===false)return i(null,d);else{var u=d.isDirectory()?"DIR":"FILE";if(p&&u==="FILE")return i();else return i(null,u,d)}}var m=this;var h=w("stat\0"+a,lstatcb_);if(h)s.lstat(a,h);function lstatcb_(p,l){if(l&&l.isSymbolicLink()){return s.stat(a,(function(s,p){if(s)m._stat2(r,a,null,l,i);else m._stat2(r,a,s,p,i)}))}else{m._stat2(r,a,p,l,i)}}};Glob.prototype._stat2=function(r,i,a,s,p){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR")){this.statCache[i]=false;return p()}var l=r.slice(-1)==="/";this.statCache[i]=s;if(i.slice(-1)==="/"&&s&&!s.isDirectory())return p(null,false,s);var c=true;if(s)c=s.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||c;if(l&&c==="FILE")return p();return p(null,c,s)}},9010:(r,i,a)=>{r.exports=globSync;globSync.GlobSync=GlobSync;var s=a(7147);var p=a(6863);var l=a(3973);var c=l.Minimatch;var d=a(1957).Glob;var u=a(3837);var m=a(1017);var h=a(9491);var g=a(8714);var y=a(7625);var v=y.setopts;var b=y.ownProp;var x=y.childrenIgnored;var w=y.isIgnored;function globSync(r,i){if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(r,i).found}function GlobSync(r,i){if(!r)throw new Error("must provide pattern");if(typeof i==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(r,i);v(this,r,i);if(this.noprocess)return this;var a=this.minimatch.set.length;this.matches=new Array(a);for(var s=0;sthis.maxLength)return false;if(!this.stat&&b(this.cache,i)){var p=this.cache[i];if(Array.isArray(p))p="DIR";if(!a||p==="DIR")return p;if(a&&p==="FILE")return false}var l;var c=this.statCache[i];if(!c){var d;try{d=s.lstatSync(i)}catch(r){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[i]=false;return false}}if(d&&d.isSymbolicLink()){try{c=s.statSync(i)}catch(r){c=d}}else{c=d}}this.statCache[i]=c;var p=true;if(c)p=c.isDirectory()?"DIR":"FILE";this.cache[i]=this.cache[i]||p;if(a&&p==="FILE")return false;return p};GlobSync.prototype._mark=function(r){return y.mark(this,r)};GlobSync.prototype._makeAbs=function(r){return y.makeAbs(this,r)}},2492:(r,i,a)=>{var s=a(2940);var p=Object.create(null);var l=a(1223);r.exports=s(inflight);function inflight(r,i){if(p[r]){p[r].push(i);return null}else{p[r]=[i];return makeres(r)}}function makeres(r){return l((function RES(){var i=p[r];var a=i.length;var s=slice(arguments);try{for(var l=0;la){i.splice(0,a);process.nextTick((function(){RES.apply(null,s)}))}else{delete p[r]}}}))}function slice(r){var i=r.length;var a=[];for(var s=0;s{try{var s=a(3837);if(typeof s.inherits!=="function")throw"";r.exports=s.inherits}catch(i){r.exports=a(8544)}},8544:r=>{if(typeof Object.create==="function"){r.exports=function inherits(r,i){if(i){r.super_=i;r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:false,writable:true,configurable:true}})}}}else{r.exports=function inherits(r,i){if(i){r.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype;r.prototype=new TempCtor;r.prototype.constructor=r}}}},3287:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});
/*!
* is-plain-object 1&&arguments[1]!==undefined?arguments[1]:{},p=a.size;let l=p===undefined?0:p;var c=a.timeout;let d=c===undefined?0:c;if(r==null){r=null}else if(isURLSearchParams(r)){r=Buffer.from(r.toString())}else if(isBlob(r));else if(Buffer.isBuffer(r));else if(Object.prototype.toString.call(r)==="[object ArrayBuffer]"){r=Buffer.from(r)}else if(ArrayBuffer.isView(r)){r=Buffer.from(r.buffer,r.byteOffset,r.byteLength)}else if(r instanceof s);else{r=Buffer.from(String(r))}this[v]={body:r,disturbed:false,error:null};this.size=l;this.timeout=d;if(r instanceof s){r.on("error",(function(r){const a=r.name==="AbortError"?r:new FetchError(`Invalid response body while trying to fetch ${i.url}: ${r.message}`,"system",r);i[v].error=a}))}}Body.prototype={get body(){return this[v].body},get bodyUsed(){return this[v].disturbed},arrayBuffer(){return consumeBody.call(this).then((function(r){return r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}))},blob(){let r=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then((function(i){return Object.assign(new Blob([],{type:r.toLowerCase()}),{[h]:i})}))},json(){var r=this;return consumeBody.call(this).then((function(i){try{return JSON.parse(i.toString())}catch(i){return Body.Promise.reject(new FetchError(`invalid json response body at ${r.url} reason: ${i.message}`,"invalid-json"))}}))},text(){return consumeBody.call(this).then((function(r){return r.toString()}))},buffer(){return consumeBody.call(this)},textConverted(){var r=this;return consumeBody.call(this).then((function(i){return convertBody(i,r.headers)}))}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(r){for(const i of Object.getOwnPropertyNames(Body.prototype)){if(!(i in r)){const a=Object.getOwnPropertyDescriptor(Body.prototype,i);Object.defineProperty(r,i,a)}}};function consumeBody(){var r=this;if(this[v].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[v].disturbed=true;if(this[v].error){return Body.Promise.reject(this[v].error)}let i=this.body;if(i===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(i)){i=i.stream()}if(Buffer.isBuffer(i)){return Body.Promise.resolve(i)}if(!(i instanceof s)){return Body.Promise.resolve(Buffer.alloc(0))}let a=[];let p=0;let l=false;return new Body.Promise((function(s,c){let d;if(r.timeout){d=setTimeout((function(){l=true;c(new FetchError(`Response timeout while trying to fetch ${r.url} (over ${r.timeout}ms)`,"body-timeout"))}),r.timeout)}i.on("error",(function(i){if(i.name==="AbortError"){l=true;c(i)}else{c(new FetchError(`Invalid response body while trying to fetch ${r.url}: ${i.message}`,"system",i))}}));i.on("data",(function(i){if(l||i===null){return}if(r.size&&p+i.length>r.size){l=true;c(new FetchError(`content size at ${r.url} over limit: ${r.size}`,"max-size"));return}p+=i.length;a.push(i)}));i.on("end",(function(){if(l){return}clearTimeout(d);try{s(Buffer.concat(a,p))}catch(i){c(new FetchError(`Could not create Buffer from response body for ${r.url}: ${i.message}`,"system",i))}}))}))}function convertBody(r,i){if(typeof y!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const a=i.get("content-type");let s="utf-8";let p,l;if(a){p=/charset=([^;]*)/i.exec(a)}l=r.slice(0,1024).toString();if(!p&&l){p=/ 1&&arguments[1]!==undefined?arguments[1]:{},p=a.size;let l=p===undefined?0:p;var c=a.timeout;let d=c===undefined?0:c;if(r==null){r=null}else if(isURLSearchParams(r)){r=Buffer.from(r.toString())}else if(isBlob(r));else if(Buffer.isBuffer(r));else if(Object.prototype.toString.call(r)==="[object ArrayBuffer]"){r=Buffer.from(r)}else if(ArrayBuffer.isView(r)){r=Buffer.from(r.buffer,r.byteOffset,r.byteLength)}else if(r instanceof s);else{r=Buffer.from(String(r))}this[v]={body:r,disturbed:false,error:null};this.size=l;this.timeout=d;if(r instanceof s){r.on("error",(function(r){const a=r.name==="AbortError"?r:new FetchError(`Invalid response body while trying to fetch ${i.url}: ${r.message}`,"system",r);i[v].error=a}))}}Body.prototype={get body(){return this[v].body},get bodyUsed(){return this[v].disturbed},arrayBuffer(){return consumeBody.call(this).then((function(r){return r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength)}))},blob(){let r=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then((function(i){return Object.assign(new Blob([],{type:r.toLowerCase()}),{[h]:i})}))},json(){var r=this;return consumeBody.call(this).then((function(i){try{return JSON.parse(i.toString())}catch(i){return Body.Promise.reject(new FetchError(`invalid json response body at ${r.url} reason: ${i.message}`,"invalid-json"))}}))},text(){return consumeBody.call(this).then((function(r){return r.toString()}))},buffer(){return consumeBody.call(this)},textConverted(){var r=this;return consumeBody.call(this).then((function(i){return convertBody(i,r.headers)}))}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(r){for(const i of Object.getOwnPropertyNames(Body.prototype)){if(!(i in r)){const a=Object.getOwnPropertyDescriptor(Body.prototype,i);Object.defineProperty(r,i,a)}}};function consumeBody(){var r=this;if(this[v].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[v].disturbed=true;if(this[v].error){return Body.Promise.reject(this[v].error)}let i=this.body;if(i===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(i)){i=i.stream()}if(Buffer.isBuffer(i)){return Body.Promise.resolve(i)}if(!(i instanceof s)){return Body.Promise.resolve(Buffer.alloc(0))}let a=[];let p=0;let l=false;return new Body.Promise((function(s,c){let d;if(r.timeout){d=setTimeout((function(){l=true;c(new FetchError(`Response timeout while trying to fetch ${r.url} (over ${r.timeout}ms)`,"body-timeout"))}),r.timeout)}i.on("error",(function(i){if(i.name==="AbortError"){l=true;c(i)}else{c(new FetchError(`Invalid response body while trying to fetch ${r.url}: ${i.message}`,"system",i))}}));i.on("data",(function(i){if(l||i===null){return}if(r.size&&p+i.length>r.size){l=true;c(new FetchError(`content size at ${r.url} over limit: ${r.size}`,"max-size"));return}p+=i.length;a.push(i)}));i.on("end",(function(){if(l){return}clearTimeout(d);try{s(Buffer.concat(a,p))}catch(i){c(new FetchError(`Could not create Buffer from response body for ${r.url}: ${i.message}`,"system",i))}}))}))}function convertBody(r,i){if(typeof y!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const a=i.get("content-type");let s="utf-8";let p,l;if(a){p=/charset=([^;]*)/i.exec(a)}l=r.slice(0,1024).toString();if(!p&&l){p=/ =0){if(typeof this.prerelease[a]==="number"){this.prerelease[a]++;a=-2}}if(a===-1){this.prerelease.push(0)}}if(i){if(this.prerelease[0]===i){if(isNaN(this.prerelease[1])){this.prerelease=[i,0]}}else{this.prerelease=[i,0]}}break;default:throw new Error("invalid increment argument: "+r)}this.format();this.raw=this.version;return this};i.inc=inc;function inc(r,i,a,s){if(typeof a==="string"){s=a;a=undefined}try{return new SemVer(r,a).inc(i,s).version}catch(r){return null}}i.diff=diff;function diff(r,i){if(eq(r,i)){return null}else{var a=parse(r);var s=parse(i);var p="";if(a.prerelease.length||s.prerelease.length){p="pre";var l="prerelease"}for(var c in a){if(c==="major"||c==="minor"||c==="patch"){if(a[c]!==s[c]){return p+c}}}return l}}i.compareIdentifiers=compareIdentifiers;var b=/^[0-9]+$/;function compareIdentifiers(r,i){var a=b.test(r);var s=b.test(i);if(a&&s){r=+r;i=+i}return r===i?0:a&&!s?-1:s&&!a?1:r0}i.lt=lt;function lt(r,i,a){return compare(r,i,a)<0}i.eq=eq;function eq(r,i,a){return compare(r,i,a)===0}i.neq=neq;function neq(r,i,a){return compare(r,i,a)!==0}i.gte=gte;function gte(r,i,a){return compare(r,i,a)>=0}i.lte=lte;function lte(r,i,a){return compare(r,i,a)<=0}i.cmp=cmp;function cmp(r,i,a,s){switch(i){case"===":if(typeof r==="object")r=r.version;if(typeof a==="object")a=a.version;return r===a;case"!==":if(typeof r==="object")r=r.version;if(typeof a==="object")a=a.version;return r!==a;case"":case"=":case"==":return eq(r,a,s);case"!=":return neq(r,a,s);case">":return gt(r,a,s);case">=":return gte(r,a,s);case"<":return lt(r,a,s);case"<=":return lte(r,a,s);default:throw new TypeError("Invalid operator: "+i)}}i.Comparator=Comparator;function Comparator(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof Comparator){if(r.loose===!!i.loose){return r}else{r=r.value}}if(!(this instanceof Comparator)){return new Comparator(r,i)}a("comparator",r,i);this.options=i;this.loose=!!i.loose;this.parse(r);if(this.semver===x){this.value=""}else{this.value=this.operator+this.semver.version}a("comp",this)}var x={};Comparator.prototype.parse=function(r){var i=this.options.loose?c[u.COMPARATORLOOSE]:c[u.COMPARATOR];var a=r.match(i);if(!a){throw new TypeError("Invalid comparator: "+r)}this.operator=a[1]!==undefined?a[1]:"";if(this.operator==="="){this.operator=""}if(!a[2]){this.semver=x}else{this.semver=new SemVer(a[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(r){a("Comparator.test",r,this.options.loose);if(this.semver===x||r===x){return true}if(typeof r==="string"){try{r=new SemVer(r,this.options)}catch(r){return false}}return cmp(r,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(r,i){if(!(r instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}var a;if(this.operator===""){if(this.value===""){return true}a=new Range(r.value,i);return satisfies(this.value,a,i)}else if(r.operator===""){if(r.value===""){return true}a=new Range(this.value,i);return satisfies(r.semver,a,i)}var s=(this.operator===">="||this.operator===">")&&(r.operator===">="||r.operator===">");var p=(this.operator==="<="||this.operator==="<")&&(r.operator==="<="||r.operator==="<");var l=this.semver.version===r.semver.version;var c=(this.operator===">="||this.operator==="<=")&&(r.operator===">="||r.operator==="<=");var d=cmp(this.semver,"<",r.semver,i)&&((this.operator===">="||this.operator===">")&&(r.operator==="<="||r.operator==="<"));var u=cmp(this.semver,">",r.semver,i)&&((this.operator==="<="||this.operator==="<")&&(r.operator===">="||r.operator===">"));return s||p||l&&c||d||u};i.Range=Range;function Range(r,i){if(!i||typeof i!=="object"){i={loose:!!i,includePrerelease:false}}if(r instanceof Range){if(r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease){return r}else{return new Range(r.raw,i)}}if(r instanceof Comparator){return new Range(r.value,i)}if(!(this instanceof Range)){return new Range(r,i)}this.options=i;this.loose=!!i.loose;this.includePrerelease=!!i.includePrerelease;this.raw=r;this.set=r.split(/\s*\|\|\s*/).map((function(r){return this.parseRange(r.trim())}),this).filter((function(r){return r.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+r)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(r){return r.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(r){var i=this.options.loose;r=r.trim();var s=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];r=r.replace(s,hyphenReplace);a("hyphen replace",r);r=r.replace(c[u.COMPARATORTRIM],y);a("comparator trim",r,c[u.COMPARATORTRIM]);r=r.replace(c[u.TILDETRIM],h);r=r.replace(c[u.CARETTRIM],g);r=r.split(/\s+/).join(" ");var p=i?c[u.COMPARATORLOOSE]:c[u.COMPARATOR];var l=r.split(" ").map((function(r){return parseComparator(r,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){l=l.filter((function(r){return!!r.match(p)}))}l=l.map((function(r){return new Comparator(r,this.options)}),this);return l};Range.prototype.intersects=function(r,i){if(!(r instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(a){return isSatisfiable(a,i)&&r.set.some((function(r){return isSatisfiable(r,i)&&a.every((function(a){return r.every((function(r){return a.intersects(r,i)}))}))}))}))};function isSatisfiable(r,i){var a=true;var s=r.slice();var p=s.pop();while(a&&s.length){a=s.every((function(r){return p.intersects(r,i)}));p=s.pop()}return a}i.toComparators=toComparators;function toComparators(r,i){return new Range(r,i).set.map((function(r){return r.map((function(r){return r.value})).join(" ").trim().split(" ")}))}function parseComparator(r,i){a("comp",r,i);r=replaceCarets(r,i);a("caret",r);r=replaceTildes(r,i);a("tildes",r);r=replaceXRanges(r,i);a("xrange",r);r=replaceStars(r,i);a("stars",r);return r}function isX(r){return!r||r.toLowerCase()==="x"||r==="*"}function replaceTildes(r,i){return r.trim().split(/\s+/).map((function(r){return replaceTilde(r,i)})).join(" ")}function replaceTilde(r,i){var s=i.loose?c[u.TILDELOOSE]:c[u.TILDE];return r.replace(s,(function(i,s,p,l,c){a("tilde",r,i,s,p,l,c);var d;if(isX(s)){d=""}else if(isX(p)){d=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(isX(l)){d=">="+s+"."+p+".0 <"+s+"."+(+p+1)+".0"}else if(c){a("replaceTilde pr",c);d=">="+s+"."+p+"."+l+"-"+c+" <"+s+"."+(+p+1)+".0"}else{d=">="+s+"."+p+"."+l+" <"+s+"."+(+p+1)+".0"}a("tilde return",d);return d}))}function replaceCarets(r,i){return r.trim().split(/\s+/).map((function(r){return replaceCaret(r,i)})).join(" ")}function replaceCaret(r,i){a("caret",r,i);var s=i.loose?c[u.CARETLOOSE]:c[u.CARET];return r.replace(s,(function(i,s,p,l,c){a("caret",r,i,s,p,l,c);var d;if(isX(s)){d=""}else if(isX(p)){d=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(isX(l)){if(s==="0"){d=">="+s+"."+p+".0 <"+s+"."+(+p+1)+".0"}else{d=">="+s+"."+p+".0 <"+(+s+1)+".0.0"}}else if(c){a("replaceCaret pr",c);if(s==="0"){if(p==="0"){d=">="+s+"."+p+"."+l+"-"+c+" <"+s+"."+p+"."+(+l+1)}else{d=">="+s+"."+p+"."+l+"-"+c+" <"+s+"."+(+p+1)+".0"}}else{d=">="+s+"."+p+"."+l+"-"+c+" <"+(+s+1)+".0.0"}}else{a("no pr");if(s==="0"){if(p==="0"){d=">="+s+"."+p+"."+l+" <"+s+"."+p+"."+(+l+1)}else{d=">="+s+"."+p+"."+l+" <"+s+"."+(+p+1)+".0"}}else{d=">="+s+"."+p+"."+l+" <"+(+s+1)+".0.0"}}a("caret return",d);return d}))}function replaceXRanges(r,i){a("replaceXRanges",r,i);return r.split(/\s+/).map((function(r){return replaceXRange(r,i)})).join(" ")}function replaceXRange(r,i){r=r.trim();var s=i.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return r.replace(s,(function(s,p,l,c,d,u){a("xRange",r,s,p,l,c,d,u);var m=isX(l);var h=m||isX(c);var g=h||isX(d);var y=g;if(p==="="&&y){p=""}u=i.includePrerelease?"-0":"";if(m){if(p===">"||p==="<"){s="<0.0.0-0"}else{s="*"}}else if(p&&y){if(h){c=0}d=0;if(p===">"){p=">=";if(h){l=+l+1;c=0;d=0}else{c=+c+1;d=0}}else if(p==="<="){p="<";if(h){l=+l+1}else{c=+c+1}}s=p+l+"."+c+"."+d+u}else if(h){s=">="+l+".0.0"+u+" <"+(+l+1)+".0.0"+u}else if(g){s=">="+l+"."+c+".0"+u+" <"+l+"."+(+c+1)+".0"+u}a("xRange return",s);return s}))}function replaceStars(r,i){a("replaceStars",r,i);return r.trim().replace(c[u.STAR],"")}function hyphenReplace(r,i,a,s,p,l,c,d,u,m,h,g,y){if(isX(a)){i=""}else if(isX(s)){i=">="+a+".0.0"}else if(isX(p)){i=">="+a+"."+s+".0"}else{i=">="+i}if(isX(u)){d=""}else if(isX(m)){d="<"+(+u+1)+".0.0"}else if(isX(h)){d="<"+u+"."+(+m+1)+".0"}else if(g){d="<="+u+"."+m+"."+h+"-"+g}else{d="<="+d}return(i+" "+d).trim()}Range.prototype.test=function(r){if(!r){return false}if(typeof r==="string"){try{r=new SemVer(r,this.options)}catch(r){return false}}for(var i=0;i{r.exports=function(r,i){Object.keys(i).forEach((function(a){r[a]=r[a]||i[a]}));return r}},3415:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});Object.defineProperty(i,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(i,"v3",{enumerable:true,get:function(){return p.default}});Object.defineProperty(i,"v4",{enumerable:true,get:function(){return l.default}});Object.defineProperty(i,"v5",{enumerable:true,get:function(){return c.default}});Object.defineProperty(i,"NIL",{enumerable:true,get:function(){return d.default}});Object.defineProperty(i,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(i,"validate",{enumerable:true,get:function(){return m.default}});Object.defineProperty(i,"stringify",{enumerable:true,get:function(){return h.default}});Object.defineProperty(i,"parse",{enumerable:true,get:function(){return g.default}});var s=_interopRequireDefault(a(4757));var p=_interopRequireDefault(a(9982));var l=_interopRequireDefault(a(5393));var c=_interopRequireDefault(a(8788));var d=_interopRequireDefault(a(657));var u=_interopRequireDefault(a(7909));var m=_interopRequireDefault(a(4418));var h=_interopRequireDefault(a(4794));var g=_interopRequireDefault(a(7079));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}},4153:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function md5(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("md5").update(r).digest()}var p=md5;i["default"]=p},657:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";i["default"]=a},7079:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4418));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function parse(r){if(!(0,s.default)(r)){throw TypeError("Invalid UUID")}let i;const a=new Uint8Array(16);a[0]=(i=parseInt(r.slice(0,8),16))>>>24;a[1]=i>>>16&255;a[2]=i>>>8&255;a[3]=i&255;a[4]=(i=parseInt(r.slice(9,13),16))>>>8;a[5]=i&255;a[6]=(i=parseInt(r.slice(14,18),16))>>>8;a[7]=i&255;a[8]=(i=parseInt(r.slice(19,23),16))>>>8;a[9]=i&255;a[10]=(i=parseInt(r.slice(24,36),16))/1099511627776&255;a[11]=i/4294967296&255;a[12]=i>>>24&255;a[13]=i>>>16&255;a[14]=i>>>8&255;a[15]=i&255;return a}var p=parse;i["default"]=p},690:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;i["default"]=a},979:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=rng;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=new Uint8Array(256);let l=p.length;function rng(){if(l>p.length-16){s.default.randomFillSync(p);l=0}return p.slice(l,l+=16)}},6631:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function sha1(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("sha1").update(r).digest()}var p=sha1;i["default"]=p},4794:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4418));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=[];for(let r=0;r<256;++r){p.push((r+256).toString(16).substr(1))}function stringify(r,i=0){const a=(p[r[i+0]]+p[r[i+1]]+p[r[i+2]]+p[r[i+3]]+"-"+p[r[i+4]]+p[r[i+5]]+"-"+p[r[i+6]]+p[r[i+7]]+"-"+p[r[i+8]]+p[r[i+9]]+"-"+p[r[i+10]]+p[r[i+11]]+p[r[i+12]]+p[r[i+13]]+p[r[i+14]]+p[r[i+15]]).toLowerCase();if(!(0,s.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var l=stringify;i["default"]=l},4757:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(979));var p=_interopRequireDefault(a(4794));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}let l;let c;let d=0;let u=0;function v1(r,i,a){let m=i&&a||0;const h=i||new Array(16);r=r||{};let g=r.node||l;let y=r.clockseq!==undefined?r.clockseq:c;if(g==null||y==null){const i=r.random||(r.rng||s.default)();if(g==null){g=l=[i[0]|1,i[1],i[2],i[3],i[4],i[5]]}if(y==null){y=c=(i[6]<<8|i[7])&16383}}let v=r.msecs!==undefined?r.msecs:Date.now();let b=r.nsecs!==undefined?r.nsecs:u+1;const x=v-d+(b-u)/1e4;if(x<0&&r.clockseq===undefined){y=y+1&16383}if((x<0||v>d)&&r.nsecs===undefined){b=0}if(b>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}d=v;u=b;c=y;v+=122192928e5;const w=((v&268435455)*1e4+b)%4294967296;h[m++]=w>>>24&255;h[m++]=w>>>16&255;h[m++]=w>>>8&255;h[m++]=w&255;const S=v/4294967296*1e4&268435455;h[m++]=S>>>8&255;h[m++]=S&255;h[m++]=S>>>24&15|16;h[m++]=S>>>16&255;h[m++]=y>>>8|128;h[m++]=y&255;for(let r=0;r<6;++r){h[m+r]=g[r]}return i||(0,p.default)(h)}var m=v1;i["default"]=m},9982:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4085));var p=_interopRequireDefault(a(4153));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const l=(0,s.default)("v3",48,p.default);var c=l;i["default"]=c},4085:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=_default;i.URL=i.DNS=void 0;var s=_interopRequireDefault(a(4794));var p=_interopRequireDefault(a(7079));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function stringToBytes(r){r=unescape(encodeURIComponent(r));const i=[];for(let a=0;aNumber.MAX_SAFE_INTEGER){throw new Error("Integer overflow.")}return s}return a>>1^-(a&1)}static async readLong(r,i={}){return AvroParser.readZigZagLong(r,i)}static async readInt(r,i={}){return AvroParser.readZigZagLong(r,i)}static async readNull(){return null}static async readBoolean(r,i={}){const a=await AvroParser.readByte(r,i);if(a===1){return true}else if(a===0){return false}else{throw new Error("Byte was not a boolean.")}}static async readFloat(r,i={}){const a=await AvroParser.readFixedBytes(r,4,i);const s=new DataView(a.buffer,a.byteOffset,a.byteLength);return s.getFloat32(0,true)}static async readDouble(r,i={}){const a=await AvroParser.readFixedBytes(r,8,i);const s=new DataView(a.buffer,a.byteOffset,a.byteLength);return s.getFloat64(0,true)}static async readBytes(r,i={}){const a=await AvroParser.readLong(r,i);if(a<0){throw new Error("Bytes size was negative.")}return r.read(a,{abortSignal:i.abortSignal})}static async readString(r,i={}){const a=await AvroParser.readBytes(r,i);const s=new TextDecoder;return s.decode(a)}static async readMapPair(r,i,a={}){const s=await AvroParser.readString(r,a);const p=await i(r,a);return{key:s,value:p}}static async readMap(r,i,a={}){const readPairMethod=(r,a={})=>AvroParser.readMapPair(r,i,a);const s=await AvroParser.readArray(r,readPairMethod,a);const p={};for(const r of s){p[r.key]=r.value}return p}static async readArray(r,i,a={}){const s=[];for(let p=await AvroParser.readLong(r,a);p!==0;p=await AvroParser.readLong(r,a)){if(p<0){await AvroParser.readLong(r,a);p=-p}while(p--){const p=await i(r,a);s.push(p)}}return s}}var zo;(function(r){r["RECORD"]="record";r["ENUM"]="enum";r["ARRAY"]="array";r["MAP"]="map";r["UNION"]="union";r["FIXED"]="fixed"})(zo||(zo={}));var Uo;(function(r){r["NULL"]="null";r["BOOLEAN"]="boolean";r["INT"]="int";r["LONG"]="long";r["FLOAT"]="float";r["DOUBLE"]="double";r["BYTES"]="bytes";r["STRING"]="string"})(Uo||(Uo={}));class AvroType{static fromSchema(r){if(typeof r==="string"){return AvroType.fromStringSchema(r)}else if(Array.isArray(r)){return AvroType.fromArraySchema(r)}else{return AvroType.fromObjectSchema(r)}}static fromStringSchema(r){switch(r){case Uo.NULL:case Uo.BOOLEAN:case Uo.INT:case Uo.LONG:case Uo.FLOAT:case Uo.DOUBLE:case Uo.BYTES:case Uo.STRING:return new AvroPrimitiveType(r);default:throw new Error(`Unexpected Avro type ${r}`)}}static fromArraySchema(r){return new AvroUnionType(r.map(AvroType.fromSchema))}static fromObjectSchema(r){const i=r.type;try{return AvroType.fromStringSchema(i)}catch(r){}switch(i){case zo.RECORD:if(r.aliases){throw new Error(`aliases currently is not supported, schema: ${r}`)}if(!r.name){throw new Error(`Required attribute 'name' doesn't exist on schema: ${r}`)}const a={};if(!r.fields){throw new Error(`Required attribute 'fields' doesn't exist on schema: ${r}`)}for(const i of r.fields){a[i.name]=AvroType.fromSchema(i.type)}return new AvroRecordType(a,r.name);case zo.ENUM:if(r.aliases){throw new Error(`aliases currently is not supported, schema: ${r}`)}if(!r.symbols){throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${r}`)}return new AvroEnumType(r.symbols);case zo.MAP:if(!r.values){throw new Error(`Required attribute 'values' doesn't exist on schema: ${r}`)}return new AvroMapType(AvroType.fromSchema(r.values));case zo.ARRAY:case zo.FIXED:default:throw new Error(`Unexpected Avro type ${i} in ${r}`)}}}class AvroPrimitiveType extends AvroType{constructor(r){super();this._primitive=r}read(r,i={}){switch(this._primitive){case Uo.NULL:return AvroParser.readNull();case Uo.BOOLEAN:return AvroParser.readBoolean(r,i);case Uo.INT:return AvroParser.readInt(r,i);case Uo.LONG:return AvroParser.readLong(r,i);case Uo.FLOAT:return AvroParser.readFloat(r,i);case Uo.DOUBLE:return AvroParser.readDouble(r,i);case Uo.BYTES:return AvroParser.readBytes(r,i);case Uo.STRING:return AvroParser.readString(r,i);default:throw new Error("Unknown Avro Primitive")}}}class AvroEnumType extends AvroType{constructor(r){super();this._symbols=r}async read(r,i={}){const a=await AvroParser.readInt(r,i);return this._symbols[a]}}class AvroUnionType extends AvroType{constructor(r){super();this._types=r}async read(r,i={}){const a=await AvroParser.readInt(r,i);return this._types[a].read(r,i)}}class AvroMapType extends AvroType{constructor(r){super();this._itemType=r}read(r,i={}){const readItemMethod=(r,i)=>this._itemType.read(r,i);return AvroParser.readMap(r,readItemMethod,i)}}class AvroRecordType extends AvroType{constructor(r,i){super();this._fields=r;this._name=i}async read(r,i={}){const a={};a["$schema"]=this._name;for(const s in this._fields){if(Object.prototype.hasOwnProperty.call(this._fields,s)){a[s]=await this._fields[s].read(r,i)}}return a}}function arraysEqual(r,i){if(r===i)return true;if(r==null||i==null)return false;if(r.length!==i.length)return false;for(let a=0;a0){r[0]=r[0].slice(l)}}getReadableStream(){return new BuffersStream(this.buffers,this.size)}}class BufferScheduler{constructor(r,i,a,s,p,l){this.emitter=new y.EventEmitter;this.offset=0;this.isStreamEnd=false;this.isError=false;this.executingOutgoingHandlers=0;this.numBuffers=0;this.unresolvedDataArray=[];this.unresolvedLength=0;this.incoming=[];this.outgoing=[];if(i<=0){throw new RangeError(`bufferSize must be larger than 0, current is ${i}`)}if(a<=0){throw new RangeError(`maxBuffers must be larger than 0, current is ${a}`)}if(p<=0){throw new RangeError(`concurrency must be larger than 0, current is ${p}`)}this.bufferSize=i;this.maxBuffers=a;this.readable=r;this.outgoingHandler=s;this.concurrency=p;this.encoding=l}async do(){return new Promise(((r,i)=>{this.readable.on("data",(r=>{r=typeof r==="string"?Buffer.from(r,this.encoding):r;this.appendUnresolvedData(r);if(!this.resolveData()){this.readable.pause()}}));this.readable.on("error",(r=>{this.emitter.emit("error",r)}));this.readable.on("end",(()=>{this.isStreamEnd=true;this.emitter.emit("checkEnd")}));this.emitter.on("error",(r=>{this.isError=true;this.readable.pause();i(r)}));this.emitter.on("checkEnd",(()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0){if(this.unresolvedLength>0&&this.unresolvedLength1){a=i}else if(this.head){s=this.head.next;a=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var p=0;s!==null;p++){a=r(a,s.value,p);s=s.next}return a};Yallist.prototype.reduceReverse=function(r,i){var a;var s=this.tail;if(arguments.length>1){a=i}else if(this.tail){s=this.tail.prev;a=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var p=this.length-1;s!==null;p--){a=r(a,s.value,p);s=s.prev}return a};Yallist.prototype.toArray=function(){var r=new Array(this.length);for(var i=0,a=this.head;a!==null;i++){r[i]=a.value;a=a.next}return r};Yallist.prototype.toArrayReverse=function(){var r=new Array(this.length);for(var i=0,a=this.tail;a!==null;i++){r[i]=a.value;a=a.prev}return r};Yallist.prototype.slice=function(r,i){i=i||this.length;if(i<0){i+=this.length}r=r||0;if(r<0){r+=this.length}var a=new Yallist;if(i{r.exports=function(r,i){Object.keys(i).forEach((function(a){r[a]=r[a]||i[a]}));return r}},3415:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});Object.defineProperty(i,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(i,"v3",{enumerable:true,get:function(){return p.default}});Object.defineProperty(i,"v4",{enumerable:true,get:function(){return l.default}});Object.defineProperty(i,"v5",{enumerable:true,get:function(){return c.default}});Object.defineProperty(i,"NIL",{enumerable:true,get:function(){return d.default}});Object.defineProperty(i,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(i,"validate",{enumerable:true,get:function(){return m.default}});Object.defineProperty(i,"stringify",{enumerable:true,get:function(){return h.default}});Object.defineProperty(i,"parse",{enumerable:true,get:function(){return g.default}});var s=_interopRequireDefault(a(4757));var p=_interopRequireDefault(a(9982));var l=_interopRequireDefault(a(5393));var c=_interopRequireDefault(a(8788));var d=_interopRequireDefault(a(657));var u=_interopRequireDefault(a(7909));var m=_interopRequireDefault(a(4418));var h=_interopRequireDefault(a(4794));var g=_interopRequireDefault(a(7079));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}},4153:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function md5(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("md5").update(r).digest()}var p=md5;i["default"]=p},657:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a="00000000-0000-0000-0000-000000000000";i["default"]=a},7079:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4418));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function parse(r){if(!(0,s.default)(r)){throw TypeError("Invalid UUID")}let i;const a=new Uint8Array(16);a[0]=(i=parseInt(r.slice(0,8),16))>>>24;a[1]=i>>>16&255;a[2]=i>>>8&255;a[3]=i&255;a[4]=(i=parseInt(r.slice(9,13),16))>>>8;a[5]=i&255;a[6]=(i=parseInt(r.slice(14,18),16))>>>8;a[7]=i&255;a[8]=(i=parseInt(r.slice(19,23),16))>>>8;a[9]=i&255;a[10]=(i=parseInt(r.slice(24,36),16))/1099511627776&255;a[11]=i/4294967296&255;a[12]=i>>>24&255;a[13]=i>>>16&255;a[14]=i>>>8&255;a[15]=i&255;return a}var p=parse;i["default"]=p},690:(r,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;i["default"]=a},979:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=rng;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=new Uint8Array(256);let l=p.length;function rng(){if(l>p.length-16){s.default.randomFillSync(p);l=0}return p.slice(l,l+=16)}},6631:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(6113));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function sha1(r){if(Array.isArray(r)){r=Buffer.from(r)}else if(typeof r==="string"){r=Buffer.from(r,"utf8")}return s.default.createHash("sha1").update(r).digest()}var p=sha1;i["default"]=p},4794:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4418));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const p=[];for(let r=0;r<256;++r){p.push((r+256).toString(16).substr(1))}function stringify(r,i=0){const a=(p[r[i+0]]+p[r[i+1]]+p[r[i+2]]+p[r[i+3]]+"-"+p[r[i+4]]+p[r[i+5]]+"-"+p[r[i+6]]+p[r[i+7]]+"-"+p[r[i+8]]+p[r[i+9]]+"-"+p[r[i+10]]+p[r[i+11]]+p[r[i+12]]+p[r[i+13]]+p[r[i+14]]+p[r[i+15]]).toLowerCase();if(!(0,s.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var l=stringify;i["default"]=l},4757:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(979));var p=_interopRequireDefault(a(4794));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}let l;let c;let d=0;let u=0;function v1(r,i,a){let m=i&&a||0;const h=i||new Array(16);r=r||{};let g=r.node||l;let y=r.clockseq!==undefined?r.clockseq:c;if(g==null||y==null){const i=r.random||(r.rng||s.default)();if(g==null){g=l=[i[0]|1,i[1],i[2],i[3],i[4],i[5]]}if(y==null){y=c=(i[6]<<8|i[7])&16383}}let v=r.msecs!==undefined?r.msecs:Date.now();let b=r.nsecs!==undefined?r.nsecs:u+1;const x=v-d+(b-u)/1e4;if(x<0&&r.clockseq===undefined){y=y+1&16383}if((x<0||v>d)&&r.nsecs===undefined){b=0}if(b>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}d=v;u=b;c=y;v+=122192928e5;const w=((v&268435455)*1e4+b)%4294967296;h[m++]=w>>>24&255;h[m++]=w>>>16&255;h[m++]=w>>>8&255;h[m++]=w&255;const S=v/4294967296*1e4&268435455;h[m++]=S>>>8&255;h[m++]=S&255;h[m++]=S>>>24&15|16;h[m++]=S>>>16&255;h[m++]=y>>>8|128;h[m++]=y&255;for(let r=0;r<6;++r){h[m+r]=g[r]}return i||(0,p.default)(h)}var m=v1;i["default"]=m},9982:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=void 0;var s=_interopRequireDefault(a(4085));var p=_interopRequireDefault(a(4153));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const l=(0,s.default)("v3",48,p.default);var c=l;i["default"]=c},4085:(r,i,a)=>{"use strict";Object.defineProperty(i,"__esModule",{value:true});i["default"]=_default;i.URL=i.DNS=void 0;var s=_interopRequireDefault(a(4794));var p=_interopRequireDefault(a(7079));function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}function stringToBytes(r){r=unescape(encodeURIComponent(r));const i=[];for(let a=0;aNumber.MAX_SAFE_INTEGER){throw new Error("Integer overflow.")}return s}return a>>1^-(a&1)}static async readLong(r,i={}){return AvroParser.readZigZagLong(r,i)}static async readInt(r,i={}){return AvroParser.readZigZagLong(r,i)}static async readNull(){return null}static async readBoolean(r,i={}){const a=await AvroParser.readByte(r,i);if(a===1){return true}else if(a===0){return false}else{throw new Error("Byte was not a boolean.")}}static async readFloat(r,i={}){const a=await AvroParser.readFixedBytes(r,4,i);const s=new DataView(a.buffer,a.byteOffset,a.byteLength);return s.getFloat32(0,true)}static async readDouble(r,i={}){const a=await AvroParser.readFixedBytes(r,8,i);const s=new DataView(a.buffer,a.byteOffset,a.byteLength);return s.getFloat64(0,true)}static async readBytes(r,i={}){const a=await AvroParser.readLong(r,i);if(a<0){throw new Error("Bytes size was negative.")}return r.read(a,{abortSignal:i.abortSignal})}static async readString(r,i={}){const a=await AvroParser.readBytes(r,i);const s=new TextDecoder;return s.decode(a)}static async readMapPair(r,i,a={}){const s=await AvroParser.readString(r,a);const p=await i(r,a);return{key:s,value:p}}static async readMap(r,i,a={}){const readPairMethod=(r,a={})=>AvroParser.readMapPair(r,i,a);const s=await AvroParser.readArray(r,readPairMethod,a);const p={};for(const r of s){p[r.key]=r.value}return p}static async readArray(r,i,a={}){const s=[];for(let p=await AvroParser.readLong(r,a);p!==0;p=await AvroParser.readLong(r,a)){if(p<0){await AvroParser.readLong(r,a);p=-p}while(p--){const p=await i(r,a);s.push(p)}}return s}}var qo;(function(r){r["RECORD"]="record";r["ENUM"]="enum";r["ARRAY"]="array";r["MAP"]="map";r["UNION"]="union";r["FIXED"]="fixed"})(qo||(qo={}));var Fo;(function(r){r["NULL"]="null";r["BOOLEAN"]="boolean";r["INT"]="int";r["LONG"]="long";r["FLOAT"]="float";r["DOUBLE"]="double";r["BYTES"]="bytes";r["STRING"]="string"})(Fo||(Fo={}));class AvroType{static fromSchema(r){if(typeof r==="string"){return AvroType.fromStringSchema(r)}else if(Array.isArray(r)){return AvroType.fromArraySchema(r)}else{return AvroType.fromObjectSchema(r)}}static fromStringSchema(r){switch(r){case Fo.NULL:case Fo.BOOLEAN:case Fo.INT:case Fo.LONG:case Fo.FLOAT:case Fo.DOUBLE:case Fo.BYTES:case Fo.STRING:return new AvroPrimitiveType(r);default:throw new Error(`Unexpected Avro type ${r}`)}}static fromArraySchema(r){return new AvroUnionType(r.map(AvroType.fromSchema))}static fromObjectSchema(r){const i=r.type;try{return AvroType.fromStringSchema(i)}catch(r){}switch(i){case qo.RECORD:if(r.aliases){throw new Error(`aliases currently is not supported, schema: ${r}`)}if(!r.name){throw new Error(`Required attribute 'name' doesn't exist on schema: ${r}`)}const a={};if(!r.fields){throw new Error(`Required attribute 'fields' doesn't exist on schema: ${r}`)}for(const i of r.fields){a[i.name]=AvroType.fromSchema(i.type)}return new AvroRecordType(a,r.name);case qo.ENUM:if(r.aliases){throw new Error(`aliases currently is not supported, schema: ${r}`)}if(!r.symbols){throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${r}`)}return new AvroEnumType(r.symbols);case qo.MAP:if(!r.values){throw new Error(`Required attribute 'values' doesn't exist on schema: ${r}`)}return new AvroMapType(AvroType.fromSchema(r.values));case qo.ARRAY:case qo.FIXED:default:throw new Error(`Unexpected Avro type ${i} in ${r}`)}}}class AvroPrimitiveType extends AvroType{constructor(r){super();this._primitive=r}read(r,i={}){switch(this._primitive){case Fo.NULL:return AvroParser.readNull();case Fo.BOOLEAN:return AvroParser.readBoolean(r,i);case Fo.INT:return AvroParser.readInt(r,i);case Fo.LONG:return AvroParser.readLong(r,i);case Fo.FLOAT:return AvroParser.readFloat(r,i);case Fo.DOUBLE:return AvroParser.readDouble(r,i);case Fo.BYTES:return AvroParser.readBytes(r,i);case Fo.STRING:return AvroParser.readString(r,i);default:throw new Error("Unknown Avro Primitive")}}}class AvroEnumType extends AvroType{constructor(r){super();this._symbols=r}async read(r,i={}){const a=await AvroParser.readInt(r,i);return this._symbols[a]}}class AvroUnionType extends AvroType{constructor(r){super();this._types=r}async read(r,i={}){const a=await AvroParser.readInt(r,i);return this._types[a].read(r,i)}}class AvroMapType extends AvroType{constructor(r){super();this._itemType=r}read(r,i={}){const readItemMethod=(r,i)=>this._itemType.read(r,i);return AvroParser.readMap(r,readItemMethod,i)}}class AvroRecordType extends AvroType{constructor(r,i){super();this._fields=r;this._name=i}async read(r,i={}){const a={};a["$schema"]=this._name;for(const s in this._fields){if(Object.prototype.hasOwnProperty.call(this._fields,s)){a[s]=await this._fields[s].read(r,i)}}return a}}function arraysEqual(r,i){if(r===i)return true;if(r==null||i==null)return false;if(r.length!==i.length)return false;for(let a=0;a0){r[0]=r[0].slice(l)}}getReadableStream(){return new BuffersStream(this.buffers,this.size)}}class BufferScheduler{constructor(r,i,a,s,p,l){this.emitter=new y.EventEmitter;this.offset=0;this.isStreamEnd=false;this.isError=false;this.executingOutgoingHandlers=0;this.numBuffers=0;this.unresolvedDataArray=[];this.unresolvedLength=0;this.incoming=[];this.outgoing=[];if(i<=0){throw new RangeError(`bufferSize must be larger than 0, current is ${i}`)}if(a<=0){throw new RangeError(`maxBuffers must be larger than 0, current is ${a}`)}if(p<=0){throw new RangeError(`concurrency must be larger than 0, current is ${p}`)}this.bufferSize=i;this.maxBuffers=a;this.readable=r;this.outgoingHandler=s;this.concurrency=p;this.encoding=l}async do(){return new Promise(((r,i)=>{this.readable.on("data",(r=>{r=typeof r==="string"?Buffer.from(r,this.encoding):r;this.appendUnresolvedData(r);if(!this.resolveData()){this.readable.pause()}}));this.readable.on("error",(r=>{this.emitter.emit("error",r)}));this.readable.on("end",(()=>{this.isStreamEnd=true;this.emitter.emit("checkEnd")}));this.emitter.on("error",(r=>{this.isError=true;this.readable.pause();i(r)}));this.emitter.on("checkEnd",(()=>{if(this.outgoing.length>0){this.triggerOutgoingHandlers();return}if(this.isStreamEnd&&this.executingOutgoingHandlers===0){if(this.unresolvedLength>0&&this.unresolvedLength1){a=i}else if(this.head){s=this.head.next;a=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var p=0;s!==null;p++){a=r(a,s.value,p);s=s.next}return a};Yallist.prototype.reduceReverse=function(r,i){var a;var s=this.tail;if(arguments.length>1){a=i}else if(this.tail){s=this.tail.prev;a=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var p=this.length-1;s!==null;p--){a=r(a,s.value,p);s=s.prev}return a};Yallist.prototype.toArray=function(){var r=new Array(this.length);for(var i=0,a=this.head;a!==null;i++){r[i]=a.value;a=a.next}return r};Yallist.prototype.toArrayReverse=function(){var r=new Array(this.length);for(var i=0,a=this.tail;a!==null;i++){r[i]=a.value;a=a.prev}return r};Yallist.prototype.slice=function(r,i){i=i||this.length;if(i<0){i+=this.length}r=r||0;if(r<0){r+=this.length}var a=new Yallist;if(i{"use strict";var s=a(6829);var p=a(8179);var l=a(8759);var c=Object.prototype.toString;var d=Object.prototype.hasOwnProperty;var u=65279;var m=9;var h=10;var g=13;var y=32;var v=33;var b=34;var x=35;var w=37;var S=38;var _=39;var E=42;var T=44;var N=45;var P=58;var O=61;var C=62;var R=63;var A=64;var D=91;var k=93;var I=96;var L=123;var M=124;var B=125;var j={};j[0]="\\0";j[7]="\\a";j[8]="\\b";j[9]="\\t";j[10]="\\n";j[11]="\\v";j[12]="\\f";j[13]="\\r";j[27]="\\e";j[34]='\\"';j[92]="\\\\";j[133]="\\N";j[160]="\\_";j[8232]="\\L";j[8233]="\\P";var q=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var z=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(r,i){var a,s,p,l,c,u,m;if(i===null)return{};a={};s=Object.keys(i);for(p=0,l=s.length;p")}if(r.result!==null&&E.kind!==r.kind){throwError(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+E.kind+'", not "'+r.kind+'"')}if(!E.resolve(r.result,r.tag)){throwError(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}else{r.result=E.construct(r.result,r.tag);if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}if(r.listener!==null){r.listener("close",r)}return r.tag!==null||r.anchor!==null||x}function readDocument(r){var i=r.position,a,s,p,l=false,c;r.version=null;r.checkLineBreaks=r.legacy;r.tagMap=Object.create(null);r.anchorMap=Object.create(null);while((c=r.input.charCodeAt(r.position))!==0){skipSeparationSpace(r,true,-1);c=r.input.charCodeAt(r.position);if(r.lineIndent>0||c!==37){break}l=true;c=r.input.charCodeAt(++r.position);a=r.position;while(c!==0&&!is_WS_OR_EOL(c)){c=r.input.charCodeAt(++r.position)}s=r.input.slice(a,r.position);p=[];if(s.length<1){throwError(r,"directive name must not be less than one character in length")}while(c!==0){while(is_WHITE_SPACE(c)){c=r.input.charCodeAt(++r.position)}if(c===35){do{c=r.input.charCodeAt(++r.position)}while(c!==0&&!is_EOL(c));break}if(is_EOL(c))break;a=r.position;while(c!==0&&!is_WS_OR_EOL(c)){c=r.input.charCodeAt(++r.position)}p.push(r.input.slice(a,r.position))}if(c!==0)readLineBreak(r);if(d.call(O,s)){O[s](r,s,p)}else{throwWarning(r,'unknown document directive "'+s+'"')}}skipSeparationSpace(r,true,-1);if(r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45){r.position+=3;skipSeparationSpace(r,true,-1)}else if(l){throwError(r,"directives end mark is expected")}composeNode(r,r.lineIndent-1,g,false,true);skipSeparationSpace(r,true,-1);if(r.checkLineBreaks&&w.test(r.input.slice(i,r.position))){throwWarning(r,"non-ASCII line breaks are interpreted as content")}r.documents.push(r.result);if(r.position===r.lineStart&&testDocumentSeparator(r)){if(r.input.charCodeAt(r.position)===46){r.position+=3;skipSeparationSpace(r,true,-1)}return}if(r.position{"use strict";var s=a(6073);var p=Object.prototype.toString;function resolveYamlPairs(r){if(r===null)return true;var i,a,s,l,c,d=r;c=new Array(d.length);for(i=0,a=d.length;i{"use strict";var s=a(6073);r.exports=new s("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})},9548:(r,i,a)=>{"use strict";var s=a(6073);var p=Object.prototype.hasOwnProperty;function resolveYamlSet(r){if(r===null)return true;var i,a=r;for(i in a){if(p.call(a,i)){if(a[i]!==null)return false}}return true}function constructYamlSet(r){return r!==null?r:{}}r.exports=new s("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3619:(r,i,a)=>{"use strict";var s=a(6073);r.exports=new s("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})},9212:(r,i,a)=>{"use strict";var s=a(6073);var p=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var l=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(r){if(r===null)return false;if(p.exec(r)!==null)return true;if(l.exec(r)!==null)return true;return false}function constructYamlTimestamp(r){var i,a,s,c,d,u,m,h=0,g=null,y,v,b;i=p.exec(r);if(i===null)i=l.exec(r);if(i===null)throw new Error("Date resolve error");a=+i[1];s=+i[2]-1;c=+i[3];if(!i[4]){return new Date(Date.UTC(a,s,c))}d=+i[4];u=+i[5];m=+i[6];if(i[7]){h=i[7].slice(0,3);while(h.length<3){h+="0"}h=+h}if(i[9]){y=+i[10];v=+(i[11]||0);g=(y*60+v)*6e4;if(i[9]==="-")g=-g}b=new Date(Date.UTC(a,s,c,d,u,m,h));if(g)b.setTime(b.getTime()-g);return b}function representYamlTimestamp(r){return r.toISOString()}r.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},4329:r=>{"use strict";function e(r){this.message=r}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var i=String(r).replace(/=+$/,"");if(i.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var a,s,p=0,l=0,c="";s=i.charAt(l++);~s&&(a=p%4?64*a+s:s,p++%4)?c+=String.fromCharCode(255&a>>(-2*p&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return c};function t(r){var a=r.replace(/-/g,"+").replace(/_/g,"/");switch(a.length%4){case 0:break;case 2:a+="==";break;case 3:a+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(i(r).replace(/(.)/g,(function(r,i){var a=i.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a})))}(a)}catch(r){return i(a)}}function n(r){this.message=r}function o(r,i){if("string"!=typeof r)throw new n("Invalid token specified");var a=!0===(i=i||{}).header?0:1;try{return JSON.parse(t(r.split(".")[a]))}catch(r){throw new n("Invalid token specified: "+r.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";const a=o;a.default=o,a.InvalidTokenError=n,r.exports=a},7426:(r,i,a)=>{
+ */function isObject(r){return Object.prototype.toString.call(r)==="[object Object]"}function isPlainObject(r){var i,a;if(isObject(r)===false)return false;i=r.constructor;if(i===undefined)return true;a=i.prototype;if(isObject(a)===false)return false;if(a.hasOwnProperty("isPrototypeOf")===false){return false}return true}i.isPlainObject=isPlainObject},1917:(r,i,a)=>{"use strict";var s=a(1161);var p=a(8866);function renamed(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. "+"Use yaml."+i+" instead, which is now safe by default.")}}r.exports.Type=a(6073);r.exports.Schema=a(1082);r.exports.FAILSAFE_SCHEMA=a(8562);r.exports.JSON_SCHEMA=a(1035);r.exports.CORE_SCHEMA=a(2011);r.exports.DEFAULT_SCHEMA=a(8759);r.exports.load=s.load;r.exports.loadAll=s.loadAll;r.exports.dump=p.dump;r.exports.YAMLException=a(8179);r.exports.types={binary:a(7900),float:a(2705),map:a(6150),null:a(721),pairs:a(6860),set:a(9548),timestamp:a(9212),bool:a(4993),int:a(1615),merge:a(6104),omap:a(9046),seq:a(7283),str:a(3619)};r.exports.safeLoad=renamed("safeLoad","load");r.exports.safeLoadAll=renamed("safeLoadAll","loadAll");r.exports.safeDump=renamed("safeDump","dump")},6829:r=>{"use strict";function isNothing(r){return typeof r==="undefined"||r===null}function isObject(r){return typeof r==="object"&&r!==null}function toArray(r){if(Array.isArray(r))return r;else if(isNothing(r))return[];return[r]}function extend(r,i){var a,s,p,l;if(i){l=Object.keys(i);for(a=0,s=l.length;a{"use strict";var s=a(6829);var p=a(8179);var l=a(8759);var c=Object.prototype.toString;var d=Object.prototype.hasOwnProperty;var u=65279;var m=9;var h=10;var g=13;var y=32;var v=33;var b=34;var x=35;var w=37;var S=38;var E=39;var _=42;var T=44;var N=45;var P=58;var O=61;var C=62;var R=63;var A=64;var D=91;var k=93;var I=96;var L=123;var M=124;var B=125;var j={};j[0]="\\0";j[7]="\\a";j[8]="\\b";j[9]="\\t";j[10]="\\n";j[11]="\\v";j[12]="\\f";j[13]="\\r";j[27]="\\e";j[34]='\\"';j[92]="\\\\";j[133]="\\N";j[160]="\\_";j[8232]="\\L";j[8233]="\\P";var z=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var q=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(r,i){var a,s,p,l,c,u,m;if(i===null)return{};a={};s=Object.keys(i);for(p=0,l=s.length;p")}if(r.result!==null&&_.kind!==r.kind){throwError(r,"unacceptable node kind for !<"+r.tag+'> tag; it should be "'+_.kind+'", not "'+r.kind+'"')}if(!_.resolve(r.result,r.tag)){throwError(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}else{r.result=_.construct(r.result,r.tag);if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}if(r.listener!==null){r.listener("close",r)}return r.tag!==null||r.anchor!==null||x}function readDocument(r){var i=r.position,a,s,p,l=false,c;r.version=null;r.checkLineBreaks=r.legacy;r.tagMap=Object.create(null);r.anchorMap=Object.create(null);while((c=r.input.charCodeAt(r.position))!==0){skipSeparationSpace(r,true,-1);c=r.input.charCodeAt(r.position);if(r.lineIndent>0||c!==37){break}l=true;c=r.input.charCodeAt(++r.position);a=r.position;while(c!==0&&!is_WS_OR_EOL(c)){c=r.input.charCodeAt(++r.position)}s=r.input.slice(a,r.position);p=[];if(s.length<1){throwError(r,"directive name must not be less than one character in length")}while(c!==0){while(is_WHITE_SPACE(c)){c=r.input.charCodeAt(++r.position)}if(c===35){do{c=r.input.charCodeAt(++r.position)}while(c!==0&&!is_EOL(c));break}if(is_EOL(c))break;a=r.position;while(c!==0&&!is_WS_OR_EOL(c)){c=r.input.charCodeAt(++r.position)}p.push(r.input.slice(a,r.position))}if(c!==0)readLineBreak(r);if(d.call(O,s)){O[s](r,s,p)}else{throwWarning(r,'unknown document directive "'+s+'"')}}skipSeparationSpace(r,true,-1);if(r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45){r.position+=3;skipSeparationSpace(r,true,-1)}else if(l){throwError(r,"directives end mark is expected")}composeNode(r,r.lineIndent-1,g,false,true);skipSeparationSpace(r,true,-1);if(r.checkLineBreaks&&w.test(r.input.slice(i,r.position))){throwWarning(r,"non-ASCII line breaks are interpreted as content")}r.documents.push(r.result);if(r.position===r.lineStart&&testDocumentSeparator(r)){if(r.input.charCodeAt(r.position)===46){r.position+=3;skipSeparationSpace(r,true,-1)}return}if(r.position{"use strict";var s=a(6073);var p=Object.prototype.toString;function resolveYamlPairs(r){if(r===null)return true;var i,a,s,l,c,d=r;c=new Array(d.length);for(i=0,a=d.length;i{"use strict";var s=a(6073);r.exports=new s("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})},9548:(r,i,a)=>{"use strict";var s=a(6073);var p=Object.prototype.hasOwnProperty;function resolveYamlSet(r){if(r===null)return true;var i,a=r;for(i in a){if(p.call(a,i)){if(a[i]!==null)return false}}return true}function constructYamlSet(r){return r!==null?r:{}}r.exports=new s("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},3619:(r,i,a)=>{"use strict";var s=a(6073);r.exports=new s("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})},9212:(r,i,a)=>{"use strict";var s=a(6073);var p=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var l=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(r){if(r===null)return false;if(p.exec(r)!==null)return true;if(l.exec(r)!==null)return true;return false}function constructYamlTimestamp(r){var i,a,s,c,d,u,m,h=0,g=null,y,v,b;i=p.exec(r);if(i===null)i=l.exec(r);if(i===null)throw new Error("Date resolve error");a=+i[1];s=+i[2]-1;c=+i[3];if(!i[4]){return new Date(Date.UTC(a,s,c))}d=+i[4];u=+i[5];m=+i[6];if(i[7]){h=i[7].slice(0,3);while(h.length<3){h+="0"}h=+h}if(i[9]){y=+i[10];v=+(i[11]||0);g=(y*60+v)*6e4;if(i[9]==="-")g=-g}b=new Date(Date.UTC(a,s,c,d,u,m,h));if(g)b.setTime(b.getTime()-g);return b}function representYamlTimestamp(r){return r.toISOString()}r.exports=new s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},4329:r=>{"use strict";function e(r){this.message=r}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var i=String(r).replace(/=+$/,"");if(i.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var a,s,p=0,l=0,c="";s=i.charAt(l++);~s&&(a=p%4?64*a+s:s,p++%4)?c+=String.fromCharCode(255&a>>(-2*p&6)):0)s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(s);return c};function t(r){var a=r.replace(/-/g,"+").replace(/_/g,"/");switch(a.length%4){case 0:break;case 2:a+="==";break;case 3:a+="=";break;default:throw"Illegal base64url string!"}try{return function(r){return decodeURIComponent(i(r).replace(/(.)/g,(function(r,i){var a=i.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a})))}(a)}catch(r){return i(a)}}function n(r){this.message=r}function o(r,i){if("string"!=typeof r)throw new n("Invalid token specified");var a=!0===(i=i||{}).header?0:1;try{return JSON.parse(t(r.split(".")[a]))}catch(r){throw new n("Invalid token specified: "+r.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";const a=o;a.default=o,a.InvalidTokenError=n,r.exports=a},7426:(r,i,a)=>{
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
@@ -17,7 +17,7 @@ r.exports=a(3765)},3583:(r,i,a)=>{"use strict";
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
- */var s=a(7426);var p=a(1017).extname;var l=/^\s*([^;\s]*)(?:;|\s|$)/;var c=/^text\//i;i.charset=charset;i.charsets={lookup:charset};i.contentType=contentType;i.extension=extension;i.extensions=Object.create(null);i.lookup=lookup;i.types=Object.create(null);populateMaps(i.extensions,i.types);function charset(r){if(!r||typeof r!=="string"){return false}var i=l.exec(r);var a=i&&s[i[1].toLowerCase()];if(a&&a.charset){return a.charset}if(i&&c.test(i[1])){return"UTF-8"}return false}function contentType(r){if(!r||typeof r!=="string"){return false}var a=r.indexOf("/")===-1?i.lookup(r):r;if(!a){return false}if(a.indexOf("charset")===-1){var s=i.charset(a);if(s)a+="; charset="+s.toLowerCase()}return a}function extension(r){if(!r||typeof r!=="string"){return false}var a=l.exec(r);var s=a&&i.extensions[a[1].toLowerCase()];if(!s||!s.length){return false}return s[0]}function lookup(r){if(!r||typeof r!=="string"){return false}var a=p("x."+r).toLowerCase().substr(1);if(!a){return false}return i.types[a]||false}function populateMaps(r,i){var a=["nginx","apache",undefined,"iana"];Object.keys(s).forEach((function forEachMimeType(p){var l=s[p];var c=l.extensions;if(!c||!c.length){return}r[p]=c;for(var d=0;d"||isWhitespace(r)}function isMatch(r,i){return r.test(i)}function notMatch(r,i){return!isMatch(r,i)}var b=0;r.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++};r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(r.ENTITIES).forEach((function(i){var a=r.ENTITIES[i];var s=typeof a==="number"?String.fromCharCode(a):a;r.ENTITIES[i]=s}));for(var x in r.STATE){r.STATE[r.STATE[x]]=x}b=r.STATE;function emit(r,i,a){r[i]&&r[i](a)}function emitNode(r,i,a){if(r.textNode)closeText(r);emit(r,i,a)}function closeText(r){r.textNode=textopts(r.opt,r.textNode);if(r.textNode)emit(r,"ontext",r.textNode);r.textNode=""}function textopts(r,i){if(r.trim)i=i.trim();if(r.normalize)i=i.replace(/\s+/g," ");return i}function error(r,i){closeText(r);if(r.trackPosition){i+="\nLine: "+r.line+"\nColumn: "+r.column+"\nChar: "+r.c}i=new Error(i);r.error=i;emit(r,"onerror",i);return r}function end(r){if(r.sawRoot&&!r.closedRoot)strictFail(r,"Unclosed root tag");if(r.state!==b.BEGIN&&r.state!==b.BEGIN_WHITESPACE&&r.state!==b.TEXT){error(r,"Unexpected end")}closeText(r);r.c="";r.closed=true;emit(r,"onend");SAXParser.call(r,r.strict,r.opt);return r}function strictFail(r,i){if(typeof r!=="object"||!(r instanceof SAXParser)){throw new Error("bad call to strictFail")}if(r.strict){error(r,i)}}function newTag(r){if(!r.strict)r.tagName=r.tagName[r.looseCase]();var i=r.tags[r.tags.length-1]||r;var a=r.tag={name:r.tagName,attributes:{}};if(r.opt.xmlns){a.ns=i.ns}r.attribList.length=0;emitNode(r,"onopentagstart",a)}function qname(r,i){var a=r.indexOf(":");var s=a<0?["",r]:r.split(":");var p=s[0];var l=s[1];if(i&&r==="xmlns"){p="xmlns";l=""}return{prefix:p,local:l}}function attrib(r){if(!r.strict){r.attribName=r.attribName[r.looseCase]()}if(r.attribList.indexOf(r.attribName)!==-1||r.tag.attributes.hasOwnProperty(r.attribName)){r.attribName=r.attribValue="";return}if(r.opt.xmlns){var i=qname(r.attribName,true);var a=i.prefix;var s=i.local;if(a==="xmlns"){if(s==="xml"&&r.attribValue!==d){strictFail(r,"xml: prefix must be bound to "+d+"\n"+"Actual: "+r.attribValue)}else if(s==="xmlns"&&r.attribValue!==u){strictFail(r,"xmlns: prefix must be bound to "+u+"\n"+"Actual: "+r.attribValue)}else{var p=r.tag;var l=r.tags[r.tags.length-1]||r;if(p.ns===l.ns){p.ns=Object.create(l.ns)}p.ns[s]=r.attribValue}}r.attribList.push([r.attribName,r.attribValue])}else{r.tag.attributes[r.attribName]=r.attribValue;emitNode(r,"onattribute",{name:r.attribName,value:r.attribValue})}r.attribName=r.attribValue=""}function openTag(r,i){if(r.opt.xmlns){var a=r.tag;var s=qname(r.tagName);a.prefix=s.prefix;a.local=s.local;a.uri=a.ns[s.prefix]||"";if(a.prefix&&!a.uri){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(r.tagName));a.uri=s.prefix}var p=r.tags[r.tags.length-1]||r;if(a.ns&&p.ns!==a.ns){Object.keys(a.ns).forEach((function(i){emitNode(r,"onopennamespace",{prefix:i,uri:a.ns[i]})}))}for(var l=0,c=r.attribList.length;l=0;c--){l=r[c];if(l)break}for(c=0;c
"||isWhitespace(r)}function isMatch(r,i){return r.test(i)}function notMatch(r,i){return!isMatch(r,i)}var b=0;r.STATE={BEGIN:b++,BEGIN_WHITESPACE:b++,TEXT:b++,TEXT_ENTITY:b++,OPEN_WAKA:b++,SGML_DECL:b++,SGML_DECL_QUOTED:b++,DOCTYPE:b++,DOCTYPE_QUOTED:b++,DOCTYPE_DTD:b++,DOCTYPE_DTD_QUOTED:b++,COMMENT_STARTING:b++,COMMENT:b++,COMMENT_ENDING:b++,COMMENT_ENDED:b++,CDATA:b++,CDATA_ENDING:b++,CDATA_ENDING_2:b++,PROC_INST:b++,PROC_INST_BODY:b++,PROC_INST_ENDING:b++,OPEN_TAG:b++,OPEN_TAG_SLASH:b++,ATTRIB:b++,ATTRIB_NAME:b++,ATTRIB_NAME_SAW_WHITE:b++,ATTRIB_VALUE:b++,ATTRIB_VALUE_QUOTED:b++,ATTRIB_VALUE_CLOSED:b++,ATTRIB_VALUE_UNQUOTED:b++,ATTRIB_VALUE_ENTITY_Q:b++,ATTRIB_VALUE_ENTITY_U:b++,CLOSE_TAG:b++,CLOSE_TAG_SAW_WHITE:b++,SCRIPT:b++,SCRIPT_ENDING:b++};r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(r.ENTITIES).forEach((function(i){var a=r.ENTITIES[i];var s=typeof a==="number"?String.fromCharCode(a):a;r.ENTITIES[i]=s}));for(var x in r.STATE){r.STATE[r.STATE[x]]=x}b=r.STATE;function emit(r,i,a){r[i]&&r[i](a)}function emitNode(r,i,a){if(r.textNode)closeText(r);emit(r,i,a)}function closeText(r){r.textNode=textopts(r.opt,r.textNode);if(r.textNode)emit(r,"ontext",r.textNode);r.textNode=""}function textopts(r,i){if(r.trim)i=i.trim();if(r.normalize)i=i.replace(/\s+/g," ");return i}function error(r,i){closeText(r);if(r.trackPosition){i+="\nLine: "+r.line+"\nColumn: "+r.column+"\nChar: "+r.c}i=new Error(i);r.error=i;emit(r,"onerror",i);return r}function end(r){if(r.sawRoot&&!r.closedRoot)strictFail(r,"Unclosed root tag");if(r.state!==b.BEGIN&&r.state!==b.BEGIN_WHITESPACE&&r.state!==b.TEXT){error(r,"Unexpected end")}closeText(r);r.c="";r.closed=true;emit(r,"onend");SAXParser.call(r,r.strict,r.opt);return r}function strictFail(r,i){if(typeof r!=="object"||!(r instanceof SAXParser)){throw new Error("bad call to strictFail")}if(r.strict){error(r,i)}}function newTag(r){if(!r.strict)r.tagName=r.tagName[r.looseCase]();var i=r.tags[r.tags.length-1]||r;var a=r.tag={name:r.tagName,attributes:{}};if(r.opt.xmlns){a.ns=i.ns}r.attribList.length=0;emitNode(r,"onopentagstart",a)}function qname(r,i){var a=r.indexOf(":");var s=a<0?["",r]:r.split(":");var p=s[0];var l=s[1];if(i&&r==="xmlns"){p="xmlns";l=""}return{prefix:p,local:l}}function attrib(r){if(!r.strict){r.attribName=r.attribName[r.looseCase]()}if(r.attribList.indexOf(r.attribName)!==-1||r.tag.attributes.hasOwnProperty(r.attribName)){r.attribName=r.attribValue="";return}if(r.opt.xmlns){var i=qname(r.attribName,true);var a=i.prefix;var s=i.local;if(a==="xmlns"){if(s==="xml"&&r.attribValue!==d){strictFail(r,"xml: prefix must be bound to "+d+"\n"+"Actual: "+r.attribValue)}else if(s==="xmlns"&&r.attribValue!==u){strictFail(r,"xmlns: prefix must be bound to "+u+"\n"+"Actual: "+r.attribValue)}else{var p=r.tag;var l=r.tags[r.tags.length-1]||r;if(p.ns===l.ns){p.ns=Object.create(l.ns)}p.ns[s]=r.attribValue}}r.attribList.push([r.attribName,r.attribValue])}else{r.tag.attributes[r.attribName]=r.attribValue;emitNode(r,"onattribute",{name:r.attribName,value:r.attribValue})}r.attribName=r.attribValue=""}function openTag(r,i){if(r.opt.xmlns){var a=r.tag;var s=qname(r.tagName);a.prefix=s.prefix;a.local=s.local;a.uri=a.ns[s.prefix]||"";if(a.prefix&&!a.uri){strictFail(r,"Unbound namespace prefix: "+JSON.stringify(r.tagName));a.uri=s.prefix}var p=r.tags[r.tags.length-1]||r;if(a.ns&&p.ns!==a.ns){Object.keys(a.ns).forEach((function(i){emitNode(r,"onopennamespace",{prefix:i,uri:a.ns[i]})}))}for(var l=0,c=r.attribList.length;l=0;d--)if(c=r[d])l=(p<3?c(l):p>3?c(i,a,l):c(i,a))||l;return p>3&&l&&Object.defineProperty(i,a,l),l};l=function(r,i){return function(a,s){i(a,s,r)}};c=function(r,i,a,s,p,l){function accept(r){if(r!==void 0&&typeof r!=="function")throw new TypeError("Function expected");return r}var c=s.kind,d=c==="getter"?"get":c==="setter"?"set":"value";var u=!i&&r?s["static"]?r:r.prototype:null;var m=i||(u?Object.getOwnPropertyDescriptor(u,s.name):{});var h,g=false;for(var y=a.length-1;y>=0;y--){var v={};for(var b in s)v[b]=b==="access"?{}:s[b];for(var b in s.access)v.access[b]=s.access[b];v.addInitializer=function(r){if(g)throw new TypeError("Cannot add initializers after decoration has completed");l.push(accept(r||null))};var x=(0,a[y])(c==="accessor"?{get:m.get,set:m.set}:m[d],v);if(c==="accessor"){if(x===void 0)continue;if(x===null||typeof x!=="object")throw new TypeError("Object expected");if(h=accept(x.get))m.get=h;if(h=accept(x.set))m.set=h;if(h=accept(x.init))p.unshift(h)}else if(h=accept(x)){if(c==="field")p.unshift(h);else m[d]=h}}if(u)Object.defineProperty(u,s.name,m);g=true};d=function(r,i,a){var s=arguments.length>2;for(var p=0;p