@unocss/runtime 0.65.0-beta.1 → 0.65.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributify.global.js +1 -1
- package/core.global.js +1 -1
- package/full.global.js +1 -1
- package/mini.global.js +1 -1
- package/package.json +4 -4
- package/uno.global.js +1 -1
package/attributify.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ka=Object.defineProperty;var Ga=(e,t)=>{for(var r in t)Ka(e,r,{get:t[r],enumerable:!0})};var Oe="default",et="preflights",Ha="shortcuts",qa="imports",zn={[qa]:-200,[et]:-100,[Ha]:-10,[Oe]:0};var tt=/[\\:]?[\s'"`;{}]+/g;function Ya(e){return e.split(tt)}var rt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ya(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Fr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function nt(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 ot=te;var Xa=/^\[(.+?)~?="(.*)"\]$/;var Za=/[\w\u00A0-\uFFFF%-?]/;function An(e){return e.match(Xa)}function Pe(e=""){return Za.test(e)}function On(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Lr(e){return e!=null}function Vn(){}var it=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)))}},st=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Pn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ja(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 ye(e){return e==null?"":Ja(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function at(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ur(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 at(n)&&at(o)&&Object.keys(o).forEach(s=>{at(n[s])&&at(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ur(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Me(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"?Me(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Me(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Me(n):n;return r}return e}function Mn(e){return P(e[0])}function Fn(e){return P(e[0])}var lt={};function Qa(e=["-",":"]){let t=e.join("|");return lt[t]||(lt[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),lt[t].lastIndex=0,lt[t]}function el(e,t=["-",":"],r=5){let n=Qa(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let g=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let w of[...d.matchAll(/\S+/g)]){let j=g+w.index,y=a.get(j)?.items;y?a.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`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function _n(e,t=["-",":"],r=5){let n=el(e,t,r);return typeof e=="string"?n.expanded:e}var Ln=new Set;function Un(e){Ln.has(e)||(console.warn("[unocss]",e),Ln.add(e))}function Nn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";async function tl(e){let t=typeof e=="function"?await e():await e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=O(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function Dn(e){let t=await tl(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(Dn))).flat();return[t,...r]}function rl(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(Bn(...t)),exclude:Z(Bn(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Wr(e={},t={}){let r=Object.assign({},t,e),n=Fr((await Promise.all((r.presets||[]).flatMap(O).flatMap(Dn))).flat(),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},zn,...i.map(h=>h.layers));function l(h){return Z(i.flatMap(b=>O(b[h]||[])))}let u=l("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=rt),f&&!u.includes(f)&&u.unshift(f),u.sort((h,b)=>(h.order||0)-(b.order||0));let p=l("rules"),d={},m=p.length,g=p.map((h,b)=>{if(Mn(h)){O(h[2]?.prefix||"").forEach(U=>{d[U+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),x=nl(i.map(h=>h.theme)),w=l("extendTheme");for(let h of w)x=h(x)||x;let j={templates:Z(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:ol(i.map(h=>h.autocomplete?.shorthands||{}))},y=l("separators");y.length||(y=[":","-"]);let $=l("content"),_=rl($),R={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:j,variants:l("variants").map(On).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:y,details:r.details??r.envMode==="dev",content:_,transformers:Fr(l("transformers"),(h,b)=>h.name===b.name)};for(let h of i)h?.configResolved?.(R);return R}function nl(e){return e.map(t=>t?Me(t):{}).reduce((t,r)=>Ur(t,r),{})}function ol(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 Bn(...e){return e.flatMap(il)}function il(e){return Array.isArray(e)?e:e?[e]:[]}var In="0.65.0-beta.1";function Kn(){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"},Br=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=In;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Kn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Wr(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._cache.clear(),this.config=await Wr(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(nt(s)&&nt(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Lr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let h={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(h):b).forEach(b=>{f.has(b)||f.add(b)})}let p=a?"":`
|
|
1
|
+
"use strict";(()=>{var Ka=Object.defineProperty;var Ga=(e,t)=>{for(var r in t)Ka(e,r,{get:t[r],enumerable:!0})};var Oe="default",et="preflights",Ha="shortcuts",qa="imports",zn={[qa]:-200,[et]:-100,[Ha]:-10,[Oe]:0};var tt=/[\\:]?[\s'"`;{}]+/g;function Ya(e){return e.split(tt)}var rt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ya(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Fr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function nt(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 ot=te;var Xa=/^\[(.+?)~?="(.*)"\]$/;var Za=/[\w\u00A0-\uFFFF%-?]/;function An(e){return e.match(Xa)}function Pe(e=""){return Za.test(e)}function On(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Lr(e){return e!=null}function Vn(){}var it=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)))}},st=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function Pn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ja(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 ye(e){return e==null?"":Ja(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function at(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ur(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 at(n)&&at(o)&&Object.keys(o).forEach(s=>{at(n[s])&&at(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Ur(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Me(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"?Me(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Me(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Me(n):n;return r}return e}function Mn(e){return P(e[0])}function Fn(e){return P(e[0])}var lt={};function Qa(e=["-",":"]){let t=e.join("|");return lt[t]||(lt[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),lt[t].lastIndex=0,lt[t]}function el(e,t=["-",":"],r=5){let n=Qa(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let g=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let w of[...d.matchAll(/\S+/g)]){let j=g+w.index,y=a.get(j)?.items;y?a.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`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function _n(e,t=["-",":"],r=5){let n=el(e,t,r);return typeof e=="string"?n.expanded:e}var Ln=new Set;function Un(e){Ln.has(e)||(console.warn("[unocss]",e),Ln.add(e))}function Nn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Wn="_uno_resolved";async function tl(e){let t=typeof e=="function"?await e():await e;if(Wn in t)return t;t={...t},Object.defineProperty(t,Wn,{value:!0,enumerable:!1});let r=t.shortcuts?Nn(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=O(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function Dn(e){let t=await tl(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(Dn))).flat();return[t,...r]}function rl(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(Bn(...t)),exclude:Z(Bn(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Wr(e={},t={}){let r=Object.assign({},t,e),n=Fr((await Promise.all((r.presets||[]).flatMap(O).flatMap(Dn))).flat(),(h,b)=>h.name===b.name),o=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},zn,...i.map(h=>h.layers));function l(h){return Z(i.flatMap(b=>O(b[h]||[])))}let u=l("extractors"),f=s.find(h=>h.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=rt),f&&!u.includes(f)&&u.unshift(f),u.sort((h,b)=>(h.order||0)-(b.order||0));let p=l("rules"),d={},m=p.length,g=p.map((h,b)=>{if(Mn(h)){O(h[2]?.prefix||"").forEach(U=>{d[U+h[0]]=[b,h[1],h[2],h]});return}return[b,...h]}).filter(Boolean).reverse(),x=nl(i.map(h=>h.theme)),w=l("extendTheme");for(let h of w)x=h(x)||x;let j={templates:Z(i.flatMap(h=>O(h.autocomplete?.templates))),extractors:i.flatMap(h=>O(h.autocomplete?.extractors)).sort((h,b)=>(h.order||0)-(b.order||0)),shorthands:ol(i.map(h=>h.autocomplete?.shorthands||{}))},y=l("separators");y.length||(y=[":","-"]);let $=l("content"),_=rl($),R={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:g,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:j,variants:l("variants").map(On).sort((h,b)=>(h.order||0)-(b.order||0)),shortcuts:Nn(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:y,details:r.details??r.envMode==="dev",content:_,transformers:Fr(l("transformers"),(h,b)=>h.name===b.name)};for(let h of i)h?.configResolved?.(R);return R}function nl(e){return e.map(t=>t?Me(t):{}).reduce((t,r)=>Ur(t,r),{})}function ol(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 Bn(...e){return e.flatMap(il)}function il(e){return Array.isArray(e)?e:e?[e]:[]}var In="0.65.0-beta.2";function Kn(){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"},Br=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=In;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Kn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Wr(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._cache.clear(),this.config=await Wr(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(nt(s)&&nt(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Lr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let h={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(h):b).forEach(b=>{f.has(b)||f.add(b)})}let p=a?"":`
|
|
2
2
|
`,d=new Set([Oe]),m=l?new Map:new Set,g=new Map,x={},w=Array.from(f).map(async h=>{if(m.has(h))return;let b=await this.parseToken(h);if(b!=null){m instanceof Map?m.set(h,{data:b,count:nt(f)?f.getCount(h):-1}):m.add(h);for(let V of b){let U=V[3]||"",G=V[4]?.layer;g.has(U)||g.set(U,[]),g.get(U).push(V),G&&d.add(G)}}});await Promise.all(w),await(async()=>{if(!i)return;let h={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:V=et})=>{d.add(V),b.add(V)}),x=Object.fromEntries(await Promise.all(Array.from(b).map(async V=>{let G=(await Promise.all(this.config.preflights.filter(oe=>(oe.layer||et)===V).map(async oe=>await oe.getCSS(h)))).filter(Boolean).join(p);return[V,G]})))})();let j=this.config.sortLayers(Array.from(d).sort((h,b)=>(this.config.layers[h]??0)-(this.config.layers[b]??0)||h.localeCompare(b))),y={},$=(h=Oe)=>{if(y[h])return y[h];let b=Array.from(g).sort((U,G)=>(this.parentOrders.get(U[0])??0)-(this.parentOrders.get(G[0])??0)||U[0]?.localeCompare(G[0]||"")||0).map(([U,G])=>{let oe=G.length,Ae=G.filter(k=>(k[4]?.layer||Oe)===h).sort((k,T)=>k[0]-T[0]||(k[4]?.sort||0)-(T[4]?.sort||0)||k[5]?.currentSelector?.localeCompare(T[5]?.currentSelector??"")||k[1]?.localeCompare(T[1]||"")||k[2]?.localeCompare(T[2]||"")||0).map(([,k,T,,B,,ie])=>[[[(k&&ll(k,o))??"",B?.sort??0]],T,!!(ie??B?.noMerge)]);if(!Ae.length)return;let S=Ae.reverse().map(([k,T,B],ie)=>{if(!B&&this.config.mergeSelectors)for(let se=ie+1;se<oe;se++){let Q=Ae[se];if(Q&&!Q[2]&&(k&&Q[0]||k==null&&Q[0]==null)&&Q[1]===T)return k&&Q[0]&&Q[0].push(...k),null}let Mr=k?Z(k.sort((se,Q)=>se[1]-Q[1]||se[0]?.localeCompare(Q[0]||"")||0).map(se=>se[0]).filter(Boolean)):[];return Mr.length?`${Mr.join(`,${p}`)}{${T}}`:T}).filter(Boolean).reverse().join(p);if(!U)return S;let z=U.split(" $$ ");return`${z.join("{")}{${p}${S}${p}${"}".repeat(z.length)}`}).filter(Boolean).join(p);if(i&&(b=[x[h],b].filter(Boolean).join(p)),u&&b){let U=typeof u=="object"?u.cssLayerName?.(h):void 0;U!==null&&(U||(U=h),b=`@layer ${U}{${p}${b}${p}}`)}let V=a?"":`/* layer: ${h} */${p}`;return y[h]=b?V+b:""},_=(h=j,b)=>h.filter(V=>!b?.includes(V)).map(V=>$(V)||"").filter(Boolean).join(p);return{get css(){return _()},layers:j,matched:m,getLayers:_,getLayer:$,setLayer:async(h,b)=>{let V=await b($(h));return y[h]=V,V}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,l]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&l.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 d=p.map(m=>{let g=m.matcher??u,x=[m,...a],w=new Set(l);return w.add(f),[i[0],g,x,w]});return(await Promise.all(d.map(m=>o(m)))).flat()}}i[1]=p.matcher??u,a.unshift(p),l.add(f),s=!0;break}}if(!s)break;if(a.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 d=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??ul)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:cl(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={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(l);return l}constructCustomCSS(t,r,n){let o=xe(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),l=`${i}{${ye(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([l,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){this.config.details&&r.rules.push(p[3]);let m=p[0],g=xe(p[1]),x=p[2];return P(g)?[[m,g,x]]:[[m,l,g,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let[m,g,x,w]of d){if(w?.internal&&!n)continue;let j=u;if(w?.prefix){let R=O(w.prefix);if(o){let h=O(o);if(!R.some(b=>h.includes(b)))continue}else{let h=R.find(b=>u.startsWith(b));if(h==null)continue;j=u.slice(h.length)}}let y=j.match(g);if(!y)continue;let $=await x(y,r);if(!$)continue;if(this.config.details&&r.rules.push([g,x,w]),typeof $!="string")if(Symbol.asyncIterator in $){let R=[];for await(let h of $)h&&R.push(h);$=R}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(Lr));let _=Pn($).filter(R=>R.length);if(_.length)return _.map(R=>{if(P(R))return[m,R,w];let h=f;for(let b of R)b[0]===pe.variants?h=[...O(b[1]),...h]:b[0]===pe.parent?h=[{parent:b[1]},...h]:b[0]===pe.selector?h=[{selector:b[1]},...h]:b[0]===pe.layer&&(h=[{layer:b[1]},...h]);return[m,l,R,w,h]})}},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a.length)return a}stringifyUtil(t,r){if(!t)return;if(_r(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:l}=this.applyVariants(t),u=ye(o);if(!u)return;let{layer:f,sort:p,...d}=t[3]??{},m={...d,layer:s??f,sort:a??p};return[t[0],n,u,i,m,this.config.details?r:void 0,l]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Vn,i,s;for(let a of this.config.shortcuts){let l=t;if(a[2]?.prefix){let f=O(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;l=t.slice(f.length)}if(Fn(a)){if(a[0]===l){i=i||a[2],s=a[1],o(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=O(s).map(a=>P(a)?_n(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(t)?await this.matchVariants(t):[t];for(let l of a){let[u,f]=l;if(u!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(d=>P(d)?u.replace(f,d):d))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new st,s=(await Promise.all(Z(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(f),void 0,[]]];return!p&&this.config.warn&&Un(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,l]=t,u=[];for(let f of s){if(_r(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:g,noMerge:x,layer:w}=this.applyVariants(f,[...f[4],...l],a);i.getFallback(w??o.layer,new it).getFallback(p,m,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),g??0])}return u.concat(i.flatMap((f,p)=>f.map(([d,m],g,x)=>{let w=(y,$,_)=>{let R=Math.max(..._.map(b=>b[1])),h=_.map(b=>b[0]);return(y?[h.flat(1)]:h).map(b=>{let V=ye(b);if(V)return[m,g,V,x,{...o,noMerge:$,sort:R,layer:p},r,void 0]})};return[[d.filter(([,y])=>y).map(([y,,$])=>[y,$]),!0],[d.filter(([,y])=>!y).map(([y,,$])=>[y,$]),!1]].map(([y,$])=>[...w(!1,$,y.filter(([_])=>_.some(R=>R[0]===pe.shortcutsNoMerge))),...w(!0,$,y.filter(([_])=>_.every(R=>R[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 Hn(e,t){return await Br.create(e,t)}var qn=/\s\$\$\s+/g;function al(e){return qn.test(e)}function ll(e,t){return al(e)?e.replace(qn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Gn=/^\[(.+?)(~?=)"(.*)"\]$/;function cl(e){return Gn.test(e)?e.replace(Gn,(t,r,n,o)=>`[${ot(r)}${n}"${ot(o)}"]`):`.${ot(e)}`}function ul(e,t){return t(e)}var Nr=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function Yn(e={}){let t=e.prefix??"un-",r=e.prefixedOnly??!1,n=e.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let a=An(i);if(!a)return;let l=a[1];if(l.startsWith(t))l=l.slice(t.length);else if(r)return;let u=a[2],[,f="",p=u]=u.match(Nr)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${l}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,m]=u.match(o)||[];if(m)return`${d}${f}${l}-${m}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),m=d.pop()+p,g=d.join("");return[{matcher:`${f}${l}-${p}`},{matcher:`${g}${l}-${m}`}]}return`${f}${l}-${p}`}}}var fl=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,pl=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,Xn=/[\s'"`;>]+/;function Zn(e){return{name:"attributify",extract:({content:t,cursor:r})=>{let n=t.matchAll(fl),o,i=0;for(let y of n){let[,$,_]=y,R=y.index+$.length;if(r>R&&r<=R+_.length){i=R,o=_;break}}if(!o)return null;let s=o.matchAll(pl),a=0,l,u;for(let y of s){let[$,_,R]=y,h=i+y.index;if(r>h&&r<=h+$.length){a=h,l=_,u=R?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let f=!!e?.prefix&&l.startsWith(e.prefix);if(e?.prefixedOnly&&!f)return null;let p=f?l.slice(e.prefix.length):l;if(u===void 0)return{extracted:p,resolveReplacement(y){let $=f?e.prefix.length:0;return{start:a+$,end:a+l.length,replacement:y}}};let d=a+l.length+2,m=Xn.exec(u),g=0,x;for(;m;){let[y]=m;if(r>d+g&&r<=d+g+m.index){x=u.slice(g,g+m.index);break}g+=m.index+y.length,m=Xn.exec(u.slice(g))}x===void 0&&(x=u.slice(g));let[,w="",j]=x.match(Nr)||[];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:g+d,end:g+d+x.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var dl=["v-bind:",":"],Jn=/[\s'"`;]+/g,Dr=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,ml=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,Ir=["placeholder","fill","opacity","stroke-opacity"];function Qn(e){let t=e?.ignoreAttributes??Ir,r=e?.nonValuedAttribute??!0,n=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Dr)).flatMap(i=>Array.from((i[1]||"").matchAll(ml))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(t.includes(i))return[];for(let l of dl)if(i.startsWith(l)){i=i.slice(l.length);break}if(!a){if(Pe(i)&&r!==!1){let l=[`[${i}=""]`];return n&&l.push(`[${i}="true"]`),l}return[]}return["class","className"].includes(i)?a.split(Jn).filter(Pe):Dr.test(a)?(Dr.lastIndex=0,this.extract({code:a})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:a.split(Jn).filter(l=>!!l&&l!==":").map(l=>`[${i}~="${l}"]`)})}}}var hl=(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??Ir;let t=[Yn(e)],r=[Qn(e)],n=[Zn(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:t,extractors:r,options:e,autocomplete:{extractors:n},extractorDefault:e.strict?!1:void 0}},eo=hl;function gl(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 to(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${gl(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function ro(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var bl=/\/\/#\s*sourceMappingURL=.*\n?/g;function no(e){return e.includes("sourceMappingURL=")?e.replace(bl,""):e}var xl=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,yl=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,vl=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function wl(e){let t=[];for(let o of e.matchAll(yl))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(xl))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=to(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(tt).forEach(o=>{o.includes(n)&&(o=ro(o,r)),Pe(o)&&!vl.test(o)&&t.push(o)}),t}function oo(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return wl(no(e))}}}var io=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return O(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function le(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 a of n){let l=a.length;if(l&&a===e.slice(s,s+l)&&i===0)return s===0||s===o-l?void 0:[e.slice(0,s),e.slice(s+l)]}}return[e,""]}function de(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=le(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Kr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],so=["%alpha","<alpha-value>"],$l=new RegExp(so.map(e=>ae(e)).join("|"));function H(e=""){let t=kl(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Kr.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function re(e){let t=e.alpha??1;return typeof t=="string"&&so.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace($l,`${t??1}`);let{components:r}=e,{alpha:n,type:o}=e;return n=t??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,Kr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function kl(e){if(!e)return;let t=Sl(e);if(t!=null||(t=Cl(e),t!=null)||(t=Rl(e),t!=null)||(t=Tl(e),t!=null)||(t=jl(e),t!=null))return t}function Sl(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 Cl(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function Rl(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=de(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 El=new RegExp(`^(${Kr.join("|")})\\((.+)\\)$`,"i");function Tl(e){let t=e.match(El);if(!t)return;let[,r,n]=t,o=ao(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function jl(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=ao(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function ao(e){let t=de(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=de(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 ct(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 lo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fo=new Uint8Array(64),zl=new Uint8Array(128);for(let e=0;e<lo.length;e++){let t=lo.charCodeAt(e);fo[e]=t,zl[t]=e}function Fe(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(fo[o])}while(n>0);return t}var co=1024*16,uo=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}},Gr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(co)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===co&&(this.out+=uo.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+uo.decode(t.subarray(0,n)):r}};function po(e){let t=new Gr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),a.length===0)continue;let l=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&t.write(44),l=Fe(t,f[0],l),f.length!==1&&(r=Fe(t,f[1],r),n=Fe(t,f[2],n),o=Fe(t,f[3],o),f.length!==4&&(i=Fe(t,f[4],i)))}}return t.flush()}var ut=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},ft=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 Al(){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 Ol=Al(),Hr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=po(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Ol(this.toString())}};function Vl(e){let t=e.split(`
|
|
3
3
|
`),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function Pl(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 Ml=Object.prototype.toString;function Fl(e){return Ml.call(e)==="[object Object]"}function mo(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 a=i-1,l=o-r[a];return{line:a,column:l}}}var _l=/\w/,qr=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/core.global.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(()=>{var G="default",N="preflights",$e="shortcuts",Oe="imports",ce={[Oe]:-200,[N]:-100,[$e]:-10,[G]:0};var le=/[\\:]?[\s'"`;{}]+/g;function je(n){return n.split(le)}var z={name:"@unocss/core/extractor-split",order:0,extract({code:n}){return je(n)}};function V(n=[]){return Array.isArray(n)?n:[n]}function j(n){return Array.from(new Set(n))}function te(n,e){return n.reduce((t,r)=>(t.findIndex(o=>e(r,o))===-1&&t.push(r),t),[])}function M(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 W(n){return n instanceof H}function _e(n){let e=n.length,t=-1,r,s="",o=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&&o===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 Y=_e;function ue(n){return typeof n=="function"?{match:n}:n}function ne(n){return n.length===3}function re(n){return n!=null}function fe(){}var q=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,o])=>e(o,t,s)))}},Z=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 M(n)?n:(Array.isArray(n)?n:Object.entries(n)).filter(e=>e[1]!=null)}function pe(n){return Array.isArray(n)?n.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?n.map(e=>K(e)):[n]:[K(n)]}function ke(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 Q(n){return n==null?"":ke(n).map(([e,t])=>t!=null&&typeof t!="function"?`${e}:${t};`:void 0).filter(Boolean).join("")}function J(n){return n&&typeof n=="object"&&!Array.isArray(n)}function se(n,e,t=!1){let r=n,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...r,...s]:[...s];let o={...r};return J(r)&&J(s)&&Object.keys(s).forEach(f=>{J(r[f])&&J(s[f])||Array.isArray(r[f])&&Array.isArray(s[f])?o[f]=se(r[f],s[f],t):Object.assign(o,{[f]:s[f]})}),o}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 de(n){return M(n[0])}function me(n){return M(n[0])}var X={};function Le(n=["-",":"]){let e=n.join("|");return X[e]||(X[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),X[e].lastIndex=0,X[e]}function De(n,e=["-",":"],t=5){let r=Le(e),s,o=n.toString(),f=new Set,l=new Map;do s=!1,o=o.replace(r,(d,u,c,g,y)=>{if(!e.includes(c))return d;s=!0,f.add(u+c);let T=y+u.length+c.length+1,R={length:d.length,items:[]};l.set(y,R);for(let v of[...g.matchAll(/\S+/g)]){let $=T+v.index,x=l.get($)?.items;x?l.delete($):x=[{offset:$,length:v[0].length,className:v[0]}];for(let S of x)S.className=S.className==="~"?u:S.className.replace(/^(!?)(.*)/,`$1${u}${c}$2`),R.items.push(S)}return"$".repeat(d.length)}),t-=1;while(s&&t);let a;if(typeof n=="string"){a="";let d=0;for(let[u,c]of l)a+=n.slice(d,u),a+=c.items.map(g=>g.className).join(" "),d=u+c.length;a+=n.slice(d)}else{a=n;for(let[d,u]of l)a.overwrite(d,d+u.length,u.items.map(c=>c.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:l,get expanded(){return a.toString()}}}function he(n,e=["-",":"],t=5){let r=De(n,e,t);return typeof n=="string"?r.expanded:n}var ge=new Set;function ye(n){ge.has(n)||(console.warn("[unocss]",n),ge.add(n))}function be(n){return V(n).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";async function Fe(n){let e=typeof n=="function"?await n():await n;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?be(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let r=s=>{s[2]||(s[2]={});let o=s[2];o.prefix==null&&e.prefix&&(o.prefix=V(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};t?.forEach(r),e.rules?.forEach(r)}return e}async function Ce(n){let e=await Fe(n);if(!e.presets)return[e];let t=(await Promise.all((e.presets||[]).flatMap(V).flatMap(Ce))).flat();return[e,...t]}function Ke(n){if(n.length===0)return{};let e=[],t=[],r=!1,s=[],o=[],f=[];for(let a of n){if(a.pipeline===!1){r=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&t.push(a.pipeline.exclude);a.filesystem&&s.push(a.filesystem),a.inline&&o.push(a.inline),a.plain&&f.push(a.plain)}let l={pipeline:r?!1:{include:j(Se(...e)),exclude:j(Se(...t))}};return s.length&&(l.filesystem=j(s.flat())),o.length&&(l.inline=j(o.flat())),f.length&&(l.plain=j(f.flat())),l}async function ie(n={},e={}){let t=Object.assign({},e,n),r=te((await Promise.all((t.presets||[]).flatMap(V).flatMap(Ce))).flat(),(i,p)=>i.name===p.name),s=[...r.filter(i=>i.enforce==="pre"),...r.filter(i=>!i.enforce),...r.filter(i=>i.enforce==="post")],o=[...s,t],f=[...o].reverse(),l=Object.assign({},ce,...o.map(i=>i.layers));function a(i){return j(o.flatMap(p=>V(p[i]||[])))}let d=a("extractors"),u=f.find(i=>i.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=z),u&&!d.includes(u)&&d.unshift(u),d.sort((i,p)=>(i.order||0)-(p.order||0));let c=a("rules"),g={},y=c.length,T=c.map((i,p)=>{if(de(i)){V(i[2]?.prefix||"").forEach(A=>{g[A+i[0]]=[p,i[1],i[2],i]});return}return[p,...i]}).filter(Boolean).reverse(),R=Ie(o.map(i=>i.theme)),v=a("extendTheme");for(let i of v)R=i(R)||R;let $={templates:j(o.flatMap(i=>V(i.autocomplete?.templates))),extractors:o.flatMap(i=>V(i.autocomplete?.extractors)).sort((i,p)=>(i.order||0)-(p.order||0)),shorthands:Ge(o.map(i=>i.autocomplete?.shorthands||{}))},x=a("separators");x.length||(x=[":","-"]);let S=a("content"),P=Ke(S),E={mergeSelectors:!0,warn:!0,sortLayers:i=>i,...t,blocklist:a("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:l,theme:R,rulesSize:y,rulesDynamic:T,rulesStaticMap:g,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:$,variants:a("variants").map(ue).sort((i,p)=>(i.order||0)-(p.order||0)),shortcuts:be(a("shortcuts")).reverse(),extractors:d,safelist:a("safelist"),separators:x,details:t.details??t.envMode==="dev",content:P,transformers:te(a("transformers"),(i,p)=>i.name===p.name)};for(let i of o)i?.configResolved?.(E);return E}function Ie(n){return n.map(e=>e?B(e):{}).reduce((e,t)=>se(e,t),{})}function Ge(n){return n.reduce((e,t)=>{let r={};for(let s in t){let o=t[s];Array.isArray(o)?r[s]=`(${o.join("|")})`:r[s]=o}return{...e,...r}},{})}function Se(...n){return n.flatMap(He)}function He(n){return Array.isArray(n)?n:n?[n]:[]}var Te="0.65.0-beta.1";function Ee(){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 F={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer"},oe=class n{constructor(e={},t={}){this.userConfig=e;this.defaults=t}version=Te;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Ee();static async create(e={},t={}){let r=new n(e,t);return r.config=await ie(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._cache.clear(),this.config=await ie(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 o of this.config.extractors){let f=await o.extract?.(s);if(f)if(W(f)&&W(r))for(let l of f)r.setCount(l,r.getCount(l)+f.getCount(l));else for(let l of f)r.add(l)}return r}makeContext(e,t){let r={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:F,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 a of this.config.preprocess)s=a(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(r,null);return}let o=await this.matchVariants(e,s);if(o.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this._cache.set(r,null);return}let f=async a=>{let d=this.makeContext(e,[t||a[0],a[1],a[2],a[3]]);this.config.details&&(d.variants=[...a[3]]);let u=await this.expandShortcut(d.currentSelector,d);return u?await this.stringifyShortcuts(d.variantMatch,d,u[0],u[1]):(await this.parseUtil(d.variantMatch,d))?.map(g=>this.stringifyUtil(g,d)).filter(re)},l=(await Promise.all(o.map(a=>f(a)))).flat().filter(a=>!!a);if(l?.length)return this._cache.set(r,l),l;this._cache.set(r,null)}async generate(e,t={}){let{id:r,scope:s,preflights:o=!0,safelist:f=!0,minify:l=!1,extendedInfo:a=!1}=t,d=this.config.outputToCssLayers,u=M(e)?await this.applyExtractors(e,r,a?new H:new Set):Array.isArray(e)?new Set(e):e;if(f){let i={generator:this,theme:this.config.theme};this.config.safelist.flatMap(p=>typeof p=="function"?p(i):p).forEach(p=>{u.has(p)||u.add(p)})}let c=l?"":`
|
|
1
|
+
"use strict";(()=>{var G="default",N="preflights",$e="shortcuts",Oe="imports",ce={[Oe]:-200,[N]:-100,[$e]:-10,[G]:0};var le=/[\\:]?[\s'"`;{}]+/g;function je(n){return n.split(le)}var z={name:"@unocss/core/extractor-split",order:0,extract({code:n}){return je(n)}};function V(n=[]){return Array.isArray(n)?n:[n]}function j(n){return Array.from(new Set(n))}function te(n,e){return n.reduce((t,r)=>(t.findIndex(o=>e(r,o))===-1&&t.push(r),t),[])}function M(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 W(n){return n instanceof H}function _e(n){let e=n.length,t=-1,r,s="",o=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&&o===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 Y=_e;function ue(n){return typeof n=="function"?{match:n}:n}function ne(n){return n.length===3}function re(n){return n!=null}function fe(){}var q=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,o])=>e(o,t,s)))}},Z=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 M(n)?n:(Array.isArray(n)?n:Object.entries(n)).filter(e=>e[1]!=null)}function pe(n){return Array.isArray(n)?n.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?n.map(e=>K(e)):[n]:[K(n)]}function ke(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 Q(n){return n==null?"":ke(n).map(([e,t])=>t!=null&&typeof t!="function"?`${e}:${t};`:void 0).filter(Boolean).join("")}function J(n){return n&&typeof n=="object"&&!Array.isArray(n)}function se(n,e,t=!1){let r=n,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...r,...s]:[...s];let o={...r};return J(r)&&J(s)&&Object.keys(s).forEach(f=>{J(r[f])&&J(s[f])||Array.isArray(r[f])&&Array.isArray(s[f])?o[f]=se(r[f],s[f],t):Object.assign(o,{[f]:s[f]})}),o}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 de(n){return M(n[0])}function me(n){return M(n[0])}var X={};function Le(n=["-",":"]){let e=n.join("|");return X[e]||(X[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),X[e].lastIndex=0,X[e]}function De(n,e=["-",":"],t=5){let r=Le(e),s,o=n.toString(),f=new Set,l=new Map;do s=!1,o=o.replace(r,(d,u,c,g,y)=>{if(!e.includes(c))return d;s=!0,f.add(u+c);let T=y+u.length+c.length+1,R={length:d.length,items:[]};l.set(y,R);for(let v of[...g.matchAll(/\S+/g)]){let $=T+v.index,x=l.get($)?.items;x?l.delete($):x=[{offset:$,length:v[0].length,className:v[0]}];for(let S of x)S.className=S.className==="~"?u:S.className.replace(/^(!?)(.*)/,`$1${u}${c}$2`),R.items.push(S)}return"$".repeat(d.length)}),t-=1;while(s&&t);let a;if(typeof n=="string"){a="";let d=0;for(let[u,c]of l)a+=n.slice(d,u),a+=c.items.map(g=>g.className).join(" "),d=u+c.length;a+=n.slice(d)}else{a=n;for(let[d,u]of l)a.overwrite(d,d+u.length,u.items.map(c=>c.className).join(" "))}return{prefixes:Array.from(f),hasChanged:s,groupsByOffset:l,get expanded(){return a.toString()}}}function he(n,e=["-",":"],t=5){let r=De(n,e,t);return typeof n=="string"?r.expanded:n}var ge=new Set;function ye(n){ge.has(n)||(console.warn("[unocss]",n),ge.add(n))}function be(n){return V(n).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";async function Fe(n){let e=typeof n=="function"?await n():await n;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?be(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let r=s=>{s[2]||(s[2]={});let o=s[2];o.prefix==null&&e.prefix&&(o.prefix=V(e.prefix)),o.layer==null&&e.layer&&(o.layer=e.layer)};t?.forEach(r),e.rules?.forEach(r)}return e}async function Ce(n){let e=await Fe(n);if(!e.presets)return[e];let t=(await Promise.all((e.presets||[]).flatMap(V).flatMap(Ce))).flat();return[e,...t]}function Ke(n){if(n.length===0)return{};let e=[],t=[],r=!1,s=[],o=[],f=[];for(let a of n){if(a.pipeline===!1){r=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&t.push(a.pipeline.exclude);a.filesystem&&s.push(a.filesystem),a.inline&&o.push(a.inline),a.plain&&f.push(a.plain)}let l={pipeline:r?!1:{include:j(Se(...e)),exclude:j(Se(...t))}};return s.length&&(l.filesystem=j(s.flat())),o.length&&(l.inline=j(o.flat())),f.length&&(l.plain=j(f.flat())),l}async function ie(n={},e={}){let t=Object.assign({},e,n),r=te((await Promise.all((t.presets||[]).flatMap(V).flatMap(Ce))).flat(),(i,p)=>i.name===p.name),s=[...r.filter(i=>i.enforce==="pre"),...r.filter(i=>!i.enforce),...r.filter(i=>i.enforce==="post")],o=[...s,t],f=[...o].reverse(),l=Object.assign({},ce,...o.map(i=>i.layers));function a(i){return j(o.flatMap(p=>V(p[i]||[])))}let d=a("extractors"),u=f.find(i=>i.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=z),u&&!d.includes(u)&&d.unshift(u),d.sort((i,p)=>(i.order||0)-(p.order||0));let c=a("rules"),g={},y=c.length,T=c.map((i,p)=>{if(de(i)){V(i[2]?.prefix||"").forEach(A=>{g[A+i[0]]=[p,i[1],i[2],i]});return}return[p,...i]}).filter(Boolean).reverse(),R=Ie(o.map(i=>i.theme)),v=a("extendTheme");for(let i of v)R=i(R)||R;let $={templates:j(o.flatMap(i=>V(i.autocomplete?.templates))),extractors:o.flatMap(i=>V(i.autocomplete?.extractors)).sort((i,p)=>(i.order||0)-(p.order||0)),shorthands:Ge(o.map(i=>i.autocomplete?.shorthands||{}))},x=a("separators");x.length||(x=[":","-"]);let S=a("content"),P=Ke(S),E={mergeSelectors:!0,warn:!0,sortLayers:i=>i,...t,blocklist:a("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:l,theme:R,rulesSize:y,rulesDynamic:T,rulesStaticMap:g,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:$,variants:a("variants").map(ue).sort((i,p)=>(i.order||0)-(p.order||0)),shortcuts:be(a("shortcuts")).reverse(),extractors:d,safelist:a("safelist"),separators:x,details:t.details??t.envMode==="dev",content:P,transformers:te(a("transformers"),(i,p)=>i.name===p.name)};for(let i of o)i?.configResolved?.(E);return E}function Ie(n){return n.map(e=>e?B(e):{}).reduce((e,t)=>se(e,t),{})}function Ge(n){return n.reduce((e,t)=>{let r={};for(let s in t){let o=t[s];Array.isArray(o)?r[s]=`(${o.join("|")})`:r[s]=o}return{...e,...r}},{})}function Se(...n){return n.flatMap(He)}function He(n){return Array.isArray(n)?n:n?[n]:[]}var Te="0.65.0-beta.2";function Ee(){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 F={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer"},oe=class n{constructor(e={},t={}){this.userConfig=e;this.defaults=t}version=Te;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Ee();static async create(e={},t={}){let r=new n(e,t);return r.config=await ie(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._cache.clear(),this.config=await ie(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 o of this.config.extractors){let f=await o.extract?.(s);if(f)if(W(f)&&W(r))for(let l of f)r.setCount(l,r.getCount(l)+f.getCount(l));else for(let l of f)r.add(l)}return r}makeContext(e,t){let r={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:F,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 a of this.config.preprocess)s=a(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(r,null);return}let o=await this.matchVariants(e,s);if(o.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this._cache.set(r,null);return}let f=async a=>{let d=this.makeContext(e,[t||a[0],a[1],a[2],a[3]]);this.config.details&&(d.variants=[...a[3]]);let u=await this.expandShortcut(d.currentSelector,d);return u?await this.stringifyShortcuts(d.variantMatch,d,u[0],u[1]):(await this.parseUtil(d.variantMatch,d))?.map(g=>this.stringifyUtil(g,d)).filter(re)},l=(await Promise.all(o.map(a=>f(a)))).flat().filter(a=>!!a);if(l?.length)return this._cache.set(r,l),l;this._cache.set(r,null)}async generate(e,t={}){let{id:r,scope:s,preflights:o=!0,safelist:f=!0,minify:l=!1,extendedInfo:a=!1}=t,d=this.config.outputToCssLayers,u=M(e)?await this.applyExtractors(e,r,a?new H:new Set):Array.isArray(e)?new Set(e):e;if(f){let i={generator:this,theme:this.config.theme};this.config.safelist.flatMap(p=>typeof p=="function"?p(i):p).forEach(p=>{u.has(p)||u.add(p)})}let c=l?"":`
|
|
2
2
|
`,g=new Set([G]),y=a?new Map:new Set,T=new Map,R={},v=Array.from(u).map(async i=>{if(y.has(i))return;let p=await this.parseToken(i);if(p!=null){y instanceof Map?y.set(i,{data:p,count:W(u)?u.getCount(i):-1}):y.add(i);for(let w of p){let A=w[3]||"",O=w[4]?.layer;T.has(A)||T.set(A,[]),T.get(A).push(w),O&&g.add(O)}}});await Promise.all(v),await(async()=>{if(!o)return;let i={generator:this,theme:this.config.theme},p=new Set([]);this.config.preflights.forEach(({layer:w=N})=>{g.add(w),p.add(w)}),R=Object.fromEntries(await Promise.all(Array.from(p).map(async w=>{let O=(await Promise.all(this.config.preflights.filter(k=>(k.layer||N)===w).map(async k=>await k.getCSS(i)))).filter(Boolean).join(c);return[w,O]})))})();let $=this.config.sortLayers(Array.from(g).sort((i,p)=>(this.config.layers[i]??0)-(this.config.layers[p]??0)||i.localeCompare(p))),x={},S=(i=G)=>{if(x[i])return x[i];let p=Array.from(T).sort((A,O)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(O[0])??0)||A[0]?.localeCompare(O[0]||"")||0).map(([A,O])=>{let k=O.length,I=O.filter(m=>(m[4]?.layer||G)===i).sort((m,b)=>m[0]-b[0]||(m[4]?.sort||0)-(b[4]?.sort||0)||m[5]?.currentSelector?.localeCompare(b[5]?.currentSelector??"")||m[1]?.localeCompare(b[1]||"")||m[2]?.localeCompare(b[2]||"")||0).map(([,m,b,,U,,L])=>[[[(m&&ze(m,s))??"",U?.sort??0]],b,!!(L??U?.noMerge)]);if(!I.length)return;let h=I.reverse().map(([m,b,U],L)=>{if(!U&&this.config.mergeSelectors)for(let D=L+1;D<k;D++){let _=I[D];if(_&&!_[2]&&(m&&_[0]||m==null&&_[0]==null)&&_[1]===b)return m&&_[0]&&_[0].push(...m),null}let ee=m?j(m.sort((D,_)=>D[1]-_[1]||D[0]?.localeCompare(_[0]||"")||0).map(D=>D[0]).filter(Boolean)):[];return ee.length?`${ee.join(`,${c}`)}{${b}}`:b}).filter(Boolean).reverse().join(c);if(!A)return h;let C=A.split(" $$ ");return`${C.join("{")}{${c}${h}${c}${"}".repeat(C.length)}`}).filter(Boolean).join(c);if(o&&(p=[R[i],p].filter(Boolean).join(c)),d&&p){let A=typeof d=="object"?d.cssLayerName?.(i):void 0;A!==null&&(A||(A=i),p=`@layer ${A}{${c}${p}${c}}`)}let w=l?"":`/* layer: ${i} */${c}`;return x[i]=p?w+p:""},P=(i=$,p)=>i.filter(w=>!p?.includes(w)).map(w=>S(w)||"").filter(Boolean).join(c);return{get css(){return P()},layers:$,matched:y,getLayers:P,getLayer:S,setLayer:async(i,p)=>{let w=await p(S(i));return x[i]=w,w}}}async matchVariants(e,t){let r={rawSelector:e,theme:this.config.theme,generator:this},s=async o=>{let f=!0,[,,l,a]=o;for(;f;){f=!1;let d=o[1];for(let u of this.config.variants){if(!u.multiPass&&a.has(u))continue;let c=await u.match(d,r);if(c){if(M(c)){if(c===d)continue;c={matcher:c}}if(Array.isArray(c)){if(!c.length)continue;if(c.length===1)c=c[0];else{if(u.multiPass)throw new Error("multiPass can not be used together with array return variants");let g=c.map(y=>{let T=y.matcher??d,R=[y,...l],v=new Set(a);return v.add(u),[o[0],T,R,v]});return(await Promise.all(g.map(y=>s(y)))).flat()}}o[1]=c.matcher??d,l.unshift(c),a.add(u),f=!0;break}}if(!f)break;if(l.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[o]};return await s([e,t||e,[],new Set])}applyVariants(e,t=e[4],r=e[1]){let o=t.slice().sort((d,u)=>(d.order||0)-(u.order||0)).reduceRight((d,u)=>c=>{let g=u.body?.(c.entries)||c.entries,y=Array.isArray(u.parent)?u.parent:[u.parent,void 0];return(u.handle??Ye)({...c,entries:g,selector:u.selector?.(c.selector,g)||c.selector,parent:y[0]||c.parent,parentOrder:y[1]||c.parentOrder,layer:u.layer||c.layer,sort:u.sort||c.sort},d)},d=>d)({prefix:"",selector:We(r),pseudo:"",entries:e[2]}),{parent:f,parentOrder:l}=o;f!=null&&l!=null&&this.parentOrders.set(f,l);let a={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:f,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(let d of this.config.postprocess)d(a);return a}constructCustomCSS(e,t,r){let s=K(t);if(M(s))return s;let{selector:o,entries:f,parent:l}=this.applyVariants([0,r||e.rawSelector,s,void 0,e.variantHandlers]),a=`${o}{${Q(f)}}`;return l?`${l}{${a}}`:a}async parseUtil(e,t,r=!1,s){let o=M(e)?await this.matchVariants(e):[e],f=async([a,d,u])=>{this.config.details&&(t.rules=t.rules??[]);let c=this.config.rulesStaticMap[d];if(c&&c[1]&&(r||!c[2]?.internal)){this.config.details&&t.rules.push(c[3]);let y=c[0],T=K(c[1]),R=c[2];return M(T)?[[y,T,R]]:[[y,a,T,R,u]]}t.variantHandlers=u;let{rulesDynamic:g}=this.config;for(let[y,T,R,v]of g){if(v?.internal&&!r)continue;let $=d;if(v?.prefix){let E=V(v.prefix);if(s){let i=V(s);if(!E.some(p=>i.includes(p)))continue}else{let i=E.find(p=>d.startsWith(p));if(i==null)continue;$=d.slice(i.length)}}let x=$.match(T);if(!x)continue;let S=await R(x,t);if(!S)continue;if(this.config.details&&t.rules.push([T,R,v]),typeof S!="string")if(Symbol.asyncIterator in S){let E=[];for await(let i of S)i&&E.push(i);S=E}else Symbol.iterator in S&&!Array.isArray(S)&&(S=Array.from(S).filter(re));let P=pe(S).filter(E=>E.length);if(P.length)return P.map(E=>{if(M(E))return[y,E,v];let i=u;for(let p of E)p[0]===F.variants?i=[...V(p[1]),...i]:p[0]===F.parent?i=[{parent:p[1]},...i]:p[0]===F.selector?i=[{selector:p[1]},...i]:p[0]===F.layer&&(i=[{layer:p[1]},...i]);return[y,a,E,v,i]})}},l=(await Promise.all(o.map(a=>f(a)))).flat().filter(a=>!!a);if(l.length)return l}stringifyUtil(e,t){if(!e)return;if(ne(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:o,layer:f,sort:l,noMerge:a}=this.applyVariants(e),d=Q(s);if(!d)return;let{layer:u,sort:c,...g}=e[3]??{},y={...g,layer:f??u,sort:l??c};return[e[0],r,d,o,y,this.config.details?t:void 0,a]}async expandShortcut(e,t,r=5){if(r===0)return;let s=this.config.details?l=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(l)}:fe,o,f;for(let l of this.config.shortcuts){let a=e;if(l[2]?.prefix){let u=V(l[2].prefix).find(c=>e.startsWith(c));if(u==null)continue;a=e.slice(u.length)}if(me(l)){if(l[0]===a){o=o||l[2],f=l[1],s(l);break}}else{let d=a.match(l[0]);if(d&&(f=l[1](d,t)),f){o=o||l[2],s(l);break}}}if(f&&(f=V(f).map(l=>M(l)?he(l.trim()).split(/\s+/g):l).flat()),!f){let l=M(e)?await this.matchVariants(e):[e];for(let a of l){let[d,u]=a;if(d!==u){let c=await this.expandShortcut(u,t,r-1);c&&(f=c[0].map(g=>M(g)?d.replace(u,g):g))}}}if(f)return[(await Promise.all(f.map(async l=>(M(l)?(await this.expandShortcut(l,t,r-1))?.[0]:void 0)||[l]))).flat(1).filter(l=>!!l),o]}async stringifyShortcuts(e,t,r,s={layer:this.config.shortcutsLayer}){let o=new Z,f=(await Promise.all(j(r).map(async u=>{let c=M(u)?await this.parseUtil(u,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(u),void 0,[]]];return!c&&this.config.warn&&ye(`unmatched utility "${u}" in shortcut "${e[1]}"`),c||[]}))).flat(1).filter(Boolean).sort((u,c)=>u[0]-c[0]),[l,,a]=e,d=[];for(let u of f){if(ne(u)){d.push([u[0],void 0,u[1],void 0,u[2],t,void 0]);continue}let{selector:c,entries:g,parent:y,sort:T,noMerge:R,layer:v}=this.applyVariants(u,[...u[4],...a],l);o.getFallback(v??s.layer,new q).getFallback(c,y,[[],u[0]])[0].push([g,!!(R??u[3]?.noMerge),T??0])}return d.concat(o.flatMap((u,c)=>u.map(([g,y],T,R)=>{let v=(x,S,P)=>{let E=Math.max(...P.map(p=>p[1])),i=P.map(p=>p[0]);return(x?[i.flat(1)]:i).map(p=>{let w=Q(p);if(w)return[y,T,w,R,{...s,noMerge:S,sort:E,layer:c},t,void 0]})};return[[g.filter(([,x])=>x).map(([x,,S])=>[x,S]),!0],[g.filter(([,x])=>!x).map(([x,,S])=>[x,S]),!1]].map(([x,S])=>[...v(!1,S,x.filter(([P])=>P.some(E=>E[0]===F.shortcutsNoMerge))),...v(!0,S,x.filter(([P])=>P.every(E=>E[0]!==F.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):M(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):M(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};async function ve(n,e){return await oe.create(n,e)}var we=/\s\$\$\s+/g;function Ne(n){return we.test(n)}function ze(n,e){return Ne(n)?n.replace(we,e?` ${e} `:" "):e?`${e} ${n}`:n}var Re=/^\[(.+?)(~?=)"(.*)"\]$/;function We(n){return Re.test(n)?n.replace(Re,(e,t,r,s)=>`[${Y(t)}${r}"${Y(s)}"]`):`.${Y(n)}`}function Ye(n,e){return e(n)}function qe(n){return n.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function Me(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ae(n){return n.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Pe=["Webkit","Moz","ms"];function Ue(n){let e={};function t(r){let s=e[r];if(s)return s;let o=qe(r);if(o!=="filter"&&o in n)return e[r]=Ae(o);o=Me(o);for(let f=0;f<Pe.length;f++){let l=`${Pe[f]}${o}`;if(l in n)return e[r]=Ae(Me(l))}return r}return({entries:r})=>r.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ve(n){return n.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}async function ae(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||{},o=Object.assign({},n,s.runtime),f=o.defaults||{},l=o.cloakAttribute??"un-cloak";o.autoPrefix&&(f.postprocess=V(f.postprocess)).unshift(Ue(t.createElement("div").style)),o.configResolved?.(s,f);let a=await ve(s,f),d=h=>o.inject?o.inject(h):r().prepend(h),u=()=>o.rootElement?o.rootElement():t.body,c=new Map,g=!0,y=new Set,T,R,v=[],$=()=>new Promise(h=>{v.push(h),R!=null&&clearTimeout(R),R=setTimeout(()=>P().then(()=>{let C=v;v=[],C.forEach(m=>m())}),0)});function x(h,C=!1){if(h.nodeType!==1)return;let m=h;m.hasAttribute(l)&&m.removeAttribute(l),C&&m.querySelectorAll(`[${l}]`).forEach(b=>{b.removeAttribute(l)})}function S(h,C){let m=c.get(h);if(!m)if(m=t.createElement("style"),m.setAttribute("data-unocss-runtime-layer",h),c.set(h,m),C==null)d(m);else{let b=S(C),U=b.parentNode;U?U.insertBefore(m,b.nextSibling):d(m)}return m}async function P(){let h=[...y],C=await a.generate(h);return C.layers.reduce((b,U)=>(S(U,b).innerHTML=C.getLayer(U)??"",U),void 0),h.filter(b=>!C.matched.has(b)).forEach(b=>y.delete(b)),{...C,getStyleElement:b=>c.get(b),getStyleElements:()=>c}}async function E(h){let C=y.size;await a.applyExtractors(h,void 0,y),C!==y.size&&await $()}async function i(h=u()){let C=h&&h.outerHTML;C&&(await E(`${C} ${Ve(C)}`),x(r()),x(h,!0))}let p=new MutationObserver(h=>{g||h.forEach(async C=>{if(C.target.nodeType!==1)return;let m=C.target;for(let b of c)if(m===b[1])return;if(C.type==="childList")C.addedNodes.forEach(async b=>{if(b.nodeType!==1)return;let U=b;T&&!T(U)||(await E(U.outerHTML),x(U))});else{if(T&&!T(m))return;if(C.attributeName!==l){let b=Array.from(m.attributes).map(L=>L.value?`${L.name}="${L.value}"`:L.name).join(" "),U=`<${m.tagName.toLowerCase()} ${b}>`;await E(U)}x(m)}})}),w=!1;function A(){if(w)return;let h=o.observer?.target?o.observer.target():u();h&&(p.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:o.observer?.attributeFilter}),w=!0)}function O(){o.bypassDefined&&Ze(a.blocked),i(),A()}function k(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",O):O()}let I=e.__unocss_runtime=e.__unocss_runtime={version:a.version,uno:a,async extract(h){M(h)||(h.forEach(C=>y.add(C)),h=""),await E(h)},extractAll:i,inspect(h){T=h},toggleObserver(h){h===void 0?g=!g:g=!!h,!w&&!g&&k()},update:P,presets:e.__unocss_runtime?.presets??{}};o.ready?.(I)!==!1&&(g=!1,k())}function Ze(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}ae();})();
|
package/full.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var el=Object.defineProperty;var tl=(e,t)=>{for(var r in t)el(e,r,{get:t[r],enumerable:!0})};var Oe="default",tt="preflights",rl="shortcuts",nl="imports",Vn={[nl]:-200,[tt]:-100,[rl]:-10,[Oe]:0};var rt=/[\\:]?[\s'"`;{}]+/g;function ol(e){return e.split(rt)}var nt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return ol(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Lr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 it=te;var il=/^\[(.+?)~?="(.*)"\]$/;var sl=/[\w\u00A0-\uFFFF%-?]/;function Pn(e){return e.match(il)}function Pe(e=""){return sl.test(e)}function Mn(e){return typeof e=="function"?{match:e}:e}function Ur(e){return e.length===3}function Wr(e){return e!=null}function Fn(){}var st=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)))}},at=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function _n(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function al(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 ye(e){return e==null?"":al(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function lt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Fe(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 lt(n)&<(o)&&Object.keys(o).forEach(s=>{lt(n[s])&<(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Fe(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Me(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"?Me(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Me(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Me(n):n;return r}return e}function Ln(e){return P(e[0])}function Un(e){return P(e[0])}var ct={};function ll(e=["-",":"]){let t=e.join("|");return ct[t]||(ct[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ct[t].lastIndex=0,ct[t]}function cl(e,t=["-",":"],r=5){let n=ll(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let h=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let w of[...d.matchAll(/\S+/g)]){let j=h+w.index,y=a.get(j)?.items;y?a.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`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Wn(e,t=["-",":"],r=5){let n=cl(e,t,r);return typeof e=="string"?n.expanded:e}var Nn=new Set;function Bn(e){Nn.has(e)||(console.warn("[unocss]",e),Nn.add(e))}function Kn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Dn="_uno_resolved";async function ul(e){let t=typeof e=="function"?await e():await e;if(Dn in t)return t;t={...t},Object.defineProperty(t,Dn,{value:!0,enumerable:!1});let r=t.shortcuts?Kn(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 Gn(e){let t=await ul(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(Gn))).flat();return[t,...r]}function fl(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(In(...t)),exclude:Z(In(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Nr(e={},t={}){let r=Object.assign({},t,e),n=Lr((await Promise.all((r.presets||[]).flatMap(O).flatMap(Gn))).flat(),(g,b)=>g.name===b.name),o=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Vn,...i.map(g=>g.layers));function l(g){return Z(i.flatMap(b=>O(b[g]||[])))}let u=l("extractors"),f=s.find(g=>g.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=nt),f&&!u.includes(f)&&u.unshift(f),u.sort((g,b)=>(g.order||0)-(b.order||0));let p=l("rules"),d={},m=p.length,h=p.map((g,b)=>{if(Ln(g)){O(g[2]?.prefix||"").forEach(U=>{d[U+g[0]]=[b,g[1],g[2],g]});return}return[b,...g]}).filter(Boolean).reverse(),x=pl(i.map(g=>g.theme)),w=l("extendTheme");for(let g of w)x=g(x)||x;let j={templates:Z(i.flatMap(g=>O(g.autocomplete?.templates))),extractors:i.flatMap(g=>O(g.autocomplete?.extractors)).sort((g,b)=>(g.order||0)-(b.order||0)),shorthands:dl(i.map(g=>g.autocomplete?.shorthands||{}))},y=l("separators");y.length||(y=[":","-"]);let $=l("content"),_=fl($),R={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:h,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:j,variants:l("variants").map(Mn).sort((g,b)=>(g.order||0)-(b.order||0)),shortcuts:Kn(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:y,details:r.details??r.envMode==="dev",content:_,transformers:Lr(l("transformers"),(g,b)=>g.name===b.name)};for(let g of i)g?.configResolved?.(R);return R}function pl(e){return e.map(t=>t?Me(t):{}).reduce((t,r)=>Fe(t,r),{})}function dl(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 In(...e){return e.flatMap(ml)}function ml(e){return Array.isArray(e)?e:e?[e]:[]}var Hn="0.65.0-beta.1";function qn(){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"},Br=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=Hn;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=qn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Nr(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._cache.clear(),this.config=await Nr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(ot(s)&&ot(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Wr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(g):b).forEach(b=>{f.has(b)||f.add(b)})}let p=a?"":`
|
|
1
|
+
"use strict";(()=>{var el=Object.defineProperty;var tl=(e,t)=>{for(var r in t)el(e,r,{get:t[r],enumerable:!0})};var Oe="default",tt="preflights",rl="shortcuts",nl="imports",Vn={[nl]:-200,[tt]:-100,[rl]:-10,[Oe]:0};var rt=/[\\:]?[\s'"`;{}]+/g;function ol(e){return e.split(rt)}var nt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return ol(e)}};function O(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Lr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function ot(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 it=te;var il=/^\[(.+?)~?="(.*)"\]$/;var sl=/[\w\u00A0-\uFFFF%-?]/;function Pn(e){return e.match(il)}function Pe(e=""){return sl.test(e)}function Mn(e){return typeof e=="function"?{match:e}:e}function Ur(e){return e.length===3}function Wr(e){return e!=null}function Fn(){}var st=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)))}},at=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function _n(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function al(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 ye(e){return e==null?"":al(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function lt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Fe(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 lt(n)&<(o)&&Object.keys(o).forEach(s=>{lt(n[s])&<(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Fe(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Me(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"?Me(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Me(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Me(n):n;return r}return e}function Ln(e){return P(e[0])}function Un(e){return P(e[0])}var ct={};function ll(e=["-",":"]){let t=e.join("|");return ct[t]||(ct[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),ct[t].lastIndex=0,ct[t]}function cl(e,t=["-",":"],r=5){let n=ll(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,m)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let h=m+f.length+p.length+1,x={length:u.length,items:[]};a.set(m,x);for(let w of[...d.matchAll(/\S+/g)]){let j=h+w.index,y=a.get(j)?.items;y?a.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`),x.items.push($)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Wn(e,t=["-",":"],r=5){let n=cl(e,t,r);return typeof e=="string"?n.expanded:e}var Nn=new Set;function Bn(e){Nn.has(e)||(console.warn("[unocss]",e),Nn.add(e))}function Kn(e){return O(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Dn="_uno_resolved";async function ul(e){let t=typeof e=="function"?await e():await e;if(Dn in t)return t;t={...t},Object.defineProperty(t,Dn,{value:!0,enumerable:!1});let r=t.shortcuts?Kn(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 Gn(e){let t=await ul(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(O).flatMap(Gn))).flat();return[t,...r]}function fl(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(In(...t)),exclude:Z(In(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Nr(e={},t={}){let r=Object.assign({},t,e),n=Lr((await Promise.all((r.presets||[]).flatMap(O).flatMap(Gn))).flat(),(g,b)=>g.name===b.name),o=[...n.filter(g=>g.enforce==="pre"),...n.filter(g=>!g.enforce),...n.filter(g=>g.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Vn,...i.map(g=>g.layers));function l(g){return Z(i.flatMap(b=>O(b[g]||[])))}let u=l("extractors"),f=s.find(g=>g.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=nt),f&&!u.includes(f)&&u.unshift(f),u.sort((g,b)=>(g.order||0)-(b.order||0));let p=l("rules"),d={},m=p.length,h=p.map((g,b)=>{if(Ln(g)){O(g[2]?.prefix||"").forEach(U=>{d[U+g[0]]=[b,g[1],g[2],g]});return}return[b,...g]}).filter(Boolean).reverse(),x=pl(i.map(g=>g.theme)),w=l("extendTheme");for(let g of w)x=g(x)||x;let j={templates:Z(i.flatMap(g=>O(g.autocomplete?.templates))),extractors:i.flatMap(g=>O(g.autocomplete?.extractors)).sort((g,b)=>(g.order||0)-(b.order||0)),shorthands:dl(i.map(g=>g.autocomplete?.shorthands||{}))},y=l("separators");y.length||(y=[":","-"]);let $=l("content"),_=fl($),R={mergeSelectors:!0,warn:!0,sortLayers:g=>g,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:m,rulesDynamic:h,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:j,variants:l("variants").map(Mn).sort((g,b)=>(g.order||0)-(b.order||0)),shortcuts:Kn(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:y,details:r.details??r.envMode==="dev",content:_,transformers:Lr(l("transformers"),(g,b)=>g.name===b.name)};for(let g of i)g?.configResolved?.(R);return R}function pl(e){return e.map(t=>t?Me(t):{}).reduce((t,r)=>Fe(t,r),{})}function dl(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 In(...e){return e.flatMap(ml)}function ml(e){return Array.isArray(e)?e:e?[e]:[]}var Hn="0.65.0-beta.2";function qn(){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"},Br=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=Hn;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=qn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Nr(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._cache.clear(),this.config=await Nr(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,n=new Set){let o={original:t,code:t,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(ot(s)&&ot(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Wr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(g):b).forEach(b=>{f.has(b)||f.add(b)})}let p=a?"":`
|
|
2
2
|
`,d=new Set([Oe]),m=l?new Map:new Set,h=new Map,x={},w=Array.from(f).map(async g=>{if(m.has(g))return;let b=await this.parseToken(g);if(b!=null){m instanceof Map?m.set(g,{data:b,count:ot(f)?f.getCount(g):-1}):m.add(g);for(let V of b){let U=V[3]||"",G=V[4]?.layer;h.has(U)||h.set(U,[]),h.get(U).push(V),G&&d.add(G)}}});await Promise.all(w),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:V=tt})=>{d.add(V),b.add(V)}),x=Object.fromEntries(await Promise.all(Array.from(b).map(async V=>{let G=(await Promise.all(this.config.preflights.filter(oe=>(oe.layer||tt)===V).map(async oe=>await oe.getCSS(g)))).filter(Boolean).join(p);return[V,G]})))})();let j=this.config.sortLayers(Array.from(d).sort((g,b)=>(this.config.layers[g]??0)-(this.config.layers[b]??0)||g.localeCompare(b))),y={},$=(g=Oe)=>{if(y[g])return y[g];let b=Array.from(h).sort((U,G)=>(this.parentOrders.get(U[0])??0)-(this.parentOrders.get(G[0])??0)||U[0]?.localeCompare(G[0]||"")||0).map(([U,G])=>{let oe=G.length,Ae=G.filter(k=>(k[4]?.layer||Oe)===g).sort((k,T)=>k[0]-T[0]||(k[4]?.sort||0)-(T[4]?.sort||0)||k[5]?.currentSelector?.localeCompare(T[5]?.currentSelector??"")||k[1]?.localeCompare(T[1]||"")||k[2]?.localeCompare(T[2]||"")||0).map(([,k,T,,N,,ie])=>[[[(k&&bl(k,o))??"",N?.sort??0]],T,!!(ie??N?.noMerge)]);if(!Ae.length)return;let S=Ae.reverse().map(([k,T,N],ie)=>{if(!N&&this.config.mergeSelectors)for(let se=ie+1;se<oe;se++){let Q=Ae[se];if(Q&&!Q[2]&&(k&&Q[0]||k==null&&Q[0]==null)&&Q[1]===T)return k&&Q[0]&&Q[0].push(...k),null}let _r=k?Z(k.sort((se,Q)=>se[1]-Q[1]||se[0]?.localeCompare(Q[0]||"")||0).map(se=>se[0]).filter(Boolean)):[];return _r.length?`${_r.join(`,${p}`)}{${T}}`:T}).filter(Boolean).reverse().join(p);if(!U)return S;let z=U.split(" $$ ");return`${z.join("{")}{${p}${S}${p}${"}".repeat(z.length)}`}).filter(Boolean).join(p);if(i&&(b=[x[g],b].filter(Boolean).join(p)),u&&b){let U=typeof u=="object"?u.cssLayerName?.(g):void 0;U!==null&&(U||(U=g),b=`@layer ${U}{${p}${b}${p}}`)}let V=a?"":`/* layer: ${g} */${p}`;return y[g]=b?V+b:""},_=(g=j,b)=>g.filter(V=>!b?.includes(V)).map(V=>$(V)||"").filter(Boolean).join(p);return{get css(){return _()},layers:j,matched:m,getLayers:_,getLayer:$,setLayer:async(g,b)=>{let V=await b($(g));return y[g]=V,V}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,l]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&l.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 d=p.map(m=>{let h=m.matcher??u,x=[m,...a],w=new Set(l);return w.add(f),[i[0],h,x,w]});return(await Promise.all(d.map(m=>o(m)))).flat()}}i[1]=p.matcher??u,a.unshift(p),l.add(f),s=!0;break}}if(!s)break;if(a.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 d=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??xl)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:Dr(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={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(l);return l}constructCustomCSS(t,r,n){let o=xe(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),l=`${i}{${ye(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([l,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){this.config.details&&r.rules.push(p[3]);let m=p[0],h=xe(p[1]),x=p[2];return P(h)?[[m,h,x]]:[[m,l,h,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let[m,h,x,w]of d){if(w?.internal&&!n)continue;let j=u;if(w?.prefix){let R=O(w.prefix);if(o){let g=O(o);if(!R.some(b=>g.includes(b)))continue}else{let g=R.find(b=>u.startsWith(b));if(g==null)continue;j=u.slice(g.length)}}let y=j.match(h);if(!y)continue;let $=await x(y,r);if(!$)continue;if(this.config.details&&r.rules.push([h,x,w]),typeof $!="string")if(Symbol.asyncIterator in $){let R=[];for await(let g of $)g&&R.push(g);$=R}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(Wr));let _=_n($).filter(R=>R.length);if(_.length)return _.map(R=>{if(P(R))return[m,R,w];let g=f;for(let b of R)b[0]===pe.variants?g=[...O(b[1]),...g]:b[0]===pe.parent?g=[{parent:b[1]},...g]:b[0]===pe.selector?g=[{selector:b[1]},...g]:b[0]===pe.layer&&(g=[{layer:b[1]},...g]);return[m,l,R,w,g]})}},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a.length)return a}stringifyUtil(t,r){if(!t)return;if(Ur(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:l}=this.applyVariants(t),u=ye(o);if(!u)return;let{layer:f,sort:p,...d}=t[3]??{},m={...d,layer:s??f,sort:a??p};return[t[0],n,u,i,m,this.config.details?r:void 0,l]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Fn,i,s;for(let a of this.config.shortcuts){let l=t;if(a[2]?.prefix){let f=O(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;l=t.slice(f.length)}if(Un(a)){if(a[0]===l){i=i||a[2],s=a[1],o(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=O(s).map(a=>P(a)?Wn(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(t)?await this.matchVariants(t):[t];for(let l of a){let[u,f]=l;if(u!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(d=>P(d)?u.replace(f,d):d))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new at,s=(await Promise.all(Z(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(f),void 0,[]]];return!p&&this.config.warn&&Bn(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,l]=t,u=[];for(let f of s){if(Ur(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:m,sort:h,noMerge:x,layer:w}=this.applyVariants(f,[...f[4],...l],a);i.getFallback(w??o.layer,new st).getFallback(p,m,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),h??0])}return u.concat(i.flatMap((f,p)=>f.map(([d,m],h,x)=>{let w=(y,$,_)=>{let R=Math.max(..._.map(b=>b[1])),g=_.map(b=>b[0]);return(y?[g.flat(1)]:g).map(b=>{let V=ye(b);if(V)return[m,h,V,x,{...o,noMerge:$,sort:R,layer:p},r,void 0]})};return[[d.filter(([,y])=>y).map(([y,,$])=>[y,$]),!0],[d.filter(([,y])=>!y).map(([y,,$])=>[y,$]),!1]].map(([y,$])=>[...w(!1,$,y.filter(([_])=>_.some(R=>R[0]===pe.shortcutsNoMerge))),...w(!0,$,y.filter(([_])=>_.every(R=>R[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 Xn(e,t){return await Br.create(e,t)}var Zn=/\s\$\$\s+/g;function hl(e){return Zn.test(e)}function bl(e,t){return hl(e)?e.replace(Zn,t?` ${t} `:" "):t?`${t} ${e}`:e}var Yn=/^\[(.+?)(~?=)"(.*)"\]$/;function Dr(e){return Yn.test(e)?e.replace(Yn,(t,r,n,o)=>`[${it(r)}${n}"${it(o)}"]`):`.${it(e)}`}function xl(e,t){return t(e)}var Ir=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function Jn(e={}){let t=e.prefix??"un-",r=e.prefixedOnly??!1,n=e.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let a=Pn(i);if(!a)return;let l=a[1];if(l.startsWith(t))l=l.slice(t.length);else if(r)return;let u=a[2],[,f="",p=u]=u.match(Ir)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${l}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,m]=u.match(o)||[];if(m)return`${d}${f}${l}-${m}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),m=d.pop()+p,h=d.join("");return[{matcher:`${f}${l}-${p}`},{matcher:`${h}${l}-${m}`}]}return`${f}${l}-${p}`}}}var yl=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,vl=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,Qn=/[\s'"`;>]+/;function eo(e){return{name:"attributify",extract:({content:t,cursor:r})=>{let n=t.matchAll(yl),o,i=0;for(let y of n){let[,$,_]=y,R=y.index+$.length;if(r>R&&r<=R+_.length){i=R,o=_;break}}if(!o)return null;let s=o.matchAll(vl),a=0,l,u;for(let y of s){let[$,_,R]=y,g=i+y.index;if(r>g&&r<=g+$.length){a=g,l=_,u=R?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let f=!!e?.prefix&&l.startsWith(e.prefix);if(e?.prefixedOnly&&!f)return null;let p=f?l.slice(e.prefix.length):l;if(u===void 0)return{extracted:p,resolveReplacement(y){let $=f?e.prefix.length:0;return{start:a+$,end:a+l.length,replacement:y}}};let d=a+l.length+2,m=Qn.exec(u),h=0,x;for(;m;){let[y]=m;if(r>d+h&&r<=d+h+m.index){x=u.slice(h,h+m.index);break}h+=m.index+y.length,m=Qn.exec(u.slice(h))}x===void 0&&(x=u.slice(h));let[,w="",j]=x.match(Ir)||[];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+d,end:h+d+x.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var wl=["v-bind:",":"],to=/[\s'"`;]+/g,Kr=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,$l=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,Gr=["placeholder","fill","opacity","stroke-opacity"];function ro(e){let t=e?.ignoreAttributes??Gr,r=e?.nonValuedAttribute??!0,n=e?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(Kr)).flatMap(i=>Array.from((i[1]||"").matchAll($l))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(t.includes(i))return[];for(let l of wl)if(i.startsWith(l)){i=i.slice(l.length);break}if(!a){if(Pe(i)&&r!==!1){let l=[`[${i}=""]`];return n&&l.push(`[${i}="true"]`),l}return[]}return["class","className"].includes(i)?a.split(to).filter(Pe):Kr.test(a)?(Kr.lastIndex=0,this.extract({code:a})):e?.prefixedOnly&&e.prefix&&!i.startsWith(e.prefix)?[]:a.split(to).filter(l=>!!l&&l!==":").map(l=>`[${i}~="${l}"]`)})}}}var kl=(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??Gr;let t=[Jn(e)],r=[ro(e)],n=[eo(e)];return{name:"@unocss/preset-attributify",enforce:"post",variants:t,extractors:r,options:e,autocomplete:{extractors:n},extractorDefault:e.strict?!1:void 0}},no=kl;var ut="__TAGIFY__",Sl=/<([\w:-]+)/g;function oo(e){let{prefix:t="",excludedTags:r=["b",/^h\d+$/,"table"]}=e;return{name:"tagify",extract({code:n}){return Array.from(n.matchAll(Sl)).filter(({1:o})=>{for(let i of r)if(typeof i=="string"){if(o===i)return!1}else if(i.test(o))return!1;return o.startsWith(t)}).map(([,o])=>`${ut}${o}`)}}}function io(e){let{extraProperties:t}=e,r=`${ut}${e.prefix??""}`;return{name:"tagify",match(n){if(!n.startsWith(r))return;let o=n.slice(r.length),i={matcher:o,selector:s=>s.slice(ut.length+1)};return t&&(typeof t=="function"?i.body=s=>[...s,...Object.entries(t(o)??{})]:i.body=s=>[...s,...Object.entries(t)]),i}}}var Cl=(e={})=>{let{defaultExtractor:t=!0}=e,r=[io(e)],n=[oo(e)];return{name:"@unocss/preset-tagify",variants:r,extractors:n,extractorDefault:t?void 0:!1}},so=Cl;function Hr(e){return{"h1,h2,h3,h4,h5,h6":{color:"var(--un-prose-headings)","font-weight":"600","line-height":1.25},a:{color:"var(--un-prose-links)","text-decoration":"underline","font-weight":"500"},"a code":{color:"var(--un-prose-links)"},"p,ul,ol,pre":{margin:"1em 0","line-height":1.75},blockquote:{margin:"1em 0","padding-left":"1em","font-style":"italic","border-left":".25em solid var(--un-prose-borders)"},h1:{margin:"1rem 0","font-size":"2.25em"},h2:{margin:"1.75em 0 .5em","font-size":"1.75em"},h3:{margin:"1.5em 0 .5em","font-size":"1.375em"},h4:{margin:"1em 0","font-size":"1.125em"},"img,video":{"max-width":"100%"},"figure,picture":{margin:"1em 0"},figcaption:{color:"var(--un-prose-captions)","font-size":".875em"},code:{color:"var(--un-prose-code)","font-size":".875em","font-weight":600,"font-family":e.fontFamily?.mono},":not(pre) > code::before,:not(pre) > code::after":{content:'"`"'},pre:{padding:"1.25rem 1.5rem","overflow-x":"auto","border-radius":".375rem"},"pre,code":{"white-space":"pre","word-spacing":"normal","word-break":"normal","word-wrap":"normal","-moz-tab-size":4,"-o-tab-size":4,"tab-size":4,"-webkit-hyphens":"none","-moz-hyphens":"none",hyphens:"none",background:"transparent"},"pre code":{"font-weight":"inherit"},"ol,ul":{"padding-left":"1.25em"},ol:{"list-style-type":"decimal"},'ol[type="A"]':{"list-style-type":"upper-alpha"},'ol[type="a"]':{"list-style-type":"lower-alpha"},'ol[type="A" s]':{"list-style-type":"upper-alpha"},'ol[type="a" s]':{"list-style-type":"lower-alpha"},'ol[type="I"]':{"list-style-type":"upper-roman"},'ol[type="i"]':{"list-style-type":"lower-roman"},'ol[type="I" s]':{"list-style-type":"upper-roman"},'ol[type="i" s]':{"list-style-type":"lower-roman"},'ol[type="1"]':{"list-style-type":"decimal"},ul:{"list-style-type":"disc"},"ol > li::marker,ul > li::marker,summary::marker":{color:"var(--un-prose-lists)"},hr:{margin:"2em 0",border:"1px solid var(--un-prose-hr)"},table:{display:"block",margin:"1em 0","border-collapse":"collapse","overflow-x":"auto"},"tr:nth-child(2n)":{background:"var(--un-prose-bg-soft)"},"td,th":{border:"1px solid var(--un-prose-borders)",padding:".625em 1em"},abbr:{cursor:"help"},kbd:{color:"var(--un-prose-code)",border:"1px solid",padding:".25rem .5rem","font-size":".875em","border-radius":".25rem"},details:{margin:"1em 0",padding:"1.25rem 1.5rem",background:"var(--un-prose-bg-soft)"},summary:{cursor:"pointer","font-weight":"600"}}}function ao(e){let t="",{escapedSelector:r,selectorName:n,preflights:o,compatibility:i}=e,s=i?.noColonNot||i?.noColonWhere;for(let a in o){let l=o[a],u=`:not(:where(.not-${n},.not-${n} *))`,f=a.split(",").map(p=>{let d=p.match(/:[():\-\w]+$/g);if(d){let m=d[0];return p=p.replace(m,""),r.map(h=>s?`${h} ${p}${m}`:`${h} :where(${p})${u}${m}`).join(",")}return null}).filter(p=>p);f.length?t+=f.join(","):t+=r.map(p=>s?a.split(",").map(d=>`${p} ${d}`).join(","):`${p} :where(${a})${u}`).join(","),t+="{";for(let p in l){let d=l[p];t+=`${p}:${d};`}t+="}"}return t}function lo(e,t){let{escapedSelectors:r,selectorName:n,cssExtend:o,compatibility:i}=t,s=Array.from(r);return!s[s.length-1].startsWith(".")&&!i?.noColonIs&&(s=[`:is(${s[s.length-1]},.${n})`]),ao(o?{escapedSelector:s,selectorName:n,preflights:Fe(Hr(e.theme),o),compatibility:i}:{escapedSelector:s,selectorName:n,preflights:Hr(e.theme),compatibility:i})}var Rl=e=>{e?.className&&console.warn('[unocss:preset-typography] "className" is deprecated. Use "selectorName" instead.');let t=new Set,r=e?.selectorName||e?.className||"prose",n=new RegExp(`^${r}$`),o=new RegExp(`^${r}-([-\\w]+)$`),i=new RegExp(`^${r}-invert$`),s=e?.compatibility;return{name:"@unocss/preset-typography",enforce:"post",layers:{typography:-20},rules:[[n,(a,{rawSelector:l})=>(t.add(Dr(l)),{color:"var(--un-prose-body)","max-width":"65ch"}),{layer:"typography"}],[o,([,a],{theme:l})=>{let u=l.colors?.[a];if(u==null)return;let f=typeof u=="object"?u:{};return{"--un-prose-body":f[700]??u,"--un-prose-headings":f[900]??u,"--un-prose-links":f[900]??u,"--un-prose-lists":f[400]??u,"--un-prose-hr":f[200]??u,"--un-prose-captions":f[500]??u,"--un-prose-code":f[900]??u,"--un-prose-borders":f[200]??u,"--un-prose-bg-soft":f[100]??u,"--un-prose-invert-body":f[200]??u,"--un-prose-invert-headings":f[100]??u,"--un-prose-invert-links":f[100]??u,"--un-prose-invert-lists":f[500]??u,"--un-prose-invert-hr":f[700]??u,"--un-prose-invert-captions":f[400]??u,"--un-prose-invert-code":f[100]??u,"--un-prose-invert-borders":f[700]??u,"--un-prose-invert-bg-soft":f[800]??u}},{layer:"typography"}],[i,()=>({"--un-prose-body":"var(--un-prose-invert-body)","--un-prose-headings":"var(--un-prose-invert-headings)","--un-prose-links":"var(--un-prose-invert-links)","--un-prose-lists":"var(--un-prose-invert-lists)","--un-prose-hr":"var(--un-prose-invert-hr)","--un-prose-captions":"var(--un-prose-invert-captions)","--un-prose-code":"var(--un-prose-invert-code)","--un-prose-borders":"var(--un-prose-invert-borders)","--un-prose-bg-soft":"var(--un-prose-invert-bg-soft)"}),{layer:"typography"}]],preflights:[{layer:"typography",getCSS:a=>{if(t.size>0){let l=typeof e?.cssExtend=="function"?e.cssExtend(a.theme):e?.cssExtend;return lo(a,{escapedSelectors:t,selectorName:r,cssExtend:l,compatibility:s})}}}]}},co=Rl;function El(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 uo(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${El(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function fo(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var Tl=/\/\/#\s*sourceMappingURL=.*\n?/g;function po(e){return e.includes("sourceMappingURL=")?e.replace(Tl,""):e}var jl=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,zl=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Al=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Ol(e){let t=[];for(let o of e.matchAll(zl))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(jl))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=uo(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(rt).forEach(o=>{o.includes(n)&&(o=fo(o,r)),Pe(o)&&!Al.test(o)&&t.push(o)}),t}function mo(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return Ol(po(e))}}}var go=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return O(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function le(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 a of n){let l=a.length;if(l&&a===e.slice(s,s+l)&&i===0)return s===0||s===o-l?void 0:[e.slice(0,s),e.slice(s+l)]}}return[e,""]}function de(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=le(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var qr=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],ho=["%alpha","<alpha-value>"],Vl=new RegExp(ho.map(e=>ae(e)).join("|"));function H(e=""){let t=Pl(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(qr.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 re(e){let t=e.alpha??1;return typeof t=="string"&&ho.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(Vl,`${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}`,qr.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function Pl(e){if(!e)return;let t=Ml(e);if(t!=null||(t=Fl(e),t!=null)||(t=_l(e),t!=null)||(t=Ul(e),t!=null)||(t=Wl(e),t!=null))return t}function Ml(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 Fl(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function _l(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=de(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 Ll=new RegExp(`^(${qr.join("|")})\\((.+)\\)$`,"i");function Ul(e){let t=e.match(Ll);if(!t)return;let[,r,n]=t,o=bo(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function Wl(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=bo(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function bo(e){let t=de(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=de(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function ft(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return t}var xo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo=new Uint8Array(64),Nl=new Uint8Array(128);for(let e=0;e<xo.length;e++){let t=xo.charCodeAt(e);wo[e]=t,Nl[t]=e}function _e(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(wo[o])}while(n>0);return t}var yo=1024*16,vo=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}},Yr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(yo)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===yo&&(this.out+=vo.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+vo.decode(t.subarray(0,n)):r}};function $o(e){let t=new Yr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),a.length===0)continue;let l=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&t.write(44),l=_e(t,f[0],l),f.length!==1&&(r=_e(t,f[1],r),n=_e(t,f[2],n),o=_e(t,f[3],o),f.length!==4&&(i=_e(t,f[4],i)))}}return t.flush()}var pt=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))}},dt=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 Bl(){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 Dl=Bl(),Xr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=$o(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Dl(this.toString())}};function Il(e){let t=e.split(`
|
|
3
3
|
`),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function Kl(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 Gl=Object.prototype.toString;function Hl(e){return Gl.call(e)==="[object Object]"}function ko(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 a=i-1,l=o-r[a];return{line:a,column:l}}}var ql=/\w/,Zr=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/mini.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var vi=Object.defineProperty;var Ci=(t,e)=>{for(var r in e)vi(t,r,{get:e[r],enumerable:!0})};var ge="default",Le="preflights",ki="shortcuts",Ri="imports",Gt={[Ri]:-200,[Le]:-100,[ki]:-10,[ge]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function Ti(t){return t.split(Fe)}var Ue={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ti(t)}};function A(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function ut(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function P(t){return typeof t=="string"}var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function _e(t){return t instanceof be}function Z(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Ie=te;var Ei=/^\[(.+?)~?="(.*)"\]$/;var ji=/[\w\u00A0-\uFFFF%-?]/;function Ht(t){return t.match(Ei)}function xe(t=""){return ji.test(t)}function qt(t){return typeof t=="function"?{match:t}:t}function ft(t){return t.length===3}function pt(t){return t!=null}function Yt(){}var We=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>e(i,r,o)))}},De=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function ie(t){return P(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Xt(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ie(e)):[t]:[ie(t)]}function Ai(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function se(t){return t==null?"":Ai(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ne(t){return t&&typeof t=="object"&&!Array.isArray(t)}function dt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Ne(n)&&Ne(o)&&Object.keys(o).forEach(s=>{Ne(n[s])&&Ne(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=dt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function ye(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?ye(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ye(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ye(n):n;return r}return t}function Zt(t){return P(t[0])}function Jt(t){return P(t[0])}var Be={};function Oi(t=["-",":"]){let e=t.join("|");return Be[e]||(Be[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Be[e].lastIndex=0,Be[e]}function Vi(t,e=["-",":"],r=5){let n=Oi(e),o,i=t.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(c,f,p,h,m)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let b=m+f.length+p.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...h.matchAll(/\S+/g)]){let R=b+w.index,x=a.get(R)?.items;x?a.delete(R):x=[{offset:R,length:w[0].length,className:w[0]}];for(let $ of x)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),y.items.push($)}return"$".repeat(c.length)}),r-=1;while(o&&r);let l;if(typeof t=="string"){l="";let c=0;for(let[f,p]of a)l+=t.slice(c,f),l+=p.items.map(h=>h.className).join(" "),c=f+p.length;l+=t.slice(c)}else{l=t;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Qt(t,e=["-",":"],r=5){let n=Vi(t,e,r);return typeof t=="string"?n.expanded:t}var er=new Set;function tr(t){er.has(t)||(console.warn("[unocss]",t),er.add(t))}function or(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var rr="_uno_resolved";async function Pi(t){let e=typeof t=="function"?await t():await t;if(rr in e)return e;e={...e},Object.defineProperty(e,rr,{value:!0,enumerable:!1});let r=e.shortcuts?or(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=A(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function ir(t){let e=await Pi(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(A).flatMap(ir))).flat();return[e,...r]}function Mi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let l of t){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:B(nr(...e)),exclude:B(nr(...r))}};return o.length&&(a.filesystem=B(o.flat())),i.length&&(a.inline=B(i.flat())),s.length&&(a.plain=B(s.flat())),a}async function ht(t={},e={}){let r=Object.assign({},e,t),n=ut((await Promise.all((r.presets||[]).flatMap(A).flatMap(ir))).flat(),(d,g)=>d.name===g.name),o=[...n.filter(d=>d.enforce==="pre"),...n.filter(d=>!d.enforce),...n.filter(d=>d.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Gt,...i.map(d=>d.layers));function l(d){return B(i.flatMap(g=>A(g[d]||[])))}let c=l("extractors"),f=s.find(d=>d.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ue),f&&!c.includes(f)&&c.unshift(f),c.sort((d,g)=>(d.order||0)-(g.order||0));let p=l("rules"),h={},m=p.length,b=p.map((d,g)=>{if(Zt(d)){A(d[2]?.prefix||"").forEach(M=>{h[M+d[0]]=[g,d[1],d[2],d]});return}return[g,...d]}).filter(Boolean).reverse(),y=zi(i.map(d=>d.theme)),w=l("extendTheme");for(let d of w)y=d(y)||y;let R={templates:B(i.flatMap(d=>A(d.autocomplete?.templates))),extractors:i.flatMap(d=>A(d.autocomplete?.extractors)).sort((d,g)=>(d.order||0)-(g.order||0)),shorthands:Li(i.map(d=>d.autocomplete?.shorthands||{}))},x=l("separators");x.length||(x=[":","-"]);let $=l("content"),V=Mi($),C={mergeSelectors:!0,warn:!0,sortLayers:d=>d,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:y,rulesSize:m,rulesDynamic:b,rulesStaticMap:h,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(qt).sort((d,g)=>(d.order||0)-(g.order||0)),shortcuts:or(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:x,details:r.details??r.envMode==="dev",content:V,transformers:ut(l("transformers"),(d,g)=>d.name===g.name)};for(let d of i)d?.configResolved?.(C);return C}function zi(t){return t.map(e=>e?ye(e):{}).reduce((e,r)=>dt(e,r),{})}function Li(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function nr(...t){return t.flatMap(Fi)}function Fi(t){return Array.isArray(t)?t:t?[t]:[]}var sr="0.65.0-beta.1";function ar(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var re={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer"},mt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=sr;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=ar();static async create(e={},r={}){let n=new t(e,r);return n.config=await ht(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=await ht(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(_e(s)&&_e(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:re,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=e;for(let l of this.config.preprocess)o=l(e);if(this.isBlocked(o)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this._cache.set(n,null);return}let s=async l=>{let c=this.makeContext(e,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(h=>this.stringifyUtil(h,c)).filter(pt)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,c=this.config.outputToCssLayers,f=P(e)?await this.applyExtractors(e,n,l?new be:new Set):Array.isArray(e)?new Set(e):e;if(s){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(g=>typeof g=="function"?g(d):g).forEach(g=>{f.has(g)||f.add(g)})}let p=a?"":`
|
|
1
|
+
"use strict";(()=>{var vi=Object.defineProperty;var Ci=(t,e)=>{for(var r in e)vi(t,r,{get:e[r],enumerable:!0})};var ge="default",Le="preflights",ki="shortcuts",Ri="imports",Gt={[Ri]:-200,[Le]:-100,[ki]:-10,[ge]:0};var Fe=/[\\:]?[\s'"`;{}]+/g;function Ti(t){return t.split(Fe)}var Ue={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ti(t)}};function A(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function ut(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function P(t){return typeof t=="string"}var be=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function _e(t){return t instanceof be}function Z(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.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&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var Ie=te;var Ei=/^\[(.+?)~?="(.*)"\]$/;var ji=/[\w\u00A0-\uFFFF%-?]/;function Ht(t){return t.match(Ei)}function xe(t=""){return ji.test(t)}function qt(t){return typeof t=="function"?{match:t}:t}function ft(t){return t.length===3}function pt(t){return t!=null}function Yt(){}var We=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>e(i,r,o)))}},De=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function ie(t){return P(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Xt(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ie(e)):[t]:[ie(t)]}function Ai(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function se(t){return t==null?"":Ai(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ne(t){return t&&typeof t=="object"&&!Array.isArray(t)}function dt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Ne(n)&&Ne(o)&&Object.keys(o).forEach(s=>{Ne(n[s])&&Ne(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=dt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function ye(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?ye(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:ye(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?ye(n):n;return r}return t}function Zt(t){return P(t[0])}function Jt(t){return P(t[0])}var Be={};function Oi(t=["-",":"]){let e=t.join("|");return Be[e]||(Be[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Be[e].lastIndex=0,Be[e]}function Vi(t,e=["-",":"],r=5){let n=Oi(e),o,i=t.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(c,f,p,h,m)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let b=m+f.length+p.length+1,y={length:c.length,items:[]};a.set(m,y);for(let w of[...h.matchAll(/\S+/g)]){let R=b+w.index,x=a.get(R)?.items;x?a.delete(R):x=[{offset:R,length:w[0].length,className:w[0]}];for(let $ of x)$.className=$.className==="~"?f:$.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),y.items.push($)}return"$".repeat(c.length)}),r-=1;while(o&&r);let l;if(typeof t=="string"){l="";let c=0;for(let[f,p]of a)l+=t.slice(c,f),l+=p.items.map(h=>h.className).join(" "),c=f+p.length;l+=t.slice(c)}else{l=t;for(let[c,f]of a)l.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Qt(t,e=["-",":"],r=5){let n=Vi(t,e,r);return typeof t=="string"?n.expanded:t}var er=new Set;function tr(t){er.has(t)||(console.warn("[unocss]",t),er.add(t))}function or(t){return A(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var rr="_uno_resolved";async function Pi(t){let e=typeof t=="function"?await t():await t;if(rr in e)return e;e={...e},Object.defineProperty(e,rr,{value:!0,enumerable:!1});let r=e.shortcuts?or(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=A(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function ir(t){let e=await Pi(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(A).flatMap(ir))).flat();return[e,...r]}function Mi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let l of t){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&e.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:B(nr(...e)),exclude:B(nr(...r))}};return o.length&&(a.filesystem=B(o.flat())),i.length&&(a.inline=B(i.flat())),s.length&&(a.plain=B(s.flat())),a}async function ht(t={},e={}){let r=Object.assign({},e,t),n=ut((await Promise.all((r.presets||[]).flatMap(A).flatMap(ir))).flat(),(d,g)=>d.name===g.name),o=[...n.filter(d=>d.enforce==="pre"),...n.filter(d=>!d.enforce),...n.filter(d=>d.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Gt,...i.map(d=>d.layers));function l(d){return B(i.flatMap(g=>A(g[d]||[])))}let c=l("extractors"),f=s.find(d=>d.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ue),f&&!c.includes(f)&&c.unshift(f),c.sort((d,g)=>(d.order||0)-(g.order||0));let p=l("rules"),h={},m=p.length,b=p.map((d,g)=>{if(Zt(d)){A(d[2]?.prefix||"").forEach(M=>{h[M+d[0]]=[g,d[1],d[2],d]});return}return[g,...d]}).filter(Boolean).reverse(),y=zi(i.map(d=>d.theme)),w=l("extendTheme");for(let d of w)y=d(y)||y;let R={templates:B(i.flatMap(d=>A(d.autocomplete?.templates))),extractors:i.flatMap(d=>A(d.autocomplete?.extractors)).sort((d,g)=>(d.order||0)-(g.order||0)),shorthands:Li(i.map(d=>d.autocomplete?.shorthands||{}))},x=l("separators");x.length||(x=[":","-"]);let $=l("content"),V=Mi($),C={mergeSelectors:!0,warn:!0,sortLayers:d=>d,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:y,rulesSize:m,rulesDynamic:b,rulesStaticMap:h,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:R,variants:l("variants").map(qt).sort((d,g)=>(d.order||0)-(g.order||0)),shortcuts:or(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:x,details:r.details??r.envMode==="dev",content:V,transformers:ut(l("transformers"),(d,g)=>d.name===g.name)};for(let d of i)d?.configResolved?.(C);return C}function zi(t){return t.map(e=>e?ye(e):{}).reduce((e,r)=>dt(e,r),{})}function Li(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function nr(...t){return t.flatMap(Fi)}function Fi(t){return Array.isArray(t)?t:t?[t]:[]}var sr="0.65.0-beta.2";function ar(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var re={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer"},mt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=sr;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=ar();static async create(e={},r={}){let n=new t(e,r);return n.config=await ht(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=await ht(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(_e(s)&&_e(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:re,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this._cache.has(n))return this._cache.get(n);let o=e;for(let l of this.config.preprocess)o=l(e);if(this.isBlocked(o)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(l=>!l||this.isBlocked(l[1]))){this.blocked.add(e),this._cache.set(n,null);return}let s=async l=>{let c=this.makeContext(e,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(c.variants=[...l[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(h=>this.stringifyUtil(h,c)).filter(pt)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,c=this.config.outputToCssLayers,f=P(e)?await this.applyExtractors(e,n,l?new be:new Set):Array.isArray(e)?new Set(e):e;if(s){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(g=>typeof g=="function"?g(d):g).forEach(g=>{f.has(g)||f.add(g)})}let p=a?"":`
|
|
2
2
|
`,h=new Set([ge]),m=l?new Map:new Set,b=new Map,y={},w=Array.from(f).map(async d=>{if(m.has(d))return;let g=await this.parseToken(d);if(g!=null){m instanceof Map?m.set(d,{data:g,count:_e(f)?f.getCount(d):-1}):m.add(d);for(let E of g){let M=E[3]||"",U=E[4]?.layer;b.has(M)||b.set(M,[]),b.get(M).push(E),U&&h.add(U)}}});await Promise.all(w),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},g=new Set([]);this.config.preflights.forEach(({layer:E=Le})=>{h.add(E),g.add(E)}),y=Object.fromEntries(await Promise.all(Array.from(g).map(async E=>{let U=(await Promise.all(this.config.preflights.filter(q=>(q.layer||Le)===E).map(async q=>await q.getCSS(d)))).filter(Boolean).join(p);return[E,U]})))})();let R=this.config.sortLayers(Array.from(h).sort((d,g)=>(this.config.layers[d]??0)-(this.config.layers[g]??0)||d.localeCompare(g))),x={},$=(d=ge)=>{if(x[d])return x[d];let g=Array.from(b).sort((M,U)=>(this.parentOrders.get(M[0])??0)-(this.parentOrders.get(U[0])??0)||M[0]?.localeCompare(U[0]||"")||0).map(([M,U])=>{let q=U.length,me=U.filter(S=>(S[4]?.layer||ge)===d).sort((S,k)=>S[0]-k[0]||(S[4]?.sort||0)-(k[4]?.sort||0)||S[5]?.currentSelector?.localeCompare(k[5]?.currentSelector??"")||S[1]?.localeCompare(k[1]||"")||S[2]?.localeCompare(k[2]||"")||0).map(([,S,k,,L,,Y])=>[[[(S&&Ii(S,o))??"",L?.sort??0]],k,!!(Y??L?.noMerge)]);if(!me.length)return;let v=me.reverse().map(([S,k,L],Y)=>{if(!L&&this.config.mergeSelectors)for(let X=Y+1;X<q;X++){let G=me[X];if(G&&!G[2]&&(S&&G[0]||S==null&&G[0]==null)&&G[1]===k)return S&&G[0]&&G[0].push(...S),null}let ct=S?B(S.sort((X,G)=>X[1]-G[1]||X[0]?.localeCompare(G[0]||"")||0).map(X=>X[0]).filter(Boolean)):[];return ct.length?`${ct.join(`,${p}`)}{${k}}`:k}).filter(Boolean).reverse().join(p);if(!M)return v;let T=M.split(" $$ ");return`${T.join("{")}{${p}${v}${p}${"}".repeat(T.length)}`}).filter(Boolean).join(p);if(i&&(g=[y[d],g].filter(Boolean).join(p)),c&&g){let M=typeof c=="object"?c.cssLayerName?.(d):void 0;M!==null&&(M||(M=d),g=`@layer ${M}{${p}${g}${p}}`)}let E=a?"":`/* layer: ${d} */${p}`;return x[d]=g?E+g:""},V=(d=R,g)=>d.filter(E=>!g?.includes(E)).map(E=>$(E)||"").filter(Boolean).join(p);return{get css(){return V()},layers:R,matched:m,getLayers:V,getLayer:$,setLayer:async(d,g)=>{let E=await g($(d));return x[d]=E,E}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,l]=i;for(;s;){s=!1;let c=i[1];for(let f of this.config.variants){if(!f.multiPass&&l.has(f))continue;let p=await f.match(c,n);if(p){if(P(p)){if(p===c)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 h=p.map(m=>{let b=m.matcher??c,y=[m,...a],w=new Set(l);return w.add(f),[i[0],b,y,w]});return(await Promise.all(h.map(m=>o(m)))).flat()}}i[1]=p.matcher??c,a.unshift(p),l.add(f),s=!0;break}}if(!s)break;if(a.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let i=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>p=>{let h=f.body?.(p.entries)||p.entries,m=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??Di)({...p,entries:h,selector:f.selector?.(p.selector,h)||p.selector,parent:m[0]||p.parent,parentOrder:m[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},c)},c=>c)({prefix:"",selector:Wi(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let c of this.config.postprocess)c(l);return l}constructCustomCSS(e,r,n){let o=ie(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]),l=`${i}{${se(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,r,n=!1,o){let i=P(e)?await this.matchVariants(e):[e],s=async([l,c,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[c];if(p&&p[1]&&(n||!p[2]?.internal)){this.config.details&&r.rules.push(p[3]);let m=p[0],b=ie(p[1]),y=p[2];return P(b)?[[m,b,y]]:[[m,l,b,y,f]]}r.variantHandlers=f;let{rulesDynamic:h}=this.config;for(let[m,b,y,w]of h){if(w?.internal&&!n)continue;let R=c;if(w?.prefix){let C=A(w.prefix);if(o){let d=A(o);if(!C.some(g=>d.includes(g)))continue}else{let d=C.find(g=>c.startsWith(g));if(d==null)continue;R=c.slice(d.length)}}let x=R.match(b);if(!x)continue;let $=await y(x,r);if(!$)continue;if(this.config.details&&r.rules.push([b,y,w]),typeof $!="string")if(Symbol.asyncIterator in $){let C=[];for await(let d of $)d&&C.push(d);$=C}else Symbol.iterator in $&&!Array.isArray($)&&($=Array.from($).filter(pt));let V=Xt($).filter(C=>C.length);if(V.length)return V.map(C=>{if(P(C))return[m,C,w];let d=f;for(let g of C)g[0]===re.variants?d=[...A(g[1]),...d]:g[0]===re.parent?d=[{parent:g[1]},...d]:g[0]===re.selector?d=[{selector:g[1]},...d]:g[0]===re.layer&&(d=[{layer:g[1]},...d]);return[m,l,C,w,d]})}},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a.length)return a}stringifyUtil(e,r){if(!e)return;if(ft(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:l}=this.applyVariants(e),c=se(o);if(!c)return;let{layer:f,sort:p,...h}=e[3]??{},m={...h,layer:s??f,sort:a??p};return[e[0],n,c,i,m,this.config.details?r:void 0,l]}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:Yt,i,s;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let f=A(a[2].prefix).find(p=>e.startsWith(p));if(f==null)continue;l=e.slice(f.length)}if(Jt(a)){if(a[0]===l){i=i||a[2],s=a[1],o(a);break}}else{let c=l.match(a[0]);if(c&&(s=a[1](c,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=A(s).map(a=>P(a)?Qt(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(e)?await this.matchVariants(e):[e];for(let l of a){let[c,f]=l;if(c!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(h=>P(h)?c.replace(f,h):h))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new De,s=(await Promise.all(B(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ie(f),void 0,[]]];return!p&&this.config.warn&&tr(`unmatched utility "${f}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,l]=e,c=[];for(let f of s){if(ft(f)){c.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:h,parent:m,sort:b,noMerge:y,layer:w}=this.applyVariants(f,[...f[4],...l],a);i.getFallback(w??o.layer,new We).getFallback(p,m,[[],f[0]])[0].push([h,!!(y??f[3]?.noMerge),b??0])}return c.concat(i.flatMap((f,p)=>f.map(([h,m],b,y)=>{let w=(x,$,V)=>{let C=Math.max(...V.map(g=>g[1])),d=V.map(g=>g[0]);return(x?[d.flat(1)]:d).map(g=>{let E=se(g);if(E)return[m,b,E,y,{...o,noMerge:$,sort:C,layer:p},r,void 0]})};return[[h.filter(([,x])=>x).map(([x,,$])=>[x,$]),!0],[h.filter(([,x])=>!x).map(([x,,$])=>[x,$]),!1]].map(([x,$])=>[...w(!1,$,x.filter(([V])=>V.some(C=>C[0]===re.shortcutsNoMerge))),...w(!0,$,x.filter(([V])=>V.every(C=>C[0]!==re.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):P(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):P(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function cr(t,e){return await mt.create(t,e)}var ur=/\s\$\$\s+/g;function _i(t){return ur.test(t)}function Ii(t,e){return _i(t)?t.replace(ur,e?` ${e} `:" "):e?`${e} ${t}`:t}var lr=/^\[(.+?)(~?=)"(.*)"\]$/;function Wi(t){return lr.test(t)?t.replace(lr,(e,r,n,o)=>`[${Ie(r)}${n}"${Ie(o)}"]`):`.${Ie(t)}`}function Di(t,e){return e(t)}var gt=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function fr(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let a=Ht(i);if(!a)return;let l=a[1];if(l.startsWith(e))l=l.slice(e.length);else if(r)return;let c=a[2],[,f="",p=c]=c.match(gt)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${l}`;if(o==null){let h=s?.config?.separators?.join("|");h?o=new RegExp(`^(.*\\](?:${h}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,h,m]=c.match(o)||[];if(m)return`${h}${f}${l}-${m}`}if(f&&p.match(/^[\d.]+$/)){let h=f.split(/([^:]*:)/g).filter(Boolean),m=h.pop()+p,b=h.join("");return[{matcher:`${f}${l}-${p}`},{matcher:`${b}${l}-${m}`}]}return`${f}${l}-${p}`}}}var Ni=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Bi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,pr=/[\s'"`;>]+/;function dr(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Ni),o,i=0;for(let x of n){let[,$,V]=x,C=x.index+$.length;if(r>C&&r<=C+V.length){i=C,o=V;break}}if(!o)return null;let s=o.matchAll(Bi),a=0,l,c;for(let x of s){let[$,V,C]=x,d=i+x.index;if(r>d&&r<=d+$.length){a=d,l=V,c=C?.slice(1);break}}if(!l||l==="class"||l==="className"||l===":class")return null;let f=!!t?.prefix&&l.startsWith(t.prefix);if(t?.prefixedOnly&&!f)return null;let p=f?l.slice(t.prefix.length):l;if(c===void 0)return{extracted:p,resolveReplacement(x){let $=f?t.prefix.length:0;return{start:a+$,end:a+l.length,replacement:x}}};let h=a+l.length+2,m=pr.exec(c),b=0,y;for(;m;){let[x]=m;if(r>h+b&&r<=h+b+m.index){y=c.slice(b,b+m.index);break}b+=m.index+x.length,m=pr.exec(c.slice(b))}y===void 0&&(y=c.slice(b));let[,w="",R]=y.match(gt)||[];return{extracted:`${w}${p}-${R}`,transformSuggestions(x){return x.filter($=>$.startsWith(`${w}${p}-`)).map($=>w+$.slice(w.length+p.length+1))},resolveReplacement(x){return{start:b+h,end:b+h+y.length,replacement:w+x.slice(w.length+p.length+1)}}}}}}var Ki=["v-bind:",":"],hr=/[\s'"`;]+/g,bt=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Gi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,xt=["placeholder","fill","opacity","stroke-opacity"];function mr(t){let e=t?.ignoreAttributes??xt,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(bt)).flatMap(i=>Array.from((i[1]||"").matchAll(Gi))).flatMap(([,i,...s])=>{let a=s.filter(Boolean).join("");if(e.includes(i))return[];for(let l of Ki)if(i.startsWith(l)){i=i.slice(l.length);break}if(!a){if(xe(i)&&r!==!1){let l=[`[${i}=""]`];return n&&l.push(`[${i}="true"]`),l}return[]}return["class","className"].includes(i)?a.split(hr).filter(xe):bt.test(a)?(bt.lastIndex=0,this.extract({code:a})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:a.split(hr).filter(l=>!!l&&l!==":").map(l=>`[${i}~="${l}"]`)})}}}var Hi=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??xt;let e=[fr(t)],r=[mr(t)],n=[dr(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:e,extractors:r,options:t,autocomplete:{extractors:n},extractorDefault:t.strict?!1:void 0}},gr=Hi;function qi(t){let e,r,n=2166136261;for(e=0,r=t.length;e<r;e++)n^=t.charCodeAt(e),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function br(t,e,r,n){for(let o of Array.from(t.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${qi(i)}`;e.set(s,i),t=t.replace(i,s)}return t}function xr(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var Yi=/\/\/#\s*sourceMappingURL=.*\n?/g;function yr(t){return t.includes("sourceMappingURL=")?t.replace(Yi,""):t}var Xi=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,Zi=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,Ji=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function Qi(t){let e=[];for(let o of t.matchAll(Zi))o.index!==0&&!/^[\s'"`]/.test(t[o.index-1]??"")||e.push(o[0]);for(let o of t.matchAll(Xi))e.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=br(t,r,/-\[(?!&.+?;)[^\]]*\]/g,n),t&&t.split(Fe).forEach(o=>{o.includes(n)&&(o=xr(o,r)),xe(o)&&!Ji.test(o)&&e.push(o)}),e}function wr(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return Qi(yr(t))}}}var $r=[{layer:"preflights",getCSS(t){if(t.theme.preflightBase){let e=se(Object.entries(t.theme.preflightBase));return A(t.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${e}}`).join("")}}}];function ae(t,e,r){if(t==="")return;let n=t.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(t[a]){case e:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[t.slice(s,a+1),t.slice(a+1),t.slice(0,s)];break}}function le(t,e,r,n){if(t===""||(P(n)&&(n=[n]),n.length===0))return;let o=t.length,i=0;for(let s=0;s<o;s++)switch(t[s]){case e:i++;break;case r:if(--i<0)return;break;default:for(let a of n){let l=a.length;if(l&&a===t.slice(s,s+l)&&i===0)return s===0||s===o-l?void 0:[t.slice(0,s),t.slice(s+l)]}}return[t,""]}function ce(t,e,r){r=r??10;let n=[],o=0;for(;t!=="";){if(++o>r)return;let i=le(t,"(",")",e);if(!i)return;let[s,a]=i;n.push(s),t=a}if(n.length>0)return n}var yt=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Sr=["%alpha","<alpha-value>"],es=new RegExp(Sr.map(t=>Z(t)).join("|"));function J(t=""){let e=ts(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:o}=e,i=r.toLowerCase();if(n.length!==0&&!(yt.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 we(t){let e=t.alpha??1;return typeof e=="string"&&Sr.includes(e)?1:e}function _(t,e){if(typeof t=="string")return t.replace(es,`${e??1}`);let{components:r}=t,{alpha:n,type:o}=t;return n=e??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,yt.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function ts(t){if(!t)return;let e=rs(t);if(e!=null||(e=ns(t),e!=null)||(e=os(t),e!=null)||(e=ss(t),e!=null)||(e=as(t),e!=null))return e}function rs(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function ns(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function os(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,o=ce(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 is=new RegExp(`^(${yt.join("|")})\\((.+)\\)$`,"i");function ss(t){let e=t.match(is);if(!e)return;let[,r,n]=e,o=vr(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function as(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=vr(e[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function vr(t){let e=ce(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let i=e.splice(r-2);e.push(i.join(" ")),--r}let n=ce(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let o=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:o}}function Cr(t){let e=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=t[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(t))Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return e}var kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Er=new Uint8Array(64),ls=new Uint8Array(128);for(let t=0;t<kr.length;t++){let e=kr.charCodeAt(t);Er[t]=e,ls[e]=t}function $e(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(Er[o])}while(n>0);return e}var Rr=1024*16,Tr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},wt=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Rr)}write(e){let{buffer:r}=this;r[this.pos++]=e,this.pos===Rr&&(this.out+=Tr.decode(r),this.pos=0)}flush(){let{buffer:e,out:r,pos:n}=this;return n>0?r+Tr.decode(e.subarray(0,n)):r}};function jr(t){let e=new wt,r=0,n=0,o=0,i=0;for(let s=0;s<t.length;s++){let a=t[s];if(s>0&&e.write(59),a.length===0)continue;let l=0;for(let c=0;c<a.length;c++){let f=a[c];c>0&&e.write(44),l=$e(e,f[0],l),f.length!==1&&(r=$e(e,f[1],r),n=$e(e,f[2],n),o=$e(e,f[3],o),f.length!==4&&(i=$e(e,f[4],i)))}}return e.flush()}var Ke=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},Ge=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,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(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function cs(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var us=cs(),$t=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=jr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+us(this.toString())}};function fs(t){let e=t.split(`
|
|
3
3
|
`),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function ps(t,e){let r=t.split(/[/\\]/),n=e.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 ds=Object.prototype.toString;function hs(t){return ds.call(t)==="[object Object]"}function Ar(t){let e=t.split(`
|
|
4
4
|
`),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let c=i+s>>1;o<r[c]?s=c:i=c+1}let a=i-1,l=o-r[a];return{line:a,column:l}}}var ms=/\w/,St=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.65.0-beta.
|
|
4
|
+
"version": "0.65.0-beta.2",
|
|
5
5
|
"description": "CSS-in-JS Runtime for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/preset-attributify": "0.65.0-beta.
|
|
39
|
-
"@unocss/core": "0.65.0-beta.
|
|
40
|
-
"@unocss/preset-uno": "0.65.0-beta.
|
|
38
|
+
"@unocss/preset-attributify": "0.65.0-beta.2",
|
|
39
|
+
"@unocss/core": "0.65.0-beta.2",
|
|
40
|
+
"@unocss/preset-uno": "0.65.0-beta.2"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",
|
package/uno.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Ma=Object.defineProperty;var _a=(e,t)=>{for(var r in t)Ma(e,r,{get:t[r],enumerable:!0})};var Ae="default",Qe="preflights",Fa="shortcuts",La="imports",Rn={[La]:-200,[Qe]:-100,[Fa]:-10,[Ae]:0};var et=/[\\:]?[\s'"`;{}]+/g;function Ua(e){return e.split(et)}var tt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ua(e)}};function A(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Mr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function rt(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 nt=te;var Wa=/[\w\u00A0-\uFFFF%-?]/;function En(e=""){return Wa.test(e)}function Tn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Fr(e){return e!=null}function jn(){}var ot=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)))}},it=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function zn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ba(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 ye(e){return e==null?"":Ba(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function st(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Lr(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 st(n)&&st(o)&&Object.keys(o).forEach(s=>{st(n[s])&&st(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Lr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Pe(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"?Pe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Pe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Pe(n):n;return r}return e}function On(e){return P(e[0])}function An(e){return P(e[0])}var at={};function Na(e=["-",":"]){let t=e.join("|");return at[t]||(at[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),at[t].lastIndex=0,at[t]}function Da(e,t=["-",":"],r=5){let n=Na(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,g)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let b=g+f.length+p.length+1,x={length:u.length,items:[]};a.set(g,x);for(let S of[...d.matchAll(/\S+/g)]){let z=b+S.index,v=a.get(z)?.items;v?a.delete(z):v=[{offset:z,length:S[0].length,className:S[0]}];for(let C of v)C.className=C.className==="~"?f:C.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(C)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Da(e,t,r);return typeof e=="string"?n.expanded:e}var Pn=new Set;function Mn(e){Pn.has(e)||(console.warn("[unocss]",e),Pn.add(e))}function Ln(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var _n="_uno_resolved";async function Ia(e){let t=typeof e=="function"?await e():await e;if(_n in t)return t;t={...t},Object.defineProperty(t,_n,{value:!0,enumerable:!1});let r=t.shortcuts?Ln(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function Un(e){let t=await Ia(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(A).flatMap(Un))).flat();return[t,...r]}function Ka(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(Fn(...t)),exclude:Z(Fn(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Ur(e={},t={}){let r=Object.assign({},t,e),n=Mr((await Promise.all((r.presets||[]).flatMap(A).flatMap(Un))).flat(),(m,h)=>m.name===h.name),o=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Rn,...i.map(m=>m.layers));function l(m){return Z(i.flatMap(h=>A(h[m]||[])))}let u=l("extractors"),f=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=tt),f&&!u.includes(f)&&u.unshift(f),u.sort((m,h)=>(m.order||0)-(h.order||0));let p=l("rules"),d={},g=p.length,b=p.map((m,h)=>{if(On(m)){A(m[2]?.prefix||"").forEach(L=>{d[L+m[0]]=[h,m[1],m[2],m]});return}return[h,...m]}).filter(Boolean).reverse(),x=Ga(i.map(m=>m.theme)),S=l("extendTheme");for(let m of S)x=m(x)||x;let z={templates:Z(i.flatMap(m=>A(m.autocomplete?.templates))),extractors:i.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,h)=>(m.order||0)-(h.order||0)),shorthands:Ha(i.map(m=>m.autocomplete?.shorthands||{}))},v=l("separators");v.length||(v=[":","-"]);let C=l("content"),W=Ka(C),O={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:g,rulesDynamic:b,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:z,variants:l("variants").map(Tn).sort((m,h)=>(m.order||0)-(h.order||0)),shortcuts:Ln(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:v,details:r.details??r.envMode==="dev",content:W,transformers:Mr(l("transformers"),(m,h)=>m.name===h.name)};for(let m of i)m?.configResolved?.(O);return O}function Ga(e){return e.map(t=>t?Pe(t):{}).reduce((t,r)=>Lr(t,r),{})}function Ha(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 Fn(...e){return e.flatMap(qa)}function qa(e){return Array.isArray(e)?e:e?[e]:[]}var Wn="0.65.0-beta.1";function Bn(){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"},Wr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=Wn;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Bn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Ur(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._cache.clear(),this.config=await Ur(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(rt(s)&&rt(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Fr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let m={generator:this,theme:this.config.theme};this.config.safelist.flatMap(h=>typeof h=="function"?h(m):h).forEach(h=>{f.has(h)||f.add(h)})}let p=a?"":`
|
|
1
|
+
"use strict";(()=>{var Ma=Object.defineProperty;var _a=(e,t)=>{for(var r in t)Ma(e,r,{get:t[r],enumerable:!0})};var Ae="default",Qe="preflights",Fa="shortcuts",La="imports",Rn={[La]:-200,[Qe]:-100,[Fa]:-10,[Ae]:0};var et=/[\\:]?[\s'"`;{}]+/g;function Ua(e){return e.split(et)}var tt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Ua(e)}};function A(e=[]){return Array.isArray(e)?e:[e]}function Z(e){return Array.from(new Set(e))}function Mr(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 Ve=class extends Set{_map;constructor(t){super(t),this._map??=new Map}add(t){return this._map??=new Map,this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}};function rt(e){return e instanceof Ve}function ae(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(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 nt=te;var Wa=/[\w\u00A0-\uFFFF%-?]/;function En(e=""){return Wa.test(e)}function Tn(e){return typeof e=="function"?{match:e}:e}function _r(e){return e.length===3}function Fr(e){return e!=null}function jn(){}var ot=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)))}},it=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 xe(e){return P(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function zn(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>xe(t)):[e]:[xe(e)]}function Ba(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 ye(e){return e==null?"":Ba(e).map(([t,r])=>r!=null&&typeof r!="function"?`${t}:${r};`:void 0).filter(Boolean).join("")}function st(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Lr(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 st(n)&&st(o)&&Object.keys(o).forEach(s=>{st(n[s])&&st(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=Lr(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function Pe(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"?Pe(n):n;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:Pe(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(n=e[t])&&typeof n=="object"?Pe(n):n;return r}return e}function On(e){return P(e[0])}function An(e){return P(e[0])}var at={};function Na(e=["-",":"]){let t=e.join("|");return at[t]||(at[t]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),at[t].lastIndex=0,at[t]}function Da(e,t=["-",":"],r=5){let n=Na(t),o,i=e.toString(),s=new Set,a=new Map;do o=!1,i=i.replace(n,(u,f,p,d,g)=>{if(!t.includes(p))return u;o=!0,s.add(f+p);let b=g+f.length+p.length+1,x={length:u.length,items:[]};a.set(g,x);for(let S of[...d.matchAll(/\S+/g)]){let z=b+S.index,v=a.get(z)?.items;v?a.delete(z):v=[{offset:z,length:S[0].length,className:S[0]}];for(let C of v)C.className=C.className==="~"?f:C.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(C)}return"$".repeat(u.length)}),r-=1;while(o&&r);let l;if(typeof e=="string"){l="";let u=0;for(let[f,p]of a)l+=e.slice(u,f),l+=p.items.map(d=>d.className).join(" "),u=f+p.length;l+=e.slice(u)}else{l=e;for(let[u,f]of a)l.overwrite(u,u+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:a,get expanded(){return l.toString()}}}function Vn(e,t=["-",":"],r=5){let n=Da(e,t,r);return typeof e=="string"?n.expanded:e}var Pn=new Set;function Mn(e){Pn.has(e)||(console.warn("[unocss]",e),Pn.add(e))}function Ln(e){return A(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var _n="_uno_resolved";async function Ia(e){let t=typeof e=="function"?await e():await e;if(_n in t)return t;t={...t},Object.defineProperty(t,_n,{value:!0,enumerable:!1});let r=t.shortcuts?Ln(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&t.prefix&&(i.prefix=A(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(n),t.rules?.forEach(n)}return t}async function Un(e){let t=await Ia(e);if(!t.presets)return[t];let r=(await Promise.all((t.presets||[]).flatMap(A).flatMap(Un))).flat();return[t,...r]}function Ka(e){if(e.length===0)return{};let t=[],r=[],n=!1,o=[],i=[],s=[];for(let l of e){if(l.pipeline===!1){n=!0;break}else l.pipeline?.include&&t.push(l.pipeline.include),l.pipeline?.exclude&&r.push(l.pipeline.exclude);l.filesystem&&o.push(l.filesystem),l.inline&&i.push(l.inline),l.plain&&s.push(l.plain)}let a={pipeline:n?!1:{include:Z(Fn(...t)),exclude:Z(Fn(...r))}};return o.length&&(a.filesystem=Z(o.flat())),i.length&&(a.inline=Z(i.flat())),s.length&&(a.plain=Z(s.flat())),a}async function Ur(e={},t={}){let r=Object.assign({},t,e),n=Mr((await Promise.all((r.presets||[]).flatMap(A).flatMap(Un))).flat(),(m,h)=>m.name===h.name),o=[...n.filter(m=>m.enforce==="pre"),...n.filter(m=>!m.enforce),...n.filter(m=>m.enforce==="post")],i=[...o,r],s=[...i].reverse(),a=Object.assign({},Rn,...i.map(m=>m.layers));function l(m){return Z(i.flatMap(h=>A(h[m]||[])))}let u=l("extractors"),f=s.find(m=>m.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=tt),f&&!u.includes(f)&&u.unshift(f),u.sort((m,h)=>(m.order||0)-(h.order||0));let p=l("rules"),d={},g=p.length,b=p.map((m,h)=>{if(On(m)){A(m[2]?.prefix||"").forEach(L=>{d[L+m[0]]=[h,m[1],m[2],m]});return}return[h,...m]}).filter(Boolean).reverse(),x=Ga(i.map(m=>m.theme)),S=l("extendTheme");for(let m of S)x=m(x)||x;let z={templates:Z(i.flatMap(m=>A(m.autocomplete?.templates))),extractors:i.flatMap(m=>A(m.autocomplete?.extractors)).sort((m,h)=>(m.order||0)-(h.order||0)),shorthands:Ha(i.map(m=>m.autocomplete?.shorthands||{}))},v=l("separators");v.length||(v=[":","-"]);let C=l("content"),W=Ka(C),O={mergeSelectors:!0,warn:!0,sortLayers:m=>m,...r,blocklist:l("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:x,rulesSize:g,rulesDynamic:b,rulesStaticMap:d,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:z,variants:l("variants").map(Tn).sort((m,h)=>(m.order||0)-(h.order||0)),shortcuts:Ln(l("shortcuts")).reverse(),extractors:u,safelist:l("safelist"),separators:v,details:r.details??r.envMode==="dev",content:W,transformers:Mr(l("transformers"),(m,h)=>m.name===h.name)};for(let m of i)m?.configResolved?.(O);return O}function Ga(e){return e.map(t=>t?Pe(t):{}).reduce((t,r)=>Lr(t,r),{})}function Ha(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 Fn(...e){return e.flatMap(qa)}function qa(e){return Array.isArray(e)?e:e?[e]:[]}var Wn="0.65.0-beta.2";function Bn(){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"},Wr=class e{constructor(t={},r={}){this.userConfig=t;this.defaults=r}version=Wn;_cache=new Map;config=void 0;blocked=new Set;parentOrders=new Map;events=Bn();static async create(t={},r={}){let n=new e(t,r);return n.config=await Ur(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._cache.clear(),this.config=await Ur(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(rt(s)&&rt(n))for(let a of s)n.setCount(a,n.getCount(a)+s.getCount(a));else for(let a of s)n.add(a)}return n}makeContext(t,r){let n={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,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 l of this.config.preprocess)o=l(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(l=>!l||this.isBlocked(l[1]))){this.blocked.add(t),this._cache.set(n,null);return}let s=async l=>{let u=this.makeContext(t,[r||l[0],l[1],l[2],l[3]]);this.config.details&&(u.variants=[...l[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(d=>this.stringifyUtil(d,u)).filter(Fr)},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a?.length)return this._cache.set(n,a),a;this._cache.set(n,null)}async generate(t,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:a=!1,extendedInfo:l=!1}=r,u=this.config.outputToCssLayers,f=P(t)?await this.applyExtractors(t,n,l?new Ve:new Set):Array.isArray(t)?new Set(t):t;if(s){let m={generator:this,theme:this.config.theme};this.config.safelist.flatMap(h=>typeof h=="function"?h(m):h).forEach(h=>{f.has(h)||f.add(h)})}let p=a?"":`
|
|
2
2
|
`,d=new Set([Ae]),g=l?new Map:new Set,b=new Map,x={},S=Array.from(f).map(async m=>{if(g.has(m))return;let h=await this.parseToken(m);if(h!=null){g instanceof Map?g.set(m,{data:h,count:rt(f)?f.getCount(m):-1}):g.add(m);for(let V of h){let L=V[3]||"",G=V[4]?.layer;b.has(L)||b.set(L,[]),b.get(L).push(V),G&&d.add(G)}}});await Promise.all(S),await(async()=>{if(!i)return;let m={generator:this,theme:this.config.theme},h=new Set([]);this.config.preflights.forEach(({layer:V=Qe})=>{d.add(V),h.add(V)}),x=Object.fromEntries(await Promise.all(Array.from(h).map(async V=>{let G=(await Promise.all(this.config.preflights.filter(oe=>(oe.layer||Qe)===V).map(async oe=>await oe.getCSS(m)))).filter(Boolean).join(p);return[V,G]})))})();let z=this.config.sortLayers(Array.from(d).sort((m,h)=>(this.config.layers[m]??0)-(this.config.layers[h]??0)||m.localeCompare(h))),v={},C=(m=Ae)=>{if(v[m])return v[m];let h=Array.from(b).sort((L,G)=>(this.parentOrders.get(L[0])??0)-(this.parentOrders.get(G[0])??0)||L[0]?.localeCompare(G[0]||"")||0).map(([L,G])=>{let oe=G.length,Oe=G.filter(w=>(w[4]?.layer||Ae)===m).sort((w,E)=>w[0]-E[0]||(w[4]?.sort||0)-(E[4]?.sort||0)||w[5]?.currentSelector?.localeCompare(E[5]?.currentSelector??"")||w[1]?.localeCompare(E[1]||"")||w[2]?.localeCompare(E[2]||"")||0).map(([,w,E,,B,,ie])=>[[[(w&&Za(w,o))??"",B?.sort??0]],E,!!(ie??B?.noMerge)]);if(!Oe.length)return;let k=Oe.reverse().map(([w,E,B],ie)=>{if(!B&&this.config.mergeSelectors)for(let se=ie+1;se<oe;se++){let Q=Oe[se];if(Q&&!Q[2]&&(w&&Q[0]||w==null&&Q[0]==null)&&Q[1]===E)return w&&Q[0]&&Q[0].push(...w),null}let Pr=w?Z(w.sort((se,Q)=>se[1]-Q[1]||se[0]?.localeCompare(Q[0]||"")||0).map(se=>se[0]).filter(Boolean)):[];return Pr.length?`${Pr.join(`,${p}`)}{${E}}`:E}).filter(Boolean).reverse().join(p);if(!L)return k;let T=L.split(" $$ ");return`${T.join("{")}{${p}${k}${p}${"}".repeat(T.length)}`}).filter(Boolean).join(p);if(i&&(h=[x[m],h].filter(Boolean).join(p)),u&&h){let L=typeof u=="object"?u.cssLayerName?.(m):void 0;L!==null&&(L||(L=m),h=`@layer ${L}{${p}${h}${p}}`)}let V=a?"":`/* layer: ${m} */${p}`;return v[m]=h?V+h:""},W=(m=z,h)=>m.filter(V=>!h?.includes(V)).map(V=>C(V)||"").filter(Boolean).join(p);return{get css(){return W()},layers:z,matched:g,getLayers:W,getLayer:C,setLayer:async(m,h)=>{let V=await h(C(m));return v[m]=V,V}}}async matchVariants(t,r){let n={rawSelector:t,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,a,l]=i;for(;s;){s=!1;let u=i[1];for(let f of this.config.variants){if(!f.multiPass&&l.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 d=p.map(g=>{let b=g.matcher??u,x=[g,...a],S=new Set(l);return S.add(f),[i[0],b,x,S]});return(await Promise.all(d.map(g=>o(g)))).flat()}}i[1]=p.matcher??u,a.unshift(p),l.add(f),s=!0;break}}if(!s)break;if(a.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 d=f.body?.(p.entries)||p.entries,g=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??Qa)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:g[0]||p.parent,parentOrder:g[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},u)},u=>u)({prefix:"",selector:Ja(n),pseudo:"",entries:t[2]}),{parent:s,parentOrder:a}=i;s!=null&&a!=null&&this.parentOrders.set(s,a);let l={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(l);return l}constructCustomCSS(t,r,n){let o=xe(r);if(P(o))return o;let{selector:i,entries:s,parent:a}=this.applyVariants([0,n||t.rawSelector,o,void 0,t.variantHandlers]),l=`${i}{${ye(s)}}`;return a?`${a}{${l}}`:l}async parseUtil(t,r,n=!1,o){let i=P(t)?await this.matchVariants(t):[t],s=async([l,u,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[u];if(p&&p[1]&&(n||!p[2]?.internal)){this.config.details&&r.rules.push(p[3]);let g=p[0],b=xe(p[1]),x=p[2];return P(b)?[[g,b,x]]:[[g,l,b,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let[g,b,x,S]of d){if(S?.internal&&!n)continue;let z=u;if(S?.prefix){let O=A(S.prefix);if(o){let m=A(o);if(!O.some(h=>m.includes(h)))continue}else{let m=O.find(h=>u.startsWith(h));if(m==null)continue;z=u.slice(m.length)}}let v=z.match(b);if(!v)continue;let C=await x(v,r);if(!C)continue;if(this.config.details&&r.rules.push([b,x,S]),typeof C!="string")if(Symbol.asyncIterator in C){let O=[];for await(let m of C)m&&O.push(m);C=O}else Symbol.iterator in C&&!Array.isArray(C)&&(C=Array.from(C).filter(Fr));let W=zn(C).filter(O=>O.length);if(W.length)return W.map(O=>{if(P(O))return[g,O,S];let m=f;for(let h of O)h[0]===pe.variants?m=[...A(h[1]),...m]:h[0]===pe.parent?m=[{parent:h[1]},...m]:h[0]===pe.selector?m=[{selector:h[1]},...m]:h[0]===pe.layer&&(m=[{layer:h[1]},...m]);return[g,l,O,S,m]})}},a=(await Promise.all(i.map(l=>s(l)))).flat().filter(l=>!!l);if(a.length)return a}stringifyUtil(t,r){if(!t)return;if(_r(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:a,noMerge:l}=this.applyVariants(t),u=ye(o);if(!u)return;let{layer:f,sort:p,...d}=t[3]??{},g={...d,layer:s??f,sort:a??p};return[t[0],n,u,i,g,this.config.details?r:void 0,l]}async expandShortcut(t,r,n=5){if(n===0)return;let o=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:jn,i,s;for(let a of this.config.shortcuts){let l=t;if(a[2]?.prefix){let f=A(a[2].prefix).find(p=>t.startsWith(p));if(f==null)continue;l=t.slice(f.length)}if(An(a)){if(a[0]===l){i=i||a[2],s=a[1],o(a);break}}else{let u=l.match(a[0]);if(u&&(s=a[1](u,r)),s){i=i||a[2],o(a);break}}}if(s&&(s=A(s).map(a=>P(a)?Vn(a.trim()).split(/\s+/g):a).flat()),!s){let a=P(t)?await this.matchVariants(t):[t];for(let l of a){let[u,f]=l;if(u!==f){let p=await this.expandShortcut(f,r,n-1);p&&(s=p[0].map(d=>P(d)?u.replace(f,d):d))}}}if(s)return[(await Promise.all(s.map(async a=>(P(a)?(await this.expandShortcut(a,r,n-1))?.[0]:void 0)||[a]))).flat(1).filter(a=>!!a),i]}async stringifyShortcuts(t,r,n,o={layer:this.config.shortcutsLayer}){let i=new it,s=(await Promise.all(Z(n).map(async f=>{let p=P(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",xe(f),void 0,[]]];return!p&&this.config.warn&&Mn(`unmatched utility "${f}" in shortcut "${t[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[a,,l]=t,u=[];for(let f of s){if(_r(f)){u.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:g,sort:b,noMerge:x,layer:S}=this.applyVariants(f,[...f[4],...l],a);i.getFallback(S??o.layer,new ot).getFallback(p,g,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),b??0])}return u.concat(i.flatMap((f,p)=>f.map(([d,g],b,x)=>{let S=(v,C,W)=>{let O=Math.max(...W.map(h=>h[1])),m=W.map(h=>h[0]);return(v?[m.flat(1)]:m).map(h=>{let V=ye(h);if(V)return[g,b,V,x,{...o,noMerge:C,sort:O,layer:p},r,void 0]})};return[[d.filter(([,v])=>v).map(([v,,C])=>[v,C]),!0],[d.filter(([,v])=>!v).map(([v,,C])=>[v,C]),!1]].map(([v,C])=>[...S(!1,C,v.filter(([W])=>W.some(O=>O[0]===pe.shortcutsNoMerge))),...S(!0,C,v.filter(([W])=>W.every(O=>O[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 Dn(e,t){return await Wr.create(e,t)}var In=/\s\$\$\s+/g;function Xa(e){return In.test(e)}function Za(e,t){return Xa(e)?e.replace(In,t?` ${t} `:" "):t?`${t} ${e}`:e}var Nn=/^\[(.+?)(~?=)"(.*)"\]$/;function Ja(e){return Nn.test(e)?e.replace(Nn,(t,r,n,o)=>`[${nt(r)}${n}"${nt(o)}"]`):`.${nt(e)}`}function Qa(e,t){return t(e)}function el(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 Kn(e,t,r,n){for(let o of Array.from(e.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${el(i)}`;t.set(s,i),e=e.replace(i,s)}return e}function Gn(e,t){for(let[r,n]of t.entries())e=e.replaceAll(r,n);return e}var tl=/\/\/#\s*sourceMappingURL=.*\n?/g;function Hn(e){return e.includes("sourceMappingURL=")?e.replace(tl,""):e}var rl=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,nl=/\[(\\\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 il(e){let t=[];for(let o of e.matchAll(nl))o.index!==0&&!/^[\s'"`]/.test(e[o.index-1]??"")||t.push(o[0]);for(let o of e.matchAll(rl))t.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return e=Kn(e,r,/-\[(?!&.+?;)[^\]]*\]/g,n),e&&e.split(et).forEach(o=>{o.includes(n)&&(o=Gn(o,r)),En(o)&&!ol.test(o)&&t.push(o)}),t}function qn(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:e}){return il(Hn(e))}}}var Yn=[{layer:"preflights",getCSS(e){if(e.theme.preflightBase){let t=ye(Object.entries(e.theme.preflightBase));return A(e.theme.preflightRoot??["*,::before,::after","::backdrop"]).map(n=>`${n}{${t}}`).join("")}}}];function ve(e,t,r){if(e==="")return;let n=e.length,o=0,i=!1,s=0;for(let a=0;a<n;a++)switch(e[a]){case t:i||(i=!0,s=a),o++;break;case r:if(--o,o<0)return;if(o===0)return[e.slice(s,a+1),e.slice(a+1),e.slice(0,s)];break}}function le(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 a of n){let l=a.length;if(l&&a===e.slice(s,s+l)&&i===0)return s===0||s===o-l?void 0:[e.slice(0,s),e.slice(s+l)]}}return[e,""]}function de(e,t,r){r=r??10;let n=[],o=0;for(;e!=="";){if(++o>r)return;let i=le(e,"(",")",t);if(!i)return;let[s,a]=i;n.push(s),e=a}if(n.length>0)return n}var Br=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Xn=["%alpha","<alpha-value>"],sl=new RegExp(Xn.map(e=>ae(e)).join("|"));function H(e=""){let t=al(e);if(t==null||t===!1)return;let{type:r,components:n,alpha:o}=t,i=r.toLowerCase();if(n.length!==0&&!(Br.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 re(e){let t=e.alpha??1;return typeof t=="string"&&Xn.includes(t)?1:t}function M(e,t){if(typeof e=="string")return e.replace(sl,`${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}`,Br.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function al(e){if(!e)return;let t=ll(e);if(t!=null||(t=cl(e),t!=null)||(t=ul(e),t!=null)||(t=pl(e),t!=null)||(t=dl(e),t!=null))return t}function ll(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 cl(e){let t={rebeccapurple:[102,51,153,1]}[e];if(t!=null)return{type:"rgb",components:t.slice(0,3),alpha:t[3]}}function ul(e){let t=e.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!t)return;let[,r,n]=t,o=de(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 fl=new RegExp(`^(${Br.join("|")})\\((.+)\\)$`,"i");function pl(e){let t=e.match(fl);if(!t)return;let[,r,n]=t,o=Zn(`${r} ${n}`);if(o){let{alpha:i,components:[s,...a]}=o;return{type:s,components:a,alpha:i}}}function dl(e){let t=e.match(/^color\((.+)\)$/);if(!t)return;let r=Zn(t[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Zn(e){let t=de(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=de(t[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:t};let o=n.pop();return t[r-1]=n.join("/"),{components:t,alpha:o}}function lt(e){let t=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=e[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(e))Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return t}var Jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",to=new Uint8Array(64),ml=new Uint8Array(128);for(let e=0;e<Jn.length;e++){let t=Jn.charCodeAt(e);to[e]=t,ml[t]=e}function Me(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(to[o])}while(n>0);return t}var Qn=1024*16,eo=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}},Nr=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Qn)}write(t){let{buffer:r}=this;r[this.pos++]=t,this.pos===Qn&&(this.out+=eo.decode(r),this.pos=0)}flush(){let{buffer:t,out:r,pos:n}=this;return n>0?r+eo.decode(t.subarray(0,n)):r}};function ro(e){let t=new Nr,r=0,n=0,o=0,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(s>0&&t.write(59),a.length===0)continue;let l=0;for(let u=0;u<a.length;u++){let f=a[u];u>0&&t.write(44),l=Me(t,f[0],l),f.length!==1&&(r=Me(t,f[1],r),n=Me(t,f[2],n),o=Me(t,f[3],o),f.length!==4&&(i=Me(t,f[4],i)))}}return t.flush()}var ct=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},ut=class e{constructor(t,r,n){this.start=t,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let r=this;for(;r;)t(r),r=r.next}eachPrevious(t){let r=this;for(;r;)t(r),r=r.previous}edit(t,r,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let r=t-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let r=this.content.replace(t,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let r=this.content.replace(t,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function gl(){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 hl=gl(),Dr=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=ro(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+hl(this.toString())}};function bl(e){let t=e.split(`
|
|
3
3
|
`),r=t.filter(i=>/^\t+/.test(i)),n=t.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let a=/^ +/.exec(s)[0].length;return Math.min(a,i)},1/0);return new Array(o+1).join(" ")}function xl(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 yl=Object.prototype.toString;function vl(e){return yl.call(e)==="[object Object]"}function no(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 a=i-1,l=o-r[a];return{line:a,column:l}}}var wl=/\w/,Ir=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(`
|