11 lines
101 KiB
JavaScript
11 lines
101 KiB
JavaScript
|
|
"use strict";(()=>{var Sn=Object.defineProperty;var Cn=(e,t)=>{for(var n in t)Sn(e,n,{get:t[n],enumerable:!0})};var Oe=Object.defineProperty,En=Object.getOwnPropertyDescriptor,jn=Object.getOwnPropertyNames,An=Object.prototype.hasOwnProperty,ge=(e,t)=>{let n={};for(var r in e)Oe(n,r,{get:e[r],enumerable:!0});return t&&Oe(n,Symbol.toStringTag,{value:"Module"}),n},ct=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=jn(t),i=0,o=s.length,a;i<o;i++)a=s[i],!An.call(e,a)&&a!==n&&Oe(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=En(t,a))||r.enumerable});return e},Me=(e,t,n)=>(ct(e,t,"default"),n&&ct(n,t,"default"));var zn="default",_n="preflights",Rn="shortcuts",Pn="imports",ko={[Pn]:-200,[_n]:-100,[Rn]:-10,[zn]:0},ft=/[\\:]?[\s'"`;{}]+/g;function j(e=[]){return Array.isArray(e)?e:[e]}function ut(e){return typeof e=="string"}function R(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function O(e){let t=e.length,n=-1,r,s="",i=e.charCodeAt(0);for(;++n<t;){if(r=e.charCodeAt(n),r===0){s+="\uFFFD";continue}if(r===37){s+="\\%";continue}if(r===44){s+="\\,";continue}if(r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(n===0&&t===1&&r===45){s+=`\\${e.charAt(n)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=e.charAt(n);continue}s+=`\\${e.charAt(n)}`}return s}var On=/[\w\u00A0-\uFFFF%-?]/;function ht(e=""){return On.test(e)}function Mn(e){return e.filter(([t,n],r)=>{if(t.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(e[s][0]===t&&e[s][1]===n)return!1;return!0})}var Ln="__virtual_key__";function dt(e){return e==null?"":Mn(e).map(([t,n])=>n!=null&&typeof n!="function"?t!==Ln?`${t}:${n};`:n:void 0).filter(Boolean).join("")}var Ye={};Cn(Ye,{PseudoClassFunctions:()=>zt,PseudoClassFunctionsStr:()=>I,PseudoClasses:()=>D,PseudoClassesAndElementsColonStr:()=>Be,PseudoClassesAndElementsStr:()=>Ne,PseudoClassesColon:()=>V,PseudoClassesColonKeys:()=>De,PseudoClassesColonStr:()=>we,PseudoClassesKeys:()=>Ue,PseudoClassesMulti:()=>Ve,PseudoClassesMultiStr:()=>Fe,PseudoClassesStr:()=>$e,alphaPlaceholders:()=>Ie,alphaPlaceholdersRE:()=>St,calcMaxWidthBySize:()=>rr,colorOpacityToString:()=>Z,colorToString:()=>A,createPartClasses:()=>Ke,createPseudoClassFunctions:()=>qe,createPseudoClassesAndElements:()=>Ge,createTaggedPseudoClassMatcher:()=>Rt,createTaggedPseudoClasses:()=>He,createValueHandler:()=>We,cssColorFunctions:()=>ve,excludedPseudo:()=>_t,getBracket:()=>$t,getStringComponent:()=>U,getStringComponents:()=>X,hasIconFn:()=>ir,hasThemeFn:()=>tr,hex2rgba:()=>Kn,hueInterpolationMethods:()=>kt,iconFnRE:()=>sr,isInterpolatedMethod:()=>Hn,parseCssColor:()=>W,polarColorSpace:()=>vt,rectangularColorSpace:()=>wt,themeFnRE:()=>jt,transformThemeFn:()=>nr,transformThemeString:()=>At,variantGetBracket:()=>Pt,variantGetParameter:()=>Ot,variantMatcher:()=>ar,variantParentMatcher:()=>lr});var Tn=44,Fn=59,pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bt=new Uint8Array(64),Nn=new Uint8Array(128);for(let e=0;e<pt.length;e++){let t=pt.charCodeAt(e);bt[e]=t,Nn[t]=e}function te(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let s=r&31;r>>>=5,r>0&&(s|=32),e.write(bt[s])}while(r>0);return t}var mt=1024*16,gt=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Bn=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(mt)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===mt&&(this.out+=gt.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+gt.decode(e.subarray(0,n)):t}};function xt(e){let t=new Bn,n=0,r=0,s=0,i=0;for(let o=0;o<e.length;o++){let a=e[o];if(o>0&&t.write(Fn),a.length===0)continue;let l=0;for(let f=0;f<a.length;f++){let u=a[f];f>0&&t.write(Tn),l=te(t,u[0],l),u.length!==1&&(n=te(t,u[1],n),r=te(t,u[2],r),s=te(t,u[3],s),u.length!==4&&(i=te(t,u[4],i)))}}return t.flush()}var be=class e{constructor(t){this.bits=t instanceof
|
||
|
|
`),n=t.filter(i=>/^\t+/.test(i)),r=t.filter(i=>/^ {2,}/.test(i));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";let s=r.reduce((i,o)=>{let a=/^ +/.exec(o)[0].length;return Math.min(a,i)},1/0);return new Array(s+1).join(" ")}function Dn(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let s=n.length;for(;s--;)n[s]=".."}return n.concat(r).join("/")}var Vn=Object.prototype.toString;function Gn(e){return Vn.call(e)==="[object Object]"}function yt(e){let t=e.split(`
|
||
|
|
`),n=[];for(let r=0,s=0;r<t.length;r++)n.push(s),s+=t[r].length+1;return function(s){let i=0,o=n.length;for(;i<o;){let f=i+o>>1;s<n[f]?o=f:i=f+1}let a=i-1,l=s-n[a];return{line:a,column:l}}}var qn=/\w/,Te=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,n,r,s){if(n.length){let i=n.length-1,o=n.indexOf(`
|
||
|
|
`,0),a=-1;for(;o>=0&&i>o;){let f=[this.generatedCodeColumn,t,r.line,r.column];s>=0&&f.push(s),this.rawSegments.push(f),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=o,o=n.indexOf(`
|
||
|
|
`,o+1)}let l=[this.generatedCodeColumn,t,r.line,r.column];s>=0&&l.push(s),this.rawSegments.push(l),this.advance(n.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(t,n,r,s,i){let o=n.start,a=!0,l=!1;for(;o<n.end;){if(r[o]===`
|
||
|
|
`)s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,l=!1;else{if(this.hires||a||i.has(o)){let f=[this.generatedCodeColumn,t,s.line,s.column];this.hires==="boundary"?qn.test(r[o])?l||(this.rawSegments.push(f),l=!0):(this.rawSegments.push(f),l=!1):this.rawSegments.push(f)}s.column+=1,this.generatedCodeColumn+=1,a=!1}o+=1}this.pending=null}advance(t){if(!t)return;let n=t.split(`
|
||
|
|
`);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}},ne=`
|
||
|
|
`,Y={insertLeft:!1,insertRight:!1,storeName:!1},ye=class e{constructor(t,n={}){let r=new xe(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new be},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let s=n.next,i=s&&s.clone();i&&(r.next=i,i.previous=r,r=i),n=s}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new be(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),s=new Te(t.hires),i=yt(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(o=>{let a=i(o.start);o.intro.length&&s.advance(o.intro),o.edited?s.addEdit(n,o.content,a,o.storeName?r.indexOf(o.original):-1):s.addUneditedChunk(n,o,this.original,a,this.sourcemapLocations),o.outro.length&&s.advance(o.outro)}),this.outro&&s.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?Dn(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:s.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new Le(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Un(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(Gn(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let s={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let d=u[0];d<u[1];d+=1)s[d]=!0});let i=n.indentStart!==!1,o=f=>i?`${t}${f}`:(i=!0,f);this.intro=this.intro.replace(r,o);let a=0,l=this.firstChunk;for(;l;){let f=l.end;if(l.edited)s[a]||(l.content=l.content.replace(r,o),l.content.length&&(i=l.content[l.content.length-1]===`
|
||
|
|
`));else for(a=l.start;a<f;){if(!s[a]){let u=this.original[a];u===`
|
||
|
|
`?i=!0:u!=="\r"&&i&&(i=!1,a===l.start||(this._splitChunk(l,a),l=l.next),l.prependRight(t))}a+=1}a=l.end,l=l.next}return this.outro=this.outro.replace(r,o),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return Y.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Y.insertLeft=!0),this.appendLeft(t,n)}insertRight(t,n){return Y.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Y.insertRight=!0),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let s=this.byStart[t],i=this.byEnd[n],o=s.previous,a=i.next,l=this.byStart[r];if(!l&&i===this.lastChunk)return this;let f=l?l.previous:this.lastChunk;return o&&(o.next=a),a&&(a.previous=o),f&&(f.next=s),l&&(l.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=f,i.next=l||null,f||(this.firstChunk=s),l||(this.lastChunk=i),this}overwrite(t,n,r,s){return s=s||{},this.update(t,n,r,{...s,overwrite:!s.contentOnly})}update(t,n,r,s){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),s===!0&&(Y.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Y.storeName=!0),s={storeName:!0});let i=s!==void 0?s.storeName:!1,o=s!==void 0?s.overwrite:!1;if(i){let f=this.original.slice(t,n);Object.defineProperty(this.storedNames,f,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],l=this.byEnd[n];if(a){let f=a;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)}a.edit(r,i,!o)}else{let f=new xe(t,n,"").edit(r,i);l.next=f,f.previous=l}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro
|