@unocss/runtime 0.30.1 → 0.30.4

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/core.global.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var mt=Object.defineProperty,yt=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var W=(n,t,e)=>t in n?mt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,$=(n,t)=>{for(var e in t||(t={}))N.call(t,e)&&W(n,e,t[e]);if(D)for(var e of D(t))Z.call(t,e)&&W(n,e,t[e]);return n},V=(n,t)=>yt(n,St(t));var J=(n,t)=>{var e={};for(var r in n)N.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&D)for(var r of D(n))t.indexOf(r)<0&&Z.call(n,r)&&(e[r]=n[r]);return e};function xt(n){let t=n.length,e=-1,r,s="",i=n.charCodeAt(0);for(;++e<t;){if(r=n.charCodeAt(e),r===0){s+="\uFFFD";continue}if(r===44){s+="\\2c ";continue}if(r>=1&&r<=31||r===127||e===0&&r>=48&&r<=57||e===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(e===0&&t===1&&r===45){s+=`\\${n.charAt(e)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=n.charAt(e);continue}s+=`\\${n.charAt(e)}`}return s}var K=xt;function P(n){return(Array.isArray(n)?n:Object.entries(n)).filter(t=>t[1]!=null)}function Q(n){return Array.isArray(n)?n.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?n.map(t=>P(t)):[n]:[P(n)]}function Ct(n){return n.filter(([t,e],r)=>{if(t.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(n[s][0]===t&&n[s][1]===e)return!1;return!0})}function k(n){return n==null?"":Ct(n).map(([t,e])=>e!=null?`${t}:${e};`:void 0).filter(Boolean).join("")}function L(n){return n&&typeof n=="object"&&!Array.isArray(n)}function z(n,t){let e=n,r=t;if(Array.isArray(e)&&Array.isArray(r))return[...e,...r];if(Array.isArray(e))return[...e];let s=$({},e);return L(e)&&L(r)&&Object.keys(r).forEach(i=>{L(r[i])?i in e?s[i]=z(e[i],r[i]):Object.assign(s,{[i]:r[i]}):Object.assign(s,{[i]:r[i]})}),s}function v(n){let t,e,r;if(Array.isArray(n)){for(e=Array(t=n.length);t--;)e[t]=(r=n[t])&&typeof r=="object"?v(r):r;return e}if(Object.prototype.toString.call(n)==="[object Object]"){e={};for(t in n)t==="__proto__"?Object.defineProperty(e,t,{value:v(n[t]),configurable:!0,enumerable:!0,writable:!0}):e[t]=(r=n[t])&&typeof r=="object"?v(r):r;return e}return n}function X(n){return typeof n[0]=="string"}function Y(n){return typeof n[0]=="string"}function M(n=[]){return Array.isArray(n)?n:[n]}function j(n){return Array.from(new Set(n))}var bt=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/,F="$$shortcut-no-merge";function tt(n=""){return bt.test(n)}function et(n){return typeof n=="function"?{match:n}:n}function G(n){return n.length===3}function rt(n){return n!=null}var B=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.has(e)||s.set(e,r),s.get(e)}set(t,e,r){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.set(e,r),this}has(t,e){var r;return(r=this._map.get(t))==null?void 0:r.has(e)}delete(t,e){var r;return((r=this._map.get(t))==null?void 0:r.delete(e))||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([s,i])=>t(i,e,s)))}};var nt=/([!\w+:_/-]+?)([:-])\(((?:[!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;function st(n){return nt.lastIndex=0,n.replace(nt,(t,e,r,s)=>s.split(/\s/g).map(i=>i.replace(/^(!?)(.*)/,`$1${e}${r}$2`)).join(" "))}var it=new Set;function ot(n){it.has(n)||(console.warn("[unocss]",n),it.add(n))}var Rt=n=>n.split(/[\s'"`;>=]+/g).filter(tt),H={name:"split",order:0,extract({code:n}){return new Set(Rt(n))}};function wt(n){return M(n).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Ut={shortcuts:-1,default:0};function I(n={},t={}){let e=Object.assign({},t,n),r=(e.presets||[]).flatMap(M),s=[...r.filter(l=>l.enforce==="pre"),...r.filter(l=>!l.enforce),...r.filter(l=>l.enforce==="post")],i=Object.assign(Ut,...r.map(l=>l.layers),n.layers);function o(l){return j([...s.flatMap(g=>M(g[l]||[])),...M(e[l]||[])])}let a=o("extractors");a.length||a.push(H),a.sort((l,g)=>(l.order||0)-(g.order||0));let c=o("rules"),u={},h=c.length;c.forEach((l,g)=>{X(l)&&(u[l[0]]=[g,l[1],l[2]],delete c[g])});let x=v([...s.map(l=>l.theme||{}),e.theme||{}].reduce((l,g)=>z(l,g),{}));o("extendTheme").forEach(l=>l(x));let R={templates:j(s.map(l=>{var g;return M((g=l.autocomplete)==null?void 0:g.templates)}).flat()),extractors:s.map(l=>{var g;return M((g=l.autocomplete)==null?void 0:g.extractors)}).flat().sort((l,g)=>(l.order||0)-(g.order||0))};return V($({mergeSelectors:!0,warn:!0,blocklist:[],safelist:[],sortLayers:l=>l},e),{presets:s,envMode:e.envMode||"build",shortcutsLayer:e.shortcutsLayer||"shortcuts",layers:i,theme:x,rulesSize:h,rulesDynamic:c,rulesStaticMap:u,preprocess:o("preprocess"),postprocess:o("postprocess"),preflights:o("preflights"),autocomplete:R,variants:o("variants").map(et),shortcuts:wt(o("shortcuts")),extractors:a})}var at="0.30.1";var lt=class{constructor(t={},e={}){this.userConfig=t;this.defaults=e;this.config=I(t,e)}version=at;_cache=new Map;config;blocked=new Set;parentOrders=new Map;setConfig(t,e){!t||(e&&(this.defaults=e),this.userConfig=t,this.config=I(t,this.defaults),this.blocked.clear(),this.parentOrders.clear(),this._cache.clear())}async applyExtractors(t,e,r=new Set){let s={get original(){return t},code:t,id:e};for(let i of this.config.extractors){let o=await i.extract(s);o==null||o.forEach(a=>r.add(a))}return r}makeContext(t,e){let r={rawSelector:t,currentSelector:e[1],theme:this.config.theme,generator:this,variantHandlers:e[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:e};return r}async parseToken(t,e){var c;if(this.blocked.has(t))return;let r=`${t}${e?` ${e}`:""}`;if(this._cache.has(r))return this._cache.get(r);let s=t;for(let u of this.config.preprocess)s=u(t);if(this.isBlocked(s)){this.blocked.add(t),this._cache.set(r,null);return}let i=this.matchVariants(t,s);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(r,null);return}let o=this.makeContext(t,[e||i[0],i[1],i[2],i[3]]),a=this.expandShortcut(o.currentSelector,o);if(a){let u=await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]);if(u!=null&&u.length)return this._cache.set(r,u),u}else{let u=(c=await this.parseUtil(o.variantMatch,o))==null?void 0:c.map(h=>this.stringifyUtil(h)).filter(rt);if(u!=null&&u.length)return this._cache.set(r,u),u}this._cache.set(r,null)}async generate(t="",{id:e,scope:r,preflights:s=!0,safelist:i=!0,minify:o=!1}={}){let a=typeof t=="string"?await this.applyExtractors(t,e):t;i&&this.config.safelist.forEach(p=>a.add(p));let c=o?"":`
1
+ (()=>{var mt=Object.defineProperty,yt=Object.defineProperties;var St=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var W=(n,t,e)=>t in n?mt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,$=(n,t)=>{for(var e in t||(t={}))N.call(t,e)&&W(n,e,t[e]);if(D)for(var e of D(t))Z.call(t,e)&&W(n,e,t[e]);return n},V=(n,t)=>yt(n,St(t));var J=(n,t)=>{var e={};for(var r in n)N.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&D)for(var r of D(n))t.indexOf(r)<0&&Z.call(n,r)&&(e[r]=n[r]);return e};function xt(n){let t=n.length,e=-1,r,s="",i=n.charCodeAt(0);for(;++e<t;){if(r=n.charCodeAt(e),r===0){s+="\uFFFD";continue}if(r===44){s+="\\2c ";continue}if(r>=1&&r<=31||r===127||e===0&&r>=48&&r<=57||e===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(e===0&&t===1&&r===45){s+=`\\${n.charAt(e)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=n.charAt(e);continue}s+=`\\${n.charAt(e)}`}return s}var K=xt;function P(n){return(Array.isArray(n)?n:Object.entries(n)).filter(t=>t[1]!=null)}function Q(n){return Array.isArray(n)?n.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?n.map(t=>P(t)):[n]:[P(n)]}function Ct(n){return n.filter(([t,e],r)=>{if(t.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(n[s][0]===t&&n[s][1]===e)return!1;return!0})}function k(n){return n==null?"":Ct(n).map(([t,e])=>e!=null?`${t}:${e};`:void 0).filter(Boolean).join("")}function L(n){return n&&typeof n=="object"&&!Array.isArray(n)}function z(n,t){let e=n,r=t;if(Array.isArray(e)&&Array.isArray(r))return[...e,...r];if(Array.isArray(e))return[...e];let s=$({},e);return L(e)&&L(r)&&Object.keys(r).forEach(i=>{L(r[i])?i in e?s[i]=z(e[i],r[i]):Object.assign(s,{[i]:r[i]}):Object.assign(s,{[i]:r[i]})}),s}function v(n){let t,e,r;if(Array.isArray(n)){for(e=Array(t=n.length);t--;)e[t]=(r=n[t])&&typeof r=="object"?v(r):r;return e}if(Object.prototype.toString.call(n)==="[object Object]"){e={};for(t in n)t==="__proto__"?Object.defineProperty(e,t,{value:v(n[t]),configurable:!0,enumerable:!0,writable:!0}):e[t]=(r=n[t])&&typeof r=="object"?v(r):r;return e}return n}function X(n){return typeof n[0]=="string"}function Y(n){return typeof n[0]=="string"}function M(n=[]){return Array.isArray(n)?n:[n]}function j(n){return Array.from(new Set(n))}var bt=/(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/,F="$$shortcut-no-merge";function tt(n=""){return bt.test(n)}function et(n){return typeof n=="function"?{match:n}:n}function G(n){return n.length===3}function rt(n){return n!=null}var B=class{_map=new Map;get(t,e){let r=this._map.get(t);if(r)return r.get(e)}getFallback(t,e,r){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.has(e)||s.set(e,r),s.get(e)}set(t,e,r){let s=this._map.get(t);return s||(s=new Map,this._map.set(t,s)),s.set(e,r),this}has(t,e){var r;return(r=this._map.get(t))==null?void 0:r.has(e)}delete(t,e){var r;return((r=this._map.get(t))==null?void 0:r.delete(e))||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,r])=>Array.from(r.entries()).map(([s,i])=>t(i,e,s)))}};var nt=/([!\w+:_/-]+?)([:-])\(((?:[!\w\s:/\\,%#.$-]|\[.*?\])*?)\)/gm;function st(n){return nt.lastIndex=0,n.replace(nt,(t,e,r,s)=>s.split(/\s/g).map(i=>i.replace(/^(!?)(.*)/,`$1${e}${r}$2`)).join(" "))}var it=new Set;function ot(n){it.has(n)||(console.warn("[unocss]",n),it.add(n))}var Rt=n=>n.split(/[\s'"`;>=]+/g).filter(tt),H={name:"split",order:0,extract({code:n}){return new Set(Rt(n))}};function wt(n){return M(n).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Ut={shortcuts:-1,default:0};function I(n={},t={}){let e=Object.assign({},t,n),r=(e.presets||[]).flatMap(M),s=[...r.filter(l=>l.enforce==="pre"),...r.filter(l=>!l.enforce),...r.filter(l=>l.enforce==="post")],i=Object.assign(Ut,...r.map(l=>l.layers),n.layers);function o(l){return j([...s.flatMap(g=>M(g[l]||[])),...M(e[l]||[])])}let a=o("extractors");a.length||a.push(H),a.sort((l,g)=>(l.order||0)-(g.order||0));let c=o("rules"),u={},h=c.length;c.forEach((l,g)=>{X(l)&&(u[l[0]]=[g,l[1],l[2]],delete c[g])});let x=v([...s.map(l=>l.theme||{}),e.theme||{}].reduce((l,g)=>z(l,g),{}));o("extendTheme").forEach(l=>l(x));let R={templates:j(s.map(l=>{var g;return M((g=l.autocomplete)==null?void 0:g.templates)}).flat()),extractors:s.map(l=>{var g;return M((g=l.autocomplete)==null?void 0:g.extractors)}).flat().sort((l,g)=>(l.order||0)-(g.order||0))};return V($({mergeSelectors:!0,warn:!0,blocklist:[],safelist:[],sortLayers:l=>l},e),{presets:s,envMode:e.envMode||"build",shortcutsLayer:e.shortcutsLayer||"shortcuts",layers:i,theme:x,rulesSize:h,rulesDynamic:c,rulesStaticMap:u,preprocess:o("preprocess"),postprocess:o("postprocess"),preflights:o("preflights"),autocomplete:R,variants:o("variants").map(et),shortcuts:wt(o("shortcuts")),extractors:a})}var at="0.30.4";var lt=class{constructor(t={},e={}){this.userConfig=t;this.defaults=e;this.config=I(t,e)}version=at;_cache=new Map;config;blocked=new Set;parentOrders=new Map;setConfig(t,e){!t||(e&&(this.defaults=e),this.userConfig=t,this.config=I(t,this.defaults),this.blocked.clear(),this.parentOrders.clear(),this._cache.clear())}async applyExtractors(t,e,r=new Set){let s={get original(){return t},code:t,id:e};for(let i of this.config.extractors){let o=await i.extract(s);o==null||o.forEach(a=>r.add(a))}return r}makeContext(t,e){let r={rawSelector:t,currentSelector:e[1],theme:this.config.theme,generator:this,variantHandlers:e[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:e};return r}async parseToken(t,e){var c;if(this.blocked.has(t))return;let r=`${t}${e?` ${e}`:""}`;if(this._cache.has(r))return this._cache.get(r);let s=t;for(let u of this.config.preprocess)s=u(t);if(this.isBlocked(s)){this.blocked.add(t),this._cache.set(r,null);return}let i=this.matchVariants(t,s);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(r,null);return}let o=this.makeContext(t,[e||i[0],i[1],i[2],i[3]]),a=this.expandShortcut(o.currentSelector,o);if(a){let u=await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]);if(u!=null&&u.length)return this._cache.set(r,u),u}else{let u=(c=await this.parseUtil(o.variantMatch,o))==null?void 0:c.map(h=>this.stringifyUtil(h)).filter(rt);if(u!=null&&u.length)return this._cache.set(r,u),u}this._cache.set(r,null)}async generate(t="",{id:e,scope:r,preflights:s=!0,safelist:i=!0,minify:o=!1}={}){let a=typeof t=="string"?await this.applyExtractors(t,e):t;i&&this.config.safelist.forEach(p=>a.add(p));let c=o?"":`
2
2
  `,u=new Set(["default"]),h=new Set,x=new Map;await Promise.all(Array.from(a).map(async p=>{var y;if(h.has(p))return;let d=await this.parseToken(p);if(d!=null){h.add(p);for(let S of d){let b=S[3]||"";x.has(b)||x.set(b,[]),x.get(b).push(S),(y=S[4])!=null&&y.layer&&u.add(S[4].layer)}}})),s&&this.config.preflights.forEach(p=>{p.layer&&u.add(p.layer)});let R={},l=this.config.sortLayers(Array.from(u).sort((p,d)=>{var y,S;return((y=this.config.layers[p])!=null?y:0)-((S=this.config.layers[d])!=null?S:0)||p.localeCompare(d)})),g={};if(s){let p={generator:this,theme:this.config.theme};g=Object.fromEntries(await Promise.all(l.map(async d=>{let S=(await Promise.all(this.config.preflights.filter(b=>(b.layer||"default")===d).map(async b=>await b.getCSS(p)))).filter(Boolean).join(c);return[d,S]})))}let A=p=>{if(R[p])return R[p];let d=Array.from(x).sort((y,S)=>{var b,U,f;return((b=this.parentOrders.get(y[0]))!=null?b:0)-((U=this.parentOrders.get(S[0]))!=null?U:0)||((f=y[0])==null?void 0:f.localeCompare(S[0]||""))||0}).map(([y,S])=>{let b=S.length,U=S.filter(m=>{var w;return(((w=m[4])==null?void 0:w.layer)||"default")===p}).sort((m,w)=>{var _,T,E;return m[0]-w[0]||(((_=m[4])==null?void 0:_.sort)||0)-(((T=w[4])==null?void 0:T.sort)||0)||((E=m[1])==null?void 0:E.localeCompare(w[1]||""))||0}).map(m=>{var w;return[m[1]?$t(m[1],r):m[1],m[2],!!((w=m[4])!=null&&w.noMerge)]}).map(m=>[m[0]==null?m[0]:[m[0]],m[1],m[2]]);if(!U.length)return;let f=U.reverse().map(([m,w,_],T)=>{if(!_&&m&&this.config.mergeSelectors)for(let E=T+1;E<b;E++){let O=U[E];if(O&&!O[2]&&O[0]&&O[1]===w)return O[0].push(...m),null}return m?`${[...new Set(m)].join(`,${c}`)}{${w}}`:w}).filter(Boolean).reverse().join(c);return y?`${y}{${c}${f}${c}}`:f}).filter(Boolean).join(c);return s&&(d=[g[p],d].filter(Boolean).join(c)),R[p]=!o&&d?`/* layer: ${p} */${c}${d}`:d},C=(p=l,d)=>p.filter(y=>!(d!=null&&d.includes(y))).map(y=>A(y)||"").filter(Boolean).join(c);return{get css(){return C()},layers:l,getLayers:C,getLayer:A,matched:h}}matchVariants(t,e){let r=new Set,s=[],i=e||t,o=!1,a={rawSelector:t,theme:this.config.theme,generator:this};for(;;){o=!1;for(let c of this.config.variants){if(!c.multiPass&&r.has(c))continue;let u=c.match(i,a);if(!!u){typeof u=="string"&&(u={matcher:u}),i=u.matcher,Array.isArray(u.parent)&&this.parentOrders.set(u.parent[0],u.parent[1]),s.push(u),r.add(c),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,s,r]}applyVariants(t,e=t[4],r=t[1]){let s=[...e].sort((a,c)=>(a.order||0)-(c.order||0)),i=s.reduce((a,c)=>{var u;return((u=c.body)==null?void 0:u.call(c,a))||a},t[2]),o={selector:s.reduce((a,c)=>{var u;return((u=c.selector)==null?void 0:u.call(c,a,i))||a},Mt(r)),entries:i,parent:s.reduce((a,c)=>Array.isArray(c.parent)?c.parent[0]:c.parent||a,void 0),layer:s.reduce((a,c)=>c.layer||a,void 0),sort:s.reduce((a,c)=>c.sort||a,void 0)};for(let a of this.config.postprocess)a(o);return o}constructCustomCSS(t,e,r){e=P(e);let{selector:s,entries:i,parent:o}=this.applyVariants([0,r||t.rawSelector,e,void 0,t.variantHandlers]),a=`${s}{${k(i)}}`;return o?`${o}{${a}}`:a}async parseUtil(t,e,r=!1){var h,x;let[s,i,o]=typeof t=="string"?this.matchVariants(t):t,a=this.config.rulesStaticMap[i];if(a&&a[1]&&(r||!((h=a[2])!=null&&h.internal)))return[[a[0],s,P(a[1]),a[2],o]];e.variantHandlers=o;let{rulesDynamic:c,rulesSize:u}=this.config;for(let R=u-1;R>=0;R--){let l=c[R];if(!l||((x=l[2])==null?void 0:x.internal)&&!r)continue;let[g,A,C]=l,p=i.match(g);if(!p)continue;let d=await A(p,e);if(!d)continue;if(typeof d=="string")return[[R,d,C]];let y=Q(d).filter(S=>S.length);if(y.length)return y.map(S=>[R,s,S,C,o])}}stringifyUtil(t){var R;if(!t)return;if(G(t))return[t[0],void 0,t[1],void 0,t[2]];let{selector:e,entries:r,parent:s,layer:i,sort:o}=this.applyVariants(t),a=k(r);if(!a)return;let l=(R=t[3])!=null?R:{},{layer:c,sort:u}=l,h=J(l,["layer","sort"]),x=V($({},h),{layer:i!=null?i:c,sort:o!=null?o:u});return[t[0],e,a,s,x]}expandShortcut(t,e,r=3){if(r===0)return;let s,i;for(let o of this.config.shortcuts)if(Y(o)){if(o[0]===t){s=s||o[2],i=o[1];break}}else{let a=t.match(o[0]);if(a&&(i=o[1](a,e)),i){s=s||o[2];break}}if(typeof i=="string"&&(i=st(i).split(/\s+/g)),!!i)return[i.flatMap(o=>{var a;return((a=this.expandShortcut(o,e,r-1))==null?void 0:a[0])||[o]}).filter(o=>o!==""),s]}async stringifyShortcuts(t,e,r,s={layer:this.config.shortcutsLayer}){var u;let i=new B,o=(await Promise.all(j(r).map(async h=>{let x=await this.parseUtil(h,e,!0);return x||ot(`unmatched utility "${h}" in shortcut "${t[1]}"`),x||[]}))).flat(1).filter(Boolean).sort((h,x)=>h[0]-x[0]),[a,,c]=t;for(let h of o){if(G(h))continue;let{selector:x,entries:R,parent:l,sort:g}=this.applyVariants(h,[...h[4],...c],a);i.getFallback(x,l,[[],h[0]])[0].push([R,!!((u=h[3])!=null&&u.noMerge),g!=null?g:0])}return i.map(([h,x],R,l)=>{let g=(C,p,d)=>{let y=Math.max(...d.map(b=>b[1])),S=d.map(b=>b[0]);return(C?[S.flat(1)]:S).map(b=>{let U=k(b);if(U)return[x,R,U,l,V($({},s),{noMerge:p,sort:y})]})};return[[h.filter(([,C])=>C).map(([C,,p])=>[C,p]),!0],[h.filter(([,C])=>!C).map(([C,,p])=>[C,p]),!1]].map(([C,p])=>[...g(!1,p,C.filter(([d])=>d.some(y=>y[0]===F))),...g(!0,p,C.filter(([d])=>d.every(y=>y[0]!==F)))])}).flat(2).filter(Boolean)}isBlocked(t){return!t||this.config.blocklist.some(e=>typeof e=="string"?e===t:e.test(t))}};function ut(n,t){return new lt(n,t)}var ft=/ \$\$ /,At=n=>n.match(ft);function $t(n,t){return At(n)?n.replace(ft,t?` ${t} `:" "):t?`${t} ${n}`:n}var ct=/^\[(.+?)(~?=)"(.*)"\]$/;function Mt(n){return ct.test(n)?n.replace(ct,(t,e,r,s)=>`[${K(e)}${r}"${K(s)}"]`):`.${K(n)}`}var _t=n=>n.replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():""),pt=n=>n.charAt(0).toUpperCase()+n.slice(1),dt=n=>n.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase(),gt=["Webkit","Moz","ms"];function ht(n){let t={};function e(r){let s=t[r];if(s)return s;let i=_t(r);if(i!=="filter"&&i in n)return t[r]=dt(i);i=pt(i);for(let o=0;o<gt.length;o++){let a=`${gt[o]}${i}`;if(a in n)return t[r]=dt(pt(a))}return r}return({entries:r})=>r.forEach(s=>{s[0].startsWith("--")||(s[0]=e(s[0]))})}function q(n={}){var b,U;if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let t=window.__unocss||{},e=t==null?void 0:t.runtime,r=Object.assign(n.defaults||{},e);if(e!=null&&e.autoPrefix){let f=r.postprocess;f||(f=[]),Array.isArray(f)||(f=[f]),f.unshift(ht(document.createElement("div").style)),r.postprocess=f}(b=e==null?void 0:e.configResolved)==null||b.call(e,t,r);let s,i=!0,o,a=ut(t,r),c=new Set,u,h=[],x=()=>new Promise(f=>{h.push(f),u!=null&&clearTimeout(u),u=setTimeout(()=>R().then(()=>{let m=h;h=[],m.forEach(w=>w())}),0)});async function R(){let f=await a.generate(c);s||(s=document.createElement("style"),document.documentElement.prepend(s)),s.innerHTML=f.css,c=f.matched}async function l(f){let m=c.size;await a.applyExtractors(f,void 0,c),m!==c.size&&await x()}async function g(){let f=document.body&&document.body.outerHTML;f&&await l(f)}let A=new MutationObserver(f=>{i||f.forEach(m=>{let w=m.target;if(w===s||o&&!o(w))return;let _=Array.from(w.attributes).map(E=>E.value?`${E.name}="${E.value}"`:E.name).join(" "),T=`<${w.tagName.toLowerCase()} ${_}>`;l(T)})}),C=!1;function p(){if(!C)return;let f=document.documentElement||document.body;!f||(A.observe(f,{childList:!0,subtree:!0,attributes:!0}),C=!0)}function d(){g(),p()}function y(){d(),window.addEventListener("load",d),window.addEventListener("DOMContentLoaded",d)}let S=window.__unocss_runtime=window.__unocss_runtime={version:a.version,uno:a,async extract(f){typeof f!="string"&&(f.forEach(m=>c.add(m)),f=""),await l(f)},extractAll:g,inspect(f){o=f},toggleObserver(f){f===void 0?i=!i:i=!!f,!C&&!i&&y()}};((U=e==null?void 0:e.ready)==null?void 0:U.call(e,S))!==!1&&(i=!1,y())}q();})();