@unocss/runtime 0.32.1 → 0.32.7

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