3
0
Fork 0
mirror of https://gitea.com/docker/metadata-action.git synced 2024-11-22 20:19:33 +01:00
docker-metadata/dist/index.js

90 lines
3.2 MiB
JavaScript
Raw Normal View History

require('./sourcemap-register.js');(()=>{var t={27799:function(t,r,o){"use strict";var a=this&&this.__createBinding||(Object.create?function(t,r,o,a){if(a===undefined)a=o;var i=Object.getOwnPropertyDescriptor(r,o);if(!i||("get"in i?!r.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return r[o]}}}Object.defineProperty(t,a,i)}:function(t,r,o,a){if(a===undefined)a=o;t[a]=r[o]});var i=this&&this.__setModuleDefault||(Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:true,value:r})}:function(t,r){t["default"]=r});var p=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o))a(r,t,o);i(r,t);return r};var c=this&&this.__awaiter||function(t,r,o,a){function adopt(t){return t instanceof o?t:new o((function(r){r(t)}))}return new(o||(o=Promise))((function(o,i){function fulfilled(t){try{step(a.next(t))}catch(t){i(t)}}function rejected(t){try{step(a["throw"](t))}catch(t){i(t)}}function step(t){t.done?o(t.value):adopt(t.value).then(fulfilled,rejected)}step((a=a.apply(t,r||[])).next())}))};Object.defineProperty(r,"__esModule",{value:true});r.saveCache=r.restoreCache=r.isFeatureAvailable=r.ReserveCacheError=r.ValidationError=void 0;const d=p(o(42186));const A=p(o(71017));const l=p(o(91518));const u=p(o(98245));const b=o(56490);class ValidationError extends Error{constructor(t){super(t);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}r.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(t){super(t);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}r.ReserveCacheError=ReserveCacheError;function checkPaths(t){if(!t||t.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(t){if(t.length>512){throw new ValidationError(`Key Validation Error: ${t} cannot be larger than 512 characters.`)}const r=/^[^,]*$/;if(!r.test(t)){throw new ValidationError(`Key Validation Error: ${t} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}r.isFeatureAvailable=isFeatureAvailable;function restoreCache(t,r,o,a,i=false){return c(this,void 0,void 0,(function*(){checkPaths(t);o=o||[];const p=[r,...o];d.debug("Resolved Keys:");d.debug(JSON.stringify(p));if(p.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const t of p){checkKey(t)}const c=yield l.getCompressionMethod();let M="";try{const r=yield u.getCacheEntry(p,t,{compressionMethod:c,enableCrossOsArchive:i});if(!(r===null||r===void 0?void 0:r.archiveLocation)){return undefined}if(a===null||a===void 0?void 0:a.lookupOnly){d.info("Lookup only - skipping download");return r.cacheKey}M=A.join(yield l.createTempDirectory(),l.getCacheFileName(c));d.debug(`Archive Path: ${M}`);yield u.downloadCache(r.archiveLocation,M,a);if(d.isDebug()){yield(0,b.listTar)(M,c)}const o=l.getArchiveFileSizeInBytes(M);d.info(`Cache Size: ~${Math.round(o/(1024*1024))} MB (${o} B)`);yield(0,b.extractTar)(M,c);d.info("Cache restored successfully");return r.cacheKey}catch(t){const r=t;if(r.name===ValidationError.name){throw t}else{d.warning(`Failed to restore: ${t.message}`)}}finally{try{yield l.unlinkFile(M)}catch(t){d.debug(`Failed to delete archive: ${t}`)}}return undefined}))}r.restoreCache=restoreCache;function saveCache(t,r,o,a=false){var i,p,M,m,z;return c(this,void 0,void 0,(function*(){checkPaths(t);checkKey(r);const c=yield l.getCompressionMethod();let O=-1;const h=yield l.resolvePaths(t);d.debug("Cache Paths:");d.debug(`${JSON.stringify(h)}`);if(h.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 g=yield l.createTempDirectory();const E=A.join(g,l.getCacheFileName(c));d.debug(`Archive Path: ${E}`);try{yield(0,b.createTar)(g,h,c);if(d.isDebug()){yield(0,b.listTar)(E,c)}const A=10*1024*1024*1024;const q=l.getArc
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function isObject(t){return Object.prototype.toString.call(t)==="[object Object]"}function isPlainObject(t){var r,o;if(isObject(t)===false)return false;r=t.constructor;if(r===undefined)return true;o=r.prototype;if(isObject(o)===false)return false;if(o.hasOwnProperty("isPrototypeOf")===false){return false}return true}r.isPlainObject=isPlainObject},47426:(t,r,o)=>{
/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/
t.exports=o(53765)},43583:(t,r,o)=>{"use strict";
/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var a=o(47426);var i=o(71017).extname;var p=/^\s*([^;\s]*)(?:;|\s|$)/;var c=/^text\//i;r.charset=charset;r.charsets={lookup:charset};r.contentType=contentType;r.extension=extension;r.extensions=Object.create(null);r.lookup=lookup;r.types=Object.create(null);populateMaps(r.extensions,r.types);function charset(t){if(!t||typeof t!=="string"){return false}var r=p.exec(t);var o=r&&a[r[1].toLowerCase()];if(o&&o.charset){return o.charset}if(r&&c.test(r[1])){return"UTF-8"}return false}function contentType(t){if(!t||typeof t!=="string"){return false}var o=t.indexOf("/")===-1?r.lookup(t):t;if(!o){return false}if(o.indexOf("charset")===-1){var a=r.charset(o);if(a)o+="; charset="+a.toLowerCase()}return o}function extension(t){if(!t||typeof t!=="string"){return false}var o=p.exec(t);var a=o&&r.extensions[o[1].toLowerCase()];if(!a||!a.length){return false}return a[0]}function lookup(t){if(!t||typeof t!=="string"){return false}var o=i("x."+t).toLowerCase().substr(1);if(!o){return false}return r.types[o]||false}function populateMaps(t,r){var o=["nginx","apache",undefined,"iana"];Object.keys(a).forEach((function forEachMimeType(i){var p=a[i];var c=p.extensions;if(!c||!c.length){return}t[i]=c;for(var d=0;d<c.length;d++){var A=c[d];if(r[A]){var l=o.indexOf(a[r[A]].source);var u=o.indexOf(p.source);if(r[A]!=="application/octet-stream"&&(l>u||l===u&&r[A].substr(0,12)==="application/")){continue}}r[A]=i}}))}},83973:(t,r,o)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var a=function(){try{return o(71017)}catch(t){}}()||{sep:"/"};minimatch.sep=a.sep;var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var p=o(33717);var c={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var d="[^/]";var A=d+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var u="(?:(?!(?:\\/|^)\\.).)*?";var b=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce((function(t,r){t[r]=true;return t}),{})}var M=/\/+/;minimatch.filter=filter;function filter(t,r){r=r||{};return function(o,a,i){return minimatch(o,t,r)}}function ext(t,r){r=r||{};var o={};Object.keys(t).forEach((function(r){o[r]=t[r]}));Object.keys(r).forEach((function(t){o[t]=r[t]}));return o}minimatch.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}var r=minimatch;var o=function minimatch(o,a,i){return r(o,a,ext(t,i))};o.Minimatch=function Minimatch(o,a){return new r.Minimatch(o,ext(t,a))};o.Minimatch.defaults=function defaults(o){return r.defaults(ext(t,o)).Minimatch};o.filter=function filter(o,a){return r.filter(o,ext(t,a))};o.defaults=function defaults(o){return r.defaults(ext(t,o))};o.makeRe=function makeRe(o,a){return r.makeRe(o,ext(t,a))};o.braceExpand=function braceExpand(o,a){return r.braceExpand(o,ext(t,a))};o.match=function(o,a,i){return r.match(o,a,ext(t,i))};return o};Minimatch.defaults=function(t){return minimatch.defaults(t).Minimatch};function minimatch(t,r,o){assertValidPattern(r);if(!o)o={};if(!o.nocomment&&r.charAt(0)==="#"){return false}return new Minimatch(r,o).match(t)}function Minimatch(t,r){if(!(this instanceof Minimatch)){return new Minimatch(t,r)}assertValidPattern(t);if(!r)r={};t=t.trim();if(!r.allowWindowsEscape&&a.sep!=="/"){t=t.split(a.sep).join("/")}this.options=r;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!r.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var t=this.pattern;var r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var o=this.globSet=this.braceExpand();if(r.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,o);o=this.globParts=o.map((function(t){return t.split(M)}));this.debug(this.pattern,o);o=o.map((function(t,r,o){return t.map(this.parse,this)}),this);this.debug(this.pattern,o);o=o.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,o
//! moment-timezone.js
//! version : 0.5.45
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
(function(r,a){"use strict";if(true&&t.exports){t.exports=a(o(99623))}else if(typeof define==="function"&&define.amd){define(["moment"],a)}else{a(r.moment)}})(this,(function(t){"use strict";if(t.version===undefined&&t.default){t=t.default}var r="0.5.45",o={},a={},i={},p={},c={},d;if(!t||typeof t.version!=="string"){logError("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/")}var A=t.version.split("."),l=+A[0],u=+A[1];if(l<2||l===2&&u<6){logError("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+t.version+". See momentjs.com")}function charCodeToInt(t){if(t>96){return t-87}else if(t>64){return t-29}return t-48}function unpackBase60(t){var r=0,o=t.split("."),a=o[0],i=o[1]||"",p=1,c,d=0,A=1;if(t.charCodeAt(0)===45){r=1;A=-1}for(r;r<a.length;r++){c=charCodeToInt(a.charCodeAt(r));d=60*d+c}for(r=0;r<i.length;r++){p=p/60;c=charCodeToInt(i.charCodeAt(r));d+=c*p}return d*A}function arrayToInt(t){for(var r=0;r<t.length;r++){t[r]=unpackBase60(t[r])}}function intToUntil(t,r){for(var o=0;o<r;o++){t[o]=Math.round((t[o-1]||0)+t[o]*6e4)}t[r-1]=Infinity}function mapIndices(t,r){var o=[],a;for(a=0;a<r.length;a++){o[a]=t[r[a]]}return o}function unpack(t){var r=t.split("|"),o=r[2].split(" "),a=r[3].split(""),i=r[4].split(" ");arrayToInt(o);arrayToInt(a);arrayToInt(i);intToUntil(i,a.length);return{name:r[0],abbrs:mapIndices(r[1].split(" "),a),offsets:mapIndices(o,a),untils:i,population:r[5]|0}}function Zone(t){if(t){this._set(unpack(t))}}function closest(t,r){var o=r.length;if(t<r[0]){return 0}else if(o>1&&r[o-1]===Infinity&&t>=r[o-2]){return o-1}else if(t>=r[o-1]){return-1}var a;var i=0;var p=o-1;while(p-i>1){a=Math.floor((i+p)/2);if(r[a]<=t){i=a}else{p=a}}return p}Zone.prototype={_set:function(t){this.name=t.name;this.abbrs=t.abbrs;this.untils=t.untils;this.offsets=t.offsets;this.population=t.population},_index:function(t){var r=+t,o=this.untils,a;a=closest(r,o);if(a>=0){return a}},countries:function(){var t=this.name;return Object.keys(i).filter((function(r){return i[r].zones.indexOf(t)!==-1}))},parse:function(t){var r=+t,o=this.offsets,a=this.untils,i=a.length-1,p,c,d,A;for(A=0;A<i;A++){p=o[A];c=o[A+1];d=o[A?A-1:A];if(p<c&&tz.moveAmbiguousForward){p=c}else if(p>d&&tz.moveInvalidForward){p=d}if(r<a[A]-p*6e4){return o[A]}}return o[i]},abbr:function(t){return this.abbrs[this._index(t)]},offset:function(t){logError("zone.offset has been deprecated in favor of zone.utcOffset");return this.offsets[this._index(t)]},utcOffset:function(t){return this.offsets[this._index(t)]}};function Country(t,r){this.name=t;this.zones=r}function OffsetAt(t){var r=t.toTimeString();var o=r.match(/\([a-z ]+\)/i);if(o&&o[0]){o=o[0].match(/[A-Z]/g);o=o?o.join(""):undefined}else{o=r.match(/[A-Z]{3,5}/g);o=o?o[0]:undefined}if(o==="GMT"){o=undefined}this.at=+t;this.abbr=o;this.offset=t.getTimezoneOffset()}function ZoneScore(t){this.zone=t;this.offsetScore=0;this.abbrScore=0}ZoneScore.prototype.scoreOffsetAt=function(t){this.offsetScore+=Math.abs(this.zone.utcOffset(t.at)-t.offset);if(this.zone.abbr(t.at).replace(/[^A-Z]/g,"")!==t.abbr){this.abbrScore++}};function findChange(t,r){var o,a;while(a=((r.at-t.at)/12e4|0)*6e4){o=new OffsetAt(new Date(t.at+a));if(o.offset===t.offset){t=o}else{r=o}}return t}function userOffsets(){var t=(new Date).getFullYear()-2,r=new OffsetAt(new Date(t,0,1)),o=r.offset,a=[r],i,p,c,d;for(d=1;d<48;d++){c=new Date(t,d,1).getTimezoneOffset();if(c!==o){p=new OffsetAt(new Date(t,d,1));i=findChange(r,p);a.push(i);a.push(new OffsetAt(new Date(i.at+6e4)));r=p;o=c}}for(d=0;d<4;d++){a.push(new OffsetAt(new Date(t+d,0,1)));a.push(new OffsetAt(new Date(t+d,6,1)))}return a}function sortZoneScores(t,r){if(t.offsetScore!==r.offsetScore){return t.offsetScore-r.offsetScore}if(t.abbrScore!==r.abbrScore){return t.abbrScore-r.abbrScore}if(t.zone.population!==r.zone.population){return r.zone.population-t.zone.population}return r.zone.name.localeCompare(t.zone.name)}function addToGuesses(t,r){var o,a;arrayToInt(r);for(o=0;o<r.length;o++){a=r[o];c[a]=c[a]||{};c[a][t]=true}}function guessesForUserOffs
//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(r,o){true?t.exports=o():0})(this,(function(){"use strict";var r;function hooks(){return r.apply(null,arguments)}function setHookCallback(t){r=t}function isArray(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function isObject(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function hasOwnProp(t,r){return Object.prototype.hasOwnProperty.call(t,r)}function isObjectEmpty(t){if(Object.getOwnPropertyNames){return Object.getOwnPropertyNames(t).length===0}else{var r;for(r in t){if(hasOwnProp(t,r)){return false}}return true}}function isUndefined(t){return t===void 0}function isNumber(t){return typeof t==="number"||Object.prototype.toString.call(t)==="[object Number]"}function isDate(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function map(t,r){var o=[],a,i=t.length;for(a=0;a<i;++a){o.push(r(t[a],a))}return o}function extend(t,r){for(var o in r){if(hasOwnProp(r,o)){t[o]=r[o]}}if(hasOwnProp(r,"toString")){t.toString=r.toString}if(hasOwnProp(r,"valueOf")){t.valueOf=r.valueOf}return t}function createUTC(t,r,o,a){return createLocalOrUTC(t,r,o,a,true).utc()}function defaultParsingFlags(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidEra:null,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],era:null,meridiem:null,rfc2822:false,weekdayMismatch:false}}function getParsingFlags(t){if(t._pf==null){t._pf=defaultParsingFlags()}return t._pf}var o;if(Array.prototype.some){o=Array.prototype.some}else{o=function(t){var r=Object(this),o=r.length>>>0,a;for(a=0;a<o;a++){if(a in r&&t.call(this,r[a],a,r)){return true}}return false}}function isValid(t){var r=null,a=false,i=t._d&&!isNaN(t._d.getTime());if(i){r=getParsingFlags(t);a=o.call(r.parsedDateParts,(function(t){return t!=null}));i=r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&a);if(t._strict){i=i&&r.charsLeftOver===0&&r.unusedTokens.length===0&&r.bigHour===undefined}}if(Object.isFrozen==null||!Object.isFrozen(t)){t._isValid=i}else{return i}return t._isValid}function createInvalid(t){var r=createUTC(NaN);if(t!=null){extend(getParsingFlags(r),t)}else{getParsingFlags(r).userInvalidated=true}return r}var a=hooks.momentProperties=[],i=false;function copyConfig(t,r){var o,i,p,c=a.length;if(!isUndefined(r._isAMomentObject)){t._isAMomentObject=r._isAMomentObject}if(!isUndefined(r._i)){t._i=r._i}if(!isUndefined(r._f)){t._f=r._f}if(!isUndefined(r._l)){t._l=r._l}if(!isUndefined(r._strict)){t._strict=r._strict}if(!isUndefined(r._tzm)){t._tzm=r._tzm}if(!isUndefined(r._isUTC)){t._isUTC=r._isUTC}if(!isUndefined(r._offset)){t._offset=r._offset}if(!isUndefined(r._pf)){t._pf=getParsingFlags(r)}if(!isUndefined(r._locale)){t._locale=r._locale}if(c>0){for(o=0;o<c;o++){i=a[o];p=r[i];if(!isUndefined(p)){t[i]=p}}}return t}function Moment(t){copyConfig(this,t);this._d=new Date(t._d!=null?t._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(i===false){i=true;hooks.updateOffset(this);i=false}}function isMoment(t){return t instanceof Moment||t!=null&&t._isAMomentObject!=null}function warn(t){if(hooks.suppressDeprecationWarnings===false&&typeof console!=="undefined"&&console.warn){console.warn("Deprecation warning: "+t)}}function deprecate(t,r){var o=true;return extend((function(){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(null,t)}if(o){var a=[],i,p,c,d=arguments.length;for(p=0;p<d;p++){i="";if(typeof arguments[p]==="object"){i+="\n["+p+"] ";for(c in arguments[0]){if(hasOwnProp(arguments[0],c)){i+=c+": "+arguments[0][c]+", "}}i=i.slice(0,-2)}else{i=arguments[p]}a.push(i)}warn(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack);o=false}return r.apply(this,arguments)}),r)}var p={};function deprecateSimple(t,r){if(hooks.deprecationHandler!=null){hooks.deprecationHandler(t,r)}if(!p[t]){warn(r);p[t]=true}}hooks.suppressDeprecationWarnings=false;hoo
//! moment.js
hooks.version="2.30.1";setHookCallback(createLocal);hooks.fn=Ye;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=Ye;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};return hooks}))},80467:(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(t){return t&&typeof t==="object"&&"default"in t?t["default"]:t}var a=_interopDefault(o(12781));var i=_interopDefault(o(13685));var p=_interopDefault(o(57310));var c=_interopDefault(o(28665));var d=_interopDefault(o(95687));var A=_interopDefault(o(59796));const l=a.Readable;const u=Symbol("buffer");const b=Symbol("type");class Blob{constructor(){this[b]="";const t=arguments[0];const r=arguments[1];const o=[];let a=0;if(t){const r=t;const i=Number(r.length);for(let t=0;t<i;t++){const i=r[t];let p;if(i instanceof Buffer){p=i}else if(ArrayBuffer.isView(i)){p=Buffer.from(i.buffer,i.byteOffset,i.byteLength)}else if(i instanceof ArrayBuffer){p=Buffer.from(i)}else if(i instanceof Blob){p=i[u]}else{p=Buffer.from(typeof i==="string"?i:String(i))}a+=p.length;o.push(p)}}this[u]=Buffer.concat(o);let i=r&&r.type!==undefined&&String(r.type).toLowerCase();if(i&&!/[^\u0020-\u007E]/.test(i)){this[b]=i}}get size(){return this[u].length}get type(){return this[b]}text(){return Promise.resolve(this[u].toString())}arrayBuffer(){const t=this[u];const r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(r)}stream(){const t=new l;t._read=function(){};t.push(this[u]);t.push(null);return t}toString(){return"[object Blob]"}slice(){const t=this.size;const r=arguments[0];const o=arguments[1];let a,i;if(r===undefined){a=0}else if(r<0){a=Math.max(t+r,0)}else{a=Math.min(r,t)}if(o===undefined){i=t}else if(o<0){i=Math.max(t+o,0)}else{i=Math.min(o,t)}const p=Math.max(i-a,0);const c=this[u];const d=c.slice(a,a+p);const A=new Blob([],{type:arguments[2]});A[u]=d;return A}}Object.defineProperties(Blob.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});Object.defineProperty(Blob.prototype,Symbol.toStringTag,{value:"Blob",writable:false,enumerable:false,configurable:true});function FetchError(t,r,o){Error.call(this,t);this.message=t;this.type=r;if(o){this.code=this.errno=o.code}Error.captureStackTrace(this,this.constructor)}FetchError.prototype=Object.create(Error.prototype);FetchError.prototype.constructor=FetchError;FetchError.prototype.name="FetchError";let M;try{M=o(28685).O}catch(t){}const m=Symbol("Body internals");const z=a.PassThrough;function Body(t){var r=this;var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=o.size;let p=i===undefined?0:i;var c=o.timeout;let d=c===undefined?0:c;if(t==null){t=null}else if(isURLSearchParams(t)){t=Buffer.from(t.toString())}else if(isBlob(t));else if(Buffer.isBuffer(t));else if(Object.prototype.toString.call(t)==="[object ArrayBuffer]"){t=Buffer.from(t)}else if(ArrayBuffer.isView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(t instanceof a);else{t=Buffer.from(String(t))}this[m]={body:t,disturbed:false,error:null};this.size=p;this.timeout=d;if(t instanceof a){t.on("error",(function(t){const o=t.name==="AbortError"?t:new FetchError(`Invalid response body while t
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var t=String.fromCharCode;var r=Math.floor;var fromCodePoint=function(){var o=16384;var a=[];var i;var p;var c=-1;var d=arguments.length;if(!d){return""}var A="";while(++c<d){var l=Number(arguments[c]);if(!isFinite(l)||l<0||l>1114111||r(l)!==l){throw RangeError("Invalid code point: "+l)}if(l<=65535){a.push(l)}else{l-=65536;i=(l>>10)+55296;p=l%1024+56320;a.push(i,p)}if(c+1===d||a.length>o){A+=t.apply(null,a);a.length=0}}return A};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:r)},91532:(t,r,o)=>{const a=Symbol("SemVer ANY");class Comparator{static get ANY(){return a}constructor(t,r){r=i(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");A("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===a){this.value=""}else{this.value=this.operator+this.semver.version}A("comp",this)}parse(t){const r=this.options.loose?p[c.COMPARATORLOOSE]:p[c.COMPARATOR];const o=t.match(r);if(!o){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=o[1]!==undefined?o[1]:"";if(this.operator==="="){this.operator=""}if(!o[2]){this.semver=a}else{this.semver=new l(o[2],this.options.loose)}}toString(){return this.value}test(t){A("Comparator.test",t,this.options.loose);if(this.semver===a||t===a){return true}if(typeof t==="string"){try{t=new l(t,this.options)}catch(t){return false}}return d(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new u(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new u(this.value,r).test(t.semver)}r=i(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(d(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(d(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const i=o(40785);const{safeRe:p,t:c}=o(9523);const d=o(75098);const A=o(50427);const l=o(48088);const u=o(9828)},9828:(t,r,o)=>{class Range{constructor(t,r){r=p(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof c){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&z)|(this.options.loose&&O);const o=r+":"+t;const a=i.get(o);if(a){return a}const p=this.options.loose;const A=p?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];t=t.replace(A,hyphenReplace(this.options.includePrerelease));d("hyphen replace",t);t=t.replace(l[u.COMPARATORTRIM],b);d("comparator trim",t);t=t.replace(l[u.TILDETRIM],M);d("tilde trim",t);t=t.replace(l[u.CARETTRIM],m);d("care
/*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/
const a=o(57147);const i=o(22037);const p=o(71017);const c=o(6113);const d={fs:a.constants,os:i.constants};const A="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,u=3,b=(d.O_CREAT||d.fs.O_CREAT)|(d.O_EXCL||d.fs.O_EXCL)|(d.O_RDWR||d.fs.O_RDWR),M=i.platform()==="win32",m=d.EBADF||d.os.errno.EBADF,z=d.ENOENT||d.os.errno.ENOENT,O=448,h=384,g="exit",E=[],q=a.rmdirSync.bind(a);let y=false;function rimraf(t,r){return a.rm(t,{recursive:true},r)}function FN_RIMRAF_SYNC(t){return a.rmSync(t,{recursive:true})}function tmpName(t,r){const o=_parseArguments(t,r),i=o[0],p=o[1];try{_assertAndSanitizeOptions(i)}catch(t){return p(t)}let c=i.tries;(function _getUniqueName(){try{const t=_generateTmpName(i);a.stat(t,(function(r){if(!r){if(c-- >0)return _getUniqueName();return p(new Error("Could not get a unique tmp filename, max tries reached "+t))}p(null,t)}))}catch(t){p(t)}})()}function tmpNameSync(t){const r=_parseArguments(t),o=r[0];_assertAndSanitizeOptions(o);let i=o.tries;do{const t=_generateTmpName(o);try{a.statSync(t)}catch(r){return t}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(t,r){const o=_parseArguments(t,r),i=o[0],p=o[1];tmpName(i,(function _tmpNameCreated(t,r){if(t)return p(t);a.open(r,b,i.mode||h,(function _fileCreated(t,o){if(t)return p(t);if(i.discardDescriptor){return a.close(o,(function _discardCallback(t){return p(t,r,undefined,_prepareTmpFileRemoveCallback(r,-1,i,false))}))}else{const t=i.discardDescriptor||i.detachDescriptor;p(null,r,o,_prepareTmpFileRemoveCallback(r,t?-1:o,i,false))}}))}))}function fileSync(t){const r=_parseArguments(t),o=r[0];const i=o.discardDescriptor||o.detachDescriptor;const p=tmpNameSync(o);var c=a.openSync(p,b,o.mode||h);if(o.discardDescriptor){a.closeSync(c);c=undefined}return{name:p,fd:c,removeCallback:_prepareTmpFileRemoveCallback(p,i?-1:c,o,true)}}function dir(t,r){const o=_parseArguments(t,r),i=o[0],p=o[1];tmpName(i,(function _tmpNameCreated(t,r){if(t)return p(t);a.mkdir(r,i.mode||O,(function _dirCreated(t){if(t)return p(t);p(null,r,_prepareTmpDirRemoveCallback(r,i,false))}))}))}function dirSync(t){const r=_parseArguments(t),o=r[0];const i=tmpNameSync(o);a.mkdirSync(i,o.mode||O);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,o,true)}}function _removeFileAsync(t,r){const _handler=function(t){if(t&&!_isENOENT(t)){return r(t)}r()};if(0<=t[0])a.close(t[0],(function(){a.unlink(t[1],_handler)}));else a.unlink(t[1],_handler)}function _removeFileSync(t){let r=null;try{if(0<=t[0])a.closeSync(t[0])}catch(t){if(!_isEBADF(t)&&!_isENOENT(t))throw t}finally{try{a.unlinkSync(t[1])}catch(t){if(!_isENOENT(t))r=t}}if(r!==null){throw r}}function _prepareTmpFileRemoveCallback(t,r,o,a){const i=_prepareRemoveCallback(_removeFileSync,[r,t],a);const p=_prepareRemoveCallback(_removeFileAsync,[r,t],a,i);if(!o.keep)E.unshift(i);return a?i:p}function _prepareTmpDirRemoveCallback(t,r,o){const i=r.unsafeCleanup?rimraf:a.rmdir.bind(a);const p=r.unsafeCleanup?FN_RIMRAF_SYNC:q;const c=_prepareRemoveCallback(p,t,o);const d=_prepareRemoveCallback(i,t,o,c);if(!r.keep)E.unshift(c);return o?c:d}function _prepareRemoveCallback(t,r,o,a){let i=false;return function _cleanupCallback(p){if(!i){const c=a||_cleanupCallback;const d=E.indexOf(c);if(d>=0)E.splice(d,1);i=true;if(o||t===q||t===FN_RIMRAF_SYNC){return t(r)}else{return t(r,p||function(){})}}}}function _garbageCollector(){if(!y)return;while(E.length){try{E[0]()}catch(t){}}}function _randomChars(t){let r=[],o=null;try{o=c.randomBytes(t)}catch(r){o=c.pseudoRandomBytes(t)}for(var a=0;a<t;a++){r.push(A[o[a]%A.length])}return r.join("")}function _isBlank(t){return t===null||_isUndefined(t)||!t.trim()}function _isUndefined(t){return typeof t==="undefined"}function _parseArguments(t,r){if(typeof t==="function"){return[{},t]}if(_isUndefined(t)){return[{},r]}const o={};for(const r of Object.getOwnPropertyNames(t)){o[r]=t[r]}return[o,r]}function _generateTmpName(t){const r=t.tmpdir;if(!_isUndefined(t.name))return p.join(r,t.dir,t.name);if(!_isUndefined(t.template))return p.join(r,t.dir,
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=t=>t.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=t=>t.replace(/\r?\n|\r/g,"\r\n");const a=[];const i=new Uint8Array([13,10]);b=0;let p=false;for(const[r,c]of t){if(typeof c==="string"){const t=w.encode(o+`; name="${escape(normalizeLinefeeds(r))}"`+`\r\n\r\n${normalizeLinefeeds(c)}\r\n`);a.push(t);b+=t.byteLength}else{const t=w.encode(`${o}; name="${escape(normalizeLinefeeds(r))}"`+(c.name?`; filename="${escape(c.name)}"`:"")+"\r\n"+`Content-Type: ${c.type||"application/octet-stream"}\r\n\r\n`);a.push(t,c,i);if(typeof c.size==="number"){b+=t.byteLength+c.size+i.byteLength}else{p=true}}}const c=w.encode(`--${r}--`);a.push(c);b+=c.byteLength;if(p){b=null}u=t;l=async function*(){for(const t of a){if(t.stream){yield*t.stream()}else{yield t}}};M="multipart/form-data; boundary="+r}else if(c(t)){u=t;b=t.size;if(t.type){M=t.type}}else if(typeof t[Symbol.asyncIterator]==="function"){if(r){throw new TypeError("keepalive")}if(i.isDisturbed(t)||t.locked){throw new TypeError("Response body object should not be disturbed or locked")}a=t instanceof N?t:p(t)}if(typeof u==="string"||i.isBuffer(u)){b=Buffer.byteLength(u)}if(l!=null){let r;a=new N({async start(){r=l(t)[Symbol.asyncIterator]()},async pull(t){const{value:o,done:i}=await r.next();if(i){queueMicrotask((()=>{t.close()}))}else{if(!y(a)){t.enqueue(new Uint8Array(o))}}return t.desiredSize>0},async cancel(t){await r.return()},type:undefined})}const m={stream:a,source:u,length:b};return[m,M]}function safelyExtractBody(t,r=false){if(!N){N=o(35356).ReadableStream}if(t instanceof N){q(!i.isDisturbed(t),"The body has already been consumed.");q(!t.locked,"The stream is locked.")}return extractBody(t,r)}function cloneBody(t){const[r,o]=t.stream.tee();const a=O(o,{transfer:[o]});const[,i]=a.tee();t.stream=r;return{stream:i,length:t.length,source:t.source}}async function*consumeBody(t){if(t){if(C(t)){yield t}else{const r=t.stream;if(i.isDisturbed(r)){throw new TypeError("The body has already been consumed.")}if(r.locked){throw new TypeError("The stream is locked.")}r[E]=true;yield*r}}}function throwIfAborted(t){if(t.aborted){throw new z("The operation was aborted.","AbortError")}}function bodyMixinMethods(t){const r={blob(){return specConsumeBody(this,(t=>{let r=bodyMimeType(this);if(r==="failure"){r=""}else if(r){r=I(r)}return new h([t],{type:r})}),t)},arrayBuffer(){return specConsumeBody(this,(t=>new Uint8Array(t).buffer),t)},text(){return specConsumeBody(this,utf8DecodeBytes,t)},json(){return specConsumeBody(this,parseJSONFromBytes,t)},async formData(){m.brandCheck(this,t);throwIfAborted(this[M]);const r=this.headers.get("Content-Type");if(/multipart\/form-data/.test(r)){const t={};for(const[r,o]of this.headers)t[r.toLowerCase()]=o;const r=new b;let o;try{o=new a({headers:t,preservePath:true})}catch(t){throw new z(`${t}`,"AbortError")}o.on("field",((t,o)=>{r.append(t,o)}));o.on("file",((t,o,a,i,p)=>{const c=[];if(i==="base64"||i.toLowerCase()==="base64"){let i="";o.on("data",(t=>{i+=t.toString().replace(/[\r\n]/gm,"");const r=i.length-i.length%4;c.push(Buffer.from(i.slice(0,r),"base64"));i=i.slice(r)}));o.on("end",(()=>{c.push(Buffer.from(i,"base64"));r.append(t,new W(c,a,{type:p}))}))}else{o.on("data",(t=>{c.push(t)}));o.on("end",(()=>{r.append(t,new W(c,a,{type:p}))}))}}));const i=new Promise(((t,r)=>{o.on("finish",t);o.on("error",(t=>r(new TypeError(t))))}));if(this.body!==null)for await(const t of consumeBody(this[M].body))o.write(t);o.end();await i;return r}else if(/application\/x-www-form-urlencoded/.test(r)){let t;try{let r="";const o=new TextDecoder("utf-8",{ignoreBOM:true});for await(const t of consumeBody(this[M].body)){if(!C(t)){throw new TypeError("Expected Uint8Array chunk")}r+=o.decode(t,{stream:true})}r+=o.decode();t=new URLSearchParams(r)}catch(t){throw Object.assign(new TypeError,{cause:t})}const r=new b;for(const[o,a]of t){r.append(o,a)}return r}else{await Promise.resolve();throwIfAborted(this[M]);throw m.errors.exception({h
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */p[i-4]=this.maskKey[0];p[i-3]=this.maskKey[1];p[i-2]=this.maskKey[2];p[i-1]=this.maskKey[3];p[1]=o;if(o===126){p.writeUInt16BE(r,2)}else if(o===127){p[2]=p[3]=0;p.writeUIntBE(r,4,6)}p[1]|=128;for(let t=0;t<r;t++){p[i+t]=this.frameData[t]^this.maskKey[t%4]}return p}}t.exports={WebsocketFrameSend:WebsocketFrameSend}},11688:(t,r,o)=>{"use strict";const{Writable:a}=o(12781);const i=o(67643);const{parserStates:p,opcodes:c,states:d,emptyBuffer:A}=o(19188);const{kReadyState:l,kSentClose:u,kResponse:b,kReceivedClose:M}=o(37578);const{isValidStatusCode:m,failWebsocketConnection:z,websocketMessageReceived:O}=o(25515);const{WebsocketFrameSend:h}=o(25444);const g={};g.ping=i.channel("undici:websocket:ping");g.pong=i.channel("undici:websocket:pong");class ByteParser extends a{#i=[];#s=0;#p=p.INFO;#c={};#d=[];constructor(t){super();this.ws=t}_write(t,r,o){this.#i.push(t);this.#s+=t.length;this.run(o)}run(t){while(true){if(this.#p===p.INFO){if(this.#s<2){return t()}const r=this.consume(2);this.#c.fin=(r[0]&128)!==0;this.#c.opcode=r[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==c.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==c.BINARY&&this.#c.opcode!==c.TEXT){z(this.ws,"Invalid frame type was fragmented.");return}const o=r[1]&127;if(o<=125){this.#c.payloadLength=o;this.#p=p.READ_DATA}else if(o===126){this.#p=p.PAYLOADLENGTH_16}else if(o===127){this.#p=p.PAYLOADLENGTH_64}if(this.#c.fragmented&&o>125){z(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===c.PING||this.#c.opcode===c.PONG||this.#c.opcode===c.CLOSE)&&o>125){z(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===c.CLOSE){if(o===1){z(this.ws,"Received close frame with a 1-byte body.");return}const t=this.consume(o);this.#c.closeInfo=this.parseCloseBody(false,t);if(!this.ws[u]){const t=Buffer.allocUnsafe(2);t.writeUInt16BE(this.#c.closeInfo.code,0);const r=new h(t);this.ws[b].socket.write(r.createFrame(c.CLOSE),(t=>{if(!t){this.ws[u]=true}}))}this.ws[l]=d.CLOSING;this.ws[M]=true;this.end();return}else if(this.#c.opcode===c.PING){const r=this.consume(o);if(!this.ws[M]){const t=new h(r);this.ws[b].socket.write(t.createFrame(c.PONG));if(g.ping.hasSubscribers){g.ping.publish({payload:r})}}this.#p=p.INFO;if(this.#s>0){continue}else{t();return}}else if(this.#c.opcode===c.PONG){const r=this.consume(o);if(g.pong.hasSubscribers){g.pong.publish({payload:r})}if(this.#s>0){continue}else{t();return}}}else if(this.#p===p.PAYLOADLENGTH_16){if(this.#s<2){return t()}const r=this.consume(2);this.#c.payloadLength=r.readUInt16BE(0);this.#p=p.READ_DATA}else if(this.#p===p.PAYLOADLENGTH_64){if(this.#s<8){return t()}const r=this.consume(8);const o=r.readUInt32BE(0);if(o>2**31-1){z(this.ws,"Received payload length > 2^31 bytes.");return}const a=r.readUInt32BE(4);this.#c.payloadLength=(o<<8)+a;this.#p=p.READ_DATA}else if(this.#p===p.READ_DATA){if(this.#s<this.#c.payloadLength){return t()}else if(this.#s>=this.#c.payloadLength){const t=this.consume(this.#c.payloadLength);this.#d.push(t);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===c.CONTINUATION){const t=Buffer.concat(this.#d);O(this.ws,this.#c.originalOpcode,t);this.#c={};this.#d.length=0}this.#p=p.INFO}}if(this.#s>0){continue}else{t();break}}}consume(t){if(t>this.#s){return null}else if(t===0){return A}if(this.#i[0].length===t){this.#s-=this.#i[0].length;return this.#i.shift()}const r=Buffer.allocUnsafe(t);let o=0;while(o!==t){const a=this.#i[0];const{length:i}=a;if(i+o===t){r.set(this.#i.shift(),o);break}else if(i+o>t){r.set(a.subarray(0,t-o),o);this.#i[0]=a.subarray(t-o);break}else{r.set(this.#i.shift(),o);o+=a.length}}this.#s-=t;return r}parseCloseBody(t,r){let o;if(r.length>=2){o=r.readUInt16BE(0)}if(t){if(!m(o)){return null}return{code:o}}let a=r.subarray(2);if(a[0]===239&&a[1]===187&&a[2]===191){a=a.subarray(3)}if(o!==undefined&&!m(o)){return null}try{a=new TextDecoder("utf-8",{fatal:true}).decode(a)}catch{return null}return{code:o,reason:a}}get cl
/*!
* XRegExp.build 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2012-present MIT License
*/var l=function _default(t){var r="xregexp";var o=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;var a=t.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,o],"g",{conjunction:"or"});function deanchor(t){var r=/^(?:\(\?:\))*\^/;var o=/\$(?:\(\?:\))*$/;if(r.test(t)&&o.test(t)&&o.test(t.replace(/\\[\s\S]/g,""))){return t.replace(r,"").replace(o,"")}return t}function asXRegExp(o,a){var i=a?"x":"";return t.isRegExp(o)?o[r]&&o[r].captureNames?o:t(o.source,i):t(o,i)}function interpolate(r){return r instanceof RegExp?r:t.escape(r)}function reduceToSubpatternsObject(t,r,o){t["subpattern".concat(o)]=r;return t}function embedSubpatternAfter(t,r,o){var a=r<o.length-1;return t+(a?"{{subpattern".concat(r,"}}"):"")}t.tag=function(r){return function(o){var a,i;for(var p=arguments.length,c=new Array(p>1?p-1:0),l=1;l<p;l++){c[l-1]=arguments[l]}var u=(0,A["default"])(a=(0,d["default"])(c).call(c,interpolate)).call(a,reduceToSubpatternsObject,{});var b=(0,d["default"])(i=o.raw).call(i,embedSubpatternAfter).join("");return t.build(b,u,r)}};t.build=function(i,d,A){A=A||"";var l=(0,c["default"])(A).call(A,"x");var u=/^\(\?([\w$]+)\)/.exec(i);if(u){A=t._clipDuplicates(A+u[1])}var b={};for(var M in d){if(d.hasOwnProperty(M)){var m=asXRegExp(d[M],l);b[M]={pattern:deanchor(m.source),names:m[r].captureNames||[]}}}var z=asXRegExp(i,l);var O=0;var h;var g=0;var E=[0];var q=z[r].captureNames||[];var y=z.source.replace(a,(function(t,r,a,i,c){var d=r||a;var A;var l;var u;if(d){var M;if(!b.hasOwnProperty(d)){throw new ReferenceError("Undefined property ".concat(t))}if(r){A=q[g];E[++g]=++O;l="(?<".concat(A||d,">")}else{l="(?:"}h=O;var m=b[d].pattern.replace(o,(function(t,r,o){if(r){A=b[d].names[O-h];++O;if(A){return"(?<".concat(A,">")}}else if(o){u=+o-1;return b[d].names[u]?"\\k<".concat(b[d].names[u],">"):"\\".concat(+o+h)}return t}));return(0,p["default"])(M="".concat(l)).call(M,m,")")}if(i){A=q[g];E[++g]=++O;if(A){return"(?<".concat(A,">")}}else if(c){u=+c-1;return q[u]?"\\k<".concat(q[u],">"):"\\".concat(E[+c])}return t}));return t(y,A)}};r["default"]=l;t.exports=r.default},14811:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(49188));var c=a(o(10466));var d=a(o(6611));
/*!
* XRegExp.matchRecursive 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2009-present MIT License
*/var A=function _default(t){function row(t,r,o,a){return{name:t,value:r,start:o,end:a}}t.matchRecursive=function(r,o,a,i,A){i=i||"";A=A||{};var l=(0,d["default"])(i).call(i,"g");var u=(0,d["default"])(i).call(i,"y");var b=i.replace(/y/g,"");var M=A,m=M.escapeChar;var z=A.valueNames;var O=[];var h=0;var g=0;var E=0;var q=0;var y;var C;var B;var v;var R;o=t(o,b);a=t(a,b);if(m){var I,N;if(m.length>1){throw new Error("Cannot use more than one escape character")}m=t.escape(m);R=new RegExp((0,c["default"])(I=(0,c["default"])(N="(?:".concat(m,"[\\S\\s]|(?:(?!")).call(N,t.union([o,a],"",{conjunction:"or"}).source,")[^")).call(I,m,"])+)+"),i.replace(/[^imu]+/g,""))}while(true){if(m){E+=(t.exec(r,R,E,"sticky")||[""])[0].length}B=t.exec(r,o,E);v=t.exec(r,a,E);if(B&&v){if(B.index<=v.index){v=null}else{B=null}}if(B||v){g=(B||v).index;E=g+(B||v)[0].length}else if(!h){break}if(u&&!h&&g>q){break}if(B){if(!h){y=g;C=E}++h}else if(v&&h){if(! --h){if(z){if(z[0]&&y>q){O.push(row(z[0],(0,p["default"])(r).call(r,q,y),q,y))}if(z[1]){O.push(row(z[1],(0,p["default"])(r).call(r,y,C),y,C))}if(z[2]){O.push(row(z[2],(0,p["default"])(r).call(r,C,g),C,g))}if(z[3]){O.push(row(z[3],(0,p["default"])(r).call(r,g,E),g,E))}}else{O.push((0,p["default"])(r).call(r,C,g))}q=E;if(!l){break}}}else{throw new Error("Unbalanced delimiter found in string")}if(g===E){++E}}if(l&&!u&&z&&z[0]&&r.length>q){O.push(row(z[0],(0,p["default"])(r).call(r,q),q,r.length))}return O}};r["default"]=A;t.exports=r.default},13110:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(22038));var c=a(o(25401));var d=a(o(59640));var A=a(o(77652));var l=a(o(53361));var u=a(o(49188));var b=a(o(6611));var M=a(o(10466));var m=a(o(50669));function _createForOfIteratorHelper(t,r){var o;if(typeof A["default"]==="undefined"||(0,d["default"])(t)==null){if((0,c["default"])(t)||(o=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(o)t=o;var a=0;var i=function F(){};return{s:i,n:function n(){if(a>=t.length)return{done:true};return{done:false,value:t[a++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,b;return{s:function s(){o=(0,p["default"])(t)},n:function n(){var t=o.next();l=t.done;return t},e:function e(t){u=true;b=t},f:function f(){try{if(!l&&o["return"]!=null)o["return"]()}finally{if(u)throw b}}}}function _unsupportedIterableToArray(t,r){var o;if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var a=(0,u["default"])(o=Object.prototype.toString.call(t)).call(o,8,-1);if(a==="Object"&&t.constructor)a=t.constructor.name;if(a==="Map"||a==="Set")return(0,l["default"])(t);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var o=0,a=new Array(r);o<r;o++){a[o]=t[o]}return a}
/*!
* XRegExp Unicode Base 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2008-present MIT License
*/var z=function _default(t){var r={};var o=t._dec;var a=t._hex;var i=t._pad4;function normalize(t){return t.replace(/[- _]+/g,"").toLowerCase()}function charCode(t){var r=/^\\[xu](.+)/.exec(t);return r?o(r[1]):t.charCodeAt(t[0]==="\\"?1:0)}function invertBmp(r){var o="";var p=-1;(0,m["default"])(t).call(t,r,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,(function(t){var r=charCode(t[1]);if(r>p+1){o+="\\u".concat(i(a(p+1)));if(r>p+2){o+="-\\u".concat(i(a(r-1)))}}p=charCode(t[2]||t[1])}));if(p<65535){o+="\\u".concat(i(a(p+1)));if(p<65534){o+="-\\uFFFF"}}return o}function cacheInvertedBmp(t){var o="b!";return r[t][o]||(r[t][o]=invertBmp(r[t].bmp))}function buildAstral(t,o){var a=r[t];var i="";if(a.bmp&&!a.isBmpLast){var p;i=(0,M["default"])(p="[".concat(a.bmp,"]")).call(p,a.astral?"|":"")}if(a.astral){i+=a.astral}if(a.isBmpLast&&a.bmp){var c;i+=(0,M["default"])(c="".concat(a.astral?"|":"","[")).call(c,a.bmp,"]")}return o?"(?:(?!".concat(i,")(?:[\ud800-\udbff][\udc00-\udfff]|[\0-￿]))"):"(?:".concat(i,")")}function cacheAstral(t,o){var a=o?"a!":"a=";return r[t][a]||(r[t][a]=buildAstral(t,o))}t.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,(function(t,o,a){var i="Invalid double negation ";var p="Unknown Unicode token ";var c="Unicode token missing data ";var d="Astral mode required for Unicode token ";var A="Astral mode does not support Unicode tokens within character classes";var l=t[1]==="P"||!!t[2];var u=(0,b["default"])(a).call(a,"A");var m=normalize(t[4]||t[3]);var z=r[m];if(t[1]==="P"&&t[2]){throw new SyntaxError(i+t[0])}if(!r.hasOwnProperty(m)){throw new SyntaxError(p+t[0])}if(z.inverseOf){m=normalize(z.inverseOf);if(!r.hasOwnProperty(m)){var O;throw new ReferenceError((0,M["default"])(O="".concat(c+t[0]," -> ")).call(O,z.inverseOf))}z=r[m];l=!l}if(!(z.bmp||u)){throw new SyntaxError(d+t[0])}if(u){if(o==="class"){throw new SyntaxError(A)}return cacheAstral(m,l)}return o==="class"?l?cacheInvertedBmp(m):z.bmp:"".concat((l?"[^":"[")+z.bmp,"]")}),{scope:"all",optionalFlags:"A",leadChar:"\\"});t.addUnicodeData=function(o){var a="Unicode token requires name";var i="Unicode token has no character data ";var p=_createForOfIteratorHelper(o),c;try{for(p.s();!(c=p.n()).done;){var d=c.value;if(!d.name){throw new Error(a)}if(!(d.inverseOf||d.bmp||d.astral)){throw new Error(i+d.name)}r[normalize(d.name)]=d;if(d.alias){r[normalize(d.alias)]=d}}}catch(t){p.e(t)}finally{p.f()}t.cache.flush("patterns")};t._getUnicodeProperty=function(t){var o=normalize(t);return r[o]}};r["default"]=z;t.exports=r.default},34686:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(25826));
/*!
* XRegExp Unicode Blocks 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/var c=function _default(t){if(!t.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Blocks")}t.addUnicodeData(p["default"])};r["default"]=c;t.exports=r.default},1996:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(58537));
/*!
* XRegExp Unicode Categories 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/var c=function _default(t){if(!t.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Categories")}t.addUnicodeData(p["default"])};r["default"]=c;t.exports=r.default},49250:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(90616));
/*!
* XRegExp Unicode Properties 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2012-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/var c=function _default(t){if(!t.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Properties")}var r=p["default"];r.push({name:"Assigned",inverseOf:"Cn"});t.addUnicodeData(r)};r["default"]=c;t.exports=r.default},55715:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(32524));
/*!
* XRegExp Unicode Scripts 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2010-present MIT License
* Unicode data by Mathias Bynens <mathiasbynens.be>
*/var c=function _default(t){if(!t.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts")}t.addUnicodeData(p["default"])};r["default"]=c;t.exports=r.default},77750:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(18612));var c=a(o(70380));var d=a(o(14811));var A=a(o(13110));var l=a(o(34686));var u=a(o(1996));var b=a(o(49250));var M=a(o(55715));(0,c["default"])(p["default"]);(0,d["default"])(p["default"]);(0,A["default"])(p["default"]);(0,l["default"])(p["default"]);(0,u["default"])(p["default"]);(0,b["default"])(p["default"]);(0,M["default"])(p["default"]);var m=p["default"];r["default"]=m;t.exports=r.default},18612:(t,r,o)=>{"use strict";var a=o(84393);var i=o(34218);i(r,"__esModule",{value:true});r["default"]=void 0;var p=a(o(22038));var c=a(o(25401));var d=a(o(59640));var A=a(o(77652));var l=a(o(53361));var u=a(o(10466));var b=a(o(33781));var M=a(o(66761));var m=a(o(88135));var z=a(o(50669));var O=a(o(6611));var h=a(o(21308));var g=a(o(49188));var E=a(o(28979));var q=a(o(83046));function _createForOfIteratorHelper(t,r){var o;if(typeof A["default"]==="undefined"||(0,d["default"])(t)==null){if((0,c["default"])(t)||(o=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(o)t=o;var a=0;var i=function F(){};return{s:i,n:function n(){if(a>=t.length)return{done:true};return{done:false,value:t[a++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,b;return{s:function s(){o=(0,p["default"])(t)},n:function n(){var t=o.next();l=t.done;return t},e:function e(t){u=true;b=t},f:function f(){try{if(!l&&o["return"]!=null)o["return"]()}finally{if(u)throw b}}}}function _unsupportedIterableToArray(t,r){var o;if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var a=(0,g["default"])(o=Object.prototype.toString.call(t)).call(o,8,-1);if(a==="Object"&&t.constructor)a=t.constructor.name;if(a==="Map"||a==="Set")return(0,l["default"])(t);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var o=0,a=new Array(r);o<r;o++){a[o]=t[o]}return a}
/*!
* XRegExp 4.4.1
* <xregexp.com>
* Steven Levithan (c) 2007-present MIT License
*/var y="xregexp";var C={astral:false,namespacing:false};var B={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split};var v={};var R={};var I={};var N=[];var W="default";var w="class";var S={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/};var x=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g;var Q=B.exec.call(/()??/,"")[1]===undefined;var L=(0,q["default"])(/x/)!==undefined;var T={},D=T.toString;function hasNativeFlag(t){var r=true;try{new RegExp("",t);if(t==="y"){var o=function(){return"gy"}();var a=".a".replace(new RegExp("a",o),".")==="..";if(a){r=false}}}catch(t){r=false}return r}var _=hasNativeFlag("u");var k=hasNativeFlag("y");var P={g:true,i:true,m:true,u:_,y:k};function augment(t,r,o,a,i){var p;t[y]={captureNames:r};if(i){return t}if(t.__proto__){t.__proto__=XRegExp.prototype}else{for(var c in XRegExp.prototype){t[c]=XRegExp.prototype[c]}}t[y].source=o;t[y].flags=a?(0,E["default"])(p=a.split("")).call(p).join(""):a;return t}function clipDuplicates(t){return B.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function copyRegex(t,r){var o;if(!XRegExp.isRegExp(t)){throw new TypeError("Type RegExp expected")}var a=t[y]||{};var i=getNativeFlags(t);var p="";var c="";var d=null;var A=null;r=r||{};if(r.removeG){c+="g"}if(r.removeY){c+="y"}if(c){i=B.replace.call(i,new RegExp("[".concat(c,"]+"),"g"),"")}if(r.addG){p+="g"}if(r.addY){p+="y"}if(p){i=clipDuplicates(i+p)}if(!r.isInternalOnly){if(a.source!==undefined){d=a.source}if((0,q["default"])(a)!=null){A=p?clipDuplicates((0,q["default"])(a)+p):(0,q["default"])(a)}}t=augment(new RegExp(r.source||t.source,i),hasNamedCapture(t)?(0,g["default"])(o=a.captureNames).call(o,0):null,d,A,r.isInternalOnly);return t}function dec(t){return(0,h["default"])(t,16)}function getContextualTokenSeparator(t,r,o){if(t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||B.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||isQuantifierNext(t.input,t.index+t[0].length,o)){return""}return"(?:)"}function getNativeFlags(t){return L?(0,q["default"])(t):B.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function hasNamedCapture(t){return!!(t[y]&&t[y].captureNames)}function hex(t){return(0,h["default"])(t,10).toString(16)}function isQuantifierNext(t,r,o){var a="\\(\\?#[^)]*\\)";var i="#[^#\\n]*";var p="[?*+]|{\\d+(?:,\\d*)?}";return B.test.call((0,O["default"])(o).call(o,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,g["default"])(t).call(t,r))}function isType(t,r){return D.call(t)==="[object ".concat(r,"]")}function pad4(t){while(t.length<4){t="0".concat(t)}return t}function prepareFlags(t,r){if(clipDuplicates(r)!==r){throw new SyntaxError("Invalid duplicate regex flag ".concat(r))}t=B.replace.call(t,/^\(\?([\w$]+)\)/,(function(t,o){if(B.test.call(/[gy]/,o)){throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(t))}r=clipDuplicates(r+o);return""}));var o=_createForOfIteratorHelper(r),a;try{for(o.s();!(a=o.n()).done;){var i=a.value;if(!P[i]){throw new SyntaxError("Unknown regex flag ".concat(i))}}}catch(t){o.e(t)}finally{o.f()}return{pattern:t,flags:r}}function prepareOptions(t){var r={};if(isType(t,"String")){(0,z["default"])(XRegExp).call(XRegExp,t,/[^\s,]+/,(function(t){r[t]=true}));return r}return t}function registerFlag(t){if(!/^[\w$]$/.test(t)){throw new Error("Flag must be a single character A-Za-z0-9_$")}P[t]=true}function runTokens(t,r,o,a,i){var p=N.length;var c=t[o];var d=null;var A;var l;while(p--){l=N[p];if(l.leadChar&&l.leadChar!==c||l.scope!==a&&l.scope!=="all"||l.flag&&!(0,O["default"])(r).call(r,l.flag)){continue}A=XRegExp.exec(t,l.regex,o,"sticky");i
//# sourceMappingURL=index.js.map