@unocss/runtime 0.58.9 → 0.59.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributify.global.js +1 -1
- package/core.global.js +2 -2
- package/dist/index.js +7 -28
- package/full.global.js +1 -1
- package/mini.global.js +1 -1
- package/package.json +8 -8
- package/preset-icons.global.js +4 -4
- package/uno.global.js +11 -11
- package/dist/index.d.mts +0 -126
- package/dist/index.mjs +0 -249
package/attributify.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var ja=Object.defineProperty;var za=(e,t)=>{for(var r in t)ja(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function ye(e){return Array.from(new Set(e))}function Cn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function ve(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Rn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>ve(t)):[e]:[ve(e)]}function Oa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function we(e){return e==null?"":Oa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(s=>{tt(n[s])&&tt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Vr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function Tn(e){return V(e[0])}function En(e){return V(e[0])}var Aa=/^\[(.+?)~?="(.*)"\]$/;var Va=/[\w\u00A0-\uFFFF-_:%-?]/,_r="$$shortcut-no-merge";function jn(e){return e.match(Aa)}function Ae(e=""){return Va.test(e)}function zn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function On(e){return e!=null}function An(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}var it={};function _a(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Pa(e,t=["-",":"],r=5){let n=_a(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Pa(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function se(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var st=/[\\:]?[\s'"`;{}]+/g;function Ma(e){return e.split(st)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ma(e)}};function Pn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ct="preflights",Fa="shortcuts",Ua="imports",Mn={[Ua]:-200,[ct]:-100,[Fa]:-10,[_e]:0};function Un(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Fn="_uno_resolved";function La(e){let t=typeof e=="function"?e():e;if(Fn in t)return t;t={...t},Object.defineProperty(t,Fn,{value:!0,enumerable:!1});let r=t.shortcuts?Un(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Ln(e){let t=La(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Ln);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=Cn((r.presets||[]).flatMap(A).flatMap(Ln),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return ye(i.flatMap(b=>A(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=at),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(Tn(h)){A(h[2]?.prefix||"").forEach(O=>{d[O+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Wa(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:ye(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Na(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(zn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Un(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Wa(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Na(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Wn="0.
|
|
1
|
+
"use strict";(()=>{var ja=Object.defineProperty;var za=(e,t)=>{for(var r in t)ja(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var et=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function ye(e){return Array.from(new Set(e))}function Cn(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function ve(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Rn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>ve(t)):[e]:[ve(e)]}function Oa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function we(e){return e==null?"":Oa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function tt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Vr(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return tt(n)&&tt(o)&&Object.keys(o).forEach(s=>{tt(n[s])&&tt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Vr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function Tn(e){return V(e[0])}function En(e){return V(e[0])}var Aa=/^\[(.+?)~?="(.*)"\]$/;var Va=/[\w\u00A0-\uFFFF-_:%-?]/,_r="$$shortcut-no-merge";function jn(e){return e.match(Aa)}function Ae(e=""){return Va.test(e)}function zn(e){return typeof e=="function"?{match:e}:e}function Pr(e){return e.length===3}function On(e){return e!=null}function An(){}var rt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},nt=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}var it={};function _a(e=["-",":"]){let t=e.join("|");return it[t]||(it[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),it[t].lastIndex=0,it[t]}function Pa(e,t=["-",":"],r=5){let n=_a(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Pa(e,t,r);return typeof e=="string"?n.expanded:e}var _n=new Set;function se(e){_n.has(e)||(console.warn("[unocss]",e),_n.add(e))}var st=/[\\:]?[\s'"`;{}]+/g;function Ma(e){return e.split(st)}var at={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ma(e)}};function Pn(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var _e="default",ct="preflights",Fa="shortcuts",Ua="imports",Mn={[Ua]:-200,[ct]:-100,[Fa]:-10,[_e]:0};function Un(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Fn="_uno_resolved";function La(e){let t=typeof e=="function"?e():e;if(Fn in t)return t;t={...t},Object.defineProperty(t,Fn,{value:!0,enumerable:!1});let r=t.shortcuts?Un(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Ln(e){let t=La(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Ln);return[t,...r]}function Mr(e={},t={}){let r=Object.assign({},t,e),n=Cn((r.presets||[]).flatMap(A).flatMap(Ln),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Mn,...i.map(h=>h.layers));function c(h){return ye(i.flatMap(b=>A(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=at),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(Tn(h)){A(h[2]?.prefix||"").forEach(O=>{d[O+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Wa(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:ye(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Na(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(zn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Un(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Wa(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Vr(t,r),{})}function Na(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Wn="0.59.0-beta.1";var Fr=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Mr(t,r),this.events.emit("config",this.config)}version=Wn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Pn();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Mr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(ot(s)&&ot(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(On);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=V(t)?await this.applyExtractors(t,n,c?new Ve:new Set):Array.isArray(t)?new Set(t):t;s&&this.config.safelist.forEach(b=>{p.has(b)||p.add(b)});let u=a?"":`
|
|
2
2
|
`,d=new Set([_e]),m=c?new Map:new Set,x=new Map,w={},S=Array.from(p).map(async b=>{if(m.has(b))return;let E=await this.parseToken(b);if(E!=null){m instanceof Map?m.set(b,{data:E,count:ot(p)?p.getCount(b):-1}):m.add(b);for(let O of E){let M=O[3]||"",K=O[4]?.layer;x.has(M)||x.set(M,[]),x.get(M).push(O),K&&d.add(K)}}});await Promise.all(S),await(async()=>{if(!i)return;let b={generator:this,theme:this.config.theme},E=new Set([]);this.config.preflights.forEach(({layer:O=ct})=>{d.add(O),E.add(O)}),w=Object.fromEntries(await Promise.all(Array.from(E).map(async O=>{let K=(await Promise.all(this.config.preflights.filter(re=>(re.layer||ct)===O).map(async re=>await re.getCSS(b)))).filter(Boolean).join(u);return[O,K]})))})();let j=this.config.sortLayers(Array.from(d).sort((b,E)=>(this.config.layers[b]??0)-(this.config.layers[E]??0)||b.localeCompare(E))),g={},k=(b=_e)=>{if(g[b])return g[b];let E=Array.from(x).sort((M,K)=>(this.parentOrders.get(M[0])??0)-(this.parentOrders.get(K[0])??0)||M[0]?.localeCompare(K[0]||"")||0).map(([M,K])=>{let re=K.length,xe=K.filter(v=>(v[4]?.layer||_e)===b).sort((v,R)=>v[0]-R[0]||(v[4]?.sort||0)-(R[4]?.sort||0)||v[5]?.currentSelector?.localeCompare(R[5]?.currentSelector??"")||v[1]?.localeCompare(R[1]||"")||v[2]?.localeCompare(R[2]||"")||0).map(([,v,R,,B,,G])=>[[[(v&&Ia(v,o))??"",B?.sort??0]],R,!!(G??B?.noMerge)]);if(!xe.length)return;let Qe=xe.reverse().map(([v,R,B],G)=>{if(!B&&this.config.mergeSelectors)for(let oe=G+1;oe<re;oe++){let Z=xe[oe];if(Z&&!Z[2]&&(v&&Z[0]||v==null&&Z[0]==null)&&Z[1]===R)return v&&Z[0]&&Z[0].push(...v),null}let ne=v?ye(v.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${R}}`:R}).filter(Boolean).reverse().join(u);if(!M)return Qe;let $=M.split(" $$ ");return`${$.join("{")}{${u}${Qe}${u}${"}".repeat($.length)}`}).filter(Boolean).join(u);if(i&&(E=[w[b],E].filter(Boolean).join(u)),f&&E){let M=typeof f=="object"?f.cssLayerName?.(b):void 0;M!==null&&(M||(M=b),E=`@layer ${M}{${u}${E}${u}}`)}let O=a?"":`/* layer: ${b} */${u}`;return g[b]=E?O+E:""},h=(b=j,E)=>b.filter(O=>!E?.includes(O)).map(O=>k(O)||"").filter(Boolean).join(u);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:k}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,a);if(f){if(V(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,o.unshift(f),n.add(c),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??Ga)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:Ka(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=ve(r);if(V(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${we(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,s,a]=V(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[s];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=ve(c[1]),d=c[2];return V(u)?[[p,u,d]]:[[p,i,u,d,a]]}r.variantHandlers=a;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let x=s;if(m?.prefix){let g=A(m.prefix);if(o){let k=A(o);if(!g.some(h=>k.includes(h)))continue}else{let k=g.find(h=>s.startsWith(h));if(k==null)continue;x=s.slice(k.length)}}let w=x.match(u);if(!w)continue;let S=await d(w,r);if(!S)continue;this.config.details&&r.rules.push([u,d,m]);let j=Rn(S).filter(g=>g.length);if(j.length)return j.map(g=>V(g)?[p,g,m]:[p,i,g,m,a])}}stringifyUtil(t,r){if(!t)return;if(Pr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),f=we(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:s??p,sort:a??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:An,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let p=A(a[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(En(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let f=c.match(a[0]);if(f&&(s=a[1](f,r)),s){i=i||a[2],o(a);break}}}if(V(s)&&(s=Vn(s.trim()).split(/\s+/g)),!s){let[a,c]=V(t)?await this.matchVariants(t):t;if(a!==c){let f=await this.expandShortcut(c,r,n-1);f&&(s=f[0].map(p=>V(p)?a.replace(c,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(V(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new nt,s=(await Promise.all(ye(n).map(async p=>{let u=V(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ve(p),void 0,[]]];return!u&&this.config.warn&&se(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[a,,c]=t,f=[];for(let p of s){if(Pr(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:x,noMerge:w,layer:S}=this.applyVariants(p,[...p[4],...c],a);i.getFallback(S??o.layer,new rt).getFallback(u,m,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],x,w)=>{let S=(g,k,h)=>{let b=Math.max(...h.map(O=>O[1])),E=h.map(O=>O[0]);return(g?[E.flat(1)]:E).map(O=>{let M=we(O);if(M)return[m,x,M,w,{...o,noMerge:k,sort:b,layer:u},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,k])=>[g,k]),!0],[d.filter(([,g])=>!g).map(([g,,k])=>[g,k]),!1]].map(([g,k])=>[...S(!1,k,g.filter(([h])=>h.some(b=>b[0]===_r))),...S(!0,k,g.filter(([h])=>h.every(b=>b[0]!==_r)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.some(r=>typeof r=="function"?r(t):V(r)?r===t:r.test(t))}};function Bn(e,t){return new Fr(e,t)}var Dn=/\s\$\$\s+/g;function Da(e){return Dn.test(e)}function Ia(e,t){return Da(e)?e.replace(Dn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Nn=/^\[(.+?)(~?=)"(.*)"\]$/;function Ka(e){return Nn.test(e)?e.replace(Nn,(t,r,n,o)=>`[${et(r)}${n}"${et(o)}"]`):`.${et(e)}`}function Ga(e,t){return t(e)}var Ha=/\/\/#\s*sourceMappingURL=.*\n?/g;function In(e){return e.includes("sourceMappingURL=")?e.replace(Ha,""):e}var qa=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Ya=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Xa=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Za(e){let t=[];for(let r of e.matchAll(Ya))r.index!==0&&!/^[\s'"`]/.test(e[r.index-1]??"")||t.push(r[0]);for(let r of e.matchAll(qa))t.push(r[0]);return e.split(st).forEach(r=>{Ae(r)&&!Xa.test(r)&&t.push(r)}),t}var Kn={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Za(In(e))}};var Gn=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=we(Object.entries(e.theme.preflightBase));return A(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];var L={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Ur={...L,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Lr={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},qn={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},Yn=["x","y","z"],Hn=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],U=Object.assign({},...Hn.map(e=>({[e.replace(/ /,"-")]:e})),...Hn.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Pe=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/;function $e(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(V(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Wr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Xn=["%alpha","<alpha-value>"],Ja=new RegExp(Xn.map(e=>ie(e)).join("|"));function D(e=""){let t=Qa(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Wr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&Xn.includes(t)?1:t}function _(e,t){if(typeof e=="string")return e.replace(Ja,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Wr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function Qa(e){if(!e)return;let t=ec(e);if(t!=null||(t=tc(e),t!=null)||(t=rc(e),t!=null)||(t=oc(e),t!=null)||(t=ic(e),t!=null))return t}function ec(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function tc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function rc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var nc=new RegExp(`^(${Wr.join("|")})\\((.+)\\)$`,"i");function oc(e){let t=e.match(nc);if(!t)return;let[,r,n]=t,o=Zn(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function ic(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=Zn(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Zn(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function lt(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,get(){return r(this,n)}});return t}function I(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function W(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=$e(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function N(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=N("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=new Uint8Array(64),sc=new Uint8Array(128);for(let e=0;e<Jn.length;e++){let t=Jn.charCodeAt(e);Qn[e]=t,sc[t]=e}var Nr=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 r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function eo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(s===r&&(a+=Nr.decode(o),s=0),o[s++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];s>n&&(a+=Nr.decode(i),o.copyWithin(0,n,s),s-=n),p>0&&(o[s++]=44),s=Me(o,s,t,u,0),u.length!==1&&(s=Me(o,s,t,u,1),s=Me(o,s,t,u,2),s=Me(o,s,t,u,3),u.length!==4&&(s=Me(o,s,t,u,4)))}}}return a+Nr.decode(o.subarray(0,s))}function Me(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=Qn[a]}while(s>0);return t}var ft=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},ut=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function ac(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var cc=ac(),Br=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=eo(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+cc(this.toString())}};function lc(e){let t=e.split(`
|
|
3
3
|
`),r=t.filter(i=>/^\t+/.test(i)),n=t.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,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function fc(e,t){let r=e.split(/[/\\]/),n=t.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 uc=Object.prototype.toString;function pc(e){return uc.call(e)==="[object Object]"}function to(e){let t=e.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var dc=/\w/,Dr=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,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var N=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function k(r){return Array.from(new Set(r))}function ie(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function w(r){return typeof r=="string"}function K(r){return w(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function oe(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function _e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function z(r){return r==null?"":_e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function B(r){return r&&typeof r=="object"&&!Array.isArray(r)}function X(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return B(n)&&B(s)&&Object.keys(s).forEach(o=>{B(n[o])&&B(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=X(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ae(r){return w(r[0])}function ce(r){return w(r[0])}var ee="$$shortcut-no-merge";function le(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function ue(r){return r!=null}function fe(){}var W=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},Y=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function q(r){return r instanceof G}var Z={};function $e(r=["-",":"]){let e=r.join("|");return Z[e]||(Z[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Z[e].lastIndex=0,Z[e]}function Pe(r,e=["-",":"],t=5){let n=$e(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,u,x,S)=>{if(!e.includes(u))return p;s=!0,o.add(c+u);let R=S+c.length+u.length+1,v={length:p.length,items:[]};a.set(S,v);for(let M of[...x.matchAll(/\S+/g)]){let A=R+M.index,m=a.get(A)?.items;m?a.delete(A):m=[{offset:A,length:M[0].length,className:M[0]}];for(let b of m)b.className=b.className==="~"?c:b.className.replace(/^(!?)(.*)/,`$1${c}${u}$2`),v.items.push(b)}return"$".repeat(p.length)}),t-=1;while(s&&t);let l;if(typeof r=="string"){l="";let p=0;for(let[c,u]of a)l+=r.slice(p,c),l+=u.items.map(x=>x.className).join(" "),p=c+u.length;l+=r.slice(p)}else{l=r;for(let[p,c]of a)l.overwrite(p,p+c.length,c.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function pe(r,e=["-",":"],t=5){let n=Pe(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function ge(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var he=/[\\:]?[\s'"`;{}]+/g;function
|
|
2
|
-
`,x=new Set([H]),S=l?new Map:new Set,R=new Map,v={},M=Array.from(c).map(async d=>{if(S.has(d))return;let T=await this.parseToken(d);if(T!=null){S instanceof Map?S.set(d,{data:T,count:q(c)?c.getCount(d):-1}):S.add(d);for(let C of T){let E=C[3]||"",_=C[4]?.layer;R.has(E)||R.set(E,[]),R.get(E).push(C),_&&x.add(_)}}});await Promise.all(M),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},T=new Set([]);this.config.preflights.forEach(({layer:C=Q})=>{x.add(C),T.add(C)}),v=Object.fromEntries(await Promise.all(Array.from(T).map(async C=>{let _=(await Promise.all(this.config.preflights.filter(j=>(j.layer||Q)===C).map(async j=>await j.getCSS(d)))).filter(Boolean).join(u);return[C,_]})))})();let A=this.config.sortLayers(Array.from(x).sort((d,T)=>(this.config.layers[d]??0)-(this.config.layers[T]??0)||d.localeCompare(T))),m={},b=(d=H)=>{if(m[d])return m[d];let T=Array.from(R).sort((E,_)=>(this.parentOrders.get(E[0])??0)-(this.parentOrders.get(_[0])??0)||E[0]?.localeCompare(_[0]||"")||0).map(([E,_])=>{let j=_.length,D=_.filter(g=>(g[4]?.layer||H)===d).sort((g,y)=>g[0]-y[0]||(g[4]?.sort||0)-(y[4]?.sort||0)||g[5]?.currentSelector?.localeCompare(y[5]?.currentSelector??"")||g[1]?.localeCompare(y[1]||"")||g[2]?.localeCompare(y[2]||"")||0).map(([,g,y,,V,,$])=>[[[(g&&He(g,s))??"",V?.sort??0]],y,!!($??V?.noMerge)]);if(!D.length)return;let I=D.reverse().map(([g,y,V],$)=>{if(!V&&this.config.mergeSelectors)for(let L=$+1;L<j;L++){let P=D[L];if(P&&!P[2]&&(g&&P[0]||g==null&&P[0]==null)&&P[1]===y)return g&&P[0]&&P[0].push(...g),null}let O=g?k(g.sort((L,P)=>L[1]-P[1]||L[0]?.localeCompare(P[0]||"")||0).map(L=>L[0]).filter(Boolean)):[];return O.length?`${O.join(`,${u}`)}{${y}}`:y}).filter(Boolean).reverse().join(u);if(!E)return I;let h=E.split(" $$ ");return`${h.join("{")}{${u}${I}${u}${"}".repeat(h.length)}`}).filter(Boolean).join(u);if(i&&(T=[v[d],T].filter(Boolean).join(u)),p&&T){let E=typeof p=="object"?p.cssLayerName?.(d):void 0;E!==null&&(E||(E=d),T=`@layer ${E}{${u}${T}${u}}`)}let C=a?"":`/* layer: ${d} */${u}`;return m[d]=T?C+T:""},f=(d=A,T)=>d.filter(C=>!T?.includes(C)).map(C=>b(C)||"").filter(Boolean).join(u);return{get css(){return f()},layers:A,matched:S,getLayers:f,getLayer:b}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let p=await l.match(i,a);if(p){if(w(p)){if(p===i)continue;p={matcher:p}}i=p.matcher,s.unshift(p),n.add(l),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>u=>{let x=c.body?.(u.entries)||u.entries,S=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Ne)({...u,entries:x,selector:c.selector?.(u.selector,x)||u.selector,parent:S[0]||u.parent,parentOrder:S[1]||u.parentOrder,layer:c.layer||u.layer,sort:c.sort||u.sort},p)},p=>p)({prefix:"",selector:Ie(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(l);return l}constructCustomCSS(e,t,n){let s=K(t);if(w(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${z(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,t,n=!1,s){let[i,o,a]=w(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let l=this.config.rulesStaticMap[o];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&t.rules.push(l[3]);let c=l[0],u=K(l[1]),x=l[2];return w(u)?[[c,u,x]]:[[c,i,u,x,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,u,x,S]of p){if(S?.internal&&!n)continue;let R=o;if(S?.prefix){let m=U(S.prefix);if(s){let b=U(s);if(!m.some(f=>b.includes(f)))continue}else{let b=m.find(f=>o.startsWith(f));if(b==null)continue;R=o.slice(b.length)}}let v=R.match(u);if(!v)continue;let M=await x(v,t);if(!M)continue;this.config.details&&t.rules.push([u,x,S]);let A=oe(M).filter(m=>m.length);if(A.length)return A.map(m=>w(m)?[c,m,S]:[c,i,m,S,a])}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),p=z(s);if(!p)return;let{layer:c,sort:u,...x}=e[3]??{},S={...x,layer:o??c,sort:a??u};return[e[0],n,p,i,S,this.config.details?t:void 0,l]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let c=U(a[2].prefix).find(u=>e.startsWith(u));if(c==null)continue;l=e.slice(c.length)}if(ce(a)){if(a[0]===l){i=i||a[2],o=a[1],s(a);break}}else{let p=l.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(w(o)&&(o=pe(o.trim()).split(/\s+/g)),!o){let[a,l]=w(e)?await this.matchVariants(e):e;if(a!==l){let p=await this.expandShortcut(l,t,n-1);p&&(o=p[0].map(c=>w(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(w(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new Y,o=(await Promise.all(k(n).map(async c=>{let u=w(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!u&&this.config.warn&&ge(`unmatched utility "${c}" in shortcut "${e[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((c,u)=>c[0]-u[0]),[a,,l]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:u,entries:x,parent:S,sort:R,noMerge:v,layer:M}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(M??s.layer,new W).getFallback(u,S,[[],c[0]])[0].push([x,!!(v??c[3]?.noMerge),R??0])}return p.concat(i.flatMap((c,u)=>c.map(([x,S],R,v)=>{let M=(m,b,f)=>{let d=Math.max(...f.map(C=>C[1])),T=f.map(C=>C[0]);return(m?[T.flat(1)]:T).map(C=>{let E=z(C);if(E)return[S,R,E,v,{...s,noMerge:b,sort:d,layer:u},t,void 0]})};return[[x.filter(([,m])=>m).map(([m,,b])=>[m,b]),!0],[x.filter(([,m])=>!m).map(([m,,b])=>[m,b]),!1]].map(([m,b])=>[...M(!1,b,m.filter(([f])=>f.some(d=>d[0]===ee))),...M(!0,b,m.filter(([f])=>f.every(d=>d[0]!==ee)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.some(t=>typeof t=="function"?t(e):w(t)?t===e:t.test(e))}};function Ee(r,e){return new ne(r,e)}var Re=/\s\$\$\s+/g;function Ge(r){return Re.test(r)}function He(r,e){return Ge(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Ce=/^\[(.+?)(~?=)"(.*)"\]$/;function Ie(r){return Ce.test(r)?r.replace(Ce,(e,t,n,s)=>`[${N(t)}${n}"${N(s)}"]`):`.${N(r)}`}function Ne(r,e){return e(r)}function Be(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Me(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var we=["Webkit","Moz","ms"];function Ae(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Be(n);if(i!=="filter"&&i in r)return e[n]=Me(i);i=ve(i);for(let o=0;o<we.length;o++){let a=`${we[o]}${i}`;if(a in r)return e[n]=Me(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function se(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=U(o.postprocess)).unshift(Ae(t.createElement("div").style)),i.configResolved?.(s,o);let l=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,u=new Map,x=!0,S=new Set,R,v,M=[],A=()=>new Promise(h=>{M.push(h),v!=null&&clearTimeout(v),v=setTimeout(()=>f().then(()=>{let g=M;M=[],g.forEach(y=>y())}),0)});function m(h){if(h.nodeType!==1)return;let g=h;g.hasAttribute(a)&&g.removeAttribute(a),g.querySelectorAll(`[${a}]`).forEach(y=>{y.removeAttribute(a)})}function b(h,g){let y=u.get(h);if(!y)if(y=t.createElement("style"),y.setAttribute("data-unocss-runtime-layer",h),u.set(h,y),g==null)p(y);else{let V=b(g),$=V.parentNode;$?$.insertBefore(y,V.nextSibling):p(y)}return y}async function f(){let h=await l.generate(S);return h.layers.reduce((g,y)=>(b(y,g).innerHTML=h.getLayer(y)??"",y),void 0),S=h.matched,{...h,getStyleElement:g=>u.get(g),getStyleElements:()=>u}}async function d(h){let g=S.size;await l.applyExtractors(h,void 0,S),g!==S.size&&await A()}async function T(h=c()){let g=h&&h.outerHTML;g&&(await d(`${g} ${Ue(g)}`),m(n()),m(h))}let C=new MutationObserver(h=>{x||h.forEach(async g=>{if(g.target.nodeType!==1)return;let y=g.target;for(let V of u)if(y===V[1])return;if(g.type==="childList")g.addedNodes.forEach(async V=>{if(V.nodeType!==1)return;let $=V;R&&!R($)||(await d($.outerHTML),m($))});else{if(R&&!R(y))return;if(g.attributeName!==a){let V=Array.from(y.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),$=`<${y.tagName.toLowerCase()} ${V}>`;await d($)}y.hasAttribute(a)&&y.removeAttribute(a)}})}),E=!1;function _(){if(E)return;let h=i.observer?.target?i.observer.target():c();h&&(C.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),E=!0)}function j(){i.bypassDefined&&ze(l.blocked),T(),_()}function D(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",j):j()}let I=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(h){w(h)||(h.forEach(g=>S.add(g)),h=""),await d(h)},extractAll:T,inspect(h){R=h},toggleObserver(h){h===void 0?x=!x:x=!!h,!E&&!x&&D()},update:f,presets:e.__unocss_runtime?.presets??{}};i.ready?.(I)!==!1&&(x=!1,D())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}se();})();
|
|
1
|
+
"use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var N=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function k(r){return Array.from(new Set(r))}function ie(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function w(r){return typeof r=="string"}function K(r){return w(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function oe(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function _e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function z(r){return r==null?"":_e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function B(r){return r&&typeof r=="object"&&!Array.isArray(r)}function X(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return B(n)&&B(s)&&Object.keys(s).forEach(o=>{B(n[o])&&B(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=X(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ae(r){return w(r[0])}function ce(r){return w(r[0])}var ee="$$shortcut-no-merge";function le(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function ue(r){return r!=null}function fe(){}var W=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},Y=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,t){return this._map.set(e,t),super.add(e)}};function q(r){return r instanceof G}var Z={};function $e(r=["-",":"]){let e=r.join("|");return Z[e]||(Z[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Z[e].lastIndex=0,Z[e]}function Pe(r,e=["-",":"],t=5){let n=$e(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,u,x,S)=>{if(!e.includes(u))return p;s=!0,o.add(c+u);let R=S+c.length+u.length+1,v={length:p.length,items:[]};a.set(S,v);for(let M of[...x.matchAll(/\S+/g)]){let A=R+M.index,m=a.get(A)?.items;m?a.delete(A):m=[{offset:A,length:M[0].length,className:M[0]}];for(let b of m)b.className=b.className==="~"?c:b.className.replace(/^(!?)(.*)/,`$1${c}${u}$2`),v.items.push(b)}return"$".repeat(p.length)}),t-=1;while(s&&t);let l;if(typeof r=="string"){l="";let p=0;for(let[c,u]of a)l+=r.slice(p,c),l+=u.items.map(x=>x.className).join(" "),p=c+u.length;l+=r.slice(p)}else{l=r;for(let[p,c]of a)l.overwrite(p,p+c.length,c.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function pe(r,e=["-",":"],t=5){let n=Pe(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function ge(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var he=/[\\:]?[\s'"`;{}]+/g;function Oe(r){return r.split(he)}var J={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return Oe(r)}};function me(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",Q="preflights",je="shortcuts",Le="imports",ye={[Le]:-200,[Q]:-100,[je]:-10,[H]:0};function Se(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";function De(r){let e=typeof r=="function"?r():r;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?Se(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=De(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function re(r={},e={}){let t=Object.assign({},e,r),n=ie((t.presets||[]).flatMap(U).flatMap(be),(f,d)=>f.name===d.name),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(f=>f.layers));function l(f){return k(i.flatMap(d=>U(d[f]||[])))}let p=l("extractors"),c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=J),c&&!p.includes(c)&&p.unshift(c),p.sort((f,d)=>(f.order||0)-(d.order||0));let u=l("rules"),x={},S=u.length,R=u.map((f,d)=>{if(ae(f)){U(f[2]?.prefix||"").forEach(C=>{x[C+f[0]]=[d,f[1],f[2],f]});return}return[d,...f]}).filter(Boolean).reverse(),v=ke(i.map(f=>f.theme)),M=l("extendTheme");for(let f of M)v=f(v)||v;let A={templates:k(i.flatMap(f=>U(f.autocomplete?.templates))),extractors:i.flatMap(f=>U(f.autocomplete?.extractors)).sort((f,d)=>(f.order||0)-(d.order||0)),shorthands:Ke(i.map(f=>f.autocomplete?.shorthands||{}))},m=l("separators");m.length||(m=[":","-"]);let b={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:v,rulesSize:S,rulesDynamic:R,rulesStaticMap:x,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:A,variants:l("variants").map(le).sort((f,d)=>(f.order||0)-(d.order||0)),shortcuts:Se(l("shortcuts")).reverse(),extractors:p,safelist:l("safelist"),separators:m,details:t.details??t.envMode==="dev"};for(let f of i)f?.configResolved?.(b);return b}function ke(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>X(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Te="0.59.0-beta.1";var ne=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=re(e,t),this.events.emit("config",this.config)}version=Te;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=me();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=re(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(q(o)&&q(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(ue);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=t,p=this.config.outputToCssLayers,c=w(e)?await this.applyExtractors(e,n,l?new G:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(d=>{c.has(d)||c.add(d)});let u=a?"":`
|
|
2
|
+
`,x=new Set([H]),S=l?new Map:new Set,R=new Map,v={},M=Array.from(c).map(async d=>{if(S.has(d))return;let T=await this.parseToken(d);if(T!=null){S instanceof Map?S.set(d,{data:T,count:q(c)?c.getCount(d):-1}):S.add(d);for(let C of T){let E=C[3]||"",_=C[4]?.layer;R.has(E)||R.set(E,[]),R.get(E).push(C),_&&x.add(_)}}});await Promise.all(M),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},T=new Set([]);this.config.preflights.forEach(({layer:C=Q})=>{x.add(C),T.add(C)}),v=Object.fromEntries(await Promise.all(Array.from(T).map(async C=>{let _=(await Promise.all(this.config.preflights.filter(O=>(O.layer||Q)===C).map(async O=>await O.getCSS(d)))).filter(Boolean).join(u);return[C,_]})))})();let A=this.config.sortLayers(Array.from(x).sort((d,T)=>(this.config.layers[d]??0)-(this.config.layers[T]??0)||d.localeCompare(T))),m={},b=(d=H)=>{if(m[d])return m[d];let T=Array.from(R).sort((E,_)=>(this.parentOrders.get(E[0])??0)-(this.parentOrders.get(_[0])??0)||E[0]?.localeCompare(_[0]||"")||0).map(([E,_])=>{let O=_.length,D=_.filter(g=>(g[4]?.layer||H)===d).sort((g,y)=>g[0]-y[0]||(g[4]?.sort||0)-(y[4]?.sort||0)||g[5]?.currentSelector?.localeCompare(y[5]?.currentSelector??"")||g[1]?.localeCompare(y[1]||"")||g[2]?.localeCompare(y[2]||"")||0).map(([,g,y,,V,,$])=>[[[(g&&He(g,s))??"",V?.sort??0]],y,!!($??V?.noMerge)]);if(!D.length)return;let I=D.reverse().map(([g,y,V],$)=>{if(!V&&this.config.mergeSelectors)for(let L=$+1;L<O;L++){let P=D[L];if(P&&!P[2]&&(g&&P[0]||g==null&&P[0]==null)&&P[1]===y)return g&&P[0]&&P[0].push(...g),null}let j=g?k(g.sort((L,P)=>L[1]-P[1]||L[0]?.localeCompare(P[0]||"")||0).map(L=>L[0]).filter(Boolean)):[];return j.length?`${j.join(`,${u}`)}{${y}}`:y}).filter(Boolean).reverse().join(u);if(!E)return I;let h=E.split(" $$ ");return`${h.join("{")}{${u}${I}${u}${"}".repeat(h.length)}`}).filter(Boolean).join(u);if(i&&(T=[v[d],T].filter(Boolean).join(u)),p&&T){let E=typeof p=="object"?p.cssLayerName?.(d):void 0;E!==null&&(E||(E=d),T=`@layer ${E}{${u}${T}${u}}`)}let C=a?"":`/* layer: ${d} */${u}`;return m[d]=T?C+T:""},f=(d=A,T)=>d.filter(C=>!T?.includes(C)).map(C=>b(C)||"").filter(Boolean).join(u);return{get css(){return f()},layers:A,matched:S,getLayers:f,getLayer:b}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let p=await l.match(i,a);if(p){if(w(p)){if(p===i)continue;p={matcher:p}}i=p.matcher,s.unshift(p),n.add(l),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>u=>{let x=c.body?.(u.entries)||u.entries,S=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Ne)({...u,entries:x,selector:c.selector?.(u.selector,x)||u.selector,parent:S[0]||u.parent,parentOrder:S[1]||u.parentOrder,layer:c.layer||u.layer,sort:c.sort||u.sort},p)},p=>p)({prefix:"",selector:Ie(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(l);return l}constructCustomCSS(e,t,n){let s=K(t);if(w(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${z(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,t,n=!1,s){let[i,o,a]=w(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let l=this.config.rulesStaticMap[o];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&t.rules.push(l[3]);let c=l[0],u=K(l[1]),x=l[2];return w(u)?[[c,u,x]]:[[c,i,u,x,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,u,x,S]of p){if(S?.internal&&!n)continue;let R=o;if(S?.prefix){let m=U(S.prefix);if(s){let b=U(s);if(!m.some(f=>b.includes(f)))continue}else{let b=m.find(f=>o.startsWith(f));if(b==null)continue;R=o.slice(b.length)}}let v=R.match(u);if(!v)continue;let M=await x(v,t);if(!M)continue;this.config.details&&t.rules.push([u,x,S]);let A=oe(M).filter(m=>m.length);if(A.length)return A.map(m=>w(m)?[c,m,S]:[c,i,m,S,a])}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),p=z(s);if(!p)return;let{layer:c,sort:u,...x}=e[3]??{},S={...x,layer:o??c,sort:a??u};return[e[0],n,p,i,S,this.config.details?t:void 0,l]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let c=U(a[2].prefix).find(u=>e.startsWith(u));if(c==null)continue;l=e.slice(c.length)}if(ce(a)){if(a[0]===l){i=i||a[2],o=a[1],s(a);break}}else{let p=l.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(w(o)&&(o=pe(o.trim()).split(/\s+/g)),!o){let[a,l]=w(e)?await this.matchVariants(e):e;if(a!==l){let p=await this.expandShortcut(l,t,n-1);p&&(o=p[0].map(c=>w(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(w(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new Y,o=(await Promise.all(k(n).map(async c=>{let u=w(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!u&&this.config.warn&&ge(`unmatched utility "${c}" in shortcut "${e[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((c,u)=>c[0]-u[0]),[a,,l]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:u,entries:x,parent:S,sort:R,noMerge:v,layer:M}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(M??s.layer,new W).getFallback(u,S,[[],c[0]])[0].push([x,!!(v??c[3]?.noMerge),R??0])}return p.concat(i.flatMap((c,u)=>c.map(([x,S],R,v)=>{let M=(m,b,f)=>{let d=Math.max(...f.map(C=>C[1])),T=f.map(C=>C[0]);return(m?[T.flat(1)]:T).map(C=>{let E=z(C);if(E)return[S,R,E,v,{...s,noMerge:b,sort:d,layer:u},t,void 0]})};return[[x.filter(([,m])=>m).map(([m,,b])=>[m,b]),!0],[x.filter(([,m])=>!m).map(([m,,b])=>[m,b]),!1]].map(([m,b])=>[...M(!1,b,m.filter(([f])=>f.some(d=>d[0]===ee))),...M(!0,b,m.filter(([f])=>f.every(d=>d[0]!==ee)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.some(t=>typeof t=="function"?t(e):w(t)?t===e:t.test(e))}};function Ee(r,e){return new ne(r,e)}var Re=/\s\$\$\s+/g;function Ge(r){return Re.test(r)}function He(r,e){return Ge(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Ce=/^\[(.+?)(~?=)"(.*)"\]$/;function Ie(r){return Ce.test(r)?r.replace(Ce,(e,t,n,s)=>`[${N(t)}${n}"${N(s)}"]`):`.${N(r)}`}function Ne(r,e){return e(r)}function Be(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Me(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var we=["Webkit","Moz","ms"];function Ae(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Be(n);if(i!=="filter"&&i in r)return e[n]=Me(i);i=ve(i);for(let o=0;o<we.length;o++){let a=`${we[o]}${i}`;if(a in r)return e[n]=Me(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function se(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=U(o.postprocess)).unshift(Ae(t.createElement("div").style)),i.configResolved?.(s,o);let l=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,u=new Map,x=!0,S=new Set,R,v,M=[],A=()=>new Promise(h=>{M.push(h),v!=null&&clearTimeout(v),v=setTimeout(()=>f().then(()=>{let g=M;M=[],g.forEach(y=>y())}),0)});function m(h){if(h.nodeType!==1)return;let g=h;g.hasAttribute(a)&&g.removeAttribute(a),g.querySelectorAll(`[${a}]`).forEach(y=>{y.removeAttribute(a)})}function b(h,g){let y=u.get(h);if(!y)if(y=t.createElement("style"),y.setAttribute("data-unocss-runtime-layer",h),u.set(h,y),g==null)p(y);else{let V=b(g),$=V.parentNode;$?$.insertBefore(y,V.nextSibling):p(y)}return y}async function f(){let h=await l.generate(S);return h.layers.reduce((g,y)=>(b(y,g).innerHTML=h.getLayer(y)??"",y),void 0),S=h.matched,{...h,getStyleElement:g=>u.get(g),getStyleElements:()=>u}}async function d(h){let g=S.size;await l.applyExtractors(h,void 0,S),g!==S.size&&await A()}async function T(h=c()){let g=h&&h.outerHTML;g&&(await d(`${g} ${Ue(g)}`),m(n()),m(h))}let C=new MutationObserver(h=>{x||h.forEach(async g=>{if(g.target.nodeType!==1)return;let y=g.target;for(let V of u)if(y===V[1])return;if(g.type==="childList")g.addedNodes.forEach(async V=>{if(V.nodeType!==1)return;let $=V;R&&!R($)||(await d($.outerHTML),m($))});else{if(R&&!R(y))return;if(g.attributeName!==a){let V=Array.from(y.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),$=`<${y.tagName.toLowerCase()} ${V}>`;await d($)}y.hasAttribute(a)&&y.removeAttribute(a)}})}),E=!1;function _(){if(E)return;let h=i.observer?.target?i.observer.target():c();h&&(C.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),E=!0)}function O(){i.bypassDefined&&ze(l.blocked),T(),_()}function D(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",O):O()}let I=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(h){w(h)||(h.forEach(g=>S.add(g)),h=""),await d(h)},extractAll:T,inspect(h){R=h},toggleObserver(h){h===void 0?x=!x:x=!!h,!E&&!x&&D()},update:f,presets:e.__unocss_runtime?.presets??{}};i.ready?.(I)!==!1&&(x=!1,D())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}se();})();
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
1
|
// src/index.ts
|
|
21
|
-
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
default: () => init
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
var import_core = require("@unocss/core");
|
|
2
|
+
import { createGenerator, isString, toArray } from "@unocss/core";
|
|
27
3
|
|
|
28
4
|
// src/utils.ts
|
|
29
5
|
function camelize(str) {
|
|
@@ -76,11 +52,11 @@ function init(inlineConfig = {}) {
|
|
|
76
52
|
const userConfigDefaults = runtimeOptions.defaults || {};
|
|
77
53
|
const cloakAttribute = runtimeOptions.cloakAttribute ?? "un-cloak";
|
|
78
54
|
if (runtimeOptions.autoPrefix) {
|
|
79
|
-
const postprocessors = userConfigDefaults.postprocess =
|
|
55
|
+
const postprocessors = userConfigDefaults.postprocess = toArray(userConfigDefaults.postprocess);
|
|
80
56
|
postprocessors.unshift(autoPrefixer(defaultDocument.createElement("div").style));
|
|
81
57
|
}
|
|
82
58
|
runtimeOptions.configResolved?.(userConfig, userConfigDefaults);
|
|
83
|
-
const uno =
|
|
59
|
+
const uno = createGenerator(userConfig, userConfigDefaults);
|
|
84
60
|
const inject = (styleElement) => runtimeOptions.inject ? runtimeOptions.inject(styleElement) : html().prepend(styleElement);
|
|
85
61
|
const rootElement = () => runtimeOptions.rootElement ? runtimeOptions.rootElement() : defaultDocument.body;
|
|
86
62
|
const styleElements = /* @__PURE__ */ new Map();
|
|
@@ -220,7 +196,7 @@ function init(inlineConfig = {}) {
|
|
|
220
196
|
version: uno.version,
|
|
221
197
|
uno,
|
|
222
198
|
async extract(userTokens) {
|
|
223
|
-
if (!
|
|
199
|
+
if (!isString(userTokens)) {
|
|
224
200
|
userTokens.forEach((t) => tokens.add(t));
|
|
225
201
|
userTokens = "";
|
|
226
202
|
}
|
|
@@ -268,3 +244,6 @@ function getDefinedCssSelectors(selectors = /* @__PURE__ */ new Set()) {
|
|
|
268
244
|
}
|
|
269
245
|
return selectors;
|
|
270
246
|
}
|
|
247
|
+
export {
|
|
248
|
+
init as default
|
|
249
|
+
};
|
package/full.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ua=Object.defineProperty;var La=(e,t)=>{for(var r in t)Ua(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function ye(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function ve(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>ve(t)):[e]:[ve(e)]}function Wa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function we(e){return e==null?"":Wa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ae(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ae(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return V(e[0])}function On(e){return V(e[0])}var Na=/^\[(.+?)~?="(.*)"\]$/;var Da=/[\w\u00A0-\uFFFF-_:%-?]/,Pr="$$shortcut-no-merge";function An(e){return e.match(Na)}function Ve(e=""){return Da.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function Mr(e){return e.length===3}function _n(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var _e=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof _e}var st={};function Ba(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ia(e,t=["-",":"],r=5){let n=Ba(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ia(e,t,r);return typeof e=="string"?n.expanded:e}var Fn=new Set;function se(e){Fn.has(e)||(console.warn("[unocss]",e),Fn.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ka(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ka(e)}};function Un(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Pe="default",lt="preflights",Ga="shortcuts",Ha="imports",Ln={[Ha]:-200,[lt]:-100,[Ga]:-10,[Pe]:0};function Nn(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";function qa(e){let t=typeof e=="function"?e():e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Dn(e){let t=qa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Dn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(A).flatMap(Dn),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return ye(i.flatMap(b=>A(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(zn(h)){A(h[2]?.prefix||"").forEach(O=>{d[O+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Ya(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:ye(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Xa(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Ya(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Ae(t,r),{})}function Xa(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Bn="0.
|
|
1
|
+
"use strict";(()=>{var Ua=Object.defineProperty;var La=(e,t)=>{for(var r in t)Ua(e,r,{get:t[r],enumerable:!0})};function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(e){let t=e.length,r=-1,n,o="",i=e.charCodeAt(0);for(;++r<t;){if(n=e.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&&t===1&&n===45){o+=`\\${e.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=e.charAt(r);continue}o+=`\\${e.charAt(r)}`}return o}var tt=Q;function A(e=[]){return Array.isArray(e)?e:[e]}function ye(e){return Array.from(new Set(e))}function En(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function V(e){return typeof e=="string"}function ve(e){return V(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function jn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>ve(t)):[e]:[ve(e)]}function Wa(e){return e.filter(([t,r],n)=>{if(t.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(e[o][0]===t&&e[o][1]===r)return!1;return!0})}function we(e){return e==null?"":Wa(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function rt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ae(e,t,r=!1){let n=e,o=t;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return rt(n)&&rt(o)&&Object.keys(o).forEach(s=>{rt(n[s])&&rt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ae(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Oe(e){let t,r,n;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Oe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Oe(n):n;return r}return e}function zn(e){return V(e[0])}function On(e){return V(e[0])}var Na=/^\[(.+?)~?="(.*)"\]$/;var Da=/[\w\u00A0-\uFFFF-_:%-?]/,Pr="$$shortcut-no-merge";function An(e){return e.match(Na)}function Ve(e=""){return Da.test(e)}function Vn(e){return typeof e=="function"?{match:e}:e}function Mr(e){return e.length===3}function _n(e){return e!=null}function Pn(){}var nt=class{_map=new Map;get(t,r){let n=this._map.get(t);if(n)return n.get(r)}getFallback(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.has(r)||o.set(r,n),o.get(r)}set(t,r,n){let o=this._map.get(t);return o||(o=new Map,this._map.set(t,o)),o.set(r,n),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>t(i,r,o)))}},ot=class extends Map{getFallback(t,r){let n=this.get(t);return n===void 0?(this.set(t,r),r):n}map(t){let r=[];return this.forEach((n,o)=>{r.push(t(n,o))}),r}flatMap(t){let r=[];return this.forEach((n,o)=>{r.push(...t(n,o))}),r}};var _e=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function it(e){return e instanceof _e}var st={};function Ba(e=["-",":"]){let t=e.join("|");return st[t]||(st[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),st[t].lastIndex=0,st[t]}function Ia(e,t=["-",":"],r=5){let n=Ba(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(f,p,u,d,m)=>{if(!t.includes(u))return f;o=!0,s.add(p+u);let x=m+p.length+u.length+1,w={length:f.length,items:[]};a.set(m,w);for(let S of[...d.matchAll(/\S+/g)]){let j=x+S.index,g=a.get(j)?.items;g?a.delete(j):g=[{offset:j,length:S[0].length,className:S[0]}];for(let k of g)k.className=k.className==="~"?p:k.className.replace(/^(!?)(.*)/,`$1${p}${u}$2`),w.items.push(k)}return"$".repeat(f.length)}),r-=1;while(o&&r);let c;if(typeof e=="string"){c="";let f=0;for(let[p,u]of a)c+=e.slice(f,p),c+=u.items.map(d=>d.className).join(" "),f=p+u.length;c+=e.slice(f)}else{c=e;for(let[f,p]of a)c.overwrite(f,f+p.length,p.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return c.toString()}}}function Mn(e,t=["-",":"],r=5){let n=Ia(e,t,r);return typeof e=="string"?n.expanded:e}var Fn=new Set;function se(e){Fn.has(e)||(console.warn("[unocss]",e),Fn.add(e))}var at=/[\\:]?[\s'"`;{}]+/g;function Ka(e){return e.split(at)}var ct={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ka(e)}};function Un(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}var Pe="default",lt="preflights",Ga="shortcuts",Ha="imports",Ln={[Ha]:-200,[lt]:-100,[Ga]:-10,[Pe]:0};function Nn(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";function qa(e){let t=typeof e=="function"?e():e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}function Dn(e){let t=qa(e);if(!t.presets)return[t];let r=(t.presets||[]).flatMap(A).flatMap(Dn);return[t,...r]}function Fr(e={},t={}){let r=Object.assign({},t,e),n=En((r.presets||[]).flatMap(A).flatMap(Dn),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Ln,...i.map(h=>h.layers));function c(h){return ye(i.flatMap(b=>A(b[h]||[])))}let f=c("extractors"),p=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=ct),p&&!f.includes(p)&&f.unshift(p),f.sort((h,b)=>(h.order||0)-(b.order||0));let u=c("rules"),d={},m=u.length,x=u.map((h,b)=>{if(zn(h)){A(h[2]?.prefix||"").forEach(O=>{d[O+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),w=Ya(i.map(h=>h.theme)),S=c("extendTheme");for(let h of S)w=h(w)||w;let j={templates:ye(i.flatMap(h=>A(h.autocomplete?.templates))),extractors:i.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:Xa(i.map(h=>h.autocomplete?.shorthands||{}))},g=c("separators");g.length||(g=[":","-"]);let k={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:c("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:m,rulesDynamic:x,rulesStaticMap:d,preprocess:c("preprocess"),postprocess:c("postprocess"),preflights:c("preflights"),autocomplete:j,variants:c("variants").map(Vn).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(c("shortcuts")).reverse(),extractors:f,safelist:c("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let h of i)h?.configResolved?.(k);return k}function Ya(e){return e.map(t=>t?Oe(t):{}).reduce((t,r)=>Ae(t,r),{})}function Xa(e){return e.reduce((t,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...t,...n}},{})}var Bn="0.59.0-beta.1";var Ur=class{constructor(t={},r={}){this.userConfig=t;this.defaults=r;this.config=Fr(t,r),this.events.emit("config",this.config)}version=Bn;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Un();setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=Fr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(it(s)&&it(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(t,r){if(this.blocked.has(t))return;let n=`${t}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=t;for(let f of this.config.preprocess)o=f(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(n,null);return}let s=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(s.variants=[...i[3]]);let a=await this.expandShortcut(s.currentSelector,s),c=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(f=>this.stringifyUtil(f,s)).filter(_n);if(c?.length)return this._cache.set(n,c),c;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:c=!1}=r,f=this.config.outputToCssLayers,p=V(t)?await this.applyExtractors(t,n,c?new _e:new Set):Array.isArray(t)?new Set(t):t;s&&this.config.safelist.forEach(b=>{p.has(b)||p.add(b)});let u=a?"":`
|
|
2
2
|
`,d=new Set([Pe]),m=c?new Map:new Set,x=new Map,w={},S=Array.from(p).map(async b=>{if(m.has(b))return;let E=await this.parseToken(b);if(E!=null){m instanceof Map?m.set(b,{data:E,count:it(p)?p.getCount(b):-1}):m.add(b);for(let O of E){let M=O[3]||"",K=O[4]?.layer;x.has(M)||x.set(M,[]),x.get(M).push(O),K&&d.add(K)}}});await Promise.all(S),await(async()=>{if(!i)return;let b={generator:this,theme:this.config.theme},E=new Set([]);this.config.preflights.forEach(({layer:O=lt})=>{d.add(O),E.add(O)}),w=Object.fromEntries(await Promise.all(Array.from(E).map(async O=>{let K=(await Promise.all(this.config.preflights.filter(re=>(re.layer||lt)===O).map(async re=>await re.getCSS(b)))).filter(Boolean).join(u);return[O,K]})))})();let j=this.config.sortLayers(Array.from(d).sort((b,E)=>(this.config.layers[b]??0)-(this.config.layers[E]??0)||b.localeCompare(E))),g={},k=(b=Pe)=>{if(g[b])return g[b];let E=Array.from(x).sort((M,K)=>(this.parentOrders.get(M[0])??0)-(this.parentOrders.get(K[0])??0)||M[0]?.localeCompare(K[0]||"")||0).map(([M,K])=>{let re=K.length,xe=K.filter(v=>(v[4]?.layer||Pe)===b).sort((v,R)=>v[0]-R[0]||(v[4]?.sort||0)-(R[4]?.sort||0)||v[5]?.currentSelector?.localeCompare(R[5]?.currentSelector??"")||v[1]?.localeCompare(R[1]||"")||v[2]?.localeCompare(R[2]||"")||0).map(([,v,R,,D,,G])=>[[[(v&&Qa(v,o))??"",D?.sort??0]],R,!!(G??D?.noMerge)]);if(!xe.length)return;let et=xe.reverse().map(([v,R,D],G)=>{if(!D&&this.config.mergeSelectors)for(let oe=G+1;oe<re;oe++){let Z=xe[oe];if(Z&&!Z[2]&&(v&&Z[0]||v==null&&Z[0]==null)&&Z[1]===R)return v&&Z[0]&&Z[0].push(...v),null}let ne=v?ye(v.sort((oe,Z)=>oe[1]-Z[1]||oe[0]?.localeCompare(Z[0]||"")||0).map(oe=>oe[0]).filter(Boolean)):[];return ne.length?`${ne.join(`,${u}`)}{${R}}`:R}).filter(Boolean).reverse().join(u);if(!M)return et;let $=M.split(" $$ ");return`${$.join("{")}{${u}${et}${u}${"}".repeat($.length)}`}).filter(Boolean).join(u);if(i&&(E=[w[b],E].filter(Boolean).join(u)),f&&E){let M=typeof f=="object"?f.cssLayerName?.(b):void 0;M!==null&&(M||(M=b),E=`@layer ${M}{${u}${E}${u}}`)}let O=a?"":`/* layer: ${b} */${u}`;return g[b]=E?O+E:""},h=(b=j,E)=>b.filter(O=>!E?.includes(O)).map(O=>k(O)||"").filter(Boolean).join(u);return{get css(){return h()},layers:j,matched:m,getLayers:h,getLayer:k}}async matchVariants(t,r){let n=new Set,o=[],i=r||t,s=!0,a={rawSelector:t,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let c of this.config.variants){if(!c.multiPass&&n.has(c))continue;let f=await c.match(i,a);if(f){if(V(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,o.unshift(f),n.add(c),s=!0;break}}if(!s)break;if(o.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,o,n]}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((f,p)=>(f.order||0)-(p.order||0)).reduceRight((f,p)=>u=>{let d=p.body?.(u.entries)||u.entries,m=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??ec)({...u,entries:d,selector:p.selector?.(u.selector,d)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:p.layer||u.layer,sort:p.sort||u.sort},f)},f=>f)({prefix:"",selector:Lr(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let c={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let f of this.config.postprocess)f(c);return c}constructCustomCSS(t,r,n){let o=ve(r);if(V(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),c=`${i}{${we(s)}}`;return a?`${a}{${c}}`:c}async parseUtil(t,r,n=!1,o){let[i,s,a]=V(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);let c=this.config.rulesStaticMap[s];if(c&&c[1]&&(n||!c[2]?.internal)){this.config.details&&r.rules.push(c[3]);let p=c[0],u=ve(c[1]),d=c[2];return V(u)?[[p,u,d]]:[[p,i,u,d,a]]}r.variantHandlers=a;let{rulesDynamic:f}=this.config;for(let[p,u,d,m]of f){if(m?.internal&&!n)continue;let x=s;if(m?.prefix){let g=A(m.prefix);if(o){let k=A(o);if(!g.some(h=>k.includes(h)))continue}else{let k=g.find(h=>s.startsWith(h));if(k==null)continue;x=s.slice(k.length)}}let w=x.match(u);if(!w)continue;let S=await d(w,r);if(!S)continue;this.config.details&&r.rules.push([u,d,m]);let j=jn(S).filter(g=>g.length);if(j.length)return j.map(g=>V(g)?[p,g,m]:[p,i,g,m,a])}}stringifyUtil(t,r){if(!t)return;if(Mr(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:c}=this.applyVariants(t),f=we(o);if(!f)return;let{layer:p,sort:u,...d}=t[3]??{},m={...d,layer:s??p,sort:a??u};return[t[0],n,f,i,m,this.config.details?r:void 0,c]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Pn,i,s;for(let a of this.config.shortcuts){let c=t;if(a[2]?.prefix){let p=A(a[2].prefix).find(u=>t.startsWith(u));if(p==null)continue;c=t.slice(p.length)}if(On(a)){if(a[0]===c){i=i||a[2],s=a[1],o(a);break}}else{let f=c.match(a[0]);if(f&&(s=a[1](f,r)),s){i=i||a[2],o(a);break}}}if(V(s)&&(s=Mn(s.trim()).split(/\s+/g)),!s){let[a,c]=V(t)?await this.matchVariants(t):t;if(a!==c){let f=await this.expandShortcut(c,r,n-1);f&&(s=f[0].map(p=>V(p)?a.replace(c,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(V(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new ot,s=(await Promise.all(ye(n).map(async p=>{let u=V(p)?await this.parseUtil(p,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ve(p),void 0,[]]];return!u&&this.config.warn&&se(`unmatched utility "${p}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((p,u)=>p[0]-u[0]),[a,,c]=t,f=[];for(let p of s){if(Mr(p)){f.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:u,entries:d,parent:m,sort:x,noMerge:w,layer:S}=this.applyVariants(p,[...p[4],...c],a);i.getFallback(S??o.layer,new nt).getFallback(u,m,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return f.concat(i.flatMap((p,u)=>p.map(([d,m],x,w)=>{let S=(g,k,h)=>{let b=Math.max(...h.map(O=>O[1])),E=h.map(O=>O[0]);return(g?[E.flat(1)]:E).map(O=>{let M=we(O);if(M)return[m,x,M,w,{...o,noMerge:k,sort:b,layer:u},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,k])=>[g,k]),!0],[d.filter(([,g])=>!g).map(([g,,k])=>[g,k]),!1]].map(([g,k])=>[...S(!1,k,g.filter(([h])=>h.some(b=>b[0]===Pr))),...S(!0,k,g.filter(([h])=>h.every(b=>b[0]!==Pr)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.some(r=>typeof r=="function"?r(t):V(r)?r===t:r.test(t))}};function Kn(e,t){return new Ur(e,t)}var Gn=/\s\$\$\s+/g;function Ja(e){return Gn.test(e)}function Qa(e,t){return Ja(e)?e.replace(Gn,t?` ${t} `:" "):t?`${t} ${e}`:e}var In=/^\[(.+?)(~?=)"(.*)"\]$/;function Lr(e){return In.test(e)?e.replace(In,(t,r,n,o)=>`[${tt(r)}${n}"${tt(o)}"]`):`.${tt(e)}`}function ec(e,t){return t(e)}var Wr=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;function Hn(e={}){let t=e.prefix??"un-",r=e.prefixedOnly??!1,n=e.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let a=An(i);if(!a)return;let c=a[1];if(c.startsWith(t))c=c.slice(t.length);else if(r)return;let f=a[2],[,p="",u=f]=f.match(Wr)||[];if(u==="~"||n&&u==="true"||!u)return`${p}${c}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,m]=f.match(o)||[];if(m)return`${d}${p}${c}-${m}`}return`${p}${c}-${u}`}}}var tc=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,rc=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,qn=/[\s'"`;>]+/;function Yn(e){return{name:"attributify",extract:({content:t,cursor:r})=>{let n=t.matchAll(tc),o,i=0;for(let g of n){let[,k,h]=g,b=g.index+k.length;if(r>b&&r<=b+h.length){i=b,o=h;break}}if(!o)return null;let s=o.matchAll(rc),a=0,c,f;for(let g of s){let[k,h,b]=g,E=i+g.index;if(r>E&&r<=E+k.length){a=E,c=h,f=b?.slice(1);break}}if(!c||c==="class"||c==="className"||c===":class")return null;let p=!!e?.prefix&&c.startsWith(e.prefix);if(e?.prefixedOnly&&!p)return null;let u=p?c.slice(e.prefix.length):c;if(f===void 0)return{extracted:u,resolveReplacement(g){let k=p?e.prefix.length:0;return{start:a+k,end:a+c.length,replacement:g}}};let d=a+c.length+2,m=qn.exec(f),x=0,w;for(;m;){let[g]=m;if(r>d+x&&r<=d+x+m.index){w=f.slice(x,x+m.index);break}x+=m.index+g.length,m=qn.exec(f.slice(x))}w===void 0&&(w=f.slice(x));let[,S="",j]=w.match(Wr)||[];return{extracted:`${S}${u}-${j}`,transformSuggestions(g){return g.filter(k=>k.startsWith(`${S}${u}-`)).map(k=>S+k.slice(S.length+u.length+1))},resolveReplacement(g){return{start:x+d,end:x+d+w.length,replacement:S+g.slice(S.length+u.length+1)}}}}}}var nc=["v-bind:",":"],Xn=/[\s'"`;]+/g,Nr=/<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g,oc=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,Dr=["placeholder","fill","opacity","stroke-opacity"];function Zn(e){let t=e?.ignoreAttributes??Dr,r=e?.nonValuedAttribute??!0,n=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Nr)).flatMap(i=>Array.from((i[1]||"").matchAll(oc))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(t.includes(i))return[];for(let c of nc)if(i.startsWith(c)){i=i.slice(c.length);break}if(!a){if(Ve(i)&&r!==!1){let c=[`[${i}=""]`];return n&&c.push(`[${i}="true"]`),c}return[]}return["class","className"].includes(i)?a.split(Xn).filter(Ve):Nr.test(a)?(Nr.lastIndex=0,this.extract({code:a})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:a.split(Xn).filter(c=>!!c&&c!==":").map(c=>`[${i}~="${c}"]`)})}}}var ic=(e={})=>{e.strict=e.strict??!1,e.prefix=e.prefix??"un-",e.prefixedOnly=e.prefixedOnly??!1,e.nonValuedAttribute=e.nonValuedAttribute??!0,e.ignoreAttributes=e.ignoreAttributes??Dr;let t=[Hn(e)],r=[Zn(e)],n=[Yn(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:t,extractors:r,options:e,autocomplete:{extractors:n},extractorDefault:e.strict?!1:void 0}},Jn=ic;var sc=/\/\/#\s*sourceMappingURL=.*\n?/g;function Qn(e){return e.includes("sourceMappingURL=")?e.replace(sc,""):e}var ac=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,cc=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,lc=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function fc(e){let t=[];for(let r of e.matchAll(cc))r.index!==0&&!/^[\s'"`]/.test(e[r.index-1]??"")||t.push(r[0]);for(let r of e.matchAll(ac))t.push(r[0]);return e.split(at).forEach(r=>{Ve(r)&&!lc.test(r)&&t.push(r)}),t}var eo={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return fc(Qn(e))}};var to=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=we(Object.entries(e.theme.preflightBase));return A(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];var L={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},Br={...L,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},Ir={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},no={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},oo=["x","y","z"],ro=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],U=Object.assign({},...ro.map(e=>({[e.replace(/ /,"-")]:e})),...ro.map(e=>({[e.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:e}))),C=["inherit","initial","revert","revert-layer","unset"],Me=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/;function $e(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function ae(e,t,r,n){if(e===""||(V(n)&&(n=[n]),n.length===0))return;let o=e.length,i=0;for(let s=0;s<o;s++)switch(e[s]){case t:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let c=a.length;if(c&&a===e.slice(s,s+c)&&i===0)return s===0||s===o-c?void 0:[e.slice(0,s),e.slice(s+c)]}}return[e,""]}function ue(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=ae(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Kr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],io=["%alpha","<alpha-value>"],uc=new RegExp(io.map(e=>ie(e)).join("|"));function B(e=""){let t=pc(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Kr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function ee(e){let t=e.alpha??1;return typeof t=="string"&&io.includes(t)?1:t}function _(e,t){if(typeof e=="string")return e.replace(uc,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Kr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function pc(e){if(!e)return;let t=dc(e);if(t!=null||(t=mc(e),t!=null)||(t=hc(e),t!=null)||(t=bc(e),t!=null)||(t=xc(e),t!=null))return t}function dc(e){let[,t]=e.match(/^#([\da-f]+)$/i)||[];if(t)switch(t.length){case 3:case 4:let r=Array.from(t,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:t.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(t,16);return{type:"rgb",components:t.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:t.length===6?void 0:Math.round((n&255)/255*100)/100}}}function mc(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function hc(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=ue(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var gc=new RegExp(`^(${Kr.join("|")})\\((.+)\\)$`,"i");function bc(e){let t=e.match(gc);if(!t)return;let[,r,n]=t,o=so(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function xc(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=so(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function so(e){let t=ue(e," ");if(!t)return;let r=t.length;if(t[r-2]==="/")return{components:t.slice(0,r-2),alpha:t[r-1]};if(t[r-2]!=null&&(t[r-2].endsWith("/")||t[r-1].startsWith("/"))){let i=t.splice(r-2);t.push(i.join(" ")),--r}let n=ue(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function ft(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,get(){return r(this,n)}});return t}function I(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,...t(s)})}},autocomplete:`${e}:`}}function W(e,t){let r;return{name:e,match(n,o){r||(r=new RegExp(`^${ie(e)}(?:${o.generator.config.separators.join("|")})`));let i=n.match(r);if(i)return{matcher:n.slice(i[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${t}`})}},autocomplete:`${e}:`}}function ce(e,t,r){if(t.startsWith(`${e}[`)){let[n,o]=$e(t.slice(e.length),"[","]")??[];if(n&&o){for(let i of r)if(o.startsWith(i))return[n,o.slice(i.length),i];return[n,o,""]}}}function N(e,t,r){if(t.startsWith(e)){let n=ce(e,t,r);if(n){let[o="",i=n[1]]=N("/",n[1],r)??[];return[n[0],i,o]}for(let o of r.filter(i=>i!=="/")){let i=t.indexOf(o,e.length);if(i!==-1){let s=t.indexOf("/",e.length),a=s===-1||i<=s;return[t.slice(e.length,a?i:s),t.slice(i+o.length),a?"":t.slice(s+1,i)]}}}}var ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",co=new Uint8Array(64),yc=new Uint8Array(128);for(let e=0;e<ao.length;e++){let t=ao.charCodeAt(e);co[e]=t,yc[t]=e}var Gr=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 r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t}};function lo(e){let t=new Int32Array(5),r=1024*16,n=r-36,o=new Uint8Array(r),i=o.subarray(0,n),s=0,a="";for(let c=0;c<e.length;c++){let f=e[c];if(c>0&&(s===r&&(a+=Gr.decode(o),s=0),o[s++]=59),f.length!==0){t[0]=0;for(let p=0;p<f.length;p++){let u=f[p];s>n&&(a+=Gr.decode(i),o.copyWithin(0,n,s),s-=n),p>0&&(o[s++]=44),s=Fe(o,s,t,u,0),u.length!==1&&(s=Fe(o,s,t,u,1),s=Fe(o,s,t,u,2),s=Fe(o,s,t,u,3),u.length!==4&&(s=Fe(o,s,t,u,4)))}}}return a+Gr.decode(o.subarray(0,s))}function Fe(e,t,r,n,o){let i=n[o],s=i-r[o];r[o]=i,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),e[t++]=co[a]}while(s>0);return t}var ut=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},pt=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function vc(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var wc=vc(),Hr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=lo(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+wc(this.toString())}};function $c(e){let t=e.split(`
|
|
3
3
|
`),r=t.filter(i=>/^\t+/.test(i)),n=t.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,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function kc(e,t){let r=e.split(/[/\\]/),n=t.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 Sc=Object.prototype.toString;function Cc(e){return Sc.call(e)==="[object Object]"}function fo(e){let t=e.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<t.length;n++)r.push(o),o+=t[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let f=i+s>>1;o<r[f]?s=f:i=f+1}let a=i-1,c=o-r[a];return{line:a,column:c}}}var Rc=/\w/,qr=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,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/mini.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var oo=Object.defineProperty;var so=(t,e)=>{for(var r in e)oo(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Le=Q;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Dt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function V(t){return typeof t=="string"}function oe(t){return V(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function It(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function ao(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":ao(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function _e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function lt(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return _e(n)&&_e(i)&&Object.keys(i).forEach(s=>{_e(n[s])&&_e(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=lt(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function me(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:me(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}return t}function Bt(t){return V(t[0])}function Kt(t){return V(t[0])}var lo=/^\[(.+?)~?="(.*)"\]$/;var co=/[\w\u00A0-\uFFFF-_:%-?]/,ct="$$shortcut-no-merge";function Ht(t){return t.match(lo)}function ge(t=""){return co.test(t)}function Gt(t){return typeof t=="function"?{match:t}:t}function ut(t){return t.length===3}function qt(t){return t!=null}function Yt(){}var Ue=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},Fe=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof be}var Ne={};function uo(t=["-",":"]){let e=t.join("|");return Ne[e]||(Ne[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ne[e].lastIndex=0,Ne[e]}function fo(t,e=["-",":"],r=5){let n=uo(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let x=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let v of[...d.matchAll(/\S+/g)]){let R=x+v.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:v[0].length,className:v[0]}];for(let S of g)S.className=S.className==="~"?p:S.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(S)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Zt(t,e=["-",":"],r=5){let n=fo(t,e,r);return typeof t=="string"?n.expanded:t}var Xt=new Set;function Z(t){Xt.has(t)||(console.warn("[unocss]",t),Xt.add(t))}var De=/[\\:]?[\s'"`;{}]+/g;function po(t){return t.split(De)}var Ie={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return po(t)}};function Jt(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var xe="default",Be="preflights",ho="shortcuts",mo="imports",Qt={[mo]:-200,[Be]:-100,[ho]:-10,[xe]:0};function tr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var er="_uno_resolved";function go(t){let e=typeof t=="function"?t():t;if(er in e)return e;e={...e},Object.defineProperty(e,er,{value:!0,enumerable:!1});let r=e.shortcuts?tr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function rr(t){let e=go(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(rr);return[e,...r]}function ft(t={},e={}){let r=Object.assign({},e,t),n=Dt((r.presets||[]).flatMap(A).flatMap(rr),(m,b)=>m.name===b.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(b=>A(b[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=Ie),p&&!u.includes(p)&&u.unshift(p),u.sort((m,b)=>(m.order||0)-(b.order||0));let f=l("rules"),d={},h=f.length,x=f.map((m,b)=>{if(Bt(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[b,m[1],m[2],m]});return}return[b,...m]}).filter(Boolean).reverse(),w=bo(o.map(m=>m.theme)),v=l("extendTheme");for(let m of v)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,b)=>(m.order||0)-(b.order||0)),shorthands:xo(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let S={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:x,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Gt).sort((m,b)=>(m.order||0)-(b.order||0)),shortcuts:tr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(S);return S}function bo(t){return t.map(e=>e?me(e):{}).reduce((e,r)=>lt(e,r),{})}function xo(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var nr="0.
|
|
1
|
+
"use strict";(()=>{var oo=Object.defineProperty;var so=(t,e)=>{for(var r in e)oo(t,r,{get:e[r],enumerable:!0})};function Y(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q(t){let e=t.length,r=-1,n,i="",o=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){i+="\uFFFD";continue}if(n===37){i+="\\%";continue}if(n===44){i+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&o===45){i+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){i+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){i+=t.charAt(r);continue}i+=`\\${t.charAt(r)}`}return i}var Le=Q;function A(t=[]){return Array.isArray(t)?t:[t]}function ie(t){return Array.from(new Set(t))}function Dt(t,e){return t.reduce((r,n)=>(r.findIndex(o=>e(n,o))===-1&&r.push(n),r),[])}function V(t){return typeof t=="string"}function oe(t){return V(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function It(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>oe(e)):[t]:[oe(t)]}function ao(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let i=n-1;i>=0;i--)if(t[i][0]===e&&t[i][1]===r)return!1;return!0})}function se(t){return t==null?"":ao(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function _e(t){return t&&typeof t=="object"&&!Array.isArray(t)}function lt(t,e,r=!1){let n=t,i=e;if(Array.isArray(i))return r&&Array.isArray(i)?[...n,...i]:[...i];let o={...n};return _e(n)&&_e(i)&&Object.keys(i).forEach(s=>{_e(n[s])&&_e(i[s])||Array.isArray(n[s])&&Array.isArray(i[s])?o[s]=lt(n[s],i[s],r):Object.assign(o,{[s]:i[s]})}),o}function me(t){let e,r,n;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:me(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?me(n):n;return r}return t}function Bt(t){return V(t[0])}function Kt(t){return V(t[0])}var lo=/^\[(.+?)~?="(.*)"\]$/;var co=/[\w\u00A0-\uFFFF-_:%-?]/,ct="$$shortcut-no-merge";function Ht(t){return t.match(lo)}function ge(t=""){return co.test(t)}function Gt(t){return typeof t=="function"?{match:t}:t}function ut(t){return t.length===3}function qt(t){return t!=null}function Yt(){}var Ue=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.has(r)||i.set(r,n),i.get(r)}set(e,r,n){let i=this._map.get(e);return i||(i=new Map,this._map.set(e,i)),i.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([i,o])=>e(o,r,i)))}},Fe=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,i)=>{r.push(e(n,i))}),r}flatMap(e){let r=[];return this.forEach((n,i)=>{r.push(...e(n,i))}),r}};var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof be}var Ne={};function uo(t=["-",":"]){let e=t.join("|");return Ne[e]||(Ne[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Ne[e].lastIndex=0,Ne[e]}function fo(t,e=["-",":"],r=5){let n=uo(e),i,o=t.toString(),s=new Set,a=new Map;do i=!1,o=o.replace(n,(u,p,f,d,h)=>{if(!e.includes(f))return u;i=!0,s.add(p+f);let x=h+p.length+f.length+1,w={length:u.length,items:[]};a.set(h,w);for(let v of[...d.matchAll(/\S+/g)]){let R=x+v.index,g=a.get(R)?.items;g?a.delete(R):g=[{offset:R,length:v[0].length,className:v[0]}];for(let S of g)S.className=S.className==="~"?p:S.className.replace(/^(!?)(.*)/,`$1${p}${f}$2`),w.items.push(S)}return"$".repeat(u.length)}),r-=1;while(i&&r);let l;if(typeof t=="string"){l="";let u=0;for(let[p,f]of a)l+=t.slice(u,p),l+=f.items.map(d=>d.className).join(" "),u=p+f.length;l+=t.slice(u)}else{l=t;for(let[u,p]of a)l.overwrite(u,u+p.length,p.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(s),hasChanged:i,groupsByOffset:a,get expanded(){return l.toString()}}}function Zt(t,e=["-",":"],r=5){let n=fo(t,e,r);return typeof t=="string"?n.expanded:t}var Xt=new Set;function Z(t){Xt.has(t)||(console.warn("[unocss]",t),Xt.add(t))}var De=/[\\:]?[\s'"`;{}]+/g;function po(t){return t.split(De)}var Ie={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return po(t)}};function Jt(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var xe="default",Be="preflights",ho="shortcuts",mo="imports",Qt={[mo]:-200,[Be]:-100,[ho]:-10,[xe]:0};function tr(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var er="_uno_resolved";function go(t){let e=typeof t=="function"?t():t;if(er in e)return e;e={...e},Object.defineProperty(e,er,{value:!0,enumerable:!1});let r=e.shortcuts?tr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=i=>{i[2]||(i[2]={});let o=i[2];o.prefix==null&&e.prefix&&(o.prefix=A(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}function rr(t){let e=go(t);if(!e.presets)return[e];let r=(e.presets||[]).flatMap(A).flatMap(rr);return[e,...r]}function ft(t={},e={}){let r=Object.assign({},e,t),n=Dt((r.presets||[]).flatMap(A).flatMap(rr),(m,b)=>m.name===b.name),i=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],o=[...i,r],s=[...o].reverse(),a=Object.assign({},Qt,...o.map(m=>m.layers));function l(m){return ie(o.flatMap(b=>A(b[m]||[])))}let u=l("extractors"),p=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;p===void 0&&(p=Ie),p&&!u.includes(p)&&u.unshift(p),u.sort((m,b)=>(m.order||0)-(b.order||0));let f=l("rules"),d={},h=f.length,x=f.map((m,b)=>{if(Bt(m)){A(m[2]?.prefix||"").forEach(T=>{d[T+m[0]]=[b,m[1],m[2],m]});return}return[b,...m]}).filter(Boolean).reverse(),w=bo(o.map(m=>m.theme)),v=l("extendTheme");for(let m of v)w=m(w)||w;let R={templates:ie(o.flatMap(m=>A(m.autocomplete?.templates))),extractors:o.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,b)=>(m.order||0)-(b.order||0)),shorthands:xo(o.map(m=>m.autocomplete?.shorthands||{}))},g=l("separators");g.length||(g=[":","-"]);let S={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:i,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:w,rulesSize:h,rulesDynamic:x,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(Gt).sort((m,b)=>(m.order||0)-(b.order||0)),shortcuts:tr(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:g,details:r.details??r.envMode==="dev"};for(let m of o)m?.configResolved?.(S);return S}function bo(t){return t.map(e=>e?me(e):{}).reduce((e,r)=>lt(e,r),{})}function xo(t){return t.reduce((e,r)=>{let n={};for(let i in r){let o=r[i];Array.isArray(o)?n[i]=`(${o.join("|")})`:n[i]=o}return{...e,...n}},{})}var nr="0.59.0-beta.1";var pt=class{constructor(e={},r={}){this.userConfig=e;this.defaults=r;this.config=ft(e,r),this.events.emit("config",this.config)}version=nr;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Jt();setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ft(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let i={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let o of this.config.extractors){let s=await o.extract?.(i);if(s)if(We(s)&&We(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...i)=>this.constructCustomCSS(n,...i),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let i=e;for(let u of this.config.preprocess)i=u(e);if(this.isBlocked(i)){this.blocked.add(e),this._cache.set(n,null);return}let o=await this.matchVariants(e,i);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(n,null);return}let s=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(s.variants=[...o[3]]);let a=await this.expandShortcut(s.currentSelector,s),l=a?await this.stringifyShortcuts(s.variantMatch,s,a[0],a[1]):(await this.parseUtil(s.variantMatch,s))?.map(u=>this.stringifyUtil(u,s)).filter(qt);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:i,preflights:o=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,p=V(e)?await this.applyExtractors(e,n,l?new be:new Set):Array.isArray(e)?new Set(e):e;s&&this.config.safelist.forEach(b=>{p.has(b)||p.add(b)});let f=a?"":`
|
|
2
2
|
`,d=new Set([xe]),h=l?new Map:new Set,x=new Map,w={},v=Array.from(p).map(async b=>{if(h.has(b))return;let k=await this.parseToken(b);if(k!=null){h instanceof Map?h.set(b,{data:k,count:We(p)?p.getCount(b):-1}):h.add(b);for(let T of k){let O=T[3]||"",U=T[4]?.layer;x.has(O)||x.set(O,[]),x.get(O).push(T),U&&d.add(U)}}});await Promise.all(v),await(async()=>{if(!o)return;let b={generator:this,theme:this.config.theme},k=new Set([]);this.config.preflights.forEach(({layer:T=Be})=>{d.add(T),k.add(T)}),w=Object.fromEntries(await Promise.all(Array.from(k).map(async T=>{let U=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Be)===T).map(async H=>await H.getCSS(b)))).filter(Boolean).join(f);return[T,U]})))})();let R=this.config.sortLayers(Array.from(d).sort((b,k)=>(this.config.layers[b]??0)-(this.config.layers[k]??0)||b.localeCompare(k))),g={},S=(b=xe)=>{if(g[b])return g[b];let k=Array.from(x).sort((O,U)=>(this.parentOrders.get(O[0])??0)-(this.parentOrders.get(U[0])??0)||O[0]?.localeCompare(U[0]||"")||0).map(([O,U])=>{let H=U.length,ne=U.filter(y=>(y[4]?.layer||xe)===b).sort((y,C)=>y[0]-C[0]||(y[4]?.sort||0)-(C[4]?.sort||0)||y[5]?.currentSelector?.localeCompare(C[5]?.currentSelector??"")||y[1]?.localeCompare(C[1]||"")||y[2]?.localeCompare(C[2]||"")||0).map(([,y,C,,M,,F])=>[[[(y&&$o(y,i))??"",M?.sort??0]],C,!!(F??M?.noMerge)]);if(!ne.length)return;let Me=ne.reverse().map(([y,C,M],F)=>{if(!M&&this.config.mergeSelectors)for(let q=F+1;q<H;q++){let B=ne[q];if(B&&!B[2]&&(y&&B[0]||y==null&&B[0]==null)&&B[1]===C)return y&&B[0]&&B[0].push(...y),null}let G=y?ie(y.sort((q,B)=>q[1]-B[1]||q[0]?.localeCompare(B[0]||"")||0).map(q=>q[0]).filter(Boolean)):[];return G.length?`${G.join(`,${f}`)}{${C}}`:C}).filter(Boolean).reverse().join(f);if(!O)return Me;let $=O.split(" $$ ");return`${$.join("{")}{${f}${Me}${f}${"}".repeat($.length)}`}).filter(Boolean).join(f);if(o&&(k=[w[b],k].filter(Boolean).join(f)),u&&k){let O=typeof u=="object"?u.cssLayerName?.(b):void 0;O!==null&&(O||(O=b),k=`@layer ${O}{${f}${k}${f}}`)}let T=a?"":`/* layer: ${b} */${f}`;return g[b]=k?T+k:""},m=(b=R,k)=>b.filter(T=>!k?.includes(T)).map(T=>S(T)||"").filter(Boolean).join(f);return{get css(){return m()},layers:R,matched:h,getLayers:m,getLayer:S}}async matchVariants(e,r){let n=new Set,i=[],o=r||e,s=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;s;){s=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let u=await l.match(o,a);if(u){if(V(u)){if(u===o)continue;u={matcher:u}}o=u.matcher,i.unshift(u),n.add(l),s=!0;break}}if(!s)break;if(i.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,o,i,n]}applyVariants(e,r=e[4],n=e[1]){let o=r.slice().sort((u,p)=>(u.order||0)-(p.order||0)).reduceRight((u,p)=>f=>{let d=p.body?.(f.entries)||f.entries,h=Array.isArray(p.parent)?p.parent:[p.parent,void 0];return(p.handle??vo)({...f,entries:d,selector:p.selector?.(f.selector,d)||f.selector,parent:h[0]||f.parent,parentOrder:h[1]||f.parentOrder,layer:p.layer||f.layer,sort:p.sort||f.sort},u)},u=>u)({prefix:"",selector:So(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:a}=o;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:s,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(let u of this.config.postprocess)u(l);return l}constructCustomCSS(e,r,n){let i=oe(r);if(V(i))return i;let{selector:o,entries:s,parent:a}=this.applyVariants([0,n||e.rawSelector,i,void 0,e.variantHandlers]),l=`${o}{${se(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,r,n=!1,i){let[o,s,a]=V(e)?await this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);let l=this.config.rulesStaticMap[s];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&r.rules.push(l[3]);let p=l[0],f=oe(l[1]),d=l[2];return V(f)?[[p,f,d]]:[[p,o,f,d,a]]}r.variantHandlers=a;let{rulesDynamic:u}=this.config;for(let[p,f,d,h]of u){if(h?.internal&&!n)continue;let x=s;if(h?.prefix){let g=A(h.prefix);if(i){let S=A(i);if(!g.some(m=>S.includes(m)))continue}else{let S=g.find(m=>s.startsWith(m));if(S==null)continue;x=s.slice(S.length)}}let w=x.match(f);if(!w)continue;let v=await d(w,r);if(!v)continue;this.config.details&&r.rules.push([f,d,h]);let R=It(v).filter(g=>g.length);if(R.length)return R.map(g=>V(g)?[p,g,h]:[p,o,g,h,a])}}stringifyUtil(e,r){if(!e)return;if(ut(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:i,parent:o,layer:s,sort:a,noMerge:l}=this.applyVariants(e),u=se(i);if(!u)return;let{layer:p,sort:f,...d}=e[3]??{},h={...d,layer:s??p,sort:a??f};return[e[0],n,u,o,h,this.config.details?r:void 0,l]}async expandShortcut(e,r,n=5){if(n===0)return;let i=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Yt,o,s;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let p=A(a[2].prefix).find(f=>e.startsWith(f));if(p==null)continue;l=e.slice(p.length)}if(Kt(a)){if(a[0]===l){o=o||a[2],s=a[1],i(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){o=o||a[2],i(a);break}}}if(V(s)&&(s=Zt(s.trim()).split(/\s+/g)),!s){let[a,l]=V(e)?await this.matchVariants(e):e;if(a!==l){let u=await this.expandShortcut(l,r,n-1);u&&(s=u[0].map(p=>V(p)?a.replace(l,p):p))}}if(s)return[(await Promise.all(s.map(async a=>(V(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),o]}async stringifyShortcuts(e,r,n,i={layer:this.config.shortcutsLayer}){let o=new Fe,s=(await Promise.all(ie(n).map(async p=>{let f=V(p)?await this.parseUtil(p,r,!0,i.prefix):[[Number.POSITIVE_INFINITY,"{inline}",oe(p),void 0,[]]];return!f&&this.config.warn&&Z(`unmatched utility "${p}" in shortcut "${e[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((p,f)=>p[0]-f[0]),[a,,l]=e,u=[];for(let p of s){if(ut(p)){u.push([p[0],void 0,p[1],void 0,p[2],r,void 0]);continue}let{selector:f,entries:d,parent:h,sort:x,noMerge:w,layer:v}=this.applyVariants(p,[...p[4],...l],a);o.getFallback(v??i.layer,new Ue).getFallback(f,h,[[],p[0]])[0].push([d,!!(w??p[3]?.noMerge),x??0])}return u.concat(o.flatMap((p,f)=>p.map(([d,h],x,w)=>{let v=(g,S,m)=>{let b=Math.max(...m.map(T=>T[1])),k=m.map(T=>T[0]);return(g?[k.flat(1)]:k).map(T=>{let O=se(T);if(O)return[h,x,O,w,{...i,noMerge:S,sort:b,layer:f},r,void 0]})};return[[d.filter(([,g])=>g).map(([g,,S])=>[g,S]),!0],[d.filter(([,g])=>!g).map(([g,,S])=>[g,S]),!1]].map(([g,S])=>[...v(!1,S,g.filter(([m])=>m.some(b=>b[0]===ct))),...v(!0,S,g.filter(([m])=>m.every(b=>b[0]!==ct)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.some(r=>typeof r=="function"?r(e):V(r)?r===e:r.test(e))}};function or(t,e){return new pt(t,e)}var sr=/\s\$\$\s+/g;function wo(t){return sr.test(t)}function $o(t,e){return wo(t)?t.replace(sr,e?` ${e} `:" "):e?`${e} ${t}`:t}var ir=/^\[(.+?)(~?=)"(.*)"\]$/;function So(t){return ir.test(t)?t.replace(ir,(e,r,n,i)=>`[${Le(r)}${n}"${Le(i)}"]`):`.${Le(t)}`}function vo(t,e){return e(t)}var Co=/\/\/#\s*sourceMappingURL=.*\n?/g;function ar(t){return t.includes("sourceMappingURL=")?t.replace(Co,""):t}var ko=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Ro=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,To=/^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Eo(t){let e=[];for(let r of t.matchAll(Ro))r.index!==0&&!/^[\s'"`]/.test(t[r.index-1]??"")||e.push(r[0]);for(let r of t.matchAll(ko))e.push(r[0]);return t.split(De).forEach(r=>{ge(r)&&!To.test(r)&&e.push(r)}),e}var lr={name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return Eo(ar(t))}};var cr=[{layer:"preflights",getCSS(t){if(t.theme.preflightBase){let e=se(Object.entries(t.theme.preflightBase));return A(t.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${e}}`).join("")}}}];var W={l:["-left"],r:["-right"],t:["-top"],b:["-bottom"],s:["-inline-start"],e:["-inline-end"],x:["-left","-right"],y:["-top","-bottom"],"":[""],bs:["-block-start"],be:["-block-end"],is:["-inline-start"],ie:["-inline-end"],block:["-block-start","-block-end"],inline:["-inline-start","-inline-end"]},dt={...W,s:["-inset-inline-start"],start:["-inset-inline-start"],e:["-inset-inline-end"],end:["-inset-inline-end"],bs:["-inset-block-start"],be:["-inset-block-end"],is:["-inset-inline-start"],ie:["-inset-inline-end"],block:["-inset-block-start","-inset-block-end"],inline:["-inset-inline-start","-inset-inline-end"]},ht={l:["-top-left","-bottom-left"],r:["-top-right","-bottom-right"],t:["-top-left","-top-right"],b:["-bottom-left","-bottom-right"],tl:["-top-left"],lt:["-top-left"],tr:["-top-right"],rt:["-top-right"],bl:["-bottom-left"],lb:["-bottom-left"],br:["-bottom-right"],rb:["-bottom-right"],"":[""],bs:["-start-start","-start-end"],be:["-end-start","-end-end"],s:["-end-start","-start-start"],is:["-end-start","-start-start"],e:["-start-end","-end-end"],ie:["-start-end","-end-end"],ss:["-start-start"],"bs-is":["-start-start"],"is-bs":["-start-start"],se:["-start-end"],"bs-ie":["-start-end"],"ie-bs":["-start-end"],es:["-end-start"],"be-is":["-end-start"],"is-be":["-end-start"],ee:["-end-end"],"be-ie":["-end-end"],"ie-be":["-end-end"]},fr={x:["-x"],y:["-y"],z:["-z"],"":["-x","-y"]},pr=["x","y","z"],ur=["top","top center","top left","top right","bottom","bottom center","bottom left","bottom right","left","left center","left top","left bottom","right","right center","right top","right bottom","center","center top","center bottom","center left","center right","center center"],ye=Object.assign({},...ur.map(t=>({[t.replace(/ /,"-")]:t})),...ur.map(t=>({[t.replace(/\b(\w)\w+/g,"$1").replace(/ /,"")]:t}))),E=["inherit","initial","revert","revert-layer","unset"],we=/^(calc|clamp|min|max)\s*\((.+)\)(.*)/;function ae(t,e,r){if(t==="")return;let n=t.length,i=0,o=!1,s=0;for(let a=0;a<n;a++)switch(t[a]){case e:o||(o=!0,s=a),i++;break;case r:if(--i,i<0)return;if(i===0)return[t.slice(s,a+1),t.slice(a+1),t.slice(0,s)];break}}function le(t,e,r,n){if(t===""||(V(n)&&(n=[n]),n.length===0))return;let i=t.length,o=0;for(let s=0;s<i;s++)switch(t[s]){case e:o++;break;case r:if(--o<0)return;break;default:for(let a of n){let l=a.length;if(l&&a===t.slice(s,s+l)&&o===0)return s===0||s===i-l?void 0:[t.slice(0,s),t.slice(s+l)]}}return[t,""]}function ce(t,e,r){r=r??10;let n=[],i=0;for(;t!=="";){if(++i>r)return;let o=le(t,"(",")",e);if(!o)return;let[s,a]=o;n.push(s),t=a}if(n.length>0)return n}var mt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],dr=["%alpha","<alpha-value>"],jo=new RegExp(dr.map(t=>Y(t)).join("|"));function X(t=""){let e=Oo(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:i}=e,o=r.toLowerCase();if(n.length!==0&&!(mt.includes(o)&&![1,3].includes(n.length)))return{type:o,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof i=="string"?i.trim():i}}function $e(t){let e=t.alpha??1;return typeof e=="string"&&dr.includes(e)?1:e}function L(t,e){if(typeof t=="string")return t.replace(jo,`${e??1}`);let{components:r}=t,{alpha:n,type:i}=t;return n=e??n,i=i.toLowerCase(),["hsla","rgba"].includes(i)?`${i}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,mt.includes(i)?`${i}(${r.join(" ")}${n})`:`color(${i} ${r.join(" ")}${n})`)}function Oo(t){if(!t)return;let e=Ao(t);if(e!=null||(e=Vo(t),e!=null)||(e=zo(t),e!=null)||(e=Mo(t),e!=null)||(e=Lo(t),e!=null))return e}function Ao(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,i=>Number.parseInt(i,16)).map(i=>i<<4|i);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function Vo(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function zo(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,i=ce(n,",",5);if(i){if([3,4].includes(i.length))return{type:r,components:i.slice(0,3),alpha:i[3]};if(i.length!==1)return!1}}var Po=new RegExp(`^(${mt.join("|")})\\((.+)\\)$`,"i");function Mo(t){let e=t.match(Po);if(!e)return;let[,r,n]=e,i=hr(`${r} ${n}`);if(i){let{alpha:o,components:[s,...a]}=i;return{type:s,components:a,alpha:o}}}function Lo(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=hr(e[1]);if(r){let{alpha:n,components:[i,...o]}=r;return{type:i,components:o,alpha:n}}}function hr(t){let e=ce(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let o=e.splice(r-2);e.push(o.join(" ")),--r}let n=ce(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let i=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:i}}function mr(t){let e=function(n){let i=this.__options?.sequence||[];this.__options.sequence=[];for(let o of i){let s=t[o](n);if(s!=null)return s}};function r(n,i){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(i),n}for(let n of Object.keys(t))Object.defineProperty(e,n,{enumerable:!0,get(){return r(this,n)}});return e}function ue(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,...e(s)})}},autocomplete:`${t}:`}}function Se(t,e){let r;return{name:t,match(n,i){r||(r=new RegExp(`^${Y(t)}(?:${i.generator.config.separators.join("|")})`));let o=n.match(r);if(o)return{matcher:n.slice(o[0].length),handle:(s,a)=>a({...s,parent:`${s.parent?`${s.parent} $$ `:""}${e}`})}},autocomplete:`${t}:`}}function J(t,e,r){if(e.startsWith(`${t}[`)){let[n,i]=ae(e.slice(t.length),"[","]")??[];if(n&&i){for(let o of r)if(i.startsWith(o))return[n,i.slice(o.length),o];return[n,i,""]}}}function P(t,e,r){if(e.startsWith(t)){let n=J(t,e,r);if(n){let[i="",o=n[1]]=P("/",n[1],r)??[];return[n[0],o,i]}for(let i of r.filter(o=>o!=="/")){let o=e.indexOf(i,t.length);if(o!==-1){let s=e.indexOf("/",t.length),a=s===-1||o<=s;return[e.slice(t.length,a?o:s),e.slice(o+i.length),a?"":e.slice(s+1,o)]}}}}var gr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",br=new Uint8Array(64),_o=new Uint8Array(128);for(let t=0;t<gr.length;t++){let e=gr.charCodeAt(t);br[t]=e,_o[e]=t}var gt=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}};function xr(t){let e=new Int32Array(5),r=1024*16,n=r-36,i=new Uint8Array(r),o=i.subarray(0,n),s=0,a="";for(let l=0;l<t.length;l++){let u=t[l];if(l>0&&(s===r&&(a+=gt.decode(i),s=0),i[s++]=59),u.length!==0){e[0]=0;for(let p=0;p<u.length;p++){let f=u[p];s>n&&(a+=gt.decode(o),i.copyWithin(0,n,s),s-=n),p>0&&(i[s++]=44),s=ve(i,s,e,f,0),f.length!==1&&(s=ve(i,s,e,f,1),s=ve(i,s,e,f,2),s=ve(i,s,e,f,3),f.length!==4&&(s=ve(i,s,e,f,4)))}}}return a+gt.decode(i.subarray(0,s))}function ve(t,e,r,n,i){let o=n[i],s=o-r[i];r[i]=o,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),t[e++]=br[a]}while(s>0);return e}var Ke=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},He=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),i=this.original.slice(r);this.original=n;let o=new t(e,this.end,i);return o.outro=this.outro,this.outro="",this.end=e,this.edited?(o.edit("",!1),this.content=""):this.content=n,o.next=this.next,o.next&&(o.next.previous=o),o.previous=this,this.next=o,o}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function Uo(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var Fo=Uo(),bt=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=xr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Fo(this.toString())}};function Wo(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(o=>/^\t+/.test(o)),n=e.filter(o=>/^ {2,}/.test(o));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let i=n.reduce((o,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,o)},1/0);return new Array(i+1).join(" ")}function No(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let i=r.length;for(;i--;)r[i]=".."}return r.concat(n).join("/")}var Do=Object.prototype.toString;function Io(t){return Do.call(t)==="[object Object]"}function yr(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,i=0;n<e.length;n++)r.push(i),i+=e[n].length+1;return function(i){let o=0,s=r.length;for(;o<s;){let u=o+s>>1;i<r[u]?s=u:o=u+1}let a=o-1,l=i-r[a];return{line:a,column:l}}}var Bo=/\w/,xt=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,i){if(r.length){let o=r.length-1,s=r.indexOf(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.59.0-beta.1",
|
|
4
5
|
"description": "CSS-in-JS Runtime for UnoCSS",
|
|
5
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
7
|
"license": "MIT",
|
|
@@ -21,12 +22,11 @@
|
|
|
21
22
|
"exports": {
|
|
22
23
|
".": {
|
|
23
24
|
"types": "./dist/index.d.ts",
|
|
24
|
-
"
|
|
25
|
-
"require": "./dist/index.js"
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"main": "./dist/index.js",
|
|
29
|
-
"module": "./dist/index.
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
30
|
"unpkg": "./uno.global.js",
|
|
31
31
|
"jsdelivr": "./uno.global.js",
|
|
32
32
|
"types": "./dist/index.d.ts",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/preset-attributify": "0.
|
|
39
|
-
"@unocss/
|
|
40
|
-
"@unocss/
|
|
38
|
+
"@unocss/preset-attributify": "0.59.0-beta.1",
|
|
39
|
+
"@unocss/core": "0.59.0-beta.1",
|
|
40
|
+
"@unocss/preset-uno": "0.59.0-beta.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
|
|
44
44
|
"build:cdn": "tsup src/cdn/*.ts --format iife --minify --out-dir .",
|
|
45
|
-
"build:node": "tsup
|
|
45
|
+
"build:node": "tsup --config tsup.node-config.ts",
|
|
46
46
|
"build:presets": "tsup src/presets/*.ts --format iife --minify --out-dir .",
|
|
47
47
|
"watch": "tsup src/cdn/*.ts --format iife --watch src --out-dir .",
|
|
48
48
|
"dev": "nr watch & live-server --open=/play"
|