@unocss/runtime 0.65.2 → 0.65.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.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var nl=Object.defineProperty;var ol=(e,t)=>{for(var r in t)nl(e,r,{get:t[r],enumerable:!0})};var Fe="default",lt="preflights",il="shortcuts",sl="imports",In={[sl]:-200,[lt]:-100,[il]:-10,[Fe]:0};var ct=/[\\:]?[\s'"`;{}]+/g;function al(e){return e.split(ct)}var ut={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return al(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function X(e){return Array.from(new Set(e))}function Br(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function P(e){return typeof e=="string"}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 ft(e){return e instanceof _e}function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(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 pt=se;var ll=/^\[(.+?)~?="(.*)"\]$/;var cl=/[\w\u00A0-\uFFFF%-?]/;function Kn(e){return e.match(ll)}function Le(e=""){return cl.test(e)}function Gn(e){return typeof e=="function"?{match:e}:e}function Nr(e){return e.length===3}function dt(e){return e!=null}function Hn(){}var mt=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)))}},ht=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}};function $e(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function qn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>$e(t)):[e]:[$e(e)]}function ul(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 Se(e){return e==null?"":ul(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Dr(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 gt(n)&&gt(o)&&Object.keys(o).forEach(s=>{gt(n[s])&&gt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Dr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ue(e){let t,r,n;if(Array.isArray(e)){for(r=Array.from({length:t=e.length});t--;)r[t]=(n=e[t])&&typeof n=="object"?Ue(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ue(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ue(n):n;return r}return e}function Yn(e){return P(e[0])}function Xn(e){return P(e[0])}var bt={};function fl(e=["-",":"]){let t=e.join("|");return bt[t]||(bt[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),bt[t].lastIndex=0,bt[t]}function pl(e,t=["-",":"],r=5){let n=fl(t),o,i=e.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(u,f,p,m,d)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let h=d+f.length+p.length+1,g={length:u.length,items:[]};l.set(d,g);for(let w of[...m.matchAll(/\S+/g)]){let j=h+w.index,y=l.get(j)?.items;y?l.delete(j):y=[{offset:j,length:w[0].length,className:w[0]}];for(let $ of y)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),g.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let a;if(typeof e=="string"){a="";let u=0;for(let[f,p]of l)a+=e.slice(u,f),a+=p.items.map(m=>m.className).join(" "),u=f+p.length;a+=e.slice(u)}else{a=e;for(let[u,f]of l)a.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function Zn(e,t=["-",":"],r=5){let n=pl(e,t,r);return typeof e=="string"?n.expanded:e}var Jn=new Set;function Qn(e){Jn.has(e)||(console.warn("[unocss]",e),Jn.add(e))}function ro(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var eo="_uno_resolved";async function dl(e){let t=typeof e=="function"?await e():await e;if(eo in t)return t;t={...t},Object.defineProperty(t,eo,{value:!0,enumerable:!1});let r=t.shortcuts?ro(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=O(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function no(e){let t=await dl(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(no))).flat();return[t,...r]}function ml(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let a of e){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&t.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:X(to(...t)),exclude:X(to(...r))}};return o.length&&(l.filesystem=X(o.flat())),i.length&&(l.inline=X(i.flat())),s.length&&(l.plain=X(s.flat())),l}async function Ir(e={},t={}){let r=Object.assign({},t,e),n=Br((await Promise.all((r.presets||[]).flatMap(O).flatMap(no))).flat(),(x,b)=>x.name===b.name),o=[...n.filter(x=>x.enforce==="pre"),...n.filter(x=>!x.enforce),...n.filter(x=>x.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},In,...i.map(x=>x.layers));function a(x){return X(i.flatMap(b=>O(b[x]||[])))}let u=a("extractors"),f=s.find(x=>x.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=ut),f&&!u.includes(f)&&u.unshift(f),u.sort((x,b)=>(x.order||0)-(b.order||0));let p=a("rules"),m={},d=p.length,h=p.filter(x=>Yn(x)?(O(x[2]?.prefix||"").forEach(k=>{m[k+x[0]]=x}),!1):!0).reverse(),g=hl(i.map(x=>x.theme)),w=a("extendTheme");for(let x of w)g=x(g)||g;let j={templates:X(i.flatMap(x=>O(x.autocomplete?.templates))),extractors:i.flatMap(x=>O(x.autocomplete?.extractors)).sort((x,b)=>(x.order||0)-(b.order||0)),shorthands:gl(i.map(x=>x.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let $=a("content"),L=ml($),E={mergeSelectors:!0,warn:!0,sortLayers:x=>x,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:g,rules:p,rulesSize:d,rulesDynamic:h,rulesStaticMap:m,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:j,variants:a("variants").map(Gn).sort((x,b)=>(x.order||0)-(b.order||0)),shortcuts:ro(a("shortcuts")).reverse(),extractors:u,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:L,transformers:Br(a("transformers"),(x,b)=>x.name===b.name)};for(let x of i)x?.configResolved?.(E);return E}function hl(e){return e.map(t=>t?Ue(t):{}).reduce((t,r)=>Dr(t,r),{})}function gl(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}},{})}function to(...e){return e.flatMap(bl)}function bl(e){return Array.isArray(e)?e:e?[e]:[]}var oo="0.65.2";function io(){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={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},Kr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=oo;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;activatedRules=new Set;events=io();static async create(t={},r={}){let n=new e(t,r);return n.config=await Ir(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this._cache.clear(),this.config=await Ir(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(ft(s)&&ft(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:pe,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 a of this.config.preprocess)o=a(t);if(this.isBlocked(o)){this.blocked.add(t),this._cache.set(n,null);return}let i=await this.matchVariants(t,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async a=>{let u=this.makeContext(t,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(u.variants=[...a[3]]);let f=await this.expandShortcut(u.currentSelector,u);return f?await this.stringifyShortcuts(u.variantMatch,u,f[0],f[1]):(await this.parseUtil(u.variantMatch,u))?.map(m=>this.stringifyUtil(m,u)).filter(dt)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,u=P(t)?await this.applyExtractors(t,n,a?new _e:new Set):Array.isArray(t)?new Set(t):t;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(k=>typeof k=="function"?k(b):k).forEach(k=>{u.has(k)||u.add(k)})}let f=l?"":`
1
+ "use strict";(()=>{var nl=Object.defineProperty;var ol=(e,t)=>{for(var r in t)nl(e,r,{get:t[r],enumerable:!0})};var Fe="default",lt="preflights",il="shortcuts",sl="imports",In={[sl]:-200,[lt]:-100,[il]:-10,[Fe]:0};var ct=/[\\:]?[\s'"`;{}]+/g;function al(e){return e.split(ct)}var ut={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return al(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function X(e){return Array.from(new Set(e))}function Br(e,t){return e.reduce((r,n)=>(r.findIndex(i=>t(n,i))===-1&&r.push(n),r),[])}function P(e){return typeof e=="string"}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 ft(e){return e instanceof _e}function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function se(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 pt=se;var ll=/^\[(.+?)~?="(.*)"\]$/;var cl=/[\w\u00A0-\uFFFF%-?]/;function Kn(e){return e.match(ll)}function Le(e=""){return cl.test(e)}function Gn(e){return typeof e=="function"?{match:e}:e}function Nr(e){return e.length===3}function dt(e){return e!=null}function Hn(){}var mt=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)))}},ht=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}};function $e(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function qn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>$e(t)):[e]:[$e(e)]}function ul(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 Se(e){return e==null?"":ul(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function gt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Dr(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 gt(n)&&gt(o)&&Object.keys(o).forEach(s=>{gt(n[s])&&gt(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Dr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Ue(e){let t,r,n;if(Array.isArray(e)){for(r=Array.from({length:t=e.length});t--;)r[t]=(n=e[t])&&typeof n=="object"?Ue(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Ue(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Ue(n):n;return r}return e}function Yn(e){return P(e[0])}function Xn(e){return P(e[0])}var bt={};function fl(e=["-",":"]){let t=e.join("|");return bt[t]||(bt[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),bt[t].lastIndex=0,bt[t]}function pl(e,t=["-",":"],r=5){let n=fl(t),o,i=e.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(u,f,p,m,d)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let h=d+f.length+p.length+1,g={length:u.length,items:[]};l.set(d,g);for(let w of[...m.matchAll(/\S+/g)]){let j=h+w.index,y=l.get(j)?.items;y?l.delete(j):y=[{offset:j,length:w[0].length,className:w[0]}];for(let $ of y)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),g.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let a;if(typeof e=="string"){a="";let u=0;for(let[f,p]of l)a+=e.slice(u,f),a+=p.items.map(m=>m.className).join(" "),u=f+p.length;a+=e.slice(u)}else{a=e;for(let[u,f]of l)a.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function Zn(e,t=["-",":"],r=5){let n=pl(e,t,r);return typeof e=="string"?n.expanded:e}var Jn=new Set;function Qn(e){Jn.has(e)||(console.warn("[unocss]",e),Jn.add(e))}function ro(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var eo="_uno_resolved";async function dl(e){let t=typeof e=="function"?await e():await e;if(eo in t)return t;t={...t},Object.defineProperty(t,eo,{value:!0,enumerable:!1});let r=t.shortcuts?ro(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=O(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function no(e){let t=await dl(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(no))).flat();return[t,...r]}function ml(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let a of e){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&t.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:X(to(...t)),exclude:X(to(...r))}};return o.length&&(l.filesystem=X(o.flat())),i.length&&(l.inline=X(i.flat())),s.length&&(l.plain=X(s.flat())),l}async function Ir(e={},t={}){let r=Object.assign({},t,e),n=Br((await Promise.all((r.presets||[]).flatMap(O).flatMap(no))).flat(),(x,b)=>x.name===b.name),o=[...n.filter(x=>x.enforce==="pre"),...n.filter(x=>!x.enforce),...n.filter(x=>x.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},In,...i.map(x=>x.layers));function a(x){return X(i.flatMap(b=>O(b[x]||[])))}let u=a("extractors"),f=s.find(x=>x.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=ut),f&&!u.includes(f)&&u.unshift(f),u.sort((x,b)=>(x.order||0)-(b.order||0));let p=a("rules"),m={},d=p.length,h=p.filter(x=>Yn(x)?(O(x[2]?.prefix||"").forEach(k=>{m[k+x[0]]=x}),!1):!0).reverse(),g=hl(i.map(x=>x.theme)),w=a("extendTheme");for(let x of w)g=x(g)||g;let j={templates:X(i.flatMap(x=>O(x.autocomplete?.templates))),extractors:i.flatMap(x=>O(x.autocomplete?.extractors)).sort((x,b)=>(x.order||0)-(b.order||0)),shorthands:gl(i.map(x=>x.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let $=a("content"),L=ml($),E={mergeSelectors:!0,warn:!0,sortLayers:x=>x,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:g,rules:p,rulesSize:d,rulesDynamic:h,rulesStaticMap:m,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:j,variants:a("variants").map(Gn).sort((x,b)=>(x.order||0)-(b.order||0)),shortcuts:ro(a("shortcuts")).reverse(),extractors:u,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:L,transformers:Br(a("transformers"),(x,b)=>x.name===b.name)};for(let x of i)x?.configResolved?.(E);return E}function hl(e){return e.map(t=>t?Ue(t):{}).reduce((t,r)=>Dr(t,r),{})}function gl(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}},{})}function to(...e){return e.flatMap(bl)}function bl(e){return Array.isArray(e)?e:e?[e]:[]}var oo="0.65.4";function io(){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={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},Kr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=oo;events=io();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(t={},r={}){let n=new e(t,r);return n.config=await Ir(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await Ir(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(ft(s)&&ft(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:pe,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 a of this.config.preprocess)o=a(t);if(this.isBlocked(o)){this.blocked.add(t),this.cache.set(n,null);return}let i=await this.matchVariants(t,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(t),this.cache.set(n,null);return}let s=async a=>{let u=this.makeContext(t,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(u.variants=[...a[3]]);let f=await this.expandShortcut(u.currentSelector,u);return f?await this.stringifyShortcuts(u.variantMatch,u,f[0],f[1]):(await this.parseUtil(u.variantMatch,u))?.map(m=>this.stringifyUtil(m,u)).filter(dt)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,u=P(t)?await this.applyExtractors(t,n,a?new _e:new Set):Array.isArray(t)?new Set(t):t;if(s){let b={generator:this,theme:this.config.theme};this.config.safelist.flatMap(k=>typeof k=="function"?k(b):k).forEach(k=>{u.has(k)||u.add(k)})}let f=l?"":`
2
2
  `,p=new Set([Fe]),m=a?new Map:new Set,d=new Map,h={},g=Array.from(u).map(async b=>{if(m.has(b))return;let k=await this.parseToken(b);if(k!=null){m instanceof Map?m.set(b,{data:k,count:ft(u)?u.getCount(b):-1}):m.add(b);for(let R of k){let H=R[3]||"",q=R[4]?.layer;d.has(H)||d.set(H,[]),d.get(H).push(R),q&&p.add(q)}}});await Promise.all(g),await(async()=>{if(!i)return;let b={generator:this,theme:this.config.theme},k=new Set([]);this.config.preflights.forEach(({layer:R=lt})=>{p.add(R),k.add(R)}),h=Object.fromEntries(await Promise.all(Array.from(k).map(async R=>{let q=(await Promise.all(this.config.preflights.filter(ee=>(ee.layer||lt)===R).map(async ee=>await ee.getCSS(b)))).filter(Boolean).join(f);return[R,q]})))})();let w=this.config.sortLayers(Array.from(p).sort((b,k)=>(this.config.layers[b]??0)-(this.config.layers[k]??0)||b.localeCompare(k))),j={},y=this.config.outputToCssLayers,$=b=>{let k=b;return typeof y=="object"&&(k=y.cssLayerName?.(b)),k===null?null:k??b},L=(b=Fe)=>{if(j[b])return j[b];let k=Array.from(d).sort((q,ee)=>(this.parentOrders.get(q[0])??0)-(this.parentOrders.get(ee[0])??0)||q[0]?.localeCompare(ee[0]||"")||0).map(([q,ee])=>{let C=ee.length,A=ee.filter(z=>(z[4]?.layer||Fe)===b).sort((z,D)=>z[0]-D[0]||(z[4]?.sort||0)-(D[4]?.sort||0)||z[5]?.currentSelector?.localeCompare(D[5]?.currentSelector??"")||z[1]?.localeCompare(D[1]||"")||z[2]?.localeCompare(D[2]||"")||0).map(([,z,D,,at,,Ur])=>[[[(z&&vl(z,o))??"",at?.sort??0]],D,!!(Ur??at?.noMerge)]);if(!A.length)return;let F=A.reverse().map(([z,D,at],Ur)=>{if(!at&&this.config.mergeSelectors)for(let ue=Ur+1;ue<C;ue++){let re=A[ue];if(re&&!re[2]&&(z&&re[0]||z==null&&re[0]==null)&&re[1]===D)return z&&re[0]&&re[0].push(...z),null}let Wr=z?X(z.sort((ue,re)=>ue[1]-re[1]||ue[0]?.localeCompare(re[0]||"")||0).map(ue=>ue[0]).filter(Boolean)):[];return Wr.length?`${Wr.join(`,${f}`)}{${D}}`:D}).filter(Boolean).reverse().join(f);if(!q)return F;let U=q.split(" $$ ");return`${U.join("{")}{${f}${F}${f}${"}".repeat(U.length)}`}).filter(Boolean).join(f);i&&(k=[h[b],k].filter(Boolean).join(f));let R;y&&k&&(R=$(b),R!==null&&(k=`@layer ${R}{${f}${k}${f}}`));let H=l?"":`/* layer: ${b}${R&&R!==b?`, alias: ${R}`:""} */${f}`;return j[b]=k?H+k:""},E=(b=w,k)=>{let R=b.filter(H=>!k?.includes(H));return[y&&R.length>0?`@layer ${R.map($).filter(dt).join(", ")};`:void 0,...R.map(H=>L(H)||"")].filter(Boolean).join(f)};return{get css(){return E()},layers:w,matched:m,getLayers:E,getLayer:L,setLayer:async(b,k)=>{let R=await k(L(b));return j[b]=R,R}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,l,a]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&a.has(f))continue;let p=await f.match(u,n);if(p){if(P(p)){if(p===u)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let m=p.map(d=>{let h=d.matcher??u,g=[d,...l],w=new Set(a);return w.add(f),[i[0],h,g,w]});return(await Promise.all(m.map(d=>o(d)))).flat()}}i[1]=p.matcher??u,l.unshift(p),a.add(f),s=!0;break}}if(!s)break;if(l.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[i]};return await o([t,r||t,[],new Set])}applyVariants(t,r=t[4],n=t[1]){let i=r.slice().sort((u,f)=>(u.order||0)-(f.order||0)).reduceRight((u,f)=>p=>{let m=f.body?.(p.entries)||p.entries,d=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??kl)({...p,entries:m,selector:f.selector?.(p.selector,m)||p.selector,parent:d[0]||p.parent,parentOrder:d[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:wl(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:l}=i;s!=null&&l!=null&&this.parentOrders.set(s,l);let a={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let u of this.config.postprocess)u(a);return a}constructCustomCSS(t,r,n){let o=$e(r);if(P(o))return o;let{selector:i,entries:s,parent:l}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),a=`${i}{${Se(s)}}`;return l?`${l}{${a}}`:a}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([a,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let d=this.config.rules.indexOf(p),h=$e(p[1]),g=p[2];return P(h)?[[d,h,g]]:[[d,a,h,g,f]]}r.variantHandlers=f;let{rulesDynamic:m}=this.config;for(let d of m){let[h,g,w]=d;if(w?.internal&&!n)continue;let j=u;if(w?.prefix){let E=O(w.prefix);if(o){let x=O(o);if(!E.some(b=>x.includes(b)))continue}else{let x=E.find(b=>u.startsWith(b));if(x==null)continue;j=u.slice(x.length)}}let y=j.match(h);if(!y)continue;let $=await g(y,r);if(!$)continue;if(r.generator.activatedRules.add(d),this.config.details&&r.rules.push(d),typeof $!="string")if(Symbol.asyncIterator in $){let E=[];for await(let x of $)x&&E.push(x);$=E}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(dt));let L=qn($).filter(E=>E.length);if(L.length){let E=this.config.rules.indexOf(d);return L.map(x=>{if(P(x))return[E,x,w];let b=f,k=w;for(let R of x)R[0]===pe.variants?b=[...O(R[1]),...b]:R[0]===pe.parent?b=[{parent:R[1]},...b]:R[0]===pe.selector?b=[{selector:R[1]},...b]:R[0]===pe.layer?b=[{layer:R[1]},...b]:R[0]===pe.sort&&(k={...k,sort:R[1]});return[E,a,x,k,b]})}}},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l.length)return l}stringifyUtil(t,r){if(!t)return;if(Nr(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:l,noMerge:a}=this.applyVariants(t),u=Se(o);if(!u)return;let{layer:f,sort:p,...m}=t[3]??{},d={...m,layer:s??f,sort:l??p};return[t[0],n,u,i,d,this.config.details?r:void 0,a]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?u=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(u)}:Hn,i,s,l,a;for(let u of this.config.shortcuts){let f=t;if(u[2]?.prefix){let m=O(u[2].prefix).find(d=>t.startsWith(d));if(m==null)continue;f=t.slice(m.length)}if(Xn(u)){if(u[0]===f){i=i||u[2],s=u[1],o(u);break}}else{let p=f.match(u[0]);if(p&&(s=u[1](p,r)),s){i=i||u[2],o(u);break}}}if(s&&(l=X(O(s).filter(P).map(u=>Zn(u.trim()).split(/\s+/g)).flat()),a=O(s).filter(u=>!P(u)).map(u=>({handles:[],value:u}))),!s){let u=P(t)?await this.matchVariants(t):[t];for(let f of u){let[p,m,d]=f;if(p!==m){let h=await this.expandShortcut(m,r,n-1);h&&(l=h[0].filter(P).map(g=>p.replace(m,g)),a=h[0].filter(g=>!P(g)).map(g=>({handles:[...g.handles,...d],value:g.value})))}}}if(!(!l?.length&&!a?.length))return[[await Promise.all(O(l).map(async u=>(await this.expandShortcut(u,r,n-1))?.[0]||[u])),a].flat(2).filter(u=>!!u),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new ht,s=(await Promise.all(X(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",$e(f.value),void 0,f.handles]];return!p&&this.config.warn&&Qn(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[l,,a]=t,u=[];for(let f of s){if(Nr(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:m,parent:d,sort:h,noMerge:g,layer:w}=this.applyVariants(f,[...f[4],...a],l);i.getFallback(w??o.layer,new mt).getFallback(p,d,[[],f[0]])[0].push([m,!!(g??f[3]?.noMerge),h??0])}return u.concat(i.flatMap((f,p)=>f.map(([m,d],h,g)=>{let w=(y,$,L)=>{let E=Math.max(...L.map(b=>b[1])),x=L.map(b=>b[0]);return(y?[x.flat(1)]:x).map(b=>{let k=Se(b);if(k)return[d,h,k,g,{...o,noMerge:$,sort:E,layer:p},r,void 0]})};return[[m.filter(([,y])=>y).map(([y,,$])=>[y,$]),!0],[m.filter(([,y])=>!y).map(([y,,$])=>[y,$]),!1]].map(([y,$])=>[...w(!1,$,y.filter(([L])=>L.some(E=>E[0]===pe.shortcutsNoMerge))),...w(!0,$,y.filter(([L])=>L.every(E=>E[0]!==pe.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):P(r)?r===t:r.test(t))}getBlocked(t){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(t):P(o)?o===t:o.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function ao(e,t){return await Kr.create(e,t)}var lo=/\s\$\$\s+/g;function yl(e){return lo.test(e)}function vl(e,t){return yl(e)?e.replace(lo,t?` ${t} `:" "):t?`${t} ${e}`:e}var so=/^\[(.+?)(~?=)"(.*)"\]$/;function wl(e){return so.test(e)?e.replace(so,(t,r,n,o)=>`[${pt(r)}${n}"${pt(o)}"]`):`.${pt(e)}`}function kl(e,t){return t(e)}var Gr=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function co(e={}){let t=e.prefix??"un-",r=e.prefixedOnly??!1,n=e.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let l=Kn(i);if(!l)return;let a=l[1];if(a.startsWith(t))a=a.slice(t.length);else if(r)return;let u=l[2],[,f="",p=u]=u.match(Gr)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${a}`;if(o==null){let m=s?.config?.separators?.join("|");m?o=new RegExp(`^(.*\\](?:${m}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,m,d]=u.match(o)||[];if(d)return`${m}${f}${a}-${d}`}if(f&&p.match(/^[\d.]+$/)){let m=f.split(/([^:]*:)/g).filter(Boolean),d=m.pop()+p,h=m.join("");return[{matcher:`${f}${a}-${p}`},{matcher:`${h}${a}-${d}`}]}return`${f}${a}-${p}`}}}var $l=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Sl=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,uo=/[\s'"`;>]+/;function fo(e){return{name:"attributify",extract:({content:t,cursor:r})=>{let n=t.matchAll($l),o,i=0;for(let y of n){let[,$,L]=y,E=y.index+$.length;if(r>E&&r<=E+L.length){i=E,o=L;break}}if(!o)return null;let s=o.matchAll(Sl),l=0,a,u;for(let y of s){let[$,L,E]=y,x=i+y.index;if(r>x&&r<=x+$.length){l=x,a=L,u=E?.slice(1);break}}if(!a||a==="class"||a==="className"||a===":class")return null;let f=!!e?.prefix&&a.startsWith(e.prefix);if(e?.prefixedOnly&&!f)return null;let p=f?a.slice(e.prefix.length):a;if(u===void 0)return{extracted:p,resolveReplacement(y){let $=f?e.prefix.length:0;return{start:l+$,end:l+a.length,replacement:y}}};let m=l+a.length+2,d=uo.exec(u),h=0,g;for(;d;){let[y]=d;if(r>m+h&&r<=m+h+d.index){g=u.slice(h,h+d.index);break}h+=d.index+y.length,d=uo.exec(u.slice(h))}g===void 0&&(g=u.slice(h));let[,w="",j]=g.match(Gr)||[];return{extracted:`${w}${p}-${j}`,transformSuggestions(y){return y.filter($=>$.startsWith(`${w}${p}-`)).map($=>w+$.slice(w.length+p.length+1))},resolveReplacement(y){return{start:h+m,end:h+m+g.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var Cl=["v-bind:",":"],po=/[\s'"`;]+/g,Hr=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Rl=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,qr=["placeholder","fill","opacity","stroke-opacity"];function mo(e){let t=e?.ignoreAttributes??qr,r=e?.nonValuedAttribute??!0,n=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Hr)).flatMap(i=>Array.from((i[1]||"").matchAll(Rl))).flatMap(([,i,...s])=>{let l=s.filter(Boolean).join("");if(t.includes(i))return[];for(let a of Cl)if(i.startsWith(a)){i=i.slice(a.length);break}if(!l){if(Le(i)&&r!==!1){let a=[`[${i}=""]`];return n&&a.push(`[${i}="true"]`),a}return[]}return["class","className"].includes(i)?l.split(po).filter(Le):Hr.test(l)?(Hr.lastIndex=0,this.extract({code:l})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:l.split(po).filter(a=>!!a&&a!==":").map(a=>`[${i}~="${a}"]`)})}}}var El=(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??qr;let t=[co(e)],r=[mo(e)],n=[fo(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:t,extractors:r,options:e,autocomplete:{extractors:n},extractorDefault:e.strict?!1:void 0}},ho=El;function Tl(e){let t,r,n=2166136261;for(t=0,r=e.length;t<r;t++)n^=e.charCodeAt(t),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function go(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${Tl(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function bo(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var jl=/\/\/#\s*sourceMappingURL=.*\n?/g;function xo(e){return e.includes("sourceMappingURL=")?e.replace(jl,""):e}var zl=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Al=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Ol=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Vl(e){let t=[];for(let o of e.matchAll(Al))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(zl))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=go(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(ct).forEach(o=>{o.includes(n)&&(o=bo(o,r)),Le(o)&&!Ol.test(o)&&t.push(o)}),t}function yo(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Vl(xo(e))}}}function vo(e){if(e.preflight)return[{layer:"preflights",getCSS({theme:t,generator:r}){if(t.preflightBase){let n=Object.entries(t.preflightBase);if(e.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=Se(n);return e.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${e.variablePrefix}`)),O(t.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function Ce(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let l=0;l<n;l++)switch(e[l]){case t:i||(i=!0,s=l),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,l+1),e.slice(l+1),e.slice(0,s)];break}}function de(e,t,r,n){if(e===""||(P(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 l of n){let a=l.length;if(a&&l===e.slice(s,s+a)&&i===0)return s===0||s===o-a?void 0:[e.slice(0,s),e.slice(s+a)]}}return[e,""]}function xe(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=de(e,"(",")",t);if(!i)return;let[s,l]=i;n.push(s),e=l}if(n.length>0)return n}var Yr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],wo=["%alpha","<alpha-value>"],Pl=new RegExp(wo.map(e=>fe(e)).join("|"));function Y(e=""){let t=Ml(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Yr.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 ae(e){let t=e.alpha??1;return typeof t=="string"&&wo.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(Pl,`${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}`,Yr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function Ml(e){if(!e)return;let t=Fl(e);if(t!=null||(t=_l(e),t!=null)||(t=Ll(e),t!=null)||(t=Wl(e),t!=null)||(t=Bl(e),t!=null))return t}function Fl(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 _l(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function Ll(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=xe(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 Ul=new RegExp(`^(${Yr.join("|")})\\((.+)\\)$`,"i");function Wl(e){let t=e.match(Ul);if(!t)return;let[,r,n]=t,o=ko(`${r} ${n}`);if(o){let{alpha:i,components:[s,...l]}=o;return{type:s,components:l,alpha:i}}}function Bl(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=ko(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function ko(e){let t=xe(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=xe(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 xt(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,configurable:!0,get(){return r(this,n)}});return t}var $o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ro=new Uint8Array(64),Nl=new Uint8Array(128);for(let e=0;e<$o.length;e++){let t=$o.charCodeAt(e);Ro[e]=t,Nl[t]=e}function We(e,t,r){let n=t-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),e.write(Ro[o])}while(n>0);return t}var So=1024*16,Co=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}},Xr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(So)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===So&&(this.out+=Co.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+Co.decode(t.subarray(0,n)):r}};function Eo(e){let t=new Xr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let l=e[s];if(s>0&&t.write(59),l.length===0)continue;let a=0;for(let u=0;u<l.length;u++){let f=l[u];u>0&&t.write(44),a=We(t,f[0],a),f.length!==1&&(r=We(t,f[1],r),n=We(t,f[2],n),o=We(t,f[3],o),f.length!==4&&(i=We(t,f[4],i)))}}return t.flush()}var yt=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))}},vt=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 Dl(){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 Il=Dl(),Zr=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),typeof t.debugId<"u"&&(this.debugId=t.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Il(this.toString())}};function Kl(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 l=/^ +/.exec(s)[0].length;return Math.min(l,i)},1/0);return new Array(o+1).join(" ")}function Gl(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 Hl=Object.prototype.toString;function ql(e){return Hl.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 u=i+s>>1;o<r[u]?s=u:i=u+1}let l=i-1,a=o-r[l];return{line:l,column:a}}}var Yl=/\w/,Jr=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";(()=>{var G="default",z="preflights",je="shortcuts",_e="imports",ue={[_e]:-200,[z]:-100,[je]:-10,[G]:0};var fe=/[\\:]?[\s'"`;{}]+/g;function ke(n){return n.split(fe)}var W={name:"@unocss/core/extractor-split",order:0,extract({code:n}){return ke(n)}};function U(n=[]){return Array.isArray(n)?n:[n]}function k(n){return Array.from(new Set(n))}function se(n,e){return n.reduce((t,r)=>(t.findIndex(i=>e(r,i))===-1&&t.push(r),t),[])}function P(n){return typeof n=="string"}var H=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 Y(n){return n instanceof H}function Le(n){let e=n.length,t=-1,r,s="",i=n.charCodeAt(0);for(;++t<e;){if(r=n.charCodeAt(t),r===0){s+="\uFFFD";continue}if(r===37){s+="\\%";continue}if(r===44){s+="\\,";continue}if(r>=1&&r<=31||r===127||t===0&&r>=48&&r<=57||t===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(t===0&&e===1&&r===45){s+=`\\${n.charAt(t)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=n.charAt(t);continue}s+=`\\${n.charAt(t)}`}return s}var q=Le;function pe(n){return typeof n=="function"?{match:n}:n}function ie(n){return n.length===3}function Z(n){return n!=null}function de(){}var J=class{_map=new Map;get(e,t){let r=this._map.get(e);if(r)return r.get(t)}getFallback(e,t,r){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,r),s.get(t)}set(e,t,r){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,r),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,r])=>Array.from(r.entries()).map(([s,i])=>e(i,t,s)))}},Q=class extends Map{getFallback(e,t){let r=this.get(e);return r===void 0?(this.set(e,t),t):r}map(e){let t=[];return this.forEach((r,s)=>{t.push(e(r,s))}),t}flatMap(e){let t=[];return this.forEach((r,s)=>{t.push(...e(r,s))}),t}};function K(n){return P(n)?n:(Array.isArray(n)?n:Object.entries(n)).filter(e=>e[1]!=null)}function me(n){return Array.isArray(n)?n.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?n.map(e=>K(e)):[n]:[K(n)]}function De(n){return n.filter(([e,t],r)=>{if(e.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(n[s][0]===e&&n[s][1]===t)return!1;return!0})}function ee(n){return n==null?"":De(n).map(([e,t])=>t!=null&&typeof t!="function"?`${e}:${t};`:void 0).filter(Boolean).join("")}function X(n){return n&&typeof n=="object"&&!Array.isArray(n)}function oe(n,e,t=!1){let r=n,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...r,...s]:[...s];let i={...r};return X(r)&&X(s)&&Object.keys(s).forEach(f=>{X(r[f])&&X(s[f])||Array.isArray(r[f])&&Array.isArray(s[f])?i[f]=oe(r[f],s[f],t):Object.assign(i,{[f]:s[f]})}),i}function B(n){let e,t,r;if(Array.isArray(n)){for(t=Array.from({length:e=n.length});e--;)t[e]=(r=n[e])&&typeof r=="object"?B(r):r;return t}if(Object.prototype.toString.call(n)==="[object Object]"){t={};for(e in n)e==="__proto__"?Object.defineProperty(t,e,{value:B(n[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(r=n[e])&&typeof r=="object"?B(r):r;return t}return n}function ge(n){return P(n[0])}function he(n){return P(n[0])}var te={};function Fe(n=["-",":"]){let e=n.join("|");return te[e]||(te[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),te[e].lastIndex=0,te[e]}function Ie(n,e=["-",":"],t=5){let r=Fe(e),s,i=n.toString(),f=new Set,d=new Map;do s=!1,i=i.replace(r,(o,a,c,g,h)=>{if(!e.includes(c))return o;s=!0,f.add(a+c);let E=h+a.length+c.length+1,C={length:o.length,items:[]};d.set(h,C);for(let w of[...g.matchAll(/\S+/g)]){let $=E+w.index,S=d.get($)?.items;S?d.delete($):S=[{offset:$,length:w[0].length,className:w[0]}];for(let b of S)b.className=b.className==="~"?a:b.className.replace(/^(!?)(.*)/,`$1${a}${c}$2`),C.items.push(b)}return"$".repeat(o.length)}),t-=1;while(s&&t);let l;if(typeof n=="string"){l="";let o=0;for(let[a,c]of d)l+=n.slice(o,a),l+=c.items.map(g=>g.className).join(" "),o=a+c.length;l+=n.slice(o)}else{l=n;for(let[o,a]of d)l.overwrite(o,o+a.length,a.items.map(c=>c.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:d,get expanded(){return l.toString()}}}function ye(n,e=["-",":"],t=5){let r=Ie(n,e,t);return typeof n=="string"?r.expanded:n}var xe=new Set;function Se(n){xe.has(n)||(console.warn("[unocss]",n),xe.add(n))}function Te(n){return U(n).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var be="_uno_resolved";async function Ke(n){let e=typeof n=="function"?await n():await n;if(be in e)return e;e={...e},Object.defineProperty(e,be,{value:!0,enumerable:!1});let t=e.shortcuts?Te(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let r=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(r),e.rules?.forEach(r)}return e}async function Re(n){let e=await Ke(n);if(!e.presets)return[e];let t=(await Promise.all((e.presets||[]).flatMap(U).flatMap(Re))).flat();return[e,...t]}function Ge(n){if(n.length===0)return{};let e=[],t=[],r=!1,s=[],i=[],f=[];for(let l of n){if(l.pipeline===!1){r=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&t.push(l.pipeline.exclude);l.filesystem&&s.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&f.push(l.plain)}let d={pipeline:r?!1:{include:k(Ce(...e)),exclude:k(Ce(...t))}};return s.length&&(d.filesystem=k(s.flat())),i.length&&(d.inline=k(i.flat())),f.length&&(d.plain=k(f.flat())),d}async function ae(n={},e={}){let t=Object.assign({},e,n),r=se((await Promise.all((t.presets||[]).flatMap(U).flatMap(Re))).flat(),(p,u)=>p.name===u.name),s=[...r.filter(p=>p.enforce==="pre"),...r.filter(p=>!p.enforce),...r.filter(p=>p.enforce==="post")],i=[...s,t],f=[...i].reverse(),d=Object.assign({},ue,...i.map(p=>p.layers));function l(p){return k(i.flatMap(u=>U(u[p]||[])))}let o=l("extractors"),a=f.find(p=>p.extractorDefault!==void 0)?.extractorDefault;a===void 0&&(a=W),a&&!o.includes(a)&&o.unshift(a),o.sort((p,u)=>(p.order||0)-(u.order||0));let c=l("rules"),g={},h=c.length,E=c.filter(p=>ge(p)?(U(p[2]?.prefix||"").forEach(m=>{g[m+p[0]]=p}),!1):!0).reverse(),C=He(i.map(p=>p.theme)),w=l("extendTheme");for(let p of w)C=p(C)||C;let $={templates:k(i.flatMap(p=>U(p.autocomplete?.templates))),extractors:i.flatMap(p=>U(p.autocomplete?.extractors)).sort((p,u)=>(p.order||0)-(u.order||0)),shorthands:Be(i.map(p=>p.autocomplete?.shorthands||{}))},S=l("separators");S.length||(S=[":","-"]);let b=l("content"),V=Ge(b),v={mergeSelectors:!0,warn:!0,sortLayers:p=>p,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:d,theme:C,rules:c,rulesSize:h,rulesDynamic:E,rulesStaticMap:g,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:$,variants:l("variants").map(pe).sort((p,u)=>(p.order||0)-(u.order||0)),shortcuts:Te(l("shortcuts")).reverse(),extractors:o,safelist:l("safelist"),separators:S,details:t.details??t.envMode==="dev",content:V,transformers:se(l("transformers"),(p,u)=>p.name===u.name)};for(let p of i)p?.configResolved?.(v);return v}function He(n){return n.map(e=>e?B(e):{}).reduce((e,t)=>oe(e,t),{})}function Be(n){return n.reduce((e,t)=>{let r={};for(let s in t){let i=t[s];Array.isArray(i)?r[s]=`(${i.join("|")})`:r[s]=i}return{...e,...r}},{})}function Ce(...n){return n.flatMap(Ne)}function Ne(n){return Array.isArray(n)?n:n?[n]:[]}var Ee="0.65.2";function ve(){return{events:{},emit(n,...e){(this.events[n]||[]).forEach(t=>t(...e))},on(n,e){return(this.events[n]=this.events[n]||[]).push(e),()=>this.events[n]=(this.events[n]||[]).filter(t=>t!==e)}}}var I={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},le=class n{constructor(e={},t={}){this.userConfig=e;this.defaults=t}version=Ee;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;activatedRules=new Set;events=ve();static async create(e={},t={}){let r=new n(e,t);return r.config=await ae(r.userConfig,r.defaults),r.events.emit("config",r.config),r}async setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this._cache.clear(),this.config=await ae(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,r=new Set){let s={original:e,code:e,id:t,extracted:r,envMode:this.config.envMode};for(let i of this.config.extractors){let f=await i.extract?.(s);if(f)if(Y(f)&&Y(r))for(let d of f)r.setCount(d,r.getCount(d)+f.getCount(d));else for(let d of f)r.add(d)}return r}makeContext(e,t){let r={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:I,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:t};return r}async parseToken(e,t){if(this.blocked.has(e))return;let r=`${e}${t?` ${t}`:""}`;if(this._cache.has(r))return this._cache.get(r);let s=e;for(let l of this.config.preprocess)s=l(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(r,null);return}let i=await this.matchVariants(e,s);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this._cache.set(r,null);return}let f=async l=>{let o=this.makeContext(e,[t||l[0],l[1],l[2],l[3]]);this.config.details&&(o.variants=[...l[3]]);let a=await this.expandShortcut(o.currentSelector,o);return a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(g=>this.stringifyUtil(g,o)).filter(Z)},d=(await Promise.all(i.map(l=>f(l)))).flat().filter(l=>!!l);if(d?.length)return this._cache.set(r,d),d;this._cache.set(r,null)}async generate(e,t={}){let{id:r,scope:s,preflights:i=!0,safelist:f=!0,minify:d=!1,extendedInfo:l=!1}=t,o=P(e)?await this.applyExtractors(e,r,l?new H:new Set):Array.isArray(e)?new Set(e):e;if(f){let u={generator:this,theme:this.config.theme};this.config.safelist.flatMap(m=>typeof m=="function"?m(u):m).forEach(m=>{o.has(m)||o.add(m)})}let a=d?"":`
2
- `,c=new Set([G]),g=l?new Map:new Set,h=new Map,E={},C=Array.from(o).map(async u=>{if(g.has(u))return;let m=await this.parseToken(u);if(m!=null){g instanceof Map?g.set(u,{data:m,count:Y(o)?o.getCount(u):-1}):g.add(u);for(let x of m){let j=x[3]||"",_=x[4]?.layer;h.has(j)||h.set(j,[]),h.get(j).push(x),_&&c.add(_)}}});await Promise.all(C),await(async()=>{if(!i)return;let u={generator:this,theme:this.config.theme},m=new Set([]);this.config.preflights.forEach(({layer:x=z})=>{c.add(x),m.add(x)}),E=Object.fromEntries(await Promise.all(Array.from(m).map(async x=>{let _=(await Promise.all(this.config.preflights.filter(L=>(L.layer||z)===x).map(async L=>await L.getCSS(u)))).filter(Boolean).join(a);return[x,_]})))})();let w=this.config.sortLayers(Array.from(c).sort((u,m)=>(this.config.layers[u]??0)-(this.config.layers[m]??0)||u.localeCompare(m))),$={},S=this.config.outputToCssLayers,b=u=>{let m=u;return typeof S=="object"&&(m=S.cssLayerName?.(u)),m===null?null:m??u},V=(u=G)=>{if($[u])return $[u];let m=Array.from(h).sort((_,L)=>(this.parentOrders.get(_[0])??0)-(this.parentOrders.get(L[0])??0)||_[0]?.localeCompare(L[0]||"")||0).map(([_,L])=>{let y=L.length,R=L.filter(T=>(T[4]?.layer||G)===u).sort((T,O)=>T[0]-O[0]||(T[4]?.sort||0)-(O[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(O[5]?.currentSelector??"")||T[1]?.localeCompare(O[1]||"")||T[2]?.localeCompare(O[2]||"")||0).map(([,T,O,,N,,ne])=>[[[(T&&Ye(T,s))??"",N?.sort??0]],O,!!(ne??N?.noMerge)]);if(!R.length)return;let M=R.reverse().map(([T,O,N],ne)=>{if(!N&&this.config.mergeSelectors)for(let F=ne+1;F<y;F++){let D=R[F];if(D&&!D[2]&&(T&&D[0]||T==null&&D[0]==null)&&D[1]===O)return T&&D[0]&&D[0].push(...T),null}let re=T?k(T.sort((F,D)=>F[1]-D[1]||F[0]?.localeCompare(D[0]||"")||0).map(F=>F[0]).filter(Boolean)):[];return re.length?`${re.join(`,${a}`)}{${O}}`:O}).filter(Boolean).reverse().join(a);if(!_)return M;let A=_.split(" $$ ");return`${A.join("{")}{${a}${M}${a}${"}".repeat(A.length)}`}).filter(Boolean).join(a);i&&(m=[E[u],m].filter(Boolean).join(a));let x;S&&m&&(x=b(u),x!==null&&(m=`@layer ${x}{${a}${m}${a}}`));let j=d?"":`/* layer: ${u}${x&&x!==u?`, alias: ${x}`:""} */${a}`;return $[u]=m?j+m:""},v=(u=w,m)=>{let x=u.filter(j=>!m?.includes(j));return[S&&x.length>0?`@layer ${x.map(b).filter(Z).join(", ")};`:void 0,...x.map(j=>V(j)||"")].filter(Boolean).join(a)};return{get css(){return v()},layers:w,matched:g,getLayers:v,getLayer:V,setLayer:async(u,m)=>{let x=await m(V(u));return $[u]=x,x}}}async matchVariants(e,t){let r={rawSelector:e,theme:this.config.theme,generator:this},s=async i=>{let f=!0,[,,d,l]=i;for(;f;){f=!1;let o=i[1];for(let a of this.config.variants){if(!a.multiPass&&l.has(a))continue;let c=await a.match(o,r);if(c){if(P(c)){if(c===o)continue;c={matcher:c}}if(Array.isArray(c)){if(!c.length)continue;if(c.length===1)c=c[0];else{if(a.multiPass)throw new Error("multiPass can not be used together with array return variants");let g=c.map(h=>{let E=h.matcher??o,C=[h,...d],w=new Set(l);return w.add(a),[i[0],E,C,w]});return(await Promise.all(g.map(h=>s(h)))).flat()}}i[1]=c.matcher??o,d.unshift(c),l.add(a),f=!0;break}}if(!f)break;if(d.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await s([e,t||e,[],new Set])}applyVariants(e,t=e[4],r=e[1]){let i=t.slice().sort((o,a)=>(o.order||0)-(a.order||0)).reduceRight((o,a)=>c=>{let g=a.body?.(c.entries)||c.entries,h=Array.isArray(a.parent)?a.parent:[a.parent,void 0];return(a.handle??Ze)({...c,entries:g,selector:a.selector?.(c.selector,g)||c.selector,parent:h[0]||c.parent,parentOrder:h[1]||c.parentOrder,layer:a.layer||c.layer,sort:a.sort||c.sort},o)},o=>o)({prefix:"",selector:qe(r),pseudo:"",entries:e[2]}),{parent:f,parentOrder:d}=i;f!=null&&d!=null&&this.parentOrders.set(f,d);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:f,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let o of this.config.postprocess)o(l);return l}constructCustomCSS(e,t,r){let s=K(t);if(P(s))return s;let{selector:i,entries:f,parent:d}=this.applyVariants([0,r||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${ee(f)}}`;return d?`${d}{${l}}`:l}async parseUtil(e,t,r=!1,s){let i=P(e)?await this.matchVariants(e):[e],f=async([l,o,a])=>{this.config.details&&(t.rules=t.rules??[]);let c=this.config.rulesStaticMap[o];if(c&&c[1]&&(r||!c[2]?.internal)){t.generator.activatedRules.add(c),this.config.details&&t.rules.push(c);let h=this.config.rules.indexOf(c),E=K(c[1]),C=c[2];return P(E)?[[h,E,C]]:[[h,l,E,C,a]]}t.variantHandlers=a;let{rulesDynamic:g}=this.config;for(let h of g){let[E,C,w]=h;if(w?.internal&&!r)continue;let $=o;if(w?.prefix){let v=U(w.prefix);if(s){let p=U(s);if(!v.some(u=>p.includes(u)))continue}else{let p=v.find(u=>o.startsWith(u));if(p==null)continue;$=o.slice(p.length)}}let S=$.match(E);if(!S)continue;let b=await C(S,t);if(!b)continue;if(t.generator.activatedRules.add(h),this.config.details&&t.rules.push(h),typeof b!="string")if(Symbol.asyncIterator in b){let v=[];for await(let p of b)p&&v.push(p);b=v}else Symbol.iterator in b&&!Array.isArray(b)&&(b=Array.from(b).filter(Z));let V=me(b).filter(v=>v.length);if(V.length){let v=this.config.rules.indexOf(h);return V.map(p=>{if(P(p))return[v,p,w];let u=a,m=w;for(let x of p)x[0]===I.variants?u=[...U(x[1]),...u]:x[0]===I.parent?u=[{parent:x[1]},...u]:x[0]===I.selector?u=[{selector:x[1]},...u]:x[0]===I.layer?u=[{layer:x[1]},...u]:x[0]===I.sort&&(m={...m,sort:x[1]});return[v,l,p,m,u]})}}},d=(await Promise.all(i.map(l=>f(l)))).flat().filter(l=>!!l);if(d.length)return d}stringifyUtil(e,t){if(!e)return;if(ie(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:r,entries:s,parent:i,layer:f,sort:d,noMerge:l}=this.applyVariants(e),o=ee(s);if(!o)return;let{layer:a,sort:c,...g}=e[3]??{},h={...g,layer:f??a,sort:d??c};return[e[0],r,o,i,h,this.config.details?t:void 0,l]}async expandShortcut(e,t,r=5){if(r===0)return;let s=this.config.details?o=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(o)}:de,i,f,d,l;for(let o of this.config.shortcuts){let a=e;if(o[2]?.prefix){let g=U(o[2].prefix).find(h=>e.startsWith(h));if(g==null)continue;a=e.slice(g.length)}if(he(o)){if(o[0]===a){i=i||o[2],f=o[1],s(o);break}}else{let c=a.match(o[0]);if(c&&(f=o[1](c,t)),f){i=i||o[2],s(o);break}}}if(f&&(d=k(U(f).filter(P).map(o=>ye(o.trim()).split(/\s+/g)).flat()),l=U(f).filter(o=>!P(o)).map(o=>({handles:[],value:o}))),!f){let o=P(e)?await this.matchVariants(e):[e];for(let a of o){let[c,g,h]=a;if(c!==g){let E=await this.expandShortcut(g,t,r-1);E&&(d=E[0].filter(P).map(C=>c.replace(g,C)),l=E[0].filter(C=>!P(C)).map(C=>({handles:[...C.handles,...h],value:C.value})))}}}if(!(!d?.length&&!l?.length))return[[await Promise.all(U(d).map(async o=>(await this.expandShortcut(o,t,r-1))?.[0]||[o])),l].flat(2).filter(o=>!!o),i]}async stringifyShortcuts(e,t,r,s={layer:this.config.shortcutsLayer}){let i=new Q,f=(await Promise.all(k(r).map(async a=>{let c=P(a)?await this.parseUtil(a,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(a.value),void 0,a.handles]];return!c&&this.config.warn&&Se(`unmatched utility "${a}" in shortcut "${e[1]}"`),c||[]}))).flat(1).filter(Boolean).sort((a,c)=>a[0]-c[0]),[d,,l]=e,o=[];for(let a of f){if(ie(a)){o.push([a[0],void 0,a[1],void 0,a[2],t,void 0]);continue}let{selector:c,entries:g,parent:h,sort:E,noMerge:C,layer:w}=this.applyVariants(a,[...a[4],...l],d);i.getFallback(w??s.layer,new J).getFallback(c,h,[[],a[0]])[0].push([g,!!(C??a[3]?.noMerge),E??0])}return o.concat(i.flatMap((a,c)=>a.map(([g,h],E,C)=>{let w=(S,b,V)=>{let v=Math.max(...V.map(u=>u[1])),p=V.map(u=>u[0]);return(S?[p.flat(1)]:p).map(u=>{let m=ee(u);if(m)return[h,E,m,C,{...s,noMerge:b,sort:v,layer:c},t,void 0]})};return[[g.filter(([,S])=>S).map(([S,,b])=>[S,b]),!0],[g.filter(([,S])=>!S).map(([S,,b])=>[S,b]),!1]].map(([S,b])=>[...w(!1,b,S.filter(([V])=>V.some(v=>v[0]===I.shortcutsNoMerge))),...w(!0,b,S.filter(([V])=>V.every(v=>v[0]!==I.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):P(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(r=>{let s=Array.isArray(r)?r[0]:r;return typeof s=="function"?s(e):P(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};async function Me(n,e){return await le.create(n,e)}var Ae=/\s\$\$\s+/g;function We(n){return Ae.test(n)}function Ye(n,e){return We(n)?n.replace(Ae,e?` ${e} `:" "):e?`${e} ${n}`:n}var we=/^\[(.+?)(~?=)"(.*)"\]$/;function qe(n){return we.test(n)?n.replace(we,(e,t,r,s)=>`[${q(t)}${r}"${q(s)}"]`):`.${q(n)}`}function Ze(n,e){return e(n)}function Je(n){return n.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function Pe(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ue(n){return n.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Ve=["Webkit","Moz","ms"];function $e(n){let e={};function t(r){let s=e[r];if(s)return s;let i=Je(r);if(i!=="filter"&&i in n)return e[r]=Ue(i);i=Pe(i);for(let f=0;f<Ve.length;f++){let d=`${Ve[f]}${i}`;if(d in n)return e[r]=Ue(Pe(d))}return r}return({entries:r})=>r.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Oe(n){return n.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}async function ce(n={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,r=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},n,s.runtime),f=i.defaults||{},d=i.cloakAttribute??"un-cloak";i.autoPrefix&&(f.postprocess=U(f.postprocess)).unshift($e(t.createElement("div").style)),i.configResolved?.(s,f);let l=await Me(s,f),o=y=>i.inject?i.inject(y):r().prepend(y),a=()=>i.rootElement?i.rootElement():t.body,c=new Map,g=!0,h=new Set,E,C,w=[],$=()=>new Promise(y=>{w.push(y),C!=null&&clearTimeout(C),C=setTimeout(()=>V().then(()=>{let R=w;w=[],R.forEach(M=>M())}),0)});function S(y,R=!1){if(y.nodeType!==1)return;let M=y;M.hasAttribute(d)&&M.removeAttribute(d),R&&M.querySelectorAll(`[${d}]`).forEach(A=>{A.removeAttribute(d)})}function b(y,R){let M=c.get(y);if(!M)if(M=t.createElement("style"),M.setAttribute("data-unocss-runtime-layer",y),c.set(y,M),R==null)o(M);else{let A=b(R),T=A.parentNode;T?T.insertBefore(M,A.nextSibling):o(M)}return M}async function V(){let y=[...h],R=await l.generate(y);return R.layers.reduce((A,T)=>(b(T,A).innerHTML=R.getLayer(T)??"",T),void 0),y.filter(A=>!R.matched.has(A)).forEach(A=>h.delete(A)),{...R,getStyleElement:A=>c.get(A),getStyleElements:()=>c}}async function v(y){let R=h.size;await l.applyExtractors(y,void 0,h),R!==h.size&&await $()}async function p(y=a()){let R=y&&y.outerHTML;R&&(await v(`${R} ${Oe(R)}`),S(r()),S(y,!0))}let u=new MutationObserver(y=>{g||y.forEach(async R=>{if(R.target.nodeType!==1)return;let M=R.target;for(let A of c)if(M===A[1])return;if(R.type==="childList")R.addedNodes.forEach(async A=>{if(A.nodeType!==1)return;let T=A;E&&!E(T)||(await v(T.outerHTML),S(T))});else{if(E&&!E(M))return;if(R.attributeName!==d){let A=Array.from(M.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),T=`<${M.tagName.toLowerCase()} ${A}>`;await v(T)}S(M)}})}),m=!1;function x(){if(m)return;let y=i.observer?.target?i.observer.target():a();y&&(u.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),m=!0)}function j(){i.bypassDefined&&Qe(l.blocked),p(),x()}function _(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",j):j()}let L=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(y){P(y)||(y.forEach(R=>h.add(R)),y=""),await v(y)},extractAll:p,inspect(y){E=y},toggleObserver(y){y===void 0?g=!g:g=!!y,!m&&!g&&_()},update:V,presets:e.__unocss_runtime?.presets??{}};i.ready?.(L)!==!1&&(g=!1,_())}function Qe(n=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],r;try{if(r=t.cssRules||t.rules,!r)continue;Array.from(r).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),n.add(s))})}catch{continue}}return n}ce();})();
1
+ "use strict";(()=>{var G="default",z="preflights",je="shortcuts",ke="imports",ue={[ke]:-200,[z]:-100,[je]:-10,[G]:0};var fe=/[\\:]?[\s'"`;{}]+/g;function _e(n){return n.split(fe)}var W={name:"@unocss/core/extractor-split",order:0,extract({code:n}){return _e(n)}};function U(n=[]){return Array.isArray(n)?n:[n]}function _(n){return Array.from(new Set(n))}function se(n,e){return n.reduce((t,r)=>(t.findIndex(i=>e(r,i))===-1&&t.push(r),t),[])}function P(n){return typeof n=="string"}var H=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 Y(n){return n instanceof H}function Le(n){let e=n.length,t=-1,r,s="",i=n.charCodeAt(0);for(;++t<e;){if(r=n.charCodeAt(t),r===0){s+="\uFFFD";continue}if(r===37){s+="\\%";continue}if(r===44){s+="\\,";continue}if(r>=1&&r<=31||r===127||t===0&&r>=48&&r<=57||t===1&&r>=48&&r<=57&&i===45){s+=`\\${r.toString(16)} `;continue}if(t===0&&e===1&&r===45){s+=`\\${n.charAt(t)}`;continue}if(r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122){s+=n.charAt(t);continue}s+=`\\${n.charAt(t)}`}return s}var q=Le;function pe(n){return typeof n=="function"?{match:n}:n}function ie(n){return n.length===3}function Z(n){return n!=null}function de(){}var J=class{_map=new Map;get(e,t){let r=this._map.get(e);if(r)return r.get(t)}getFallback(e,t,r){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,r),s.get(t)}set(e,t,r){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,r),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,r])=>Array.from(r.entries()).map(([s,i])=>e(i,t,s)))}},Q=class extends Map{getFallback(e,t){let r=this.get(e);return r===void 0?(this.set(e,t),t):r}map(e){let t=[];return this.forEach((r,s)=>{t.push(e(r,s))}),t}flatMap(e){let t=[];return this.forEach((r,s)=>{t.push(...e(r,s))}),t}};function K(n){return P(n)?n:(Array.isArray(n)?n:Object.entries(n)).filter(e=>e[1]!=null)}function me(n){return Array.isArray(n)?n.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?n.map(e=>K(e)):[n]:[K(n)]}function De(n){return n.filter(([e,t],r)=>{if(e.startsWith("$$"))return!1;for(let s=r-1;s>=0;s--)if(n[s][0]===e&&n[s][1]===t)return!1;return!0})}function ee(n){return n==null?"":De(n).map(([e,t])=>t!=null&&typeof t!="function"?`${e}:${t};`:void 0).filter(Boolean).join("")}function X(n){return n&&typeof n=="object"&&!Array.isArray(n)}function oe(n,e,t=!1){let r=n,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...r,...s]:[...s];let i={...r};return X(r)&&X(s)&&Object.keys(s).forEach(f=>{X(r[f])&&X(s[f])||Array.isArray(r[f])&&Array.isArray(s[f])?i[f]=oe(r[f],s[f],t):Object.assign(i,{[f]:s[f]})}),i}function B(n){let e,t,r;if(Array.isArray(n)){for(t=Array.from({length:e=n.length});e--;)t[e]=(r=n[e])&&typeof r=="object"?B(r):r;return t}if(Object.prototype.toString.call(n)==="[object Object]"){t={};for(e in n)e==="__proto__"?Object.defineProperty(t,e,{value:B(n[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(r=n[e])&&typeof r=="object"?B(r):r;return t}return n}function he(n){return P(n[0])}function ge(n){return P(n[0])}var te={};function Fe(n=["-",":"]){let e=n.join("|");return te[e]||(te[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),te[e].lastIndex=0,te[e]}function Ie(n,e=["-",":"],t=5){let r=Fe(e),s,i=n.toString(),f=new Set,d=new Map;do s=!1,i=i.replace(r,(o,a,c,h,g)=>{if(!e.includes(c))return o;s=!0,f.add(a+c);let E=g+a.length+c.length+1,C={length:o.length,items:[]};d.set(g,C);for(let w of[...h.matchAll(/\S+/g)]){let $=E+w.index,S=d.get($)?.items;S?d.delete($):S=[{offset:$,length:w[0].length,className:w[0]}];for(let b of S)b.className=b.className==="~"?a:b.className.replace(/^(!?)(.*)/,`$1${a}${c}$2`),C.items.push(b)}return"$".repeat(o.length)}),t-=1;while(s&&t);let l;if(typeof n=="string"){l="";let o=0;for(let[a,c]of d)l+=n.slice(o,a),l+=c.items.map(h=>h.className).join(" "),o=a+c.length;l+=n.slice(o)}else{l=n;for(let[o,a]of d)l.overwrite(o,o+a.length,a.items.map(c=>c.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:d,get expanded(){return l.toString()}}}function ye(n,e=["-",":"],t=5){let r=Ie(n,e,t);return typeof n=="string"?r.expanded:n}var xe=new Set;function Se(n){xe.has(n)||(console.warn("[unocss]",n),xe.add(n))}function Te(n){return U(n).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var be="_uno_resolved";async function Ke(n){let e=typeof n=="function"?await n():await n;if(be in e)return e;e={...e},Object.defineProperty(e,be,{value:!0,enumerable:!1});let t=e.shortcuts?Te(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let r=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(r),e.rules?.forEach(r)}return e}async function Re(n){let e=await Ke(n);if(!e.presets)return[e];let t=(await Promise.all((e.presets||[]).flatMap(U).flatMap(Re))).flat();return[e,...t]}function Ge(n){if(n.length===0)return{};let e=[],t=[],r=!1,s=[],i=[],f=[];for(let l of n){if(l.pipeline===!1){r=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&t.push(l.pipeline.exclude);l.filesystem&&s.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&f.push(l.plain)}let d={pipeline:r?!1:{include:_(Ce(...e)),exclude:_(Ce(...t))}};return s.length&&(d.filesystem=_(s.flat())),i.length&&(d.inline=_(i.flat())),f.length&&(d.plain=_(f.flat())),d}async function ae(n={},e={}){let t=Object.assign({},e,n),r=se((await Promise.all((t.presets||[]).flatMap(U).flatMap(Re))).flat(),(p,u)=>p.name===u.name),s=[...r.filter(p=>p.enforce==="pre"),...r.filter(p=>!p.enforce),...r.filter(p=>p.enforce==="post")],i=[...s,t],f=[...i].reverse(),d=Object.assign({},ue,...i.map(p=>p.layers));function l(p){return _(i.flatMap(u=>U(u[p]||[])))}let o=l("extractors"),a=f.find(p=>p.extractorDefault!==void 0)?.extractorDefault;a===void 0&&(a=W),a&&!o.includes(a)&&o.unshift(a),o.sort((p,u)=>(p.order||0)-(u.order||0));let c=l("rules"),h={},g=c.length,E=c.filter(p=>he(p)?(U(p[2]?.prefix||"").forEach(m=>{h[m+p[0]]=p}),!1):!0).reverse(),C=He(i.map(p=>p.theme)),w=l("extendTheme");for(let p of w)C=p(C)||C;let $={templates:_(i.flatMap(p=>U(p.autocomplete?.templates))),extractors:i.flatMap(p=>U(p.autocomplete?.extractors)).sort((p,u)=>(p.order||0)-(u.order||0)),shorthands:Be(i.map(p=>p.autocomplete?.shorthands||{}))},S=l("separators");S.length||(S=[":","-"]);let b=l("content"),V=Ge(b),v={mergeSelectors:!0,warn:!0,sortLayers:p=>p,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:d,theme:C,rules:c,rulesSize:g,rulesDynamic:E,rulesStaticMap:h,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:$,variants:l("variants").map(pe).sort((p,u)=>(p.order||0)-(u.order||0)),shortcuts:Te(l("shortcuts")).reverse(),extractors:o,safelist:l("safelist"),separators:S,details:t.details??t.envMode==="dev",content:V,transformers:se(l("transformers"),(p,u)=>p.name===u.name)};for(let p of i)p?.configResolved?.(v);return v}function He(n){return n.map(e=>e?B(e):{}).reduce((e,t)=>oe(e,t),{})}function Be(n){return n.reduce((e,t)=>{let r={};for(let s in t){let i=t[s];Array.isArray(i)?r[s]=`(${i.join("|")})`:r[s]=i}return{...e,...r}},{})}function Ce(...n){return n.flatMap(Ne)}function Ne(n){return Array.isArray(n)?n:n?[n]:[]}var Ee="0.65.4";function ve(){return{events:{},emit(n,...e){(this.events[n]||[]).forEach(t=>t(...e))},on(n,e){return(this.events[n]=this.events[n]||[]).push(e),()=>this.events[n]=(this.events[n]||[]).filter(t=>t!==e)}}}var I={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},le=class n{constructor(e={},t={}){this.userConfig=e;this.defaults=t}version=Ee;events=ve();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},t={}){let r=new n(e,t);return r.config=await ae(r.userConfig,r.defaults),r.events.emit("config",r.config),r}async setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await ae(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,r=new Set){let s={original:e,code:e,id:t,extracted:r,envMode:this.config.envMode};for(let i of this.config.extractors){let f=await i.extract?.(s);if(f)if(Y(f)&&Y(r))for(let d of f)r.setCount(d,r.getCount(d)+f.getCount(d));else for(let d of f)r.add(d)}return r}makeContext(e,t){let r={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:I,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(r,...s),variantMatch:t};return r}async parseToken(e,t){if(this.blocked.has(e))return;let r=`${e}${t?` ${t}`:""}`;if(this.cache.has(r))return this.cache.get(r);let s=e;for(let l of this.config.preprocess)s=l(e);if(this.isBlocked(s)){this.blocked.add(e),this.cache.set(r,null);return}let i=await this.matchVariants(e,s);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this.cache.set(r,null);return}let f=async l=>{let o=this.makeContext(e,[t||l[0],l[1],l[2],l[3]]);this.config.details&&(o.variants=[...l[3]]);let a=await this.expandShortcut(o.currentSelector,o);return a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(h=>this.stringifyUtil(h,o)).filter(Z)},d=(await Promise.all(i.map(l=>f(l)))).flat().filter(l=>!!l);if(d?.length)return this.cache.set(r,d),d;this.cache.set(r,null)}async generate(e,t={}){let{id:r,scope:s,preflights:i=!0,safelist:f=!0,minify:d=!1,extendedInfo:l=!1}=t,o=P(e)?await this.applyExtractors(e,r,l?new H:new Set):Array.isArray(e)?new Set(e):e;if(f){let u={generator:this,theme:this.config.theme};this.config.safelist.flatMap(m=>typeof m=="function"?m(u):m).forEach(m=>{o.has(m)||o.add(m)})}let a=d?"":`
2
+ `,c=new Set([G]),h=l?new Map:new Set,g=new Map,E={},C=Array.from(o).map(async u=>{if(h.has(u))return;let m=await this.parseToken(u);if(m!=null){h instanceof Map?h.set(u,{data:m,count:Y(o)?o.getCount(u):-1}):h.add(u);for(let x of m){let j=x[3]||"",k=x[4]?.layer;g.has(j)||g.set(j,[]),g.get(j).push(x),k&&c.add(k)}}});await Promise.all(C),await(async()=>{if(!i)return;let u={generator:this,theme:this.config.theme},m=new Set([]);this.config.preflights.forEach(({layer:x=z})=>{c.add(x),m.add(x)}),E=Object.fromEntries(await Promise.all(Array.from(m).map(async x=>{let k=(await Promise.all(this.config.preflights.filter(L=>(L.layer||z)===x).map(async L=>await L.getCSS(u)))).filter(Boolean).join(a);return[x,k]})))})();let w=this.config.sortLayers(Array.from(c).sort((u,m)=>(this.config.layers[u]??0)-(this.config.layers[m]??0)||u.localeCompare(m))),$={},S=this.config.outputToCssLayers,b=u=>{let m=u;return typeof S=="object"&&(m=S.cssLayerName?.(u)),m===null?null:m??u},V=(u=G)=>{if($[u])return $[u];let m=Array.from(g).sort((k,L)=>(this.parentOrders.get(k[0])??0)-(this.parentOrders.get(L[0])??0)||k[0]?.localeCompare(L[0]||"")||0).map(([k,L])=>{let y=L.length,R=L.filter(T=>(T[4]?.layer||G)===u).sort((T,O)=>T[0]-O[0]||(T[4]?.sort||0)-(O[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(O[5]?.currentSelector??"")||T[1]?.localeCompare(O[1]||"")||T[2]?.localeCompare(O[2]||"")||0).map(([,T,O,,N,,ne])=>[[[(T&&Ye(T,s))??"",N?.sort??0]],O,!!(ne??N?.noMerge)]);if(!R.length)return;let A=R.reverse().map(([T,O,N],ne)=>{if(!N&&this.config.mergeSelectors)for(let F=ne+1;F<y;F++){let D=R[F];if(D&&!D[2]&&(T&&D[0]||T==null&&D[0]==null)&&D[1]===O)return T&&D[0]&&D[0].push(...T),null}let re=T?_(T.sort((F,D)=>F[1]-D[1]||F[0]?.localeCompare(D[0]||"")||0).map(F=>F[0]).filter(Boolean)):[];return re.length?`${re.join(`,${a}`)}{${O}}`:O}).filter(Boolean).reverse().join(a);if(!k)return A;let M=k.split(" $$ ");return`${M.join("{")}{${a}${A}${a}${"}".repeat(M.length)}`}).filter(Boolean).join(a);i&&(m=[E[u],m].filter(Boolean).join(a));let x;S&&m&&(x=b(u),x!==null&&(m=`@layer ${x}{${a}${m}${a}}`));let j=d?"":`/* layer: ${u}${x&&x!==u?`, alias: ${x}`:""} */${a}`;return $[u]=m?j+m:""},v=(u=w,m)=>{let x=u.filter(j=>!m?.includes(j));return[S&&x.length>0?`@layer ${x.map(b).filter(Z).join(", ")};`:void 0,...x.map(j=>V(j)||"")].filter(Boolean).join(a)};return{get css(){return v()},layers:w,matched:h,getLayers:v,getLayer:V,setLayer:async(u,m)=>{let x=await m(V(u));return $[u]=x,x}}}async matchVariants(e,t){let r={rawSelector:e,theme:this.config.theme,generator:this},s=async i=>{let f=!0,[,,d,l]=i;for(;f;){f=!1;let o=i[1];for(let a of this.config.variants){if(!a.multiPass&&l.has(a))continue;let c=await a.match(o,r);if(c){if(P(c)){if(c===o)continue;c={matcher:c}}if(Array.isArray(c)){if(!c.length)continue;if(c.length===1)c=c[0];else{if(a.multiPass)throw new Error("multiPass can not be used together with array return variants");let h=c.map(g=>{let E=g.matcher??o,C=[g,...d],w=new Set(l);return w.add(a),[i[0],E,C,w]});return(await Promise.all(h.map(g=>s(g)))).flat()}}i[1]=c.matcher??o,d.unshift(c),l.add(a),f=!0;break}}if(!f)break;if(d.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await s([e,t||e,[],new Set])}applyVariants(e,t=e[4],r=e[1]){let i=t.slice().sort((o,a)=>(o.order||0)-(a.order||0)).reduceRight((o,a)=>c=>{let h=a.body?.(c.entries)||c.entries,g=Array.isArray(a.parent)?a.parent:[a.parent,void 0];return(a.handle??Ze)({...c,entries:h,selector:a.selector?.(c.selector,h)||c.selector,parent:g[0]||c.parent,parentOrder:g[1]||c.parentOrder,layer:a.layer||c.layer,sort:a.sort||c.sort},o)},o=>o)({prefix:"",selector:qe(r),pseudo:"",entries:e[2]}),{parent:f,parentOrder:d}=i;f!=null&&d!=null&&this.parentOrders.set(f,d);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:f,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let o of this.config.postprocess)o(l);return l}constructCustomCSS(e,t,r){let s=K(t);if(P(s))return s;let{selector:i,entries:f,parent:d}=this.applyVariants([0,r||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${ee(f)}}`;return d?`${d}{${l}}`:l}async parseUtil(e,t,r=!1,s){let i=P(e)?await this.matchVariants(e):[e],f=async([l,o,a])=>{this.config.details&&(t.rules=t.rules??[]);let c=this.config.rulesStaticMap[o];if(c&&c[1]&&(r||!c[2]?.internal)){t.generator.activatedRules.add(c),this.config.details&&t.rules.push(c);let g=this.config.rules.indexOf(c),E=K(c[1]),C=c[2];return P(E)?[[g,E,C]]:[[g,l,E,C,a]]}t.variantHandlers=a;let{rulesDynamic:h}=this.config;for(let g of h){let[E,C,w]=g;if(w?.internal&&!r)continue;let $=o;if(w?.prefix){let v=U(w.prefix);if(s){let p=U(s);if(!v.some(u=>p.includes(u)))continue}else{let p=v.find(u=>o.startsWith(u));if(p==null)continue;$=o.slice(p.length)}}let S=$.match(E);if(!S)continue;let b=await C(S,t);if(!b)continue;if(t.generator.activatedRules.add(g),this.config.details&&t.rules.push(g),typeof b!="string")if(Symbol.asyncIterator in b){let v=[];for await(let p of b)p&&v.push(p);b=v}else Symbol.iterator in b&&!Array.isArray(b)&&(b=Array.from(b).filter(Z));let V=me(b).filter(v=>v.length);if(V.length){let v=this.config.rules.indexOf(g);return V.map(p=>{if(P(p))return[v,p,w];let u=a,m=w;for(let x of p)x[0]===I.variants?u=[...U(x[1]),...u]:x[0]===I.parent?u=[{parent:x[1]},...u]:x[0]===I.selector?u=[{selector:x[1]},...u]:x[0]===I.layer?u=[{layer:x[1]},...u]:x[0]===I.sort&&(m={...m,sort:x[1]});return[v,l,p,m,u]})}}},d=(await Promise.all(i.map(l=>f(l)))).flat().filter(l=>!!l);if(d.length)return d}stringifyUtil(e,t){if(!e)return;if(ie(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:r,entries:s,parent:i,layer:f,sort:d,noMerge:l}=this.applyVariants(e),o=ee(s);if(!o)return;let{layer:a,sort:c,...h}=e[3]??{},g={...h,layer:f??a,sort:d??c};return[e[0],r,o,i,g,this.config.details?t:void 0,l]}async expandShortcut(e,t,r=5){if(r===0)return;let s=this.config.details?o=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(o)}:de,i,f,d,l;for(let o of this.config.shortcuts){let a=e;if(o[2]?.prefix){let h=U(o[2].prefix).find(g=>e.startsWith(g));if(h==null)continue;a=e.slice(h.length)}if(ge(o)){if(o[0]===a){i=i||o[2],f=o[1],s(o);break}}else{let c=a.match(o[0]);if(c&&(f=o[1](c,t)),f){i=i||o[2],s(o);break}}}if(f&&(d=_(U(f).filter(P).map(o=>ye(o.trim()).split(/\s+/g)).flat()),l=U(f).filter(o=>!P(o)).map(o=>({handles:[],value:o}))),!f){let o=P(e)?await this.matchVariants(e):[e];for(let a of o){let[c,h,g]=a;if(c!==h){let E=await this.expandShortcut(h,t,r-1);E&&(d=E[0].filter(P).map(C=>c.replace(h,C)),l=E[0].filter(C=>!P(C)).map(C=>({handles:[...C.handles,...g],value:C.value})))}}}if(!(!d?.length&&!l?.length))return[[await Promise.all(U(d).map(async o=>(await this.expandShortcut(o,t,r-1))?.[0]||[o])),l].flat(2).filter(o=>!!o),i]}async stringifyShortcuts(e,t,r,s={layer:this.config.shortcutsLayer}){let i=new Q,f=(await Promise.all(_(r).map(async a=>{let c=P(a)?await this.parseUtil(a,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(a.value),void 0,a.handles]];return!c&&this.config.warn&&Se(`unmatched utility "${a}" in shortcut "${e[1]}"`),c||[]}))).flat(1).filter(Boolean).sort((a,c)=>a[0]-c[0]),[d,,l]=e,o=[];for(let a of f){if(ie(a)){o.push([a[0],void 0,a[1],void 0,a[2],t,void 0]);continue}let{selector:c,entries:h,parent:g,sort:E,noMerge:C,layer:w}=this.applyVariants(a,[...a[4],...l],d);i.getFallback(w??s.layer,new J).getFallback(c,g,[[],a[0]])[0].push([h,!!(C??a[3]?.noMerge),E??0])}return o.concat(i.flatMap((a,c)=>a.map(([h,g],E,C)=>{let w=(S,b,V)=>{let v=Math.max(...V.map(u=>u[1])),p=V.map(u=>u[0]);return(S?[p.flat(1)]:p).map(u=>{let m=ee(u);if(m)return[g,E,m,C,{...s,noMerge:b,sort:v,layer:c},t,void 0]})};return[[h.filter(([,S])=>S).map(([S,,b])=>[S,b]),!0],[h.filter(([,S])=>!S).map(([S,,b])=>[S,b]),!1]].map(([S,b])=>[...w(!1,b,S.filter(([V])=>V.some(v=>v[0]===I.shortcutsNoMerge))),...w(!0,b,S.filter(([V])=>V.every(v=>v[0]!==I.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):P(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(r=>{let s=Array.isArray(r)?r[0]:r;return typeof s=="function"?s(e):P(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};async function Ae(n,e){return await le.create(n,e)}var Me=/\s\$\$\s+/g;function We(n){return Me.test(n)}function Ye(n,e){return We(n)?n.replace(Me,e?` ${e} `:" "):e?`${e} ${n}`:n}var we=/^\[(.+?)(~?=)"(.*)"\]$/;function qe(n){return we.test(n)?n.replace(we,(e,t,r,s)=>`[${q(t)}${r}"${q(s)}"]`):`.${q(n)}`}function Ze(n,e){return e(n)}function Je(n){return n.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function Pe(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ue(n){return n.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Ve=["Webkit","Moz","ms"];function $e(n){let e={};function t(r){let s=e[r];if(s)return s;let i=Je(r);if(i!=="filter"&&i in n)return e[r]=Ue(i);i=Pe(i);for(let f=0;f<Ve.length;f++){let d=`${Ve[f]}${i}`;if(d in n)return e[r]=Ue(Pe(d))}return r}return({entries:r})=>r.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Oe(n){return n.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}async function ce(n={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,r=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},n,s.runtime),f=i.defaults||{},d=i.cloakAttribute??"un-cloak";i.autoPrefix&&(f.postprocess=U(f.postprocess)).unshift($e(t.createElement("div").style)),i.configResolved?.(s,f);let l=await Ae(s,f),o=y=>i.inject?i.inject(y):r().prepend(y),a=()=>i.rootElement?i.rootElement():t.body,c=new Map,h=!0,g=new Set,E,C,w=[],$=()=>new Promise(y=>{w.push(y),C!=null&&clearTimeout(C),C=setTimeout(()=>V().then(()=>{let R=w;w=[],R.forEach(A=>A())}),0)});function S(y,R=!1){if(y.nodeType!==1)return;let A=y;A.hasAttribute(d)&&A.removeAttribute(d),R&&A.querySelectorAll(`[${d}]`).forEach(M=>{M.removeAttribute(d)})}function b(y,R){let A=c.get(y);if(!A)if(A=t.createElement("style"),A.setAttribute("data-unocss-runtime-layer",y),c.set(y,A),R==null)o(A);else{let M=b(R),T=M.parentNode;T?T.insertBefore(A,M.nextSibling):o(A)}return A}async function V(){let y=[...g],R=await l.generate(y);return R.layers.reduce((M,T)=>(b(T,M).innerHTML=R.getLayer(T)??"",T),void 0),y.filter(M=>!R.matched.has(M)).forEach(M=>g.delete(M)),{...R,getStyleElement:M=>c.get(M),getStyleElements:()=>c}}async function v(y){let R=g.size;await l.applyExtractors(y,void 0,g),R!==g.size&&await $()}async function p(y=a()){let R=y&&y.outerHTML;R&&(await v(`${R} ${Oe(R)}`),S(r()),S(y,!0))}let u=new MutationObserver(y=>{h||y.forEach(async R=>{if(R.target.nodeType!==1)return;let A=R.target;for(let M of c)if(A===M[1])return;if(R.type==="childList")R.addedNodes.forEach(async M=>{if(M.nodeType!==1)return;let T=M;E&&!E(T)||(await v(T.outerHTML),S(T))});else{if(E&&!E(A))return;if(R.attributeName!==d){let M=Array.from(A.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),T=`<${A.tagName.toLowerCase()} ${M}>`;await v(T)}S(A)}})}),m=!1;function x(){if(m)return;let y=i.observer?.target?i.observer.target():a();y&&(u.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),m=!0)}function j(){i.bypassDefined&&Qe(l.blocked),p(),x()}function k(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",j):j()}let L=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(y){P(y)||(y.forEach(R=>g.add(R)),y=""),await v(y)},extractAll:p,inspect(y){E=y},toggleObserver(y){y===void 0?h=!h:h=!!y,!m&&!h&&k()},update:V,presets:e.__unocss_runtime?.presets??{}};i.ready?.(L)!==!1&&(h=!1,k())}function Qe(n=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],r;try{if(r=t.cssRules||t.rules,!r)continue;Array.from(r).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),n.add(s))})}catch{continue}}return n}ce();})();