11 lines
153 KiB
JavaScript
11 lines
153 KiB
JavaScript
|
|
"use strict";(()=>{var Wo=Object.defineProperty;var No=(t,e)=>{for(var r in e)Wo(t,r,{get:e[r],enumerable:!0})};var Io="default",Uo="preflights",Do="shortcuts",Vo="imports",oc={[Vo]:-200,[Uo]:-100,[Do]:-10,[Io]:0},Xr=/[\\:]?[\s'"`;{}]+/g;function j(t=[]){return Array.isArray(t)?t:[t]}function ct(t){return typeof t=="string"}function M(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function B(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Go=/[\w\u00A0-\uFFFF%-?]/;function Kr(t=""){return Go.test(t)}function qo(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}var Yo="__virtual_key__";function Hr(t){return t==null?"":qo(t).map(([e,r])=>r!=null&&typeof r!="function"?e!==Yo?`${e}:${r};`:r:void 0).filter(Boolean).join("")}var ir=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ko=Object.getOwnPropertyNames,Ho=Object.prototype.hasOwnProperty,Pt=(t,e)=>{let r={};for(var n in t)ir(r,n,{get:t[n],enumerable:!0});return e&&ir(r,Symbol.toStringTag,{value:"Module"}),r},Zr=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var o=Ko(e),i=0,a=o.length,s;i<a;i++)s=o[i],!Ho.call(t,s)&&s!==r&&ir(t,s,{get:(l=>e[l]).bind(null,s),enumerable:!(n=Xo(e,s))||n.enumerable});return t},ar=(t,e,r)=>(Zr(t,e,"default"),r&&Zr(r,e,"default"));var $r={};No($r,{PseudoClassFunctions:()=>mn,PseudoClassFunctionsStr:()=>X,PseudoClasses:()=>rt,PseudoClassesAndElementsColonStr:()=>ur,PseudoClassesAndElementsStr:()=>fr,PseudoClassesColon:()=>nt,PseudoClassesColonKeys:()=>hr,PseudoClassesColonStr:()=>Wt,PseudoClassesKeys:()=>mr,PseudoClassesMulti:()=>gr,PseudoClassesMultiStr:()=>lr,PseudoClassesStr:()=>Tt,alphaPlaceholders:()=>dr,alphaPlaceholdersRE:()=>ln,calcMaxWidthBySize:()=>yi,colorOpacityToString:()=>K,colorToString:()=>S,createPartClasses:()=>vr,createPseudoClassFunctions:()=>yr,createPseudoClassesAndElements:()=>br,createTaggedPseudoClassMatcher:()=>gn,createTaggedPseudoClasses:()=>xr,createValueHandler:()=>pr,cssColorFunctions:()=>Nt,excludedPseudo:()=>hn,getBracket:()=>on,getStringComponent:()=>et,getStringComponents:()=>ft,hasIconFn:()=>vi,hasThemeFn:()=>gi,hex2rgba:()=>li,hueInterpolationMethods:()=>cn,iconFnRE:()=>xi,isInterpolatedMethod:()=>ci,parseCssColor:()=>P,polarColorSpace:()=>sn,rectangularColorSpace:()=>an,themeFnRE:()=>dn,transformThemeFn:()=>bi,transformThemeString:()=>pn,variantGetBracket:()=>bn,variantGetParameter:()=>yn,variantMatcher:()=>ot,variantParentMatcher:()=>T});var Zo=44,Jo=59,Jr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",en=new Uint8Array(64),Qo=new Uint8Array(128);for(let t=0;t<Jr.length;t++){let e=Jr.charCodeAt(t);en[t]=e,Qo[e]=t}function xt(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(en[o])}while(n>0);return e}var Qr=1024*16,tn=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},ti=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Qr)}write(t){let{buffer:e}=this;e[this.pos++]=t,this.pos===Qr&&(this.out+=tn.decode(e),this.pos=0)}flush(){let{buffer:t,out:e,pos:r}=this;return r>0?e+tn.decode(t.subarray(0,r)):e}};function rn(t){let e=new ti,r=0,n=0,o=0,i=0;for(let a=0;a<t.length;a++){let s=t[a];if(a>0&&e.write(Jo),s.length===0)continue;let l=0;for(let f=0;f<s.length;f++){let u=s[f];f>0&&e.write(Zo),l=xt(e,u[0],l),u.length!==1&&(r=xt(e,u[1],r),n=xt(e,u[2],n),o=xt(e,u[3],o),u.length!==4&&(i=xt(e,u[4],i)))}}return e.flush()}var Lt=class t{constructor(e){this.bits=e instance
|
||
|
|
`),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,a)=>{let s=/^ +/.exec(a)[0].length;return Math.min(s,i)},1/0);return new Array(o+1).join(" ")}function oi(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var ii=Object.prototype.toString;function ai(t){return ii.call(t)==="[object Object]"}function nn(t){let e=t.split(`
|
||
|
|
`),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,a=r.length;for(;i<a;){let f=i+a>>1;o<r[f]?a=f:i=f+1}let s=i-1,l=o-r[s];return{line:s,column:l}}}var si=/\w/,cr=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,a=r.indexOf(`
|
||
|
|
`,0),s=-1;for(;a>=0&&i>a;){let f=[this.generatedCodeColumn,e,n.line,n.column];o>=0&&f.push(o),this.rawSegments.push(f),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=a,a=r.indexOf(`
|
||
|
|
`,a+1)}let l=[this.generatedCodeColumn,e,n.line,n.column];o>=0&&l.push(o),this.rawSegments.push(l),this.advance(r.slice(s+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(e,r,n,o,i){let a=r.start,s=!0,l=!1;for(;a<r.end;){if(n[a]===`
|
||
|
|
`)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,s=!0,l=!1;else{if(this.hires||s||i.has(a)){let f=[this.generatedCodeColumn,e,o.line,o.column];this.hires==="boundary"?si.test(n[a])?l||(this.rawSegments.push(f),l=!0):(this.rawSegments.push(f),l=!1):this.rawSegments.push(f)}o.column+=1,this.generatedCodeColumn+=1,s=!1}a+=1}this.pending=null}advance(e){if(!e)return;let r=e.split(`
|
||
|
|
`);if(r.length>1){for(let n=0;n<r.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=r[r.length-1].length}},vt=`
|
||
|
|
`,lt={insertLeft:!1,insertRight:!1,storeName:!1},Bt=class t{constructor(e,r={}){let n=new Ft(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Lt},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList},offset:{writable:!0,value:r.offset||0}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byEnd[e];return n?n.appendLeft(r):this.intro+=r,this}appendRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byStart[e];return n?n.appendRight(r):this.outro+=r,this}clone(){let e=new t(this.original,{filename:this.filename,offset:this.offset}),r=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=r.clone();for(;r;){e.byStart[n.start]=n,e.byEnd[n.end]=n;let o=r.next,i=o&&o.clone();i&&(n.next=i,i.previous=n,n=i),r=o}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new Lt(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};let r=0,n=Object.keys(this.storedNames),o=new cr(e.hires),i=nn(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(a=>{let s=i(a.start);a.intro.length&&o.advance(a.intro),a.edited?o.addEdit(r,a.content,s,a.storeName?n.indexOf(a.original):-1):o.addUneditedChunk(r,a,this.original,s,this.sourcemapLocations),a.outro.length&&o.advance(a.outro)}),this.outro&&o.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?oi(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:n,mappings:o.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(e){return new sr(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=ni(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,r){let n=/^[^\r\n]/gm;if(ai(e)&&(r=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;r=r||{};let o={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(u=>{for(let p=u[0];p<u[1];p+=1)o[p]=!0});let i=r.indentStart!==!1,a=f=>i?`${e}${f}`:(i=!0,f);this.intro=this.intro.replace(n,a);let s=0,l=this.firstChunk;for(;l;){let f=l.end;if(l.edited)o[s]||(l.content=l.content.replace(n,a),l.content.length&&(i=l.content[l.content.length-1]===`
|
||
|
|
`));else for(s=l.start;s<f;){if(!o[s]){let u=this.original[s];u===`
|
||
|
|
`?i=!0:u!=="\r"&&i&&(i=!1,s===l.start||(this._splitChunk(l,s),l=l.next),l.prependRight(e))}s+=1}s=l.end,l=l.next}return this.outro=this.outro.replace(n,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,r){return lt.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),lt.insertLeft=!0),this.appendLeft(e,r)}insertRight(e,r){return lt.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),lt.insertRight=!0),this.prependRight(e,r)}move(e,r,n){if(e=e+this.offset,r=r+this.offset,n=n+this.offset,n>=e&&n<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(n);let o=this.byStart[e],i=this.byEnd[r],a=o.previous,s=i.next,l=this.byStart[n];if(!l&&i===this.lastChunk)return this;let f=l?l.previous:this.lastChunk;return a&&(a.next=s),s&&(s.previous=a),f&&(f.next=o),l&&(l.previous=i),o.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=f,i.next=l||null,f||(this.firstChunk=o),l||(this.lastChunk=i),this}overwrite(e,r,n,o){return o=o||{},this.update(e,r,n,{...o,overwrite:!o.contentOnly})}update(e,r,n,o){if(e=e+this.offset,r=r+this.offset,typeof n!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(r),o===!0&&(lt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),lt.storeName=!0),o={storeName:!0});let i=o!==void 0?o.storeName:!1,a=o!==void 0?o.overwrite:!1;if(i){let f=this.original.slice(e,r);Object.defineProperty(this.storedNames,f,{writable:!0,value:!0,enumerable:!0})}let s=this.byStart[e],l=this.byEnd[r];if(s){let f=s;for(;f!==l;){if(f.next!==this.byStart[f.end])throw new Error("Cannot overwrite across a split point");f=f.next,f.edit("",!1)}s.edit(n,i,!a)}else{let f=new Ft(e,r,"").edit(n,i);l.next=f,f.previous=l}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byEnd[e];return n?n.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(e=e+this.offset,typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);let n=this.byStart[e];return n?n.prependRight(r):this.outro=r+this.outro,this}remove(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=r>n.end?this.byStart[n.end]:null;return this}reset(e,r){if(e=e+this.offset,r=r+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length}if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let n=this.byStart[e];for(;n;)n.reset(),n=r>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this
|